From 5f963b03272501aa98a234c942a123c80faccdab Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 18 Oct 2021 15:24:51 +0300 Subject: [PATCH 1/2] Translation updates, CMC, HHC & RRT APIs updates --- lib/config/config.dart | 10 + lib/config/localized_values.dart | 77 ++-- .../GetCMCAllOrdersResponseModel.dart | 349 ++++++++++++++++++ .../cmc_insert_pres_order_request_model.dart | 2 - .../get_cmc_service_response_model.dart | 48 +-- .../HHC_get_all_services_response_model.dart | 50 ++- .../PatientERHHCInsertServicesList.dart | 2 +- ...nt_er_insert_pres_order_request_model.dart | 11 +- .../AlHabibMedicalService/cmc_service.dart | 30 +- .../home_health_care_service.dart | 25 ++ lib/core/service/client/base_app_client.dart | 10 +- .../AlHabibMedicalService/cmc_view_model.dart | 12 +- .../home_health_care_view_model.dart | 8 +- lib/core/viewModels/er/rrt-view-model.dart | 17 +- .../NewCMC/new_cmc_page.dart | 4 +- .../NewCMC/new_cmc_step_three_page.dart | 5 +- .../orders_log_details_page.dart | 16 +- .../new_Home_health_care_step_one_page.dart | 99 +++-- .../new_Home_health_care_step_three_page.dart | 27 +- lib/pages/DrawerPages/family/my-family.dart | 39 +- .../rapid-response-team/rrt-place-order.dart | 26 +- .../MyAppointments/models/ArrivedButtons.dart | 4 +- lib/pages/ToDoList/widgets/paymentDialog.dart | 6 +- .../fragments/home_page_fragment2.dart | 10 +- .../medical/balance/my_balance_page.dart | 13 +- .../medical/medical_profile_page_new.dart | 4 +- .../rate_appointment_clinic.dart | 4 +- .../rate_appointment_doctor.dart | 5 +- lib/pages/settings/general_setting.dart | 30 +- lib/uitl/translations_delegate_base.dart | 18 + lib/uitl/utils.dart | 10 +- .../dialogs/ConfirmWithMessageDialog.dart | 6 +- lib/widgets/text/app_texts_widget.dart | 1 - 33 files changed, 727 insertions(+), 251 deletions(-) create mode 100644 lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index acb8d80a..aca487fe 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -438,9 +438,19 @@ 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'; + +// HHC RC SERVICES +const HHC_GET_ALL_SERVICES_RC = "rc/api/HHC/getallhhc"; +const ADD_HHC_ORDER_RC = "rc/api/HHC/add"; + // CMC RC SERVICES const GET_ALL_CMC_SERVICES_RC = 'rc/api/cmc/getallcmc'; const ADD_CMC_ORDER_RC = 'rc/api/cmc/add'; +const GET_ALL_CMC_ORDERS_RC = 'rc/api/cmc/list'; + + +// RRT RC SERVICES +const ADD_RRT_ORDER_RC = "rc/api/rrt/add"; //Pharmacy wishlist const GET_WISHLIST = "shopping_cart_items/"; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index c7a60f96..ad206724 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -105,13 +105,17 @@ const Map localizedValues = { 'add': {'en': 'Add', 'ar': 'إضافة'}, 'reminder': {'en': 'Reminder', 'ar': 'تذكير'}, 'location': {'en': 'Locations', 'ar': 'مواقعنا'}, - 'online': {'en': 'Online', 'ar': 'الالكترونية'}, + 'online': {'en': 'Online', 'ar': 'الالكتروني'}, 'payment': {'en': 'Payment', 'ar': 'الدفع'}, + + 'onlinePayment': {'en': 'Online', 'ar': 'الدفع'}, + 'onlinePaymentSubtitle': {'en': 'Payment', 'ar': 'الالكتروني'}, + 'cancel-nocaps': {'en': 'Cancel', 'ar': 'الغاء'}, 'set-reminder': {'en': 'Set Reminder', 'ar': 'إضافة تذكير'}, "national-id-number": {"en": "National ID Number", "ar": "رقم الهوية الوطنية / الاقامة"}, "medical-file-number": {"en": "Medical File Number", "ar": "رقم الملف الطبي"}, - 'login': {'en': 'Login', 'ar': 'تسجيل الدخول'}, + 'login': {'en': 'Login', 'ar': 'دخول'}, 'loginregister': {'en': 'Login / Register', 'ar': 'دخول/ تسجيل'}, 'poweredBy': {'en': 'Powered by', 'ar': 'مشغل بواسطة'}, "welcome": {"en": "Welcome", "ar": "مرحبا"}, @@ -312,20 +316,20 @@ const Map localizedValues = { "locationa": {"en": "location", "ar": "الموقع"}, "ambulancerequest": {"en": "Ambulance", "ar": "طلب نقل "}, "requestA": {"en": "Request", "ar": "اسعاف"}, - "MyAppointments": {"en": "My", "ar": "مواعيدي"}, "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"}, "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"}, "noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم يتم حضورها"}, - "MyAppointmentsList": {"en": "Appointments", "ar": "قائمة بمواعيدي"}, + "MyAppointmentsList": {"en": "Appointments", "ar": "بمواعيدي"}, + "MyAppointments": {"en": "My", "ar": "قائمة"}, "Radiology": {"en": "Radiology", "ar": "الأشعة"}, "RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"}, - "Lab": {"en": "Lab", "ar": "تحليل المختبر"}, - "LabSubtitle": {"en": "Result", "ar": "نتائج"}, + "Lab": {"en": "Lab", "ar": "نتائج"}, + "LabSubtitle": {"en": "Results", "ar": "تحليل المختبر"}, "Medicines": {"en": "Medicines", "ar": "الوصفات"}, - "MedicinesSubtitle": {"en": "Prescriptions", "ar": "الوصفات الطبية"}, - "VitalSigns": {"en": "Vital Signs", "ar": "المؤشرات الحيوية"}, - "VitalSignsSubTitle": {"en": "Reports", "ar": "قراءات"}, - "MyMedical": {"en": "Active", "ar": "قراءات"}, + "MedicinesSubtitle": {"en": "Prescriptions", "ar": "الطبية"}, + "VitalSigns": {"en": "Vital Signs", "ar": "المؤشرات"}, + "VitalSignsSubTitle": {"en": "Reports", "ar": "الحيوية"}, + "MyMedical": {"en": "Active", "ar": "الأدوية"}, "MyMedicalSubtitle": {"en": "Medications", "ar": "النشطة"}, "MyDoctor": {"en": "My Doctor", "ar": "اطبائي"}, "MyDoctorSubtitle": {"en": "List", "ar": "قمت بزيارتهم"}, @@ -333,26 +337,26 @@ const Map localizedValues = { "EyeSubtitle": {"en": "Measurement", "ar": "النظر"}, "Insurance": {"en": "Insurance", "ar": "بطاقات"}, "InsuranceSubtitle": {"en": "Card", "ar": "التأمين"}, - "UpdateInsurance": {"en": "Update Insurance", "ar": "تحديث التأمين"}, - "UpdateInsuranceSubtitle": {"en": "Card", "ar": "التأمين"}, - "InsuranceApproval": {"en": "Insurance Approval", "ar": "موافقات"}, - "InsuranceApprovalSubtitle": {"en": "Approvals", "ar": "موافقات التأمين"}, - "Allergies": {"en": "Allergies", "ar": "الحساسية"}, - "AllergiesSubtitle": {"en": "Diagnosed", "ar": "مسجلة"}, - "MyVaccines": {"en": "My Vaccines", "ar": "تطعيماتي"}, - "MyVaccinesSubtitle": {"en": "List", "ar": "قائمة"}, + "UpdateInsurance": {"en": "Update", "ar": "تحديث"}, + "UpdateInsuranceSubtitle": {"en": "Insurance", "ar": "التأمين"}, + "InsuranceApproval": {"en": "Insurance", "ar": "موافقات"}, + "InsuranceApprovalSubtitle": {"en": "Approvals", "ar": "التأمين"}, + "Allergies": {"en": "Allergies", "ar": "قائمة"}, + "AllergiesSubtitle": {"en": "List", "ar": "الحساسية"}, + "MyVaccines": {"en": "My Vaccines", "ar": "قائمة"}, + "MyVaccinesSubtitle": {"en": "List", "ar": "تطعيماتي"}, "Medical": {"en": "Medical", "ar": "التقارير"}, "MedicalSubtitle": {"en": "Report", "ar": "الطبية"}, - "Monthly": {"en": "Monthly", "ar": "تقارير"}, + "Monthly": {"en": "Monthly", "ar": "التقارير"}, "MonthlySubtitle": {"en": "Report", "ar": "الشهرية"}, "Sick": {"en": "Sick", "ar": "الإجازات"}, "SickSubtitle": {"en": "Leaves", "ar": "المرضية"}, - "MyBalance": {"en": "My Balance", "ar": "رصيدي"}, - "MyBalanceSubtitle": {"en": "Credit", "ar": "المبالغ"}, + "MyBalance": {"en": "My Balance", "ar": "رصيد"}, + "MyBalanceSubtitle": {"en": "Credit", "ar": "محفظتي"}, "PatientCall": {"en": "Patient Call", "ar": "النداء للموعد"}, "PatientCallSubtitle": {"en": "Service", "ar": "خدمة"}, "SmartWatches": {"en": "Smart Watches", "ar": "الساعات الذكية"}, - "SmartWatchesSubtitle": {"en": "Pairing", "ar": "ربط البيانات"}, + "SmartWatchesSubtitle": {"en": "Pairing", "ar": "ربط بيانات"}, "MyTrackers": {"en": "My Trackers", "ar": "تتبع قراءاتي"}, "MyTrackersSubtitle": {"en": "Service", "ar": "الطبية"}, "AskYour": {"en": "Ask Your", "ar": "إسال طبيبك"}, @@ -395,11 +399,11 @@ const Map localizedValues = { "MyBalances": {"en": "My Balances", "ar": "رصيدي"}, "BalanceAmount": {"en": "Wallet Amount", "ar": "مبلغ المحفظة"}, "TotalBalance": {"en": "Total Amount", "ar": "المبلغ الإجمالي"}, - "CreateAdvancedPayment": {"en": "Recharge Wallet", "ar": "إعادة شحن المحفظة"}, + "CreateAdvancedPayment": {"en": "Recharge Wallet", "ar": "شحن المحفظة"}, "AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"}, "AdvancePaymentLabel": {"en": "You can create and add an Advanced Payment for your account or other accounts.", "ar": "يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين"}, "FileNumber": {"en": "File Number", "ar": "رقم الملف"}, - "Amount": {"en": "Amount *", "ar": "الكمية *"}, + "Amount": {"en": "Amount *", "ar": "المبلغ *"}, "DepositorEmail": {"en": "Depositor Email *", "ar": "البريد الإلكتروني للمودع *"}, "Notes": {"en": "Notes", "ar": "ملاحظات"}, "SelectPatientName": {"en": "Select Patient Name", "ar": "اختر اسم المريض"}, @@ -414,7 +418,7 @@ const Map localizedValues = { "MobileNumber": {"en": "Mobile Number", "ar": "رقم الجوال"}, "phone-number": {"en": "Phone Number", "ar": "رقم الجوال"}, "country": {"en": "Country", "ar": "دولة"}, - "Ok": {"en": "Ok", "ar": "حسنا"}, + "Ok": {"en": "Ok", "ar": "موافق"}, "averageWaitingTime": {"en": "Average Waiting Time:", "ar": "متوسط ​​وقت الانتظار:"}, "WaterConsumedInWeek": {"en": "Water consumed in a week", "ar": "معدل شرب الماء خلال الاسبوع"}, "WaterConsumedInMonth": {"en": "Water consumed in a month", "ar": "معدل شرب الماء خلال الشهر"}, @@ -508,13 +512,13 @@ const Map localizedValues = { "review": {"en": " reviews", "ar": "تقييمات"}, "viewMedicalFile": {"en": "View Details", "ar": "عرض الملف الطبي"}, "viewAllServices": {"en": "View All Services", "ar": "عرض جميع الخدمات"}, - "medicalFile": {"en": "Medical File", "ar": "ملف طبي"}, + "medicalFile": {"en": "Medical File", "ar": "ملفي الطبي"}, "verified": {"en": "Verified", "ar": "تم التحقق"}, "checkup": {"en": "Checkup", "ar": "فحص"}, "hhcHome": {"en": "Home", "ar": "الرعاية"}, "refferal": {"en": "E-Refferal", "ar": "الإحالة الإلكترونية"}, "healthCare": {"en": "Health Care", "ar": "الصحية المزلية"}, - "emergency": {"en": "Emergency", "ar": "طارئ"}, + "emergency": {"en": "Emergency", "ar": "الطوارئ"}, "cantSeeProfile": {"en": "Can’t see your medical File?", "ar": "لا تستطيع رؤية ملفك الطبي؟"}, "loginRegisterNow": {"en": "Login or Register Now", "ar": "تسجيل الدخول أو التسجيل الآن"}, "HMGPharmacy": {"en": "HMG Pharmacy", "ar": "صيدلية HMG"}, @@ -766,7 +770,7 @@ const Map localizedValues = { "ResendOrder": {"en": "Refill Order & Delivery", "ar": "إعادة طلب و توصيل"}, "Ports": {"en": "Ports", "ar": "المنافذ"}, "Way": {"en": "Way", "ar": "الطريقة"}, - "Average": {"en": "Average", "ar": "المعدل"}, + "Average": {"en": "Average", "ar": "متوسط"}, "DailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"}, "Period": {"en": "Period", "ar": "الفترة"}, "duration": {"en": "Duration", "ar": "المدة"}, @@ -835,8 +839,8 @@ const Map localizedValues = { "report": {"en": "Radiology Report", "ar": "تقرير الاشعة"}, "open-rad": {"en": "Open Image", "ar": "فتح صور الاشعة"}, "send-copy": {"en": "Email the Report", "ar": "أرسل التقرير"}, - "appoSurvey": {"en": "Survey", "ar": "إستبيان"}, - "appoSurveySubtitle": {"en": "Survey", "ar": "إستبيان"}, + "appoSurvey": {"en": "Survey", "ar": "الاستبيان"}, + "appoSurveySubtitle": {"en": "Survey", "ar": "الاستبيان"}, "labResults": {"en": "Lab Results", "ar": "نتيجة المختبر"}, "doctorRating": {"en": "Doctor Rating", "ar": "تقييم الطبيب"}, "good": {"en": "Good", "ar": "جيد"}, @@ -1357,8 +1361,8 @@ const Map localizedValues = { "en": "This service allows you to make an online virtual consultation via video call directly with the doctor from anywhere at any time.", "ar": "تتيح لك هذه الخدمة إجراء استشارة عبر مكالمة فيديو مباشرة مع الطبيب من أي مكان وفي أي وقت" }, - "my-invoice": {"en": "My Invoice", "ar": "فواتيري"}, - "invoice-list": {"en": "Invoices List", "ar": "فائمة الفواتير"}, + "my-invoice": {"en": "List", "ar": "فواتيري"}, + "invoice-list": {"en": "My Invoice", "ar": "فائمة"}, "thisItemIsNotAvailable": {"en": "This item is not available", "ar": "هذا العنصر غير متوفر"}, "beforeAfterImages": {"en": "Before & After Images", "ar": "الصور قبل وبعد"}, "clinic-accept-livecare": { @@ -1499,7 +1503,7 @@ const Map localizedValues = { "selectSlot": {"en": "Please select Time Slot to continue", "ar": "الرجاء تحديد فترة زمنية للمتابعة"}, "years": {"en": "Years", "ar": "سنوات"}, "respirationBPM": {"en": "bpm", "ar": "نفس"}, - "extremeObese": {"en": "Extreme Obese", "ar": "السمنة المفرطة"}, + "extremeObese": {"en": "Extreme Obese", "ar": "سمنة مفرطة"}, "invoiceDetails": {"en": "Invoice Details", "ar": "تفاصيل الفاتورة"}, "appoDetails": {"en": "Appointment Details", "ar": "تفاصيل الموعد"}, "appoPaymentConfirm": {"en": "Are you sure you Want to make payment for this appointment?", "ar": "هل أنت متأكد من أنك تريد سداد هذا الموعد؟"}, @@ -1522,4 +1526,11 @@ const Map localizedValues = { "OtherInfo": {"en": "Other Info", "ar": "معلومات اخرى"}, "inPrgress": {"en": "In Progress", "ar": "في تقدم"}, "locked": {"en": "Locked", "ar": "مقفل"}, + "cmcTitle": {"en": "Comprehensive", "ar": "خدمة"}, + "cmcSubtitle": {"en": "Medical Checkup", "ar": "الفحص الشامل"}, + "emergencyTitle": {"en": "Emergency", "ar": "خدمات"}, + "emergencySubtitle": {"en": "Services", "ar": "الطوارئ"}, + "ereferralTitle": {"en": "E-Referral", "ar": "خدمة"}, + "ereferralSubtitle": {"en": "Service", "ar": "الإحالة الإلكترونية"}, + "medicalFileTitle": {"en": "Medical File", 'ar': 'الملف الطبي'}, }; diff --git a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart new file mode 100644 index 00000000..6e7638f9 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart @@ -0,0 +1,349 @@ +class GetCMCAllOrdersResponseModel { + int iD; + int patientId; + int patientOutSa; + bool isOutPatient; + int projectId; + int nearestProjectId; + double longitude; + double 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; + String statusText; + int paymentStatus; + dynamic clientRequestid; + dynamic paymentStatusText; + String projectName; + String nearestProjectName; + int 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; + Null orderHistory; + List procedures; + dynamic pickupLocation; + dynamic dropOffLocation; + dynamic clinicName; + dynamic doctorName; + dynamic branch; + dynamic time; + dynamic notes; + + GetCMCAllOrdersResponseModel( + {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, + 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.procedures, + this.pickupLocation, + this.dropOffLocation, + this.clinicName, + this.doctorName, + this.branch, + this.time, + this.notes}); + + GetCMCAllOrdersResponseModel.fromJson(Map json) { + 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']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + 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; + 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; + return data; + } +} + +class Orderpayment { + int iD; + int orderId; + dynamic clientRequestId; + int 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; + } +} + +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; + } +} diff --git a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart index 8cece1f5..7c621f35 100644 --- a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart +++ b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart @@ -73,12 +73,10 @@ class CMCInsertPresOrderRequestModel { data['LanguageID'] = this.languageID; data['IPAdress'] = this.iPAdress; data['generalid'] = this.generalid; - data['patientOutSa'] = this.patientOutSA; data['isOutPatient'] = this.patientOutSA == 0 ? false : true; data['SessionID'] = this.sessionID; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['DeviceTypeID'] = this.deviceTypeID; - data['patientId'] = this.patientID.toString(); data['TokenID'] = this.tokenID; data['PatientTypeID'] = this.patientTypeID; data['PatientType'] = this.patientType; diff --git a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart index 42d2fb99..335366cd 100644 --- a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart +++ b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart @@ -1,5 +1,5 @@ class GetCMCServicesResponseModel { - int id; + int iD; String serviceID; int orderServiceID; String text; @@ -12,7 +12,7 @@ class GetCMCServicesResponseModel { int quantity; GetCMCServicesResponseModel( - {this.id, + {this.iD, this.serviceID, this.orderServiceID, this.text, @@ -25,32 +25,32 @@ class GetCMCServicesResponseModel { this.quantity}); GetCMCServicesResponseModel.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']; + 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['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; + 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; } } diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart index e2f39733..bc5c4b97 100644 --- a/lib/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart @@ -1,32 +1,56 @@ class HHCGetAllServicesResponseModel { int iD; - int serviceID; - String description; - String descriptionN; - bool isActive; + String serviceID; + int orderServiceID; + String text; + String textN; + dynamic price; + dynamic priceVAT; + dynamic priceTotal; + bool isEnabled; + int orderId; + int quantity; HHCGetAllServicesResponseModel( {this.iD, this.serviceID, - this.description, - this.descriptionN, - this.isActive}); + this.orderServiceID, + this.text, + this.textN, + this.price, + this.priceVAT, + this.priceTotal, + this.isEnabled, + this.orderId, + this.quantity}); HHCGetAllServicesResponseModel.fromJson(Map json) { iD = json['ID']; serviceID = json['ServiceID']; - description = json['Description']; - descriptionN = json['DescriptionN']; - isActive = json['IsActive']; + 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['ServiceID'] = this.serviceID; - data['Description'] = this.description; - data['DescriptionN'] = this.descriptionN; - data['IsActive'] = this.isActive; + 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; } } diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart index bc5a4ddf..0fe85c6a 100644 --- a/lib/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart @@ -16,7 +16,7 @@ class PatientERHHCInsertServicesList { Map toJson() { final Map data = new Map(); data['RecordID'] = this.recordID; - data['ServiceID'] = this.serviceID; + data['ServiceID'] = this.serviceID.toString(); data['ServiceName'] = this.serviceName; return data; } diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart index 6987ee44..bc57a88f 100644 --- a/lib/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart @@ -76,7 +76,8 @@ class PatientERInsertPresOrderRequestModel { data['LanguageID'] = this.languageID; data['IPAdress'] = this.iPAdress; data['generalid'] = this.generalid; - data['PatientOutSA'] = this.patientOutSA; + data['isOutPatient'] = this.patientOutSA == 0 ? false : true; + // data['PatientOutSA'] = this.patientOutSA; data['SessionID'] = this.sessionID; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['DeviceTypeID'] = this.deviceTypeID; @@ -84,12 +85,12 @@ class PatientERInsertPresOrderRequestModel { data['TokenID'] = this.tokenID; data['PatientTypeID'] = this.patientTypeID; data['PatientType'] = this.patientType; - data['Latitude'] = this.latitude; - data['Longitude'] = this.longitude; - data['CreatedBy'] = this.createdBy; + data['latitude'] = this.latitude; + data['longitude'] = this.longitude; + // data['CreatedBy'] = this.createdBy; data['OrderServiceID'] = this.orderServiceID; if (this.patientERHHCInsertServicesList != null) { - data['PatientER_HHC_InsertServicesList'] = + data['procedures'] = this.patientERHHCInsertServicesList.map((v) => v.toJson()).toList(); } return data; diff --git a/lib/core/service/AlHabibMedicalService/cmc_service.dart b/lib/core/service/AlHabibMedicalService/cmc_service.dart index b79b6fdb..53686715 100644 --- a/lib/core/service/AlHabibMedicalService/cmc_service.dart +++ b/lib/core/service/AlHabibMedicalService/cmc_service.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; @@ -15,7 +16,7 @@ import '../base_service.dart'; class CMCService extends BaseService { List cmcAllServicesList = List(); - List cmcAllPresOrdersList = List(); + List cmcAllPresOrdersList = List(); List cmcAllOrderDetail = List(); List checkupItemsList = List(); @@ -30,7 +31,7 @@ class CMCService extends BaseService { // RC IMPLEMENTATION await baseAppClient.post(GET_ALL_CMC_SERVICES_RC + "?patientID=" + user.patientID.toString(), isAllowAny: true, onSuccess: (dynamic response, int statusCode) { cmcAllServicesList.clear(); - response.forEach((data) { + response['response'].forEach((data) { cmcAllServicesList.add(GetCMCServicesResponseModel.fromJson(data)); }); }, onFailure: (String error, int statusCode) { @@ -55,9 +56,30 @@ class CMCService extends BaseService { await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, onSuccess: (dynamic response, int statusCode) { cmcAllPresOrdersList.clear(); cmcAllOrderDetail.clear(); - response['PatientER_GetPatientAllPresOrdersList'].forEach((data) { - if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService()) cmcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data)); + + response['response'].forEach((data) { + if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService()) cmcAllPresOrdersList.add(GetCMCAllOrdersResponseModel.fromJson(data)); }); + + // response['PatientER_GetPatientAllPresOrdersList'].forEach((data) { + // if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService()) cmcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data)); + // }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getHHCAllPresOrdersRequestModel.toJson()); + } + + Future getCmcAllPresOrdersRC() async { + GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel = GetHHCAllPresOrdersRequestModel(); + hasError = false; + await baseAppClient.post(GET_ALL_CMC_ORDERS_RC, onSuccess: (dynamic response, int statusCode) { + cmcAllPresOrdersList.clear(); + cmcAllOrderDetail.clear(); + + // response['PatientER_GetPatientAllPresOrdersList'].forEach((data) { + // if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService()) cmcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data)); + // }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart index 5c0b13f4..9643a773 100644 --- a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart +++ b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart @@ -21,6 +21,7 @@ class HomeHealthCareService extends BaseService { bool isOrderUpdated; CustomerInfo customerInfo; int requestNo; + Future getHHCAllServices(HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel) async { hasError = false; await baseAppClient.post(HHC_GET_ALL_SERVICES, onSuccess: (dynamic response, int statusCode) { @@ -34,6 +35,19 @@ class HomeHealthCareService extends BaseService { }, body: hHCGetAllServicesRequestModel.toJson()); } + Future getHHCAllServicesRC(HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel) async { + hasError = false; + await baseAppClient.post(HHC_GET_ALL_SERVICES_RC + "?PatientID=" + user.patientID.toString(), onSuccess: (dynamic response, int statusCode) { + hhcAllServicesList.clear(); + response['response'].forEach((data) { + hhcAllServicesList.add(HHCGetAllServicesResponseModel.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: hHCGetAllServicesRequestModel.toJson()); + } + Future getHHCAllPresOrders() async { GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel = GetHHCAllPresOrdersRequestModel(); hasError = false; @@ -84,4 +98,15 @@ class HomeHealthCareService extends BaseService { super.error = error; }, body: order.toJson()); } + + Future insertHHCOrderRC({PatientERInsertPresOrderRequestModel order}) async { + hasError = false; + await baseAppClient.post(ADD_HHC_ORDER_RC, onSuccess: (dynamic response, int statusCode) { + hhcResponse = response; + requestNo = response["response"]; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: order.toJson()); + } } diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index ac96e35e..deee0644 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -162,12 +162,12 @@ class BaseAppClient { } else if (parsed['Result'] == 'OK') { onSuccess(parsed, statusCode); } else { - if (parsed != null) { - onSuccess(parsed, statusCode); - } else { + // if (parsed != null) { + // onSuccess(parsed, statusCode); + // } else { onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); - logout(); - } + // logout(); + // } } } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { onSuccess(parsed, statusCode); diff --git a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart index 8080ddec..375df83d 100644 --- a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; @@ -24,7 +25,7 @@ class CMCViewModel extends BaseViewModel { List get cmcAllServicesList => _cMCService.cmcAllServicesList; - List get cmcAllPresOrders => _cMCService.cmcAllPresOrdersList; + List get cmcAllPresOrders => _cMCService.cmcAllPresOrdersList; List get cmcAllOrderDetail => _cMCService.cmcAllOrderDetail; @@ -32,7 +33,7 @@ class CMCViewModel extends BaseViewModel { PharmacyModuleService _pharmacyModuleService = locator(); - GetHHCAllPresOrdersResponseModel pendingOrder; + GetCMCAllOrdersResponseModel pendingOrder; bool get isOrderUpdated => _cMCService.isOrderUpdated; @@ -58,12 +59,13 @@ class CMCViewModel extends BaseViewModel { Future getCmcAllPresOrders() async { setState(ViewState.Busy); - await _cMCService.getCmcAllPresOrders(); + // await _cMCService.getCmcAllPresOrders(); + await _cMCService.getCmcAllPresOrdersRC(); if (_cMCService.hasError) { error = _cMCService.error; setState(ViewState.Error); } else { - pendingOrder = _cMCService.cmcAllPresOrdersList.firstWhere((element) => element.status == 1 || element.status == 2, orElse: () => null); + pendingOrder = _cMCService.cmcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => null); if (pendingOrder != null) { await getOrderDetailByOrderID(pendingOrder); setState(ViewState.Idle); @@ -84,7 +86,7 @@ class CMCViewModel extends BaseViewModel { } } - Future getOrderDetailByOrderID(GetHHCAllPresOrdersResponseModel order) async { + Future getOrderDetailByOrderID(GetCMCAllOrdersResponseModel order) async { GetOrderDetailByOrderIDRequestModel getOrderDetailByOrderIDRequestModel = GetOrderDetailByOrderIDRequestModel(presOrderID: order.iD); await _cMCService.getOrderDetailByOrderID(getOrderDetailByOrderIDRequestModel); } diff --git a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart index 91465b11..7e45dc92 100644 --- a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart @@ -37,10 +37,11 @@ class HomeHealthCareViewModel extends BaseViewModel { List patientERHHCInsertServicesList = List(); dynamic get hhcResponse => _homeHealthCareService.hhcResponse; + Future getHHCAllServices() async { HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel = new HHCGetAllServicesRequestModel(); - //setState(ViewState.Busy); - await _homeHealthCareService.getHHCAllServices(hHCGetAllServicesRequestModel); + // await _homeHealthCareService.getHHCAllServices(hHCGetAllServicesRequestModel); + await _homeHealthCareService.getHHCAllServicesRC(hHCGetAllServicesRequestModel); if (_homeHealthCareService.hasError) { error = _homeHealthCareService.error; setState(ViewState.Error); @@ -82,7 +83,8 @@ class HomeHealthCareViewModel extends BaseViewModel { setState(ViewState.Busy); order.createdBy = user.patientID; order.orderServiceID = OrderService.HOME_HEALTH_CARE.getIdOrderService(); - await _homeHealthCareService.insertPresPresOrder(order: order); + // await _homeHealthCareService.insertPresPresOrder(order: order); + await _homeHealthCareService.insertHHCOrderRC(order: order); if (_homeHealthCareService.hasError) { error = _homeHealthCareService.error; setState(ViewState.ErrorLocal); diff --git a/lib/core/viewModels/er/rrt-view-model.dart b/lib/core/viewModels/er/rrt-view-model.dart index 19179313..83732ebd 100644 --- a/lib/core/viewModels/er/rrt-view-model.dart +++ b/lib/core/viewModels/er/rrt-view-model.dart @@ -43,9 +43,7 @@ class RRTViewModel extends BaseViewModel { body['NationalityID'] = user.nationalityID; body['CreatedBy'] = user.patientIdentificationType; body['OrderServiceID'] = 5; - var localRes; - int requestNo; await _service.baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, body: body, onSuccess: (response, statusCode) { requestNo = response['RequestNo']; @@ -55,6 +53,21 @@ class RRTViewModel extends BaseViewModel { return requestNo; } + Future createOrderRC(Map body) async { + // body['IdentificationNo'] = user.patientIdentificationNo; + // body['NationalityID'] = user.nationalityID; + // body['CreatedBy'] = user.patientIdentificationType; + // body['OrderServiceID'] = 5; + var localRes; + int requestNo; + await _service.baseAppClient.post(ADD_RRT_ORDER_RC, body: body, onSuccess: (response, statusCode) { + requestNo = response['response']; + }, onFailure: (error, statusCode) { + AppToast.showErrorToast(message: error); + }); + return requestNo; + } + // Service ID: 4 == RRT Future<_RRTServiceData> getAllOrders() async { await _service.baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, body: {}, onSuccess: (response, statusCode) { diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart index 5093729c..dbaa86f7 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart @@ -108,6 +108,7 @@ class _NewCMCPageState extends State with TickerProviderStateMixin { )); } + // ' ' + return Scaffold( body: SafeArea( child: Container( @@ -148,8 +149,7 @@ class _NewCMCPageState extends State with TickerProviderStateMixin { children: [ Text( // TranslationBase.of(context).OrderStatus + - // ' ' + - (projectViewModel.isArabic ? widget.model.pendingOrder.descriptionN : widget.model.pendingOrder.description), + widget.model.pendingOrder.statusText, style: TextStyle( fontSize: 12, letterSpacing: -0.48, diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart index a1b7ccee..5869b7f4 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart @@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_v import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart'; import 'package:diplomaticquarterapp/theme/colors.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/uitl/utils_new.dart'; @@ -214,7 +215,9 @@ class _NewCMCStepThreePageState extends State { Navigator.pop(context); }, ); - } else {} + } else { + AppToast.showErrorToast(message: widget.model.error); + } }, textColor: Theme.of(context).backgroundColor), ), diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart index ac0a8599..a7c12e2d 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; @@ -28,7 +29,7 @@ class OrdersLogDetailsPage extends StatelessWidget { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - void showConfirmMessage(CMCViewModel model, GetHHCAllPresOrdersResponseModel order) { + void showConfirmMessage(CMCViewModel model, GetCMCAllOrdersResponseModel order) { showDialog( context: context, child: ConfirmWithMessageDialog( @@ -89,10 +90,10 @@ class OrdersLogDetailsPage extends StatelessWidget { padding: EdgeInsets.all(21), physics: BouncingScrollPhysics(), itemBuilder: (context, index) { - GetHHCAllPresOrdersResponseModel order = model.cmcAllPresOrders[index]; + GetCMCAllOrdersResponseModel order = model.cmcAllPresOrders[index]; - int status = order.status; - String _statusDisp = projectViewModel.isArabic ? order.descriptionN : order.description; + int status = order.statusId; + String _statusDisp = order.statusText; Color _color; if (status == 1) { //pending @@ -162,7 +163,8 @@ class OrdersLogDetailsPage extends StatelessWidget { ), Expanded( child: Text( - !projectViewModel.isArabic ? order.nearestProjectDescription.trim().toString() : order.nearestProjectDescriptionN.toString(), + // !projectViewModel.isArabic ? order.nearestProjectDescription.trim().toString() : order.nearestProjectDescriptionN.toString(), + order.projectName.trim().toString(), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), ), ), @@ -176,11 +178,11 @@ class OrdersLogDetailsPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)), + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.created)), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), ), SizedBox(height: 12), - if (order.status == 1 || order.status == 2) + if (order.statusId == 1 || order.statusId == 2) InkWell( onTap: () { showConfirmMessage(model, order); diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart index b429ca4a..9797c384 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart @@ -7,9 +7,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.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/buttons/defaultButton.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'; @@ -46,57 +44,57 @@ class _NewHomeHealthCareStepOnePageState extends State Divider( - height: 1, - color: Color(0xffE5E5E5), - ), - itemCount: widget.model.hhcAllServicesList.length), - ), + ), + ], + ), + ); + }, + separatorBuilder: (context, index) => Divider( + height: 1, + color: Color(0xffE5E5E5), + ), + itemCount: widget.model.hhcAllServicesList.length), Container( color: Colors.white, - padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + padding: EdgeInsets.only(top: 0, bottom: 16, right: 21, left: 21), + margin: EdgeInsets.only(top: 50.0), child: DefaultButton( TranslationBase.of(context).next, (this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0 || widget.model.state == ViewState.BusyLocal) @@ -104,9 +102,6 @@ class _NewHomeHealthCareStepOnePageState extends State Utils.route(route, equalsTo: HomeHealthCarePage)); - Navigator.push(context, FadePage(page: HomeHealthCarePage())); - }, - ); + if (widget.model.state != ViewState.ErrorLocal) { + if (widget.model.orderId != null) { + showCMCConfirmDialog( + context, + widget.model.orderId.toString(), + onClick: () { + Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: HomeHealthCarePage)); + Navigator.push(context, FadePage(page: HomeHealthCarePage())); + }, + ); + } + } else { + AppToast.showErrorToast(message: widget.model.error); } }); }, diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index ba8d971e..0f92e285 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -145,7 +145,7 @@ class _MyFamily extends State with TickerProviderStateMixin { Widget myFamilyDetails(context) { return Container( - margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 0.0), + margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), child: Column( children: [ Expanded( @@ -165,12 +165,12 @@ class _MyFamily extends State with TickerProviderStateMixin { snapshot.data.getAllSharedRecordsByStatusList[index].gender = 2; if (snapshot.data.getAllSharedRecordsByStatusList[index].status == 3) return Card( - margin: EdgeInsets.all(10), - shape: cardRadius(25), - color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0xff6EA8FF) : Color(0xffFDA4B0), - elevation: 3, + margin: EdgeInsets.all(5), + shape: cardRadius(15), + color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0xffFDA4B0) : Color(0xff6EA8FF), + elevation: 0.0, child: Container( - // height: 130, + // height: 130,0xffFDA4B0 width: MediaQuery.of(context).size.width, padding: EdgeInsets.all(10), child: Row( @@ -211,7 +211,7 @@ class _MyFamily extends State with TickerProviderStateMixin { mainAxisAlignment: MainAxisAlignment.center, children: [ SvgPicture.asset("assets/images/new-design/switch.svg", - height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Colors.white : Color(0Xff5A282E)), + height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white), SizedBox( width: 5, ), @@ -225,9 +225,9 @@ class _MyFamily extends State with TickerProviderStateMixin { // }, // ), Texts(TranslationBase.of(context).switchUser, - color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Colors.white : Color(0Xff5A282E), + color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white, fontSize: 12, - fontWeight: FontWeight.bold) + fontWeight: FontWeight.w600) ], ))), SizedBox( @@ -244,14 +244,14 @@ class _MyFamily extends State with TickerProviderStateMixin { mainAxisAlignment: MainAxisAlignment.center, children: [ SvgPicture.asset("assets/images/new-design/delete.svg", - height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Colors.white : Color(0Xff5A282E)), + height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white), SizedBox( width: 5, ), Texts(TranslationBase.of(context).delete, - color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Colors.white : Color(0Xff5A282E), + color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white, fontSize: 12, - fontWeight: FontWeight.bold), + fontWeight: FontWeight.w600), ], ))), SizedBox(height: 10), @@ -334,7 +334,10 @@ class _MyFamily extends State with TickerProviderStateMixin { Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow, fontWeight: FontWeight.w600)), Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject, fontWeight: FontWeight.w600)), ])), - Divider(color: Colors.black, height: 1.5, thickness: 1.5), + Padding( + padding: const EdgeInsets.only(left: 10.0, right: 10.0), + child: Divider(color: Colors.black, height: 1.5, thickness: 1.5), + ), Column( children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map((result) { return Container( @@ -500,7 +503,10 @@ class _MyFamily extends State with TickerProviderStateMixin { Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)), Expanded(flex: 1, child: AppText(TranslationBase.of(context).status, fontWeight: FontWeight.w600)) ])), - Divider(color: Colors.black, height: 1.5, thickness: 1.5), + Padding( + padding: const EdgeInsets.only(left: 10.0, right: 10.0), + child: Divider(color: Colors.black, height: 1.5, thickness: 1.5), + ), Column( children: snapshot.data.getAllSharedRecordsByStatusList.map((result) { return Padding( @@ -591,7 +597,10 @@ class _MyFamily extends State with TickerProviderStateMixin { textAlign: TextAlign.center, )), ])), - Divider(color: Colors.black, height: 1.5, thickness: 1.5), + Padding( + padding: const EdgeInsets.only(left: 10.0, right: 10.0), + child: Divider(color: Colors.black, height: 1.5, thickness: 1.5), + ), Column( children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map((result) { return Padding( diff --git a/lib/pages/ErService/rapid-response-team/rrt-place-order.dart b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart index ea72c75d..4e863bd1 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-place-order.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart @@ -1,9 +1,10 @@ -import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart'; -import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; @@ -12,11 +13,10 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:provider/provider.dart'; class RRTPlaceOrderPage extends StatelessWidget { TranslationBase localize; @@ -29,8 +29,11 @@ class RRTPlaceOrderPage extends StatelessWidget { TextEditingController noteController = TextEditingController(text: ''); BuildContext _context; + ProjectViewModel projectViewModel; + @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); _context = context; localize = TranslationBase.of(context); var lat = selectedAddress.latLong.split(',').first; @@ -171,11 +174,16 @@ class RRTPlaceOrderPage extends StatelessWidget { Map params = {}; var cordinates = selectedAddress.latLong.split(','); var latlng = LatLng(double.parse(cordinates.first), double.parse(cordinates.last)); - params['Latitude'] = latlng.latitude; - params['Longitude'] = latlng.longitude; - params['Notes'] = noteController.text; + params['latitude'] = latlng.latitude; + params['longitude'] = latlng.longitude; + params['additionalDetails'] = noteController.text; + params['nationality'] = projectViewModel.user.nationalityID; + params['paymentAmount'] = servicePrice.totalPrice; + // var response = await viewModel.createOrder(params); - var requestId = await viewModel.createOrder(params); + // var requestId = await viewModel.createOrder(params); + + var requestId = await viewModel.createOrderRC(params); GifLoaderDialogUtils.hideDialog(_context); diff --git a/lib/pages/MyAppointments/models/ArrivedButtons.dart b/lib/pages/MyAppointments/models/ArrivedButtons.dart index e8856ddb..5cac41dd 100644 --- a/lib/pages/MyAppointments/models/ArrivedButtons.dart +++ b/lib/pages/MyAppointments/models/ArrivedButtons.dart @@ -46,8 +46,8 @@ class ArrivedButtons { "caller": "askDoc", }, { - "title": TranslationBase.of(AppGlobal.context).appoSurvey, - "subtitle": TranslationBase.of(AppGlobal.context).service, + "title": TranslationBase.of(AppGlobal.context).service, + "subtitle": TranslationBase.of(AppGlobal.context).appoSurvey, "icon": "survey.svg", "caller": "Survey", } diff --git a/lib/pages/ToDoList/widgets/paymentDialog.dart b/lib/pages/ToDoList/widgets/paymentDialog.dart index 7c1bf6ed..eedbb874 100644 --- a/lib/pages/ToDoList/widgets/paymentDialog.dart +++ b/lib/pages/ToDoList/widgets/paymentDialog.dart @@ -93,8 +93,8 @@ class _PaymentDialogState extends State { () { Navigator.pop(context, null); }, - color: Color(0xffEAEAEA), - textColor: Colors.black, + color: CustomColors.accentColor, + textColor: Colors.white, ), ), mWidth(10.0), @@ -104,6 +104,8 @@ class _PaymentDialogState extends State { () { Navigator.pop(context, widget.patientShareResponse); }, + color: CustomColors.green, + textColor: Colors.white, ), ), ], diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index c6807ebb..88b77f70 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -53,13 +53,13 @@ class _HomePageFragment2State extends State { hmgServices.clear(); hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin)); - hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); + hmgServices.add(new HmgServices(2, TranslationBase.of(context).onlinePayment, TranslationBase.of(context).onlinePaymentSubtitle, "assets/images/new/paymentMethods.png", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); - hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); - hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergency, TranslationBase.of(context).services2, "assets/images/new/emergency.svg", isLogin)); - hmgServices.add(new HmgServices(6, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Referral.svg", isLogin)); + hmgServices.add(new HmgServices(4, TranslationBase.of(context).cmcTitle, TranslationBase.of(context).cmcSubtitle, "assets/images/new/comprehensive_checkup.svg", isLogin)); + hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); - hmgServices.add(new HmgServices(8, TranslationBase.of(context).reachUs, TranslationBase.of(context).findUs, "assets/images/new/reach_us.svg", isLogin)); + hmgServices.add(new HmgServices(8, TranslationBase.of(context).findUs, TranslationBase.of(context).reachUs, "assets/images/new/reach_us.svg", isLogin)); } @override diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart index 63ab557d..8c98ebc8 100644 --- a/lib/pages/medical/balance/my_balance_page.dart +++ b/lib/pages/medical/balance/my_balance_page.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_mod import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -123,15 +124,15 @@ class MyBalancePage extends StatelessWidget { ), bottomSheet: Container( // height: MediaQuery.of(context).size.height * 0.12, - height: 85.0, + height: 70.0, color: Colors.white, width: double.infinity, padding: EdgeInsets.all(12), - child: SecondaryButton( - textColor: Colors.white, - color: CustomColors.accentColor, - label: TranslationBase.of(context).createAdvancedPayment, - onTap: () { + child: DefaultButton( + // textColor: Colors.white, + // color: CustomColors.accentColor, + TranslationBase.of(context).createAdvancedPayment, + () { Navigator.push(context, FadePage(page: AdvancePaymentPage())); }, ), diff --git a/lib/pages/medical/medical_profile_page_new.dart b/lib/pages/medical/medical_profile_page_new.dart index dc7ff71f..d128f460 100644 --- a/lib/pages/medical/medical_profile_page_new.dart +++ b/lib/pages/medical/medical_profile_page_new.dart @@ -40,7 +40,7 @@ class _MedicalProfilePageState extends State { showNewAppBar: true, isHelp: true, showNewAppBarTitle: true, - appBarTitle: TranslationBase.of(context).medicalFile, + appBarTitle: TranslationBase.of(context).medicalFileTitle, onTap: widget.onTap, body: Container( child: SingleChildScrollView( @@ -82,7 +82,7 @@ class _MedicalProfilePageState extends State { ) : Container(), Text( - TranslationBase.of(context).medicalFile, + TranslationBase.of(context).medicalFileTitle, style: TextStyle( color: Colors.black, fontSize: SizeConfig.textMultiplier * 3, diff --git a/lib/pages/rateAppointment/rate_appointment_clinic.dart b/lib/pages/rateAppointment/rate_appointment_clinic.dart index 8eafe6cb..e90e3b3c 100644 --- a/lib/pages/rateAppointment/rate_appointment_clinic.dart +++ b/lib/pages/rateAppointment/rate_appointment_clinic.dart @@ -257,8 +257,8 @@ class _RateAppointmentClinicState extends State { ), ); }, - color: Color(0xffEAEAEA), - textColor: Color(0xff2B353E), + color: CustomColors.accentColor, + textColor: Colors.white, ), ), SizedBox(width: 10), diff --git a/lib/pages/rateAppointment/rate_appointment_doctor.dart b/lib/pages/rateAppointment/rate_appointment_doctor.dart index aaf9aa06..c46b6a50 100644 --- a/lib/pages/rateAppointment/rate_appointment_doctor.dart +++ b/lib/pages/rateAppointment/rate_appointment_doctor.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.da import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -169,8 +170,8 @@ class _RateAppointmentDoctorState extends State { ), ); }, - color: Color(0xffEAEAEA), - textColor: Color(0xff2B353E), + color: CustomColors.accentColor, + textColor: Colors.white, ), ), SizedBox(width: 10), diff --git a/lib/pages/settings/general_setting.dart b/lib/pages/settings/general_setting.dart index adbebfca..f61650e5 100644 --- a/lib/pages/settings/general_setting.dart +++ b/lib/pages/settings/general_setting.dart @@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; @@ -46,23 +45,14 @@ class _GeneralSettings extends State with TickerProviderStateMi child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - TranslationBase.of(context).alert, + TranslationBase.of(context).modes, style: TextStyle( fontSize: 16, fontWeight: FontWeight.w600, letterSpacing: -0.64, ), ), - Text( - TranslationBase.of(context).modesBelow, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - letterSpacing: -0.48, - ), - ), Row( children: [ Checkbox( @@ -75,7 +65,7 @@ class _GeneralSettings extends State with TickerProviderStateMi activeColor: CustomColors.accentColor, ), Text( - TranslationBase.of(context).prefferedMode, + TranslationBase.of(context).vibration, style: TextStyle( fontSize: 12, letterSpacing: -0.48, @@ -113,14 +103,6 @@ class _GeneralSettings extends State with TickerProviderStateMi letterSpacing: -0.64, ), ), - Text( - TranslationBase.of(context).prefferedMode, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - letterSpacing: -0.48, - ), - ), Column( children: [ Row( @@ -219,14 +201,6 @@ class _GeneralSettings extends State with TickerProviderStateMi letterSpacing: -0.64, ), ), - Text( - TranslationBase.of(context).permissionsBellow, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - letterSpacing: -0.48, - ), - ), Row( children: [ Checkbox( diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 09b50632..35c3921e 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2406,6 +2406,24 @@ class TranslationBase { String get inPrgress => localizedValues["inPrgress"][locale.languageCode]; String get locked => localizedValues["locked"][locale.languageCode]; + + String get onlinePayment => localizedValues["onlinePayment"][locale.languageCode]; + + String get onlinePaymentSubtitle => localizedValues["onlinePaymentSubtitle"][locale.languageCode]; + + String get cmcTitle => localizedValues["cmcTitle"][locale.languageCode]; + + String get cmcSubtitle => localizedValues["cmcSubtitle"][locale.languageCode]; + + String get emergencyTitle => localizedValues["emergencyTitle"][locale.languageCode]; + + String get emergencySubtitle => localizedValues["emergencySubtitle"][locale.languageCode]; + + String get ereferralTitle => localizedValues["ereferralTitle"][locale.languageCode]; + + String get ereferralSubtitle => localizedValues["ereferralSubtitle"][locale.languageCode]; + + String get medicalFileTitle => localizedValues["medicalFileTitle"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 2c796768..c9f4e9c6 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -336,9 +336,9 @@ class Utils { medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null, child: MedicalProfileItem( - title: TranslationBase.of(context).myInvoice, + title: TranslationBase.of(context).invoicesList, imagePath: 'invoice_list.svg', - subTitle: TranslationBase.of(context).invoicesList, + subTitle: TranslationBase.of(context).myInvoice, isEnable: projectViewModel.havePrivilege(14), ), )); @@ -464,9 +464,9 @@ class Utils { medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null, child: MedicalProfileItem( - title: TranslationBase.of(context).smartWatches, + title: TranslationBase.of(context).smartWatchesSubtitle, imagePath: 'smart_watch.svg', - subTitle: TranslationBase.of(context).smartWatchesSubtitle, + subTitle: TranslationBase.of(context).smartWatches, isEnable: projectViewModel.havePrivilege(30), ), )); @@ -474,7 +474,7 @@ class Utils { medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null, child: MedicalProfileItem( - title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor.svg', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)), + title: TranslationBase.of(context).askYourSubtitle, imagePath: 'ask_doctor.svg', subTitle: TranslationBase.of(context).askYour, isEnable: projectViewModel.havePrivilege(28)), )); if (projectViewModel.havePrivilege(32) || true) { diff --git a/lib/widgets/dialogs/ConfirmWithMessageDialog.dart b/lib/widgets/dialogs/ConfirmWithMessageDialog.dart index fca0dd19..1d423458 100644 --- a/lib/widgets/dialogs/ConfirmWithMessageDialog.dart +++ b/lib/widgets/dialogs/ConfirmWithMessageDialog.dart @@ -61,8 +61,8 @@ class ConfirmWithMessageDialog extends StatelessWidget { child: DefaultButton( TranslationBase.of(context).cancel_nocaps, () => Navigator.pop(context), - textColor: Color(0xff2B353E), - color: Color(0xffEAEAEA), + textColor: Colors.white, + color: CustomColors.accentColor, ), ), SizedBox(width: 10), @@ -73,6 +73,8 @@ class ConfirmWithMessageDialog extends StatelessWidget { Navigator.pop(context); onTap(); }, + textColor: Colors.white, + color: CustomColors.green, ), ), ], diff --git a/lib/widgets/text/app_texts_widget.dart b/lib/widgets/text/app_texts_widget.dart index 4f2e68d1..a143236f 100644 --- a/lib/widgets/text/app_texts_widget.dart +++ b/lib/widgets/text/app_texts_widget.dart @@ -72,7 +72,6 @@ class _AppTextState extends State { // : 'WorkSans' // : widget.fontFamily, decoration: widget.underline == true ? TextDecoration.underline : TextDecoration.none - // backgroundColor:widget.backGroundcolor ), ), ), From 43a672cc68637cfe0b9c561b5905a8591a98a33e Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 18 Oct 2021 16:07:34 +0300 Subject: [PATCH 2/2] Updates & fixes --- .../all_habib_medical_service_page2.dart | 51 +++---- .../health-weather-indicator.dart | 141 ++++++++++-------- .../AlHabibMedicalService/my_web_view.dart | 2 + lib/pages/DrawerPages/family/my-family.dart | 8 +- lib/pages/login/welcome.dart | 7 +- lib/uitl/utils_new.dart | 14 ++ .../dialogs/confirm_send_email_dialog.dart | 5 +- 7 files changed, 121 insertions(+), 107 deletions(-) diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart index 8feef0f5..6aff12d7 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart @@ -11,7 +11,6 @@ import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; @@ -51,18 +50,17 @@ class _AllHabibMedicalSevicePage2State extends State hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin)); - hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); + hmgServices.add(new HmgServices(2, TranslationBase.of(context).onlinePayment, TranslationBase.of(context).onlinePaymentSubtitle, "assets/images/new/paymentMethods.png", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); - hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); - hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergency, TranslationBase.of(context).services2, "assets/images/new/emergency.svg", isLogin)); - hmgServices.add(new HmgServices(6, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Referral.svg", isLogin)); + hmgServices.add(new HmgServices(4, TranslationBase.of(context).cmcTitle, TranslationBase.of(context).cmcSubtitle, "assets/images/new/comprehensive_checkup.svg", isLogin)); + hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); - hmgServices.add(new HmgServices(8, TranslationBase.of(context).reachUs, TranslationBase.of(context).findUs, "assets/images/new/reach_us.svg", isLogin)); - + hmgServices.add(new HmgServices(8, TranslationBase.of(context).findUs, TranslationBase.of(context).reachUs, "assets/images/new/reach_us.svg", isLogin)); hmgServices.add(new HmgServices(9, TranslationBase.of(context).medicalFile, TranslationBase.of(context).My_File_Details, "assets/images/new/medical file.svg", isLogin)); hmgServices.add(new HmgServices(10, TranslationBase.of(context).book, TranslationBase.of(context).appointment, "assets/images/new/book appointment.svg", isLogin)); - hmgServices.add(new HmgServices(11, TranslationBase.of(context).pharmacy, TranslationBase.of(context).Ecommerce, "assets/images/new/Pharmacy.svg", isLogin)); - hmgServices.add(new HmgServices(12, TranslationBase.of(context).update, TranslationBase.of(context).insuranceCards, "assets/images/new/update insurance card.svg", isLogin)); + hmgServices.add(new HmgServices(11, TranslationBase.of(context).online, TranslationBase.of(context).pharmacy, "assets/images/new/Pharmacy.svg", isLogin)); + hmgServices.add(new HmgServices(12, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin)); hmgServices.add(new HmgServices(13, TranslationBase.of(context).myFamily, TranslationBase.of(context).Family_Files, "assets/images/new/my family.svg", isLogin)); hmgServices.add(new HmgServices(14, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin)); hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin)); @@ -115,19 +113,22 @@ class _AllHabibMedicalSevicePage2State extends State Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - weather, - style: TextStyle( - fontSize: 30, - letterSpacing: -0.83, - fontWeight: FontWeight.bold, - color: Colors.white, + Directionality( + textDirection: TextDirection.ltr, + child: Text( + weather, + style: TextStyle( + fontSize: 30, + letterSpacing: -0.83, + fontWeight: FontWeight.bold, + color: Colors.white, + ), ), ), Text( - DateUtil.formatDateToDate(new DateTime.now(), false), + DateUtil.getMonthDayYearDateFormatted(new DateTime.now()), style: TextStyle( - fontSize: 10, + fontSize: 12, letterSpacing: -0.60, fontWeight: FontWeight.w600, color: Colors.white, @@ -206,20 +207,6 @@ class _AllHabibMedicalSevicePage2State extends State ); } - bool timeCalculator(int startHour, int startMint, int endHour, int endMint) { - DateTime now = DateTime.now(); - DateTime startDate = DateTime(now.year, now.month, now.day, startHour, startHour); - DateTime endDate = DateTime(now.year, now.month, now.day, endHour, endMint); - print(startDate.toString()); - print(endDate.toString()); - print(now); - print("------------"); - if (startDate.isBefore(now) && endDate.isAfter(now)) - return true; - else - return false; - } - void setLocation(Position position) { this.sharedPref.setDouble(USER_LAT, position.latitude ?? 0.0); this.sharedPref.setDouble(USER_LONG, position.longitude ?? 0.0); diff --git a/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart index a79c9d9d..b38e3f63 100644 --- a/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart +++ b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart @@ -3,8 +3,10 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/weather/weather_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; @@ -23,12 +25,11 @@ class _HospitalsPageState extends State { AppSharedPreferences sharedPref = AppSharedPreferences(); LocationUtils locationUtils; var weather = '--'; + @override void initState() { - locationUtils = - new LocationUtils(isShowConfirmDialog: true, context: context); - WidgetsBinding.instance - .addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); getWeather(); super.initState(); } @@ -41,82 +42,92 @@ class _HospitalsPageState extends State { allowAny: true, builder: (_, mode, widget) => AppScaffold( isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, appBarTitle: TranslationBase.of(context).healthWeatherIndicators, isShowAppBar: true, body: mode.weatherIndicatorData.length > 0 ? SingleChildScrollView( child: Column(children: [ - Container( - margin: EdgeInsets.all(8), - width: double.infinity, - height: 150, - decoration: BoxDecoration( - image: DecorationImage( - image: - ExactAssetImage('assets/images/Weather_img.png'), - fit: BoxFit.cover, - ), - borderRadius: BorderRadius.circular(8.0)), - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 10.0), - child: Row( - children: [ - Expanded( - flex: 3, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .healthWeatherIndicators, - color: Colors.white, + AspectRatio( + aspectRatio: 1.8, + child: Container( + width: double.infinity, + height: double.infinity, + decoration: containerRadiusWithGradient(0, + color1: timeCalculator(6, 0, 10, 59) + ? Color(0xFFB3E3FE) + : timeCalculator(11, 0, 15, 59) + ? Color(0xFFFF9E7E) + : Color(0xFF2E6686), + color2: timeCalculator(6, 0, 10, 59) + ? Color(0xFF9AC7FF) + : timeCalculator(11, 0, 15, 59) + ? Color(0xFFFECB50) + : Color(0xFF122F48)), + child: Padding( + padding: const EdgeInsets.all(30.0), + child: Stack( + alignment: projectViewModel.isArabic ? Alignment.centerLeft : Alignment.centerRight, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Directionality( + textDirection: TextDirection.ltr, + child: Text( + weather, + style: TextStyle( + fontSize: 30, + letterSpacing: -0.83, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + ), + Text( + DateUtil.getMonthDayYearDateFormatted(new DateTime.now()), + style: TextStyle( + fontSize: 12, + letterSpacing: -0.60, fontWeight: FontWeight.w600, + color: Colors.white, ), - AppText( - TranslationBase.of(context) - .healthTipsBasedOnCurrentWeather, + ), + mFlex(1), + Text( + TranslationBase.of(context).healthWeatherIndicators, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.96, + fontWeight: FontWeight.bold, color: Colors.white, - fontSize: 14, ), - ], - )), - Expanded( - flex: 2, - child: InkWell( - onTap: () {}, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Image.asset( - 'assets/images/Weather_ico.png', - width: 60, - height: 60, - ), - Directionality( - textDirection: TextDirection.ltr, - child: AppText(weather, - fontSize: 22, - color: Colors.white)) - ], - ), - ], - )), - ) - ], + ), + Text( + TranslationBase.of(context).healthTipsBasedOnCurrentWeather, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.72, + fontWeight: FontWeight.w600, + color: Colors.white, + ), + ), + ], + ), + Image.asset( + "assets/images/Weather_ico.png", + color: Colors.white.withOpacity(0.5), + ), + ], + ), ), ), ), Padding( padding: EdgeInsets.all(15), child: AppText( - projectViewModel.isArabic - ? mode.weatherIndicatorData[0].cityNameN - : mode.weatherIndicatorData[0].cityName, + projectViewModel.isArabic ? mode.weatherIndicatorData[0].cityNameN : mode.weatherIndicatorData[0].cityName, fontSize: 24, fontWeight: FontWeight.bold, )), diff --git a/lib/pages/AlHabibMedicalService/my_web_view.dart b/lib/pages/AlHabibMedicalService/my_web_view.dart index f6646d36..4b03c7dd 100644 --- a/lib/pages/AlHabibMedicalService/my_web_view.dart +++ b/lib/pages/AlHabibMedicalService/my_web_view.dart @@ -22,6 +22,8 @@ class MyWebView extends StatelessWidget { isShowAppBar: true, appBarTitle: title, isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, body: WebView( initialUrl: selectedUrl, javascriptMode: JavascriptMode.unrestricted, diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index 0f92e285..857c680c 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -1,7 +1,7 @@ import 'dart:ui'; +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/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; @@ -25,18 +25,16 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.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:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; class MyFamily extends StatefulWidget { final bool isAppbarVisible; diff --git a/lib/pages/login/welcome.dart b/lib/pages/login/welcome.dart index 389c9dc9..26b6421c 100644 --- a/lib/pages/login/welcome.dart +++ b/lib/pages/login/welcome.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/pages/login/login-type.dart'; import 'package:diplomaticquarterapp/pages/login/register.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -79,8 +80,8 @@ class _WelcomeLogin extends State { () => { Navigator.of(context).push(FadePage(page: Register())), }, - color: Color(0xffEAEAEA), - textColor: Color(0xff000000), + color: CustomColors.accentColor, + textColor: Colors.white, ), ), SizedBox(width: 8), @@ -90,7 +91,7 @@ class _WelcomeLogin extends State { () => { Navigator.of(context).push(FadePage(page: LoginType())), }, - color: Color(0xffD02127), + color: CustomColors.green, ), ), ], diff --git a/lib/uitl/utils_new.dart b/lib/uitl/utils_new.dart index 242f47ad..a02cc0bc 100644 --- a/lib/uitl/utils_new.dart +++ b/lib/uitl/utils_new.dart @@ -547,3 +547,17 @@ FontStyle getFontStyle(String fontStyle) { return FontStyle.normal; } } + +bool timeCalculator(int startHour, int startMint, int endHour, int endMint) { + DateTime now = DateTime.now(); + DateTime startDate = DateTime(now.year, now.month, now.day, startHour, startHour); + DateTime endDate = DateTime(now.year, now.month, now.day, endHour, endMint); + print(startDate.toString()); + print(endDate.toString()); + print(now); + print("------------"); + if (startDate.isBefore(now) && endDate.isAfter(now)) + return true; + else + return false; +} diff --git a/lib/widgets/dialogs/confirm_send_email_dialog.dart b/lib/widgets/dialogs/confirm_send_email_dialog.dart index 1e1baa28..0d36747b 100644 --- a/lib/widgets/dialogs/confirm_send_email_dialog.dart +++ b/lib/widgets/dialogs/confirm_send_email_dialog.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/pages/settings/settings.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -101,8 +102,8 @@ class _ConfirmSendEmailDialogState extends State { () { Navigator.pop(context); }, - textColor: Color(0xff2B353E), - color: Color(0xffEAEAEA), + textColor: Colors.white, + color: CustomColors.accentColor, ), ), SizedBox(width: 10),