diff --git a/assets/images/drSchedul.png b/assets/images/drSchedul.png new file mode 100644 index 00000000..4bb95607 Binary files /dev/null and b/assets/images/drSchedul.png differ diff --git a/assets/images/new-design/doctor_white.png b/assets/images/new-design/doctor_white.png new file mode 100644 index 00000000..bb5944cb Binary files /dev/null and b/assets/images/new-design/doctor_white.png differ diff --git a/assets/json/covid-drive-thru-question.json b/assets/json/covid-drive-thru-question.json new file mode 100644 index 00000000..626d702a --- /dev/null +++ b/assets/json/covid-drive-thru-question.json @@ -0,0 +1,85 @@ +[ + { + "id": 1, + "questionEN": "Is the test intended for travel?", + "questionAR": "هل تجري التحليل بغرض السفر؟", + "ans": 2 + }, + { + "id": 2, + "questionEN": "Coming from outside KSA within last 2 weeks?", + "questionAR": "هل قدمت من خارج المملكة خلال الأسبوعين الماضيين؟", + "ans": 2 + }, + { + "id": 3, + "questionEN": "Do you currently have fever?", + "questionAR": "هل تعاني حاليا من حرارة؟", + "ans": 2 + }, + { + "id": 4, + "questionEN": "Did you have fever in last 2 weeks?", + "questionAR": "هل عانيت من حرارة في الأسبوعين الماضيين؟", + "ans": 2 + }, + { + "id": 5, + "questionEN": "Do you have a sore throat?", + "questionAR": "هل لديك التهاب في الحلق؟", + "ans": 2 + }, + { + "id": 6, + "questionEN": "Do you have a runny nose?", + "questionAR": "هل لديك سيلان بالأنف؟" + }, + { + "id": 7, + "questionEN": "Do you have a cough?", + "questionAR": "هل لديك سعال؟", + "ans": 2 + }, + { + "id": 8, + "questionEN": "Do you have shortness of breath?", + "questionAR": "هل تعانين من ضيق في التنفس؟", + "ans": 2 + }, + { + "id": 9, + "questionEN": "Do you have nausea?", + "questionAR": "هل تعانين من غثيان؟", + "ans": 2 + }, + { + "id": 10, + "questionEN": "Do you have vomiting?", + "questionAR": "هل تعاني من القيء؟", + "ans": 2 + }, + { + "id": 11, + "questionEN": "Do you have a headache?", + "questionAR": "هل تعاني من صداع في الرأس؟", + "ans": 2 + }, + { + "id": 12, + "questionEN": "Do you have muscle pain?", + "questionAR": "هل تعانين من آلام عضلية؟", + "ans": 2 + }, + { + "id": 13, + "questionEN": "Do you have joint pain?", + "questionAR": "هل تعانين من آلام المفاصل؟", + "ans": 2 + }, + { + "id": 14, + "questionEN": "Do you have diarrhea?", + "questionAR": "هل لديك اسهال؟", + "ans": 2 + } +] \ No newline at end of file diff --git a/ios/Flutter/.last_build_id b/ios/Flutter/.last_build_id index df846dd6..d070415c 100644 --- a/ios/Flutter/.last_build_id +++ b/ios/Flutter/.last_build_id @@ -1 +1 @@ -269226e53e3ba1b1460fd3df51f89f77 \ No newline at end of file +e52eba3667a38bec777870899c15ae7d \ No newline at end of file diff --git a/ios/Podfile b/ios/Podfile index 89424e2a..9fbc2933 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +# platform :ios, '10.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ea6d2244..2ce396c4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -277,6 +277,11 @@ PODS: - Flutter - file_picker_web (0.0.1): - Flutter + - Firebase/Analytics (6.33.0): + - Firebase/Core + - Firebase/Core (6.33.0): + - Firebase/CoreOnly + - FirebaseAnalytics (= 6.8.3) - Firebase/CoreOnly (6.33.0): - FirebaseCore (= 6.10.3) - Firebase/Firestore (6.33.0): @@ -285,6 +290,13 @@ PODS: - Firebase/Messaging (6.33.0): - Firebase/CoreOnly - FirebaseMessaging (~> 4.7.0) + - firebase_analytics (6.3.0): + - Firebase/Analytics (~> 6.33.0) + - Firebase/CoreOnly (~> 6.33.0) + - firebase_core + - Flutter + - firebase_analytics_web (0.1.0): + - Flutter - firebase_core (0.5.3): - Firebase/CoreOnly (~> 6.33.0) - Flutter @@ -295,6 +307,15 @@ PODS: - Firebase/Messaging (~> 6.33.0) - firebase_core - Flutter + - FirebaseAnalytics (6.8.3): + - FirebaseCore (~> 6.10) + - FirebaseInstallations (~> 1.6) + - GoogleAppMeasurement (= 6.8.3) + - GoogleUtilities/AppDelegateSwizzler (~> 6.7) + - GoogleUtilities/MethodSwizzler (~> 6.7) + - GoogleUtilities/Network (~> 6.7) + - "GoogleUtilities/NSData+zlib (~> 6.7)" + - nanopb (~> 1.30906.0) - FirebaseCore (6.10.3): - FirebaseCoreDiagnostics (~> 1.6) - GoogleUtilities/Environment (~> 6.7) @@ -352,11 +373,17 @@ PODS: - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) - - geolocator (6.1.9): + - geolocator (6.2.0): - Flutter - google_maps_flutter (0.0.1): - Flutter - GoogleMaps (< 3.10) + - GoogleAppMeasurement (6.8.3): + - GoogleUtilities/AppDelegateSwizzler (~> 6.7) + - GoogleUtilities/MethodSwizzler (~> 6.7) + - GoogleUtilities/Network (~> 6.7) + - "GoogleUtilities/NSData+zlib (~> 6.7)" + - nanopb (~> 1.30906.0) - GoogleDataTransport (7.5.1): - nanopb (~> 1.30906.0) - GoogleMaps (3.9.0): @@ -372,6 +399,8 @@ PODS: - PromisesObjC (~> 1.2) - GoogleUtilities/Logger (6.7.2): - GoogleUtilities/Environment + - GoogleUtilities/MethodSwizzler (6.7.2): + - GoogleUtilities/Logger - GoogleUtilities/Network (6.7.2): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" @@ -435,6 +464,8 @@ PODS: - nanopb/encode (1.30906.0) - native_device_orientation (0.0.1): - Flutter + - nfc_in_flutter (1.0.0): + - Flutter - NVActivityIndicatorView (5.1.1): - NVActivityIndicatorView/Base (= 5.1.1) - NVActivityIndicatorView/Base (5.1.1) @@ -446,7 +477,7 @@ PODS: - Flutter - path_provider_windows (0.0.1): - Flutter - - "permission_handler (5.0.1+1)": + - "permission_handler (5.1.0+2)": - Flutter - PromisesObjC (1.2.11) - Protobuf (3.13.0) @@ -477,9 +508,9 @@ PODS: - SwiftyGif (5.4.0) - TOCropViewController (2.5.5) - Try (2.1.1) - - "twilio_programmable_video (0.5.0+4)": + - "twilio_programmable_video (0.6.4+1)": - Flutter - - TwilioVideo (~> 3.4) + - TwilioVideo (~> 3.7) - TwilioVideo (3.8.0) - url_launcher (0.0.1): - Flutter @@ -518,6 +549,8 @@ DEPENDENCIES: - device_info (from `.symlinks/plugins/device_info/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`) - file_picker_web (from `.symlinks/plugins/file_picker_web/ios`) + - firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) + - firebase_analytics_web (from `.symlinks/plugins/firebase_analytics_web/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`) - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) @@ -542,6 +575,7 @@ DEPENDENCIES: - map_launcher (from `.symlinks/plugins/map_launcher/ios`) - maps_launcher (from `.symlinks/plugins/maps_launcher/ios`) - native_device_orientation (from `.symlinks/plugins/native_device_orientation/ios`) + - nfc_in_flutter (from `.symlinks/plugins/nfc_in_flutter/ios`) - NVActivityIndicatorView - path_provider (from `.symlinks/plugins/path_provider/ios`) - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) @@ -578,6 +612,7 @@ SPEC REPOS: - DKImagePickerController - DKPhotoGallery - Firebase + - FirebaseAnalytics - FirebaseCore - FirebaseCoreDiagnostics - FirebaseFirestore @@ -585,6 +620,7 @@ SPEC REPOS: - FirebaseInstanceID - FirebaseMessaging - FMDB + - GoogleAppMeasurement - GoogleDataTransport - GoogleMaps - GoogleUtilities @@ -626,6 +662,10 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/file_picker/ios" file_picker_web: :path: ".symlinks/plugins/file_picker_web/ios" + firebase_analytics: + :path: ".symlinks/plugins/firebase_analytics/ios" + firebase_analytics_web: + :path: ".symlinks/plugins/firebase_analytics_web/ios" firebase_core: :path: ".symlinks/plugins/firebase_core/ios" firebase_core_web: @@ -674,6 +714,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/maps_launcher/ios" native_device_orientation: :path: ".symlinks/plugins/native_device_orientation/ios" + nfc_in_flutter: + :path: ".symlinks/plugins/nfc_in_flutter/ios" path_provider: :path: ".symlinks/plugins/path_provider/ios" path_provider_linux: @@ -746,9 +788,12 @@ SPEC CHECKSUMS: file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1 file_picker_web: 37b10786e88885124fac99dc899866e78a132ef3 Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5 + firebase_analytics: 36a619088c46224900829f14f4daa71585693a6f + firebase_analytics_web: 7d539061ea4af07563a0e21044af89cab70efec0 firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659 firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1 firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75 + FirebaseAnalytics: 5dd088bd2e67bb9d13dbf792d1164ceaf3052193 FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1 FirebaseFirestore: adff4877869ca91a11250cc0989a6cd56bad163f @@ -764,8 +809,9 @@ SPEC CHECKSUMS: flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35 flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - geolocator: 057a0c63a43e9c5296d8ad845a3ac8e6df23d899 + geolocator: f5e3de65e241caba7ce3e8a618803387bda73384 google_maps_flutter: c7f9c73576de1fbe152a227bfd6e6c4ae8088619 + GoogleAppMeasurement: 966e88df9d19c15715137bb2ddaf52373f111436 GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833 GoogleMaps: 4b5346bddfe6911bb89155d43c903020170523ac GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 @@ -785,12 +831,13 @@ SPEC CHECKSUMS: MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc native_device_orientation: e24d00be281de72996640885d80e706142707660 + nfc_in_flutter: c656fbfb1ec5b9d021da87b0c87629d62fd5264d NVActivityIndicatorView: 1f6c5687f1171810aa27a3296814dc2d7dec3667 path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0 path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b - permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6 + permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0 PromisesObjC: 8c196f5a328c2cba3e74624585467a557dcb482f Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 @@ -807,7 +854,7 @@ SPEC CHECKSUMS: SwiftyGif: 5d4af95df24caf1c570dbbcb32a3b8a0763bc6d7 TOCropViewController: da59f531f8ac8a94ef6d6c0fc34009350f9e8bfe Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96 - twilio_programmable_video: 6a41593640f3d86af60b22541fd457b22deaae7f + twilio_programmable_video: ce33772ea8275b413c0ab5c5aa2e35f9da2d4066 TwilioVideo: c13a51ceca375e91620eb7578d2573c90cf53b46 url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0 @@ -822,6 +869,6 @@ SPEC CHECKSUMS: webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 wifi: d7d77c94109e36c4175d845f0a5964eadba71060 -PODFILE CHECKSUM: ac5efa1ac3c9555d0008dc18004313c84746da62 +PODFILE CHECKSUM: 900f7dc480de5b961c031ed418407e0e40ed455c -COCOAPODS: 1.10.0.rc.1 +COCOAPODS: 1.10.1 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 40202660..e4453fa6 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -220,7 +220,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */, - 835BB6C21DD911F74065B670 /* [CP] Copy Pods Resources */, + 29B24CD65FDFD6111DD04897 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -306,36 +306,36 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + 29B24CD65FDFD6111DD04897 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", ); - name = "Thin Binary"; - outputPaths = ( + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; }; - 835BB6C21DD911F74065B670 /* [CP] Copy Pods Resources */ = { + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + inputPaths = ( ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + name = "Thin Binary"; + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; diff --git a/lib/config/config.dart b/lib/config/config.dart index be4ad2e2..5af95569 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -17,12 +17,12 @@ const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs -//const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; -//const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // Pharmacy Production URLs -const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; -const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; +// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; +// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; @@ -33,7 +33,8 @@ const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints'; const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo'; // Delivery Driver -const DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation'; +const DRIVER_LOCATION = + 'Services/Patients.svc/REST/PatientER_GetDriverLocation'; //weather const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; @@ -41,37 +42,60 @@ const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; // Wifi Credentials -const WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; +const WIFI_CREDENTIALS = + "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; ///Doctor -const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +const GET_MY_DOCTOR = + 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; -const GET_DOCTOR_PRE_POST_IMAGES = 'Services/Doctors.svc/REST/GetDoctorPrePostImages'; -const GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; -const GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; +const GET_DOCTOR_PRE_POST_IMAGES = + 'Services/Doctors.svc/REST/GetDoctorPrePostImages'; +const GET_DOCTOR_RATING_NOTES = + 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; +const GET_DOCTOR_RATING_DETAILS = + 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; + const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; ///Prescriptions const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; -const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; -const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; -const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; +const GET_PRESCRIPTIONS_ALL_ORDERS = + 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const GET_PRESCRIPTION_REPORT = + 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; +const SEND_PRESCRIPTION_EMAIL = + 'Services/Notifications.svc/REST/SendPrescriptionEmail'; +const GET_PRESCRIPTION_REPORT_ENH = + 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; ///Lab Order const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; -const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; -const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; -const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; -const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; +const GET_Patient_LAB_SPECIAL_RESULT = + 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; +const SEND_LAB_RESULT_EMAIL = + 'Services/Notifications.svc/REST/SendLabReportEmail'; +const GET_Patient_LAB_RESULT = + 'Services/Patients.svc/REST/GetPatientLabResults'; +const GET_Patient_LAB_ORDERS_RESULT = + 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; +const SEND_COVID_LAB_RESULT_EMAIL = + 'Services/Notifications.svc/REST/GenerateCOVIDReport'; +const COVID_PASSPORT_UPDATE = + 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate'; +const GET_PATIENT_PASSPORT_NUMBER = + 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport'; /// const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; -const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; +const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = + 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; -const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; +const GET_PATIENT_ORDERS_DETAILS = + 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; -const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail'; +const SEND_RAD_REPORT_EMAIL = + 'Services/Notifications.svc/REST/SendRadReportEmail'; ///Feedback const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; @@ -80,28 +104,47 @@ const GET_PATIENT_AppointmentHistory = 'Services' '/Doctors.svc/REST/PateintHasAppoimentHistory'; ///VITAL SIGN -const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; +const GET_PATIENT_VITAL_SIGN = + 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; ///Er Nearest -const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; +const GET_NEAREST_HOSPITAL = + 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; ///ED Online -const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; -const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation"; +const ER_GET_VISUAL_TRIAGE_QUESTIONS = + "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; +const ER_SAVE_TRIAGE_INFORMATION = + "services/Doctors.svc/REST/ER_SaveTriageInformation"; const ER_GetPatientPaymentInformationForERClinic = "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; ///Er Nearest -const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; -const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; -const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; -const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +const GET_AMBULANCE_REQUEST = + 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; +const GET_PATIENT_ALL_PRES_ORDERS = + 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = + 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; +const UPDATE_PRESS_ORDER = + 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; +const INSERT_ER_INERT_PRES_ORDER = + 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; /// ER RRT const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation'; -const GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; -const GET_RRT_SERVICE_PRICE = 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice'; +const GET_ALL_TRANSPORTATIONS_RC = 'rc/api/Transportation/getalltransportation'; + +const GET_ALL_TRANSPORTATIONS_ORDERS = 'rc/api/Transportation/get'; + +const CANCEL_AMBULANCE_REQUEST = "rc/api/Transportation/update"; + +const GET_ALL_RRT_QUESTIONS = + 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; +const GET_RRT_SERVICE_PRICE = + 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice'; + +const INSERT_TRANSPORTATION_ORDER_RC = "rc/api/Transportation/add"; ///FindUs const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; @@ -110,13 +153,15 @@ const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; ///babyInformation -const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID'; +const GET_BABYINFORMATION_REQUEST = + 'Services/Community.svc/REST/GetBabyByUserID'; ///Get Baby By User ID const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; ///userInformation -const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New'; +const GET_USERINFORMATION_REQUEST = + 'Services/Community.svc/REST/GetUserInformation_New'; ///Update email const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; @@ -138,21 +183,29 @@ const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable'; const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; ///BloodDetails -const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; +const GET_BLOOD_REQUEST = + 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; -const SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +const SAVE_BLOOD_REQUEST = + 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -const GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; -const SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; +const GET_BLOOD_AGREEMENT = + 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; +const SAVE_BLOOD_AGREEMENT = + 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; ///Reports const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; -const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; -const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail'; +const INSERT_REQUEST_FOR_MEDICAL_REPORT = + 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; +const SEND_MEDICAL_REPORT_EMAIL = + 'Services/Notifications.svc/REST/SendMedicalReportEmail'; ///Rate -const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; -const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; +const IS_LAST_APPOITMENT_RATED = + 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; +const GET_APPOINTMENT_DETAILS_BY_NO = + 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; @@ -164,7 +217,8 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; //URL to get active appointment list -const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; +const GET_ACTIVE_APPOINTMENTS_LIST_URL = + "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; //URL to get projects list const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; @@ -173,87 +227,124 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; //URL to dental doctors list -const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; +const GET_DENTAL_DOCTORS_LIST_URL = + "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; //URL to get doctor free slots const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; //URL to insert appointment -const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment"; +const INSERT_SPECIFIC_APPOINTMENT = + "Services/Doctors.svc/REST/InsertSpecificAppointment"; //URL to get patient share -const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; +const GET_PATIENT_SHARE = + "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; //URL to get patient appointment history -const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; +const GET_PATIENT_APPOINTMENT_HISTORY = + "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; + +const DOCTOR_SCHEDULE_URL = + 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; -const SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; +const SEND_REPORT_EYE_EMAIL = + "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; -const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; +const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = + "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; //URL to get patient appointment curfew history -const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; +const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = + "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; //URL to confirm appointment -const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment"; +const CONFIRM_APPOINTMENT = + "Services/MobileNotifications.svc/REST/ConfirmAppointment"; -const INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; +const INSERT_VIDA_REQUEST = + "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; //URL to cancel appointment const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; //URL get appointment QR -const GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; +const GENERATE_QR_APPOINTMENT = + "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; //URL send email appointment QR -const EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; +const EMAIL_QR_APPOINTMENT = + "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; //URL check payment status -const CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; +const CHECK_PAYMENT_STATUS = + "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; //URL create advance payment const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; -const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; +const HIS_CREATE_ADVANCE_PAYMENT = + "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; -const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; +const ADD_ADVANCE_NUMBER_REQUEST = + 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; -const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; -const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; -const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; +const IS_ALLOW_ASK_DOCTOR = + 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +const GET_CALL_REQUEST_TYPE = + 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; +const ADD_VIDA_REQUEST = + 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; -const GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; +const GET_LIVECARE_CLINICS = + 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; -const GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; +const GET_LIVECARE_SCHEDULE_CLINICS = + 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; -const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; +const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = + 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; -const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; +const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = + 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; -const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; +const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = + 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; const GET_PATIENT_SHARE_LIVECARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; -const GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; +const GET_LIVECARE_CLINIC_TIMING = + 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; -const GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; +const GET_ER_APPOINTMENT_FEES = + 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; -const ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; +const ADD_NEW_CALL_FOR_PATIENT_ER = + 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; -const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; -const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; -const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; +const GET_LIVECARE_HISTORY = + 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; +const CANCEL_LIVECARE_REQUEST = + 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; +const SEND_LIVECARE_INVOICE_EMAIL = + 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; -const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; +const UPDATE_HEALTH_TERMS = + 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; + +const GET_PATIENT_HEALTH_STATS = + 'Services/Patients.svc/REST/Med_GetTransactionsSts'; -const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts'; +const SEND_CHECK_IN_NFC_REQUEST = + 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; -const SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; +const HAS_DENTAL_PLAN = + 'Services/Doctors.svc/REST/Dental_IsPatientHasOnGoingEstimation'; //URL to get medicine and pharmacies list const CHANNEL = 3; @@ -274,16 +365,21 @@ var DeviceTypeID = Platform.isIOS ? 1 : 2; const LANGUAGE_ID = 2; const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; -const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; -const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; +const GET_PAtIENTS_INSURANCE = + "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; +const GET_PAtIENTS_INSURANCE_UPDATED = + "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; -const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; -const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; +const GET_PATIENT_INSURANCE_DETAILS = + "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; +const UPLOAD_INSURANCE_CARD = + 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; -const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus_DWH"; +const GET_PAtIENTS_INSURANCE_APPROVALS = + "Services/Patients.svc/REST/GetApprovalStatus_DWH"; const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; @@ -293,56 +389,84 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; -const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; -const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; +const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = + 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; +const GET_PATIENT_INFO_BY_ID = + 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; -const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; +const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = + 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; -const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; +const GET_COVID_DRIVETHRU_PROJECT_LIST = + 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; -const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; +const GET_COVID_DRIVETHRU_PAYMENT_INFO = + 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; -const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; +const GET_COVID_DRIVETHRU_FREE_SLOTS = + 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; -const GET_COVID_DRIVETHRU_PROCEDURES_LIST = 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; +const GET_COVID_DRIVETHRU_PROCEDURES_LIST = + 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; ///Smartwatch Integration Services -const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; +const GET_PATIENT_LAST_RECORD = + 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; ///My Trackers -const GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; -const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; -const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; - -const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; -const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; -const ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; - -const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; -const GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; -const ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; +const GET_DIABETIC_RESULT_AVERAGE = + 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; +const GET_DIABTEC_RESULT = + 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; +const ADD_DIABTEC_RESULT = + 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; + +const GET_BLOOD_PRESSURE_RESULT_AVERAGE = + 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; +const GET_BLOOD_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; +const ADD_BLOOD_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; + +const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = + 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; +const GET_WEIGHT_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; +const ADD_WEIGHT_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; -const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; -const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; - -const UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; - -const SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; -const DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; -const DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; - -const UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; -const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; -const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; - -const UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; -const DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; +const GET_CALL_INFO_HOURS_RESULT = + 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; +const GET_CALL_REQUEST_TYPE_LOV = + 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; + +const UPDATE_DIABETIC_RESULT = + 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; + +const SEND_AVERAGE_BLOOD_SUGAR_REPORT = + 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; +const DEACTIVATE_DIABETIC_STATUS = + 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; +const DEACTIVATE_BLOOD_PRESSURES_STATUS = + 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; + +const UPDATE_BLOOD_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; +const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = + 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; +const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = + 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; + +const UPDATE_WEIGHT_PRESSURE_RESULT = + 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; +const DEACTIVATE_WEIGHT_PRESSURE_RESULT = + 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; @@ -350,25 +474,35 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; // H2O -const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; -const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; -const H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; -const H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; -const H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; +const H2O_GET_USER_PROGRESS = + "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; +const H2O_INSERT_USER_ACTIVITY = + "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; +const H2O_GET_USER_DETAIL = + "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; +const H2O_UPDATE_USER_DETAIL = + "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; +const H2O_UNDO_USER_ACTIVITY = + "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; //E_Referral Services -const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes"; -const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; -const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; +const GET_ALL_RELATIONSHIP_TYPES = + "Services/Patients.svc/REST/GetAllRelationshipTypes"; +const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = + 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; +const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = + 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; // Encillary Orders -const GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; +const GET_ANCILLARY_ORDERS = + 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; -const GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; +const GET_ANCILLARY_ORDERS_DETAILS = + 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; //Pharmacy wishlist // const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; @@ -379,7 +513,8 @@ const GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime"; const PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer"; const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; const PHARMACY_GET_COUNTRY = "countries"; -const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer"; +// const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer"; +const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/getorcreateCustomer"; const GET_PHARMACY_BANNER = "promotionbanners"; const GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer"; const GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts"; @@ -400,34 +535,50 @@ const GET_SHIPPING_OPTIONS = "get_shipping_option/"; const DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; const ORDER_SHOPPING_CART = "orders"; -const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation"; -const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; -const LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation"; -const LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation"; -const CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount"; -const TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; -const LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; +const GET_LACUM_ACCOUNT_INFORMATION = + "Services/Patients.svc/REST/GetLakumAccountInformation"; +const GET_LACUM_GROUP_INFORMATION = + "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; +const LACUM_ACCOUNT_ACTIVATE = + "Services/Patients.svc/REST/LakumAccountActivation"; +const LACUM_ACCOUNT_DEACTIVATE = + "Services/Patients.svc/REST/LakumAccountDeactivation"; +const CREATE_LAKUM_ACCOUNT = + "Services/Patients.svc/REST/PHR_CreateLakumAccount"; +const TRANSFER_YAHALA_LOYALITY_POINTS = + "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; +const LAKUM_GET_USER_TERMS_AND_CONDITIONS = + "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; const GET_MOST_VIEWED_PRODUCTS = "mostview?"; const GET_NEW_PRODUCTS = "newproducts?"; // Home Health Care -const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; -const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; -const PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; -const GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; -const GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; +const HHC_GET_ALL_SERVICES = + "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; +const HHC_GET_ALL_CMC_SERVICES = + "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; +const PATIENT_ER_UPDATE_PRES_ORDER = + "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; +const GET_ORDER_DETAIL_BY_ID = + "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; +const GET_CMC_ORDER_DETAIL_BY_ID = + "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; -const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +const GET_PATIENT_ALL_PRES_ORD = + 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const PATIENT_ER_INSERT_PRES_ORDER = + 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews'; -const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; +const BLOOD_DONATION_REGISTER_BLOOD_TYPE = + 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = + 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; //Pharmacy wishlist const GET_WISHLIST = "shopping_cart_items/"; @@ -460,7 +611,8 @@ const GET_SUB_PRODUCTS = 'products?categoryid='; const GET_FINAL_PRODUCTS = 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId='; const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; -const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; +const GET_DISEASE_BY_CLINIC_ID = + 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; const TIMER_MIN = 10; @@ -476,13 +628,17 @@ const SCAN_QR_CODE = 'productbysku/'; const FILTERED_PRODUCTS = 'products?categoryids='; -const GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors"; +const GET_DOCTOR_LIST_CALCULATION = + "Services/Doctors.svc/REST/GetCallculationDoctors"; -const GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = "Services/Patients.svc/REST/GetDentalAppointments"; +const GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = + "Services/Patients.svc/REST/GetDentalAppointments"; -const GET_DENTAL_APPOINTMENT_INVOICE = "Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo"; +const GET_DENTAL_APPOINTMENT_INVOICE = + "Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo"; -const SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = "Services/Notifications.svc/REST/SendInvoiceForDental"; +const SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = + "Services/Notifications.svc/REST/SendInvoiceForDental"; class AppGlobal { static var context; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index f4357743..28d53047 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -8,11 +8,14 @@ const Map platformLocalizedValues = { }, "successConnectingHmgNetwork": { "en": "You connected to HMG network successfully, you can access the app", - "ar": "تم التصال بشبكة د.سليمان الحبيب بنجاح, تستطيع الان استخدام تطبيق الحبيب" + "ar": + "تم التصال بشبكة د.سليمان الحبيب بنجاح, تستطيع الان استخدام تطبيق الحبيب" }, "failedConnectingHmgNetwork": { - "en": "Sorry the connection to HMG network had been failed, make sure you are in range of HMG network", - "ar": "نعتذر لقد فشل الاتصال بشبكة د.سليمان الحبيب, تاكد من وجودك داخل نطاق الشبكة" + "en": + "Sorry the connection to HMG network had been failed, make sure you are in range of HMG network", + "ar": + "نعتذر لقد فشل الاتصال بشبكة د.سليمان الحبيب, تاكد من وجودك داخل نطاق الشبكة" }, "alreadyConnectedHmgNetwork": { "en": " You already connected to HMG network to access Alhabib app", @@ -28,12 +31,16 @@ const Map platformLocalizedValues = { "ar": "Successfully connected to the HMG network to access internet" }, "connectedToHmgNetworkWithNoInternet": { - "en": "Successfully connected to the HMG network but it have no internet access", - "ar": "Successfully connected to the HMG network but it have no internet access" + "en": + "Successfully connected to the HMG network but it have no internet access", + "ar": + "Successfully connected to the HMG network but it have no internet access" }, "notConnectedToHmgNetworkSecurityIssue": { - "en": "We are not able to connect you to HMG network due to security reasons", - "ar": "We are not able to connect you to HMG network due to security reasons" + "en": + "We are not able to connect you to HMG network due to security reasons", + "ar": + "We are not able to connect you to HMG network due to security reasons" } }; @@ -66,6 +73,8 @@ const Map localizedValues = { }, 'enterDocName': {'en': 'Enter Doctor name', 'ar': 'أدخل إسم الطبيب'}, 'search': {'en': 'Search', 'ar': 'بحث'}, + 'noResultFound': {'en': 'No Result Found', 'ar': 'المنتج غير موجود'}, + 'pleaseEnterProductName': {'en': 'Please Enter Product Name', 'ar': 'ادخل اسم المنتج'}, 'bookNow': {'en': 'BOOK NOW', 'ar': 'احجز الآن'}, 'docInfo': {'en': 'Doctor Information', 'ar': 'معلومات الطبيب'}, 'appoInfo': {'en': 'Appointment Information', 'ar': 'معلومات الموعد'}, @@ -73,11 +82,17 @@ const Map localizedValues = { 'gender': {'en': 'Gender', 'ar': 'الجنس'}, 'nationality': {'en': 'Nationality', 'ar': 'الجنسية'}, 'docQualifications': {'en': 'Doctor Qualifications', 'ar': 'مؤهلات الطبيب'}, - 'confirmAppoHeading': {'en': 'Kindly confirm your Appointment', 'ar': 'يرجى تأكيد موعدك'}, + 'confirmAppoHeading': { + 'en': 'Kindly confirm your Appointment', + 'ar': 'يرجى تأكيد موعدك' + }, 'patientInfo': {'en': 'Patient Information', 'ar': 'معلومات المريض'}, 'bookSuccess': {'en': 'Book Success', 'ar': 'تم حجز الموعد بنجاح'}, 'patientShare': {'en': 'Patient Share', 'ar': 'المبلغ المستحق'}, - 'patientShareWithTax': {'en': 'Patient Share with Tax', 'ar': 'المبلغ الإجمالي المستحق'}, + 'patientShareWithTax': { + 'en': 'Patient Share with Tax', + 'ar': 'المبلغ الإجمالي المستحق' + }, 'confirmAppo': {'en': 'Confirm Appointment', 'ar': 'تأكيد الموعد'}, 'confirm': {'en': 'Confirm', 'ar': 'تأكيد'}, 'confirmLiveCare': {'en': 'Confirm LiveCare', 'ar': 'تأكيد لايف كير'}, @@ -99,26 +114,41 @@ const Map localizedValues = { 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟' }, - 'upcoming-noAction': {'en': 'No Action Required', 'ar': 'لا يوجد إجراء مطلوب'}, + 'upcoming-noAction': { + 'en': 'No Action Required', + 'ar': 'لا يوجد إجراء مطلوب' + }, 'upcoming-confirm': { 'en': 'Please confirm the appointment to avoid cancellation', 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء' }, "book-success-confirm-more-24-1-2": { - "en": "The online payment process will be available 24 hours before the appointment.", + "en": + "The online payment process will be available 24 hours before the appointment.", "ar": "- عملية الدفع الالكتروني ستكون متاحة قبل الموعد ب 24 ساعة." }, 'upcoming-payment-pending': { - 'en': 'Online Payment will be Activated before 24 Hours of Appointment Time', + 'en': + 'Online Payment will be Activated before 24 Hours of Appointment Time', 'ar': 'سيتم تفعيل خدمة الدفع الالكتروني قبل 24 ساعة من موعد الحجز' }, - 'upcoming-payment-now': {'en': 'Pay Online now to avoid long waiting queue', 'ar': 'ادفع الآن لتفادي الانتظار'}, - 'upcoming-QR': {'en': 'Use the QR Code to Check-In in hospital', 'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى'}, + 'upcoming-payment-now': { + 'en': 'Pay Online now to avoid long waiting queue', + 'ar': 'ادفع الآن لتفادي الانتظار' + }, + 'upcoming-QR': { + 'en': 'Use the QR Code to Check-In in hospital', + 'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى' + }, 'upcoming-virtual': { - 'en': 'This is a virtual appointment, Please adhere to the instructions for a seamless experience.', + 'en': + 'This is a virtual appointment, Please adhere to the instructions for a seamless experience.', 'ar': 'هذا موعد اتصال مرئي عن بعد ، يرجى اتباع تعليمات الخدمة.' }, - 'upcoming-livecare': {'en': 'This is a LiveCare appointment', 'ar': 'هذا موعد لايف كير'}, + 'upcoming-livecare': { + 'en': 'This is a LiveCare appointment', + 'ar': 'هذا موعد لايف كير' + }, 'upcoming-details': {'en': 'More Details', 'ar': 'المزيد'}, 'reschedule': {'en': 'Reschedule', 'ar': 'إعادة جدولة'}, 'raise': {'en': 'Raise', 'ar': 'رفع'}, @@ -150,7 +180,10 @@ const Map localizedValues = { "ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي." }, "registernow": {"en": "Register Now", "ar": "تسجيل الان"}, - "nationalID": {"en": "Enter the Identification Number", "ar": "أدخل رقم الهوية الوطنية او الاقامة"}, + "nationalID": { + "en": "Enter the Identification Number", + "ar": "أدخل رقم الهوية الوطنية او الاقامة" + }, "national-id": {"en": "National ID", "ar": "رقم الهوية"}, "fileNo": {"en": "File Number", "ar": "رقم الملف"}, "fileno": {"en": "File No", "ar": "رقم الملف"}, @@ -161,7 +194,10 @@ const Map localizedValues = { "en": "Please enter mobile number and identification number", "ar": "الرجاء إدخال رقم الجوال ورقم الهوية" }, - "profile-info": {"en": "Please enter profile information", "ar": "الرجاء إدخال معلومات الملف الشخصي"}, + "profile-info": { + "en": "Please enter profile information", + "ar": "الرجاء إدخال معلومات الملف الشخصي" + }, "submit": {"en": "Submit", "ar": "ارسال"}, "forgot-desc": { "en": "Enter the mobile number to receive the Medical file Number via SMS", @@ -182,22 +218,33 @@ const Map localizedValues = { "last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"}, "last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"}, "verify-fingerprint": { - "en": "To activate the fingerprint login service, please verify data by using one of the following options.", - "ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات" + "en": + "To activate the fingerprint login service, please verify data by using one of the following options.", + "ar": + "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات" }, 'searchMedicine': {'en': 'Search Medicine', 'ar': 'البحث عن الدواء'}, 'pharmaciesList': {'en': 'Pharmacies List', 'ar': 'قائمة الصيدلايات'}, - 'searchMedicineHere': {'en': 'Search Medicine Here', 'ar': 'ابحث عن الدواء هنا'}, + 'searchMedicineHere': { + 'en': 'Search Medicine Here', + 'ar': 'ابحث عن الدواء هنا' + }, 'description': {'en': 'Description', 'ar': 'الوصف'}, 'howToUse': {'en': 'How to Use', 'ar': 'طريقة الأستخدام'}, 'price': {'en': 'Price', 'ar': 'السعر'}, 'youCanFindItIn': {'en': 'You can find it in', 'ar': 'يمكنكة ان تجده في'}, - 'pleaseEnterMedicineName': {'en': 'Please Enter Medicine Name', 'ar': 'الرجائ ادخال اسم الدواء'}, + 'pleaseEnterMedicineName': { + 'en': 'Please Enter Medicine Name', + 'ar': 'الرجائ ادخال اسم الدواء' + }, "verification_message": { "en": "Please enter the Verification Code sent to", "ar": "الرجاء ادخال رمز التحقق الذي تم إرساله إلى" }, - "validation_message": {"en": "The verification code expires in", "ar": "تنتهي صلاحية رمز التحقق خلال"}, + "validation_message": { + "en": "The verification code expires in", + "ar": "تنتهي صلاحية رمز التحقق خلال" + }, "arabic-change": {"en": "عربي", "ar": "English"}, "notification": {"en": "Notifications", "ar": "إشعارات"}, "app-settings": {"en": "App Settings", "ar": "إعدادات التطبيق"}, @@ -205,38 +252,64 @@ const Map localizedValues = { "before": {"en": "Before", "ar": "قبل"}, "minute": {"en": "Minutes", "ar": "دقيقة"}, "hour": {"en": "Hour", "ar": "ساعة"}, - "reminderSuccess": {"en": "The reminder has been added successfully", "ar": "يضاف التذكير بنجاح"}, - "patientShareToDo": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"}, + "reminderSuccess": { + "en": "The reminder has been added successfully", + "ar": "يضاف التذكير بنجاح" + }, + "patientShareToDo": { + "en": "Amount before tax: ", + "ar": "المبلغ قبل الضريبة:" + }, "patientTaxToDo": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"}, - "patientShareTotalToDo": {"en": "Total amount Due: ", "ar": "المبلغ الإجمالي المستحق:"}, + "patientShareTotalToDo": { + "en": "Total amount Due: ", + "ar": "المبلغ الإجمالي المستحق:" + }, 'paymentMethod': {'en': 'Payment Method', 'ar': 'طريقة الدفع او السداد'}, - 'noNeedToWaitInLine': {'en': 'No need to stand in line.', 'ar': 'لا داعي للوقوف في الطابور.'}, + 'noNeedToWaitInLine': { + 'en': 'No need to stand in line.', + 'ar': 'لا داعي للوقوف في الطابور.' + }, 'useQRAppoAttend': { 'en': 'Use the QR code to register the appointment attendance.', 'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.' }, 'passQRAppoAttend': { - 'en': 'Pass the QR code through the attendance devices available in the Hospital.', + 'en': + 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.' }, 'sitWaitingQR': { 'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.' }, - 'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'}, + 'attendRegisterCode': { + 'en': 'Attendance registration code', + 'ar': 'رمز تسجيل الحضور' + }, 'scanQRHospital': { 'en': 'Scan above QR Code to Check-In on the Machine in Hospital', 'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى' }, "sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"}, "success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"}, - "EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"}, - "EmailSentError": {"en": "Error Sending Email", "ar": "خطأ في إرسال البريد الإلكتروني"}, + "EmailSentSuccessfully": { + "en": "Email Sent Successfully", + "ar": "تم إرسال البريد الإلكتروني بنجاح" + }, + "EmailSentError": { + "en": "Error Sending Email", + "ar": "خطأ في إرسال البريد الإلكتروني" + }, "close": {"en": "Close", "ar": "مغلق"}, + "closeIt": {"en": "Close", "ar": "اغلاق"}, "booked": {"en": "Booked", "ar": "محجوز"}, "confirmed": {"en": "Confirmed", "ar": "مؤكد"}, "arrived": {"en": "Arrived", "ar": "تم الحضور"}, - "payNowBookSuccess": {"en": "Pay now via Al Habib App", "ar": "ادفع الآن عبر تطبيق الحبيب"}, + "payNowBookSuccess": { + "en": "Pay now via Al Habib App", + "ar": "ادفع الآن عبر تطبيق الحبيب" + }, "payNowBookSuccesstext1": { "en": "Pay Now using online payment service From secure payment gateways", "ar": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة" @@ -250,7 +323,10 @@ const Map localizedValues = { 'en': 'This service will be available for last 15 days doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط' }, - "more-verify": {"en": "More Verification Options", "ar": "المزيد من خيارات التحقق"}, + "more-verify": { + "en": "More Verification Options", + "ar": "المزيد من خيارات التحقق" + }, "welcome-back": {"en": "Welcome back!", "ar": "مرحبا بعودتك!"}, "account-info": { "en": "Would you like to login with current username?", @@ -266,7 +342,10 @@ const Map localizedValues = { "preferred-language": {"en": "Preferred Language", "ar": "اللغة المفضلة"}, "english": {"en": "English", "ar": "الإنجليزية"}, "arabic": {"en": "Arabic", "ar": "العربية"}, - "locations-register": {"en": "Where do you want to create this file?", "ar": "أين تريد فتح هذا الملف؟"}, + "locations-register": { + "en": "Where do you want to create this file?", + "ar": "أين تريد فتح هذا الملف؟" + }, "ksa": {"en": "KSA", "ar": "السعودية"}, "dubai": {"en": "Dubai", "ar": "دبي"}, "enter-email": {"en": "Please Enter Email", "ar": "ادخل البريد الالكتروني"}, @@ -302,11 +381,14 @@ const Map localizedValues = { "companyName": {"en": "Company Name ", "ar": "اسم الشركة: "}, "receiptOn": {"en": "Receipt on: ", "ar": "تاريخ الفاتورة: "}, "expiryDate": {"en": "Expiry Date: ", "ar": "تاريخ الانتهاء: "}, - "procedureName": {"en": "Procedure Name", "ar": "اسم الاجراء"}, + "procedureName": {"en": "Procedure Name:", "ar": "اسم الاجراء:"}, "procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"}, "usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"}, "unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "}, - "totalApproval": {"en": "Total approval unused", "ar": "اجمالي الموافقات الغير مستخدمة"}, + "totalApproval": { + "en": "Total approval unused", + "ar": "اجمالي الموافقات الغير مستخدمة" + }, "category": {"en": "Category: ", "ar": "الفئة"}, "expirationDate": {"en": "Expiration Date: ", "ar": "تاريخ الانتهاء"}, "patientCard": {"en": "Patient Card ID: ", "ar": "رقم الاشتراك"}, @@ -314,24 +396,51 @@ const Map localizedValues = { "seeDetails": {"en": "SEE DETAILS", "ar": "منافعك التامينية"}, "insuranceCards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"}, "requestType": {"en": "Request Type", "ar": "نوع الاستفسار"}, - "register-info-family": {"en": "How would like to add the new member?", "ar": "كيف ترغب باضافة العضو الجديد؟"}, - "remove-family-member": {"en": "Remove this member?", "ar": "إزالة ملف العضو؟"}, - "MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'}, - "myMedicalFileSubTitle": {"en": "All your medical records", 'ar': 'جميع سجلاتك الطبية'}, + "register-info-family": { + "en": "How would like to add the new member?", + "ar": "كيف ترغب باضافة العضو الجديد؟" + }, + "remove-family-member": { + "en": "Remove this member?", + "ar": "إزالة ملف العضو؟" + }, + "MyMedicalFile": {"en": "My Medical File", 'ar': 'ملفي الطبي الالكتروني'}, + "myMedicalFileSubTitle": { + "en": "All your medical records", + 'ar': 'جميع سجلاتك الطبية' + }, "viewMore": {"en": "View More", 'ar': 'عرض المزيد'}, - "homeHealthCareService": {"en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية'}, + "homeHealthCareService": { + "en": "Home Health Care Service", + 'ar': 'الرعاية الصحية المنزلية' + }, "OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدليات الحبيب'}, "EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'}, - "OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع الإلكتدوني'}, - "OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'}, - "ComprehensiveMedicalCheckup": {"en": "Comprehensive Medical Check up", 'ar': 'فحص طبي شامل'}, + "OnlinePaymentService": { + "en": "Online Payment Service", + 'ar': 'خدمة الدفع الإلكتدوني' + }, + "OffersAndPackages": { + "en": "Online transfer request", + 'ar': 'طلب التحويل الالكتروني' + }, + "ComprehensiveMedicalCheckup": { + "en": "Comprehensive Medical Check up", + 'ar': 'فحص طبي شامل' + }, "HMGService": {"en": "HMG Service", 'ar': 'جميع خدمات الحبيب'}, - "ViewAllHabibMedicalService": {"en": "View All Habib Medical Service", 'ar': 'عرض خدمات الحبيب الطبية'}, + "ViewAllHabibMedicalService": { + "en": "View All Habib Medical Service", + 'ar': 'عرض خدمات الحبيب الطبية' + }, "viewAll": {"en": "View All", 'ar': 'عرض الكل'}, "view": {"en": "View", 'ar': 'عرض'}, "ContactUs": {"en": "Contact Us", 'ar': 'الوصول إلينا'}, - "ViewAllWaysReachUs": {"en": "View All Ways Reach Us", 'ar': 'جميع طرق الاتصال بنا'}, + "ViewAllWaysReachUs": { + "en": "View All Ways Reach Us", + 'ar': 'جميع طرق الاتصال بنا' + }, "medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'}, "consultation": {"en": "Consultation", "ar": "استشارة"}, "logs": {"en": "Logs", "ar": "السجلات"}, @@ -339,11 +448,18 @@ const Map localizedValues = { "locationDialogMessage": { "en": "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.", - "ar": "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك." + "ar": + "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك." }, - "user-view-requester": {"en": "User Wants To View Your Medical File", "ar": "أشخاص يرغبون الاطلاع على ملفك الطبي"}, - "user-view": {"en": "User Can View Your Medical File", "ar": "أشخاص يمكنهم الاطلاع على ملفك الطبي"}, + "user-view-requester": { + "en": "User Wants To View Your Medical File", + "ar": "أشخاص يرغبون الاطلاع على ملفك الطبي" + }, + "user-view": { + "en": "User Can View Your Medical File", + "ar": "أشخاص يمكنهم الاطلاع على ملفك الطبي" + }, "parking": {"en": "Parking", "ar": "مواقف"}, "alhabiServices": {"en": "HMG Service", "ar": "خدمات الحبيب"}, @@ -373,9 +489,18 @@ const Map localizedValues = { "ambulancerequest": {"en": "Ambulance ", "ar": "طلب نقل "}, "requestA": {"en": "Request", "ar": "اسعاف"}, "MyAppointments": {"en": "Appointments", "ar": "مواعيدي"}, - "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"}, - "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"}, - "noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم تصل المواعيد"}, + "NoBookedAppointments": { + "en": "No Booked Appointments", + "ar": "لا توجد مواعيد محجوزة" + }, + "NoConfirmedAppointments": { + "en": "No Confirmed Appointments", + "ar": "لا توجد مواعيد مؤكدة" + }, + "noArrivedAppointments": { + "en": "No Arrived Appointments", + "ar": "لم تصل المواعيد" + }, "MyAppointmentsList": {"en": "List", "ar": "قائمة بمواعدي"}, "Radiology": {"en": "Radiology", "ar": "الأشعة"}, "RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"}, @@ -434,10 +559,20 @@ const Map localizedValues = { "VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"}, "MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"}, "km": {"en": "KMs:", "ar": "كم"}, - "PatientHealthSummaryReport": {"en": "Patient Health Summary Report", "ar": " ملخص التقارير الشهرية"}, - "ToViewTheTermsAndConditions": {"en": "To View The Terms And Conditions Report", "ar": " عرض الشروط والأحكام "}, + "km_": {"en": "KM", "ar": "كم"}, + "PatientHealthSummaryReport": { + "en": "Patient Health Summary Report", + "ar": " ملخص التقارير الشهرية" + }, + "ToViewTheTermsAndConditions": { + "en": "To View The Terms And Conditions Report", + "ar": " عرض الشروط والأحكام " + }, "ClickHere": {"en": "Click here", "ar": "أنقر هنا"}, - "IAgreeToTheTermsAndConditions": {"en": "I agree to the terms and conditions ", "ar": "أوافق على الشروط والاحكام "}, + "IAgreeToTheTermsAndConditions": { + "en": "I agree to the terms and conditions ", + "ar": "أوافق على الشروط والاحكام " + }, "IAgreeToTheTermsAndConditionsSubtitle": { "en": "I agree to the terms and conditions ", "ar": @@ -446,8 +581,14 @@ const Map localizedValues = { "Save": {"en": "Save", "ar": "حفظ "}, "UserAgreement": {"en": "User Agreement", "ar": "اتفاقية الخصوصية "}, "UpdateSuccessfully": {"en": "Update Successfully", "ar": "تم التحديث بنجاح"}, - "CHECK_VACCINE_AVAILABILITY": {"en": "CHECK VACCINE AVAILABILITY", "ar": "تحقق من توافر اللقاح"}, - "MyVaccinesAvailability": {"en": "MyVaccinesAvailability", "ar": "توفر لقاحي"}, + "CHECK_VACCINE_AVAILABILITY": { + "en": "CHECK VACCINE AVAILABILITY", + "ar": "تحقق من توافر اللقاح" + }, + "MyVaccinesAvailability": { + "en": "MyVaccinesAvailability", + "ar": "توفر لقاحي" + }, "PaymentService": {"en": "Payment Service", "ar": "خدمة المدفوعات"}, "PaymentOnline": {"en": "Service", "ar": "الالكتروني"}, "OnlineCheckIn": {"en": "Online Check-In", "ar": "مدفوعات معلقة"}, @@ -458,12 +599,16 @@ const Map localizedValues = { "AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"}, "AdvancePaymentLabel": { - "en": "You can create and add an Advanced Payment for you account or other accounts.", + "en": + "You can create and add an Advanced Payment for you account or other accounts.", "ar": "يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين" }, "FileNumber": {"en": "File Number", "ar": "رقم الملف"}, "Amount": {"en": "Amount *", "ar": "المبلغ *"}, - "DepositorEmail": {"en": "Depositor Email *", "ar": "البريد الإلكتروني للمودع *"}, + "DepositorEmail": { + "en": "Depositor Email *", + "ar": "البريد الإلكتروني للمودع *" + }, "Notes": {"en": "Notes", "ar": "ملاحظات"}, "SelectPatientName": {"en": "Select Patient Name", "ar": "اختر اسم المريض"}, "SelectFamilyPatientName": {"en": "Family Members", "ar": "أفراد الأسرة"}, @@ -476,9 +621,19 @@ const Map localizedValues = { "DepositorName": {"en": "Depositor Name", "ar": "اسم المودع *"}, "MobileNumber": {"en": "Mobile Number", "ar": "رقم الجوال"}, "Ok": {"en": "Ok", "ar": "حسنا"}, - "WaterConsumedInWeek": {"en": "Water consumed in a week", "ar": "معدل شرب الماء خلال الاسبوع"}, - "WaterConsumedInMonth": {"en": "Water consumed in a month", "ar": "معدل شرب الماء خلال الشهر"}, - "TheVerificationCodeExpiresIn": {"en": "The Verification Code Expires In", "ar": "تنتهي صلاحية رمز التحقق في"}, + "averageWaitingTime": {"en": "Average Waiting Time:", "ar": "متوسط ​​وقت الانتظار:"}, + "WaterConsumedInWeek": { + "en": "Water consumed in a week", + "ar": "معدل شرب الماء خلال الاسبوع" + }, + "WaterConsumedInMonth": { + "en": "Water consumed in a month", + "ar": "معدل شرب الماء خلال الشهر" + }, + "TheVerificationCodeExpiresIn": { + "en": "The Verification Code Expires In", + "ar": "تنتهي صلاحية رمز التحقق في" + }, "PleaseEnterTheVerificationCode": { "en": "Please enter the verification code send to", "ar": "الرجاء إدخال رمز التحقق المرسل إلى" @@ -505,8 +660,14 @@ const Map localizedValues = { "DailyQuantity": {"en": "Daily Quantity :", "ar": "جرعات يومية"}, "AddReminder": {"en": "Add Reminder", "ar": "إضافة تذكير"}, "reminderDes": { - "en": "Please select treatment start day and time to be notified when it\'s time to take the medicine", - "ar": " يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء" + "en": + "Please select treatment start day and time to be notified when it\'s time to take the medicine", + "ar": + " يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء" + }, + "pleaseSelectAllQuestionToContinue": { + "en": "Please answer all questions to continue...", + "ar": "يرجى الإجابة على جميع الأسئلة للمتابعة..." }, "StartDay": {"en": "Start Day", "ar": "يوم البداية"}, "EndDay": {"en": "End Day", "ar": "يوم الانتهاء"}, @@ -516,12 +677,24 @@ const Map localizedValues = { "DoctorResponses": {"en": "Doctor Responses", "ar": "ردود الأطباء"}, "New": {"en": "New", "ar": "جديد"}, "All": {"en": "All", "ar": "الكل"}, - "QuestionHere": {"en": "Enter the question here...", "ar": "اضف الاستفسار هنا"}, - "ViewDoctorResponses": {"en": "View Doctor Responses", "ar": "الاطلاع على ردود الأطباء"}, + "QuestionHere": { + "en": "Enter the question here...", + "ar": "اضف الاستفسار هنا" + }, + "ViewDoctorResponses": { + "en": "View Doctor Responses", + "ar": "الاطلاع على ردود الأطباء" + }, "ServiceInformationButton": {"en": "LOGIN / REGISTER", "ar": "دخول / تسجيل"}, - "ServiceInformationTitle": {"en": "Service Information", "ar": "معلومات الخدمة"}, + "ServiceInformationTitle": { + "en": "Service Information", + "ar": "معلومات الخدمة" + }, "ServiceInformation": {"en": "Service Information", "ar": "معلومات الخدمة"}, - "HomeHealthCare": {"en": "Home Health Care", "ar": " الرعاية الصحية المنزلية "}, + "HomeHealthCare": { + "en": "Home Health Care", + "ar": " الرعاية الصحية المنزلية " + }, "HomeHealthCareText": { "en": "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.", @@ -542,11 +715,16 @@ const Map localizedValues = { "ar": "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل." }, + + "noReviewsAvailable": {"en": "No Reviews Available", "ar": "لا يوجد تقييمات"}, + "noLocationAvailable": {"en": "No Location Available", "ar": "لا يوجد موقع"}, "orders": {"en": "Orders", "ar": "الطلبات"}, "lakum": {"en": "Lakum", "ar": "لكم"}, - "wishlist": {"en": "Wishlist", "ar": "الرغبات"}, + "wishlist": {"en": "Wishlist", "ar": "المفضلة"}, + "products": {"en": "Products", "ar": "المنتجات"}, "reviews": {"en": "Reviews", "ar": "التقيمات"}, - // "myPrescriptions": {"en": "My Prescriptions", "ar": "وصفاتي"}, + "brands": {"en": "Brands", "ar": "العلامات التجارية"}, + "productDetails": {"en": "Product Details", "ar": "تفاصيل المنتج"}, // "medicationRefill": {"en": "Medication Refill", "ar": "تعبئة الأدوية"}, "pillReminder": {"en": "Pill Reminder", "ar": "تذكير الأدويه"}, "shippingAddresses": {"en": "Shipping Addresses", "ar": "عناوين الشحن"}, @@ -574,7 +752,10 @@ const Map localizedValues = { "recommended": {"en": " Recommended For You", "ar": "موصى لك"}, "myPrescription": {"en": " My Prescriptions", "ar": "وصفاتي"}, "quantity": {"en": " QTY ", "ar": "الكمية"}, - "backMyAccount": {"en": "BACK TO MY ACCOUNT ", "ar": " الرجوع لحسابي الشخصي"}, + "backMyAccount": { + "en": "BACK TO MY ACCOUNT ", + "ar": " الرجوع لحسابي الشخصي" + }, "reviewSuccessful": {"en": "Review Successful", "ar": " تقييم ناجح"}, "reviewShared": { "en": "Your review has been shared on product review section", @@ -604,14 +785,21 @@ const Map localizedValues = { "confirmLocation": {"en": "CONFIRM LOCATION ", "ar": " تأكيد الموقع "}, "conditionsHMG": {"en": "Terms & Conditions ", "ar": "الشروط و الأحكام "}, "conditions": {"en": "Terms & Conditions of Lakum", "ar": "شروط و احكام لكم"}, - "confirmDeleteMsg": {"en": "Are you sure! want to delete ", "ar": "هل انت متأكد تريد الحذف "}, + "confirmDeleteMsg": { + "en": "Are you sure! want to delete ", + "ar": "هل انت متأكد تريد الحذف " + }, "confirmDelete": {"en": "DELETE", "ar": "حذف"}, - "confirmCancellation": {"en": "Are you sure! want to cancel this order ", "ar": "هل انت متأكد تريد حذف هذا المنتج "}, + "confirmCancellation": { + "en": "Are you sure! want to cancel this order ", + "ar": "هل انت متأكد تريد حذف هذا المنتج " + }, "orderNumber": {"en": "Order#: ", "ar": "الطلب: "}, "orderDate": {"en": "Date", "ar": "التاريخ:"}, "itemsNo": {"en": "items(s)", "ar": "عناصر"}, "noOrder": {"en": "You Don't have any orders.", "ar": "ليس لديك طلبات"}, "noResult": {"en": "No Result.", "ar": "لايوجد نتئج"}, + "nonRecommended": {"en": "No Recommended Products.", "ar": "لا يوجد منتجات"}, "TermsService": {"en": "Terms of Service", "ar": "شروط الخدمه"}, "Beforeusing": { @@ -623,15 +811,20 @@ const Map localizedValues = { "ar": "قرأت ووافقت على شروط الخدمة وسياسة الخصوصية" }, "data-safe-info": { - "en": "Information that you provide is anonymous and not shared with anyone.", + "en": + "Information that you provide is anonymous and not shared with anyone.", "ar": "المعلومات التي تقدمها لا تتم مشاركتها مع أي شخص" }, "data-safe": {"en": " Your data is safe.", "ar": "بياناتك آمنة"}, "informational": { - "en": "Checkup is for informational purposes and is not a qualified medical opinion", + "en": + "Checkup is for informational purposes and is not a qualified medical opinion", "ar": "الفحص هو لأغراض معلوماتية وليس رأي طبي مؤهل" }, - "not-use-in-emerbency": {"en": "Do not use in emergencies.", "ar": "لا تستخدم في حالات الطوارئ"}, + "not-use-in-emerbency": { + "en": "Do not use in emergencies.", + "ar": "لا تستخدم في حالات الطوارئ" + }, "not-use-in-emerbency-details": { "en": "In case of health emergency, ", "ar": "في حالة الطوارئ اتصل بأقرب رقم للطوارئ على الفور" @@ -640,25 +833,40 @@ const Map localizedValues = { "en": "call the nearest emergency number immediately", "ar": " اتصل بأقرب رقم للطوارئ على الفور" }, - "check-diagnosis": {"en": "Checkup is not a diagnosis.", "ar": "الفحص ليس تشخيص."}, + "check-diagnosis": { + "en": "Checkup is not a diagnosis.", + "ar": "الفحص ليس تشخيص." + }, "remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"}, - "loginToUseService": {"en": "You need to login to use this service", "ar": "هذة الخدمة تتطلب تسجيل الدخول"}, + "loginToUseService": { + "en": "You need to login to use this service", + "ar": "هذة الخدمة تتطلب تسجيل الدخول" + }, // pharmacy module "medicationRefill": {"en": "MEDICATION REFILL", "ar": "إعادة تعبئة الدواء"}, - "offersAndPromotions": {"en": "OFFERS & SPECIAL PROMOTIONS", "ar": "العروض والترقيات الخاصة"}, + "offersAndPromotions": { + "en": "OFFERS & SPECIAL PROMOTIONS", + "ar": "العروض والترقيات الخاصة" + }, "myPrescriptions": {"en": "MY PRESCRIPTIONS", "ar": "وصفاتي"}, - "searchAndScanMedication": {"en": "SEARCH & SCAN FOR MEDICATION", "ar": "البحث والمسح للأدوية"}, + "searchAndScanMedication": { + "en": "SEARCH & SCAN FOR MEDICATION", + "ar": "البحث والمسح للأدوية" + }, "shopByBrands": {"en": "Shop By Brands", "ar": "تسوق حسب الماركات"}, "recentlyViewed": {"en": "Recently Viewed", "ar": "شوهدت مؤخرا"}, - "bestSellers": {"en": "Best Sellers", "ar": "أفضل البائعين"}, + "bestSellers": {"en": "Best Seller", "ar": "الأكثر مبيعأ"}, "deleteAllItems": {"en": "Delete All Items", "ar": "حذف كافة العناصر"}, "total": {"en": "Total", "ar": "المجموع"}, "totalWithColonRight": {"en": "Total:", "ar": ":المجموع"}, "selectAddress": {"en": "Select Address", "ar": "حدد العنوان"}, "shippingAddress": {"en": "SHIPPING ADDRESS", "ar": "عنوان الشحن"}, "changeAddress": {"en": "Change Address", "ar": "تغيير العنوان"}, - "selectPaymentOption": {"en": "Select Payment Option", "ar": "حدد خيار الدفع"}, + "selectPaymentOption": { + "en": "Select Payment Option", + "ar": "حدد خيار الدفع" + }, "changeMethod": {"en": "Change Method", "ar": "تغيير خيار الدفع"}, "reviewOrder": {"en": "Review Order", "ar": "مراجعة الطلب"}, "active": {"en": "ACTIVE", "ar": "فعال"}, @@ -677,14 +885,23 @@ const Map localizedValues = { "select-age": {"en": "Select Your Age", "ar": "حدد العمر"}, "i-am": {"en": "I am", "ar": "أنا"}, "years-old": {"en": "years old", "ar": "سنة"}, - "drag-point": {"en": "Drag point to change your age", "ar": "اسحب لتغيير عمرك"}, - + "drag-point": { + "en": "Drag point to change your age", + "ar": "اسحب لتغيير عمرك" + }, + "refine": {"en": "Refine", "ar": "refine"}, + "reset": {"en": "Reset", "ar": "اعادة تعيين"}, + "apply": {"en": "Apply", "ar": "تطبيق"}, + "viewCategorise": {"en": "View All Categories", "ar": "عرض جميع الفئات"}, "categorise": {"en": "Categories", "ar": "التطبيقات"}, - "wishList": {"en": "WishList", "ar": "الرغبات"}, + "wishList": {"en": "WishList", "ar": "المفضلة"}, "myAccount": {"en": "My Account", "ar": "حسابي"}, "cart": {"en": "Cart", "ar": "التسوق"}, "Alhabibapp": {"en": "Al habib app", "ar": "تطبيق الحبيب"}, - "searchProductHere": {"en": "Search Product here", "ar": "ابحث في الطلب الخاص بك"}, + "searchProductHere": { + "en": "Search Product here", + "ar": "البحث عن منتج" + }, "HHCNotAuthMsg": { "en": "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.", @@ -700,7 +917,10 @@ const Map localizedValues = { "profile": {"en": "Profile", "ar": "ملفي"}, "notifications": {"en": "Notifications", "ar": "إشعارات"}, "notificationDetails": {"en": "Notification Details", "ar": "تفاصيل الاشعار"}, - "notificationDetailsa": {"en": "Notification Details", "ar": "تفاصيل الاشعار"}, + "notificationDetailsa": { + "en": "Notification Details", + "ar": "تفاصيل الاشعار" + }, "info-my-doctor-points": { "en": [ @@ -785,7 +1005,8 @@ const Map localizedValues = { "sick-leaves": {"en": "Sick Leaves", "ar": "الاجازات المرضية"}, "info-sick-leaves": { - "en": "This service allows you to view all sick leaves that were taken in Al Habib Medical Group in addition to:", + "en": + "This service allows you to view all sick leaves that were taken in Al Habib Medical Group in addition to:", "ar": "الاجازات المرضية: هذه الخدمة تمكنك من الاطلاع على جميع الاجازات المرضية والتي تم اصدارها في مجموعة الحبيب الطبية بالاضافة الى:" }, @@ -831,16 +1052,34 @@ const Map localizedValues = { "ar": "خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية." }, - "language-setting": {"en": "SMS and Confirmation Calls Language", "ar": "لغة الرسائل القصيرة و الاتصال الآلي"}, + "language-setting": { + "en": "SMS and Confirmation Calls Language", + "ar": "لغة الرسائل القصيرة و الاتصال الآلي" + }, "alert": {"en": "Alerts", "ar": "التنبيهات"}, - "email-alert": {"en": "Alert By Email", "ar": "استلام التنبيهات بالبريد الالكتروني"}, - "sms-alert": {"en": "Alert By SMS", "ar": "استلام التنبيهات بالرسائل القصيرة"}, + "email-alert": { + "en": "Alert By Email", + "ar": "استلام التنبيهات بالبريد الالكتروني" + }, + "sms-alert": { + "en": "Alert By SMS", + "ar": "استلام التنبيهات بالرسائل القصيرة" + }, "contact-info": {"en": "Contact Information", "ar": "معلومات التواصل"}, - "emrg-name": {"en": "Emergency Contact Name", "ar": "اسم للتواصل في حالة الطوارئ"}, - "emrg-no": {"en": "Emergency Contact Number", "ar": "رقم للتواصل في حالة الطوارئ"}, + "emrg-name": { + "en": "Emergency Contact Name", + "ar": "اسم للتواصل في حالة الطوارئ" + }, + "emrg-no": { + "en": "Emergency Contact Number", + "ar": "رقم للتواصل في حالة الطوارئ" + }, "modes": {"en": "Modes", "ar": "الاوضاع"}, "vibration": {"en": "Vibration Touch Feedback", "ar": "الاهتزاز عند اللمس"}, - "blind-modes": {"en": "Modes for Partially Blind", "ar": "تأثيرات لدعم ضعاف البصر"}, + "blind-modes": { + "en": "Modes for Partially Blind", + "ar": "تأثيرات لدعم ضعاف البصر" + }, "invert-theme": {"en": "Invert", "ar": "ألوان سلبية"}, "off-theme": {"en": "Off", "ar": "إيقاف"}, "dim-theme": {"en": "Dim", "ar": "ضوء خافت"}, @@ -857,7 +1096,10 @@ const Map localizedValues = { "LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"}, "Service": {"en": "Service", "ar": "خدمة"}, "HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'}, - "HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '}, + "HealthWeatherIndicators": { + "en": "Health Weather Indicators", + 'ar': ' مؤشرات الطقس الصحية ' + }, "HealthTipsBasedOnCurrentWeather": { "en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي ' @@ -888,22 +1130,35 @@ const Map localizedValues = { "like-to-hear": { "en": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form", - "ar": "يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة" + "ar": + "يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة" }, "subject": {"en": "Subject", "ar": "الموضوع"}, "message": {"en": "Message", "ar": "رسالة"}, - "empty-subject": {"en": "Please enter the subject", "ar": "يرجى ادخال الموضوع"}, + "empty-subject": { + "en": "Please enter the subject", + "ar": "يرجى ادخال الموضوع" + }, "empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الرسالة"}, "select-attachment": {"en": "Select Attachment", "ar": "إختر المرفق"}, "complain-appo": {"en": "Complaint for appointment", "ar": "شكوى على موعد"}, - "complain-without-appo": {"en": "Complaint without appointment", "ar": "شكوى بدون موعد"}, + "complain-without-appo": { + "en": "Complaint without appointment", + "ar": "شكوى بدون موعد" + }, "question": {"en": "Question", "ar": "سؤال"}, "message-type": {"en": "Message Type", "ar": "نوع الرسالة"}, "feedback-type": {"en": "Feedback Type", "ar": "نوع الرسالة"}, "compliment": {"en": "compliment", "ar": "ثناء"}, "suggestion": {"en": "Suggestion", "ar": "إقتراح"}, - "your-feedback": {"en": "Your feedback was sent", "ar": "لقد تم ارسال اقراحك شكرا لك"}, - "select-part": {"en": "Please select the part that complain about", "ar": "يرجى تحديد الجزء الذي تشكو منه"}, + "your-feedback": { + "en": "Your feedback was sent", + "ar": "لقد تم ارسال اقراحك شكرا لك" + }, + "select-part": { + "en": "Please select the part that complain about", + "ar": "يرجى تحديد الجزء الذي تشكو منه" + }, "number": {"en": "Number", "ar": "الرقم"}, "not-classified": {"en": "Not classified", "ar": "غير محدد"}, "selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"}, @@ -921,10 +1176,14 @@ const Map localizedValues = { "عن طريق هذه الخدمة تستطيع تسجيل اسمك كمتبرع بالدم حيث سيتم التواصل معك عن طريق بنك الدم في مجموعة الحبيب الطبية في حال الحاجة الى فصيلة الدم ." }, "blood-instruction": { - "en": "Enter the required information, In order to register for Blood Donation Service", + "en": + "Enter the required information, In order to register for Blood Donation Service", "ar": "ادخل المعلومات المطلوبة للتسجيل بخدمة التبرع بالدم" }, - "view-terms": {"en": "To view the terms and conditions", "ar": "عرض الشروط والأحكام"}, + "view-terms": { + "en": "To view the terms and conditions", + "ar": "عرض الشروط والأحكام" + }, "wantConnectHmgNetwork": { "en": "Dear customer there is no internet access, Do you want to connect with HMG network to use our app, make sure you are in range of HMG network", @@ -937,6 +1196,7 @@ const Map localizedValues = { }, "offerAndPackages": {"en": "Offers And Packages", "ar": "العروض والباقات"}, "InvoiceNo": {"en": "Invoice No", "ar": "رقم الفاتورة"}, + "InvoiceDate": {"en": "Invoice Date", "ar": "تاريخ الفاتورة"}, "SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"}, "GeneralResult": {"en": "General Result", "ar": "نتيجة عامة"}, "show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"}, @@ -976,7 +1236,8 @@ const Map localizedValues = { "er-contant": { "en": "This service displays nearest branch among all the branches of Al Habib Medical Group based on your current location.", - "ar": "تعرض هذه الخدمة أقرب فرع من بين جميع فروع مجموعة الحبيب الطبية بناءً على موقعك الحالي." + "ar": + "تعرض هذه الخدمة أقرب فرع من بين جميع فروع مجموعة الحبيب الطبية بناءً على موقعك الحالي." }, "er": {"en": "ER", "ar": "الطوارىء"}, "transportation-Service": {"en": "Ambulance Request", "ar": "طلب نقل اسعاف"}, @@ -986,7 +1247,10 @@ const Map localizedValues = { "ar": "عن طريق هذه الخدمة يمكنك طلب اخلاء بواسطة سيارة اسعاف سواء من المزل او الى المنزل بالاضافة الى مجموعة من الخدمات الاخرى" }, - "RRT-transport-heading": {"en": "Select Transportation Method", "ar": "حدد طريقة النقل"}, + "RRT-transport-heading": { + "en": "Select Transportation Method", + "ar": "حدد طريقة النقل" + }, "RRT-direction-heading": {"en": "Select Direction", "ar": "حدد الاتجاه"}, "RRT-way-heading": {"en": "Select Way", "ar": "حدد الطريق"}, "to-hospital": {"en": "To Hospital", "ar": "الى المستشفى"}, @@ -998,37 +1262,58 @@ const Map localizedValues = { "inside-home": {"en": "Inside Home", "ar": "داخل المنزل"}, "have-appo": {"en": "Do you have an appointment ?", "ar": "هل لديك موعد ؟"}, "dropoff-location": {"en": "Dropoff Location", "ar": "نقطة الوصول"}, - "select-all": {"en": "Please select all fields", "ar": "يرجى تحديد جميع الحقول"}, + "select-all": { + "en": "Please select all fields", + "ar": "يرجى تحديد جميع الحقول" + }, "select-map": {"en": "Select From Map", "ar": "حدد من الخريطة"}, - "no-appointment": {"en": "You don't have any appointments yet", "ar": "ليس لديك أي مواعيد حتى الآن"}, + "no-appointment": { + "en": "You don't have any appointments yet", + "ar": "ليس لديك أي مواعيد حتى الآن" + }, "patient-share": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"}, "patient-share-tax": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"}, - "patient-share-total": {"en": "Total amount payable: ", "ar": "المبلغ الإجمالي المستحق:"}, + "patient-share-total": { + "en": "Total amount payable: ", + "ar": "المبلغ الإجمالي المستحق:" + }, "select-ambulate": {"en": "Select Ambulate", "ar": "بحاجة للتنقل بواسطة"}, "wheelchair": {"en": "Wheelchair", "ar": "كرسي متحرك"}, "walker": {"en": "Walker", "ar": "مشاية"}, "stretcher": {"en": "Stretcher", "ar": "نقالة"}, "none": {"en": "None", "ar": "لا شيء"}, "RRT-Summary": {"en": "Summary", "ar": "ملخص الطلب"}, - "Rapid-Response-Team": {"en": "Rapid Response Team", "ar": "فريق الاستجابة السريع"}, + "Rapid-Response-Team": { + "en": "Rapid Response Team", + "ar": "فريق الاستجابة السريع" + }, "AmountBeforeTax": {"en": "Amount Before Tax:", "ar": "Amount Before Tax:"}, - "ApproximateServiceFee": {"en": "Approximate Service Fee", "ar": "Approximate Service Fee"}, + "ApproximateServiceFee": { + "en": "Approximate Service Fee", + "ar": "Approximate Service Fee" + }, "TaxAmount": {"en": "Tax Amount:", "ar": "Tax Amount:"}, "somethingWentWrongTryLater": { "en": "Sorry something went wrong please try again later", "ar": "نعتذر لخدمتكم يرجى المحاولة لاحقا" }, - "TotalAmountPayable": {"en": "Total Amount Payable:", "ar": "Total Amount Payable:"}, - "iAcceptTermsConditions": {"en": "I Accept the Terms And Conditions", "ar": "You can pay by the following options:"}, + "TotalAmountPayable": { + "en": "Total Amount Payable:", + "ar": "Total Amount Payable:" + }, + "iAcceptTermsConditions": { + "en": "I Accept the Terms And Conditions", + "ar": "You can pay by the following options:" + }, "YouCanPayByTheFollowingOptions": { "en": "You can pay by the following options:", "ar": "I Accept the Terms And Conditions" }, "RRTDDetails": { "en": - "The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home", + "The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home", "ar": - "The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home" + "The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home" }, "rrtService": {"en": "RRT Service", "ar": "خدمة RRT"}, @@ -1042,8 +1327,10 @@ const Map localizedValues = { "خدمة مواعيدي: هذه الخدمة تمكنك من الاطلاع على جميع المواعيد التي قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:" }, "info-todo": { - "en": "This service is designed to enable you to have a quick link to the list of tasks that need to be done", - "ar": "هذه الخدمة تم تصميمها لتمكنك من الوصول الى رابط سريع لقائمة المهام التي يجب القيام بها" + "en": + "This service is designed to enable you to have a quick link to the list of tasks that need to be done", + "ar": + "هذه الخدمة تم تصميمها لتمكنك من الوصول الى رابط سريع لقائمة المهام التي يجب القيام بها" }, "family-info": { "en": @@ -1051,16 +1338,40 @@ const Map localizedValues = { "ar": "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي." }, - "update-succ": {"en": "Successfully updated profile", "ar": "تم تحديث البيانات بنجاح"}, + "update-succ": { + "en": "Successfully updated profile", + "ar": "تم تحديث البيانات بنجاح" + }, "dental-complains": {"en": "Symptoms", "ar": "الأعراض"}, - "empty-result": {"en": "There is no search results found", "ar": "لايوجد نتائج"}, + "empty-result": { + "en": "There is no search results found", + "ar": "لايوجد نتائج" + }, - "no-booked-appointment": {"en": "No booked appointments", "ar": "لا يوجد مواعيد محجوزة"}, - "no-confirmed-appointment": {"en": "No confirmed appointments", "ar": "لا توجد مواعيد مؤكدة"}, - "no-arrived-appointment": {"en": "No arrived appointments", "ar": "لا يوجد مواعيد"}, - "upcoming-empty": {"en": "You do not have any Todo actions yet.", "ar": "ليس لديك أي إجراءات الآن."}, - "upcoming-timeLeft": {"en": "time left for appointment", "ar": "الوقت المتبقي للموعد"}, - "covid-test-all-services": {"en": "Covid-19 Drive-Thru Test", "ar": "فحص كورونا من داخل السيارة"}, + "no-booked-appointment": { + "en": "No booked appointments", + "ar": "لا يوجد مواعيد محجوزة" + }, + "no-confirmed-appointment": { + "en": "No confirmed appointments", + "ar": "لا توجد مواعيد مؤكدة" + }, + "no-arrived-appointment": { + "en": "No arrived appointments", + "ar": "لا يوجد مواعيد" + }, + "upcoming-empty": { + "en": "You do not have any Todo actions yet.", + "ar": "ليس لديك أي إجراءات الآن." + }, + "upcoming-timeLeft": { + "en": "time left for appointment", + "ar": "الوقت المتبقي للموعد" + }, + "covid-test-all-services": { + "en": "Covid-19 Drive-Thru Test", + "ar": "فحص كورونا من داخل السيارة" + }, "pharmacy": {"en": "Pharmacy", "ar": "الصيدلية"}, "ereferral": {"en": "E-Referral", "ar": "طلب التحويل"}, "child-vaccine": {"en": "Child Vaccines", "ar": "تطعيمات الأطفال"}, @@ -1083,7 +1394,10 @@ const Map localizedValues = { "ready": {"en": "Ready", "ar": "جاهز"}, "completed": {"en": "Completed", "ar": "مكتمل"}, - "request-medical-report": {"en": "Request medical report", "ar": "طلب تقرير طبي"}, + "request-medical-report": { + "en": "Request medical report", + "ar": "طلب تقرير طبي" + }, "insur-cards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"}, 'labResult': {"en": "Lab results", "ar": "نتائج التحاليل المخبرية"}, 'details': {'en': 'Details', 'ar': 'التفاصيل'}, @@ -1093,25 +1407,40 @@ const Map localizedValues = { "card-detail": {"en": "Insurance Details", "ar": "منافعك التامينية"}, "Dr": {"en": "Dr. ", "ar": "الدكتور."}, "empty": {"en": "You do not have any records.", "ar": "ليس لديك أي سجلات"}, - "last-visit": {"en": "How was your last visit with doctor?", "ar": "كيف تقيم زيارتك الأخيرة للطبيب؟"}, + "last-visit": { + "en": "How was your last visit with doctor?", + "ar": "كيف تقيم زيارتك الأخيرة للطبيب؟" + }, "tap-title": {"en": "Please rate the doctor", "ar": "يرجى تقييم الطبيب"}, "later": {"en": "Later", "ar": "لاحقاً"}, - "sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"}, + "sendSuc": { + "en": "A copy has been sent to the email", + "ar": "تم إرسال نسخة إلى البريد الإلكتروني" + }, "instructions": { - "en": "You can now talk directly to the appointments department by chat or request a call back", - "ar": "يمكنك الان التحدث مباشرة مع قسم المواعيد عن طريق خدمة المحادثة النصية أو طلب معاودة الاتصال" + "en": + "You can now talk directly to the appointments department by chat or request a call back", + "ar": + "يمكنك الان التحدث مباشرة مع قسم المواعيد عن طريق خدمة المحادثة النصية أو طلب معاودة الاتصال" }, "instructions-pharmacies": { - "en": "You can now talk directly to the pharmacist by chat or request a call back", - "ar": "يمكنك الآن التحدث مباشرة إلى الصيدلي عن طريق الدردشة أو طلب معاودة الاتصال" + "en": + "You can now talk directly to the pharmacist by chat or request a call back", + "ar": + "يمكنك الآن التحدث مباشرة إلى الصيدلي عن طريق الدردشة أو طلب معاودة الاتصال" }, "select-hospital": {"en": "Choose Hospital", "ar": "اختر المستشفى"}, "start": {"en": "Start", "ar": "ابدأ"}, "info-chat": { - "en": "This service allows you to chat with customer service directly without the need to call.", - "ar": "المحادثة المباشرة: هذه الخدمة تمكنك التحدث كتابياً مع خدمة العملاء مباشرة دون الحاجة الى الاتصال هاتفياً." + "en": + "This service allows you to chat with customer service directly without the need to call.", + "ar": + "المحادثة المباشرة: هذه الخدمة تمكنك التحدث كتابياً مع خدمة العملاء مباشرة دون الحاجة الى الاتصال هاتفياً." + }, + "last-appointment": { + "en": "How was your appointment?", + "ar": "كيف كان موعدك الطبي ؟" }, - "last-appointment": {"en": "How was your appointment?", "ar": "كيف كان موعدك الطبي ؟"}, "rate-clinic": {"en": "Please rate the clinic", "ar": "يرجى تقييم العيادة"}, "fetch-data": {"en": "Fetch Data", "ar": "تحديث الان"}, "rate": {"en": "Rate", "ar": "تقييم"}, @@ -1119,14 +1448,35 @@ const Map localizedValues = { "en": "Send a copy of this report to the email", "ar": "أرسل نسخة من هذا التقرير إلى البريد الإلكتروني" }, - "update-email-msg": {"en": "Email updated", "ar": "تم تحديث البريد الالكتروني"}, + "update-email-msg": { + "en": "Email updated", + "ar": "تم تحديث البريد الالكتروني" + }, "update-email": {"en": "Update Email", "ar": "تحديث البريد الالكتروني"}, - "booked-success": {"en": "The appointment has been successfully booked.", "ar": "لقد تم حجز الموعد بنجاح"}, - "appo-reminder-select-option-30": {"en": "Before 30 Mins", "ar": "قبل 30 دقيقة"}, - "appo-reminder-select-option-60": {"en": "Before 1 Hour", "ar": "قبل ساعة واحدة"}, - "appo-reminder-select-option-90": {"en": "Before 1 Hour and 30 mins", "ar": "قبل ساعة و 30 دقيقة"}, - "appo-reminder-select-option-120": {"en": "Before 2 Hours", "ar": "قبل ساعتين"}, - "noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "}, + "booked-success": { + "en": "The appointment has been successfully booked.", + "ar": "لقد تم حجز الموعد بنجاح" + }, + "appo-reminder-select-option-30": { + "en": "Before 30 Mins", + "ar": "قبل 30 دقيقة" + }, + "appo-reminder-select-option-60": { + "en": "Before 1 Hour", + "ar": "قبل ساعة واحدة" + }, + "appo-reminder-select-option-90": { + "en": "Before 1 Hour and 30 mins", + "ar": "قبل ساعة و 30 دقيقة" + }, + "appo-reminder-select-option-120": { + "en": "Before 2 Hours", + "ar": "قبل ساعتين" + }, + "noDataAvailable": { + "en": "No data available", + "ar": " لا يوجد بيانات متاحة " + }, "thename": {"en": "The Name", "ar": "الاسم"}, "noSearchResult": {"en": "No Search Result", "ar": "لا توجد نتيجة بحث"}, "selectFileSouse": {"en": "Select file souse", "ar": "حدد الملف"}, @@ -1135,25 +1485,46 @@ const Map localizedValues = { "med-report": {"en": "Medical Reports", "ar": "التقارير الطبية"}, "new-med-report": {"en": "Requests", "ar": "الطلبات"}, "requestReport": {"en": "Request a report", "ar": " طلب تقرير"}, - "confirm-msg-report": {"en": "Request for medical report?", "ar": "طلب تقرير طبي؟"}, - "successSendReport": {"en": "The request has been submitted successfully", "ar": "تم تنفيذ طلبك بنجاح"}, + "confirm-msg-report": { + "en": "Request for medical report?", + "ar": "طلب تقرير طبي؟" + }, + "successSendReport": { + "en": "The request has been submitted successfully", + "ar": "تم تنفيذ طلبك بنجاح" + }, "pulseTitle": {"en": "Heart rate", "ar": "معدل النبض بالدقيقة"}, "systolic-lng": {"en": "Systolic", "ar": "الإنقباض"}, "diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"}, "policy-holder": {"en": "Policy Holder", "ar": "حامل بطاقة التأمين"}, "policy-no": {"en": "Policy Number", "ar": "رقم سياسات"}, - "agree": {"en": "I agree, this is the correct information", "ar": "موافق، هذه المعلومات صحيحة"}, - "disagree": {"en": "No, this is not the correct information", "ar": "غير موافق، هذه المعلومات غير الصحيحة"}, + "agree": { + "en": "I agree, this is the correct information", + "ar": "موافق، هذه المعلومات صحيحة" + }, + "disagree": { + "en": "No, this is not the correct information", + "ar": "غير موافق، هذه المعلومات غير الصحيحة" + }, "expiry-date": {"en": "Expiry Date", "ar": "تاريخ انتهاء الصلاحية"}, "class": {"en": "Class", "ar": "فئة"}, "approval": {"en": "Approval", "ar": "موافقة"}, "no-data": {"en": "No data found", "ar": "لاتوجد بيانات"}, "insurance-details": {"en": "Insurance Details", "ar": "تفاصيل التأمين"}, "nearest-hospital": {"en": "Nearest Hospital", "ar": "أقرب مستشفى"}, - "request-sent": {"en": "Request sent successfully", "ar": "تم إرسال الطلب بنجاح"}, - "message-sent": {"en": "Message sent successfully", "ar": "تم إرسال الرسالة بنجاح"}, + "request-sent": { + "en": "Request sent successfully", + "ar": "تم إرسال الطلب بنجاح" + }, + "message-sent": { + "en": "Message sent successfully", + "ar": "تم إرسال الرسالة بنجاح" + }, "sent-on": {"en": "Sent on", "ar": "أرسلت في"}, - "attach-insurace-image": {"en": "Attach insurance card image", "ar": "إرفاق صورة بطاقة التأمين"}, + "attach-insurace-image": { + "en": "Attach insurance card image", + "ar": "إرفاق صورة بطاقة التأمين" + }, "upload-without-image": { "en": "You can still submit, if you don't have Insurance Image", "ar": "لا يزال بإمكانك الإرسال ، إذا لم يكن لديك صورة تأمين" @@ -1164,7 +1535,10 @@ const Map localizedValues = { "ar": "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:" }, - "scan-now": {"en": "If you have a card/Document Scan now", "ar": "إذا كانت لديك بطاقة / مستند ارفقها الان"}, + "scan-now": { + "en": "If you have a card/Document Scan now", + "ar": "إذا كانت لديك بطاقة / مستند ارفقها الان" + }, "liveCare": {"en": "Live Care", "ar": "لايف كير"}, "topBrands": {"en": "Top Brands", "ar": "اعلى العلامات التجارية"}, @@ -1176,12 +1550,16 @@ const Map localizedValues = { "vaccination": {"en": "Vaccination", "ar": "جدول التطعيمات"}, "welcomeBack": {"en": "Welcome back", "ar": "مرحبا مرة أخرى"}, "quantitySize": {"en": "Quantity", "ar": "كميه"}, - "addToCart": {"en": "add to cart", "ar": "إضفة للسلة"}, + "addToCart": {"en": "Add to Cart", "ar": "إضف للسلة"}, + "addToWishlist": {"en": "Add to Wishlist", "ar": "اضف للمفضلة"}, + "noData": {"en": "There is no data", "ar": "لايوجد بيانات"}, + "no_data": {"en": "No data", "ar": "لايوجد بيانات"}, "buyNow": {"en": "buy now", "ar": "إشتري الان"}, "quantityShortcut": {"en": "QTY", "ar": "كمية"}, "pharmacyServiceTermsCondition": { - "en": "I agree with the terms of service and I adhere to them unconditionally", + "en": + "I agree with the terms of service and I adhere to them unconditionally", "ar": " أوافق على شروط الخدمة وألتزم بها دون قيد أو شرط" }, "Year": {"en": "YEAR", "ar": "السنة"}, @@ -1195,7 +1573,8 @@ const Map localizedValues = { "child-name": {"en": "Child Name", "ar": "اسم الطفل"}, "childDob": {"en": "Birth Date", "ar": "تاريخ الولادة"}, "deleted-child-mes": { - "en": "The request was successful. The children have removed from the vaccination schedule subscription service.", + "en": + "The request was successful. The children have removed from the vaccination schedule subscription service.", "ar": "تم حذف الطفل بنجاح" }, "deleted-child": {"en": "Delete child", "ar": "إالغاء الطفل"}, @@ -1211,53 +1590,83 @@ const Map localizedValues = { "orderLocation": {"en": "Location", "ar": "الموقع"}, "selectService": {"en": "Select Service", "ar": "حدد الخدمة"}, "coveredService": {"en": "Covered Service : ", "ar": " الخدمات المغطاة : "}, - "selectedService": {"en": "Selected Service : ", "ar": " الخدمات المختارة : "}, - "cancelOrderMsg": {"en": "Are you sure!! want to cancel this order", "ar": "هل أنت واثق!! تريد إلغاء هذا الطلب"}, - "processDoneSuccessfully": {"en": "Process Done Successfully", "ar": "تمت العملية بنجاح"}, + "selectedService": { + "en": "Selected Service : ", + "ar": " الخدمات المختارة : " + }, + "cancelOrderMsg": { + "en": "Are you sure!! want to cancel this order", + "ar": "هل أنت واثق!! تريد إلغاء هذا الطلب" + }, + "processDoneSuccessfully": { + "en": "Process Done Successfully", + "ar": "تمت العملية بنجاح" + }, "selectHomeHealthCareServices": { "en": "Select Home Health Care Services", "ar": " حدد خدمات الرعاية الصحية المنزلية" }, "description-vaccination": {"en": "Description", "ar": "وصف"}, "due-date": {"en": "Due date", "ar": "تاريخ الاستحقاق"}, - "valid-email": {"en": "Please enter valid email", "ar": "الرجاء إدخال عنوان بريد صحيح"}, - "confirm-send": {"en": "Send the child's schedule to the email?", "ar": "ارسال جدول التطعيمات الى بريدك الالكتروني؟"}, + "valid-email": { + "en": "Please enter valid email", + "ar": "الرجاء إدخال عنوان بريد صحيح" + }, + "confirm-send": { + "en": "Send the child's schedule to the email?", + "ar": "ارسال جدول التطعيمات الى بريدك الالكتروني؟" + }, "email-success": { - "en": " The request was successful. You will receive the Schedule in moments.", + "en": + " The request was successful. You will receive the Schedule in moments.", "ar": "تم ارسال جدول التطعيمات " }, "add-instructions": { - "en": "Add the child's information below to recieve the schedule of vaccinations.", + "en": + "Add the child's information below to recieve the schedule of vaccinations.", "ar": "أضف معلومات الطفل لاستلام جدول التطعيمات" }, "added-child": { - "en": "The request was successful. You have added a child to the vaccination schedule subscription service.", + "en": + "The request was successful. You have added a child to the vaccination schedule subscription service.", "ar": "تمت الاضافة بنجاح." }, "appUpdate": {"en": "UPDATE THE APP", "ar": "تحديث التطبيق"}, "ereferralSaveSuccess": { "en": "The referral request has been submitted successfully, you will be contacted ASAP to complete the process. Referral request no is ", - "ar": " تم إرسال طلب الإحالة بنجاح ، وسيتم الاتصال بك في أسرع وقت ممكن لإكمال العملية. رقم طلب الإحالة" + "ar": + " تم إرسال طلب الإحالة بنجاح ، وسيتم الاتصال بك في أسرع وقت ممكن لإكمال العملية. رقم طلب الإحالة" }, "help": {"en": "Help", "ar": "مساعدة"}, "habibRobotText": { - "en": "Hi, This is HABIB, your personal assistant. I'm here to assist you by voice commands. How can I help?", + "en": + "Hi, This is HABIB, your personal assistant. I'm here to assist you by voice commands. How can I help?", "ar": "مرحباً ، معك حبيب مساعدك الشخصي. أنا هنا لمساعدتك بالأوامر الصوتية." }, - "updated-email": {"en": "Updated email successfully", "ar": "تم تحديث البريد الالكتروني"}, + "updated-email": { + "en": "Updated email successfully", + "ar": "تم تحديث البريد الالكتروني" + }, - "view-list-children": {"en": "View List of Children", "ar": "عرض قائمة الأطفال"}, + "view-list-children": { + "en": "View List of Children", + "ar": "عرض قائمة الأطفال" + }, "covidTest": {"en": "COVID-19 TEST", "ar": "فحص كورونا"}, "driveThru": {"en": "Drive-Thru", "ar": "من السيارة"}, - "trackDeliveryDriver": {"en": "Track Delivery Driver", "ar": "trackDeliveryDriver"}, + "trackDeliveryDriver": { + "en": "Track Delivery Driver", + "ar": "trackDeliveryDriver" + }, "NearestErDesc": { "en": "\nThis service Displays nearest branch\n among all the branches of All Habib \n medical Group based on your current Location", - "ar": "\nتعرض هذه الخدمة أقرب فرع\n من بين جميع فروع مجموعة \nالحبيب الطبية بناءً على موقعك الحالي." + "ar": + "\nتعرض هذه الخدمة أقرب فرع\n من بين جميع فروع مجموعة \nالحبيب الطبية بناءً على موقعك الحالي." }, "NearestEr": {"en": "Nearest ER", "ar": "أقرب ER"}, "infoCMC": { @@ -1276,13 +1685,18 @@ const Map localizedValues = { "RRT-orders-log": {"en": "Orders Log", "ar": "سجل الطلبات"}, "blood-sugar": {"en": "Blood Sugar", "ar": "سكر الدم"}, - "covid19_driveThrueTest": {"en": "'Covid-19- Drive-Thru Test'", "ar": "Covid-19- الفحص من خلال القيادة"}, + "covid19_driveThrueTest": { + "en": "'Covid-19- Drive-Thru Test'", + "ar": "Covid-19- الفحص من خلال القيادة" + }, "E-Referral": {"en": "'E-Referral'", "ar": "الإحالة الإلكترونية"}, "childName": {"en": "'CHILD NAME'", "ar": "إسم الطفل"}, "recordDeleted": {"en": "'Record Deleted'", "ar": "تم حذف السجل"}, "msg_email_address_up_to_date": { - "en": "Please ensure that the email address is up-to-date and process to view the schedule", - "ar": "يرجى التأكد من أن عنوان البريد الإلكتروني محدث وأن العملية لعرض الجدول الزمني" + "en": + "Please ensure that the email address is up-to-date and process to view the schedule", + "ar": + "يرجى التأكد من أن عنوان البريد الإلكتروني محدث وأن العملية لعرض الجدول الزمني" }, "add-new-child": {"en": "ADD NEW CHILD", "ar": "إضافة طفل جديد"}, @@ -1292,10 +1706,14 @@ const Map localizedValues = { }, "vaccination-add-child-msg": { - "en": "Add the child's information below to receive the schedule of vaccinations.", + "en": + "Add the child's information below to receive the schedule of vaccinations.", "ar": "أضف معلومات الطفل أدناه للحصول على جدول التطعيمات." }, - "child_added_successfully": {"en": "Child added successfully", "ar": "تمت إضافة الطفل بنجاح"}, + "child_added_successfully": { + "en": "Child added successfully", + "ar": "تمت إضافة الطفل بنجاح" + }, "bloodSugar": {"en": "Blood", "ar": "السكر في الدم"}, "sugar": {"en": "Sugar", "ar": ""}, "bloodCholesterol": {"en": "Blood", "ar": " الكولسترول في الدم"}, @@ -1309,9 +1727,13 @@ const Map localizedValues = { "enterReadingValue": {"en": "Enter the reading value", "ar": "ادخل القيمة"}, "result": {"en": "Result", "ar": "النتيجة"}, "sort": {"en": "Sort", "ar": "فرز"}, - "bloodSugarConversion": {"en": "Blood Sugar Conversion", "ar": "السكر في الدم"}, + "bloodSugarConversion": { + "en": "Blood Sugar Conversion", + "ar": "السكر في الدم" + }, "convertBloodSugarStatement": { - "en": "Convert blood sugar/glucose from mmol/l (UK standard) to mg/dlt (US standard) and vice versa.", + "en": + "Convert blood sugar/glucose from mmol/l (UK standard) to mg/dlt (US standard) and vice versa.", "ar": "تحويل مستوى السكر في الدم من مليمول/ لتر (مقياس المملكة المتحدة) الى ملغ/ ديسيلتر (مقياس الولايات المتحدة) والعكس" }, @@ -1336,11 +1758,18 @@ const Map localizedValues = { "measure-time": {"en": "Measure time", "ar": "وقت القياس"}, "update": {"en": "Update", "ar": "تعديل"}, "bloodD-enter-desc": { - "en": "Enter the required information, In order to register for Blood Donation Service", + "en": + "Enter the required information, In order to register for Blood Donation Service", "ar": "أدخل المعلومات المطلوبة ، للتسجيل في خدمة التبرع بالدم" }, - "viewTermsConditions": {"en": "To view the terms and conditions", "ar": "لعرض الشروط والأحكام"}, - "WalkinAppo": {"en": "Hospital Visit Appointment", "ar": "موعد زيارة للمستشفى"}, + "viewTermsConditions": { + "en": "To view the terms and conditions", + "ar": "لعرض الشروط والأحكام" + }, + "WalkinAppo": { + "en": "Hospital Visit Appointment", + "ar": "موعد زيارة للمستشفى" + }, "videoAppo": {"en": "Video Call Appointment", "ar": "موعد اتصال فيديو"}, @@ -1360,7 +1789,8 @@ const Map localizedValues = { "bmiCalcDesc": { "en": "'Calculate the BMI value and weight\n status to identify the healthy weight .\n Not appropriate for children and women\n who are pregnant or breastfeeding'", - "ar": "حساب قيمة مؤشر كتلة الجسم وحالة الوزن لتحديد الوزن الصحي. \n وغير مناسب للأطفال والنساء الحوامل أو المرضعات" + "ar": + "حساب قيمة مؤشر كتلة الجسم وحالة الوزن لتحديد الوزن الصحي. \n وغير مناسب للأطفال والنساء الحوامل أو المرضعات" }, "selectUnit": {"en": "Select Unit", "ar": "اختر الوحدة"}, "feet": {"en": "Feet", "ar": "قدم"}, @@ -1396,17 +1826,23 @@ const Map localizedValues = { }, "bariatrics": {"en": "Bariatrics", "ar": "طب السمنة"}, "bariatricsHeaderMsg": { - "en": "Choose one of the following symptoms to show the right doctors or choose a consultation to show all", - "ar": "اختر أحد الأعراض التالية لتظهر للأطباء المناسبين أو اختر استشارة لإظهار الكل" + "en": + "Choose one of the following symptoms to show the right doctors or choose a consultation to show all", + "ar": + "اختر أحد الأعراض التالية لتظهر للأطباء المناسبين أو اختر استشارة لإظهار الكل" }, "continue": {"en": "CONTINUE", "ar": "إستمرار"}, "skip": {"en": "SKIP", "ar": "تخطى"}, "calorieCalcDesc": { "en": "Calculates daily calorie intake based on several factors, like height, weight, age, gender and daily physical activity ", - "ar": "يحسب السعرات الحرارية اليومية بناءً على عدة عوامل ، مثل الطول والوزن والعمر والجنس والنشاط البدني اليومي" + "ar": + "يحسب السعرات الحرارية اليومية بناءً على عدة عوامل ، مثل الطول والوزن والعمر والجنس والنشاط البدني اليومي" + }, + "age11_120_years": { + "en": "The Age ( 11 - 120 ) yrs", + "ar": "العمر (11 - 120) سنة" }, - "age11_120_years": {"en": "The Age ( 11 - 120 ) yrs", "ar": "العمر (11 - 120) سنة"}, "weight-add": {"en": "Enter Weight Value", "ar": "أدخل الوزن "}, "systolic-add": {"en": "Enter Systolic Value", "ar": "أدخل قيمة الإنقباض "}, "diastolic-add": {"en": "Enter Diastolic Value", "ar": "أدخل قيمة الإنبساط "}, @@ -1414,18 +1850,30 @@ const Map localizedValues = { "today": {"en": "Today", "ar": "اليوم"}, "week": {"en": "Week", "ar": "أسبوع"}, "month": {"en": "Month", "ar": "شهر"}, - "h2o-amount-of-water": {"en": "Enter the amount of water:", "ar": "ادخل كمية الماء:"}, + "h2o-amount-of-water": { + "en": "Enter the amount of water:", + "ar": "ادخل كمية الماء:" + }, "update-user": {"en": "Update Information", "ar": "تحديث بيانات"}, "editname": {"en": "Enter the name here", "ar": "أدخل الاسم هنا"}, "activity-level": {"en": "Activity Level", "ar": "مستوى النشاط"}, "light-active": {"en": "Lightly Active", "ar": " قليل النشاط"}, "mod-active": {"en": "Moderately Active", "ar": "متوسط النشاط"}, - "reminder-label": {"en": "Activate the reminder of drink water?", "ar": "تفعيل خاصية تذكير شرب الماء؟"}, - "reminder-times-label": {"en": "How many times do you want to be reminded?", "ar": "عدد مرات التذكير"}, + "reminder-label": { + "en": "Activate the reminder of drink water?", + "ar": "تفعيل خاصية تذكير شرب الماء؟" + }, + "reminder-times-label": { + "en": "How many times do you want to be reminded?", + "ar": "عدد مرات التذكير" + }, "times": {"en": "Times", "ar": "مرات"}, "WaterCalculate": {"en": "Save", "ar": "حفظ"}, "notif-title": {"en": "Water Reminder", "ar": "تذكير"}, - "notif-text": {"en": " Don't forget to drink water.", "ar": "لا تنسى شرب الماء"}, + "notif-text": { + "en": " Don't forget to drink water.", + "ar": "لا تنسى شرب الماء" + }, "custom": {"en": "Custom", "ar": "خاص"}, "undo": {"en": "Undo", "ar": "تراجع"}, "drinking": {"en": "Drinkning", "ar": "الشرب"}, @@ -1434,25 +1882,50 @@ const Map localizedValues = { "ml": {"en": "ML", "ar": "مل"}, "l": {"en": "L", "ar": "لتر"}, "custom-label": {"en": "Enter amount", "ar": "أدخل كمية الماء"}, - "custom-label-in-litres": {"en": "Enter amount in liters", "ar": "أدخل الكمية باللتر"}, - "custom-label-in-mililitres": {"en": "Enter amount in millilitres", "ar": "أدخل الكمية بالملليتر"}, + "custom-label-in-litres": { + "en": "Enter amount in liters", + "ar": "أدخل الكمية باللتر" + }, + "custom-label-in-mililitres": { + "en": "Enter amount in millilitres", + "ar": "أدخل الكمية بالملليتر" + }, "amount": {"en": "Amount", "ar": "الكمية"}, - "target-reach": {"en": "You have reached the target for the day!", "ar": "لقد حققت هدفك اليومي! مبروك"}, - "week-header": {"en": "Water consumed in a week", "ar": "معدل شرب الماء خلال الاسبوع"}, - "month-header": {"en": "Water consumed in a month", "ar": "معدل شرب الماء خلال الشهر"}, - "notif-permission-title": {"en": "Could not set the water reminders", "ar": "لا يمكن ضبط اشعار شرب الماء"}, + "target-reach": { + "en": "You have reached the target for the day!", + "ar": "لقد حققت هدفك اليومي! مبروك" + }, + "week-header": { + "en": "Water consumed in a week", + "ar": "معدل شرب الماء خلال الاسبوع" + }, + "month-header": { + "en": "Water consumed in a month", + "ar": "معدل شرب الماء خلال الشهر" + }, + "notif-permission-title": { + "en": "Could not set the water reminders", + "ar": "لا يمكن ضبط اشعار شرب الماء" + }, "notif-permission-msg": { - "en": "To recieve water reminders, please turn on notifications in the system settings", + "en": + "To recieve water reminders, please turn on notifications in the system settings", "ar": "الرجاء تفعيل الاشعارات في الاعدادات" }, - "verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"}, + "verification_message_code": { + "en": "Please enter verification code", + "ar": "الرجاء إدخال رمز التحقق" + }, "select-location": {"en": "Select Location", "ar": "اختر موقعا"}, - "result-header": {"en": "Get The Result During 8 Hours", "ar": "احصل على النتيجة خلال 8 ساعة"}, + "result-header": { + "en": "Get the result in Few Hours", + "ar": "احصل على النتيجة خلال عدة ساعات" + }, "covid-info": { "en": - "We are using the advance technology to test COVID-19, The sample for examination is taking between the nose and mouth (nasopharyngeal swab), the examination is done by ELITE In Genius of the company ELITECH GROUP MOLECULAR DIAGNOSTICS, Note that the device belongs to an Italian company and is manufactured in Japan with RC- PCR​", + "Dr. Sulaiman Al Habib hospitals are conducting a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches to conduct a corona test within few minutes, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention.", "ar": - "يتوفر لدينا أحدث جهاز خاص بفحص مرض الكورونا (COVID-19) طريقة الفحص تؤخذ مسحة من البلعوم الأنفي ( عن طريف الأنف) ويتم الفحص بواسطة جهاز ELITE In Genius التابع لشركة ELITECH GROUP MOLECULAR DIAGNOSTICS علما بأن الجهاز تابع لشركة إيطالية ومصنع في اليابان بتقينة RC-PCR" + "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية" }, "select-appo": { "en": "Kindly select one of the available appointments from below:", @@ -1465,57 +1938,94 @@ const Map localizedValues = { "covid-alert-info": { "en": "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically​", - "ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة​" + "ar": + "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة​" }, "covid-alert-mins": {"en": "Pay With-in 15 mins", "ar": "ادفع خلال 15 دقيقة"}, "back": {"en": "Back", "ar": "رجوع"}, "get-directions": {"en": "Get Directions", "ar": "احصل على الاتجاهات"}, "selected-location": {"en": "Selected Location:", "ar": "الموقع المحدد:"}, "test-fee": {"en": "Test Fee", "ar": "رسوم الاختبار"}, - "pay-options": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"}, + "pay-options": { + "en": "You can pay by the following Options:", + "ar": "يمكنك الدفع عن طريق الخيارات التالية:" + }, "livecare-service": {"en": "LiveCare Service", "ar": "خدمة لايف كير"}, "livecare-service-desc": { - "en": "is to obtain medical advice with a specialist doctor Via a video call", + "en": + "is to obtain medical advice with a specialist doctor Via a video call", "ar": "هي الحصول على استشارة طبية مع طبيب مختص عن طريق اتصال فيديو" }, "why-livecare": {"en": "WHY LIVECARE", "ar": "لماذا خدمة اللايف كير"}, "livecare-point-1": { - "en": "No need to wait you will get Medical consultation immediately via Video call", - "ar": "لا داعي للانتظار سوف تحصل على الاستشارة الطبية فورا عن طريق مكالمة الفيديو" + "en": + "No need to wait you will get Medical consultation immediately via Video call", + "ar": + "لا داعي للانتظار سوف تحصل على الاستشارة الطبية فورا عن طريق مكالمة الفيديو" }, "doc-virtual-appo-ins4": { "en": "The doctor will see your medical file", "ar": "سوف يتمكن الطبيب من الاطلاع على ملفك الطبي كامل" }, - "doc-virtual-appo-ins5": {"en": "Free prescription delivery service", "ar": "خدمة توصيل الادوية مجانا"}, + "doc-virtual-appo-ins5": { + "en": "Free prescription delivery service", + "ar": "خدمة توصيل الادوية مجانا" + }, "livecare-summary": { "en": "** The service is included with some insurance companies according to the terms and conditions With our best wishes for health and wellness", - "ar": "** الخدمة مشمولة لدى بعض شركات التامين على حسب الشروط والاحكام مع تمنياتنا لكم بدوام الصحة والعافية" + "ar": + "** الخدمة مشمولة لدى بعض شركات التامين على حسب الشروط والاحكام مع تمنياتنا لكم بدوام الصحة والعافية" + }, + "livecare-option-1": { + "en": "Get Medical consultation immediately", + "ar": "الحصول على الاستشارة فورا" }, - "livecare-option-1": {"en": "Get Medical consultation immediately", "ar": "الحصول على الاستشارة فورا"}, "livecare-option-2": {"en": "Instant video call", "ar": "اتصال فيديو فوري"}, "livecare-option-3": {"en": "Book Appointment", "ar": "حجز موعد"}, "livecare-option-4": {"en": "Schedule video call", "ar": "اتصال فيديو مجدول"}, "sms_code": {"en": "Enter SMS Code here", "ar": "أدخل رمز التحقق هنا"}, - "code_failure": {"en": "Didn’t received the code", "ar": "لم أستلم رمز التحقق"}, + "code_failure": { + "en": "Didn’t received the code", + "ar": "لم أستلم رمز التحقق" + }, "resend": {"en": "Resend", "ar": "إعادة إرسال"}, "submitncontinue": {"en": "Submit and continue", "ar": "إرسال ومتابعة"}, - "areyousure": {"en": "Are you sure you want to Add", "ar": "هل أنت متأكد أنك تريد إضافة"}, - "preferredunit": {"en": "Select the preferred unit", "ar": "اختر الوحدة المفضلة"}, + "areyousure": { + "en": "Are you sure you want to Add", + "ar": "هل أنت متأكد أنك تريد إضافة" + }, + "preferredunit": { + "en": "Select the preferred unit", + "ar": "اختر الوحدة المفضلة" + }, "select-unit": {"en": "Select unit", "ar": "اختر وحدة القياس"}, "try-saying": {"en": "Try saying something", "ar": 'حاول قول شيء ما'}, "app-update": {"en": "UPDATE THE APP", "ar": "تحديث التطبيق"}, "covid-alert": {"en": "Alert", "ar": "تنبيه"}, - "enterIdentificationNumber": {"en": "Enter Identification Number", "ar": "أدخل رقم التعريف"}, + "enterIdentificationNumber": { + "en": "Enter Identification Number", + "ar": "أدخل رقم التعريف" + }, "accountActivationDesc": { - "en": "This service allows you to activate your LAKUM account after registering through the Vida system.", - "ar": "تتيح لك هذه الخدمة تفعيل حساب LAKUM الخاص بك بعد التسجيل من خلال نظام Vida." + "en": + "This service allows you to activate your LAKUM account after registering through the Vida system.", + "ar": + "تتيح لك هذه الخدمة تفعيل حساب LAKUM الخاص بك بعد التسجيل من خلال نظام Vida." + }, + "pointsToTransfer": { + "en": "Point's to Transfer :", + "ar": "النقاط المراد تحويلها:" + }, + "enterBeneficiaryAccountNo": { + "en": "Enter Beneficiary Account No.", + "ar": "أدخل رقم حساب المستفيد" + }, + "confirm-prescription": { + "en": "Are you sure !! you want to send this request", + "ar": "تاكيد ارسال الطلب؟" }, - "pointsToTransfer": {"en": "Point's to Transfer :", "ar": "النقاط المراد تحويلها:"}, - "enterBeneficiaryAccountNo": {"en": "Enter Beneficiary Account No.", "ar": "أدخل رقم حساب المستفيد"}, - "confirm-prescription": {"en": "Are you sure !! you want to send this request", "ar": "تاكيد ارسال الطلب؟"}, "you-already-have-order": { "en": "You already have this order! do you want to view it?", "ar": "لديك هذا الطلب بالفعل! هل تريد مشاهدته؟" @@ -1539,9 +2049,18 @@ const Map localizedValues = { "appointment-no": {"en": "Appointment No", "ar": "تقرری نمبر"}, "insurance-id": {"en": "Insurance ID", "ar": "انشورنس ID"}, "chiefComplaints": {"en": "Chief Complaints", "ar": "الشكوى الرئيسة"}, - "errorChiefComplaints": {"en": "Please Chief Complaints", "ar": "يرجى ادخال الشكوى الرئيسة"}, - "errorExpectedArrivalTimes": {"en": "Please Expected arrival time", "ar": "يرجى ادخال الوقت المتوقع للوصول"}, - "expectedArrivalTime": {"en": "Expected arrival time", "ar": "الوقت المتوقع للوصول"}, + "errorChiefComplaints": { + "en": "Please Chief Complaints", + "ar": "يرجى ادخال الشكوى الرئيسة" + }, + "errorExpectedArrivalTimes": { + "en": "Please Expected arrival time", + "ar": "يرجى ادخال الوقت المتوقع للوصول" + }, + "expectedArrivalTime": { + "en": "Expected arrival time", + "ar": "الوقت المتوقع للوصول" + }, "add-address": {"en": "Add new address", "ar": "اضف عنوان جديد"}, "enter-file": { "en": "Please enter the mobile number and the medical file number", @@ -1549,13 +2068,28 @@ const Map localizedValues = { }, "allow": {"en": "Allow", "ar": "السماح"}, "reject": {"en": "Reject", "ar": "رفض"}, - "referralRequesterInformation": {"en": "Referral requester information", "ar": "معلومات طالب الإحالة"}, - "enterReferralRequesterName": {"en": "Enter Referral Requester Name*", "ar": "أدخل اسم مقدم طلب الإحالة *"}, + "referralRequesterInformation": { + "en": "Referral requester information", + "ar": "معلومات طالب الإحالة" + }, + "enterReferralRequesterName": { + "en": "Enter Referral Requester Name*", + "ar": "أدخل اسم مقدم طلب الإحالة *" + }, "selectRelationship": {"en": "Select Relationship", "ar": "حدد العلاقة"}, - "requesterRelationship": {"en": "Requester Relationship", "ar": "علاقة الطالب"}, + "requesterRelationship": { + "en": "Requester Relationship", + "ar": "علاقة الطالب" + }, "newReferral": {"en": "New Referral", "ar": "إحالة جديدة"}, - "searchForReferrals": {"en": "Search For Referrals", "ar": "ابحث عن الإحالات"}, - "covid-select-procedure": {"en": "Please select the procedure:", "ar": "الرجاء تحديد الإجراء:"}, + "searchForReferrals": { + "en": "Search For Referrals", + "ar": "ابحث عن الإحالات" + }, + "covid-select-procedure": { + "en": "Please select the procedure:", + "ar": "الرجاء تحديد الإجراء:" + }, "online-consultation": {"en": "Online Consultation", "ar": "استشارة مباشرة"}, "expected-weiting": { "en": "Waiting time to start LiveCare consultation ", @@ -1563,10 +2097,14 @@ const Map localizedValues = { }, "er-consult-fee": {"en": "Consultation Fee", "ar": "رسوم الاستشارة"}, "insured-patient": { - "en": "If you're Insurance patient, you have only have to pay the co-payment", + "en": + "If you're Insurance patient, you have only have to pay the co-payment", "ar": "إذا كنت مريضًا في مجال التأمين ، فليس عليك سوى دفع المبلغ المشترك" }, - "i-accept-terms": {"en": "I Accept the Terms And Conditions", "ar": "أوافق على الشروط والأحكام"}, + "i-accept-terms": { + "en": "I Accept the Terms And Conditions", + "ar": "أوافق على الشروط والأحكام" + }, "upcoming-pay-options": { "en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:" @@ -1586,10 +2124,154 @@ const Map localizedValues = { "er-consultation": { "en": "This service allows you to make an online virtual consultation via video call directly with the doctor from anywhere at any time.", - "ar": "تتيح لك هذه الخدمة إجراء استشارة عبر مكالمة فيديو مباشرة مع الطبيب من أي مكان وفي أي وقت" + "ar": + "تتيح لك هذه الخدمة إجراء استشارة عبر مكالمة فيديو مباشرة مع الطبيب من أي مكان وفي أي وقت" }, "my-invoice": {"en": "My Invoice", "ar": "فواتيري"}, "invoice-list": {"en": "Invoices List", "ar": "فائمة الفواتير"}, - "thisItemIsNotAvailable": {"en": "This item is not available", "ar": "هذا العنصر غير متوفر"}, + "thisItemIsNotAvailable": { + "en": "This item is not available", + "ar": "هذا العنصر غير متوفر" + }, "beforeAfterImages": {"en": "Before After Images", "ar": "قبل بعد الصور"}, + "clinic-accept-livecare": { + "en": + "No need to wait or visit You can now get medical consultation via Video call (LiveCare service) in The name of the clinic clinic and the doctor will contact you immediately", + "ar": + "لا داعي للانتظار او الحضور يمكنك الان الحصول على الاستشارة عن طريق مكالمة الفيديو ( خدمة لايف كير) في العيادة وسوف يقوم الطبيب بالتواصل معك فورا" + }, + "livecareModal-top": { + "en": "This Clinic is accepting LiveCare services", + "ar": "هذه العيادة تقدم خدمة لايف كير" + }, + "schedule": {"en": "Schedule", "ar": "جدول الحضور"}, + "livecare-point-2": { + "en": "A Specialized doctor will contact you", + "ar": "سوف يقوم بخدمتك طبيب متخصص" + }, + "livecare-point-3": { + "en": "A Doctor will be able to see your full medical file history", + "ar": "سوف يتمكن الطبيب من الاطلاع على ملفك الطبي كاملا" + }, + "livecare-point-4": { + "en": "Free Medicine delivery Available", + "ar": "خدمة توصيل الادوية مجانا" + }, + "livecare-point-5": { + "en": "No need to visit the service is in your place", + "ar": "لا داعي للحضور سوف تحصل على الخدمة في مكانك" + }, + "book-immediate-livecare": { + "en": "I accept to get the service immediately", + "ar": "موافق اريد الحصول على الخدمة فورا" + }, + "book-video-livecare-2": { + "en": "I don't need to visit the clinic", + "ar": "اتصال فيديو لا احتاج الحضور الى العيادة" + }, + "no-thankyou": {"en": "No Thanks", "ar": "لا شكرا"}, + "visit-clinic": { + "en": "Schedule appointment with the doctor", + "ar": "ارغب في حجز موعد مجدول مع الطبيب" + }, + "generate-covid-certificate": { + "en": "Generate Covid-19 Certificate", + "ar": "إنشاء شهادة كورونا" + }, + "is-report-outside-ksa": { + "en": "Is the certificate needed for outside KSA?", + "ar": "هل الشهادة مطلوبة من خارج المملكة؟" + }, + "passport-number": {"en": "Passport Number", "ar": "رقم جواز السفر"}, + "enter-passport-number": { + "en": "Please confirm or update your passport number:", + "ar": "الرجاء تأكيد أو تحديث رقم جواز السفر الخاص بك:" + }, + "valid-passport-number": { + "en": "Please enter valid passport number", + "ar": "الرجاء إدخال رقم جواز سفر صالح" + }, + "about-app": {"en": "About the app", "ar": "عن التطبيق"}, + "about-points": { + "length": {"en": "16", "ar": "16"}, + "1": { + "en": "Online Appointment Booking & rescheduling", + "ar": "حجز المواعيد إلكترونياً و إعادة جدولتها" + }, + "2": { + "en": "Insurance approval status", + "ar": "موافقات شركات التأمين الطبية" + }, + "3": {"en": "Find A doctor", "ar": "معلومات الأطباء والبحث عنهم وسؤالهم"}, + "4": {"en": "Ask your doctor", "ar": "اسأل طبيبك"}, + "5": {"en": "Medical prescriptions", "ar": "الوصفات الطبية"}, + "6": {"en": "Lab results", "ar": "نتائج التحاليل المخبرية"}, + "7": { + "en": "Hospitals contact numbers", + "ar": "أرقام هواتف جميع المستشفيات" + }, + "8": {"en": "Doctor profiles", "ar": "ملف الطبيب"}, + "9": {"en": "Hospitals locations", "ar": "مواقع المستشفيات على الخريطة"}, + "10": {"en": "Pharmacies Locations", "ar": "مواقع الصيدليات على الخريطة"}, + "11": { + "en": "Hospital's Virtual Tour", + "ar": "جولة افتراضية داخل المستشفيات" + }, + "12": { + "en": "Official Social Media", + "ar": "مواقع التواصل الاجتماعي الخاصة بالمجموعة" + }, + "13": {"en": "Vaccines Schedule", "ar": "جدول التطعيمات"}, + "14": {"en": "Health Calculators", "ar": "حاسبات صحية"}, + "15": {"en": "Other Services", "ar": "خدمات أخرى"} + }, + "continue-plan": { + "en": "Continue with the treatment plan?", + "ar": "إكمال الخطة العلاجية؟" + }, + "dental-procedure-list": { + "en": "Dental Procedures for this Appointment: ", + "ar": "إجراءات الأسنان لهذا الموعد:" + }, + "time-needed": {"en": "Time Needed:", "ar": "الوقت اللازم:"}, + "total-time-needed": { + "en": "Total Appointment Time:", + "ar": "وقت المواعيد الكلي:" + }, + "info-eye": { + "en": "This service allows you to view all the eye measurements, lenses, and eyeglasses that have been made in the Habib Medical Group.", + "ar": " خدمة قياسات النظر: هذه الخدمة تمكنك من الاطلاع على جميع قياسات النظر والعدسات والنظارات التي تمت في مجموعة الحبيب الطبية." + }, + "info-vaccines": { + "en": "This service allows you to view all the vaccinations that were taken in Al Habib Medical Group.", + "ar": "خدمة تطعيماتي: هذه الخدمة تمكنك من الاطلاع على جميع التطعيمات التي تمت في مجموعة الحبيب الطبية." + }, + "info-trackers": { + "en": "This service allows you to record the readings of the measurement of sugar, pressure, and weight and then refer to them as a reference in addition to view the statistics charts.", + "ar": "متابعة قراءاتي: هذه الخدمة تمكنك من تسجيل قراءات قياس السكر والضغط والوزن بشكل دوري ومن ثم الاطلاع عليها كمرجع وكذلك الاطلاع على الرسوم البيانية لمتابعة تطور الحالة." + }, + "info-health-data": { + "en": "This service is designed to allows you to synchronize the health data from your smart watches into your health record system in Habib Medical Group so that the doctors you are visiting can analyze your health & activity level.", + "ar": "تم تصميم هذه الخدمة للسماح لك بمزامنة البيانات الصحية من ساعاتك الذكية الى نظام السجلات الصحية الخاص بك في مجموعة حبيب الطبية حتى يتمكن الأطباء الذين تزورهم من تحليل مستوى صحتك ونشاطك." + }, + "info-ask-doc": { + "en": "This service allows you to ask the doctor you have visited during the last 14 days. When you receive a response from the doctor, you will be notified via the system to view the doctor's reply.", + "ar": "اسال طبيبك: هذه الخدمة تمكنك من توجيه استفسارات الى الطبيب الذي قمت بزيارته خلال اخر 14 يوم وكذلك عند تلقى الرد من الطبيب سوف يتم ابلاغك عن طريق النظام للاطلاع على رد الطبيب." + }, + "info-auto-wifi": { + "en": "This service allows you to connect to the Internet directly without the need for entering a user name or password.", + "ar": "الاتصال بالانترنت: هذه الخدمة تمكنك من الاتصال بالانترنت مباشرة دون الحاجة الى اسم مستخدم او كلمة مرور." + }, + "auto-wifi": { + "en": "Connect To Internet", + "ar": "الإتصال بالإنترنت" + }, + "child-vaccine-info": { + "en": "This service to remind you of the deadlines of the necessary vaccinations for your child’s against diseases targeted by immunization according to the MOH vaccinations schedule by sending a reminding message and notifications of the vaccination date to the registered mobile phone.", + "ar": "هذه الخدمة تم تصميمها لتذكيرك بالمواعيد النهائية للتحصينات اللازمة لطفلك ضد الأمراض المستهدفة بالتحصين وفقًا لجدول تطعيمات وزارة الصحة عن طريق إرسال رسالة تذكير وإشعارات عن مواعيد التطعيم على الجوال المسجل." + }, + "h2o-info": { + "en": "This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.", + "ar": "تم تصميم هذه الخدمة لمساعدتك في تحديد وتتبع كميات المياه التي يتوجب شربها بشكل يومي. كما توفر هذه الخدمة تذكيرات الجدول الزمني وتقدم تحليلًا إحصائيًا لمقدار ما استهلكته خلال اليوم أو الأسبوع أو الشهر." + }, }; diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index 703f5e3c..50390ae2 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -31,3 +31,5 @@ const PHARMACY_SELECTED_ADDRESS = 'selected-address'; const PHARMACY_AUTORZIE_TOKEN = 'PHARMACY_AUTORZIE_TOKEN'; const H2O_UNIT = 'H2O_UNIT'; const H2O_REMINDER = 'H2O_REMINDER'; +const LIVECARE_CLINIC_DATA = 'LIVECARE_CLINIC_DATA'; +const DOCTOR_SCHEDULE_DATE_SEL = 'DOCTOR_SCHEDULE_DATE_SEL'; diff --git a/lib/core/model/er/AmbulanceRequestOrdersModel.dart b/lib/core/model/er/AmbulanceRequestOrdersModel.dart new file mode 100644 index 00000000..6bcc02b0 --- /dev/null +++ b/lib/core/model/er/AmbulanceRequestOrdersModel.dart @@ -0,0 +1,319 @@ +class AmbulanceRequestOrdersModel { + String statusText; + int paymentStatus; + dynamic clientRequestid; + dynamic paymentStatusText; + dynamic projectName; + String nearestProjectName; + double paymentAmount; + WFOrder wFOrder; + String serviceText; + bool isSentForApproval; + int exaCartOrderId; + bool isTimer; + int timeSeconds; + int totalPendingSeconds; + int timeMinute; + int timeHour; + int timeTotalSeconds; + int timeTotalMinute; + int timeTotalHour; + dynamic approvalStatus; + bool isActive; + int clickButton; + dynamic orderHistory; + String pickupLocation; + String dropOffLocation; + String clinicName; + String doctorName; + String branch; + String time; + dynamic notes; + int id; + String patientId; + int patientOutSa; + bool isOutPatient; + int projectId; + int nearestProjectId; + dynamic longitude; + dynamic latitude; + dynamic appointmentNo; + dynamic dischargeId; + int statusId; + int serviceId; + int channel; + Orderpayment orderpayment; + dynamic orderselectedservice; + dynamic wforder; + dynamic orderapprovalobj; + String created; + dynamic createdBy; + dynamic modified; + dynamic modifiedBy; + bool isDeleted; + + AmbulanceRequestOrdersModel( + {this.statusText, + this.paymentStatus, + this.clientRequestid, + this.paymentStatusText, + this.projectName, + this.nearestProjectName, + this.paymentAmount, + this.wFOrder, + this.serviceText, + this.isSentForApproval, + this.exaCartOrderId, + this.isTimer, + this.timeSeconds, + this.totalPendingSeconds, + this.timeMinute, + this.timeHour, + this.timeTotalSeconds, + this.timeTotalMinute, + this.timeTotalHour, + this.approvalStatus, + this.isActive, + this.clickButton, + this.orderHistory, + this.pickupLocation, + this.dropOffLocation, + this.clinicName, + this.doctorName, + this.branch, + this.time, + this.notes, + this.id, + this.patientId, + this.patientOutSa, + this.isOutPatient, + this.projectId, + this.nearestProjectId, + this.longitude, + this.latitude, + this.appointmentNo, + this.dischargeId, + this.statusId, + this.serviceId, + this.channel, + this.orderpayment, + this.orderselectedservice, + this.wforder, + this.orderapprovalobj, + this.created, + this.createdBy, + this.modified, + this.modifiedBy, + this.isDeleted}); + + AmbulanceRequestOrdersModel.fromJson(Map json) { + statusText = json['statusText']; + paymentStatus = json['paymentStatus']; + clientRequestid = json['clientRequestid']; + paymentStatusText = json['paymentStatusText']; + projectName = json['projectName']; + nearestProjectName = json['nearestProjectName']; + paymentAmount = json['paymentAmount']; + wFOrder = json['wF_order'] != null ? new WFOrder.fromJson(json['wF_order']) : null; + serviceText = json['serviceText']; + isSentForApproval = json['isSentForApproval']; + exaCartOrderId = json['exaCart_OrderId']; + isTimer = json['isTimer']; + timeSeconds = json['timeSeconds']; + totalPendingSeconds = json['totalPendingSeconds']; + timeMinute = json['timeMinute']; + timeHour = json['timeHour']; + timeTotalSeconds = json['timeTotalSeconds']; + timeTotalMinute = json['timeTotalMinute']; + timeTotalHour = json['timeTotalHour']; + approvalStatus = json['approvalStatus']; + isActive = json['isActive']; + clickButton = json['clickButton']; + orderHistory = json['orderHistory']; + pickupLocation = json['pickupLocation']; + dropOffLocation = json['dropOffLocation']; + clinicName = json['clinicName']; + doctorName = json['doctorName']; + branch = json['branch']; + time = json['time']; + notes = json['notes']; + id = json['id']; + patientId = json['patientId']; + patientOutSa = json['patientOutSa']; + isOutPatient = json['isOutPatient']; + projectId = json['projectId']; + nearestProjectId = json['nearestProjectId']; + longitude = json['longitude']; + latitude = json['latitude']; + appointmentNo = json['appointmentNo']; + dischargeId = json['dischargeId']; + statusId = json['statusId']; + serviceId = json['serviceId']; + channel = json['channel']; + orderpayment = json['orderpayment'] != null ? new Orderpayment.fromJson(json['orderpayment']) : null; + orderselectedservice = json['orderselectedservice']; + wforder = json['wforder']; + orderapprovalobj = json['orderapprovalobj']; + created = json['created']; + createdBy = json['createdBy']; + modified = json['modified']; + modifiedBy = json['modifiedBy']; + isDeleted = json['isDeleted']; + } + + Map toJson() { + final Map data = new Map(); + data['statusText'] = this.statusText; + data['paymentStatus'] = this.paymentStatus; + data['clientRequestid'] = this.clientRequestid; + data['paymentStatusText'] = this.paymentStatusText; + data['projectName'] = this.projectName; + data['nearestProjectName'] = this.nearestProjectName; + data['paymentAmount'] = this.paymentAmount; + if (this.wFOrder != null) { + data['wF_order'] = this.wFOrder.toJson(); + } + data['serviceText'] = this.serviceText; + data['isSentForApproval'] = this.isSentForApproval; + data['exaCart_OrderId'] = this.exaCartOrderId; + data['isTimer'] = this.isTimer; + data['timeSeconds'] = this.timeSeconds; + data['totalPendingSeconds'] = this.totalPendingSeconds; + data['timeMinute'] = this.timeMinute; + data['timeHour'] = this.timeHour; + data['timeTotalSeconds'] = this.timeTotalSeconds; + data['timeTotalMinute'] = this.timeTotalMinute; + data['timeTotalHour'] = this.timeTotalHour; + data['approvalStatus'] = this.approvalStatus; + data['isActive'] = this.isActive; + data['clickButton'] = this.clickButton; + data['orderHistory'] = this.orderHistory; + data['pickupLocation'] = this.pickupLocation; + data['dropOffLocation'] = this.dropOffLocation; + data['clinicName'] = this.clinicName; + data['doctorName'] = this.doctorName; + data['branch'] = this.branch; + data['time'] = this.time; + data['notes'] = this.notes; + data['id'] = this.id; + data['patientId'] = this.patientId; + data['patientOutSa'] = this.patientOutSa; + data['isOutPatient'] = this.isOutPatient; + data['projectId'] = this.projectId; + data['nearestProjectId'] = this.nearestProjectId; + data['longitude'] = this.longitude; + data['latitude'] = this.latitude; + data['appointmentNo'] = this.appointmentNo; + data['dischargeId'] = this.dischargeId; + data['statusId'] = this.statusId; + data['serviceId'] = this.serviceId; + data['channel'] = this.channel; + if (this.orderpayment != null) { + data['orderpayment'] = this.orderpayment.toJson(); + } + data['orderselectedservice'] = this.orderselectedservice; + data['wforder'] = this.wforder; + data['orderapprovalobj'] = this.orderapprovalobj; + data['created'] = this.created; + data['createdBy'] = this.createdBy; + data['modified'] = this.modified; + data['modifiedBy'] = this.modifiedBy; + data['isDeleted'] = this.isDeleted; + return data; + } +} + +class WFOrder { + dynamic wfButtonsDTO; + int id; + int orderId; + int previousStep; + int nextStep; + int serviceId; + dynamic order; + String created; + dynamic createdBy; + dynamic modified; + dynamic modifiedBy; + bool isDeleted; + + WFOrder({this.wfButtonsDTO, this.id, this.orderId, this.previousStep, this.nextStep, this.serviceId, this.order, this.created, this.createdBy, this.modified, this.modifiedBy, this.isDeleted}); + + WFOrder.fromJson(Map json) { + wfButtonsDTO = json['wf_ButtonsDTO']; + id = json['id']; + orderId = json['orderId']; + previousStep = json['previousStep']; + nextStep = json['nextStep']; + serviceId = json['serviceId']; + order = json['order']; + created = json['created']; + createdBy = json['createdBy']; + modified = json['modified']; + modifiedBy = json['modifiedBy']; + isDeleted = json['isDeleted']; + } + + Map toJson() { + final Map data = new Map(); + data['wf_ButtonsDTO'] = this.wfButtonsDTO; + data['id'] = this.id; + data['orderId'] = this.orderId; + data['previousStep'] = this.previousStep; + data['nextStep'] = this.nextStep; + data['serviceId'] = this.serviceId; + data['order'] = this.order; + data['created'] = this.created; + data['createdBy'] = this.createdBy; + data['modified'] = this.modified; + data['modifiedBy'] = this.modifiedBy; + data['isDeleted'] = this.isDeleted; + return data; + } +} + +class Orderpayment { + int id; + int orderId; + dynamic clientRequestId; + double totalAmount; + int paymentStatus; + dynamic order; + String created; + dynamic createdBy; + dynamic modified; + dynamic modifiedBy; + bool isDeleted; + + Orderpayment({this.id, this.orderId, this.clientRequestId, this.totalAmount, this.paymentStatus, this.order, this.created, this.createdBy, this.modified, this.modifiedBy, this.isDeleted}); + + Orderpayment.fromJson(Map json) { + id = json['id']; + orderId = json['orderId']; + clientRequestId = json['clientRequestId']; + totalAmount = json['totalAmount']; + paymentStatus = json['paymentStatus']; + order = json['order']; + created = json['created']; + createdBy = json['createdBy']; + modified = json['modified']; + modifiedBy = json['modifiedBy']; + isDeleted = json['isDeleted']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['orderId'] = this.orderId; + data['clientRequestId'] = this.clientRequestId; + data['totalAmount'] = this.totalAmount; + data['paymentStatus'] = this.paymentStatus; + data['order'] = this.order; + data['created'] = this.created; + data['createdBy'] = this.createdBy; + data['modified'] = this.modified; + data['modifiedBy'] = this.modifiedBy; + data['isDeleted'] = this.isDeleted; + return data; + } +} diff --git a/lib/core/model/er/PatientER.dart b/lib/core/model/er/PatientER.dart index f1694f9e..288b8dc2 100644 --- a/lib/core/model/er/PatientER.dart +++ b/lib/core/model/er/PatientER.dart @@ -8,7 +8,7 @@ class PatientER { int languageID; String iPAdress; String generalid; - int patientOutSA; + dynamic patientOutSA; String sessionID; bool isDentalAllowedBackend; int deviceTypeID; @@ -164,7 +164,7 @@ class PatientER { data['SessionID'] = this.sessionID; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['DeviceTypeID'] = this.deviceTypeID; - data['PatientID'] = this.patientID; + data['PatientID'] = this.patientID.toString(); data['TokenID'] = this.tokenID; data['PatientTypeID'] = this.patientTypeID; data['PatientType'] = this.patientType; diff --git a/lib/core/model/er/PatientER_RC.dart b/lib/core/model/er/PatientER_RC.dart new file mode 100644 index 00000000..f5afc1d6 --- /dev/null +++ b/lib/core/model/er/PatientER_RC.dart @@ -0,0 +1,200 @@ +import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; + +class PatientER_RC { + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + bool patientOutSA; + String sessionID; + bool isDentalAllowedBackend; + int deviceTypeID; + String patientID; + String tokenID; + int patientTypeID; + int patientType; + int orderServiceID; + String patientIdentificationID; + dynamic patientOutSa; + int projectID; + int lineItemNo; + TransportationDetails transportationDetails; + PatientERTransportationMethod patientERTransportationMethod; + + PatientER_RC( + {this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType, + this.orderServiceID, + this.patientIdentificationID, + this.patientOutSa, + this.projectID, + this.lineItemNo, + this.transportationDetails}); + + PatientER_RC.fromJson(Map json) { + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + patientID = json['PatientID']; + tokenID = json['TokenID']; + patientTypeID = json['PatientTypeID']; + patientType = json['PatientType']; + orderServiceID = json['OrderServiceID']; + patientIdentificationID = json['PatientIdentificationID']; + patientOutSa = json['patientOutSa']; + projectID = json['projectID']; + lineItemNo = json['lineItemNo']; + transportationDetails = json['transportationDetails'] != null + ? new TransportationDetails.fromJson(json['transportationDetails']) + : null; + } + + Map toJson() { + final Map data = new Map(); + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + data['PatientID'] = this.patientID; + data['TokenID'] = this.tokenID; + data['PatientTypeID'] = this.patientTypeID; + data['PatientType'] = this.patientType; + data['OrderServiceID'] = this.orderServiceID; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['patientOutSa'] = this.patientOutSa; + data['projectID'] = this.projectID; + data['lineItemNo'] = this.lineItemNo; + if (this.transportationDetails != null) { + data['transportationDetails'] = this.transportationDetails.toJson(); + } + return data; + } +} + +class TransportationDetails { + int direction; + int haveAppointment; + int tripType; + int pickupUrgency; + int pickupSpot; + String pickupDateTime; + String transportationType; + int ambulate; + String notes; + int requesterFileNo; + String requesterMobileNo; + bool requesterIsOutSA; + String pickupLocationName; + String dropoffLocationName; + String pickupLatitude; + String pickupLongitude; + String dropoffLatitude; + String dropoffLongitude; + String appointmentNo; + String appointmentClinicName; + String appointmentDoctorName; + String appointmentBranch; + String appointmentTime; + + TransportationDetails( + {this.direction, + this.haveAppointment, + this.tripType, + this.pickupUrgency, + this.pickupSpot, + this.pickupDateTime, + this.transportationType, + this.ambulate, + this.notes, + this.requesterFileNo, + this.requesterMobileNo, + this.requesterIsOutSA, + this.pickupLocationName, + this.dropoffLocationName, + this.pickupLatitude, + this.pickupLongitude, + this.dropoffLatitude, + this.dropoffLongitude, + this.appointmentNo, + this.appointmentClinicName, + this.appointmentDoctorName, + this.appointmentBranch, + this.appointmentTime}); + + TransportationDetails.fromJson(Map json) { + direction = json['direction']; + haveAppointment = json['haveAppointment']; + tripType = json['tripType']; + pickupUrgency = json['pickupUrgency']; + pickupSpot = json['pickupSpot']; + pickupDateTime = json['pickupDateTime']; + transportationType = json['transportationType']; + ambulate = json['ambulate']; + notes = json['notes']; + requesterFileNo = json['requesterFileNo']; + requesterMobileNo = json['requesterMobileNo']; + requesterIsOutSA = json['requesterIsOutSA']; + pickupLocationName = json['pickupLocationName']; + dropoffLocationName = json['dropoffLocationName']; + pickupLatitude = json['pickup_Latitude']; + pickupLongitude = json['pickup_Longitude']; + dropoffLatitude = json['dropoff_Latitude']; + dropoffLongitude = json['dropoff_Longitude']; + appointmentNo = json['appointmentNo']; + appointmentClinicName = json['appointmentClinicName']; + appointmentDoctorName = json['appointmentDoctorName']; + appointmentBranch = json['appointmentBranch']; + appointmentTime = json['appointmentTime']; + } + + Map toJson() { + final Map data = new Map(); + data['direction'] = this.direction; + data['haveAppointment'] = this.haveAppointment; + data['tripType'] = this.tripType; + data['pickupUrgency'] = this.pickupUrgency; + data['pickupSpot'] = this.pickupSpot; + data['pickupDateTime'] = this.pickupDateTime; + data['transportationType'] = this.transportationType; + data['ambulate'] = this.ambulate; + data['notes'] = this.notes; + data['requesterFileNo'] = this.requesterFileNo; + data['requesterMobileNo'] = this.requesterMobileNo; + data['requesterIsOutSA'] = this.requesterIsOutSA; + data['pickupLocationName'] = this.pickupLocationName; + data['dropoffLocationName'] = this.dropoffLocationName; + data['pickup_Latitude'] = this.pickupLatitude; + data['pickup_Longitude'] = this.pickupLongitude; + data['dropoff_Latitude'] = this.dropoffLatitude; + data['dropoff_Longitude'] = this.dropoffLongitude; + data['appointmentNo'] = this.appointmentNo; + data['appointmentClinicName'] = this.appointmentClinicName; + data['appointmentDoctorName'] = this.appointmentDoctorName; + data['appointmentBranch'] = this.appointmentBranch; + data['appointmentTime'] = this.appointmentTime; + return data; + } +} diff --git a/lib/core/model/er/get_all_transportation_method_list_model.dart b/lib/core/model/er/get_all_transportation_method_list_model.dart index ebc9caf7..1f0a91c3 100644 --- a/lib/core/model/er/get_all_transportation_method_list_model.dart +++ b/lib/core/model/er/get_all_transportation_method_list_model.dart @@ -1,79 +1,56 @@ -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class PatientERTransportationMethod { - dynamic id; - DateTime createDate; - DateTime lastEditDate; - dynamic createdBy; - dynamic lastEditBy; - bool isActive; - String title; - String titleAR; + int id; + String serviceID; + int orderServiceID; + String text; + String textN; dynamic price; - dynamic isDefault; - dynamic visibility; - dynamic durationId; - String description; - String descriptionAR; - dynamic totalPrice; - dynamic vAT; + dynamic priceVAT; + dynamic priceTotal; + bool isEnabled; + int orderId; + int quantity; PatientERTransportationMethod( - { - this.id, - this.createDate, - this.lastEditDate, - this.createdBy, - this.lastEditBy, - this.isActive, - this.title, - this.titleAR, + {this.id, + this.serviceID, + this.orderServiceID, + this.text, + this.textN, this.price, - this.isDefault, - this.visibility, - this.durationId, - this.description, - this.descriptionAR, - this.totalPrice, - this.vAT}); + this.priceVAT, + this.priceTotal, + this.isEnabled, + this.orderId, + this.quantity}); - PatientERTransportationMethod.fromJson( - Map json) { - id = json['Id']; - createDate = DateUtil.convertStringToDate(json['CreateDate']); - lastEditDate = DateUtil.convertStringToDate(json['LastEditDate']); - createdBy = json['CreatedBy']; - lastEditBy = json['LastEditBy']; - isActive = json['IsActive']; - title = json['Title']; - titleAR = json['TitleAR']; - price = json['Price']; - isDefault = json['isDefault']; - visibility = json['Visibility']; - durationId = json['DurationId']; - description = json['Description']; - descriptionAR = json['DescriptionAR']; - totalPrice = json['TotalPrice']; - vAT = json['VAT']; + PatientERTransportationMethod.fromJson(Map json) { + id = json['id']; + serviceID = json['serviceID']; + orderServiceID = json['orderServiceID']; + text = json['text']; + textN = json['textN']; + price = json['price']; + priceVAT = json['priceVAT']; + priceTotal = json['priceTotal']; + isEnabled = json['isEnabled']; + orderId = json['orderId']; + quantity = json['quantity']; } Map toJson() { final Map data = new Map(); - data['Id'] = this.id; - data['CreateDate'] = this.createDate; - data['LastEditDate'] = this.lastEditDate; - data['CreatedBy'] = this.createdBy; - data['LastEditBy'] = this.lastEditBy; - data['IsActive'] = this.isActive; - data['Title'] = this.title; - data['TitleAR'] = this.titleAR; - data['Price'] = this.price; - data['isDefault'] = this.isDefault; - data['Visibility'] = this.visibility; - data['DurationId'] = this.durationId; - data['Description'] = this.description; - data['DescriptionAR'] = this.descriptionAR; - data['TotalPrice'] = this.totalPrice; - data['VAT'] = this.vAT; + data['id'] = this.id; + data['serviceID'] = this.serviceID; + data['orderServiceID'] = this.orderServiceID; + data['text'] = this.text; + data['textN'] = this.textN; + data['price'] = this.price; + data['priceVAT'] = this.priceVAT; + data['priceTotal'] = this.priceTotal; + data['isEnabled'] = this.isEnabled; + data['orderId'] = this.orderId; + data['quantity'] = this.quantity; return data; } -} \ No newline at end of file +} diff --git a/lib/core/model/feedback/request_insert_coc_item.dart b/lib/core/model/feedback/request_insert_coc_item.dart index e8b6fce5..4bb397e6 100644 --- a/lib/core/model/feedback/request_insert_coc_item.dart +++ b/lib/core/model/feedback/request_insert_coc_item.dart @@ -29,38 +29,39 @@ class RequestInsertCOCItem { int deviceTypeID; int patientType; double appVersion; - + bool forDemo; RequestInsertCOCItem( {this.isUserLoggedIn, - this.mobileNo, - this.identificationNo, - this.patientID, - this.patientOutSA, - this.patientTypeID, - this.tokenID, - this.patientName, - this.projectID, - this.fileName, - this.attachment, - this.uILanguage, - this.browserInfo, - this.cOCTypeName, - this.formTypeID, - this.details, - this.deviceInfo, - this.deviceType, - this.title, - this.resolution, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientType, - this.appVersion}); + this.mobileNo, + this.identificationNo, + this.patientID, + this.patientOutSA, + this.patientTypeID, + this.tokenID, + this.patientName, + this.projectID, + this.fileName, + this.attachment, + this.uILanguage, + this.browserInfo, + this.cOCTypeName, + this.formTypeID, + this.details, + this.deviceInfo, + this.deviceType, + this.title, + this.resolution, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientType, + this.appVersion, + this.forDemo}); RequestInsertCOCItem.fromJson(Map json) { isUserLoggedIn = json['IsUserLoggedIn']; @@ -93,6 +94,7 @@ class RequestInsertCOCItem { deviceTypeID = json['DeviceTypeID']; patientType = json['PatientType']; appVersion = json['AppVersion']; + forDemo = json['ForDemo']; } Map toJson() { @@ -127,6 +129,8 @@ class RequestInsertCOCItem { data['DeviceTypeID'] = this.deviceTypeID; data['PatientType'] = this.patientType; data['AppVersion'] = this.appVersion; + data['ForDemo'] = this.forDemo; + return data; } } diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart index 2deb13f3..4949a3de 100644 --- a/lib/core/model/labs/lab_result.dart +++ b/lib/core/model/labs/lab_result.dart @@ -1,15 +1,29 @@ +class LabResultList { + String filterName = ""; + List patientLabResultList = List(); + + LabResultList({this.filterName, LabResult lab}) { + patientLabResultList.add(lab); + } +} + class LabResult { String description; dynamic femaleInterpretativeData; int gender; + bool isCertificateAllowed; int lineItemNo; dynamic maleInterpretativeData; - String notes; + dynamic notes; + int orderLineItemNo; + int orderNo; String packageID; int patientID; String projectID; String referanceRange; String resultValue; + int resultValueBasedLineItemNo; + String resultValueFlag; String sampleCollectedOn; String sampleReceivedOn; String setupID; @@ -21,37 +35,47 @@ class LabResult { LabResult( {this.description, - this.femaleInterpretativeData, - this.gender, - this.lineItemNo, - this.maleInterpretativeData, - this.notes, - this.packageID, - this.patientID, - this.projectID, - this.referanceRange, - this.resultValue, - this.sampleCollectedOn, - this.sampleReceivedOn, - this.setupID, - this.superVerifiedOn, - this.testCode, - this.uOM, - this.verifiedOn, - this.verifiedOnDateTime}); + this.femaleInterpretativeData, + this.gender, + this.isCertificateAllowed, + this.lineItemNo, + this.maleInterpretativeData, + this.notes, + this.orderLineItemNo, + this.orderNo, + this.packageID, + this.patientID, + this.projectID, + this.referanceRange, + this.resultValue, + this.resultValueBasedLineItemNo, + this.resultValueFlag, + this.sampleCollectedOn, + this.sampleReceivedOn, + this.setupID, + this.superVerifiedOn, + this.testCode, + this.uOM, + this.verifiedOn, + this.verifiedOnDateTime}); LabResult.fromJson(Map json) { description = json['Description']; femaleInterpretativeData = json['FemaleInterpretativeData']; gender = json['Gender']; + isCertificateAllowed = json['IsCertificateAllowed']; lineItemNo = json['LineItemNo']; maleInterpretativeData = json['MaleInterpretativeData']; notes = json['Notes']; + orderLineItemNo = json['OrderLineItemNo']; + orderNo = json['OrderNo']; packageID = json['PackageID']; patientID = json['PatientID']; projectID = json['ProjectID']; referanceRange = json['ReferanceRange']; resultValue = json['ResultValue']; + resultValueBasedLineItemNo = json['ResultValueBasedLineItemNo']; + resultValueFlag = json['ResultValueFlag']; sampleCollectedOn = json['SampleCollectedOn']; sampleReceivedOn = json['SampleReceivedOn']; setupID = json['SetupID']; @@ -67,14 +91,19 @@ class LabResult { data['Description'] = this.description; data['FemaleInterpretativeData'] = this.femaleInterpretativeData; data['Gender'] = this.gender; + data['IsCertificateAllowed'] = this.isCertificateAllowed; data['LineItemNo'] = this.lineItemNo; data['MaleInterpretativeData'] = this.maleInterpretativeData; data['Notes'] = this.notes; + data['OrderLineItemNo'] = this.orderLineItemNo; + data['OrderNo'] = this.orderNo; data['PackageID'] = this.packageID; data['PatientID'] = this.patientID; data['ProjectID'] = this.projectID; data['ReferanceRange'] = this.referanceRange; data['ResultValue'] = this.resultValue; + data['ResultValueBasedLineItemNo'] = this.resultValueBasedLineItemNo; + data['ResultValueFlag'] = this.resultValueFlag; data['SampleCollectedOn'] = this.sampleCollectedOn; data['SampleReceivedOn'] = this.sampleReceivedOn; data['SetupID'] = this.setupID; @@ -86,13 +115,3 @@ class LabResult { return data; } } - - -class LabResultList { - String filterName = ""; - List patientLabResultList = List(); - - LabResultList({this.filterName, LabResult lab}) { - patientLabResultList.add(lab); - } -} diff --git a/lib/core/model/pharmacies/recommendedProduct_model.dart b/lib/core/model/pharmacies/recommendedProduct_model.dart index e1e88cd8..0d40fce7 100644 --- a/lib/core/model/pharmacies/recommendedProduct_model.dart +++ b/lib/core/model/pharmacies/recommendedProduct_model.dart @@ -1,59 +1,37 @@ class RecommendedProductModel { - List products; - - RecommendedProductModel({this.products}); - - RecommendedProductModel.fromJson(Map json) { - if (json['products'] != null) { - products = new List(); - json['products'].forEach((v) { - products.add(new Products.fromJson(v)); - }); - } - } - - Map toJson() { - final Map data = new Map(); - if (this.products != null) { - data['products'] = this.products.map((v) => v.toJson()).toList(); - } - return data; - } -} - -class Products { - String id; + dynamic id; bool visibleIndividually; - String name; - String namen; - String shortDescription; - String shortDescriptionn; - String fullDescription; - String fullDescriptionn; + dynamic name; + dynamic namen; + List localizedNames; + dynamic shortDescription; + dynamic shortDescriptionn; + dynamic fullDescription; + dynamic fullDescriptionn; bool markasNew; bool showOnHomePage; - dynamic metaKeywords; - dynamic metaDescription; - dynamic metaTitle; +// dynamic metaKeywords; +// dynamic metaDescription; +// dynamic metaTitle; bool allowCustomerReviews; dynamic approvedRatingSum; dynamic notApprovedRatingSum; dynamic approvedTotalReviews; dynamic notApprovedTotalReviews; - String sku; + dynamic sku; bool isRx; bool prescriptionRequired; dynamic rxMessage; dynamic rxMessagen; - dynamic manufacturerPartNumber; - dynamic gtin; +// dynamic manufacturerPartNumber; +// dynamic gtin; bool isGiftCard; bool requireOtherProducts; bool automaticallyAddRequiredProducts; bool isDownload; bool unlimitedDownloads; dynamic maxNumberOfDownloads; - dynamic downloadExpirationDays; +// dynamic downloadExpirationDays; bool hasSampleDownload; bool hasUserAgreement; bool isRecurring; @@ -70,8 +48,8 @@ class Products { bool useMultipleWarehouses; dynamic manageInventoryMethodId; dynamic stockQuantity; - String stockAvailability; - String stockAvailabilityn; + dynamic stockAvailability; + dynamic stockAvailabilityn; bool displayStockAvailability; bool displayStockQuantity; dynamic minStockQuantity; @@ -79,19 +57,19 @@ class Products { bool allowBackInStockSubscriptions; dynamic orderMinimumQuantity; dynamic orderMaximumQuantity; - dynamic allowedQuantities; +// Null allowedQuantities; bool allowAddingOnlyExistingAttributeCombinations; bool disableBuyButton; bool disableWishlistButton; bool availableForPreOrder; - dynamic preOrderAvailabilityStartDateTimeUtc; +// dynamic preOrderAvailabilityStartDateTimeUtc; bool callForPrice; dynamic price; dynamic oldPrice; dynamic productCost; - dynamic specialPrice; - dynamic specialPriceStartDateTimeUtc; - dynamic specialPriceEndDateTimeUtc; +// dynamic specialPrice; +// dynamic specialPriceStartDateTimeUtc; +// dynamic specialPriceEndDateTimeUtc; bool customerEntersPrice; dynamic minimumCustomerEnteredPrice; dynamic maximumCustomerEnteredPrice; @@ -100,148 +78,174 @@ class Products { dynamic basepriceBaseAmount; bool hasTierPrices; bool hasDiscountsApplied; - dynamic discountName; - dynamic discountNamen; - dynamic discountDescription; - dynamic discountDescriptionn; - dynamic discountPercentage; - String currency; - String currencyn; - double weight; +// dynamic discountName; +// dynamic discountNamen; +// dynamic discountDescription; +// dynamic discountDescriptionn; +// dynamic discountPercentage; + dynamic currency; + dynamic currencyn; + dynamic weight; dynamic length; dynamic width; dynamic height; - dynamic availableStartDateTimeUtc; - dynamic availableEndDateTimeUtc; +// dynamic availableStartDateTimeUtc; +// dynamic availableEndDateTimeUtc; dynamic displayOrder; bool published; bool deleted; - String createdOnUtc; - String updatedOnUtc; - String productType; + dynamic createdOnUtc; + dynamic updatedOnUtc; + dynamic productType; dynamic parentGroupedProductId; - dynamic vendorId; - String seName; +// List roleIds; +// List discountIds; +// List storeIds; + List manufacturerIds; +// List reviews; List images; +// List attributes; + List specifications; +// List associatedProductIds; +// List tags; + dynamic vendorId; + dynamic seName; + bool isinwishlist; - Products({ - this.id, - this.visibleIndividually, - this.name, - this.namen, - this.shortDescription, - this.shortDescriptionn, - this.fullDescription, - this.fullDescriptionn, - this.markasNew, - this.showOnHomePage, - this.metaKeywords, - this.metaDescription, - this.metaTitle, - this.allowCustomerReviews, - this.approvedRatingSum, - this.notApprovedRatingSum, - this.approvedTotalReviews, - this.notApprovedTotalReviews, - this.sku, - this.isRx, - this.prescriptionRequired, - this.rxMessage, - this.rxMessagen, - this.manufacturerPartNumber, - this.gtin, - this.isGiftCard, - this.requireOtherProducts, - this.automaticallyAddRequiredProducts, - this.isDownload, - this.unlimitedDownloads, - this.maxNumberOfDownloads, - this.downloadExpirationDays, - this.hasSampleDownload, - this.hasUserAgreement, - this.isRecurring, - this.recurringCycleLength, - this.recurringTotalCycles, - this.isRental, - this.rentalPriceLength, - this.isShipEnabled, - this.isFreeShipping, - this.shipSeparately, - this.additionalShippingCharge, - this.isTaxExempt, - this.isTelecommunicationsOrBroadcastingOrElectronicServices, - this.useMultipleWarehouses, - this.manageInventoryMethodId, - this.stockQuantity, - this.stockAvailability, - this.stockAvailabilityn, - this.displayStockAvailability, - this.displayStockQuantity, - this.minStockQuantity, - this.notifyAdminForQuantityBelow, - this.allowBackInStockSubscriptions, - this.orderMinimumQuantity, - this.orderMaximumQuantity, - this.allowedQuantities, - this.allowAddingOnlyExistingAttributeCombinations, - this.disableBuyButton, - this.disableWishlistButton, - this.availableForPreOrder, - this.preOrderAvailabilityStartDateTimeUtc, - this.callForPrice, - this.price, - this.oldPrice, - this.productCost, - this.specialPrice, - this.specialPriceStartDateTimeUtc, - this.specialPriceEndDateTimeUtc, - this.customerEntersPrice, - this.minimumCustomerEnteredPrice, - this.maximumCustomerEnteredPrice, - this.basepriceEnabled, - this.basepriceAmount, - this.basepriceBaseAmount, - this.hasTierPrices, - this.hasDiscountsApplied, - this.discountName, - this.discountNamen, - this.discountDescription, - this.discountDescriptionn, - this.discountPercentage, - this.currency, - this.currencyn, - this.weight, - this.length, - this.width, - this.height, - this.availableStartDateTimeUtc, - this.availableEndDateTimeUtc, - this.displayOrder, - this.published, - this.deleted, - this.createdOnUtc, - this.updatedOnUtc, - this.productType, - this.parentGroupedProductId, - this.vendorId, - this.seName, - this.images, - }); + RecommendedProductModel( + {this.id, + this.visibleIndividually, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, +// this.metaKeywords, +// this.metaDescription, +// this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, +// this.manufacturerPartNumber, +// this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, +// this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, +// this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, +// this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, +// this.specialPrice, +// this.specialPriceStartDateTimeUtc, +// this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, +// this.discountName, +// this.discountNamen, +// this.discountDescription, +// this.discountDescriptionn, +// this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, +// this.availableStartDateTimeUtc, +// this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, +// this.roleIds, +// this.discountIds, +// this.storeIds, + this.manufacturerIds, +// this.reviews, + this.images, +// this.attributes, + this.specifications, +// this.associatedProductIds, +// this.tags, + this.vendorId, + this.seName, + this.isinwishlist}); - Products.fromJson(Map json) { + RecommendedProductModel.fromJson(Map json) { id = json['id']; visibleIndividually = json['visible_individually']; name = json['name']; namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames = new List(); + json['localized_names'].forEach((v) { + localizedNames.add(new LocalizedNames.fromJson(v)); + }); + } shortDescription = json['short_description']; shortDescriptionn = json['short_descriptionn']; fullDescription = json['full_description']; fullDescriptionn = json['full_descriptionn']; markasNew = json['markas_new']; showOnHomePage = json['show_on_home_page']; - metaKeywords = json['meta_keywords']; - metaDescription = json['meta_description']; - metaTitle = json['meta_title']; +// metaKeywords = json['meta_keywords']; +// metaDescription = json['meta_description']; +// metaTitle = json['meta_title']; allowCustomerReviews = json['allow_customer_reviews']; approvedRatingSum = json['approved_rating_sum']; notApprovedRatingSum = json['not_approved_rating_sum']; @@ -252,16 +256,16 @@ class Products { prescriptionRequired = json['prescription_required']; rxMessage = json['rx_message']; rxMessagen = json['rx_messagen']; - manufacturerPartNumber = json['manufacturer_part_number']; - gtin = json['gtin']; +// manufacturerPartNumber = json['manufacturer_part_number']; +// gtin = json['gtin']; isGiftCard = json['is_gift_card']; requireOtherProducts = json['require_other_products']; automaticallyAddRequiredProducts = - json['automatically_add_required_products']; + json['automatically_add_required_products']; isDownload = json['is_download']; unlimitedDownloads = json['unlimited_downloads']; maxNumberOfDownloads = json['max_number_of_downloads']; - downloadExpirationDays = json['download_expiration_days']; +// downloadExpirationDays = json['download_expiration_days']; hasSampleDownload = json['has_sample_download']; hasUserAgreement = json['has_user_agreement']; isRecurring = json['is_recurring']; @@ -275,7 +279,7 @@ class Products { additionalShippingCharge = json['additional_shipping_charge']; isTaxExempt = json['is_tax_exempt']; isTelecommunicationsOrBroadcastingOrElectronicServices = - json['is_telecommunications_or_broadcasting_or_electronic_services']; + json['is_telecommunications_or_broadcasting_or_electronic_services']; useMultipleWarehouses = json['use_multiple_warehouses']; manageInventoryMethodId = json['manage_inventory_method_id']; stockQuantity = json['stock_quantity']; @@ -288,21 +292,21 @@ class Products { allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; orderMinimumQuantity = json['order_minimum_quantity']; orderMaximumQuantity = json['order_maximum_quantity']; - allowedQuantities = json['allowed_quantities']; +// allowedQuantities = json['allowed_quantities']; allowAddingOnlyExistingAttributeCombinations = - json['allow_adding_only_existing_attribute_combinations']; + json['allow_adding_only_existing_attribute_combinations']; disableBuyButton = json['disable_buy_button']; disableWishlistButton = json['disable_wishlist_button']; availableForPreOrder = json['available_for_pre_order']; - preOrderAvailabilityStartDateTimeUtc = - json['pre_order_availability_start_date_time_utc']; +// preOrderAvailabilityStartDateTimeUtc = +// json['pre_order_availability_start_date_time_utc']; callForPrice = json['call_for_price']; price = json['price']; oldPrice = json['old_price']; productCost = json['product_cost']; - specialPrice = json['special_price']; - specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc']; - specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc']; +// specialPrice = json['special_price']; +// specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc']; +// specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc']; customerEntersPrice = json['customer_enters_price']; minimumCustomerEnteredPrice = json['minimum_customer_entered_price']; maximumCustomerEnteredPrice = json['maximum_customer_entered_price']; @@ -311,19 +315,19 @@ class Products { basepriceBaseAmount = json['baseprice_base_amount']; hasTierPrices = json['has_tier_prices']; hasDiscountsApplied = json['has_discounts_applied']; - discountName = json['discount_name']; - discountNamen = json['discount_namen']; - discountDescription = json['discount_description']; - discountDescriptionn = json['discount_Descriptionn']; - discountPercentage = json['discount_percentage']; +// discountName = json['discount_name']; +// discountNamen = json['discount_namen']; +// discountDescription = json['discount_description']; +// discountDescriptionn = json['discount_Descriptionn']; +// discountPercentage = json['discount_percentage']; currency = json['currency']; currencyn = json['currencyn']; weight = json['weight']; length = json['length']; width = json['width']; height = json['height']; - availableStartDateTimeUtc = json['available_start_date_time_utc']; - availableEndDateTimeUtc = json['available_end_date_time_utc']; +// availableStartDateTimeUtc = json['available_start_date_time_utc']; +// availableEndDateTimeUtc = json['available_end_date_time_utc']; displayOrder = json['display_order']; published = json['published']; deleted = json['deleted']; @@ -331,14 +335,64 @@ class Products { updatedOnUtc = json['updated_on_utc']; productType = json['product_type']; parentGroupedProductId = json['parent_grouped_product_id']; - vendorId = json['vendor_id']; - seName = json['se_name']; +// if (json['role_ids'] != null) { +// roleIds = new List(); +// json['role_ids'].forEach((v) { +// roleIds.add(new Null.fromJson(v)); +// }); +// } +// if (json['discount_ids'] != null) { +// discountIds = new List(); +// json['discount_ids'].forEach((v) { +// discountIds.add(new Null.fromJson(v)); +// }); +// } +// if (json['store_ids'] != null) { +// storeIds = new List(); +// json['store_ids'].forEach((v) { +// storeIds.add(new Null.fromJson(v)); +// }); +// } + manufacturerIds = json['manufacturer_ids'].cast(); +// if (json['reviews'] != null) { +// reviews = new List(); +// json['reviews'].forEach((v) { +// reviews.add(new Null.fromJson(v)); +// }); +// } if (json['images'] != null) { images = new List(); json['images'].forEach((v) { images.add(new Images.fromJson(v)); }); } +// if (json['attributes'] != null) { +// attributes = new List(); +// json['attributes'].forEach((v) { +// attributes.add(new Null.fromJson(v)); +// }); +// } + if (json['specifications'] != null) { + specifications = new List(); + json['specifications'].forEach((v) { + specifications.add(new Specifications.fromJson(v)); + }); + } +// if (json['associated_product_ids'] != null) { +// associatedProductIds = new List(); +// json['associated_product_ids'].forEach((v) { +// associatedProductIds.add(new Null.fromJson(v)); +// }); +// } +// if (json['tags'] != null) { +// tags = new List(); +// json['tags'].forEach((v) { +// tags.add(new Null.fromJson(v)); +// }); +// } + vendorId = json['vendor_id']; + seName = json['se_name']; + isinwishlist = json['isinwishlist']; } Map toJson() { @@ -347,15 +401,19 @@ class Products { data['visible_individually'] = this.visibleIndividually; data['name'] = this.name; data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = + this.localizedNames.map((v) => v.toJson()).toList(); + } data['short_description'] = this.shortDescription; data['short_descriptionn'] = this.shortDescriptionn; data['full_description'] = this.fullDescription; data['full_descriptionn'] = this.fullDescriptionn; data['markas_new'] = this.markasNew; data['show_on_home_page'] = this.showOnHomePage; - data['meta_keywords'] = this.metaKeywords; - data['meta_description'] = this.metaDescription; - data['meta_title'] = this.metaTitle; +// data['meta_keywords'] = this.metaKeywords; +// data['meta_description'] = this.metaDescription; +// data['meta_title'] = this.metaTitle; data['allow_customer_reviews'] = this.allowCustomerReviews; data['approved_rating_sum'] = this.approvedRatingSum; data['not_approved_rating_sum'] = this.notApprovedRatingSum; @@ -366,8 +424,8 @@ class Products { data['prescription_required'] = this.prescriptionRequired; data['rx_message'] = this.rxMessage; data['rx_messagen'] = this.rxMessagen; - data['manufacturer_part_number'] = this.manufacturerPartNumber; - data['gtin'] = this.gtin; +// data['manufacturer_part_number'] = this.manufacturerPartNumber; +// data['gtin'] = this.gtin; data['is_gift_card'] = this.isGiftCard; data['require_other_products'] = this.requireOtherProducts; data['automatically_add_required_products'] = @@ -375,7 +433,7 @@ class Products { data['is_download'] = this.isDownload; data['unlimited_downloads'] = this.unlimitedDownloads; data['max_number_of_downloads'] = this.maxNumberOfDownloads; - data['download_expiration_days'] = this.downloadExpirationDays; +// data['download_expiration_days'] = this.downloadExpirationDays; data['has_sample_download'] = this.hasSampleDownload; data['has_user_agreement'] = this.hasUserAgreement; data['is_recurring'] = this.isRecurring; @@ -403,22 +461,22 @@ class Products { this.allowBackInStockSubscriptions; data['order_minimum_quantity'] = this.orderMinimumQuantity; data['order_maximum_quantity'] = this.orderMaximumQuantity; - data['allowed_quantities'] = this.allowedQuantities; +// data['allowed_quantities'] = this.allowedQuantities; data['allow_adding_only_existing_attribute_combinations'] = this.allowAddingOnlyExistingAttributeCombinations; data['disable_buy_button'] = this.disableBuyButton; data['disable_wishlist_button'] = this.disableWishlistButton; data['available_for_pre_order'] = this.availableForPreOrder; - data['pre_order_availability_start_date_time_utc'] = - this.preOrderAvailabilityStartDateTimeUtc; +// data['pre_order_availability_start_date_time_utc'] = +// this.preOrderAvailabilityStartDateTimeUtc; data['call_for_price'] = this.callForPrice; data['price'] = this.price; data['old_price'] = this.oldPrice; data['product_cost'] = this.productCost; - data['special_price'] = this.specialPrice; - data['special_price_start_date_time_utc'] = - this.specialPriceStartDateTimeUtc; - data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; +// data['special_price'] = this.specialPrice; +// data['special_price_start_date_time_utc'] = +// this.specialPriceStartDateTimeUtc; +// data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; data['customer_enters_price'] = this.customerEntersPrice; data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice; @@ -427,19 +485,19 @@ class Products { data['baseprice_base_amount'] = this.basepriceBaseAmount; data['has_tier_prices'] = this.hasTierPrices; data['has_discounts_applied'] = this.hasDiscountsApplied; - data['discount_name'] = this.discountName; - data['discount_namen'] = this.discountNamen; - data['discount_description'] = this.discountDescription; - data['discount_Descriptionn'] = this.discountDescriptionn; - data['discount_percentage'] = this.discountPercentage; +// data['discount_name'] = this.discountName; +// data['discount_namen'] = this.discountNamen; +// data['discount_description'] = this.discountDescription; +// data['discount_Descriptionn'] = this.discountDescriptionn; +// data['discount_percentage'] = this.discountPercentage; data['currency'] = this.currency; data['currencyn'] = this.currencyn; data['weight'] = this.weight; data['length'] = this.length; data['width'] = this.width; data['height'] = this.height; - data['available_start_date_time_utc'] = this.availableStartDateTimeUtc; - data['available_end_date_time_utc'] = this.availableEndDateTimeUtc; +// data['available_start_date_time_utc'] = this.availableStartDateTimeUtc; +// data['available_end_date_time_utc'] = this.availableEndDateTimeUtc; data['display_order'] = this.displayOrder; data['published'] = this.published; data['deleted'] = this.deleted; @@ -447,19 +505,65 @@ class Products { data['updated_on_utc'] = this.updatedOnUtc; data['product_type'] = this.productType; data['parent_grouped_product_id'] = this.parentGroupedProductId; - data['vendor_id'] = this.vendorId; - data['se_name'] = this.seName; +// if (this.roleIds != null) { +// data['role_ids'] = this.roleIds.map((v) => v.toJson()).toList(); +// } +// if (this.discountIds != null) { +// data['discount_ids'] = this.discountIds.map((v) => v.toJson()).toList(); +// } +// if (this.storeIds != null) { +// data['store_ids'] = this.storeIds.map((v) => v.toJson()).toList(); +// } + data['manufacturer_ids'] = this.manufacturerIds; +// if (this.reviews != null) { +// data['reviews'] = this.reviews.map((v) => v.toJson()).toList(); +// } if (this.images != null) { data['images'] = this.images.map((v) => v.toJson()).toList(); } +// if (this.attributes != null) { +// data['attributes'] = this.attributes.map((v) => v.toJson()).toList(); +// } + if (this.specifications != null) { + data['specifications'] = + this.specifications.map((v) => v.toJson()).toList(); + } +// if (this.associatedProductIds != null) { +// data['associated_product_ids'] = +// this.associatedProductIds.map((v) => v.toJson()).toList(); +// } +// if (this.tags != null) { +// data['tags'] = this.tags.map((v) => v.toJson()).toList(); +// } + data['vendor_id'] = this.vendorId; + data['se_name'] = this.seName; + data['isinwishlist'] = this.isinwishlist; + return data; + } +} + +class LocalizedNames { + dynamic languageId; + String localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; return data; } } class Images { - int id; - int position; + dynamic id; + dynamic position; String src; String thumb; String attachment; @@ -484,3 +588,40 @@ class Images { return data; } } + +class Specifications { + dynamic id; + dynamic displayOrder; + String defaultValue; + String defaultValuen; + String name; + String nameN; + + Specifications( + {this.id, + this.displayOrder, + this.defaultValue, + this.defaultValuen, + this.name, + this.nameN}); + + Specifications.fromJson(Map json) { + id = json['id']; + displayOrder = json['display_order']; + defaultValue = json['default_value']; + defaultValuen = json['default_valuen']; + name = json['name']; + nameN = json['nameN']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['display_order'] = this.displayOrder; + data['default_value'] = this.defaultValue; + data['default_valuen'] = this.defaultValuen; + data['name'] = this.name; + data['nameN'] = this.nameN; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/sick_leave/sick_leave.dart b/lib/core/model/sick_leave/sick_leave.dart index 6811a552..1d396e18 100644 --- a/lib/core/model/sick_leave/sick_leave.dart +++ b/lib/core/model/sick_leave/sick_leave.dart @@ -13,7 +13,7 @@ class SickLeave { int appointmentNo; int admissionNo; int actualDoctorRate; - String appointmentDate; + DateTime appointmentDate; String clinicName; String doctorImageURL; String doctorName; @@ -80,7 +80,7 @@ class SickLeave { appointmentNo = json['AppointmentNo']; admissionNo = json['AdmissionNo']; actualDoctorRate = json['ActualDoctorRate']; - appointmentDate = json['AppointmentDate']; + appointmentDate = DateUtil.convertStringToDate(json['AppointmentDate']); clinicName = json['ClinicName']; doctorImageURL = json['DoctorImageURL']; doctorName = json['DoctorName']; diff --git a/lib/core/service/ancillary_orders_service.dart b/lib/core/service/ancillary_orders_service.dart index b9d14a06..27ff2694 100644 --- a/lib/core/service/ancillary_orders_service.dart +++ b/lib/core/service/ancillary_orders_service.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart'; import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; class AncillaryOrdersService extends BaseService { List _ancillaryLists = List(); @@ -20,6 +21,8 @@ class AncillaryOrdersService extends BaseService { _ancillaryLists = []; response['AncillaryOrderList'].forEach((item) { ancillaryLists.add(AncillaryOrdersListModel.fromJson(item)); + print("response of ancillary Lists__________"); + print(response); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -27,175 +30,25 @@ class AncillaryOrdersService extends BaseService { }, body: body); } - Future getOrdersDetails(appointmentNo, orderNo) async { + Future getOrdersDetails(appointmentNo, orderNo, projectID) async { Map body = Map(); - + body['AppointmentNo_Vida'] = appointmentNo; + body['OrderNo'] = orderNo; + body['ProjectID'] = projectID; +// "OrderNo=$orderNo&AppointmentNo_Vida=$appointmentNo&ProjectID=$projectID" hasError = false; - await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS, onSuccess: (dynamic response, int statusCode) { _ancillaryProcLists = []; - response['AncillaryOrderProcList'] = [ - { - "AncillaryOrderProcList": [ - { - "ApprovalLineItemNo": 0, - "ApprovalNo": 0, - "ApprovalStatus": "", - "ApprovalStatusID": 0, - "CompanyShare": 501.3, - "CompanyShareWithTax": 576.5, - "CompanyTaxAmount": 75.19, - "DiscountAmount": 55.7, - "DiscountCategory": 1, - "DiscountType": "P", - "DiscountTypeValue": 10, - "IsApprovalCreated": false, - "IsApprovalRequired": false, - "IsCovered": false, - "OrderDate": "/Date(1601758800000+0300)/", - "OrderLineItemNo": 1, - "OrderNo": 2020000001, - "PartnerID": 0, - "PartnerShare": 0, - "PartnerShareType": "P", - "PatientShare": 0, - "PatientShareWithTax": 0, - "PatientTaxAmount": 0, - "ProcPrice": 557, - "ProcedureCategoryID": 2, - "ProcedureCategoryName": "LABORATORY", - "ProcedureID": "02013001", - "ProcedureName": "11-DESOXYCORTISOL (COMPOUND S) - S.O", - "TaxAmount": 75.19, - "TaxPct": 15 - }, - { - "ApprovalLineItemNo": 0, - "ApprovalNo": 0, - "ApprovalStatus": "", - "ApprovalStatusID": 0, - "CompanyShare": 90, - "CompanyShareWithTax": 103.5, - "CompanyTaxAmount": 13.5, - "DiscountAmount": 10, - "DiscountCategory": 1, - "DiscountType": "P", - "DiscountTypeValue": 10, - "IsApprovalCreated": false, - "IsApprovalRequired": true, - "IsCovered": false, - "OrderDate": "/Date(1601758800000+0300)/", - "OrderLineItemNo": 4, - "OrderNo": 2020000001, - "PartnerID": 0, - "PartnerShare": 0, - "PartnerShareType": "P", - "PatientShare": 0, - "PatientShareWithTax": 0, - "PatientTaxAmount": 0, - "ProcPrice": 100, - "ProcedureCategoryID": 2, - "ProcedureCategoryName": "LABORATORY", - "ProcedureID": "02014011", - "ProcedureName": "CBC (COMPLETE BLOOD COUNT PROFILE)", - "TaxAmount": 13.5, - "TaxPct": 15 - }, - { - "ApprovalLineItemNo": 0, - "ApprovalNo": 0, - "ApprovalStatus": "", - "ApprovalStatusID": 0, - "CompanyShare": 347.76, - "CompanyShareWithTax": 399.92, - "CompanyTaxAmount": 52.16, - "DiscountAmount": 38.64, - "DiscountCategory": 1, - "DiscountType": "P", - "DiscountTypeValue": 10, - "IsApprovalCreated": false, - "IsApprovalRequired": false, - "IsCovered": false, - "OrderDate": "/Date(1601758800000+0300)/", - "OrderLineItemNo": 3, - "OrderNo": 2020000001, - "PartnerID": 0, - "PartnerShare": 0, - "PartnerShareType": "P", - "PatientShare": 0, - "PatientShareWithTax": 0, - "PatientTaxAmount": 0, - "ProcPrice": 386.4, - "ProcedureCategoryID": 2, - "ProcedureCategoryName": "LABORATORY", - "ProcedureID": "02019302", - "ProcedureName": "21-HYDROXYLASE ABS - S.O", - "TaxAmount": 52.16, - "TaxPct": 15 - }, - { - "ApprovalLineItemNo": 0, - "ApprovalNo": 0, - "ApprovalStatus": "", - "ApprovalStatusID": 0, - "CompanyShare": 1323, - "CompanyShareWithTax": 1521.45, - "CompanyTaxAmount": 198.45, - "DiscountAmount": 147, - "DiscountCategory": 1, - "DiscountType": "P", - "DiscountTypeValue": 10, - "IsApprovalCreated": false, - "IsApprovalRequired": true, - "IsCovered": false, - "OrderDate": "/Date(1601758800000+0300)/", - "OrderLineItemNo": 5, - "OrderNo": 2020000001, - "PartnerID": 0, - "PartnerShare": 0, - "PartnerShareType": "P", - "PatientShare": 0, - "PatientShareWithTax": 0, - "PatientTaxAmount": 0, - "ProcPrice": 1470, - "ProcedureCategoryID": 3, - "ProcedureCategoryName": "RADIOLOGY", - "ProcedureID": "03033065", - "ProcedureName": "CT SCAN - ABDOMEN (WITH CONTRAST)", - "TaxAmount": 198.45, - "TaxPct": 15 - } - ], - "AppointmentDate": "/Date(1601499600000+0300)/", - "AppointmentNo": 2016053756, - "ClinicID": 1, - "ClinicName": "INTERNAL MEDICINE CLINIC", - "CompanyID": 0, - "CompanyName": "Blood Donation Investigation", - "DoctorID": 1485, - "DoctorName": "ANAS ABDULLAH", - "ErrCode": null, - "GroupID": 2, - "InsurancePolicyNo": "45976500", - "Message": "Success", - "PatientCardID": "232332323", - "PatientID": 3072055, - "PatientName": "MAYA KHALED SADDIQ", - "PatientType": 1, - "PolicyID": 2, - "PolicyName": "Test", - "ProjectID": 15, - "SetupID": "010266", - "StatusCode": 1, - "SubCategoryID": 2, - "SubPolicyNo": "234234" - } - ]; response['AncillaryOrderProcList'].forEach((item) { ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item)); +// ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(response['AncillaryOrderProcList'])); + print("----------------------------------"); + print("Test data"); + print(response); }); + //Future.value(_ancillaryProcLists); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 43c39fec..a6a2fb02 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -118,7 +118,8 @@ class BaseAppClient { } print("URL : $url"); - print("Body : ${json.encode(body)}"); + final jsonBody = json.encode(body); + print(jsonBody); if (await Utils.checkConnection()) { final response = await http.post(url.trim(), body: json.encode(body), headers: headers); diff --git a/lib/core/service/er/am_service.dart b/lib/core/service/er/am_service.dart index 2e9460b8..9c66d373 100644 --- a/lib/core/service/er/am_service.dart +++ b/lib/core/service/er/am_service.dart @@ -1,45 +1,49 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; +import 'package:diplomaticquarterapp/core/model/er/AmbulanceRequestOrdersModel.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; -import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; import 'package:flutter/cupertino.dart'; + import '../base_service.dart'; class AmService extends BaseService { List amModelList = List(); List patientAllPresOrdersList = List(); + + List patientAmbulanceRequestOrdersList = List(); + bool hasPendingOrder = false; int pendingOrderID = 0; String pendingOrderStatus = ""; String pendingOrderStatusAR = ""; PickUpRequestPresOrder pickUpRequestPresOrder; + AmbulanceRequestOrdersModel pendingAmbulanceRequestOrder; + Future getAllTransportationOrders() async { hasError = false; Map body = Map(); body['isDentalAllowedBackend'] = false; body['IdentificationNo'] = user.patientIdentificationNo; - await baseAppClient.post(GET_AMBULANCE_REQUEST, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.get(GET_ALL_TRANSPORTATIONS_RC + "?patientID=" + user.patientID.toString(), isExternal: false, onSuccess: (dynamic response, int statusCode) { amModelList.clear(); - response['PatientER_RRT_GetAllTransportationMethodList'].forEach((item) { + response['data']['transportationservices'].forEach((item) { amModelList.add(PatientERTransportationMethod.fromJson(item)); }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: body); + }); } Future getPatientAllPresOrdersList() async { hasError = false; hasPendingOrder = false; pickUpRequestPresOrder = null; - await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, onSuccess: (dynamic response, int statusCode) { patientAllPresOrdersList.clear(); response['PatientER_GetPatientAllPresOrdersList'].forEach((item) { if (item['ServiceID'] == OrderService.AMBULANCE.getIdOrderService()) { @@ -59,15 +63,48 @@ class AmService extends BaseService { }, body: Map()); } + Future getPatientAllPresOrdersListRC(dynamic patientID) async { + hasError = false; + hasPendingOrder = false; + pickUpRequestPresOrder = null; + + Map body = Map(); + body['patientId'] = patientID.toString(); + body['PatientID'] = patientID.toString(); + + await baseAppClient.post(GET_ALL_TRANSPORTATIONS_ORDERS, onSuccess: (dynamic response, int statusCode) { + patientAmbulanceRequestOrdersList.clear(); + hasPendingOrder = false; + pendingOrderID = 0; + pendingAmbulanceRequestOrder = null; + + response['data'].forEach((item) { + patientAmbulanceRequestOrdersList.add(AmbulanceRequestOrdersModel.fromJson(item)); + if (item['statusId'] == 1) { + hasPendingOrder = true; + pendingOrderID = item['orderpayment']['id']; + pendingOrderStatus = item['statusText']; + pendingOrderStatusAR = item['statusText']; + pendingAmbulanceRequestOrder = AmbulanceRequestOrdersModel.fromJson(item); + } + }); + print(patientAmbulanceRequestOrdersList.length); + print(hasPendingOrder); + print(pendingOrderID); + print(pendingOrderStatus); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + Future getOrderDetails() async { hasError = false; Map body = Map(); body['PresOrderID'] = pendingOrderID; body['isDentalAllowedBackend'] = false; - await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID, - onSuccess: (dynamic response, int statusCode) { - response['PatientER_RRT_GetPickUpRequestByPresOrderIDList'] - .forEach((item) { + await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID, onSuccess: (dynamic response, int statusCode) { + response['PatientER_RRT_GetPickUpRequestByPresOrderIDList'].forEach((item) { pickUpRequestPresOrder = PickUpRequestPresOrder.fromJson(item); }); }, onFailure: (String error, int statusCode) { @@ -84,24 +121,34 @@ class AmService extends BaseService { body['RejectionReason'] = ''; body['PresOrderStatus'] = OrderService.AMBULANCE.getIdOrderService(); body['isDentalAllowedBackend'] = false; - await baseAppClient.post(UPDATE_PRESS_ORDER, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(UPDATE_PRESS_ORDER, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } - }, onFailure: (String error, int statusCode) { + Future updatePressOrderRC({@required int presOrderID, @required String patientID}) async { + hasError = false; + Map body = Map(); + body['Id'] = presOrderID; + body['StatusId'] = 6; + body['ClickButton'] = 14; + body['PatientID'] = patientID; + await baseAppClient.post(CANCEL_AMBULANCE_REQUEST, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: body); } - Future insertERPressOrder({@required PatientER patientER}) async { + Future insertERPressOrder({@required PatientER_RC patientER}) async { hasError = false; - await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER, - onSuccess: (dynamic response, int statusCode) { + var body = patientER.toJson(); + print(body); - }, onFailure: (String error, int statusCode) { + await baseAppClient.post(INSERT_TRANSPORTATION_ORDER_RC, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: patientER.toJson()); + }, body: body); } } diff --git a/lib/core/service/er/er_service.dart b/lib/core/service/er/er_service.dart index bd3b6116..3e899f97 100644 --- a/lib/core/service/er/er_service.dart +++ b/lib/core/service/er/er_service.dart @@ -7,9 +7,6 @@ class ErService extends BaseService { List projectAvgERWaitingTimeModelList = List(); Map body = Map(); - String Latitude = ""; - String Longitude = ""; - String PhoneNumber = ""; Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async { hasError = false; @@ -23,21 +20,15 @@ class ErService extends BaseService { body['Latitude'] = lat ?? 0; body['Longitude'] = long ?? 0; + dynamic localRes; + await baseAppClient.post(GET_NEAREST_HOSPITAL, onSuccess: (dynamic response, int statusCode) { - projectAvgERWaitingTimeModelList.clear(); - response['List_ProjectAvgERWaitingTime'].forEach((vital) { - projectAvgERWaitingTimeModelList - .add(ProjectAvgERWaitingTime.fromJson(vital)); - }); - projectAvgERWaitingTimeModelList.forEach((element) { - Latitude = '${element.latitude}'; - Longitude = '${element.longitude}'; - PhoneNumber = '${element.phoneNumber}'; - }); + localRes = response; }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: body); + return Future.value(localRes); } } diff --git a/lib/core/service/feedback/feedback_service.dart b/lib/core/service/feedback/feedback_service.dart index 9355daf0..bd5bfa42 100644 --- a/lib/core/service/feedback/feedback_service.dart +++ b/lib/core/service/feedback/feedback_service.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; @@ -11,41 +12,46 @@ import 'package:diplomaticquarterapp/uitl/utils.dart'; class FeedbackService extends BaseService { List cOCItemList = List(); RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem(); - List appointHistoryList = List(); + List appointHistoryList = List(); Future sendCOCItem( {String title, String details, String cOCTypeName, String attachment, - AppointmentHistory appointHistory}) async { + AppoitmentAllHistoryResultList appointHistory}) async { hasError = false; - var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + var languageID = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); _requestInsertCOCItem.attachment = attachment; _requestInsertCOCItem.title = title; _requestInsertCOCItem.details = details; _requestInsertCOCItem.cOCTypeName = cOCTypeName; _requestInsertCOCItem.formTypeID = cOCTypeName; - _requestInsertCOCItem.mobileNo = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber); + _requestInsertCOCItem.mobileNo = + "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber); _requestInsertCOCItem.isUserLoggedIn = true; _requestInsertCOCItem.projectID = user.projectID; _requestInsertCOCItem.patientName = user.firstName + " " + user.lastName; _requestInsertCOCItem.fileName = ""; _requestInsertCOCItem.appVersion = VERSION_ID; - _requestInsertCOCItem.uILanguage = languageID; //TODO Change it to be dynamic + _requestInsertCOCItem.uILanguage = + languageID; //TODO Change it to be dynamic _requestInsertCOCItem.browserInfo = Platform.localHostname; _requestInsertCOCItem.deviceInfo = Platform.localHostname; _requestInsertCOCItem.resolution = "400x847"; _requestInsertCOCItem.projectID = 0; _requestInsertCOCItem.identificationNo = int.parse(user.patientIdentificationNo); - + if (BASE_URL.contains('uat')) { + _requestInsertCOCItem.forDemo = true; + } final Map body = _requestInsertCOCItem.toJson(); if (appointHistory != null) { body['AppoinmentNo'] = appointHistory.appointmentNo; - body['AppointmentDate'] = DateUtil.convertDateToString(appointHistory.appointmentDate); + body['AppointmentDate'] = appointHistory.appointmentDate; body['ClinicID'] = appointHistory.clinicID; body['ClinicName'] = appointHistory.clinicName; body['DoctorID'] = appointHistory.doctorID; @@ -65,9 +71,13 @@ class FeedbackService extends BaseService { hasError = false; Map body = new Map(); body['IdentificationNo'] = user.patientIdentificationNo; - body['MobileNo'] = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber); + body['MobileNo'] = + "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber); body['Searching_type'] = '1'; + if (BASE_URL.contains('uat')) { + body['ForDemo'] = true; + } await baseAppClient.post(GET_STATUS_FOR_COCO, onSuccess: (dynamic response, int statusCode) { cOCItemList = []; @@ -88,7 +98,8 @@ class FeedbackService extends BaseService { onSuccess: (dynamic response, int statusCode) { appointHistoryList = []; response['AppoimentAllHistoryResultList'].forEach((appoint) { - appointHistoryList.add(AppointmentHistory.fromJson(appoint)); + appointHistoryList + .add(AppoitmentAllHistoryResultList.fromJson(appoint)); }); }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 11592956..6571c76f 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -3,21 +3,18 @@ import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart'; import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart'; -import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_special_result.dart'; import 'package:diplomaticquarterapp/core/model/labs/request_send_lab_report_email.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; class LabsService extends BaseService { List patientLabOrdersList = List(); Future getPatientLabOrdersList() async { hasError = false; - Map body = Map(); + Map body = Map(); body['isDentalAllowedBackend'] = false; - await baseAppClient.post(GET_Patient_LAB_ORDERS, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_Patient_LAB_ORDERS, onSuccess: (dynamic response, int statusCode) { patientLabOrdersList.clear(); response['ListPLO'].forEach((hospital) { patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); @@ -28,26 +25,20 @@ class LabsService extends BaseService { }, body: body); } - RequestPatientLabSpecialResult _requestPatientLabSpecialResult = - RequestPatientLabSpecialResult(); + RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult(); List patientLabSpecialResult = List(); List labResultList = List(); List labOrdersResultsList = List(); - Future getLaboratoryResult( - {String projectID, - int clinicID, - String invoiceNo, - String orderNo}) async { + Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo}) async { hasError = false; _requestPatientLabSpecialResult.projectID = projectID; _requestPatientLabSpecialResult.clinicID = clinicID; _requestPatientLabSpecialResult.invoiceNo = invoiceNo; _requestPatientLabSpecialResult.orderNo = orderNo; - await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT, onSuccess: (dynamic response, int statusCode) { patientLabSpecialResult.clear(); response['ListPLSR'].forEach((hospital) { patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital)); @@ -67,8 +58,7 @@ class LabsService extends BaseService { body['SetupID'] = patientLabOrder.setupID; body['ProjectID'] = patientLabOrder.projectID; body['ClinicID'] = patientLabOrder.clinicID; - await baseAppClient.post(GET_Patient_LAB_RESULT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_Patient_LAB_RESULT, onSuccess: (dynamic response, int statusCode) { patientLabSpecialResult.clear(); labResultList.clear(); response['ListPLR'].forEach((lab) { @@ -80,7 +70,65 @@ class LabsService extends BaseService { }, body: body); } - Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder,String procedure}) async { + Future generateCovidLabReport(LabResult covidLabResult, String isOutsideKSA) async { + hasError = false; + Map body = Map(); + + body['To'] = user.emailAddress; + body['OrderNo'] = covidLabResult.orderNo; + body['OrderLineItemNo'] = covidLabResult.orderLineItemNo; + body['LineItemNo'] = covidLabResult.resultValueBasedLineItemNo; + body['CertificateFormat'] = 5; + body['GeneratedBy'] = 102; + body['ShowPassportNumber'] = isOutsideKSA; + body['isDentalAllowedBackend'] = false; + body['SetupID'] = covidLabResult.setupID; + body['ProjectID'] = covidLabResult.projectID; + + dynamic localRes; + + await baseAppClient.post(SEND_COVID_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + + Future updateCovidPassportNumber(String passportNumber) async { + hasError = false; + Map body = Map(); + + body['PassportNo'] = passportNumber; + + dynamic localRes; + + await baseAppClient.post(COVID_PASSPORT_UPDATE, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + + Future getCovidPassportNumber() async { + hasError = false; + Map body = Map(); + + dynamic localRes; + + await baseAppClient.post(GET_PATIENT_PASSPORT_NUMBER, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + + Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async { hasError = false; Map body = Map(); body['InvoiceNo'] = patientLabOrder.invoiceNo; @@ -90,9 +138,8 @@ class LabsService extends BaseService { body['ProjectID'] = patientLabOrder.projectID; body['ClinicID'] = patientLabOrder.clinicID; body['Procedure'] = procedure; - await baseAppClient.post(GET_Patient_LAB_ORDERS_RESULT, - onSuccess: (dynamic response, int statusCode) { - labOrdersResultsList.clear(); + await baseAppClient.post(GET_Patient_LAB_ORDERS_RESULT, onSuccess: (dynamic response, int statusCode) { + labOrdersResultsList.clear(); response['ListPLR'].forEach((lab) { labOrdersResultsList.add(LabOrderResult.fromJson(lab)); }); @@ -102,28 +149,23 @@ class LabsService extends BaseService { }, body: body); } - RequestSendLabReportEmail _requestSendLabReportEmail = - RequestSendLabReportEmail(); + RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail(); Future sendLabReportEmail({PatientLabOrders patientLabOrder}) async { _requestSendLabReportEmail.projectID = patientLabOrder.projectID; _requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo; _requestSendLabReportEmail.doctorName = patientLabOrder.doctorName; _requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription; - _requestSendLabReportEmail.patientName = user.firstName +" "+ user.lastName; - _requestSendLabReportEmail.patientIditificationNum = - user.patientIdentificationNo; + _requestSendLabReportEmail.patientName = user.firstName + " " + user.lastName; + _requestSendLabReportEmail.patientIditificationNum = user.patientIdentificationNo; _requestSendLabReportEmail.dateofBirth = user.dateofBirth; _requestSendLabReportEmail.to = user.emailAddress; _requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate.year}-${patientLabOrder.orderDate.month}-${patientLabOrder.orderDate.day}'; _requestSendLabReportEmail.patientMobileNumber = user.mobileNumber; _requestSendLabReportEmail.projectName = patientLabOrder.projectName; - _requestSendLabReportEmail.setupID = user.setupID; + _requestSendLabReportEmail.setupID = user.setupID; - await baseAppClient.post(SEND_LAB_RESULT_EMAIL, - onSuccess: (dynamic response, int statusCode) { - - }, onFailure: (String error, int statusCode) { + await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: _requestSendLabReportEmail.toJson()); diff --git a/lib/core/service/medical/medical_service.dart b/lib/core/service/medical/medical_service.dart index f90280cf..5888fa0d 100644 --- a/lib/core/service/medical/medical_service.dart +++ b/lib/core/service/medical/medical_service.dart @@ -3,15 +3,18 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:flutter/cupertino.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart'; class MedicalService extends BaseService { List appoitmentAllHistoryResultList = List(); - + List doctorScheduleResponse = List(); + List freeSlots = []; getAppointmentHistory({bool isActiveAppointment = false}) async { hasError = false; super.error = ""; Map body = Map(); - if(isActiveAppointment) { + if (isActiveAppointment) { body['IsActiveAppointment'] = true; body['isDentalAllowedBackend'] = false; } @@ -37,12 +40,51 @@ class MedicalService extends BaseService { body['RequesterMobileNo'] = user.mobileNumber; body['RequesterIsOutSA'] = user.outSA; await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, - onSuccess: (response, statusCode) async { + onSuccess: (response, statusCode) async {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + getSchedule(DoctorList doctorRequest) async { + Map request; + request = { + 'DoctorID': doctorRequest.doctorID, + 'ProjectID': doctorRequest.projectID, + 'ClinicID': doctorRequest.clinicID, + 'DoctorWorkingHoursDays': 7 + }; + dynamic localRes; + await baseAppClient.post(DOCTOR_SCHEDULE_URL, + onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + doctorScheduleResponse.clear(); + localRes['List_DoctorWorkingHoursTable'].forEach((item) => + {doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))}); + } - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); + getFreeSlot(DoctorList doctorRequest) async { + Map request; + request = { + 'DoctorID': doctorRequest.doctorID, + 'ProjectID': doctorRequest.projectID, + 'ClinicID': doctorRequest.clinicID, + 'DoctorWorkingHoursDays': 7 + }; + dynamic localRes; + await baseAppClient.post(GET_DOCTOR_FREE_SLOTS, + onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + freeSlots.clear(); + localRes['FreeTimeSlots'].forEach((item) => freeSlots.add(item)); + // localRes['List_DoctorWorkingHoursTable'].forEach((item) => + // {doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))}); } } diff --git a/lib/core/service/medical/my_balance_service.dart b/lib/core/service/medical/my_balance_service.dart index e2744250..6fb91a37 100644 --- a/lib/core/service/medical/my_balance_service.dart +++ b/lib/core/service/medical/my_balance_service.dart @@ -17,7 +17,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart'; class MyBalanceService extends BaseService { List patientAdvanceBalanceAmountList = List(); - double totalAdvanceBalanceAmount; + dynamic totalAdvanceBalanceAmount; List patientInfoList = List(); GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse(); diff --git a/lib/core/service/parmacyModule/parmacy_module_service.dart b/lib/core/service/parmacyModule/parmacy_module_service.dart index 7fa095ca..72bc56c7 100644 --- a/lib/core/service/parmacyModule/parmacy_module_service.dart +++ b/lib/core/service/parmacyModule/parmacy_module_service.dart @@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/uitl/utils.dart'; class PharmacyModuleService extends BaseService { final AppSharedPreferences sharedPref = AppSharedPreferences(); bool isFinished = true; - bool hasError = false; String errorMsg = ''; String url = ""; @@ -114,6 +113,7 @@ class PharmacyModuleService extends BaseService { } Future getTopManufacturerList() async { + hasError = false; Map queryParams = {'page': '1', 'limit': '8'}; try { await baseAppClient.getPharmacy(GET_PHARMACY_TOP_MANUFACTURER, diff --git a/lib/core/service/parmacyModule/prescription_service.dart b/lib/core/service/parmacyModule/prescription_service.dart index c2312890..d81c125d 100644 --- a/lib/core/service/parmacyModule/prescription_service.dart +++ b/lib/core/service/parmacyModule/prescription_service.dart @@ -45,8 +45,6 @@ class PrescriptionService extends BaseService { _prescriptionsList.add(Prescriptions.fromJson(prescriptions)); }); print(_prescriptionsList.length); - print("response is -------------"+response); - print(response); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/viewModels/ancillary_orders_view_model.dart b/lib/core/viewModels/ancillary_orders_view_model.dart index 77eb4237..4a140004 100644 --- a/lib/core/viewModels/ancillary_orders_view_model.dart +++ b/lib/core/viewModels/ancillary_orders_view_model.dart @@ -12,8 +12,10 @@ class AnciallryOrdersViewModel extends BaseViewModel { AncillaryOrdersService _ancillaryService = locator(); List get ancillaryLists => _ancillaryService.ancillaryLists; + List get ancillaryListsDetails => _ancillaryService.ancillaryProcLists; + Future getOrders() async { hasError = false; setState(ViewState.Busy); @@ -25,10 +27,10 @@ class AnciallryOrdersViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getOrdersDetails(appointmentNo, orderNo) async { + Future getOrdersDetails(appointmentNo, orderNo, projectID) async { hasError = false; setState(ViewState.Busy); - await _ancillaryService.getOrdersDetails(appointmentNo, orderNo); + await _ancillaryService.getOrdersDetails(appointmentNo, orderNo, projectID ); if (_ancillaryService.hasError) { error = _ancillaryService.error; setState(ViewState.ErrorLocal); diff --git a/lib/core/viewModels/er/am_request_view_model.dart b/lib/core/viewModels/er/am_request_view_model.dart index 5f6d40d5..8eb292fe 100644 --- a/lib/core/viewModels/er/am_request_view_model.dart +++ b/lib/core/viewModels/er/am_request_view_model.dart @@ -1,6 +1,8 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/AmbulanceRequestOrdersModel.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; @@ -27,12 +29,17 @@ class AmRequestViewModel extends BaseViewModel { List get appoitmentAllHistoryResultList => _medicalService.appoitmentAllHistoryResultList; + List get patientAmbulanceRequestOrdersList => + _amService.patientAmbulanceRequestOrdersList; + List get hospitals => _hospitalService.hospitals; bool get hasPendingOrder =>_amService.hasPendingOrder; PickUpRequestPresOrder get pickUpRequestPresOrder =>_amService.pickUpRequestPresOrder; + AmbulanceRequestOrdersModel get pendingAmbulanceRequestOrder =>_amService.pendingAmbulanceRequestOrder; + Future getAppointmentHistory() async { setState(ViewState.BusyLocal); await _medicalService.getAppointmentHistory(isActiveAppointment: true); @@ -60,7 +67,18 @@ class AmRequestViewModel extends BaseViewModel { error = _hospitalService.error; setState(ViewState.Error); } else - getPatientAllPresOrdersList(); + // getPatientAllPresOrdersList(); + getPatientAllPresOrdersListRC(); + } + + Future getPatientAllPresOrdersListRC() async { + setState(ViewState.Busy); + await _amService.getPatientAllPresOrdersListRC(authenticatedUserObject.user.patientID); + if (_hospitalService.hasError) { + error = _hospitalService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); } Future getPatientAllPresOrdersList() async { @@ -87,22 +105,23 @@ class AmRequestViewModel extends BaseViewModel { Future updatePressOrder({@required int presOrderID}) async { setState(ViewState.Busy); - await _amService.updatePressOrder(presOrderID: presOrderID); + // await _amService.updatePressOrder(presOrderID: presOrderID); + await _amService.updatePressOrderRC(presOrderID: presOrderID, patientID: authenticatedUserObject.user.patientID.toString()); if (_amService.hasError) { error = _amService.error; setState(ViewState.Error); } else - getPatientAllPresOrdersList(); + getPatientAllPresOrdersListRC(); } - Future insertERPressOrder({@required PatientER patientER}) async { + Future insertERPressOrder({@required PatientER_RC patientER}) async { setState(ViewState.Busy); await _amService.insertERPressOrder(patientER: patientER); if (_amService.hasError) { error = _amService.error; setState(ViewState.ErrorLocal); } else - getAmRequestOrders(); - + // getAmRequestOrders(); + getPatientAllPresOrdersListRC(); } } diff --git a/lib/core/viewModels/feedback/feedback_view_model.dart b/lib/core/viewModels/feedback/feedback_view_model.dart index 6793c786..2a9dc90b 100644 --- a/lib/core/viewModels/feedback/feedback_view_model.dart +++ b/lib/core/viewModels/feedback/feedback_view_model.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/cupertino.dart'; @@ -23,7 +24,7 @@ class FeedbackViewModel extends BaseViewModel { List get cOCItemList => _feedbackService.cOCItemList; - List get appointHistoryList => + List get appointHistoryList => _feedbackService.appointHistoryList; Future sendCOCItem( @@ -31,7 +32,7 @@ class FeedbackViewModel extends BaseViewModel { String details, String cOCTypeName, String attachment, - AppointmentHistory appointHistory}) async { + AppoitmentAllHistoryResultList appointHistory}) async { setState(ViewState.BusyLocal); await _feedbackService.sendCOCItem( title: title, diff --git a/lib/core/viewModels/medical/EyeViewModel.dart b/lib/core/viewModels/medical/EyeViewModel.dart index ab76b94f..3c10dc48 100644 --- a/lib/core/viewModels/medical/EyeViewModel.dart +++ b/lib/core/viewModels/medical/EyeViewModel.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/eye/AppointmentFilter.dart'; import 'package:diplomaticquarterapp/core/service/medical/EyeService.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; class EyeViewModel extends BaseViewModel { EyeService _eyeService = locator(); @@ -20,31 +21,35 @@ class EyeViewModel extends BaseViewModel { error = _eyeService.error; setState(ViewState.Error); } else { - _eyeService.appoimentAllHistoryResultList.forEach((element) { - List _appointmentFilter = appointmentFilter - .where( - (elementFilter) => - elementFilter.filterName == element.projectName, - ) - .toList(); - - if (_appointmentFilter.length != 0) { - appointmentFilter[appointmentFilter.indexOf(_appointmentFilter[0])] - .appointmentAllHistoryResultList - .add(element); - } else { - appointmentFilter.add(AppointmentFilter( - element, - element.projectName, - )); - } - }); + if (_eyeService.appoimentAllHistoryResultList.length == 0) { + new AppToast().backWithEmpty(); + } else { + _eyeService.appoimentAllHistoryResultList.forEach((element) { + List _appointmentFilter = appointmentFilter + .where( + (elementFilter) => + elementFilter.filterName == element.projectName, + ) + .toList(); + if (_appointmentFilter.length != 0) { + appointmentFilter[appointmentFilter.indexOf(_appointmentFilter[0])] + .appointmentAllHistoryResultList + .add(element); + } else { + appointmentFilter.add(AppointmentFilter( + element, + element.projectName, + )); + } + }); + } setState(ViewState.Idle); } } - sendGlassesPrescriptionEmail({int appointmentNo, String projectName, int projectID}) async { + sendGlassesPrescriptionEmail( + {int appointmentNo, String projectName, int projectID}) async { setState(ViewState.Busy); await _eyeService.sendGlassesPrescriptionEmail( appointmentNo: appointmentNo, @@ -58,7 +63,8 @@ class EyeViewModel extends BaseViewModel { } } - sendContactLensPrescriptionEmail({int appointmentNo, String projectName, int projectID}) async { + sendContactLensPrescriptionEmail( + {int appointmentNo, String projectName, int projectID}) async { setState(ViewState.Busy); await _eyeService.sendContactLensPrescriptionEmail( appointmentNo: appointmentNo, @@ -71,6 +77,4 @@ class EyeViewModel extends BaseViewModel { setState(ViewState.Idle); } } - - } diff --git a/lib/core/viewModels/medical/medical_view_model.dart b/lib/core/viewModels/medical/medical_view_model.dart index 52fd221a..647982d1 100644 --- a/lib/core/viewModels/medical/medical_view_model.dart +++ b/lib/core/viewModels/medical/medical_view_model.dart @@ -4,17 +4,45 @@ import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart'; class MedicalViewModel extends BaseViewModel { MedicalService _medicalService = locator(); List get appoitmentAllHistoryResultList => _medicalService.appoitmentAllHistoryResultList; - + List get getDoctorScheduleList => + _medicalService.doctorScheduleResponse; + List get freeSlots => _medicalService.freeSlots; getAppointmentHistory() async { - if (authenticatedUserObject.isLogin) { + if (authenticatedUserObject.isLogin) { + setState(ViewState.Busy); + await _medicalService.getAppointmentHistory(); + if (_medicalService.hasError) { + error = _medicalService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + } + + getDoctorSchedule(DoctorList doctorRequest) async { + if (authenticatedUserObject.isLogin) { + setState(ViewState.Busy); + await _medicalService.getSchedule(doctorRequest); + if (_medicalService.hasError) { + error = _medicalService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + } + + getFreeSlots(DoctorList doctorRequest) async { + if (authenticatedUserObject.isLogin) { setState(ViewState.Busy); - await _medicalService.getAppointmentHistory(); + await _medicalService.getFreeSlot(doctorRequest); if (_medicalService.hasError) { error = _medicalService.error; setState(ViewState.Error); diff --git a/lib/core/viewModels/medical/my_balance_view_model.dart b/lib/core/viewModels/medical/my_balance_view_model.dart index e33bc86c..ce9f35fa 100644 --- a/lib/core/viewModels/medical/my_balance_view_model.dart +++ b/lib/core/viewModels/medical/my_balance_view_model.dart @@ -38,7 +38,7 @@ class MyBalanceViewModel extends BaseViewModel { //=========================== - double get totalAdvanceBalanceAmount => + dynamic get totalAdvanceBalanceAmount => _myBalanceService.totalAdvanceBalanceAmount; String get updatedRegisterBloodMessage => diff --git a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart index 1fa34ee2..104dec05 100644 --- a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart +++ b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart @@ -55,30 +55,30 @@ class OrderPreviewViewModel extends BaseViewModel { } } - Future changeProductQuantity(ShoppingCart product) async { + Future changeProductQuantity(ShoppingCart product) async { setState(ViewState.Busy); - await _orderService.changeProductQuantity(product.id, product).then((res) { - _handleGetShoppingCartResponse(res); - }); + var resp = await _orderService.changeProductQuantity(product.id, product); + var object = _handleGetShoppingCartResponse(resp); if (_orderService.hasError) { error = _orderService.error; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); } + return object; } - Future deleteProduct(ShoppingCart product) async { + Future deleteProduct(ShoppingCart product) async { setState(ViewState.Busy); - await _orderService.deleteProduct(product.id).then((res) { - _handleGetShoppingCartResponse(res); - }); + var resp = await _orderService.deleteProduct(product.id); + var object = _handleGetShoppingCartResponse(resp); if (_orderService.hasError) { error = _orderService.error; setState(ViewState.Error); } else { setState(ViewState.Idle); } + return object; } Future deleteShoppingCart() async { @@ -94,12 +94,12 @@ class OrderPreviewViewModel extends BaseViewModel { } } - _handleGetShoppingCartResponse(Map res) { + ShoppingCartResponse _handleGetShoppingCartResponse(Map res) { totalAdditionalShippingCharge = 0; if (res == null) { error = "response is null"; setState(ViewState.Error); - return; + return null; } print(res); cartResponse.itemCount = res["item_count"]; @@ -115,6 +115,7 @@ class OrderPreviewViewModel extends BaseViewModel { totalAdditionalShippingCharge += shoppingCart.product.additionalShippingCharge; }); cartResponse.updateShoppingCard(); + return cartResponse; } String getPaymentOptionImage(PaymentOption paymentOption) { diff --git a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart index 07a3781d..90439128 100644 --- a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart @@ -33,10 +33,12 @@ class PharmacyModuleViewModel extends BaseViewModel { List get lastVisitedProducts => _pharmacyService.lastVisitedProducts; - - List get recommendedProductList => + List get recommendedProductList => _recommendedProductService.recommendedList; +// List> get recommendedProductList => +// _recommendedProductService.recommendedList; + List get prescriptionsList => _prescriptionService.prescriptionsList; @@ -74,6 +76,7 @@ class PharmacyModuleViewModel extends BaseViewModel { setState(ViewState.Idle); } } + Future generatePharmacyToken() async { setState(ViewState.Busy); await _pharmacyService.generatePharmacyToken(); @@ -137,7 +140,7 @@ class PharmacyModuleViewModel extends BaseViewModel { } } - /////////////RecommendedProducts + //////////////////////////////////////////RecommendedProducts getRecommendedProducts(productId) async { hasError = false; setState(ViewState.Busy); diff --git a/lib/main.dart b/lib/main.dart index bf090720..2f1e465f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,8 +8,6 @@ import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:firebase_analytics/firebase_analytics.dart'; -import 'package:firebase_analytics/observer.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:provider/provider.dart'; diff --git a/lib/models/Appointments/DentalProceduresModel.dart b/lib/models/Appointments/DentalProceduresModel.dart new file mode 100644 index 00000000..a66be8d1 --- /dev/null +++ b/lib/models/Appointments/DentalProceduresModel.dart @@ -0,0 +1,76 @@ +class DentalProceduresModel { + List listIsPatientHasOnGoingEstimation; + + DentalProceduresModel({this.listIsPatientHasOnGoingEstimation}); + + DentalProceduresModel.fromJson(Map json) { + if (json['List_IsPatientHasOnGoingEstimation'] != null) { + listIsPatientHasOnGoingEstimation = + new List(); + json['List_IsPatientHasOnGoingEstimation'].forEach((v) { + listIsPatientHasOnGoingEstimation + .add(new ListIsPatientHasOnGoingEstimation.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.listIsPatientHasOnGoingEstimation != null) { + data['List_IsPatientHasOnGoingEstimation'] = this + .listIsPatientHasOnGoingEstimation + .map((v) => v.toJson()) + .toList(); + } + return data; + } +} + +class ListIsPatientHasOnGoingEstimation { + dynamic setupID; + dynamic estimationNo; + int projectID; + String procedureId; + int patientID; + int sequenceNo; + int neededTime; + String procedureName; + dynamic procedureNameN; + + ListIsPatientHasOnGoingEstimation( + {this.setupID, + this.estimationNo, + this.projectID, + this.procedureId, + this.patientID, + this.sequenceNo, + this.neededTime, + this.procedureName, + this.procedureNameN}); + + ListIsPatientHasOnGoingEstimation.fromJson(Map json) { + setupID = json['SetupID']; + estimationNo = json['EstimationNo']; + projectID = json['ProjectID']; + procedureId = json['ProcedureId']; + patientID = json['PatientID']; + sequenceNo = json['sequenceNo']; + neededTime = json['NeededTime']; + procedureName = json['ProcedureName']; + procedureNameN = json['ProcedureNameN']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['EstimationNo'] = this.estimationNo; + data['ProjectID'] = this.projectID; + data['ProcedureId'] = this.procedureId; + data['PatientID'] = this.patientID; + data['sequenceNo'] = this.sequenceNo; + data['NeededTime'] = this.neededTime; + data['ProcedureName'] = this.procedureName; + data['ProcedureNameN'] = this.procedureNameN; + return data; + } +} diff --git a/lib/models/anicllary-orders/ancillary_order_proc_model.dart b/lib/models/anicllary-orders/ancillary_order_proc_model.dart index 7322d11a..5524f58a 100644 --- a/lib/models/anicllary-orders/ancillary_order_proc_model.dart +++ b/lib/models/anicllary-orders/ancillary_order_proc_model.dart @@ -1,60 +1,61 @@ class AncillaryOrdersListProcListModel { - List ancillaryOrderProcList; + List ancillaryOrderProcDetailsList; String appointmentDate; - dynamic appointmentNo; - dynamic clinicID; + int appointmentNo; + int clinicID; String clinicName; - dynamic companyID; + int companyID; String companyName; - dynamic doctorID; + int doctorID; String doctorName; Null errCode; - dynamic groupID; + int groupID; String insurancePolicyNo; String message; String patientCardID; - dynamic patientID; + int patientID; String patientName; - dynamic patientType; - dynamic policyID; + int patientType; + int policyID; String policyName; - dynamic projectID; + int projectID; String setupID; - dynamic statusCode; - dynamic subCategoryID; + int statusCode; + int subCategoryID; String subPolicyNo; AncillaryOrdersListProcListModel( - {this.ancillaryOrderProcList, - this.appointmentDate, - this.appointmentNo, - this.clinicID, - this.clinicName, - this.companyID, - this.companyName, - this.doctorID, - this.doctorName, - this.errCode, - this.groupID, - this.insurancePolicyNo, - this.message, - this.patientCardID, - this.patientID, - this.patientName, - this.patientType, - this.policyID, - this.policyName, - this.projectID, - this.setupID, - this.statusCode, - this.subCategoryID, - this.subPolicyNo}); + {this.ancillaryOrderProcDetailsList, + this.appointmentDate, + this.appointmentNo, + this.clinicID, + this.clinicName, + this.companyID, + this.companyName, + this.doctorID, + this.doctorName, + this.errCode, + this.groupID, + this.insurancePolicyNo, + this.message, + this.patientCardID, + this.patientID, + this.patientName, + this.patientType, + this.policyID, + this.policyName, + this.projectID, + this.setupID, + this.statusCode, + this.subCategoryID, + this.subPolicyNo}); AncillaryOrdersListProcListModel.fromJson(Map json) { - if (json['AncillaryOrderProcList'] != null) { - ancillaryOrderProcList = new List(); - json['AncillaryOrderProcList'].forEach((v) { - ancillaryOrderProcList.add(new AncillaryOrderProcList.fromJson(v)); + if (json['AncillaryOrderProcDetailsList'] != null) { + ancillaryOrderProcDetailsList = new List(); + json['AncillaryOrderProcDetailsList'].forEach((v) { + ancillaryOrderProcDetailsList + .add(new AncillaryOrderProcDetailsList.fromJson(v)); }); } appointmentDate = json['AppointmentDate']; @@ -84,9 +85,9 @@ class AncillaryOrdersListProcListModel { Map toJson() { final Map data = new Map(); - if (this.ancillaryOrderProcList != null) { - data['AncillaryOrderProcList'] = - this.ancillaryOrderProcList.map((v) => v.toJson()).toList(); + if (this.ancillaryOrderProcDetailsList != null) { + data['AncillaryOrderProcDetailsList'] = + this.ancillaryOrderProcDetailsList.map((v) => v.toJson()).toList(); } data['AppointmentDate'] = this.appointmentDate; data['AppointmentNo'] = this.appointmentNo; @@ -115,7 +116,7 @@ class AncillaryOrdersListProcListModel { } } -class AncillaryOrderProcList { +class AncillaryOrderProcDetailsList { dynamic approvalLineItemNo; dynamic approvalNo; String approvalStatus; @@ -147,39 +148,39 @@ class AncillaryOrderProcList { dynamic taxAmount; dynamic taxPct; - AncillaryOrderProcList( + AncillaryOrderProcDetailsList( {this.approvalLineItemNo, - this.approvalNo, - this.approvalStatus, - this.approvalStatusID, - this.companyShare, - this.companyShareWithTax, - this.companyTaxAmount, - this.discountAmount, - this.discountCategory, - this.discountType, - this.discountTypeValue, - this.isApprovalCreated, - this.isApprovalRequired, - this.isCovered, - this.orderDate, - this.orderLineItemNo, - this.orderNo, - this.partnerID, - this.partnerShare, - this.partnerShareType, - this.patientShare, - this.patientShareWithTax, - this.patientTaxAmount, - this.procPrice, - this.procedureCategoryID, - this.procedureCategoryName, - this.procedureID, - this.procedureName, - this.taxAmount, - this.taxPct}); + this.approvalNo, + this.approvalStatus, + this.approvalStatusID, + this.companyShare, + this.companyShareWithTax, + this.companyTaxAmount, + this.discountAmount, + this.discountCategory, + this.discountType, + this.discountTypeValue, + this.isApprovalCreated, + this.isApprovalRequired, + this.isCovered, + this.orderDate, + this.orderLineItemNo, + this.orderNo, + this.partnerID, + this.partnerShare, + this.partnerShareType, + this.patientShare, + this.patientShareWithTax, + this.patientTaxAmount, + this.procPrice, + this.procedureCategoryID, + this.procedureCategoryName, + this.procedureID, + this.procedureName, + this.taxAmount, + this.taxPct}); - AncillaryOrderProcList.fromJson(Map json) { + AncillaryOrderProcDetailsList.fromJson(Map json) { approvalLineItemNo = json['ApprovalLineItemNo']; approvalNo = json['ApprovalNo']; approvalStatus = json['ApprovalStatus']; diff --git a/lib/models/pharmacy/Wishlist.dart b/lib/models/pharmacy/Wishlist.dart index 41704ede..86e095ec 100644 --- a/lib/models/pharmacy/Wishlist.dart +++ b/lib/models/pharmacy/Wishlist.dart @@ -61,15 +61,15 @@ class Wishlist { productAttributes: List.from(json["product_attributes"].map((x) => x)), customerEnteredPrice: json["customer_entered_price"], quantity: json["quantity"], - discountAmountInclTax: json["discount_amount_incl_tax"], + discountAmountInclTax: json["discount_amount_incl_tax"] != null ? json["discount_amount_incl_tax"] :0.0, subtotal: json["subtotal"], subtotalWithVat: json["subtotal_with_vat"], subtotalVatAmount: json["subtotal_vat_amount"], subtotalVatRate: json["subtotal_vat_rate"], currency: json["currency"], currencyn: json["currencyn"], - rentalStartDateUtc: json["rental_start_date_utc"], - rentalEndDateUtc: json["rental_end_date_utc"], + rentalStartDateUtc: json["rental_start_date_utc"] != null ? DateTime.parse(json["rental_start_date_utc"]) : DateTime.now(), + rentalEndDateUtc: json["rental_end_date_utc"] != null ? DateTime.parse(json["rental_end_date_utc"]) : DateTime.now(), createdOnUtc: DateTime.parse(json["created_on_utc"]), updatedOnUtc: DateTime.parse(json["updated_on_utc"]), shoppingCartType: json["shopping_cart_type"], @@ -172,7 +172,7 @@ class Customer { systemName: json["system_name"], lastIpAddress: json["last_ip_address"], createdOnUtc: DateTime.parse(json["created_on_utc"]), - lastLoginDateUtc: DateTime.parse(json["last_login_date_utc"]), + lastLoginDateUtc: json["last_login_date_utc"] != null ? DateTime.parse(json["last_login_date_utc"]) : DateTime.now(), lastActivityDateUtc: DateTime.parse(json["last_activity_date_utc"]), registeredInStoreId: json["registered_in_store_id"], roleIds: List.from(json["role_ids"].map((x) => x)), @@ -335,9 +335,9 @@ class Product { this.fullDescriptionn, this.markasNew, this.showOnHomePage, - this.metaKeywords, - this.metaDescription, - this.metaTitle, +// this.metaKeywords, +// this.metaDescription, +// this.metaTitle, this.allowCustomerReviews, this.approvedRatingSum, this.notApprovedRatingSum, @@ -348,15 +348,15 @@ class Product { this.prescriptionRequired, this.rxMessage, this.rxMessagen, - this.manufacturerPartNumber, - this.gtin, +// this.manufacturerPartNumber, +// this.gtin, this.isGiftCard, this.requireOtherProducts, this.automaticallyAddRequiredProducts, this.isDownload, this.unlimitedDownloads, this.maxNumberOfDownloads, - this.downloadExpirationDays, +// this.downloadExpirationDays, this.hasSampleDownload, this.hasUserAgreement, this.isRecurring, @@ -382,7 +382,7 @@ class Product { this.allowBackInStockSubscriptions, this.orderMinimumQuantity, this.orderMaximumQuantity, - this.allowedQuantities, +// this.allowedQuantities, this.allowAddingOnlyExistingAttributeCombinations, this.disableBuyButton, this.disableWishlistButton, @@ -448,9 +448,9 @@ class Product { String fullDescriptionn; bool markasNew; bool showOnHomePage; - dynamic metaKeywords; - dynamic metaDescription; - dynamic metaTitle; +// dynamic metaKeywords; +// dynamic metaDescription; +// dynamic metaTitle; bool allowCustomerReviews; dynamic approvedRatingSum; dynamic notApprovedRatingSum; @@ -461,15 +461,15 @@ class Product { bool prescriptionRequired; dynamic rxMessage; dynamic rxMessagen; - dynamic manufacturerPartNumber; - dynamic gtin; +// dynamic manufacturerPartNumber; +// dynamic gtin; bool isGiftCard; bool requireOtherProducts; bool automaticallyAddRequiredProducts; bool isDownload; bool unlimitedDownloads; dynamic maxNumberOfDownloads; - dynamic downloadExpirationDays; +// dynamic downloadExpirationDays; bool hasSampleDownload; bool hasUserAgreement; bool isRecurring; @@ -495,7 +495,7 @@ class Product { bool allowBackInStockSubscriptions; dynamic orderMinimumQuantity; dynamic orderMaximumQuantity; - dynamic allowedQuantities; +// dynamic allowedQuantities; bool allowAddingOnlyExistingAttributeCombinations; bool disableBuyButton; bool disableWishlistButton; @@ -561,9 +561,9 @@ class Product { fullDescriptionn: json["full_descriptionn"], markasNew: json["markas_new"], showOnHomePage: json["show_on_home_page"], - metaKeywords: json["meta_keywords"], - metaDescription: json["meta_description"], - metaTitle: json["meta_title"], +// metaKeywords: json["meta_keywords"], +// metaDescription: json["meta_description"], +// metaTitle: json["meta_title"], allowCustomerReviews: json["allow_customer_reviews"], approvedRatingSum: json["approved_rating_sum"], notApprovedRatingSum: json["not_approved_rating_sum"], @@ -572,17 +572,17 @@ class Product { sku: json["sku"], isRx: json["is_rx"], prescriptionRequired: json["prescription_required"], - rxMessage: json["rx_message"], - rxMessagen: json["rx_messagen"], - manufacturerPartNumber: json["manufacturer_part_number"], - gtin: json["gtin"], + rxMessage: json["rx_message"] != null ? json["rx_message"] : "" , + rxMessagen: json["rx_messagen"] != null ? json["rx_messagen"] : "", +// manufacturerPartNumber: json["manufacturer_part_number"], +// gtin: json["gtin"], isGiftCard: json["is_gift_card"], requireOtherProducts: json["require_other_products"], automaticallyAddRequiredProducts: json["automatically_add_required_products"], isDownload: json["is_download"], unlimitedDownloads: json["unlimited_downloads"], maxNumberOfDownloads: json["max_number_of_downloads"], - downloadExpirationDays: json["download_expiration_days"], +// downloadExpirationDays: json["download_expiration_days"], hasSampleDownload: json["has_sample_download"], hasUserAgreement: json["has_user_agreement"], isRecurring: json["is_recurring"], @@ -608,19 +608,19 @@ class Product { allowBackInStockSubscriptions: json["allow_back_in_stock_subscriptions"], orderMinimumQuantity: json["order_minimum_quantity"], orderMaximumQuantity: json["order_maximum_quantity"], - allowedQuantities: json["allowed_quantities"], +// allowedQuantities: json["allowed_quantities"], allowAddingOnlyExistingAttributeCombinations: json["allow_adding_only_existing_attribute_combinations"], disableBuyButton: json["disable_buy_button"], disableWishlistButton: json["disable_wishlist_button"], availableForPreOrder: json["available_for_pre_order"], - preOrderAvailabilityStartDateTimeUtc: json["pre_order_availability_start_date_time_utc"], + preOrderAvailabilityStartDateTimeUtc: json["pre_order_availability_start_date_time_utc"] != null ? DateTime.parse(json["pre_order_availability_start_date_time_utc"]) : DateTime.now(), callForPrice: json["call_for_price"], price: json["price"].toDouble(), oldPrice: json["old_price"], productCost: json["product_cost"].toDouble(), - specialPrice: json["special_price"], - specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"], - specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"], + specialPrice: json["special_price"] != null ? json["special_price"] : 0.0 , + specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"] != null ? DateTime.parse(json["special_price_start_date_time_utc"]) : DateTime.now(), + specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"] != null ? DateTime.parse(json["special_price_end_date_time_utc"]) : DateTime.now(), customerEntersPrice: json["customer_enters_price"], minimumCustomerEnteredPrice: json["minimum_customer_entered_price"], maximumCustomerEnteredPrice: json["maximum_customer_entered_price"], @@ -675,9 +675,9 @@ class Product { "full_descriptionn": fullDescriptionn, "markas_new": markasNew, "show_on_home_page": showOnHomePage, - "meta_keywords": metaKeywords, - "meta_description": metaDescription, - "meta_title": metaTitle, +// "meta_keywords": metaKeywords, +// "meta_description": metaDescription, +// "meta_title": metaTitle, "allow_customer_reviews": allowCustomerReviews, "approved_rating_sum": approvedRatingSum, "not_approved_rating_sum": notApprovedRatingSum, @@ -688,15 +688,15 @@ class Product { "prescription_required": prescriptionRequired, "rx_message": rxMessage, "rx_messagen": rxMessagen, - "manufacturer_part_number": manufacturerPartNumber, - "gtin": gtin, +// "manufacturer_part_number": manufacturerPartNumber, +// "gtin": gtin, "is_gift_card": isGiftCard, "require_other_products": requireOtherProducts, "automatically_add_required_products": automaticallyAddRequiredProducts, "is_download": isDownload, "unlimited_downloads": unlimitedDownloads, "max_number_of_downloads": maxNumberOfDownloads, - "download_expiration_days": downloadExpirationDays, +// "download_expiration_days": downloadExpirationDays, "has_sample_download": hasSampleDownload, "has_user_agreement": hasUserAgreement, "is_recurring": isRecurring, @@ -722,7 +722,7 @@ class Product { "allow_back_in_stock_subscriptions": allowBackInStockSubscriptions, "order_minimum_quantity": orderMinimumQuantity, "order_maximum_quantity": orderMaximumQuantity, - "allowed_quantities": allowedQuantities, +// "allowed_quantities": allowedQuantities, "allow_adding_only_existing_attribute_combinations": allowAddingOnlyExistingAttributeCombinations, "disable_buy_button": disableBuyButton, "disable_wishlist_button": disableWishlistButton, diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart index 72aa40dc..d7bb61ed 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart @@ -33,11 +33,15 @@ class CMCLocationPage extends StatefulWidget { class _CMCLocationPageState extends State { double latitude = 0; double longitude = 0; + bool showCurrentLocation = false; @override void initState() { latitude = widget.latitude; longitude = widget.longitude; + if(latitude == 0.0 && longitude == 0.0) { + showCurrentLocation = true; + } super.initState(); } @@ -149,7 +153,7 @@ class _CMCLocationPageState extends State { ); }, initialPosition: LatLng(latitude, longitude), - useCurrentLocation: false, + useCurrentLocation: showCurrentLocation, ), )); } diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart index 3d969d9e..12e1b622 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/Comprehens import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -44,6 +45,7 @@ class _NewCMCStepTowPageState extends State { double latitude = 0; double longitude = 0; AddressInfo _selectedAddress; + bool showCurrentLocation = false; @override void initState() { @@ -56,14 +58,26 @@ class _NewCMCStepTowPageState extends State { super.initState(); } - setLatitudeAndLongitude({bool isSetState = false, String latLong}) { - if (latLong == null) - latLong = widget - .model.addressesList[widget.model.addressesList.length - 1].latLong; - List latLongArr = latLong.split(','); + setLatitudeAndLongitude({bool isSetState = false, String latLong}) async { + if (latLong == null){ + if(widget.model.addressesList.isEmpty) { - latitude = double.parse(latLongArr[0]); - longitude = double.parse(latLongArr[1]); + setState(() { + showCurrentLocation = true; + }); + } else { + latLong = widget + .model.addressesList[widget.model.addressesList.length - 1].latLong; + } + + } + + if(!showCurrentLocation) { + List latLongArr = latLong.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + } } @override @@ -144,9 +158,11 @@ class _NewCMCStepTowPageState extends State { ); }, initialPosition: LatLng(latitude, longitude), - useCurrentLocation: false, + useCurrentLocation: showCurrentLocation, ), - Container( + if(widget.model.addressesList.isNotEmpty) + + Container( child: InkWell( onTap: () => confirmSelectLocationDialog(widget.model.addressesList), diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart index f1d3e72f..d7ebad6c 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart @@ -43,9 +43,8 @@ class _CMCPageState extends State with SingleTickerProviderStateMixin { description: TranslationBase.of(context).infoCMC, imagesInfo: [ ImagesInfo( - imageAr: 'assets/images/Wifi-AR.png', - imageEn: 'assets/images/wifi-EN.png', - isAsset: true) + imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', + imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png') ], appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup, body: Scaffold( diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart index 5a3271f2..3a58ccb2 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart @@ -279,12 +279,13 @@ class MobileNumberTextFiled extends StatelessWidget { const MobileNumberTextFiled({ Key key, this.controller, - this.code + this.code, this.onChange }) : super(key: key); final TextEditingController controller; final String code; + final Function onChange; @override Widget build(BuildContext context) { @@ -313,6 +314,7 @@ class MobileNumberTextFiled extends StatelessWidget { margin: EdgeInsets.all(5), child: TextField( controller: controller, + onChanged: onChange, keyboardType: TextInputType.phone, decoration: InputDecoration( border: InputBorder.none, hintText: '5xxxxxxxx'), diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart index a823c154..3f92823d 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart @@ -6,6 +6,8 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -409,16 +411,17 @@ class _NewEReferralStepThreePageState extends State { 15; this.widget.createEReferralRequestModel.preferredBranchName = "Arryan Hospital"; - - // this.widget.createEReferralRequestModel.fullName= ""; this.widget.createEReferralRequestModel.otherRelationship = ""; - // this.widget.createEReferralRequestModel.; - // this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital"; - // this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital"; await model .createEReferral(this.widget.createEReferralRequestModel); + if(model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } else{ + AppToast.showSuccessToast(message: "Referral sent successfully"); + + } }, loading: model.state == ViewState.BusyLocal, disabled: medicalReportImages.length == 0, diff --git a/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart index 0b75705d..906108d4 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart @@ -47,6 +47,7 @@ class _SearchForReferralsPageState extends State { onModelReady: (model) => model.getAllCities(), builder: (_, model, widget) => AppScaffold( isShowAppBar: false, + baseViewModel: model, body: SingleChildScrollView( physics: ScrollPhysics(), child: Container( @@ -86,6 +87,11 @@ class _SearchForReferralsPageState extends State { ? "Enter Patient Identification No" : "Enter Referral Number", controller: _searchTextController, + onChanged: (_){ + setState(() { + + }); + }, ), SizedBox( height: 12, @@ -113,6 +119,12 @@ class _SearchForReferralsPageState extends State { ), MobileNumberTextFiled( controller: _mobileTextController, + onChange: (_){ + setState(() { + + }); + }, + code: _selectedCountry == null ? "11" : _selectedCountry["code"], diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart index c87a3eb5..0e013ebf 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart @@ -33,12 +33,16 @@ class _LocationPageState extends State { double latitude = 0; double longitude = 0; + bool showCurrentLocation = false; @override void initState() { latitude = widget.latitude; longitude = widget.longitude; + if(latitude == 0.0 && longitude == 0.0) { + showCurrentLocation = true; + } super.initState(); } @@ -141,7 +145,7 @@ class _LocationPageState ); }, initialPosition: LatLng(latitude, longitude), - useCurrentLocation: false, + useCurrentLocation: showCurrentLocation, ), )); } diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart index e9ddd2d1..1b96cdc8 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart @@ -46,6 +46,8 @@ class _NewHomeHealthCareStepTowPageState double latitude = 0; double longitude = 0; AddressInfo _selectedAddress; + bool showCurrentLocation = false; + @override void initState() { @@ -60,13 +62,25 @@ class _NewHomeHealthCareStepTowPageState } setLatitudeAndLongitude({bool isSetState = false, String latLong}) { - if (latLong == null) - latLong = widget.model.addressesList[widget.model.addressesList - .length - 1].latLong; - List latLongArr = latLong.split(','); + if (latLong == null){ + if(widget.model.addressesList.isEmpty) { + setState(() { + showCurrentLocation = true; + }); + } else { + latLong = widget.model.addressesList[widget.model.addressesList + .length - 1].latLong; + } + + } + + if(!showCurrentLocation) { + List latLongArr = latLong.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + } - latitude = double.parse(latLongArr[0]); - longitude = double.parse(latLongArr[1]); } @override @@ -147,8 +161,9 @@ class _NewHomeHealthCareStepTowPageState ); }, initialPosition: LatLng(latitude, longitude), - useCurrentLocation: false, + useCurrentLocation: showCurrentLocation, ), + if(widget.model.addressesList.isNotEmpty) Container( child: InkWell( onTap: () => diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart index b39c918f..001ecbb1 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart @@ -2,7 +2,6 @@ import 'dart:ui'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -46,9 +45,8 @@ class _HomeHealthCarePageState extends State appBarTitle: TranslationBase.of(context).homeHealthCare, imagesInfo: [ ImagesInfo( - imageAr: 'assets/images/Wifi-AR.png', - imageEn: 'assets/images/wifi-EN.png', - isAsset: true) + imageAr: 'https://hmgwebservices.com/Images/MobileApp/HHC/ar/0.png', + imageEn: 'https://hmgwebservices.com/Images/MobileApp/HHC/en/0.png') ], body: Scaffold( extendBodyBehindAppBar: true, diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index d6a60e3d..3d4294ec 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; +import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; @@ -22,6 +23,7 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; @@ -56,8 +58,7 @@ class _AllHabibMedicalServiceState extends State { AppSharedPreferences sharedPref = AppSharedPreferences(); AuthenticatedUser authUser = new AuthenticatedUser(); AuthProvider authProvider = new AuthProvider(); - PharmacyModuleViewModel pharmacyModuleViewModel = - locator(); + PharmacyModuleViewModel pharmacyModuleViewModel = locator(); LocationUtils locationUtils; var weather = '--'; WeatherService _weatherService = WeatherService(); @@ -65,12 +66,8 @@ class _AllHabibMedicalServiceState extends State { @override void initState() { WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - locationUtils = - new LocationUtils(isShowConfirmDialog: true, context: context); - WidgetsBinding.instance.addPostFrameCallback((_) => { - Geolocator.getLastKnownPosition() - .then((value) => setLocation(value)) - }); + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => {Geolocator.getLastKnownPosition().then((value) => setLocation(value))}); }); super.initState(); } @@ -109,14 +106,12 @@ class _AllHabibMedicalServiceState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts( - TranslationBase.of(context) - .healthWeatherIndicators, + TranslationBase.of(context).healthWeatherIndicators, color: Colors.white, fontWeight: FontWeight.w600, ), Texts( - TranslationBase.of(context) - .healthTipsBasedOnCurrentWeather, + TranslationBase.of(context).healthTipsBasedOnCurrentWeather, color: Colors.white, fontSize: 14, ), @@ -144,11 +139,7 @@ class _AllHabibMedicalServiceState extends State { width: 60, height: 60, ), - Directionality( - textDirection: TextDirection.ltr, - child: AppText(weather, - fontSize: 22, - color: Colors.white)) + Directionality(textDirection: TextDirection.ltr, child: AppText(weather, fontSize: 22, color: Colors.white)) ], ), Texts( @@ -173,8 +164,7 @@ class _AllHabibMedicalServiceState extends State { ), ); }, - imageLocation: - 'assets/images/new-design/my_file_bottom_bar.png', + imageLocation: 'assets/images/new-design/my_file_bottom_bar.png', title: TranslationBase.of(context).myMedicalFile, ), ServicesContainer( @@ -196,8 +186,7 @@ class _AllHabibMedicalServiceState extends State { ), ), ), - imageLocation: - 'assets/images/new-design/booking_icon_active.png', + imageLocation: 'assets/images/new-design/booking_icon_active.png', title: TranslationBase.of(context).bookAppo, ), ServicesContainer( @@ -207,8 +196,7 @@ class _AllHabibMedicalServiceState extends State { page: PaymentService(), ), ), - imageLocation: - 'assets/images/al-habib_online_payment_service_icon.png', + imageLocation: 'assets/images/al-habib_online_payment_service_icon.png', title: TranslationBase.of(context).onlinePaymentService, ), ServicesContainer( @@ -218,17 +206,15 @@ class _AllHabibMedicalServiceState extends State { page: AnicllaryOrders(), ), ), - imageLocation: - 'assets/images/comprehensive_medical_checkup_logo.png', + imageLocation: 'assets/images/comprehensive_medical_checkup_logo.png', title: TranslationBase.of(context).anicllaryOrders, ), ServicesContainer( onTap: () => Navigator.push( context, - FadePage(), + FadePage(page: CovidDrivethruLocation()), ), - imageLocation: - 'assets/images/al-habib_online_payment_service_icon.png', + imageLocation: 'assets/images/al-habib_online_payment_service_icon.png', title: TranslationBase.of(context).covid19_driveThrueTest, ), ServicesContainer( @@ -247,12 +233,6 @@ class _AllHabibMedicalServiceState extends State { ), ServicesContainer( onTap: () => getPharmacyToken(), - // Navigator.push( - // context, - // FadePage( - // page: ParkingPage(), - // ), - // ), imageLocation: 'assets/images/pharmacy_logo.png', title: TranslationBase.of(context).pharmacy), ServicesContainer( @@ -262,8 +242,7 @@ class _AllHabibMedicalServiceState extends State { page: InsuranceUpdate(), ), ), - imageLocation: - 'assets/images/medical/insurance_card_icon.png', + imageLocation: 'assets/images/medical/insurance_card_icon.png', title: TranslationBase.of(context).updateInsurance, ), ServicesContainer( @@ -281,8 +260,7 @@ class _AllHabibMedicalServiceState extends State { page: MyFamily(), ), ), - imageLocation: - 'assets/images/new-design/family_menu_icon_red.png', + imageLocation: 'assets/images/new-design/family_menu_icon_red.png', title: TranslationBase.of(context).myFamily, ), if (projectViewModel.havePrivilege(35)) @@ -291,8 +269,7 @@ class _AllHabibMedicalServiceState extends State { context, FadePage(page: ChildVaccinesPage()), ), - imageLocation: - 'assets/images/new-design/children_vaccines_icon.png', + imageLocation: 'assets/images/new-design/children_vaccines_icon.png', title: TranslationBase.of(context).childVaccine, ), ServicesContainer( @@ -300,18 +277,17 @@ class _AllHabibMedicalServiceState extends State { Navigator.pop(context); LandingPage.shared.switchToDoFromHMGServices(); }, - imageLocation: - 'assets/images/new-design/upcoming_icon_bottom_bar.png', + imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png', title: TranslationBase.of(context).todoList, ), - if (projectViewModel.havePrivilege(42)) - ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage(page: SymptomInfo()), - ), - imageLocation: 'assets/images/new-design/body_icon.png', - title: TranslationBase.of(context).symptomCheckerTitle), + // if (projectViewModel.havePrivilege(42)) + // ServicesContainer( + // onTap: () => Navigator.push( + // context, + // FadePage(page: SymptomInfo()), + // ), + // imageLocation: 'assets/images/new-design/body_icon.png', + // title: TranslationBase.of(context).symptomCheckerTitle), if (projectViewModel.havePrivilege(36)) ServicesContainer( onTap: () => Navigator.push( @@ -328,8 +304,7 @@ class _AllHabibMedicalServiceState extends State { page: (HealthCalculators()), ), ), - imageLocation: - 'assets/images/new-design/health_calculator_icon.png', + imageLocation: 'assets/images/new-design/health_calculator_icon.png', title: TranslationBase.of(context).calculators, ), ServicesContainer( @@ -339,20 +314,12 @@ class _AllHabibMedicalServiceState extends State { page: HealthConverter(), ), ), - imageLocation: - 'assets/images/new-design/health_convertor_icon.png', + imageLocation: 'assets/images/new-design/health_convertor_icon.png', title: TranslationBase.of(context).converters, ), if (projectViewModel.havePrivilege(38)) ServicesContainer( - onTap: () => - Navigator.push(context, FadePage(page: H2OPage())), - // Navigator.push( - // context, - // FadePage( - // page: H2OPageIndexPage(), - // ), - // ), + onTap: () => Navigator.push(context, FadePage(page: H2OPage())), imageLocation: 'assets/images/new-design/water_icon.png', title: TranslationBase.of(context).h2o, ), @@ -360,10 +327,11 @@ class _AllHabibMedicalServiceState extends State { ServicesContainer( onTap: () => Navigator.push( context, - FadePage(), + FadePage( + page: SmartWatchInstructions() + ), ), - imageLocation: - 'assets/images/new-design/smartwatch_icon.png', + imageLocation: 'assets/images/new-design/smartwatch_icon.png', title: TranslationBase.of(context).smartWatches, ), ServicesContainer( @@ -373,15 +341,12 @@ class _AllHabibMedicalServiceState extends State { page: ParkingPage(), ), ), - imageLocation: - 'assets/images/new-design/parking_system_icon.png', + imageLocation: 'assets/images/new-design/parking_system_icon.png', title: TranslationBase.of(context).parking, ), ServicesContainer( - onTap: () => launch( - "https://hmgwebservices.com/vt_mobile/html/index.html"), - imageLocation: - 'assets/images/new-design/virtual_tour_icon.png', + onTap: () => launch("https://hmgwebservices.com/vt_mobile/html/index.html"), + imageLocation: 'assets/images/new-design/virtual_tour_icon.png', title: TranslationBase.of(context).vTour, ), ServicesContainer( @@ -389,12 +354,10 @@ class _AllHabibMedicalServiceState extends State { Navigator.of(context).push(MaterialPageRoute( builder: (BuildContext context) => MyWebView( title: "HMG News", - selectedUrl: - "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", + selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", ))); }, - imageLocation: - 'assets/images/new-design/twitter_dashboard_icon.png', + imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png', title: TranslationBase.of(context).latestNews, ), ServicesContainer( @@ -436,8 +399,7 @@ class _AllHabibMedicalServiceState extends State { getAuthUser() async { if (await this.sharedPref.getObject(USER_PROFILE) != null) { - var data = AuthenticatedUser.fromJson( - await this.sharedPref.getObject(USER_PROFILE)); + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); setState(() { authUser = data; }); @@ -451,8 +413,7 @@ class _AllHabibMedicalServiceState extends State { }); } else { setState(() { - weather = - data != null ? data['Temperature'].toString() + '\u2103' : '--'; + weather = data != null ? data['Temperature'].toString() + '\u2103' : '--'; }); } } diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart index eccc1309..4cb2b658 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart @@ -95,7 +95,7 @@ class _AnicllaryOrdersState extends State .map( (item) => InkWell( onTap: () { - ancillaryOrdersDetails(item); + ancillaryOrdersDetails(item, model.ancillaryLists[0].projectID); }, child: Container( decoration: BoxDecoration( @@ -166,11 +166,11 @@ class _AnicllaryOrdersState extends State .toList()); } - ancillaryOrdersDetails(item) { + ancillaryOrdersDetails(item, projectId) { Navigator.push( context, FadePage( - page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo), + page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo,projectId ), ), ); } diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index 20d2966b..2c09de3d 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -8,11 +8,15 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart'; class AnicllaryOrdersDetails extends StatefulWidget { final dynamic appoNo; final dynamic orderNo; - AnicllaryOrdersDetails(this.appoNo, this.orderNo); + final dynamic projectID; + + AnicllaryOrdersDetails(this.appoNo, this.orderNo, this.projectID); @override _AnicllaryOrdersState createState() => _AnicllaryOrdersState(); } @@ -30,8 +34,8 @@ class _AnicllaryOrdersState extends State @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model) => - model.getOrdersDetails(widget.appoNo, widget.orderNo), + onModelReady: (model) => model.getOrdersDetails( + widget.appoNo, widget.orderNo, widget.projectID), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, baseViewModel: model, @@ -64,7 +68,15 @@ class _AnicllaryOrdersState extends State children: [ Button( label: TranslationBase.of(context).payNow, - onTap: () {}, + backgroundColor: Colors.red[800], + onTap: () { + Navigator.push( + context, + FadePage( + page: OrdersPayment(), + ), + ); + }, ) ], ) @@ -89,7 +101,7 @@ class _AnicllaryOrdersState extends State fontSize: 20, ), Texts( - model.ancillaryListsDetails[0].patientID.toString(), + model.ancillaryLists[0].patientID.toString(), ) ], ), @@ -126,7 +138,8 @@ class _AnicllaryOrdersState extends State children: [ Texts( TranslationBase.of(context).invoiceNo, - fontWeight: FontWeight.bold, +// fontWeight: FontWeight.bold, + color: Colors.red[500], ), Texts(" : "), Texts( @@ -136,24 +149,26 @@ class _AnicllaryOrdersState extends State ), Row( children: [ - Texts( - TranslationBase.of(context).date, - fontWeight: FontWeight.bold, - ), +// Texts( +// TranslationBase.of(context).invoiceDate, +// // fontWeight: FontWeight.bold, +// color: Colors.red[500], +// ), Texts(" : "), Texts( - DateUtil.getFormattedDate( - DateUtil.convertStringToDate( - model.ancillaryListsDetails[0].appointmentDate), - "MMM dd,yyyy"), + DateUtil.getDayMonthYearDateFormatted( + DateUtil.convertStringToDate( + model.ancillaryListsDetails[0].appointmentDate), + ), ) ], ), Row( children: [ Texts( - TranslationBase.of(context).date, - fontWeight: FontWeight.bold, + TranslationBase.of(context).doctorName, +// fontWeight: FontWeight.bold, + color: Colors.red[500], ), Texts(" : "), Texts( @@ -206,13 +221,46 @@ class _AnicllaryOrdersState extends State Divider( color: Colors.red[800], thickness: 3, - ) + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Row( + children: [], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Texts( + TranslationBase.of(context).price, + color: Colors.grey[500], + fontSize: 14, + ), + SizedBox(width: 15), + Texts( + TranslationBase.of(context).vat, + color: Colors.grey[500], + fontSize: 14, + ), + SizedBox(width: 15), + Texts( + TranslationBase.of(context).total, + color: Colors.grey[500], + fontSize: 14, + ), + ]), + ], + ), + Divider( + color: Colors.black26, + ), ], )); } Widget getAncillaryDetails(model) { - Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcList, + Map newMap = groupBy( + model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList, (obj) => obj.procedureCategoryName); print(newMap); @@ -247,7 +295,7 @@ class _AnicllaryOrdersState extends State String getTotalValue(value) { double total = 0.0; - value.ancillaryListsDetails[0].ancillaryOrderProcList + value.ancillaryListsDetails[0].ancillaryOrderProcDetailsList .forEach((result) => {total += result.companyShareWithTax}); return total.toStringAsFixed(2); } diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart new file mode 100644 index 00000000..fee4ff40 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart @@ -0,0 +1,20 @@ +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; + +class OrdersPayment extends StatefulWidget { + @override + _OrdersPaymentState createState() => _OrdersPaymentState(); +} + +class _OrdersPaymentState extends State { + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart index b847190f..7c4e8b8b 100644 --- a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart +++ b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart @@ -1,12 +1,12 @@ import 'dart:ui'; import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart'; -import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; @@ -49,22 +49,29 @@ class _H2OPageState extends State with SingleTickerProviderStateMixin { builder: (_, model, widget) => AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).waterTracker, + description: TranslationBase.of(context).h2oInfo, + imagesInfo: [ + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/ar/0.png') + ], showHomeAppBarIcon: false, baseViewModel: model, isHelp: true, appBarIcons: [ - IconButton( - icon: Image.asset("assets/images/new-design/setting_gear_icon.png"), - color: Colors.white, - onPressed: () { - Navigator.push( - context, - FadePage( - page: H2oSetting(userDetailModel: model.userDetail, viewModel: model), - ), - ); - }, - ), + model.isLogin + ? IconButton( + icon: Image.asset("assets/images/new-design/setting_gear_icon.png"), + color: Colors.white, + onPressed: () { + Navigator.push( + context, + FadePage( + page: H2oSetting(userDetailModel: model.userDetail, viewModel: model), + ), + ); + }, + ) + : Container(), ], body: Scaffold( extendBodyBehindAppBar: true, diff --git a/lib/pages/AlHabibMedicalService/health_converter/blood_cholesterol.dart b/lib/pages/AlHabibMedicalService/health_converter/blood_cholesterol.dart index 513b50ab..ac31b98c 100644 --- a/lib/pages/AlHabibMedicalService/health_converter/blood_cholesterol.dart +++ b/lib/pages/AlHabibMedicalService/health_converter/blood_cholesterol.dart @@ -64,6 +64,7 @@ class _BloodCholesterolState extends State { return AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).bloodCholesterol, + isShowDecPage: false, body: Padding( padding: const EdgeInsets.all(16.0), child: SingleChildScrollView( diff --git a/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart index e429418d..e9369b82 100644 --- a/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart +++ b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart @@ -7,8 +7,10 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -const activeCardColor = Color(0xff70777A); -const inactiveCardColor = Color(0xffFAFAFd); +const activeCardColor = Color(0xff515a5d); +const activeTextColor = Color(0xffFAFAFA); +const inactiveCardColor = Color(0xffFAFAFA); +const inactiveTextColor = Color(0xff60686B); class BloodSugar extends StatefulWidget { @override @@ -20,6 +22,8 @@ Color color; class _BloodSugarState extends State { Color cardMGColor = inactiveCardColor; Color cardMMOLColor = inactiveCardColor; + Color textMGColor = inactiveTextColor; + Color textMMOLColor = inactiveTextColor; void updateColor(int type) { //MG/DLT card @@ -30,6 +34,8 @@ class _BloodSugarState extends State { } else { cardMGColor = inactiveCardColor; } + textMGColor = activeTextColor; + textMMOLColor = inactiveTextColor; } if (type == 2) { if (cardMMOLColor == inactiveCardColor) { @@ -38,6 +44,8 @@ class _BloodSugarState extends State { } else { cardMMOLColor = inactiveCardColor; } + textMGColor = inactiveTextColor; + textMMOLColor = activeTextColor; } } @@ -45,7 +53,7 @@ class _BloodSugarState extends State { if (textController.text.isEmpty) return; if (cardMGColor == activeCardColor) { inputValue = double.parse(textController.text); - inputValue = inputValue / 15; + inputValue = inputValue / 18; unit = 'mmol/l'; } else if (cardMMOLColor == activeCardColor) { inputValue = double.parse(textController.text); @@ -74,217 +82,237 @@ class _BloodSugarState extends State { isShowAppBar: true, isShowDecPage: false, appBarTitle: TranslationBase.of(context).bloodSugarConversion, - body: Padding( + body: Container( padding: const EdgeInsets.all(16.0), - child: SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 0.7, - child: Column( - //crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 350.0, - child: Text( - TranslationBase.of(context).convertBloodSugarStatement, - //textAlign: TextAlign.center, - style: TextStyle(fontSize: 20.0), - ), - ), - SizedBox( - height: 15.0, - ), - Container( - color: Colors.white, - height: 120.0, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - //crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 15.0), - child: Row( - children: [ - Texts( - TranslationBase.of(context).convertFrom, - ) - ], - ), - ), - SizedBox( - height: 9.0, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Column( + //crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + child: Text( + TranslationBase.of(context).convertBloodSugarStatement, + //textAlign: TextAlign.center, + style: TextStyle(fontSize: 20.0), + ), + ), + SizedBox( + height: 12.0, + ), + Container( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 16.0, horizontal: 8), + child: Column( children: [ - GestureDetector( - onTap: () { - setState(() { - updateColor(1); - if (textController.text.isNotEmpty) { - inputValue = - double.parse(textController.text); - inputValue = inputValue / 15; - } - unit = 'mmol/l'; - }); - }, - child: Container( - height: 65.0, - width: 150.0, - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.5), - spreadRadius: 3, - blurRadius: 7, - offset: Offset( - 0, 3), // changes position of shadow + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 16.0), + child: Row( + children: [ + Texts( + TranslationBase.of(context).convertFrom, + ) + ], + ), + ), + SizedBox( + height: 8.0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: 16.0, + ), + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(1); + calculateBloodSugar(); + }); + }, + child: Container( + height: 65.0, + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 3, + blurRadius: 7, + offset: Offset(0, + 3), // changes position of shadow + ), + ], + color: cardMGColor, + borderRadius: + BorderRadius.circular(3.0), + ), + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 0.0, horizontal: 18.0), + child: Texts( + 'MG/DLt TO \nMMOL/L', + color: textMGColor, + ), + ), ), - ], - color: cardMGColor, - borderRadius: BorderRadius.circular(3.0), + ), ), - child: Padding( - padding: const EdgeInsets.symmetric( - vertical: 0.0, horizontal: 18.0), - child: Texts('MG/DLt TO \nMMOL/L'), + SizedBox( + width: 12.0, ), - ), - ), - GestureDetector( - onTap: () { - setState(() { - updateColor(2); - if (textController.text.isNotEmpty) { - inputValue = - double.parse(textController.text); - inputValue = inputValue / 18; - } - unit = 'mg/dlt'; - }); - }, - child: Container( - height: 65.0, - width: 150.0, - decoration: BoxDecoration( - color: cardMMOLColor, - borderRadius: BorderRadius.circular(3.0), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.5), - spreadRadius: 3, - blurRadius: 7, - offset: Offset( - 0, 3), // changes position of shadow + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(2); + calculateBloodSugar(); + }); + }, + child: Container( + height: 65.0, + decoration: BoxDecoration( + color: cardMMOLColor, + borderRadius: + BorderRadius.circular(3.0), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 3, + blurRadius: 7, + offset: Offset(0, + 3), // changes position of shadow + ), + ], + ), + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 16.0), + child: Texts( + 'MMOL/L TO MG/DLt ', + color: textMMOLColor, + ), + ), ), - ], + ), ), - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 16.0), - child: Texts('\nMMOL/L TO MG/DLt '), + SizedBox( + width: 16.0, ), - ), + ], ), ], ), - ], + ), ), - ), - ), - SizedBox( - height: 25.0, - ), - Container( - height: 65.0, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6.0), - color: Colors.white, - ), - child: TextFormField( - controller: textController, - inputFormatters: [ + SizedBox( + height: 24.0, + ), + Container( + height: 65.0, + padding: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.0), + color: Colors.white, + ), + child: TextFormField( + controller: textController, + inputFormatters: [ // FilteringTextInputFormatter.digitsOnly - ], - keyboardType: TextInputType.number, - decoration: InputDecoration( - labelText: TranslationBase.of(context).enterReadingValue, - border: OutlineInputBorder( - borderSide: BorderSide(color: Colors.black45)), - labelStyle: TextStyle( - color: Colors.black87, + ], + keyboardType: TextInputType.number, + decoration: InputDecoration( + labelText: + TranslationBase.of(context).enterReadingValue, + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide(color: Colors.white), + ), + disabledBorder: UnderlineInputBorder( + borderSide: BorderSide(color: Colors.white), + ), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide(color: Colors.white), + ), + border: UnderlineInputBorder( + borderSide: BorderSide(color: Colors.white)), + labelStyle: TextStyle( + color: Colors.black87, + ), + ), ), ), - ), - ), - SizedBox( - height: 25.0, - ), - Visibility( - visible: _visible, - child: Container( - height: 115.0, - width: 350.0, - decoration: BoxDecoration( - color: Colors.white, - border: Border.all(color: Colors.black), - borderRadius: BorderRadius.circular(15.0), + SizedBox( + height: 24.0, ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Texts(TranslationBase.of(context).result + ": "), - Row( + Visibility( + visible: _visible, + child: Container( + height: 115.0, + width: 350.0, + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.black), + borderRadius: BorderRadius.circular(15.0), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, children: [ - Text( - inputValue.toStringAsFixed(3), - style: TextStyle(fontSize: 35.0), - ), - Padding( - padding: EdgeInsets.only(left: 4.0, top: 10.0), - child: Text( - unit.toString(), - style: TextStyle( - color: Color(0xffC5273A), - fontSize: 15.0, - fontWeight: FontWeight.w500, + Texts(TranslationBase.of(context).result + ": "), + Row( + children: [ + Text( + inputValue.toStringAsFixed(2), + style: TextStyle(fontSize: 35.0), ), - ), + Padding( + padding: + EdgeInsets.only(left: 4.0, top: 10.0), + child: Text( + unit.toString(), + style: TextStyle( + color: Color(0xffC5273A), + fontSize: 15.0, + fontWeight: FontWeight.w500, + ), + ), + ), + ], ), ], ), - ], + ), ), ), - ), - ), - SizedBox( - height: 30.0, + ], ), - Flexible( - child: Container( - height: 50.0, - width: 150.0, - child: SecondaryButton( - label: TranslationBase.of(context).calculate, - onTap: () { - setState(() { - _visible == false - ? _visible = !_visible - : _visible = _visible; - calculateBloodSugar(); - }); - }, - ), - ), - ), - ], + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16), + child: SecondaryButton( + label: TranslationBase.of(context).calculate, + color: Color(0XFF515A5D), + onTap: () { + setState(() { + _visible == false + ? _visible = !_visible + : _visible = _visible; + calculateBloodSugar(); + }); + }, + ), ), - ), + ], ), ), ); diff --git a/lib/pages/AlHabibMedicalService/health_converter/triglycerides.dart b/lib/pages/AlHabibMedicalService/health_converter/triglycerides.dart index 4c5f9a83..7c821055 100644 --- a/lib/pages/AlHabibMedicalService/health_converter/triglycerides.dart +++ b/lib/pages/AlHabibMedicalService/health_converter/triglycerides.dart @@ -66,6 +66,7 @@ class _TriglyceridesState extends State { return AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).triglycerides, + isShowDecPage: false, body: Padding( padding: const EdgeInsets.all(16.0), child: SingleChildScrollView( diff --git a/lib/pages/AlHabibMedicalService/my_web_view.dart b/lib/pages/AlHabibMedicalService/my_web_view.dart index c4841a24..9e8defc1 100644 --- a/lib/pages/AlHabibMedicalService/my_web_view.dart +++ b/lib/pages/AlHabibMedicalService/my_web_view.dart @@ -8,7 +8,8 @@ class MyWebView extends StatelessWidget { final String title; final String selectedUrl; - final Completer _controller = Completer(); + final Completer _controller = + Completer(); MyWebView({ @required this.title, @@ -20,6 +21,7 @@ class MyWebView extends StatelessWidget { return AppScaffold( isShowAppBar: true, appBarTitle: title, + isShowDecPage: false, body: WebView( initialUrl: selectedUrl, javascriptMode: JavascriptMode.unrestricted, diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart index ce6ab8ee..f362c2bc 100644 --- a/lib/pages/Blood/blood_donation.dart +++ b/lib/pages/Blood/blood_donation.dart @@ -56,28 +56,28 @@ class _BloodDonationPageState extends State { AuthenticatedUser authenticatedUser; GetAllSharedRecordsByStatusList selectedPatientFamily; AdvanceModel advanceModel = AdvanceModel(); - List_BloodGroupDetailsModel bloodDetails = - List_BloodGroupDetailsModel(bloodGroup: "A-"); + List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel(bloodGroup: "A-"); AppSharedPreferences sharedPref = AppSharedPreferences(); AuthenticatedUser authUser; var checkedValue = false; List imagesInfo = List(); + + ProjectViewModel projectProvider; + @override void initState() { + imagesInfo.add( + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'), + ); + WidgetsBinding.instance.addPostFrameCallback((_) { + if (projectProvider.isLogin) getAuthUser(); + }); super.initState(); - getAuthUser(); } @override Widget build(BuildContext context) { - imagesInfo.add( - ImagesInfo( - imageEn: - 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png', - imageAr: - 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'), - ); - ProjectViewModel projectProvider = Provider.of(context); + projectProvider = Provider.of(context); return BaseView( onModelReady: (model) => model.getCities(), //model.getHospitals(), @@ -102,22 +102,16 @@ class _BloodDonationPageState extends State { height: 12, ), InkWell( - onTap: () => - confirmSelectHospitalDialog(model.CitiesModelList), + onTap: () => confirmSelectHospitalDialog(model.CitiesModelList), //model.hospitals child: Container( padding: EdgeInsets.all(12), width: double.infinity, height: 65, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Theme.of(context).primaryColor), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Texts(getHospitalName(projectProvider, context)), - Icon(Icons.arrow_drop_down) - ], + children: [Texts(getHospitalName(projectProvider, context)), Icon(Icons.arrow_drop_down)], ), ), ), @@ -132,9 +126,7 @@ class _BloodDonationPageState extends State { padding: EdgeInsets.all(12), width: double.infinity, height: 65, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Theme.of(context).primaryColor), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -156,9 +148,7 @@ class _BloodDonationPageState extends State { padding: EdgeInsets.all(12), width: double.infinity, height: 65, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Theme.of(context).primaryColor), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -175,16 +165,14 @@ class _BloodDonationPageState extends State { Row( children: [ Container( - child: Text( - TranslationBase.of(context).viewTermsConditions), + child: Text(TranslationBase.of(context).viewTermsConditions), ), SizedBox( width: MediaQuery.of(context).size.height * 0.10, ), InkWell( onTap: () { - Navigator.of(context) - .push(FadePage(page: UserAgreementPage())); + Navigator.of(context).push(FadePage(page: UserAgreementPage())); }, child: Container( child: Texts( @@ -220,12 +208,8 @@ class _BloodDonationPageState extends State { width: 10, ), Text( - TranslationBase.of(context) - .iAgreeToTheTermsAndConditions, - style: Theme.of(context).textTheme.subtitle1.copyWith( - color: checkedValue - ? Color(0xFFc5272d) - : Colors.black), + TranslationBase.of(context).iAgreeToTheTermsAndConditions, + style: Theme.of(context).textTheme.subtitle1.copyWith(color: checkedValue ? Color(0xFFc5272d) : Colors.black), ), ], ), @@ -247,23 +231,15 @@ class _BloodDonationPageState extends State { builder: (_) => AssetGiffyDialog( title: Text( "", - style: TextStyle( - fontSize: 22.0, - fontWeight: FontWeight.w600), + style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600), ), - image: Image.asset( - 'assets/images/BloodChrt_EN.png'), - buttonCancelText: Text( - TranslationBase.of(context).cancel), + image: Image.asset('assets/images/BloodChrt_EN.png'), + buttonCancelText: Text(TranslationBase.of(context).cancel), buttonCancelColor: Colors.grey, onlyCancelButton: true, )); }, - child: Container( - width: 250, - height: 200, - child: Image.asset( - 'assets/images/BloodChrt_EN.png')), + child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png')), ), ), ), @@ -293,19 +269,15 @@ class _BloodDonationPageState extends State { label: TranslationBase.of(context).save, onTap: () async { if (_selectedHospital == null) { - AppToast.showErrorToast( - message: TranslationBase.of(context).selectCity); + AppToast.showErrorToast(message: TranslationBase.of(context).selectCity); return; } - bloodDetails.city = projectProvider.isArabic - ? _selectedHospital.descriptionN - : _selectedHospital.description; + bloodDetails.city = projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description; bloodDetails.cityCode = _selectedHospital.iD.toString(); bloodDetails.gender = gender == Gender.Male ? 1 : 2; await model.updateBloodGroup(bloodDetails); if (model.state == ViewState.Idle) { - AppToast.showSuccessToast( - message: model.updatedRegisterBloodMessage); + AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage); } else { AppToast.showErrorToast(message: model.error); } @@ -325,8 +297,7 @@ class _BloodDonationPageState extends State { setState(() { if (value == BeneficiaryType.MyAccount) { _fileTextController.text = model.user.patientID.toString(); - advanceModel.depositorName = - model.user.firstName + " " + model.user.lastName; + advanceModel.depositorName = model.user.firstName + " " + model.user.lastName; } else _fileTextController.text = ""; @@ -453,8 +424,7 @@ class _BloodDonationPageState extends State { ); } - void confirmSelectFamilyDialog( - List getAllSharedRecordsByStatusList) { + void confirmSelectFamilyDialog(List getAllSharedRecordsByStatusList) { showDialog( context: context, child: SelectPatientFamilyDialog( @@ -463,8 +433,7 @@ class _BloodDonationPageState extends State { onValueSelected: (value) { setState(() { selectedPatientFamily = value; - _fileTextController.text = - selectedPatientFamily.patientID.toString(); + _fileTextController.text = selectedPatientFamily.patientID.toString(); advanceModel.depositorName = value.patientName; }); }, @@ -538,12 +507,9 @@ class _BloodDonationPageState extends State { return "Select Blood Type"; //TranslationBase.of(context).selectBeneficiary; } - String getHospitalName( - ProjectViewModel projectProvider, BuildContext context) { + String getHospitalName(ProjectViewModel projectProvider, BuildContext context) { if (_selectedHospital != null) - return projectProvider.isArabic - ? _selectedHospital.descriptionN - : _selectedHospital.description; + return projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description; else return TranslationBase.of(context).selectCity; // return List_BloodGroupDetailsModel.fromJson(0).city.toString();//"Select City";//TranslationBase.of(context).selectHospital; @@ -558,8 +524,7 @@ class _BloodDonationPageState extends State { getAuthUser() async { if (await this.sharedPref.getObject(USER_PROFILE) != null) { - var data = AuthenticatedUser.fromJson( - await this.sharedPref.getObject(USER_PROFILE)); + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); setState(() { authUser = data; }); diff --git a/lib/pages/Blood/confirm_payment_page.dart b/lib/pages/Blood/confirm_payment_page.dart index c384b7b5..f3f7bffb 100644 --- a/lib/pages/Blood/confirm_payment_page.dart +++ b/lib/pages/Blood/confirm_payment_page.dart @@ -218,7 +218,9 @@ class ConfirmPaymentPage extends StatelessWidget { authenticatedUser.patientID, authenticatedUser, browser, - false); + false, + null, + null); } onBrowserLoadStart(String url) { diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 26a5b0fe..fb8b1ac9 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -640,6 +640,8 @@ class _BookSuccessState extends State { authenticatedUser, widget.browser, widget.patientShareResponse.isLiveCareAppointment, + null, + null, widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentNo, widget.patientShareResponse.clinicID, diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart index 614189e0..0fbfa624 100644 --- a/lib/pages/BookAppointment/DentalComplaints.dart +++ b/lib/pages/BookAppointment/DentalComplaints.dart @@ -1,11 +1,18 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DentalProceduresModel.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.dart'; -import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; @@ -22,12 +29,18 @@ class _DentalComplaintsState extends State { List complaintsList = []; AppSharedPreferences sharedPref = AppSharedPreferences(); bool isDataLoaded = false; + bool hasDentalPlan = false; var languageID; + int totalAppointmentTime = 0; + + List doctorsList = []; + + DentalProceduresModel dentalProceduresModel; + List patientDoctorAppointmentListHospital = List(); @override void initState() { - WidgetsBinding.instance - .addPostFrameCallback((_) => getChiefComplaintsList()); + WidgetsBinding.instance.addPostFrameCallback((_) => checkIfHasDentalPlan()); super.initState(); } @@ -38,37 +51,206 @@ class _DentalComplaintsState extends State { appBarTitle: "Symptoms", body: Container( margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), - child: ListView.builder( - itemCount: complaintsList.length, - itemBuilder: (BuildContext context, int index) { - return Container( - margin: EdgeInsets.only(bottom: 10.0), - child: DentalComplaintCard( - listDentalChiefComplain: complaintsList[index], - languageID: languageID, + child: !hasDentalPlan + ? ListView.builder( + itemCount: complaintsList.length, + itemBuilder: (BuildContext context, int index) { + return Container( + margin: EdgeInsets.only(bottom: 10.0), + child: DentalComplaintCard( + listDentalChiefComplain: complaintsList[index], + languageID: languageID, + ), + ); + }, + ) + : Container( + child: SingleChildScrollView( + child: Column( + children: [ + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(TranslationBase.of(context).dentalProcedureList, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold, letterSpacing: 0.5)), + ), + Container( + margin: EdgeInsets.only(top: 20.0), + child: Table( + children: getProceduresData(), + ), + ), + ...List.generate( + patientDoctorAppointmentListHospital.length, + (index) => AppExpandableNotifier( + isExpand: true, + title: patientDoctorAppointmentListHospital[index].filterName + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km, + bodyWidget: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList.map((doctor) { + return DoctorView( + doctor: doctor, + isLiveCareAppointment: false, + ); + }).toList(), + )), + ) + ], + ), ), - ); - }, + ), + ), + ); + } + + List getProceduresData() { + List tableRow = []; + + tableRow.add( + TableRow( + children: [ + Container( + child: Container( + child: Center( + child: Text(TranslationBase.of(context).procedureName, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)), + ), + ), + ), + Container( + child: Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Center( + child: Text(TranslationBase.of(context).timeNeeded, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)), + ), + ), + ), + ], + ), + ); + dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) { + tableRow.add(TableRow(children: [ + Container( + child: Container( + child: Center( + child: Text(procedure.procedureName, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 14.0)), + ), + ), ), + Container( + child: Container( + child: Center( + child: Text(procedure.neededTime.toString() + " mins", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 14.0)), + ), + ), + ), + ])); + }); + tableRow.add( + TableRow( + children: [ + Container( + child: Container( + child: Center( + child: Text(TranslationBase.of(context).totalTimeNeeded, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)), + ), + ), + ), + Container( + child: Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Center( + child: Text(totalAppointmentTime.toString() + " mins", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)), + ), + ), + ), + ], ), ); + return tableRow; } getLanguageID() async { languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); } + checkIfHasDentalPlan() { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.checkIfHasDentalPlan(widget.searchInfo.ProjectID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (res['List_IsPatientHasOnGoingEstimation'].length != 0) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).continuePlan, + okText: TranslationBase.of(context).yes, + cancelText: TranslationBase.of(context).no, + okFunction: () => {Navigator.of(context).pop(), continueDentalPlan()}, + cancelFunction: () => {getChiefComplaintsList()}); + dialog.showAlertDialog(context); + } else { + getChiefComplaintsList(); + } + } + }).catchError((err) { + print(err); + }); + } + + continueDentalPlan() { + DoctorsListService service = new DoctorsListService(); + + GifLoaderDialogUtils.showMyDialog(context); + int appoTime = 0; + service.getDoctorsList(int.parse("17"), widget.searchInfo.ProjectID, false, context, isContinueDentalPlan: true).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + print(res['List_IsPatientHasOnGoingEstimation']); + dentalProceduresModel = DentalProceduresModel.fromJson(res); + dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) { + appoTime += procedure.neededTime; + }); + setState(() { + hasDentalPlan = true; + totalAppointmentTime = appoTime; + }); + + if (res['DoctorList'].length != 0) { + doctorsList.clear(); + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + doctorsList.forEach((element) { + List doctorByHospital = patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element); + } else { + patientDoctorAppointmentListHospital + .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + } + }); + } else {} + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + getChiefComplaintsList() { GifLoaderDialogUtils.showMyDialog(context); getLanguageID(); ClinicListService service = new ClinicListService(); - service - .getChiefComplaintsList( - widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context) - .then((res) { + service.getChiefComplaintsList(widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { - print(res['List_DentalChiefComplain']); setState(() { res['List_DentalChiefComplain'].forEach((v) { complaintsList.add(new ListDentalChiefComplain.fromJson(v)); diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index 949f2c44..9c52adef 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -103,14 +103,26 @@ class _DoctorProfileState extends State child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - margin: EdgeInsets.only(top: 20.0), - alignment: Alignment.center, - child: ClipRRect( - borderRadius: BorderRadius.circular(100.0), - child: Image.network(widget.doctor.doctorImageURL, - fit: BoxFit.fill, height: 120.0, width: 120.0), - ), + Row( + children: [ + Container( + margin: EdgeInsets.only(top: 20.0), + alignment: Alignment.center, + child: ClipRRect( + borderRadius: BorderRadius.circular(100.0), + child: Image.network(widget.doctor.doctorImageURL, + fit: BoxFit.fill, height: 120.0, width: 120.0), + ), + ), + Container( + margin: EdgeInsets.only(top: 20.0), + alignment: Alignment.center, + child: ClipRRect( + borderRadius: BorderRadius.circular(100.0), + child: Image.asset('assets/images/drSchedul.png'), + ), + ) + ], ), Container( margin: EdgeInsets.only(top: 10.0), @@ -178,14 +190,11 @@ class _DoctorProfileState extends State )), ), ), - - if(widget.docProfileList.isDoctorHasPrePostImages == true) + if (widget.docProfileList.isDoctorHasPrePostImages == true) Container( height: 50, alignment: Alignment.center, - child: prePostImagesButton(context) - ), - + child: prePostImagesButton(context)), Container( child: Divider( color: Colors.grey[500], @@ -234,7 +243,7 @@ class _DoctorProfileState extends State ); } - Widget prePostImagesButton(BuildContext context){ + Widget prePostImagesButton(BuildContext context) { return Padding( padding: const EdgeInsets.all(10), child: MaterialButton( @@ -242,7 +251,10 @@ class _DoctorProfileState extends State color: Theme.of(context).appBarTheme.color, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), onPressed: () => openDoctorPrePostImages(), - child: Text(TranslationBase.of(context).beforeAfterImages, style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1),), + child: Text( + TranslationBase.of(context).beforeAfterImages, + style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1), + ), ), ); } @@ -287,23 +299,24 @@ class _DoctorProfileState extends State }); } - openDoctorPrePostImages(){ + openDoctorPrePostImages() { GifLoaderDialogUtils.showMyDialog(context); - DoctorsListService().getDoctorPrePostImages(widget.docProfileList, context).then((images) { + DoctorsListService() + .getDoctorPrePostImages(widget.docProfileList, context) + .then((images) { GifLoaderDialogUtils.hideDialog(context); showDialog( - context: context, barrierDismissible: true, - builder: (ctx){ + context: context, + barrierDismissible: true, + builder: (ctx) { return DoctorPostPreImagesContent(doctorPrePostImages: images); - } - ); + }); // Navigator.push( // context, // FadePage( // page: DoctorPostPreImagesPage(doctorPrePostImages: images,) // ) // ); - }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: err); @@ -612,6 +625,4 @@ class _DoctorProfileState extends State selectedDate: DocAvailableAppointments.selectedDate, selectedTime: DocAvailableAppointments.selectedTime))); } - - } diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index cd8bb789..f5c0f81e 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -21,9 +21,11 @@ class DocAvailableAppointments extends StatefulWidget { static String selectedDate; static String selectedTime; bool isLiveCareAppointment; - + final dynamic doctorSchedule; DocAvailableAppointments( - {@required this.doctor, @required this.isLiveCareAppointment}); + {@required this.doctor, + this.doctorSchedule, + @required this.isLiveCareAppointment}); @override _DocAvailableAppointmentsState createState() => @@ -67,6 +69,7 @@ class _DocAvailableAppointmentsState extends State WidgetsBinding.instance.addPostFrameCallback((_) async { getCurrentLanguage(); + if (widget.isLiveCareAppointment) getDoctorScheduledFreeSlots(context, widget.doctor); else { @@ -107,9 +110,7 @@ class _DocAvailableAppointmentsState extends State } void _onCalendarCreated( - DateTime first, DateTime last, CalendarFormat format) { - print('CALLBACK: _onCalendarCreated'); - } + DateTime first, DateTime last, CalendarFormat format) {} @override Widget build(BuildContext context) { @@ -350,9 +351,24 @@ class _DocAvailableAppointmentsState extends State freeSlotsResponse = res['FreeTimeSlots']; print("res['FreeTimeSlots']"); print(res['FreeTimeSlots'].length); - _getJSONSlots().then((value) => { - setState(() => {_events.clear(), _events = value}) - }); + + _getJSONSlots().then((value) { + setState(() => { + _events.clear(), + _events = value, + if (widget.doctorSchedule != null) + { + _calendarController.setSelectedDay( + DateUtil.convertStringToDate( + widget.doctorSchedule['Date']), + isProgrammatic: true), + _onDaySelected( + DateUtil.convertStringToDate( + widget.doctorSchedule['Date']), + List()) + } + }); + }); } else { DocAvailableAppointments.areAppointmentsAvailable = false; } diff --git a/lib/pages/BookAppointment/components/LiveCareBookAppointment.dart b/lib/pages/BookAppointment/components/LiveCareBookAppointment.dart new file mode 100644 index 00000000..ee3e7b4a --- /dev/null +++ b/lib/pages/BookAppointment/components/LiveCareBookAppointment.dart @@ -0,0 +1,355 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class LiveCareBookAppointment extends StatefulWidget { + final dynamic clinicName; + final dynamic liveCareClinicID; + final dynamic liveCareServiceID; + + LiveCareBookAppointment( + {this.clinicName, this.liveCareClinicID, this.liveCareServiceID}); + + @override + _LiveCareBookAppointmentState createState() => + _LiveCareBookAppointmentState(); +} + +class _LiveCareBookAppointmentState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).bookAppo, + isShowAppBar: true, + isShowDecPage: false, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.all(10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: EdgeInsets.all(5.0), + child: Text(TranslationBase.of(context).clinicAcceptLivecare, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + letterSpacing: 0.5)), + ), + Container( + margin: EdgeInsets.all(15.0), + padding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + decoration: BoxDecoration( + color: Color(0xff20bc44), + borderRadius: BorderRadius.all(Radius.circular(8.0))), + child: Text(TranslationBase.of(context).livecareModalTop, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 16.0, + fontWeight: FontWeight.w600, + letterSpacing: 0.5)), + ), + Container( + margin: EdgeInsets.all(15.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/liveCare_mobile_care.svg", + width: 150.0), + ), + Container( + margin: EdgeInsets.only(left: 10.0, right: 10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(bottom: 7.0), + child: Text( + TranslationBase.of(context).whyLivecare, + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w600, + letterSpacing: 1.0, + color: Colors.black)), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint1, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint5, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint2, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint3, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: + EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context) + .livecarePoint4, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + ], + ), + ) + ], + ), + ), + Container( + child: Text(TranslationBase.of(context).livecareSummary, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + Container( + child: InkWell( + onTap: () { + sharedPref.setString( + LIVECARE_CLINIC_DATA, + widget.clinicName + + "-" + + widget.liveCareClinicID + + "-" + + widget.liveCareServiceID); + Navigator.pop(context, "livecare"); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.grey[700], + borderRadius: + BorderRadius.all(Radius.circular(10.0))), + margin: EdgeInsets.only(top: 10.0), + padding: EdgeInsets.all(10.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(left: 10.0, right: 10.0), + child: SvgPicture.asset( + "assets/images/new-design/liveCare_logo_icon_white.svg", + width: 70), + ), + Container( + width: MediaQuery.of(context).size.width * 0.58, + margin: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB( + 10.0, 0.0, 10.0, 0.0), + child: Text( + TranslationBase.of(context) + .bookImmediateLivecare, + overflow: TextOverflow.clip, + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 16.0, + letterSpacing: 0.7, + color: Colors.white)), + ), + Container( + margin: + EdgeInsets.only(top: 5.0, left: 10.0), + child: Text( + TranslationBase.of(context) + .bookVideoLivecare2, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 13.0, + color: Colors.white)), + ) + ], + ), + ), + ], + )), + ), + ), + Container( + child: InkWell( + onTap: () { + Navigator.pop(context, "schedule"); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.grey[700], + borderRadius: + BorderRadius.all(Radius.circular(10.0))), + margin: EdgeInsets.only(top: 10.0), + padding: EdgeInsets.all(10.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(left: 10.0, right: 10.0), + child: Image.asset( + "assets/images/new-design/doctor_white.png", + width: 50), + ), + Container( + width: MediaQuery.of(context).size.width * 0.58, + margin: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB( + 28.0, 0.0, 28.0, 0.0), + child: Text( + TranslationBase.of(context).noThankyou, + overflow: TextOverflow.clip, + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 16.0, + letterSpacing: 0.7, + color: Colors.white)), + ), + Container( + margin: EdgeInsets.only( + top: 5.0, left: 28.0, right: 28.0), + child: Text( + TranslationBase.of(context).visitClinic, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 13.0, + color: Colors.white)), + ) + ], + ), + ), + ], + )), + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: InkWell( + onTap: () { + Navigator.pop(context, "false"); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Text(TranslationBase.of(context).cancel, + style: TextStyle( + fontSize: 16.0, + letterSpacing: 0.5, + color: Color(0xffc5272d))), + ], + ), + ), + ), + ], + ), + ), + )); + } +} diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 63c5e8e1..fb646728 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -3,10 +3,13 @@ import "dart:collection"; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; @@ -14,6 +17,9 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +import 'LiveCareBookAppointment.dart'; class SearchByClinic extends StatefulWidget { final List clnicIds; @@ -36,6 +42,11 @@ class _SearchByClinicState extends State { bool isLoaded = false; bool isProjectLoaded = false; + ListClinicCentralized selectedClinic; + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + @override void initState() { WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); @@ -65,13 +76,10 @@ class _SearchByClinicState extends State { }); }, ), - Text(TranslationBase.of(context).nearestAppo, - style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)), + Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)), ], ), - widget.clnicIds != null && - widget.clnicIds.length > 1 && - isLoaded == true + widget.clnicIds != null && widget.clnicIds.length > 1 && isLoaded == true ? Column( crossAxisAlignment: CrossAxisAlignment.start, children: clinicsList.map((result) { @@ -84,14 +92,10 @@ class _SearchByClinicState extends State { if (!isDentalSelectedAndSupported()) { projectDropdownValue = ""; getDoctorsList(context); - } + } else {} }); }, - title: Text(result.clinicDescription, - style: TextStyle( - fontSize: 14.0, - color: Colors.grey[700], - letterSpacing: 1.0)))); + title: Text(result.clinicDescription, style: TextStyle(fontSize: 14.0, color: Colors.grey[700], letterSpacing: 1.0)))); }).toList()) : Container( height: 60.0, @@ -112,23 +116,28 @@ class _SearchByClinicState extends State { value: dropdownValue, items: clinicsList.map((item) { return new DropdownMenuItem( - value: item.clinicID.toString(), - child: new Text(item.clinicDescription), + value: item.clinicID.toString() + "-" + item.isLiveCareClinicAndOnline.toString() + "-" + item.liveCareClinicID.toString() + "-" + item.liveCareServiceID.toString(), + child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + Text(item.clinicDescription), + item.isLiveCareClinicAndOnline ? SvgPicture.asset('assets/images/new-design/video_icon_green_right.svg', height: 15, width: 15, fit: BoxFit.cover) : Container(), + ]), ); }).toList(), onChanged: (newValue) { setState(() { + print(newValue); dropdownValue = newValue; if (!isDentalSelectedAndSupported() && !nearestAppo) { projectDropdownValue = ""; getDoctorsList(context); + } else { + print("Dental"); } }); }, ), )), - isDentalSelectedAndSupported() == true || - (nearestAppo && isProjectLoaded) + isDentalSelectedAndSupported() == true || (nearestAppo && isProjectLoaded) ? Container( height: 60.0, decoration: BoxDecoration( @@ -167,9 +176,10 @@ class _SearchByClinicState extends State { } bool isDentalSelectedAndSupported() { - return dropdownValue != "" && - (dropdownValue == "17") && - isMobileAppDentalAllow; + if (dropdownValue != null) + return dropdownValue != "" && (dropdownValue.split("-")[0] == "17") && isMobileAppDentalAllow; + else + return false; } getClinicsList() { @@ -215,85 +225,87 @@ class _SearchByClinicState extends State { // TODO Mosa_REMARk to come back later getDoctorsList(BuildContext context) { - GifLoaderDialogUtils.showMyDialog(context); SearchInfo searchInfo = new SearchInfo(); - if (dropdownValue == "17") { + if (dropdownValue.split("-")[0] == "17") { searchInfo.ProjectID = int.parse(projectDropdownValue); - searchInfo.ClinicID = int.parse(dropdownValue); + searchInfo.ClinicID = int.parse(dropdownValue.split("-")[0]); searchInfo.date = DateTime.now(); - GifLoaderDialogUtils.hideDialog(context); navigateToDentalComplaints(context, searchInfo); + } else if (dropdownValue.split("-")[1] == "true" + // && authProvider.isLogin && + // authUser.patientType == 1 + ) { + Navigator.push( + context, + FadePage( + page: LiveCareBookAppointment(clinicName: "Family Medicine", liveCareClinicID: dropdownValue.split("-")[2], liveCareServiceID: dropdownValue.split("-")[3]), + ), + ).then((value) { + print(value); + if (value == "false") dropdownValue = ""; + if (value == "livecare") { + Navigator.push(context, FadePage(page: LiveCareHome())); + } + if (value == "schedule") { + callDoctorsSearchAPI(); + } + }); } else { - List doctorsList = []; - List arr = []; - List arrDistance = []; - List result; - int numAll; - List _patientDoctorAppointmentListHospital = - List(); + callDoctorsSearchAPI(); + } + } - DoctorsListService service = new DoctorsListService(); - service - .getDoctorsList( - int.parse(dropdownValue), - projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, - nearestAppo, - context) - .then((res) { - GifLoaderDialogUtils.hideDialog(context); - if (res['MessageStatus'] == 1) { - setState(() { - if (res['DoctorList'].length != 0) { - // print(res['DoctorList']); - doctorsList.clear(); - res['DoctorList'].forEach((v) { - doctorsList.add(new DoctorList.fromJson(v)); - }); - doctorsList.forEach((element) { - List doctorByHospital = - _patientDoctorAppointmentListHospital - .where( - (elementClinic) => - elementClinic.filterName == element.projectName, - ) - .toList(); + callDoctorsSearchAPI() { + GifLoaderDialogUtils.showMyDialog(context); + List doctorsList = []; + List arr = []; + List arrDistance = []; + List result; + int numAll; + List _patientDoctorAppointmentListHospital = List(); - if (doctorByHospital.length != 0) { - _patientDoctorAppointmentListHospital[ - _patientDoctorAppointmentListHospital - .indexOf(doctorByHospital[0])] - .patientDoctorAppointmentList - .add(element); - } else { - _patientDoctorAppointmentListHospital.add( - PatientDoctorAppointmentList( - filterName: element.projectName, - distanceInKMs: - element.projectDistanceInKiloMeters.toString(), - patientDoctorAppointment: element)); - } - }); - } else {} - }); + DoctorsListService service = new DoctorsListService(); + service.getDoctorsList(int.parse(dropdownValue.split("-")[0]), projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['DoctorList'].length != 0) { + doctorsList.clear(); + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); - result = LinkedHashSet.from(arr).toList(); - numAll = result.length; - navigateToSearchResults( - context, doctorsList, _patientDoctorAppointmentListHospital); - } else { - AppToast.showErrorToast(message: res['ErrorEndUserMessage']); - } - }).catchError((err) { - GifLoaderDialogUtils.hideDialog(context); - print(err); - AppToast.showErrorToast(message: err); - }); - } + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element); + } else { + _patientDoctorAppointmentListHospital + .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + } + }); + } else {} + }); + + result = LinkedHashSet.from(arr).toList(); + numAll = result.length; + navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); } - Future navigateToDentalComplaints( - BuildContext context, SearchInfo searchInfo) async { + Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async { Navigator.push( context, FadePage( @@ -302,20 +314,9 @@ class _SearchByClinicState extends State { ); } - Future navigateToSearchResults( - context, - List docList, - List - patientDoctorAppointmentListHospital) async { + Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { isProjectLoaded = false; - Navigator.push( - context, - FadePage( - page: SearchResults( - isLiveCareAppointment: false, - doctorsList: docList, - patientDoctorAppointmentListHospital: - patientDoctorAppointmentListHospital))) + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))) .then((value) { getProjectsList(); }); @@ -324,9 +325,7 @@ class _SearchByClinicState extends State { filterClinic() { setState(() { if (widget.clnicIds != null && widget.clnicIds.length > 0) { - clinicsList = clinicsList - .where((i) => widget.clnicIds.indexOf(i.clinicID) > -1) - .toList(); + clinicsList = clinicsList.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1).toList(); isLoaded = true; } }); diff --git a/lib/pages/BookAppointment/doctor_post_pre_images_page.dart b/lib/pages/BookAppointment/doctor_post_pre_images_page.dart index b97d58ac..85e37308 100644 --- a/lib/pages/BookAppointment/doctor_post_pre_images_page.dart +++ b/lib/pages/BookAppointment/doctor_post_pre_images_page.dart @@ -1,67 +1,10 @@ -import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; import 'package:diplomaticquarterapp/models/Appointments/doctor_pre_post_image.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -class DoctorPostPreImagesPage extends StatefulWidget{ - final DoctorPrePostImages doctorPrePostImages; - - const DoctorPostPreImagesPage({this.doctorPrePostImages}); - - @override - State createState() => DoctorPostPreImagesPageState(); -} - -class DoctorPostPreImagesPageState extends State{ - - @override - Widget build(BuildContext context) { - var images = widget.doctorPrePostImages; - return AppScaffold( - appBarTitle: TranslationBase.of(context).beforeAfterImages, - isShowAppBar: true, - isShowDecPage: false, - body: Padding( - padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 10), - child: Row( - children: [ - Expanded( - child: Column( - children: [ - Text("Before Image", style: TextStyle(color: Colors.black, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),), - Image.memory(images.getPreBytes(), errorBuilder: (ctx,err, trace){ - return Container( - color: Colors.grey.withOpacity(0.25), - ); - },) - ], - ) - ), - Divider(color: Colors.grey.withOpacity(0.5)), - Expanded( - child: Column( - children: [ - Text("After Image", style: TextStyle(color: Colors.black, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),), - Image.memory(images.getPostBytes(),errorBuilder: (ctx,err, trace){ - return Container( - color: Colors.grey.withOpacity(0.25), - ); - },) - ], - ) - ) - ], - ), - ) - ); - } - -} - - -class DoctorPostPreImagesContent extends StatefulWidget{ +class DoctorPostPreImagesContent extends StatefulWidget { final DoctorPrePostImages doctorPrePostImages; const DoctorPostPreImagesContent({this.doctorPrePostImages}); @@ -70,14 +13,13 @@ class DoctorPostPreImagesContent extends StatefulWidget{ DoctorPostPreImagesContentState createState() => DoctorPostPreImagesContentState(); } -class DoctorPostPreImagesContentState extends State{ - +class DoctorPostPreImagesContentState extends State { @override Widget build(BuildContext context) { var images = widget.doctorPrePostImages; - return Material( - color: Colors.transparent, - child: Center( + return Center( + child: Material( + color: Colors.transparent, child: Column( mainAxisSize: MainAxisSize.min, children: [ @@ -85,31 +27,45 @@ class DoctorPostPreImagesContentState extends State{ children: [ Expanded( child: Column( - children: [ - Text("Before", style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),), - SizedBox(height: 10,), - Image.memory(images.getPreBytes(), errorBuilder: (ctx,err, trace){ - return Container( - color: Colors.grey.withOpacity(0.25), - ); - },) - ], + children: [ + Text( + "Before", + style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1), + ), + SizedBox( + height: 10, + ), + Image.memory( + images.getPreBytes(), + errorBuilder: (ctx, err, trace) { + return Container( + color: Colors.grey.withOpacity(0.25), + ); + }, ) - ), + ], + )), Divider(color: Colors.grey.withOpacity(0.5)), Expanded( child: Column( - children: [ - Text("After", style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),), - SizedBox(height: 10,), - Image.memory(images.getPostBytes(),errorBuilder: (ctx,err, trace){ - return Container( - color: Colors.grey.withOpacity(0.25), - ); - },) - ], + children: [ + Text( + "After", + style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1), + ), + SizedBox( + height: 10, + ), + Image.memory( + images.getPostBytes(), + errorBuilder: (ctx, err, trace) { + return Container( + color: Colors.grey.withOpacity(0.25), + ); + }, ) - ) + ], + )) ], ), ], @@ -117,5 +73,4 @@ class DoctorPostPreImagesContentState extends State{ ), ); } - -} \ No newline at end of file +} diff --git a/lib/pages/ChildVaccines/child_vaccines_page.dart b/lib/pages/ChildVaccines/child_vaccines_page.dart index 38c6b5af..f70fe64d 100644 --- a/lib/pages/ChildVaccines/child_vaccines_page.dart +++ b/lib/pages/ChildVaccines/child_vaccines_page.dart @@ -1,6 +1,5 @@ -import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; @@ -18,8 +17,7 @@ class ChildVaccinesPage extends StatefulWidget { _ChildVaccinesPageState createState() => _ChildVaccinesPageState(); } -class _ChildVaccinesPageState extends State - with SingleTickerProviderStateMixin { +class _ChildVaccinesPageState extends State with SingleTickerProviderStateMixin { TextEditingController titleController = TextEditingController(); var checkedValue = false; String addEmail = ""; @@ -30,9 +28,17 @@ class _ChildVaccinesPageState extends State onModelReady: (model) => model.getUserInformationRequestOrders(), builder: (_, model, w) => AppScaffold( isShowAppBar: true, - baseViewModel: model, + isShowDecPage: true, + description: TranslationBase.of(context).childVaccineInfo, + imagesInfo: [ + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/0.png', + imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/0.png'), + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/1.png', + imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/1.png') + ], appBarTitle: TranslationBase.of(context).vaccination, - //TranslationBase.of(context).advancePayment, body: SingleChildScrollView( physics: ScrollPhysics(), child: Column( @@ -80,16 +86,14 @@ class _ChildVaccinesPageState extends State margin: EdgeInsets.only(left: 10, right: 10, top: 15), child: TextFields( fillColor: Colors.red, - hintText: model.user.emailAddress, + hintText: model.user != null ? model.user.emailAddress : "", controller: titleController, fontSize: 20, hintColor: Colors.black, fontWeight: FontWeight.w600, onChanged: (text) { addEmail = text; - model.user.emailAddress == addEmail - ? checkedValue = false - : checkedValue = true; + model.user.emailAddress == addEmail ? checkedValue = false : checkedValue = true; }, validator: (value) { if (value == null) { @@ -119,8 +123,7 @@ class _ChildVaccinesPageState extends State // onTap: () { model.user.emailAddress = addEmail.toString(); - AppToast.showSuccessToast( - message: TranslationBase.of(context).updateEmailMsg); + AppToast.showSuccessToast(message: TranslationBase.of(context).updateEmailMsg); // bloodDetails.city=_selectedHospital.toString(); // bloodDetails. diff --git a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart new file mode 100644 index 00000000..0f07081f --- /dev/null +++ b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart @@ -0,0 +1,169 @@ +import 'dart:convert'; + +import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart'; +import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart'; +import 'package:diplomaticquarterapp/pages/medical/labs/passport_update_page.dart'; +import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'covid-payment-details.dart'; + +class CovidDirveThruQuestions extends StatefulWidget { + final String projectId; + final List proceduresList; + + CovidDirveThruQuestions({@required this.projectId, @required this.proceduresList}); + + @override + CovidDirveThruQuestionsState createState() => CovidDirveThruQuestionsState(); +} + +class CovidDirveThruQuestionsState extends State { + List qa; + + @override + void initState() { + super.initState(); + qa = getQuestionsFromJson(); + } + + TranslationBase localize; + + @override + Widget build(BuildContext context) { + localize = TranslationBase.of(context); + var isArabic = localize.isArabic(); + return AppScaffold( + appBarTitle: TranslationBase.of(context).covidTest, + isShowAppBar: true, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(20), + child: Text(localize.covidSelectProcedure, style: TextStyle(fontSize: 17, letterSpacing: 1, fontWeight: FontWeight.bold)), + ), + Expanded( + child: ListView.separated( + padding: EdgeInsets.symmetric(horizontal: 20), + itemCount: qa.length, + itemBuilder: (ctx, idx) { + var obj = qa[idx]; + var qtext = isArabic ? obj["questionAR"] : obj["questionEN"]; + + return Padding( + padding: const EdgeInsets.symmetric(vertical: 10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(qtext, style: TextStyle(fontSize: 15, letterSpacing: 1.5)), + Row( + children: [ + Radio( + value: 1, + groupValue: obj["ans"], + onChanged: (newValue) { + setState(() { + obj["ans"] = newValue; + }); + }), + Text(localize.yes), + ], + ), + Row( + children: [ + Radio( + value: 0, + groupValue: obj["ans"], + onChanged: (newValue) { + setState(() { + obj["ans"] = newValue; + }); + }), + Text(localize.no), + ], + ) + ], + ), + ); + }, + separatorBuilder: (ctx, idx) => Divider(height: 0.25, color: Colors.grey.withOpacity(0.5)), + )), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), + child: FractionallySizedBox( + widthFactor: 1, + child: MaterialButton( + height: 50, + color: Theme.of(context).appBarTheme.color, + disabledColor: Theme.of(context).appBarTheme.color.withOpacity(0.25), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), + child: Text( + localize.next, + style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1), + ), + onPressed: next), + ), + ), + ], + )); + } + + next() async { + bool all = true; + qa.forEach((element) { + all = all && (element["ans"] == 1 || element["ans"] == 0); + }); + if (all) if (qa[0]["ans"] == 1) { + openPassportUpdatePage(); + } else { + getPaymentInfo(context, widget.projectId); + } + else + AppToast.showErrorToast(message: localize.pleaseSelectAllQuestionToContinue); + } + + openPassportUpdatePage() { + Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) { + print(value); + if(value != null && value == true) { + getPaymentInfo(context, widget.projectId); + } + }); + } + + List getQuestionsFromJson() { + var questionsJson = """ + [{"id":1,"questionEN":"Is the test intended for travel?","questionAR":"هل تجري التحليل بغرض السفر؟","ans":2},{"id":2,"questionEN":"Coming from outside KSA within last 2 weeks?","questionAR":"هل قدمت من خارج المملكة خلال الأسبوعين الماضيين؟","ans":2},{"id":3,"questionEN":"Do you currently have fever?","questionAR":"هل تعاني حاليا من حرارة؟","ans":2},{"id":4,"questionEN":"Did you have fever in last 2 weeks?","questionAR":"هل عانيت من حرارة في الأسبوعين الماضيين؟","ans":2},{"id":5,"questionEN":"Do you have a sore throat?","questionAR":"هل لديك التهاب في الحلق؟","ans":2},{"id":6,"questionEN":"Do you have a runny nose?","questionAR":"هل لديك سيلان بالأنف؟"},{"id":7,"questionEN":"Do you have a cough?","questionAR":"هل لديك سعال؟","ans":2},{"id":8,"questionEN":"Do you have shortness of breath?","questionAR":"هل تعانين من ضيق في التنفس؟","ans":2},{"id":9,"questionEN":"Do you have nausea?","questionAR":"هل تعانين من غثيان؟","ans":2},{"id":10,"questionEN":"Do you have vomiting?","questionAR":"هل تعاني من القيء؟","ans":2},{"id":11,"questionEN":"Do you have a headache?","questionAR":"هل تعاني من صداع في الرأس؟","ans":2},{"id":12,"questionEN":"Do you have muscle pain?","questionAR":"هل تعانين من آلام عضلية؟","ans":2},{"id":13,"questionEN":"Do you have joint pain?","questionAR":"هل تعانين من آلام المفاصل؟","ans":2},{"id":14,"questionEN":"Do you have diarrhea?","questionAR":"هل لديك اسهال؟","ans":2}]"""; + var map = json.decode(questionsJson) as List; + return map; + } + + getPaymentInfo(BuildContext context, String projectID) { + CovidDriveThruService service = new CovidDriveThruService(); + CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse(); + GifLoaderDialogUtils.showMyDialog(context); + service.getCovidPaymentInformation(context, int.parse(projectID), widget.proceduresList[0].procedureID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); + Navigator.push( + context, + FadePage( + page: CovidPaymentDetails( + covidPaymentInfoResponse: covidPaymentInfoResponse, + projectID: int.parse(projectID), + proceduresList: widget.proceduresList, + ))); + } else {} + }).catchError((err) { + print(err); + }); + } +} diff --git a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart index 31ea3e93..4040abf5 100644 --- a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart +++ b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart @@ -14,7 +14,8 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:maps_launcher/maps_launcher.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; + +import 'covid-dirvethru-questions.dart'; class CovidDrivethruLocation extends StatefulWidget { @override @@ -32,18 +33,14 @@ class _CovidDrivethruLocationState extends State { String projectID = ""; List imagesInfo = List(); + DriveThroughTestingCenterModel selectedProject; + ProjectViewModel projectViewModel; @override void initState() { - WidgetsBinding.instance - .addPostFrameCallback((_) => getProjectsList(context)); - imagesInfo.add( - ImagesInfo( - imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', - imageAr: - 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'), + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'), ); WidgetsBinding.instance.addPostFrameCallback((_) { if (projectViewModel.isLogin) { @@ -57,9 +54,7 @@ class _CovidDrivethruLocationState extends State { @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); - imagesInfo.add(ImagesInfo( - imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', - imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png')); + imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png')); return AppScaffold( appBarTitle: TranslationBase.of(context).covidTest, isShowAppBar: true, @@ -73,31 +68,17 @@ class _CovidDrivethruLocationState extends State { mainAxisSize: MainAxisSize.max, children: [ Container( - alignment: projectViewModel.isArabic - ? Alignment.centerRight - : Alignment.centerLeft, - child: Text(TranslationBase.of(context).resultHeader, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 22.0, - color: Colors.black)), + alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft, + child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 22.0, color: Colors.black)), ), Container( margin: EdgeInsets.only(top: 10.0), - child: Text(TranslationBase.of(context).covidInfo, - style: TextStyle(fontSize: 16.0, color: Colors.black)), + child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 16.0, color: Colors.black)), ), Container( margin: EdgeInsets.only(top: 20.0), - alignment: projectViewModel.isArabic - ? Alignment.centerRight - : Alignment.centerLeft, - child: Text(TranslationBase.of(context).selectLocation, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 18.0, - letterSpacing: 0.8, - color: Colors.grey[700])), + alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft, + child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.grey[700])), ), Container( height: 60.0, @@ -113,18 +94,18 @@ class _CovidDrivethruLocationState extends State { width: MediaQuery.of(context).size.width, margin: EdgeInsets.only(top: 15.0), child: DropdownButtonHideUnderline( - child: DropdownButton( + child: DropdownButton( hint: new Text(TranslationBase.of(context).selectAddress), - value: projectDropdownValue, - items: projectsList.map((item) { - return new DropdownMenuItem( - value: item.iD.toString(), + value: selectedProject, + items: projectsList.map((DriveThroughTestingCenterModel item) { + return new DropdownMenuItem( + value: item, child: new Text(item.projectName), ); }).toList(), onChanged: (newValue) { setState(() { - projectDropdownValue = newValue; + selectedProject = newValue; setProjectLocation(newValue); }); }, @@ -133,15 +114,8 @@ class _CovidDrivethruLocationState extends State { isLocationSelected ? Container( margin: EdgeInsets.only(top: 15.0), - alignment: projectViewModel.isArabic - ? Alignment.centerRight - : Alignment.centerLeft, - child: Text(TranslationBase.of(context).selectLocation, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 18.0, - letterSpacing: 0.8, - color: Colors.black)), + alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft, + child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.black)), ) : Container(), isLocationSelected @@ -150,16 +124,15 @@ class _CovidDrivethruLocationState extends State { decoration: BoxDecoration( border: Border.all(color: Colors.grey[400], width: 1.0), ), - child: Image.network( - "https://maps.googleapis.com/maps/api/staticmap?center=" + - this.projectLat + - "," + - this.projectLong + - "&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" + - this.projectLat + - "," + - this.projectLong + - "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"), + child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" + + this.projectLat + + "," + + this.projectLong + + "&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" + + this.projectLat + + "," + + this.projectLong + + "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"), ) : SizedBox( height: MediaQuery.of(context).size.height * 0.35, @@ -185,8 +158,7 @@ class _CovidDrivethruLocationState extends State { onPressed: () { getDirections(); }, - child: Text(TranslationBase.of(context).getDirections, - style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).getDirections, style: TextStyle(fontSize: 18.0)), ), ), ), @@ -203,8 +175,7 @@ class _CovidDrivethruLocationState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10.0), ), - minWidth: - MediaQuery.of(context).size.width * 0.7, + minWidth: MediaQuery.of(context).size.width * 0.7, height: 45.0, child: RaisedButton( color: new Color(0xFF60686b), @@ -214,8 +185,7 @@ class _CovidDrivethruLocationState extends State { onPressed: () { back(); }, - child: Text(TranslationBase.of(context).back, - style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 18.0)), ), ), ), @@ -228,8 +198,7 @@ class _CovidDrivethruLocationState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10.0), ), - minWidth: - MediaQuery.of(context).size.width * 0.7, + minWidth: MediaQuery.of(context).size.width * 0.7, height: 45.0, child: RaisedButton( color: new Color(0xFF60686b), @@ -239,8 +208,7 @@ class _CovidDrivethruLocationState extends State { onPressed: () { next(); }, - child: Text(TranslationBase.of(context).next, - style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)), ), ), ), @@ -260,20 +228,17 @@ class _CovidDrivethruLocationState extends State { getDirections() { if (isLocationSelected) { - MapsLauncher.launchCoordinates(double.parse(projectLat), - double.parse(projectLong), this.projectName); + MapsLauncher.launchCoordinates(double.parse(projectLat), double.parse(projectLong), this.projectName); } else { - Utils.showErrorToast( - "Please select address from the dropdown menu to get directions"); + Utils.showErrorToast("Please select address from the dropdown menu to get directions"); } } next() { if (isLocationSelected) { - getPaymentInfo(context, projectID); + Navigator.push(context, FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList))); } else { - Utils.showErrorToast( - "Please select address from the dropdown menu to continue"); + Utils.showErrorToast("Please select address from the dropdown menu to continue"); } } @@ -281,34 +246,25 @@ class _CovidDrivethruLocationState extends State { Navigator.of(context).popAndPushNamed(HOME); } - setProjectLocation(newValue) { - print(newValue); + setProjectLocation(DriveThroughTestingCenterModel newValue) { setState(() { - this.projectLat = - projectsList[(int.parse(newValue) - 1)].latitude.toString(); - this.projectLong = - projectsList[(int.parse(newValue) - 1)].longitude.toString(); - this.projectName = projectsList[(int.parse(newValue) - 1)].projectName; - this.projectID = - projectsList[(int.parse(newValue) - 1)].projectID.toString(); + this.projectLat = newValue.latitude.toString(); + this.projectLong = newValue.longitude.toString(); + this.projectName = newValue.projectName; + this.projectID = newValue.projectID.toString(); isLocationSelected = true; }); } getPaymentInfo(BuildContext context, String projectID) { CovidDriveThruService service = new CovidDriveThruService(); - CovidPaymentInfoResponse covidPaymentInfoResponse = - new CovidPaymentInfoResponse(); + CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse(); GifLoaderDialogUtils.showMyDialog(context); - service - .getCovidPaymentInformation( - context, int.parse(projectID), proceduresList[0].procedureID) - .then((res) { + service.getCovidPaymentInformation(context, int.parse(projectID), proceduresList[0].procedureID).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { setState(() { - covidPaymentInfoResponse = - CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); + covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); }); Navigator.push( context, @@ -328,8 +284,7 @@ class _CovidDrivethruLocationState extends State { CovidDriveThruService service = new CovidDriveThruService(); GifLoaderDialogUtils.showMyDialog(context); - CovidTestProceduresResponse covidTestProceduresResponse = - new CovidTestProceduresResponse(); + CovidTestProceduresResponse covidTestProceduresResponse = new CovidTestProceduresResponse(); service.getCovidTestProceduresList(context).then((res) { if (res['MessageStatus'] == 1) { @@ -353,6 +308,7 @@ class _CovidDrivethruLocationState extends State { CovidDriveThruService service = new CovidDriveThruService(); GifLoaderDialogUtils.showMyDialog(context); service.getCovidProjectsList(context).then((res) { + projectsList.clear(); if (res['MessageStatus'] == 1) { setState(() { res['List_COVID19_ProjectDriveThroughTestingCenter'].forEach((v) { diff --git a/lib/pages/Covid-DriveThru/covid-payment-details.dart b/lib/pages/Covid-DriveThru/covid-payment-details.dart index 488dd3bf..67b973fe 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-details.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-details.dart @@ -30,7 +30,6 @@ class _CovidPaymentDetailsState extends State { @override void initState() { - print(widget.proceduresList[0].procedureName); widget.selectedProcedure = widget.proceduresList[0]; super.initState(); } @@ -336,14 +335,6 @@ class _CovidPaymentDetailsState extends State { widget.covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); }); - // Navigator.push( - // context, - // FadePage( - // page: CovidPaymentDetails( - // covidPaymentInfoResponse: covidPaymentInfoResponse, - // projectID: int.parse(projectID), - // proceduresList: proceduresList, - // ))); } else {} }).catchError((err) { print(err); diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart index e71285b5..c3c70578 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-summary.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart @@ -191,6 +191,8 @@ class _CovidPaymentSummaryState extends State { authenticatedUser, widget.browser, widget.patientShareResponse.isLiveCareAppointment, + null, + null, widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentNo, widget.patientShareResponse.clinicID, diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart index 22098d4f..26c973d7 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/pages/ErService/widgets/StepsWidget.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; @@ -29,6 +30,10 @@ class _AmbulanceRequestIndexPageState extends State { PageController pageController; PatientER _patientER = PatientER(); + PatientER_RC _patientER_RC = PatientER_RC(); + + TransportationDetails transportationDetails = new TransportationDetails(); + _changeCurrentTab(int tab) { setState(() { currentIndex = tab; @@ -41,12 +46,13 @@ class _AmbulanceRequestIndexPageState extends State { void initState() { super.initState(); pageController = new PageController(); + _patientER_RC.transportationDetails = transportationDetails; } @override Widget build(BuildContext context) { return AppScaffold( - body: widget.amRequestViewModel.pickUpRequestPresOrder != null + body: widget.amRequestViewModel.pendingAmbulanceRequestOrder != null ? SingleChildScrollView( child: Column( children: [ @@ -64,36 +70,32 @@ class _AmbulanceRequestIndexPageState extends State { children: [ OrderLogItem( title: TranslationBase.of(context).reqId, - value: widget.amRequestViewModel.pickUpRequestPresOrder - .presOrderID + value: widget.amRequestViewModel.pendingAmbulanceRequestOrder + .id .toString(), ), OrderLogItem( title: TranslationBase.of(context).status, - value: widget.amRequestViewModel.pickUpRequestPresOrder.status ==0?TranslationBase.of(context).pending:'', + value: widget.amRequestViewModel.pendingAmbulanceRequestOrder.statusText, ), OrderLogItem( title: TranslationBase.of(context).pickupDate, - value: DateUtil.getDayMonthYearDateFormatted( - DateUtil.convertStringToDate(widget - .amRequestViewModel - .pickUpRequestPresOrder - .lastEditDate)), + value: getDate(widget.amRequestViewModel.pendingAmbulanceRequestOrder.created), ), OrderLogItem( title: TranslationBase.of(context).pickupLocation, - value: widget.amRequestViewModel.pickUpRequestPresOrder - .pickupLocationName, + value: widget.amRequestViewModel.pendingAmbulanceRequestOrder + .pickupLocation, ), OrderLogItem( title: TranslationBase.of(context).dropoffLocation, - value: widget.amRequestViewModel.pickUpRequestPresOrder - .dropoffLocationName, + value: widget.amRequestViewModel.pendingAmbulanceRequestOrder + .dropOffLocation, ), OrderLogItem( title: TranslationBase.of(context).transportMethod, value: widget - .amRequestViewModel.pickUpRequestPresOrder.title, + .amRequestViewModel.pendingAmbulanceRequestOrder.serviceText, ), Container( padding: EdgeInsets.all(10), @@ -112,7 +114,7 @@ class _AmbulanceRequestIndexPageState extends State { onTap: () { widget.amRequestViewModel.updatePressOrder( presOrderID: widget.amRequestViewModel - .pickUpRequestPresOrder.presOrderID); + .pendingAmbulanceRequestOrder.id); }, ), ) @@ -143,21 +145,25 @@ class _AmbulanceRequestIndexPageState extends State { SelectTransportationMethod( changeCurrentTab: _changeCurrentTab, patientER: _patientER, + patientER_RC: _patientER_RC, amRequestViewModel: widget.amRequestViewModel, ), PickupLocation( changeCurrentTab: _changeCurrentTab, patientER: _patientER, + patientER_RC: _patientER_RC, amRequestViewModel: widget.amRequestViewModel, ), BillAmount( changeCurrentTab: _changeCurrentTab, patientER: _patientER, + patientER_RC: _patientER_RC, amRequestViewModel: widget.amRequestViewModel, ), Summary( changeCurrentTab: _changeCurrentTab, patientER: _patientER, + patientER_RC: _patientER_RC, amRequestViewModel: widget.amRequestViewModel, ), ], @@ -167,4 +173,9 @@ class _AmbulanceRequestIndexPageState extends State { ), ); } + + String getDate(String date) { + return date.split("T")[0]; + } + } diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart index 59528df6..67b9d82b 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/core/enum/Ambulate.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -9,17 +10,13 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - class BillAmount extends StatefulWidget { final Function changeCurrentTab; final PatientER patientER; + final PatientER_RC patientER_RC; final AmRequestViewModel amRequestViewModel; - BillAmount( - {Key key, - this.changeCurrentTab, - this.patientER, - this.amRequestViewModel}); + BillAmount({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel}); @override _BillAmountState createState() => _BillAmountState(); @@ -27,23 +24,19 @@ class BillAmount extends StatefulWidget { class _BillAmountState extends State { Ambulate _ambulate = Ambulate.None; - String note =""; - + String note = ""; @override void initState() { - - if(widget.patientER.ambulate!=null) - { - setState(() { - _ambulate = widget.patientER.ambulate; - note = widget.patientER.requesterNote; - }); - } + // if (widget.patientER_RC.transportationDetails.ambulate != null) { + // setState(() { + // _ambulate = widget.patientER.ambulate; + // note = widget.patientER.requesterNote; + // }); + // } super.initState(); } - @override Widget build(BuildContext context) { return AppScaffold( @@ -61,9 +54,7 @@ class _BillAmountState extends State { height: 10, ), Table( - border: TableBorder.symmetric( - inside: BorderSide(width: 1.0, color: Colors.grey[300]), - outside: BorderSide(width: 1.0, color: Colors.grey[300])), + border: TableBorder.symmetric(inside: BorderSide(width: 1.0, color: Colors.grey[300]), outside: BorderSide(width: 1.0, color: Colors.grey[300])), children: [ TableRow( children: [ @@ -96,7 +87,7 @@ class _BillAmountState extends State { child: Padding( padding: const EdgeInsets.all(8.0), child: Texts( - TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.price}', + TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.price}', color: Colors.black, textAlign: TextAlign.start, fontSize: 15, @@ -126,7 +117,7 @@ class _BillAmountState extends State { child: Padding( padding: const EdgeInsets.all(8.0), child: Texts( - TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.vAT}', + TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceVAT}', color: Colors.black, fontSize: 15, textAlign: TextAlign.start, @@ -167,7 +158,7 @@ class _BillAmountState extends State { child: Padding( padding: const EdgeInsets.all(8.0), child: Texts( - TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.totalPrice}', + TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}', color: Colors.black, fontSize: 15, textAlign: TextAlign.start, @@ -181,8 +172,13 @@ class _BillAmountState extends State { SizedBox( height: 10, ), - Texts(TranslationBase.of(context).selectAmbulate,bold: true,), - SizedBox(height: 5,), + Texts( + TranslationBase.of(context).selectAmbulate, + bold: true, + ), + SizedBox( + height: 5, + ), Row( children: [ Expanded( @@ -196,8 +192,7 @@ class _BillAmountState extends State { decoration: BoxDecoration( shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), - border: - Border.all(color: Colors.grey, width: 0.5), + border: Border.all(color: Colors.grey, width: 0.5), color: Colors.white, ), child: ListTile( @@ -226,8 +221,7 @@ class _BillAmountState extends State { decoration: BoxDecoration( shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), - border: - Border.all(color: Colors.grey, width: 0.5), + border: Border.all(color: Colors.grey, width: 0.5), color: Colors.white, ), child: ListTile( @@ -235,7 +229,6 @@ class _BillAmountState extends State { leading: Radio( value: Ambulate.Walker, groupValue: _ambulate, - onChanged: (value) { setState(() { _ambulate = value; @@ -248,7 +241,9 @@ class _BillAmountState extends State { ), ], ), - SizedBox(height: 5,), + SizedBox( + height: 5, + ), Row( children: [ Expanded( @@ -262,8 +257,7 @@ class _BillAmountState extends State { decoration: BoxDecoration( shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), - border: - Border.all(color: Colors.grey, width: 0.5), + border: Border.all(color: Colors.grey, width: 0.5), color: Colors.white, ), child: ListTile( @@ -271,7 +265,6 @@ class _BillAmountState extends State { leading: Radio( value: Ambulate.Stretcher, groupValue: _ambulate, - onChanged: (value) { setState(() { _ambulate = value; @@ -293,8 +286,7 @@ class _BillAmountState extends State { decoration: BoxDecoration( shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), - border: - Border.all(color: Colors.grey, width: 0.5), + border: Border.all(color: Colors.grey, width: 0.5), color: Colors.white, ), child: ListTile( @@ -302,7 +294,6 @@ class _BillAmountState extends State { leading: Radio( value: Ambulate.None, groupValue: _ambulate, - onChanged: (value) { setState(() { _ambulate = value; @@ -315,17 +306,18 @@ class _BillAmountState extends State { ), ], ), - SizedBox(height: 12,), + SizedBox( + height: 12, + ), NewTextFields( hintText: TranslationBase.of(context).notes, initialValue: note, - onChanged: (value){ + onChanged: (value) { setState(() { note = value; }); }, ), - SizedBox( height: 100, ), @@ -342,9 +334,9 @@ class _BillAmountState extends State { textColor: Colors.white, onTap: () { setState(() { - widget.patientER.ambulate = _ambulate; - widget.patientER.requesterNote = note; - widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber(); + widget.patientER_RC.transportationDetails.ambulate = _ambulate.selectAmbulateNumber(); + widget.patientER_RC.transportationDetails.notes = note; + // widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber(); widget.changeCurrentTab(3); }); }, diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart index cde9e248..ce4eb2f7 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; @@ -28,13 +29,10 @@ enum HaveAppointment { YES, NO } class PickupLocation extends StatefulWidget { final Function changeCurrentTab; final PatientER patientER; + final PatientER_RC patientER_RC; final AmRequestViewModel amRequestViewModel; - PickupLocation( - {Key key, - this.changeCurrentTab, - this.patientER, - this.amRequestViewModel}); + PickupLocation({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel}); @override _PickupLocationState createState() => _PickupLocationState(); @@ -77,7 +75,7 @@ class _PickupLocationState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (widget.patientER.direction == 1) + if (widget.patientER_RC.transportationDetails.direction == 1) Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -112,8 +110,7 @@ class _PickupLocationState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Expanded( - child: Texts(getSelectFromMapName(context))), + Expanded(child: Texts(getSelectFromMapName(context))), Icon( FontAwesomeIcons.mapMarkerAlt, size: 24, @@ -179,8 +176,7 @@ class _PickupLocationState extends State { decoration: BoxDecoration( shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), - border: - Border.all(color: Colors.grey, width: 0.5), + border: Border.all(color: Colors.grey, width: 0.5), color: Colors.white, ), child: ListTile( @@ -213,8 +209,7 @@ class _PickupLocationState extends State { decoration: BoxDecoration( shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), - border: - Border.all(color: Colors.grey, width: 0.5), + border: Border.all(color: Colors.grey, width: 0.5), color: Colors.white, ), child: ListTile( @@ -254,11 +249,9 @@ class _PickupLocationState extends State { SizedBox( height: 8, ), - InkWell( onTap: () { - confirmSelectHospitalDialog( - widget.amRequestViewModel.hospitals); + confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals); }, child: Container( padding: EdgeInsets.all(12), @@ -271,8 +264,7 @@ class _PickupLocationState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Texts(getHospitalName( - TranslationBase.of(context).pickupLocation)), + Texts(getHospitalName(TranslationBase.of(context).pickupLocation)), Icon( Icons.arrow_drop_down, size: 24, @@ -284,7 +276,7 @@ class _PickupLocationState extends State { ), ], ), - if (widget.patientER.direction == 0) + if (widget.patientER_RC.transportationDetails.direction == 0) Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -294,8 +286,7 @@ class _PickupLocationState extends State { ), InkWell( onTap: () { - confirmSelectHospitalDialog( - widget.amRequestViewModel.hospitals); + confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals); }, child: Container( padding: EdgeInsets.all(12), @@ -308,8 +299,7 @@ class _PickupLocationState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Texts(getHospitalName( - TranslationBase.of(context).pickupLocation)), + Texts(getHospitalName(TranslationBase.of(context).pickupLocation)), Icon( Icons.arrow_drop_down, size: 24, @@ -354,8 +344,7 @@ class _PickupLocationState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Expanded( - child: Texts(getSelectFromMapName(context))), + Expanded(child: Texts(getSelectFromMapName(context))), Icon( FontAwesomeIcons.mapMarkerAlt, size: 24, @@ -387,77 +376,59 @@ class _PickupLocationState extends State { textColor: Colors.white, onTap: () { if (_result == null || _selectedHospital == null) - AppToast.showErrorToast( - message: TranslationBase.of(context).selectAll); + AppToast.showErrorToast(message: TranslationBase.of(context).selectAll); else setState(() { - widget.patientER.pickupSpot = _isInsideHome ? 1 : 0; - if (widget.patientER.direction == 0) { - - widget.patientER.dropoffLocationLattitude = - _result.geometry.location.lat.toString(); - widget.patientER.dropoffLocationLongitude = - _result.geometry.location.lng.toString(); - widget.patientER.pickupLocationLattitude = - _selectedHospital.latitude; - widget.patientER.pickupLocationLongitude = - _selectedHospital.longitude; + widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0; + if (widget.patientER_RC.transportationDetails.direction == 0) { + widget.patientER_RC.transportationDetails.dropoffLatitude = _result.geometry.location.lat.toString(); + widget.patientER_RC.transportationDetails.dropoffLongitude = _result.geometry.location.lng.toString(); + widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude; + widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude; } else { - widget.patientER.pickupLocationLattitude = - _selectedHospital.latitude; - widget.patientER.pickupLocationLongitude = - _selectedHospital.longitude; - widget.patientER.dropoffLocationLattitude = - _result.geometry.location.lat.toString(); - widget.patientER.dropoffLocationLongitude = - _result.geometry.location.lng.toString(); + widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude; + widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude; + widget.patientER_RC.transportationDetails.dropoffLatitude = _result.geometry.location.lat.toString(); + widget.patientER_RC.transportationDetails.dropoffLongitude = _result.geometry.location.lng.toString(); } - widget.patientER.latitude = - widget.patientER.pickupLocationLattitude; - widget.patientER.longitude = - widget.patientER.pickupLocationLongitude; - widget.patientER.dropoffLocationName = widget.patientER.direction == 0?_result.formattedAddress:_selectedHospital.name; - widget.patientER.createdBy = - widget.amRequestViewModel.user.patientID; - widget.patientER.isOutPatient = - widget.amRequestViewModel.user.outSA; - widget.patientER.patientIdentificationID = - widget.amRequestViewModel.user.patientIdentificationNo; - widget.patientER.pickupDateTime = - DateUtil.convertDateToStringLocation(DateTime.now()); - widget.patientER.pickupLocationName = widget.patientER.direction == 0?_selectedHospital.name:_result.formattedAddress; - widget.patientER.projectID = - widget.amRequestViewModel.user.projectID; - widget.patientER.requesterFileNo = - widget.amRequestViewModel.user.patientID; - widget.patientER.requesterIsOutSA = false; - widget.patientER.lineItemNo = 0; - widget.patientER.requesterMobileNo = - widget.amRequestViewModel.user.mobileNumber; + // widget.patientER.latitude = + // widget.patientER.pickupLocationLattitude; + // widget.patientER.longitude = + // widget.patientER.pickupLocationLongitude; + + widget.patientER_RC.transportationDetails.dropoffLocationName = widget.patientER.direction == 0 ? _result.formattedAddress : _selectedHospital.name; + // widget.patientER_RC.crea = + // widget.amRequestViewModel.user.patientID; + widget.patientER_RC.patientOutSA = widget.amRequestViewModel.user.outSA == 0 ? true : false; + widget.patientER_RC.patientOutSa = widget.amRequestViewModel.user.outSA; + + widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user.patientIdentificationNo; + widget.patientER_RC.transportationDetails.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now()); + widget.patientER_RC.transportationDetails.pickupLocationName = widget.patientER.direction == 0 ? _selectedHospital.name : _result.formattedAddress; + widget.patientER_RC.projectID = widget.amRequestViewModel.user.projectID; + widget.patientER_RC.patientID = widget.amRequestViewModel.user.patientID.toString(); + widget.patientER_RC.transportationDetails.requesterIsOutSA = false; + // widget.patientER.lineItemNo = 0; + widget.patientER_RC.transportationDetails.requesterMobileNo = widget.amRequestViewModel.user.mobileNumber; if (_haveAppointment == HaveAppointment.YES) { - widget.patientER.appointmentNo = - myAppointment.appointmentNo.toString(); - widget.patientER.appointmentClinicName = - myAppointment.clinicName; - widget.patientER.appointmentDoctorName = - myAppointment.doctorNameObj; - widget.patientER.appointmentBranch = - myAppointment.projectName; - widget.patientER.appointmentTime = - myAppointment.appointmentDate; - widget.patientER.haveAppointment = true; + widget.patientER_RC.transportationDetails.appointmentNo = myAppointment.appointmentNo.toString(); + widget.patientER_RC.transportationDetails.appointmentClinicName = myAppointment.clinicName; + widget.patientER_RC.transportationDetails.appointmentDoctorName = myAppointment.doctorNameObj; + widget.patientER_RC.transportationDetails.appointmentBranch = myAppointment.projectName; + widget.patientER_RC.transportationDetails.appointmentTime = myAppointment.appointmentDate; + widget.patientER_RC.transportationDetails.haveAppointment = 1; } else { - widget.patientER.appointmentNo = "0"; - widget.patientER.appointmentClinicName = null; - widget.patientER.appointmentDoctorName = null; - widget.patientER.appointmentBranch = null; - widget.patientER.appointmentTime = null; - widget.patientER.haveAppointment = false; + widget.patientER_RC.transportationDetails.appointmentNo = "0"; + widget.patientER_RC.transportationDetails.appointmentClinicName = ""; + widget.patientER_RC.transportationDetails.appointmentDoctorName = ""; + widget.patientER_RC.transportationDetails.appointmentBranch = ""; + widget.patientER_RC.transportationDetails.appointmentTime = ""; + widget.patientER_RC.transportationDetails.haveAppointment = 0; } - widget.patientER.pickupSpot = _isInsideHome ? 1 : 0; + widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0; widget.changeCurrentTab(2); }); }, @@ -487,27 +458,21 @@ class _PickupLocationState extends State { } String getSelectFromMapName(context) { - return _result != null - ? _result.formattedAddress - : TranslationBase.of(context).selectMap; + return _result != null ? _result.formattedAddress : TranslationBase.of(context).selectMap; } getAppointment() { GifLoaderDialogUtils.showMyDialog(context); widget.amRequestViewModel.getAppointmentHistory().then((value) { - if (widget.amRequestViewModel.state == ViewState.Error || - widget.amRequestViewModel.state == ViewState.ErrorLocal) { + if (widget.amRequestViewModel.state == ViewState.Error || widget.amRequestViewModel.state == ViewState.ErrorLocal) { AppToast.showErrorToast(message: widget.amRequestViewModel.error); - } else if (widget - .amRequestViewModel.appoitmentAllHistoryResultList.length > - 0) { + } else if (widget.amRequestViewModel.appoitmentAllHistoryResultList.length > 0) { GifLoaderDialogUtils.hideDialog(context); Navigator.push( context, FadePage( page: AvailableAppointmentsPage( - appointmentsAllHistoryList: - widget.amRequestViewModel.appoitmentAllHistoryResultList, + appointmentsAllHistoryList: widget.amRequestViewModel.appoitmentAllHistoryResultList, ), ), ).then((value) { @@ -527,8 +492,7 @@ class _PickupLocationState extends State { setState(() { _haveAppointment = HaveAppointment.NO; }); - AppToast.showErrorToast( - message: TranslationBase.of(context).noAppointment); + AppToast.showErrorToast(message: TranslationBase.of(context).noAppointment); } }).catchError((e) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart index 6f3281dc..aad8eb3b 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; @@ -17,23 +18,17 @@ enum Way { OneWay, TwoWays } class SelectTransportationMethod extends StatefulWidget { final Function changeCurrentTab; final PatientER patientER; + final PatientER_RC patientER_RC; final AmRequestViewModel amRequestViewModel; - SelectTransportationMethod( - {Key key, - this.changeCurrentTab, - this.patientER, - this.amRequestViewModel}); + SelectTransportationMethod({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel}); @override - _SelectTransportationMethodState createState() => - _SelectTransportationMethodState(); + _SelectTransportationMethodState createState() => _SelectTransportationMethodState(); } -class _SelectTransportationMethodState - extends State { - PatientERTransportationMethod _erTransportationMethod = - PatientERTransportationMethod(); +class _SelectTransportationMethodState extends State { + PatientERTransportationMethod _erTransportationMethod = PatientERTransportationMethod(); Direction _direction = Direction.FromHospital; Way _way = Way.OneWay; @@ -42,18 +37,23 @@ class _SelectTransportationMethodState @override void initState() { super.initState(); - if (widget.patientER.direction != null) { - _direction = widget.patientER.direction == 0 - ? Direction.ToHospital - : Direction.FromHospital; - _way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays; - _erTransportationMethod = widget.amRequestViewModel - .amRequestModeList[(widget.patientER.selectedAmbulate - 1)]; + // if (widget.patientER.direction != null) { + // _direction = widget.patientER.direction == 0 ? Direction.ToHospital : Direction.FromHospital; + // _way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays; + // _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[(widget.patientER.selectedAmbulate - 1)]; + // } else { + // if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1]; + // } + + //RC API Revamp + if (widget.patientER_RC.transportationDetails.direction != null) { + _direction = widget.patientER_RC.transportationDetails.direction == 0 ? Direction.ToHospital : Direction.FromHospital; + _way = widget.patientER_RC.transportationDetails.tripType == 1 ? Way.OneWay : Way.TwoWays; + _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[(widget.patientER_RC.transportationDetails.ambulate - 1)]; } else { - if (widget.amRequestViewModel.amRequestModeList.length != 0) - _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[ - widget.amRequestViewModel.amRequestModeList.length - 1]; + if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1]; } + } @override @@ -78,8 +78,7 @@ class _SelectTransportationMethodState (index) => InkWell( onTap: () { setState(() { - _erTransportationMethod = - widget.amRequestViewModel.amRequestModeList[index]; + _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[index]; }); }, child: Container( @@ -95,14 +94,9 @@ class _SelectTransportationMethodState Expanded( flex: 3, child: ListTile( - title: Texts(projectViewModel.isArabic - ? widget.amRequestViewModel - .amRequestModeList[index].titleAR - : widget.amRequestViewModel - .amRequestModeList[index].title), + title: Texts(projectViewModel.isArabic ? widget.amRequestViewModel.amRequestModeList[index].textN : widget.amRequestViewModel.amRequestModeList[index].text), leading: Radio( - value: widget - .amRequestViewModel.amRequestModeList[index], + value: widget.amRequestViewModel.amRequestModeList[index], groupValue: _erTransportationMethod, onChanged: (value) { setState(() { @@ -114,8 +108,7 @@ class _SelectTransportationMethodState ), Expanded( flex: 1, - child: Texts(TranslationBase.of(context).sar + - ' ${widget.amRequestViewModel.amRequestModeList[index].price}'), + child: Texts(TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].price}'), ) ], ), @@ -181,8 +174,7 @@ class _SelectTransportationMethodState color: Colors.white, ), child: ListTile( - title: - Texts(TranslationBase.of(context).fromHospital), + title: Texts(TranslationBase.of(context).fromHospital), leading: Radio( value: Direction.FromHospital, groupValue: _direction, @@ -211,7 +203,7 @@ class _SelectTransportationMethodState height: 5, ), Container( - margin: EdgeInsets.only(bottom:65 ), + margin: EdgeInsets.only(bottom: 65), child: Row( children: [ Expanded( @@ -225,13 +217,11 @@ class _SelectTransportationMethodState decoration: BoxDecoration( shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), - border: - Border.all(color: Colors.grey, width: 0.5), + border: Border.all(color: Colors.grey, width: 0.5), color: Colors.white, ), child: ListTile( - title: - Texts(TranslationBase.of(context).oneDirec), + title: Texts(TranslationBase.of(context).oneDirec), leading: Radio( value: Way.OneWay, groupValue: _way, @@ -256,13 +246,11 @@ class _SelectTransportationMethodState decoration: BoxDecoration( shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), - border: - Border.all(color: Colors.grey, width: 0.5), + border: Border.all(color: Colors.grey, width: 0.5), color: Colors.white, ), child: ListTile( - title: - Texts(TranslationBase.of(context).twoDirec), + title: Texts(TranslationBase.of(context).twoDirec), leading: Radio( value: Way.TwoWays, groupValue: _way, @@ -300,28 +288,33 @@ class _SelectTransportationMethodState textColor: Colors.white, onTap: () { setState(() { - widget.patientER.transportationMethodId = (widget - .amRequestViewModel.amRequestModeList - .indexOf(_erTransportationMethod) + - 1); - widget.patientER.direction = - _direction == Direction.ToHospital ? 1 : 0; - widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1; - widget.patientER.selectedAmbulate = (widget - .amRequestViewModel.amRequestModeList - .indexOf(_erTransportationMethod) + - 1); - widget.patientER.patientERTransportationMethod = - _erTransportationMethod; - widget.patientER.orderServiceID = - _orderService.getIdOrderService(); - widget.patientER.pickupUrgency = 1; - widget.patientER.lineItemNo = 1; - widget.patientER.cost = _erTransportationMethod.price; - widget.patientER.vAT = _erTransportationMethod.vAT ?? 0; - widget.patientER.totalPrice = - _erTransportationMethod.totalPrice; + // widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); + // widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0; + // widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1; + // widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); + // widget.patientER.patientERTransportationMethod = _erTransportationMethod; + // widget.patientER.orderServiceID = _orderService.getIdOrderService(); + // widget.patientER.pickupUrgency = 1; + // widget.patientER.lineItemNo = 1; + // widget.patientER.cost = _erTransportationMethod.price.toDouble(); + // widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0; + // widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble(); + // widget.changeCurrentTab(1); + + // widget.patientER_RC.transportationDetails.id = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); + widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 1 : 0; + widget.patientER_RC.transportationDetails.tripType = _way == Way.TwoWays ? 0 : 1; + widget.patientER_RC.transportationDetails.ambulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); + widget.patientER_RC.transportationDetails.transportationType = _erTransportationMethod.id.toString(); + widget.patientER_RC.patientERTransportationMethod = _erTransportationMethod; + widget.patientER_RC.transportationDetails.pickupUrgency = 1; + // widget.patientER.orderServiceID = _orderService.getIdOrderService(); + // widget.patientER.lineItemNo = 1; + // widget.patientER.cost = _erTransportationMethod.price.toDouble(); + // widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0; + // widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble(); widget.changeCurrentTab(1); + }); }, label: TranslationBase.of(context).next, diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart index d6d4372e..d595fd6b 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart @@ -1,4 +1,6 @@ +import 'package:diplomaticquarterapp/core/enum/Ambulate.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; @@ -6,14 +8,14 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/core/enum/Ambulate.dart'; class Summary extends StatefulWidget { final Function changeCurrentTab; final PatientER patientER; + final PatientER_RC patientER_RC; final AmRequestViewModel amRequestViewModel; - Summary({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel}); + Summary({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel}); @override _SummaryState createState() => _SummaryState(); @@ -32,7 +34,9 @@ class _SummaryState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts(TranslationBase.of(context).rrtSummary), - SizedBox(height: 5,), + SizedBox( + height: 5, + ), Container( width: double.infinity, padding: EdgeInsets.all(10), @@ -43,54 +47,95 @@ class _SummaryState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts(TranslationBase.of(context).transportMethod,color: Colors.grey,), - Texts('${widget.patientER.patientERTransportationMethod.title}',bold: true,), - SizedBox(height: 8,), - - Texts(TranslationBase.of(context).directions,color: Colors.grey,), - Texts(widget.patientER.direction ==0? TranslationBase.of(context).toHospital:TranslationBase.of(context).fromHospital,bold: true,), - SizedBox(height: 8,), - - Texts(TranslationBase.of(context).pickupLocation,color: Colors.grey,), - Texts('${widget.patientER.pickupLocationName}',bold: true,), - SizedBox(height: 8,), - - Texts(TranslationBase.of(context).dropoffLocation,color: Colors.grey,), - Texts('${widget.patientER.dropoffLocationName}',bold: true,), - SizedBox(height: 8,), - - Texts(TranslationBase.of(context).selectAmbulate,color: Colors.grey,), - Texts('${widget.patientER.ambulate.getAmbulateTitle(context)}',bold: true,), - SizedBox(height: 8,), - - Texts(TranslationBase.of(context).notes,color: Colors.grey,), - Texts('${widget.patientER.requesterNote?? '---'}',bold: true,), - SizedBox(height: 8,), + Texts( + TranslationBase.of(context).transportMethod, + color: Colors.grey, + ), + Texts( + '${widget.patientER_RC.patientERTransportationMethod.text}', + bold: true, + ), + SizedBox( + height: 8, + ), + Texts( + TranslationBase.of(context).directions, + color: Colors.grey, + ), + Texts( + widget.patientER_RC.transportationDetails.direction == 0 ? TranslationBase.of(context).toHospital : TranslationBase.of(context).fromHospital, + bold: true, + ), + SizedBox( + height: 8, + ), + Texts( + TranslationBase.of(context).pickupLocation, + color: Colors.grey, + ), + Texts( + '${widget.patientER_RC.transportationDetails.pickupLocationName}', + bold: true, + ), + SizedBox( + height: 8, + ), + Texts( + TranslationBase.of(context).dropoffLocation, + color: Colors.grey, + ), + Texts( + '${widget.patientER_RC.transportationDetails.dropoffLocationName}', + bold: true, + ), + SizedBox( + height: 8, + ), + Texts( + TranslationBase.of(context).selectAmbulate, + color: Colors.grey, + ), + Texts( + '${widget.patientER_RC.transportationDetails.ambulate}', + bold: true, + ), + SizedBox( + height: 8, + ), + Texts( + TranslationBase.of(context).notes, + color: Colors.grey, + ), + Texts( + '${widget.patientER_RC.transportationDetails.notes ?? '---'}', + bold: true, + ), + SizedBox( + height: 8, + ), ], ), ), - SizedBox(height: 20,), - Texts(TranslationBase.of(context).billAmount,textAlign: TextAlign.start,), - SizedBox(height: 5,), + SizedBox( + height: 20, + ), + Texts( + TranslationBase.of(context).billAmount, + textAlign: TextAlign.start, + ), + SizedBox( + height: 5, + ), Container( - height: 55, padding: EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8) - ), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Texts(TranslationBase.of(context).patientShareTotal+':'), - Texts(TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.totalPrice}') - ], + children: [Texts(TranslationBase.of(context).patientShareTotal + ':'), Texts(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}')], ), ), SizedBox(height: 130), - - ], ), ), @@ -99,15 +144,13 @@ class _SummaryState extends State { padding: EdgeInsets.all(15), width: double.maxFinite, height: 90, - child:SecondaryButton( + child: SecondaryButton( color: Colors.grey[800], textColor: Colors.white, label: TranslationBase.of(context).send, onTap: () async { - await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER); - - } - ), + await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC); + }), ), ); } diff --git a/lib/pages/ErService/EdOnline/DdServicesPage.dart b/lib/pages/ErService/EdOnline/DdServicesPage.dart index 7395b901..47f73c42 100644 --- a/lib/pages/ErService/EdOnline/DdServicesPage.dart +++ b/lib/pages/ErService/EdOnline/DdServicesPage.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -44,36 +45,39 @@ class _DdServicesPageState extends State { @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - return Scaffold( - appBar: AppBar( - elevation: 0, - textTheme: TextTheme( - headline6: TextStyle( - color: Theme.of(context).textTheme.headline1.color, - fontWeight: FontWeight.bold), - ), - title: Text( - 'ED Online', - style: TextStyle( - fontWeight: FontWeight.bold, - color: Theme.of(context).textTheme.headline1.color, - fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), - // bold: true, - // color: Colors.white, - ), - leading: Builder( - builder: (BuildContext context) { - return IconButton( - icon: Icon(Icons.arrow_back), - color: Theme.of(context).textTheme.headline1.color, - onPressed: () { - showConfirmMessage(context); - }, - ); - }, - ), - centerTitle: true, - ), + return AppScaffold( + appBarTitle: 'ED Online', + isShowDecPage: true, + isShowAppBar: true, + // appBarTitle: AppBar( + // elevation: 0, + // textTheme: TextTheme( + // headline6: TextStyle( + // color: Theme.of(context).textTheme.headline1.color, + // fontWeight: FontWeight.bold), + // ), + // title: Text( + // 'ED Online', + // style: TextStyle( + // fontWeight: FontWeight.bold, + // color: Theme.of(context).textTheme.headline1.color, + // fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), + // // bold: true, + // // color: Colors.white, + // ), + // leading: Builder( + // builder: (BuildContext context) { + // return IconButton( + // icon: Icon(Icons.arrow_back), + // color: Theme.of(context).textTheme.headline1.color, + // onPressed: () { + // showConfirmMessage(context); + // }, + // ); + // }, + // ), + // centerTitle: true, + // ), body: PageView( physics: NeverScrollableScrollPhysics(), controller: pageController, diff --git a/lib/pages/ErService/NearestEr.dart b/lib/pages/ErService/NearestEr.dart index cbafacce..57a3a8ae 100644 --- a/lib/pages/ErService/NearestEr.dart +++ b/lib/pages/ErService/NearestEr.dart @@ -1,16 +1,15 @@ -import 'package:diplomaticquarterapp/core/viewModels/er/near_hospital_view_model.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart'; +import 'package:diplomaticquarterapp/core/service/er/er_service.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + import '../../uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart'; import 'widgets/card_position.dart'; -class NearestEr extends StatelessWidget { +class NearestEr extends StatefulWidget { static const String _url = "assets/images/"; int appointmentNo; @@ -18,91 +17,89 @@ class NearestEr extends StatelessWidget { NearestEr({this.appointmentNo, this.projectID}); + @override + _NearestErState createState() => _NearestErState(); +} + +class _NearestErState extends State { + List projectAvgERWaitingTimeModelList = List(); + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) => getERList()); + super.initState(); + } + @override Widget build(BuildContext context) { var size = MediaQuery.of(context).size; final double itemHeight = (size.height - kToolbarHeight - 24) / 2; final double itemWidth = size.width / 2; - return BaseView( - onModelReady: appointmentNo != null && projectID != null - ? (model) => model.getProjectAvgERWaitingTimeOrders( - id: appointmentNo, projectID: projectID) - : (model) => model.getProjectAvgERWaitingTimeOrders(), - builder: (_, mode, widget) => AppScaffold( - isShowAppBar: true, - isShowDecPage: false, - appBarTitle: TranslationBase.of(context).NearestEr, - baseViewModel: mode, - body: mode.ProjectAvgERWaitingTimeModeList.length > 0 - ? Container( - child: ListView( - children: [ - Text( - "${TranslationBase.of(context).NearestErDesc}", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 18.0, - letterSpacing: 1.0, - fontWeight: FontWeight.w900, - color: new Color(0xFF60686b))), - Container( - margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0), - child: GridView.count( - crossAxisCount: 2, - childAspectRatio: (itemWidth / itemWidth), - crossAxisSpacing: 10, - mainAxisSpacing: 10, - controller: - new ScrollController(keepScrollOffset: false), - shrinkWrap: true, - padding: const EdgeInsets.all(4.0), - children: List.generate(7, (index) { - return Container( - child: CardPosition( - text: mode - .ProjectAvgERWaitingTimeModeList[index] - .projectName - .toString(), - image: - 'assets/images/new-design/find_us_icon.png', - subText: mode - .ProjectAvgERWaitingTimeModeList[index] - .distanceInKilometers - .toString(), - type: mode - .ProjectAvgERWaitingTimeModeList[index].iD - .toString(), - telephone: mode - .ProjectAvgERWaitingTimeModeList[index] - .phoneNumber - .toString(), - networkImage: mode - .ProjectAvgERWaitingTimeModeList[index] - .projectImageURL - .toString(), - latitude: mode - .ProjectAvgERWaitingTimeModeList[index] - .latitude, - longitude: mode - .ProjectAvgERWaitingTimeModeList[index] - .longitude, - projectname: mode - .ProjectAvgERWaitingTimeModeList[index] - .projectName, - cardSize: itemWidth, - ), - ); - }), - ), + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).NearestEr, + body: projectAvgERWaitingTimeModelList.length > 0 + ? Container( + child: ListView( + children: [ + Text("${TranslationBase.of(context).NearestErDesc}", + textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, letterSpacing: 1.0, fontWeight: FontWeight.w900, color: new Color(0xFF60686b))), + Container( + margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0), + child: GridView.count( + crossAxisCount: 2, + childAspectRatio: (itemWidth / itemWidth), + crossAxisSpacing: 10, + mainAxisSpacing: 10, + controller: new ScrollController(keepScrollOffset: false), + shrinkWrap: true, + padding: const EdgeInsets.all(4.0), + children: List.generate(7, (index) { + return Container( + child: CardPosition( + waitingTime: projectAvgERWaitingTimeModelList[index].avgTimeInHHMM.toString(), + text: projectAvgERWaitingTimeModelList[index].projectName.toString(), + image: 'assets/images/new-design/find_us_icon.png', + subText: '${projectAvgERWaitingTimeModelList[index].distanceInKilometers ?? 0.0} ${TranslationBase.of(context).km_}', + type: projectAvgERWaitingTimeModelList[index].iD.toString(), + telephone: projectAvgERWaitingTimeModelList[index].phoneNumber.toString(), + networkImage: projectAvgERWaitingTimeModelList[index].projectImageURL.toString(), + latitude: projectAvgERWaitingTimeModelList[index].latitude, + longitude: projectAvgERWaitingTimeModelList[index].longitude, + projectname: projectAvgERWaitingTimeModelList[index].projectName, + cardSize: itemWidth, + ), + ); + }), ), - ], - ), - ) - : Center( - child: Texts('No Data'), + ), + ], ), - ), + ) + : Center( + child: Texts('No Data'), + ), ); } + + getERList() async { + GifLoaderDialogUtils.showMyDialog(context); + ErService service = new ErService(); + service.getProjectAvgERWaitingTimeOrders().then((response) { + if (response['MessageStatus'] == 1) { + setState(() { + projectAvgERWaitingTimeModelList.clear(); + response['List_ProjectAvgERWaitingTime'].forEach((vital) { + projectAvgERWaitingTimeModelList.add(ProjectAvgERWaitingTime.fromJson(vital)); + }); + }); + GifLoaderDialogUtils.hideDialog(context); + } else {} + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + }); + } } diff --git a/lib/pages/ErService/OrderLogPage.dart b/lib/pages/ErService/OrderLogPage.dart index 7d2a4a5b..3d492c83 100644 --- a/lib/pages/ErService/OrderLogPage.dart +++ b/lib/pages/ErService/OrderLogPage.dart @@ -1,9 +1,6 @@ -import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/OrderLogItem.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -19,7 +16,7 @@ class OrderLogPage extends StatelessWidget { margin: EdgeInsets.all(10), padding: EdgeInsets.all(8), child: ListView.builder( - itemCount: amRequestViewModel.patientAllPresOrdersList.length, + itemCount: amRequestViewModel.patientAmbulanceRequestOrdersList.length, itemBuilder: (context, index) => Container( margin: EdgeInsets.all(8), decoration: BoxDecoration( @@ -31,49 +28,41 @@ class OrderLogPage extends StatelessWidget { children: [ OrderLogItem( title: TranslationBase.of(context).reqId, - value: amRequestViewModel.patientAllPresOrdersList[index].iD - .toString(), + value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].id.toString(), ), OrderLogItem( title: TranslationBase.of(context).orderStatus, - value: amRequestViewModel - .patientAllPresOrdersList[index].description, + value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].statusText, ), OrderLogItem( title: TranslationBase.of(context).pickupDate, - value: DateUtil.getDayMonthYearDateFormatted( - DateUtil.convertStringToDate(amRequestViewModel - .patientAllPresOrdersList[index].createdOn)), + value: getDate(amRequestViewModel.patientAmbulanceRequestOrdersList[index].created), ), OrderLogItem( title: TranslationBase.of(context).pickupLocation, - value: amRequestViewModel - .patientAllPresOrdersList[index].pickupLocationName, + value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].pickupLocation, ), OrderLogItem( title: TranslationBase.of(context).dropoffLocation, - value: amRequestViewModel - .patientAllPresOrdersList[index].dropoffLocationName, + value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].dropOffLocation, ), - if(amRequestViewModel.patientAllPresOrdersList[index].status==1) + if (amRequestViewModel.patientAmbulanceRequestOrdersList[index].statusId == 1) Container( padding: EdgeInsets.all(10), width: double.maxFinite, - margin: EdgeInsets.only(bottom: 4,left: 4,right: 4), + margin: EdgeInsets.only(bottom: 4, left: 4, right: 4), decoration: BoxDecoration( borderRadius: BorderRadius.only( - bottomRight: Radius.circular(12), - bottomLeft: Radius.circular(12), + bottomRight: Radius.circular(12), + bottomLeft: Radius.circular(12), ), - color: Colors.white - ), + color: Colors.white), child: SecondaryButton( - color: Colors.red[900], + color: Colors.red[900], textColor: Colors.white, label: TranslationBase.of(context).cancel, onTap: () { - amRequestViewModel.updatePressOrder(presOrderID:amRequestViewModel.pickUpRequestPresOrder.presOrderID ); - + amRequestViewModel.updatePressOrder(presOrderID: amRequestViewModel.pendingAmbulanceRequestOrder.id); }, ), ) @@ -83,4 +72,8 @@ class OrderLogPage extends StatelessWidget { ), ); } + + String getDate(String date) { + return date.split("T")[0]; + } } diff --git a/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart b/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart index 905d0810..9ee7bd1c 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart @@ -1,4 +1,4 @@ - +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart'; @@ -8,13 +8,12 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -class RRTMainScreen extends StatefulWidget{ +class RRTMainScreen extends StatefulWidget { @override State createState() => RRTMainScreenState(); } -class RRTMainScreenState extends State with SingleTickerProviderStateMixin{ - +class RRTMainScreenState extends State with SingleTickerProviderStateMixin { int currentIndex = 0; TabController tabController; PageController pageController = PageController(initialPage: 0, keepPage: true); @@ -22,84 +21,85 @@ class RRTMainScreenState extends State with SingleTickerProvider RRTViewModel viewModel; bool loadingData; + List imagesInfo = List(); + @override void initState() { super.initState(); + imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/RRT/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/RRT/ar/0.png')); tabController = TabController(length: 2, vsync: this); } TranslationBase localize; + @override Widget build(BuildContext context) { localize = TranslationBase.of(context); return AppScaffold( - appBarTitle: localize.rapidResponseTeam, - isShowAppBar: true, - body: BaseView( - onModelReady: (vm) async { - viewModel = vm; - loadingData = true; - await vm.loadRequiredData().then((value){ - }).whenComplete(() => setState(() => loadingData = false)); - }, - builder: (ctx, vm, widget) => content(), - ) - ); + appBarTitle: localize.rapidResponseTeam, + isShowAppBar: true, + description: TranslationBase.of(context).rrtDDetails, + imagesInfo: imagesInfo, + body: BaseView( + onModelReady: (vm) async { + viewModel = vm; + loadingData = true; + await vm.loadRequiredData().then((value) {}).whenComplete(() => setState(() => loadingData = false)); + }, + builder: (ctx, vm, widget) => content(), + )); } - Widget content(){ - if(loadingData == true){ + Widget content() { + if (loadingData == true) { return Center(child: CircularProgressIndicator()); // else if(viewModel.state == ViewState.Error) - }else if(viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null){ + } else if (viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null) { return Column( - children: [ - tabBar(), - Expanded( - child: contentPager() - ) - ], + children: [tabBar(), Expanded(child: contentPager())], ); - }else{ + } else { return Container( alignment: Alignment.center, - child: Text(localize.somethingWentWrongTryLater, style: TextStyle(color: Colors.red), maxLines: 5,), + child: Text( + localize.somethingWentWrongTryLater, + style: TextStyle(color: Colors.red), + maxLines: 5, + ), ); } } Widget tabBar() => Container( - margin: EdgeInsets.all(15), - clipBehavior: Clip.hardEdge, - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)), - child: TabBar( - onTap: onPageChanged, - indicatorWeight: 3, - indicatorColor: Color(0xFFc5272d), - isScrollable: false, - controller: tabController, - indicatorSize: TabBarIndicatorSize.label, - tabs: [ + margin: EdgeInsets.all(15), + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)), + child: TabBar(onTap: onPageChanged, indicatorWeight: 3, indicatorColor: Color(0xFFc5272d), isScrollable: false, controller: tabController, indicatorSize: TabBarIndicatorSize.label, tabs: [ Tab( - child: Text(localize.rapidResponseTeam, style: TextStyle(color: Theme.of(context).appBarTheme.color),), + child: Text( + localize.rapidResponseTeam, + style: TextStyle(color: Theme.of(context).appBarTheme.color), + ), ), Tab( - child: Text(localize.orderLog, style: TextStyle(color: Theme.of(context).appBarTheme.color),), + child: Text( + localize.orderLog, + style: TextStyle(color: Theme.of(context).appBarTheme.color), + ), ), - ] - ), - ); + ]), + ); Widget contentPager() => PageView( - onPageChanged: onPageChanged, - controller: pageController, - children: [ - RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders), - RRTLogPage(orders: viewModel.rrtServiceData.completedOrders), - ], - ); + onPageChanged: onPageChanged, + controller: pageController, + children: [ + RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders), + RRTLogPage(orders: viewModel.rrtServiceData.completedOrders), + ], + ); void onPageChanged(int index) { pageController.animateToPage(index, duration: Duration(milliseconds: 200), curve: Curves.easeInOut); diff --git a/lib/pages/ErService/widgets/card_position.dart b/lib/pages/ErService/widgets/card_position.dart index 69ccaffe..29fdd5a4 100644 --- a/lib/pages/ErService/widgets/card_position.dart +++ b/lib/pages/ErService/widgets/card_position.dart @@ -1,6 +1,7 @@ //import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:giffy_dialog/giffy_dialog.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -20,6 +21,7 @@ class CardPosition extends StatelessWidget { final longitude; final projectname; final cardSize; + final String waitingTime; const CardPosition( { @@ -32,7 +34,8 @@ class CardPosition extends StatelessWidget { @required this.latitude, @required this.longitude, @required this.projectname , - @required this.cardSize , + @required this.cardSize, + @required this.waitingTime , }); @override @@ -83,31 +86,26 @@ class CardPosition extends StatelessWidget { } Future navigateToSearch(context, type,telephone,networkImage,latitude,longitude,projectname) async { - - - - + var localize = TranslationBase.of(context); showDialog( context: context,builder: (_) => AssetGiffyDialog( - title: Text(projectname, - style: TextStyle( - fontSize: 22.0, fontWeight: FontWeight.w600), - ),image:Image.network(networkImage, fit: BoxFit.cover,), - - buttonOkText:Text("LOCATION"), - buttonOkColor: Colors.grey, - buttonCancelText:Text('CAll') , - buttonCancelColor: Colors.grey, - onOkButtonPressed: () { MapsLauncher.launchCoordinates(double.parse(latitude),double.parse(longitude),projectname);}, - onCancelButtonPressed :() {launch("tel://" +telephone);} - - - - - ) ); + entryAnimation: EntryAnimation.BOTTOM, + image:Image.network(networkImage, fit: BoxFit.cover,), + title: Text(projectname, + style: TextStyle( + fontSize: 22.0, fontWeight: FontWeight.w600), + ), + description: Text("${localize.averageWaitingTime}\n\n$waitingTime ${localize.minute}", textAlign: TextAlign.center,), + buttonOkText:Text("LOCATION", style: TextStyle(color: Colors.white),), + buttonOkColor: Colors.grey, + buttonCancelText:Text('CAll', style: TextStyle(color: Colors.white),) , + buttonCancelColor: Colors.grey, + onOkButtonPressed: () { MapsLauncher.launchCoordinates(double.parse(latitude),double.parse(longitude),projectname);}, + onCancelButtonPressed :() {launch("tel://" +telephone);} + )); } - } +} diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 68781795..c208efba 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -11,19 +11,21 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:rating_bar/rating_bar.dart'; - +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'widgets/AppointmentActions.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; class AppointmentDetails extends StatefulWidget { AppoitmentAllHistoryResultList appo; static bool isLoading = false; - + final dynamic doctorSchedule; static bool showFooterButton = false; - AppointmentDetails({@required this.appo}); + AppointmentDetails({@required this.appo, this.doctorSchedule}); @override _AppointmentDetailsState createState() => _AppointmentDetailsState(); @@ -33,13 +35,20 @@ class _AppointmentDetailsState extends State with SingleTickerProviderStateMixin { static TabController _tabController; + AppSharedPreferences sharedPref = AppSharedPreferences(); List doctorDetailsList = List(); @override void initState() { - _tabController = new TabController(length: 2, vsync: this); AppointmentDetails.showFooterButton = false; - print(widget.appo.clinicID); + if (widget.doctorSchedule != null) { + _tabController = + new TabController(length: 2, vsync: this, initialIndex: 1); + widget.appo.appointmentDate = widget.doctorSchedule['Date']; + } else { + _tabController = new TabController(length: 2, vsync: this); + } + setTab(); super.initState(); } @@ -82,155 +91,196 @@ class _AppointmentDetailsState extends State body: Container( color: new Color(0xFFf6f6f6), child: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + child: Stack( children: [ - Container( - color: Colors.white, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(top: 20.0), - alignment: Alignment.center, - child: ClipRRect( - borderRadius: BorderRadius.circular(100.0), - child: Image.network(widget.appo.doctorImageURL, - fit: BoxFit.fill, height: 120.0, width: 120.0), - ), - ), - Container( - margin: - EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), - alignment: Alignment.center, - child: Text( - widget.appo.doctorTitle + - " " + - widget.appo.doctorNameObj, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20.0, - color: Colors.grey[900], - letterSpacing: 1.0)), - ), - Container( - margin: EdgeInsets.only(top: 10.0), - alignment: Alignment.center, - child: Text( - getDoctorSpeciality(widget.appo.doctorSpeciality), - style: TextStyle( - fontSize: 12.0, - color: Colors.grey[900], - letterSpacing: 1.0)), - ), - Container( - margin: EdgeInsets.only(top: 5.0), - alignment: Alignment.center, - child: RatingBar.readOnly( - initialRating: widget.appo.actualDoctorRate.toDouble(), - size: 35.0, - filledColor: Colors.yellow[700], - emptyColor: Colors.grey[500], - isHalfAllowed: true, - halfFilledIcon: Icons.star_half, - filledIcon: Icons.star, - emptyIcon: Icons.star, - ), - ), - InkWell( - onTap: () { - getDoctorRatingsDetails(); - }, - child: Container( - margin: EdgeInsets.only(top: 5.0), - alignment: Alignment.center, - child: Text( - "(" + - widget.appo.noOfPatientsRate.toString() + - " " + - TranslationBase.of(context).reviews + - ")", - style: TextStyle( - fontSize: 14.0, - color: Colors.blue[800], - letterSpacing: 1.0, - decoration: TextDecoration.underline, - )), - ), - ), - Container( - alignment: Alignment.center, - child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted( - DateUtil.convertStringToDate( - widget.appo.appointmentDate), - projectViewModel.isArabic ? "ar" : "en")), - ), - Container( - alignment: Alignment.center, - child: Text(widget.appo.startTime.substring(0, 5)), - ), - Container( - margin: EdgeInsets.only(top: 10.0), - child: Divider( - color: Colors.grey[500], - ), - ), - TabBar( - onTap: (index) { - setState(() { - if (index == 1) { - if (widget.appo.clinicID == 17 || - widget.appo.clinicID == 23 || - widget.appo.isExecludeDoctor) { - _tabController.index = - _tabController.previousIndex; - AppointmentDetails.showFooterButton = false; - } else { - AppointmentDetails.showFooterButton = true; - } - } - }); - }, - tabs: [ - Tab( - child: Text(TranslationBase.of(context).appoActions, - style: TextStyle(color: Colors.black))), - widget.appo.clinicID == 17 || - widget.appo.clinicID == 23 || - widget.appo.isExecludeDoctor - ? Tab( - child: Text( - TranslationBase.of(context).availableAppo, - style: TextStyle(color: Colors.grey)), - ) - : Tab( + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 20.0), + alignment: Alignment.center, + child: ClipRRect( + borderRadius: BorderRadius.circular(100.0), + child: Image.network(widget.appo.doctorImageURL, + fit: BoxFit.fill, height: 120.0, width: 120.0), + ), + ), + Container( + margin: EdgeInsets.only( + top: 10.0, left: 10.0, right: 10.0), + alignment: Alignment.center, + child: Text( + widget.appo.doctorTitle + + " " + + widget.appo.doctorNameObj, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 20.0, + color: Colors.grey[900], + letterSpacing: 1.0)), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + alignment: Alignment.center, + child: Text( + getDoctorSpeciality(widget.appo.doctorSpeciality), + style: TextStyle( + fontSize: 12.0, + color: Colors.grey[900], + letterSpacing: 1.0)), + ), + Container( + margin: EdgeInsets.only(top: 5.0), + alignment: Alignment.center, + child: RatingBar.readOnly( + initialRating: + widget.appo.actualDoctorRate.toDouble(), + size: 35.0, + filledColor: Colors.yellow[700], + emptyColor: Colors.grey[500], + isHalfAllowed: true, + halfFilledIcon: Icons.star_half, + filledIcon: Icons.star, + emptyIcon: Icons.star, + ), + ), + InkWell( + onTap: () { + getDoctorRatingsDetails(); + }, + child: Container( + margin: EdgeInsets.only(top: 5.0), + alignment: Alignment.center, + child: Text( + "(" + + widget.appo.noOfPatientsRate.toString() + + " " + + TranslationBase.of(context).reviews + + ")", + style: TextStyle( + fontSize: 14.0, + color: Colors.blue[800], + letterSpacing: 1.0, + decoration: TextDecoration.underline, + )), + ), + ), + Container( + alignment: Alignment.center, + child: Text( + DateUtil.getWeekDayMonthDayYearDateFormatted( + DateUtil.convertStringToDate( + widget.appo.appointmentDate), + projectViewModel.isArabic ? "ar" : "en")), + ), + Container( + alignment: Alignment.center, + child: Text(widget.appo.startTime.substring(0, 5)), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Divider( + color: Colors.grey[500], + ), + ), + TabBar( + onTap: (index) { + setState(() { + if (index == 1) { + if (widget.appo.clinicID == 17 || + widget.appo.clinicID == 23 || + widget.appo.isExecludeDoctor) { + _tabController.index = + _tabController.previousIndex; + AppointmentDetails.showFooterButton = false; + } else { + AppointmentDetails.showFooterButton = true; + } + } + }); + }, + tabs: [ + Tab( child: Text( - TranslationBase.of(context).availableAppo, - style: TextStyle(color: Colors.black)), - ) + TranslationBase.of(context).appoActions, + style: TextStyle(color: Colors.black))), + widget.appo.clinicID == 17 || + widget.appo.clinicID == 23 || + widget.appo.isExecludeDoctor + ? Tab( + child: Text( + TranslationBase.of(context) + .availableAppo, + style: TextStyle(color: Colors.grey)), + ) + : Tab( + child: Text( + TranslationBase.of(context) + .availableAppo, + style: TextStyle(color: Colors.black)), + ) + ], + controller: _tabController, + ), + ], + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.87, + child: TabBarView( + physics: NeverScrollableScrollPhysics(), + children: [ + AppointmentActions( + appo: widget.appo, + tabController: _tabController, + enableFooterButton: enableFooterButton), + DocAvailableAppointments( + doctor: getDoctorObject(), + doctorSchedule: widget.doctorSchedule, + isLiveCareAppointment: + widget.appo.isLiveCareAppointment) ], controller: _tabController, ), - ], - ), - ), - Container( - height: MediaQuery.of(context).size.height * 0.87, - child: TabBarView( - physics: NeverScrollableScrollPhysics(), - children: [ - AppointmentActions( - appo: widget.appo, - tabController: _tabController, - enableFooterButton: enableFooterButton), - DocAvailableAppointments( - doctor: getDoctorObject(), - isLiveCareAppointment: - widget.appo.isLiveCareAppointment) - ], - controller: _tabController, - ), + ), + ], ), + _tabController.index == 1 + ? Positioned( + right: 30.0, + //top: 30.0, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 5, + blurRadius: 7, + offset: + Offset(0, 3), // changes position of shadow + ), + ]), + height: 50, + width: 50, + margin: EdgeInsets.only(top: 20.0), + alignment: Alignment.center, + child: ClipRRect( + borderRadius: BorderRadius.circular(100.0), + child: IconButton( + icon: Image.asset('assets/images/drSchedul.png'), + onPressed: () { + openSchedule(); + }), + ), + )) + : SizedBox(), ], ), ), @@ -564,4 +614,20 @@ class _AppointmentDetailsState extends State docObj.doctorImageURL = widget.appo.doctorImageURL; return docObj; } + + void openSchedule() { + Navigator.push( + context, + FadePage( + page: SchedulePage( + appo: widget.appo, + doctorList: getDoctorObject(), + ))); + } + + setTab() async { + var scheduleDoctor = await sharedPref.getObject(DOCTOR_SCHEDULE_DATE_SEL); + + widget.appo.appointmentDate = scheduleDoctor['Date']; + } } diff --git a/lib/pages/MyAppointments/SchedulePage.dart b/lib/pages/MyAppointments/SchedulePage.dart new file mode 100644 index 00000000..90ac8ae3 --- /dev/null +++ b/lib/pages/MyAppointments/SchedulePage.dart @@ -0,0 +1,257 @@ +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart'; + +import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; + +class SchedulePage extends StatefulWidget { + final DoctorList doctorList; + final AppoitmentAllHistoryResultList appo; + SchedulePage({ + this.appo, + this.doctorList, + }); + @override + _SchedulePageState createState() => _SchedulePageState(); +} + +class _SchedulePageState extends State { + DoctorsListService service; + PageController _pageController = PageController(); + double currentPage = 0; + int selectedindex = 0; + List weeks = []; + List doctorScheduleResponse = []; + int weekMS = 604800 * 1000; + DoctorList doctorList; + List freeSlots = []; + bool isPageChange = false; + + AppSharedPreferences sharedPref = AppSharedPreferences(); + @override + void initState() { + this.doctorList = widget.doctorList; + + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getDoctorSchedule(doctorList), + builder: (_, model, widget) => BaseView( + onModelReady: (model2) => model2.getFreeSlots(doctorList), + builder: (_, model2, widget2) { + if (model.freeSlots.length > 0 && isPageChange == false) { + this.freeSlots = model.freeSlots; + this.doctorScheduleResponse = model.getDoctorScheduleList; + + this.generateWeeksSchedules(); + } + return AppScaffold( + appBarTitle: TranslationBase.of(context).schedule, + isShowAppBar: true, + baseViewModel: model2, + body: SizedBox( + height: MediaQuery.of(context).size.height, + child: Stack( + children: [ + Container( + margin: EdgeInsets.only(top: 40), + child: PageView.builder( + controller: _pageController, + itemCount: weeks.length, + onPageChanged: (index) { + setState(() { + isPageChange = true; + this.currentPage = index.toDouble(); + }); + }, + itemBuilder: (context, index) { + return Container( + child: ListView.builder( + itemCount: weeks[index].length, + itemBuilder: (context, index2) => + InkWell( + onTap: () { + openBookAppointment( + weeks[index][index2]); + }, + child: Row( + children: [ + Expanded( + flex: 1, + child: Padding( + padding: + EdgeInsets.only( + left: 20), + child: Row( + children: [ + Column( + children: [ + Texts( + weeks[index][index2] + [ + 'DayName'], + fontSize: + 13, + ), + Texts( + getDayMonths( + DateUtil + .convertStringToDate( + weeks[index][index2]['Date'], + ), + ), + fontWeight: + FontWeight.bold, + fontSize: + 18, + ) + ], + ) + ])), + ), + Expanded( + flex: 3, + child: ClipRRect( + borderRadius: + const BorderRadius + .all( + Radius.circular( + 20.0)), + child: Container( + padding: + EdgeInsets.only( + left: + 10, + right: + 10, + top: 20, + bottom: + 20), + margin: EdgeInsets.only( + left: 20, + right: 20, + top: 7, + bottom: 7), + decoration: BoxDecoration( + boxShadow: [ + weeks[index][index2]['fullDay'] == + false + ? BoxShadow( + color: Colors.green, + offset: Offset(-5, 0)) + : BoxShadow(), + ], + borderRadius: + const BorderRadius.all(Radius.circular( + 10.0)), + color: Colors + .white), + child: Row( + children: [ + Expanded( + child: + Texts( + weeks[index][index2] + [ + 'WorkingHours'], + fontWeight: + FontWeight.w400, + ), + ) + ], + ))), + ) + ], + )))); + }, + )), + PageViewIndicator( + isActive: true, + currentPage: this.currentPage, + length: weeks.length, + ) + ], + ))); + })); + } + + generateWeeksSchedules() { + this.weeks.clear(); + for (var i = 0; i < 8; i++) { + var weekSchedule = generateNewWeekSchedule(i); + this.markWeekFreeDays(weekSchedule); + this.weeks.add(weekSchedule); + } + //print(this.weeks); + } + + markWeekFreeDays(schedule) { + for (var workDay in schedule) { + workDay['fullDay'] = !this.hasFreeSlot(workDay['Date']); + } + } + + generateNewWeekSchedule(weekIndex) { + var weekMSOffset = weekIndex * weekMS; + + var newWeekSchedule = []; + for (var workDay in this.doctorScheduleResponse) { + Map newWorkDay = Map(); + newWorkDay['Date'] = DateUtil.convertDateMSToJsonDate( + DateUtil.convertStringToDate(workDay.date).millisecondsSinceEpoch + + weekMSOffset); + newWorkDay['DayName'] = workDay.dayName; + newWorkDay['WorkingHours'] = workDay.workingHours; + newWeekSchedule.add(newWorkDay); + } + return newWeekSchedule; + } + + hasFreeSlot(String jsonDate) { + var date = DateUtil.convertStringToDate(jsonDate); + var scheduleDay = date; + for (var event in this.freeSlots) { + var date = DateUtil.convertStringToDate(event); + var nDate = DateTime(date.year, date.month, date.day); + + if (nDate.millisecondsSinceEpoch == scheduleDay.millisecondsSinceEpoch) { + return true; + } + } + return false; + } + + String getDayMonths(DateTime dateTime) { + String dateFormat = + '${dateTime.day} ${DateUtil.getMonth(dateTime.month).toString().substring(0, 3)}'; + return dateFormat; + } + + openBookAppointment(selectedDate) { + //sharedPref.setObject(DOCTOR_SCHEDULE_DATE_SEL, selectedDate); + Navigator.push( + context, + FadePage( + page: AppointmentDetails( + appo: widget.appo, + doctorSchedule: selectedDate, + ), + ), + ); + } +} diff --git a/lib/pages/MyAppointments/models/DoctorScheduleResponse.dart b/lib/pages/MyAppointments/models/DoctorScheduleResponse.dart new file mode 100644 index 00000000..2131d5da --- /dev/null +++ b/lib/pages/MyAppointments/models/DoctorScheduleResponse.dart @@ -0,0 +1,32 @@ +class DoctorScheduleResponse { + String clinicName; + String date; + String dayName; + String projectName; + String workingHours; + + DoctorScheduleResponse( + {this.clinicName, + this.date, + this.dayName, + this.projectName, + this.workingHours}); + + DoctorScheduleResponse.fromJson(Map json) { + clinicName = json['ClinicName']; + date = json['Date']; + dayName = json['DayName']; + projectName = json['ProjectName']; + workingHours = json['WorkingHours']; + } + + Map toJson() { + final Map data = new Map(); + data['ClinicName'] = this.clinicName; + data['Date'] = this.date; + data['DayName'] = this.dayName; + data['ProjectName'] = this.projectName; + data['WorkingHours'] = this.workingHours; + return data; + } +} diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index c37cf6ee..ff133d80 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; +import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart'; @@ -685,7 +686,7 @@ class _AppointmentActionsState extends State { } navigateToInsertComplaint() { - Navigator.push(context, FadePage(page: FeedbackHomePage())); + Navigator.push(context, FadePage(page: FeedbackHomePage(messageType: MessageType.ComplaintOnAnAppointment,appointment: widget.appo,))); } rateAppointment() { diff --git a/lib/pages/MyAppointments/widgets/indicator.dart b/lib/pages/MyAppointments/widgets/indicator.dart new file mode 100644 index 00000000..5976042f --- /dev/null +++ b/lib/pages/MyAppointments/widgets/indicator.dart @@ -0,0 +1,48 @@ +import 'package:flutter/material.dart'; + +class PageViewIndicator extends StatelessWidget { + final bool isActive; + final int length; + final double currentPage; + PageViewIndicator({ + @required this.isActive, + @required this.length, + @required this.currentPage, + }); + + @override + Widget build(BuildContext context) { + return _indicator(this.isActive); + } + + Widget _indicator(bool isActive) { + return Positioned( + top: 20, + left: 0, + right: 0, + child: Container( + margin: EdgeInsets.only(top: 0), + child: Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + for (int i = 0; i < length; i++) + if (i == currentPage) ...[circleBar(true)] else circleBar(false), + ], + ), + ), + ); + } + + Widget circleBar(bool isActive) { + return AnimatedContainer( + duration: Duration(milliseconds: 150), + margin: EdgeInsets.symmetric(horizontal: 3), + height: isActive ? 12 : 8, + width: isActive ? 12 : 8, + decoration: BoxDecoration( + color: isActive ? Colors.red : Colors.grey, + borderRadius: BorderRadius.all(Radius.circular(12))), + ); + } +} diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index febbdf0f..6e9d6bce 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -774,6 +774,8 @@ class _ToDoState extends State { authenticatedUser, widget.browser, appo.isLiveCareAppointment, + null, + null, appo.appointmentDate, appo.appointmentNo, appo.clinicID, diff --git a/lib/pages/feedback/appointment_history.dart b/lib/pages/feedback/appointment_history.dart index a1dcdd33..92a26eb1 100644 --- a/lib/pages/feedback/appointment_history.dart +++ b/lib/pages/feedback/appointment_history.dart @@ -5,7 +5,7 @@ class AppointmentHistory { int projectID; int appointmentNo; DateTime appointmentDate; - Null appointmentDateN; + dynamic appointmentDateN; int appointmentType; String bookDate; int patientType; @@ -26,14 +26,14 @@ class AppointmentHistory { String confirmedOn; int arrivalChangedBy; DateTime arrivedOn; - Null editedBy; - Null editedOn; - Null doctorName; - Null doctorNameN; + dynamic editedBy; + dynamic editedOn; + dynamic doctorName; + dynamic doctorNameN; String statusDesc; - Null statusDescN; + dynamic statusDescN; bool vitalStatus; - Null vitalSignAppointmentNo; + dynamic vitalSignAppointmentNo; int episodeID; int actualDoctorRate; String clinicName; @@ -55,8 +55,8 @@ class AppointmentHistory { bool isMedicalReportRequested; bool isOnlineCheckedIN; String latitude; - Null listHISGetContactLensPerscription; - Null listHISGetGlassPerscription; + dynamic listHISGetContactLensPerscription; + dynamic listHISGetGlassPerscription; String longitude; int nextAction; int noOfPatientsRate; diff --git a/lib/pages/feedback/feedback_home_page.dart b/lib/pages/feedback/feedback_home_page.dart index f7f998bf..15f348f9 100644 --- a/lib/pages/feedback/feedback_home_page.dart +++ b/lib/pages/feedback/feedback_home_page.dart @@ -1,5 +1,7 @@ import 'dart:ui'; +import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -10,6 +12,10 @@ import 'package:flutter/material.dart'; import 'status_feedback_page.dart'; class FeedbackHomePage extends StatefulWidget { + final AppoitmentAllHistoryResultList appointment; + final MessageType messageType; + const FeedbackHomePage({Key key, this.appointment, this.messageType= MessageType.NON}) : super(key: key); + @override _FeedbackHomePageState createState() => _FeedbackHomePageState(); } @@ -105,7 +111,7 @@ class _FeedbackHomePageState extends State child: TabBarView( physics: BouncingScrollPhysics(), controller: _tabController, - children: [SendFeedbackPage(), StatusFeedbackPage()], + children: [SendFeedbackPage(appointment: widget.appointment,messageType: widget.messageType,), StatusFeedbackPage()], ), ) ], diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart index a8e553be..bbef1757 100644 --- a/lib/pages/feedback/send_feedback_page.dart +++ b/lib/pages/feedback/send_feedback_page.dart @@ -1,6 +1,8 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; @@ -20,6 +22,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; import 'dart:convert'; import 'dart:io'; @@ -27,6 +30,10 @@ import 'appointment_history.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; class SendFeedbackPage extends StatefulWidget { + final AppoitmentAllHistoryResultList appointment; + final MessageType messageType; + const SendFeedbackPage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key); + @override _SendFeedbackPageState createState() => _SendFeedbackPageState(); } @@ -36,7 +43,7 @@ class _SendFeedbackPageState extends State { TextEditingController messageController = TextEditingController(); List images = []; String title; - AppointmentHistory appointHistory; + AppoitmentAllHistoryResultList appointHistory; bool isShowListAppointHistory = true; String message; final formKey = GlobalKey(); @@ -73,11 +80,23 @@ class _SendFeedbackPageState extends State { setMessageType(MessageType messageType) { setState(() { this.messageType = messageType; + this.appointHistory = widget.appointment; + }); + } + + @override + void initState() { + setState(() { + this.messageType = widget.messageType; + this.appointHistory = widget.appointment; }); + requestPermissions(); + super.initState(); } @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return BaseView( allowAny: true, builder: (_, model, widget) => AppScaffold( @@ -138,14 +157,59 @@ class _SendFeedbackPageState extends State { InkWell( onTap: () { setState(() { - isShowListAppointHistory = true; + isShowListAppointHistory = true; }); }, child: Container( margin: EdgeInsets.all(8.0), - color: Colors.white, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8) + ), child: Row( children: [ + Container( + width: projectViewModel.isArabic ? 27 : 20, + height: projectViewModel.isArabic ? 105 : 90, + decoration: BoxDecoration( + //Colors.red[900] Color(0xff404545) + color: appointHistory.isLiveCareAppointment + ? Color(0xff404545) + : !appointHistory.isInOutPatient + ? Colors.red[900] + : Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topLeft: projectViewModel.isArabic + ? Radius.circular(0) + : Radius.circular(8), + bottomLeft: projectViewModel.isArabic + ? Radius.circular(0) + : Radius.circular(8), + topRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0), + bottomRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0), + ), + ), + child: RotatedBox( + quarterTurns: 3, + child: Center( + child: Text( + appointHistory.isLiveCareAppointment + ? TranslationBase.of(context).liveCare.toUpperCase() + : !appointHistory.isInOutPatient + ? TranslationBase.of(context) + .inPatient + .toUpperCase() + : TranslationBase.of(context) + .outpatient + .toUpperCase(), + style: TextStyle(color: Colors.white,fontSize: 12), + ), + )), + ), Expanded( flex: 4, child: Column( @@ -176,9 +240,7 @@ class _SendFeedbackPageState extends State { ), Texts( DateUtil - .getMonthDayYearDateFormatted( - appointHistory - .appointmentDate), + .getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)), variant: 'caption3', ), StarRating( @@ -272,10 +334,7 @@ class _SendFeedbackPageState extends State { bold: true, ), Texts( - DateUtil.getMonthDayYearDateFormatted(model - .appointHistoryList[ - index] - .appointmentDate), + DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)), variant: 'caption3', ), StarRating( @@ -350,8 +409,6 @@ class _SendFeedbackPageState extends State { controller: messageController, suffixIcon: Icons.mic, onSuffixTap: () { - requestPermissions(); - openSpeechReco(); }, onChanged: (v) { @@ -615,6 +672,7 @@ class FeedbackTypeDialogState extends State { @override void initState() { messageTypeDialog = widget.messageTypeDialog; + super.initState(); } diff --git a/lib/pages/final_products_page.dart b/lib/pages/final_products_page.dart index 1d5e511b..843d1d56 100644 --- a/lib/pages/final_products_page.dart +++ b/lib/pages/final_products_page.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -12,6 +13,8 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter/src/widgets/image.dart' as flutterImage; import 'base/base_view.dart'; + +dynamic languageID; class FinalProductsPage extends StatefulWidget { final String id; final int productType; // 1 : default, 2 : manufacturer , 3 : recently viewed @@ -33,6 +36,15 @@ class _FinalProductsPageState extends State { color: Colors.blue, size: 29.0, ); + + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + + void initState() { + getLanguageID(); + super.initState(); + } @override Widget build(BuildContext context) { return BaseView( @@ -55,7 +67,7 @@ class _FinalProductsPageState extends State { builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget child) => PharmacyAppScaffold( - appBarTitle: "Products", + appBarTitle: TranslationBase.of(context).products, isBottomBar: false, isShowAppBar: true, backgroundColor: Colors.white, @@ -74,7 +86,7 @@ class _FinalProductsPageState extends State { Padding( padding: EdgeInsets.all(8.0), child: Texts( - 'Products', + TranslationBase.of(context).products, fontWeight: FontWeight.w600, ), ), @@ -213,11 +225,7 @@ class _FinalProductsPageState extends State { ), ), Container( - width: model - .finalProducts[ - index] - .rxMessage != - null + width: model.finalProducts[index].rxMessage != null ? MediaQuery.of( context) .size @@ -235,23 +243,15 @@ class _FinalProductsPageState extends State { .circular( 6)), ), - child: Texts( - model - .finalProducts[ - index] - .rxMessage != - null - ? model - .finalProducts[ - index] - .rxMessage - : "", + child:model.finalProducts[index].rxMessage != null + ? Texts( languageID == 'ar' ? model.finalProducts[index].rxMessagen + : model.finalProducts[index].rxMessage, color: Colors.white, regular: true, fontSize: 10, fontWeight: FontWeight.w600, - ), + ): Texts(""), ), ], ), diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart index cf58e815..be87f5b8 100644 --- a/lib/pages/insurance/insurance_card_screen.dart +++ b/lib/pages/insurance/insurance_card_screen.dart @@ -46,7 +46,7 @@ class _InsuranceCardState extends State { infoList: TranslationBase.of(context).infoInsuranceCardsPoints, imagesInfo: imagesInfo, appBarIcons: [ - IconButton( + model.isLogin ? IconButton( padding: EdgeInsets.zero, icon: Container( decoration: BoxDecoration( @@ -64,7 +64,7 @@ class _InsuranceCardState extends State { onPressed: () { Navigator.push(context, FadePage(page: InsuranceUpdate())); }, - ), + ) : Container(), ], body: Container( margin: EdgeInsets.only(left: SizeConfig.screenWidth * 0.004, right: SizeConfig.screenWidth * 0.004, top: SizeConfig.screenWidth * 0.04), diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index b64d2330..9ba5ad9c 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -1,11 +1,10 @@ -import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; @@ -21,7 +20,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:feather_icons_flutter/feather_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -64,8 +62,7 @@ class _HomePageState extends State { width: double.infinity, height: 210, decoration: BoxDecoration( - image: DecorationImage( - image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover), + image: DecorationImage(image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover), ), child: Stack( children: [ @@ -84,8 +81,7 @@ class _HomePageState extends State { margin: EdgeInsets.all(5), decoration: BoxDecoration( image: DecorationImage( - image: - AssetImage("assets/images/new-design/covid_bg_transparent.png"), + image: AssetImage("assets/images/new-design/covid_bg_transparent.png"), fit: BoxFit.fill, ), color: Colors.white.withOpacity(0.3), @@ -115,10 +111,7 @@ class _HomePageState extends State { margin: EdgeInsets.only( top: 15.0, ), - child: SvgPicture.asset( - 'assets/images/new-design/covid-19-car.svg', - width: 45.0, - height: 45.0), + child: SvgPicture.asset('assets/images/new-design/covid-19-car.svg', width: 45.0, height: 45.0), ), Container( margin: EdgeInsets.only(top: 5.0), @@ -140,12 +133,11 @@ class _HomePageState extends State { textColor: Colors.white, disabledTextColor: Colors.white, disabledColor: new Color(0xFFbcc2c4), - onPressed: - (model.user != null && model.user.outSA == 1) - ? () {} - : () { - navigateToCovidDriveThru(); - }, + onPressed: (model.user != null && model.user.outSA == 1) + ? () {} + : () { + navigateToCovidDriveThru(); + }, child: Center( child: Center( child: Center( @@ -177,13 +169,9 @@ class _HomePageState extends State { height: 125, padding: EdgeInsets.all(15), margin: EdgeInsets.all(5), - decoration: BoxDecoration( - color: Colors.white.withOpacity(0.3), - borderRadius: BorderRadius.all(Radius.circular(5))), + decoration: BoxDecoration(color: Colors.white.withOpacity(0.3), borderRadius: BorderRadius.all(Radius.circular(5))), child: SvgPicture.asset( - projectViewModel.isArabic - ? 'assets/images/new-design/livecare_arabic_logo.svg' - : 'assets/images/new-design/liveCare_white_logo.svg', + projectViewModel.isArabic ? 'assets/images/new-design/livecare_arabic_logo.svg' : 'assets/images/new-design/liveCare_white_logo.svg', ), ), ), @@ -200,10 +188,8 @@ class _HomePageState extends State { ), Positioned( top: 155, - left: MediaQuery.of(context).size.width * - (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), - right: MediaQuery.of(context).size.width * - (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), + left: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), + right: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), child: (!model.isLogin) ? Container( width: double.infinity, @@ -213,8 +199,7 @@ class _HomePageState extends State { shape: BoxShape.rectangle, border: Border.all(color: Colors.transparent, width: 0.5), borderRadius: BorderRadius.all(Radius.circular(9)), - image: DecorationImage( - image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)), + image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)), child: Container( margin: EdgeInsets.all(5), child: Column( @@ -235,8 +220,7 @@ class _HomePageState extends State { fontSize: 16, ), Align( - alignment: - projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight, + alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight, child: InkWell( onTap: () { widget.goToMyProfile(); @@ -274,8 +258,7 @@ class _HomePageState extends State { shape: BoxShape.rectangle, border: Border.all(color: Colors.transparent, width: 0.5), borderRadius: BorderRadius.all(Radius.circular(9)), - image: DecorationImage( - image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover), + image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover), ), child: Container( margin: EdgeInsets.all(5), @@ -302,8 +285,7 @@ class _HomePageState extends State { ), Container( margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0), - child: SvgPicture.asset( - "assets/images/new-design/verification_check.svg"), + child: SvgPicture.asset("assets/images/new-design/verification_check.svg"), ), ], ) @@ -318,8 +300,7 @@ class _HomePageState extends State { ), Container( margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0), - child: SvgPicture.asset( - "assets/images/new-design/pending.svg"), + child: SvgPicture.asset("assets/images/new-design/pending.svg"), ), ], ) @@ -407,8 +388,7 @@ class _HomePageState extends State { width: 25, height: 40, ), - Texts('${model.weightKg} ${TranslationBase.of(context).kg}', - color: Colors.white, fontSize: 17) + Texts('${model.weightKg} ${TranslationBase.of(context).kg}', color: Colors.white, fontSize: 17) ], ), ), @@ -465,9 +445,7 @@ class _HomePageState extends State { ), ), ), - if (projectViewModel.havePrivilege(64) || - projectViewModel.havePrivilege(65) || - projectViewModel.havePrivilege(67)) + if (projectViewModel.havePrivilege(64) || projectViewModel.havePrivilege(65) || projectViewModel.havePrivilege(67)) Container( margin: EdgeInsets.only(left: 15, right: 15), child: Row( @@ -487,9 +465,7 @@ class _HomePageState extends State { }, child: Center( child: Padding( - padding: (model.user != null && model.user.outSA == 1) - ? const EdgeInsets.all(0.0) - : const EdgeInsets.all(15.0), + padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0), child: (model.user != null && model.user.outSA == 1) ? Container( width: double.infinity, @@ -526,13 +502,10 @@ class _HomePageState extends State { ), if (projectViewModel.havePrivilege(65)) DashboardItem( - onTap: () => - (model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model), + onTap: () => (model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model), child: Center( child: Padding( - padding: (model.user != null && model.user.outSA == 1) - ? const EdgeInsets.all(0.0) - : const EdgeInsets.all(15.0), + padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0), child: (model.user != null && model.user.outSA == 1) ? Container( width: double.infinity, @@ -587,9 +560,7 @@ class _HomePageState extends State { }, child: Center( child: Padding( - padding: (model.user != null && model.user.outSA == 1) - ? const EdgeInsets.all(0.0) - : const EdgeInsets.all(15.0), + padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0), child: (model.user != null && model.user.outSA == 1) ? Container( width: double.infinity, @@ -630,14 +601,14 @@ class _HomePageState extends State { SizedBox( height: 8, ), - InkWell( - onTap: () => Navigator.push(context, FadePage(page: PaymentService())), - child: Container( - margin: EdgeInsets.only(left: 15, right: 15), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( + Container( + margin: EdgeInsets.only(left: 15, right: 15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + onTap: () => Navigator.push(context, FadePage(page: PaymentService())), + child: Container( width: MediaQuery.of(context).size.width * 0.29, child: Center( child: Padding( @@ -668,7 +639,12 @@ class _HomePageState extends State { color: Colors.white, ), ), - Container( + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: EReferralPage())); + }, + child: Container( child: Center( child: Padding( padding: const EdgeInsets.all(15.0), @@ -683,7 +659,7 @@ class _HomePageState extends State { height: 10, ), Texts( - TranslationBase.of(context).offersAndPackages, + TranslationBase.of(context).ereferral, textAlign: TextAlign.center, color: Colors.black87, bold: false, @@ -699,51 +675,52 @@ class _HomePageState extends State { borderRadius: BorderRadius.circular(6.0), color: Colors.white, )), - if (projectViewModel.havePrivilege(60)) - Container( - width: MediaQuery.of(context).size.width * 0.29, - child: InkWell( - onTap: () => Navigator.push( - context, - FadePage( - page: ErOptions( - isAppbar: true, - ))), - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/Dr_Schedule_report.png', - width: 50, - height: 50, - ), - SizedBox( - height: 10, - ), - Texts( - TranslationBase.of(context).emergencyServices, - textAlign: TextAlign.center, - color: Colors.black87, - bold: false, - fontSize: SizeConfig.textMultiplier * 1.7, - ) - ], - ), + ), + if (projectViewModel.havePrivilege(60)) + Container( + width: MediaQuery.of(context).size.width * 0.29, + child: InkWell( + onTap: () => Navigator.push( + context, + FadePage( + page: ErOptions( + isAppbar: true, + ))), + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/Dr_Schedule_report.png', + width: 50, + height: 50, + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).emergencyServices, + textAlign: TextAlign.center, + color: Colors.black87, + bold: false, + fontSize: SizeConfig.textMultiplier * 1.7, + ) + ], ), ), ), - height: MediaQuery.of(context).size.width * 0.4, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6.0), - color: Colors.white, - ), ), - ], - ), + height: MediaQuery.of(context).size.width * 0.4, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.0), + color: Colors.white, + ), + ), + ], ), ), + // ), SizedBox( height: 5, ), @@ -867,17 +844,7 @@ class _HomePageState extends State { } class DashboardItem extends StatelessWidget { - const DashboardItem( - {this.hasBorder = false, - this.imageName, - @required this.child, - this.onTap, - Key key, - this.width, - this.height, - this.color, - this.opacity = 0.4, - this.hasColorFilter = true}) + const DashboardItem({this.hasBorder = false, this.imageName, @required this.child, this.onTap, Key key, this.width, this.height, this.color, this.opacity = 0.4, this.hasColorFilter = true}) : super(key: key); final bool hasBorder; final String imageName; @@ -907,15 +874,12 @@ class DashboardItem extends StatelessWidget { : HexColor('#050705').withOpacity(opacity) : Colors.white, borderRadius: BorderRadius.circular(6.0), - border: hasBorder - ? Border.all(width: 1.0, color: const Color(0xffcccccc)) - : Border.all(width: 0.0, color: Colors.transparent), + border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent), image: imageName != null ? DecorationImage( image: ExactAssetImage('assets/images/$imageName'), fit: BoxFit.cover, - colorFilter: - hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null, + colorFilter: hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null, ) : null, ), diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index ab9982d3..d57e3da7 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -105,7 +105,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { if (currentTab > 0 && tab == 2) pageController.jumpToPage(0); else if (tab != 0) { - if (tab == 4 && model.count == 0) { + if (tab == 4 && projectViewModel.isLogin && model.count == 0) { AppToast.showErrorToast( message: TranslationBase.of(context).noBookedAppo); } else { @@ -180,8 +180,12 @@ class _LandingPageState extends State with WidgetsBindingObserver { locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); - WidgetsBinding.instance - .addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + WidgetsBinding.instance.addPostFrameCallback((_) { + locationUtils.getCurrentLocation(); + if (projectViewModel.isLogin) { + familyFileProvider.getSharedRecordByStatus(); + } + }); // HMG (Guest/Internet) Wifi Access [Zohaib Kambrani] HMGNetworkConnectivity(context, () { GifLoaderDialogUtils.showMyDialog(context); @@ -195,7 +199,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { } requestPermissions().then((results) { - registerGeofences(); + // registerGeofences(); if (results[Permission.notification].isGranted) _firebaseMessaging.getToken().then((String token) { @@ -471,8 +475,6 @@ class _LandingPageState extends State with WidgetsBindingObserver { }) } }); - - // familyFileProvider.getSharedRecordByStatus(); } } } @@ -481,6 +483,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { Widget build(BuildContext context) { projectViewModel = Provider.of(context); model = Provider.of(context); + return Scaffold( appBar: AppBar( elevation: 0, diff --git a/lib/pages/landing/landing_page_pharmcy.dart b/lib/pages/landing/landing_page_pharmcy.dart index 04c9bb54..5da853fb 100644 --- a/lib/pages/landing/landing_page_pharmcy.dart +++ b/lib/pages/landing/landing_page_pharmcy.dart @@ -43,7 +43,7 @@ class _LandingPagePharmacyState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: currentTab != 4 + appBar: currentTab != 4 && currentTab != 3 ? AppBar( backgroundColor: Color(0xff5AB145), elevation: 0, @@ -55,7 +55,7 @@ class _LandingPagePharmacyState extends State { ), child: InkWell( child: Padding( - padding: EdgeInsets.all(8.0), + padding: EdgeInsets.all(5.0), child: Row( //crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.start, @@ -172,7 +172,7 @@ class _LandingPagePharmacyState extends State { .getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode", onSuccess: (dynamic response, int statusCode) { print(response); - var product = PharmacyProduct.fromJson(response["products"][0]); + product = PharmacyProduct.fromJson(response["products"][0]); GifLoaderDialogUtils.hideDialog(context); Navigator.push(context, FadePage(page: ProductDetailPage(product))); }, onFailure: (String error, int statusCode) { diff --git a/lib/pages/livecare/livecare_home.dart b/lib/pages/livecare/livecare_home.dart index d74dd6c8..2cadd239 100644 --- a/lib/pages/livecare/livecare_home.dart +++ b/lib/pages/livecare/livecare_home.dart @@ -1,3 +1,6 @@ +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart'; @@ -28,6 +31,8 @@ class _LiveCareHomeState extends State ErRequestHistoryList pendingERRequestHistoryList; + AuthenticatedUserObject authenticatedUserObject = locator(); + @override void initState() { _tabController = new TabController(length: 2, vsync: this); @@ -40,7 +45,7 @@ class _LiveCareHomeState extends State imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/ar/0.png')); WidgetsBinding.instance.addPostFrameCallback((_) { - if (!isDataLoaded) getLiveCareHistory(); + if (!isDataLoaded && authenticatedUserObject.isLogin) getLiveCareHistory(); }); super.initState(); diff --git a/lib/pages/livecare/widgets/clinic_card.dart b/lib/pages/livecare/widgets/clinic_card.dart index 0d9f056c..6a7573d7 100644 --- a/lib/pages/livecare/widgets/clinic_card.dart +++ b/lib/pages/livecare/widgets/clinic_card.dart @@ -39,7 +39,7 @@ class _State extends State { children: [ Card( margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0), - color: widget.isSelected ? Colors.blue : widget.isOnline == 1 ? Colors.white : Colors.grey, + color: widget.isSelected ? Color(0xff06b806) : widget.patientERGetClinicsList.isOnline == 1 ? Colors.white : Colors.grey, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10), ), diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 0e8c64f1..94bce343 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -39,6 +39,9 @@ class _clinic_listState extends State { int currentSelectedIndex = 0; LiveCareClinicsListResponse liveCareClinicsListResponse; + List liveCareOnlineClinicsListResponse; + List liveCareOfflineClinicsListResponse; + LiveCareScheduleClinicsListResponse liveCareScheduleClinicsListResponse; bool isDataLoaded = false; @@ -57,14 +60,21 @@ class _clinic_listState extends State { bool isLiveCareTypeSelected = false; + String liveCareClinicIDs; + @override void initState() { liveCareClinicsListResponse = new LiveCareClinicsListResponse(); - liveCareScheduleClinicsListResponse = - new LiveCareScheduleClinicsListResponse(); + + liveCareOnlineClinicsListResponse = new List(); + liveCareOfflineClinicsListResponse = new List(); + + liveCareScheduleClinicsListResponse = new LiveCareScheduleClinicsListResponse(); WidgetsBinding.instance.addPostFrameCallback((_) { - if (!isLiveCareTypeSelected) openLiveCareSelectionDialog(); + if (!isLiveCareTypeSelected) { + openLiveCareSelectionDialog(); + } }); getLanguageID(); @@ -73,18 +83,14 @@ class _clinic_listState extends State { @override Widget build(BuildContext context) { - return SingleChildScrollView( - child: currentSelectedLiveCareType == "immediate" - ? getLiveCareImmediateClinicList() - : getLiveCareScheduleClinicList()); + return SingleChildScrollView(child: currentSelectedLiveCareType == "immediate" ? getLiveCareImmediateClinicList() : getLiveCareScheduleClinicList()); } void startLiveCare() { bool isError = false; LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); - ERAppointmentFeesResponse erAppointmentFeesResponse = - new ERAppointmentFeesResponse(); + ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse(); service.getERAppointmentFees(selectedClinicID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['HasAppointment'] == true) { @@ -94,9 +100,7 @@ class _clinic_listState extends State { erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res); isError = false; } - if (!isError) - getERAppointmentTime( - erAppointmentFeesResponse.getERAppointmentFeesList); + if (!isError) getERAppointmentTime(erAppointmentFeesResponse.getERAppointmentFeesList); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err); @@ -154,8 +158,7 @@ class _clinic_listState extends State { service.getERAppointmentTime(selectedClinicID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); print(res); - showLiveCarePaymentDialog( - getERAppointmentFeesList, res['WatingtimeInteger']); + showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err); @@ -163,22 +166,16 @@ class _clinic_listState extends State { }); } - showLiveCarePaymentDialog( - GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) { + showLiveCarePaymentDialog(GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) { showGeneralDialog( barrierColor: Colors.black.withOpacity(0.5), transitionBuilder: (context, a1, a2, widget) { - final curvedValue = - Curves.easeInOutBack.transform(a1.value) - 1.0; + final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; return Transform( - transform: - Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), child: Opacity( opacity: a1.value, - child: LiveCarePaymentDialog( - getERAppointmentFeesList: getERAppointmentFeesList, - waitingTime: waitingTime, - clinicName: selectedClinicName), + child: LiveCarePaymentDialog(getERAppointmentFeesList: getERAppointmentFeesList, waitingTime: waitingTime, clinicName: selectedClinicName), ), ); }, @@ -189,8 +186,7 @@ class _clinic_listState extends State { pageBuilder: (context, animation1, animation2) {}) .then((value) { if (value) { - if (getERAppointmentFeesList.total == "0" || - getERAppointmentFeesList.total == "0.0") { + if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") { showLiveCareInfoDialog(getERAppointmentFeesList); } else { navigateToPaymentMethod(getERAppointmentFeesList, context); @@ -199,11 +195,9 @@ class _clinic_listState extends State { }); } - showLiveCareInfoDialog( - GetERAppointmentFeesList getERAppointmentFeesList) async { + showLiveCareInfoDialog(GetERAppointmentFeesList getERAppointmentFeesList) async { if (await this.sharedPref.getObject(USER_PROFILE) != null) { - var data = AuthenticatedUser.fromJson( - await this.sharedPref.getObject(USER_PROFILE)); + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); setState(() { authUser = data; }); @@ -212,11 +206,9 @@ class _clinic_listState extends State { showGeneralDialog( barrierColor: Colors.black.withOpacity(0.5), transitionBuilder: (context, a1, a2, widget) { - final curvedValue = - Curves.easeInOutBack.transform(a1.value) - 1.0; + final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; return Transform( - transform: - Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), child: Opacity( opacity: a1.value, child: LiveCareInfoDialog(), @@ -230,11 +222,8 @@ class _clinic_listState extends State { pageBuilder: (context, animation1, animation2) {}) .then((value) { if (value) { - if (getERAppointmentFeesList.total == "0" || - getERAppointmentFeesList.total == "0.0") { - addNewCallForPatientER(authUser.patientID.toString() + - "" + - DateTime.now().millisecondsSinceEpoch.toString()); + if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") { + addNewCallForPatientER(authUser.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString()); } else { navigateToPaymentMethod(getERAppointmentFeesList, context); } @@ -242,16 +231,14 @@ class _clinic_listState extends State { }); } - Future navigateToPaymentMethod( - GetERAppointmentFeesList getERAppointmentFeesList, context) async { + Future navigateToPaymentMethod(GetERAppointmentFeesList getERAppointmentFeesList, context) async { AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); appo.clinicID = selectedClinicID; appo.appointmentNo = DateTime.now().millisecondsSinceEpoch; if (await this.sharedPref.getObject(USER_PROFILE) != null) { - var data = AuthenticatedUser.fromJson( - await this.sharedPref.getObject(USER_PROFILE)); + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); setState(() { authUser = data; }); @@ -260,32 +247,16 @@ class _clinic_listState extends State { Navigator.push(context, FadePage(page: PaymentMethod())).then((value) { print(value); if (value != null) { - openPayment(value, authUser, - double.parse(getERAppointmentFeesList.total), appo); + openPayment(value, authUser, double.parse(getERAppointmentFeesList.total), appo); } }); } - openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, - double amount, AppoitmentAllHistoryResultList appo) { - browser = new MyInAppBrowser( - onExitCallback: onBrowserExit, - appo: appo, - onLoadStartCallback: onBrowserLoadStart); - - browser.openPaymentBrowser( - amount, - "LiveCare Payment", - Utils.getAppointmentTransID(12, appo.clinicID, appo.appointmentNo), - "12", - authenticatedUser.emailAddress, - paymentMethod, - authenticatedUser.patientType, - authenticatedUser.firstName, - authenticatedUser.patientID, - authenticatedUser, - browser, - false); + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); + + browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(12, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod, + authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID.toString()); } onBrowserLoadStart(String url) { @@ -317,19 +288,13 @@ class _clinic_listState extends State { checkPaymentStatus(AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); GifLoaderDialogUtils.showMyDialog(context); - service - .checkPaymentStatus( - Utils.getAppointmentTransID( - appo.projectID, appo.clinicID, appo.appointmentNo), - context) - .then((res) { + service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) { GifLoaderDialogUtils.hideDialog(context); print("Printing Payment Status Reponse!!!!"); print(res); String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { - addNewCallForPatientER(Utils.getAppointmentTransID( - appo.projectID, appo.clinicID, appo.appointmentNo)); + addNewCallForPatientER(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo)); } else { AppToast.showErrorToast(message: res['Response_Message']); } @@ -343,12 +308,9 @@ class _clinic_listState extends State { addNewCallForPatientER(String clientRequestID) { LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); - service - .addNewCallForPatientER(selectedClinicID, clientRequestID, context) - .then((res) { + service.addNewCallForPatientER(selectedClinicID, clientRequestID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); - AppToast.showSuccessToast( - message: "New Call has been added successfully"); + AppToast.showSuccessToast(message: "New Call has been added successfully"); widget.getLiveCareHistory(); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); @@ -370,13 +332,19 @@ class _clinic_listState extends State { print(res['PatientER_GetClinicsList'].length); if (res['MessageStatus'] == 1) { setState(() { - liveCareClinicsListResponse = - LiveCareClinicsListResponse.fromJson(res); - print(liveCareClinicsListResponse.patientERGetClinicsList.length); - selectedClinicID = - liveCareClinicsListResponse.patientERGetClinicsList[0].serviceID; - selectedClinicName = liveCareClinicsListResponse - .patientERGetClinicsList[0].serviceName; + liveCareOnlineClinicsListResponse.clear(); + liveCareClinicsListResponse = LiveCareClinicsListResponse.fromJson(res); + + liveCareClinicsListResponse.patientERGetClinicsList.forEach((clinic) { + if (clinic.isOnline == 1) { + liveCareOnlineClinicsListResponse.add(clinic); + } else { + liveCareOfflineClinicsListResponse.add(clinic); + } + }); + + selectedClinicID = liveCareClinicsListResponse.patientERGetClinicsList[0].serviceID; + selectedClinicName = liveCareClinicsListResponse.patientERGetClinicsList[0].serviceName; isDataLoaded = true; }); } else { @@ -399,14 +367,10 @@ class _clinic_listState extends State { print(res['ClinicsHaveScheduleList'].length); if (res['MessageStatus'] == 1) { setState(() { - liveCareScheduleClinicsListResponse = - LiveCareScheduleClinicsListResponse.fromJson(res); - print(liveCareScheduleClinicsListResponse - .clinicsHaveScheduleList.length); - selectedClinicID = liveCareScheduleClinicsListResponse - .clinicsHaveScheduleList[0].serviceID; - selectedClinicName = liveCareScheduleClinicsListResponse - .clinicsHaveScheduleList[0].clinicDesc; + liveCareScheduleClinicsListResponse = LiveCareScheduleClinicsListResponse.fromJson(res); + print(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length); + selectedClinicID = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[0].serviceID; + selectedClinicName = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[0].clinicDesc; isDataLoaded = true; }); } else { @@ -420,33 +384,43 @@ class _clinic_listState extends State { }); } - openLiveCareSelectionDialog() { - Navigator.of(context) - .push(new MaterialPageRoute( - builder: (BuildContext context) { - return LiveCareTypeSelect(); - }, - fullscreenDialog: true)) - .then((value) { - if (value == null) { - Navigator.pop(context); - } else { - print(value); - isLiveCareTypeSelected = true; - if (value == "immediate") { - setState(() { - currentSelectedLiveCareType = "immediate"; - }); - getLiveCareClinicsList(); - } - if (value == "schedule") { - setState(() { - currentSelectedLiveCareType = "schedule"; - }); - getLiveCareScheduleClinicsList(); + openLiveCareSelectionDialog() async { + liveCareClinicIDs = await sharedPref.getString(LIVECARE_CLINIC_DATA); + if (liveCareClinicIDs != null) { + selectedClinicID = int.parse(liveCareClinicIDs.split("-")[2]); + setState(() { + currentSelectedLiveCareType = "immediate"; + }); + getLiveCareClinicsList(); + startLiveCare(); + } else { + Navigator.of(context) + .push(new MaterialPageRoute( + builder: (BuildContext context) { + return LiveCareTypeSelect(); + }, + fullscreenDialog: true)) + .then((value) { + if (value == null) { + Navigator.pop(context); + } else { + print(value); + isLiveCareTypeSelected = true; + if (value == "immediate") { + setState(() { + currentSelectedLiveCareType = "immediate"; + }); + getLiveCareClinicsList(); + } + if (value == "schedule") { + setState(() { + currentSelectedLiveCareType = "schedule"; + }); + getLiveCareScheduleClinicsList(); + } } - } - }); + }); + } } Widget getLiveCareScheduleClinicList() { @@ -469,25 +443,15 @@ class _clinic_listState extends State { shrinkWrap: true, physics: ScrollPhysics(), padding: EdgeInsets.all(0.0), - itemCount: liveCareScheduleClinicsListResponse - .clinicsHaveScheduleList.length, + itemCount: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length, itemBuilder: (context, index) { return InkWell( onTap: () { - updateSelectedScheduleIndex( - liveCareScheduleClinicsListResponse - .clinicsHaveScheduleList[index]); + updateSelectedScheduleIndex(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index]); }, child: ScheduleClinicCard( - isSelected: selectedClinicID == - liveCareScheduleClinicsListResponse - .clinicsHaveScheduleList[index] - .serviceID - ? true - : false, - clinicsHaveScheduleList: - liveCareScheduleClinicsListResponse - .clinicsHaveScheduleList[index], + isSelected: selectedClinicID == liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index].serviceID ? true : false, + clinicsHaveScheduleList: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index], languageID: languageID, ), ); @@ -541,37 +505,51 @@ class _clinic_listState extends State { children: [ Container( margin: EdgeInsets.all(15.0), - child: Text("Online Clinics: ", - style: TextStyle( - fontSize: 20.0, fontWeight: FontWeight.bold)), + child: Text("Online Clinics: ", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + padding: EdgeInsets.all(0.0), + // itemCount: liveCareClinicsListResponse.patientERGetClinicsList.length, + itemCount: liveCareOnlineClinicsListResponse.length, + itemBuilder: (context, index) { + return InkWell( + onTap: () { + updateSelectedIndex(liveCareOnlineClinicsListResponse[index]); + }, + child: ClinicCard( + isSelected: selectedClinicID == liveCareOnlineClinicsListResponse[index].serviceID ? true : false, + patientERGetClinicsList: liveCareOnlineClinicsListResponse[index], + languageID: languageID, + ), + ); + }, + ), + Container( + margin: EdgeInsets.all(15.0), + child: Text("Offline Clinics: ", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), ), ListView.builder( scrollDirection: Axis.vertical, shrinkWrap: true, physics: ScrollPhysics(), padding: EdgeInsets.all(0.0), - itemCount: liveCareClinicsListResponse - .patientERGetClinicsList.length, + // itemCount: liveCareClinicsListResponse.patientERGetClinicsList.length, + itemCount: liveCareOfflineClinicsListResponse.length, itemBuilder: (context, index) { return InkWell( onTap: () { - if(liveCareClinicsListResponse - .patientERGetClinicsList[index].isOnline == 1) { - updateSelectedIndex(liveCareClinicsListResponse - .patientERGetClinicsList[index]); - } else { - AppToast.showErrorToast(message: "Clinic is offline"); - } + // if (liveCareClinicsListResponse.patientERGetClinicsList[index].isOnline == 1) { + // updateSelectedIndex(liveCareOnlineClinicsListResponse[index]); + // } else { + // AppToast.showErrorToast(message: "Clinic is offline"); + // } }, child: ClinicCard( - isSelected: selectedClinicID == - liveCareClinicsListResponse - .patientERGetClinicsList[index] - .serviceID - ? true - : false, - patientERGetClinicsList: liveCareClinicsListResponse - .patientERGetClinicsList[index], + isSelected: selectedClinicID == liveCareOfflineClinicsListResponse[index].serviceID ? true : false, + patientERGetClinicsList: liveCareOfflineClinicsListResponse[index], languageID: languageID, ), ); @@ -617,11 +595,8 @@ class _clinic_listState extends State { List doctorsList = []; LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); - List _patientDoctorAppointmentListHospital = - List(); - service - .getLiveCareScheduledDoctorList(context, selectedClinicID) - .then((res) { + List _patientDoctorAppointmentListHospital = List(); + service.getLiveCareScheduledDoctorList(context, selectedClinicID).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { setState(() { @@ -631,34 +606,23 @@ class _clinic_listState extends State { }); doctorsList.forEach((element) { - List doctorByHospital = - _patientDoctorAppointmentListHospital - .where( - (elementClinic) => - elementClinic.filterName == element.projectName, - ) - .toList(); + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); if (doctorByHospital.length != 0) { - _patientDoctorAppointmentListHospital[ - _patientDoctorAppointmentListHospital - .indexOf(doctorByHospital[0])] - .patientDoctorAppointmentList - .add(element); + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element); } else { - _patientDoctorAppointmentListHospital.add( - PatientDoctorAppointmentList( - filterName: element.projectName, - distanceInKMs: - element.projectDistanceInKiloMeters.toString(), - patientDoctorAppointment: element)); + _patientDoctorAppointmentListHospital + .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); } }); } else {} }); this.sharedPref.setBool(IS_LIVECARE_APPOINTMENT, true); - navigateToSearchResults( - context, doctorsList, _patientDoctorAppointmentListHospital); + navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); } else {} }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); @@ -667,19 +631,8 @@ class _clinic_listState extends State { }); } - Future navigateToSearchResults( - context, - List docList, - List - patientDoctorAppointmentListHospital) async { - Navigator.push( - context, - FadePage( - page: SearchResults( - doctorsList: docList, - isLiveCareAppointment: true, - patientDoctorAppointmentListHospital: - patientDoctorAppointmentListHospital))); + Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { + Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: true, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))); } updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) { diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index bcbcf6cb..35e9ee15 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -611,11 +611,6 @@ class _ConfirmLogin extends State { .setUser(authenticatedUserObject.user); getToDoCount(); - pharmacyModuleViewModel.generatePharmacyToken().then((value) async { - if (pharmacyModuleViewModel.error.isNotEmpty) - await pharmacyModuleViewModel.createUser(); - }); - appointmentRateViewModel .getIsLastAppointmentRatedList() .then((value) => { diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index c5da90d5..70627f8d 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -66,8 +66,8 @@ class _Login extends State { super.initState(); if(BASE_URL.contains("uat.")){ - nationalIDorFile.text = "1231755"; - mobileNumberController.text = mobileNo = "537503378"; + nationalIDorFile.text = "2001273"; + mobileNumberController.text = mobileNo = "0555416043"; } } @@ -278,11 +278,6 @@ class _Login extends State { // result['CRSVerificationStatus']; projectViewModel.user = authenticatedUserObject.user; - await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { - if (pharmacyModuleViewModel.error.isNotEmpty) - await pharmacyModuleViewModel.createUser(); - }); - appointmentRateViewModel .getIsLastAppointmentRatedList() .then((value) => { diff --git a/lib/pages/medical/ask_doctor/ask_doctor_home_page.dart b/lib/pages/medical/ask_doctor/ask_doctor_home_page.dart index 902225b1..bf892940 100644 --- a/lib/pages/medical/ask_doctor/ask_doctor_home_page.dart +++ b/lib/pages/medical/ask_doctor/ask_doctor_home_page.dart @@ -1,10 +1,6 @@ import 'dart:ui'; -import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -19,8 +15,7 @@ class AskDoctorHomPage extends StatefulWidget { _AskDoctorHomPageState createState() => _AskDoctorHomPageState(); } -class _AskDoctorHomPageState extends State - with SingleTickerProviderStateMixin { +class _AskDoctorHomPageState extends State with SingleTickerProviderStateMixin { TabController _tabController; @override @@ -40,6 +35,12 @@ class _AskDoctorHomPageState extends State return AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).askDoctor, + isShowDecPage: true, + description: TranslationBase.of(context).infoAskDoc, + imagesInfo: [ + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/0.png'), + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/1.png') + ], body: Scaffold( extendBodyBehindAppBar: true, appBar: PreferredSize( @@ -53,9 +54,7 @@ class _AskDoctorHomPageState extends State child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), child: Container( - color: Theme.of(context) - .scaffoldBackgroundColor - .withOpacity(0.8), + color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.8), height: 70.0, ), ), @@ -67,9 +66,7 @@ class _AskDoctorHomPageState extends State width: MediaQuery.of(context).size.width * 0.9, decoration: BoxDecoration( border: Border( - bottom: BorderSide( - color: Theme.of(context).dividerColor, - width: 0.9), + bottom: BorderSide(color: Theme.of(context).dividerColor, width: 0.9), ), color: Colors.white), child: Center( @@ -80,22 +77,27 @@ class _AskDoctorHomPageState extends State labelColor: Theme.of(context).primaryColor, labelPadding: EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), unselectedLabelColor: Colors.grey[800], - tabs: [ - Tab( - child: Container( - width: MediaQuery.of(context).size.width * 0.36, - child: Center( - child: Texts(TranslationBase.of(context).askDoctor), - ), + tabs: [ + Tab( + child: Container( + width: MediaQuery.of(context).size.width * 0.36, + child: Center( + child: Texts(TranslationBase.of(context).askDoctor), ), ), - Tab(child: Container( - width: MediaQuery.of(context).size.width * 0.36, + ), + Tab( + child: Container( + width: MediaQuery.of(context).size.width * 0.36, child: Center( - child: Texts(TranslationBase.of(context).doctorResponses,textAlign: TextAlign.start,), + child: Texts( + TranslationBase.of(context).doctorResponses, + textAlign: TextAlign.start, + ), ), - ),) - ], + ), + ) + ], ), ), ), @@ -109,10 +111,7 @@ class _AskDoctorHomPageState extends State child: TabBarView( physics: BouncingScrollPhysics(), controller: _tabController, - children: [ - AskDoctorPage(), - DoctorResponse() - ], + children: [AskDoctorPage(), DoctorResponse()], ), ) ], diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart index d3921d4a..d1d0293b 100644 --- a/lib/pages/medical/balance/advance_payment_page.dart +++ b/lib/pages/medical/balance/advance_payment_page.dart @@ -72,6 +72,7 @@ class _AdvancePaymentPageState extends State { imagesInfo: imagesInfo, appBarTitle: TranslationBase.of(context).advancePayment, description: TranslationBase.of(context).infoAdvancePayment, + isBottomBar: model.isLogin ? true : false, body: SingleChildScrollView( physics: ScrollPhysics(), child: Container( diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index eecb6abd..0d2fac93 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -226,7 +226,9 @@ class ConfirmPaymentPage extends StatelessWidget { advanceModel.fileNumber, authenticatedUser, browser, - false); + false, + null, + null); } onBrowserLoadStart(String url) { diff --git a/lib/pages/medical/eye/EyeMeasurementsPage.dart b/lib/pages/medical/eye/EyeMeasurementsPage.dart index 8dbe0f16..66ea0da7 100644 --- a/lib/pages/medical/eye/EyeMeasurementsPage.dart +++ b/lib/pages/medical/eye/EyeMeasurementsPage.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; @@ -24,6 +25,12 @@ class EyeMeasurementsPage extends StatelessWidget { builder: (_, model, w) => AppScaffold( isShowAppBar: true, baseViewModel: model, + description: TranslationBase.of(context).infoEye, + imagesInfo: [ + ImagesInfo( + imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/ar/0.png', + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/en/0.png') + ], appBarTitle: TranslationBase.of(context).eyeMeasurements, body: SingleChildScrollView( child: Container( diff --git a/lib/pages/medical/labs/passport_update_page.dart b/lib/pages/medical/labs/passport_update_page.dart new file mode 100644 index 00000000..1e81b2e5 --- /dev/null +++ b/lib/pages/medical/labs/passport_update_page.dart @@ -0,0 +1,125 @@ +import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class PassportUpdatePage extends StatefulWidget { + @override + _PassportUpdatePageState createState() => _PassportUpdatePageState(); +} + +class _PassportUpdatePageState extends State { + TextEditingController passportNumber = new TextEditingController(); + bool _isButtonDisabled; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) => getPassportNumber()); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).passportNumber, + isShowAppBar: true, + isBottomBar: true, + body: Container( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: EdgeInsets.all(45.0), + child: Text(TranslationBase.of(context).enterPassportNumber, textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, color: Colors.black)), + ), + Container( + margin: EdgeInsets.only(top: 5.0, bottom: 5.0), + child: SvgPicture.asset("assets/images/new-design/passport.svg", width: 250.0, fit: BoxFit.fill), + ), + Container( + margin: EdgeInsets.only(left: 50.0, right: 50.0, top: 25.0), + child: TextFields( + keyboardType: TextInputType.text, + fontWeight: FontWeight.normal, + controller: passportNumber, + onChanged: (value) => {_onPassportTextChanged(value)}, + padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10), + hintText: TranslationBase.of(context).passportNumber, + )) + ], + ), + ), + ), + bottomSheet: Container( + margin: EdgeInsets.only(top: 10.0, left: 30.0, right: 30.0, bottom: 10.0), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width, + height: 45.0, + child: RaisedButton( + color: new Color(0xFFc5272d), + textColor: Colors.white, + disabledTextColor: Colors.white, + disabledColor: Colors.red[300], + onPressed: () { + if (_isButtonDisabled == false) + updatePassportNumber(); + else + AppToast.showErrorToast(message: TranslationBase.of(context).validPassportNumber); + }, + child: Text(TranslationBase.of(context).submit, style: TextStyle(fontSize: 18.0)), + ), + ), + ), + ); + } + + _onPassportTextChanged(content) { + if (content.length >= 1) { + setState(() { + _isButtonDisabled = false; + }); + } else { + setState(() { + _isButtonDisabled = true; + }); + } + } + + void updatePassportNumber() { + LabsService service = new LabsService(); + GifLoaderDialogUtils.showMyDialog(context); + + service.updateCovidPassportNumber(passportNumber.text).then((res) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.of(context).pop(true); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void getPassportNumber() { + LabsService service = new LabsService(); + GifLoaderDialogUtils.showMyDialog(context); + + service.getCovidPassportNumber().then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['Covid19_Certificate_GetPassportList'][0]['PassportNo']); + passportNumber.text = res['Covid19_Certificate_GetPassportList'][0]['PassportNo']; + if(res['Covid19_Certificate_GetPassportList'][0]['PassportNo'] != "") { + _isButtonDisabled = false; + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index 8d49a89b..6f46388b 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -1,51 +1,16 @@ -import 'dart:math'; - -import 'package:badges/badges.dart'; -import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; -import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; -import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/reports/monthly_reports.dart'; -import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; -import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart'; -import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; -import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_widget.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; -import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/others/sliver_app_bar_delegate.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; import 'package:provider/provider.dart'; -import '../../locator.dart'; -import '../../uitl/gif_loader_dialog_utils.dart'; -import 'active_medications/ActiveMedicationsPage.dart'; -import 'allergies_page.dart'; -import 'ask_doctor/ask_doctor_home_page.dart'; -import 'balance/my_balance_page.dart'; -import 'doctor/doctor_home_page.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; -import 'eye/EyeHomePage.dart'; -import 'eye/EyeMeasurementsPage.dart'; -import 'labs/labs_home_page.dart'; -import 'my_trackers/my_trackers.dart'; class MedicalProfilePage extends StatefulWidget { @override diff --git a/lib/pages/medical/my_invoices/my_invoice_page.dart b/lib/pages/medical/my_invoices/my_invoice_page.dart index 2af80adc..b49879bc 100644 --- a/lib/pages/medical/my_invoices/my_invoice_page.dart +++ b/lib/pages/medical/my_invoices/my_invoice_page.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart' as DoctorListResponse; @@ -24,21 +25,28 @@ class _MyInvoicesState extends State { GetDentalAppointmentsResponse getDentalAppointmentsResponse; DentalInvoiceDetailResponse dentalInvoiceDetailResponse; + ProjectViewModel projectViewModel; + List imagesInfo = List(); + @override void initState() { + imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/ar/0.png')); + WidgetsBinding.instance.addPostFrameCallback((_) { - getDentalAppointments(); + if(projectViewModel.isLogin) + getDentalAppointments(); }); super.initState(); } @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); + projectViewModel = Provider.of(context); return AppScaffold( appBarTitle: TranslationBase.of(context).myInvoice, isShowAppBar: true, isShowDecPage: true, + imagesInfo: imagesInfo, body: Container( child: SingleChildScrollView( physics: BouncingScrollPhysics(), diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 2c71ab14..0c7fea59 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -42,7 +42,8 @@ class AddBloodPressurePage extends StatefulWidget { class _AddBloodPressurePageState extends State { TextEditingController _bloodSystolicValueController = TextEditingController(); - TextEditingController _bloodDiastolicValueController = TextEditingController(); + TextEditingController _bloodDiastolicValueController = + TextEditingController(); DateTime bloodSugarDate = DateTime.now(); DateTime timeSugarDate = DateTime.now(); int measuredArm = 1; @@ -80,7 +81,9 @@ class _AddBloodPressurePageState extends State { return AppScaffold( isShowAppBar: true, - appBarTitle: widget.isUpdate ? TranslationBase.of(context).update : TranslationBase.of(context).add, + appBarTitle: widget.isUpdate + ? TranslationBase.of(context).update + : TranslationBase.of(context).add, appBarIcons: widget.isUpdate ? [ IconButton( @@ -96,10 +99,14 @@ class _AddBloodPressurePageState extends State { ConfirmDialog.closeAlertDialog(context); GifLoaderDialogUtils.showMyDialog(context); - widget.model.deactivateDiabeticStatus(lineItemNo: widget.lineItemNo).then((value) { + widget.model + .deactivateDiabeticStatus( + lineItemNo: widget.lineItemNo) + .then((value) { GifLoaderDialogUtils.hideDialog(context); if (widget.model.state == ViewState.ErrorLocal) - AppToast.showErrorToast(message: widget.model.error); + AppToast.showErrorToast( + message: widget.model.error); else Navigator.pop(context); }).catchError((e) { @@ -144,13 +151,17 @@ class _AddBloodPressurePageState extends State { ), InkWell( onTap: () { - confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeArList : measureTimeEnList); + confirmSelectMeasureTimeDialog(projectViewModel.isArabic + ? measureTimeArList + : measureTimeEnList); }, child: Container( padding: EdgeInsets.all(12), width: double.infinity, height: 65, - decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -177,13 +188,17 @@ class _AddBloodPressurePageState extends State { bloodSugarDate = date; }, ); - }, currentTime: bloodSugarDate, locale: projectViewModel.localeType); + }, + currentTime: bloodSugarDate, + locale: projectViewModel.localeType); }, child: Container( padding: EdgeInsets.all(12), width: double.infinity, height: 65, - decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -198,22 +213,30 @@ class _AddBloodPressurePageState extends State { ), InkWell( onTap: () { - DatePicker.showTimePicker(context, showTitleActions: true, onConfirm: (date) { + DatePicker.showTimePicker(context, showTitleActions: true, + onConfirm: (date) { setState( () { timeSugarDate = date; }, ); - }, currentTime: timeSugarDate, locale: projectViewModel.localeType); + }, + currentTime: timeSugarDate, + locale: projectViewModel.localeType); }, child: Container( padding: EdgeInsets.all(12), width: double.infinity, height: 65, - decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [Texts(TranslationBase.of(context).time), Texts(getTime())], + children: [ + Texts(TranslationBase.of(context).time), + Texts(getTime()) + ], ), ), ), @@ -229,38 +252,44 @@ class _AddBloodPressurePageState extends State { widthFactor: 0.9, child: Column( children: [ - SecondaryButton( - loading: widget.model.state == ViewState.BusyLocal, - label: TranslationBase.of(context).save.toUpperCase(), - textColor: Colors.white, - color: isButtonDisabled ? Colors.grey[900] : Colors.grey, - onTap: () async { - if (_bloodSystolicValueController.text.isNotEmpty && - _bloodDiastolicValueController.text.isNotEmpty) { - GifLoaderDialogUtils.showMyDialog(context); + Container( + height: 50, + child: SecondaryButton( + loading: widget.model.state == ViewState.BusyLocal, + label: TranslationBase.of(context).save.toUpperCase(), + textColor: Colors.white, + color: isButtonDisabled ? Colors.grey[900] : Colors.grey, + onTap: () async { + if (_bloodSystolicValueController.text.isNotEmpty && + _bloodDiastolicValueController.text.isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); - widget.model - .addORUpdateDiabtecResult( - isUpdate: widget.isUpdate, - bloodPressureDate: - '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', - diastolicPressure: _bloodDiastolicValueController.text.toString(), - systolicePressure: _bloodSystolicValueController.text.toString(), - measuredArm: measuredArm, - ) - .then((value) { - GifLoaderDialogUtils.hideDialog(context); - if (widget.model.state == ViewState.BusyLocal) + widget.model + .addORUpdateDiabtecResult( + isUpdate: widget.isUpdate, + bloodPressureDate: + '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', + diastolicPressure: + _bloodDiastolicValueController.text.toString(), + systolicePressure: + _bloodSystolicValueController.text.toString(), + measuredArm: measuredArm, + ) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (widget.model.state == ViewState.BusyLocal) + AppToast.showErrorToast( + message: widget.model.error); + else + Navigator.pop(context); + ; + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: widget.model.error); - else - Navigator.pop(context); - ; - }).catchError((e) { - GifLoaderDialogUtils.hideDialog(context); - AppToast.showErrorToast(message: widget.model.error); - }); - } - }), + }); + } + }), + ), ], ), ), @@ -295,7 +324,8 @@ class _AddBloodPressurePageState extends State { } void validateForm() { - print("_bloodSystolicValueController " + _bloodSystolicValueController.text.length.toString()); + print("_bloodSystolicValueController " + + _bloodSystolicValueController.text.length.toString()); if (measureTimeSelectedType != 'Left Arm' && _bloodSystolicValueController.text.length > 0 && _bloodDiastolicValueController.text.length > 0) { diff --git a/lib/pages/medical/my_trackers/my_trackers.dart b/lib/pages/medical/my_trackers/my_trackers.dart index c133c67a..b9450fd5 100644 --- a/lib/pages/medical/my_trackers/my_trackers.dart +++ b/lib/pages/medical/my_trackers/my_trackers.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -15,7 +16,11 @@ class MyTrackers extends StatelessWidget { return AppScaffold( appBarTitle: TranslationBase.of(context).myTracker, isShowAppBar: true, - isShowDecPage: false, + isShowDecPage: true, + description: TranslationBase.of(context).infoTrackers, + imagesInfo: [ + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/ar/0.png') + ], body: SingleChildScrollView( child: Container( padding: EdgeInsets.all(12), @@ -33,8 +38,7 @@ class MyTrackers extends StatelessWidget { margin: EdgeInsets.all(5), width: MediaQuery.of(context).size.width * 0.35, height: MediaQuery.of(context).size.width * 0.35, - decoration: BoxDecoration( - shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white), + decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white), child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, @@ -59,8 +63,7 @@ class MyTrackers extends StatelessWidget { margin: EdgeInsets.all(5), width: MediaQuery.of(context).size.width * 0.35, height: MediaQuery.of(context).size.width * 0.35, - decoration: BoxDecoration( - shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white), + decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white), child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, @@ -90,8 +93,7 @@ class MyTrackers extends StatelessWidget { margin: EdgeInsets.all(5), width: MediaQuery.of(context).size.width * 0.35, height: MediaQuery.of(context).size.width * 0.35, - decoration: BoxDecoration( - shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white), + decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white), child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/pages/medical/patient_sick_leave_page.dart b/lib/pages/medical/patient_sick_leave_page.dart index 196b5d79..dcedc714 100644 --- a/lib/pages/medical/patient_sick_leave_page.dart +++ b/lib/pages/medical/patient_sick_leave_page.dart @@ -47,7 +47,7 @@ class _PatientSickLeavePageState extends State { itemBuilder: (context, index) => DoctorCard( isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment, name: model.sickLeaveList[index].doctorName, - date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].requestDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].requestDate), + date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].appointmentDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].appointmentDate), profileUrl: model.sickLeaveList[index].doctorImageURL, rat: model.sickLeaveList[index].actualDoctorRate.toDouble(), subName: model.sickLeaveList[index].projectName, diff --git a/lib/pages/medical/reports/monthly_reports.dart b/lib/pages/medical/reports/monthly_reports.dart index 80f6ac76..f6635063 100644 --- a/lib/pages/medical/reports/monthly_reports.dart +++ b/lib/pages/medical/reports/monthly_reports.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart'; @@ -24,6 +25,23 @@ class _MonthlyReportsPageState extends State { String email; final formKey = GlobalKey(); + List imagesInfo = List(); + + @override + void initState() { + imagesInfo.add(ImagesInfo( + imageEn: + 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/0.png', + imageAr: + 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/0.png')); + imagesInfo.add(ImagesInfo( + imageEn: + 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/1.png', + imageAr: + 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/1.png')); + super.initState(); + } + @override Widget build(BuildContext context) { return BaseView(builder: (_, model, w) { @@ -39,6 +57,8 @@ class _MonthlyReportsPageState extends State { return AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).monthlyReports, + imagesInfo: imagesInfo, + description: TranslationBase.of(context).infoMonthReport, body: SingleChildScrollView( child: Container( padding: EdgeInsets.all(12), diff --git a/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart index 977b99df..057c6be6 100644 --- a/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart +++ b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart @@ -1,9 +1,13 @@ import 'dart:io'; import 'package:carousel_slider/carousel_slider.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart'; import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -19,10 +23,13 @@ class _SmartWatchInstructionsState extends State { bool hasAlreadySynced = false; + AuthenticatedUserObject authenticatedUserObject = + locator(); + @override void initState() { WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - getLastPatientRecord(context); + if(authenticatedUserObject.isLogin) getLastPatientRecord(context); }); super.initState(); } @@ -32,6 +39,12 @@ class _SmartWatchInstructionsState extends State { return AppScaffold( appBarTitle: "Sync Health Data", isShowAppBar: true, + isShowDecPage: true, + description: TranslationBase.of(context).infoHealthData, + imagesInfo: [ + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/0.png'), + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/1.png') + ], body: Container( child: Platform.isIOS ? _getAppleWatchInstructions() diff --git a/lib/pages/parent_categorise_page.dart b/lib/pages/parent_categorise_page.dart index ba20010b..99e671ab 100644 --- a/lib/pages/parent_categorise_page.dart +++ b/lib/pages/parent_categorise_page.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_mo import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; import 'package:diplomaticquarterapp/pages/sub_categorise_page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -25,7 +26,8 @@ class ParentCategorisePage extends StatefulWidget { ParentCategorisePage({this.id, this.titleName}); @override - _ParentCategorisePageState createState() => _ParentCategorisePageState(id: id, titleName: titleName); + _ParentCategorisePageState createState() => + _ParentCategorisePageState(id: id, titleName: titleName); } class _ParentCategorisePageState extends State { @@ -56,7 +58,9 @@ class _ParentCategorisePageState extends State { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) => model.getCategoriseParent(i: id), - builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget child) => PharmacyAppScaffold( + builder: (BuildContext context, PharmacyCategoriseViewModel model, + Widget child) => + PharmacyAppScaffold( appBarTitle: titleName, isBottomBar: false, isShowAppBar: true, @@ -107,7 +111,9 @@ class _ParentCategorisePageState extends State { child: InkWell( child: Container( child: Texts( - 'View All Categories', + TranslationBase.of(context) + .viewCategorise, +// 'View All Categories', fontWeight: FontWeight.w300, ), ), @@ -124,20 +130,37 @@ class _ParentCategorisePageState extends State { color: Colors.white, child: Center( child: ListView.builder( - scrollDirection: Axis.vertical, - itemCount: model.categoriseParent.length, - itemBuilder: (BuildContext context, int index) { + scrollDirection: + Axis.vertical, + itemCount: model + .categoriseParent.length, + itemBuilder: + (BuildContext context, + int index) { return Container( child: Padding( - padding: EdgeInsets.all(4.0), + padding: + EdgeInsets.all(4.0), child: InkWell( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment + .start, children: [ - Texts(model.categoriseParent[index].name), + Texts(projectViewModel + .isArabic + ? model + .categoriseParent[ + index] + .namen + : model + .categoriseParent[ + index] + .name), Divider( thickness: 0.6, - color: Colors.black12, + color: Colors + .black12, ) ], ), @@ -145,9 +168,16 @@ class _ParentCategorisePageState extends State { Navigator.push( context, FadePage( - page: SubCategorisePage( - title: model.categoriseParent[index].name, - id: model.categoriseParent[index].id, + page: + SubCategorisePage( + title: model + .categoriseParent[ + index] + .name, + id: model + .categoriseParent[ + index] + .id, parentId: id, )), ); @@ -181,22 +211,28 @@ class _ParentCategorisePageState extends State { child: Center( child: ListView.builder( scrollDirection: Axis.horizontal, - itemCount: model.categoriseParent.length > 8 ? 8 : model.categoriseParent.length, + itemCount: model.categoriseParent.length > 8 + ? 8 + : model.categoriseParent.length, itemBuilder: (BuildContext context, int index) { return Padding( - padding: EdgeInsets.symmetric(horizontal: 8.0), + padding: + EdgeInsets.symmetric(horizontal: 8.0), child: InkWell( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Padding( - padding: EdgeInsets.symmetric(horizontal: 13.0), + padding: EdgeInsets.symmetric( + horizontal: 13.0), child: Container( height: 60.0, width: 65.0, decoration: BoxDecoration( shape: BoxShape.circle, - color: Colors.orange.shade200.withOpacity(0.45), + color: Colors.orange.shade200 + .withOpacity(0.45), ), child: Center( child: Icon( @@ -230,8 +266,10 @@ class _ParentCategorisePageState extends State { context, FadePage( page: SubCategorisePage( - title: model.categoriseParent[index].name, - id: model.categoriseParent[index].id, + title: model + .categoriseParent[index].name, + id: model + .categoriseParent[index].id, parentId: id, )), ); @@ -277,16 +315,21 @@ class _ParentCategorisePageState extends State { initialChildSize: 0.95, maxChildSize: 0.95, minChildSize: 0.9, - builder: (BuildContext context, ScrollController scrollController) { + builder: (BuildContext context, + ScrollController scrollController) { return SingleChildScrollView( controller: scrollController, child: Container( color: Colors.white, - height: MediaQuery.of(context).size.height * 1.95, + height: MediaQuery.of(context) + .size + .height * + 1.95, child: Column( children: [ Padding( - padding: EdgeInsets.all(8.0), + padding: + EdgeInsets.all(8.0), child: Row( children: [ Icon( @@ -297,7 +340,8 @@ class _ParentCategorisePageState extends State { ), Texts( 'Refine', - fontWeight: FontWeight.w600, + fontWeight: + FontWeight.w600, ), SizedBox( width: 250.0, @@ -306,11 +350,13 @@ class _ParentCategorisePageState extends State { child: Texts( 'Close', color: Colors.red, - fontWeight: FontWeight.w600, + fontWeight: + FontWeight.w600, fontSize: 15.0, ), onTap: () { - Navigator.pop(context); + Navigator.pop( + context); }, ), ], @@ -323,27 +369,37 @@ class _ParentCategorisePageState extends State { Column( children: [ ExpansionTile( - title: Texts('Categorise'), + title: + Texts('Categorise'), children: [ ProcedureListWidget( model: model, - masterList: model.categoriseParent, - removeHistory: (item) { + masterList: model + .categoriseParent, + removeHistory: + (item) { setState(() { - entityList.remove(item); + entityList + .remove( + item); }); }, - addHistory: (history) { + addHistory: + (history) { setState(() { - entityList.add(history); + entityList.add( + history); }); }, - addSelectedHistories: () { + addSelectedHistories: + () { //TODO build your fun herr // widget.addSelectedHistories(); }, - isEntityListSelected: (master) => - isEntityListSelected(master), + isEntityListSelected: + (master) => + isEntityListSelected( + master), ) ], ), @@ -356,23 +412,33 @@ class _ParentCategorisePageState extends State { children: [ ProcedureListWidget( model: model, - masterList: model.brandsList, - removeHistory: (item) { + masterList: model + .brandsList, + removeHistory: + (item) { setState(() { - entityListBrands.remove(item); + entityListBrands + .remove( + item); }); }, - addHistory: (history) { + addHistory: + (history) { setState(() { - entityListBrands.add(history); + entityListBrands + .add( + history); }); }, - addSelectedHistories: () { + addSelectedHistories: + () { //TODO build your fun herr // widget.addSelectedHistories(); }, - isEntityListSelected: (master) => - isEntityListSelectedBrands(master), + isEntityListSelected: + (master) => + isEntityListSelectedBrands( + master), ) ], ), @@ -384,40 +450,63 @@ class _ParentCategorisePageState extends State { title: Texts('Price'), children: [ Container( - color: Color(0xffEEEEEE), + color: Color( + 0xffEEEEEE), child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisAlignment: + MainAxisAlignment + .spaceAround, children: [ Column( - mainAxisAlignment: MainAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment + .start, children: [ - Texts('Min'), + Texts( + 'Min'), Container( - color: Colors.white, - width: 200, - height: 40, - child: TextFormField( - decoration: InputDecoration( - border: OutlineInputBorder(), + color: Colors + .white, + width: + 200, + height: + 40, + child: + TextFormField( + decoration: + InputDecoration( + border: + OutlineInputBorder(), ), - controller: minField, + controller: + minField, ), ), ], ), Column( - mainAxisAlignment: MainAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment + .start, children: [ - Texts('Max'), + Texts( + 'Max'), Container( - color: Colors.white, - width: 200, - height: 40, - child: TextFormField( - decoration: InputDecoration( - border: OutlineInputBorder(), + color: Colors + .white, + width: + 200, + height: + 40, + child: + TextFormField( + decoration: + InputDecoration( + border: + OutlineInputBorder(), ), - controller: maxField, + controller: + maxField, ), ), ], @@ -432,18 +521,26 @@ class _ParentCategorisePageState extends State { color: Colors.black12, ), SizedBox( - height: MediaQuery.of(context).size.height * 0.4, + height: MediaQuery.of( + context) + .size + .height * + 0.4, ), Padding( - padding: EdgeInsets.all(8.0), + padding: + EdgeInsets.all(8.0), child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + mainAxisAlignment: + MainAxisAlignment + .spaceEvenly, children: [ Container( width: 100, child: Button( label: 'Reset', - backgroundColor: Colors.red, + backgroundColor: + Colors.red, ), ), SizedBox( @@ -452,38 +549,65 @@ class _ParentCategorisePageState extends State { Container( width: 200, child: Button( - onTap: () async { - String categoriesId = ""; - for (CategoriseParentModel category in entityList) { - if (categoriesId == "") { - categoriesId = category.id; + onTap: + () async { + String + categoriesId = + ""; + for (CategoriseParentModel category + in entityList) { + if (categoriesId == + "") { + categoriesId = + category + .id; } else { - categoriesId = "$categoriesId,${category.id}"; + categoriesId = + "$categoriesId,${category.id}"; } } - String brandIds = ""; + String + brandIds = + ""; for (CategoriseParentModel brand in entityListBrands) { - if (brandIds == "") { - brandIds = brand.id; + if (brandIds == + "") { + brandIds = + brand + .id; } else { - brandIds = "$brandIds,${brand.id}"; + brandIds = + "$brandIds,${brand.id}"; } } - GifLoaderDialogUtils.showMyDialog(context); + GifLoaderDialogUtils + .showMyDialog( + context); await model.getFilteredProducts( - min: minField.text.toString(), - max: maxField.text.toString(), - categoryId: categoriesId, - brandId: brandIds); - GifLoaderDialogUtils.hideDialog(context); + min: minField + .text + .toString(), + max: maxField + .text + .toString(), + categoryId: + categoriesId, + brandId: + brandIds); + GifLoaderDialogUtils + .hideDialog( + context); - Navigator.pop(context); + Navigator.pop( + context); }, label: 'Apply', - backgroundColor: Colors.green, + backgroundColor: + Colors + .green, ), ), ], @@ -684,7 +808,13 @@ class _ParentCategorisePageState extends State { ), ), Texts( - model.parentProducts[index].name, + projectViewModel + .isArabic + ? model + .parentProducts[ + index] + .namen + :model.parentProducts[index].name, regular: true, fontSize: 12, fontWeight: FontWeight.w700, @@ -815,7 +945,14 @@ class _ParentCategorisePageState extends State { Container( width: MediaQuery.of(context).size.width * 0.65, child: Texts( - model.parentProducts[index].name, + projectViewModel.isArabic + ? model + .parentProducts[ + index] + .namen + : model + .parentProducts[ + index].name, regular: true, fontSize: 13.2, fontWeight: FontWeight.w500, @@ -836,8 +973,8 @@ class _ParentCategorisePageState extends State { Row( children: [ StarRating( - totalAverage: - model.parentProducts[index].approvedRatingSum > 0 + totalAverage:model + .parentProducts[index].approvedRatingSum > 0 ? (model.parentProducts[index].approvedRatingSum .toDouble() / model.parentProducts[index] @@ -906,7 +1043,8 @@ class _ParentCategorisePageState extends State { } bool isEntityListSelected(CategoriseParentModel masterKey) { - Iterable history = entityList.where((element) => masterKey.id == element.id); + Iterable history = + entityList.where((element) => masterKey.id == element.id); if (history.length > 0) { return true; } @@ -914,7 +1052,8 @@ class _ParentCategorisePageState extends State { } bool isEntityListSelectedBrands(CategoriseParentModel masterKey) { - Iterable history = entityListBrands.where((element) => masterKey.id == element.id); + Iterable history = + entityListBrands.where((element) => masterKey.id == element.id); if (history.length > 0) { return true; } diff --git a/lib/pages/pharmacies/ProductCheckTypeWidget.dart b/lib/pages/pharmacies/ProductCheckTypeWidget.dart index 878544e1..edecff62 100644 --- a/lib/pages/pharmacies/ProductCheckTypeWidget.dart +++ b/lib/pages/pharmacies/ProductCheckTypeWidget.dart @@ -1,47 +1,67 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/wishlist.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/widgets/pharmacy/product_tile.dart'; import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/wishlist_view_model.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; AppSharedPreferences sharedPref = AppSharedPreferences(); var languageID; -class ProductCheckTypeWidget extends StatelessWidget { + +class ProductCheckTypeWidget extends StatefulWidget { final List wishlist; final bool isTrue; ProductCheckTypeWidget(this.isTrue, this.wishlist); + @override + _ProductCheckTypeWidgetState createState() => _ProductCheckTypeWidgetState(); +} +class _ProductCheckTypeWidgetState extends State { void initState() { getLanguageID(); } @override Widget build(BuildContext context) { - return isTrue + return widget.isTrue ? ListView.builder( - itemCount: wishlist.length, + itemCount: widget.wishlist.length, itemBuilder: (BuildContext context, int index) { return Column( children: [ Container( - child: isTrue + child: widget.isTrue ? productTile( - productName: languageID == 'ar' ? wishlist[index].product.namen : wishlist[index].product.name, - productPrice: wishlist[index].subtotal, - productRate: - double.parse(wishlist[index].subtotalVatRate), - productImage: wishlist[index].product.images[0].src, - showLine: isTrue, - productID: wishlist[index].product.id, + productName: languageID == 'ar' + ? widget.wishlist[index].product.namen + : widget.wishlist[index].product.name, + productPrice: widget.wishlist[index].subtotal, + productRate: double.parse( + widget.wishlist[index].subtotalVatRate), + productImage: + widget.wishlist[index].product.images[0].src, + showLine: widget.isTrue, + productID: widget.wishlist[index].product.id, + onDelete: deleteWishListItem, + ) : productTile( - productName: languageID == 'ar' ? wishlist[index].product.namen : wishlist[index].product.name, - productPrice: wishlist[index].subtotal, - productRate: - double.parse(wishlist[index].subtotalVatRate), - productImage: wishlist[index].product.images[0].src, - showLine: isTrue, + productName: languageID == 'ar' + ? widget.wishlist[index].product.namen + : widget.wishlist[index].product.name, + productPrice: widget.wishlist[index].subtotal, + productRate: double.parse( + widget.wishlist[index].subtotalVatRate), + productImage: + widget.wishlist[index].product.images[0].src, + showLine: widget.isTrue, + onDelete: deleteWishListItem, + ), ), Divider(height: 1, color: Colors.grey) @@ -51,20 +71,43 @@ class ProductCheckTypeWidget extends StatelessWidget { : GridView.count( crossAxisCount: 2, children: List.generate( - wishlist.length, + widget.wishlist.length, (index) => productTile( - productName: wishlist[index].product.name, - productPrice: wishlist[index].subtotal, - productRate: - double.parse(wishlist[index].subtotalVatRate), - productImage: wishlist[index].product.images[0].src, - showLine: isTrue, + productName: widget.wishlist[index].product.name, + productPrice: widget.wishlist[index].subtotal, + productRate: + double.parse(widget.wishlist[index].subtotalVatRate), + productImage: + widget.wishlist[index].product.images[0].src, + showLine: widget.isTrue, )), ); } + + deleteWishListItem(itemID) async { + ProductDetailViewModel x = new ProductDetailViewModel(); + GifLoaderDialogUtils.showMyDialog(context); + await x.deletWishlistData(itemID); + setState(() + async{ + await + //getWishlistData(); + Navigator.push(context, + FadePage(page: WishlistPage(false)), + ); + }); + GifLoaderDialogUtils.hideDialog(context); + print("Delete"); + } + + + getWishlistData() async { + WishListViewModel x = new WishListViewModel(); + await x.getWishlistData(); + } + } getLanguageID() async { languageID = await sharedPref.getString(APP_LANGUAGE); } - diff --git a/lib/pages/pharmacies/compare.dart b/lib/pages/pharmacies/compare.dart index 505533cb..82a11610 100644 --- a/lib/pages/pharmacies/compare.dart +++ b/lib/pages/pharmacies/compare.dart @@ -1,3 +1,5 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:carousel_slider/carousel_slider.dart'; @@ -5,9 +7,11 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:provider/provider.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -int counter = 0; +int counter = 0; +dynamic languageID; class ComparePage extends StatefulWidget { @override _ComparePageState createState() => _ComparePageState(); @@ -15,14 +19,24 @@ class ComparePage extends StatefulWidget { //CompareList compareItems = CompareList(); class _ComparePageState extends State { + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + void initState() { + getLanguageID(); + super.initState(); + } + @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: 'Reviews page', + appBarTitle: TranslationBase.of(context).compare, isShowAppBar: true, isPharmacy: true, - body: Container( - child: compareList(), + body: SingleChildScrollView( + child: Container( + child: compareList(), + ), ), ); } @@ -50,8 +64,8 @@ class compareList extends StatelessWidget { ), Padding( padding: const EdgeInsets.all(8.0), - child: Text( - 'There is no data', + child: Text(TranslationBase.of(context).noData, +// 'There is no data', style: TextStyle(fontSize: 30), ), ) @@ -105,7 +119,7 @@ class _slideDetailState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Container( - height: 550, + height: 750, width: 150, margin: EdgeInsets.symmetric(horizontal: 10.0), decoration: BoxDecoration( @@ -157,7 +171,14 @@ class _slideDetailState extends State { child: Align( alignment: Alignment.topLeft, child: RichText( - text: TextSpan( + text: languageID == "ar"? TextSpan( + text: widget.data[index].namen, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), + ) + : TextSpan( text: widget.data[index].name, style: TextStyle( fontWeight: FontWeight.bold, @@ -173,7 +194,7 @@ class _slideDetailState extends State { alignment: Alignment.topLeft, child: RichText( text: TextSpan( - text: widget.data[index].price.toString(), + text: "SAR ${widget.data[index].price.toString()}", style: TextStyle( color: Colors.black54, fontSize: 15, @@ -195,10 +216,21 @@ class _slideDetailState extends State { child: Align( alignment: Alignment.topLeft, child: RichText( - text: TextSpan( + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[0].nameN : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), + ) + :TextSpan( text: widget.data[index].specifications != null ? widget.data[index].specifications[0].name : - "No data", +// "No data", + TranslationBase.of(context).no_data, style: TextStyle( fontWeight: FontWeight.bold, color: Colors.black, @@ -212,10 +244,82 @@ class _slideDetailState extends State { child: Align( alignment: Alignment.topLeft, child: RichText( - text: TextSpan( + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[0].defaultValuen : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + color: Colors.black54, + fontSize: 15, + fontWeight: FontWeight.bold), + ):TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[0].defaultValue : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + color: Colors.black54, + fontSize: 15, + fontWeight: FontWeight.bold), + ), + ), + ), + ), + Padding( + padding: EdgeInsets.only(top: 8.0), + child: Container( + height: 1.0, + width: 300.0, + color: Colors.grey, + ), + ), + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: Alignment.topLeft, + child: RichText( + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[1].nameN : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), + ):TextSpan( text: widget.data[index].specifications != null ? widget.data[index].specifications[1].name : - "No data", +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), + ), + ), + ), + ), + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: Alignment.topLeft, + child: RichText( + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[1].defaultValuen : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + color: Colors.black54, + fontSize: 15, + fontWeight: FontWeight.bold), + ):TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[1].defaultValue : +// "No data", + TranslationBase.of(context).no_data, style: TextStyle( color: Colors.black54, fontSize: 15, @@ -237,10 +341,20 @@ class _slideDetailState extends State { child: Align( alignment: Alignment.topLeft, child: RichText( - text: TextSpan( - text:widget.data[index].specifications != null ? + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[2].nameN : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), + ):TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications[2].name : - "No data", +// "No data", + TranslationBase.of(context).no_data, style: TextStyle( fontWeight: FontWeight.bold, color: Colors.black, @@ -254,10 +368,82 @@ class _slideDetailState extends State { child: Align( alignment: Alignment.topLeft, child: RichText( - text: TextSpan( + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[2].defaultValuen : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + color: Colors.black54, + fontSize: 15, + fontWeight: FontWeight.bold), + ):TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[2].defaultValue : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + color: Colors.black54, + fontSize: 15, + fontWeight: FontWeight.bold), + ), + ), + ), + ), + Padding( + padding: EdgeInsets.only(top: 8.0), + child: Container( + height: 1.0, + width: 300.0, + color: Colors.grey, + ), + ), + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: Alignment.topLeft, + child: RichText( + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[3].nameN : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), + ):TextSpan( text: widget.data[index].specifications != null ? widget.data[index].specifications[3].name : - "No data", +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), + ), + ), + ), + ), + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: Alignment.topLeft, + child: RichText( + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[3].defaultValuen : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + color: Colors.black54, + fontSize: 15, + fontWeight: FontWeight.bold), + ):TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[3].defaultValue : +// "No data", + TranslationBase.of(context).no_data, style: TextStyle( color: Colors.black54, fontSize: 15, @@ -279,10 +465,20 @@ class _slideDetailState extends State { child: Align( alignment: Alignment.topLeft, child: RichText( - text: TextSpan( - text:widget.data[index].specifications != null ? + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[4].nameN : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), + ):TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications[4].name : - "No data", +// "No data", + TranslationBase.of(context).no_data, style: TextStyle( fontWeight: FontWeight.bold, color: Colors.black, @@ -296,10 +492,82 @@ class _slideDetailState extends State { child: Align( alignment: Alignment.topLeft, child: RichText( - text: TextSpan( - text:widget.data[index].specifications != null ? + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[4].defaultValuen : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + color: Colors.black54, + fontSize: 15, + fontWeight: FontWeight.bold), + ):TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[4].defaultValue : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + color: Colors.black54, + fontSize: 15, + fontWeight: FontWeight.bold), + ), + ), + ), + ), + Padding( + padding: EdgeInsets.only(top: 8.0), + child: Container( + height: 1.0, + width: 300.0, + color: Colors.grey, + ), + ), + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: Alignment.topLeft, + child: RichText( + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[5].nameN : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), + ):TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications[5].name : - "No data", +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), + ), + ), + ), + ), + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: Alignment.topLeft, + child: RichText( + text: languageID == "ar"? TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[5].defaultValuen : +// "No data", + TranslationBase.of(context).no_data, + style: TextStyle( + color: Colors.black54, + fontSize: 15, + fontWeight: FontWeight.bold), + ):TextSpan( + text: widget.data[index].specifications != null ? + widget.data[index].specifications[5].defaultValue : +// "No data", + TranslationBase.of(context).no_data, style: TextStyle( color: Colors.black54, fontSize: 15, diff --git a/lib/pages/pharmacies/my_reviews.dart b/lib/pages/pharmacies/my_reviews.dart index 7b17a359..7e7e33a0 100644 --- a/lib/pages/pharmacies/my_reviews.dart +++ b/lib/pages/pharmacies/my_reviews.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/review_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:rating_bar/rating_bar.dart'; @@ -22,7 +23,7 @@ class _MyReviewsPageState extends State { return BaseView( onModelReady: (model) => model.getReviewData(), builder: (_, model, wi) => AppScaffold( - appBarTitle: 'My Reviews', + appBarTitle: TranslationBase.of(context).reviews, isShowAppBar: true, isPharmacy: true, baseViewModel: model, diff --git a/lib/pages/pharmacies/product-brands.dart b/lib/pages/pharmacies/product-brands.dart index e2fefab0..42a78d5c 100644 --- a/lib/pages/pharmacies/product-brands.dart +++ b/lib/pages/pharmacies/product-brands.dart @@ -31,7 +31,7 @@ class _ProductBrandsPageState extends State { allowAny: true, onModelReady: (model) => model.getBrandsData(), builder: (_, model, wi) => AppScaffold( - appBarTitle: 'Brands page', + appBarTitle: TranslationBase.of(context).brands, isShowAppBar: true, isPharmacy: true, isShowDecPage: false, diff --git a/lib/pages/pharmacies/product_detail.dart b/lib/pages/pharmacies/product_detail.dart index 72c2bd2d..28afa2f4 100644 --- a/lib/pages/pharmacies/product_detail.dart +++ b/lib/pages/pharmacies/product_detail.dart @@ -15,11 +15,12 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; import 'package:rating_bar/rating_bar.dart'; - +import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; import 'screens/cart-order-page.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; int price = 0; -var languageID; +dynamic languageID; bool isOverQuantity = false; bool isInWishlit = false; //int isSelected = 1; @@ -28,27 +29,35 @@ String itemID; var customerId; CompareList compareItems = new CompareList(); PharmacyProduct specificationData; +//Products recommendedData; class ProductDetailPage extends StatefulWidget { final PharmacyProduct product; +// final Products recommendedProducts; + + ProductDetailPage(this.product ); - ProductDetailPage(this.product); @override __ProductDetailPageState createState() => __ProductDetailPageState(); } class __ProductDetailPageState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + bool isTrue = true; bool isDetails = true; bool isReviews = false; bool isAvailabilty = false; dynamic wishlistItems; - var model; + //var model; // String ProductId="4561"; - String productId = ""; + // String productId = ""; + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } checkWishlist() async { GifLoaderDialogUtils.showMyDialog(context); @@ -69,7 +78,9 @@ class __ProductDetailPageState extends State { setState(() {}); } + void initState() { + getLanguageID(); price = 1; specificationData = widget.product; userInfo(); @@ -93,7 +104,7 @@ class __ProductDetailPageState extends State { Widget build(BuildContext context) { return customerId != null ? DetailPageScafold( - appBarTitle: 'product detail page', + appBarTitle: TranslationBase.of(context).productDetails, isShowAppBar: true, isPharmacy: true, isShowDecPage: false, @@ -121,7 +132,7 @@ class __ProductDetailPageState extends State { flex: 1, child: Container( alignment: Alignment.centerRight, - child: languageID == 'ar' + child: languageID == "ar" ? Text( widget.product .discountDescriptionn, @@ -162,7 +173,7 @@ class __ProductDetailPageState extends State { ), Container( width: 500, - height: 150, + height: 220, color: Colors.white, child: productNameAndPrice(context, widget.product), ), @@ -171,7 +182,7 @@ class __ProductDetailPageState extends State { ), Container( width: 500, - height: 120, + height: 100, color: Colors.white, child: Column( mainAxisAlignment: MainAxisAlignment.start, @@ -191,7 +202,8 @@ class __ProductDetailPageState extends State { padding: const EdgeInsets.all(8.0), child: Container( child: Text( - "there is no data", + TranslationBase.of(context).noData, +// "there is no data", ), ), ), @@ -331,10 +343,9 @@ class __ProductDetailPageState extends State { ), Container( child: Text( - languageID == 'ar' + languageID == "ar" ? widget.product.fullDescriptionn - : widget.product - .fullDescription ?? + : widget.product.fullDescription ?? "", style: TextStyle( fontSize: 16, @@ -503,7 +514,8 @@ class __ProductDetailPageState extends State { : Container( padding: EdgeInsets.all(15), alignment: Alignment.center, - child: Text('No Reviews Available'), + child: Text(TranslationBase.of(context).noReviewsAvailable,), +// Text('No Reviews Available'), ), ) : isAvailabilty @@ -517,8 +529,8 @@ class __ProductDetailPageState extends State { ? Container( padding: EdgeInsets.all(15), alignment: Alignment.center, - child: Text( - 'No location Available'), + child: Text(TranslationBase.of(context).noLocationAvailable,), +// Text('No location Available'), ) : ListView.builder( physics: ScrollPhysics(), @@ -610,14 +622,7 @@ class __ProductDetailPageState extends State { ), Row( children: [ -// Container( -// width: 500, -// height: 100, -// margin: EdgeInsets.only(bottom: 100), -// color: Colors.white, -// child: Text("ENAD TEST"), -// ), - Container( + customerId != null ? Container( width: 410, height: 50, // margin: EdgeInsets.only(bottom: 5), @@ -626,15 +631,17 @@ class __ProductDetailPageState extends State { TranslationBase.of(context).recommended, bold: true, ), - ), + ) + : Container(), ], ), SingleChildScrollView( child: Container( + width: 410, color: Colors.white, child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.start, // mainAxisSize: MainAxisSize.min, children: [ Container( @@ -645,10 +652,9 @@ class __ProductDetailPageState extends State { // margin: EdgeInsets.symmetric(horizontal: 6, vertical: 4), child: BaseView( - onModelReady: (model) => model.getRecommendedProducts(widget.product.id.toString()), + onModelReady: (model) => model.getRecommendedProducts(widget.product.id), builder: (_, model, wi) => Container( child: -// Text(model.recommendedProductList[0].id), model.recommendedProductList.length != null ? Expanded( child: ListView.builder( @@ -660,12 +666,18 @@ class __ProductDetailPageState extends State { itemCount: model.recommendedProductList.length, itemBuilder: (context, index) { return InkWell( - onTap: () { - Navigator.push( + onTap: () + async { + GifLoaderDialogUtils.showMyDialog(context); + RecommendedProductModel data = model.recommendedProductList[index]; + var json = data.toJson(); + PharmacyProduct product = new PharmacyProduct.fromJson(json); + await Navigator.pushReplacement( context, FadePage( - page: ProductDetailPage(model.recommendedProductList[index]), + page: ProductDetailPage(product), )); + GifLoaderDialogUtils.hideDialog(context); }, child: Card( elevation: 2, @@ -694,26 +706,40 @@ class __ProductDetailPageState extends State { child: Align( alignment: Alignment.topRight, child: IconButton( - icon: Icon(!isInWishlit ? Icons.favorite_border : Icons.favorite), - color: !isInWishlit ? Colors.grey : Colors.red, + icon: Icon(model.recommendedProductList[index].isinwishlist != true ? Icons.favorite_border : Icons.favorite), + color: model.recommendedProductList[index].isinwishlist != true ? Colors.grey : Colors.red, onPressed: () async { - if (customerId != null) { - if (!isInWishlit) { + if (customerId != null ) { + if (!isInWishlit && model.recommendedProductList[index].isinwishlist != true) { + GifLoaderDialogUtils.showMyDialog(context); await addToWishlistFunction(model.recommendedProductList[index].id); +// checkWishlist(); + GifLoaderDialogUtils.hideDialog(context); + setState((){ + model.recommendedProductList[index].isinwishlist= true; + }); + } else { + GifLoaderDialogUtils.showMyDialog(context); await deleteFromWishlistFunction(model.recommendedProductList[index].id); + GifLoaderDialogUtils.hideDialog(context); + setState((){ + model.recommendedProductList[index].isinwishlist = false; + }); } } else { - return; + return ; } - setState(() {}); + setState(() { + // checkWishlist(); + }); }, )), // child: Align( // alignment: Alignment.topRight, -// child:itemID.contains(model.recommendedProductList[index].id) +// child:itemID.contains(model.recommendedProductList[index]['id']) // // !isInWishlist // ? IconButton( // icon: Icon(Icons.favorite_border), @@ -780,20 +806,16 @@ class __ProductDetailPageState extends State { borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), ), - child: - Texts( - model.recommendedProductList[index].rxMessage != null - ? model.recommendedProductList[index].rxMessage - : "", - color: - Colors.white, - regular: - true, - fontSize: - 10, - fontWeight: - FontWeight.w400, - ), + child: model.recommendedProductList[index].rxMessage != null + ? Texts( + languageID == "ar" + ? model.recommendedProductList[index].rxMessagen + : model.recommendedProductList[index].rxMessage, + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ):Texts (""), ), ]), Container( @@ -809,8 +831,7 @@ class __ProductDetailPageState extends State { .start, children: [ Text( - languageID == - "ar" + languageID == "ar" ? model.recommendedProductList[index].namen : model.recommendedProductList[index].name, style: @@ -857,8 +878,7 @@ class __ProductDetailPageState extends State { Alignment.topLeft, child: RatingBar.readOnly( - initialRating: - model.recommendedProductList[index].approvedRatingSum.toDouble(), + initialRating: model.recommendedProductList[index].approvedRatingSum.toDouble(), // initialRating: productRate, size: 13.0, @@ -878,7 +898,7 @@ class __ProductDetailPageState extends State { ), ), Texts( - "(${model.recommendedProductList[index].approvedTotalReviews.toString()})", + "(${model.recommendedProductList[index].notApprovedTotalReviews.toString()})", // bold: true, fontSize: 12, @@ -892,7 +912,15 @@ class __ProductDetailPageState extends State { }), ) : Container( -// child: Text("NO DATA"), + // color: Colors.white, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Texts(TranslationBase.of(context).nonRecommended, + color: Colors.black,), + ], + ), ), )), ), @@ -911,7 +939,7 @@ class __ProductDetailPageState extends State { widget.product), ) : AppScaffold( - appBarTitle: 'product detail page', + appBarTitle: TranslationBase.of(context).productDetails, isShowAppBar: true, isPharmacy: true, isShowDecPage: false, @@ -1291,7 +1319,8 @@ class __ProductDetailPageState extends State { : Container( padding: EdgeInsets.all(15), alignment: Alignment.center, - child: Text('No Reviews Available'), + child: Text(TranslationBase.of(context).noReviewsAvailable), +// Text('No Reviews Available'), ), ) : isAvailabilty @@ -1908,7 +1937,8 @@ class _productNameAndPriceState extends State { width: 40, ), Text( - widget.item.stockAvailability, + languageID == 'ar'? + widget.item.stockAvailabilityn : widget.item.stockAvailability , style: widget.item.stockAvailability == 'Out of stock' ? TextStyle(fontWeight: FontWeight.bold, color: Colors.red) : TextStyle( @@ -1954,7 +1984,9 @@ class _productNameAndPriceState extends State { onPressed: () async { if (customerId != null) { if (!isInWishlit) { + GifLoaderDialogUtils.showMyDialog(context); await addToWishlistFunction(widget.item.id); + GifLoaderDialogUtils.hideDialog(context); } else { await deleteFromWishlistFunction(widget.item.id); } @@ -2066,9 +2098,9 @@ fixingString(txt) { return newTxt; } -getLanguageID() async { - languageID = await sharedPref.getString(APP_LANGUAGE); -} +//getLanguageID() async { +// languageID = await sharedPref.getString(APP_LANGUAGE); +//} getSpecificationData(itemID) async { ProductDetailViewModel x = new ProductDetailViewModel(); @@ -2092,6 +2124,7 @@ addToWishlistFunction(itemID) async { ProductDetailViewModel x = new ProductDetailViewModel(); isInWishlit = true; await x.addToWishlistData(itemID); + } deleteFromWishlistFunction(itemID) async { @@ -2132,7 +2165,8 @@ settingModalBottomSheet(context) { children: [ new ListTile( leading: Icon(Icons.shopping_cart), - title: Text('Add to cart'), + title: Text(TranslationBase.of(context) + .addToCart,), onTap: () => { if (price > 0) {addToCartFunction(price, itemID, context)} @@ -2144,12 +2178,14 @@ settingModalBottomSheet(context) { }), ListTile( leading: Icon(Icons.favorite_border), - title: Text('Add to wishlist'), + title: Text(TranslationBase.of(context) + .addToWishlist,), onTap: () => {addToWishlistFunction(itemID)}, ), ListTile( leading: Icon(Icons.compare), - title: Text('Compare'), + title: Text(TranslationBase.of(context) + .compare,), onTap: () => { Provider.of(context, listen: false) .addItem(specificationData), diff --git a/lib/pages/pharmacies/screens/cart-order-page.dart b/lib/pages/pharmacies/screens/cart-order-page.dart index f672cc66..6c760fcd 100644 --- a/lib/pages/pharmacies/screens/cart-order-page.dart +++ b/lib/pages/pharmacies/screens/cart-order-page.dart @@ -22,12 +22,16 @@ class CartOrderPage extends StatelessWidget { final mediaQuery = MediaQuery.of(context); final height = mediaQuery.size.height - 60 - mediaQuery.padding.top; - + AppScaffold appScaffold; return BaseView( - onModelReady: (model) => model.getOrderPreviewData(), + onModelReady: (model){ + model.getShoppingCart().then((value){ + appScaffold.appBar.badgeUpdater('${model.cartResponse.quantityCount ?? 0}'); + }); + }, builder: (_, model, wi) => ChangeNotifierProvider.value( value: model.cartResponse, - child: AppScaffold( + child: appScaffold = AppScaffold( appBarTitle: TranslationBase.of(context).shoppingCart, isShowAppBar: true, isPharmacy: true, @@ -65,26 +69,24 @@ class CartOrderPage extends StatelessWidget { child: Column( children: [ ...List.generate( - cart.shoppingCarts != null - ? cart.shoppingCarts.length - : 0, + cart.shoppingCarts != null ? cart.shoppingCarts.length : 0, (index) => ProductOrderItem( - cart.shoppingCarts[index], () { - print(cart.shoppingCarts[index] - .quantity); - model - .changeProductQuantity( - cart.shoppingCarts[index]) - .then((value) { - if (model.state == - ViewState.ErrorLocal) { - Utils.showErrorToast( - model.error); + cart.shoppingCarts[index], () {print(cart.shoppingCarts[index].quantity); + model.changeProductQuantity(cart.shoppingCarts[index]).then((value) { + if (model.state != ViewState.Error) { + appScaffold.appBar.badgeUpdater('${value.quantityCount ?? 0}'); } + if (model.state == + ViewState.ErrorLocal) {Utils.showErrorToast(model.error);} }); }, - () => model.deleteProduct( - cart.shoppingCarts[index]))) + () { + model.deleteProduct(cart.shoppingCarts[index]).then((value){ + if (model.state != ViewState.Error) { + appScaffold.appBar.badgeUpdater('${value.quantityCount ?? 0}'); + } + }); + })) ], ), ), @@ -198,8 +200,8 @@ class CartOrderPage extends StatelessWidget { ), Padding( padding: const EdgeInsets.all(8.0), - child: Text( - 'There is no data', + child: Text(TranslationBase.of(context).noData, +// 'There is no data', style: TextStyle(fontSize: 30), ), ) diff --git a/lib/pages/pharmacies/screens/pharmacy_module_page.dart b/lib/pages/pharmacies/screens/pharmacy_module_page.dart index e4830583..9b91b77a 100644 --- a/lib/pages/pharmacies/screens/pharmacy_module_page.dart +++ b/lib/pages/pharmacies/screens/pharmacy_module_page.dart @@ -53,7 +53,7 @@ class _PharmacyPageState extends State { languageID = await sharedPref.getString(APP_LANGUAGE); } - List recommendedProductList = []; +// List recommendedProductList = []; List wishList = []; var model; @@ -66,8 +66,7 @@ class _PharmacyPageState extends State { checkWishlist(); // userInfo(widget.product.id, widget.product); userInfo(id, product); - print("-------------this--------------"); - print(itemID); + getLanguageID(); } @override @@ -138,7 +137,7 @@ class _PharmacyPageState extends State { return Container( // width: 160.0, height: - MediaQuery.of(context).size.height * 0.6, + MediaQuery.of(context).size.height * 0.3, padding: EdgeInsets.only( bottom: 5.0, left: 5.0, right: 8.0), margin: EdgeInsets.only(right: 10.0), @@ -217,16 +216,8 @@ class _PharmacyPageState extends State { 30.0)), child: Text( languageID == "ar" - ? model - .prescriptionsList[ - index] - .isInOutPatientDescriptionN - .toString() - : model - .prescriptionsList[ - index] - .isInOutPatientDescription - .toString(), + ? model.prescriptionsList[index].isInOutPatientDescriptionN.toString() + : model.prescriptionsList[index].isInOutPatientDescription.toString(), style: TextStyle( color: Colors.white, fontSize: 15.0, diff --git a/lib/pages/pharmacies/screens/recommended-product-page.dart b/lib/pages/pharmacies/screens/recommended-product-page.dart index 28abf661..f1c0fb2e 100644 --- a/lib/pages/pharmacies/screens/recommended-product-page.dart +++ b/lib/pages/pharmacies/screens/recommended-product-page.dart @@ -59,781 +59,451 @@ class _RecommendedProductPageState extends State var size = MediaQuery.of(context).size; final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.80) / 2; final double itemWidth = size.width / 2; - return BaseView( - onModelReady: (model) => model.getRecommendedProducts(productId), - builder: (_, model, wi) => AppScaffold( - appBarTitle: TranslationBase.of(context).recommended, - baseViewModel: model, - isShowAppBar: true, - isPharmacy: true, - backgroundColor: Colors.white, - body: SingleChildScrollView( - child: Column(children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.only( - top: 8, - bottom: 10, - left: 10, - ), - child: Text( - model.recommendedProductList.length.toString(), - style: TextStyle( - color: Colors.black, - fontSize: 14.0, - ), - ), - ), - Container( - padding: EdgeInsets.only(top: 8, bottom: 10, left: 8), - child: Text( - TranslationBase.of(context).result, - style: TextStyle( - color: Colors.black, - fontSize: 14.0, - ), - ), - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Padding( - padding: const EdgeInsets.symmetric(vertical: 8), - child: SizedBox( - child: Container( - width: 1, - color: Colors.grey, - ), - ), - ), - Container( - child: Image.asset( - 'assets/images/pharmacy/sort.png', - width: 20, - height: 20, -// color: Colors.red, - ), - ), - Container( - child: Text( - TranslationBase.of(context).sort, - style: TextStyle( - color: Colors.black, - fontSize: 14.0, - ), - ), - ), - Padding( - padding: const EdgeInsets.symmetric(vertical: 8), - child: SizedBox( - child: Container( - width: 1, - color: Colors.grey, - ), - ), - ), - Divider( - thickness: 1.0, - color: Colors.black12, - ), - Padding( - padding: EdgeInsets.all(8.0), - child: InkWell( - child: styleIcon, - onTap: () { - setState(() { - if (styleOne == true) { - styleOne = false; - styleTwo = true; - styleIcon = Icon( - Icons.auto_awesome_mosaic, - color: Colors.blue, - size: 29.0, - ); - } else { - styleOne = true; - styleTwo = false; - styleIcon = Icon( - Icons.widgets_sharp, - color: Colors.blue, - size: 29.0, - ); - } - }); - }, - ), - ), - ], - ), - ]), - SizedBox( - height: 2, - ), - Divider( - color: Colors.grey[350], - height: 10, - thickness: 6, - indent: 0, - endIndent: 0, - ), - styleOne == true - ? Container( - margin: EdgeInsets.all(5.0), - child: model.recommendedProductList.length != null - ? CustomScrollView( - primary: false, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - slivers: [ - SliverPadding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 0), - sliver: SliverGrid.count( - crossAxisCount: 2, - childAspectRatio: (itemWidth / itemHeight), - children: model.recommendedProductList - .map((e) => Card( - elevation: 2, - shape: RoundedRectangleBorder( - side: BorderSide( - color: Colors.grey[300], - width: 2), - borderRadius: - BorderRadius.circular( - 10)), - margin: EdgeInsets.symmetric( - horizontal: 8, - vertical: 11, - ), - child: Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.all( - Radius.circular(15), - ), - ), - padding: EdgeInsets.symmetric( - horizontal: 4), - width: MediaQuery.of(context) - .size.width / 3, -// - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Stack(children: [ - Container( - child: Align( - alignment: Alignment.topRight, - child: itemID.contains(e.id) - // !isInWishlist - ? IconButton(icon: Icon(Icons.favorite_border), - color: Colors.grey, iconSize: 30, - onPressed: - () { - setState(() {addToWishlistFunction(itemID); - }); - }, - ) - : IconButton(icon: Icon(Icons.favorite), - color: Colors.red, iconSize: 30, - onPressed: - () {setState(() { - deleteFromWishlistFunction(itemID); - }); - }, - ) -// - ), - ), - Container(margin: EdgeInsets.fromLTRB(0, 16, 10, 16), - alignment: Alignment.center, -// padding: EdgeInsets.only(left: 25, bottom: 20), - child: (e.images != null && e.images.length > 0) - ? Image.network(e.images[0].src.toString(), -// item.images[0].src, - fit: BoxFit.cover, height: 60,) - : Image.asset("assets/images/no_image.png", fit: BoxFit.cover, height: 60, - ), - ), - Container(width: e.rxMessage != null ? MediaQuery.of(context) - .size.width / 5 : 0, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xffb23838), - borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), - ), - child: Texts(e.rxMessage != null ? e.rxMessage : "", - color: Colors.white, - regular: true, - fontSize: 10, - fontWeight: FontWeight.w400, - ), - ), - ]), - Container( - margin: EdgeInsets - .symmetric(horizontal: 6, vertical: 0, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - languageID == "ar" ? e.namen : e.name, - style: TextStyle( - color: Colors.black, fontSize: 13.0, -// fontWeight: FontWeight.bold, - ), - ), - Padding( -// padding: const EdgeInsets.only(top: 15, bottom: 10), - padding: const EdgeInsets.only(top: 10, bottom: 5), - child: Texts("SAR ${e.price}", - bold: true, fontSize: 14, - ), - ), - ], - ), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.only(right: 10), -// margin: EdgeInsets.only(left: 5), - child: Align(alignment: Alignment.topLeft, - child: RatingBar.readOnly(initialRating: e.approvedRatingSum.toDouble(), -// initialRating: productRate, - size: 13.0, filledColor: Colors.yellow[700], - emptyColor: Colors.grey[500], - isHalfAllowed: true, - halfFilledIcon: Icons.star_half, - filledIcon: Icons.star, - emptyIcon: Icons.star, - ), - ), - ), - Texts("(${e.approvedTotalReviews.toString()})", -// bold: true, - fontSize: 12, - ), - ]), - ], - ), - ), - ) -// Column( -// crossAxisAlignment: -// CrossAxisAlignment.start, -// children: [ -// Container( -// child: Align( -// alignment: Alignment.topRight, -// child: !isInWishlist -// ? IconButton( -// icon: Icon(Icons.favorite_border), -// color: Colors.grey, -// iconSize: 30, -// onPressed: () { -// setState(() { -// addToWishlistFunction(itemID); -// }); -// }, -// ) -// : IconButton( -// icon: Icon(Icons.favorite), -// color: Colors.red, -// iconSize: 30, -// onPressed: () { -// setState(() { -// deleteFromWishlistFunction(itemID); -// }); -// }, -// ) -//// -// ),), -// Container( -// padding: EdgeInsets.only( -// left: 25, bottom: 20), -//// margin: EdgeInsets.fromLTRB(0, 16, 0, 0), -//// alignment: Alignment.centerLeft, -// child: (e.images != null && -// e.images.length > 0) -// ? Image.network( -// e.images[0].src -// .toString(), -//// item.images[0].src, -// fit: BoxFit.cover, -// height: 80, -// ) -// : Image.asset( -// "assets/images/no_image.png", -// fit: BoxFit.cover, -// height: 80, -// ), -// ), -// Text( -// e.name, -//// model.recommendedProduct[0].products[index].shortDescription -//// .toString(), -// style: TextStyle( -// color: Colors.black, -// fontSize: 15.0, -//// fontWeight: FontWeight.bold, -// ), -// ), -// Padding( -// padding: const EdgeInsets.only( -// top: 15, bottom: 10), -// child: Texts( -// "SAR ${e.price}", -// bold: true, -// fontSize: 14, -// ), -// ), -// Row( -// crossAxisAlignment: -// CrossAxisAlignment.start, -// children: [ -// Container( -// padding: EdgeInsets.only( -// right: 10), -//// margin: EdgeInsets.only(left: 5), -// child: Align( -// alignment: -// Alignment.topLeft, -// child: RatingBar.readOnly( -// initialRating: e -// .approvedRatingSum -// .toDouble(), -//// initialRating: productRate, -// size: 15.0, -// filledColor: -// Colors.yellow[700], -// emptyColor: -// Colors.grey[500], -// isHalfAllowed: true, -// halfFilledIcon: -// Icons.star_half, -// filledIcon: Icons.star, -// emptyIcon: Icons.star, -// ), -// ), -// ), -// Texts( -// "(${e.approvedTotalReviews.toString()})", -//// bold: true, -// fontSize: 12, -// ), -// ]), -// ], -// ), - ) - .toList(), -// children:[ -// ListView.builder( -// scrollDirection: Axis.vertical, -// shrinkWrap: true, -// physics: ScrollPhysics(), -// itemCount: model.recommendedProductList.length, -// itemBuilder: (context, index) { -// return Container( -// height: 30, -// padding: EdgeInsets.only( left: 15.0, top: 10, right: 10), -// margin: EdgeInsets.only(right: 10.0), -// decoration: BoxDecoration( -// border: Border.all( -// color: Colors.grey, -// style: BorderStyle.solid, -// width: 1.0, -// ), -// color: Colors.white, -// borderRadius: BorderRadius.circular(10.0)), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Container( -// child: Align( -// alignment: Alignment.topRight, -// child:!isInWishlist -// ? InkWell( -// onTap: () { -// }, -// child: SvgPicture.asset( -// 'assets/images/pharmacy/heart-empty.svg', -// width: 20, -// height: 20, -// color: Colors.grey, -// ), -// ) -// : InkWell( -// onTap: () { -// }, -// child: SvgPicture.asset( -// 'assets/images/pharmacy/Redheart.svg', -// width: 20, -// height: 20, + return Container(); +// BaseView( +// onModelReady: (model) => model.getRecommendedProducts(productId), +// builder: (_, model, wi) => AppScaffold( +// appBarTitle: TranslationBase.of(context).recommended, +// baseViewModel: model, +// isShowAppBar: true, +// isPharmacy: true, +// backgroundColor: Colors.white, +// body: SingleChildScrollView( +// child: Column(children: [ +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Row( +// mainAxisAlignment: MainAxisAlignment.start, +// children: [ +// Container( +// padding: EdgeInsets.only( +// top: 8, +// bottom: 10, +// left: 10, +// ), +// child: Text( +// model.recommendedProductList.length.toString(), +// style: TextStyle( +// color: Colors.black, +// fontSize: 14.0, +// ), +// ), +// ), +// Container( +// padding: EdgeInsets.only(top: 8, bottom: 10, left: 8), +// child: Text( +// TranslationBase.of(context).result, +// style: TextStyle( +// color: Colors.black, +// fontSize: 14.0, +// ), +// ), +// ), +// ], +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.end, +// children: [ +// Padding( +// padding: const EdgeInsets.symmetric(vertical: 8), +// child: SizedBox( +// child: Container( +// width: 1, +// color: Colors.grey, +// ), +// ), +// ), +// Container( +// child: Image.asset( +// 'assets/images/pharmacy/sort.png', +// width: 20, +// height: 20, //// color: Colors.red, +// ), +// ), +// Container( +// child: Text( +// TranslationBase.of(context).sort, +// style: TextStyle( +// color: Colors.black, +// fontSize: 14.0, +// ), +// ), +// ), +// Padding( +// padding: const EdgeInsets.symmetric(vertical: 8), +// child: SizedBox( +// child: Container( +// width: 1, +// color: Colors.grey, +// ), +// ), +// ), +// Divider( +// thickness: 1.0, +// color: Colors.black12, +// ), +// Padding( +// padding: EdgeInsets.all(8.0), +// child: InkWell( +// child: styleIcon, +// onTap: () { +// setState(() { +// if (styleOne == true) { +// styleOne = false; +// styleTwo = true; +// styleIcon = Icon( +// Icons.auto_awesome_mosaic, +// color: Colors.blue, +// size: 29.0, +// ); +// } else { +// styleOne = true; +// styleTwo = false; +// styleIcon = Icon( +// Icons.widgets_sharp, +// color: Colors.blue, +// size: 29.0, +// ); +// } +// }); +// }, +// ), +// ), +// ], +// ), +// ]), +// SizedBox( +// height: 2, +// ), +// Divider( +// color: Colors.grey[350], +// height: 10, +// thickness: 6, +// indent: 0, +// endIndent: 0, +// ), +// styleOne == true +// ? Container( +// margin: EdgeInsets.all(5.0), +// child: model.recommendedProductList.length != null +// ? CustomScrollView( +// primary: false, +// shrinkWrap: true, +// physics: NeverScrollableScrollPhysics(), +// slivers: [ +// SliverPadding( +// padding: const EdgeInsets.fromLTRB(0, 0, 0, 0), +// sliver: SliverGrid.count( +// crossAxisCount: 2, +// childAspectRatio: (itemWidth / itemHeight), +// children: model.recommendedProductList +// .map((e) => Card( +// elevation: 2, +// shape: RoundedRectangleBorder( +// side: BorderSide( +// color: Colors.grey[300], +// width: 2), +// borderRadius: +// BorderRadius.circular( +// 10)), +// margin: EdgeInsets.symmetric( +// horizontal: 8, +// vertical: 11, +// ), +// child: Container( +// decoration: BoxDecoration( +// borderRadius: +// BorderRadius.all( +// Radius.circular(15), +// ), // ), -// ) -// ), -// ), -// Container( -// padding: EdgeInsets.only(left: 25, bottom: 20), -//// margin: EdgeInsets.fromLTRB(0, 16, 0, 0), -//// alignment: Alignment.centerLeft, -// child: (model.recommendedProductList[index].images != null && -// model.recommendedProductList[index].images.length > 0) -// ? Image.network( -// model.recommendedProductList[index].images[0].src.toString(), +// padding: EdgeInsets.symmetric( +// horizontal: 4), +// width: MediaQuery.of(context) +// .size.width / 3, +//// +// child: Column( +// crossAxisAlignment: +// CrossAxisAlignment +// .start, +// children: [ +// Stack(children: [ +// Container( +// child: Align( +// alignment: Alignment.topRight, +// child: itemID.contains(e.id) +// // !isInWishlist +// ? IconButton(icon: Icon(Icons.favorite_border), +// color: Colors.grey, iconSize: 30, +// onPressed: +// () { +// setState(() {addToWishlistFunction(itemID); +// }); +// }, +// ) +// : IconButton(icon: Icon(Icons.favorite), +// color: Colors.red, iconSize: 30, +// onPressed: +// () {setState(() { +// deleteFromWishlistFunction(itemID); +// }); +// }, +// ) +//// +// ), +// ), +// Container(margin: EdgeInsets.fromLTRB(0, 16, 10, 16), +// alignment: Alignment.center, +//// padding: EdgeInsets.only(left: 25, bottom: 20), +// child: (e.images != null && e.images.length > 0) +// ? Image.network(e.images[0].src.toString(), //// item.images[0].src, -// fit: BoxFit.cover, -// height: 80, -// ) -// : Image.asset( -// "assets/images/no_image.png", -// fit: BoxFit.cover, -// height: 80, -// ), -// ), -// Text( -// model.recommendedProductList[index].name, -//// model.recommendedProduct[0].products[index].shortDescription -//// .toString(), -// style: TextStyle( -// color: Colors.black, -// fontSize: 15.0, +// fit: BoxFit.cover, height: 60,) +// : Image.asset("assets/images/no_image.png", fit: BoxFit.cover, height: 60, +// ), +// ), +// Container(width: e.rxMessage != null ? MediaQuery.of(context) +// .size.width / 5 : 0, +// padding: EdgeInsets.all(4), +// decoration: BoxDecoration( +// color: Color(0xffb23838), +// borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), +// ), +// child: Texts(e.rxMessage != null ? e.rxMessage : "", +// color: Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: FontWeight.w400, +// ), +// ), +// ]), +// Container( +// margin: EdgeInsets +// .symmetric(horizontal: 6, vertical: 0, +// ), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// languageID == "ar" ? e.namen : e.name, +// style: TextStyle( +// color: Colors.black, fontSize: 13.0, //// fontWeight: FontWeight.bold, -// ), -// ), -// Padding( -// padding: const EdgeInsets.only(top: 15, bottom: 10), -// child: Texts( -// "SAR ${model.recommendedProductList[index].price}", -// bold: true, -// fontSize: 14, -// ), -// ), -// Row( -// crossAxisAlignment: -// CrossAxisAlignment.start, -// children: [ -// Container( -// padding: EdgeInsets.only(right: 10), +// ), +// ), +// Padding( +//// padding: const EdgeInsets.only(top: 15, bottom: 10), +// padding: const EdgeInsets.only(top: 10, bottom: 5), +// child: Texts("SAR ${e.price}", +// bold: true, fontSize: 14, +// ), +// ), +// ], +// ), +// ), +// Row( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Container( +// padding: EdgeInsets.only(right: 10), //// margin: EdgeInsets.only(left: 5), -// child: Align( -// alignment: Alignment.topLeft, -// child: RatingBar.readOnly( -// initialRating: -// model.recommendedProductList[index].approvedRatingSum.toDouble(), +// child: Align(alignment: Alignment.topLeft, +// child: RatingBar.readOnly(initialRating: e.approvedRatingSum.toDouble(), //// initialRating: productRate, -// size: 15.0, -// filledColor: Colors.yellow[700], -// emptyColor: Colors.grey[500], -// isHalfAllowed: true, -// halfFilledIcon: Icons.star_half, -// filledIcon: Icons.star, -// emptyIcon: Icons.star, -// ), -// ), -// ), -// Texts( -// "(${model.recommendedProductList[index].approvedTotalReviews.toString()})", +// size: 13.0, filledColor: Colors.yellow[700], +// emptyColor: Colors.grey[500], +// isHalfAllowed: true, +// halfFilledIcon: Icons.star_half, +// filledIcon: Icons.star, +// emptyIcon: Icons.star, +// ), +// ), +// ), +// Texts("(${e.approvedTotalReviews.toString()})", //// bold: true, -// fontSize: 12, +// fontSize: 12, +// ), +// ]), +// ], +// ), // ), -// ]), -// ], -// ), -// ); -// } -// ), -// ] - ), - ), - ]) - : Container(), - ) - : Container( - height: model.recommendedProductList.length > 0 - ? MediaQuery.of(context).size.height * 0.60 - : 0, - child: ListView.builder( - physics: ScrollPhysics(), -// physics: NeverScrollableScrollPhysics(), - itemCount: model.recommendedProductList.length, - itemBuilder: (context, index) { - return Card( - elevation: 2, - shape: RoundedRectangleBorder( - side: BorderSide(color: Colors.grey[300], width: 2), - borderRadius: BorderRadius.circular(10)), +// ) // - margin: EdgeInsets.symmetric( - horizontal: 8, - vertical: 4, - ), - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(15), - ), - ), - padding: EdgeInsets.symmetric(horizontal: 5), - width: MediaQuery.of(context).size.width / 3, +// ) +// .toList(), // - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Stack(children: [ - Container( - child: Align( - alignment: Alignment.topRight, - child: //true - //wishlistVar[index].id.contains(model.recommendedProductList[index].id) - !isInWishlist - ? IconButton( - icon: Icon(Icons.favorite_border), - color: Colors.grey, - iconSize: 30, - onPressed: () { - setState(() { - addToWishlistFunction(itemID); - }); - }, - ) - : IconButton( - icon: Icon(Icons.favorite), - color: Colors.red, - iconSize: 30, - onPressed: () { - setState(() { - deleteFromWishlistFunction(itemID); - }); - }, - ) -// - ), - ), - Container( - margin: EdgeInsets.fromLTRB(0, 16, 10, 16), - alignment: Alignment.center, -// padding: EdgeInsets.only(left: 25, bottom: 20), - child: (model.recommendedProductList[index].images != null && - model.recommendedProductList[index].images.length > 0) - ? Image.network(model.recommendedProductList[index].images[0].src.toString(), -// item.images[0].src, - fit: BoxFit.cover, - height: 60, - ) - : Image.asset("assets/images/no_image.png", - fit: BoxFit.cover, - height: 60, - ), - ), - Container( - width: model.recommendedProductList[index].rxMessage != null - ? MediaQuery.of(context).size.width / 5 - : 0, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xffb23838), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(6)), - ), - child: Texts( - model.recommendedProductList[index].rxMessage != null - ? model.recommendedProductList[index].rxMessage - : "", - color: Colors.white, - regular: true, - fontSize: 10, - fontWeight: FontWeight.w400, - ), - ), - ]), - Container( - margin: EdgeInsets.symmetric( - horizontal: 6, - vertical: 2, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(model.recommendedProductList[index].name, - style: TextStyle( - color: Colors.black, - fontSize: 13.0, -// fontWeight: FontWeight.bold, - ), - ), - Padding( -// padding: const EdgeInsets.only(top: 15, bottom: 10), - padding: const EdgeInsets.only( - top: 10, bottom: 5), - child: Texts( - "SAR ${model.recommendedProductList[index].price}", - bold: true, - fontSize: 14, - ), - ), - ], - ), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.only( - right: 10, bottom: 10), -// margin: EdgeInsets.only(left: 5), - child: Align( - alignment: Alignment.topLeft, - child: RatingBar.readOnly( - initialRating: model.recommendedProductList[index].approvedRatingSum.toDouble(), -// initialRating: productRate, - size: 13.0, - filledColor: Colors.yellow[700], - emptyColor: Colors.grey[500], - isHalfAllowed: true, - halfFilledIcon: Icons.star_half, - filledIcon: Icons.star, - emptyIcon: Icons.star, - ), - ), - ), - Texts( - "(${model.recommendedProductList[index].approvedTotalReviews.toString()})", -// bold: true, - fontSize: 12, - ), - ]), - ], - ), - ), - ); -// Container( -// height: 30, -// padding: EdgeInsets.only( left: 10.0, top: 10, right: 10), -//// margin: EdgeInsets.only(right: 10.0), -// decoration: BoxDecoration( -// border: Border.all( -// color: Colors.grey, -// style: BorderStyle.solid, -// width: 1.0, -// ), -// color: Colors.white, -// borderRadius: BorderRadius.circular(10.0)), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Container( -// child: Align( -// alignment: Alignment.topRight, -// child:!isInWishlist -// ? InkWell( -// onTap: () { -// }, -// child: SvgPicture.asset( -// 'assets/images/pharmacy/heart-empty.svg', -// width: 20, -// height: 20, -// color: Colors.grey, -// ), -// ) -// : InkWell( -// onTap: () { -// }, -// child: SvgPicture.asset( -// 'assets/images/pharmacy/Redheart.svg', -// width: 20, -// height: 20, -//// color: Colors.red, -// ), -// ) -// ), -// ), -// Container( -// padding: EdgeInsets.only(left: 25, bottom: 20), -//// margin: EdgeInsets.fromLTRB(0, 16, 0, 0), -//// alignment: Alignment.centerLeft, -// child: (model.recommendedProductList[index].images != null && -// model.recommendedProductList[index].images.length > 0) -// ? Image.network( -// model.recommendedProductList[index].images[0].src.toString(), -//// item.images[0].src, -// fit: BoxFit.cover, -// height: 80, -// ) -// : Image.asset( -// "assets/images/no_image.png", -// fit: BoxFit.cover, -// height: 80, +// ), // ), -// ), -// Text( -// model.recommendedProductList[index].name, -//// model.recommendedProduct[0].products[index].shortDescription -//// .toString(), -// style: TextStyle( -// color: Colors.black, -// fontSize: 15.0, -//// fontWeight: FontWeight.bold, -// ), -// ), -// Padding( -// padding: const EdgeInsets.only(top: 15, bottom: 10), -// child: Texts( -// "SAR ${model.recommendedProductList[index].price}", -// bold: true, -// fontSize: 14, +// ]) +// : Container(), +// ) +// : Container( +// height: model.recommendedProductList.length > 0 +// ? MediaQuery.of(context).size.height * 0.60 +// : 0, +// child: ListView.builder( +// physics: ScrollPhysics(), +//// physics: NeverScrollableScrollPhysics(), +// itemCount: model.recommendedProductList.length, +// itemBuilder: (context, index) { +// return Card( +// elevation: 2, +// shape: RoundedRectangleBorder( +// side: BorderSide(color: Colors.grey[300], width: 2), +// borderRadius: BorderRadius.circular(10)), +//// +// margin: EdgeInsets.symmetric( +// horizontal: 8, +// vertical: 4, +// ), +// child: Container( +// decoration: BoxDecoration( +// borderRadius: BorderRadius.all( +// Radius.circular(15), // ), // ), -// Row( -// crossAxisAlignment: -// CrossAxisAlignment.start, -// children: [ +// padding: EdgeInsets.symmetric(horizontal: 5), +// width: MediaQuery.of(context).size.width / 3, +//// +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Stack(children: [ // Container( -// padding: EdgeInsets.only(right: 10), -//// margin: EdgeInsets.only(left: 5), // child: Align( -// alignment: Alignment.topLeft, -// child: RatingBar.readOnly( -// initialRating: -// model.recommendedProductList[index].approvedRatingSum.toDouble(), -//// initialRating: productRate, -// size: 15.0, -// filledColor: Colors.yellow[700], -// emptyColor: Colors.grey[500], -// isHalfAllowed: true, -// halfFilledIcon: Icons.star_half, -// filledIcon: Icons.star, -// emptyIcon: Icons.star, -// ), -// ), +// alignment: Alignment.topRight, +// child: //true +// //wishlistVar[index].id.contains(model.recommendedProductList[index].id) +// !isInWishlist +// ? IconButton( +// icon: Icon(Icons.favorite_border), +// color: Colors.grey, +// iconSize: 30, +// onPressed: () { +// setState(() { +// addToWishlistFunction(itemID); +// }); +// }, +// ) +// : IconButton( +// icon: Icon(Icons.favorite), +// color: Colors.red, +// iconSize: 30, +// onPressed: () { +// setState(() { +// deleteFromWishlistFunction(itemID); +// }); +// }, +// ) +//// +// ), // ), -// Texts( -// "(${model.recommendedProductList[index].approvedTotalReviews.toString()})", -//// bold: true, -// fontSize: 12, +// Container( +// margin: EdgeInsets.fromLTRB(0, 16, 10, 16), +// alignment: Alignment.center, +//// padding: EdgeInsets.only(left: 25, bottom: 20), +// child: (model.recommendedProductList[index].images != null && +// model.recommendedProductList[index].images.length > 0) +// ? Image.network(model.recommendedProductList[index].images[0].src.toString(), +//// item.images[0].src, +// fit: BoxFit.cover, +// height: 60, +// ) +// : Image.asset("assets/images/no_image.png", +// fit: BoxFit.cover, +// height: 60, +// ), +// ), +// Container( +// width: model.recommendedProductList[index].rxMessage != null +// ? MediaQuery.of(context).size.width / 5 +// : 0, +// padding: EdgeInsets.all(4), +// decoration: BoxDecoration( +// color: Color(0xffb23838), +// borderRadius: BorderRadius.only( +// topLeft: Radius.circular(6)), +// ), +// child: Texts( +// model.recommendedProductList[index].rxMessage != null +// ? model.recommendedProductList[index].rxMessage +// : "", +// color: Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: FontWeight.w400, +// ), // ), // ]), -// ], -// ), -// ); - }), - ), - ]), - ), - ), - ); +// Container( +// margin: EdgeInsets.symmetric( +// horizontal: 6, +// vertical: 2, +// ), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text(model.recommendedProductList[index].name, +// style: TextStyle( +// color: Colors.black, +// fontSize: 13.0, +//// fontWeight: FontWeight.bold, +// ), +// ), +// Padding( +//// padding: const EdgeInsets.only(top: 15, bottom: 10), +// padding: const EdgeInsets.only( +// top: 10, bottom: 5), +// child: Texts( +// "SAR ${model.recommendedProductList[index].price}", +// bold: true, +// fontSize: 14, +// ), +// ), +// ], +// ), +// ), +// Row( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Container( +// padding: EdgeInsets.only( +// right: 10, bottom: 10), +//// margin: EdgeInsets.only(left: 5), +// child: Align( +// alignment: Alignment.topLeft, +// child: RatingBar.readOnly( +// initialRating: model.recommendedProductList[index].approvedRatingSum.toDouble(), +//// initialRating: productRate, +// size: 13.0, +// filledColor: Colors.yellow[700], +// emptyColor: Colors.grey[500], +// isHalfAllowed: true, +// halfFilledIcon: Icons.star_half, +// filledIcon: Icons.star, +// emptyIcon: Icons.star, +// ), +// ), +// ), +// Texts( +// "(${model.recommendedProductList[index].approvedTotalReviews.toString()})", +//// bold: true, +// fontSize: 12, +// ), +// ]), +// ], +// ), +// ), +// ); +// +// }), +// ), +// ]), +// ), +// ), +// ); } checkWishlist() async { ProductDetailViewModel x = new ProductDetailViewModel(); diff --git a/lib/pages/pharmacies/widgets/ProductTileItem.dart b/lib/pages/pharmacies/widgets/ProductTileItem.dart index 20d6b730..a7e71fab 100644 --- a/lib/pages/pharmacies/widgets/ProductTileItem.dart +++ b/lib/pages/pharmacies/widgets/ProductTileItem.dart @@ -57,10 +57,10 @@ class ProductTileItem extends StatelessWidget { shape: Border(right: BorderSide(color: Colors.grey.shade300, width: 1)), margin: EdgeInsets.symmetric( horizontal: 8, - vertical: 4, + vertical: 0, ), child: Container( - padding: EdgeInsets.symmetric(horizontal: 0), + padding: EdgeInsets.symmetric(horizontal: 4), width: MediaQuery.of(context).size.width / 3, child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -92,13 +92,13 @@ class ProductTileItem extends StatelessWidget { borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), ), - child: Texts( - item.rxMessage != null ? item.rxMessage : "", + child: item.rxMessage != null ? Texts( + projectProvider.isArabic ? item.rxMessagen : item.rxMessage, color: Colors.white, regular: true, fontSize: 10, fontWeight: FontWeight.w400, - ), + ): Texts(""), ) ], ), diff --git a/lib/pages/pharmacies/wishlist.dart b/lib/pages/pharmacies/wishlist.dart index 000e8404..b75f709b 100644 --- a/lib/pages/pharmacies/wishlist.dart +++ b/lib/pages/pharmacies/wishlist.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/wishlist_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/ProductCheckTypeWidget.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -18,7 +19,7 @@ class _WishlistPageState extends State { return BaseView( onModelReady: (model) => model.getWishlistData(), builder: (_, model, wi) => AppScaffold( - appBarTitle: 'Wishlist page', + appBarTitle: TranslationBase.of(context).wishlist, isShowAppBar: widget.showBar, isShowDecPage: false, isPharmacy: true, diff --git a/lib/pages/pharmacy/profile/profile.dart b/lib/pages/pharmacy/profile/profile.dart index cd5c6ec7..918e9668 100644 --- a/lib/pages/pharmacy/profile/profile.dart +++ b/lib/pages/pharmacy/profile/profile.dart @@ -93,11 +93,12 @@ class _ProfilePageState extends State { }, builder: (_, model, wi) => AppScaffold( appBarTitle: TranslationBase.of(context).myAccount, - isShowAppBar: false, + isShowAppBar: true, isShowDecPage: false, isPharmacy: true, body: user != null ? Container( + color: Colors.white, child: SingleChildScrollView( child: Column( children: [ diff --git a/lib/pages/search_products_page.dart b/lib/pages/search_products_page.dart index 73b17558..16720946 100644 --- a/lib/pages/search_products_page.dart +++ b/lib/pages/search_products_page.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/product-brands.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -32,7 +33,7 @@ class _SearchProductsPageState extends State { builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget child) => PharmacyAppScaffold( - appBarTitle: 'Search', + appBarTitle: TranslationBase.of(context).search, isBottomBar: false, isShowAppBar: true, backgroundColor: Colors.white, @@ -53,7 +54,7 @@ class _SearchProductsPageState extends State { key: _formKey, child: TextFields( autoFocus: true, - hintText: 'Search', + hintText: TranslationBase.of(context).search, fontSize: 14.5, prefixIcon: Icon(Icons.search), inputAction: TextInputAction.search, @@ -62,12 +63,14 @@ class _SearchProductsPageState extends State { }, onSubmit: (value) { searchMedicine(model, context); - msg = 'No Result Found'; +// msg = 'No Result Found'; + msg = TranslationBase.of(context).noResultFound; }, controller: textController, validator: (value) { if (value.isEmpty) { - return 'please Enter Product Name'; +// return 'please Enter Product Name'; + return TranslationBase.of(context).pleaseEnterProductName; } return null; }, @@ -79,7 +82,7 @@ class _SearchProductsPageState extends State { ), InkWell( child: Texts( - 'Cancel', + TranslationBase.of(context).cancel, fontSize: 17.0, fontWeight: FontWeight.w500, ), diff --git a/lib/pages/settings/InfoPage.dart b/lib/pages/settings/InfoPage.dart new file mode 100644 index 00000000..cb7a8fc6 --- /dev/null +++ b/lib/pages/settings/InfoPage.dart @@ -0,0 +1,14 @@ +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; + +class AboutApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).aboutApp, + isShowDecPage: false, + body: Container()); + } +} diff --git a/lib/pages/settings/settings.dart b/lib/pages/settings/settings.dart index b578eb3f..abfd022e 100644 --- a/lib/pages/settings/settings.dart +++ b/lib/pages/settings/settings.dart @@ -33,6 +33,14 @@ class _Settings extends State with TickerProviderStateMixin { AppGlobal.context = context; return Scaffold( appBar: AppBar( + actions: [ + IconButton( + icon: Icon(Icons.info, color: Colors.white), + onPressed: () { + //openInfoPage() + }, + ) + ], bottom: TabBar( // isScrollable: true, @@ -51,8 +59,7 @@ class _Settings extends State with TickerProviderStateMixin { controller: _tabController, ), title: Text(TranslationBase.of(context).settings, - style: - TextStyle(color: Theme.of(context).textTheme.bodyText2.color)), + style: TextStyle(color: Colors.white)), leading: Builder( builder: (BuildContext context) { return ArrowBack(); diff --git a/lib/pages/sub_categorise_page.dart b/lib/pages/sub_categorise_page.dart index 5a9dbcfb..8c3b42ad 100644 --- a/lib/pages/sub_categorise_page.dart +++ b/lib/pages/sub_categorise_page.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -22,7 +23,8 @@ class SubCategorisePage extends StatefulWidget { SubCategorisePage({this.id, this.parentId, this.title}); @override - _SubCategorisePageState createState() => _SubCategorisePageState(id: id, title: title, parentId: parentId); + _SubCategorisePageState createState() => + _SubCategorisePageState(id: id, title: title, parentId: parentId); } class _SubCategorisePageState extends State { @@ -50,7 +52,9 @@ class _SubCategorisePageState extends State { TextEditingController maxField = TextEditingController(); return BaseView( onModelReady: (model) => model.getSubCategorise(i: id), - builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget child) => PharmacyAppScaffold( + builder: (BuildContext context, PharmacyCategoriseViewModel model, + Widget child) => + PharmacyAppScaffold( appBarTitle: title, isBottomBar: false, isShowAppBar: true, @@ -82,7 +86,8 @@ class _SubCategorisePageState extends State { ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089195_diet-nutrition_2.png' : parentId == '9' ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089196_household_2.png' - : parentId == '10' + : parentId == + '10' ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089197_home-care-appliances_2.png' : '', fit: BoxFit.fill, @@ -94,12 +99,14 @@ class _SubCategorisePageState extends State { children: [ InkWell( child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Padding( padding: EdgeInsets.all(10.0), child: Container( - child: Texts('View All Categories'), + child: Texts(TranslationBase.of(context) + .viewCategorise), ), ), Icon(Icons.arrow_forward) @@ -111,21 +118,30 @@ class _SubCategorisePageState extends State { context: context, builder: (BuildContext context) { return Container( - height: MediaQuery.of(context).size.height * 0.89, + height: + MediaQuery.of(context).size.height * + 0.89, color: Colors.white, child: Center( child: ListView.builder( scrollDirection: Axis.vertical, - itemCount: model.subCategorise.length, - itemBuilder: (BuildContext context, int index) { + itemCount: + model.subCategorise.length, + itemBuilder: (BuildContext context, + int index) { return Container( child: Padding( padding: EdgeInsets.all(8.0), child: InkWell( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment + .start, children: [ - Texts(model.subCategorise[index].name), + Texts(model + .subCategorise[ + index] + .name), Divider( thickness: 0.6, color: Colors.black12, @@ -136,8 +152,12 @@ class _SubCategorisePageState extends State { Navigator.push( context, FadePage( - page: FinalProductsPage( - id: model.subCategorise[index].id, + page: + FinalProductsPage( + id: model + .subCategorise[ + index] + .id, ), ), ); @@ -170,19 +190,23 @@ class _SubCategorisePageState extends State { itemCount: model.subCategorise.length, itemBuilder: (BuildContext context, int index) { return Padding( - padding: EdgeInsets.symmetric(horizontal: 8.0), + padding: + EdgeInsets.symmetric(horizontal: 8.0), child: InkWell( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Padding( - padding: EdgeInsets.symmetric(horizontal: 13.0), + padding: EdgeInsets.symmetric( + horizontal: 13.0), child: Container( height: 60.0, width: 65.0, decoration: BoxDecoration( shape: BoxShape.circle, - color: Colors.orange.shade200.withOpacity(0.45), + color: Colors.orange.shade200 + .withOpacity(0.45), ), child: Center( child: Icon( @@ -193,8 +217,14 @@ class _SubCategorisePageState extends State { ), ), Container( - width: MediaQuery.of(context).size.width * 0.17, - height: MediaQuery.of(context).size.height * 0.10, + width: MediaQuery.of(context) + .size + .width * + 0.17, + height: MediaQuery.of(context) + .size + .height * + 0.10, child: Center( child: Texts( model.subCategorise[index].name, @@ -240,7 +270,8 @@ class _SubCategorisePageState extends State { width: 10.0, ), Texts( - 'Refine', + TranslationBase.of(context).refine, +// 'Refine', fontWeight: FontWeight.w600, ), ], @@ -254,16 +285,21 @@ class _SubCategorisePageState extends State { initialChildSize: 0.95, maxChildSize: 0.95, minChildSize: 0.9, - builder: (BuildContext context, ScrollController scrollController) { + builder: (BuildContext context, + ScrollController scrollController) { return SingleChildScrollView( controller: scrollController, child: Container( color: Colors.white, - height: MediaQuery.of(context).size.height * 1.95, + height: MediaQuery.of(context) + .size + .height * + 1.95, child: Column( children: [ Padding( - padding: EdgeInsets.all(8.0), + padding: + EdgeInsets.all(8.0), child: Row( children: [ Icon( @@ -273,21 +309,30 @@ class _SubCategorisePageState extends State { width: 10.0, ), Texts( - 'Refine', - fontWeight: FontWeight.w600, + TranslationBase.of( + context) + .refine, +// 'Refine', + fontWeight: + FontWeight.w600, ), SizedBox( width: 250.0, ), InkWell( child: Texts( - 'Close', + TranslationBase.of( + context) + .closeIt, +// 'Close', color: Colors.red, - fontWeight: FontWeight.w600, + fontWeight: + FontWeight.w600, fontSize: 15.0, ), onTap: () { - Navigator.pop(context); + Navigator.pop( + context); }, ), ], @@ -300,27 +345,39 @@ class _SubCategorisePageState extends State { Column( children: [ ExpansionTile( - title: Texts('Categorise'), + title: Texts( + TranslationBase.of( + context) + .categorise), children: [ ProcedureListWidget( model: model, - masterList: model.subCategorise, - removeHistory: (item) { + masterList: model + .subCategorise, + removeHistory: + (item) { setState(() { - entityList.remove(item); + entityList + .remove( + item); }); }, - addHistory: (history) { + addHistory: + (history) { setState(() { - entityList.add(history); + entityList.add( + history); }); }, - addSelectedHistories: () { + addSelectedHistories: + () { //TODO build your fun herr // widget.addSelectedHistories(); }, - isEntityListSelected: (master) => - isEntityListSelected(master), + isEntityListSelected: + (master) => + isEntityListSelected( + master), ) ], ), @@ -329,27 +386,40 @@ class _SubCategorisePageState extends State { color: Colors.black12, ), ExpansionTile( - title: Texts('Brands'), + title: Texts( + TranslationBase.of( + context) + .brands), children: [ ProcedureListWidget( model: model, - masterList: model.brandsList, - removeHistory: (item) { + masterList: model + .brandsList, + removeHistory: + (item) { setState(() { - entityListBrands.remove(item); + entityListBrands + .remove( + item); }); }, - addHistory: (history) { + addHistory: + (history) { setState(() { - entityListBrands.add(history); + entityListBrands + .add( + history); }); }, - addSelectedHistories: () { + addSelectedHistories: + () { //TODO build your fun herr // widget.addSelectedHistories(); }, - isEntityListSelected: (master) => - isEntityListSelectedBrands(master), + isEntityListSelected: + (master) => + isEntityListSelectedBrands( + master), ) ], ), @@ -358,43 +428,69 @@ class _SubCategorisePageState extends State { color: Colors.black12, ), ExpansionTile( - title: Texts('Price'), + title: Texts( + TranslationBase.of( + context) + .price), children: [ Container( - color: Color(0xffEEEEEE), + color: Color( + 0xffEEEEEE), child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisAlignment: + MainAxisAlignment + .spaceAround, children: [ Column( - mainAxisAlignment: MainAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment + .start, children: [ - Texts('Min'), + Texts( + 'Min'), Container( - color: Colors.white, - width: 200, - height: 40, - child: TextFormField( - decoration: InputDecoration( - border: OutlineInputBorder(), + color: Colors + .white, + width: + 200, + height: + 40, + child: + TextFormField( + decoration: + InputDecoration( + border: + OutlineInputBorder(), ), - controller: minField, + controller: + minField, ), ), ], ), Column( - mainAxisAlignment: MainAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment + .start, children: [ - Texts('Max'), + Texts( + 'Max'), Container( - color: Colors.white, - width: 200, - height: 40, - child: TextFormField( - decoration: InputDecoration( - border: OutlineInputBorder(), + color: Colors + .white, + width: + 200, + height: + 40, + child: + TextFormField( + decoration: + InputDecoration( + border: + OutlineInputBorder(), ), - controller: maxField, + controller: + maxField, ), ), ], @@ -409,18 +505,32 @@ class _SubCategorisePageState extends State { color: Colors.black12, ), SizedBox( - height: MediaQuery.of(context).size.height * 0.4, + height: MediaQuery.of( + context) + .size + .height * + 0.4, ), Padding( - padding: EdgeInsets.all(8.0), + padding: + EdgeInsets.all(8.0), child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + mainAxisAlignment: + MainAxisAlignment + .spaceEvenly, children: [ - Container( - width: 100, - child: Button( - label: 'Reset', - backgroundColor: Colors.red, + Expanded( + child: Container( + width: 100, + child: Button( + label: TranslationBase.of( + context) + .reset, +// 'Reset', + backgroundColor: + Colors + .red, + ), ), ), SizedBox( @@ -429,36 +539,66 @@ class _SubCategorisePageState extends State { Container( width: 200, child: Button( - onTap: () async { - String categoriesId = ""; - for (CategoriseParentModel category in entityList) { - if (categoriesId == "") { - categoriesId = category.id; + onTap: + () async { + String + categoriesId = + ""; + for (CategoriseParentModel category + in entityList) { + if (categoriesId == + "") { + categoriesId = + category + .id; } else { - categoriesId = "$categoriesId,${category.id}"; + categoriesId = + "$categoriesId,${category.id}"; } } - String brandIds = ""; + String + brandIds = + ""; for (CategoriseParentModel brand in entityListBrands) { - if (brandIds == "") { - brandIds = brand.id; + if (brandIds == + "") { + brandIds = + brand + .id; } else { - brandIds = "$brandIds,${brand.id}"; + brandIds = + "$brandIds,${brand.id}"; } } - GifLoaderDialogUtils.showMyDialog(context); + GifLoaderDialogUtils + .showMyDialog( + context); await model.getFilteredSubProducts( - min: minField.text.toString(), - max: maxField.text.toString(), - categoryId: categoriesId, - brandId: brandIds); - GifLoaderDialogUtils.hideDialog(context); - Navigator.pop(context); + min: minField + .text + .toString(), + max: maxField + .text + .toString(), + categoryId: + categoriesId, + brandId: + brandIds); + GifLoaderDialogUtils + .hideDialog( + context); + Navigator.pop( + context); }, - label: 'Apply', - backgroundColor: Colors.green, + label: TranslationBase.of( + context) + .apply, +// 'Apply', + backgroundColor: + Colors + .green, ), ), ], @@ -843,7 +983,8 @@ class _SubCategorisePageState extends State { } bool isEntityListSelected(CategoriseParentModel masterKey) { - Iterable history = entityList.where((element) => masterKey.id == element.id); + Iterable history = + entityList.where((element) => masterKey.id == element.id); if (history.length > 0) { return true; } @@ -851,7 +992,8 @@ class _SubCategorisePageState extends State { } bool isEntityListSelectedBrands(CategoriseParentModel masterKey) { - Iterable history = entityListBrands.where((element) => masterKey.id == element.id); + Iterable history = + entityListBrands.where((element) => masterKey.id == element.id); if (history.length > 0) { return true; } diff --git a/lib/pages/vaccine/my_vaccines_screen.dart b/lib/pages/vaccine/my_vaccines_screen.dart index 27ce8399..4b71b0b7 100644 --- a/lib/pages/vaccine/my_vaccines_screen.dart +++ b/lib/pages/vaccine/my_vaccines_screen.dart @@ -1,19 +1,19 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import '../base/base_view.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart'; -import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; -import 'package:popup_box/popup_box.dart'; +import '../base/base_view.dart'; import 'my_vaccines_item_screen.dart'; //TODO fix by jammal we have a static data @@ -28,192 +28,164 @@ class _MyVaccinesState extends State { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) => model.getVaccine(), - builder: (BuildContext context, VaccineViewModel model, Widget child) => - AppScaffold( - isShowAppBar: true, - baseViewModel: model, - appBarTitle: TranslationBase.of(context).myVaccines, - body: Container( - margin: EdgeInsets.only( - left: SizeConfig.screenWidth * 0.004, - right: SizeConfig.screenWidth * 0.004, - top: SizeConfig.screenWidth * 0.04, - ), - child: Column( - children: [ - RoundedContainer( - backgroundColor: Colors.white, - child: ExpansionTile( - title: Container( - height: 65.0, - child: Text('2018'), - ), - children: [ - Container( - child: ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: model.vaccineList == null - ? 0 - : model.vaccineList.length, - itemBuilder: (BuildContext context, int index) { - return Column( - children: [ - RoundedContainer( - child: Column( + builder: (BuildContext context, VaccineViewModel model, Widget child) => AppScaffold( + isShowAppBar: true, + baseViewModel: model, + appBarTitle: TranslationBase.of(context).myVaccines, + description: TranslationBase.of(context).infoVaccines, + imagesInfo: [ + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/ar/0.png') + ], + body: Container( + margin: EdgeInsets.only( + left: SizeConfig.screenWidth * 0.004, + right: SizeConfig.screenWidth * 0.004, + top: SizeConfig.screenWidth * 0.04, + ), + child: Column( + children: [ + RoundedContainer( + backgroundColor: Colors.white, + child: ExpansionTile( + title: Container( + height: 65.0, + child: Text('2018'), + ), + children: [ + Container( + child: ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: model.vaccineList == null ? 0 : model.vaccineList.length, + itemBuilder: (BuildContext context, int index) { + return Column( + children: [ + RoundedContainer( + child: Column( + children: [ + Row( children: [ - Row( - children: [ - Expanded( - child: Column( - children: [ - Padding( - padding: EdgeInsets - .symmetric( - horizontal: - 20.0, - vertical: 20.0), - child: Image.network( - model - .vaccineList[ - index] - .doctorImageURL, - height: SizeConfig - .imageSizeMultiplier * - 23, - width: SizeConfig - .imageSizeMultiplier * - 20, - fit: BoxFit.fill, - ), - ), - ], - ), - flex: 2, - ), - Expanded( - child: Container( - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Text( - model - .vaccineList[ - index] - .doctorTitle + - model - .vaccineList[ - index] - .doctorName, - style: TextStyle( - fontWeight: - FontWeight.w900, - fontSize: 16.6, - ), - ), - SizedBox(height: 7.0), - Text( - model - .vaccineList[ - index] - .projectName, - style: TextStyle( - fontSize: 17.0, - letterSpacing: 0.5, - ), - ), - SizedBox(height: 7.0), - Text( - model - .vaccineList[ - index] - .vaccineName, - style: TextStyle( - fontSize: 17.0, - ), - ), - SizedBox(height: 7.0), - Text( - 'Date Taken ' + - convertDateFormat(model - .vaccineList[ - index] - .invoiceDate), - style: TextStyle( - fontSize: 17.0), - ), - ], + Expanded( + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 20.0), + child: Image.network( + model.vaccineList[index].doctorImageURL, + height: SizeConfig.imageSizeMultiplier * 23, + width: SizeConfig.imageSizeMultiplier * 20, + fit: BoxFit.fill, ), ), - flex: 5, + ], + ), + flex: 2, + ), + Expanded( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + model.vaccineList[index].doctorTitle + model.vaccineList[index].doctorName, + style: TextStyle( + fontWeight: FontWeight.w900, + fontSize: 16.6, + ), + ), + SizedBox(height: 7.0), + Text( + model.vaccineList[index].projectName, + style: TextStyle( + fontSize: 17.0, + letterSpacing: 0.5, + ), + ), + SizedBox(height: 7.0), + Text( + model.vaccineList[index].vaccineName, + style: TextStyle( + fontSize: 17.0, + ), + ), + SizedBox(height: 7.0), + Text( + 'Date Taken ' + convertDateFormat(model.vaccineList[index].invoiceDate), + style: TextStyle(fontSize: 17.0), + ), + ], ), - ], + ), + flex: 5, ), ], ), - ), - ], - ); - }), - ) - ], - ), - ), - // SpaceBetweenTexts(space: 165.0), - ], + ], + ), + ), + ], + ); + }), + ) + ], + ), ), - ), - bottomSheet: model.state == ViewState.Busy?Container(height: 0,): model.vaccineList.length > 0 + // SpaceBetweenTexts(space: 165.0), + ], + ), + ), + bottomSheet: model.state == ViewState.Busy + ? Container( + height: 0, + ) + : model.vaccineList.length > 0 ? Container( - color: Theme.of(context).scaffoldBackgroundColor, - padding: EdgeInsets.all(12), - height: MediaQuery.of(context).size.height * 0.25, - width: double.infinity, - child: Column( - children: [ - Divider( - height: 2, - thickness: 1, - ), - SizedBox( - height: 6, - ), - Container( + color: Theme.of(context).scaffoldBackgroundColor, + padding: EdgeInsets.all(12), + height: MediaQuery.of(context).size.height * 0.25, width: double.infinity, - // height: 80.0, - child: Button( - disabled: true, - label: TranslationBase.of(context) - .checkVaccineAvailability, - backgroundColor: Color(0xff9EA3A4), - onTap: () => Navigator.push( - context, FadePage(page: MyVaccinesItemPage())), + child: Column( + children: [ + Divider( + height: 2, + thickness: 1, + ), + SizedBox( + height: 6, + ), + Container( + width: double.infinity, + // height: 80.0, + child: Button( + disabled: true, + label: TranslationBase.of(context).checkVaccineAvailability, + backgroundColor: Color(0xff9EA3A4), + onTap: () => Navigator.push(context, FadePage(page: MyVaccinesItemPage())), + ), + ), + if (projectViewModel.havePrivilege(27)) + Container( + width: double.infinity, + // height: 80.0, + child: SecondaryButton( + label: TranslationBase.of(context).sendEmail, + color: Color(0xffF62426), + textColor: Colors.white, + disabled: model.vaccineList.length == 0, + loading: model.state == ViewState.BusyLocal, + onTap: () async { + model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully); + }, + ), + ), + ], ), + ) + : Container( + height: 0, ), - if (projectViewModel.havePrivilege(27)) - Container( - width: double.infinity, - // height: 80.0, - child: SecondaryButton( - label: TranslationBase.of(context).sendEmail, - color: Color(0xffF62426), - textColor: Colors.white, - disabled: model.vaccineList.length == 0, - loading: model.state == ViewState.BusyLocal, - onTap: () async { - model.sendEmail( - message: TranslationBase.of(context) - .emailSentSuccessfully); - }, - ), - ), - ], - ), - ) - : Container(height: 0,), - ), + ), ); } @@ -224,13 +196,8 @@ class _MyVaccinesState extends State { final startIndex = Date.indexOf(start); final endIndex = Date.indexOf(end, startIndex + start.length); - var date = new DateTime.fromMillisecondsSinceEpoch( - int.parse(Date.substring(startIndex + start.length, endIndex))); - String newDate = date.year.toString() + - "-" + - date.month.toString().padLeft(2, '0') + - "-" + - date.day.toString().padLeft(2, '0'); + var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(Date.substring(startIndex + start.length, endIndex))); + String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0'); return newDate.toString(); } diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index b97714ce..888efd30 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:flutter/cupertino.dart'; + class DoctorsListService extends BaseService { AppSharedPreferences sharedPref = AppSharedPreferences(); AppGlobal appGlobal = new AppGlobal(); @@ -29,7 +30,7 @@ class DoctorsListService extends BaseService { Future getDoctorsList( int clinicID, int projectID, bool isNearest, BuildContext context, - {doctorId, doctorName}) async { + {doctorId, doctorName, isContinueDentalPlan = false}) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { @@ -53,27 +54,25 @@ class DoctorsListService extends BaseService { "VersionID": req.VersionID, "Channel": req.Channel, "generalid": 'Cs2020@2016\$2958', - "PatientOutSA": authUser.outSA, + "PatientOutSA": authProvider.isLogin ? authUser.outSA : 0, "TokenID": "", "DeviceTypeID": req.DeviceTypeID, "SessionID": "YckwoXhUmWBsnHKEKig", "ClinicID": clinicID, "ProjectID": projectID, "DoctorName": doctorName, //!= null ? doctorId : 0, - "ContinueDentalPlan": false, - "IsSearchAppointmnetByClinicID": true, + "ContinueDentalPlan": isContinueDentalPlan, + "IsSearchAppointmnetByClinicID": isContinueDentalPlan ? false : true, "PatientID": authUser.patientID != null ? authUser.patientID : 0, "gender": authUser.gender != null ? authUser.gender : 0, "age": authUser.age != null ? authUser.age : 0, "IsGetNearAppointment": false, - // "Latitude": 0, - // "Longitude": 0, - // "License": true, "SearchForVoiceCommand": doctorId != null && doctorId.length > 0 ? true : false, "DoctorIDsList": doctorId, "Latitude": lat != null ? lat.toString() : 0, "Longitude": long != null ? long.toString() : 0, + "isDentalAllowedBackend": isContinueDentalPlan, "IsGetNearAppointment": isNearest, if (isNearest) "SelectedDate": DateUtil.convertDateToString(DateTime.now()), @@ -159,7 +158,7 @@ class DoctorsListService extends BaseService { "VersionID": req.VersionID, "Channel": req.Channel, "generalid": 'Cs2020@2016\$2958', - "PatientOutSA": authUser.outSA ?? false, + "PatientOutSA": authUser.outSA ?? false, "TokenID": "", "DeviceTypeID": req.DeviceTypeID, "SessionID": null, @@ -186,7 +185,7 @@ class DoctorsListService extends BaseService { Future getDoctorsRating(int docID, context) async { Map request; var languageID = - await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); Request req = appGlobal.getPublicRequest(); request = { "LanguageID": languageID == 'ar' ? 1 : 2, @@ -209,37 +208,38 @@ class DoctorsListService extends BaseService { await baseAppClient.post(GET_DOCTOR_RATING_NOTES, onSuccess: (response, statusCode) async { - localRes = response; - }, onFailure: (String error, int statusCode) { - throw error; - }, body: request); + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); return Future.value(localRes); } - Future getDoctorPrePostImages(DoctorProfileList doctorProfile, context) async { + Future getDoctorPrePostImages( + DoctorProfileList doctorProfile, context) async { Map request; request = { - "PatientOutSA": authUser.outSA ?? 0, + "PatientOutSA": authUser.outSA ?? 0, "isDentalAllowedBackend": false, - "DoctorID" : doctorProfile.doctorID, - "ClinicID":doctorProfile.clinicID, - "ProjectID":doctorProfile.projectID + "DoctorID": doctorProfile.doctorID, + "ClinicID": doctorProfile.clinicID, + "ProjectID": doctorProfile.projectID }; var images = DoctorPrePostImages(); await baseAppClient.post(GET_DOCTOR_PRE_POST_IMAGES, onSuccess: (response, statusCode) async { - var list = response['DoctorPrePostImagesList']; - if (list is List && list.length > 0){ - list.forEach((j) { - var image = DoctorPrePostImageModel.fromJson(j); - if(image.imageType == 1) images.pre = image; - if(image.imageType == 2) images.post = image; - }); - } - }, onFailure: (String error, int statusCode) { - throw error; - }, body: request); + var list = response['DoctorPrePostImagesList']; + if (list is List && list.length > 0) { + list.forEach((j) { + var image = DoctorPrePostImageModel.fromJson(j); + if (image.imageType == 1) images.pre = image; + if (image.imageType == 2) images.post = image; + }); + } + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); return Future.value(images); } @@ -350,7 +350,8 @@ class DoctorsListService extends BaseService { } Future insertAppointment(int docID, int clinicID, int projectID, - String selectedTime, String selectedDate, BuildContext context, [String procedureID]) async { + String selectedTime, String selectedDate, BuildContext context, + [String procedureID]) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { @@ -965,8 +966,8 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } - Future addVIDARequest(String advanceNumber, - String paymentReference, dynamic apptData, BuildContext context) async { + Future addVIDARequest(String advanceNumber, String paymentReference, + dynamic apptData, BuildContext context) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { var data = AuthenticatedUser.fromJson( @@ -1476,18 +1477,33 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } - Future sendCheckinNfcRequest( - int appointmentNo, String nfcCode,int projectId, BuildContext context) async { + Future sendCheckinNfcRequest(int appointmentNo, String nfcCode, + int projectId, BuildContext context) async { Map request; - Request req = appGlobal.getPublicRequest(); request = { - "AppointmentNo":appointmentNo, + "AppointmentNo": appointmentNo, "NFC_Code": nfcCode, "ProjectID": projectId, }; dynamic localRes; await baseAppClient.post(SEND_CHECK_IN_NFC_REQUEST, + onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future checkIfHasDentalPlan(int projectID, BuildContext context) async { + Map request; + + request = { + "ProjectID": projectID, + }; + dynamic localRes; + await baseAppClient.post(HAS_DENTAL_PLAN, onSuccess: (response, statusCode) async { localRes = response; }, onFailure: (String error, int statusCode) { @@ -1495,4 +1511,5 @@ class DoctorsListService extends BaseService { }, body: request); return Future.value(localRes); } + } diff --git a/lib/services/pharmacy_services/recommendedProduct_service.dart b/lib/services/pharmacy_services/recommendedProduct_service.dart index f782855f..8953152e 100644 --- a/lib/services/pharmacy_services/recommendedProduct_service.dart +++ b/lib/services/pharmacy_services/recommendedProduct_service.dart @@ -16,24 +16,26 @@ class RecommendedProductService extends BaseService{ AuthenticatedUser authUser = new AuthenticatedUser(); AuthProvider authProvider = new AuthProvider(); - List _recommendedProductList = List(); - List get recommendedList => _recommendedProductList; - String url =""; +// List> _recommendedProductList = List(); +// List> get recommendedList => _recommendedProductList; + + List _recommendedProductList = List(); + List get recommendedList => _recommendedProductList; Future getRecommendedProducts(productId) async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); hasError = false; - url =GET_RECOMMENDED_PRODUCT+productId; - await baseAppClient.getPharmacy(url, + + await baseAppClient.getPharmacy(GET_RECOMMENDED_PRODUCT+"$productId/$customerId", onSuccess: (dynamic response, int statusCode) { _recommendedProductList.clear(); response['products'].forEach((item) { - _recommendedProductList.add(PharmacyProduct.fromJson(item)); - print("----------------------------------"); - print("Test data"); - print(_recommendedProductList[0]); - print(item['name']); - print(response); +// _recommendedProductList.add(item); + _recommendedProductList.add(RecommendedProductModel.fromJson(item)); + }); + //print(item['name']); + print(response); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/uitl/app_toast.dart b/lib/uitl/app_toast.dart index 5c917009..f997b6b8 100644 --- a/lib/uitl/app_toast.dart +++ b/lib/uitl/app_toast.dart @@ -1,8 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_flexible_toast/flutter_flexible_toast.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; class AppToast { - /// show long toast message /// [message] to show for user /// [timeInSeconds] how many second the toast will appear to the user @@ -64,7 +65,7 @@ class AppToast { FlutterFlexibleToast.showToast( message: message, toastLength: toastLength, - timeInSeconds: timeInSeconds=2, + timeInSeconds: timeInSeconds = 2, fontSize: fontSize, toastGravity: toastGravity, backgroundColor: Colors.green, @@ -87,11 +88,11 @@ class AppToast { static void showErrorToast({ @required String message, Toast toastLength = Toast.LENGTH_LONG, - int timeInSeconds=2, + int timeInSeconds = 2, double fontSize = 16, ToastGravity toastGravity = ToastGravity.TOP, Color textColor = Colors.white, - int radius, + int radius = 15, int elevation, int imageSize = 32, }) { @@ -106,11 +107,23 @@ class AppToast { icon: ICON.CLOSE, radius: radius, elevation: elevation, - imageSize: imageSize); + imageSize: imageSize + ); + } /// cancel toast void cancelToast() { FlutterFlexibleToast.cancel(); } + + void backWithEmpty() { + AppToast.showErrorToast( + message: TranslationBase.of(AppGlobal.context).empty); + Navigator.of(AppGlobal.context).pop(); + } + + void back() { + Navigator.of(AppGlobal.context).pop(); + } } diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart index 48395df7..6deb3907 100644 --- a/lib/uitl/date_uitl.dart +++ b/lib/uitl/date_uitl.dart @@ -63,6 +63,15 @@ class DateUtil { return dateFormat; } + static String convertDateMSToJsonDate(utc) { + var dt = new DateTime.fromMicrosecondsSinceEpoch(utc); + + return "/Date(" + + (dt.millisecondsSinceEpoch * 1000).toString() + + '+0300' + + ")/"; + } + /// check Date /// [dateString] String we want to convert static String checkDate(DateTime checkedTime) { diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 53e98f71..f6363a22 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -18,7 +18,8 @@ class TranslationBase { return localizedValues[key][locale.languageCode]; } - String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; + String get dashboardScreenToolbarTitle => + localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; String get settings => localizedValues['settings'][locale.languageCode]; @@ -58,11 +59,15 @@ class TranslationBase { String get nearestAppo => localizedValues['nearestAppo'][locale.languageCode]; - String get searchByDocText => localizedValues['searchByDocText'][locale.languageCode]; + String get searchByDocText => + localizedValues['searchByDocText'][locale.languageCode]; - String get enterDocName => localizedValues['enterDocName'][locale.languageCode]; + String get enterDocName => + localizedValues['enterDocName'][locale.languageCode]; String get search => localizedValues['search'][locale.languageCode]; + String get noResultFound => localizedValues['noResultFound'][locale.languageCode]; + String get pleaseEnterProductName => localizedValues['pleaseEnterProductName'][locale.languageCode]; String get bookNow => localizedValues['bookNow'][locale.languageCode]; @@ -70,33 +75,41 @@ class TranslationBase { String get appoInfo => localizedValues['appoInfo'][locale.languageCode]; - String get availableAppo => localizedValues['availableAppo'][locale.languageCode]; + String get availableAppo => + localizedValues['availableAppo'][locale.languageCode]; String get gender => localizedValues['gender'][locale.languageCode]; String get nationality => localizedValues['nationality'][locale.languageCode]; - String get docQualifications => localizedValues['docQualifications'][locale.languageCode]; + String get docQualifications => + localizedValues['docQualifications'][locale.languageCode]; - String get confirmAppoHeading => localizedValues['confirmAppoHeading'][locale.languageCode]; + String get confirmAppoHeading => + localizedValues['confirmAppoHeading'][locale.languageCode]; String get patientInfo => localizedValues['patientInfo'][locale.languageCode]; String get bookSuccess => localizedValues['bookSuccess'][locale.languageCode]; - String get patientShare => localizedValues['patientShare'][locale.languageCode]; + String get patientShare => + localizedValues['patientShare'][locale.languageCode]; - String get patientShareWithTax => localizedValues['patientShareWithTax'][locale.languageCode]; + String get patientShareWithTax => + localizedValues['patientShareWithTax'][locale.languageCode]; String get confirmAppo => localizedValues['confirmAppo'][locale.languageCode]; String get confirm => localizedValues['confirm'][locale.languageCode]; - String get confirmLiveCare => localizedValues['confirmLiveCare'][locale.languageCode]; + String get confirmLiveCare => + localizedValues['confirmLiveCare'][locale.languageCode]; - String get waitingForDoctor => localizedValues['waitingForDoctor'][locale.languageCode]; + String get waitingForDoctor => + localizedValues['waitingForDoctor'][locale.languageCode]; - String get confirmLater => localizedValues['confirmLater'][locale.languageCode]; + String get confirmLater => + localizedValues['confirmLater'][locale.languageCode]; String get todoList => localizedValues['todoList'][locale.languageCode]; @@ -112,22 +125,27 @@ class TranslationBase { String get login => localizedValues['login'][locale.languageCode]; - String get loginregister => localizedValues['loginregister'][locale.languageCode]; + String get loginregister => + localizedValues['loginregister'][locale.languageCode]; String get poweredBy => localizedValues['poweredBy'][locale.languageCode]; String get welcome => localizedValues['welcome'][locale.languageCode]; - String get welcomeText => localizedValues['welcome_text'][locale.languageCode]; + String get welcomeText => + localizedValues['welcome_text'][locale.languageCode]; - String get welcomeText2 => localizedValues['welcome_text2'][locale.languageCode]; + String get welcomeText2 => + localizedValues['welcome_text2'][locale.languageCode]; String get yes => localizedValues['yes'][locale.languageCode]; String get no => localizedValues['no'][locale.languageCode]; - String get logintypeRadio => localizedValues['logintyperadio'][locale.languageCode]; - String get registerInfoFamily => localizedValues['register-info-family'][locale.languageCode]; + String get logintypeRadio => + localizedValues['logintyperadio'][locale.languageCode]; + String get registerInfoFamily => + localizedValues['register-info-family'][locale.languageCode]; String get registerNow => localizedValues['registernow'][locale.languageCode]; @@ -137,13 +155,17 @@ class TranslationBase { String get fileNo => localizedValues['fileNo'][locale.languageCode]; String get fileno => localizedValues['fileno'][locale.languageCode]; - String get forgotPassword => localizedValues['forgotFileNo'][locale.languageCode]; + String get forgotPassword => + localizedValues['forgotFileNo'][locale.languageCode]; - String get forgotFileNoTitle => localizedValues['forgotFileNoTitle'][locale.languageCode]; + String get forgotFileNoTitle => + localizedValues['forgotFileNoTitle'][locale.languageCode]; - String get enterNationalId => localizedValues['enter-national-id'][locale.languageCode]; + String get enterNationalId => + localizedValues['enter-national-id'][locale.languageCode]; - String get profileInfo => localizedValues['profile-info'][locale.languageCode]; + String get profileInfo => + localizedValues['profile-info'][locale.languageCode]; String get submit => localizedValues['submit'][locale.languageCode]; @@ -153,31 +175,42 @@ class TranslationBase { String get hijriDate => localizedValues['hijri-date'][locale.languageCode]; - String get gregorianDate => localizedValues['gregorian-date'][locale.languageCode]; + String get gregorianDate => + localizedValues['gregorian-date'][locale.languageCode]; - String get verifyLoginWith => localizedValues['verify-login-with'][locale.languageCode]; + String get verifyLoginWith => + localizedValues['verify-login-with'][locale.languageCode]; String get register => localizedValues['register-user'][locale.languageCode]; - String get verifyFingerprint => localizedValues['verify-with-fingerprint'][locale.languageCode]; + String get verifyFingerprint => + localizedValues['verify-with-fingerprint'][locale.languageCode]; - String get verifyFaceID => localizedValues['verify-with-faceid'][locale.languageCode]; + String get verifyFaceID => + localizedValues['verify-with-faceid'][locale.languageCode]; - String get verifySMS => localizedValues['verify-with-sms'][locale.languageCode]; + String get verifySMS => + localizedValues['verify-with-sms'][locale.languageCode]; - String get verifyWhatsApp => localizedValues['verify-with-whatsapp'][locale.languageCode]; + String get verifyWhatsApp => + localizedValues['verify-with-whatsapp'][locale.languageCode]; String get lastLoginAt => localizedValues['last-login'][locale.languageCode]; - String get lastLoginWith => localizedValues['last-login-with'][locale.languageCode]; + String get lastLoginWith => + localizedValues['last-login-with'][locale.languageCode]; - String get verifyFingerprint2 => localizedValues['verify-fingerprint'][locale.languageCode]; + String get verifyFingerprint2 => + localizedValues['verify-fingerprint'][locale.languageCode]; - String get searchMedicine => localizedValues['searchMedicine'][locale.languageCode]; + String get searchMedicine => + localizedValues['searchMedicine'][locale.languageCode]; - String get searchMedicineHere => localizedValues['searchMedicineHere'][locale.languageCode]; + String get searchMedicineHere => + localizedValues['searchMedicineHere'][locale.languageCode]; - String get pendingPayment => localizedValues['pendingPayment'][locale.languageCode]; + String get pendingPayment => + localizedValues['pendingPayment'][locale.languageCode]; String get payNow => localizedValues['payNow'][locale.languageCode]; @@ -187,24 +220,33 @@ class TranslationBase { String get livecare => localizedValues['livecare'][locale.languageCode]; - String get upcomingNoAction => localizedValues['upcoming-noAction'][locale.languageCode]; + String get upcomingNoAction => + localizedValues['upcoming-noAction'][locale.languageCode]; - String get upcomingConfirm => localizedValues['upcoming-confirm'][locale.languageCode]; + String get upcomingConfirm => + localizedValues['upcoming-confirm'][locale.languageCode]; - String get upcomingPaymentPending => localizedValues['upcoming-payment-pending'][locale.languageCode]; - String get upcomingConfirmMore => localizedValues['book-success-confirm-more-24-1-2'][locale.languageCode]; + String get upcomingPaymentPending => + localizedValues['upcoming-payment-pending'][locale.languageCode]; + String get upcomingConfirmMore => + localizedValues['book-success-confirm-more-24-1-2'][locale.languageCode]; - String get upcomingPaymentNow => localizedValues['upcoming-payment-now'][locale.languageCode]; + String get upcomingPaymentNow => + localizedValues['upcoming-payment-now'][locale.languageCode]; String get upcomingQR => localizedValues['upcoming-QR'][locale.languageCode]; - String get upcomingVirtual => localizedValues['upcoming-virtual'][locale.languageCode]; + String get upcomingVirtual => + localizedValues['upcoming-virtual'][locale.languageCode]; - String get upcomingLivecare => localizedValues['upcoming-livecare'][locale.languageCode]; + String get upcomingLivecare => + localizedValues['upcoming-livecare'][locale.languageCode]; - String get liveCareAppo => localizedValues['livecareAppo'][locale.languageCode]; + String get liveCareAppo => + localizedValues['livecareAppo'][locale.languageCode]; - String get upcomingDetails => localizedValues['upcoming-details'][locale.languageCode]; + String get upcomingDetails => + localizedValues['upcoming-details'][locale.languageCode]; String get reschedule => localizedValues['reschedule'][locale.languageCode]; @@ -222,68 +264,98 @@ class TranslationBase { String get payment => localizedValues['payment'][locale.languageCode]; - String get cancel_nocaps => localizedValues['cancel-nocaps'][locale.languageCode]; + String get cancel_nocaps => + localizedValues['cancel-nocaps'][locale.languageCode]; - String get cancelAppoMsg => localizedValues['cancelAppoMsg'][locale.languageCode]; + String get cancelAppoMsg => + localizedValues['cancelAppoMsg'][locale.languageCode]; - String get pharmaciesList => localizedValues['pharmaciesList'][locale.languageCode]; + String get pharmaciesList => + localizedValues['pharmaciesList'][locale.languageCode]; String get description => localizedValues['description'][locale.languageCode]; String get howToUse => localizedValues['howToUse'][locale.languageCode]; String get price => localizedValues['price'][locale.languageCode]; - String get youCanFindItIn => localizedValues['youCanFindItIn'][locale.languageCode]; + String get youCanFindItIn => + localizedValues['youCanFindItIn'][locale.languageCode]; - String get pleaseEnterMedicineName => localizedValues['pleaseEnterMedicineName'][locale.languageCode]; + String get pleaseEnterMedicineName => + localizedValues['pleaseEnterMedicineName'][locale.languageCode]; - String get verificationMessage => localizedValues['verification_message'][locale.languageCode]; + String get verificationMessage => + localizedValues['verification_message'][locale.languageCode]; - String get validationMessage => localizedValues['validation_message'][locale.languageCode]; + String get validationMessage => + localizedValues['validation_message'][locale.languageCode]; - String get arabicChange => localizedValues['arabic-change'][locale.languageCode]; + String get arabicChange => + localizedValues['arabic-change'][locale.languageCode]; - String get notification => localizedValues['notification'][locale.languageCode]; + String get notification => + localizedValues['notification'][locale.languageCode]; String get appsetting => localizedValues['app-settings'][locale.languageCode]; String get rateApp => localizedValues['rate-app'][locale.languageCode]; - String get setReminder => localizedValues['set-reminder'][locale.languageCode]; + String get setReminder => + localizedValues['set-reminder'][locale.languageCode]; String get before => localizedValues['before'][locale.languageCode]; String get minute => localizedValues['minute'][locale.languageCode]; String get hour => localizedValues['hour'][locale.languageCode]; - String get reminderSuccess => localizedValues['reminderSuccess'][locale.languageCode]; - String get patientShareToDo => localizedValues['patientShareToDo'][locale.languageCode]; - String get patientTaxToDo => localizedValues['patientTaxToDo'][locale.languageCode]; - String get patientShareTotalToDo => localizedValues['patientShareTotalToDo'][locale.languageCode]; - String get paymentMethod => localizedValues['paymentMethod'][locale.languageCode]; + String get reminderSuccess => + localizedValues['reminderSuccess'][locale.languageCode]; + String get patientShareToDo => + localizedValues['patientShareToDo'][locale.languageCode]; + String get patientTaxToDo => + localizedValues['patientTaxToDo'][locale.languageCode]; + String get patientShareTotalToDo => + localizedValues['patientShareTotalToDo'][locale.languageCode]; + String get paymentMethod => + localizedValues['paymentMethod'][locale.languageCode]; - String get moreVerification => localizedValues['more-verify'][locale.languageCode]; + String get moreVerification => + localizedValues['more-verify'][locale.languageCode]; - String get welcomeBack => localizedValues['welcome-back'][locale.languageCode]; + String get welcomeBack => + localizedValues['welcome-back'][locale.languageCode]; - String get accountInfo => localizedValues['account-info'][locale.languageCode]; + String get accountInfo => + localizedValues['account-info'][locale.languageCode]; - String get useAnotherAccount => localizedValues['another-acc'][locale.languageCode]; + String get useAnotherAccount => + localizedValues['another-acc'][locale.languageCode]; String get next => localizedValues['next'][locale.languageCode]; - String get noNeedToWaitInLine => localizedValues['noNeedToWaitInLine'][locale.languageCode]; - String get useQRAppoAttend => localizedValues['useQRAppoAttend'][locale.languageCode]; - String get passQRAppoAttend => localizedValues['passQRAppoAttend'][locale.languageCode]; - String get sitWaitingQR => localizedValues['sitWaitingQR'][locale.languageCode]; - String get attendRegisterCode => localizedValues['attendRegisterCode'][locale.languageCode]; - String get scanQRHospital => localizedValues['scanQRHospital'][locale.languageCode]; + String get noNeedToWaitInLine => + localizedValues['noNeedToWaitInLine'][locale.languageCode]; + String get useQRAppoAttend => + localizedValues['useQRAppoAttend'][locale.languageCode]; + String get passQRAppoAttend => + localizedValues['passQRAppoAttend'][locale.languageCode]; + String get sitWaitingQR => + localizedValues['sitWaitingQR'][locale.languageCode]; + String get attendRegisterCode => + localizedValues['attendRegisterCode'][locale.languageCode]; + String get scanQRHospital => + localizedValues['scanQRHospital'][locale.languageCode]; String get sendEmail => localizedValues['sendEmail'][locale.languageCode]; String get close => localizedValues['close'][locale.languageCode]; + String get closeIt => localizedValues['closeIt'][locale.languageCode]; String get booked => localizedValues['booked'][locale.languageCode]; String get confirmed => localizedValues['confirmed'][locale.languageCode]; String get arrived => localizedValues['arrived'][locale.languageCode]; - String get payNowBookSuccess => localizedValues['payNowBookSuccess'][locale.languageCode]; - String get payNowBookSuccesstext1 => localizedValues['payNowBookSuccesstext1'][locale.languageCode]; - String get payNowBookSuccesstext2 => localizedValues['payNowBookSuccesstext2'][locale.languageCode]; + String get payNowBookSuccess => + localizedValues['payNowBookSuccess'][locale.languageCode]; + String get payNowBookSuccesstext1 => + localizedValues['payNowBookSuccesstext1'][locale.languageCode]; + String get payNowBookSuccesstext2 => + localizedValues['payNowBookSuccesstext2'][locale.languageCode]; String get payLater => localizedValues['payLater'][locale.languageCode]; - String get askDocNotAllowed => localizedValues['askDocNotAllowed'][locale.languageCode]; + String get askDocNotAllowed => + localizedValues['askDocNotAllowed'][locale.languageCode]; String get firstName => localizedValues['first-name'][locale.languageCode]; String get middleName => localizedValues['middle-name'][locale.languageCode]; @@ -294,13 +366,15 @@ class TranslationBase { String get female => localizedValues['female'][locale.languageCode]; - String get prefferedLanguage => localizedValues['preferred-language'][locale.languageCode]; + String get prefferedLanguage => + localizedValues['preferred-language'][locale.languageCode]; String get english => localizedValues['english'][locale.languageCode]; String get arabic => localizedValues['arabic'][locale.languageCode]; - String get registrLocation => localizedValues['locations-register'][locale.languageCode]; + String get registrLocation => + localizedValues['locations-register'][locale.languageCode]; String get ksa => localizedValues['ksa'][locale.languageCode]; @@ -310,13 +384,16 @@ class TranslationBase { String get family => localizedValues['family'][locale.languageCode]; - String get myFamilyFiles => localizedValues['family-title'][locale.languageCode]; + String get myFamilyFiles => + localizedValues['family-title'][locale.languageCode]; String get myFamily => localizedValues['myFamily'][locale.languageCode]; String get oxygenation => localizedValues['oxygenation'][locale.languageCode]; - String get respirationRate => localizedValues['respirationRate'][locale.languageCode]; + String get respirationRate => + localizedValues['respirationRate'][locale.languageCode]; - String get bodyMeasurements => localizedValues['bodyMeasurements'][locale.languageCode]; + String get bodyMeasurements => + localizedValues['bodyMeasurements'][locale.languageCode]; String get height => localizedValues['height'][locale.languageCode]; String get heightUnit => localizedValues['heightUnit'][locale.languageCode]; String get weightUnit => localizedValues['weightUnit'][locale.languageCode]; @@ -326,7 +403,8 @@ class TranslationBase { String get respiration => localizedValues['respiration'][locale.languageCode]; - String get bloodPressure => localizedValues['bloodPressure'][locale.languageCode]; + String get bloodPressure => + localizedValues['bloodPressure'][locale.languageCode]; String get painScale => localizedValues['painScale'][locale.languageCode]; String get heart => localizedValues['heart'][locale.languageCode]; @@ -335,7 +413,8 @@ class TranslationBase { String get request => localizedValues['request'][locale.languageCode]; String get memberName => localizedValues['member-name'][locale.languageCode]; String get switchUser => localizedValues['switch-login'][locale.languageCode]; - String get removeMember => localizedValues['remove-membe'][locale.languageCode]; + String get removeMember => + localizedValues['remove-membe'][locale.languageCode]; String get allowView => localizedValues['allow-view'][locale.languageCode]; String get rejectView => localizedValues['reject-view'][locale.languageCode]; String get deleteView => localizedValues['delete-view'][locale.languageCode]; @@ -344,42 +423,65 @@ class TranslationBase { String get companyName => localizedValues['companyName'][locale.languageCode]; String get receiptOn => localizedValues['receiptOn'][locale.languageCode]; String get expiryDate => localizedValues['expiryDate'][locale.languageCode]; - String get procedureName => localizedValues['procedureName'][locale.languageCode]; - String get procedureStatus => localizedValues['procedureStatus'][locale.languageCode]; + String get procedureName => + localizedValues['procedureName'][locale.languageCode]; + String get procedureStatus => + localizedValues['procedureStatus'][locale.languageCode]; String get usageStatus => localizedValues['usageStatus'][locale.languageCode]; String get unusedCount => localizedValues['unusedCount'][locale.languageCode]; - String get totalApproval => localizedValues['totalApproval'][locale.languageCode]; + String get totalApproval => + localizedValues['totalApproval'][locale.languageCode]; String get category => localizedValues['category'][locale.languageCode]; - String get expirationDate => localizedValues['expirationDate'][locale.languageCode]; + String get expirationDate => + localizedValues['expirationDate'][locale.languageCode]; String get patientCard => localizedValues['patientCard'][locale.languageCode]; - String get policyNumber => localizedValues['policyNumber'][locale.languageCode]; + String get policyNumber => + localizedValues['policyNumber'][locale.languageCode]; String get seeDetails => localizedValues['seeDetails'][locale.languageCode]; - String get insuranceCards => localizedValues['insuranceCards'][locale.languageCode]; + String get insuranceCards => + localizedValues['insuranceCards'][locale.languageCode]; String get requestType => localizedValues['requestType'][locale.languageCode]; - String get addFamilyMember => localizedValues['add-new-member'][locale.languageCode]; - String get removeFamilyMember => localizedValues['remove-family-member'][locale.languageCode]; - - String get myMedicalFile => localizedValues['MyMedicalFile'][locale.languageCode]; - String get myMedicalFileSubTitle => localizedValues['myMedicalFileSubTitle'][locale.languageCode]; + String get addFamilyMember => + localizedValues['add-new-member'][locale.languageCode]; + String get removeFamilyMember => + localizedValues['remove-family-member'][locale.languageCode]; + + String get myMedicalFile => + localizedValues['MyMedicalFile'][locale.languageCode]; + String get myMedicalFileSubTitle => + localizedValues['myMedicalFileSubTitle'][locale.languageCode]; String get viewMore => localizedValues['viewMore'][locale.languageCode]; - String get homeHealthCareService => localizedValues['homeHealthCareService'][locale.languageCode]; - String get onlinePharmacy => localizedValues['OnlinePharmacy'][locale.languageCode]; - String get emergencyService => localizedValues['EmergencyService'][locale.languageCode]; - String get onlinePaymentService => localizedValues['OnlinePaymentService'][locale.languageCode]; - String get offersAndPackages => localizedValues['OffersAndPackages'][locale.languageCode]; - String get comprehensiveMedicalCheckup => localizedValues['ComprehensiveMedicalCheckup'][locale.languageCode]; + String get homeHealthCareService => + localizedValues['homeHealthCareService'][locale.languageCode]; + String get onlinePharmacy => + localizedValues['OnlinePharmacy'][locale.languageCode]; + String get emergencyService => + localizedValues['EmergencyService'][locale.languageCode]; + String get onlinePaymentService => + localizedValues['OnlinePaymentService'][locale.languageCode]; + String get offersAndPackages => + localizedValues['OffersAndPackages'][locale.languageCode]; + String get comprehensiveMedicalCheckup => + localizedValues['ComprehensiveMedicalCheckup'][locale.languageCode]; String get hMGService => localizedValues['HMGService'][locale.languageCode]; - String get viewAllHabibMedicalService => localizedValues['ViewAllHabibMedicalService'][locale.languageCode]; + String get viewAllHabibMedicalService => + localizedValues['ViewAllHabibMedicalService'][locale.languageCode]; String get viewAll => localizedValues['viewAll'][locale.languageCode]; String get view => localizedValues['view'][locale.languageCode]; String get contactUs => localizedValues['ContactUs'][locale.languageCode]; - String get viewAllWaysReachUs => localizedValues['ViewAllWaysReachUs'][locale.languageCode]; - String get medicalProfile => localizedValues['medicalProfile'][locale.languageCode]; + String get viewAllWaysReachUs => + localizedValues['ViewAllWaysReachUs'][locale.languageCode]; + String get medicalProfile => + localizedValues['medicalProfile'][locale.languageCode]; String get parking => localizedValues['parking'][locale.languageCode]; - String get parkingDescription => localizedValues['parkingDescription'][locale.languageCode]; - String get checkinOptions => localizedValues['checkinOption'][locale.languageCode]; - String get alhabiServices => localizedValues['alhabiServices'][locale.languageCode]; - String get parkingTitle => localizedValues['parkingTitle'][locale.languageCode]; + String get parkingDescription => + localizedValues['parkingDescription'][locale.languageCode]; + String get checkinOptions => + localizedValues['checkinOption'][locale.languageCode]; + String get alhabiServices => + localizedValues['alhabiServices'][locale.languageCode]; + String get parkingTitle => + localizedValues['parkingTitle'][locale.languageCode]; String get readBarcode => localizedValues['readBarcode'][locale.languageCode]; String get showMyPark => localizedValues['showMyPark'][locale.languageCode]; String get clearMyData => localizedValues['clearMyData'][locale.languageCode]; @@ -387,124 +489,199 @@ class TranslationBase { String get gate => localizedValues['gate'][locale.languageCode]; String get building => localizedValues['building'][locale.languageCode]; String get branch => localizedValues['branch'][locale.languageCode]; - String get emergencyServices => localizedValues['emergencyServices'][locale.languageCode]; + String get emergencyServices => + localizedValues['emergencyServices'][locale.languageCode]; String get nearester => localizedValues['nearester'][locale.languageCode]; String get locationa => localizedValues['locationa'][locale.languageCode]; - String get ambulancerequest => localizedValues['ambulancerequest'][locale.languageCode]; + String get ambulancerequest => + localizedValues['ambulancerequest'][locale.languageCode]; String get requestA => localizedValues['requestA'][locale.languageCode]; - String get consultation => localizedValues['consultation'][locale.languageCode]; + String get consultation => + localizedValues['consultation'][locale.languageCode]; String get logs => localizedValues['logs'][locale.languageCode]; - String get textToSpeech => localizedValues['textToSpeech'][locale.languageCode]; - - String get myAppointments => localizedValues['MyAppointments'][locale.languageCode]; - String get noBookedAppointments => localizedValues['NoBookedAppointments'][locale.languageCode]; - String get noConfirmedAppointments => localizedValues['NoConfirmedAppointments'][locale.languageCode]; - String get noArrivedAppointments => localizedValues['noArrivedAppointments'][locale.languageCode]; - String get myAppointmentsList => localizedValues['MyAppointmentsList'][locale.languageCode]; + String get textToSpeech => + localizedValues['textToSpeech'][locale.languageCode]; + + String get myAppointments => + localizedValues['MyAppointments'][locale.languageCode]; + String get noBookedAppointments => + localizedValues['NoBookedAppointments'][locale.languageCode]; + String get noConfirmedAppointments => + localizedValues['NoConfirmedAppointments'][locale.languageCode]; + String get noArrivedAppointments => + localizedValues['noArrivedAppointments'][locale.languageCode]; + String get myAppointmentsList => + localizedValues['MyAppointmentsList'][locale.languageCode]; String get radiology => localizedValues['Radiology'][locale.languageCode]; - String get radiologySubtitle => localizedValues['RadiologySubtitle'][locale.languageCode]; + String get radiologySubtitle => + localizedValues['RadiologySubtitle'][locale.languageCode]; String get lab => localizedValues['Lab'][locale.languageCode]; String get labSubtitle => localizedValues['LabSubtitle'][locale.languageCode]; String get medicines => localizedValues['Medicines'][locale.languageCode]; - String get medicinesSubtitle => localizedValues['MedicinesSubtitle'][locale.languageCode]; + String get medicinesSubtitle => + localizedValues['MedicinesSubtitle'][locale.languageCode]; String get vitalSigns => localizedValues['VitalSigns'][locale.languageCode]; - String get vitalSignsSubtitle => localizedValues['VitalSignsSubTitle'][locale.languageCode]; + String get vitalSignsSubtitle => + localizedValues['VitalSignsSubTitle'][locale.languageCode]; String get myMedical => localizedValues['MyMedical'][locale.languageCode]; - String get myMedicalSubtitle => localizedValues['MyMedicalSubtitle'][locale.languageCode]; + String get myMedicalSubtitle => + localizedValues['MyMedicalSubtitle'][locale.languageCode]; String get myDoctor => localizedValues['MyDoctor'][locale.languageCode]; - String get myDoctorSubtitle => localizedValues['MyDoctorSubtitle'][locale.languageCode]; + String get myDoctorSubtitle => + localizedValues['MyDoctorSubtitle'][locale.languageCode]; String get eye => localizedValues['Eye'][locale.languageCode]; String get eyeSubtitle => localizedValues['EyeSubtitle'][locale.languageCode]; String get insurance => localizedValues['Insurance'][locale.languageCode]; - String get insuranceSubtitle => localizedValues['InsuranceSubtitle'][locale.languageCode]; - String get updateInsurance => localizedValues['UpdateInsurance'][locale.languageCode]; - String get updateInsuranceSubtitle => localizedValues['UpdateInsuranceSubtitle'][locale.languageCode]; - String get insuranceApproval => localizedValues['InsuranceApproval'][locale.languageCode]; - String get insuranceApprovalSubtitle => localizedValues['InsuranceApprovalSubtitle'][locale.languageCode]; + String get insuranceSubtitle => + localizedValues['InsuranceSubtitle'][locale.languageCode]; + String get updateInsurance => + localizedValues['UpdateInsurance'][locale.languageCode]; + String get updateInsuranceSubtitle => + localizedValues['UpdateInsuranceSubtitle'][locale.languageCode]; + String get insuranceApproval => + localizedValues['InsuranceApproval'][locale.languageCode]; + String get insuranceApprovalSubtitle => + localizedValues['InsuranceApprovalSubtitle'][locale.languageCode]; String get allergies => localizedValues['Allergies'][locale.languageCode]; - String get allergiesSubtitle => localizedValues['AllergiesSubtitle'][locale.languageCode]; + String get allergiesSubtitle => + localizedValues['AllergiesSubtitle'][locale.languageCode]; String get myVaccines => localizedValues['MyVaccines'][locale.languageCode]; - String get myVaccinesSubtitle => localizedValues['MyVaccinesSubtitle'][locale.languageCode]; + String get myVaccinesSubtitle => + localizedValues['MyVaccinesSubtitle'][locale.languageCode]; String get medical => localizedValues['Medical'][locale.languageCode]; - String get medicalSubtitle => localizedValues['MedicalSubtitle'][locale.languageCode]; + String get medicalSubtitle => + localizedValues['MedicalSubtitle'][locale.languageCode]; String get monthly => localizedValues['Monthly'][locale.languageCode]; - String get monthlySubtitle => localizedValues['MonthlySubtitle'][locale.languageCode]; + String get monthlySubtitle => + localizedValues['MonthlySubtitle'][locale.languageCode]; String get sick => localizedValues['Sick'][locale.languageCode]; - String get sickSubtitle => localizedValues['SickSubtitle'][locale.languageCode]; + String get sickSubtitle => + localizedValues['SickSubtitle'][locale.languageCode]; String get myBalance => localizedValues['MyBalance'][locale.languageCode]; - String get myBalanceSubtitle => localizedValues['MyBalanceSubtitle'][locale.languageCode]; + String get myBalanceSubtitle => + localizedValues['MyBalanceSubtitle'][locale.languageCode]; String get patientCall => localizedValues['PatientCall'][locale.languageCode]; - String get patientCallSubtitle => localizedValues['PatientCallSubtitle'][locale.languageCode]; - String get smartWatches => localizedValues['SmartWatches'][locale.languageCode]; - String get smartWatchesSubtitle => localizedValues['SmartWatchesSubtitle'][locale.languageCode]; + String get patientCallSubtitle => + localizedValues['PatientCallSubtitle'][locale.languageCode]; + String get smartWatches => + localizedValues['SmartWatches'][locale.languageCode]; + String get smartWatchesSubtitle => + localizedValues['SmartWatchesSubtitle'][locale.languageCode]; String get myTrackers => localizedValues['MyTrackers'][locale.languageCode]; - String get myTrackersSubtitle => localizedValues['MyTrackersSubtitle'][locale.languageCode]; + String get myTrackersSubtitle => + localizedValues['MyTrackersSubtitle'][locale.languageCode]; String get askYour => localizedValues['AskYour'][locale.languageCode]; - String get askYourSubtitle => localizedValues['AskYourSubtitle'][locale.languageCode]; + String get askYourSubtitle => + localizedValues['AskYourSubtitle'][locale.languageCode]; String get internet => localizedValues['Internet'][locale.languageCode]; - String get internetSubtitle => localizedValues['InternetSubtitle'][locale.languageCode]; + String get internetSubtitle => + localizedValues['InternetSubtitle'][locale.languageCode]; String get chatbot => localizedValues['Chatbot'][locale.languageCode]; - String get chatbotSubtitle => localizedValues['ChatbotSubtitle'][locale.languageCode]; + String get chatbotSubtitle => + localizedValues['ChatbotSubtitle'][locale.languageCode]; String get timeLine => localizedValues['TimeLine'][locale.languageCode]; String get labOrders => localizedValues['LabOrders'][locale.languageCode]; String get billNo => localizedValues['BillNo'][locale.languageCode]; - String get prescriptions => localizedValues['Prescriptions'][locale.languageCode]; + String get prescriptions => + localizedValues['Prescriptions'][locale.languageCode]; String get history => localizedValues['History'][locale.languageCode]; String get orderNo => localizedValues['OrderNo'][locale.languageCode]; - String get trackDeliveryDriver => localizedValues['trackDeliveryDriver'][locale.languageCode]; - String get orderDetails => localizedValues['OrderDetails'][locale.languageCode]; + String get trackDeliveryDriver => + localizedValues['trackDeliveryDriver'][locale.languageCode]; + String get orderDetails => + localizedValues['OrderDetails'][locale.languageCode]; String get vitalSign => localizedValues['VitalSign'][locale.languageCode]; - String get monthlyReports => localizedValues['MonthlyReports'][locale.languageCode]; + String get monthlyReports => + localizedValues['MonthlyReports'][locale.languageCode]; - String get locationDialogMessage => localizedValues['locationDialogMessage'][locale.languageCode]; - String get userViewRequest => localizedValues['user-view-requester'][locale.languageCode]; + String get locationDialogMessage => + localizedValues['locationDialogMessage'][locale.languageCode]; + String get userViewRequest => + localizedValues['user-view-requester'][locale.languageCode]; String get userView => localizedValues['user-view'][locale.languageCode]; - String get sentRequest => localizedValues['sent-requests'][locale.languageCode]; + String get sentRequest => + localizedValues['sent-requests'][locale.languageCode]; String get km => localizedValues['km'][locale.languageCode]; - String get patientHealthSummaryReport => localizedValues['PatientHealthSummaryReport'][locale.languageCode]; - String get toViewTheTermsAndConditions => localizedValues['ToViewTheTermsAndConditions'][locale.languageCode]; + String get km_ => localizedValues['km_'][locale.languageCode]; + String get patientHealthSummaryReport => + localizedValues['PatientHealthSummaryReport'][locale.languageCode]; + String get toViewTheTermsAndConditions => + localizedValues['ToViewTheTermsAndConditions'][locale.languageCode]; String get clickHere => localizedValues['ClickHere'][locale.languageCode]; - String get iAgreeToTheTermsAndConditions => localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode]; + String get iAgreeToTheTermsAndConditions => + localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode]; String get iAgreeToTheTermsAndConditionsSubtitle => - localizedValues['IAgreeToTheTermsAndConditionsSubtitle'][locale.languageCode]; + localizedValues['IAgreeToTheTermsAndConditionsSubtitle'] + [locale.languageCode]; String get save => localizedValues['Save'][locale.languageCode]; - String get userAgreement => localizedValues['UserAgreement'][locale.languageCode]; - String get updateSuccessfully => localizedValues['UpdateSuccessfully'][locale.languageCode]; - String get emailSentSuccessfully => localizedValues['EmailSentSuccessfully'][locale.languageCode]; - String get EmailSentError => localizedValues['EmailSentError'][locale.languageCode]; - String get checkVaccineAvailability => localizedValues['CHECK_VACCINE_AVAILABILITY'][locale.languageCode]; - String get myVaccinesAvailability => localizedValues['MyVaccinesAvailability'][locale.languageCode]; - String get paymentService => localizedValues['PaymentService'][locale.languageCode]; - String get paymentOnline => localizedValues['PaymentOnline'][locale.languageCode]; - String get onlineCheckIn => localizedValues['OnlineCheckIn'][locale.languageCode]; + String get userAgreement => + localizedValues['UserAgreement'][locale.languageCode]; + String get updateSuccessfully => + localizedValues['UpdateSuccessfully'][locale.languageCode]; + String get emailSentSuccessfully => + localizedValues['EmailSentSuccessfully'][locale.languageCode]; + String get EmailSentError => + localizedValues['EmailSentError'][locale.languageCode]; + String get checkVaccineAvailability => + localizedValues['CHECK_VACCINE_AVAILABILITY'][locale.languageCode]; + String get myVaccinesAvailability => + localizedValues['MyVaccinesAvailability'][locale.languageCode]; + String get paymentService => + localizedValues['PaymentService'][locale.languageCode]; + String get paymentOnline => + localizedValues['PaymentOnline'][locale.languageCode]; + String get onlineCheckIn => + localizedValues['OnlineCheckIn'][locale.languageCode]; String get myBalances => localizedValues['MyBalances'][locale.languageCode]; - String get balanceAmount => localizedValues['BalanceAmount'][locale.languageCode]; - String get totalBalance => localizedValues['TotalBalance'][locale.languageCode]; - String get createAdvancedPayment => localizedValues['CreateAdvancedPayment'][locale.languageCode]; - String get advancePayment => localizedValues['AdvancePayment'][locale.languageCode]; - String get advancePaymentLabel => localizedValues['AdvancePaymentLabel'][locale.languageCode]; - String get referralRequesterInformation => localizedValues['referralRequesterInformation'][locale.languageCode]; + String get balanceAmount => + localizedValues['BalanceAmount'][locale.languageCode]; + String get totalBalance => + localizedValues['TotalBalance'][locale.languageCode]; + String get createAdvancedPayment => + localizedValues['CreateAdvancedPayment'][locale.languageCode]; + String get advancePayment => + localizedValues['AdvancePayment'][locale.languageCode]; + String get advancePaymentLabel => + localizedValues['AdvancePaymentLabel'][locale.languageCode]; + String get referralRequesterInformation => + localizedValues['referralRequesterInformation'][locale.languageCode]; String get fileNumber => localizedValues['FileNumber'][locale.languageCode]; String get amount => localizedValues['Amount'][locale.languageCode]; - String get depositorEmail => localizedValues['DepositorEmail'][locale.languageCode]; + String get depositorEmail => + localizedValues['DepositorEmail'][locale.languageCode]; String get notes => localizedValues['Notes'][locale.languageCode]; - String get selectPatientName => localizedValues['SelectPatientName'][locale.languageCode]; - String get selectFamilyPatientName => localizedValues['SelectFamilyPatientName'][locale.languageCode]; - String get selectHospital => localizedValues['SelectHospital'][locale.languageCode]; + String get selectPatientName => + localizedValues['SelectPatientName'][locale.languageCode]; + String get selectFamilyPatientName => + localizedValues['SelectFamilyPatientName'][locale.languageCode]; + String get selectHospital => + localizedValues['SelectHospital'][locale.languageCode]; String get selectCity => localizedValues['selectCity'][locale.languageCode]; String get myAccount => localizedValues['MyAccount'][locale.languageCode]; - String get otherAccount => localizedValues['OtherAccount'][locale.languageCode]; - String get selectBeneficiary => localizedValues['SelectBeneficiary'][locale.languageCode]; - String get confirmThePayment => localizedValues['ConfirmThePayment'][locale.languageCode]; - String get depositorName => localizedValues['DepositorName'][locale.languageCode]; - String get mobileNumber => localizedValues['MobileNumber'][locale.languageCode]; + String get otherAccount => + localizedValues['OtherAccount'][locale.languageCode]; + String get selectBeneficiary => + localizedValues['SelectBeneficiary'][locale.languageCode]; + String get confirmThePayment => + localizedValues['ConfirmThePayment'][locale.languageCode]; + String get depositorName => + localizedValues['DepositorName'][locale.languageCode]; + String get mobileNumber => + localizedValues['MobileNumber'][locale.languageCode]; String get ok => localizedValues['Ok'][locale.languageCode]; - String get waterConsumedInWeek => localizedValues['WaterConsumedInWeek'][locale.languageCode]; - String get waterConsumedInMonth => localizedValues['WaterConsumedInMonth'][locale.languageCode]; - String get theVerificationCodeExpiresIn => localizedValues['TheVerificationCodeExpiresIn'][locale.languageCode]; - String get pleaseEnterTheVerificationCode => localizedValues['PleaseEnterTheVerificationCode'][locale.languageCode]; - String get eyeMeasurements => localizedValues['EyeMeasurements'][locale.languageCode]; - String get measurements => localizedValues['Measurements'][locale.languageCode]; + String get averageWaitingTime => localizedValues['averageWaitingTime'][locale.languageCode]; + String get waterConsumedInWeek => + localizedValues['WaterConsumedInWeek'][locale.languageCode]; + String get waterConsumedInMonth => + localizedValues['WaterConsumedInMonth'][locale.languageCode]; + String get theVerificationCodeExpiresIn => + localizedValues['TheVerificationCodeExpiresIn'][locale.languageCode]; + String get pleaseEnterTheVerificationCode => + localizedValues['PleaseEnterTheVerificationCode'][locale.languageCode]; + String get eyeMeasurements => + localizedValues['EyeMeasurements'][locale.languageCode]; + String get measurements => + localizedValues['Measurements'][locale.languageCode]; String get classes => localizedValues['Classes'][locale.languageCode]; String get contactLens => localizedValues['ContactLens'][locale.languageCode]; String get rightEye => localizedValues['RightEye'][locale.languageCode]; @@ -518,41 +695,61 @@ class TranslationBase { String get power => localizedValues['Power'][locale.languageCode]; String get diameter => localizedValues['Diameter'][locale.languageCode]; String get remarks => localizedValues['Remarks'][locale.languageCode]; - String get activeMedications => localizedValues['ActiveMedications'][locale.languageCode]; + String get activeMedications => + localizedValues['ActiveMedications'][locale.languageCode]; String get expDate => localizedValues['ExpDate'][locale.languageCode]; String get route => localizedValues['Route'][locale.languageCode]; String get frequency => localizedValues['Frequency'][locale.languageCode]; - String get dailyQuantity => localizedValues['DailyQuantity'][locale.languageCode]; + String get dailyQuantity => + localizedValues['DailyQuantity'][locale.languageCode]; String get addReminder => localizedValues['AddReminder'][locale.languageCode]; String get reminderDes => localizedValues['reminderDes'][locale.languageCode]; String get startDay => localizedValues['StartDay'][locale.languageCode]; String get endDay => localizedValues['EndDay'][locale.languageCode]; String get days => localizedValues['Days'][locale.languageCode]; - String get scheduleTime => localizedValues['ScheduleTime'][locale.languageCode]; + String get scheduleTime => + localizedValues['ScheduleTime'][locale.languageCode]; String get askDoctor => localizedValues['AskDoctor'][locale.languageCode]; - String get doctorResponses => localizedValues['DoctorResponses'][locale.languageCode]; + String get doctorResponses => + localizedValues['DoctorResponses'][locale.languageCode]; String get newDes => localizedValues['New'][locale.languageCode]; String get all => localizedValues['All'][locale.languageCode]; - String get questionHere => localizedValues['QuestionHere'][locale.languageCode]; - String get viewDoctorResponses => localizedValues['ViewDoctorResponses'][locale.languageCode]; - String get serviceInformationButton => localizedValues['ServiceInformationButton'][locale.languageCode]; - String get serviceInformationTitle => localizedValues['ServiceInformationTitle'][locale.languageCode]; + String get questionHere => + localizedValues['QuestionHere'][locale.languageCode]; + String get viewDoctorResponses => + localizedValues['ViewDoctorResponses'][locale.languageCode]; + String get serviceInformationButton => + localizedValues['ServiceInformationButton'][locale.languageCode]; + String get serviceInformationTitle => + localizedValues['ServiceInformationTitle'][locale.languageCode]; String get infoLab => localizedValues['info-lab'][locale.languageCode]; - String get infoRadiology => localizedValues['info-radiology'][locale.languageCode]; + String get infoRadiology => + localizedValues['info-radiology'][locale.languageCode]; String get orders => localizedValues['orders'][locale.languageCode]; String get lakum => localizedValues['lakum'][locale.languageCode]; String get wishlist => localizedValues['wishlist'][locale.languageCode]; + String get brands => localizedValues['brands'][locale.languageCode]; + String get products => localizedValues['products'][locale.languageCode]; String get reviews => localizedValues['reviews'][locale.languageCode]; - String get myPrescriptions => localizedValues['myPrescriptions'][locale.languageCode]; - String get medicationRefill => localizedValues['medicationRefill'][locale.languageCode]; - String get pillReminder => localizedValues['pillReminder'][locale.languageCode]; - String get shippingAddresses => localizedValues['shippingAddresses'][locale.languageCode]; + String get productDetails => localizedValues['productDetails'][locale.languageCode]; + String get noReviewsAvailable => localizedValues['noReviewsAvailable'][locale.languageCode]; + String get noLocationAvailable => localizedValues['noLocationAvailable'][locale.languageCode]; + String get myPrescriptions => + localizedValues['myPrescriptions'][locale.languageCode]; + String get medicationRefill => + localizedValues['medicationRefill'][locale.languageCode]; + String get pillReminder => + localizedValues['pillReminder'][locale.languageCode]; + String get shippingAddresses => + localizedValues['shippingAddresses'][locale.languageCode]; String get reachUs => localizedValues['reachUs'][locale.languageCode]; - String get ourLocations => localizedValues['ourLocations'][locale.languageCode]; + String get ourLocations => + localizedValues['ourLocations'][locale.languageCode]; String get edit => localizedValues['edit'][locale.languageCode]; String get delete => localizedValues['delete'][locale.languageCode]; String get addAddress => localizedValues['addAddress'][locale.languageCode]; - String get addNewAddress => localizedValues['addNewAddress'][locale.languageCode]; + String get addNewAddress => + localizedValues['addNewAddress'][locale.languageCode]; String get order => localizedValues['order'][locale.languageCode]; String get delivered => localizedValues['delivered'][locale.languageCode]; String get processing => localizedValues['processing'][locale.languageCode]; @@ -560,14 +757,21 @@ class TranslationBase { String get cancelled => localizedValues['cancelled'][locale.languageCode]; String get writeReview => localizedValues['writeReview'][locale.languageCode]; String get shareReview => localizedValues['shareReview'][locale.languageCode]; - String get backMyAccount => localizedValues['backMyAccount'][locale.languageCode]; - String get reviewSuccessful => localizedValues['reviewSuccessful'][locale.languageCode]; - String get reviewShared => localizedValues['reviewShared'][locale.languageCode]; - String get reviewComment => localizedValues['reviewComment'][locale.languageCode]; - String get shippedMethod => localizedValues['shippedMethod'][locale.languageCode]; + String get backMyAccount => + localizedValues['backMyAccount'][locale.languageCode]; + String get reviewSuccessful => + localizedValues['reviewSuccessful'][locale.languageCode]; + String get reviewShared => + localizedValues['reviewShared'][locale.languageCode]; + String get reviewComment => + localizedValues['reviewComment'][locale.languageCode]; + String get shippedMethod => + localizedValues['shippedMethod'][locale.languageCode]; String get orderDetail => localizedValues['orderDetail'][locale.languageCode]; - String get deliveryDriverTrack => localizedValues['DeliveryDriverTrack'][locale.languageCode]; - String get deliveryLocation => localizedValues['DeliveryLocation'][locale.languageCode]; + String get deliveryDriverTrack => + localizedValues['DeliveryDriverTrack'][locale.languageCode]; + String get deliveryLocation => + localizedValues['DeliveryLocation'][locale.languageCode]; String get driver => localizedValues['Driver'][locale.languageCode]; String get subtotal => localizedValues['subtotal'][locale.languageCode]; String get shipping => localizedValues['shipping'][locale.languageCode]; @@ -576,23 +780,34 @@ class TranslationBase { String get use => localizedValues['use'][locale.languageCode]; String get proceedPay => localizedValues['proceedPay'][locale.languageCode]; String get vat => localizedValues['vat'][locale.languageCode]; - String get inclusiveVat => localizedValues['inclusiveVat'][locale.languageCode]; + String get inclusiveVat => + localizedValues['inclusiveVat'][locale.languageCode]; String get items => localizedValues['items'][locale.languageCode]; String get checkOut => localizedValues['checkOut'][locale.languageCode]; String get total => localizedValues['total'][locale.languageCode]; String get sar => localizedValues['sar'][locale.languageCode]; String get payOnline => localizedValues['payOnline'][locale.languageCode]; String get cancelOrder => localizedValues['cancelOrder'][locale.languageCode]; - String get confirmAddress => localizedValues['confirmAddress'][locale.languageCode]; - String get confirmLocation => localizedValues['confirmLocation'][locale.languageCode]; - String get confirmDeleteMsg => localizedValues['confirmDeleteMsg'][locale.languageCode]; - String get confirmDelete => localizedValues['confirmDelete'][locale.languageCode]; - String get confirmCancellation => localizedValues['confirmCancellation'][locale.languageCode]; - String get serviceInformation => localizedValues['ServiceInformation'][locale.languageCode]; - String get homeHealthCare => localizedValues['HomeHealthCare'][locale.languageCode]; - String get HHCNotAuthMsg => localizedValues['HHCNotAuthMsg'][locale.languageCode]; - String get homeHealthCareText => localizedValues['HomeHealthCareText'][locale.languageCode]; - String get loginRegister => localizedValues['LoginRegister'][locale.languageCode]; + String get confirmAddress => + localizedValues['confirmAddress'][locale.languageCode]; + String get confirmLocation => + localizedValues['confirmLocation'][locale.languageCode]; + String get confirmDeleteMsg => + localizedValues['confirmDeleteMsg'][locale.languageCode]; + String get confirmDelete => + localizedValues['confirmDelete'][locale.languageCode]; + String get confirmCancellation => + localizedValues['confirmCancellation'][locale.languageCode]; + String get serviceInformation => + localizedValues['ServiceInformation'][locale.languageCode]; + String get homeHealthCare => + localizedValues['HomeHealthCare'][locale.languageCode]; + String get HHCNotAuthMsg => + localizedValues['HHCNotAuthMsg'][locale.languageCode]; + String get homeHealthCareText => + localizedValues['HomeHealthCareText'][locale.languageCode]; + String get loginRegister => + localizedValues['LoginRegister'][locale.languageCode]; String get orderLog => localizedValues['OrderLog'][locale.languageCode]; // String get infoLab => localizedValues['info-lab'][locale.languageCode]; @@ -604,127 +819,193 @@ class TranslationBase { String get noOrder => localizedValues['noOrder'][locale.languageCode]; String get noResult => localizedValues['noResult'][locale.languageCode]; - String get offersAndPromotions => localizedValues['offersAndPromotions'][locale.languageCode]; + String get offersAndPromotions => + localizedValues['offersAndPromotions'][locale.languageCode]; String get review => localizedValues['review'][locale.languageCode]; - String get deliveredOrder => localizedValues['deliveredOrder'][locale.languageCode]; - String get pendingOrder => localizedValues['pendingOrder'][locale.languageCode]; - String get processingOrder => localizedValues['processingOrder'][locale.languageCode]; - String get cancelledOrder => localizedValues['cancelledOrder'][locale.languageCode]; + String get deliveredOrder => + localizedValues['deliveredOrder'][locale.languageCode]; + String get pendingOrder => + localizedValues['pendingOrder'][locale.languageCode]; + String get processingOrder => + localizedValues['processingOrder'][locale.languageCode]; + String get cancelledOrder => + localizedValues['cancelledOrder'][locale.languageCode]; String get compare => localizedValues['compare'][locale.languageCode]; - String get medicationsRefill => localizedValues['medicationsRefill'][locale.languageCode]; - String get myPrescription => localizedValues['myPrescription'][locale.languageCode]; + String get medicationsRefill => + localizedValues['medicationsRefill'][locale.languageCode]; + String get myPrescription => + localizedValues['myPrescription'][locale.languageCode]; String get quantity => localizedValues['quantity'][locale.languageCode]; - String get conditionsHMG => localizedValues['conditionsHMG'][locale.languageCode]; + String get conditionsHMG => + localizedValues['conditionsHMG'][locale.languageCode]; String get conditions => localizedValues['conditions'][locale.languageCode]; // pharmacy module - String get searchAndScanMedication => localizedValues['searchAndScanMedication'][locale.languageCode]; - String get shopByBrands => localizedValues['shopByBrands'][locale.languageCode]; - String get recentlyViewed => localizedValues['recentlyViewed'][locale.languageCode]; + String get searchAndScanMedication => + localizedValues['searchAndScanMedication'][locale.languageCode]; + String get shopByBrands => + localizedValues['shopByBrands'][locale.languageCode]; + String get recentlyViewed => + localizedValues['recentlyViewed'][locale.languageCode]; String get bestSellers => localizedValues['bestSellers'][locale.languageCode]; String get recommended => localizedValues['recommended'][locale.languageCode]; - String get deleteAllItems => localizedValues['deleteAllItems'][locale.languageCode]; - String get selectAddress => localizedValues['selectAddress'][locale.languageCode]; - String get shippingAddress => localizedValues['shippingAddress'][locale.languageCode]; - String get changeAddress => localizedValues['changeAddress'][locale.languageCode]; - String get selectPaymentOption => localizedValues['selectPaymentOption'][locale.languageCode]; - String get changeMethod => localizedValues['changeMethod'][locale.languageCode]; + String get deleteAllItems => + localizedValues['deleteAllItems'][locale.languageCode]; + String get selectAddress => + localizedValues['selectAddress'][locale.languageCode]; + String get shippingAddress => + localizedValues['shippingAddress'][locale.languageCode]; + String get changeAddress => + localizedValues['changeAddress'][locale.languageCode]; + String get selectPaymentOption => + localizedValues['selectPaymentOption'][locale.languageCode]; + String get changeMethod => + localizedValues['changeMethod'][locale.languageCode]; String get reviewOrder => localizedValues['reviewOrder'][locale.languageCode]; - String get orderSummary => localizedValues['orderSummary'][locale.languageCode]; + String get orderSummary => + localizedValues['orderSummary'][locale.languageCode]; String get active => localizedValues['active'][locale.languageCode]; String get inactive => localizedValues['inactive'][locale.languageCode]; String get balance => localizedValues['balance'][locale.languageCode]; String get gained => localizedValues['gained'][locale.languageCode]; String get consumed => localizedValues['consumed'][locale.languageCode]; String get transferred => localizedValues['transferred'][locale.languageCode]; - String get checkBeneficiary => localizedValues['checkBeneficiary'][locale.languageCode]; - String get beneficiaryName => localizedValues['beneficiaryName'][locale.languageCode]; - String get accountActivation => localizedValues['accountActivation'][locale.languageCode]; - - String get lakumTransfer => localizedValues['lakumTransfer'][locale.languageCode]; + String get checkBeneficiary => + localizedValues['checkBeneficiary'][locale.languageCode]; + String get beneficiaryName => + localizedValues['beneficiaryName'][locale.languageCode]; + String get accountActivation => + localizedValues['accountActivation'][locale.languageCode]; + String get nonRecommended => + localizedValues['nonRecommended'][locale.languageCode]; + + String get lakumTransfer => + localizedValues['lakumTransfer'][locale.languageCode]; String get acceptLbl => localizedValues['acceptLbl'][locale.languageCode]; - String get termsService => localizedValues['TermsService'][locale.languageCode]; + String get termsService => + localizedValues['TermsService'][locale.languageCode]; String get beforeUsing => localizedValues['Beforeusing'][locale.languageCode]; String get accept => localizedValues['accept'][locale.languageCode]; - String get dataSafeInfo => localizedValues['data-safe-info'][locale.languageCode]; + String get dataSafeInfo => + localizedValues['data-safe-info'][locale.languageCode]; String get dataSafe => localizedValues['data-safe'][locale.languageCode]; - String get informational => localizedValues['informational'][locale.languageCode]; - String get checkDiagnosis => localizedValues['check-diagnosis'][locale.languageCode]; + String get informational => + localizedValues['informational'][locale.languageCode]; + String get checkDiagnosis => + localizedValues['check-diagnosis'][locale.languageCode]; String get remeberthat => localizedValues['remeberthat'][locale.languageCode]; - String get notUseInEmbergency => localizedValues['not-use-in-emerbency'][locale.languageCode]; - String get notUseInEmbergencyDetails => localizedValues['not-use-in-emerbency-details'][locale.languageCode]; - String get notUseInEmbergencyCall => localizedValues['not-use-in-emerbency-details-call'][locale.languageCode]; - String get selectGender => localizedValues['select-gender'][locale.languageCode]; + String get notUseInEmbergency => + localizedValues['not-use-in-emerbency'][locale.languageCode]; + String get notUseInEmbergencyDetails => + localizedValues['not-use-in-emerbency-details'][locale.languageCode]; + String get notUseInEmbergencyCall => + localizedValues['not-use-in-emerbency-details-call'][locale.languageCode]; + String get selectGender => + localizedValues['select-gender'][locale.languageCode]; String get iAma => localizedValues['i-am-a'][locale.languageCode]; String get selectAge => localizedValues['select-age'][locale.languageCode]; String get iAm => localizedValues['i-am'][locale.languageCode]; String get yearOld => localizedValues['years-old'][locale.languageCode]; String get categorise => localizedValues['categorise'][locale.languageCode]; + String get refine => localizedValues['refine'][locale.languageCode]; + String get apply => localizedValues['apply'][locale.languageCode]; + String get reset => localizedValues['reset'][locale.languageCode]; + String get viewCategorise => localizedValues['viewCategorise'][locale.languageCode]; String get cart => localizedValues['cart'][locale.languageCode]; String get wishList => localizedValues['wishList'][locale.languageCode]; String get Alhabibapp => localizedValues['Alhabibapp'][locale.languageCode]; - String get searchProductHere => localizedValues['searchProductHere'][locale.languageCode]; + String get searchProductHere => + localizedValues['searchProductHere'][locale.languageCode]; String get email => localizedValues['email'][locale.languageCode]; String get book => localizedValues['Book'][locale.languageCode]; - String get appointmentLabel => localizedValues['AppointmentLabel'][locale.languageCode]; + String get appointmentLabel => + localizedValues['AppointmentLabel'][locale.languageCode]; String get bloodType => localizedValues['BloodType'][locale.languageCode]; - String get loginToUseService => localizedValues['loginToUseService'][locale.languageCode]; - String get maritalStatus => localizedValues['marital-status'][locale.languageCode]; + String get loginToUseService => + localizedValues['loginToUseService'][locale.languageCode]; + String get maritalStatus => + localizedValues['marital-status'][locale.languageCode]; String get general => localizedValues['general'][locale.languageCode]; String get profile => localizedValues['profile'][locale.languageCode]; - String get notifications => localizedValues['notifications'][locale.languageCode]; - String get notificationDetails => localizedValues['notificationDetails'][locale.languageCode]; - List get infoMyDoctorPoints => localizedValues['info-my-doctor-points'][locale.languageCode]; - String get infoMyDoctor => localizedValues['info-my-doctor'][locale.languageCode]; - String get infoPrescriptions => localizedValues['info-prescriptions'][locale.languageCode]; - List get infoPrescriptionsPoints => localizedValues['info-my-prescription-points'][locale.languageCode]; - - String get infoInsuranceCards => localizedValues['info-insurance-cards'][locale.languageCode]; - List get infoInsuranceCardsPoints => localizedValues['info-insurance-cards-points'][locale.languageCode]; - - String get infoAllergies => localizedValues['info-allergies'][locale.languageCode]; + String get notifications => + localizedValues['notifications'][locale.languageCode]; + String get notificationDetails => + localizedValues['notificationDetails'][locale.languageCode]; + List get infoMyDoctorPoints => + localizedValues['info-my-doctor-points'][locale.languageCode]; + String get infoMyDoctor => + localizedValues['info-my-doctor'][locale.languageCode]; + String get infoPrescriptions => + localizedValues['info-prescriptions'][locale.languageCode]; + List get infoPrescriptionsPoints => + localizedValues['info-my-prescription-points'][locale.languageCode]; + + String get infoInsuranceCards => + localizedValues['info-insurance-cards'][locale.languageCode]; + List get infoInsuranceCardsPoints => + localizedValues['info-insurance-cards-points'][locale.languageCode]; + + String get infoAllergies => + localizedValues['info-allergies'][locale.languageCode]; String get sickLeaves => localizedValues['sick-leaves'][locale.languageCode]; - String get infoSickLeaves => localizedValues['info-sick-leaves'][locale.languageCode]; - List get infoSickLeavePoints => localizedValues['info-sick-leave-points'][locale.languageCode]; - - String get infoApprovals => localizedValues['info-approvals'][locale.languageCode]; - List get infoApprovalPoints => localizedValues['info-approval-points'][locale.languageCode]; - - String get monthReport => localizedValues['month-report'][locale.languageCode]; - String get infoMonthReport => localizedValues['info-month-report'][locale.languageCode]; - String get languageSetting => localizedValues['language-setting'][locale.languageCode]; + String get infoSickLeaves => + localizedValues['info-sick-leaves'][locale.languageCode]; + List get infoSickLeavePoints => + localizedValues['info-sick-leave-points'][locale.languageCode]; + + String get infoApprovals => + localizedValues['info-approvals'][locale.languageCode]; + List get infoApprovalPoints => + localizedValues['info-approval-points'][locale.languageCode]; + + String get monthReport => + localizedValues['month-report'][locale.languageCode]; + String get infoMonthReport => + localizedValues['info-month-report'][locale.languageCode]; + String get languageSetting => + localizedValues['language-setting'][locale.languageCode]; String get alert => localizedValues['alert'][locale.languageCode]; String get emailAlert => localizedValues['email-alert'][locale.languageCode]; String get smsAlert => localizedValues['sms-alert'][locale.languageCode]; - String get contactInfo => localizedValues['contact-info'][locale.languageCode]; + String get contactInfo => + localizedValues['contact-info'][locale.languageCode]; String get emergencyName => localizedValues['emrg-name'][locale.languageCode]; - String get emergencyContact => localizedValues['emrg-no'][locale.languageCode]; + String get emergencyContact => + localizedValues['emrg-no'][locale.languageCode]; String get modes => localizedValues['modes'][locale.languageCode]; String get vibration => localizedValues['vibration'][locale.languageCode]; String get blindMode => localizedValues['blind-modes'][locale.languageCode]; - String get invertTheme => localizedValues['invert-theme'][locale.languageCode]; + String get invertTheme => + localizedValues['invert-theme'][locale.languageCode]; String get offTheme => localizedValues['off-theme'][locale.languageCode]; String get dimTheme => localizedValues['dim-theme'][locale.languageCode]; String get bwTheme => localizedValues['bw-theme'][locale.languageCode]; String get permissions => localizedValues['permissions'][locale.languageCode]; - String get cameraPermission => localizedValues['camera-permission'][locale.languageCode]; - String get locationPermission => localizedValues['location-permission'][locale.languageCode]; - String get accessibility => localizedValues['accessibility'][locale.languageCode]; - String get selectClinic => localizedValues['selectClinic'][locale.languageCode]; + String get cameraPermission => + localizedValues['camera-permission'][locale.languageCode]; + String get locationPermission => + localizedValues['location-permission'][locale.languageCode]; + String get accessibility => + localizedValues['accessibility'][locale.languageCode]; + String get selectClinic => + localizedValues['selectClinic'][locale.languageCode]; String get orderStatus => localizedValues['orderStatus'][locale.languageCode]; String get findUs => localizedValues['FindUs'][locale.languageCode]; String get feedback => localizedValues['Feedback'][locale.languageCode]; String get liveChat => localizedValues['LiveChat'][locale.languageCode]; String get service => localizedValues['Service'][locale.languageCode]; - String get hMGServiceLabel => localizedValues['HMGServiceLabel'][locale.languageCode]; - String get healthWeatherIndicators => localizedValues['HealthWeatherIndicators'][locale.languageCode]; - String get healthTipsBasedOnCurrentWeather => localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode]; + String get hMGServiceLabel => + localizedValues['HMGServiceLabel'][locale.languageCode]; + String get healthWeatherIndicators => + localizedValues['HealthWeatherIndicators'][locale.languageCode]; + String get healthTipsBasedOnCurrentWeather => + localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode]; String get moreDetails => localizedValues['MoreDetails'][locale.languageCode]; String get sendCopy => localizedValues['SendCopy'][locale.languageCode]; String get resendOrder => localizedValues['ResendOrder'][locale.languageCode]; @@ -741,7 +1022,8 @@ class TranslationBase { String get mass => localizedValues['mass'][locale.languageCode]; String get tempC => localizedValues['temp-c'][locale.languageCode]; String get bpm => localizedValues['bpm'][locale.languageCode]; - String get respirationSigns => localizedValues['respiration-signs'][locale.languageCode]; + String get respirationSigns => + localizedValues['respiration-signs'][locale.languageCode]; String get sysDias => localizedValues['sys-dias'][locale.languageCode]; String get body => localizedValues['body'][locale.languageCode]; String get feedbackTitle => localizedValues['feedback'][locale.languageCode]; @@ -750,36 +1032,59 @@ class TranslationBase { String get likeToHear => localizedValues['like-to-hear'][locale.languageCode]; String get subject => localizedValues['subject'][locale.languageCode]; String get message => localizedValues['message'][locale.languageCode]; - String get emptySubject => localizedValues['empty-subject'][locale.languageCode]; - String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; - String get selectAttachment => localizedValues['select-attachment'][locale.languageCode]; - String get complainAppo => localizedValues['complain-appo'][locale.languageCode]; - String get complainWithoutAppo => localizedValues['complain-without-appo'][locale.languageCode]; + String get emptySubject => + localizedValues['empty-subject'][locale.languageCode]; + String get emptyMessage => + localizedValues['empty-message'][locale.languageCode]; + String get selectAttachment => + localizedValues['select-attachment'][locale.languageCode]; + String get complainAppo => + localizedValues['complain-appo'][locale.languageCode]; + String get complainWithoutAppo => + localizedValues['complain-without-appo'][locale.languageCode]; String get question => localizedValues['question'][locale.languageCode]; - String get messageType => localizedValues['message-type'][locale.languageCode]; + String get messageType => + localizedValues['message-type'][locale.languageCode]; String get compliment => localizedValues['compliment'][locale.languageCode]; String get suggestion => localizedValues['suggestion'][locale.languageCode]; - String get yourFeedback => localizedValues['your-feedback'][locale.languageCode]; + String get yourFeedback => + localizedValues['your-feedback'][locale.languageCode]; String get selectPart => localizedValues['select-part'][locale.languageCode]; String get number => localizedValues['number'][locale.languageCode]; - String get notClassified => localizedValues['not-classified'][locale.languageCode]; - String get searchItemError => localizedValues['searchItemError'][locale.languageCode]; + String get notClassified => + localizedValues['not-classified'][locale.languageCode]; + String get searchItemError => + localizedValues['searchItemError'][locale.languageCode]; String get youCanFind => localizedValues['YouCanFind'][locale.languageCode]; - String get itemInSearch => localizedValues['ItemInSearch'][locale.languageCode]; - String get bloodDonation => localizedValues['blood-donation'][locale.languageCode]; - String get bloodDonationInfo => localizedValues['blood-donation-info'][locale.languageCode]; - - String get bloodInstruction => localizedValues['blood-instruction'][locale.languageCode]; - String get bloodTermsNcondition => localizedValues['view-terms'][locale.languageCode]; - String get wantToConnectWithHmgNetwork => localizedValues['wantConnectHmgNetwork'][locale.languageCode]; - String get failedToAccessHmgServices => localizedValues['failedToAccessHmgServices'][locale.languageCode]; - String get enablingWifi => localizedValues['enablingWifi'][locale.languageCode]; - String get offerAndPackages => localizedValues['offerAndPackages'][locale.languageCode]; + String get itemInSearch => + localizedValues['ItemInSearch'][locale.languageCode]; + String get bloodDonation => + localizedValues['blood-donation'][locale.languageCode]; + String get bloodDonationInfo => + localizedValues['blood-donation-info'][locale.languageCode]; + + String get bloodInstruction => + localizedValues['blood-instruction'][locale.languageCode]; + String get bloodTermsNcondition => + localizedValues['view-terms'][locale.languageCode]; + String get wantToConnectWithHmgNetwork => + localizedValues['wantConnectHmgNetwork'][locale.languageCode]; + String get failedToAccessHmgServices => + localizedValues['failedToAccessHmgServices'][locale.languageCode]; + String get enablingWifi => + localizedValues['enablingWifi'][locale.languageCode]; + String get offerAndPackages => + localizedValues['offerAndPackages'][locale.languageCode]; String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode]; - String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; - String get generalResult => localizedValues['GeneralResult'][locale.languageCode]; - String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; + String get invoiceDate => localizedValues['InvoiceNo'][locale.languageCode]; + String get specialResult => + localizedValues['SpecialResult'][locale.languageCode]; + String get generalResult => + localizedValues['GeneralResult'][locale.languageCode]; + String get showMoreBtn => + localizedValues['show-more-btn'][locale.languageCode]; + String get value => localizedValues['value'][locale.languageCode]; String get range => localizedValues['range'][locale.languageCode]; String get outpatient => localizedValues['out-patient'][locale.languageCode]; @@ -790,110 +1095,166 @@ class TranslationBase { String get sendCopyRad => localizedValues['send-copy'][locale.languageCode]; String get appoSurvey => localizedValues['appoSurvey'][locale.languageCode]; String get vaccination => localizedValues['vaccination'][locale.languageCode]; - String get welcomeBackV => localizedValues['welcomeBack'][locale.languageCode]; - String get instructions => localizedValues['instructions'][locale.languageCode]; - String get updateEmail => localizedValues['update-email'][locale.languageCode]; - String get updatedEmail => localizedValues['updated-email'][locale.languageCode]; - String get viewListChildren => localizedValues['view-list-children'][locale.languageCode]; + String get welcomeBackV => + localizedValues['welcomeBack'][locale.languageCode]; + String get instructions => + localizedValues['instructions'][locale.languageCode]; + String get updateEmail => + localizedValues['update-email'][locale.languageCode]; + String get updatedEmail => + localizedValues['updated-email'][locale.languageCode]; + String get viewListChildren => + localizedValues['view-list-children'][locale.languageCode]; String get addChild => localizedValues['add-child'][locale.languageCode]; String get childName => localizedValues['child-name'][locale.languageCode]; String get childDob => localizedValues['childDob'][locale.languageCode]; - String get deletedChildMes => localizedValues['deleted-child-mes'][locale.languageCode]; + String get deletedChildMes => + localizedValues['deleted-child-mes'][locale.languageCode]; String get visit => localizedValues['visit'][locale.languageCode]; - String get descriptionVaccination => localizedValues['description-vaccination'][locale.languageCode]; + String get descriptionVaccination => + localizedValues['description-vaccination'][locale.languageCode]; String get dueDate => localizedValues['due-date'][locale.languageCode]; String get validEmail => localizedValues['valid-email'][locale.languageCode]; - String get confirmSend => localizedValues['confirm-send'][locale.languageCode]; - String get emailSuccess => localizedValues['email-success'][locale.languageCode]; - String get deletedChild => localizedValues['deleted-child'][locale.languageCode]; - String get addInstructions => localizedValues['add-instructions'][locale.languageCode]; + String get confirmSend => + localizedValues['confirm-send'][locale.languageCode]; + String get emailSuccess => + localizedValues['email-success'][locale.languageCode]; + String get deletedChild => + localizedValues['deleted-child'][locale.languageCode]; + String get addInstructions => + localizedValues['add-instructions'][locale.languageCode]; String get addedChild => localizedValues['added-child'][locale.languageCode]; String get appUpdate => localizedValues['appUpdate'][locale.languageCode]; - String get ereferralSaveSuccess => localizedValues['ereferralSaveSuccess'][locale.languageCode]; + String get ereferralSaveSuccess => + localizedValues['ereferralSaveSuccess'][locale.languageCode]; String get labResults => localizedValues['labResults'][locale.languageCode]; - String get doctorRating => localizedValues['doctorRating'][locale.languageCode]; + String get doctorRating => + localizedValues['doctorRating'][locale.languageCode]; String get good => localizedValues['good'][locale.languageCode]; String get v_good => localizedValues['v-good'][locale.languageCode]; String get excellent => localizedValues['excellent'][locale.languageCode]; - String get below_average => localizedValues['below-average'][locale.languageCode]; + String get below_average => + localizedValues['below-average'][locale.languageCode]; String get infoSigns => localizedValues['info-signs'][locale.languageCode]; - String get infoAdvancePayment => localizedValues['info-advance-payment'][locale.languageCode]; - String get infoMyBalance => localizedValues['info-my-balance'][locale.languageCode]; + String get infoAdvancePayment => + localizedValues['info-advance-payment'][locale.languageCode]; + String get infoMyBalance => + localizedValues['info-my-balance'][locale.languageCode]; String get erContant => localizedValues['er-contant'][locale.languageCode]; String get er => localizedValues['er'][locale.languageCode]; - String get transportationService => localizedValues['transportation-Service'][locale.languageCode]; - String get infoAmbulance => localizedValues['info-ambulance'][locale.languageCode]; - String get transportHeading => localizedValues['RRT-transport-heading'][locale.languageCode]; - String get directionHeading => localizedValues['RRT-direction-heading'][locale.languageCode]; - String get wayHeading => localizedValues['RRT-way-heading'][locale.languageCode]; + String get transportationService => + localizedValues['transportation-Service'][locale.languageCode]; + String get infoAmbulance => + localizedValues['info-ambulance'][locale.languageCode]; + String get transportHeading => + localizedValues['RRT-transport-heading'][locale.languageCode]; + String get directionHeading => + localizedValues['RRT-direction-heading'][locale.languageCode]; + String get wayHeading => + localizedValues['RRT-way-heading'][locale.languageCode]; String get toHospital => localizedValues['to-hospital'][locale.languageCode]; - String get fromHospital => localizedValues['from-hospital'][locale.languageCode]; + String get fromHospital => + localizedValues['from-hospital'][locale.languageCode]; String get oneDirec => localizedValues['one-direc'][locale.languageCode]; String get twoDirec => localizedValues['two-direc'][locale.languageCode]; - String get pickupLocation => localizedValues['pickup-location'][locale.languageCode]; + String get pickupLocation => + localizedValues['pickup-location'][locale.languageCode]; String get pickupSpot => localizedValues['pickup-spot'][locale.languageCode]; String get insideHome => localizedValues['inside-home'][locale.languageCode]; String get haveAppo => localizedValues['have-appo'][locale.languageCode]; - String get dropoffLocation => localizedValues['dropoff-location'][locale.languageCode]; + String get dropoffLocation => + localizedValues['dropoff-location'][locale.languageCode]; String get selectAll => localizedValues['select-all'][locale.languageCode]; String get selectMap => localizedValues['select-map'][locale.languageCode]; - String get noAppointment => localizedValues['no-appointment'][locale.languageCode]; - String get patientShareB => localizedValues['patient-share'][locale.languageCode]; - String get patientShareTax => localizedValues['patient-share-tax'][locale.languageCode]; - String get patientShareTotal => localizedValues['patient-share-total'][locale.languageCode]; - String get selectAmbulate => localizedValues['select-ambulate'][locale.languageCode]; + String get noAppointment => + localizedValues['no-appointment'][locale.languageCode]; + String get patientShareB => + localizedValues['patient-share'][locale.languageCode]; + String get patientShareTax => + localizedValues['patient-share-tax'][locale.languageCode]; + String get patientShareTotal => + localizedValues['patient-share-total'][locale.languageCode]; + String get selectAmbulate => + localizedValues['select-ambulate'][locale.languageCode]; String get wheelchair => localizedValues['wheelchair'][locale.languageCode]; String get walker => localizedValues['walker'][locale.languageCode]; String get stretcher => localizedValues['stretcher'][locale.languageCode]; String get none => localizedValues['none'][locale.languageCode]; String get rrtSummary => localizedValues['RRT-Summary'][locale.languageCode]; - String get rapidResponseTeam => localizedValues['Rapid-Response-Team'][locale.languageCode]; + String get rapidResponseTeam => + localizedValues['Rapid-Response-Team'][locale.languageCode]; String get rrtDDetails => localizedValues['RRTDDetails'][locale.languageCode]; - String get approximateServiceFee => localizedValues['ApproximateServiceFee'][locale.languageCode]; - String get amountBeforeTax => localizedValues['AmountBeforeTax'][locale.languageCode]; + String get approximateServiceFee => + localizedValues['ApproximateServiceFee'][locale.languageCode]; + String get amountBeforeTax => + localizedValues['AmountBeforeTax'][locale.languageCode]; String get taxAmount => localizedValues['TaxAmount'][locale.languageCode]; - String get totalAmountPayable => localizedValues['TotalAmountPayable'][locale.languageCode]; - String get iAcceptTermsConditions => localizedValues['iAcceptTermsConditions'][locale.languageCode]; - String get somethingWentWrongTryLater => localizedValues['somethingWentWrongTryLater'][locale.languageCode]; - String get youCanPayByTheFollowingOptions => localizedValues['YouCanPayByTheFollowingOptions'][locale.languageCode]; + String get totalAmountPayable => + localizedValues['TotalAmountPayable'][locale.languageCode]; + String get iAcceptTermsConditions => + localizedValues['iAcceptTermsConditions'][locale.languageCode]; + String get somethingWentWrongTryLater => + localizedValues['somethingWentWrongTryLater'][locale.languageCode]; + String get youCanPayByTheFollowingOptions => + localizedValues['YouCanPayByTheFollowingOptions'][locale.languageCode]; String get rrtService => localizedValues['rrtService'][locale.languageCode]; - String get rrtUserAgreementTitle => localizedValues['rrtUserAgreementTitle'][locale.languageCode]; - String get rrtUserAgreementP1 => localizedValues['rrtUserAgreementP1'][locale.languageCode]; - String get rrtUserAgreementP2 => localizedValues['rrtUserAgreementP2'][locale.languageCode]; - String get rrtUserAgreementP3 => localizedValues['rrtUserAgreementP3'][locale.languageCode]; - String get rrtOrderSuccessMessage => localizedValues['rrtOrderSuccessMessage'][locale.languageCode]; + String get rrtUserAgreementTitle => + localizedValues['rrtUserAgreementTitle'][locale.languageCode]; + String get rrtUserAgreementP1 => + localizedValues['rrtUserAgreementP1'][locale.languageCode]; + String get rrtUserAgreementP2 => + localizedValues['rrtUserAgreementP2'][locale.languageCode]; + String get rrtUserAgreementP3 => + localizedValues['rrtUserAgreementP3'][locale.languageCode]; + String get rrtOrderSuccessMessage => + localizedValues['rrtOrderSuccessMessage'][locale.languageCode]; String get billAmount => localizedValues['bill-amount'][locale.languageCode]; - String get transportMethod => localizedValues['transport-method'][locale.languageCode]; + String get transportMethod => + localizedValues['transport-method'][locale.languageCode]; String get directions => localizedValues['directions'][locale.languageCode]; - String get infoMyAppointments => localizedValues['info-my-appointments'][locale.languageCode]; + String get infoMyAppointments => + localizedValues['info-my-appointments'][locale.languageCode]; String get infoTodo => localizedValues['info-todo'][locale.languageCode]; String get familyInfo => localizedValues['family-info'][locale.languageCode]; - String get profileUpdate => localizedValues['update-succ'][locale.languageCode]; - String get dentalComplaints => localizedValues['dental-complains'][locale.languageCode]; - String get emptyResult => localizedValues['empty-result'][locale.languageCode]; - - String get noBookedAppo => localizedValues['no-booked-appointment'][locale.languageCode]; - String get noConfirmedAppo => localizedValues['no-confirmed-appointment'][locale.languageCode]; - String get noArrivedAppo => localizedValues['no-arrived-appointment'][locale.languageCode]; - String get upcomingEmpty => localizedValues['upcoming-empty'][locale.languageCode]; - String get upcomingTimeLeft => localizedValues['upcoming-timeLeft'][locale.languageCode]; - - String get covidTestAllServices => localizedValues['covid-test-all-services'][locale.languageCode]; + String get profileUpdate => + localizedValues['update-succ'][locale.languageCode]; + String get dentalComplaints => + localizedValues['dental-complains'][locale.languageCode]; + String get emptyResult => + localizedValues['empty-result'][locale.languageCode]; + + String get noBookedAppo => + localizedValues['no-booked-appointment'][locale.languageCode]; + String get noConfirmedAppo => + localizedValues['no-confirmed-appointment'][locale.languageCode]; + String get noArrivedAppo => + localizedValues['no-arrived-appointment'][locale.languageCode]; + String get upcomingEmpty => + localizedValues['upcoming-empty'][locale.languageCode]; + String get upcomingTimeLeft => + localizedValues['upcoming-timeLeft'][locale.languageCode]; + + String get covidTestAllServices => + localizedValues['covid-test-all-services'][locale.languageCode]; String get pharmacy => localizedValues['pharmacy'][locale.languageCode]; String get ereferral => localizedValues['ereferral'][locale.languageCode]; - String get childVaccine => localizedValues['child-vaccine'][locale.languageCode]; + String get childVaccine => + localizedValues['child-vaccine'][locale.languageCode]; String get calculators => localizedValues['calculators'][locale.languageCode]; String get converters => localizedValues['converters'][locale.languageCode]; String get h2o => localizedValues['h2o'][locale.languageCode]; - String get waterTracker => localizedValues['waterTracker'][locale.languageCode]; + String get waterTracker => + localizedValues['waterTracker'][locale.languageCode]; String get ft => localizedValues['ft'][locale.languageCode]; String get vTour => localizedValues['v-tour'][locale.languageCode]; String get hmgNews => localizedValues['hmg-news'][locale.languageCode]; String get bloodD => localizedValues['blood-d'][locale.languageCode]; - String get symptomCheckerTitle => localizedValues['symptomCheckerTitle'][locale.languageCode]; + String get symptomCheckerTitle => + localizedValues['symptomCheckerTitle'][locale.languageCode]; String get latestNews => localizedValues['latest-news'][locale.languageCode]; - String get ourLocation => localizedValues['our-location'][locale.languageCode]; + String get ourLocation => + localizedValues['our-location'][locale.languageCode]; String get pharmacies => localizedValues['pharmacies'][locale.languageCode]; String get hospitals => localizedValues['hospitals'][locale.languageCode]; String get wallet => localizedValues['wallet'][locale.languageCode]; @@ -901,18 +1262,22 @@ class TranslationBase { String get requested => localizedValues['requested'][locale.languageCode]; String get ready => localizedValues['ready'][locale.languageCode]; String get completed => localizedValues['completed'][locale.languageCode]; - String get requestMedicalReport => localizedValues['request-medical-report'][locale.languageCode]; + String get requestMedicalReport => + localizedValues['request-medical-report'][locale.languageCode]; String get insurCards => localizedValues['insur-cards'][locale.languageCode]; String get labResult => localizedValues['labResult'][locale.languageCode]; String get details => localizedValues['details'][locale.languageCode]; String get age => localizedValues['age'][locale.languageCode]; - String get activeInsurence => localizedValues['active-insurence'][locale.languageCode]; + String get activeInsurence => + localizedValues['active-insurence'][locale.languageCode]; String get notActive => localizedValues['not-active'][locale.languageCode]; String get cardDetail => localizedValues['card-detail'][locale.languageCode]; String get dr => localizedValues['Dr'][locale.languageCode]; String get sendSuc => localizedValues['sendSuc'][locale.languageCode]; - String get instructionsPharmacies => localizedValues['instructions-pharmacies'][locale.languageCode]; - String get selectHospitalDec => localizedValues['select-hospital'][locale.languageCode]; + String get instructionsPharmacies => + localizedValues['instructions-pharmacies'][locale.languageCode]; + String get selectHospitalDec => + localizedValues['select-hospital'][locale.languageCode]; String get start => localizedValues['start'][locale.languageCode]; String get infoChat => localizedValues['info-chat'][locale.languageCode]; @@ -922,88 +1287,136 @@ class TranslationBase { String get tapTitle => localizedValues['tap-title'][locale.languageCode]; String get later => localizedValues['later'][locale.languageCode]; - String get lastAppointment => localizedValues['last-appointment'][locale.languageCode]; + String get lastAppointment => + localizedValues['last-appointment'][locale.languageCode]; String get rateClinic => localizedValues['rate-clinic'][locale.languageCode]; String get fetchData => localizedValues['fetch-data'][locale.languageCode]; - String get sendConfEmail => localizedValues['send-email'][locale.languageCode]; - String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode]; + String get sendConfEmail => + localizedValues['send-email'][locale.languageCode]; + String get noDataAvailable => + localizedValues['noDataAvailable'][locale.languageCode]; String get theName => localizedValues['thename'][locale.languageCode]; - String get noSearchResult => localizedValues['noSearchResult'][locale.languageCode]; - String get selectFileSouse => localizedValues['selectFileSouse'][locale.languageCode]; + String get noSearchResult => + localizedValues['noSearchResult'][locale.languageCode]; + String get selectFileSouse => + localizedValues['selectFileSouse'][locale.languageCode]; String get rate => localizedValues['rate'][locale.languageCode]; - String get bookedSuccess => localizedValues['booked-success'][locale.languageCode]; - String get appoReminder30 => localizedValues['appo-reminder-select-option-30'][locale.languageCode]; - String get appoReminder60 => localizedValues['appo-reminder-select-option-60'][locale.languageCode]; - String get appoReminder90 => localizedValues['appo-reminder-select-option-90'][locale.languageCode]; - String get appoReminder120 => localizedValues['appo-reminder-select-option-120'][locale.languageCode]; + String get bookedSuccess => + localizedValues['booked-success'][locale.languageCode]; + String get appoReminder30 => + localizedValues['appo-reminder-select-option-30'][locale.languageCode]; + String get appoReminder60 => + localizedValues['appo-reminder-select-option-60'][locale.languageCode]; + String get appoReminder90 => + localizedValues['appo-reminder-select-option-90'][locale.languageCode]; + String get appoReminder120 => + localizedValues['appo-reminder-select-option-120'][locale.languageCode]; String get gallery => localizedValues['gallery'][locale.languageCode]; String get camera => localizedValues['camera'][locale.languageCode]; String get medReport => localizedValues['med-report'][locale.languageCode]; - String get newMedReport => localizedValues['new-med-report'][locale.languageCode]; - String get requestReport => localizedValues['requestReport'][locale.languageCode]; - String get confirmMsgReport => localizedValues['confirm-msg-report'][locale.languageCode]; - String get successSendReport => localizedValues['successSendReport'][locale.languageCode]; + String get newMedReport => + localizedValues['new-med-report'][locale.languageCode]; + String get requestReport => + localizedValues['requestReport'][locale.languageCode]; + String get confirmMsgReport => + localizedValues['confirm-msg-report'][locale.languageCode]; + String get successSendReport => + localizedValues['successSendReport'][locale.languageCode]; String get pulseTitle => localizedValues['pulseTitle'][locale.languageCode]; - String get systolicLng => localizedValues['systolic-lng'][locale.languageCode]; - String get diastolicLng => localizedValues['diastolic-lng'][locale.languageCode]; - String get policyHolder => localizedValues['policy-holder'][locale.languageCode]; + String get systolicLng => + localizedValues['systolic-lng'][locale.languageCode]; + String get diastolicLng => + localizedValues['diastolic-lng'][locale.languageCode]; + String get policyHolder => + localizedValues['policy-holder'][locale.languageCode]; String get policyNo => localizedValues['policy-no'][locale.languageCode]; - String get expiryDateTitle => localizedValues['expiry-date'][locale.languageCode]; + String get expiryDateTitle => + localizedValues['expiry-date'][locale.languageCode]; String get classTitle => localizedValues['class'][locale.languageCode]; String get approval => localizedValues['approval'][locale.languageCode]; String get agree => localizedValues['agree'][locale.languageCode]; String get disagree => localizedValues['disagree'][locale.languageCode]; - String get requestSent => localizedValues['request-sent'][locale.languageCode]; - String get attachInsuraceImage => localizedValues['attach-insurace-image'][locale.languageCode]; - String get infoInsurCards => localizedValues['info-insur-cards'][locale.languageCode]; + String get requestSent => + localizedValues['request-sent'][locale.languageCode]; + String get attachInsuraceImage => + localizedValues['attach-insurace-image'][locale.languageCode]; + String get infoInsurCards => + localizedValues['info-insur-cards'][locale.languageCode]; String get scanNow => localizedValues['scan-now'][locale.languageCode]; - String get pharmacyServiceTermsCondition => localizedValues['pharmacyServiceTermsCondition'][locale.languageCode]; + String get pharmacyServiceTermsCondition => + localizedValues['pharmacyServiceTermsCondition'][locale.languageCode]; - String get recordDeleted => localizedValues['recordDeleted'][locale.languageCode]; + String get recordDeleted => + localizedValues['recordDeleted'][locale.languageCode]; - String get referralStatus => localizedValues['referralStatus'][locale.languageCode]; - String get referralDate => localizedValues['referralDate'][locale.languageCode]; + String get referralStatus => + localizedValues['referralStatus'][locale.languageCode]; + String get referralDate => + localizedValues['referralDate'][locale.languageCode]; String get patientName => localizedValues['patientName'][locale.languageCode]; - String get referralNumber => localizedValues['referralNumber'][locale.languageCode]; + String get referralNumber => + localizedValues['referralNumber'][locale.languageCode]; String get requestID => localizedValues['requestID'][locale.languageCode]; String get OrderStatus => localizedValues['OrderStatus'][locale.languageCode]; String get pickupDate => localizedValues['pickupDate'][locale.languageCode]; String get serviceName => localizedValues['serviceName'][locale.languageCode]; - String get orderLocation => localizedValues['orderLocation'][locale.languageCode]; - String get selectService => localizedValues['selectService'][locale.languageCode]; - String get coveredService => localizedValues['coveredService'][locale.languageCode]; - String get selectedService => localizedValues['selectedService'][locale.languageCode]; - String get cancelOrderMsg => localizedValues['cancelOrderMsg'][locale.languageCode]; - String get processDoneSuccessfully => localizedValues['processDoneSuccessfully'][locale.languageCode]; - String get selectHomeHealthCareServices => localizedValues['selectHomeHealthCareServices'][locale.languageCode]; + String get orderLocation => + localizedValues['orderLocation'][locale.languageCode]; + String get selectService => + localizedValues['selectService'][locale.languageCode]; + String get coveredService => + localizedValues['coveredService'][locale.languageCode]; + String get selectedService => + localizedValues['selectedService'][locale.languageCode]; + String get cancelOrderMsg => + localizedValues['cancelOrderMsg'][locale.languageCode]; + String get processDoneSuccessfully => + localizedValues['processDoneSuccessfully'][locale.languageCode]; + String get selectHomeHealthCareServices => + localizedValues['selectHomeHealthCareServices'][locale.languageCode]; String get help => localizedValues['help'][locale.languageCode]; - String get habibRobotText => localizedValues['habibRobotText'][locale.languageCode]; + String get habibRobotText => + localizedValues['habibRobotText'][locale.languageCode]; String get topBrands => localizedValues['topBrands'][locale.languageCode]; String get notifyMe => localizedValues['notifyMe'][locale.languageCode]; - String get specification => localizedValues['specification'][locale.languageCode]; - String get availability => localizedValues['availability'][locale.languageCode]; - String get quantitySize => localizedValues['quantitySize'][locale.languageCode]; + String get specification => + localizedValues['specification'][locale.languageCode]; + String get availability => + localizedValues['availability'][locale.languageCode]; + String get quantitySize => + localizedValues['quantitySize'][locale.languageCode]; String get addToCart => localizedValues['addToCart'][locale.languageCode]; + String get addToWishlist => localizedValues['addToWishlist'][locale.languageCode]; String get buyNow => localizedValues['buyNow'][locale.languageCode]; - String get quantityShortcut => localizedValues['quantityShortcut'][locale.languageCode]; + String get quantityShortcut => + localizedValues['quantityShortcut'][locale.languageCode]; + String get noData => + localizedValues['noData'][locale.languageCode]; + String get no_data => + localizedValues['no_data'][locale.languageCode]; String get year => localizedValues['Year'][locale.languageCode]; String get month => localizedValues['Month'][locale.languageCode]; String get point => localizedValues['point'][locale.languageCode]; String get riyal => localizedValues['riyal'][locale.languageCode]; - String get termOfService => localizedValues['termOfService'][locale.languageCode]; - String get shoppingCart => localizedValues['shoppingCart'][locale.languageCode]; + String get termOfService => + localizedValues['termOfService'][locale.languageCode]; + String get shoppingCart => + localizedValues['shoppingCart'][locale.languageCode]; String get covidTest => localizedValues['covidTest'][locale.languageCode]; String get driveThru => localizedValues['driveThru'][locale.languageCode]; - String get NearestErDesc => localizedValues['NearestErDesc'][locale.languageCode]; + String get NearestErDesc => + localizedValues['NearestErDesc'][locale.languageCode]; String get NearestEr => localizedValues['NearestEr'][locale.languageCode]; String get infoCMC => localizedValues['infoCMC'][locale.languageCode]; - String get instructionAgree => localizedValues['instructionAgree'][locale.languageCode]; + String get instructionAgree => + localizedValues['instructionAgree'][locale.languageCode]; String get reqId => localizedValues['reqId'][locale.languageCode]; - String get ordersLog => localizedValues['RRT-orders-log'][locale.languageCode]; + String get ordersLog => + localizedValues['RRT-orders-log'][locale.languageCode]; String get bloodSugar => localizedValues['blood-sugar'][locale.languageCode]; String get myTracker => localizedValues['my-tracker'][locale.languageCode]; String get weekly => localizedValues['weekly'][locale.languageCode]; @@ -1012,37 +1425,56 @@ class TranslationBase { String get measured => localizedValues['measured'][locale.languageCode]; String get sugarAdd => localizedValues['sugar-add'][locale.languageCode]; String get other => localizedValues['other'][locale.languageCode]; - String get measureUnit => localizedValues['measure-unit'][locale.languageCode]; - String get measureTime => localizedValues['measure-time'][locale.languageCode]; + String get measureUnit => + localizedValues['measure-unit'][locale.languageCode]; + String get measureTime => + localizedValues['measure-time'][locale.languageCode]; String get update => localizedValues['update'][locale.languageCode]; - String get covid19_driveThrueTest => localizedValues['covid19_driveThrueTest'][locale.languageCode]; + String get covid19_driveThrueTest => + localizedValues['covid19_driveThrueTest'][locale.languageCode]; String get eReferral => localizedValues['E-Referral'][locale.languageCode]; - String get msg_email_address_up_to_date => localizedValues["msg_email_address_up_to_date"][locale.languageCode]; - String get updateEmailMsg => localizedValues["update-email-msg"][locale.languageCode]; + String get msg_email_address_up_to_date => + localizedValues["msg_email_address_up_to_date"][locale.languageCode]; + String get updateEmailMsg => + localizedValues["update-email-msg"][locale.languageCode]; - String get addNewChild => localizedValues["add-new-child"][locale.languageCode]; - String get sendChildEmailMsg => localizedValues["send-child-email-msg"][locale.languageCode]; - String get vaccinationAddChildMsg => localizedValues["vaccination-add-child-msg"][locale.languageCode]; - String get childAddedSuccessfully => localizedValues["child_added_successfully"][locale.languageCode]; + String get addNewChild => + localizedValues["add-new-child"][locale.languageCode]; + String get sendChildEmailMsg => + localizedValues["send-child-email-msg"][locale.languageCode]; + String get vaccinationAddChildMsg => + localizedValues["vaccination-add-child-msg"][locale.languageCode]; + String get childAddedSuccessfully => + localizedValues["child_added_successfully"][locale.languageCode]; String get sugar => localizedValues["sugar"][locale.languageCode]; - String get bloodCholesterol => localizedValues["bloodCholesterol"][locale.languageCode]; + String get bloodCholesterol => + localizedValues["bloodCholesterol"][locale.languageCode]; String get cholesterol => localizedValues["cholesterol"][locale.languageCode]; - String get triglycerides => localizedValues["triglycerides"][locale.languageCode]; + String get triglycerides => + localizedValues["triglycerides"][locale.languageCode]; String get fatInBlood => localizedValues["fatInBlood"][locale.languageCode]; String get calculate => localizedValues["calculate"][locale.languageCode]; - String get enterReadingValue => localizedValues["enterReadingValue"][locale.languageCode]; - String get convertBloodSugarStatement => localizedValues["convertBloodSugarStatement"][locale.languageCode]; + String get enterReadingValue => + localizedValues["enterReadingValue"][locale.languageCode]; + String get convertBloodSugarStatement => + localizedValues["convertBloodSugarStatement"][locale.languageCode]; String get convertFrom => localizedValues["convertFrom"][locale.languageCode]; String get result => localizedValues["result"][locale.languageCode]; String get sort => localizedValues["sort"][locale.languageCode]; - String get bloodSugarConversion => localizedValues["bloodSugarConversion"][locale.languageCode]; - String get convertCholesterolStatement => localizedValues["convertCholesterolStatement"][locale.languageCode]; - String get triglyceridesConvertStatement => localizedValues["triglyceridesConvertStatement"][locale.languageCode]; - String get bloodDEnterDesc => localizedValues["bloodD-enter-desc"][locale.languageCode]; - String get viewTermsConditions => localizedValues["viewTermsConditions"][locale.languageCode]; - String get generalHealth => localizedValues["generalHealth"][locale.languageCode]; + String get bloodSugarConversion => + localizedValues["bloodSugarConversion"][locale.languageCode]; + String get convertCholesterolStatement => + localizedValues["convertCholesterolStatement"][locale.languageCode]; + String get triglyceridesConvertStatement => + localizedValues["triglyceridesConvertStatement"][locale.languageCode]; + String get bloodDEnterDesc => + localizedValues["bloodD-enter-desc"][locale.languageCode]; + String get viewTermsConditions => + localizedValues["viewTermsConditions"][locale.languageCode]; + String get generalHealth => + localizedValues["generalHealth"][locale.languageCode]; String get womanHealth => localizedValues["womanHealth"][locale.languageCode]; String get bmi => localizedValues["bmi"][locale.languageCode]; String get calcHealth => localizedValues["calc-health"][locale.languageCode]; @@ -1051,7 +1483,8 @@ class TranslationBase { String get idealBody => localizedValues["idealBody"][locale.languageCode]; String get bodyWord => localizedValues["body_word"][locale.languageCode]; String get fat => localizedValues["fat"][locale.languageCode]; - String get carbohydrate => localizedValues["carbohydrate"][locale.languageCode]; + String get carbohydrate => + localizedValues["carbohydrate"][locale.languageCode]; String get proteinFat => localizedValues["proteinFat"][locale.languageCode]; String get ovulation => localizedValues["ovulation"][locale.languageCode]; String get delivery => localizedValues["delivery"][locale.languageCode]; @@ -1059,66 +1492,101 @@ class TranslationBase { String get selectUnit => localizedValues["selectUnit"][locale.languageCode]; String get feet => localizedValues["feet"][locale.languageCode]; String get pound => localizedValues["pound"][locale.languageCode]; - String get seeListOfDoctor => localizedValues["seeListOfDoctor"][locale.languageCode]; + String get seeListOfDoctor => + localizedValues["seeListOfDoctor"][locale.languageCode]; String get obese => localizedValues["obese"][locale.languageCode]; String get overWeight => localizedValues["overWeight"][locale.languageCode]; String get healthy => localizedValues["healthy"][locale.languageCode]; String get underWeight => localizedValues["underWeight"][locale.languageCode]; - String get bmiCalcMsgObese => localizedValues["bmiCalcMsgObese"][locale.languageCode]; - String get bmiCalcMsgOverweight => localizedValues["bmiCalcMsgOverweight"][locale.languageCode]; - String get bmiCalcMsgHealthy => localizedValues["bmiCalcMsgHealthy"][locale.languageCode]; - String get bmiCalcMsgUnderWeight => localizedValues["bmiCalcMsgUnderWeight"][locale.languageCode]; + String get bmiCalcMsgObese => + localizedValues["bmiCalcMsgObese"][locale.languageCode]; + String get bmiCalcMsgOverweight => + localizedValues["bmiCalcMsgOverweight"][locale.languageCode]; + String get bmiCalcMsgHealthy => + localizedValues["bmiCalcMsgHealthy"][locale.languageCode]; + String get bmiCalcMsgUnderWeight => + localizedValues["bmiCalcMsgUnderWeight"][locale.languageCode]; String get bariatrics => localizedValues["bariatrics"][locale.languageCode]; - String get bariatricsHeaderMsg => localizedValues["bariatricsHeaderMsg"][locale.languageCode]; + String get bariatricsHeaderMsg => + localizedValues["bariatricsHeaderMsg"][locale.languageCode]; String get continues => localizedValues["continue"][locale.languageCode]; String get skip => localizedValues["skip"][locale.languageCode]; - String get calorieCalcDesc => localizedValues["calorieCalcDesc"][locale.languageCode]; - String get age11_120Years => localizedValues["age11_120_years"][locale.languageCode]; + String get calorieCalcDesc => + localizedValues["calorieCalcDesc"][locale.languageCode]; + String get age11_120Years => + localizedValues["age11_120_years"][locale.languageCode]; String get walkinAppo => localizedValues["WalkinAppo"][locale.languageCode]; String get videoAppo => localizedValues["videoAppo"][locale.languageCode]; String get weightAdd => localizedValues["weight-add"][locale.languageCode]; - String get systolicAdd => localizedValues["systolic-add"][locale.languageCode]; - String get diastolicAdd => localizedValues["diastolic-add"][locale.languageCode]; + String get systolicAdd => + localizedValues["systolic-add"][locale.languageCode]; + String get diastolicAdd => + localizedValues["diastolic-add"][locale.languageCode]; String get cmcHeading => localizedValues["cmc-heading"][locale.languageCode]; - String get selectLocation => localizedValues["select-location"][locale.languageCode]; - String get resultHeader => localizedValues["result-header"][locale.languageCode]; + String get selectLocation => + localizedValues["select-location"][locale.languageCode]; + String get resultHeader => + localizedValues["result-header"][locale.languageCode]; String get covidInfo => localizedValues["covid-info"][locale.languageCode]; String get selectAppo => localizedValues["select-appo"][locale.languageCode]; - String get covidAlertHeader => localizedValues["covid-alert-header"][locale.languageCode]; - String get covidAlertInfo => localizedValues["covid-alert-info"][locale.languageCode]; - String get covidAlertMins => localizedValues["covid-alert-mins"][locale.languageCode]; + String get covidAlertHeader => + localizedValues["covid-alert-header"][locale.languageCode]; + String get covidAlertInfo => + localizedValues["covid-alert-info"][locale.languageCode]; + String get covidAlertMins => + localizedValues["covid-alert-mins"][locale.languageCode]; String get back => localizedValues["back"][locale.languageCode]; - String get getDirections => localizedValues["get-directions"][locale.languageCode]; - String get selectedLocation => localizedValues["selected-location"][locale.languageCode]; + String get getDirections => + localizedValues["get-directions"][locale.languageCode]; + String get selectedLocation => + localizedValues["selected-location"][locale.languageCode]; String get testFee => localizedValues["test-fee"][locale.languageCode]; String get payOptions => localizedValues["pay-options"][locale.languageCode]; - String get livecareService => localizedValues["livecare-service"][locale.languageCode]; - String get livecareServiceDesc => localizedValues["livecare-service-desc"][locale.languageCode]; - String get whyLivecare => localizedValues["why-livecare"][locale.languageCode]; - String get livecarePoint1 => localizedValues["livecare-point-1"][locale.languageCode]; - String get docVirtualAppoIns4 => localizedValues["doc-virtual-appo-ins4"][locale.languageCode]; - String get docVirtualAppoIns5 => localizedValues["doc-virtual-appo-ins5"][locale.languageCode]; - String get livecareSummary => localizedValues["livecare-summary"][locale.languageCode]; - - String get livecareOption1 => localizedValues["livecare-option-1"][locale.languageCode]; - String get livecareOption2 => localizedValues["livecare-option-2"][locale.languageCode]; - String get livecareOption3 => localizedValues["livecare-option-3"][locale.languageCode]; - String get livecareOption4 => localizedValues["livecare-option-4"][locale.languageCode]; + String get livecareService => + localizedValues["livecare-service"][locale.languageCode]; + String get livecareServiceDesc => + localizedValues["livecare-service-desc"][locale.languageCode]; + String get whyLivecare => + localizedValues["why-livecare"][locale.languageCode]; + String get livecarePoint1 => + localizedValues["livecare-point-1"][locale.languageCode]; + String get docVirtualAppoIns4 => + localizedValues["doc-virtual-appo-ins4"][locale.languageCode]; + String get docVirtualAppoIns5 => + localizedValues["doc-virtual-appo-ins5"][locale.languageCode]; + String get livecareSummary => + localizedValues["livecare-summary"][locale.languageCode]; + + String get livecareOption1 => + localizedValues["livecare-option-1"][locale.languageCode]; + String get livecareOption2 => + localizedValues["livecare-option-2"][locale.languageCode]; + String get livecareOption3 => + localizedValues["livecare-option-3"][locale.languageCode]; + String get livecareOption4 => + localizedValues["livecare-option-4"][locale.languageCode]; String get today => localizedValues["today"][locale.languageCode]; String get week => localizedValues["week"][locale.languageCode]; - String get h2oAmountOfWater => localizedValues["h2o-amount-of-water"][locale.languageCode]; + String get h2oAmountOfWater => + localizedValues["h2o-amount-of-water"][locale.languageCode]; String get updateUser => localizedValues["update-user"][locale.languageCode]; String get editname => localizedValues["editname"][locale.languageCode]; - String get activityLevel => localizedValues["activity-level"][locale.languageCode]; + String get activityLevel => + localizedValues["activity-level"][locale.languageCode]; String get success => localizedValues["success"][locale.languageCode]; - String get enterNameHere => localizedValues["enterNameHere"][locale.languageCode]; - String get lightActive => localizedValues["light-active"][locale.languageCode]; + String get enterNameHere => + localizedValues["enterNameHere"][locale.languageCode]; + String get lightActive => + localizedValues["light-active"][locale.languageCode]; String get modActive => localizedValues["mod-active"][locale.languageCode]; - String get reminderLabel => localizedValues["reminder-label"][locale.languageCode]; - String get reminderTimesLabel => localizedValues["reminder-times-label"][locale.languageCode]; + String get reminderLabel => + localizedValues["reminder-label"][locale.languageCode]; + String get reminderTimesLabel => + localizedValues["reminder-times-label"][locale.languageCode]; String get times => localizedValues["times"][locale.languageCode]; - String get WaterCalculate => localizedValues["WaterCalculate"][locale.languageCode]; + String get WaterCalculate => + localizedValues["WaterCalculate"][locale.languageCode]; String get notifTitle => localizedValues["notif-title"][locale.languageCode]; String get notifText => localizedValues["notif-text"][locale.languageCode]; String get custom => localizedValues["custom"][locale.languageCode]; @@ -1128,78 +1596,192 @@ class TranslationBase { String get taken => localizedValues["taken"][locale.languageCode]; String get ml => localizedValues["ml"][locale.languageCode]; String get l => localizedValues["l"][locale.languageCode]; - String get customLabel => localizedValues["custom-label"][locale.languageCode]; + String get customLabel => + localizedValues["custom-label"][locale.languageCode]; - String get customLabelInLitres => localizedValues["custom-label-in-litres"][locale.languageCode]; - String get customLabelInMililitres => localizedValues["custom-label-in-mililitres"][locale.languageCode]; + String get customLabelInLitres => + localizedValues["custom-label-in-litres"][locale.languageCode]; + String get customLabelInMililitres => + localizedValues["custom-label-in-mililitres"][locale.languageCode]; String get amount_ => localizedValues["amount"][locale.languageCode]; - String get targetReach => localizedValues["target-reach"][locale.languageCode]; + String get targetReach => + localizedValues["target-reach"][locale.languageCode]; String get weekHeader => localizedValues["week-header"][locale.languageCode]; - String get monthHeader => localizedValues["month-header"][locale.languageCode]; - String get notifPermissionTitle => localizedValues["notif-permission-title"][locale.languageCode]; - String get notifPermissionMsg => localizedValues["notif-permission-msg"][locale.languageCode]; - String get verification_message_code => localizedValues["verification_message_code"][locale.languageCode]; + String get monthHeader => + localizedValues["month-header"][locale.languageCode]; + String get notifPermissionTitle => + localizedValues["notif-permission-title"][locale.languageCode]; + String get notifPermissionMsg => + localizedValues["notif-permission-msg"][locale.languageCode]; + String get verification_message_code => + localizedValues["verification_message_code"][locale.languageCode]; String get sms_code => localizedValues["sms_code"][locale.languageCode]; - String get code_failure => localizedValues["code_failure"][locale.languageCode]; + String get code_failure => + localizedValues["code_failure"][locale.languageCode]; String get resend => localizedValues["resend"][locale.languageCode]; - String get submitncontinue => localizedValues["submitncontinue"][locale.languageCode]; + String get submitncontinue => + localizedValues["submitncontinue"][locale.languageCode]; String get areyousure => localizedValues["areyousure"][locale.languageCode]; // Offer And Packahes String get subT => localizedValues['OffersAndPackages'][locale.languageCode]; - String get totalWithColonRight => localizedValues['totalWithColonRight'][locale.languageCode]; + String get totalWithColonRight => + localizedValues['totalWithColonRight'][locale.languageCode]; - String get preferredunit => localizedValues["preferredunit"][locale.languageCode]; + String get preferredunit => + localizedValues["preferredunit"][locale.languageCode]; String get trySaying => localizedValues["try-saying"][locale.languageCode]; - String get somethingWentWrong => localizedValues["somethingWentWrong"][locale.languageCode]; - - String get enterIdentificationNumber => localizedValues["enterIdentificationNumber"][locale.languageCode]; - String get accountActivationDesc => localizedValues["accountActivationDesc"][locale.languageCode]; - String get pointsToTransfer => localizedValues["pointsToTransfer"][locale.languageCode]; - String get enterBeneficiaryAccountNo => localizedValues["enterBeneficiaryAccountNo"][locale.languageCode]; - String get confirmPrescription => localizedValues["confirm-prescription"][locale.languageCode]; - String get youAlreadyHaveOrder => localizedValues["you-already-have-order"][locale.languageCode]; - String get orderOverview => localizedValues["order-overview"][locale.languageCode]; - String get shippingAddresss => localizedValues["shipping-address"][locale.languageCode]; + String get somethingWentWrong => + localizedValues["somethingWentWrong"][locale.languageCode]; + + String get enterIdentificationNumber => + localizedValues["enterIdentificationNumber"][locale.languageCode]; + String get accountActivationDesc => + localizedValues["accountActivationDesc"][locale.languageCode]; + String get pointsToTransfer => + localizedValues["pointsToTransfer"][locale.languageCode]; + String get enterBeneficiaryAccountNo => + localizedValues["enterBeneficiaryAccountNo"][locale.languageCode]; + String get confirmPrescription => + localizedValues["confirm-prescription"][locale.languageCode]; + String get youAlreadyHaveOrder => + localizedValues["you-already-have-order"][locale.languageCode]; + String get orderOverview => + localizedValues["order-overview"][locale.languageCode]; + String get shippingAddresss => + localizedValues["shipping-address"][locale.languageCode]; String get covidAlert => localizedValues["covid-alert"][locale.languageCode]; - String get pharmacyRelogin => localizedValues["pharmacy-relogin"][locale.languageCode]; - String get onlineCheckInAgreement => localizedValues["onlineCheckInAgreement"][locale.languageCode]; - String get chiefComplaints => localizedValues["chiefComplaints"][locale.languageCode]; - String get errorChiefComplaints => localizedValues["errorChiefComplaints"][locale.languageCode]; - String get expectedArrivalTime => localizedValues["expectedArrivalTime"][locale.languageCode]; - String get errorExpectedArrivalTime => localizedValues["errorExpectedArrivalTimes"][locale.languageCode]; - String get anicllaryOrders => localizedValues["ancillary-orders"][locale.languageCode]; + String get pharmacyRelogin => + localizedValues["pharmacy-relogin"][locale.languageCode]; + String get onlineCheckInAgreement => + localizedValues["onlineCheckInAgreement"][locale.languageCode]; + String get chiefComplaints => + localizedValues["chiefComplaints"][locale.languageCode]; + String get errorChiefComplaints => + localizedValues["errorChiefComplaints"][locale.languageCode]; + String get expectedArrivalTime => + localizedValues["expectedArrivalTime"][locale.languageCode]; + String get errorExpectedArrivalTime => + localizedValues["errorExpectedArrivalTimes"][locale.languageCode]; + String get anicllaryOrders => + localizedValues["ancillary-orders"][locale.languageCode]; String get mrn => localizedValues["MRN"][locale.languageCode]; - String get appointmentDate => localizedValues["appointment-date"][locale.languageCode]; - String get appointmentNo => localizedValues["appointment-no"][locale.languageCode]; - String get insuranceID => localizedValues["insurance-id"][locale.languageCode]; + String get appointmentDate => + localizedValues["appointment-date"][locale.languageCode]; + String get appointmentNo => + localizedValues["appointment-no"][locale.languageCode]; + String get insuranceID => + localizedValues["insurance-id"][locale.languageCode]; String get enterFile => localizedValues["enter-file"][locale.languageCode]; - String get feedbackType => localizedValues["feedback-type"][locale.languageCode]; + String get feedbackType => + localizedValues["feedback-type"][locale.languageCode]; String get allow => localizedValues["allow"][locale.languageCode]; String get reject => localizedValues["reject"][locale.languageCode]; - String get enterReferralRequesterName => localizedValues["enterReferralRequesterName"][locale.languageCode]; - String get selectRelationship => localizedValues["selectRelationship"][locale.languageCode]; - String get requesterRelationship => localizedValues["requesterRelationship"][locale.languageCode]; + String get enterReferralRequesterName => + localizedValues["enterReferralRequesterName"][locale.languageCode]; + String get selectRelationship => + localizedValues["selectRelationship"][locale.languageCode]; + String get requesterRelationship => + localizedValues["requesterRelationship"][locale.languageCode]; String get newReferral => localizedValues["newReferral"][locale.languageCode]; - String get searchForReferrals => localizedValues["searchForReferrals"][locale.languageCode]; - String get covidSelectProcedure => localizedValues["covid-select-procedure"][locale.languageCode]; - String get onlineConsultation => localizedValues["online-consultation"][locale.languageCode]; - String get expectedWaiting => localizedValues["expected-weiting"][locale.languageCode]; - String get erConsultFee => localizedValues["er-consult-fee"][locale.languageCode]; - String get insuredPatient => localizedValues["insured-patient"][locale.languageCode]; - String get iAcceptTerms => localizedValues["i-accept-terms"][locale.languageCode]; - String get upComingPayOption => localizedValues["upcoming-pay-options"][locale.languageCode]; - String get pleaseAcceptTerms => localizedValues["please-accept-terms"][locale.languageCode]; + String get searchForReferrals => + localizedValues["searchForReferrals"][locale.languageCode]; + String get covidSelectProcedure => + localizedValues["covid-select-procedure"][locale.languageCode]; + String get onlineConsultation => + localizedValues["online-consultation"][locale.languageCode]; + String get expectedWaiting => + localizedValues["expected-weiting"][locale.languageCode]; + String get erConsultFee => + localizedValues["er-consult-fee"][locale.languageCode]; + String get insuredPatient => + localizedValues["insured-patient"][locale.languageCode]; + String get iAcceptTerms => + localizedValues["i-accept-terms"][locale.languageCode]; + String get upComingPayOption => + localizedValues["upcoming-pay-options"][locale.languageCode]; + String get pleaseAcceptTerms => + localizedValues["please-accept-terms"][locale.languageCode]; + String get pleaseSelectAllQuestionToContinue => + localizedValues["pleaseSelectAllQuestionToContinue"][locale.languageCode]; String get type => localizedValues["type"][locale.languageCode]; - String get eReferralInfo => localizedValues["info-ereferral"][locale.languageCode]; - String get erConsultation => localizedValues["er-consultation"][locale.languageCode]; - String get thisItemIsNotAvailable => localizedValues["thisItemIsNotAvailable"][locale.languageCode]; - String get beforeAfterImages => localizedValues["beforeAfterImages"][locale.languageCode]; + String get eReferralInfo => + localizedValues["info-ereferral"][locale.languageCode]; + String get erConsultation => + localizedValues["er-consultation"][locale.languageCode]; + String get thisItemIsNotAvailable => + localizedValues["thisItemIsNotAvailable"][locale.languageCode]; + String get beforeAfterImages => + localizedValues["beforeAfterImages"][locale.languageCode]; String get myInvoice => localizedValues["my-invoice"][locale.languageCode]; - String get invoicesList => localizedValues["invoice-list"][locale.languageCode]; + String get invoicesList => + localizedValues["invoice-list"][locale.languageCode]; + + String get clinicAcceptLivecare => + localizedValues["clinic-accept-livecare"][locale.languageCode]; + + String get livecareModalTop => + localizedValues["livecareModal-top"][locale.languageCode]; + String get empty => localizedValues["empty"][locale.languageCode]; + + String get schedule => localizedValues["schedule"][locale.languageCode]; + + String get livecarePoint2 => + localizedValues["livecare-point-2"][locale.languageCode]; + String get livecarePoint3 => + localizedValues["livecare-point-3"][locale.languageCode]; + String get livecarePoint4 => + localizedValues["livecare-point-4"][locale.languageCode]; + String get livecarePoint5 => + localizedValues["livecare-point-5"][locale.languageCode]; + String get bookImmediateLivecare => + localizedValues["book-immediate-livecare"][locale.languageCode]; + String get bookVideoLivecare2 => + localizedValues["book-video-livecare-2"][locale.languageCode]; + String get noThankyou => localizedValues["no-thankyou"][locale.languageCode]; + String get visitClinic => + localizedValues["visit-clinic"][locale.languageCode]; + String get generateCovidCertificate => + localizedValues["generate-covid-certificate"][locale.languageCode]; + String get isReportOutsideKsa => + localizedValues["is-report-outside-ksa"][locale.languageCode]; + String get passportNumber => + localizedValues["passport-number"][locale.languageCode]; + String get enterPassportNumber => + localizedValues["enter-passport-number"][locale.languageCode]; + String get validPassportNumber => + localizedValues["valid-passport-number"][locale.languageCode]; + String get aboutApp => localizedValues["about-app"][locale.languageCode]; + String get aboutPointsLength => + localizedValues["about-points"]['length'][locale.languageCode]; + String get continuePlan => + localizedValues["continue-plan"][locale.languageCode]; + String get dentalProcedureList => + localizedValues["dental-procedure-list"][locale.languageCode]; + String get timeNeeded => localizedValues["time-needed"][locale.languageCode]; + String get totalTimeNeeded => + localizedValues["total-time-needed"][locale.languageCode]; + String get infoEye => + localizedValues["info-eye"][locale.languageCode]; + String get infoVaccines => + localizedValues["info-vaccines"][locale.languageCode]; + String get infoTrackers => + localizedValues["info-trackers"][locale.languageCode]; + String get infoHealthData => + localizedValues["info-health-data"][locale.languageCode]; + String get infoAskDoc => + localizedValues["info-ask-doc"][locale.languageCode]; + String get infoAutoWifi => + localizedValues["info-auto-wifi"][locale.languageCode]; + String get autoWifi => + localizedValues["auto-wifi"][locale.languageCode]; + String get childVaccineInfo => + localizedValues["child-vaccine-info"][locale.languageCode]; + String get h2oInfo => + localizedValues["h2o-info"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { @@ -1216,3 +1798,7 @@ class TranslationBaseDelegate extends LocalizationsDelegate { @override bool shouldReload(TranslationBaseDelegate old) => false; } + +extension xTranslationBase on TranslationBase { + isArabic() => locale.languageCode == "ar"; +} diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 980761b4..cff955b9 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -7,6 +7,7 @@ import 'package:badges/badges.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:connectivity/connectivity.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; @@ -20,7 +21,6 @@ import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart' import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/my_invoices/my_invoice_page.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/my_trackers.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; @@ -31,15 +31,15 @@ import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart'; -import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; -import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; import 'package:url_launcher/url_launcher.dart'; + import '../Constants.dart'; import 'app_shared_preferences.dart'; import 'app_toast.dart'; @@ -240,8 +240,7 @@ class Utils { } medical.add(InkWell( - onTap: () => - projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null, + onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).radiology, imagePath: 'radiology_icon.png', @@ -251,8 +250,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => - projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null, + onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).medicines, imagePath: 'prescription_icon.png', @@ -277,8 +275,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => - projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null, + onTap: () => projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).myMedical, imagePath: 'active_medications.png', @@ -297,15 +294,11 @@ class Utils { ) : null, child: MedicalProfileItem( - title: TranslationBase.of(context).myDoctor, - imagePath: 'doctor_icon.png', - subTitle: TranslationBase.of(context).myDoctorSubtitle, - isEnable: projectViewModel.havePrivilege(6)), + title: TranslationBase.of(context).myDoctor, imagePath: 'doctor_icon.png', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)), )); medical.add(InkWell( - onTap: () => - projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null, + onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).myInvoice, imagePath: 'Invoice.png', @@ -315,8 +308,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => - projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null, + onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).eye, imagePath: 'eye_measurement_icon.png', @@ -347,8 +339,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => - projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null, + onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).insuranceApproval, imagePath: 'insurance_approvals_icon.png', @@ -378,8 +369,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => - projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null, + onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).medical, imagePath: 'medical_reports_icon.png', @@ -389,8 +379,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => - projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null, + onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).monthly, imagePath: 'monthly_reports_icon.png', @@ -400,8 +389,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => - projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null, + onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).sick, imagePath: 'sick_leaves_icons.png', @@ -439,8 +427,7 @@ class Utils { )); medical.add(InkWell( - onTap: () => - projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null, + onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null, child: MedicalProfileItem( title: TranslationBase.of(context).smartWatches, imagePath: 'smartwatch_icon.png', @@ -450,36 +437,34 @@ class Utils { )); medical.add(InkWell( - onTap: () => - projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null, + onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null, child: MedicalProfileItem( - title: TranslationBase.of(context).askYour, - imagePath: 'ask_doctor_icon.png', - subTitle: TranslationBase.of(context).askYourSubtitle, - isEnable: projectViewModel.havePrivilege(28)), + title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor_icon.png', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)), )); if (projectViewModel.havePrivilege(32) || true) { medical.add(InkWell( onTap: () { - userData().then((userData_) { - if (projectViewModel.isLogin && userData_ != null) { + if (projectViewModel.isLogin) { + userData().then((userData_) { String patientID = userData_.patientID.toString(); GifLoaderDialogUtils.showMyDialog(context); - projectViewModel - .platformBridge() - .connectHMGInternetWifi(patientID) - .then((value) => {GifLoaderDialogUtils.hideDialog(context)}); - } else { - AlertDialogBox( - context: context, - confirmMessage: "Please login with your account first to use this feature", - okText: "OK", - okFunction: () { - AlertDialogBox.closeAlertDialog(context); - }).showAlertDialog(context); - } - }); + projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)}); + }); + } else { + Navigator.push( + context, + FadePage( + page: NotAutPage( + title: TranslationBase.of(context).autoWifi, + description: TranslationBase.of(context).infoAutoWifi, + infoList: [], + imagesInfo: [ + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/ar/0.png'), + ], + ))); + } }, child: MedicalProfileItem( title: TranslationBase.of(context).internet, @@ -517,21 +502,15 @@ class Utils { }); } - static bool route(Route route, {@required Type equalsTo}){ - if((route is FadePage)){ + static bool route(Route route, {@required Type equalsTo}) { + if ((route is FadePage)) { return route.page.runtimeType == equalsTo; } return route.runtimeType == equalsTo; } } -Widget applyShadow( - {Color color = Colors.grey, - double shadowOpacity = 0.5, - double spreadRadius = 2, - double blurRadius = 7, - Offset offset = const Offset(2, 2), - @required Widget child}) { +Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) { return Container( decoration: BoxDecoration( boxShadow: [ @@ -571,19 +550,18 @@ openAppStore({String androidPackageName, String iOSAppID}) async { } } -String labelFrom({@required String className}){ +String labelFrom({@required String className}) { RegExp exp = RegExp(r'(?<=[a-z])[A-Z]'); String result = className.replaceAllMapped(exp, (m) { var str = m.group(0); - if(str != null){ + if (str != null) { return ('_' + str); } return ""; }); - if(result.isEmpty) - return className; + if (result.isEmpty) return className; result = result.replaceAll("_", " "); return result; diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart index 7c0c69d4..48ea6819 100644 --- a/lib/widgets/bottom_navigation/bottom_nav_bar.dart +++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart @@ -15,8 +15,6 @@ import 'package:provider/provider.dart'; import '../../d_q_icons_icons.dart'; import 'bottom_navigation_item.dart'; -import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; class BottomNavBar extends StatefulWidget { final ValueChanged changeIndex; diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index 9a3bbafe..91aefc75 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -2,7 +2,6 @@ import 'package:badges/badges.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; -import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart b/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart index ea2ede44..3f5b009d 100644 --- a/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart +++ b/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart @@ -1,7 +1,13 @@ import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; +import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/labs/passport_update_page.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -10,15 +16,17 @@ import 'package:provider/provider.dart'; import '../../text.dart'; import 'FlowChartPage.dart'; - class LabResultWidget extends StatelessWidget { + final String filterName; - final String filterName ; final List patientLabResultList; final PatientLabOrders patientLabOrder; - LabResultWidget({Key key, this.filterName, this.patientLabResultList, this.patientLabOrder}) : super(key: key); + LabResult covidLabResult; + + LabResultWidget({Key key, this.filterName, this.patientLabResultList, this.patientLabOrder}) : super(key: key); ProjectViewModel projectViewModel; + @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); @@ -29,8 +37,7 @@ class LabResultWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Texts(filterName), InkWell( @@ -40,7 +47,7 @@ class LabResultWidget extends StatelessWidget { FadePage( page: FlowChartPage( filterName: filterName, - patientLabOrder: patientLabOrder, + patientLabOrder: patientLabOrder, ), ), ); @@ -55,16 +62,99 @@ class LabResultWidget extends StatelessWidget { ), Table( border: TableBorder.symmetric( - inside: BorderSide( - width: 2.0, color: Colors.grey[300]), + inside: BorderSide(width: 2.0, color: Colors.grey[300]), ), - children: fullData(patientLabResultList,context), + children: fullData(patientLabResultList, context), ), + checkIfCovidLab(patientLabResultList) + ? Container( + margin: EdgeInsets.only(top: 10.0), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.91, + height: 45.0, + child: RaisedButton( + color: new Color(0xFFc5272d), + textColor: Colors.white, + disabledTextColor: Colors.white, + disabledColor: Colors.red[300], + onPressed: () { + showKSADialog(context); + }, + child: Text(TranslationBase.of(context).generateCovidCertificate, style: TextStyle(fontSize: 18.0)), + ), + ), + ) + : Container(), ], ), ); } - List fullData(List labResultList,context) { + + generateCovidCertificate(BuildContext context, String isOutsideKSA) { + LabsService service = new LabsService(); + GifLoaderDialogUtils.showMyDialog(context); + + service.generateCovidLabReport(covidLabResult, isOutsideKSA).then((res) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: TranslationBase.of(context).emailSentSuccessfully); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + openPassportUpdatePage(BuildContext context) { + Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) { + print(value); + if(value != null && value == true) { + showConfirmMessage(context, projectViewModel.user.emailAddress, "yes"); + } + }); + } + + void showKSADialog(BuildContext context) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).isReportOutsideKsa, + okText: TranslationBase.of(context).yes, + cancelText: TranslationBase.of(context).no, + okFunction: () => { + Navigator.of(context).pop(), + openPassportUpdatePage(context) + // showConfirmMessage(context, projectViewModel.user.emailAddress, "yes") + }, + cancelFunction: () => {showConfirmMessage(context, projectViewModel.user.emailAddress, "no")}); + dialog.showAlertDialog(context); + } + + void showConfirmMessage(BuildContext context, String email, String isOutsideKSA) { + showDialog( + context: context, + child: ConfirmSendEmailDialog( + email: email, + onTapSendEmail: () { + generateCovidCertificate(context, isOutsideKSA); + }, + ), + ); + } + + bool checkIfCovidLab(List labResultList) { + bool isCovidResult = false; + labResultList.forEach((order) { + if (order.testCode.toUpperCase().contains("COVID") && order.isCertificateAllowed.toString() == "true") { + isCovidResult = true; + covidLabResult = order; + } + }); + + return isCovidResult; + } + + List fullData(List labResultList, context) { List tableRow = []; tableRow.add( TableRow( @@ -74,12 +164,8 @@ class LabResultWidget extends StatelessWidget { decoration: BoxDecoration( color: Theme.of(context).primaryColor, borderRadius: BorderRadius.only( - topLeft: projectViewModel.isArabic - ? Radius.circular(0.0) - : Radius.circular(10.0), - topRight: projectViewModel.isArabic - ? Radius.circular(10.0) - : Radius.circular(0.0), + topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0), ), ), child: Center( @@ -106,12 +192,8 @@ class LabResultWidget extends StatelessWidget { decoration: BoxDecoration( color: Theme.of(context).primaryColor, borderRadius: BorderRadius.only( - topLeft: projectViewModel.isArabic - ? Radius.circular(10.0) - : Radius.circular(0.0), - topRight: projectViewModel.isArabic - ? Radius.circular(0.0) - : Radius.circular(10.0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0), + topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0), ), ), child: Center( @@ -144,7 +226,7 @@ class LabResultWidget extends StatelessWidget { color: Colors.white, child: Center( child: Texts( - lab.resultValue+" "+lab.uOM, + lab.resultValue + " " + lab.uOM, textAlign: TextAlign.center, ), ), @@ -168,7 +250,4 @@ class LabResultWidget extends StatelessWidget { }); return tableRow; } - } - - diff --git a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart index 7b49559c..4635d3fa 100644 --- a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart +++ b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart @@ -188,7 +188,7 @@ class _LaboratoryResultWidgetState extends State { .labResultLists[index] .patientLabResultList, ), - ) + ), ], ), ), @@ -252,7 +252,6 @@ class _LaboratoryResultWidgetState extends State { data: widget.details ?? TranslationBase.of(context).noDataAvailable, )), ), - ], ), ], diff --git a/lib/widgets/dialogs/confirm_dialog.dart b/lib/widgets/dialogs/confirm_dialog.dart index 02b208ad..76391322 100644 --- a/lib/widgets/dialogs/confirm_dialog.dart +++ b/lib/widgets/dialogs/confirm_dialog.dart @@ -28,6 +28,7 @@ class ConfirmDialog { child: Texts(this.cancelText), onPressed: () { Navigator.of(context).pop(); + cancelFunction(); }); Widget continueButton = FlatButton(child: Texts(okText), onPressed: okFunction); diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index e66b2eae..b4aed910 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -168,6 +168,8 @@ class MyInAppBrowser extends InAppBrowser { AuthenticatedUser authenticatedUser, InAppBrowser browser, bool isLiveCareAppo, + var servID, + var LiveServID, [var appoDate, var appoNo, var clinicID, @@ -186,6 +188,8 @@ class MyInAppBrowser extends InAppBrowser { patientID, authenticatedUser, isLiveCareAppo, + servID, + LiveServID, appoDate, appoNo, clinicID, @@ -233,13 +237,13 @@ class MyInAppBrowser extends InAppBrowser { dynamic patientID, AuthenticatedUser authUser, bool isLiveCareAppo, + var servID, + var LiveServID, [var appoDate, var appoNo, var clinicID, var doctorID, - var patientData, - var servID, - var LiveServID]) async { + var patientData]) async { getDeviceToken(); String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN'; String form = isLiveCareAppo ? getLiveCareForm() : getForm(); diff --git a/lib/widgets/mobile-no/mobile_no.dart b/lib/widgets/mobile-no/mobile_no.dart index 44162743..f449cdb8 100644 --- a/lib/widgets/mobile-no/mobile_no.dart +++ b/lib/widgets/mobile-no/mobile_no.dart @@ -128,7 +128,8 @@ class _MobileNo extends State { controller: widget.controller, keyboardType: TextInputType.number, maxLength: 10, - inputFormatters: [ + inputFormatters: + [ FilteringTextInputFormatter.allow(RegExp("[0-9]")), ], // maxLengthEnforced: true, diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart index 6a20ef3f..b99ac1dc 100644 --- a/lib/widgets/others/app_scaffold_widget.dart +++ b/lib/widgets/others/app_scaffold_widget.dart @@ -176,8 +176,8 @@ class AppBarWidget extends StatefulWidget with PreferredSizeWidget { Size get preferredSize => Size(double.maxFinite, 60); } +String _badgeText = "0"; class AppBarWidgetState extends State { - String badgeText = "0"; @override Widget build(BuildContext context) { widget.badgeUpdater = badgeUpdateBlock; @@ -186,7 +186,7 @@ class AppBarWidgetState extends State { badgeUpdateBlock(String value) { setState(() { - badgeText = value; + _badgeText = value; }); } @@ -220,7 +220,8 @@ class AppBarWidgetState extends State { (widget.isPharmacy && widget.showPharmacyCart) ? IconButton( icon: Badge( - badgeContent: Text(badgeText), + shape: BadgeShape.circle, + badgeContent: Text(_badgeText, style: TextStyle(color: Colors.white)), child: Icon(Icons.shopping_cart)), color: Colors.white, onPressed: () { @@ -232,7 +233,7 @@ class AppBarWidgetState extends State { icon: Badge( position: BadgePosition.topStart(top: -15, start: -10), badgeContent: Text( - badgeText, + _badgeText, style: TextStyle( fontSize: 9, color: Colors.white, diff --git a/lib/widgets/pharmacy/product_tile.dart b/lib/widgets/pharmacy/product_tile.dart index ee6c1d81..b6f73823 100644 --- a/lib/widgets/pharmacy/product_tile.dart +++ b/lib/widgets/pharmacy/product_tile.dart @@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:rating_bar/rating_bar.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; class productTile extends StatelessWidget { final String productName; @@ -23,23 +24,26 @@ class productTile extends StatelessWidget { final int status; final PharmacyProduct product; final dynamic productID; + final Function onDelete; +// final VoidCallback deleteWishlistItems; - productTile({ - this.productName, - this.productPrice, - this.productRate, - this.productReviews, - this.qyt, - this.totalPrice, - this.isOrderDetails = false, - this.productImage, - this.showLine = true, - this.img, - this.imgs, - this.status, - this.product, - this.productID, - }); + productTile( + {this.productName, + this.productPrice, + this.productRate, + this.productReviews, + this.qyt, + this.totalPrice, + this.isOrderDetails = false, + this.productImage, + this.showLine = true, + this.img, + this.imgs, + this.status, + this.product, + this.productID, + this.onDelete, + }); @override Widget build(BuildContext context) { @@ -136,7 +140,10 @@ class productTile extends StatelessWidget { IconButton( icon: Icon(FontAwesomeIcons.trashAlt, size: 15), onPressed: () { - deleteFromWishlistFunction(productID); + GifLoaderDialogUtils.showMyDialog(context); +// deleteFromWishlistFunction(productID); + onDelete(productID); + GifLoaderDialogUtils.hideDialog(context); }, ), SizedBox( @@ -145,7 +152,9 @@ class productTile extends StatelessWidget { IconButton( icon: Icon(FontAwesomeIcons.shoppingCart, size: 15), onPressed: () async { + GifLoaderDialogUtils.showMyDialog(context); await addToCartFunction(1, productID); + GifLoaderDialogUtils.hideDialog(context); Navigator.push( context, FadePage(page: CartOrderPage()), @@ -287,10 +296,10 @@ class productTile extends StatelessWidget { ); } - deleteFromWishlistFunction(itemID) async { - ProductDetailViewModel x = new ProductDetailViewModel(); - await x.deletWishlistData(itemID); - } +// deleteFromWishlistFunction(itemID) async { +// ProductDetailViewModel x = new ProductDetailViewModel(); +// await x.deletWishlistData(itemID); +// } addToCartFunction(quantity, itemID) async { ProductDetailViewModel x = new ProductDetailViewModel();