Merge branch 'master' into development_mirza
# Conflicts: # assets/langs/ar-SA.json # assets/langs/en-US.json # lib/config/routes.dart # lib/generated/locale_keys.g.dart # lib/ui/landing/dashboard_screen.dart # lib/ui/login/login_screen.dart # lib/ui/login/verify_last_login_screen.dartmerge-requests/1/merge
						commit
						3fce58b379
					
				| @ -0,0 +1,41 @@ | ||||
| import 'dart:async'; | ||||
| 
 | ||||
| import 'package:mohem_flutter_app/app_state/app_state.dart'; | ||||
| import 'package:mohem_flutter_app/classes/consts.dart'; | ||||
| import 'package:mohem_flutter_app/models/basic_member_information_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/check_mobile_app_version_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/generic_response_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_eit_transaction_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_mobile_login_info_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/member_login_list_model.dart'; | ||||
| 
 | ||||
| import 'api_client.dart'; | ||||
| 
 | ||||
| class MyAttendanceApiClient { | ||||
|   static final MyAttendanceApiClient _instance = MyAttendanceApiClient._internal(); | ||||
| 
 | ||||
|   MyAttendanceApiClient._internal(); | ||||
| 
 | ||||
|   factory MyAttendanceApiClient() => _instance; | ||||
| 
 | ||||
|   Future<List<GetEITTransactionList>?> getEitTransaction(String pFunctionName) async { | ||||
|     String url = "${ApiConsts.erpRest}GET_EIT_TRANSACTIONS"; | ||||
|     Map<String, dynamic> postParams = {"P_PAGE_LIMIT": 50, "P_PAGE_NUM": 1, "P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E", "P_FUNCTION_NAME": pFunctionName}; | ||||
|     postParams.addAll(AppState().postParamsJson); | ||||
|     return await ApiClient().postJsonForObject((json) { | ||||
|       GenericResponseModel? responseData = GenericResponseModel.fromJson(json); | ||||
|       return responseData.getEITTransactionList ?? []; | ||||
|     }, url, postParams); | ||||
|   } | ||||
| 
 | ||||
|   Future<List<GetEITDFFStructureList>?> getEitDffStructure(String pFunctionName) async { | ||||
|     String url = "${ApiConsts.erpRest}GET_EIT_DFF_STRUCTURE"; | ||||
|     Map<String, dynamic> postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E", "P_FUNCTION_NAME": pFunctionName}; | ||||
|     postParams.addAll(AppState().postParamsJson); | ||||
|     return await ApiClient().postJsonForObject((json) { | ||||
|       GenericResponseModel? responseData = GenericResponseModel.fromJson(json); | ||||
|       return responseData.getEITDFFStructureList ?? []; | ||||
|     }, url, postParams); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,72 @@ | ||||
| class GetAttachementList { | ||||
|   int? aTTACHEDDOCUMENTID; | ||||
|   int? cATEGORYID; | ||||
|   int? dATATYPEID; | ||||
|   int? dOCUMENTID; | ||||
|   String? eNTITYNAME; | ||||
|   String? fILECONTENTTYPE; | ||||
|   String? fILEDATA; | ||||
|   int? fILEID; | ||||
|   String? fILENAME; | ||||
|   String? pK1VALUE; | ||||
|   String? pK2VALUE; | ||||
|   String? pK3VALUE; | ||||
|   String? pK4VALUE; | ||||
|   String? pK5VALUE; | ||||
|   int? sEQNUM; | ||||
| 
 | ||||
|   GetAttachementList( | ||||
|       {this.aTTACHEDDOCUMENTID, | ||||
|         this.cATEGORYID, | ||||
|         this.dATATYPEID, | ||||
|         this.dOCUMENTID, | ||||
|         this.eNTITYNAME, | ||||
|         this.fILECONTENTTYPE, | ||||
|         this.fILEDATA, | ||||
|         this.fILEID, | ||||
|         this.fILENAME, | ||||
|         this.pK1VALUE, | ||||
|         this.pK2VALUE, | ||||
|         this.pK3VALUE, | ||||
|         this.pK4VALUE, | ||||
|         this.pK5VALUE, | ||||
|         this.sEQNUM}); | ||||
| 
 | ||||
|   GetAttachementList.fromJson(Map<String, dynamic> json) { | ||||
|     aTTACHEDDOCUMENTID = json['ATTACHED_DOCUMENT_ID']; | ||||
|     cATEGORYID = json['CATEGORY_ID']; | ||||
|     dATATYPEID = json['DATATYPE_ID']; | ||||
|     dOCUMENTID = json['DOCUMENT_ID']; | ||||
|     eNTITYNAME = json['ENTITY_NAME']; | ||||
|     fILECONTENTTYPE = json['FILE_CONTENT_TYPE']; | ||||
|     fILEDATA = json['FILE_DATA']; | ||||
|     fILEID = json['FILE_ID']; | ||||
|     fILENAME = json['FILE_NAME']; | ||||
|     pK1VALUE = json['PK1_VALUE']; | ||||
|     pK2VALUE = json['PK2_VALUE']; | ||||
|     pK3VALUE = json['PK3_VALUE']; | ||||
|     pK4VALUE = json['PK4_VALUE']; | ||||
|     pK5VALUE = json['PK5_VALUE']; | ||||
|     sEQNUM = json['SEQ_NUM']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['ATTACHED_DOCUMENT_ID'] = this.aTTACHEDDOCUMENTID; | ||||
|     data['CATEGORY_ID'] = this.cATEGORYID; | ||||
|     data['DATATYPE_ID'] = this.dATATYPEID; | ||||
|     data['DOCUMENT_ID'] = this.dOCUMENTID; | ||||
|     data['ENTITY_NAME'] = this.eNTITYNAME; | ||||
|     data['FILE_CONTENT_TYPE'] = this.fILECONTENTTYPE; | ||||
|     data['FILE_DATA'] = this.fILEDATA; | ||||
|     data['FILE_ID'] = this.fILEID; | ||||
|     data['FILE_NAME'] = this.fILENAME; | ||||
|     data['PK1_VALUE'] = this.pK1VALUE; | ||||
|     data['PK2_VALUE'] = this.pK2VALUE; | ||||
|     data['PK3_VALUE'] = this.pK3VALUE; | ||||
|     data['PK4_VALUE'] = this.pK4VALUE; | ||||
|     data['PK5_VALUE'] = this.pK5VALUE; | ||||
|     data['SEQ_NUM'] = this.sEQNUM; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,235 @@ | ||||
| class GetEITDFFStructureList { | ||||
|   String? aLPHANUMERICALLOWEDFLAG; | ||||
|   String? aPPLICATIONCOLUMNNAME; | ||||
|   String? cHILDSEGMENTSDV; | ||||
|   List<String>? cHILDSEGMENTSDVSplited; | ||||
|   String? cHILDSEGMENTSVS; | ||||
|   String? cHILDSEGMENTSVSSplited; | ||||
|   String? dEFAULTTYPE; | ||||
|   String? dEFAULTVALUE; | ||||
|   String? dESCFLEXCONTEXTCODE; | ||||
|   String? dESCFLEXCONTEXTNAME; | ||||
|   String? dESCFLEXNAME; | ||||
|   String? dISPLAYFLAG; | ||||
|   String? eNABLEDFLAG; | ||||
|   ESERVICESDV? eSERVICESDV; | ||||
|   List<String>? eSERVICESVS; | ||||
|   String? fLEXVALUESETNAME; | ||||
|   String? fORMATTYPE; | ||||
|   String? fORMATTYPEDSP; | ||||
|   bool? isEmptyOption; | ||||
|   String? lONGLISTFLAG; | ||||
|   int? mAXIMUMSIZE; | ||||
|   String? mAXIMUMVALUE; | ||||
|   String? mINIMUMVALUE; | ||||
|   String? mOBILEENABLED; | ||||
|   String? nUMBERPRECISION; | ||||
|   String? nUMERICMODEENABLEDFLAG; | ||||
|   String? pARENTSEGMENTSDV; | ||||
|   List<PARENTSEGMENTSDVSplited>? pARENTSEGMENTSDVSplited; | ||||
|   String? pARENTSEGMENTSVS; | ||||
|   List<String>? pARENTSEGMENTSVSSplitedVS; | ||||
|   String? rEADONLY; | ||||
|   String? rEQUIREDFLAG; | ||||
|   String? sEGMENTNAME; | ||||
|   String? sEGMENTPROMPT; | ||||
|   int? sEGMENTSEQNUM; | ||||
|   String? uPPERCASEONLYFLAG; | ||||
|   String? uSEDFLAG; | ||||
|   String? vALIDATIONTYPE; | ||||
|   String? vALIDATIONTYPEDSP; | ||||
| 
 | ||||
|   GetEITDFFStructureList( | ||||
|       {this.aLPHANUMERICALLOWEDFLAG, | ||||
|       this.aPPLICATIONCOLUMNNAME, | ||||
|       this.cHILDSEGMENTSDV, | ||||
|       this.cHILDSEGMENTSDVSplited, | ||||
|       this.cHILDSEGMENTSVS, | ||||
|       this.cHILDSEGMENTSVSSplited, | ||||
|       this.dEFAULTTYPE, | ||||
|       this.dEFAULTVALUE, | ||||
|       this.dESCFLEXCONTEXTCODE, | ||||
|       this.dESCFLEXCONTEXTNAME, | ||||
|       this.dESCFLEXNAME, | ||||
|       this.dISPLAYFLAG, | ||||
|       this.eNABLEDFLAG, | ||||
|       this.eSERVICESDV, | ||||
|       this.eSERVICESVS, | ||||
|       this.fLEXVALUESETNAME, | ||||
|       this.fORMATTYPE, | ||||
|       this.fORMATTYPEDSP, | ||||
|       this.isEmptyOption, | ||||
|       this.lONGLISTFLAG, | ||||
|       this.mAXIMUMSIZE, | ||||
|       this.mAXIMUMVALUE, | ||||
|       this.mINIMUMVALUE, | ||||
|       this.mOBILEENABLED, | ||||
|       this.nUMBERPRECISION, | ||||
|       this.nUMERICMODEENABLEDFLAG, | ||||
|       this.pARENTSEGMENTSDV, | ||||
|       this.pARENTSEGMENTSDVSplited, | ||||
|       this.pARENTSEGMENTSVS, | ||||
|       this.pARENTSEGMENTSVSSplitedVS, | ||||
|       this.rEADONLY, | ||||
|       this.rEQUIREDFLAG, | ||||
|       this.sEGMENTNAME, | ||||
|       this.sEGMENTPROMPT, | ||||
|       this.sEGMENTSEQNUM, | ||||
|       this.uPPERCASEONLYFLAG, | ||||
|       this.uSEDFLAG, | ||||
|       this.vALIDATIONTYPE, | ||||
|       this.vALIDATIONTYPEDSP}); | ||||
| 
 | ||||
|   GetEITDFFStructureList.fromJson(Map<String, dynamic> json) { | ||||
|     aLPHANUMERICALLOWEDFLAG = json['ALPHANUMERIC_ALLOWED_FLAG']; | ||||
|     aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME']; | ||||
|     cHILDSEGMENTSDV = json['CHILD_SEGMENTS_DV']; | ||||
|     cHILDSEGMENTSDVSplited = json['CHILD_SEGMENTS_DV_Splited'] == null ? <String>[] : json['CHILD_SEGMENTS_DV_Splited'].cast<String>(); | ||||
|     cHILDSEGMENTSVS = json['CHILD_SEGMENTS_VS']; | ||||
|     cHILDSEGMENTSVSSplited = json['CHILD_SEGMENTS_VS_Splited']; | ||||
|     dEFAULTTYPE = json['DEFAULT_TYPE']; | ||||
|     dEFAULTVALUE = json['DEFAULT_VALUE']; | ||||
|     dESCFLEXCONTEXTCODE = json['DESC_FLEX_CONTEXT_CODE']; | ||||
|     dESCFLEXCONTEXTNAME = json['DESC_FLEX_CONTEXT_NAME']; | ||||
|     dESCFLEXNAME = json['DESC_FLEX_NAME']; | ||||
|     dISPLAYFLAG = json['DISPLAY_FLAG']; | ||||
|     eNABLEDFLAG = json['ENABLED_FLAG']; | ||||
|     eSERVICESDV = json['E_SERVICES_DV'] != null ? new ESERVICESDV.fromJson(json['E_SERVICES_DV']) : null; | ||||
|     if (json['E_SERVICES_VS'] != null) { | ||||
|       eSERVICESVS = <String>[]; | ||||
|       json['E_SERVICES_VS'].forEach((v) { | ||||
|         eSERVICESVS!.add(v); | ||||
|       }); | ||||
|     } | ||||
|     fLEXVALUESETNAME = json['FLEX_VALUE_SET_NAME']; | ||||
|     fORMATTYPE = json['FORMAT_TYPE']; | ||||
|     fORMATTYPEDSP = json['FORMAT_TYPE_DSP']; | ||||
|     isEmptyOption = json['IsEmptyOption']; | ||||
|     lONGLISTFLAG = json['LONGLIST_FLAG']; | ||||
|     mAXIMUMSIZE = json['MAXIMUM_SIZE']; | ||||
|     mAXIMUMVALUE = json['MAXIMUM_VALUE']; | ||||
|     mINIMUMVALUE = json['MINIMUM_VALUE']; | ||||
|     mOBILEENABLED = json['MOBILE_ENABLED']; | ||||
|     nUMBERPRECISION = json['NUMBER_PRECISION']; | ||||
|     nUMERICMODEENABLEDFLAG = json['NUMERIC_MODE_ENABLED_FLAG']; | ||||
|     pARENTSEGMENTSDV = json['PARENT_SEGMENTS_DV']; | ||||
|     if (json['PARENT_SEGMENTS_DV_Splited'] != null) { | ||||
|       pARENTSEGMENTSDVSplited = <PARENTSEGMENTSDVSplited>[]; | ||||
|       json['PARENT_SEGMENTS_DV_Splited'].forEach((v) { | ||||
|         pARENTSEGMENTSDVSplited!.add(new PARENTSEGMENTSDVSplited.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     pARENTSEGMENTSVS = json['PARENT_SEGMENTS_VS']; | ||||
|     if (json['PARENT_SEGMENTS_VS_SplitedVS'] != null) { | ||||
|       pARENTSEGMENTSVSSplitedVS = <String>[]; | ||||
|       json['PARENT_SEGMENTS_VS_SplitedVS'].forEach((v) { | ||||
|         pARENTSEGMENTSVSSplitedVS!.add(v); | ||||
|       }); | ||||
|     } | ||||
|     rEADONLY = json['READ_ONLY']; | ||||
|     rEQUIREDFLAG = json['REQUIRED_FLAG']; | ||||
|     sEGMENTNAME = json['SEGMENT_NAME']; | ||||
|     sEGMENTPROMPT = json['SEGMENT_PROMPT']; | ||||
|     sEGMENTSEQNUM = json['SEGMENT_SEQ_NUM']; | ||||
|     uPPERCASEONLYFLAG = json['UPPERCASE_ONLY_FLAG']; | ||||
|     uSEDFLAG = json['USED_FLAG']; | ||||
|     vALIDATIONTYPE = json['VALIDATION_TYPE']; | ||||
|     vALIDATIONTYPEDSP = json['VALIDATION_TYPE_DSP']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['ALPHANUMERIC_ALLOWED_FLAG'] = this.aLPHANUMERICALLOWEDFLAG; | ||||
|     data['APPLICATION_COLUMN_NAME'] = this.aPPLICATIONCOLUMNNAME; | ||||
|     data['CHILD_SEGMENTS_DV'] = this.cHILDSEGMENTSDV; | ||||
|     data['CHILD_SEGMENTS_DV_Splited'] = this.cHILDSEGMENTSDVSplited; | ||||
|     data['CHILD_SEGMENTS_VS'] = this.cHILDSEGMENTSVS; | ||||
|     data['CHILD_SEGMENTS_VS_Splited'] = this.cHILDSEGMENTSVSSplited; | ||||
|     data['DEFAULT_TYPE'] = this.dEFAULTTYPE; | ||||
|     data['DEFAULT_VALUE'] = this.dEFAULTVALUE; | ||||
|     data['DESC_FLEX_CONTEXT_CODE'] = this.dESCFLEXCONTEXTCODE; | ||||
|     data['DESC_FLEX_CONTEXT_NAME'] = this.dESCFLEXCONTEXTNAME; | ||||
|     data['DESC_FLEX_NAME'] = this.dESCFLEXNAME; | ||||
|     data['DISPLAY_FLAG'] = this.dISPLAYFLAG; | ||||
|     data['ENABLED_FLAG'] = this.eNABLEDFLAG; | ||||
|     if (this.eSERVICESDV != null) { | ||||
|       data['E_SERVICES_DV'] = this.eSERVICESDV!.toJson(); | ||||
|     } | ||||
|     if (this.eSERVICESVS != null) { | ||||
|       data['E_SERVICES_VS'] = this.eSERVICESVS!.toList(); | ||||
|     } | ||||
|     data['FLEX_VALUE_SET_NAME'] = this.fLEXVALUESETNAME; | ||||
|     data['FORMAT_TYPE'] = this.fORMATTYPE; | ||||
|     data['FORMAT_TYPE_DSP'] = this.fORMATTYPEDSP; | ||||
|     data['IsEmptyOption'] = this.isEmptyOption; | ||||
|     data['LONGLIST_FLAG'] = this.lONGLISTFLAG; | ||||
|     data['MAXIMUM_SIZE'] = this.mAXIMUMSIZE; | ||||
|     data['MAXIMUM_VALUE'] = this.mAXIMUMVALUE; | ||||
|     data['MINIMUM_VALUE'] = this.mINIMUMVALUE; | ||||
|     data['MOBILE_ENABLED'] = this.mOBILEENABLED; | ||||
|     data['NUMBER_PRECISION'] = this.nUMBERPRECISION; | ||||
|     data['NUMERIC_MODE_ENABLED_FLAG'] = this.nUMERICMODEENABLEDFLAG; | ||||
|     data['PARENT_SEGMENTS_DV'] = this.pARENTSEGMENTSDV; | ||||
|     if (this.pARENTSEGMENTSDVSplited != null) { | ||||
|       data['PARENT_SEGMENTS_DV_Splited'] = this.pARENTSEGMENTSDVSplited!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     data['PARENT_SEGMENTS_VS'] = this.pARENTSEGMENTSVS; | ||||
|     if (this.pARENTSEGMENTSVSSplitedVS != null) { | ||||
|       data['PARENT_SEGMENTS_VS_SplitedVS'] = this.pARENTSEGMENTSVSSplitedVS!.toList(); | ||||
|     } | ||||
|     data['READ_ONLY'] = this.rEADONLY; | ||||
|     data['REQUIRED_FLAG'] = this.rEQUIREDFLAG; | ||||
|     data['SEGMENT_NAME'] = this.sEGMENTNAME; | ||||
|     data['SEGMENT_PROMPT'] = this.sEGMENTPROMPT; | ||||
|     data['SEGMENT_SEQ_NUM'] = this.sEGMENTSEQNUM; | ||||
|     data['UPPERCASE_ONLY_FLAG'] = this.uPPERCASEONLYFLAG; | ||||
|     data['USED_FLAG'] = this.uSEDFLAG; | ||||
|     data['VALIDATION_TYPE'] = this.vALIDATIONTYPE; | ||||
|     data['VALIDATION_TYPE_DSP'] = this.vALIDATIONTYPEDSP; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class ESERVICESDV { | ||||
|   String? pIDCOLUMNNAME; | ||||
|   String? pRETURNMSG; | ||||
|   String? pRETURNSTATUS; | ||||
|   String? pVALUECOLUMNNAME; | ||||
| 
 | ||||
|   ESERVICESDV({this.pIDCOLUMNNAME, this.pRETURNMSG, this.pRETURNSTATUS, this.pVALUECOLUMNNAME}); | ||||
| 
 | ||||
|   ESERVICESDV.fromJson(Map<String, dynamic> json) { | ||||
|     pIDCOLUMNNAME = json['P_ID_COLUMN_NAME']; | ||||
|     pRETURNMSG = json['P_RETURN_MSG']; | ||||
|     pRETURNSTATUS = json['P_RETURN_STATUS']; | ||||
|     pVALUECOLUMNNAME = json['P_VALUE_COLUMN_NAME']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['P_ID_COLUMN_NAME'] = this.pIDCOLUMNNAME; | ||||
|     data['P_RETURN_MSG'] = this.pRETURNMSG; | ||||
|     data['P_RETURN_STATUS'] = this.pRETURNSTATUS; | ||||
|     data['P_VALUE_COLUMN_NAME'] = this.pVALUECOLUMNNAME; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class PARENTSEGMENTSDVSplited { | ||||
|   String? isRequired; | ||||
|   String? name; | ||||
| 
 | ||||
|   PARENTSEGMENTSDVSplited({this.isRequired, this.name}); | ||||
| 
 | ||||
|   PARENTSEGMENTSDVSplited.fromJson(Map<String, dynamic> json) { | ||||
|     isRequired = json['IsRequired']; | ||||
|     name = json['Name']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['IsRequired'] = this.isRequired; | ||||
|     data['Name'] = this.name; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,104 @@ | ||||
| class GetEITTransactionList { | ||||
|   List<CollectionTransaction>? collectionTransaction; | ||||
| 
 | ||||
|   GetEITTransactionList({this.collectionTransaction}); | ||||
| 
 | ||||
|   GetEITTransactionList.fromJson(Map<String, dynamic> json) { | ||||
|     if (json['Collection_Transaction'] != null) { | ||||
|       collectionTransaction = <CollectionTransaction>[]; | ||||
|       json['Collection_Transaction'].forEach((v) { | ||||
|         collectionTransaction!.add(new CollectionTransaction.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     if (this.collectionTransaction != null) { | ||||
|       data['Collection_Transaction'] = | ||||
|           this.collectionTransaction!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class CollectionTransaction { | ||||
|   String? aPPLICATIONCOLUMNNAME; | ||||
|   String? dATATYPE; | ||||
|   String? dATEVALUE; | ||||
|   String? dESCFLEXCONTEXTCODE; | ||||
|   String? dESCFLEXNAME; | ||||
|   String? dISPLAYFLAG; | ||||
|   int? fROMROWNUM; | ||||
|   int? nOOFROWS; | ||||
|   int? nUMBERVALUE; | ||||
|   int? rOWNUM; | ||||
|   String? sEGMENTNAME; | ||||
|   String? sEGMENTPROMPT; | ||||
|   int? sEGMENTSEQNUM; | ||||
|   String? sEGMENTVALUEDSP; | ||||
|   int? tOROWNUM; | ||||
|   int? tRANSACTIONNUMBER; | ||||
|   String? vARCHAR2VALUE; | ||||
| 
 | ||||
|   CollectionTransaction( | ||||
|       {this.aPPLICATIONCOLUMNNAME, | ||||
|         this.dATATYPE, | ||||
|         this.dATEVALUE, | ||||
|         this.dESCFLEXCONTEXTCODE, | ||||
|         this.dESCFLEXNAME, | ||||
|         this.dISPLAYFLAG, | ||||
|         this.fROMROWNUM, | ||||
|         this.nOOFROWS, | ||||
|         this.nUMBERVALUE, | ||||
|         this.rOWNUM, | ||||
|         this.sEGMENTNAME, | ||||
|         this.sEGMENTPROMPT, | ||||
|         this.sEGMENTSEQNUM, | ||||
|         this.sEGMENTVALUEDSP, | ||||
|         this.tOROWNUM, | ||||
|         this.tRANSACTIONNUMBER, | ||||
|         this.vARCHAR2VALUE}); | ||||
| 
 | ||||
|   CollectionTransaction.fromJson(Map<String, dynamic> json) { | ||||
|     aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME']; | ||||
|     dATATYPE = json['DATATYPE']; | ||||
|     dATEVALUE = json['DATE_VALUE']; | ||||
|     dESCFLEXCONTEXTCODE = json['DESC_FLEX_CONTEXT_CODE']; | ||||
|     dESCFLEXNAME = json['DESC_FLEX_NAME']; | ||||
|     dISPLAYFLAG = json['DISPLAY_FLAG']; | ||||
|     fROMROWNUM = json['FROM_ROW_NUM']; | ||||
|     nOOFROWS = json['NO_OF_ROWS']; | ||||
|     nUMBERVALUE = json['NUMBER_VALUE']; | ||||
|     rOWNUM = json['ROW_NUM']; | ||||
|     sEGMENTNAME = json['SEGMENT_NAME']; | ||||
|     sEGMENTPROMPT = json['SEGMENT_PROMPT']; | ||||
|     sEGMENTSEQNUM = json['SEGMENT_SEQ_NUM']; | ||||
|     sEGMENTVALUEDSP = json['SEGMENT_VALUE_DSP']; | ||||
|     tOROWNUM = json['TO_ROW_NUM']; | ||||
|     tRANSACTIONNUMBER = json['TRANSACTION_NUMBER']; | ||||
|     vARCHAR2VALUE = json['VARCHAR2_VALUE']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['APPLICATION_COLUMN_NAME'] = this.aPPLICATIONCOLUMNNAME; | ||||
|     data['DATATYPE'] = this.dATATYPE; | ||||
|     data['DATE_VALUE'] = this.dATEVALUE; | ||||
|     data['DESC_FLEX_CONTEXT_CODE'] = this.dESCFLEXCONTEXTCODE; | ||||
|     data['DESC_FLEX_NAME'] = this.dESCFLEXNAME; | ||||
|     data['DISPLAY_FLAG'] = this.dISPLAYFLAG; | ||||
|     data['FROM_ROW_NUM'] = this.fROMROWNUM; | ||||
|     data['NO_OF_ROWS'] = this.nOOFROWS; | ||||
|     data['NUMBER_VALUE'] = this.nUMBERVALUE; | ||||
|     data['ROW_NUM'] = this.rOWNUM; | ||||
|     data['SEGMENT_NAME'] = this.sEGMENTNAME; | ||||
|     data['SEGMENT_PROMPT'] = this.sEGMENTPROMPT; | ||||
|     data['SEGMENT_SEQ_NUM'] = this.sEGMENTSEQNUM; | ||||
|     data['SEGMENT_VALUE_DSP'] = this.sEGMENTVALUEDSP; | ||||
|     data['TO_ROW_NUM'] = this.tOROWNUM; | ||||
|     data['TRANSACTION_NUMBER'] = this.tRANSACTIONNUMBER; | ||||
|     data['VARCHAR2_VALUE'] = this.vARCHAR2VALUE; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,292 @@ | ||||
| class GetItemCreationNtfBodyList { | ||||
|   List<ItemCreationHeader>? itemCreationHeader; | ||||
|   List<ItemCreationLines>? itemCreationLines; | ||||
|   String? pINFORMATION; | ||||
|   String? pQUESTION; | ||||
| 
 | ||||
|   GetItemCreationNtfBodyList({this.itemCreationHeader, this.itemCreationLines, this.pINFORMATION, this.pQUESTION}); | ||||
| 
 | ||||
|   GetItemCreationNtfBodyList.fromJson(Map<String, dynamic> json) { | ||||
|     if (json['ItemCreationHeader'] != null) { | ||||
|       itemCreationHeader = <ItemCreationHeader>[]; | ||||
|       json['ItemCreationHeader'].forEach((v) { | ||||
|         itemCreationHeader!.add(new ItemCreationHeader.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     if (json['ItemCreationLines'] != null) { | ||||
|       itemCreationLines = <ItemCreationLines>[]; | ||||
|       json['ItemCreationLines'].forEach((v) { | ||||
|         itemCreationLines!.add(new ItemCreationLines.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     pINFORMATION = json['P_INFORMATION']; | ||||
|     pQUESTION = json['P_QUESTION']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     if (this.itemCreationHeader != null) { | ||||
|       data['ItemCreationHeader'] = this.itemCreationHeader!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     if (this.itemCreationLines != null) { | ||||
|       data['ItemCreationLines'] = this.itemCreationLines!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     data['P_INFORMATION'] = this.pINFORMATION; | ||||
|     data['P_QUESTION'] = this.pQUESTION; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class ItemCreationHeader { | ||||
|   String? aNALYZEDBY; | ||||
|   int? aNALYZEDBYID; | ||||
|   String? aNALYZEDDATE; | ||||
|   String? aPPROVEDDATE; | ||||
|   String? cATEGORY; | ||||
|   int? cATEGORYID; | ||||
|   String? iTEMTYPE; | ||||
|   String? oPERATINGUNIT; | ||||
|   int? oRGID; | ||||
|   int? rELATEDID; | ||||
|   String? rELATEDTO; | ||||
|   String? rEQUESTER; | ||||
|   int? rEQUESTERID; | ||||
|   String? rEQUESTDATE; | ||||
|   String? sTATUS; | ||||
|   int? tRANSACTIONHEADERID; | ||||
|   String? uRGENTFLAG; | ||||
|   String? uRGENTFLAGDISP; | ||||
|   String? wFITEMKEYANALYSIS; | ||||
|   String? wFITEMKEYAPPROVAL; | ||||
|   String? wFITEMTYPE; | ||||
| 
 | ||||
|   ItemCreationHeader( | ||||
|       {this.aNALYZEDBY, | ||||
|       this.aNALYZEDBYID, | ||||
|       this.aNALYZEDDATE, | ||||
|       this.aPPROVEDDATE, | ||||
|       this.cATEGORY, | ||||
|       this.cATEGORYID, | ||||
|       this.iTEMTYPE, | ||||
|       this.oPERATINGUNIT, | ||||
|       this.oRGID, | ||||
|       this.rELATEDID, | ||||
|       this.rELATEDTO, | ||||
|       this.rEQUESTER, | ||||
|       this.rEQUESTERID, | ||||
|       this.rEQUESTDATE, | ||||
|       this.sTATUS, | ||||
|       this.tRANSACTIONHEADERID, | ||||
|       this.uRGENTFLAG, | ||||
|       this.uRGENTFLAGDISP, | ||||
|       this.wFITEMKEYANALYSIS, | ||||
|       this.wFITEMKEYAPPROVAL, | ||||
|       this.wFITEMTYPE}); | ||||
| 
 | ||||
|   ItemCreationHeader.fromJson(Map<String, dynamic> json) { | ||||
|     aNALYZEDBY = json['ANALYZED_BY']; | ||||
|     aNALYZEDBYID = json['ANALYZED_BY_ID']; | ||||
|     aNALYZEDDATE = json['ANALYZED_DATE']; | ||||
|     aPPROVEDDATE = json['APPROVED_DATE']; | ||||
|     cATEGORY = json['CATEGORY']; | ||||
|     cATEGORYID = json['CATEGORY_ID']; | ||||
|     iTEMTYPE = json['ITEM_TYPE']; | ||||
|     oPERATINGUNIT = json['OPERATING_UNIT']; | ||||
|     oRGID = json['ORG_ID']; | ||||
|     rELATEDID = json['RELATED_ID']; | ||||
|     rELATEDTO = json['RELATED_TO']; | ||||
|     rEQUESTER = json['REQUESTER']; | ||||
|     rEQUESTERID = json['REQUESTER_ID']; | ||||
|     rEQUESTDATE = json['REQUEST_DATE']; | ||||
|     sTATUS = json['STATUS']; | ||||
|     tRANSACTIONHEADERID = json['TRANSACTION_HEADER_ID']; | ||||
|     uRGENTFLAG = json['URGENT_FLAG']; | ||||
|     uRGENTFLAGDISP = json['URGENT_FLAG_DISP']; | ||||
|     wFITEMKEYANALYSIS = json['WF_ITEM_KEY_ANALYSIS']; | ||||
|     wFITEMKEYAPPROVAL = json['WF_ITEM_KEY_APPROVAL']; | ||||
|     wFITEMTYPE = json['WF_ITEM_TYPE']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['ANALYZED_BY'] = this.aNALYZEDBY; | ||||
|     data['ANALYZED_BY_ID'] = this.aNALYZEDBYID; | ||||
|     data['ANALYZED_DATE'] = this.aNALYZEDDATE; | ||||
|     data['APPROVED_DATE'] = this.aPPROVEDDATE; | ||||
|     data['CATEGORY'] = this.cATEGORY; | ||||
|     data['CATEGORY_ID'] = this.cATEGORYID; | ||||
|     data['ITEM_TYPE'] = this.iTEMTYPE; | ||||
|     data['OPERATING_UNIT'] = this.oPERATINGUNIT; | ||||
|     data['ORG_ID'] = this.oRGID; | ||||
|     data['RELATED_ID'] = this.rELATEDID; | ||||
|     data['RELATED_TO'] = this.rELATEDTO; | ||||
|     data['REQUESTER'] = this.rEQUESTER; | ||||
|     data['REQUESTER_ID'] = this.rEQUESTERID; | ||||
|     data['REQUEST_DATE'] = this.rEQUESTDATE; | ||||
|     data['STATUS'] = this.sTATUS; | ||||
|     data['TRANSACTION_HEADER_ID'] = this.tRANSACTIONHEADERID; | ||||
|     data['URGENT_FLAG'] = this.uRGENTFLAG; | ||||
|     data['URGENT_FLAG_DISP'] = this.uRGENTFLAGDISP; | ||||
|     data['WF_ITEM_KEY_ANALYSIS'] = this.wFITEMKEYANALYSIS; | ||||
|     data['WF_ITEM_KEY_APPROVAL'] = this.wFITEMKEYAPPROVAL; | ||||
|     data['WF_ITEM_TYPE'] = this.wFITEMTYPE; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class ItemCreationLines { | ||||
|   String? cHARGETOPATIENT; | ||||
|   int? fROMROWNUM; | ||||
|   int? iNVENTORYITEMID; | ||||
|   String? iTEMCODE; | ||||
|   String? iTEMCREATIONSTATUS; | ||||
|   String? iTEMCREATIONSTATUSDISP; | ||||
|   String? iTEMDESCRIPTION; | ||||
|   String? iTEMGROUP; | ||||
|   String? iTEMGROUPCODE; | ||||
|   String? iTEMSUBGROUP; | ||||
|   String? iTEMSUBGROUPCODE; | ||||
|   String? iTEMTYPE; | ||||
|   String? jUSTIFICATION; | ||||
|   int? lINENUMBER; | ||||
|   int? nOOFROWS; | ||||
|   String? pRIMARYUOM; | ||||
|   String? pRIMARYUOMCODE; | ||||
|   String? pRODUCTDESCRIPTION; | ||||
|   String? pRODUCTNAME; | ||||
|   int? rOWNUM; | ||||
|   String? sTANARDSTATUSDISP; | ||||
|   int? sTANDARDMANUFACTURERID; | ||||
|   String? sTANDARDMANUFACTURERNAME; | ||||
|   String? sTANDARDMFGPARTNUM; | ||||
|   String? sTANDARDREJECTREASON; | ||||
|   String? sTANDARDSTATUS; | ||||
|   String? sUPPLIERCONTACT; | ||||
|   String? sUPPLIERNAME; | ||||
|   int? tEMPLATEID; | ||||
|   String? tEMPLATENAME; | ||||
|   int? tOROWNUM; | ||||
|   int? tRANSACTIONHEADERID; | ||||
|   int? tRANSACTIONLINEID; | ||||
|   int? uNITPRICE; | ||||
|   String? uSERMANUFACTURERNAME; | ||||
|   String? uSERMFGPARTNUM; | ||||
| 
 | ||||
|   ItemCreationLines( | ||||
|       {this.cHARGETOPATIENT, | ||||
|       this.fROMROWNUM, | ||||
|       this.iNVENTORYITEMID, | ||||
|       this.iTEMCODE, | ||||
|       this.iTEMCREATIONSTATUS, | ||||
|       this.iTEMCREATIONSTATUSDISP, | ||||
|       this.iTEMDESCRIPTION, | ||||
|       this.iTEMGROUP, | ||||
|       this.iTEMGROUPCODE, | ||||
|       this.iTEMSUBGROUP, | ||||
|       this.iTEMSUBGROUPCODE, | ||||
|       this.iTEMTYPE, | ||||
|       this.jUSTIFICATION, | ||||
|       this.lINENUMBER, | ||||
|       this.nOOFROWS, | ||||
|       this.pRIMARYUOM, | ||||
|       this.pRIMARYUOMCODE, | ||||
|       this.pRODUCTDESCRIPTION, | ||||
|       this.pRODUCTNAME, | ||||
|       this.rOWNUM, | ||||
|       this.sTANARDSTATUSDISP, | ||||
|       this.sTANDARDMANUFACTURERID, | ||||
|       this.sTANDARDMANUFACTURERNAME, | ||||
|       this.sTANDARDMFGPARTNUM, | ||||
|       this.sTANDARDREJECTREASON, | ||||
|       this.sTANDARDSTATUS, | ||||
|       this.sUPPLIERCONTACT, | ||||
|       this.sUPPLIERNAME, | ||||
|       this.tEMPLATEID, | ||||
|       this.tEMPLATENAME, | ||||
|       this.tOROWNUM, | ||||
|       this.tRANSACTIONHEADERID, | ||||
|       this.tRANSACTIONLINEID, | ||||
|       this.uNITPRICE, | ||||
|       this.uSERMANUFACTURERNAME, | ||||
|       this.uSERMFGPARTNUM}); | ||||
| 
 | ||||
|   ItemCreationLines.fromJson(Map<String, dynamic> json) { | ||||
|     cHARGETOPATIENT = json['CHARGE_TO_PATIENT']; | ||||
|     fROMROWNUM = json['FROM_ROW_NUM']; | ||||
|     iNVENTORYITEMID = json['INVENTORY_ITEM_ID']; | ||||
|     iTEMCODE = json['ITEM_CODE']; | ||||
|     iTEMCREATIONSTATUS = json['ITEM_CREATION_STATUS']; | ||||
|     iTEMCREATIONSTATUSDISP = json['ITEM_CREATION_STATUS_DISP']; | ||||
|     iTEMDESCRIPTION = json['ITEM_DESCRIPTION']; | ||||
|     iTEMGROUP = json['ITEM_GROUP']; | ||||
|     iTEMGROUPCODE = json['ITEM_GROUP_CODE']; | ||||
|     iTEMSUBGROUP = json['ITEM_SUBGROUP']; | ||||
|     iTEMSUBGROUPCODE = json['ITEM_SUBGROUP_CODE']; | ||||
|     iTEMTYPE = json['ITEM_TYPE']; | ||||
|     jUSTIFICATION = json['JUSTIFICATION']; | ||||
|     lINENUMBER = json['LINE_NUMBER']; | ||||
|     nOOFROWS = json['NO_OF_ROWS']; | ||||
|     pRIMARYUOM = json['PRIMARY_UOM']; | ||||
|     pRIMARYUOMCODE = json['PRIMARY_UOM_CODE']; | ||||
|     pRODUCTDESCRIPTION = json['PRODUCT_DESCRIPTION']; | ||||
|     pRODUCTNAME = json['PRODUCT_NAME']; | ||||
|     rOWNUM = json['ROW_NUM']; | ||||
|     sTANARDSTATUSDISP = json['STANARD_STATUS_DISP']; | ||||
|     sTANDARDMANUFACTURERID = json['STANDARD_MANUFACTURER_ID']; | ||||
|     sTANDARDMANUFACTURERNAME = json['STANDARD_MANUFACTURER_NAME']; | ||||
|     sTANDARDMFGPARTNUM = json['STANDARD_MFG_PART_NUM']; | ||||
|     sTANDARDREJECTREASON = json['STANDARD_REJECT_REASON']; | ||||
|     sTANDARDSTATUS = json['STANDARD_STATUS']; | ||||
|     sUPPLIERCONTACT = json['SUPPLIER_CONTACT']; | ||||
|     sUPPLIERNAME = json['SUPPLIER_NAME']; | ||||
|     tEMPLATEID = json['TEMPLATE_ID']; | ||||
|     tEMPLATENAME = json['TEMPLATE_NAME']; | ||||
|     tOROWNUM = json['TO_ROW_NUM']; | ||||
|     tRANSACTIONHEADERID = json['TRANSACTION_HEADER_ID']; | ||||
|     tRANSACTIONLINEID = json['TRANSACTION_LINE_ID']; | ||||
|     uNITPRICE = json['UNIT_PRICE']; | ||||
|     uSERMANUFACTURERNAME = json['USER_MANUFACTURER_NAME']; | ||||
|     uSERMFGPARTNUM = json['USER_MFG_PART_NUM']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['CHARGE_TO_PATIENT'] = this.cHARGETOPATIENT; | ||||
|     data['FROM_ROW_NUM'] = this.fROMROWNUM; | ||||
|     data['INVENTORY_ITEM_ID'] = this.iNVENTORYITEMID; | ||||
|     data['ITEM_CODE'] = this.iTEMCODE; | ||||
|     data['ITEM_CREATION_STATUS'] = this.iTEMCREATIONSTATUS; | ||||
|     data['ITEM_CREATION_STATUS_DISP'] = this.iTEMCREATIONSTATUSDISP; | ||||
|     data['ITEM_DESCRIPTION'] = this.iTEMDESCRIPTION; | ||||
|     data['ITEM_GROUP'] = this.iTEMGROUP; | ||||
|     data['ITEM_GROUP_CODE'] = this.iTEMGROUPCODE; | ||||
|     data['ITEM_SUBGROUP'] = this.iTEMSUBGROUP; | ||||
|     data['ITEM_SUBGROUP_CODE'] = this.iTEMSUBGROUPCODE; | ||||
|     data['ITEM_TYPE'] = this.iTEMTYPE; | ||||
|     data['JUSTIFICATION'] = this.jUSTIFICATION; | ||||
|     data['LINE_NUMBER'] = this.lINENUMBER; | ||||
|     data['NO_OF_ROWS'] = this.nOOFROWS; | ||||
|     data['PRIMARY_UOM'] = this.pRIMARYUOM; | ||||
|     data['PRIMARY_UOM_CODE'] = this.pRIMARYUOMCODE; | ||||
|     data['PRODUCT_DESCRIPTION'] = this.pRODUCTDESCRIPTION; | ||||
|     data['PRODUCT_NAME'] = this.pRODUCTNAME; | ||||
|     data['ROW_NUM'] = this.rOWNUM; | ||||
|     data['STANARD_STATUS_DISP'] = this.sTANARDSTATUSDISP; | ||||
|     data['STANDARD_MANUFACTURER_ID'] = this.sTANDARDMANUFACTURERID; | ||||
|     data['STANDARD_MANUFACTURER_NAME'] = this.sTANDARDMANUFACTURERNAME; | ||||
|     data['STANDARD_MFG_PART_NUM'] = this.sTANDARDMFGPARTNUM; | ||||
|     data['STANDARD_REJECT_REASON'] = this.sTANDARDREJECTREASON; | ||||
|     data['STANDARD_STATUS'] = this.sTANDARDSTATUS; | ||||
|     data['SUPPLIER_CONTACT'] = this.sUPPLIERCONTACT; | ||||
|     data['SUPPLIER_NAME'] = this.sUPPLIERNAME; | ||||
|     data['TEMPLATE_ID'] = this.tEMPLATEID; | ||||
|     data['TEMPLATE_NAME'] = this.tEMPLATENAME; | ||||
|     data['TO_ROW_NUM'] = this.tOROWNUM; | ||||
|     data['TRANSACTION_HEADER_ID'] = this.tRANSACTIONHEADERID; | ||||
|     data['TRANSACTION_LINE_ID'] = this.tRANSACTIONLINEID; | ||||
|     data['UNIT_PRICE'] = this.uNITPRICE; | ||||
|     data['USER_MANUFACTURER_NAME'] = this.uSERMANUFACTURERNAME; | ||||
|     data['USER_MFG_PART_NUM'] = this.uSERMFGPARTNUM; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,100 @@ | ||||
| class GetMoItemHistoryList { | ||||
|   String? dATEREQUIRED; | ||||
|   String? dESCRIPTION; | ||||
|   String? fROMLOCATOR; | ||||
|   int? fROMROWNUM; | ||||
|   String? fROMSUBINVENTORYCODE; | ||||
|   String? iTEMCODE; | ||||
|   String? lINESTATUSDIS; | ||||
|   int? nOOFROWS; | ||||
|   String? oPERATINGUNITNAME; | ||||
|   String? oRGANIZATIONCODE; | ||||
|   int? oRGANIZATIONID; | ||||
|   String? oRGANIZATIONNAME; | ||||
|   int? qUANTITY; | ||||
|   String? rEQUESTNUMBER; | ||||
|   int? rOWNUM; | ||||
|   String? sHIPTOLOCATION; | ||||
|   String? sTATUSDATE; | ||||
|   String? tOLOCATOR; | ||||
|   int? tOROWNUM; | ||||
|   String? tOSUBINVENTORYCODE; | ||||
|   String? tRANSACTIONTYPENAME; | ||||
|   String? uNITOFMEASURE; | ||||
| 
 | ||||
|   GetMoItemHistoryList( | ||||
|       {this.dATEREQUIRED, | ||||
|         this.dESCRIPTION, | ||||
|         this.fROMLOCATOR, | ||||
|         this.fROMROWNUM, | ||||
|         this.fROMSUBINVENTORYCODE, | ||||
|         this.iTEMCODE, | ||||
|         this.lINESTATUSDIS, | ||||
|         this.nOOFROWS, | ||||
|         this.oPERATINGUNITNAME, | ||||
|         this.oRGANIZATIONCODE, | ||||
|         this.oRGANIZATIONID, | ||||
|         this.oRGANIZATIONNAME, | ||||
|         this.qUANTITY, | ||||
|         this.rEQUESTNUMBER, | ||||
|         this.rOWNUM, | ||||
|         this.sHIPTOLOCATION, | ||||
|         this.sTATUSDATE, | ||||
|         this.tOLOCATOR, | ||||
|         this.tOROWNUM, | ||||
|         this.tOSUBINVENTORYCODE, | ||||
|         this.tRANSACTIONTYPENAME, | ||||
|         this.uNITOFMEASURE}); | ||||
| 
 | ||||
|   GetMoItemHistoryList.fromJson(Map<String, dynamic> json) { | ||||
|     dATEREQUIRED = json['DATE_REQUIRED']; | ||||
|     dESCRIPTION = json['DESCRIPTION']; | ||||
|     fROMLOCATOR = json['FROM_LOCATOR']; | ||||
|     fROMROWNUM = json['FROM_ROW_NUM']; | ||||
|     fROMSUBINVENTORYCODE = json['FROM_SUBINVENTORY_CODE']; | ||||
|     iTEMCODE = json['ITEM_CODE']; | ||||
|     lINESTATUSDIS = json['LINE_STATUS_DIS']; | ||||
|     nOOFROWS = json['NO_OF_ROWS']; | ||||
|     oPERATINGUNITNAME = json['OPERATING_UNIT_NAME']; | ||||
|     oRGANIZATIONCODE = json['ORGANIZATION_CODE']; | ||||
|     oRGANIZATIONID = json['ORGANIZATION_ID']; | ||||
|     oRGANIZATIONNAME = json['ORGANIZATION_NAME']; | ||||
|     qUANTITY = json['QUANTITY']; | ||||
|     rEQUESTNUMBER = json['REQUEST_NUMBER']; | ||||
|     rOWNUM = json['ROW_NUM']; | ||||
|     sHIPTOLOCATION = json['SHIP_TO_LOCATION']; | ||||
|     sTATUSDATE = json['STATUS_DATE']; | ||||
|     tOLOCATOR = json['TO_LOCATOR']; | ||||
|     tOROWNUM = json['TO_ROW_NUM']; | ||||
|     tOSUBINVENTORYCODE = json['TO_SUBINVENTORY_CODE']; | ||||
|     tRANSACTIONTYPENAME = json['TRANSACTION_TYPE_NAME']; | ||||
|     uNITOFMEASURE = json['UNIT_OF_MEASURE']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['DATE_REQUIRED'] = this.dATEREQUIRED; | ||||
|     data['DESCRIPTION'] = this.dESCRIPTION; | ||||
|     data['FROM_LOCATOR'] = this.fROMLOCATOR; | ||||
|     data['FROM_ROW_NUM'] = this.fROMROWNUM; | ||||
|     data['FROM_SUBINVENTORY_CODE'] = this.fROMSUBINVENTORYCODE; | ||||
|     data['ITEM_CODE'] = this.iTEMCODE; | ||||
|     data['LINE_STATUS_DIS'] = this.lINESTATUSDIS; | ||||
|     data['NO_OF_ROWS'] = this.nOOFROWS; | ||||
|     data['OPERATING_UNIT_NAME'] = this.oPERATINGUNITNAME; | ||||
|     data['ORGANIZATION_CODE'] = this.oRGANIZATIONCODE; | ||||
|     data['ORGANIZATION_ID'] = this.oRGANIZATIONID; | ||||
|     data['ORGANIZATION_NAME'] = this.oRGANIZATIONNAME; | ||||
|     data['QUANTITY'] = this.qUANTITY; | ||||
|     data['REQUEST_NUMBER'] = this.rEQUESTNUMBER; | ||||
|     data['ROW_NUM'] = this.rOWNUM; | ||||
|     data['SHIP_TO_LOCATION'] = this.sHIPTOLOCATION; | ||||
|     data['STATUS_DATE'] = this.sTATUSDATE; | ||||
|     data['TO_LOCATOR'] = this.tOLOCATOR; | ||||
|     data['TO_ROW_NUM'] = this.tOROWNUM; | ||||
|     data['TO_SUBINVENTORY_CODE'] = this.tOSUBINVENTORYCODE; | ||||
|     data['TRANSACTION_TYPE_NAME'] = this.tRANSACTIONTYPENAME; | ||||
|     data['UNIT_OF_MEASURE'] = this.uNITOFMEASURE; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,92 @@ | ||||
| class GetPoItemHistoryList { | ||||
|   int? bALANCEQUANTITY; | ||||
|   int? bONUSQUANTITY; | ||||
|   String? bUYER; | ||||
|   String? cLOSEDCODE; | ||||
|   String? cREATIONDATE; | ||||
|   int? dISCOUNTPERCENTAGE; | ||||
|   int? fROMROWNUM; | ||||
|   int? iTEMID; | ||||
|   int? nETPRICE; | ||||
|   int? nOOFROWS; | ||||
|   String? oUNAME; | ||||
|   String? pONUMBER; | ||||
|   int? pURCHASEPRICE; | ||||
|   int? qUANTITYORDERED; | ||||
|   int? qUANTITYRECEIVED; | ||||
|   int? rEVISIONNUM; | ||||
|   int? rOWNUM; | ||||
|   String? sUPPLIER; | ||||
|   int? tOROWNUM; | ||||
|   String? uOM; | ||||
| 
 | ||||
|   GetPoItemHistoryList( | ||||
|       {this.bALANCEQUANTITY, | ||||
|         this.bONUSQUANTITY, | ||||
|         this.bUYER, | ||||
|         this.cLOSEDCODE, | ||||
|         this.cREATIONDATE, | ||||
|         this.dISCOUNTPERCENTAGE, | ||||
|         this.fROMROWNUM, | ||||
|         this.iTEMID, | ||||
|         this.nETPRICE, | ||||
|         this.nOOFROWS, | ||||
|         this.oUNAME, | ||||
|         this.pONUMBER, | ||||
|         this.pURCHASEPRICE, | ||||
|         this.qUANTITYORDERED, | ||||
|         this.qUANTITYRECEIVED, | ||||
|         this.rEVISIONNUM, | ||||
|         this.rOWNUM, | ||||
|         this.sUPPLIER, | ||||
|         this.tOROWNUM, | ||||
|         this.uOM}); | ||||
| 
 | ||||
|   GetPoItemHistoryList.fromJson(Map<String, dynamic> json) { | ||||
|     bALANCEQUANTITY = json['BALANCE_QUANTITY']; | ||||
|     bONUSQUANTITY = json['BONUS_QUANTITY']; | ||||
|     bUYER = json['BUYER']; | ||||
|     cLOSEDCODE = json['CLOSED_CODE']; | ||||
|     cREATIONDATE = json['CREATION_DATE']; | ||||
|     dISCOUNTPERCENTAGE = json['DISCOUNT_PERCENTAGE']; | ||||
|     fROMROWNUM = json['FROM_ROW_NUM']; | ||||
|     iTEMID = json['ITEM_ID']; | ||||
|     nETPRICE = json['NET_PRICE']; | ||||
|     nOOFROWS = json['NO_OF_ROWS']; | ||||
|     oUNAME = json['OU_NAME']; | ||||
|     pONUMBER = json['PO_NUMBER']; | ||||
|     pURCHASEPRICE = json['PURCHASE_PRICE']; | ||||
|     qUANTITYORDERED = json['QUANTITY_ORDERED']; | ||||
|     qUANTITYRECEIVED = json['QUANTITY_RECEIVED']; | ||||
|     rEVISIONNUM = json['REVISION_NUM']; | ||||
|     rOWNUM = json['ROW_NUM']; | ||||
|     sUPPLIER = json['SUPPLIER']; | ||||
|     tOROWNUM = json['TO_ROW_NUM']; | ||||
|     uOM = json['UOM']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['BALANCE_QUANTITY'] = this.bALANCEQUANTITY; | ||||
|     data['BONUS_QUANTITY'] = this.bONUSQUANTITY; | ||||
|     data['BUYER'] = this.bUYER; | ||||
|     data['CLOSED_CODE'] = this.cLOSEDCODE; | ||||
|     data['CREATION_DATE'] = this.cREATIONDATE; | ||||
|     data['DISCOUNT_PERCENTAGE'] = this.dISCOUNTPERCENTAGE; | ||||
|     data['FROM_ROW_NUM'] = this.fROMROWNUM; | ||||
|     data['ITEM_ID'] = this.iTEMID; | ||||
|     data['NET_PRICE'] = this.nETPRICE; | ||||
|     data['NO_OF_ROWS'] = this.nOOFROWS; | ||||
|     data['OU_NAME'] = this.oUNAME; | ||||
|     data['PO_NUMBER'] = this.pONUMBER; | ||||
|     data['PURCHASE_PRICE'] = this.pURCHASEPRICE; | ||||
|     data['QUANTITY_ORDERED'] = this.qUANTITYORDERED; | ||||
|     data['QUANTITY_RECEIVED'] = this.qUANTITYRECEIVED; | ||||
|     data['REVISION_NUM'] = this.rEVISIONNUM; | ||||
|     data['ROW_NUM'] = this.rOWNUM; | ||||
|     data['SUPPLIER'] = this.sUPPLIER; | ||||
|     data['TO_ROW_NUM'] = this.tOROWNUM; | ||||
|     data['UOM'] = this.uOM; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,242 @@ | ||||
| 
 | ||||
| class GetPoNotificationBodyList { | ||||
|   List<POHeader>? pOHeader; | ||||
|   List<POLines>? pOLines; | ||||
|   String? pINFORMATION; | ||||
|   String? pQUESTION; | ||||
| 
 | ||||
|   GetPoNotificationBodyList( | ||||
|       {this.pOHeader, this.pOLines, this.pINFORMATION, this.pQUESTION}); | ||||
| 
 | ||||
|   GetPoNotificationBodyList.fromJson(Map<String, dynamic> json) { | ||||
|     if (json['POHeader'] != null) { | ||||
|       pOHeader = <POHeader>[]; | ||||
|       json['POHeader'].forEach((v) { | ||||
|         pOHeader!.add(new POHeader.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     if (json['POLines'] != null) { | ||||
|       pOLines = <POLines>[]; | ||||
|       json['POLines'].forEach((v) { | ||||
|         pOLines!.add(new POLines.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     pINFORMATION = json['P_INFORMATION']; | ||||
|     pQUESTION = json['P_QUESTION']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     if (this.pOHeader != null) { | ||||
|       data['POHeader'] = this.pOHeader!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     if (this.pOLines != null) { | ||||
|       data['POLines'] = this.pOLines!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     data['P_INFORMATION'] = this.pINFORMATION; | ||||
|     data['P_QUESTION'] = this.pQUESTION; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class POHeader { | ||||
|   String? bUYER; | ||||
|   String? cOMMENTS; | ||||
|   String? cREATIONDATE; | ||||
|   String? cURRENCYNAME; | ||||
|   int? cUSTOMDUTY; | ||||
|   int? dISCOUNTAMOUNT; | ||||
|   int? gROSSAMOUNT; | ||||
|   String? lOCCUR; | ||||
|   int? lOCCURTOTPOAMT; | ||||
|   int? oTHERCHARGES; | ||||
|   String? pAYMENTTERMS; | ||||
|   String? pONUMBER; | ||||
|   String? pREPARER; | ||||
|   String? qUOTATIONDATE; | ||||
|   String? qUOTATIONNUMBER; | ||||
|   int? sALESTAX; | ||||
|   int? sHIPHANDLE; | ||||
|   String? sHIPTOLOCATIONNAME; | ||||
|   int? tOTALPODISCOUNT; | ||||
|   int? tOTPOAMT; | ||||
|   String? tOTPOAMTWORD; | ||||
|   String? vENDORNAME; | ||||
|   String? vENDORSITECODE; | ||||
| 
 | ||||
|   POHeader( | ||||
|       {this.bUYER, | ||||
|         this.cOMMENTS, | ||||
|         this.cREATIONDATE, | ||||
|         this.cURRENCYNAME, | ||||
|         this.cUSTOMDUTY, | ||||
|         this.dISCOUNTAMOUNT, | ||||
|         this.gROSSAMOUNT, | ||||
|         this.lOCCUR, | ||||
|         this.lOCCURTOTPOAMT, | ||||
|         this.oTHERCHARGES, | ||||
|         this.pAYMENTTERMS, | ||||
|         this.pONUMBER, | ||||
|         this.pREPARER, | ||||
|         this.qUOTATIONDATE, | ||||
|         this.qUOTATIONNUMBER, | ||||
|         this.sALESTAX, | ||||
|         this.sHIPHANDLE, | ||||
|         this.sHIPTOLOCATIONNAME, | ||||
|         this.tOTALPODISCOUNT, | ||||
|         this.tOTPOAMT, | ||||
|         this.tOTPOAMTWORD, | ||||
|         this.vENDORNAME, | ||||
|         this.vENDORSITECODE}); | ||||
| 
 | ||||
|   POHeader.fromJson(Map<String, dynamic> json) { | ||||
|     bUYER = json['BUYER']; | ||||
|     cOMMENTS = json['COMMENTS']; | ||||
|     cREATIONDATE = json['CREATION_DATE']; | ||||
|     cURRENCYNAME = json['CURRENCY_NAME']; | ||||
|     cUSTOMDUTY = json['CUSTOM_DUTY']; | ||||
|     dISCOUNTAMOUNT = json['DISCOUNT_AMOUNT']; | ||||
|     gROSSAMOUNT = json['GROSS_AMOUNT']; | ||||
|     lOCCUR = json['LOC_CUR']; | ||||
|     lOCCURTOTPOAMT = json['LOC_CUR_TOT_PO_AMT']; | ||||
|     oTHERCHARGES = json['OTHER_CHARGES']; | ||||
|     pAYMENTTERMS = json['PAYMENT_TERMS']; | ||||
|     pONUMBER = json['PO_NUMBER']; | ||||
|     pREPARER = json['PREPARER']; | ||||
|     qUOTATIONDATE = json['QUOTATION_DATE']; | ||||
|     qUOTATIONNUMBER = json['QUOTATION_NUMBER']; | ||||
|     sALESTAX = json['SALES_TAX']; | ||||
|     sHIPHANDLE = json['SHIP_HANDLE']; | ||||
|     sHIPTOLOCATIONNAME = json['SHIP_TO_LOCATION_NAME']; | ||||
|     tOTALPODISCOUNT = json['TOTAL_PO_DISCOUNT']; | ||||
|     tOTPOAMT = json['TOT_PO_AMT']; | ||||
|     tOTPOAMTWORD = json['TOT_PO_AMT_WORD']; | ||||
|     vENDORNAME = json['VENDOR_NAME']; | ||||
|     vENDORSITECODE = json['VENDOR_SITE_CODE']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['BUYER'] = this.bUYER; | ||||
|     data['COMMENTS'] = this.cOMMENTS; | ||||
|     data['CREATION_DATE'] = this.cREATIONDATE; | ||||
|     data['CURRENCY_NAME'] = this.cURRENCYNAME; | ||||
|     data['CUSTOM_DUTY'] = this.cUSTOMDUTY; | ||||
|     data['DISCOUNT_AMOUNT'] = this.dISCOUNTAMOUNT; | ||||
|     data['GROSS_AMOUNT'] = this.gROSSAMOUNT; | ||||
|     data['LOC_CUR'] = this.lOCCUR; | ||||
|     data['LOC_CUR_TOT_PO_AMT'] = this.lOCCURTOTPOAMT; | ||||
|     data['OTHER_CHARGES'] = this.oTHERCHARGES; | ||||
|     data['PAYMENT_TERMS'] = this.pAYMENTTERMS; | ||||
|     data['PO_NUMBER'] = this.pONUMBER; | ||||
|     data['PREPARER'] = this.pREPARER; | ||||
|     data['QUOTATION_DATE'] = this.qUOTATIONDATE; | ||||
|     data['QUOTATION_NUMBER'] = this.qUOTATIONNUMBER; | ||||
|     data['SALES_TAX'] = this.sALESTAX; | ||||
|     data['SHIP_HANDLE'] = this.sHIPHANDLE; | ||||
|     data['SHIP_TO_LOCATION_NAME'] = this.sHIPTOLOCATIONNAME; | ||||
|     data['TOTAL_PO_DISCOUNT'] = this.tOTALPODISCOUNT; | ||||
|     data['TOT_PO_AMT'] = this.tOTPOAMT; | ||||
|     data['TOT_PO_AMT_WORD'] = this.tOTPOAMTWORD; | ||||
|     data['VENDOR_NAME'] = this.vENDORNAME; | ||||
|     data['VENDOR_SITE_CODE'] = this.vENDORSITECODE; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class POLines { | ||||
|   String? dELIVERTOLOCATION; | ||||
|   int? fROMROWNUM; | ||||
|   String? iTEMCODE; | ||||
|   String? iTEMDESCRIPTION; | ||||
|   int? iTEMID; | ||||
|   int? lINEAMOUNT; | ||||
|   int? lINEDISCPERCENTAGE; | ||||
|   int? lINENUM; | ||||
|   String? lINETYPE; | ||||
|   String? mFG; | ||||
|   String? nEEDBYDATE; | ||||
|   int? nOOFROWS; | ||||
|   int? pOHEADERID; | ||||
|   String? pROMISEDDATE; | ||||
|   String? pRNUM; | ||||
|   int? qUANTITY; | ||||
|   String? rEQUESTOR; | ||||
|   int? rOWNUM; | ||||
|   int? tOROWNUM; | ||||
|   int? uNITPRICE; | ||||
|   String? uOM; | ||||
| 
 | ||||
|   POLines( | ||||
|       {this.dELIVERTOLOCATION, | ||||
|         this.fROMROWNUM, | ||||
|         this.iTEMCODE, | ||||
|         this.iTEMDESCRIPTION, | ||||
|         this.iTEMID, | ||||
|         this.lINEAMOUNT, | ||||
|         this.lINEDISCPERCENTAGE, | ||||
|         this.lINENUM, | ||||
|         this.lINETYPE, | ||||
|         this.mFG, | ||||
|         this.nEEDBYDATE, | ||||
|         this.nOOFROWS, | ||||
|         this.pOHEADERID, | ||||
|         this.pROMISEDDATE, | ||||
|         this.pRNUM, | ||||
|         this.qUANTITY, | ||||
|         this.rEQUESTOR, | ||||
|         this.rOWNUM, | ||||
|         this.tOROWNUM, | ||||
|         this.uNITPRICE, | ||||
|         this.uOM}); | ||||
| 
 | ||||
|   POLines.fromJson(Map<String, dynamic> json) { | ||||
|     dELIVERTOLOCATION = json['DELIVER_TO_LOCATION']; | ||||
|     fROMROWNUM = json['FROM_ROW_NUM']; | ||||
|     iTEMCODE = json['ITEM_CODE']; | ||||
|     iTEMDESCRIPTION = json['ITEM_DESCRIPTION']; | ||||
|     iTEMID = json['ITEM_ID']; | ||||
|     lINEAMOUNT = json['LINE_AMOUNT']; | ||||
|     lINEDISCPERCENTAGE = json['LINE_DISC_PERCENTAGE']; | ||||
|     lINENUM = json['LINE_NUM']; | ||||
|     lINETYPE = json['LINE_TYPE']; | ||||
|     mFG = json['MFG']; | ||||
|     nEEDBYDATE = json['NEED_BY_DATE']; | ||||
|     nOOFROWS = json['NO_OF_ROWS']; | ||||
|     pOHEADERID = json['PO_HEADER_ID']; | ||||
|     pROMISEDDATE = json['PROMISED_DATE']; | ||||
|     pRNUM = json['PR_NUM']; | ||||
|     qUANTITY = json['QUANTITY']; | ||||
|     rEQUESTOR = json['REQUESTOR']; | ||||
|     rOWNUM = json['ROW_NUM']; | ||||
|     tOROWNUM = json['TO_ROW_NUM']; | ||||
|     uNITPRICE = json['UNIT_PRICE']; | ||||
|     uOM = json['UOM']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['DELIVER_TO_LOCATION'] = this.dELIVERTOLOCATION; | ||||
|     data['FROM_ROW_NUM'] = this.fROMROWNUM; | ||||
|     data['ITEM_CODE'] = this.iTEMCODE; | ||||
|     data['ITEM_DESCRIPTION'] = this.iTEMDESCRIPTION; | ||||
|     data['ITEM_ID'] = this.iTEMID; | ||||
|     data['LINE_AMOUNT'] = this.lINEAMOUNT; | ||||
|     data['LINE_DISC_PERCENTAGE'] = this.lINEDISCPERCENTAGE; | ||||
|     data['LINE_NUM'] = this.lINENUM; | ||||
|     data['LINE_TYPE'] = this.lINETYPE; | ||||
|     data['MFG'] = this.mFG; | ||||
|     data['NEED_BY_DATE'] = this.nEEDBYDATE; | ||||
|     data['NO_OF_ROWS'] = this.nOOFROWS; | ||||
|     data['PO_HEADER_ID'] = this.pOHEADERID; | ||||
|     data['PROMISED_DATE'] = this.pROMISEDDATE; | ||||
|     data['PR_NUM'] = this.pRNUM; | ||||
|     data['QUANTITY'] = this.qUANTITY; | ||||
|     data['REQUESTOR'] = this.rEQUESTOR; | ||||
|     data['ROW_NUM'] = this.rOWNUM; | ||||
|     data['TO_ROW_NUM'] = this.tOROWNUM; | ||||
|     data['UNIT_PRICE'] = this.uNITPRICE; | ||||
|     data['UOM'] = this.uOM; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,84 @@ | ||||
| class GetQuotationAnalysisList { | ||||
|   int? fROMROWNUM; | ||||
|   String? iTEMCODE; | ||||
|   String? iTEMDESC; | ||||
|   int? nOOFROWS; | ||||
|   String? qUOTBONUSQTY; | ||||
|   String? qUOTDELIVERYDATE; | ||||
|   int? qUOTLINETOTAL; | ||||
|   String? qUOTMFGPARTNUM; | ||||
|   String? qUOTNUM; | ||||
|   int? qUOTQTY; | ||||
|   int? qUOTUNITPRICE; | ||||
|   String? qUOTUOM; | ||||
|   String? rFQNUM; | ||||
|   int? rFQQTY; | ||||
|   String? rFQUOM; | ||||
|   int? rOWNUM; | ||||
|   int? tOROWNUM; | ||||
|   String? vENDORNAME; | ||||
| 
 | ||||
|   GetQuotationAnalysisList( | ||||
|       {this.fROMROWNUM, | ||||
|         this.iTEMCODE, | ||||
|         this.iTEMDESC, | ||||
|         this.nOOFROWS, | ||||
|         this.qUOTBONUSQTY, | ||||
|         this.qUOTDELIVERYDATE, | ||||
|         this.qUOTLINETOTAL, | ||||
|         this.qUOTMFGPARTNUM, | ||||
|         this.qUOTNUM, | ||||
|         this.qUOTQTY, | ||||
|         this.qUOTUNITPRICE, | ||||
|         this.qUOTUOM, | ||||
|         this.rFQNUM, | ||||
|         this.rFQQTY, | ||||
|         this.rFQUOM, | ||||
|         this.rOWNUM, | ||||
|         this.tOROWNUM, | ||||
|         this.vENDORNAME}); | ||||
| 
 | ||||
|   GetQuotationAnalysisList.fromJson(Map<String, dynamic> json) { | ||||
|     fROMROWNUM = json['FROM_ROW_NUM']; | ||||
|     iTEMCODE = json['ITEM_CODE']; | ||||
|     iTEMDESC = json['ITEM_DESC']; | ||||
|     nOOFROWS = json['NO_OF_ROWS']; | ||||
|     qUOTBONUSQTY = json['QUOT_BONUS_QTY']; | ||||
|     qUOTDELIVERYDATE = json['QUOT_DELIVERY_DATE']; | ||||
|     qUOTLINETOTAL = json['QUOT_LINE_TOTAL']; | ||||
|     qUOTMFGPARTNUM = json['QUOT_MFG_PART_NUM']; | ||||
|     qUOTNUM = json['QUOT_NUM']; | ||||
|     qUOTQTY = json['QUOT_QTY']; | ||||
|     qUOTUNITPRICE = json['QUOT_UNIT_PRICE']; | ||||
|     qUOTUOM = json['QUOT_UOM']; | ||||
|     rFQNUM = json['RFQ_NUM']; | ||||
|     rFQQTY = json['RFQ_QTY']; | ||||
|     rFQUOM = json['RFQ_UOM']; | ||||
|     rOWNUM = json['ROW_NUM']; | ||||
|     tOROWNUM = json['TO_ROW_NUM']; | ||||
|     vENDORNAME = json['VENDOR_NAME']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['FROM_ROW_NUM'] = this.fROMROWNUM; | ||||
|     data['ITEM_CODE'] = this.iTEMCODE; | ||||
|     data['ITEM_DESC'] = this.iTEMDESC; | ||||
|     data['NO_OF_ROWS'] = this.nOOFROWS; | ||||
|     data['QUOT_BONUS_QTY'] = this.qUOTBONUSQTY; | ||||
|     data['QUOT_DELIVERY_DATE'] = this.qUOTDELIVERYDATE; | ||||
|     data['QUOT_LINE_TOTAL'] = this.qUOTLINETOTAL; | ||||
|     data['QUOT_MFG_PART_NUM'] = this.qUOTMFGPARTNUM; | ||||
|     data['QUOT_NUM'] = this.qUOTNUM; | ||||
|     data['QUOT_QTY'] = this.qUOTQTY; | ||||
|     data['QUOT_UNIT_PRICE'] = this.qUOTUNITPRICE; | ||||
|     data['QUOT_UOM'] = this.qUOTUOM; | ||||
|     data['RFQ_NUM'] = this.rFQNUM; | ||||
|     data['RFQ_QTY'] = this.rFQQTY; | ||||
|     data['RFQ_UOM'] = this.rFQUOM; | ||||
|     data['ROW_NUM'] = this.rOWNUM; | ||||
|     data['TO_ROW_NUM'] = this.tOROWNUM; | ||||
|     data['VENDOR_NAME'] = this.vENDORNAME; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,61 @@ | ||||
| 
 | ||||
| class GetStampNsNotificationBodyList { | ||||
|   int? aSSIGNMENTID; | ||||
|   String? aSSIGNMENTNUMBER; | ||||
|   int? bUSINESSGROUPID; | ||||
|   String? eMPLOYEENAME; | ||||
|   String? eMPLOYEENUMBER; | ||||
|   String? eMPLOYMENTCATEGORY; | ||||
|   int? pAYROLLID; | ||||
|   String? pAYROLLNAME; | ||||
|   int? pERSONID; | ||||
|   String? sCHEDULEDATE; | ||||
|   int? sUPERVISORID; | ||||
|   int? tKPERSONID; | ||||
| 
 | ||||
|   GetStampNsNotificationBodyList( | ||||
|       {this.aSSIGNMENTID, | ||||
|         this.aSSIGNMENTNUMBER, | ||||
|         this.bUSINESSGROUPID, | ||||
|         this.eMPLOYEENAME, | ||||
|         this.eMPLOYEENUMBER, | ||||
|         this.eMPLOYMENTCATEGORY, | ||||
|         this.pAYROLLID, | ||||
|         this.pAYROLLNAME, | ||||
|         this.pERSONID, | ||||
|         this.sCHEDULEDATE, | ||||
|         this.sUPERVISORID, | ||||
|         this.tKPERSONID}); | ||||
| 
 | ||||
|   GetStampNsNotificationBodyList.fromJson(Map<String, dynamic> json) { | ||||
|     aSSIGNMENTID = json['ASSIGNMENT_ID']; | ||||
|     aSSIGNMENTNUMBER = json['ASSIGNMENT_NUMBER']; | ||||
|     bUSINESSGROUPID = json['BUSINESS_GROUP_ID']; | ||||
|     eMPLOYEENAME = json['EMPLOYEE_NAME']; | ||||
|     eMPLOYEENUMBER = json['EMPLOYEE_NUMBER']; | ||||
|     eMPLOYMENTCATEGORY = json['EMPLOYMENT_CATEGORY']; | ||||
|     pAYROLLID = json['PAYROLL_ID']; | ||||
|     pAYROLLNAME = json['PAYROLL_NAME']; | ||||
|     pERSONID = json['PERSON_ID']; | ||||
|     sCHEDULEDATE = json['SCHEDULE_DATE']; | ||||
|     sUPERVISORID = json['SUPERVISOR_ID']; | ||||
|     tKPERSONID = json['TK_PERSON_ID']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['ASSIGNMENT_ID'] = this.aSSIGNMENTID; | ||||
|     data['ASSIGNMENT_NUMBER'] = this.aSSIGNMENTNUMBER; | ||||
|     data['BUSINESS_GROUP_ID'] = this.bUSINESSGROUPID; | ||||
|     data['EMPLOYEE_NAME'] = this.eMPLOYEENAME; | ||||
|     data['EMPLOYEE_NUMBER'] = this.eMPLOYEENUMBER; | ||||
|     data['EMPLOYMENT_CATEGORY'] = this.eMPLOYMENTCATEGORY; | ||||
|     data['PAYROLL_ID'] = this.pAYROLLID; | ||||
|     data['PAYROLL_NAME'] = this.pAYROLLNAME; | ||||
|     data['PERSON_ID'] = this.pERSONID; | ||||
|     data['SCHEDULE_DATE'] = this.sCHEDULEDATE; | ||||
|     data['SUPERVISOR_ID'] = this.sUPERVISORID; | ||||
|     data['TK_PERSON_ID'] = this.tKPERSONID; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,21 @@ | ||||
| class AllowedActions { | ||||
|   String? action; | ||||
|   String? details; | ||||
|   bool? isAvailable; | ||||
| 
 | ||||
|   AllowedActions({this.action, this.details, this.isAvailable}); | ||||
| 
 | ||||
|   AllowedActions.fromJson(Map<String, dynamic> json) { | ||||
|     action = json['Action']; | ||||
|     details = json['Details']; | ||||
|     isAvailable = json['IsAvailable']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['Action'] = this.action; | ||||
|     data['Details'] = this.details; | ||||
|     data['IsAvailable'] = this.isAvailable; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,27 @@ | ||||
| import 'package:mohem_flutter_app/models/itg_forms_models/fields_model.dart'; | ||||
| 
 | ||||
| class FieldGoups { | ||||
|   List<Fields>? fields; | ||||
|   String? title; | ||||
| 
 | ||||
|   FieldGoups({this.fields, this.title}); | ||||
| 
 | ||||
|   FieldGoups.fromJson(Map<String, dynamic> json) { | ||||
|     if (json['Fields'] != null) { | ||||
|       fields = <Fields>[]; | ||||
|       json['Fields'].forEach((v) { | ||||
|         fields!.add(new Fields.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     title = json['Title']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     if (this.fields != null) { | ||||
|       data['Fields'] = this.fields!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     data['Title'] = this.title; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,27 @@ | ||||
| class Fields { | ||||
|   List<String>? multipleValue; | ||||
|   String? tableValue; | ||||
|   String? title; | ||||
|   String? type; | ||||
|   String? value; | ||||
| 
 | ||||
|   Fields({this.multipleValue, this.tableValue, this.title, this.type, this.value}); | ||||
| 
 | ||||
|   Fields.fromJson(Map<String, dynamic> json) { | ||||
|     multipleValue = json['MultipleValue'] != null ? json['MultipleValue'].cast<String>() : null; | ||||
|     tableValue = json['TableValue']; | ||||
|     title = json['Title']; | ||||
|     type = json['Type']; | ||||
|     value = json['Value']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['MultipleValue'] = this.multipleValue; | ||||
|     data['TableValue'] = this.tableValue; | ||||
|     data['Title'] = this.title; | ||||
|     data['Type'] = this.type; | ||||
|     data['Value'] = this.value; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,52 @@ | ||||
| import 'package:mohem_flutter_app/models/itg_forms_models/allowed_actions_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/itg_forms_models/field_goups_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/itg_forms_models/wf_history_model.dart'; | ||||
| 
 | ||||
| class ITGRequest { | ||||
|   List<AllowedActions>? allowedActions; | ||||
|   Null? attachments; | ||||
|   List<FieldGoups>? fieldGoups; | ||||
|   Null? grantFields; | ||||
|   List<WFHistory>? wFHistory; | ||||
| 
 | ||||
|   ITGRequest({this.allowedActions, this.attachments, this.fieldGoups, this.grantFields, this.wFHistory}); | ||||
| 
 | ||||
|   ITGRequest.fromJson(Map<String, dynamic> json) { | ||||
|     if (json['AllowedActions'] != null) { | ||||
|       allowedActions = <AllowedActions>[]; | ||||
|       json['AllowedActions'].forEach((v) { | ||||
|         allowedActions!.add(new AllowedActions.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     attachments = json['Attachments']; | ||||
|     if (json['FieldGoups'] != null) { | ||||
|       fieldGoups = <FieldGoups>[]; | ||||
|       json['FieldGoups'].forEach((v) { | ||||
|         fieldGoups!.add(new FieldGoups.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     grantFields = json['GrantFields']; | ||||
|     if (json['WFHistory'] != null) { | ||||
|       wFHistory = <WFHistory>[]; | ||||
|       json['WFHistory'].forEach((v) { | ||||
|         wFHistory!.add(new WFHistory.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     if (this.allowedActions != null) { | ||||
|       data['AllowedActions'] = this.allowedActions!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     data['Attachments'] = this.attachments; | ||||
|     if (this.fieldGoups != null) { | ||||
|       data['FieldGoups'] = this.fieldGoups!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     data['GrantFields'] = this.grantFields; | ||||
|     if (this.wFHistory != null) { | ||||
|       data['WFHistory'] = this.wFHistory!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,34 @@ | ||||
| class RequestDetails { | ||||
|   int? iD; | ||||
|   int? itemID; | ||||
|   String? listID; | ||||
|   String? listName; | ||||
|   String? modifiedDate; | ||||
|   String? title; | ||||
|   String? uRL; | ||||
|   String? requestType; | ||||
| 
 | ||||
|   RequestDetails({this.iD, this.itemID, this.listID, this.listName, this.modifiedDate, this.title, this.uRL,this.requestType}); | ||||
| 
 | ||||
|   RequestDetails.fromJson(Map<String, dynamic> json) { | ||||
|     iD = json['ID']; | ||||
|     itemID = json['ItemID']; | ||||
|     listID = json['ListID']; | ||||
|     listName = json['ListName']; | ||||
|     modifiedDate = json['ModifiedDate']; | ||||
|     title = json['Title']; | ||||
|     uRL = json['URL']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['ID'] = this.iD; | ||||
|     data['ItemID'] = this.itemID; | ||||
|     data['ListID'] = this.listID; | ||||
|     data['ListName'] = this.listName; | ||||
|     data['ModifiedDate'] = this.modifiedDate; | ||||
|     data['Title'] = this.title; | ||||
|     data['URL'] = this.uRL; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,33 @@ | ||||
| import 'package:mohem_flutter_app/models/itg_forms_models/request_detail_model.dart'; | ||||
| 
 | ||||
| class RequestType { | ||||
|   int? itemCount; | ||||
|   List<RequestDetails>? requestDetails; | ||||
|   String? requestTypeCode; | ||||
|   String? requestTypeName; | ||||
| 
 | ||||
|   RequestType({this.itemCount, this.requestDetails, this.requestTypeCode, this.requestTypeName}); | ||||
| 
 | ||||
|   RequestType.fromJson(Map<String, dynamic> json) { | ||||
|     itemCount = json['ItemCount']; | ||||
|     if (json['RequestDetails'] != null) { | ||||
|       requestDetails = <RequestDetails>[]; | ||||
|       json['RequestDetails'].forEach((v) { | ||||
|         requestDetails!.add(new RequestDetails.fromJson(v)); | ||||
|       }); | ||||
|     } | ||||
|     requestTypeCode = json['RequestTypeCode']; | ||||
|     requestTypeName = json['RequestTypeName']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['ItemCount'] = this.itemCount; | ||||
|     if (this.requestDetails != null) { | ||||
|       data['RequestDetails'] = this.requestDetails!.map((v) => v.toJson()).toList(); | ||||
|     } | ||||
|     data['RequestTypeCode'] = this.requestTypeCode; | ||||
|     data['RequestTypeName'] = this.requestTypeName; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,40 @@ | ||||
| class WFHistory { | ||||
|   String? action; | ||||
|   String? approvalLevel; | ||||
|   String? date; | ||||
|   String? email; | ||||
|   String? employeeID; | ||||
|   String? name; | ||||
|   String? notes; | ||||
| 
 | ||||
|   WFHistory( | ||||
|       {this.action, | ||||
|         this.approvalLevel, | ||||
|         this.date, | ||||
|         this.email, | ||||
|         this.employeeID, | ||||
|         this.name, | ||||
|         this.notes}); | ||||
| 
 | ||||
|   WFHistory.fromJson(Map<String, dynamic> json) { | ||||
|     action = json['Action']; | ||||
|     approvalLevel = json['ApprovalLevel']; | ||||
|     date = json['Date']; | ||||
|     email = json['Email']; | ||||
|     employeeID = json['EmployeeID']; | ||||
|     name = json['Name']; | ||||
|     notes = json['Notes']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['Action'] = this.action; | ||||
|     data['ApprovalLevel'] = this.approvalLevel; | ||||
|     data['Date'] = this.date; | ||||
|     data['Email'] = this.email; | ||||
|     data['EmployeeID'] = this.employeeID; | ||||
|     data['Name'] = this.name; | ||||
|     data['Notes'] = this.notes; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,18 @@ | ||||
| class NotificationAction { | ||||
|   String? pRETURNMSG; | ||||
|   String? pRETURNSTATUS; | ||||
| 
 | ||||
|   NotificationAction({this.pRETURNMSG, this.pRETURNSTATUS}); | ||||
| 
 | ||||
|   NotificationAction.fromJson(Map<String, dynamic> json) { | ||||
|     pRETURNMSG = json['P_RETURN_MSG']; | ||||
|     pRETURNSTATUS = json['P_RETURN_STATUS']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['P_RETURN_MSG'] = this.pRETURNMSG; | ||||
|     data['P_RETURN_STATUS'] = this.pRETURNSTATUS; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,91 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/api/my_attendance_api_client.dart'; | ||||
| import 'package:mohem_flutter_app/classes/utils.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/button/default_button.dart'; | ||||
| 
 | ||||
| class AddWorkFromHomeScreen extends StatefulWidget { | ||||
|   AddWorkFromHomeScreen({Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   _AddWorkFromHomeScreenState createState() { | ||||
|     return _AddWorkFromHomeScreenState(); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class _AddWorkFromHomeScreenState extends State<AddWorkFromHomeScreen> { | ||||
|   List<GetEITDFFStructureList>? getEitDffStructureList; | ||||
|   String? callingFunction; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|   } | ||||
| 
 | ||||
|   void getTransactionsStructure() async { | ||||
|     try { | ||||
|       Utils.showLoading(context); | ||||
|       getEitDffStructureList = await MyAttendanceApiClient().getEitDffStructure(callingFunction!); | ||||
|       getEitDffStructureList = getEitDffStructureList!.where((element) => element.dISPLAYFLAG == "Y").toList(); | ||||
|       Utils.hideLoading(context); | ||||
|       setState(() {}); | ||||
|     } catch (ex) { | ||||
|       Utils.hideLoading(context); | ||||
|       Utils.handleException(ex, context, null); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   void dispose() { | ||||
|     super.dispose(); | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     if (callingFunction == null) { | ||||
|       callingFunction = "HMG_OTL_WFH_EIT_SS"; // ModalRoute.of(context)!.settings.arguments as WorkListResponseModel; | ||||
|       getTransactionsStructure(); | ||||
|     } | ||||
|     return Scaffold( | ||||
|       backgroundColor: Colors.white, | ||||
|       appBar: AppBarWidget( | ||||
|         context, | ||||
|         title: LocaleKeys.workFromHome.tr(), | ||||
|       ), | ||||
|       body: Column( | ||||
|         children: [ | ||||
|           (getEitDffStructureList == null | ||||
|                   ? const SizedBox() | ||||
|                   : (getEitDffStructureList!.isEmpty | ||||
|                       ? LocaleKeys.noDataAvailable.tr().toText16().center | ||||
|                       : ListView.separated( | ||||
|                           physics: const BouncingScrollPhysics(), | ||||
|                           padding: EdgeInsets.all(21), | ||||
|                           itemBuilder: (cxt, int parentIndex) => Column( | ||||
|                                 crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                 mainAxisSize: MainAxisSize.min, | ||||
|                                 children: [], | ||||
|                               ).objectContainerView(), | ||||
|                           separatorBuilder: (cxt, index) => 12.height, | ||||
|                           itemCount: getEitDffStructureList!.length))) | ||||
|               .expanded, | ||||
|           // 12.height, | ||||
|           DefaultButton( | ||||
|             LocaleKeys.next.tr(), | ||||
|             (getEitDffStructureList ?? []).isEmpty | ||||
|                 ? null | ||||
|                 : () => { | ||||
|                       //Navigator.of(context).pushNamed(LOGIN_TYPE) | ||||
|                     }, | ||||
|           ).insideContainer, | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,63 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter_svg/flutter_svg.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/config/routes.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| 
 | ||||
| class MyAttendanceScreen extends StatelessWidget { | ||||
|   MyAttendanceScreen({Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Scaffold( | ||||
|       backgroundColor: Colors.white, | ||||
|       appBar: AppBarWidget( | ||||
|         context, | ||||
|         title: LocaleKeys.myAttendance.tr(), | ||||
|       ), | ||||
|       body: SizedBox( | ||||
|           width: double.infinity, | ||||
|           height: double.infinity, | ||||
|           child: ListView( | ||||
|             children: [ | ||||
|               itemView( | ||||
|                 "assets/images/pdf.svg", | ||||
|                 LocaleKeys.missingSwipes.tr(), | ||||
|               ).onPress(() { | ||||
| 
 | ||||
|               }), | ||||
|               12.height, | ||||
|               itemView( | ||||
|                 "assets/images/pdf.svg", | ||||
|                 LocaleKeys.workFromHome.tr(), | ||||
|               ).onPress(() { | ||||
|                 Navigator.pushNamed(context, AppRoutes.workFromHome); | ||||
|               }), | ||||
|               12.height, | ||||
|               itemView( | ||||
|                 "assets/images/pdf.svg", | ||||
|                 LocaleKeys.workOnBreak.tr(), | ||||
|               ), | ||||
|             ], | ||||
|           ).paddingAll(21)), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget itemView(String icon, String title) { | ||||
|     return Row( | ||||
|       children: [ | ||||
|         (title).toText16().expanded, | ||||
|         12.width, | ||||
|         SvgPicture.asset( | ||||
|           "assets/images/arrow_next.svg", | ||||
|           color: MyColors.darkIconColor, | ||||
|         ) | ||||
|       ], | ||||
|     ).objectContainerView(); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,98 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/api/my_attendance_api_client.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/classes/utils.dart'; | ||||
| import 'package:mohem_flutter_app/config/routes.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_eit_transaction_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart'; | ||||
| 
 | ||||
| class WorkFromHomeScreen extends StatefulWidget { | ||||
|   WorkFromHomeScreen({Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   _WorkFromHomeScreenState createState() { | ||||
|     return _WorkFromHomeScreenState(); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class _WorkFromHomeScreenState extends State<WorkFromHomeScreen> { | ||||
|   List<GetEITTransactionList>? getEITTransactionList; | ||||
|   String? callingFunction; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|   } | ||||
| 
 | ||||
|   void getTransactions() async { | ||||
|     try { | ||||
|       Utils.showLoading(context); | ||||
|       getEITTransactionList = await MyAttendanceApiClient().getEitTransaction(callingFunction!); | ||||
|       Utils.hideLoading(context); | ||||
|       setState(() {}); | ||||
|     } catch (ex) { | ||||
|       Utils.hideLoading(context); | ||||
|       Utils.handleException(ex, context, null); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   void dispose() { | ||||
|     super.dispose(); | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     if (callingFunction == null) { | ||||
|       callingFunction = "HMG_OTL_WFH_EIT_SS"; // ModalRoute.of(context)!.settings.arguments as WorkListResponseModel; | ||||
|       getTransactions(); | ||||
|     } | ||||
| 
 | ||||
|     return Scaffold( | ||||
|       backgroundColor: Colors.white, | ||||
|       appBar: AppBarWidget( | ||||
|         context, | ||||
|         title: LocaleKeys.workFromHome.tr(), | ||||
|       ), | ||||
|       body: getEITTransactionList == null | ||||
|           ? const SizedBox() | ||||
|           : (getEITTransactionList!.isEmpty | ||||
|               ? LocaleKeys.noDataAvailable.tr().toText16().center | ||||
|               : ListView.separated( | ||||
|                   physics: const BouncingScrollPhysics(), | ||||
|                   padding: EdgeInsets.all(21), | ||||
|                   itemBuilder: (cxt, int parentIndex) => Column( | ||||
|                         crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                         mainAxisSize: MainAxisSize.min, | ||||
|                         children: [ | ||||
|                           for (int t = 0; t < (getEITTransactionList![parentIndex].collectionTransaction ?? []).length; t++) | ||||
|                             if (getEITTransactionList![parentIndex].collectionTransaction![t].dISPLAYFLAG == "Y") | ||||
|                               ItemDetailView( | ||||
|                                   getEITTransactionList![parentIndex].collectionTransaction![t].sEGMENTPROMPT!, getEITTransactionList![parentIndex].collectionTransaction![t].sEGMENTVALUEDSP ?? ""), | ||||
|                         ], | ||||
|                       ).objectContainerView(), | ||||
|                   separatorBuilder: (cxt, index) => 12.height, | ||||
|                   itemCount: getEITTransactionList!.length)), | ||||
|       floatingActionButton: Container( | ||||
|         height: 50, | ||||
|         width: 50, | ||||
|         decoration: const BoxDecoration( | ||||
|           shape: BoxShape.circle, | ||||
|           gradient: LinearGradient(transform: GradientRotation(.83), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [ | ||||
|             MyColors.gradiantEndColor, | ||||
|             MyColors.gradiantStartColor, | ||||
|           ]), | ||||
|         ), | ||||
|         child: const Icon(Icons.add, color: Colors.white, size: 30), | ||||
|       ).onPress(() { | ||||
|         Navigator.pushNamed(context, AppRoutes.addWorkFromHome); | ||||
|       }), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,182 @@ | ||||
| import 'package:easy_localization/src/public_ext.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart'; | ||||
| import 'package:mohem_flutter_app/classes/utils.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_mo_Item_history_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_po_Item_history_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_quotation_analysis_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart'; | ||||
| 
 | ||||
| class ItemHistoryScreenParams { | ||||
|   String? title; | ||||
|   bool isItemHistory; | ||||
|   bool isMO; | ||||
|   int? pItemId; | ||||
|   int? pPoHeaderId; | ||||
|   int? pOrgId; | ||||
| 
 | ||||
|   ItemHistoryScreenParams({@required this.title, this.isItemHistory = true, this.isMO = true, this.pItemId, this.pPoHeaderId, this.pOrgId}); | ||||
| } | ||||
| 
 | ||||
| class ItemHistoryScreen extends StatefulWidget { | ||||
|   ItemHistoryScreen({Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   _ItemHistoryScreenState createState() { | ||||
|     return _ItemHistoryScreenState(); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class _ItemHistoryScreenState extends State<ItemHistoryScreen> { | ||||
|   ItemHistoryScreenParams? _screenParams; | ||||
| 
 | ||||
|   List<GetMoItemHistoryList> moItemHistoryList = []; | ||||
|   List<GetPoItemHistoryList> poItemHistoryList = []; | ||||
|   List<GetQuotationAnalysisList> quotationAnalysisList = []; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   void dispose() { | ||||
|     super.dispose(); | ||||
|   } | ||||
| 
 | ||||
|   void loadData() { | ||||
|     if (_screenParams == null) { | ||||
|       _screenParams = ModalRoute.of(context)!.settings.arguments as ItemHistoryScreenParams; | ||||
|       getDataFromApi(); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   void getDataFromApi() async { | ||||
|     try { | ||||
|       Utils.showLoading(context); | ||||
|       if (_screenParams!.isItemHistory) { | ||||
|         if (_screenParams!.isMO) { | ||||
|           moItemHistoryList = await WorkListApiClient().getMoItemHistory(_screenParams!.pItemId!, _screenParams!.pOrgId!); | ||||
|         } else { | ||||
|           poItemHistoryList = await WorkListApiClient().getPoItemHistory(_screenParams!.pItemId!); | ||||
|         } | ||||
|       } else { | ||||
|         quotationAnalysisList = await WorkListApiClient().getQuotationAnalysis(_screenParams!.pItemId!, _screenParams!.pPoHeaderId!); | ||||
|       } | ||||
| 
 | ||||
|       Utils.hideLoading(context); | ||||
|       setState(() {}); | ||||
|     } catch (ex) { | ||||
|       Utils.hideLoading(context); | ||||
|       Utils.handleException(ex, context, null); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     loadData(); | ||||
|     return Scaffold( | ||||
|       appBar: AppBarWidget(context, title: _screenParams?.title ?? ""), | ||||
|       backgroundColor: Colors.white, | ||||
|       body: ListView( | ||||
|         padding: const EdgeInsets.all(21), | ||||
|         physics: const BouncingScrollPhysics(), | ||||
|         children: [ | ||||
|           if (moItemHistoryList.isNotEmpty) loadMoItemHistoryData(), | ||||
|           if (poItemHistoryList.isNotEmpty) loadPoItemHistoryData(), | ||||
|           if (quotationAnalysisList.isNotEmpty) loadQuotationAnalysisData() | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget loadMoItemHistoryData() { | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => Column( | ||||
|               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|               mainAxisSize: MainAxisSize.min, | ||||
|               children: [ | ||||
|                 ItemDetailView(LocaleKeys.requestNumber.tr(), moItemHistoryList[index].rEQUESTNUMBER ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.uom.tr(), moItemHistoryList[index].uNITOFMEASURE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quantity.tr(), moItemHistoryList[index].qUANTITY?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.dateRequired.tr(), moItemHistoryList[index].dATEREQUIRED ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.lineStatus.tr(), moItemHistoryList[index].lINESTATUSDIS ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.statusDate.tr(), moItemHistoryList[index].sTATUSDATE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.transactionType.tr(), moItemHistoryList[index].tRANSACTIONTYPENAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.organization.tr(), moItemHistoryList[index].oRGANIZATIONNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.operatingCode.tr(), moItemHistoryList[index].oRGANIZATIONCODE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.operatingUnit.tr(), moItemHistoryList[index].oPERATINGUNITNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.fromSubInventory.tr(), moItemHistoryList[index].fROMSUBINVENTORYCODE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.fromLocator.tr(), moItemHistoryList[index].fROMLOCATOR ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.toSubInventory.tr(), moItemHistoryList[index].tOSUBINVENTORYCODE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.toLocator.tr(), moItemHistoryList[index].tOLOCATOR ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.shipToLocation.tr(), moItemHistoryList[index].sHIPTOLOCATION ?? ""), | ||||
|               ], | ||||
|             ).objectContainerView(), | ||||
|         separatorBuilder: (cxt, index) => 12.height, | ||||
|         itemCount: moItemHistoryList.length); | ||||
|   } | ||||
| 
 | ||||
|   Widget loadPoItemHistoryData() { | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => Column( | ||||
|               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|               mainAxisSize: MainAxisSize.min, | ||||
|               children: [ | ||||
|                 ItemDetailView(LocaleKeys.operatingUnit.tr(), poItemHistoryList[index].oUNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.poNumber.tr(), poItemHistoryList[index].pONUMBER ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.revision.tr(), poItemHistoryList[index].rEVISIONNUM?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.creationDate.tr(), poItemHistoryList[index].cREATIONDATE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.supplier.tr(), poItemHistoryList[index].sUPPLIER ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.buyer.tr(), poItemHistoryList[index].bUYER ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.uom.tr(), poItemHistoryList[index].uOM ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quantityOrdered.tr(), poItemHistoryList[index].qUANTITYORDERED?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quantityReceived.tr(), poItemHistoryList[index].qUANTITYRECEIVED?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.bonusQuantity.tr(), poItemHistoryList[index].bONUSQUANTITY?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.purchasePrice.tr(), poItemHistoryList[index].pURCHASEPRICE?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.discountPer.tr(), poItemHistoryList[index].dISCOUNTPERCENTAGE?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.balanceQuantity.tr(), poItemHistoryList[index].bALANCEQUANTITY?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.netPrice.tr(), poItemHistoryList[index].nETPRICE?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.closureStatus.tr(), poItemHistoryList[index].cLOSEDCODE ?? ""), | ||||
|               ], | ||||
|             ).objectContainerView(), | ||||
|         separatorBuilder: (cxt, index) => 12.height, | ||||
|         itemCount: poItemHistoryList.length); | ||||
|   } | ||||
| 
 | ||||
|   Widget loadQuotationAnalysisData() { | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => Column( | ||||
|               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|               mainAxisSize: MainAxisSize.min, | ||||
|               children: [ | ||||
|                 ItemDetailView(LocaleKeys.quotationNumber.tr(), quotationAnalysisList[index].qUOTNUM ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.vendorName.tr(), quotationAnalysisList[index].vENDORNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.itemCode.tr(), quotationAnalysisList[index].iTEMCODE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.description.tr(), quotationAnalysisList[index].iTEMDESC ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quotationQty.tr(), quotationAnalysisList[index].qUOTQTY?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quotationUOM.tr(), quotationAnalysisList[index].qUOTUOM ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quotationNetPrice.tr(), quotationAnalysisList[index].qUOTUNITPRICE?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quotationLineTotal.tr(), quotationAnalysisList[index].qUOTLINETOTAL?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quotationBonusQuantity.tr(), quotationAnalysisList[index].qUOTBONUSQTY ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quotationDeliveryDate.tr(), quotationAnalysisList[index].qUOTDELIVERYDATE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quotationMFGPartNumber.tr(), quotationAnalysisList[index].qUOTMFGPARTNUM ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.rfqNumber.tr(), quotationAnalysisList[index].rFQNUM ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.rfqQty.tr(), quotationAnalysisList[index].rFQQTY?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.rfqUOM.tr(), quotationAnalysisList[index].rFQUOM ?? ""), | ||||
|               ], | ||||
|             ).objectContainerView(title: "${quotationAnalysisList[index].iTEMCODE}-${quotationAnalysisList[index].iTEMDESC}"), | ||||
|         separatorBuilder: (cxt, index) => 12.height, | ||||
|         itemCount: quotationAnalysisList.length); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,376 @@ | ||||
| import 'dart:convert'; | ||||
| 
 | ||||
| import 'package:easy_localization/src/public_ext.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter_svg/svg.dart'; | ||||
| import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart'; | ||||
| import 'package:mohem_flutter_app/app_state/app_state.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/classes/utils.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/models/generic_response_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_notification_buttons_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/itg_forms_models/allowed_actions_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/itg_forms_models/itg_request_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/itg_forms_models/request_detail_model.dart'; | ||||
| import 'package:mohem_flutter_app/ui/work_list/itg_fragments/approval_level_fragment.dart'; | ||||
| import 'package:mohem_flutter_app/ui/work_list/itg_fragments/request_detail_fragment.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/button/default_button.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/dialogs/accept_reject_input_dialog.dart'; | ||||
| 
 | ||||
| class ItgDetailScreen extends StatefulWidget { | ||||
|   ItgDetailScreen({Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   _ItgDetailScreenState createState() { | ||||
|     return _ItgDetailScreenState(); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class _ItgDetailScreenState extends State<ItgDetailScreen> { | ||||
|   int tabIndex = 0; | ||||
|   PageController controller = PageController(); | ||||
|   bool showFabOptions = false; | ||||
| 
 | ||||
|   bool isCloseAvailable = false; | ||||
|   bool isApproveAvailable = false; | ||||
|   bool isRejectAvailable = false; | ||||
| 
 | ||||
|   List<AllowedActions> allowedActionList = []; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   void dispose() { | ||||
|     super.dispose(); | ||||
|   } | ||||
| 
 | ||||
|   RequestDetails? requestDetails; | ||||
|   ITGRequest? itgRequest; | ||||
| 
 | ||||
|   void getItgData() async { | ||||
|     try { | ||||
|       Utils.showLoading(context); | ||||
|       itgRequest = await WorkListApiClient().getITGFormDetails(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, ""); | ||||
|       allowedActionList = itgRequest?.allowedActions ?? []; | ||||
|       if (allowedActionList.isNotEmpty) { | ||||
|         isCloseAvailable = allowedActionList.any((element) => element.action == "CLOSE"); | ||||
|         isApproveAvailable = itgRequest!.allowedActions!.any((element) => element.action == "Approve"); | ||||
|         // isAnswerAvailable = itgRequest!.allowedActions!.any((element) => element.action == "Answer"); | ||||
|         isRejectAvailable = itgRequest!.allowedActions!.any((element) => element.action == "Reject"); | ||||
|       } | ||||
|       Utils.hideLoading(context); | ||||
|       setState(() {}); | ||||
|     } catch (ex) { | ||||
|       Utils.hideLoading(context); | ||||
|       Utils.handleException(ex, context, null); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   void getDataFromState() { | ||||
|     if (requestDetails == null) { | ||||
|       requestDetails = AppState().requestAllList![AppState().itgWorkListIndex!]; // ModalRoute.of(context)!.settings.arguments as WorkListResponseModel; | ||||
|       getItgData(); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     getDataFromState(); | ||||
| 
 | ||||
|     return Scaffold( | ||||
|       appBar: AppBarWidget(context, title: LocaleKeys.details.tr()), | ||||
|       backgroundColor: Colors.white, | ||||
|       body: Stack( | ||||
|         children: [ | ||||
|           Column( | ||||
|             children: [ | ||||
|               Container( | ||||
|                 padding: const EdgeInsets.only(left: 21, right: 21, top: 16, bottom: 16), | ||||
|                 decoration: const BoxDecoration( | ||||
|                   borderRadius: BorderRadius.only( | ||||
|                     bottomLeft: Radius.circular(25), | ||||
|                     bottomRight: Radius.circular(25), | ||||
|                   ), | ||||
|                   gradient: LinearGradient( | ||||
|                     transform: GradientRotation(.83), | ||||
|                     begin: Alignment.topRight, | ||||
|                     end: Alignment.bottomLeft, | ||||
|                     colors: [ | ||||
|                       MyColors.gradiantEndColor, | ||||
|                       MyColors.gradiantStartColor, | ||||
|                     ], | ||||
|                   ), | ||||
|                 ), | ||||
|                 child: Row( | ||||
|                   children: [ | ||||
|                     myTab(LocaleKeys.requestDetails.tr(), 0), | ||||
|                     myTab(LocaleKeys.approvalLevel.tr(), 1), | ||||
|                     myTab(LocaleKeys.requesterDetails.tr(), 2), | ||||
|                   ], | ||||
|                 ), | ||||
|               ), | ||||
|               PageView( | ||||
|                 controller: controller, | ||||
|                 onPageChanged: (pageIndex) { | ||||
|                   setState(() { | ||||
|                     tabIndex = pageIndex; | ||||
|                   }); | ||||
|                 }, | ||||
|                 children: [ | ||||
|                   RequestDetailFragment(fields: itgRequest?.fieldGoups?[1].fields ?? []), | ||||
|                   ApprovalLevelfragment( | ||||
|                     wFHistory: itgRequest?.wFHistory ?? [], | ||||
|                   ), | ||||
|                   RequestDetailFragment(fields: itgRequest?.fieldGoups?[0].fields ?? []), | ||||
|                 ], | ||||
|               ).expanded, | ||||
|               if (isApproveAvailable || isRejectAvailable || isCloseAvailable) | ||||
|                 Container( | ||||
|                   padding: const EdgeInsets.only(top: 14, bottom: 14, left: 21, right: 21), | ||||
|                   decoration: const BoxDecoration( | ||||
|                     color: Colors.white, | ||||
|                     border: Border( | ||||
|                       top: BorderSide( | ||||
|                         color: MyColors.lightGreyEFColor, | ||||
|                         width: 1.0, | ||||
|                       ), | ||||
|                     ), | ||||
|                   ), | ||||
|                   child: Row( | ||||
|                     children: [ | ||||
|                       if (isRejectAvailable) | ||||
|                         DefaultButton( | ||||
|                           LocaleKeys.reject.tr(), | ||||
|                           () => performAction("REJECTED"), | ||||
|                           colors: const [ | ||||
|                             Color(0xffE47A7E), | ||||
|                             Color(0xffDE6D71), | ||||
|                           ], | ||||
|                         ).expanded, | ||||
|                       if (isApproveAvailable && isRejectAvailable) 8.width, | ||||
|                       if (isApproveAvailable) | ||||
|                         DefaultButton( | ||||
|                           LocaleKeys.approve.tr(), | ||||
|                           () => performAction("APPROVED"), | ||||
|                           colors: const [ | ||||
|                             Color(0xff28C884), | ||||
|                             Color(0xff1BB271), | ||||
|                           ], | ||||
|                         ).expanded, | ||||
|                       if (isCloseAvailable) | ||||
|                         DefaultButton( | ||||
|                           LocaleKeys.ok.tr(), | ||||
|                           () => performAction("CLOSE"), | ||||
|                           colors: const [ | ||||
|                             Color(0xff32D892), | ||||
|                             Color(0xff1AB170), | ||||
|                           ], | ||||
|                         ).expanded, | ||||
|                       8.width, | ||||
|                       Container( | ||||
|                         height: 43, | ||||
|                         width: 43, | ||||
|                         decoration: const BoxDecoration( | ||||
|                           shape: BoxShape.circle, | ||||
|                           color: MyColors.lightGreyE6Color, | ||||
|                         ), | ||||
|                         child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor), | ||||
|                       ).onPress(() { | ||||
|                         setState(() { | ||||
|                           showFabOptions = true; | ||||
|                         }); | ||||
|                       }) | ||||
|                     ], | ||||
|                   ), | ||||
|                 ) | ||||
|             ], | ||||
|           ), | ||||
|           IgnorePointer( | ||||
|             ignoring: !showFabOptions, | ||||
|             child: AnimatedOpacity( | ||||
|               opacity: showFabOptions ? 1 : 0, | ||||
|               duration: const Duration(milliseconds: 250), | ||||
|               child: Container( | ||||
|                 padding: const EdgeInsets.only(left: 21, right: 21, bottom: 75 - 12), | ||||
|                 width: double.infinity, | ||||
|                 height: double.infinity, | ||||
|                 color: Colors.white.withOpacity(.67), | ||||
|                 alignment: Alignment.bottomRight, | ||||
|                 child: Column( | ||||
|                   mainAxisSize: MainAxisSize.min, | ||||
|                   crossAxisAlignment: CrossAxisAlignment.end, | ||||
|                   children: [ | ||||
|                     myFab("Skip", "assets/images/skip.svg").onPress(() { | ||||
|                       // if (AppState().workList!.length - 1 > AppState().workListIndex!) { | ||||
|                       //   AppState().setWorkListIndex = AppState().workListIndex! + 1; | ||||
|                       //   workListData = null; | ||||
|                       //   showFabOptions = false; | ||||
|                       //   getDataFromState(); | ||||
|                       // } else if (AppState().workList!.length - 1 == AppState().workListIndex!) { | ||||
|                       //   Navigator.pop(context); | ||||
|                       // } | ||||
|                     }), | ||||
|                     12.height, | ||||
|                     ...viewApiButtonsList(allowedActionList), | ||||
|                   ], | ||||
|                 ), | ||||
|               ), | ||||
|             ).onPress(() { | ||||
|               setState(() { | ||||
|                 showFabOptions = false; | ||||
|               }); | ||||
|             }), | ||||
|           ), | ||||
|         ], | ||||
|       ), | ||||
|       floatingActionButton: (!isApproveAvailable && !isRejectAvailable && !isCloseAvailable) | ||||
|           ? Container( | ||||
|               height: 43, | ||||
|               width: 43, | ||||
|               decoration: const BoxDecoration( | ||||
|                 shape: BoxShape.circle, | ||||
|                 color: MyColors.lightGreyE6Color, | ||||
|               ), | ||||
|               child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor), | ||||
|             ).onPress(() { | ||||
|               setState(() { | ||||
|                 showFabOptions = true; | ||||
|               }); | ||||
|             }) | ||||
|           : null, | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   List<Widget> viewApiButtonsList(List<AllowedActions> allowedActionList) { | ||||
|     List<Widget> fabs = []; | ||||
|     for (int i = 0; i < allowedActionList.length; i++) { | ||||
|       if (allowedActionList[i].action! == "Reject" || allowedActionList[i].action! == "Approve" || allowedActionList[i].action! == "CLOSE") { | ||||
|         continue; | ||||
|       } | ||||
|       fabs.add(myFab(allowedActionList[i].action!, "", isIconAsset: false).paddingOnly(bottom: 12).onPress(() => handleFabAction(allowedActionList[i]))); | ||||
|     } | ||||
|     return fabs; | ||||
|   } | ||||
| 
 | ||||
|   void handleFabAction(AllowedActions action) { | ||||
|     switch (action.action) { | ||||
|       case "DELEGATE": | ||||
|         // do something | ||||
|         break; | ||||
|       case "REQUEST_INFO": | ||||
|         // do something else | ||||
|         break; | ||||
|       case "RFC": | ||||
|         // do something else | ||||
|         break; | ||||
|       case "UPDATE_ACTION": | ||||
|         // do something else | ||||
|         break; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   Widget myTab(String title, int index) { | ||||
|     bool isSelected = (index == tabIndex); | ||||
|     return Column( | ||||
|       mainAxisSize: MainAxisSize.min, | ||||
|       crossAxisAlignment: CrossAxisAlignment.center, | ||||
|       children: [ | ||||
|         title.toText12(color: isSelected ? Colors.white : Colors.white.withOpacity(.74), isCenter: true), | ||||
|         4.height, | ||||
|         Container( | ||||
|           height: 8, | ||||
|           width: 8, | ||||
|           decoration: BoxDecoration( | ||||
|             shape: BoxShape.circle, | ||||
|             color: isSelected ? Colors.white : Colors.transparent, | ||||
|           ), | ||||
|         ).onPress(() { | ||||
|           setState(() { | ||||
|             showFabOptions = true; | ||||
|           }); | ||||
|         }) | ||||
|       ], | ||||
|     ).onPress(() { | ||||
|       controller.jumpToPage(index); | ||||
|     }).expanded; | ||||
|   } | ||||
| 
 | ||||
|   Widget myFab(String title, String icon, {bool isIconAsset = true}) { | ||||
|     return Row( | ||||
|       mainAxisSize: MainAxisSize.min, | ||||
|       crossAxisAlignment: CrossAxisAlignment.center, | ||||
|       children: [ | ||||
|         title.toText16(), | ||||
|         14.width, | ||||
|         Container( | ||||
|           height: 43, | ||||
|           width: 43, | ||||
|           padding: const EdgeInsets.all(12), | ||||
|           decoration: const BoxDecoration( | ||||
|             shape: BoxShape.circle, | ||||
|             gradient: LinearGradient( | ||||
|               transform: GradientRotation(.46), | ||||
|               begin: Alignment.topRight, | ||||
|               end: Alignment.bottomLeft, | ||||
|               colors: [ | ||||
|                 MyColors.gradiantEndColor, | ||||
|                 MyColors.gradiantStartColor, | ||||
|               ], | ||||
|             ), | ||||
|           ), | ||||
|           child: isIconAsset | ||||
|               ? SvgPicture.asset(icon) | ||||
|               : Image.memory( | ||||
|                   base64Decode(icon), | ||||
|                   fit: BoxFit.cover, | ||||
|                 ), | ||||
|         ) | ||||
|       ], | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   void performAction(String actionMode) { | ||||
|     showDialog( | ||||
|       context: context, | ||||
|       builder: (cxt) => AcceptRejectInputDialog( | ||||
|         message: LocaleKeys.requestedItems.tr(), | ||||
|         //  notificationGetRespond: notificationNoteInput, | ||||
|         onTap: (note) { | ||||
|           Map<String, dynamic> payload = { | ||||
|             "P_ACTION_MODE": actionMode, | ||||
|             "P_APPROVER_INDEX": null, | ||||
|             "P_COMMENTS": "", | ||||
|             "P_FORWARD_TO_USER_NAME": "", | ||||
|             //  "P_NOTIFICATION_ID": workListData!.nOTIFICATIONID!, | ||||
|             "RespondAttributeList": [ | ||||
|               // if (notificationNoteInput != null) {notificationNoteInput!.attributeName: note} | ||||
|             ], | ||||
|           }; | ||||
| 
 | ||||
|           performNotificationAction(payload); | ||||
|         }, | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   void performNotificationAction(Map<String, dynamic> payload) async { | ||||
|     try { | ||||
|       Utils.showLoading(context); | ||||
|       GenericResponseModel model = await WorkListApiClient().postNotificationActions(payload); | ||||
|       Utils.hideLoading(context); | ||||
|       Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr()); | ||||
|       Navigator.pop(context, true); | ||||
|     } catch (ex) { | ||||
|       Utils.hideLoading(context); | ||||
|       Utils.handleException(ex, context, null); | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,128 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/models/itg_forms_models/wf_history_model.dart'; | ||||
| import 'package:mohem_flutter_app/ui/work_list/sheets/delegate_sheet.dart'; | ||||
| import 'package:mohem_flutter_app/ui/work_list/sheets/request_more_info_sheet.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/bottom_sheet.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/circular_avatar.dart'; | ||||
| 
 | ||||
| class ApprovalLevelfragment extends StatelessWidget { | ||||
|   List<WFHistory> wFHistory; | ||||
| 
 | ||||
|   ApprovalLevelfragment({Key? key, this.wFHistory = const <WFHistory>[]}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     if (wFHistory.isNotEmpty) wFHistory = wFHistory.reversed.toList(); | ||||
|     return Container( | ||||
|       width: double.infinity, | ||||
|       height: double.infinity, | ||||
|       child: ListView.separated( | ||||
|         itemCount: wFHistory.length, | ||||
|         padding: const EdgeInsets.all(21), | ||||
|         itemBuilder: (context, index) { | ||||
|           return showItem(context, wFHistory[index]); | ||||
|         }, | ||||
|         separatorBuilder: (BuildContext context, int index) { | ||||
|           return 12.height; | ||||
|         }, | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget showItem(BuildContext context, WFHistory history) { | ||||
|     return Container( | ||||
|       width: double.infinity, | ||||
|       decoration: BoxDecoration( | ||||
|         color: Colors.white, | ||||
|         borderRadius: BorderRadius.circular(10), | ||||
|         boxShadow: [ | ||||
|           BoxShadow( | ||||
|             color: const Color(0xff000000).withOpacity(.05), | ||||
|             blurRadius: 26, | ||||
|             offset: const Offset(0, -3), | ||||
|           ), | ||||
|         ], | ||||
|       ), | ||||
|       clipBehavior: Clip.antiAlias, | ||||
|       child: Stack( | ||||
|         clipBehavior: Clip.antiAlias, | ||||
|         children: [ | ||||
|           Positioned( | ||||
|             left: -20, | ||||
|             top: -10, | ||||
|             child: Transform.rotate( | ||||
|               angle: 15, | ||||
|               child: Container( | ||||
|                 width: 50, | ||||
|                 height: 30, | ||||
|                 color: getStatusColor(history.action!), | ||||
|               ), | ||||
|             ), | ||||
|           ), | ||||
|           Column( | ||||
|             children: [ | ||||
|               Row( | ||||
|                 crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                 children: [ | ||||
|                   CircularAvatar(url: null, isImageBase64: false, height: 34, width: 34), | ||||
|                   9.width, | ||||
|                   Expanded( | ||||
|                     child: Column( | ||||
|                       crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                       children: [ | ||||
|                         history.name!.toText16(), | ||||
|                         if ((history.notes ?? "").isNotEmpty) history.notes!.toText12(color: MyColors.grey57Color), | ||||
|                         4.height, | ||||
|                         Row( | ||||
|                           children: [ | ||||
|                             history.action!.toText10( | ||||
|                               color: getStatusColor(history.action!), | ||||
|                             ), | ||||
|                             8.width, | ||||
|                             if (history.date!.isNotEmpty) history.date!.toText12(color: MyColors.lightTextColor), | ||||
|                           ], | ||||
|                         ) | ||||
|                       ], | ||||
|                     ), | ||||
|                   ) | ||||
|                 ], | ||||
|               ).paddingOnly(top: 19, left: 16, right: 16, bottom: 12), | ||||
|               Container(width: double.infinity, height: 1, color: MyColors.lightGreyEFColor), | ||||
|               Row( | ||||
|                 children: [ | ||||
|                   LocaleKeys.request_info.tr().toText12(color: MyColors.grey67Color).center.paddingOnly(top: 6, bottom: 6).onPress(() { | ||||
|                     showMyBottomSheet(context, child: RequestMoreInfoSheet()); | ||||
|                   }).expanded, | ||||
|                   Container(width: 1, height: 30, color: MyColors.lightGreyEFColor), | ||||
|                   LocaleKeys.delegate.tr().toText12(color: MyColors.gradiantEndColor).center.paddingOnly(top: 6, bottom: 6).onPress(() { | ||||
|                     showMyBottomSheet(context, child: DelegateSheet()); | ||||
|                   }).expanded, | ||||
|                 ], | ||||
|               ), | ||||
|             ], | ||||
|           ), | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Color getStatusColor(String code) { | ||||
|     if (code == "SUBMIT") { | ||||
|       return const Color(0xff2E303A); | ||||
|     } else if (code == "REJECTED") { | ||||
|       return const Color(0xffD02127); | ||||
|     } else if (code == "APPROVED" || code == "Requested Information") { | ||||
|       return const Color(0xff1FA269); | ||||
|     } else if (code == "REQUEST_INFO") { | ||||
|       return const Color(0xff2E303A); | ||||
|     } else { | ||||
|       return const Color(0xff2E303A); | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,44 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/models/itg_forms_models/fields_model.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart'; | ||||
| 
 | ||||
| class RequestDetailFragment extends StatelessWidget { | ||||
|   List<Fields> fields; | ||||
| 
 | ||||
|   RequestDetailFragment({Key? key, this.fields = const <Fields>[]}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     List<Widget> uiList = [detailView()]; | ||||
|     return Container( | ||||
|       width: double.infinity, | ||||
|       height: double.infinity, | ||||
|       child: fields.isEmpty | ||||
|           ? LocaleKeys.noDataAvailable.tr().toText16().center | ||||
|           : ListView( | ||||
|               padding: const EdgeInsets.all(21), | ||||
|               children: uiList, | ||||
|             ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget detailView() { | ||||
|     return ListView.separated( | ||||
|             shrinkWrap: true, | ||||
|             physics: const NeverScrollableScrollPhysics(), | ||||
|             itemBuilder: (cxt, index) { | ||||
|               if (fields[index].value == null) { | ||||
|                 return ItemDetailView(fields[index].title!, fields[index].multipleValue?.join(", ") ?? ""); | ||||
|               } | ||||
|               return ItemDetailView(fields[index].title!, fields[index].value ?? ""); | ||||
|             }, | ||||
|             separatorBuilder: (cxt, index) => 4.height, | ||||
|             itemCount: fields.length) | ||||
|         .objectContainerView(); | ||||
|   } | ||||
| } | ||||
| @ -1,61 +0,0 @@ | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter_svg/flutter_svg.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| 
 | ||||
| class AttachmentsFragment extends StatelessWidget { | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Container( | ||||
|       width: double.infinity, | ||||
|       height: double.infinity, | ||||
|       child: ListView.separated( | ||||
|         itemCount: 2, | ||||
|         padding: EdgeInsets.all(21), | ||||
|         itemBuilder: (context, index) { | ||||
|           return showItem(attachmentsList[index]); | ||||
|         }, | ||||
|         separatorBuilder: (BuildContext context, int index) { | ||||
|           return 21.height; | ||||
|         }, | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget showItem(Attachments attachments) { | ||||
|     return Container( | ||||
|       width: double.infinity, | ||||
|       padding: EdgeInsets.all(21), | ||||
|       decoration: BoxDecoration( | ||||
|         color: Colors.white, | ||||
|         borderRadius: BorderRadius.circular(15), | ||||
|         boxShadow: [ | ||||
|           BoxShadow( | ||||
|             color: const Color(0xff000000).withOpacity(.05), | ||||
|             blurRadius: 26, | ||||
|             offset: const Offset(0, -3), | ||||
|           ), | ||||
|         ], | ||||
|       ), | ||||
|       child: Row( | ||||
|         children: [ | ||||
|           SvgPicture.asset(attachments.icon), | ||||
|           12.width, | ||||
|           attachments.title.toText16() | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class Attachments { | ||||
|   String title; | ||||
|   String icon; | ||||
| 
 | ||||
|   Attachments(this.title, this.icon); | ||||
| } | ||||
| 
 | ||||
| List<Attachments> attachmentsList = [ | ||||
|   Attachments("Attachment File Name.png", "assets/images/png.svg"), | ||||
|   Attachments("Attachment File Name.pdf", "assets/images/pdf.svg"), | ||||
| ]; | ||||
| @ -1,80 +0,0 @@ | ||||
| import 'package:easy_localization/src/public_ext.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/classes/date_uitl.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_absence_collection_notification_body_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_stamp_ms_notification_body_list_model.dart'; | ||||
| 
 | ||||
| class InfoFragment extends StatelessWidget { | ||||
|   List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotifications; | ||||
|   List<GetStampMsNotificationBodyList>? getStampNotifications; | ||||
| 
 | ||||
|   InfoFragment({this.getAbsenceCollectionNotifications, this.getStampNotifications}); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Container( | ||||
|       width: double.infinity, | ||||
|       height: double.infinity, | ||||
|       child: ListView( | ||||
|         padding: const EdgeInsets.all(21), | ||||
|         children: [ | ||||
|           if ((getAbsenceCollectionNotifications?.length ?? 0) > 0) | ||||
|             getAbsenceCollectionNotificationsListView(getAbsenceCollectionNotifications ?? []).objectContainerView(title: "Absence Notifications"), | ||||
|           if ((getStampNotifications?.length ?? 0) > 0) getStampNotificationsListView(getStampNotifications ?? []).objectContainerView(title: "Stamp Notifications") | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget getAbsenceCollectionNotificationsListView(List<GetAbsenceCollectionNotificationBodyList> list) { | ||||
|     List<CollectionNotification> dataList = list.isEmpty ? [] : (list.first.collectionNotification ?? []); | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => detailListItem(dataList[index].sEGMENTPROMPT!, dataList[index].sEGMENTVALUEDSP!), | ||||
|         separatorBuilder: (cxt, index) => 4.height, | ||||
|         itemCount: dataList.length); | ||||
|   } | ||||
| 
 | ||||
|   Widget getStampNotificationsListView(List<GetStampMsNotificationBodyList> list) { | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => Column( | ||||
|               mainAxisSize: MainAxisSize.min, | ||||
|               children: [ | ||||
|                 detailListItem(LocaleKeys.employeeNumber.tr(), list[index].eMPLOYEENUMBER.toString()), | ||||
|                 detailListItem(LocaleKeys.assignmentNumber.tr(), list[index].aSSIGNMENTNUMBER.toString()), | ||||
|                 detailListItem(LocaleKeys.employeeName.tr(), list[index].eMPLOYEENAME.toString()), | ||||
|                 detailListItem(LocaleKeys.scheduleDate.tr(), DateUtil.formatDateToDate(DateUtil.convertStringToDate(list[index].sCHEDULEDATE.toString()), false)), | ||||
|                 detailListItem(LocaleKeys.shiftType.tr(), list[index].sHTTYPEDESC.toString()), | ||||
|                 detailListItem(LocaleKeys.shift.tr(), list[index].sHTNAME.toString()), | ||||
|                 detailListItem(LocaleKeys.breakText.tr(), list[index].bREAKNAME.toString()), | ||||
|                 detailListItem(LocaleKeys.actualSwipeStart.tr(), list[index].sHTACTUALSTARTTIME.toString()), | ||||
|                 detailListItem(LocaleKeys.actualSwipeEnd.tr(), list[index].sHTACTUALENDTIME.toString()), | ||||
|                 detailListItem(LocaleKeys.approvedSwipeStart.tr(), list[index].aPPROVEDSTARTTIME.toString()), | ||||
|                 detailListItem(LocaleKeys.approvedSwipeStartReason.tr(), list[index].aPPROVEDSTARTREASON.toString()), | ||||
|                 detailListItem(LocaleKeys.approvedSwipeEnd.tr(), ""), | ||||
|                 detailListItem(LocaleKeys.approvedSwipeEndReason.tr(), list[index].aPPROVEDENDREASONDESC.toString()), | ||||
|               ], | ||||
|             ), | ||||
|         separatorBuilder: (cxt, index) => 18.height, | ||||
|         itemCount: list.length); | ||||
|   } | ||||
| 
 | ||||
|   Widget detailListItem(String title, String value) { | ||||
|     return Row( | ||||
|       crossAxisAlignment: CrossAxisAlignment.start, | ||||
|       children: [ | ||||
|         "$title:".toText12(isBold: true, color: const Color(0xff2D3238)), | ||||
|         6.width, | ||||
|         (value.isEmpty ? "--" : value).toText12(color: MyColors.normalTextColor).expanded, | ||||
|       ], | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -1,86 +0,0 @@ | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| 
 | ||||
| class RequestFragment extends StatefulWidget { | ||||
|   @override | ||||
|   State<RequestFragment> createState() => _RequestFragmentState(); | ||||
| } | ||||
| 
 | ||||
| class _RequestFragmentState extends State<RequestFragment> { | ||||
|   bool isOpened = false; | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Container( | ||||
|       width: double.infinity, | ||||
|       height: double.infinity, | ||||
|       child: Column( | ||||
|         children: [ | ||||
|           Container( | ||||
|             width: double.infinity, | ||||
|             decoration: BoxDecoration( | ||||
|               color: Colors.white, | ||||
|               borderRadius: BorderRadius.circular(15), | ||||
|               boxShadow: [ | ||||
|                 BoxShadow( | ||||
|                   color: const Color(0xff000000).withOpacity(.05), | ||||
|                   blurRadius: 26, | ||||
|                   offset: const Offset(0, -3), | ||||
|                 ), | ||||
|               ], | ||||
|             ), | ||||
|             margin: EdgeInsets.all(21), | ||||
|             padding: EdgeInsets.only(top: 21, bottom: 21, right: 16, left: 16), | ||||
|             child: Column( | ||||
|               children: [ | ||||
|                 Row( | ||||
|                   children: [ | ||||
|                     Expanded( | ||||
|                       child: "Hardware Mobility 161 Messenger".toText16(), | ||||
|                     ), | ||||
|                     Icon(Icons.keyboard_arrow_down_rounded), | ||||
|                   ], | ||||
|                 ), | ||||
|                 Column( | ||||
|                   children: [ | ||||
|                     12.height, | ||||
|                     showItem("Code:", "3188000067"), | ||||
|                     showItem("Quantity:", "1"), | ||||
|                     showItem("Line Status:", "Pending Approval"), | ||||
|                     showItem("Transection Type:", "Move Order Issue:"), | ||||
|                     showItem("Organization Code:", "SWD"), | ||||
|                     showItem("From Subinventory:", "SWD_MSPS"), | ||||
|                     showItem("To Subinventory:", "SWD_MSPS"), | ||||
|                     showItem("Ship To Location :", "SWD 11206-E.R. (Emergency Room)"), | ||||
|                     showItem("Unit:", "Each"), | ||||
|                     showItem("Date Required:", "12/23/2019 4:54:04 PM"), | ||||
|                     showItem("Status Date:", "12/23/2019 4:54:04 PM"), | ||||
|                     showItem("Operation Unit:", "Sehat Al Sewedi"), | ||||
|                     showItem("Organization:", "Sehat Al Sewedi"), | ||||
|                     showItem("From Locator:", "-"), | ||||
|                     showItem("To Locator :", "-"), | ||||
|                   ], | ||||
|                 ), | ||||
|               ], | ||||
|             ), | ||||
|           ), | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget showItem(String title, String value) { | ||||
|     return Padding( | ||||
|       padding: const EdgeInsets.only(top: 2, bottom: 2), | ||||
|       child: Row( | ||||
|         children: [ | ||||
|           title.toText12(isBold: true), | ||||
|           6.width, | ||||
|           title.toText12(isBold: false, color: MyColors.normalTextColor), | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,54 @@ | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter_svg/flutter_svg.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_attachement_list_model.dart'; | ||||
| 
 | ||||
| class AttachmentsFragment extends StatelessWidget { | ||||
|   final List<GetAttachementList> getAttachmentList; | ||||
| 
 | ||||
|   AttachmentsFragment(this.getAttachmentList); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return ListView.separated( | ||||
|       itemCount: getAttachmentList.length, | ||||
|       itemBuilder: (context, index) { | ||||
|         return Row( | ||||
|           children: [ | ||||
|             SvgPicture.asset(determineFileIcon(getAttachmentList[index].fILECONTENTTYPE ?? "")), | ||||
|             12.width, | ||||
|             (getAttachmentList[index].fILENAME?.capitalizeFirstofEach ?? "").toText16().expanded, | ||||
|           ], | ||||
|         ).objectContainerView().onPress(() {}); | ||||
|       }, | ||||
|       separatorBuilder: (BuildContext context, int index) => 12.height, | ||||
|     ).paddingAll(21); | ||||
|   } | ||||
| 
 | ||||
|   String determineFileIcon(String fileContentType) { | ||||
|     String icon = ""; | ||||
|     switch (fileContentType) { | ||||
|       case "pdf": | ||||
|         icon = "assets/images/pdf.svg"; | ||||
|         break; | ||||
|       case "xls": | ||||
|         icon = "assets/images/xls.svg"; | ||||
|         break; | ||||
|       case "xlsx": | ||||
|         icon = "assets/images/xls.svg"; | ||||
|         break; | ||||
|       case "png": | ||||
|         icon = "assets/images/png.svg"; | ||||
|         break; | ||||
|       case "jpg": | ||||
|         icon = "assets/images/jpg.svg"; | ||||
|         break; | ||||
|       case "jpeg": | ||||
|         icon = "assets/images/jpg.svg"; | ||||
|         break; | ||||
|     } | ||||
|     return icon; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,180 @@ | ||||
| import 'package:easy_localization/src/public_ext.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/classes/date_uitl.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_absence_collection_notification_body_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_item_creation_ntf_body_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_po_notification_body_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_stamp_ms_notification_body_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/worklist_response_model.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart'; | ||||
| 
 | ||||
| class InfoFragment extends StatelessWidget { | ||||
|   WorkListResponseModel? workListData; | ||||
|   List<POHeader> poHeaderList; | ||||
|   List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotifications; | ||||
|   List<GetStampMsNotificationBodyList>? getStampMsNotifications; | ||||
|   List<GetStampNsNotificationBodyList>? getStampNsNotifications; | ||||
|   List<ItemCreationHeader> itemCreationHeader; | ||||
| 
 | ||||
|   InfoFragment( | ||||
|       {this.workListData, | ||||
|       this.poHeaderList = const <POHeader>[], | ||||
|       this.itemCreationHeader = const <ItemCreationHeader>[], | ||||
|       this.getAbsenceCollectionNotifications, | ||||
|       this.getStampMsNotifications, | ||||
|       this.getStampNsNotifications}); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     List<Widget> uiList = [ | ||||
|       if ((workListData?.iTEMTYPE ?? "") == "INVMOA") | ||||
|         Column( | ||||
|           crossAxisAlignment: CrossAxisAlignment.start, | ||||
|           mainAxisSize: MainAxisSize.min, | ||||
|           children: [ | ||||
|             ItemDetailView(LocaleKeys.from.tr(), workListData!.fROMUSER ?? ""), | ||||
|             ItemDetailView(LocaleKeys.to.tr(), workListData!.tOUSER ?? ""), | ||||
|             ItemDetailView(LocaleKeys.sent.tr(), workListData!.bEGINDATE ?? ""), | ||||
|             ItemDetailView(LocaleKeys.closed.tr(), workListData!.eNDDATE ?? ""), | ||||
|             ItemDetailView(LocaleKeys.id.tr(), workListData!.nOTIFICATIONID?.toString() ?? ""), | ||||
|             ItemDetailView(LocaleKeys.responder.tr(), workListData!.rESPONDER ?? ""), | ||||
|             ItemDetailView(LocaleKeys.subject.tr(), workListData!.sUBJECT ?? ""), | ||||
|           ], | ||||
|         ).objectContainerView(), | ||||
|       if ((getAbsenceCollectionNotifications?.length ?? 0) > 0) getAbsenceCollectionNotificationsListView(getAbsenceCollectionNotifications ?? []).objectContainerView(title: "Absence Notifications"), | ||||
|       if (getStampMsNotifications?.isNotEmpty ?? false) getStampMsNotificationsListView(getStampMsNotifications ?? []).objectContainerView(title: "Stamp Notifications"), | ||||
|       if (getStampNsNotifications?.isNotEmpty ?? false) getStampNsNotificationsListView(getStampNsNotifications ?? []).objectContainerView(title: "Stamp Notifications"), | ||||
|       if (poHeaderList.isNotEmpty) getPoNotificationsListView(), | ||||
|       if (itemCreationHeader.isNotEmpty) getItemCreationHeaderView() | ||||
|     ]; | ||||
|     return Container( | ||||
|       width: double.infinity, | ||||
|       height: double.infinity, | ||||
|       child: uiList.isEmpty | ||||
|           ? LocaleKeys.noDataAvailable.tr().toText16().center | ||||
|           : ListView( | ||||
|               padding: const EdgeInsets.all(21), | ||||
|               children: uiList, | ||||
|             ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget getPoNotificationsListView() { | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => Column( | ||||
|               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|               mainAxisSize: MainAxisSize.min, | ||||
|               children: [ | ||||
|                 ItemDetailView(LocaleKeys.description.tr(), workListData!.fROMUSER ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.from.tr(), workListData!.fROMUSER ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.to.tr(), workListData!.tOUSER ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.sent.tr(), workListData!.bEGINDATE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.closed.tr(), workListData!.eNDDATE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.id.tr(), workListData!.nOTIFICATIONID?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.supplier.tr(), poHeaderList[index].vENDORNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.site.tr(), poHeaderList[index].vENDORSITECODE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.buyer.tr(), poHeaderList[index].bUYER ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.preparer.tr(), poHeaderList[index].pREPARER ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.creationDate.tr(), poHeaderList[index].cREATIONDATE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.shipToLocation.tr(), poHeaderList[index].sHIPTOLOCATIONNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quotationNumber.tr(), poHeaderList[index].qUOTATIONNUMBER ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quotationDate.tr(), poHeaderList[index].qUOTATIONDATE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.paymentTerms.tr(), poHeaderList[index].pAYMENTTERMS ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.currency.tr(), poHeaderList[index].cURRENCYNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.grossAmount.tr(), poHeaderList[index].gROSSAMOUNT?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.discountAmount.tr(), poHeaderList[index].dISCOUNTAMOUNT?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.customDuty.tr(), poHeaderList[index].cUSTOMDUTY?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.shipHandle.tr(), poHeaderList[index].sHIPHANDLE?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.otherCharges.tr(), poHeaderList[index].oTHERCHARGES?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.totalPOAmountWithVAT.tr(), poHeaderList[index].qUOTATIONDATE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.totalPOAmountInWords.tr(), poHeaderList[index].tOTPOAMTWORD ?? ""), | ||||
|               ], | ||||
|             ).objectContainerView(), | ||||
|         separatorBuilder: (cxt, index) => 4.height, | ||||
|         itemCount: poHeaderList.length); | ||||
|   } | ||||
| 
 | ||||
|   Widget getAbsenceCollectionNotificationsListView(List<GetAbsenceCollectionNotificationBodyList> list) { | ||||
|     List<CollectionNotification> dataList = list.isEmpty ? [] : (list.first.collectionNotification ?? []); | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => ItemDetailView(dataList[index].sEGMENTPROMPT!, dataList[index].sEGMENTVALUEDSP!), | ||||
|         separatorBuilder: (cxt, index) => 4.height, | ||||
|         itemCount: dataList.length); | ||||
|   } | ||||
| 
 | ||||
|   Widget getStampMsNotificationsListView(List<GetStampMsNotificationBodyList> list) { | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => Column( | ||||
|               mainAxisSize: MainAxisSize.min, | ||||
|               children: [ | ||||
|                 ItemDetailView(LocaleKeys.employeeNumber.tr(), list[index].eMPLOYEENUMBER.toString()), | ||||
|                 ItemDetailView(LocaleKeys.assignmentNumber.tr(), list[index].aSSIGNMENTNUMBER.toString()), | ||||
|                 ItemDetailView(LocaleKeys.employeeName.tr(), list[index].eMPLOYEENAME.toString()), | ||||
|                 ItemDetailView(LocaleKeys.scheduleDate.tr(), DateUtil.formatDateToDate(DateUtil.convertStringToDate(list[index].sCHEDULEDATE.toString()), false)), | ||||
|                 ItemDetailView(LocaleKeys.shiftType.tr(), list[index].sHTTYPEDESC.toString()), | ||||
|                 ItemDetailView(LocaleKeys.shift.tr(), list[index].sHTNAME.toString()), | ||||
|                 ItemDetailView(LocaleKeys.breakText.tr(), list[index].bREAKNAME.toString()), | ||||
|                 ItemDetailView(LocaleKeys.actualSwipeStart.tr(), list[index].sHTACTUALSTARTTIME.toString()), | ||||
|                 ItemDetailView(LocaleKeys.actualSwipeEnd.tr(), list[index].sHTACTUALENDTIME.toString()), | ||||
|                 ItemDetailView(LocaleKeys.approvedSwipeStart.tr(), list[index].aPPROVEDSTARTTIME.toString()), | ||||
|                 ItemDetailView(LocaleKeys.approvedSwipeStartReason.tr(), list[index].aPPROVEDSTARTREASON.toString()), | ||||
|                 ItemDetailView(LocaleKeys.approvedSwipeEnd.tr(), ""), | ||||
|                 ItemDetailView(LocaleKeys.approvedSwipeEndReason.tr(), list[index].aPPROVEDENDREASONDESC.toString()), | ||||
|               ], | ||||
|             ), | ||||
|         separatorBuilder: (cxt, index) => 18.height, | ||||
|         itemCount: list.length); | ||||
|   } | ||||
| 
 | ||||
|   Widget getStampNsNotificationsListView(List<GetStampNsNotificationBodyList> list) { | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => Column( | ||||
|               mainAxisSize: MainAxisSize.min, | ||||
|               children: [ | ||||
|                 ItemDetailView(LocaleKeys.employeeNumber.tr(), list[index].eMPLOYEENUMBER.toString()), | ||||
|                 ItemDetailView(LocaleKeys.assignmentNumber.tr(), list[index].aSSIGNMENTNUMBER.toString()), | ||||
|                 ItemDetailView(LocaleKeys.employeeName.tr(), list[index].eMPLOYEENAME.toString()), | ||||
|                 ItemDetailView(LocaleKeys.scheduleDate.tr(), DateUtil.formatDateToDate(DateUtil.convertStringToDate(list[index].sCHEDULEDATE.toString()), false)), | ||||
|               ], | ||||
|             ), | ||||
|         separatorBuilder: (cxt, index) => 18.height, | ||||
|         itemCount: list.length); | ||||
|   } | ||||
| 
 | ||||
|   Widget getItemCreationHeaderView() { | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => Column( | ||||
|               mainAxisSize: MainAxisSize.min, | ||||
|               children: [ | ||||
|                 ItemDetailView(LocaleKeys.operatingUnit.tr(), itemCreationHeader[index].oPERATINGUNIT?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.category.tr(), itemCreationHeader[index].cATEGORY?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.requester.tr(), itemCreationHeader[index].rEQUESTER?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.analyzedBy.tr(), itemCreationHeader[index].aNALYZEDBY?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.approvedDate.tr(), itemCreationHeader[index].aPPROVEDDATE?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.itemType.tr(), itemCreationHeader[index].iTEMTYPE?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.relatedTo.tr(), itemCreationHeader[index].rELATEDTO?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.requestDate.tr(), DateUtil.formatDateToDate(DateUtil.convertStringToDate(itemCreationHeader[index].rEQUESTDATE.toString()), false) ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.analyzedDate.tr(), itemCreationHeader[index].aNALYZEDDATE?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.urgent.tr(), itemCreationHeader[index].uRGENTFLAGDISP?.toString() ?? ""), | ||||
|               ], | ||||
|             ).objectContainerView(), | ||||
|         separatorBuilder: (cxt, index) => 18.height, | ||||
|         itemCount: itemCreationHeader.length); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,159 @@ | ||||
| import 'package:easy_localization/src/public_ext.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/config/routes.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_item_creation_ntf_body_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_mo_notification_body_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_po_notification_body_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/ui/work_list/item_history_screen.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/button/default_button.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart'; | ||||
| 
 | ||||
| class RequestFragment extends StatelessWidget { | ||||
|   final List<GetMoNotificationBodyList> moNotificationBodyList; | ||||
|   final List<ItemCreationLines> itemCreationLines; | ||||
|   final List<POLines> poLinesList; | ||||
| 
 | ||||
|   RequestFragment({ | ||||
|     Key? key, | ||||
|     this.moNotificationBodyList = const <GetMoNotificationBodyList>[], | ||||
|     this.itemCreationLines = const <ItemCreationLines>[], | ||||
|     this.poLinesList = const <POLines>[], | ||||
|   }) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return ListView( | ||||
|       physics: const BouncingScrollPhysics(), | ||||
|       padding: const EdgeInsets.all(21), | ||||
|       children: [ | ||||
|         if (moNotificationBodyList.isNotEmpty) moNotificationDataView(), | ||||
|         if (poLinesList.isNotEmpty) poLinesDataView(), | ||||
|         if (itemCreationLines.isNotEmpty) itemCreationLinesView(), | ||||
|       ], | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget poLinesDataView() { | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => Column( | ||||
|               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|               mainAxisSize: MainAxisSize.min, | ||||
|               children: [ | ||||
|                 ItemDetailView(LocaleKeys.code.tr(), poLinesList[index].iTEMCODE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.mfg.tr(), poLinesList[index].uOM ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.lineType.tr(), poLinesList[index].qUANTITY?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.unit.tr(), poLinesList[index].uOM ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.price.tr(), poLinesList[index].uNITPRICE?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.lineAmount.tr(), poLinesList[index].lINEAMOUNT?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quantity.tr(), poLinesList[index].qUANTITY?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.lineDiscount.tr(), poLinesList[index].lINEDISCPERCENTAGE?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.needByDate.tr(), poLinesList[index].nEEDBYDATE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.promisedDate.tr(), poLinesList[index].pROMISEDDATE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.deliverToLocation.tr(), poLinesList[index].dELIVERTOLOCATION ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.requisitionNumber.tr(), poLinesList[index].rEQUESTOR ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.requester.tr(), poLinesList[index].pRNUM ?? ""), | ||||
|                 12.height, | ||||
|                 Row( | ||||
|                   children: [ | ||||
|                     DefaultButton(LocaleKeys.itemHistory.tr(), () { | ||||
|                       Navigator.pushNamed( | ||||
|                         cxt, | ||||
|                         AppRoutes.itemHistory, | ||||
|                         arguments: ItemHistoryScreenParams(title: LocaleKeys.itemHistory.tr(), isMO: false, pItemId: poLinesList[index].iTEMID), | ||||
|                       ); | ||||
|                     }).expanded, | ||||
|                     12.width, | ||||
|                     DefaultButton(LocaleKeys.quotationAnalysis.tr(), () { | ||||
|                       Navigator.pushNamed( | ||||
|                         cxt, | ||||
|                         AppRoutes.itemHistory, | ||||
|                         arguments: ItemHistoryScreenParams( | ||||
|                             isItemHistory: false, isMO: false, title: LocaleKeys.quotationAnalysis.tr(), pItemId: poLinesList[index].iTEMID, pPoHeaderId: poLinesList[index].pOHEADERID), | ||||
|                       ); | ||||
|                     }).expanded, | ||||
|                   ], | ||||
|                 ) | ||||
|               ], | ||||
|             ).objectContainerView(title: poLinesList[index].iTEMDESCRIPTION!), | ||||
|         separatorBuilder: (cxt, index) => 12.height, | ||||
|         itemCount: poLinesList.length); | ||||
|   } | ||||
| 
 | ||||
|   Widget moNotificationDataView() { | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => Column( | ||||
|               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|               mainAxisSize: MainAxisSize.min, | ||||
|               children: [ | ||||
|                 ItemDetailView(LocaleKeys.code.tr(), moNotificationBodyList[index].iTEMCODE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.unit.tr(), moNotificationBodyList[index].uOM ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.quantity.tr(), moNotificationBodyList[index].qUANTITY?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.dateRequired.tr(), moNotificationBodyList[index].dATEREQUIRED ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.lineStatus.tr(), moNotificationBodyList[index].lINESTATUS ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.statusDate.tr(), moNotificationBodyList[index].sTATUSDATE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.transactionType.tr(), moNotificationBodyList[index].tRANSACTIONTYPENAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.operatingUnit.tr(), moNotificationBodyList[index].oPERATINGUNIT ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.organizationCode.tr(), moNotificationBodyList[index].oRGANIZATIONCODE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.organization.tr(), moNotificationBodyList[index].oRGANIZATIONNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.fromSubInventory.tr(), moNotificationBodyList[index].fROMSUBINVENTORY ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.fromLocator.tr(), moNotificationBodyList[index].fROMLOCATOR ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.toSubInventory.tr(), moNotificationBodyList[index].tOSUBINVENTORY ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.toLocator.tr(), moNotificationBodyList[index].tOLOCATOR ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.shipToLocator.tr(), moNotificationBodyList[index].sHIPTOLOCATION ?? ""), | ||||
|                 12.height, | ||||
|                 DefaultButton(LocaleKeys.itemHistory.tr(), () { | ||||
|                   Navigator.pushNamed( | ||||
|                     cxt, | ||||
|                     AppRoutes.itemHistory, | ||||
|                     arguments: ItemHistoryScreenParams(title: LocaleKeys.itemHistory.tr(), pItemId: moNotificationBodyList[index].iTEMID, pOrgId: moNotificationBodyList[index].oRGID), | ||||
|                   ); | ||||
|                 }) | ||||
|               ], | ||||
|             ).objectContainerView(title: moNotificationBodyList[index].dESCRIPTION ?? ""), | ||||
|         separatorBuilder: (cxt, index) => 12.height, | ||||
|         itemCount: moNotificationBodyList.length); | ||||
|   } | ||||
| 
 | ||||
|   Widget itemCreationLinesView() { | ||||
|     return ListView.separated( | ||||
|         shrinkWrap: true, | ||||
|         physics: const NeverScrollableScrollPhysics(), | ||||
|         itemBuilder: (cxt, index) => Column( | ||||
|               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|               mainAxisSize: MainAxisSize.min, | ||||
|               children: [ | ||||
|                 ItemDetailView(LocaleKeys.productName.tr(), itemCreationLines[index].pRODUCTNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.productDescription.tr(), itemCreationLines[index].pRODUCTDESCRIPTION ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.unitPrice.tr(), itemCreationLines[index].uNITPRICE?.toString() ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.manufacturerName.tr(), itemCreationLines[index].uSERMANUFACTURERNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.manufacturerPartName.tr(), itemCreationLines[index].uSERMFGPARTNUM ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.supplierName.tr(), itemCreationLines[index].sUPPLIERNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.supplierContact.tr(), itemCreationLines[index].sUPPLIERCONTACT ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.chargeToPatient.tr(), itemCreationLines[index].cHARGETOPATIENT ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.justification.tr(), itemCreationLines[index].jUSTIFICATION ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.itemCode.tr(), itemCreationLines[index].iTEMCODE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.itemDescription.tr(), itemCreationLines[index].iTEMDESCRIPTION ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.groupCode.tr(), itemCreationLines[index].iTEMGROUPCODE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.groupDescription.tr(), itemCreationLines[index].iTEMGROUP ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.subgroupCode.tr(), itemCreationLines[index].iTEMSUBGROUPCODE ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.subgroupDescription.tr(), itemCreationLines[index].iTEMSUBGROUP ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.primaryUOM.tr(), itemCreationLines[index].pRIMARYUOM ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.manufacturerName.tr(), itemCreationLines[index].sTANDARDMANUFACTURERNAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.manufacturerPartName.tr(), itemCreationLines[index].sTANDARDMFGPARTNUM ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.templateName.tr(), itemCreationLines[index].tEMPLATENAME ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.itemCreationStatus.tr(), itemCreationLines[index].iTEMCREATIONSTATUS ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.standardizationApprovalStatus.tr(), itemCreationLines[index].sTANDARDSTATUS ?? ""), | ||||
|                 ItemDetailView(LocaleKeys.standardizationApprovalRejectionReason.tr(), itemCreationLines[index].sTANDARDREJECTREASON ?? ""), | ||||
|               ], | ||||
|             ).objectContainerView(title: itemCreationLines[index].iTEMDESCRIPTION!), | ||||
|         separatorBuilder: (cxt, index) => 12.height, | ||||
|         itemCount: itemCreationLines.length); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,103 @@ | ||||
| import 'package:easy_localization/src/public_ext.dart'; | ||||
| import 'package:flutter/cupertino.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/models/notification_get_respond_attributes_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/button/default_button.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/input_widget.dart'; | ||||
| 
 | ||||
| class AcceptRejectInputDialog extends StatelessWidget { | ||||
|   final String? title; | ||||
|   final String? message; | ||||
|   final String? okTitle; | ||||
|   final NotificationGetRespondAttributesList? notificationGetRespond; | ||||
|   final Function(String) onTap; | ||||
| 
 | ||||
|   AcceptRejectInputDialog({Key? key, this.title, @required this.message, this.okTitle, required this.onTap, this.notificationGetRespond}) : super(key: key); | ||||
| 
 | ||||
|   String note = ""; | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Dialog( | ||||
|       backgroundColor: Colors.white, | ||||
|       shape: const RoundedRectangleBorder(), | ||||
|       insetPadding: const EdgeInsets.only(left: 21, right: 21), | ||||
|       child: Padding( | ||||
|         padding: const EdgeInsets.only(left: 20, right: 20, top: 18, bottom: 28), | ||||
|         child: Column( | ||||
|           crossAxisAlignment: CrossAxisAlignment.start, | ||||
|           mainAxisSize: MainAxisSize.min, | ||||
|           children: [ | ||||
|             Row( | ||||
|               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|               children: [ | ||||
|                 Expanded( | ||||
|                   child: Padding( | ||||
|                     padding: const EdgeInsets.only(top: 16.0), | ||||
|                     child: Text( | ||||
|                       title ?? LocaleKeys.confirm.tr(), | ||||
|                       style: const TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Color(0xff2B353E), height: 35 / 24, letterSpacing: -0.96), | ||||
|                     ), | ||||
|                   ), | ||||
|                 ), | ||||
|                 IconButton( | ||||
|                   padding: EdgeInsets.zero, | ||||
|                   icon: const Icon(Icons.close), | ||||
|                   color: const Color(0xff2B353E), | ||||
|                   constraints: const BoxConstraints(), | ||||
|                   onPressed: () { | ||||
|                     Navigator.pop(context); | ||||
|                   }, | ||||
|                 ) | ||||
|               ], | ||||
|             ), | ||||
|             Text( | ||||
|               message ?? "", | ||||
|               style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff808080), letterSpacing: -0.48), | ||||
|             ), | ||||
|             if (notificationGetRespond != null) ...[ | ||||
|               14.height, | ||||
|               InputWidget( | ||||
|                 "Enter a Note", | ||||
|                 notificationGetRespond!.attributeDisplayName!, | ||||
|                 TextEditingController(), | ||||
|                 isBackgroundEnable: true, | ||||
|                 lines: 3, | ||||
|                 onChange: (String note) { | ||||
|                   this.note = note; | ||||
|                 }, | ||||
|               ), | ||||
|             ], | ||||
|             28.height, | ||||
|             Row( | ||||
|               children: [ | ||||
|                 DefaultButton( | ||||
|                   LocaleKeys.cancel.tr(), | ||||
|                   () => Navigator.pop(context), | ||||
|                   colors: const [MyColors.lightGreyEAColor, MyColors.lightGreyEAColor], | ||||
|                   textColor: MyColors.darkTextColor, | ||||
|                 ).expanded, | ||||
|                 10.width, | ||||
|                 DefaultButton( | ||||
|                   LocaleKeys.ok.tr(), | ||||
|                   () { | ||||
|                     Navigator.pop(context); | ||||
|                     onTap(note); | ||||
|                   }, | ||||
|                   colors: const [ | ||||
|                     Color(0xff28C884), | ||||
|                     Color(0xff1BB271), | ||||
|                   ], | ||||
|                 ).expanded, | ||||
|               ], | ||||
|             ), | ||||
|           ], | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,23 @@ | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | ||||
| 
 | ||||
| class ItemDetailView extends StatelessWidget { | ||||
|   final String title; | ||||
|   final String value; | ||||
|   const ItemDetailView(this.title, this.value, {Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Row( | ||||
|       crossAxisAlignment: CrossAxisAlignment.start, | ||||
|       children: [ | ||||
|         "$title:".toText12(isBold: true, color: const Color(0xff2D3238)), | ||||
|         6.width, | ||||
|         (value.isEmpty ? "--" : value).toText12(color: MyColors.normalTextColor).expanded, | ||||
|       ], | ||||
|     ); | ||||
|   } | ||||
| } | ||||
					Loading…
					
					
				
		Reference in New Issue