Skip to content

Commit 6bb47dd

Browse files
[RCF-564] (#321)
* Updated the condition for visibility of buttons in ack screen Signed-off-by: G S Prakash <prakash.gs@cyberpwn.com> * Updated the constants in template Signed-off-by: G S Prakash <prakash.gs@cyberpwn.com> --------- Signed-off-by: G S Prakash <prakash.gs@cyberpwn.com>
1 parent 3d47e6c commit 6bb47dd

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

android/clientmanager/src/main/java/io/mosip/registration/clientmanager/service/TemplateService.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package io.mosip.registration.clientmanager.service;
22

3+
import static io.mosip.registration.clientmanager.config.SessionManager.USER_NAME;
4+
35
import android.content.Context;
6+
import android.content.SharedPreferences;
47
import android.graphics.Bitmap;
58
import android.graphics.BitmapFactory;
69
import android.util.Base64;
@@ -28,13 +31,15 @@
2831
import java.util.HashMap;
2932
import java.util.List;
3033
import java.util.Map;
34+
import java.util.Objects;
3135
import java.util.Optional;
3236
import java.util.stream.Collectors;
3337

3438
import javax.inject.Singleton;
3539

3640
import io.mosip.registration.clientmanager.R;
3741
import io.mosip.registration.clientmanager.constant.Modality;
42+
import io.mosip.registration.clientmanager.dto.CenterMachineDto;
3843
import io.mosip.registration.clientmanager.dto.registration.BiometricsDto;
3944
import io.mosip.registration.clientmanager.dto.registration.RegistrationDto;
4045
import io.mosip.registration.clientmanager.dto.uispec.FieldSpecDto;
@@ -53,6 +58,8 @@ public class TemplateService {
5358

5459
private Context appContext;
5560

61+
SharedPreferences sharedPreferences;
62+
5663
MasterDataService masterDataService;
5764

5865
IdentitySchemaRepository identitySchemaRepository;
@@ -61,6 +68,9 @@ public TemplateService(Context appContext, MasterDataService masterDataService,
6168
this.appContext = appContext;
6269
this.masterDataService = masterDataService;
6370
this.identitySchemaRepository = identitySchemaRepository;
71+
sharedPreferences = this.appContext.getSharedPreferences(
72+
this.appContext.getString(R.string.app_name),
73+
Context.MODE_PRIVATE);
6474
}
6575

6676
public String getTemplate(RegistrationDto registrationDto, boolean isPreview) throws Exception {
@@ -366,6 +376,9 @@ private String getImage(int imagePath) {
366376

367377
private void setBasicDetails(boolean isPreview, RegistrationDto registrationDto, VelocityContext velocityContext) {
368378
generateQRCode(velocityContext,registrationDto);
379+
CenterMachineDto centerMachineDto = new CenterMachineDto();
380+
centerMachineDto = masterDataService.getRegistrationCenterMachineDetails();
381+
369382
velocityContext.put("isPreview", isPreview);
370383
velocityContext.put("ApplicationIDLabel", appContext.getString(R.string.app_id));
371384
velocityContext.put("ApplicationID", registrationDto.getRId());
@@ -383,9 +396,9 @@ private void setBasicDetails(boolean isPreview, RegistrationDto registrationDto,
383396
velocityContext.put("FaceLabel", appContext.getString(R.string.face_label));
384397
velocityContext.put("ExceptionPhotoLabel", appContext.getString(R.string.exception_photo_label));
385398
velocityContext.put("RONameLabel", appContext.getString(R.string.ro_label));
386-
velocityContext.put("ROName", "110011");
399+
velocityContext.put("ROName", sharedPreferences.getString(USER_NAME, ""));
387400
velocityContext.put("RegCenterLabel", appContext.getString(R.string.reg_center));
388-
velocityContext.put("RegCenter", "10011");
401+
velocityContext.put("RegCenter", centerMachineDto.getCenterId());
389402
velocityContext.put("ImportantGuidelines", appContext.getString(R.string.imp_guidelines));
390403

391404
velocityContext.put("LeftEyeLabel", appContext.getString(R.string.left_iris));

lib/ui/process_ui/new_process.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,7 @@ class _NewProcessState extends State<NewProcess> with WidgetsBindingObserver {
557557
: Row(
558558
mainAxisAlignment: MainAxisAlignment.start,
559559
children: [
560-
!isPortrait &&
561-
globalProvider.newProcessTabIndex == size + 2
560+
globalProvider.newProcessTabIndex == size + 2
562561
? ElevatedButton(
563562
onPressed: () async {
564563
await connectivityProvider
@@ -578,8 +577,7 @@ class _NewProcessState extends State<NewProcess> with WidgetsBindingObserver {
578577
SizedBox(
579578
width: 10.w,
580579
),
581-
!isPortrait &&
582-
globalProvider.newProcessTabIndex == size + 2
580+
globalProvider.newProcessTabIndex == size + 2
583581
? ElevatedButton(
584582
onPressed: () async {
585583
await connectivityProvider

0 commit comments

Comments
 (0)