Skip to content

Commit

Permalink
[RCF-564] (#321)
Browse files Browse the repository at this point in the history
* Updated the condition for visibility of buttons in ack screen

Signed-off-by: G S Prakash <[email protected]>

* Updated the constants in template

Signed-off-by: G S Prakash <[email protected]>

---------

Signed-off-by: G S Prakash <[email protected]>
  • Loading branch information
GSPrakashNaidu2662 authored Apr 22, 2024
1 parent 3d47e6c commit 6bb47dd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package io.mosip.registration.clientmanager.service;

import static io.mosip.registration.clientmanager.config.SessionManager.USER_NAME;

import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.Base64;
Expand Down Expand Up @@ -28,13 +31,15 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;

import javax.inject.Singleton;

import io.mosip.registration.clientmanager.R;
import io.mosip.registration.clientmanager.constant.Modality;
import io.mosip.registration.clientmanager.dto.CenterMachineDto;
import io.mosip.registration.clientmanager.dto.registration.BiometricsDto;
import io.mosip.registration.clientmanager.dto.registration.RegistrationDto;
import io.mosip.registration.clientmanager.dto.uispec.FieldSpecDto;
Expand All @@ -53,6 +58,8 @@ public class TemplateService {

private Context appContext;

SharedPreferences sharedPreferences;

MasterDataService masterDataService;

IdentitySchemaRepository identitySchemaRepository;
Expand All @@ -61,6 +68,9 @@ public TemplateService(Context appContext, MasterDataService masterDataService,
this.appContext = appContext;
this.masterDataService = masterDataService;
this.identitySchemaRepository = identitySchemaRepository;
sharedPreferences = this.appContext.getSharedPreferences(
this.appContext.getString(R.string.app_name),
Context.MODE_PRIVATE);
}

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

private void setBasicDetails(boolean isPreview, RegistrationDto registrationDto, VelocityContext velocityContext) {
generateQRCode(velocityContext,registrationDto);
CenterMachineDto centerMachineDto = new CenterMachineDto();
centerMachineDto = masterDataService.getRegistrationCenterMachineDetails();

velocityContext.put("isPreview", isPreview);
velocityContext.put("ApplicationIDLabel", appContext.getString(R.string.app_id));
velocityContext.put("ApplicationID", registrationDto.getRId());
Expand All @@ -383,9 +396,9 @@ private void setBasicDetails(boolean isPreview, RegistrationDto registrationDto,
velocityContext.put("FaceLabel", appContext.getString(R.string.face_label));
velocityContext.put("ExceptionPhotoLabel", appContext.getString(R.string.exception_photo_label));
velocityContext.put("RONameLabel", appContext.getString(R.string.ro_label));
velocityContext.put("ROName", "110011");
velocityContext.put("ROName", sharedPreferences.getString(USER_NAME, ""));
velocityContext.put("RegCenterLabel", appContext.getString(R.string.reg_center));
velocityContext.put("RegCenter", "10011");
velocityContext.put("RegCenter", centerMachineDto.getCenterId());
velocityContext.put("ImportantGuidelines", appContext.getString(R.string.imp_guidelines));

velocityContext.put("LeftEyeLabel", appContext.getString(R.string.left_iris));
Expand Down
6 changes: 2 additions & 4 deletions lib/ui/process_ui/new_process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,7 @@ class _NewProcessState extends State<NewProcess> with WidgetsBindingObserver {
: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
!isPortrait &&
globalProvider.newProcessTabIndex == size + 2
globalProvider.newProcessTabIndex == size + 2
? ElevatedButton(
onPressed: () async {
await connectivityProvider
Expand All @@ -578,8 +577,7 @@ class _NewProcessState extends State<NewProcess> with WidgetsBindingObserver {
SizedBox(
width: 10.w,
),
!isPortrait &&
globalProvider.newProcessTabIndex == size + 2
globalProvider.newProcessTabIndex == size + 2
? ElevatedButton(
onPressed: () async {
await connectivityProvider
Expand Down

0 comments on commit 6bb47dd

Please sign in to comment.