Compare commits

...

9 Commits

Author SHA1 Message Date
haroon amjad 947ab5688d hotfix for payment request WL 1 week ago
haroon amjad 26bbc54503 Merge branch 'master_mohemm_flutter'
# Conflicts:
#	AppIcons/Assets.xcassets/AppIcon.appiconset/100.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/1024.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/114.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/120.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/144.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/152.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/167.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/180.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/20.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/29.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/40.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/50.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/57.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/58.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/60.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/72.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/76.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/80.png
#	AppIcons/Assets.xcassets/AppIcon.appiconset/87.png
#	AppIcons/appstore.png
#	AppIcons/playstore.png
#	android/app/src/main/AndroidManifest.xml
#	android/app/src/main/res/mipmap-hdpi/ic_launcher.png
#	android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
#	android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
#	android/app/src/main/res/mipmap-mdpi/ic_launcher.png
#	android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
#	android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
#	android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
#	android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
#	android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
#	android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
#	android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
#	android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
#	android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
#	android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
#	android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
#	ios/Runner.xcodeproj/project.pbxproj
#	lib/app_state/app_state.dart
#	pubspec.yaml
3 weeks ago
haroon amjad 368d109d9f absence days fix 3 weeks ago
Sultan khan 275c2a8aa7 Merge branch 'payment_worklist_CR_6939'
# Conflicts:
#	lib/app_state/app_state.dart
#	lib/classes/consts.dart
#	lib/generated/codegen_loader.g.dart
#	lib/generated/locale_keys.g.dart
#	lib/ui/work_list/worklist_detail_screen.dart
1 month ago
Sultan khan bafb6c8470 missing swipe issue and payment work-list and business trip issue fixed. 1 month ago
haroon amjad d55d2dee50 Mohemm identity updated 2 months ago
haroon amjad 39375f48ff updates 2 months ago
Sultan khan 423e8551f1 changes updated 2 months ago
Sultan khan db40f42a08 payment CR 6939 done 2 months ago

@ -35,7 +35,6 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="Al Habib MoheM" android:label="Al Habib MoheM"
android:extractNativeLibs="true" android:extractNativeLibs="true"
android:networkSecurityConfig="@xml/network_security_config">
android:networkSecurityConfig="@xml/network_security_config" android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"> android:roundIcon="@mipmap/ic_launcher_round">
<provider <provider

@ -544,5 +544,20 @@
"addAtLeastOneAttachment": "الرجاء إضافة مرفق واحد على الأقل.", "addAtLeastOneAttachment": "الرجاء إضافة مرفق واحد على الأقل.",
"pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون", "pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون",
"youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني", "youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
"open": "يفتح" "open": "يفتح",
"requesterOperatingUnit":"وحدة تشغيل مقدم الطلب",
"prepareEmpNum":"إعداد رقم الموظف",
"supplierInfo" : "معلومات المورد",
"supplierAcNo": "رقم حساب المورد",
"supplierAcName": "اسم حساب المورد",
"supplierIBAN" : "رقم IBAN للمورد",
"supplierCRNo" :"رقم السجل التجاري",
"suppliedAcNo" : "رقم الحساب المقدم",
"patientRefundInvoice" : "فاتورة استرداد الأموال للمريض",
"patientNumber" : "رقم المريض",
"patientName" : "اسم المريض",
"invoiceDate" : "تاريخ الفاتورة",
"refundInvoice" :"فاتورة الاسترجاع",
"hospitalClinic" : "عيادة المستشفى"
} }

@ -563,5 +563,20 @@
"open": "open", "open": "open",
"addAtLeastOneAttachment": "Please add at least one attachment.", "addAtLeastOneAttachment": "Please add at least one attachment.",
"pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.", "pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.",
"youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit." "youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit.",
"requesterOperatingUnit":"Requester Operating Unit",
"prepareEmpNum":"Prepare Employee Num",
"supplierInfo" : "Supplier Information",
"supplierAcNo": "Supplier Account No",
"supplierAcName":"Supplier Account Name",
"supplierIBAN" : "Supplier IBAN",
"supplierCRNo" : "CR Number",
"suppliedAcNo" : "Supplied Account No.",
"patientRefundInvoice" : "Patient Refund Invoice",
"patientNumber" : "Patient Number",
"patientName" : "Patient Name",
"invoiceDate" : "Invoice Date",
"refundInvoice" :"Refund Invoice",
"hospitalClinic" : "Hospital Clinic"
} }

@ -36,6 +36,7 @@ import 'package:mohem_flutter_app/models/worklist/hr/get_contact_notification_bo
import 'package:mohem_flutter_app/models/worklist/hr/get_phones_notification_body_list_model.dart'; import 'package:mohem_flutter_app/models/worklist/hr/get_phones_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart'; import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart'; import 'package:mohem_flutter_app/models/worklist_response_model.dart';
import 'package:mohem_flutter_app/models/worklist/payment_details_list.dart';
class WorkListApiClient { class WorkListApiClient {
static final WorkListApiClient _instance = WorkListApiClient._internal(); static final WorkListApiClient _instance = WorkListApiClient._internal();
@ -290,6 +291,22 @@ class WorkListApiClient {
return responseData.getPrNotificationBodyList; return responseData.getPrNotificationBodyList;
}, url, postParams); }, url, postParams);
} }
Future<GetPaymentNotificationBodyList?> getPaymentNotificationBody(int pNotificationID, int pTransactionID) async {
String url = "${ApiConsts.erpRest}GET_PAY_REQ_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": pNotificationID,
"P_TRANSACTION_ID": pTransactionID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getPaymentNotificationBodyList;
}, url, postParams);
}
Future<List<GetMoItemHistoryList>> getMoItemHistory(int pItemID, int pOrgID) async { Future<List<GetMoItemHistoryList>> getMoItemHistory(int pItemID, int pOrgID) async {
String url = "${ApiConsts.erpRest}GET_MO_ITEM_HISTORY"; String url = "${ApiConsts.erpRest}GET_MO_ITEM_HISTORY";
@ -718,4 +735,18 @@ class WorkListApiClient {
return responseData.getPRInformationList; return responseData.getPRInformationList;
}, url, postParams); }, url, postParams);
} }
Future<List<GetAbsenceCollectionNotificationBodyList>?> getPaymentDetailsNotification(int? notificationId) async {
String url = "${ApiConsts.erpRest}GET_PAY_REQ_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": notificationId,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getAbsenceCollectionNotificationBodyList;
}, url, postParams);
}
} }

@ -3,13 +3,21 @@ import 'package:mohem_flutter_app/ui/marathon/widgets/question_card.dart';
class ApiConsts { class ApiConsts {
// static String baseUrl = "http://10.200.204.11"; // Local server // static String baseUrl = "http://10.200.204.11"; // Local server
// static String baseUrl = "https://erptstapp.srca.org.sa"; // SRCA server // static String baseUrl = "https://erptstapp.srca.org.sa"; // SRCA server
// static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
// static String baseUrl = "http://10.201.204.101:2024"; // static String baseUrl = "http://10.201.204.101:2024";
// static String baseUrl = "https://webservices.hmg.com"; // PreProd // static String baseUrl = "https://webservices.hmg.com"; // PreProd
// static String baseUrl = "https://hmgwebservices.com"; // Live server // static String baseUrl = "https://hmgwebservices.com"; // Live server
static String baseUrl = "https://mohemm.hmg.com"; // New Live server static String baseUrl = "https://mohemm.hmg.com"; // New Live server
// static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
// static String baseUrl = "http://10.20.200.111:1010/";
// static String baseUrl = "https://webservices.hmg.com"; // PreProd
// static String baseUrl = "https://mohemm.hmg.com";
// static String baseUrl = "https://hmgwebservices.com"; // Live server
static String baseUrlServices = baseUrl + "/Services/"; // server static String baseUrlServices = baseUrl + "/Services/"; // server
// static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server // static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server
static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/"; static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/";

@ -524,4 +524,14 @@ class DateUtil {
// } // }
// return ""; // return "";
// } // }
static String replaceArabicNumber(String input) {
const english = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
const arabic = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'];
for (int i = 0; i < english.length; i++) {
input = input.replaceAll(arabic[i], english[i]);
}
return input;
}
} }

@ -401,6 +401,7 @@ class Utils {
} }
return false; return false;
} }
static bool isDate(String input, String format) { static bool isDate(String input, String format) {
try { try {
DateTime d = DateFormat(format).parseStrict(input); DateTime d = DateFormat(format).parseStrict(input);

@ -552,6 +552,33 @@ class CodegenLoader extends AssetLoader {
"youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني", "youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
"pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون", "pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون",
"generate": "يولد", "generate": "يولد",
"paymentRequest":"طلب الدفع",
"paymentDetails":"تفاصيل الدفع",
"requestNo":"رقم الطلب",
"requesterEmpNum":"رقم الموظف الذي قدم الطلب",
"requesterEmpName":"اسم الموظف مقدم الطلب",
"prepareEmpName":"إعداد اسم الموظف",
"requesterPositionName":"اسم الوظيفة لمقدم الطلب",
"preparePositionName":"إعداد اسم الوظيفة",
"requesterPayrollName":"اسم مقدم الطلب",
"payingORGName":"اسم المنظمة الدافعة",
"requestAmount":"مبلغ الطلب",
"typeofPayment":"نوع الدفع",
"beneficiaryDetails":"تفاصيل المستفيد",
"beneficiaryName":"اسم المستفيد",
"idIqama":"الهوية السعودية / الإقامة",
"beneficiaryBankName":"اسم البنك المستفيد",
"sadadNumber":"رقم سداد",
"beneficiaryIBAN":"رقم IBAN للمستفيد",
"purchaseOrders":"طلبات الشراء",
"approvalDate":"تاريخ الموافقة",
"pOAmount":"مبلغ الطلب",
"versionStatus":"حالة الإصدار",
"supplierNo":"رقم المورد",
"general":"عام",
"requesterOperatingUnit":"وحدة تشغيل مقدم الطلب",
"prepareEmpNum":"إعداد رقم الموظف",
}; };
static const Map<String, dynamic> en_US = { static const Map<String, dynamic> en_US = {
"mohemm": "Mohemm", "mohemm": "Mohemm",
@ -1109,7 +1136,47 @@ class CodegenLoader extends AssetLoader {
"userId": "UserID", "userId": "UserID",
"pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.", "pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.",
"youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit.", "youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit.",
"generate": "Generate" "generate": "Generate",
"paymentRequest":"Pay Request",
"paymentDetails":"Payment Details",
"requestNo":"Request No",
"requesterEmpNum":"Requester Employee Num",
"requesterEmpName":"Requester Employee Name",
"prepareEmpName":"Prepare Employee Name",
"requesterPositionName":"Requester Position Name",
"preparePositionName":"Prepare Position Name",
"requesterPayrollName":"Requester Payroll Name",
"payingORGName":"Paying Organization Name",
"requestAmount":"Request Amount",
"typeofPayment":"Type of Payment",
"beneficiaryDetails":"Beneficiary Details",
"beneficiaryName":"Beneficiary Name",
"idIqama":"Saudi ID / Iqama",
"beneficiaryBankName":"Beneficiary Bank Name",
"sadadNumber":"Sadad Number",
"beneficiaryIBAN":"Beneficiary IBAN",
"purchaseOrders":"Purchase Orders",
"approvalDate":"Approval Date",
"pOAmount":"PO Amount",
"versionStatus":"Version Status",
"supplierNo":"Supplier No",
"general":"General",
"prepareEmpNum":"Prepare Employee Num",
"requesterOperatingUnit":"Requester Operating Unit",
"supplierInfo" : "Supplier Information",
"supplierNum": "Supplier Number",
"supplierAcNo": "Supplier Account Number",
"supplierAcName" : 'Supplier Account Name',
"supplierIBAN" : 'Supplier IBAN',
"supplierCRNo" : 'CR Number',
"suppliedAcNo" : 'Supplied Account No.',
"patientRefundInvoice" : 'Patient Refund Invoice',
"patientNumber" : 'Patient Number',
"patientName" : 'Patient Name',
"invoiceDate" : 'Invoice Date',
"refundInvoice" : 'Refund Invoice',
"hospitalClinic" : 'Hospital Clinic',
}; };
static const Map<String, Map<String, dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US}; static const Map<String, Map<String, dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US};
} }

@ -403,6 +403,7 @@ abstract class LocaleKeys {
static const purchaseOrder = 'purchaseOrder'; static const purchaseOrder = 'purchaseOrder';
static const ITGForms = 'ITGForms'; static const ITGForms = 'ITGForms';
static const itemCreation = 'itemCreation'; static const itemCreation = 'itemCreation';
static const paymentRequest = 'paymentRequest';
static const stamp = 'stamp'; static const stamp = 'stamp';
static const addFavoriteList = 'addFavoriteList'; static const addFavoriteList = 'addFavoriteList';
static const feedbackUserExperience = 'feedbackUserExperience'; static const feedbackUserExperience = 'feedbackUserExperience';
@ -551,4 +552,42 @@ abstract class LocaleKeys {
static const youCannotJoinTheMarathon ='youCannotJoinTheMarathon'; static const youCannotJoinTheMarathon ='youCannotJoinTheMarathon';
static const open ='open'; static const open ='open';
static const generate = 'generate'; static const generate = 'generate';
static const paymentDetails ='paymentDetails';
static const requestNo ='requestNo';
static const requesterEmpNum ='requesterEmpNum';
static const requesterEmpName ='requesterEmpName';
static const prepareEmpName ='prepareEmpName';
static const requesterPositionName ='requesterPositionName';
static const preparePositionName ='preparePositionName';
static const requesterPayrollName ='requesterPayrollName';
static const payingORGName ='payingORGName';
static const requestAmount ='requestAmount';
static const typeofPayment ='typeofPayment';
static const beneficiaryDetails ='beneficiaryDetails';
static const beneficiaryName ='beneficiaryName';
static const idIqama ='idIqama';
static const beneficiaryBankName ='beneficiaryBankName';
static const sadadNumber ='sadadNumber';
static const beneficiaryIBAN ='beneficiaryIBAN';
static const purchaseOrders ='purchaseOrders';
static const pOAmount ='pOAmount';
static const approvalDate ='approvalDate';
static const versionStatus ='versionStatus';
static const supplierNo ='supplierNo';
static const general ="general";
static const supplierInfo = 'supplierInfo';
static const supplierAcNo = 'supplierAcNo';
static const supplierAcName = 'supplierAcName';
static const supplierIBAN = 'Supplier IBAN';
static const supplierCRNo = 'CR Number';
static const suppliedAcNo = 'Supplied Account No.';
static const patientRefundInvoice = "patientRefundInvoice";
static const patientNumber = 'Patient Number';
static const patientName = 'Patient Name';
static const invoiceDate = 'Invoice Date';
static const refundInvoice = 'Refund Invoice';
static const hospitalClinic = 'Hospital Clinic';
static const requesterOperatingUnit ='requesterOperatingUnit';
static const prepareEmpNum ='prepareEmpNum';
} }

@ -110,6 +110,7 @@ import 'package:mohem_flutter_app/models/worklist/hr/get_address_notification_bo
import 'package:mohem_flutter_app/models/worklist/hr/get_basic_det_ntf_body_list_model.dart'; import 'package:mohem_flutter_app/models/worklist/hr/get_basic_det_ntf_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_contact_notification_body_list_model.dart'; import 'package:mohem_flutter_app/models/worklist/hr/get_contact_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_phones_notification_body_list_model.dart'; import 'package:mohem_flutter_app/models/worklist/hr/get_phones_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/payment_details_list.dart';
import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart'; import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/resubmit_eit_response_model.dart'; import 'package:mohem_flutter_app/models/worklist/resubmit_eit_response_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart'; import 'package:mohem_flutter_app/models/worklist_response_model.dart';
@ -187,6 +188,7 @@ class GenericResponseModel {
List<String>? getCEIDFFStructureList; List<String>? getCEIDFFStructureList;
List<String>? getCEITransactionList; List<String>? getCEITransactionList;
List<String>? getCcpTransactionsList; List<String>? getCcpTransactionsList;
List<GetContactColsStructureList>? getContactColsStructureList; List<GetContactColsStructureList>? getContactColsStructureList;
List<GetContactDetailsList>? getContactDetailsList; List<GetContactDetailsList>? getContactDetailsList;
List<GetContactDffStructureList>? getContactDffStructureList; List<GetContactDffStructureList>? getContactDffStructureList;
@ -232,6 +234,7 @@ class GenericResponseModel {
List<GetPoItemHistoryList>? getPoItemHistoryList; List<GetPoItemHistoryList>? getPoItemHistoryList;
GetPoNotificationBodyList? getPoNotificationBodyList; GetPoNotificationBodyList? getPoNotificationBodyList;
GetPrNotificationBodyList? getPrNotificationBodyList; GetPrNotificationBodyList? getPrNotificationBodyList;
GetPaymentNotificationBodyList? getPaymentNotificationBodyList;
GetPRInformationList? getPRInformationList; GetPRInformationList? getPRInformationList;
List<GetQuotationAnalysisList>? getQuotationAnalysisList; List<GetQuotationAnalysisList>? getQuotationAnalysisList;
List<GetRFCEmployeeList>? getRFCEmployeeListList; List<GetRFCEmployeeList>? getRFCEmployeeListList;
@ -500,6 +503,7 @@ class GenericResponseModel {
this.getPoItemHistoryList, this.getPoItemHistoryList,
this.getPoNotificationBodyList, this.getPoNotificationBodyList,
this.getPrNotificationBodyList, this.getPrNotificationBodyList,
this.getPaymentNotificationBodyList,
this.getPRInformationList, this.getPRInformationList,
this.getQuotationAnalysisList, this.getQuotationAnalysisList,
this.getRFCEmployeeListList, this.getRFCEmployeeListList,
@ -1022,6 +1026,9 @@ class GenericResponseModel {
} }
getPoNotificationBodyList = json['GetPoNotificationBodyList'] != null ? GetPoNotificationBodyList.fromJson(json['GetPoNotificationBodyList']) : null; getPoNotificationBodyList = json['GetPoNotificationBodyList'] != null ? GetPoNotificationBodyList.fromJson(json['GetPoNotificationBodyList']) : null;
getPrNotificationBodyList = json['GetPrNotificationBodyList'] != null ? GetPrNotificationBodyList.fromJson(json['GetPrNotificationBodyList']) : null; getPrNotificationBodyList = json['GetPrNotificationBodyList'] != null ? GetPrNotificationBodyList.fromJson(json['GetPrNotificationBodyList']) : null;
getPaymentNotificationBodyList = json['Pay_ReqNotificationBody'] != null ? GetPaymentNotificationBodyList.fromJson(json['Pay_ReqNotificationBody']) : null;
getPRInformationList = json['PR_Information_List'] != null ? GetPRInformationList.fromJson(json['PR_Information_List']) : null; getPRInformationList = json['PR_Information_List'] != null ? GetPRInformationList.fromJson(json['PR_Information_List']) : null;
if (json['GetQuotationAnalysisList'] != null) { if (json['GetQuotationAnalysisList'] != null) {
getQuotationAnalysisList = <GetQuotationAnalysisList>[]; getQuotationAnalysisList = <GetQuotationAnalysisList>[];
@ -1650,6 +1657,9 @@ class GenericResponseModel {
if (this.getPrNotificationBodyList != null) { if (this.getPrNotificationBodyList != null) {
data['GetPrNotificationBodyList'] = this.getPrNotificationBodyList!.toJson(); data['GetPrNotificationBodyList'] = this.getPrNotificationBodyList!.toJson();
} }
if (this.getPaymentNotificationBodyList != null) {
data['Pay_ReqNotificationBody'] = this.getPaymentNotificationBodyList!.toJson();
}
if (this.getPRInformationList != null) { if (this.getPRInformationList != null) {
data['PR_Information_List'] = this.getPRInformationList!.toJson(); data['PR_Information_List'] = this.getPRInformationList!.toJson();

@ -1,5 +1,5 @@
class CalculateAbsenceDuration { class CalculateAbsenceDuration {
double? pABSENCEDAYS; num? pABSENCEDAYS;
double? pABSENCEHOURS; double? pABSENCEHOURS;
String? pRETURNMSG; String? pRETURNMSG;
String? pRETURNSTATUS; String? pRETURNSTATUS;

@ -0,0 +1,285 @@
import 'dart:convert';
class GetPaymentNotificationBodyList {
List<BeneficieryList>? beneficieryList;
dynamic pInformation;
dynamic pQuestion;
List<PaymentDetailsList>? paymentDetailsList;
List<PurchaseOrdersList>? purchaseOrdersList;
List<RefundInvoiceList>? refundInvoiceList;
List<SupplierInformationList>? supplierInformationList;
GetPaymentNotificationBodyList({
this.beneficieryList,
this.pInformation,
this.pQuestion,
this.paymentDetailsList,
this.purchaseOrdersList,
this.refundInvoiceList,
this.supplierInformationList,
});
factory GetPaymentNotificationBodyList.fromRawJson(String str) => GetPaymentNotificationBodyList.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory GetPaymentNotificationBodyList.fromJson(Map<String, dynamic> json) => GetPaymentNotificationBodyList(
beneficieryList: json["Beneficiery_List"] == null ? [] : List<BeneficieryList>.from(json["Beneficiery_List"]!.map((x) => BeneficieryList.fromJson(x))),
pInformation: json["P_INFORMATION"],
pQuestion: json["P_QUESTION"],
paymentDetailsList: json["PaymentDetails_List"] == null ? [] : List<PaymentDetailsList>.from(json["PaymentDetails_List"]!.map((x) => PaymentDetailsList.fromJson(x))),
purchaseOrdersList: json["PurchaseOrders_List"] == null ? [] : List<PurchaseOrdersList>.from(json["PurchaseOrders_List"]!.map((x) => PurchaseOrdersList.fromJson(x))),
refundInvoiceList: json["RefundInvoice_List"] == null ? [] : List<RefundInvoiceList>.from(json["RefundInvoice_List"]!.map((x) => RefundInvoiceList.fromJson(x))),
supplierInformationList: json["SupplierInformation_List"] == null ? [] : List<SupplierInformationList>.from(json["SupplierInformation_List"]!.map((x) => SupplierInformationList.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"Beneficiery_List": beneficieryList == null ? [] : List<dynamic>.from(beneficieryList!.map((x) => x.toJson())),
"P_INFORMATION": pInformation,
"P_QUESTION": pQuestion,
"PaymentDetails_List": paymentDetailsList == null ? [] : List<dynamic>.from(paymentDetailsList!.map((x) => x.toJson())),
"PurchaseOrders_List": purchaseOrdersList == null ? [] : List<dynamic>.from(purchaseOrdersList!.map((x) => x.toJson())),
"RefundInvoice_List": refundInvoiceList == null ? [] : List<dynamic>.from(refundInvoiceList!.map((x) => x.toJson())),
"SupplierInformation_List": supplierInformationList == null ? [] : List<dynamic>.from(supplierInformationList!.map((x) => x.toJson())),
};
}
class BeneficieryList {
String? beneficiaryBankName;
String? beneficiaryIban;
String? beneficiaryName;
String? iqamaNumber;
String? saddadNumber;
BeneficieryList({
this.beneficiaryBankName,
this.beneficiaryIban,
this.beneficiaryName,
this.iqamaNumber,
this.saddadNumber,
});
factory BeneficieryList.fromRawJson(String str) => BeneficieryList.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory BeneficieryList.fromJson(Map<String, dynamic> json) => BeneficieryList(
beneficiaryBankName: json["BENEFICIARY_BANK_NAME"],
beneficiaryIban: json["BENEFICIARY_IBAN"],
beneficiaryName: json["BENEFICIARY_NAME"],
iqamaNumber: json["IQAMA_NUMBER"],
saddadNumber: json["SADDAD_NUMBER"],
);
Map<String, dynamic> toJson() => {
"BENEFICIARY_BANK_NAME": beneficiaryBankName,
"BENEFICIARY_IBAN": beneficiaryIban,
"BENEFICIARY_NAME": beneficiaryName,
"IQAMA_NUMBER": iqamaNumber,
"SADDAD_NUMBER": saddadNumber,
};
}
class PaymentDetailsList {
String? currency;
String? payingOrganizationName;
String? paymentDetails;
String? paymentMethodName;
String? prepareEmployeeName;
String? prepareEmployeeNumber;
String? preparePositionName;
String? requesterEmployeeName;
String? requesterEmployeeNumber;
String? requesterOperatingUnits;
String? requesterPayrollName;
String? requesterPositionName;
String? requestAmount;
String? requestDate;
String? requestNumber;
String? typeOfPayment;
PaymentDetailsList({
this.currency,
this.payingOrganizationName,
this.paymentDetails,
this.paymentMethodName,
this.prepareEmployeeName,
this.prepareEmployeeNumber,
this.preparePositionName,
this.requesterEmployeeName,
this.requesterEmployeeNumber,
this.requesterOperatingUnits,
this.requesterPayrollName,
this.requesterPositionName,
this.requestAmount,
this.requestDate,
this.requestNumber,
this.typeOfPayment,
});
factory PaymentDetailsList.fromRawJson(String str) => PaymentDetailsList.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory PaymentDetailsList.fromJson(Map<String, dynamic> json) => PaymentDetailsList(
currency: json["CURRENCY"],
payingOrganizationName: json["PAYING_ORGANIZATION_NAME"],
paymentDetails: json["PAYMENT_DETAILS"],
paymentMethodName: json["PAYMENT_METHOD_NAME"],
prepareEmployeeName: json["PREPARE_EMPLOYEE_NAME"],
prepareEmployeeNumber: json["PREPARE_EMPLOYEE_NUMBER"],
preparePositionName: json["PREPARE_POSITION_NAME"],
requesterEmployeeName: json["REQUESTER_EMPLOYEE_NAME"],
requesterEmployeeNumber: json["REQUESTER_EMPLOYEE_NUMBER"],
requesterOperatingUnits: json["REQUESTER_OPERATING_UNITS"],
requesterPayrollName: json["REQUESTER_PAYROLL_NAME"],
requesterPositionName: json["REQUESTER_POSITION_NAME"],
requestAmount: json["REQUEST_AMOUNT"],
requestDate: json["REQUEST_DATE"],
requestNumber: json["REQUEST_NUMBER"],
typeOfPayment: json["TYPE_OF_PAYMENT"],
);
Map<String, dynamic> toJson() => {
"CURRENCY": currency,
"PAYING_ORGANIZATION_NAME": payingOrganizationName,
"PAYMENT_DETAILS": paymentDetails,
"PAYMENT_METHOD_NAME": paymentMethodName,
"PREPARE_EMPLOYEE_NAME": prepareEmployeeName,
"PREPARE_EMPLOYEE_NUMBER": prepareEmployeeNumber,
"PREPARE_POSITION_NAME": preparePositionName,
"REQUESTER_EMPLOYEE_NAME": requesterEmployeeName,
"REQUESTER_EMPLOYEE_NUMBER": requesterEmployeeNumber,
"REQUESTER_OPERATING_UNITS": requesterOperatingUnits,
"REQUESTER_PAYROLL_NAME": requesterPayrollName,
"REQUESTER_POSITION_NAME": requesterPositionName,
"REQUEST_AMOUNT": requestAmount,
"REQUEST_DATE": requestDate,
"REQUEST_NUMBER": requestNumber,
"TYPE_OF_PAYMENT": typeOfPayment,
};
}
class PurchaseOrdersList {
dynamic poAmount;
dynamic poApprovalDate;
String? poNumber;
String? prNumber;
String? supplierName;
String? supplierNumber;
String? versionStatus;
PurchaseOrdersList({
this.poAmount,
this.poApprovalDate,
this.poNumber,
this.prNumber,
this.supplierName,
this.supplierNumber,
this.versionStatus,
});
factory PurchaseOrdersList.fromRawJson(String str) => PurchaseOrdersList.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory PurchaseOrdersList.fromJson(Map<String, dynamic> json) => PurchaseOrdersList(
poAmount: json["PO_AMOUNT"],
poApprovalDate: json["PO_APPROVAL_DATE"],
poNumber: json["PO_NUMBER"],
prNumber: json["PR_NUMBER"],
supplierName: json["SUPPLIER_NAME"],
supplierNumber: json["SUPPLIER_NUMBER"],
versionStatus: json["VERSION_STATUS"],
);
Map<String, dynamic> toJson() => {
"PO_AMOUNT": poAmount,
"PO_APPROVAL_DATE": poApprovalDate,
"PO_NUMBER": poNumber,
"PR_NUMBER": prNumber,
"SUPPLIER_NAME": supplierName,
"SUPPLIER_NUMBER": supplierNumber,
"VERSION_STATUS": versionStatus,
};
}
class RefundInvoiceList {
dynamic amount;
String? hospitalClinic;
dynamic invoicedDate;
String? invoiceNumber;
String? patientName;
String? patientNumber;
RefundInvoiceList({
this.amount,
this.hospitalClinic,
this.invoicedDate,
this.invoiceNumber,
this.patientName,
this.patientNumber,
});
factory RefundInvoiceList.fromRawJson(String str) => RefundInvoiceList.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory RefundInvoiceList.fromJson(Map<String, dynamic> json) => RefundInvoiceList(
amount: json["AMOUNT"],
hospitalClinic: json["HOSPITAL_CLINIC"],
invoicedDate: json["INVOICED_DATE"],
invoiceNumber: json["INVOICE_NUMBER"],
patientName: json["PATIENT_NAME"],
patientNumber: json["PATIENT_NUMBER"],
);
Map<String, dynamic> toJson() => {
"AMOUNT": amount,
"HOSPITAL_CLINIC": hospitalClinic,
"INVOICED_DATE": invoicedDate,
"INVOICE_NUMBER": invoiceNumber,
"PATIENT_NAME": patientName,
"PATIENT_NUMBER": patientNumber,
};
}
class SupplierInformationList {
String? crNumber;
String? supplierBankAccountName;
String? supplierBankAccountNumber;
String? supplierBankIban;
String? supplierName;
String? supplierNumber;
SupplierInformationList({
this.crNumber,
this.supplierBankAccountName,
this.supplierBankAccountNumber,
this.supplierBankIban,
this.supplierName,
this.supplierNumber,
});
factory SupplierInformationList.fromRawJson(String str) => SupplierInformationList.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory SupplierInformationList.fromJson(Map<String, dynamic> json) => SupplierInformationList(
crNumber: json["CR_NUMBER"],
supplierBankAccountName: json["SUPPLIER_BANK_ACCOUNT_NAME"],
supplierBankAccountNumber: json["SUPPLIER_BANK_ACCOUNT_NUMBER"],
supplierBankIban: json["SUPPLIER_BANK_IBAN"],
supplierName: json["SUPPLIER_NAME"],
supplierNumber: json["SUPPLIER_NUMBER"],
);
Map<String, dynamic> toJson() => {
"CR_NUMBER": crNumber,
"SUPPLIER_BANK_ACCOUNT_NAME": supplierBankAccountName,
"SUPPLIER_BANK_ACCOUNT_NUMBER": supplierBankAccountNumber,
"SUPPLIER_BANK_IBAN": supplierBankIban,
"SUPPLIER_NAME": supplierName,
"SUPPLIER_NUMBER": supplierNumber,
};
}

@ -57,9 +57,15 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
mobileLoginInfoListModel ??= ModalRoute.of(context)!.settings.arguments as GetMobileLoginInfoListModel; if(ModalRoute.of(context)!.settings.arguments != null) {
// String empName = AppState().isArabic(context) ? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr! : AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn!; mobileLoginInfoListModel ??= ModalRoute
String empName = mobileLoginInfoListModel!.employeeName!; .of(context)!
.settings
.arguments as GetMobileLoginInfoListModel;
// String empName = AppState().isArabic(context) ? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr! : AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn!;
String empName = mobileLoginInfoListModel!.employeeName!;
}
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(

@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/api/leave_balance_api_client.dart'; import 'package:mohem_flutter_app/api/leave_balance_api_client.dart';
import 'package:mohem_flutter_app/api/my_attendance_api_client.dart'; import 'package:mohem_flutter_app/api/my_attendance_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/date_uitl.dart';
import 'package:mohem_flutter_app/classes/utils.dart'; import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/config/routes.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart';
@ -85,7 +86,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
// } // }
// } // }
// } // }
return ValidateEitTransactionModel(dATEVALUE: null, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: null, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: tempVar.toString()).toJson(); return ValidateEitTransactionModel(dATEVALUE: null, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: null, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: DateUtil.replaceArabicNumber(tempVar)).toJson();
}).toList(); }).toList();
values.add(ValidateEitTransactionModel(dATEVALUE: null, nAME: "PEI_ACTION", nUMBERVALUE: null, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: "NEW_ROW").toJson()); values.add(ValidateEitTransactionModel(dATEVALUE: null, nAME: "PEI_ACTION", nUMBERVALUE: null, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: "NEW_ROW").toJson());
@ -773,7 +774,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
onTap: () async { onTap: () async {
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) { if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
var timeString = getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.split(":"); var timeString = getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.split(":");
selectedDate = DateTime(0, 0, 0, int.parse(timeString[0]), int.parse(timeString[1])); selectedDate = DateTime(0, 0, 0, int.parse(timeString[0]), int.parse((timeString[1])));
//DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!); //DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
} }
@ -861,7 +862,9 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
context: context, context: context,
initialTime: time, initialTime: time,
builder: (cxt, child) { builder: (cxt, child) {
return MediaQuery(data: MediaQuery.of(context).copyWith(alwaysUse24HourFormat: true), child: child ?? Container()); return MediaQuery(data: MediaQuery.of(context).copyWith(alwaysUse24HourFormat: true), child: Localizations.override(
context: context,
locale: const Locale('en', 'US'),child: child ?? Container()));
}); });
if (picked != null && picked != time) { if (picked != null && picked != time) {

@ -38,7 +38,7 @@ class _UpdateContinueSheetState extends State<UpdateContinueSheet> {
var size = MediaQuery.of(context).size; var size = MediaQuery.of(context).size;
itemHeight = (size.height - kToolbarHeight - 24) / 9; itemHeight = (size.height - kToolbarHeight - 24) / 9;
itemWidth = size.width / 2; itemWidth = size.width / 2;
return Column( return Column(
children: [ children: [
if ((widget.workListData?.sUBJECT ?? "").isNotEmpty) widget.workListData!.sUBJECT!.toText14().paddingOnly(top: 10, right: 21, left: 21, bottom: 21), if ((widget.workListData?.sUBJECT ?? "").isNotEmpty) widget.workListData!.sUBJECT!.toText14().paddingOnly(top: 10, right: 21, left: 21, bottom: 21),
ListView.separated( ListView.separated(

@ -78,7 +78,10 @@ class _WorkListScreenState extends State<WorkListScreen> {
WorkListItemTypeModelData( WorkListItemTypeModelData(
value: 0, name: 'STAMP', fullName: LocaleKeys.stamp.tr(), active: false, color: [Color(0xff32D892), Color(0xff1AB170)], icon: "assets/images/miss_swipe.svg", key: 'STAMP', disable: false), value: 0, name: 'STAMP', fullName: LocaleKeys.stamp.tr(), active: false, color: [Color(0xff32D892), Color(0xff1AB170)], icon: "assets/images/miss_swipe.svg", key: 'STAMP', disable: false),
WorkListItemTypeModelData( WorkListItemTypeModelData(
value: 0, name: 'COC', fullName: LocaleKeys.itemCreation.tr(), active: false, color: [Color(0xff787299), Color(0xff1AB170)], icon: "assets/images/miss_swipe.svg", key: 'COC', disable: true) value: 0, name: 'COC', fullName: LocaleKeys.itemCreation.tr(), active: false, color: [Color(0xff787299), Color(0xff1AB170)], icon: "assets/images/miss_swipe.svg", key: 'COC', disable: true),
WorkListItemTypeModelData(
value: 0, name: 'Payment Req', fullName: LocaleKeys.paymentRequest.tr(), active: false, color: [Color(0xff42d7bf), Color(0xff42d7bf)], icon: "assets/images/PR.svg", key: 'PAY_REQ', disable: false)
]; ];
int? workListItemIndex; int? workListItemIndex;

@ -29,6 +29,7 @@ import 'package:mohem_flutter_app/models/worklist/hr/get_address_notification_bo
import 'package:mohem_flutter_app/models/worklist/hr/get_basic_det_ntf_body_list_model.dart'; import 'package:mohem_flutter_app/models/worklist/hr/get_basic_det_ntf_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_contact_notification_body_list_model.dart'; import 'package:mohem_flutter_app/models/worklist/hr/get_contact_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_phones_notification_body_list_model.dart'; import 'package:mohem_flutter_app/models/worklist/hr/get_phones_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/payment_details_list.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart'; import 'package:mohem_flutter_app/models/worklist_response_model.dart';
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart'; import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
import 'package:mohem_flutter_app/ui/work_list/sheets/delegate_sheet.dart'; import 'package:mohem_flutter_app/ui/work_list/sheets/delegate_sheet.dart';
@ -46,7 +47,6 @@ import 'package:mohem_flutter_app/widgets/dialogs/accept_reject_input_dialog.dar
import 'package:mohem_flutter_app/widgets/dialogs/confirm_dialog.dart'; import 'package:mohem_flutter_app/widgets/dialogs/confirm_dialog.dart';
import 'package:mohem_flutter_app/models/termination/termination_notification_body.dart'; import 'package:mohem_flutter_app/models/termination/termination_notification_body.dart';
class WorkListDetailScreen extends StatefulWidget { class WorkListDetailScreen extends StatefulWidget {
WorkListDetailScreen({Key? key}) : super(key: key); WorkListDetailScreen({Key? key}) : super(key: key);
@ -70,27 +70,30 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
List<GetStampMsNotificationBodyList> getStampMsNotifications = []; List<GetStampMsNotificationBodyList> getStampMsNotifications = [];
List<GetStampNsNotificationBodyList> getStampNsNotifications = []; List<GetStampNsNotificationBodyList> getStampNsNotifications = [];
List<GetMoNotificationBodyList> getMoNotificationBodyList = []; List<GetMoNotificationBodyList> getMoNotificationBodyList = [];
List<NotificationGetRespondAttributesList> getNotificationRespondAttributes = []; List<NotificationGetRespondAttributesList> getNotificationRespondAttributes =
[];
NotificationGetRespondAttributesList? notificationNoteInput; NotificationGetRespondAttributesList? notificationNoteInput;
List<GetRFCEmployeeList> getRFCEmployeeList = []; List<GetRFCEmployeeList> getRFCEmployeeList = [];
//HR Details Screen Requests //HR Details Screen Requests
List<GetEitCollectionNotificationBodyList>? getEitCollectionNotificationBodyList = []; List<GetEitCollectionNotificationBodyList>?
getEitCollectionNotificationBodyList = [];
List<GetPhonesNotificationBodyList>? getPhonesNotificationBodyList = []; List<GetPhonesNotificationBodyList>? getPhonesNotificationBodyList = [];
List<GetBasicDetNtfBodyList>? getBasicDetNtfBodyList = []; List<GetBasicDetNtfBodyList>? getBasicDetNtfBodyList = [];
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotificationBodyList = []; List<GetAbsenceCollectionNotificationBodyList>?
getAbsenceCollectionNotificationBodyList = [];
GetContactNotificationBodyList? getContactNotificationBodyList; GetContactNotificationBodyList? getContactNotificationBodyList;
List<GetAddressNotificationBodyList>? getAddressNotificationBodyList = []; List<GetAddressNotificationBodyList>? getAddressNotificationBodyList = [];
List<TerminationNotificationBody>? getTerminationNotificationBodyList = []; List<TerminationNotificationBody>? getTerminationNotificationBodyList = [];
GenericResponseModel? getBasicNTFBody; GenericResponseModel? getBasicNTFBody;
GenericResponseModel? getICBody; GenericResponseModel? getICBody;
GenericResponseModel? subordinatesLeavesModel; GenericResponseModel? subordinatesLeavesModel;
GetPoNotificationBodyList? getPoNotificationBody; GetPoNotificationBodyList? getPoNotificationBody;
GetPrNotificationBodyList? getPrNotificationBody; GetPrNotificationBodyList? getPrNotificationBody;
GetItemCreationNtfBodyList? getItemCreationNtfBody; GetItemCreationNtfBodyList? getItemCreationNtfBody;
GetPaymentNotificationBodyList? getPaymentNotificationBodyList;
bool isCloseAvailable = false; bool isCloseAvailable = false;
bool isApproveAvailable = false; bool isApproveAvailable = false;
@ -129,8 +132,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
getAbsenceCollectionNotificationBodyList!.clear(); getAbsenceCollectionNotificationBodyList!.clear();
getContactNotificationBodyList = null; getContactNotificationBodyList = null;
getAddressNotificationBodyList!.clear(); getAddressNotificationBodyList!.clear();
getPaymentNotificationBodyList = null;
if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") { if (workListData!.iTEMTYPE == "HRSSA" ||
workListData!.iTEMTYPE == "STAMP") {
getUserInformation(); getUserInformation();
} }
@ -152,7 +156,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
getContactNotificationBody(); getContactNotificationBody();
} else if (workListData!.rEQUESTTYPE == "ADDRESS") { } else if (workListData!.rEQUESTTYPE == "ADDRESS") {
getAddressNotificationBody(); getAddressNotificationBody();
} else if(workListData!.rEQUESTTYPE =='TERMINATION'){ } else if (workListData!.rEQUESTTYPE == 'TERMINATION') {
getTerminationNotificationBody(); getTerminationNotificationBody();
} }
} }
@ -171,6 +175,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (workListData!.iTEMTYPE == "REQAPPRV") { if (workListData!.iTEMTYPE == "REQAPPRV") {
getPRNotification(); getPRNotification();
} }
if (workListData!.iTEMTYPE == "PAY_REQ") {
getPaymentNotification();
}
if (controller.hasClients) { if (controller.hasClients) {
controller.jumpToPage(0); controller.jumpToPage(0);
@ -184,7 +191,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
void getDataFromState() { void getDataFromState() {
if (workListData == null) { if (workListData == null) {
workListData = AppState().workList![AppState().workListIndex!]; // ModalRoute.of(context)!.settings.arguments as WorkListResponseModel; workListData = AppState().workList![AppState()
.workListIndex!]; // ModalRoute.of(context)!.settings.arguments as WorkListResponseModel;
getData(); getData();
} }
} }
@ -217,7 +225,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
Column( Column(
children: [ children: [
Container( Container(
padding: const EdgeInsets.only(left: 21, right: 21, top: 16, bottom: 16), padding: const EdgeInsets.only(
left: 21, right: 21, top: 16, bottom: 16),
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(25), bottomLeft: Radius.circular(25),
@ -236,13 +245,19 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
child: Row( child: Row(
children: [ children: [
myTab(LocaleKeys.info.tr(), 0), myTab(LocaleKeys.info.tr(), 0),
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") ? myTab(LocaleKeys.details.tr(), 1) : myTab(LocaleKeys.request.tr(), 1), (workListData!.iTEMTYPE == "HRSSA" ||
workListData!.iTEMTYPE == "STAMP")
? myTab(LocaleKeys.details.tr(), 1)
: myTab(LocaleKeys.request.tr(), 1),
myTab(LocaleKeys.actions.tr(), 2), myTab(LocaleKeys.actions.tr(), 2),
myTab(LocaleKeys.attachments.tr(), 3), myTab(LocaleKeys.attachments.tr(), 3),
], ],
), ),
), ),
if ((workListData?.sUBJECT ?? "").isNotEmpty) workListData!.sUBJECT!.toText14().paddingOnly(top: 20, right: 21, left: 21), if ((workListData?.sUBJECT ?? "").isNotEmpty)
workListData!.sUBJECT!
.toText14()
.paddingOnly(top: 20, right: 21, left: 21),
PageView( PageView(
controller: controller, controller: controller,
onPageChanged: (int pageIndex) { onPageChanged: (int pageIndex) {
@ -254,25 +269,38 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
InfoFragment( InfoFragment(
poHeaderList: getPoNotificationBody?.pOHeader ?? [], poHeaderList: getPoNotificationBody?.pOHeader ?? [],
workListData: workListData, workListData: workListData,
itemCreationHeader: getItemCreationNtfBody?.itemCreationHeader ?? [], itemCreationHeader:
getItemCreationNtfBody?.itemCreationHeader ?? [],
getStampMsNotifications: getStampMsNotifications, getStampMsNotifications: getStampMsNotifications,
getStampNsNotifications: getStampNsNotifications, getStampNsNotifications: getStampNsNotifications,
getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList, getEitCollectionNotificationBodyList:
getPhonesNotificationBodyList: getPhonesNotificationBodyList, getEitCollectionNotificationBodyList,
getPhonesNotificationBodyList:
getPhonesNotificationBodyList,
getBasicDetNtfBodyList: getBasicDetNtfBodyList, getBasicDetNtfBodyList: getBasicDetNtfBodyList,
getAddressNotificationBodyList: getAddressNotificationBodyList, getAddressNotificationBodyList:
getAbsenceCollectionNotificationBodyList: getAbsenceCollectionNotificationBodyList, getAddressNotificationBodyList,
getContactNotificationBodyList: getContactNotificationBodyList, getAbsenceCollectionNotificationBodyList:
getAbsenceCollectionNotificationBodyList,
getContactNotificationBodyList:
getContactNotificationBodyList,
getPrNotificationBodyList: getPrNotificationBody, getPrNotificationBodyList: getPrNotificationBody,
getTerminationNotificationBodyList:getTerminationNotificationBodyList getTerminationNotificationBodyList:
getTerminationNotificationBodyList,
getPaymentNotificationBodyList:
getPaymentNotificationBodyList,
), ),
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") (workListData!.iTEMTYPE == "HRSSA" ||
? DetailFragment(workListData, memberInformationListModel) workListData!.iTEMTYPE == "STAMP" || workListData!.iTEMTYPE == "PAY_REQ")
? DetailFragment(
workListData, memberInformationListModel)
: RequestFragment( : RequestFragment(
moNotificationBodyList: getMoNotificationBodyList, moNotificationBodyList: getMoNotificationBodyList,
poLinesList: getPoNotificationBody?.pOLines ?? [], poLinesList: getPoNotificationBody?.pOLines ?? [],
itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [], itemCreationLines:
getItemCreationNtfBody?.itemCreationLines ?? [],
prLinesList: getPrNotificationBody?.pRLines ?? [], prLinesList: getPrNotificationBody?.pRLines ?? [],
), ),
isActionHistoryLoaded isActionHistoryLoaded
? actionHistoryList.isEmpty ? actionHistoryList.isEmpty
@ -292,11 +320,13 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
).expanded, ).expanded,
if (isApproveAvailable || isRejectAvailable || isCloseAvailable) if (isApproveAvailable || isRejectAvailable || isCloseAvailable)
Container( Container(
padding: const EdgeInsets.only(top: 14, bottom: 14, left: 21, right: 21), padding: const EdgeInsets.only(
top: 14, bottom: 14, left: 21, right: 21),
decoration: const BoxDecoration( decoration: const BoxDecoration(
color: Colors.white, color: Colors.white,
border: Border( border: Border(
top: BorderSide(color: MyColors.lightGreyEFColor, width: 1.0), top: BorderSide(
color: MyColors.lightGreyEFColor, width: 1.0),
), ),
), ),
child: Row( child: Row(
@ -305,20 +335,29 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
DefaultButton( DefaultButton(
LocaleKeys.reject.tr(), LocaleKeys.reject.tr(),
() => performAction(rejectAction), () => performAction(rejectAction),
colors: const [Color(0xffE47A7E), Color(0xffDE6D71)], colors: const [
Color(0xffE47A7E),
Color(0xffDE6D71)
],
).expanded, ).expanded,
if (isApproveAvailable && isRejectAvailable) 8.width, if (isApproveAvailable && isRejectAvailable) 8.width,
if (isApproveAvailable) if (isApproveAvailable)
DefaultButton( DefaultButton(
LocaleKeys.approve.tr(), LocaleKeys.approve.tr(),
() => performAction(approveAction), () => performAction(approveAction),
colors: const [Color(0xff28C884), Color(0xff1BB271)], colors: const [
Color(0xff28C884),
Color(0xff1BB271)
],
).expanded, ).expanded,
if (isCloseAvailable) if (isCloseAvailable)
DefaultButton( DefaultButton(
LocaleKeys.ok.tr(), LocaleKeys.ok.tr(),
() => performAction("CLOSE"), () => performAction("CLOSE"),
colors: const [Color(0xff32D892), Color(0xff1AB170)], colors: const [
Color(0xff32D892),
Color(0xff1AB170)
],
).expanded, ).expanded,
8.width, 8.width,
Container( Container(
@ -328,7 +367,11 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
shape: BoxShape.circle, shape: BoxShape.circle,
color: MyColors.lightGreyE6Color, color: MyColors.lightGreyE6Color,
), ),
child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor), child: Icon(
showFabOptions
? Icons.more_vert_rounded
: Icons.more_horiz_rounded,
color: MyColors.darkIconColor),
).onPress(() { ).onPress(() {
setState(() { setState(() {
showFabOptions = true; showFabOptions = true;
@ -345,7 +388,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
opacity: showFabOptions ? 1 : 0, opacity: showFabOptions ? 1 : 0,
duration: const Duration(milliseconds: 250), duration: const Duration(milliseconds: 250),
child: Container( child: Container(
padding: const EdgeInsets.only(left: 21, right: 21, bottom: 75 - 12), padding: const EdgeInsets.only(
left: 21, right: 21, bottom: 75 - 12),
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
color: Colors.white.withOpacity(.67), color: Colors.white.withOpacity(.67),
@ -354,15 +398,19 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
myFab(LocaleKeys.skip.tr(), "assets/images/skip.svg").onPress(() { myFab(LocaleKeys.skip.tr(), "assets/images/skip.svg")
if (AppState().workList!.length - 1 > AppState().workListIndex!) { .onPress(() {
if (AppState().workList!.length - 1 >
AppState().workListIndex!) {
animationIndex = animationIndex + 1; animationIndex = animationIndex + 1;
AppState().setWorkListIndex = AppState().workListIndex! + 1; AppState().setWorkListIndex =
AppState().workListIndex! + 1;
workListData = null; workListData = null;
showFabOptions = false; showFabOptions = false;
tabIndex = 0; tabIndex = 0;
getDataFromState(); getDataFromState();
} else if (AppState().workList!.length - 1 == AppState().workListIndex!) { } else if (AppState().workList!.length - 1 ==
AppState().workListIndex!) {
Navigator.pop(context); Navigator.pop(context);
} }
}), }),
@ -380,25 +428,31 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
], ],
), ),
), ),
floatingActionButton: (!isApproveAvailable && !isRejectAvailable && !isCloseAvailable) floatingActionButton:
? Container( (!isApproveAvailable && !isRejectAvailable && !isCloseAvailable)
height: 43, ? Container(
width: 43, height: 43,
decoration: const BoxDecoration( width: 43,
shape: BoxShape.circle, decoration: const BoxDecoration(
color: MyColors.lightGreyE6Color, shape: BoxShape.circle,
), color: MyColors.lightGreyE6Color,
child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor), ),
).onPress(() { child: Icon(
setState(() { showFabOptions
showFabOptions = true; ? Icons.more_vert_rounded
}); : Icons.more_horiz_rounded,
}) color: MyColors.darkIconColor),
: null, ).onPress(() {
setState(() {
showFabOptions = true;
});
})
: null,
); );
} }
List<Widget> viewApiButtonsList(List<GetNotificationButtonsList> notificationButtonsList) { List<Widget> viewApiButtonsList(
List<GetNotificationButtonsList> notificationButtonsList) {
List<Widget> fabs = []; List<Widget> fabs = [];
for (int i = 0; i < notificationButtonsList.length; i++) { for (int i = 0; i < notificationButtonsList.length; i++) {
if (notificationButtonsList[i].bUTTONACTION! == "REJECTED" || if (notificationButtonsList[i].bUTTONACTION! == "REJECTED" ||
@ -412,7 +466,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
notificationButtonsList[i].bUTTONLABEL!, notificationButtonsList[i].bUTTONLABEL!,
getActionImage(notificationButtonsList[i].bUTTONACTION!), getActionImage(notificationButtonsList[i].bUTTONACTION!),
isIconAsset: true, isIconAsset: true,
).paddingOnly(bottom: 12).onPress(() => handleFabAction(notificationButtonsList[i]))); )
.paddingOnly(bottom: 12)
.onPress(() => handleFabAction(notificationButtonsList[i])));
} }
return fabs; return fabs;
} }
@ -491,7 +547,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
)); ));
break; break;
case "ANSWER_INFO": case "ANSWER_INFO":
performAction(notificationButton.bUTTONACTION!, title: notificationButton.bUTTONLABEL); performAction(notificationButton.bUTTONACTION!,
title: notificationButton.bUTTONLABEL);
break; break;
case "RFC": case "RFC":
getRFCEmployeeListFunc(); getRFCEmployeeListFunc();
@ -511,20 +568,31 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
callBackFunc: reloadWorkList, callBackFunc: reloadWorkList,
child: UpdateContinueSheet( child: UpdateContinueSheet(
workListData: workListData, workListData: workListData,
getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList, getEitCollectionNotificationBodyList:
dynamicParams: DynamicListViewParams(workListData!.sUBJECT!, workListData!.fUNCTIONNAME!, getEitCollectionNotificationBodyList,
isUpdate: true, collectionNotificationList: getEitCollectionNotificationBodyList![0].collectionNotification)), dynamicParams: DynamicListViewParams(
workListData!.sUBJECT!, workListData!.fUNCTIONNAME!,
isUpdate: true,
collectionNotificationList:
getEitCollectionNotificationBodyList![0]
.collectionNotification)),
); );
break; break;
case "CONTINUE_ACTION": case "CONTINUE_ACTION":
showMyBottomSheet( showMyBottomSheet(
context, context,
type:"CONTINUE_ACTION",
callBackFunc: reloadWorkList, callBackFunc: reloadWorkList,
child: UpdateContinueSheet( child: UpdateContinueSheet(
workListData: workListData, workListData: workListData,
getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList, getEitCollectionNotificationBodyList:
dynamicParams: DynamicListViewParams(workListData!.sUBJECT!, workListData!.fUNCTIONNAME!, getEitCollectionNotificationBodyList,
isUpdate: true, collectionNotificationList: getEitCollectionNotificationBodyList![0].collectionNotification)), dynamicParams: DynamicListViewParams(
workListData!.sUBJECT!, workListData!.fUNCTIONNAME!,
isUpdate: true,
collectionNotificationList:
getEitCollectionNotificationBodyList![0]
.collectionNotification)),
); );
break; break;
case "APPROVE_AND_FORWARD": case "APPROVE_AND_FORWARD":
@ -536,7 +604,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
notificationID: workListData!.nOTIFICATIONID, notificationID: workListData!.nOTIFICATIONID,
actionHistoryList: actionHistoryList, actionHistoryList: actionHistoryList,
callBackFunc: reloadWorkList, callBackFunc: reloadWorkList,
getNotificationRespondAttributes: getNotificationRespondAttributes, getNotificationRespondAttributes:
getNotificationRespondAttributes,
)); ));
break; break;
case "FORWARD": case "FORWARD":
@ -548,7 +617,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
notificationID: workListData!.nOTIFICATIONID, notificationID: workListData!.nOTIFICATIONID,
actionHistoryList: actionHistoryList, actionHistoryList: actionHistoryList,
callBackFunc: reloadWorkList, callBackFunc: reloadWorkList,
getNotificationRespondAttributes: getNotificationRespondAttributes, getNotificationRespondAttributes:
getNotificationRespondAttributes,
)); ));
break; break;
case "DEL": case "DEL":
@ -569,7 +639,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
void getRFCEmployeeListFunc() async { void getRFCEmployeeListFunc() async {
try { try {
Utils.showLoading(context); Utils.showLoading(context);
getRFCEmployeeList = await WorkListApiClient().getRFCEmployeeeList(workListData!.nOTIFICATIONID!); getRFCEmployeeList = await WorkListApiClient()
.getRFCEmployeeeList(workListData!.nOTIFICATIONID!);
Utils.hideLoading(context); Utils.hideLoading(context);
actionHistoryList.last.sEQUENCE = getRFCEmployeeList[0].sEQ; actionHistoryList.last.sEQUENCE = getRFCEmployeeList[0].sEQ;
showMyBottomSheet(context, showMyBottomSheet(context,
@ -589,7 +660,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
} }
} }
Future<void> performNetworkCall(BuildContext context, {String? email, String? userId}) async { Future<void> performNetworkCall(BuildContext context,
{String? email, String? userId}) async {
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext cxt) => ConfirmDialog( builder: (BuildContext cxt) => ConfirmDialog(
@ -599,7 +671,12 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
Navigator.pop(cxt); Navigator.pop(cxt);
Utils.showLoading(context); Utils.showLoading(context);
try { try {
await WorkListApiClient().submitComment(comment: "", email: email, userId: userId, notificationId: workListData!.nOTIFICATIONID, apiMode: "REJECT"); await WorkListApiClient().submitComment(
comment: "",
email: email,
userId: userId,
notificationId: workListData!.nOTIFICATIONID,
apiMode: "REJECT");
Utils.hideLoading(context); Utils.hideLoading(context);
Navigator.pop(context, "delegate_reload"); Navigator.pop(context, "delegate_reload");
} catch (ex) { } catch (ex) {
@ -617,7 +694,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
title.toText12(color: isSelected ? Colors.white : Colors.white.withOpacity(.74), isCenter: true), title.toText12(
color: isSelected ? Colors.white : Colors.white.withOpacity(.74),
isCenter: true),
4.height, 4.height,
Container( Container(
height: 8, height: 8,
@ -680,14 +759,17 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
notificationGetRespond: notificationNoteInput, notificationGetRespond: notificationNoteInput,
actionMode: actionMode, actionMode: actionMode,
onTap: (String note) { onTap: (String note) {
List<Map<String, dynamic>> responseAttribute = []; List<Map<String, dynamic>> responseAttribute = [];
for (var element in getNotificationRespondAttributes!) { for (var element in getNotificationRespondAttributes!) {
responseAttribute.add({ responseAttribute.add({
"ATTRIBUTE_NAME": element!.attributeName, "ATTRIBUTE_NAME": element!.attributeName,
if (element!.attributeType == "number") "ATTRIBUTE_NUMBER_VALUE": note else if (element!.attributeType == "VARCHAR2") "ATTRIBUTE_TEXT_VALUE": note if (element!.attributeType == "number")
}); "ATTRIBUTE_NUMBER_VALUE": note
} else if (element!.attributeType == "VARCHAR2")
"ATTRIBUTE_TEXT_VALUE": note
});
}
Map<String, dynamic> payload = { Map<String, dynamic> payload = {
"P_ACTION_MODE": actionMode, "P_ACTION_MODE": actionMode,
@ -695,11 +777,14 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
"P_COMMENTS": note, "P_COMMENTS": note,
"P_FORWARD_TO_USER_NAME": "", "P_FORWARD_TO_USER_NAME": "",
"P_NOTIFICATION_ID": workListData!.nOTIFICATIONID, "P_NOTIFICATION_ID": workListData!.nOTIFICATIONID,
"RespondAttributeList":responseAttribute, "RespondAttributeList": responseAttribute,
}; };
if (actionMode == "APPROVED" || actionMode == "APPROVE" || actionMode == "CLOSE" || actionMode == "ANSWER_INFO" || actionMode == "RFC" || actionMode == "TRY_APPROVE_AGAIN" || actionMode == "SEND_BACK_TO_PREPARER") { if (actionMode == "APPROVED" || actionMode == "APPROVE" || actionMode == "CLOSE" || actionMode == "ANSWER_INFO" || actionMode == "RFC" || actionMode == "TRY_APPROVE_AGAIN" || actionMode == "SEND_BACK_TO_PREPARER") {
performNotificationAction(payload); performNotificationAction(payload);
} else if (note.isNotEmpty && (actionMode != "APPROVED" || actionMode != "APPROVE")) { } else if (note.isNotEmpty &&
(actionMode != "APPROVED" || actionMode != "APPROVE")) {
performNotificationAction(payload); performNotificationAction(payload);
} else { } else {
Utils.showToast(LocaleKeys.pleaseEnterComments.tr()); Utils.showToast(LocaleKeys.pleaseEnterComments.tr());
@ -712,7 +797,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
void performNotificationAction(Map<String, dynamic> payload) async { void performNotificationAction(Map<String, dynamic> payload) async {
try { try {
Utils.showLoading(context); Utils.showLoading(context);
GenericResponseModel model = await WorkListApiClient().postNotificationActions(payload); GenericResponseModel model =
await WorkListApiClient().postNotificationActions(payload);
Utils.hideLoading(context); Utils.hideLoading(context);
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr()); Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
animationIndex = animationIndex + 1; animationIndex = animationIndex + 1;
@ -753,7 +839,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
getEitCollectionNotificationBodyList!.clear(); getEitCollectionNotificationBodyList!.clear();
getEitCollectionNotificationBodyList = await WorkListApiClient().GetEitNotificationBody(workListData!.nOTIFICATIONID); getEitCollectionNotificationBodyList = await WorkListApiClient()
.GetEitNotificationBody(workListData!.nOTIFICATIONID);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
Utils.hideLoading(context); Utils.hideLoading(context);
@ -771,7 +858,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
memberInformationListModel = null; memberInformationListModel = null;
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!); memberInformationListModel = await WorkListApiClient()
.getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
Utils.hideLoading(context); Utils.hideLoading(context);
@ -789,7 +877,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
getPhonesNotificationBodyList!.clear(); getPhonesNotificationBodyList!.clear();
getPhonesNotificationBodyList = await WorkListApiClient().getPhonesNotificationBodyList(workListData!.nOTIFICATIONID); getPhonesNotificationBodyList = await WorkListApiClient()
.getPhonesNotificationBodyList(workListData!.nOTIFICATIONID);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
Utils.hideLoading(context); Utils.hideLoading(context);
@ -807,7 +896,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
getBasicDetNtfBodyList!.clear(); getBasicDetNtfBodyList!.clear();
getBasicDetNtfBodyList = await WorkListApiClient().getBasicDetNtfBodyList(workListData!.nOTIFICATIONID); getBasicDetNtfBodyList = await WorkListApiClient()
.getBasicDetNtfBodyList(workListData!.nOTIFICATIONID);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
Utils.hideLoading(context); Utils.hideLoading(context);
@ -825,7 +915,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
getAbsenceCollectionNotificationBodyList!.clear(); getAbsenceCollectionNotificationBodyList!.clear();
getAbsenceCollectionNotificationBodyList = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID); getAbsenceCollectionNotificationBodyList = await WorkListApiClient()
.getAbsenceNotificationBody(workListData!.nOTIFICATIONID);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
Utils.hideLoading(context); Utils.hideLoading(context);
@ -842,7 +933,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try { try {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
getContactNotificationBodyList = await WorkListApiClient().getContactNotificationBodyList(workListData!.nOTIFICATIONID); getContactNotificationBodyList = await WorkListApiClient()
.getContactNotificationBodyList(workListData!.nOTIFICATIONID);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
Utils.hideLoading(context); Utils.hideLoading(context);
@ -859,7 +951,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try { try {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
getAddressNotificationBodyList = await WorkListApiClient().getAddressNotificationBodyList(workListData!.nOTIFICATIONID); getAddressNotificationBodyList = await WorkListApiClient()
.getAddressNotificationBodyList(workListData!.nOTIFICATIONID);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
Utils.hideLoading(context); Utils.hideLoading(context);
@ -871,15 +964,15 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
Utils.handleException(ex, context, null); Utils.handleException(ex, context, null);
} }
} }
void getTerminationNotificationBody() async { void getTerminationNotificationBody() async {
try { try {
if (apiCallCount == 0) if (apiCallCount == 0) apiCallCount++;
apiCallCount++; getTerminationNotificationBodyList = await WorkListApiClient()
getTerminationNotificationBodyList = await WorkListApiClient().getTerminationNotificationBodyList(workListData!.nOTIFICATIONID); .getTerminationNotificationBodyList(workListData!.nOTIFICATIONID);
Utils.hideLoading(context); Utils.hideLoading(context);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
setState(() {}); setState(() {});
} }
} catch (ex) { } catch (ex) {
@ -889,16 +982,16 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
} }
} }
void getStampNotificationBody() async { void getStampNotificationBody() async {
try { try {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
if (workListData!.rEQUESTTYPE == "STAMP_MS") { if (workListData!.rEQUESTTYPE == "STAMP_MS") {
getStampMsNotifications = await WorkListApiClient().getStampMsNotificationBody(workListData!.nOTIFICATIONID!, -999); getStampMsNotifications = await WorkListApiClient()
.getStampMsNotificationBody(workListData!.nOTIFICATIONID!, -999);
} else { } else {
getStampNsNotifications = await WorkListApiClient().getStampNsNotificationBody(workListData!.nOTIFICATIONID!, -999); getStampNsNotifications = await WorkListApiClient()
.getStampNsNotificationBody(workListData!.nOTIFICATIONID!, -999);
} }
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
@ -916,7 +1009,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try { try {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
getMoNotificationBodyList = await WorkListApiClient().getMoNotificationBody(workListData!.nOTIFICATIONID!, -999); getMoNotificationBodyList = await WorkListApiClient()
.getMoNotificationBody(workListData!.nOTIFICATIONID!, -999);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
Utils.hideLoading(context); Utils.hideLoading(context);
@ -933,7 +1027,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try { try {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
getItemCreationNtfBody = await WorkListApiClient().getItemCreationNtfBody(workListData!.nOTIFICATIONID!, -999); getItemCreationNtfBody = await WorkListApiClient()
.getItemCreationNtfBody(workListData!.nOTIFICATIONID!, -999);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
Utils.hideLoading(context); Utils.hideLoading(context);
@ -950,7 +1045,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try { try {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
getPoNotificationBody = await WorkListApiClient().getPoNotificationBody(workListData!.nOTIFICATIONID!, -999); getPoNotificationBody = await WorkListApiClient()
.getPoNotificationBody(workListData!.nOTIFICATIONID!, -999);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
Utils.hideLoading(context); Utils.hideLoading(context);
@ -967,7 +1063,26 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try { try {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
getPrNotificationBody = await WorkListApiClient().getPRNotificationBody(workListData!.nOTIFICATIONID!, -999); getPrNotificationBody = await WorkListApiClient()
.getPRNotificationBody(workListData!.nOTIFICATIONID!, -999);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
setState(() {});
}
} catch (ex) {
apiCallCount--;
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
void getPaymentNotification() async {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getPaymentNotificationBodyList = await WorkListApiClient()
.getPaymentNotificationBody(workListData!.nOTIFICATIONID!, -999);
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {
Utils.hideLoading(context); Utils.hideLoading(context);
@ -985,7 +1100,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
getNotificationRespondAttributes.clear(); getNotificationRespondAttributes.clear();
getNotificationRespondAttributes = await WorkListApiClient().notificationGetRespondAttributes(workListData!.nOTIFICATIONID!); getNotificationRespondAttributes = await WorkListApiClient()
.notificationGetRespondAttributes(workListData!.nOTIFICATIONID!);
if (getNotificationRespondAttributes.isNotEmpty) { if (getNotificationRespondAttributes.isNotEmpty) {
notificationNoteInput = getNotificationRespondAttributes.first; notificationNoteInput = getNotificationRespondAttributes.first;
} }
@ -1006,18 +1122,25 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context); if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; apiCallCount++;
notificationButtonsList.clear(); notificationButtonsList.clear();
notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!); notificationButtonsList = await WorkListApiClient()
.getNotificationButtons(workListData!.nOTIFICATIONID!);
if (notificationButtonsList.isNotEmpty) { if (notificationButtonsList.isNotEmpty) {
isCloseAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "CLOSE"); isCloseAvailable = notificationButtonsList.any(
isApproveAvailable = notificationButtonsList.any((GetNotificationButtonsList element) { (GetNotificationButtonsList element) =>
if (element.bUTTONACTION == "APPROVED" || element.bUTTONACTION == "APPROVE") { element.bUTTONACTION == "CLOSE");
isApproveAvailable =
notificationButtonsList.any((GetNotificationButtonsList element) {
if (element.bUTTONACTION == "APPROVED" ||
element.bUTTONACTION == "APPROVE") {
approveAction = element.bUTTONACTION!; approveAction = element.bUTTONACTION!;
return true; return true;
} }
return false; return false;
}); });
isRejectAvailable = notificationButtonsList.any((GetNotificationButtonsList element) { isRejectAvailable =
if (element.bUTTONACTION == "REJECTED" || element.bUTTONACTION == "REJECT") { notificationButtonsList.any((GetNotificationButtonsList element) {
if (element.bUTTONACTION == "REJECTED" ||
element.bUTTONACTION == "REJECT") {
rejectAction = element.bUTTONACTION!; rejectAction = element.bUTTONACTION!;
return true; return true;
} }
@ -1040,7 +1163,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try { try {
isActionHistoryLoaded = false; isActionHistoryLoaded = false;
actionHistoryList.clear(); actionHistoryList.clear();
actionHistoryList = await WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!); actionHistoryList = await WorkListApiClient()
.getActionHistory(workListData!.nOTIFICATIONID!);
setState(() { setState(() {
isActionHistoryLoaded = true; isActionHistoryLoaded = true;
}); });
@ -1053,7 +1177,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try { try {
isAttachmentLoaded = false; isAttachmentLoaded = false;
getAttachmentList.clear(); getAttachmentList.clear();
getAttachmentList = await WorkListApiClient().getAttachments(workListData!.nOTIFICATIONID!); getAttachmentList = await WorkListApiClient()
.getAttachments(workListData!.nOTIFICATIONID!);
setState(() { setState(() {
isAttachmentLoaded = true; isAttachmentLoaded = true;
}); });

@ -167,7 +167,7 @@ class ActionsFragment extends StatelessWidget {
Duration duration = DateTime.now().difference(dateTimeFrom); Duration duration = DateTime.now().difference(dateTimeFrom);
return "Action duration: " + DateUtil.formatDuration(duration); return "Action duration: " + DateUtil.formatDuration(duration);
} else { } else {
if (actionHistoryList[index + 1].nOTIFICATIONDATE!.isEmpty) { if (actionHistoryList[index].nOTIFICATIONDATE!.isEmpty) {
return ""; return "";
} else { } else {
DateTime dateTimeTo = DateUtil.convertSimpleStringDateToDate(actionHistoryList[index].nOTIFICATIONDATE!); DateTime dateTimeTo = DateUtil.convertSimpleStringDateToDate(actionHistoryList[index].nOTIFICATIONDATE!);

File diff suppressed because it is too large Load Diff

@ -1,13 +1,15 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart';
void showMyBottomSheet(BuildContext context, {required Widget child, required VoidCallback callBackFunc}) { void showMyBottomSheet(BuildContext context, {required Widget child, required VoidCallback callBackFunc, String? type}) {
showModalBottomSheet<String>( showModalBottomSheet<String>(
context: context, context: context,
isScrollControlled: true, isScrollControlled: true,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
builder: (BuildContext context) { builder: (BuildContext context) {
return Container( return Container(
constraints: BoxConstraints(
maxHeight: type =='CONTINUE_ACTION' ? MediaQuery.of(context).size.height *.75 : double.infinity,),
decoration: const BoxDecoration( decoration: const BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@ -17,7 +19,7 @@ void showMyBottomSheet(BuildContext context, {required Widget child, required Vo
), ),
padding: MediaQuery.of(context).viewInsets, padding: MediaQuery.of(context).viewInsets,
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
child: Column( child:SingleChildScrollView(child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
@ -35,7 +37,7 @@ void showMyBottomSheet(BuildContext context, {required Widget child, required Vo
8.height, 8.height,
child, child,
], ],
), )),
); );
}, },
).then((value) { ).then((value) {

Loading…
Cancel
Save