25-1/13/1-securejordan
This commit is contained in:
@@ -29,6 +29,7 @@ import '../../constant/api_key.dart';
|
||||
import '../../constant/char_map.dart';
|
||||
import '../../constant/colors.dart';
|
||||
import '../../print.dart';
|
||||
import 'encrypt_decrypt.dart';
|
||||
import 'tts.dart';
|
||||
import 'upload_image.dart';
|
||||
|
||||
@@ -393,12 +394,12 @@ class AI extends GetxController {
|
||||
update();
|
||||
|
||||
var payload = {
|
||||
'first_name':
|
||||
responseNonIdCardFront['full_name']?.toString().split(' ')[0] ??
|
||||
'Not specified',
|
||||
'last_name':
|
||||
responseNonIdCardFront['full_name']?.toString().split(' ').last ??
|
||||
'Not specified',
|
||||
'first_name': encryptionHelper.encryptData(
|
||||
responseNonIdCardFront['full_name'].toString().split(' ')[0]) ??
|
||||
'Not specified',
|
||||
'last_name': encryptionHelper.encryptData(
|
||||
responseNonIdCardFront['full_name'].toString().split(' ').last) ??
|
||||
'Not specified',
|
||||
'email': box.read(BoxName.emailDriver)?.toString() ?? 'Not specified',
|
||||
'phone': box.read(BoxName.phoneDriver)?.toString() ?? 'Not specified',
|
||||
'id': box.read(BoxName.driverID)?.toString() ?? 'Not specified',
|
||||
@@ -409,12 +410,16 @@ class AI extends GetxController {
|
||||
.passwordController
|
||||
.text
|
||||
.toString(),
|
||||
'gender': responseNonIdCardFront['gender']?.toString() ?? 'Not specified',
|
||||
'gender': encryptionHelper
|
||||
.encryptData(responseNonIdCardFront['gender'].toString()) ??
|
||||
'Not specified',
|
||||
'license_type': 'Foreign',
|
||||
'national_number':
|
||||
responseNonIdCardFront['passport_no']?.toString() ?? 'Not specified',
|
||||
'name_arabic':
|
||||
responseNonIdCardFront['full_name']?.toString() ?? 'Not specified',
|
||||
'national_number': encryptionHelper
|
||||
.encryptData(responseNonIdCardFront['passport_no'].toString()) ??
|
||||
'Not specified',
|
||||
'name_arabic': encryptionHelper
|
||||
.encryptData(responseNonIdCardFront['full_name'].toString()) ??
|
||||
'Not specified',
|
||||
'name_english': 'Not specified',
|
||||
'issue_date':
|
||||
responseNonIdCardBack['issueDate']?.toString() ?? 'Not specified',
|
||||
@@ -426,24 +431,32 @@ class AI extends GetxController {
|
||||
? responseIdEgyptDriverLicense['license_categories'].join(', ')
|
||||
: responseIdEgyptDriverLicense['license_categories']?.toString() ??
|
||||
'Not specified',
|
||||
'address':
|
||||
responseNonIdCardFront['address']?.toString() ?? 'Not specified',
|
||||
'card_id':
|
||||
responseNonIdCardFront['card_id']?.toString() ?? 'Not specified',
|
||||
'occupation':
|
||||
responseNonIdCardBack['workStatus']?.toString() ?? 'Not specified',
|
||||
'address': encryptionHelper
|
||||
.encryptData(responseNonIdCardFront['address'].toString()) ??
|
||||
'Not specified',
|
||||
'card_id': encryptionHelper
|
||||
.encryptData(responseNonIdCardFront['card_id'].toString()) ??
|
||||
'Not specified',
|
||||
'occupation': encryptionHelper
|
||||
.encryptData(responseNonIdCardBack['workStatus'].toString()) ??
|
||||
'Not specified',
|
||||
'education': 'Not specified',
|
||||
'licenseIssueDate':
|
||||
responseNonIdCardBack['issueDate']?.toString() ?? 'Not specified',
|
||||
'religion':
|
||||
responseNonIdCardFront['country']?.toString() ?? 'Not specified',
|
||||
'religion': encryptionHelper
|
||||
.encryptData(responseNonIdCardFront['country'].toString()) ??
|
||||
'Not specified',
|
||||
'status': 'yet',
|
||||
'birthdate':
|
||||
responseNonIdCardFront['birthdate']?.toString() ?? 'Not specified',
|
||||
'birthdate': encryptionHelper
|
||||
.encryptData(responseNonIdCardFront['birthdate'].toString()) ??
|
||||
'Not specified',
|
||||
'maritalStatus': 'Not specified',
|
||||
'site': responseNonIdCardFront['address']?.toString() ?? 'Not specified',
|
||||
'employmentType':
|
||||
responseNonIdCardBack['residencyType']?.toString() ?? 'Not specified',
|
||||
'site': encryptionHelper
|
||||
.encryptData(responseNonIdCardFront['address'].toString()) ??
|
||||
'Not specified',
|
||||
'employmentType': encryptionHelper
|
||||
.encryptData(responseNonIdCardBack['residencyType'].toString()) ??
|
||||
'Not specified',
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -486,9 +499,11 @@ class AI extends GetxController {
|
||||
update();
|
||||
|
||||
var payload = {
|
||||
'first_name': responseIdEgyptDriverLicense['firstName']?.toString() ??
|
||||
'first_name': encryptionHelper.encryptData(
|
||||
responseIdEgyptDriverLicense['firstName'].toString()) ??
|
||||
'Not specified',
|
||||
'last_name': responseIdEgyptDriverLicense['lastName']?.toString() ??
|
||||
'last_name': encryptionHelper.encryptData(
|
||||
responseIdEgyptDriverLicense['lastName'].toString()) ??
|
||||
'Not specified',
|
||||
'email': box.read(BoxName.emailDriver)?.toString() ?? 'Not specified',
|
||||
'phone': box.read(BoxName.phoneDriver)?.toString() ?? 'Not specified',
|
||||
@@ -500,17 +515,21 @@ class AI extends GetxController {
|
||||
.passwordController
|
||||
.text
|
||||
.toString(),
|
||||
'gender': responseIdEgyptBack['gender']?.toString() ?? 'Not specified',
|
||||
'license_type':
|
||||
responseIdEgyptDriverLicense['license_type']?.toString() ??
|
||||
'Not specified',
|
||||
'national_number':
|
||||
responseIdEgyptBack['nationalID']?.toString() ?? 'Not specified',
|
||||
'name_arabic': responseIdEgyptDriverLicense['name_arabic']?.toString() ??
|
||||
'gender': encryptionHelper
|
||||
.encryptData(responseIdEgyptBack['gender'].toString()) ??
|
||||
'Not specified',
|
||||
'license_type': encryptionHelper.encryptData(
|
||||
responseIdEgyptDriverLicense['license_type'].toString()) ??
|
||||
'Not specified',
|
||||
'national_number': encryptionHelper
|
||||
.encryptData(responseIdEgyptBack['nationalID'].toString()) ??
|
||||
'Not specified',
|
||||
'name_arabic': encryptionHelper.encryptData(
|
||||
responseIdEgyptDriverLicense['name_arabic'].toString()) ??
|
||||
'Not specified',
|
||||
'name_english': encryptionHelper.encryptData(
|
||||
responseIdEgyptDriverLicense['name_english'].toString()) ??
|
||||
'Not specified',
|
||||
'name_english':
|
||||
responseIdEgyptDriverLicense['name_english']?.toString() ??
|
||||
'Not specified',
|
||||
'issue_date': responseIdEgyptDriverLicense['issue_date']?.toString() ??
|
||||
'Not specified',
|
||||
'expiry_date': responseIdEgyptDriverLicense['expiry_date']?.toString() ??
|
||||
@@ -520,27 +539,36 @@ class AI extends GetxController {
|
||||
? responseIdEgyptDriverLicense['license_categories'].join(', ')
|
||||
: responseIdEgyptDriverLicense['license_categories']?.toString() ??
|
||||
'Not specified',
|
||||
'address': responseIdEgyptFront['address']?.toString() ?? 'Not specified',
|
||||
'card_id': responseIdEgyptFront['card_id']?.toString() ?? 'Not specified',
|
||||
'occupation':
|
||||
responseIdEgyptBack['occupation']?.toString() ?? 'Not specified',
|
||||
'education':
|
||||
responseIdEgyptBack['occupation']?.toString() ?? 'Not specified',
|
||||
'licenseIssueDate':
|
||||
responseIdEgyptDriverLicense['issue_date']?.toString() ??
|
||||
'Not specified',
|
||||
'religion':
|
||||
responseIdEgyptBack['religion']?.toString() ?? 'Not specified',
|
||||
'status': 'yet',
|
||||
'birthdate': extractDOB(
|
||||
responseIdEgyptDriverLicense['national_number'].toString()),
|
||||
'maritalStatus':
|
||||
responseIdEgyptBack['maritalStatus']?.toString() ?? 'Not specified',
|
||||
'site': responseIdEgyptDriverLicense['address']?.toString() ??
|
||||
'address': encryptionHelper
|
||||
.encryptData(responseIdEgyptFront['address'].toString()) ??
|
||||
'Not specified',
|
||||
'employmentType':
|
||||
responseIdEgyptDriverLicense['employmentType']?.toString() ??
|
||||
'card_id': encryptionHelper
|
||||
.encryptData(responseIdEgyptFront['card_id'].toString()) ??
|
||||
'Not specified',
|
||||
'occupation': encryptionHelper
|
||||
.encryptData(responseIdEgyptBack['occupation'].toString()) ??
|
||||
'Not specified',
|
||||
'education': encryptionHelper
|
||||
.encryptData(responseIdEgyptBack['occupation'].toString()) ??
|
||||
'Not specified',
|
||||
'licenseIssueDate':
|
||||
responseIdEgyptDriverLicense['issue_date'].toString() ??
|
||||
'Not specified',
|
||||
'religion': encryptionHelper
|
||||
.encryptData(responseIdEgyptBack['religion'].toString()) ??
|
||||
'Not specified',
|
||||
'status': 'yet',
|
||||
'birthdate': encryptionHelper.encryptData(extractDOB(
|
||||
responseIdEgyptDriverLicense['national_number'].toString())),
|
||||
'maritalStatus': encryptionHelper
|
||||
.encryptData(responseIdEgyptBack['maritalStatus'].toString()) ??
|
||||
'Not specified',
|
||||
'site': encryptionHelper.encryptData(
|
||||
responseIdEgyptDriverLicense['address'].toString()) ??
|
||||
'Not specified',
|
||||
'employmentType': encryptionHelper.encryptData(
|
||||
responseIdEgyptDriverLicense['employmentType'].toString()) ??
|
||||
'Not specified',
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -583,7 +611,8 @@ class AI extends GetxController {
|
||||
var res = await CRUD().post(link: AppLink.addCriminalDocuments, payload: {
|
||||
"driverId": box.read(BoxName.driverID),
|
||||
"IssueDate": responseCriminalRecordEgypt['IssueDate'],
|
||||
"InspectionResult": responseCriminalRecordEgypt['InspectionResult'],
|
||||
"InspectionResult": encryptionHelper
|
||||
.encryptData(responseCriminalRecordEgypt['InspectionResult']),
|
||||
});
|
||||
if (res != 'failure') {
|
||||
mySnackbarSuccess('uploaded sucssefuly'.tr);
|
||||
@@ -597,16 +626,21 @@ class AI extends GetxController {
|
||||
var res = await CRUD().post(link: AppLink.addRegisrationCar, payload: {
|
||||
'driverID': box.read(BoxName.driverID),
|
||||
'vin': responseIdCardDriverEgyptBack['chassis'].toString(),
|
||||
'car_plate': responseIdCardDriverEgyptFront['car_plate'].toString(),
|
||||
'make': responseIdCardDriverEgyptBack['make'].toString(),
|
||||
'model': responseIdCardDriverEgyptBack['model'],
|
||||
'car_plate': encryptionHelper.encryptData(
|
||||
responseIdCardDriverEgyptFront['car_plate'].toString()),
|
||||
'make': encryptionHelper
|
||||
.encryptData(responseIdCardDriverEgyptBack['make'].toString()),
|
||||
'model': encryptionHelper
|
||||
.encryptData(responseIdCardDriverEgyptBack['model']),
|
||||
'year': responseIdCardDriverEgyptBack['year'].toString(),
|
||||
'expiration_date':
|
||||
responseIdCardDriverEgyptFront['LicenseExpirationDate'].toString(),
|
||||
'color': responseIdCardDriverEgyptBack['color'],
|
||||
'owner': responseIdCardDriverEgyptFront['owner'],
|
||||
'owner': encryptionHelper
|
||||
.encryptData(responseIdCardDriverEgyptFront['owner']),
|
||||
'color_hex': responseIdCardDriverEgyptBack['color_hex'].toString(),
|
||||
'address': responseIdCardDriverEgyptFront['address'].toString(),
|
||||
'address': encryptionHelper
|
||||
.encryptData(responseIdCardDriverEgyptFront['address'].toString()),
|
||||
'displacement': responseIdCardDriverEgyptBack['engine'].toString(),
|
||||
'fuel': responseIdCardDriverEgyptBack['fuel'].toString(),
|
||||
'registration_date':
|
||||
@@ -624,19 +658,23 @@ class AI extends GetxController {
|
||||
payload: {
|
||||
'driverID': box.read(BoxName.driverID),
|
||||
'vin': responseIdCardDriverEgyptBack['chassis'].toString(),
|
||||
'car_plate':
|
||||
responseIdCardDriverEgyptFront['car_plate'].toString(),
|
||||
'make': responseIdCardDriverEgyptBack['make'].toString(),
|
||||
'model': responseIdCardDriverEgyptBack['model'],
|
||||
'car_plate': encryptionHelper.encryptData(
|
||||
responseIdCardDriverEgyptFront['car_plate'].toString()),
|
||||
'make': encryptionHelper.encryptData(
|
||||
responseIdCardDriverEgyptBack['make'].toString()),
|
||||
'model': encryptionHelper
|
||||
.encryptData(responseIdCardDriverEgyptBack['model']),
|
||||
'year': responseIdCardDriverEgyptBack['year'].toString(),
|
||||
'expiration_date':
|
||||
responseIdCardDriverEgyptFront['LicenseExpirationDate']
|
||||
.toString(),
|
||||
'color': responseIdCardDriverEgyptBack['color'],
|
||||
'owner': responseIdCardDriverEgyptFront['owner'],
|
||||
'owner': encryptionHelper
|
||||
.encryptData(responseIdCardDriverEgyptFront['owner']),
|
||||
'color_hex':
|
||||
responseIdCardDriverEgyptBack['color_hex'].toString(),
|
||||
'address': responseIdCardDriverEgyptFront['address'].toString(),
|
||||
'address': encryptionHelper.encryptData(
|
||||
responseIdCardDriverEgyptFront['address'].toString()),
|
||||
'displacement':
|
||||
responseIdCardDriverEgyptBack['engine'].toString(),
|
||||
'fuel': responseIdCardDriverEgyptBack['fuel'].toString(),
|
||||
@@ -648,19 +686,23 @@ class AI extends GetxController {
|
||||
payload: {
|
||||
'driverID': box.read(BoxName.driverID),
|
||||
'vin': responseIdCardDriverEgyptBack['chassis'].toString(),
|
||||
'car_plate':
|
||||
responseIdCardDriverEgyptFront['car_plate'].toString(),
|
||||
'make': responseIdCardDriverEgyptBack['make'].toString(),
|
||||
'model': responseIdCardDriverEgyptBack['model'],
|
||||
'car_plate': encryptionHelper.encryptData(
|
||||
responseIdCardDriverEgyptFront['car_plate'].toString()),
|
||||
'make': encryptionHelper.encryptData(
|
||||
responseIdCardDriverEgyptBack['make'].toString()),
|
||||
'model': encryptionHelper
|
||||
.encryptData(responseIdCardDriverEgyptBack['model']),
|
||||
'year': responseIdCardDriverEgyptBack['year'].toString(),
|
||||
'expiration_date':
|
||||
responseIdCardDriverEgyptFront['LicenseExpirationDate']
|
||||
.toString(),
|
||||
'color': responseIdCardDriverEgyptBack['color'],
|
||||
'owner': responseIdCardDriverEgyptFront['owner'],
|
||||
'owner': encryptionHelper
|
||||
.encryptData(responseIdCardDriverEgyptFront['owner']),
|
||||
'color_hex':
|
||||
responseIdCardDriverEgyptBack['color_hex'].toString(),
|
||||
'address': responseIdCardDriverEgyptFront['address'].toString(),
|
||||
'address': encryptionHelper.encryptData(
|
||||
responseIdCardDriverEgyptFront['address'].toString()),
|
||||
'displacement':
|
||||
responseIdCardDriverEgyptBack['engine'].toString(),
|
||||
'fuel': responseIdCardDriverEgyptBack['fuel'].toString(),
|
||||
|
||||
Reference in New Issue
Block a user