Skip to content

Commit

Permalink
bug fixed on qa-plan (#469)
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin S P <sachin.sp@cyberpwn.com>
Co-authored-by: Sachin S P <sachin.sp@cyberpwn.com>
  • Loading branch information
SachinPremkumar and Sachin S P authored Oct 28, 2024
1 parent 0d56643 commit 6c543c0
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 51 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ext {
clientmanagerLibVersionCode = 1
clientmanagerLibVersionName = "\"1.0.0\""

serverBaseURL = "\"https://api-internal.qa-platform1.mosip.net\""
serverBaseURL = "\"https://api-internal.qa-plan.mosip.net\""
serverHealthCheckPath = "\"/v1/syncdata/actuator/health\""
serverActuatorInfoPath = "\"/v1/syncdata/actuator/info\""
debugPassword = "\"APTyKejHxACQyKBSRciR\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ PreRegistrationDataSyncDao PreRegistrationDataSyncDao(PreRegistrationDataSyncRep

@Provides
@Singleton
PreRegZipHandlingService PreRegZipHandlingService(ApplicantValidDocumentDao applicantValidDocumentDao, IdentitySchemaRepository identitySchemaService, ClientCryptoManagerService clientCryptoFacade, RegistrationService registrationService, CryptoManagerService cryptoManagerService, PacketKeeper packetKeeper, IPacketCryptoService iPacketCryptoService, MasterDataService masterDataService) {
return new PreRegZipHandlingServiceImpl(appContext, applicantValidDocumentDao, identitySchemaService, clientCryptoFacade, registrationService, cryptoManagerService, packetKeeper, iPacketCryptoService, masterDataService);
PreRegZipHandlingService PreRegZipHandlingService(ApplicantValidDocumentDao applicantValidDocumentDao, IdentitySchemaRepository identitySchemaService, ClientCryptoManagerService clientCryptoFacade, RegistrationService registrationService, CryptoManagerService cryptoManagerService, PacketKeeper packetKeeper, IPacketCryptoService iPacketCryptoService, MasterDataService masterDataService,GlobalParamRepository globalParamRepository) {
return new PreRegZipHandlingServiceImpl(appContext, applicantValidDocumentDao, identitySchemaService, clientCryptoFacade, registrationService, cryptoManagerService, packetKeeper, iPacketCryptoService, masterDataService,globalParamRepository);
}

@Provides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,5 @@ public class RegistrationConstants {
public static final String UI_SCHEMA_SUBTYPE_PHONE = "Phone";
public static final String SELECTED_HANDLES = "mosip.registration.default-selected-handle-fields";
public static final String TEMPLATE_IMPORTANT_GUIDELINES = "mosip.registration.important_guidelines";
public static final String PRE_REG_PACKET_LOCATION = "mosip.registration.registration_pre_reg_packet_location";
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,8 @@ public String getCachedStringAgeGroup(){
public String getCachedStringMAVELScript(){
return globalParamMap.getOrDefault(RegistrationConstants.APPLICANT_TYPE_MVEL_SCRIPT,"applicanttype.mvel");
}

public String getCachedStringPreRegPacketLocation(){
return globalParamMap.get(RegistrationConstants.PRE_REG_PACKET_LOCATION);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import io.mosip.registration.clientmanager.entity.Location;
import io.mosip.registration.clientmanager.exception.RegBaseCheckedException;
import io.mosip.registration.clientmanager.exception.RegBaseUncheckedException;
import io.mosip.registration.clientmanager.repository.GlobalParamRepository;
import io.mosip.registration.clientmanager.repository.IdentitySchemaRepository;
import io.mosip.registration.clientmanager.service.external.PreRegZipHandlingService;
import io.mosip.registration.clientmanager.spi.MasterDataService;
Expand Down Expand Up @@ -85,10 +86,11 @@ public class PreRegZipHandlingServiceImpl implements PreRegZipHandlingService {

private Map<String, DocumentDto> documents;
MasterDataService masterDataService;
GlobalParamRepository globalParamRepository;

Context appContext;

public PreRegZipHandlingServiceImpl(Context appContext,ApplicantValidDocumentDao applicantValidDocumentDao, IdentitySchemaRepository identitySchemaService, ClientCryptoManagerService clientCryptoFacade,RegistrationService registrationService,CryptoManagerService cryptoManagerService,PacketKeeper packetKeeper,IPacketCryptoService iPacketCryptoService,MasterDataService masterDataService) {
public PreRegZipHandlingServiceImpl(Context appContext,ApplicantValidDocumentDao applicantValidDocumentDao, IdentitySchemaRepository identitySchemaService, ClientCryptoManagerService clientCryptoFacade,RegistrationService registrationService,CryptoManagerService cryptoManagerService,PacketKeeper packetKeeper,IPacketCryptoService iPacketCryptoService,MasterDataService masterDataService,GlobalParamRepository globalParamRepository) {
this.appContext = appContext;
this.applicantValidDocumentDao = applicantValidDocumentDao;
this.identitySchemaService = identitySchemaService;
Expand All @@ -99,6 +101,7 @@ public PreRegZipHandlingServiceImpl(Context appContext,ApplicantValidDocumentDao
this.iPacketCryptoService = iPacketCryptoService;
this.documents = new HashMap<>();
this.masterDataService = masterDataService;
this.globalParamRepository = globalParamRepository;
try {
initPreRegAdapter(appContext);
} catch (Exception e) {
Expand Down Expand Up @@ -415,7 +418,8 @@ public PreRegistrationDto encryptAndSavePreRegPacket(String preRegistrationId, S
public String storePreRegPacketToDisk(String preRegistrationId, byte[] encryptedPacket, CenterMachineDto centerMachineDto)
throws RegBaseUncheckedException {
try {
String PRE_REG_PACKET = ConfigService.getProperty("mosip.registration.registration_pre_reg_packet_location", appContext);
//String PRE_REG_PACKET = ConfigService.getProperty("mosip.registration.registration_pre_reg_packet_location", appContext);
String PRE_REG_PACKET = this.globalParamRepository.getCachedStringPreRegPacketLocation();

// Generate the file path for storing the Encrypted Packet
File localFilePath = new File(this.appContext.getFilesDir() + SEPARATOR + PRE_REG_PACKET);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ class _OperatorBiometricsCaptureState
? appLocalizations.onboarded_successfully
: appLocalizations
.operator_biometric_updated_successfully,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 28,
fontWeight: semiBold,
Expand Down
76 changes: 38 additions & 38 deletions lib/ui/process_ui/update_process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -662,44 +662,44 @@ class _UpdateProcessState extends State<UpdateProcess>
: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
globalProvider.newProcessTabIndex == size + 2
? ElevatedButton(
onPressed: () async {
await connectivityProvider
.checkNetworkConnection();
bool isConnected =
connectivityProvider.isConnected;
if (!isConnected) {
_showInSnackBar(
appLocalizations.network_error);
return;
}
globalProvider.syncPacket(globalProvider.regId);
},
child: Text(appLocalizations.sync_packet),
)
: const SizedBox.shrink(),
SizedBox(
width: 10.w,
),
globalProvider.newProcessTabIndex == size + 2
? ElevatedButton(
onPressed: () async {
await connectivityProvider
.checkNetworkConnection();
bool isConnected =
connectivityProvider.isConnected;
if (!isConnected) {
_showInSnackBar(
appLocalizations.network_error);
return;
}
globalProvider
.uploadPacket(globalProvider.regId);
},
child: Text(appLocalizations.upload_packet),
)
: const SizedBox.shrink(),
// globalProvider.newProcessTabIndex == size + 2
// ? ElevatedButton(
// onPressed: () async {
// await connectivityProvider
// .checkNetworkConnection();
// bool isConnected =
// connectivityProvider.isConnected;
// if (!isConnected) {
// _showInSnackBar(
// appLocalizations.network_error);
// return;
// }
// globalProvider.syncPacket(globalProvider.regId);
// },
// child: Text(appLocalizations.sync_packet),
// )
// : const SizedBox.shrink(),
// SizedBox(
// width: 10.w,
// ),
// globalProvider.newProcessTabIndex == size + 2
// ? ElevatedButton(
// onPressed: () async {
// await connectivityProvider
// .checkNetworkConnection();
// bool isConnected =
// connectivityProvider.isConnected;
// if (!isConnected) {
// _showInSnackBar(
// appLocalizations.network_error);
// return;
// }
// globalProvider
// .uploadPacket(globalProvider.regId);
// },
// child: Text(appLocalizations.upload_packet),
// )
// : const SizedBox.shrink(),
const Expanded(
child: SizedBox(),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/process_ui/widgets/new_process_screen_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class _NewProcessScreenContentState extends State<NewProcessScreenContent> {
validation: regexPattern,
);
default:
return Text("${e.controlType}");
return (e.controlType!=null)? Text("${e.controlType}"): const SizedBox.shrink();
}
}

Expand Down
5 changes: 5 additions & 0 deletions lib/ui/process_ui/widgets/pre_reg_data_control.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
import 'package:registration_client/model/screen.dart';
import 'package:registration_client/pigeon/biometrics_pigeon.dart';
import 'package:registration_client/pigeon/dynamic_response_pigeon.dart';
import 'package:registration_client/provider/global_provider.dart';
import 'package:registration_client/provider/registration_task_provider.dart';
Expand Down Expand Up @@ -173,6 +174,10 @@ class _PreRegDataControlState extends State<PreRegDataControl> {
values!,
globalProvider.fieldInputValue,
);
//set age group
BiometricsApi().getAgeGroup().then((value) {
globalProvider.ageGroup = value;
});
if(e.id != "gender" && e.fieldType != "dynamic"){
GenericData result = GenericData(name: values.toString(), code: values.toString(), langCode: lang);
globalProvider.setInputMapValue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class _BiometricCaptureControlPortraitState
2)
.ceil() *
335.h) +
70.h),
410.h),
width: double.infinity,
child: ResponsiveGridList(
listViewBuilderOptions: ListViewBuilderOptions(
Expand Down
15 changes: 10 additions & 5 deletions lib/ui/scanner/custom_scanner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,16 @@ class _CustomScannerState extends State<CustomScanner> {
}

Future<void> _uploadImage() async {
final pickedFile =
await ImagePicker().pickImage(source: ImageSource.camera);
if (pickedFile != null) {
_pickedFile = await pickedFile.readAsBytes();
setState(() {});
try {
final pickedFile = await ImagePicker().pickImage(source: ImageSource.camera);
if (pickedFile != null) {
_pickedFile = await pickedFile.readAsBytes();
setState(() {});
} else {
Navigator.pop(context);
}
} catch (e) {
Navigator.pop(context);
}
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ dependencies:
android_alarm_manager_plus: ^3.0.2
http: ^0.13.6
flutter_config: ^2.0.2
native_image_cropper: ^0.4.0
native_image_cropper: ^0.6.0
qr_code_scanner: ^1.0.1

dev_dependencies:
Expand Down

0 comments on commit 6c543c0

Please sign in to comment.