diff --git a/assets/images/new/ic_zoom.svg b/assets/images/new/ic_zoom.svg new file mode 100644 index 00000000..f7449eeb --- /dev/null +++ b/assets/images/new/ic_zoom.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index c80c87ac..f8001fae 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -50,7 +50,7 @@ const Map localizedValues = { 'searchByDocText': {'en': 'Type the name of the doctor to help you find him', 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'}, 'enterDocName': {'en': 'Enter Doctor name', 'ar': 'أدخل إسم الطبيب'}, 'search': {'en': 'Search', 'ar': 'بحث'}, - 'noResultFound': {'en': 'No Result Found', 'ar': 'المنتج غير موجود'}, + 'noResultFound': {'en': 'No Result Found', 'ar': 'لم يتم العثور على نتائج'}, 'pleaseEnterProductName': {'en': 'Please Enter Product Name', 'ar': 'ادخل اسم المنتج'}, 'bookNow': {'en': 'BOOK NOW', 'ar': 'احجز الآن'}, 'docInfo': {'en': 'Doctor Information', 'ar': 'معلومات الطبيب'}, @@ -60,7 +60,7 @@ const Map localizedValues = { 'nationality': {'en': 'Nationality', 'ar': 'الجنسية'}, 'neverWait': {'en': 'Never wait in queue', 'ar': 'لا تنتظر في قائمة الانتظار'}, 'reminderTitle': {'en': 'You have appointment with Dr. ', 'ar': 'لديك موعد مع د'}, - 'appointmentCalendar': {'en': 'Would you like to set a reminder for this appointment in your calendar?', 'ar': 'هل ترغب في تعيين تذكير لهذا الموعد في التقويم الخاص بك؟'}, + 'appointmentCalendar': {'en': 'Would you like to set a reminder for this appointment in your calendar?', 'ar': 'هل ترغب في إضافة تذكير لهذا الموعد في التقويم الخاص بك؟'}, 'appointmentSuccess': {'en': 'Appointment is successfully booked', 'ar': 'تم حجز الموعد بنجاح'}, 'docQualifications': {'en': 'Doctor Qualifications', 'ar': 'مؤهلات الطبيب'}, 'pressAgain': {'en': 'Press again to exit the app', 'ar': 'اضغط مرة أخرى للخروج من التطبيق'}, @@ -68,14 +68,14 @@ const Map localizedValues = { 'patientInfo': {'en': 'Patient Information', 'ar': 'معلومات المريض'}, 'doctorFilter': {'en': 'Doctors will be filtered based on your gender and age', 'ar': 'سيتم تصفية الأطباء بناءً على جنسك وعمرك'}, 'bookSuccess': {'en': 'Book Success', 'ar': 'تم حجز الموعد بنجاح'}, - 'patientShare': {'en': 'Patient Share', 'ar': 'المبلغ المستحق'}, - 'patientShareWithTax': {'en': 'Patient Share with Tax', 'ar': 'المبلغ الإجمالي المستحق'}, + 'patientShare': {'en': 'Patient Share', 'ar': 'نسبة العميل'}, + 'patientShareWithTax': {'en': 'Patient Share with Tax', 'ar': 'المبلغ الإجمالي المستحق مع الضريبة'}, 'confirmAppo': {'en': 'Confirm Appointment', 'ar': 'تأكيد الموعد'}, 'confirm': {'en': 'Confirm', 'ar': 'تأكيد'}, 'confirmLiveCare': {'en': 'Confirm LiveCare', 'ar': 'تأكيد لايف كير'}, 'waitingForDoctor': {'en': 'Waiting for doctor', 'ar': 'في انتظار الطبيب'}, 'appointment': {'en': 'Appointment', 'ar': 'الموعد'}, - 'confirmLater': {'en': 'Confirm Later', 'ar': 'تأكيد لاحقا'}, + 'confirmLater': {'en': 'Confirm Later', 'ar': 'التاكيد لاحقا'}, 'todoList': {'en': 'Todo List', 'ar': 'مهامي'}, 'appoActions': {'en': 'Appointment Actions', 'ar': 'إجراءات الموعد'}, 'date': {'en': 'Date', 'ar': 'التاريخ'}, @@ -89,13 +89,13 @@ const Map localizedValues = { 'agreeTo': {'en': 'I agree the', 'ar': 'أوافق على'}, 'termsConditoins': {'en': 'Terms and Conditions', 'ar': 'الأحكام والشروط'}, 'cancelAppoMsg': {'en': 'Are you sure you want to cancel this appointment?', 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'}, - 'changePayment': {'en': 'Change Payment Method', 'ar': 'قم بتغيير آلية الدفع'}, - 'upcoming-noAction': {'en': 'No Action Required', 'ar': 'لا يوجد إجراء مطلوب'}, + 'changePayment': {'en': 'Change Payment Method', '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.", "ar": "- عملية الدفع الالكتروني ستكون متاحة قبل الموعد ب 24 ساعة."}, 'upcoming-payment-pending': {'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.', 'ar': 'هذا موعد اتصال مرئي عن بعد ، يرجى اتباع تعليمات الخدمة.'}, 'upcoming-livecare': {'en': 'This is a LiveCare appointment', 'ar': 'هذا موعد لايف كير'}, 'upcoming-details': {'en': 'More Details', 'ar': 'المزيد'}, @@ -108,33 +108,32 @@ const Map localizedValues = { 'online': {'en': 'Online', 'ar': 'الالكترونية'}, 'payment': {'en': 'Payment', 'ar': 'الدفع'}, 'cancel-nocaps': {'en': 'Cancel', 'ar': 'الغاء'}, - 'set-reminder': {'en': 'Set Reminder', 'ar': 'تعيين تذكير'}, - "national-id-number": {"en": "National ID Number", "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': 'تسجيل الدخول'}, - 'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'}, - 'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'}, + 'loginregister': {'en': 'Login / Register', 'ar': 'دخول/ تسجيل'}, + 'poweredBy': {'en': 'Powered by', 'ar': 'مشغل بواسطة'}, "welcome": {"en": "Welcome", "ar": "مرحبا"}, "welcome-to": {"en": "Welcome to", "ar": "مرحبا بك في"}, - "patient-app": {"en": "Patient App", "ar": "تطبيق المريض"}, - "welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك"}, + "patient-app": {"en": "Patient App", "ar": "تطبيق المرضى"}, + "welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف"}, "dr-sulaiman-text": {"en": "Dr. Sulaiman Al Habib", "ar": "د. سليمان الحبيب"}, 'welcome_text2': {'en': 'Have you visited AlHabib Medical Group before? ', 'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟'}, 'yes': {'en': 'Yes', 'ar': 'نعم'}, 'no': {'en': 'No', 'ar': 'لا'}, - "logintyperadio": {"en": "Choose from below options to login to your medical file.", "ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."}, - "registernow": {"en": "Register Now", "ar": "تسجيل الان"}, + "logintyperadio": {"en": " Choose from the below options to login to your medical file.", "ar": " اختر احدى الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي "}, + "registernow": {"en": "Register Now", "ar": "سجل الان"}, "nationalID": {"en": "Enter the Identification Number", "ar": "أدخل رقم الهوية الوطنية او الاقامة"}, "national-id": {"en": "National ID", "ar": "رقم الهوية"}, "fileNo": {"en": "File Number", "ar": "رقم الملف"}, "fileno": {"en": "File No", "ar": "رقم الملف"}, "forgotFileNo": {"en": "Forgot file Number?", "ar": "نسيت رقم الملف الطبي؟"}, - "forgotFileNoTitle": {"en": "Forgot medical file", "ar": "نسيت رقم الملف"}, - + "forgotFileNoTitle": {"en": "Forgot medical file", "ar": "نسيت رقم الملف الطبي"}, "enter-national-id": {"en": "Please enter mobile number and identification number", "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", "ar": "أدخل رقم الجوال المسجل لاستلام رقم الملف عن طريق الرسائل النصية"}, + "forgot-desc": {"en": "Enter the mobile number to receive the Medical File Number via SMS", "ar": "أدخل رقم الجوال المسجل لاستلام رقم الملف عن طريق الرسائل النصية"}, "dob": {"en": "Birth Date:", "ar": "تاريخ الميلاد"}, "hijri-date": {"en": "Hijri Date", "ar": "التاريخ الهجري"}, "gregorian-date": {"en": "Gregorian Date", "ar": "التاريخ الميلادي"}, @@ -146,19 +145,19 @@ const Map localizedValues = { "verify-with-whatsapp": {"en": "Whatsapp", "ar": " الواتس اب"}, "verify-through": {"en": "Verify Through", "ar": " تحقق من خلال"}, "last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"}, - "last-login-with": {"en": "VERIFICATION TYPE:", "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": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات" }, 'searchMedicine': {'en': 'Search Medicine', 'ar': 'البحث عن الدواء'}, - 'pharmaciesList': {'en': 'Pharmacies List', 'ar': 'قائمة الصيدلايات'}, + 'pharmaciesList': {'en': 'Pharmacies List', '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': 'الرجائ ادخال اسم الدواء'}, + 'youCanFindItIn': {'en': 'You can find it in', '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": "تنتهي صلاحية رمز التحقق خلال"}, "arabic-change": {"en": "عربي", "ar": "English"}, @@ -168,7 +167,7 @@ const Map localizedValues = { "before": {"en": "Before", "ar": "قبل"}, "minute": {"en": "Minutes", "ar": "دقيقة"}, "hour": {"en": "Hour", "ar": "ساعة"}, - "reminderSuccess": {"en": "The reminder has been added successfully", "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": "المبلغ الإجمالي المستحق:"}, @@ -189,10 +188,10 @@ const Map localizedValues = { "confirmed": {"en": "Confirmed", "ar": "مؤكد"}, "arrived": {"en": "Arrived", "ar": "تم الحضور"}, "payNowBookSuccess": {"en": "Pay now via Al Habib App", "ar": "ادفع الآن عبر تطبيق الحبيب"}, - "payNowBookSuccesstext1": {"en": "Pay Now using online payment service From secure payment gateways", "ar": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة"}, - "payNowBookSuccesstext2": {"en": "You can also Pay Later via online payment Or in Hospital", "ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع عبر الإنترنت أو في المستشفى"}, + "payNowBookSuccesstext1": {"en": "Pay Now using online payment service from secure payment gateways", "ar": " ادفع الآن من خلال خدمة الدفع الالكتروني الآمنة"}, + "payNowBookSuccesstext2": {"en": "You can also Pay Later via online payment or in Hospital", "ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع الالكتروني أو في المستشفى"}, 'payLater': {'en': 'Pay Later', 'ar': 'ادفع لاحقا'}, - 'askDocNotAllowed': {'en': 'This service will be available for last 15 days doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'}, + 'askDocNotAllowed': {'en': 'This service will be available for last 15 days’ doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'}, "more-verify": {"en": "More Verification Options", "ar": "المزيد من خيارات التحقق"}, "welcome-back": {"en": "Welcome back!", "ar": "مرحبا بعودتك!"}, "account-info": {"en": "Would you like to login with current username?", "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"}, @@ -229,6 +228,7 @@ const Map localizedValues = { 'heart': {'en': 'Heart Rate', 'ar': 'معدل النبض'}, "heightUnit": {"en": "height unit", "ar": "وحدة الطول"}, "weightUnit": {"en": "Weight Unit", "ar": "وحدة الوزن"}, + "unit": {"en": "Unit", "ar": "وحدة"}, "request": {"en": "Request", "ar": "طلبات الاضافة"}, "member-name": {"en": "Member Name", "ar": "اسم العضو"}, "switch-login": {"en": "Switch User", "ar": "تغير المستخدم"}, @@ -236,7 +236,7 @@ const Map localizedValues = { "allow-view": {"en": "Allow", "ar": "قبول"}, "reject-view": {"en": "Reject", "ar": "رفض"}, "delete-view": {"en": "Delete", "ar": "حذف"}, - // "my-family": {"en": "MY FAMILY", "ar": "عائلتي"}, + "my-family": {"en": "MY FAMILY", "ar": "عائلتي"}, "approvals": {"en": "Approvals", "ar": "موافقات التأمين"}, "approvalNo": {"en": "Approval No:", "ar": "رقم الموافقة: "}, "companyName": {"en": "Company Name:", "ar": "اسم الشركة: "}, @@ -246,13 +246,13 @@ const Map localizedValues = { "procedureName": {"en": "Procedure Name:", "ar": "اسم الاجراء:"}, "procedure": {"en": "Procedure", "ar": "اسم الاجراء:"}, "procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"}, - "usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"}, - "unusedCount": {"en": "Unused Count:", "ar": "غير مستخدم: "}, + "usageStatus": {"en": "Usage Status", "ar": "حالة الاستخدام"}, + "unusedCount": {"en": "Unused Count:", "ar": "غير مستخدم:"}, "totalApproval": {"en": "Total approval unused", "ar": "اجمالي الموافقات الغير مستخدمة"}, "category": {"en": "Category: ", "ar": "الفئة"}, "expirationDate": {"en": "Expiration Date: ", "ar": "تاريخ الانتهاء"}, "patientCard": {"en": "Patient Card ID: ", "ar": "رقم الاشتراك"}, - "policyNumber": {"en": "Policy Number: ", "ar": "رقم بوليصة التاميت:"}, + "policyNumber": {"en": "Policy Number: ", "ar": "رقم بوليصة التامين:"}, "seeDetails": {"en": "SEE DETAILS", "ar": "منافعك التامينية"}, "insuranceCards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"}, "requestType": {"en": "Request Type", "ar": "نوع الاستفسار"}, @@ -260,14 +260,13 @@ const Map localizedValues = { "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': 'الرعاية الصحية المنزلية'}, "OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدليات الحبيب'}, "EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'}, - "OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع الإلكتدوني'}, + "OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع الإلكتروني'}, "OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'}, - "ComprehensiveMedicalCheckup": {"en": "Comprehensive Medical Check up", 'ar': 'فحص طبي شامل'}, + "ComprehensiveMedicalCheckup": {"en": "Comprehensive Medical Check-up", 'ar': 'فحص طبي شامل'}, "HMGService": {"en": "HMG Service", 'ar': 'جميع خدمات الحبيب'}, "ViewAllHabibMedicalService": {"en": "View All Habib Medical Service", 'ar': 'عرض خدمات الحبيب الطبية'}, "viewAll": {"en": "View All", 'ar': 'عرض الكل'}, @@ -282,30 +281,28 @@ const Map localizedValues = { "en": "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.", "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": "خدمات الحبيب"}, "parkingTitle": { "en": "Car service, car service, service to save parking information, return to it later, 1- By clicking on (Read the code), save the parking data. 2- By clicking on the button (view my car park), it shows you the car’s location in Google Maps. 3- Read another position by pressing the Clear Position Data button.", "ar": - " خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). " + " خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر (قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). " }, "parkingDescription": { "en": "Parking service is for you to scan the car location so you can find it easy on you way out. click on (scan parking) button to save the parking location, then (show my park) button will appear to show you the way for the parking. if you want to rescan parking QR just click on (Clear My Data).", "ar": - "خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف)." + "خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر (قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف)." }, - "appointments": {"en": "Appointments", "ar": "تعيينات"}, + "appointments": {"en": "Appointments", "ar": "مواعيد"}, "all2": {"en": "All", "ar": "الكل"}, "checkinOption": {"en": "Check-In Options", "ar": "تحقق في الخيارات"}, "readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"}, - "showMyPark": {"en": "Show My Park", "ar": "عرض بارك"}, - "clearMyData": {"en": "clear My Data", "ar": "امسح البيانات"}, + "showMyPark": {"en": "Show My Park", "ar": "عرض الموقف"}, + "clearMyData": {"en": "Clear My Data", "ar": "امسح البيانات"}, "floor": {"en": "Floor:", "ar": "الطابق"}, "gate": {"en": "Gate:", "ar": "بوابة"}, "building": {"en": "Building:", "ar": "المبنى"}, @@ -318,7 +315,7 @@ const Map localizedValues = { "MyAppointments": {"en": "My", "ar": "مواعيدي"}, "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"}, "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"}, - "noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم تصل المواعيد"}, + "noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم يتم حضورها"}, "MyAppointmentsList": {"en": "Appointments", "ar": "قائمة بمواعدي"}, "Radiology": {"en": "Radiology", "ar": "الأشعة"}, "RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"}, @@ -350,23 +347,23 @@ const Map localizedValues = { "MonthlySubtitle": {"en": "Report", "ar": "الشهرية"}, "Sick": {"en": "Sick", "ar": "الإجازات"}, "SickSubtitle": {"en": "Leaves", "ar": "المرضية"}, - "MyBalance": {"en": "My Balance", "ar": "ارصدتي"}, + "MyBalance": {"en": "My Balance", "ar": "رصيدي"}, "MyBalanceSubtitle": {"en": "Credit", "ar": "المبالغ"}, "PatientCall": {"en": "Patient Call", "ar": "النداء للموعد"}, "PatientCallSubtitle": {"en": "Service", "ar": "خدمة"}, - "SmartWatches": {"en": "Smart Watches", "ar": "الساعة الذكية"}, + "SmartWatches": {"en": "Smart Watches", "ar": "الساعات الذكية"}, "SmartWatchesSubtitle": {"en": "Pairing", "ar": "ربط البيانات"}, "MyTrackers": {"en": "My Trackers", "ar": "تتبع قراءاتي"}, "MyTrackersSubtitle": {"en": "Service", "ar": "الطبية"}, - "AskYour": {"en": "Ask Your", "ar": "إرسل طبيبك"}, + "AskYour": {"en": "Ask Your", "ar": "إسال طبيبك"}, "AskYourSubtitle": {"en": "Doctor", "ar": "خدمة"}, "Internet": {"en": "Internet", "ar": "الاتصال"}, "InternetSubtitle": {"en": "Pairing", "ar": "بالإنترنت"}, - "Chatbot": {"en": "Chatbot", "ar": "تاشت بوت"}, + "Chatbot": {"en": "Chatbot", "ar": "شات بوت"}, "ChatbotSubtitle": {"en": "", "ar": ""}, "TimeLine": {"en": "Timeline", "ar": "الجدول الزمني"}, "LabOrders": {"en": "Lab Orders", "ar": "تحاليل المختبر"}, - "BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"}, + "BillNo": {"en": "Bill No:", "ar": "رقم الفاتورة"}, "Prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"}, "History": {"en": "History", "ar": "السجلات"}, "OrderNo": {"en": "Order No", "ar": "رقم الطلب"}, @@ -379,18 +376,18 @@ const Map localizedValues = { "km": {"en": "KMs:", "ar": "كم"}, "km_": {"en": "KM", "ar": "كم"}, "PatientHealthSummaryReport": {"en": "Patient Health Summary Report", "ar": " ملخص التقارير الشهرية"}, - "ToViewTheTermsAndConditions": {"en": "To View The Terms And Conditions 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": - "هذا ملخص التقرير الصحي الشهري و الذي يسرد المؤشرات الصحية و نتائج التحاليل لأخر الزيارات. يرجى ملاحظة أن هذا التقرير هو تقرير يتم ارساله بشكل آلي من النظام و لا يعتبر رسمي و لا تؤخذ عليه أي قرارات طبية" + "هذا ملخص التقرير الصحي الشهري و الذي يسرد المؤشرات الصحية و نتائج التحاليل لأخر الزيارات. يرجى ملاحظة أن هذا التقرير يتم ارساله بشكل آلي من النظام و لا يعتبر رسمي و لا تؤخذ عليه أي قرارات طبية" }, "Save": {"en": "Save", "ar": "حفظ "}, "UserAgreement": {"en": "User Agreement", "ar": "اتفاقية الخصوصية "}, "UpdateSuccessfully": {"en": "Update Successfully", "ar": "تم التحديث بنجاح"}, - "CHECK_VACCINE_AVAILABILITY": {"en": "CHECK VACCINE AVAILABILITY", "ar": "تحقق من توافر اللقاح"}, + "CHECK_VACCINE_AVAILABILITY": {"en": "CHECK VACCINE AVAILABILITY", "ar": "التحقق من توفر اللقاح"}, "MyVaccinesAvailability": {"en": "MyVaccinesAvailability", "ar": "توفر لقاحي"}, "PaymentService": {"en": "Payment Service", "ar": "خدمة المدفوعات"}, "PaymentOnline": {"en": "Service", "ar": "الالكتروني"}, @@ -399,9 +396,8 @@ const Map localizedValues = { "BalanceAmount": {"en": "Wallet Amount", "ar": "مبلغ المحفظة"}, "TotalBalance": {"en": "Total Amount", "ar": "المبلغ الإجمالي"}, "CreateAdvancedPayment": {"en": "Recharge Wallet", "ar": "إعادة شحن المحفظة"}, - "AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"}, - "AdvancePaymentLabel": {"en": "You can create and add an Advanced Payment for you account or other accounts.", "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": "المبلغ *"}, "DepositorEmail": {"en": "Depositor Email *", "ar": "البريد الإلكتروني للمودع *"}, @@ -422,7 +418,7 @@ const Map localizedValues = { "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": "تنتهي صلاحية رمز التحقق في"}, + "TheVerificationCodeExpiresIn": {"en": "The Verification Code Expires in", "ar": "تنتهي صلاحية رمز التحقق في"}, "PleaseEnterTheVerificationCode": {"en": "Please enter the verification code send to", "ar": "الرجاء إدخال رمز التحقق المرسل إلى"}, "EyeMeasurements": {"en": "Eye Measurements", "ar": "قياسات النظر"}, "Measurements": {"en": "Measurements", "ar": "قياسات"}, @@ -438,7 +434,7 @@ const Map localizedValues = { "Brand": {"en": "Brand", "ar": "النوع"}, "Power": {"en": "Power", "ar": "القوة"}, "Diameter": {"en": "Diameter", "ar": "القطر"}, - "Remarks": {"en": "Remarks", "ar": "ملاحضات"}, + "Remarks": {"en": "Remarks", "ar": "ملاحظات"}, "ActiveMedications": {"en": "Active Medications", "ar": "ادويتي النشطة"}, "ExpDate": {"en": "Active Exp Date :", "VA": "تاريخ الإنتهاء"}, "Route": {"en": "Route", "ar": "الطريقة"}, @@ -447,7 +443,7 @@ const Map localizedValues = { "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": " يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء" + "ar": "يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء" }, "pleaseSelectAllQuestionToContinue": {"en": "Please answer all questions to continue...", "ar": "يرجى الإجابة على جميع الأسئلة للمتابعة..."}, "StartDay": {"en": "Start Day", "ar": "يوم البداية"}, @@ -471,7 +467,7 @@ const Map localizedValues = { "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.", "ar": - "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية – الاشعة – التطعيمات – العلاج الطبيعي)... " + "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية – الاشعة – التطعيمات – العلاج الطبيعي) ... " }, "LoginRegister": {"en": "Login/Register", "ar": "دخول / تسجيل"}, "OrderLog": {"en": "Order Log", "ar": " سجل الطلبات"}, @@ -483,17 +479,16 @@ const Map localizedValues = { "en": "This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.", "ar": "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل." }, - "noReviewsAvailable": {"en": "No Reviews Available", "ar": "لا يوجد تقييمات"}, "noLocationAvailable": {"en": "No Location Available", "ar": "لا يوجد موقع"}, "orders": {"en": "Orders", "ar": "الطلبات"}, - "lakum": {"en": "Lakum", "ar": "لكم"}, + "lakum": {"en": "Lakum", "ar": "برنامج لكم"}, "wishlist": {"en": "Wishlist", "ar": "المفضلة"}, "products": {"en": "Products", "ar": "المنتجات"}, "reviews": {"en": "Reviews", "ar": "التقيمات"}, "brands": {"en": "Brands", "ar": "العلامات التجارية"}, "productDetails": {"en": "Product Details", "ar": "تفاصيل المنتج"}, - // "medicationRefill": {"en": "Medication Refill", "ar": "تعبئة الأدوية"}, + "medicationRefill": {"en": "Medication Refill", "ar": "تعبئة الأدوية"}, "pillReminder": {"en": "Pill Reminder", "ar": "تذكير الأدويه"}, "shippingAddresses": {"en": "Shipping Addresses", "ar": "عناوين الشحن"}, "reachUs": {"en": "Reach Us", "ar": "الوصول لنا"}, @@ -505,12 +500,12 @@ const Map localizedValues = { "order": {"en": "My Order", "ar": " طلباتي"}, "delivered": {"en": "Delivered", "ar": " تم التوصيل"}, "pending": {"en": "Pending", "ar": " معلقة "}, - "enterNameHere": {"en": "Enter the name here", "ar": " أدخل الاسم هنا "}, + "enterNameHere": {"en": "Enter Your Name", "ar": "أدخل أسمك"}, "processing": {"en": "Processing", "ar": " تحت المعالجة"}, "cancelled": {"en": "Cancelled", "ar": " ملغي"}, "writeReview": {"en": "Write Review", "ar": " اكتب تقييمك"}, "shareReview": {"en": "SHARE REVIEW", "ar": " اكتب تقييمك"}, - "review": {"en": " reviews", "ar": " تقييمات"}, + "review": {"en": " reviews", "ar": "تقييمات"}, "viewMedicalFile": {"en": "View Details", "ar": "عرض الملف الطبي"}, "viewAllServices": {"en": "View All Services", "ar": "عرض جميع الخدمات"}, "medicalFile": {"en": "Medical File", "ar": "ملف طبي"}, @@ -525,20 +520,19 @@ const Map localizedValues = { "HMGPharmacy": {"en": "HMG Pharmacy", "ar": "صيدلية HMG"}, "ecommerceSolution": {"en": "Ecommerce Solution", "ar": "حل التجارة الإلكترونية"}, "services2": {"en": "Services", "ar": "خدمات"}, - "comprehensive": {"en": "Comprehensive", "ar": "شامل"}, "onlineConsulting": {"en": "Online Consulting", "ar": "استشارات عبر الإنترنت"}, "pendingOrder": {"en": " PENDING", "ar": " معلقة"}, - "deliveredOrder": {"en": " DELIVERED", "ar": " تم التوصيل"}, + "deliveredOrder": {"en": " DELIVERED", "ar": "تم التوصيل"}, "processingOrder": {"en": " PROCESSING", "ar": "قيد التنفيذ"}, "cancelledOrder": {"en": " CANCELLED", "ar": "ملغي"}, "compare": {"en": " Compare", "ar": "مقارنه"}, "medicationsRefill": {"en": " Medication Refill", "ar": "طلب أعادة صرف"}, - "recommended": {"en": " Recommended For You", "ar": "موصى لك"}, + "recommended": {"en": " Recommended for You", "ar": "موصى لك"}, "myPrescription": {"en": " My Prescriptions", "ar": "وصفاتي"}, "quantity": {"en": " QTY ", "ar": "الكمية"}, "reviewAppointment": {"en": " Review Appointment ", "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", "ar": " تمت مشاركة تقييمك في قسم تقييم المنتج"}, "reviewComment": {"en": "Your reviews help other to choose better product", "ar": " تقييمك سوف يساعد الأخرين في اختيار المنتج الأفضل"}, @@ -548,7 +542,7 @@ const Map localizedValues = { "subtotal": {"en": "Subtotal", "ar": " المجموع الفرعي"}, "shipping": {"en": "Shipping", "ar": " الشحن"}, "shipBy": {"en": "SHIP BY:", "ar": "الشحن عن طريق:"}, - "lakumPoints": {"en": "Lakum Points", "ar": "نقاط لكم"}, + "lakumPoints": {"en": "Lakum Points", "ar": "نقاط برنامج لكم"}, "use": {"en": "USE", "ar": "استخدم"}, "proceedPay": {"en": "PROCEED TO PAY", "ar": "المتابعة للدفع"}, "vat": {"en": "VAT (15%)", "ar": "(15%) القيمة المضافة"}, @@ -561,17 +555,16 @@ const Map localizedValues = { "confirmAddress": {"en": "CONFIRM ADDRESS ", "ar": " تأكيد العنوان "}, "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": "هل انت متأكد تريد الحذف "}, + "conditions": {"en": "Terms & Conditions of Lakum", "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": "لايوجد نتئج"}, + "noResult": {"en": "No Result.", "ar": "لا يوجد نتائج"}, "nonRecommended": {"en": "No Recommended Products.", "ar": "لا يوجد منتجات"}, - "TermsService": {"en": "Terms of Service", "ar": "شروط الخدمه"}, "Beforeusing": {"en": "Before using the checkup, please read Terms of Service.", "ar": "قبل استخدام الفحص ، يرجى قراءة شروط الخدمة"}, "accept": {"en": "I read and accept Terms of Service and Privacy Policy", "ar": "قرأت ووافقت على شروط الخدمة وسياسة الخصوصية"}, @@ -584,29 +577,26 @@ const Map localizedValues = { "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": "هذة الخدمة تتطلب تسجيل الدخول"}, - - // pharmacy module - "medicationRefill": {"en": "MEDICATION REFILL", "ar": "إعادة تعبئة الدواء"}, "offersAndPromotions": {"en": "OFFERS & SPECIAL PROMOTIONS", "ar": "العروض والترقيات الخاصة"}, "myPrescriptions": {"en": "MY PRESCRIPTIONS", "ar": "وصفاتي"}, "searchAndScanMedication": {"en": "SEARCH & SCAN FOR MEDICATION", "ar": "البحث والمسح للأدوية"}, - "shopByBrands": {"en": "Shop By Brands", "ar": "تسوق حسب الماركات"}, + "shopByBrands": {"en": "Shop by Brands", "ar": "تسوق حسب الماركات"}, "recentlyViewed": {"en": "Recently Viewed", "ar": "شوهدت مؤخرا"}, "bestSellers": {"en": "Best Seller", "ar": "الأكثر مبيعأ"}, "deleteAllItems": {"en": "Delete All Items", "ar": "حذف كافة العناصر"}, "total": {"en": "Total", "ar": "المجموع"}, - "totalWithColonRight": {"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": "حدد خيار الدفع"}, - "changeMethod": {"en": "Change Method", "ar": "تغيير خيار الدفع"}, + "selectPaymentOption": {"en": "Select Payment Option", "ar": "حدد طريقة الدفع"}, + "changeMethod": {"en": "Change Method", "ar": "تغيير طريقة الدفع"}, "reviewOrder": {"en": "Review Order", "ar": "مراجعة الطلب"}, "active": {"en": "ACTIVE", "ar": "فعال"}, "inactive": {"en": "INACTIVE", "ar": "غير فعال"}, "balance": {"en": "BALANCE", "ar": "الحالي"}, "gained": {"en": "GAINED", "ar": "المكتسب"}, - "consumed": {"en": "CONSUMED", "ar": "المستهلك"}, + "consumed": {"en": "Consumed", "ar": "المستهلك"}, "transferred": {"en": "TRANSFERRED", "ar": "المحول"}, "checkBeneficiary": {"en": "CHECK BENEFICIARY", "ar": "تحقق من المستفيد"}, "beneficiaryName": {"en": "Beneficiary Name", "ar": "اسم المستفيد"}, @@ -619,7 +609,7 @@ const Map localizedValues = { "i-am": {"en": "I am", "ar": "أنا"}, "years-old": {"en": "years old", "ar": "سنة"}, "drag-point": {"en": "Drag point to change your age", "ar": "اسحب لتغيير عمرك"}, - "refine": {"en": "Refine", "ar": "refine"}, + "refine": {"en": "Refine", "ar": "تصفية"}, "reset": {"en": "Reset", "ar": "اعادة تعيين"}, "apply": {"en": "Apply", "ar": "تطبيق"}, "viewCategorise": {"en": "View All Categories", "ar": "عرض جميع الفئات"}, @@ -627,13 +617,13 @@ const Map localizedValues = { "wishList": {"en": "WishList", "ar": "المفضلة"}, "myAccount": {"en": "My Account", "ar": "حسابي"}, "cart": {"en": "Cart", "ar": "التسوق"}, - "Alhabibapp": {"en": "Al habib app", "ar": "تطبيق الحبيب"}, + "Alhabibapp": {"en": "Al Habib app", "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.", "ar": - "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية – الاشعة – التطعيمات – العلاج الطبيعي)..." + "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية – الاشعة – التطعيمات – العلاج الطبيعي) ..." }, "email": {"en": "Email", "ar": "البريد الالكتروني"}, "Book": {"en": "Book", "ar": "احجز"}, @@ -645,7 +635,6 @@ const Map localizedValues = { "notifications": {"en": "Notifications", "ar": "إشعارات"}, "notificationDetails": {"en": "Notification Details", "ar": "تفاصيل الاشعار"}, "notificationDetailsa": {"en": "Notification Details", "ar": "تفاصيل الاشعار"}, - "info-my-doctor-points": { "en": [ "View the doctor's profile and qualifications.", @@ -683,12 +672,10 @@ const Map localizedValues = { "الاطلاع على اسعار الادوية المصروفة." ] }, - "info-insurance-cards": { "en": "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:", "ar": "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:" }, - "info-insurance-cards-points": { "en": [ "Name of the insurance company.", @@ -707,14 +694,11 @@ const Map localizedValues = { "تفاصيل التامين، مثلاً: مستوى الغرفة التي يغطيها التامين وكذلك الحالات التي يغطيها التامين.", ] }, - "info-allergies": { "en": "This service allows you to view all types of allergies recorded during your visits to Al Habib Medical Group.", "ar": "خدمة الحساسية: هذه الخدمة تمكنك من الاطلاع على جميع انواع الحساسية التي تم تسجيلها خلال زياراتك في مجموعة الحبيب الطبية." }, - "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:", "ar": "الاجازات المرضية: هذه الخدمة تمكنك من الاطلاع على جميع الاجازات المرضية والتي تم اصدارها في مجموعة الحبيب الطبية بالاضافة الى:" @@ -729,12 +713,10 @@ const Map localizedValues = { ], "ar": ["اسم الطبيب", "تاريخ الاجازة.", "عدد ايام الاجازة.", "الفرع الذي تم اصدار الاجازة منه.", "ارسال نسخة مختومة من الاجازة الى البريد الالكتروني."] }, - "info-approvals": { "en": "This service allows you to view all approvals requests that have been sent to the insurance companies in addition to:", "ar": "خدمة الموافقات: هذه الخدمة تمكنك من الاطلاع على جميع طلبات الموافقات والتي تم ارسالها الى شركات التامين بالاضافة الى:" }, - "info-approval-points": { "en": [ "View the total unused approvals.", @@ -745,7 +727,6 @@ const Map localizedValues = { "تتبع حالة الموافقة.", ] }, - "month-report": {"en": "Monthly Reports", "ar": "تقاريري الشهرية"}, "info-month-report": { "en": @@ -754,8 +735,8 @@ const Map localizedValues = { }, "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": "رقم للتواصل في حالة الطوارئ"}, @@ -769,7 +750,6 @@ const Map localizedValues = { "permissions": {"en": "Permission", "ar": "الصلاحيات"}, "camera-permission": {"en": "Camera", "ar": "الكاميرا"}, "location-permission": {"en": "Location", "ar": "تحديد المواقع"}, - "accessibility": {"en": "Accessibility Mode", "ar": "وضع امكانية الوصول"}, "orderStatus": {"en": "Order Status", "ar": "حالة الطلب"}, "CancelOrder": {"en": "Cancel Order", "ar": "الغاء الطلب"}, @@ -779,12 +759,12 @@ const Map localizedValues = { "Service": {"en": "Service", "ar": "خدمة"}, "HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'}, "HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '}, - "HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '}, + "HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية بناءاً على الطقس الحالي '}, "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, "SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"}, "ResendOrder": {"en": "Refill Order & Delivery", "ar": "إعادة طلب و توصيل"}, "Ports": {"en": "Ports", "ar": "المنافذ"}, - "Way": {"en": "Way", "ar": "الطزيقة"}, + "Way": {"en": "Way", "ar": "الطريقة"}, "Average": {"en": "Average", "ar": "المعدل"}, "DailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"}, "Period": {"en": "Period", "ar": "الفترة"}, @@ -794,6 +774,7 @@ const Map localizedValues = { "kg": {"en": "kg", "ar": "كجم"}, "lb": {"en": "lb", "ar": "رطل"}, "birth_date": {"en": "Birth Date", "ar": "تاريخ الميلاد"}, + "date_of_birth": {"en": "Date of Birth", "ar": "تاريخ الولادة"}, "mass": {"en": "Mass", "ar": "كتلة"}, "temp-c": {"en": "°C", "ar": "°س"}, "bpm": {"en": "bpm", "ar": "نبضة"}, @@ -805,7 +786,7 @@ const Map localizedValues = { "status": {"en": "Status", "ar": "الحالة"}, "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": "رسالة"}, @@ -817,36 +798,35 @@ const Map localizedValues = { "question": {"en": "Question", "ar": "سؤال"}, "message-type": {"en": "Message Type", "ar": "نوع الرسالة"}, "feedback-type": {"en": "Feedback Type", "ar": "نوع الرسالة"}, - "compliment": {"en": "compliment", "ar": "ثناء"}, + "compliment": {"en": "compliment", "ar": "شكوى"}, "suggestion": {"en": "Suggestion", "ar": "إقتراح"}, - "your-feedback": {"en": "Your feedback was sent", "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": " بحث بالعيادة"}, - "searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"}, + "searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون الاسم المدخل أكثر من 3 أحرف"}, "YouCanFind": {"en": "You Can Find ", "ar": "باستطاعتك العثور على "}, - "ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "}, + "ItemInSearch": {"en": " Item in Search", "ar": " عنصر في البحث "}, "blood-donation": {"en": "Blood Donation", "ar": "التبرع بالدم"}, "blood-donation-info": { "en": "Through this service, you can register your name as a blood donor where the blood bank in the Habib Medical Group will communicate you in case of need for blood type.", - "ar": "عن طريق هذه الخدمة تستطيع تسجيل اسمك كمتبرع بالدم حيث سيتم التواصل معك عن طريق بنك الدم في مجموعة الحبيب الطبية في حال الحاجة الى فصيلة الدم ." + "ar": "عن طريق هذه الخدمة تستطيع تسجيل اسمك كمتبرع بالدم حيث سيتم التواصل معك عن طريق بنك الدم في مجموعة الحبيب الطبية في حال الحاجة الى فصيلة الدم." }, - "blood-instruction": {"en": "Enter the required information, In order to register for Blood Donation Service", "ar": "ادخل المعلومات المطلوبة للتسجيل بخدمة التبرع بالدم"}, + "blood-instruction": {"en": "Enter the required information, in order to register for Blood Donation Service", "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", + "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", "ar": "عزيز العميل لا يوجد اتصال بالإنترنت, هل تريد الاتصال بشبكة مستشفى د. سليمان الحبيب لاستخدام التطبيق. يجب عليك ان تكون في نطاق شبكة المستشفى" }, "failedToAccessHmgServices": {"en": "Connected with HMG Network,\n\nBut failed to access HMG services", "ar": "Connected with HMG Network,\n\nBut failed to access HMG services"}, - "offerAndPackages": {"en": "Offers And Packages", "ar": "العروض والباقات"}, + "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": "النتائج التراكمية"}, "view_flow_chart": {"en": "View Flowchart", "ar": "النتائج التراكمية"}, - "value": {"en": "Value", "ar": "القيمة"}, "range": {"en": "Range", "ar": "المدى"}, "out-patient": {"en": "Out Patient", "ar": "عيادات خارجية"}, @@ -866,7 +846,7 @@ const Map localizedValues = { "info-signs": { "en": "This service allows you to view all vital signs were performed in the Habib Medical Group, e.x (height, weight, body mass index, heart rate, etc.) as well shows some statistics charts.", "ar": - "خدمة المؤشرات الحيوية: هذه الخدمة تمكنك من الاطلاع على جميع المؤشرات الحيوية على سبيل المثال (الطول، الوزن، مؤشر كتلة الجسم، معدل نبضات القلب الخ..) التي تمت في مجموعة الحبيب الطبية وكذلك رسوم بيانية على مستوى المؤشر." + "خدمة المؤشرات الحيوية: هذه الخدمة تمكنك من الاطلاع على جميع المؤشرات الحيوية على سبيل المثال (الطول، الوزن، مؤشر كتلة الجسم، معدل نبضات القلب الخ.) التي تمت في مجموعة الحبيب الطبية وكذلك رسوم بيانية على مستوى المؤشر." }, "info-advance-payment": { "en": "This service designed so that you can deposit an amount in advance either in your account or in someone else's account with Al Habib Medical Group.", @@ -893,10 +873,10 @@ const Map localizedValues = { "pickup-location": {"en": "Pickup Location", "ar": "نقطة الانطلاق"}, "pickup-spot": {"en": "Pickup Spot", "ar": "نقطة اللقاء"}, "inside-home": {"en": "Inside Home", "ar": "داخل المنزل"}, - "have-appo": {"en": "Do you have an appointment ?", "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-map": {"en": "Select From Map", "ar": "حدد من الخريطة"}, + "select-map": {"en": "Select from Map", "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": "قيمة الضريبة:"}, @@ -908,16 +888,17 @@ const Map localizedValues = { "none": {"en": "None", "ar": "لا شيء"}, "RRT-Summary": {"en": "Summary", "ar": "ملخص الطلب"}, "Rapid-Response-Team": {"en": "Rapid Response Team", "ar": "فريق الاستجابة السريع"}, - "AmountBeforeTax": {"en": "Amount Before Tax:", "ar": "Amount Before Tax:"}, + "AmountBeforeTax": {"en": "Amount Before Tax:", "ar": "المبلغ قبل الضريبة:"}, "ApproximateServiceFee": {"en": "Service fee starting from", "ar": "تبدأ رسوم الخدمة من"}, - "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": "أوافق على الشروط والأحكام"}, + "TaxAmount": {"en": "Tax Amount:", "ar": "مبلغ الضريبة:"}, + "somethingWentWrongTryLater": {"en": "Sorry something went wrong please try again later", "ar": "نعتذر عن خدمتك يرجى المحاولة لاحقا"}, + "TotalAmountPayable": {"en": "Total Amount Payable:", "ar": " إجمالي المبلغ المستحق:"}, + "iAcceptTermsConditions": {"en": "I Accept the Terms and Conditions", "ar": "أوافق على الشروط والأحكام"}, "YouCanPayByTheFollowingOptions": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"}, "RRTDDetails": { - "en": "The RRT service provides medical service for urgent and stable cases, not life-threatening situations or extremities, and the service includes providing medical care from a complete medical team at home.", - "ar": "توفر خدمة فريق الاستجابة السريع RRT خدمه طبيه للحالات المستعجله والمستقره وليست الحالات المهدده للحياه او الاطراف ، وتشمل الخدمه تقديم رعايه طبيه من فريق طبي متكامل بالمنزل." + "en": + "The RRT service provides medical service for urgent and stable cases, not life-threatening situations or extremities, and the service includes providing medical care from a complete medical team at home.", + "ar": "توفر خدمة فريق الاستجابة السريع RRT خدمه طبيه للحالات المستعجله والمستقره وليست الحالات المهدده للحياه او الاطراف ، وتشمل الخدمه تقديم رعايه طبيه من فريق طبي متكامل بالمنزل." }, "rrtService": {"en": "RRT Service", "ar": "خدمة RRT"}, "bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"}, @@ -938,7 +919,6 @@ const Map localizedValues = { "update-succ": {"en": "Successfully updated profile", "ar": "تم تحديث البيانات بنجاح"}, "dental-complains": {"en": "Symptoms", "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": "لا يوجد مواعيد"}, @@ -957,16 +937,14 @@ const Map localizedValues = { "blood-d": {"en": "Blood Donation", "ar": "تبرع بالدم"}, "symptomCheckerTitle": {"en": "Symptom Checker", "ar": "مدقق الأعراض"}, "latest-news": {"en": "Latest News", "ar": "أحدث الأخبار"}, - "our-location": {"en": "Our Locations", "ar": "موقعنا"}, + "our-location": {"en": "Our Locations", "ar": "مواقعنا"}, "pharmacies": {"en": "Pharmacies", "ar": "الصيدليات"}, "hospitals": {"en": "Hospitals", "ar": "المستشفيات"}, "wallet": {"en": "Wallet", "ar": "محفظة نقود"}, "hmg": {"en": "Al Habib", "ar": "الحبيب"}, - "requested": {"en": "Requested", "ar": "مطلوب"}, "ready": {"en": "Ready", "ar": "جاهز"}, "completed": {"en": "Completed", "ar": "مكتمل"}, - "request-medical-report": {"en": "Request medical report", "ar": "طلب تقرير طبي"}, "insur-cards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"}, 'labResult': {"en": "Lab results", "ar": "نتائج التحاليل المخبرية"}, @@ -1013,14 +991,14 @@ const Map localizedValues = { "camera": {"en": "Camera", "ar": "كاميرا"}, "med-report": {"en": "Medical Reports", "ar": "التقارير الطبية"}, "new-med-report": {"en": "Requests", "ar": "الطلبات"}, - "requestReport": {"en": "Request a report", "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": "تم تنفيذ طلبك بنجاح"}, "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": "رقم سياسات"}, + "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": "غير موافق، هذه المعلومات غير الصحيحة"}, "expiry-date": {"en": "Expiry Date", "ar": "تاريخ انتهاء الصلاحية"}, @@ -1043,12 +1021,9 @@ const Map localizedValues = { "scan-now": {"en": "If you have a card/Document Scan now", "ar": "إذا كانت لديك بطاقة / مستند ارفقها الان"}, "liveCare": {"en": "Live Care", "ar": "لايف كير"}, "topBrands": {"en": "Top Brands", "ar": "اعلى العلامات التجارية"}, - "notifyMe": {"en": "notify me", "ar": "اعلمني"}, "specification": {"en": "Specification", "ar": "تخصيص"}, - - "availability": {"en": "Availability", "ar": "التوفر"}, - + "availability": {"en": "Availability", "ar": "متوفر في"}, "vaccination": {"en": "Vaccination", "ar": "جدول التطعيمات"}, "welcomeBack": {"en": "Welcome back", "ar": "مرحبا مرة أخرى"}, "quantitySize": {"en": "Quantity", "ar": "كميه"}, @@ -1058,15 +1033,13 @@ const Map localizedValues = { "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", "ar": " أوافق على شروط الخدمة وألتزم بها دون قيد أو شرط"}, + "pharmacyServiceTermsCondition": {"en": "I agree with the terms of service and I adhere to them unconditionally", "ar": " موافق على شروط الخدمة وألتزم بها دون قيد أو شرط"}, "Year": {"en": "YEAR", "ar": "السنة"}, "Month": {"en": "MONTH", "ar": "الشهر"}, "point": {"en": "POINT", "ar": "النقاط"}, "riyal": {"en": "RIYAL", "ar": "الريال"}, "termOfService": {"en": "Terms of service", "ar": "شروط الخدمة"}, "shoppingCart": {"en": "Shopping Cart", "ar": "عربة التسوق"}, - "add-child": {"en": "Add New Child", "ar": "اضافة طفل"}, "child-name": {"en": "Child Name", "ar": "اسم الطفل"}, "childDob": {"en": "Birth Date", "ar": "تاريخ الولادة"}, @@ -1077,21 +1050,20 @@ const Map localizedValues = { "referralDate": {"en": "Referral Date", "ar": "تاريخ الإحالة"}, "patientName": {"en": "Patient Name", "ar": "اسم المريض"}, "referralNumber": {"en": "Referral Number", "ar": "رقم الإحالة"}, - "referralDetails": {"en": "Referral Details", "ar": "تفاصيل الإحالة"}, "requestID": {"en": "Req ID", "ar": " رقم الطلب"}, "OrderStatus": {"en": "Status", "ar": "الحاله"}, "pickupDate": {"en": "Pickup Date", "ar": "التاريخ"}, "serviceName": {"en": "Service Name", "ar": " اسم الخدمة"}, "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": "هل أنت واثق!! تريد إلغاء هذا الطلب"}, + "coveredService": {"en": "Covered Services: ", "ar": " الخدمات المغطاة: "}, + "selectedService": {"en": "Selected Services: ", "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": "الرجاء إدخال عنوان بريد صحيح"}, + "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.", "ar": "تم ارسال جدول التطعيمات "}, "add-instructions": {"en": "Add the child's information below to recieve the schedule of vaccinations.", "ar": "أضف معلومات الطفل لاستلام جدول التطعيمات"}, @@ -1101,25 +1073,21 @@ const Map localizedValues = { "en": "The referral request has been submitted successfully, you will be contacted ASAP to complete the process. Referral request no is ", "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": "تم تحديث البريد الالكتروني"}, - "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": "تتبع السائق"}, "NearestErDesc": { - "en": "\nThis service Displays nearest branch\n among all the branches of All Habib \n medical Group based on your current Location", + "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الحبيب الطبية بناءً على موقعك الحالي." }, - "NearestEr": {"en": "Nearest ER", "ar":"اقرب طوارئ"}, + "NearestEr": {"en": "Nearest ER", "ar": "اقرب طوارئ"}, "infoCMC": { "en": "Through this service, you can request a set of tests that help you and your doctor to understand the current health condition and then identify potential risks.", "ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة" @@ -1133,31 +1101,26 @@ const Map localizedValues = { "reqId": {"en": "Request ID:", "ar": " رقم الطلب"}, "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": " الفحص من داخل السيارة"}, "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 proceed to view the schedule.", + "ar": " يرجى التأكد من تحديث عنوان البريد الإلكتروني والمتابعة لعرض الجدول" }, "add-new-child": {"en": "ADD NEW CHILD", "ar": "إضافة طفل جديد"}, - - "send-child-email-msg": {"en": "Send the child's schedule to the email", "ar": "أرسل جدول الطفل إلى البريد الإلكتروني"}, - + "send-child-email-msg": {"en": "Send the child's schedule to the email", "ar": "أرسل جدول التطعيمات إلى البريد الإلكتروني"}, "vaccination-add-child-msg": {"en": "Add the child's information below to receive the schedule of vaccinations.", "ar": "أضف معلومات الطفل أدناه للحصول على جدول التطعيمات."}, "child_added_successfully": {"en": "Child added successfully", "ar": "تمت إضافة الطفل بنجاح"}, "bloodSugar": {"en": "Blood", "ar": "السكر في الدم"}, - "sugar": {"en": "Sugar", "ar": ""}, + "sugar": {"en": "Sugar", "ar": "السكر"}, "bloodCholesterol": {"en": "Blood", "ar": " الكولسترول في الدم"}, - - "cholesterol": {"en": "Cholesterol", "ar": ""}, + "cholesterol": {"en": "Cholesterol", "ar": " الكولسترول"}, "triglycerides": {"en": "Triglycerides", "ar": "الدهون الثلاثية"}, - - "fatInBlood": {"en": "Fat In Blood", "ar": ""}, - "convertFrom": {"en": "Convert From", "ar": "تحويل من"}, - "calculate": {"en": "calculate", "ar": "حساب"}, + "fatInBlood": {"en": "Fat in Blood", "ar": ""}, + "convertFrom": {"en": "Convert from", "ar": "تحويل من"}, + "calculate": {"en": "calculate", "ar": "احسب"}, "enterReadingValue": {"en": "Enter the reading value", "ar": "ادخل القيمة"}, "result": {"en": "Result", "ar": "النتيجة"}, "sort": {"en": "Sort", "ar": "فرز"}, @@ -1184,16 +1147,14 @@ const Map localizedValues = { "measure-unit": {"en": "Measure unit", "ar": "وحدة القياس"}, "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", "ar": "أدخل المعلومات المطلوبة ، للتسجيل في خدمة التبرع بالدم"}, + "bloodD-enter-desc": {"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": "موعد زيارة للمستشفى"}, - "videoAppo": {"en": "Video Call Appointment", "ar": "موعد اتصال فيديو"}, - "generalHealth": {"en": "General Health", "ar": "صحة عامة"}, "womanHealth": {"en": "Women's Health", "ar": "صحة المرأة"}, "bmi": {"en": "BMI", "ar": "الكتلة"}, - "bloodType": {"en": "Blood Type:", "ar": ":فصيلة الدم"}, + "bloodType": {"en": "Blood Type:", "ar": "فصيلة الدم"}, "calc-health": {"en": "Calculators", "ar": "الصحية"}, "calories": {"en": "Calories", "ar": "سعرات"}, "bmr": {"en": "BMR", "ar": "معدل الأيض القاعدي"}, @@ -1205,17 +1166,17 @@ const Map localizedValues = { "ovulation": {"en": "Ovulation", "ar": "الإباضة"}, "delivery": {"en": "Delivery", "ar": "الولادة"}, "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'", + "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 وغير مناسب للأطفال والنساء الحوامل أو المرضعات" }, "selectUnit": {"en": "Select Unit", "ar": "اختر الوحدة"}, "feet": {"en": "Feet", "ar": "قدم"}, "pound": {"en": "Pound", "ar": "رطل"}, - "seeListOfDoctor": {"en": "See List Of Doctors", "ar": "انظر قائمة الأطباء"}, + "seeListOfDoctor": {"en": "See List of Doctors", "ar": "انظر قائمة الأطباء"}, "obese": {"en": "Obese", "ar": "سمين"}, "overWeight": {"en": "OverWeight", "ar": "وزن زائد"}, "healthy": {"en": "Healthy", "ar": "صحي"}, - "underWeight": {"en": "UnderWeight", "ar": "نقص الوزن"}, + "underWeight": {"en": "UnderWeight", "ar": "وزن ناقص"}, "bmiCalcMsgObese": { "en": "A BMI of over 30 indicates that are heavily overweight. Health may be at risk if not lose weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.", @@ -1239,7 +1200,7 @@ const Map localizedValues = { "ar": "يشير مؤشر كتلة الجسم الذي يقل عن 18.5 إلى أنك تعاني من نقص الوزن ، لذلك قد تحتاج إلى زيادة الوزن. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للبدء." }, - "bariatrics": {"en": "Bariatrics", "ar": "طب السمنة"}, + "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": "اختر أحد الأعراض التالية لتظهر للأطباء المناسبين أو اختر استشارة لإظهار الكل" @@ -1250,7 +1211,7 @@ const Map localizedValues = { "en": "Calculates daily calorie intake based on several factors, like height, weight, age, gender and daily physical activity ", "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": "أدخل قيمة الإنبساط "}, @@ -1258,6 +1219,7 @@ const Map localizedValues = { "today": {"en": "Today", "ar": "اليوم"}, "week": {"en": "Week", "ar": "أسبوع"}, "month": {"en": "Month", "ar": "شهر"}, + "enter_detail_below": {"en": "Enter the details below", "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": "أدخل الاسم هنا"}, @@ -1270,13 +1232,17 @@ const Map localizedValues = { "WaterCalculate": {"en": "Save", "ar": "حفظ"}, "notif-title": {"en": "Water Reminder", "ar": "تذكير"}, "notif-text": {"en": " Don't forget to drink water.", "ar": "لا تنسى شرب الماء"}, - "custom": {"en": "Custom", "ar": "خاص"}, + "custom": {"en": "Custom", "ar": "مخصص"}, "undo": {"en": "Undo", "ar": "تراجع"}, "drinking": {"en": "Drinkning", "ar": "الشرب"}, "remaining": {"en": "Remaining", "ar": "المتبقي"}, + "addCustomAmount": {"en": "Add Custom Amount", "ar": "إضافة مبلغ مخصص"}, + "left": {"en": "Left", "ar": "المتبقي"}, "taken": {"en": "Taken", "ar": " مأخوذ"}, "ml": {"en": "ML", "ar": "مل"}, + "mililitre": {"en": "Mililitre (ml)", "ar": "مليلتر (مل)"}, "l": {"en": "L", "ar": "لتر"}, + "litre": {"en": "Litre (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": "أدخل الكمية بالملليتر"}, @@ -1287,15 +1253,16 @@ const Map localizedValues = { "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", "ar": "الرجاء تفعيل الاشعارات في الاعدادات"}, "verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"}, - "select-location": {"en": "Select Location", "ar": "اختر موقعا"}, + "select-location": {"en": "Select Location", "ar": "اختر الموقع"}, "result-header": {"en": "Get the result in Few Hours", "ar": "احصل على النتيجة خلال عدة ساعات"}, + "please_select_gender": {"en": "Please select gender", "ar": "يرجى تحديد الجنس"}, "covid-info": { "en": "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 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية" }, - "select-appo": {"en": "Kindly select one of the available appointments from below:", "ar": "يرجى اختيار أحد المواعيد المتاحة من أدناه:"}, + "select-appo": {"en": "Kindly select one of the available appointments from below:", "ar": " يرجى اختيار أحد المواعيد المتاحة مما يلي:"}, "covid-alert-header": {"en": "Pay With-in 15 mins to confirm the appointment", "ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد"}, "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​", @@ -1305,7 +1272,7 @@ const Map localizedValues = { "back": {"en": "Back", "ar": "رجوع"}, "get-directions": {"en": "Get Directions", "ar": "احصل على الاتجاهات"}, "selected-location": {"en": "Selected Location:", "ar": "الموقع المحدد:"}, - "test-fee": {"en": "Test Fee", "ar": "رسوم الاختبار"}, + "test-fee": {"en": "Test Fee", "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", "ar": "هي الحصول على استشارة طبية مع طبيب مختص عن طريق اتصال فيديو"}, @@ -1314,7 +1281,7 @@ const Map localizedValues = { "doc-virtual-appo-ins4": {"en": "The doctor will see your medical file", "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", + "en": "** The service is included with some insurance companies according to the terms and conditions with our best wishes for health and wellness", "ar": "** الخدمة مشمولة لدى بعض شركات التامين على حسب الشروط والاحكام مع تمنياتنا لكم بدوام الصحة والعافية" }, "livecare-option-1": {"en": "Get Medical consultation immediately", "ar": "الحصول على الاستشارة فورا"}, @@ -1329,30 +1296,28 @@ const Map localizedValues = { "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": "أدخل رقم التعريف"}, "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 completed.", + "ar": " تتيح لك هذه الخدمة تفعيل حساب برنامج الولاء لكم بعد اكتمال التسجيل. " }, - "pointsToTransfer": {"en": "Point's to Transfer :", "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": "لديك هذا الطلب بالفعل! هل تريد مشاهدته؟"}, "order-overview": {"en": "Order Overview", "ar": "ملخص الطلب"}, "shipping-address": {"en": "Delivery Address", "ar": "عنوان التوصيل"}, - "pharmacy-relogin": {"en": "Your session has timed out, Please try again", "ar": "انتهت مهلة جلسة الخاص بها. يرجى المحاولة مرة أخرى"}, + "pharmacy-relogin": {"en": "Your session has timed out, please try again", "ar": "انتهت مهلة جلسة الخاص بها. يرجى المحاولة مرة أخرى"}, "ancillary-orders": {"en": "Ancillary Orders", "ar": "الأوامر التبعية"}, - "onlineCheckInAgreement": { "en": - "The online check-in is for non-life threatening situationCall the red crescent (number) or go to the nearest emergency department if there are:signs of stroke or heart attack history of seizure or syncope there is limb or life threatening injury picture of severe injuries​", + "The online check-in is for non-life threatening situationCall the red crescent (number) or go to the nearest emergency department if there are: signs of stroke or heart attack history of seizure or syncope there is limb or life threatening injury picture of severe injuries​", "ar": - "تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات  التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة" + "تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة" }, - "MRN": {"en": "MRN", "ar": "ایم آر این"}, + "MRN": {"en": "MRN", "ar": "رقم الملف الطبي"}, "appointment-date": {"en": "Appointment Date", "ar": "تاريخ الموعد"}, "appointment-no": {"en": "Appointment No", "ar": "رقم الموعد"}, "insurance-id": {"en": "Insurance ID", "ar": "رقم العضويه"}, @@ -1369,23 +1334,21 @@ const Map localizedValues = { "selectRelationship": {"en": "Select Relationship", "ar": "حدد العلاقة"}, "requesterRelationship": {"en": "Requester Relationship", "ar": "علاقة الطالب"}, "newReferral": {"en": "New Referral", "ar": "إحالة جديدة"}, - "searchForReferrals": {"en": "Search For Referrals", "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 ", "ar": "وقت الانتظار المتوقع لبدء استشارة لايف كير"}, "er-consult-fee": {"en": "Consultation Fee", "ar": "رسوم الاستشارة"}, "insured-patient": {"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": "يمكنك الدفع عن طريق الخيارات التالية:"}, - "please-accept-terms": {"en": "Please accept terms & conditions to continue", "ar": "يرجى قبول الشروط والأحكام للمتابعة"}, - "type": {"en": "Type", "ar": "اكتب"}, "info-ereferral": { "en": - "This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, By filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)", + "This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, by filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)", "ar": - "تتيح لك هذه الخدمة إرسال طلب إحالة من أي من مقدمي الرعاية الصحية سواء داخل المملكة العربية السعودية أو خارجها إلى أي من مستشفيات HMG ، عن طريق ملء بعض بيانات المريض وإرفاق التقارير الطبية ، علاوة على ذلك يمكنك تتبع حالة الطلب ( قيد المعالجة ، مقبول أو مرفوض)" + "تتيح لك هذه الخدمة إرسال طلب إحالة من أي من مقدمي الرعاية الصحية سواء داخل المملكة العربية السعودية أو خارجها إلى أي من مستشفيات HMG ، عن طريق ملء بعض بيانات المريض وإرفاق التقارير الطبية ، علاوة على ذلك يمكنك تتبع حالة الطلب (قيد المعالجة ، مقبول أو مرفوض)" }, "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.", @@ -1394,16 +1357,16 @@ const Map localizedValues = { "my-invoice": {"en": "My Invoice", "ar": "فواتيري"}, "invoice-list": {"en": "Invoices List", "ar": "فائمة الفواتير"}, "thisItemIsNotAvailable": {"en": "This item is not available", "ar": "هذا العنصر غير متوفر"}, - "beforeAfterImages": {"en": "Before After Images", "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": "لا داعي للانتظار او الحضور يمكنك الان الحصول على الاستشارة عن طريق مكالمة الفيديو ( خدمة لايف كير) في العيادة وسوف يقوم الطبيب بالتواصل معك فورا" + "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-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": "اتصال فيديو لا احتاج الحضور الى العيادة"}, @@ -1413,7 +1376,7 @@ const Map localizedValues = { "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": "الرجاء إدخال رقم جواز سفر صالح"}, + "valid-passport-number": {"en": "Please enter valid passport number", "ar": "الرجاء إدخال رقم جواز سفر صحيح"}, "continue-plan": {"en": "Continue with the treatment plan?", "ar": "إكمال الخطة العلاجية؟"}, "about-app": {"en": "About the app", "ar": "عن التطبيق"}, "about-points": { @@ -1476,7 +1439,6 @@ const Map localizedValues = { "ar": "تم تصميم هذه الخدمة لمساعدتك في تحديد وتتبع كميات المياه التي يتوجب شربها بشكل يومي. كما توفر هذه الخدمة تذكيرات الجدول الزمني وتقدم تحليلًا إحصائيًا لمقدار ما استهلكته خلال اليوم أو الأسبوع أو الشهر." }, - "sys/dias": {"en": "SBP/DBP", "ar": "إنقباض/إنبساط"}, "arm": {"en": "Arm", "ar": "الذراع"}, "remove-measure": {"en": "Remove this measure", "ar": "إزالة هذا القياس؟"}, @@ -1490,10 +1452,10 @@ const Map localizedValues = { "paid": {"en": "Paid", "ar": "المدفوع"}, "dental-insurance": {"en": "Insurance", "ar": "التأمين"}, "drivethru-appo": {"en": "Drive Thru Appointment", "ar": "موعد من داخل السيارة"}, - "upcoming-QR-NFC": {"en": "Use the NFC or QR Code to Check-In", "ar": "استخدم NFC أو رمزQR لتسجيل الوصول"}, + "upcoming-QR-NFC": {"en": "Use the NFC or QR Code to Check-In", "ar": "استخدم NFC أو رمزQR لتسجيل الوصول"}, "ovulation-desc": {"en": "Calculates Ovulation Period", "ar": "حساب افضل فترة للحمل بناءاً على تاريخ اخر دورة شهرية"}, - "cycle-label": {"en": "Average Cycle Length (usually 28 days):", "ar": "متوسط الدورة الشهرية 28 يوم : "}, - "luteal-label": {"en": "Average Luteal Phase Length (usually 14 days):", "ar": "متوسط الأيام ما بعد الاباضة عادة 14 يوما : "}, + "cycle-label": {"en": "Average Cycle Length (usually 28 days):", "ar": "متوسط الدورة الشهرية 28 يوم: "}, + "luteal-label": {"en": "Average Luteal Phase Length (usually 14 days):", "ar": "متوسط الأيام ما بعد الاباضة عادة 14 يوما: "}, "pregnancy-title": {"en": "Delivery Due Date", "ar": "تاريخ الولادة"}, "pregnancy-desc": { "en": "Congratulations, you are pregnant! Now when will the new baby arrive? To estimate the due date, enter the date when the last menstrual period began (the first day), then click calculate.", @@ -1507,19 +1469,19 @@ const Map localizedValues = { "firstTri": {"en": "First Trimester Ends (12 weeks):", "ar": "تاريخ انتهاء الثلث الأول 12 اسبوع: "}, "secondTri": {"en": "Second Trimester Ends (27 weeks):", "ar": "تاريخ انتهاء الثلث الثاني 27 اسبوع: "}, "thirdTri": {"en": "Third Trimester, Estimated Due Date (40 weeks):", "ar": "تاريخ احتمال الولادة 40 اسبوع:"}, - "seeDoctorsList": {"en": "See List Of Doctors", "ar": "اعرض قائمة الأطباء"}, - "covidQuestionnaire": { "en": "Please answer below questionnaire:", "ar": "الرجاء الإجابة على الاستبيان أدناه:" }, - "covidBookAppo": { "en": "Booking Appointment For: ", "ar": "موعد الحجز لـ: " }, - "emptySchedule": { "en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب" }, - "serviceNotAvailable": { "en": "Dear, this service is not available now, please try again later", "ar": "عزيزي المراجع, هذه الخدمة غير متوفرة الان يرجى المحاوله لاحقا"}, + "seeDoctorsList": {"en": "See List of Doctors", "ar": "اعرض قائمة الأطباء"}, + "covidQuestionnaire": {"en": "Please answer below questionnaire:", "ar": "الرجاء الإجابة على الاستبيان أدناه:"}, + "covidBookAppo": {"en": "Booking Appointment for: ", "ar": "موعد الحجز لـ: "}, + "emptySchedule": {"en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب"}, + "serviceNotAvailable": {"en": "Dear, this service is not available now, please try again later", "ar": "عزيزي المراجع, هذه الخدمة غير متوفرة الان يرجى المحاوله لاحقا"}, "doctorScheduleNot": {"en": "Doctor schedule not available", "ar": "جدول الطبيب غير متوفر"}, - "RRTRequestSuccess": { "en": "Request has been sent successfully, You will be contacted soon.", "ar": "تم إرسال الطلب بنجاح ، وسيتم الاتصال بك باسرع وقت ممكن" }, - "rateDoctorAppo": { "en": "Rate DR & Appointment", "ar": "معدل الدكتور والتعيين" }, - "invoice": { "en": "Invoice", "ar": "الفاتورة" }, - "requestedDate": { "en": "Requested Date", "ar": "التاريخ " }, - "callDuration": { "en": "Call Duration", "ar": "مدة الاتصال" }, - "alreadyRated": { "en": "This appointment has been previously evaluated.", "ar": "تم تقييم هذا الموعد مسبقاً" }, - "insuranceCompany": { "en": "Insurance Company", "ar": "شركة تأمين" }, + "RRTRequestSuccess": {"en": "Request has been sent successfully, you will be contacted soon.", "ar": "تم إرسال الطلب بنجاح ، وسيتم الاتصال بك باسرع وقت ممكن"}, + "rateDoctorAppo": {"en": "Rate DR & Appointment", "ar": "تقييم الطبيب والموعد"}, + "invoice": {"en": "Invoice", "ar": "الفاتورة"}, + "requestedDate": {"en": "Reqeusted Date", "ar": "التاريخ "}, + "callDuration": {"en": "Call Duration", "ar": "مدة الاتصال"}, + "alreadyRated": {"en": "This appointment has been previously evaluated.", "ar": "تم تقييم هذا الموعد مسبقاً"}, + "insuranceCompany": {"en": "Insurance Company", "ar": "شركة تأمين"}, "preferredBranch": {"en": "Preferred Branch", "ar": "الفرع المفضل"}, "selectPreferredBranch": {"en": "Select Preferred Branch", "ar": "اختر الفرع المفضل"}, "patientLocated": {"en": "Where the patient located", "ar": "اين موقع المريض"}, @@ -1528,4 +1490,9 @@ const Map localizedValues = { "insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المريض تامين؟"}, "rateDoctor": {"en": "Rate Doctor", "ar": "تقييم الطبيب"}, "rateAppointment": {"en": "Rate Appointment", "ar": "سعر التعيين"}, + "noInsuranceCardAttached": {"en": "Please attach your insurance card image to continue", "ar": "يرجى إرفاق صورة بطاقة التأمين الخاصة بك للمتابعة"}, + "bodyMassIndex": {"en": "Body Mass Index is: ", "ar": "مؤشر كتلة الجسم هو:"}, + "noSlotsError": {"en": "No appointments available for selected date", "ar": "لا توجد مواعيد متاحة للتاريخ المحدد"}, + "selectSlot": {"en": "Please select Time Slot to continue", "ar": "الرجاء تحديد فترة زمنية للمتابعة"}, + "years": {"en": "Years", "ar": "سنوات"}, }; diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index 752938ad..c256d0c1 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -21,6 +21,7 @@ const THEME_VALUE = 'is_vibration'; const MAIN_USER = 'main-user'; const PHARMACY_LAST_VISITED_PRODUCTS = 'last-visited'; const PHARMACY_CUSTOMER_ID = 'costumer-id'; +const PHARMACY_CUSTOMER_OBJECT = 'pharmacy-customer-object'; const IS_ROBOT_VISIBLE = 'robot-visible'; const IS_ROBOT_INIT = 'robot-init'; const HMG_GEOFENCES = 'hmg-geo-fences'; @@ -34,3 +35,4 @@ const H2O_REMINDER = 'H2O_REMINDER'; const LIVECARE_CLINIC_DATA = 'LIVECARE_CLINIC_DATA'; const DOCTOR_SCHEDULE_DATE_SEL = 'DOCTOR_SCHEDULE_DATE_SEL'; const APPOINTMENT_HISTORY_MEDICAL = 'APPOINTMENT_HISTORY_MEDICAL'; +const CLINICS_LIST = 'CLINICS_LIST'; diff --git a/lib/core/model/contactus/get_patientI_cprojects.dart b/lib/core/model/contactus/get_patientI_cprojects.dart index e9a6b712..556affd2 100644 --- a/lib/core/model/contactus/get_patientI_cprojects.dart +++ b/lib/core/model/contactus/get_patientI_cprojects.dart @@ -11,6 +11,7 @@ class GetPatientICProjectsModel { dynamic editedOn; dynamic editedBy; bool isActive; + dynamic distanceInKilometers; GetPatientICProjectsModel( {this.id, @@ -22,6 +23,7 @@ class GetPatientICProjectsModel { this.createdBy, this.editedOn, this.editedBy, + this.distanceInKilometers, this.isActive}); GetPatientICProjectsModel.fromJson(Map json) { @@ -35,6 +37,7 @@ class GetPatientICProjectsModel { editedOn = json['EditedOn']; editedBy = json['EditedBy']; isActive = json['IsActive']; + distanceInKilometers = json['DistanceInKilometers']; } Map toJson() { @@ -49,6 +52,7 @@ class GetPatientICProjectsModel { data['EditedOn'] = this.editedOn; data['EditedBy'] = this.editedBy; data['IsActive'] = this.isActive; + data['DistanceInKilometers'] = this.distanceInKilometers; return data; } } \ No newline at end of file diff --git a/lib/core/model/prescriptions/perscription_pharmacy.dart b/lib/core/model/prescriptions/perscription_pharmacy.dart index 3adaef7e..9c9bec08 100644 --- a/lib/core/model/prescriptions/perscription_pharmacy.dart +++ b/lib/core/model/prescriptions/perscription_pharmacy.dart @@ -7,7 +7,7 @@ class PharmacyPrescriptions { int projectID; String setupID; String locationDescription; - Null locationDescriptionN; + dynamic locationDescriptionN; String itemDescription; Null itemDescriptionN; String alias; @@ -16,7 +16,7 @@ class PharmacyPrescriptions { Null companybarcode; int cityID; String cityName; - int distanceInKilometers; + dynamic distanceInKilometers; String latitude; int locationType; String longitude; diff --git a/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart b/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart index 739bb838..4b099f5b 100644 --- a/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart +++ b/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart @@ -1,6 +1,6 @@ class RequestGetListPharmacyForPrescriptions { - int latitude; - int longitude; + dynamic latitude; + dynamic longitude; double versionID; int channel; int languageID; diff --git a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart index 260b3a92..bd2e94e4 100644 --- a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart +++ b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart @@ -1,16 +1,14 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:intl/intl.dart'; -import '../../../locator.dart'; import '../base_service.dart'; class CustomerAddressesService extends BaseService { List addressesList = List(); - CustomerInfo customerInfo; + CustomerInfo customerInfo = new CustomerInfo(); Future addAddressInfo({AddNewAddressRequestModel addNewAddressRequestModel}) async { addNewAddressRequestModel.customer.email = customerInfo.email; @@ -40,7 +38,8 @@ class CustomerAddressesService extends BaseService { Future getCustomerAddresses() async { Map queryParams = {'fields': 'addresses'}; hasError = false; - await baseAppClient.getPharmacy("$BASE_PHARMACY_URL$GET_CUSTOMER_ADDRESSES${customerInfo.customerId}", onSuccess: (dynamic response, int statusCode) { + var customerID = await sharedPref.getObject(PHARMACY_CUSTOMER_ID); + await baseAppClient.getPharmacy("$BASE_PHARMACY_URL$GET_CUSTOMER_ADDRESSES$customerID", onSuccess: (dynamic response, int statusCode) { addressesList.clear(); response["customers"][0]["addresses"].forEach((data) { addressesList.add(AddressInfo.fromJson(data)); diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index cf75eca9..b0c0925f 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -124,7 +124,7 @@ class BaseAppClient { if (statusCode < 200 || statusCode >= 400 || json == null) { onFailure('Error While Fetching data', statusCode); } else { - // var parsed = json.decode(response.body.toString()); + var decoded = utf8.decode(response.bodyBytes); var parsed = json.decode(utf8.decode(response.bodyBytes)); if (parsed['Response_Message'] != null) { onSuccess(parsed, statusCode); @@ -569,7 +569,7 @@ class BaseAppClient { var model = Provider.of(AppGlobal.context, listen: false); _vitalSignService.weightKg = ""; _vitalSignService.heightCm = ""; - model.setState(0, false); + model.setState(0, false, null); Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); } diff --git a/lib/core/service/contactus/livechat_service.dart b/lib/core/service/contactus/livechat_service.dart index ba4cc8b2..0029e1e9 100644 --- a/lib/core/service/contactus/livechat_service.dart +++ b/lib/core/service/contactus/livechat_service.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects.dart'; import '../base_service.dart'; @@ -12,6 +13,9 @@ class LiveChatService extends BaseService { Future getAllLiveChatOrders() async { hasError = false; body['List_PatientICProjects'] = false; + body['Latitude'] = await this.sharedPref.getDouble(USER_LAT); + body['Longitude'] = await this.sharedPref.getDouble(USER_LONG); + await baseAppClient.post(GET_LIVECHAT_REQUEST, onSuccess: (dynamic response, int statusCode) { LivechatModelList.clear(); diff --git a/lib/core/service/feedback/feedback_service.dart b/lib/core/service/feedback/feedback_service.dart index b36ebee3..d6da1ee3 100644 --- a/lib/core/service/feedback/feedback_service.dart +++ b/lib/core/service/feedback/feedback_service.dart @@ -41,10 +41,13 @@ class FeedbackService extends BaseService { _requestInsertCOCItem.deviceInfo = Platform.localHostname; _requestInsertCOCItem.resolution = "400x847"; _requestInsertCOCItem.projectID = 0; + _requestInsertCOCItem.tokenID = "C0c@@dm!n?T&A&A@Barcha202029582948"; _requestInsertCOCItem.identificationNo = int.parse(user.patientIdentificationNo); if (BASE_URL.contains('uat')) { _requestInsertCOCItem.forDemo = true; + } else { + _requestInsertCOCItem.forDemo = false; } final Map body = _requestInsertCOCItem.toJson(); diff --git a/lib/core/service/medical/BloodSugarService.dart b/lib/core/service/medical/BloodSugarService.dart index 84b932e8..9c8e9cd9 100644 --- a/lib/core/service/medical/BloodSugarService.dart +++ b/lib/core/service/medical/BloodSugarService.dart @@ -18,15 +18,14 @@ class BloodSugarService extends BaseService { Future getBloodSugar() async { hasError = false; Map body = Map(); + monthDiabtectResultAverageList.clear(); + weekDiabtectResultAverageList.clear(); + yearDiabtecResultAverageList.clear(); + monthDiabtecPatientResult.clear(); + weekDiabtecPatientResult.clear(); + yearDiabtecPatientResult.clear(); body['isDentalAllowedBackend'] = false; await baseAppClient.post(GET_DIABETIC_RESULT_AVERAGE, onSuccess: (dynamic response, int statusCode) { - monthDiabtectResultAverageList.clear(); - weekDiabtectResultAverageList.clear(); - yearDiabtecResultAverageList.clear(); - - monthDiabtecPatientResult.clear(); - weekDiabtecPatientResult.clear(); - yearDiabtecPatientResult.clear(); response['List_MonthDiabtectResultAverage'].forEach((item) { monthDiabtectResultAverageList.add(MonthDiabtectResultAverage.fromJson(item)); @@ -47,10 +46,10 @@ class BloodSugarService extends BaseService { Future getDiabtecResults() async { hasError = false; + monthDiabtecPatientResult.clear(); + weekDiabtecPatientResult.clear(); + yearDiabtecPatientResult.clear(); await baseAppClient.post(GET_DIABTEC_RESULT, onSuccess: (dynamic response, int statusCode) { - monthDiabtecPatientResult.clear(); - weekDiabtecPatientResult.clear(); - yearDiabtecPatientResult.clear(); response['List_MonthDiabtecPatientResult'].forEach((item) { monthDiabtecPatientResult.add(DiabtecPatientResult.fromJson(item)); diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart index cdd355c3..ce91be53 100644 --- a/lib/core/service/medical/prescriptions_service.dart +++ b/lib/core/service/medical/prescriptions_service.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/perscription_pharmacy.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; @@ -119,6 +120,13 @@ class PrescriptionsService extends BaseService { Future getListPharmacyForPrescriptions({int itemId}) async { hasError = false; requestGetListPharmacyForPrescriptions.itemID = itemId; + + requestGetListPharmacyForPrescriptions.latitude = await sharedPref.getDouble(USER_LAT); + requestGetListPharmacyForPrescriptions.longitude = await sharedPref.getDouble(USER_LONG); + + // requestGetListPharmacyForPrescriptions.latitude = 24.709863; + // requestGetListPharmacyForPrescriptions.longitude = 46.668348; + pharmacyPrescriptionsList.clear(); await baseAppClient.post(GET_PHARMACY_LIST, onSuccess: (dynamic response, int statusCode) { pharmacyPrescriptionsList.clear(); diff --git a/lib/core/service/parmacyModule/parmacy_module_service.dart b/lib/core/service/parmacyModule/parmacy_module_service.dart index 0a87000d..58ce50f5 100644 --- a/lib/core/service/parmacyModule/parmacy_module_service.dart +++ b/lib/core/service/parmacyModule/parmacy_module_service.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; @@ -12,6 +13,7 @@ class PharmacyModuleService extends BaseService { bool isFinished = true; String errorMsg = ''; String url = ""; + CustomerInfo customerInfo; List bannerItems = List(); List manufacturerList = List(); @@ -51,8 +53,13 @@ class PharmacyModuleService extends BaseService { hasError = false; try { await baseAppClient.getPharmacy(PHARMACY_CREATE_CUSTOMER, onSuccess: (dynamic response, int statusCode) async { - if (!response['IsRegistered']) {} - await generatePharmacyToken(); + if (!response['IsRegistered']) { + + } else { + customerInfo = CustomerInfo.fromJson(response); + await sharedPref.setObject(PHARMACY_CUSTOMER_ID, customerInfo.customerId); + } + // await generatePharmacyToken(); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart index d7e290d0..de007d67 100644 --- a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart @@ -122,16 +122,13 @@ class CMCViewModel extends BaseViewModel { Future getCustomerInfo() async { setState(ViewState.Busy); await _pharmacyModuleService.generatePharmacyToken(); - // await _pharmacyModuleService.createUser(); if (_customerAddressesService.hasError) { error = _customerAddressesService.error; await _pharmacyModuleService.createUser(); - // await _customerAddressesService.getCustomerInfo(); setState(ViewState.ErrorLocal); } else { await _pharmacyModuleService.createUser(); - // await _customerAddressesService.getCustomerInfo(); await getCustomerAddresses(); } } 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 47e6815e..91465b11 100644 --- a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart @@ -105,16 +105,13 @@ class HomeHealthCareViewModel extends BaseViewModel { Future getCustomerInfo() async { setState(ViewState.Busy); await _pharmacyModuleService.generatePharmacyToken(); - // await _pharmacyModuleService.createUser(); if (_customerAddressesService.hasError) { error = _customerAddressesService.error; await _pharmacyModuleService.createUser(); - // await _customerAddressesService.getCustomerInfo(); setState(ViewState.ErrorLocal); } else { - // await _pharmacyModuleService.createUser(); - await _customerAddressesService.getCustomerInfo(); + await _pharmacyModuleService.createUser(); await getCustomerAddresses(); } } diff --git a/lib/core/viewModels/er/rrt-view-model.dart b/lib/core/viewModels/er/rrt-view-model.dart index dcd1f5c1..19179313 100644 --- a/lib/core/viewModels/er/rrt-view-model.dart +++ b/lib/core/viewModels/er/rrt-view-model.dart @@ -115,6 +115,7 @@ class RRTViewModel extends BaseViewModel { var success = false; await _service.baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER, body: body, onSuccess: (response, statusCode) { success = true; + rrtServiceData.pendingOrders.remove(order); }, onFailure: (error, statusCode) { AppToast.showErrorToast(message: error); success = false; @@ -151,14 +152,27 @@ class RRTViewModel extends BaseViewModel { Future getCustomerInfo() async { setState(ViewState.Busy); await _pharmacy_service.generatePharmacyToken(); + if (_customerAddressesService.hasError) { error = _customerAddressesService.error; await _pharmacy_service.createUser(); - await getCustomerAddresses(); setState(ViewState.ErrorLocal); } else { - await _customerAddressesService.getCustomerInfo(); + await _pharmacy_service.createUser(); await getCustomerAddresses(); } + + + // setState(ViewState.Busy); + // await _pharmacy_service.generatePharmacyToken(); + // if (_customerAddressesService.hasError) { + // error = _customerAddressesService.error; + // await _pharmacy_service.createUser(); + // await getCustomerAddresses(); + // setState(ViewState.ErrorLocal); + // } else { + // await _customerAddressesService.getCustomerInfo(); + // await getCustomerAddresses(); + // } } } diff --git a/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart b/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart index 455b5934..0b6d7a1d 100644 --- a/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart +++ b/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart @@ -20,6 +20,7 @@ class PrescriptionDeliveryViewModel extends BaseViewModel { Future getCustomerInfo() async { setState(ViewState.Busy); await _pharmacyModuleService.generatePharmacyToken().then((value) async { + // await _customerAddressesService.getCustomerInfo(); await _customerAddressesService.getCustomerInfo(); }); if (_customerAddressesService.hasError) { diff --git a/lib/core/viewModels/medical/ask_doctor_view_model.dart b/lib/core/viewModels/medical/ask_doctor_view_model.dart index 7890fb3a..d060db1f 100644 --- a/lib/core/viewModels/medical/ask_doctor_view_model.dart +++ b/lib/core/viewModels/medical/ask_doctor_view_model.dart @@ -39,7 +39,7 @@ class AskDoctorViewModel extends BaseViewModel { }); } else { setState(ViewState.Idle); - AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).askDocEmpty); + // AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).askDocEmpty); } } diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart index 568d2ed8..2f86e5a1 100644 --- a/lib/core/viewModels/medical/prescriptions_view_model.dart +++ b/lib/core/viewModels/medical/prescriptions_view_model.dart @@ -31,6 +31,11 @@ class PrescriptionsViewModel extends BaseViewModel { List get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList; List get prescriptionsOrderList => filterType == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital; + + List prescriptionsOrderListByValue(filterValue) { + return filterValue == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital; + } + get isMedDeliveryAllowed => _prescriptionsService.isMedDeliveryAllowed; getPrescriptions() async { setState(ViewState.Busy); diff --git a/lib/core/viewModels/notifications_view_model.dart b/lib/core/viewModels/notifications_view_model.dart index 685b4a7f..80e89edb 100644 --- a/lib/core/viewModels/notifications_view_model.dart +++ b/lib/core/viewModels/notifications_view_model.dart @@ -1,39 +1,48 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_request_model.dart'; import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart'; import 'package:diplomaticquarterapp/core/model/notifications/mark_message_as_read_request_model.dart'; import 'package:diplomaticquarterapp/core/service/notifications_service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; import '../../locator.dart'; import 'base_view_model.dart'; class NotificationViewModel extends BaseViewModel { NotificationService _notificationService = locator(); + ToDoCountProviderModel model = Provider.of(AppGlobal.context); - List get notifications => - _notificationService.notificationsList; + List get notifications => _notificationService.notificationsList; - Future getNotifications( - GetNotificationsRequestModel getNotificationsRequestModel, BuildContext context) async { - if(getNotificationsRequestModel.currentPage == 0) - setState(ViewState.Busy); + Future getNotifications(GetNotificationsRequestModel getNotificationsRequestModel, BuildContext context) async { + if (getNotificationsRequestModel.currentPage == 0) setState(ViewState.Busy); - await _notificationService - .getAllNotifications(getNotificationsRequestModel); + await _notificationService.getAllNotifications(getNotificationsRequestModel); if (_notificationService.hasError) { error = _notificationService.error; - setState(ViewState.Error); + setState(ViewState.Error); } else { - setState(ViewState.Idle); + setState(ViewState.Idle); } } Future markAsRead(id) async { // setState(ViewState.Busy); - MarkMessageAsReadRequestModel markMessageAsReadRequestModel = - new MarkMessageAsReadRequestModel(notificationPoolID: id); + MarkMessageAsReadRequestModel markMessageAsReadRequestModel = new MarkMessageAsReadRequestModel(notificationPoolID: id); + final authService = new AuthProvider(); await _notificationService.markAsRead(markMessageAsReadRequestModel); - setState(ViewState.Idle); + await authService.getDashboard().then((value) { + var notificationCount = ''; + notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); + model.setState(model.count, true, notificationCount); + sharedPref.setString(NOTIFICATION_COUNT, notificationCount); + + }); + setState(ViewState.Idle); } -} \ No newline at end of file +} diff --git a/lib/models/Appointments/toDoCountProviderModel.dart b/lib/models/Appointments/toDoCountProviderModel.dart index e44a0ebb..3363471f 100644 --- a/lib/models/Appointments/toDoCountProviderModel.dart +++ b/lib/models/Appointments/toDoCountProviderModel.dart @@ -2,15 +2,19 @@ import 'package:flutter/cupertino.dart'; class ToDoCountProviderModel with ChangeNotifier { int _count; + String _notificationsCount; bool _isShowBadge = false; int get count => _count == null ? 0 : _count; + String get notificationsCount => _notificationsCount == null ? "0" : _notificationsCount; + bool get isShowBadge => _isShowBadge; - void setState(int count, bool isShowBadge) { + void setState(int count, bool isShowBadge, String notifCount) { _count = count; _isShowBadge = isShowBadge; + _notificationsCount = notifCount; notifyListeners(); } -} +} \ No newline at end of file diff --git a/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart b/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart index c1755cc1..b92962eb 100644 --- a/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart +++ b/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart @@ -295,13 +295,21 @@ class GetAllSharedRecordsByStatusList { int iD; int patientID; int responseID; + Null relationshipID; + Null relationship; + Null relationshipN; int regionID; int status; - dynamic isActive; + Null isActive; String editedOn; String createdOn; + int age; String emaiLAddress; + int gender; + String genderDescription; + String genderImage; String mobileNumber; + int patientDataVerified; String patientIdenficationNumber; String patientName; String statusDescription; @@ -310,13 +318,21 @@ class GetAllSharedRecordsByStatusList { {this.iD, this.patientID, this.responseID, + this.relationshipID, + this.relationship, + this.relationshipN, this.regionID, this.status, this.isActive, this.editedOn, this.createdOn, + this.age, this.emaiLAddress, + this.gender, + this.genderDescription, + this.genderImage, this.mobileNumber, + this.patientDataVerified, this.patientIdenficationNumber, this.patientName, this.statusDescription}); @@ -325,13 +341,21 @@ class GetAllSharedRecordsByStatusList { iD = json['ID']; patientID = json['PatientID']; responseID = json['ResponseID']; + relationshipID = json['RelationshipID']; + relationship = json['Relationship']; + relationshipN = json['RelationshipN']; regionID = json['RegionID']; status = json['Status']; isActive = json['IsActive']; editedOn = json['EditedOn']; createdOn = json['CreatedOn']; + age = json['Age']; emaiLAddress = json['EmaiLAddress']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + genderImage = json['GenderImage']; mobileNumber = json['MobileNumber']; + patientDataVerified = json['PatientDataVerified']; patientIdenficationNumber = json['PatientIdenficationNumber']; patientName = json['PatientName']; statusDescription = json['StatusDescription']; @@ -342,13 +366,21 @@ class GetAllSharedRecordsByStatusList { data['ID'] = this.iD; data['PatientID'] = this.patientID; data['ResponseID'] = this.responseID; + data['RelationshipID'] = this.relationshipID; + data['Relationship'] = this.relationship; + data['RelationshipN'] = this.relationshipN; data['RegionID'] = this.regionID; data['Status'] = this.status; data['IsActive'] = this.isActive; data['EditedOn'] = this.editedOn; data['CreatedOn'] = this.createdOn; + data['Age'] = this.age; data['EmaiLAddress'] = this.emaiLAddress; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['GenderImage'] = this.genderImage; data['MobileNumber'] = this.mobileNumber; + data['PatientDataVerified'] = this.patientDataVerified; data['PatientIdenficationNumber'] = this.patientIdenficationNumber; data['PatientName'] = this.patientName; data['StatusDescription'] = this.statusDescription; diff --git a/lib/models/header_model.dart b/lib/models/header_model.dart index f80091f3..b1da8b17 100644 --- a/lib/models/header_model.dart +++ b/lib/models/header_model.dart @@ -1,5 +1,6 @@ class HeaderModel { String doctorName; + int doctorId; String doctorImageURL; List speciality; String invoiceNo; @@ -12,6 +13,6 @@ class HeaderModel { int totalReviews; String email; - HeaderModel(this.doctorName, this.doctorImageURL, this.speciality, this.invoiceNo, this.projectName, this.date, this.time, this.nationalityFlagURL, this.doctorRate, this.actualDoctorRate, - this.totalReviews, this.email); + HeaderModel(this.doctorName, this.doctorId, this.doctorImageURL, this.speciality, this.invoiceNo, this.projectName, this.date, this.time, this.nationalityFlagURL, this.doctorRate, + this.actualDoctorRate, this.totalReviews, this.email); } diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart index 4320eb21..32aaa898 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart @@ -14,6 +14,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/photo_view_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:provider/provider.dart'; import 'new_cmc_step_tow_page.dart'; @@ -124,10 +125,8 @@ class _NewCMCStepOnePageState extends State { ), margin: EdgeInsets.all(12), child: IconButton( - icon: Icon( - Icons.view_carousel_rounded, - color: Colors.white, - ), + icon: SvgPicture.asset("assets/images/new/ic_zoom.svg",color: Colors.white,), + padding: EdgeInsets.all(12), onPressed: () { showDraggableDialog(context, PhotoViewPage(projectViewModel.isArabic ? "assets/images/cc_ar.png" : "assets/images/cc_en.png")); }, 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 12a716d2..513eb3b2 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart @@ -39,17 +39,9 @@ class _SearchForReferralsPageState extends State { TextEditingController _mobileTextController = TextEditingController(); bool _isSubmitted = false; - dynamic _selectedCountry = { - "name": "Saudi Arabia", - "name_ar": "المملكة العربية السعودية", - "code": "+966", - "countryCode": "SA", - "pattern": "5xxxxxxxx", - "maxLength": 9 - }; + dynamic _selectedCountry = {"name": "Saudi Arabia", "name_ar": "المملكة العربية السعودية", "code": "+966", "countryCode": "SA", "pattern": "5xxxxxxxx", "maxLength": 9}; - SearchCriteriaModel selectedCriteria = SearchCriteriaModel( - name: "Identification Number", nameAr: "رقم المحول", value: 1); + SearchCriteriaModel selectedCriteria = SearchCriteriaModel(name: "Identification Number", nameAr: "رقم المحول", value: 1); @override Widget build(BuildContext context) { @@ -59,23 +51,15 @@ class _SearchForReferralsPageState extends State { if (projectViewModel.isLogin) { Future.delayed(new Duration(milliseconds: 300)).then((value) async { GifLoaderDialogUtils.showMyDialog(context); - SearchEReferralRequestModel searchEReferralRequestModel = - new SearchEReferralRequestModel( - patientMobileNumber: (projectViewModel.user.outSA == 0 - ? "966" - : "971") + - projectViewModel.user.mobileNumber - .substring(1, projectViewModel.user.mobileNumber.length), + SearchEReferralRequestModel searchEReferralRequestModel = new SearchEReferralRequestModel( + patientMobileNumber: (projectViewModel.user.outSA == 0 ? "966" : "971") + projectViewModel.user.mobileNumber.substring(1, projectViewModel.user.mobileNumber.length), ); if (selectedCriteria.value == 1) { - searchEReferralRequestModel.identificationNo = - _searchTextController.text; + searchEReferralRequestModel.identificationNo = _searchTextController.text; searchEReferralRequestModel.referralNumber = 0; } else { - searchEReferralRequestModel.referralNumber = - int.parse(_searchTextController.text); - searchEReferralRequestModel.identificationNo = - projectViewModel.user.patientIdentificationNo; + searchEReferralRequestModel.referralNumber = int.parse(_searchTextController.text); + searchEReferralRequestModel.identificationNo = projectViewModel.user.patientIdentificationNo; } await model.getEReferrals(searchEReferralRequestModel); GifLoaderDialogUtils.hideDialog(context); @@ -102,15 +86,10 @@ class _SearchForReferralsPageState extends State { 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(getSearchCriteriaName()), - Icon(Icons.arrow_drop_down) - ], + children: [Texts(getSearchCriteriaName()), Icon(Icons.arrow_drop_down)], ), ), ), @@ -118,9 +97,7 @@ class _SearchForReferralsPageState extends State { height: 12, ), NewTextFields( - hintText: selectedCriteria.value == 1 - ? "Enter Patient Identification No" - : "Enter Referral Number", + hintText: selectedCriteria.value == 1 ? "Enter Patient Identification No" : "Enter Referral Number", controller: _searchTextController, onChanged: (_) { setState(() {}); @@ -135,15 +112,10 @@ class _SearchForReferralsPageState extends State { 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(getCountryName()), - Icon(Icons.arrow_drop_down) - ], + children: [Texts(getCountryName()), Icon(Icons.arrow_drop_down)], ), ), ), @@ -155,31 +127,21 @@ class _SearchForReferralsPageState extends State { onChange: (_) { setState(() {}); }, - code: _selectedCountry == null - ? "11" - : _selectedCountry["code"], + code: _selectedCountry == null ? "11" : _selectedCountry["code"], ), SizedBox( height: 12, ), - if ((model.state == ViewState.Idle && - model.allReferral.length == 0)) - Center( - child: Text( - TranslationBase.of(context).noSearchResult)), - if ((model.state == ViewState.ErrorLocal)) - AppEmbeddedError(error: model.error), + if ((model.state == ViewState.Idle && model.allReferral.length == 0)) Center(child: Text(TranslationBase.of(context).noSearchResult)), + if ((model.state == ViewState.ErrorLocal)) AppEmbeddedError(error: model.error), model.allReferral.length > 0 ? NetworkBaseView( baseViewModel: model, child: ListView.separated( - separatorBuilder: (context, index) => - SizedBox(height: 0), + separatorBuilder: (context, index) => SizedBox(height: 0), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), - itemCount: model.allReferral == null - ? 0 - : model.allReferral.length, + itemCount: model.allReferral == null ? 0 : model.allReferral.length, itemBuilder: (BuildContext context, int index) { return Container( width: double.infinity, @@ -188,9 +150,7 @@ class _SearchForReferralsPageState extends State { Navigator.push( context, FadePage( - page: ReferralDetails( - referral: - model.allReferral[index]), + page: ReferralDetails(referral: model.allReferral[index]), ), ); }, @@ -200,71 +160,22 @@ class _SearchForReferralsPageState extends State { child: Padding( padding: const EdgeInsets.all(12.0), child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - projectViewModel.isArabic - ? model - .allReferral[ - index] - .statusAr - : model - .allReferral[ - index] - .status, - style: TextStyle( - fontSize: 14.0, - letterSpacing: -0.56, - fontWeight: - FontWeight.bold)), + Text(projectViewModel.isArabic ? model.allReferral[index].statusAr : model.allReferral[index].status, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)), Container( - margin: EdgeInsets.only( - top: 5.0), - child: myRichText( - TranslationBase.of( - context) - .patientName + - ": ", - model - .allReferral[ - index] - .patientName, - projectViewModel - .isArabic)), - myRichText( - TranslationBase.of( - context) - .hospital + - ": ", - model.allReferral[index] - .preferredBranchName, - projectViewModel - .isArabic), - myRichText( - TranslationBase.of( - context) - .referralDate + - ": ", - DateUtil.getMonthDayYearDateFormatted( - DateUtil.convertStringToDateNoTimeZone( - model - .allReferral[ - index] - .referralDate)), - projectViewModel - .isArabic), + margin: EdgeInsets.only(top: 5.0), + child: myRichText(TranslationBase.of(context).patientName + ": ", model.allReferral[index].patientName, projectViewModel.isArabic)), + myRichText(TranslationBase.of(context).hospital + ": ", model.allReferral[index].preferredBranchName, projectViewModel.isArabic), + myRichText(TranslationBase.of(context).referralDate + ": ", + DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDateNoTimeZone(model.allReferral[index].referralDate)), projectViewModel.isArabic), ], ), - Icon(projectViewModel.isArabic - ? Icons - .arrow_back_ios_outlined - : Icons - .arrow_forward_ios_outlined), + Icon(projectViewModel.isArabic ? Icons.arrow_back_ios_outlined : Icons.arrow_forward_outlined), ], ), ), @@ -289,23 +200,17 @@ class _SearchForReferralsPageState extends State { padding: EdgeInsets.all(14), child: DefaultButton( TranslationBase.of(context).search, - (_searchTextController.text.isEmpty || - _mobileTextController.text.isEmpty) + (_searchTextController.text.isEmpty || _mobileTextController.text.isEmpty) ? null : () async { - SearchEReferralRequestModel - searchEReferralRequestModel = - new SearchEReferralRequestModel( - patientMobileNumber: _selectedCountry['code'] + - _mobileTextController.text, + SearchEReferralRequestModel searchEReferralRequestModel = new SearchEReferralRequestModel( + patientMobileNumber: _selectedCountry['code'] + _mobileTextController.text, ); if (selectedCriteria.value == 1) { - searchEReferralRequestModel.identificationNo = - _searchTextController.text; + searchEReferralRequestModel.identificationNo = _searchTextController.text; searchEReferralRequestModel.referralNumber = 0; } else { - searchEReferralRequestModel.referralNumber = - int.parse(_searchTextController.text); + searchEReferralRequestModel.referralNumber = int.parse(_searchTextController.text); searchEReferralRequestModel.identificationNo = ''; } await model.getEReferrals(searchEReferralRequestModel); diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart index 794d991f..540f0e7f 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart @@ -179,6 +179,7 @@ class _NewHomeHealthCareStepThreePageState extends State Utils.route(route, equalsTo: HomeHealthCarePage)); + Navigator.push(context, FadePage(page: HomeHealthCarePage())); }, ); } diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart index d6e9b353..4a2234c6 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart @@ -162,15 +162,21 @@ class _NewHomeHealthCarePageState extends State with Tick TranslationBase.of(context).serviceName + ": ", style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), ), - ...List.generate( - widget.model.hhcAllOrderDetail.length, - (index) => Container( - child: Texts( - projectViewModel.isArabic ? widget.model.hhcAllOrderDetail[index].descriptionN : widget.model.hhcAllOrderDetail[index].description.capitalize(), - fontSize: 13, - bold: false, - ), - ), + Column( + children: [ + ...List.generate( + widget.model.hhcAllOrderDetail.length, + (index) => Container( + child: Texts( + projectViewModel.isArabic + ? widget.model.hhcAllOrderDetail[index].descriptionN + : widget.model.hhcAllOrderDetail[index].description.capitalize(), + fontSize: 13, + bold: false, + ), + ), + ) + ], ) ], ) diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart index 468ab225..b64c5d7d 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart @@ -121,7 +121,7 @@ class OrdersLogDetailsPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - TranslationBase.of(context).serviceName + ": ", + TranslationBase.of(context).hospital + ": ", style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), ), Expanded( diff --git a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart index 55fed349..2221ea5c 100644 --- a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart +++ b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart @@ -1,13 +1,11 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart'; -import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; -import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -22,6 +20,7 @@ import 'Dialog/setting_page_radio_button_list_dialog.dart'; class H2oSetting extends StatefulWidget { final UserDetailModel userDetailModel; final H2OViewModel viewModel; + H2oSetting({Key key, this.userDetailModel, this.viewModel}) : super(key: key); @override @@ -34,6 +33,9 @@ class _H2oSettingState extends State { TextEditingController _nameController = TextEditingController(); TextEditingController _heightController = TextEditingController(); TextEditingController _weightController = TextEditingController(); + List _weightPopupList = List(); + List _heightPopupList = List(); + bool _isUnitML = true; bool _isGenderMale = false; bool _isHeightCM = false; @@ -68,6 +70,7 @@ class _H2oSettingState extends State { } SharedPreferences prefs; + void readPrefs() async { prefs = await SharedPreferences.getInstance(); _isUnitML = (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false; @@ -92,109 +95,122 @@ class _H2oSettingState extends State { @override Widget build(BuildContext context) { + _weightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).kg), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).lb), value: false)]; + _heightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).cm), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).ft), value: false)]; + return AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).h2o, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF7F7F7), showHomeAppBarIcon: false, - body: SingleChildScrollView( - padding: EdgeInsets.fromLTRB(8, 8, 8, 80), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - TextField( - controller: _nameController, - decoration: InputDecoration( - labelText: TranslationBase.of(context).enterNameHere, - labelStyle: TextStyle(color: Colors.black87), - fillColor: Colors.white, - filled: true, - border: UnderlineInputBorder( - borderSide: BorderSide( - width: 0, - style: BorderStyle.none, - ), - borderRadius: BorderRadius.circular(6.0), - ), - ), - ), - SizedBox(height: 8), - Text(TranslationBase.of(context).preferredunit), - SizedBox(height: 8), - _commonButtonsRow(TranslationBase.of(context).ml, TranslationBase.of(context).l, _isUnitML, (value) { - if (_isUnitML != value) { - setState(() { - _isUnitML = value; - }); - } - }), - Padding( - padding: EdgeInsets.only(top: 8.0, bottom: 8.0), - child: Divider(height: 1.5, color: Colors.black54), - ), - Text(TranslationBase.of(context).gender), - SizedBox(height: 8), - _commonButtonsRow(TranslationBase.of(context).male, TranslationBase.of(context).female, _isGenderMale, (value) { - if (_isGenderMale != value) { - setState(() { - _isGenderMale = value; - }); - } - }), - Padding( - padding: EdgeInsets.only(top: 8.0, bottom: 8.0), - child: Divider(height: 1.5, color: Colors.black54), - ), - Text(TranslationBase.of(context).height), - _commonSlidersRow(_heightController, 1, 270, _heightValue, (text) { - _heightController.text = text; - }, (value) { - setState(() { - _heightValue = value; - }); - }), - SizedBox(height: 8), - Text(TranslationBase.of(context).heightUnit), - SizedBox(height: 8), - _commonButtonsRow(TranslationBase.of(context).cm, TranslationBase.of(context).ft, _isHeightCM, (value) { - if (_isHeightCM != value) { - setState(() { - _isHeightCM = value; - }); - } - }), - SizedBox(height: 8), - _commonSlidersRow(_weightController, 1, 250, _weightValue, (text) { - _weightController.text = text; - }, (value) { - setState(() { - _weightValue = value; - }); - }), - SizedBox(height: 8), - Text(TranslationBase.of(context).weightUnit), - SizedBox(height: 8), - _commonButtonsRow(TranslationBase.of(context).kg, TranslationBase.of(context).lb, _isWeightKG, (value) { - if (_isWeightKG != value) { - setState(() { - _isWeightKG = value; - }); - } - }), - Padding( - padding: EdgeInsets.only(top: 8.0, bottom: 8.0), - child: Divider(height: 1.5, color: Colors.black54), - ), - Container( - padding: EdgeInsets.all(8), - width: MediaQuery.of(context).size.width, - decoration: BoxDecoration(borderRadius: BorderRadius.circular(8), color: Colors.white), + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text("${TranslationBase.of(context).birth_date}:"), - SizedBox(height: 8), - InkWell( - onTap: () { + Text( + TranslationBase.of(context).enterDetailBelow, + style: TextStyle( + fontSize: 19, + height: 23 / 19, + fontWeight: FontWeight.w700, + color: Color(0xff2E303A), + letterSpacing: -1.14, + ), + ), + SizedBox(height: 12), + _containerWidget(inputWidget(TranslationBase.of(context).enterNameHere, TranslationBase.of(context).name, _nameController)), + SizedBox(height: 16), + Text( + TranslationBase.of(context).preferredunit, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + SizedBox(height: 12), + _commonRadioButtonsRow(TranslationBase.of(context).mililitre, TranslationBase.of(context).litre, _isUnitML, (value) { + if (_isUnitML != value) { + setState(() { + _isUnitML = value; + }); + } + }), + SizedBox(height: 12), + Text( + TranslationBase.of(context).pleaseSelectGender, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + SizedBox(height: 12), + _commonRadioButtonsRow(TranslationBase.of(context).male, TranslationBase.of(context).female, _isGenderMale, (value) { + if (_isGenderMale != value) { + setState(() { + _isGenderMale = value; + }); + } + }), + SizedBox(height: 18), + _commonInputAndUnitRow( + TranslationBase.of(context).height, + _heightController, + 1, + 270, + _heightValue, + (text) { + _heightController.text = text; + }, + (value) { + _heightValue = value; + }, + _isHeightCM ? TranslationBase.of(context).cm : TranslationBase.of(context).ft, + (value) { + if (_isHeightCM != value) { + setState(() { + _isHeightCM = value; + }); + } + }, + _heightPopupList), + SizedBox(height: 12), + _commonInputAndUnitRow( + TranslationBase.of(context).weight, + _weightController, + 1, + 250, + _weightValue, + (text) { + _heightController.text = text; + }, + (value) { + _weightValue = value; + }, + _isWeightKG ? TranslationBase.of(context).kg : TranslationBase.of(context).lb, + (value) { + if (_isWeightKG != value) { + setState(() { + _isWeightKG = value; + }); + } + }, + _weightPopupList), + SizedBox(height: 12), + _containerWidget( + _commonDropDownView(TranslationBase.of(context).dateOfBirth, DateUtil.getFormattedDate(_dobDate, "dd MMMM, yyyy"), () { showModalBottomSheet( context: context, builder: (context) { @@ -245,71 +261,239 @@ class _H2oSettingState extends State { ]), ); }); - }, // implement cupertino dialog to select date - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [Text(DateUtil.getFormattedDate(_dobDate, "yyyy-MM-dd")), Icon(Icons.arrow_drop_down_outlined)]), - ) + }, iconData: Icons.calendar_today), + ), + SizedBox(height: 12), + _containerWidget( + _commonDropDownView(TranslationBase.of(context).activityLevel, _activityLevelListEng[_selectedActiveLevel - 1], () { + showDialog( + context: context, + child: CommonRadioButtonDialog( + list: _activityLevelListEng, + title: TranslationBase.of(context).activityLevel, + onSelect: (index) { + Navigator.pop(context); + setState(() { + _selectedActiveLevel = index + 1; + }); + }, + selectedIndex: _selectedActiveLevel - 1, + ), + ); + }), + ), + SizedBox(height: 18), + Text( + TranslationBase.of(context).reminderLabel, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + SizedBox(height: 12), + _containerWidget( + _commonDropDownView(TranslationBase.of(context).reminderTimesLabel, _remindedTimeListEng[_selectedRemindedTime], () { + showDialog( + context: context, + child: CommonRadioButtonDialog( + list: _remindedTimeListEng, + onSelect: (index) { + Navigator.pop(context); + setState(() { + _selectedRemindedTime = index; + }); + }, + selectedIndex: _selectedRemindedTime, + ), + ); + }), + ), ], ), ), - SizedBox(height: 8), - _commonDialogSelectorRow(TranslationBase.of(context).activityLevel, _activityLevelListEng[_selectedActiveLevel - 1], () { - showDialog( - context: context, - child: CommonRadioButtonDialog( - list: _activityLevelListEng, - title: TranslationBase.of(context).activityLevel, - onSelect: (index) { - Navigator.pop(context); - setState(() { - _selectedActiveLevel = index + 1; - }); - }, - selectedIndex: _selectedActiveLevel - 1, + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).save, + _updateUserDetails, + color: Color(0xff349745), + ), + ), + ], + ), + ); + } + + Widget _containerWidget(Widget child) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: child, + ); + } + + Widget _commonDropDownView(String title, String value, VoidCallback callback, {IconData iconData}) { + return InkWell( + onTap: callback, + child: Row( + children: [ + Expanded( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, ), - ); - }), - SizedBox(height: 8), - _commonDialogSelectorRow(TranslationBase.of(context).reminderLabel, _remindedTimeListEng[_selectedRemindedTime], () { - showDialog( - context: context, - child: CommonRadioButtonDialog( - list: _remindedTimeListEng, - onSelect: (index) { - Navigator.pop(context); - setState(() { - _selectedRemindedTime = index; - }); - }, - selectedIndex: _selectedRemindedTime, + ), + Text( + value, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, ), - ); - }), - SizedBox(height: 16), - SizedBox( - height: 50, - width: MediaQuery.of(context).size.width, - child: FlatButton( - color: Theme.of(context).appBarTheme.color, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8.0), + ), + ]), + ), + Icon( + iconData ?? Icons.keyboard_arrow_down_sharp, + color: Color(0xff2E303A), + ) + ], + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String prefix, bool isEnable = true, bool hasSelection = false}) { + return InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), ), - onPressed: _updateUserDetails, - child: Text( - TranslationBase.of(context).save, - style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w600), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.number, + controller: _controller, + onChanged: (value) => { + // validateForm() + }, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ); + } + + Widget _commonRadioButtonsRow(String rightText, String leftText, bool checkParam, Function(bool) callBack) { + return Row( + children: [ + Row( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(width: 22, height: 22, child: Radio(value: true, groupValue: checkParam, onChanged: callBack)), + SizedBox(width: 8), + Text( + rightText, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.44, + ), + ), + ], + ), + SizedBox(width: 12), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(width: 22, height: 22, child: Radio(value: false, groupValue: checkParam, onChanged: callBack)), + SizedBox(width: 8), + Text( + leftText, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.44, ), - ) + ), ], ), - ), + ], ); - } - Widget _commonButtonsRow(String rightText, String leftText, bool checkParam, Function(bool) callBack) { return Row(children: [ Expanded( child: SizedBox( @@ -341,101 +525,85 @@ class _H2oSettingState extends State { ]); } - Widget _commonSlidersRow(_controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange) { - return Container( - margin: EdgeInsets.only(top: 6), - padding: EdgeInsets.all(6), - color: Colors.white, - height: 50, - child: Row( + Widget _commonInputAndUnitRow(_title, _controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange, String unitTitle, + Function(bool) onUnitTap, _list) { + return _containerWidget( + Row( children: [ - SizedBox( - width: 75, - child: TextField( - controller: _controller, - textAlign: TextAlign.center, - keyboardType: TextInputType.number, - onChanged: (value) { - double _value = double.parse(value); - if (_value > _maxValue) { - onTextValueChange(_maxValue.toStringAsFixed(0)); - onValueChange(_maxValue); - return; - } else if (_value < _minValue) { - onTextValueChange(_minValue.toStringAsFixed(0)); - onValueChange(_minValue); - return; - } else if (_value >= _minValue && _value <= _maxValue) { - onValueChange(_value); - return; - } - }, - inputFormatters: [ - FilteringTextInputFormatter.allow(RegExp(r'[0-9]')), - ], - decoration: InputDecoration( - contentPadding: EdgeInsets.only(left: 4, right: 4), - fillColor: Colors.white, - filled: true, - focusedBorder: OutlineInputBorder( - borderSide: BorderSide( - width: 1, - color: Colors.grey, - style: BorderStyle.solid, + Expanded( + flex: 3, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, ), - borderRadius: BorderRadius.circular(6.0), ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide( - width: 1, - color: Colors.grey, - style: BorderStyle.solid, + TextField( + controller: _controller, + keyboardType: TextInputType.number, + onChanged: (value) { + double _value = double.parse(value); + if (_value > _maxValue) { + onTextValueChange(_maxValue.toStringAsFixed(0)); + onValueChange(_maxValue); + return; + } else if (_value < _minValue) { + onTextValueChange(_minValue.toStringAsFixed(0)); + onValueChange(_minValue); + return; + } else if (_value >= _minValue && _value <= _maxValue) { + onValueChange(_value); + return; + } + }, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp(r'[0-9]')), + ], + style: TextStyle( + color: Color(0xff575757), + letterSpacing: -0.56, + ), + decoration: InputDecoration( + isDense: true, + hintText: "0", + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, ), - borderRadius: BorderRadius.circular(6.0), ), - ), + ], ), ), + Container(height: 34, width: 1, color: Color(0xffE0E0E0), margin: EdgeInsets.only(left: 12, right: 12)), Expanded( - flex: 6, - child: Slider( - min: _minValue, - max: _maxValue, - activeColor: Colors.redAccent, - inactiveColor: Colors.redAccent.withOpacity(.3), - value: _valueOrg, - onChanged: (value) { - onTextValueChange(value.toStringAsFixed(0)); - onValueChange(value); - }, - ), + flex: 1, + child: PopupMenuButton( + child: _commonDropDownView(TranslationBase.of(context).unit, unitTitle, null), + onSelected: (value) { + onUnitTap(value); + }, + itemBuilder: (context) => _list), ) ], ), ); } - Widget _commonDialogSelectorRow(String title, String selectedText, VoidCallback onPressed) { - return Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - Text(title), - SizedBox(height: 8), - InkWell( - onTap: onPressed, - child: Container( - height: 50, - padding: EdgeInsets.all(8), - width: MediaQuery.of(context).size.width, - decoration: BoxDecoration(borderRadius: BorderRadius.circular(8), color: Colors.white), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [Text(selectedText), Icon(Icons.arrow_drop_down_outlined)], - ), - ), - ) - ]); - } - void _updateUserDetails() async { _userDetailModel.height = _heightValue; _userDetailModel.weight = _weightValue; @@ -469,6 +637,7 @@ class _H2oSettingState extends State { } final CalendarPlugin _myPlugin = CalendarPlugin(); + void _addReminderToCalender(int _selectedRemindedTime) async { bool _calendarPermission = await _myPlugin.hasPermissions(); if (_calendarPermission) { diff --git a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart index 16f9940a..982b9044 100644 --- a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart +++ b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart @@ -3,6 +3,7 @@ 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/core/viewModels/project_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'; @@ -13,11 +14,12 @@ import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.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 'package:provider/provider.dart'; class H2OPage extends StatefulWidget { @override @@ -44,98 +46,121 @@ class _H2OPageState extends State with SingleTickerProviderStateMixin { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) => model.getUserDetail(), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).waterTracker, description: TranslationBase.of(context).h2oInfo, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF7F7F7), 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') + 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: [ - 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, - appBar: PreferredSize( - preferredSize: Size.fromHeight(65.0), - child: Stack( - children: [ - Positioned( - bottom: 1, - left: 0, - right: 0, - child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), - child: Container( - color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.8), - height: 70.0, - ), - ), - ), - Center( - child: Container( - height: 60.0, - alignment: Alignment.center, - // margin: EdgeInsets.only(top: 10.0), - // width: MediaQuery.of(context).size.width * 0.9, - - child: TabBar( - isScrollable: false, - controller: _tabController, - indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.tab, - indicatorColor: Colors.red[800], - labelColor: Theme.of(context).primaryColor, - labelPadding: EdgeInsets.only(top: 4.0, left: 10.0, right: 13.0), - unselectedLabelColor: Colors.grey[800], - tabs: [ - Container( - width: MediaQuery.of(context).size.width * 0.28, - child: Center( - child: Texts(TranslationBase.of(context).today), - ), - ), - Container( - width: MediaQuery.of(context).size.width * 0.28, - child: Center( - child: Texts(TranslationBase.of(context).week), - ), - ), - Container( - width: MediaQuery.of(context).size.width * 0.28, - child: Center( - child: Texts(TranslationBase.of(context).month), - ), - ), - ], - ), + if (model.isLogin) + IconButton( + icon: Icon(Icons.settings), + color: Color(0xff2B353E), + onPressed: () { + Navigator.push( + context, + FadePage( + page: H2oSetting(userDetailModel: model.userDetail, viewModel: model), ), - ), - ], + ); + }, ), - ), - backgroundColor: Colors.white, + ], + body: Scaffold( + // extendBodyBehindAppBar: true, + // appBar: PreferredSize( + // preferredSize: Size.fromHeight(65.0), + // child: Stack( + // children: [ + // Positioned( + // bottom: 1, + // left: 0, + // right: 0, + // child: BackdropFilter( + // filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), + // child: Container( + // color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.8), + // height: 70.0, + // ), + // ), + // ), + // Center( + // child: Container( + // height: 60.0, + // alignment: Alignment.center, + // // margin: EdgeInsets.only(top: 10.0), + // // width: MediaQuery.of(context).size.width * 0.9, + // + // child: TabBar( + // isScrollable: false, + // controller: _tabController, + // indicatorWeight: 5.0, + // indicatorSize: TabBarIndicatorSize.tab, + // indicatorColor: Colors.red[800], + // labelColor: Theme.of(context).primaryColor, + // labelPadding: EdgeInsets.only(top: 4.0, left: 10.0, right: 13.0), + // unselectedLabelColor: Colors.grey[800], + // tabs: [ + // Container( + // width: MediaQuery.of(context).size.width * 0.28, + // child: Center( + // child: Texts(TranslationBase.of(context).today), + // ), + // ), + // Container( + // width: MediaQuery.of(context).size.width * 0.28, + // child: Center( + // child: Texts(TranslationBase.of(context).week), + // ), + // ), + // Container( + // width: MediaQuery.of(context).size.width * 0.28, + // child: Center( + // child: Texts(TranslationBase.of(context).month), + // ), + // ), + // ], + // ), + // ), + // ), + // ], + // ), + // ), + // backgroundColor: Colors.white, body: Column( children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).today), Text(TranslationBase.of(context).week), Text(TranslationBase.of(context).month.toLowerCase().capitalizeFirstofEach)], + ), Expanded( child: TabBarView( physics: BouncingScrollPhysics(), diff --git a/lib/pages/AlHabibMedicalService/h2o/today_page.dart b/lib/pages/AlHabibMedicalService/h2o/today_page.dart index 03d11f50..85182717 100644 --- a/lib/pages/AlHabibMedicalService/h2o/today_page.dart +++ b/lib/pages/AlHabibMedicalService/h2o/today_page.dart @@ -2,15 +2,23 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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 'package:hexcolor/hexcolor.dart'; import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:wave/config.dart'; +import 'package:wave/wave.dart'; + +import 'Dialog/confirm_add_amount_dialog.dart'; +import 'add_custom_amount.dart'; class TodayPage extends StatelessWidget { + Future readPrefs() async { SharedPreferences prefs = await SharedPreferences.getInstance(); return (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false; @@ -25,23 +33,16 @@ class TodayPage extends StatelessWidget { appBarTitle: TranslationBase.of(context).h2o, baseViewModel: model, body: SingleChildScrollView( - padding: EdgeInsets.symmetric(vertical: 12), - child: Container( - margin: EdgeInsets.only(top: 60), - child: Column( - children: [ - Center( - child: CircularPercentIndicator( - radius: 180.0, - animation: true, - animationDuration: 1200, - lineWidth: 15.0, - percent: model.userProgressData == null - ? 0.0 - : (model.userProgressData.percentageConsumed / 100) >= 1 - ? 1 - : (model.userProgressData.percentageConsumed / 100), - center: Center( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 320, + child: Row( + children: [ + Expanded( child: FutureBuilder( future: readPrefs(), builder: (context, data) { @@ -56,121 +57,214 @@ class TodayPage extends StatelessWidget { unit = TranslationBase.of(context).l; } unit = unit.toLowerCase(); - var totalH2O = model?.userProgressData?.quantityLimit ?? 0.0; - var consumedH2O = model?.userProgressData?.quantityConsumed ?? 0.0; + double totalH2O = model?.userProgressData?.quantityLimit ?? 0.0; + double consumedH2O = model?.userProgressData?.quantityConsumed ?? 0.0; if (!isUnitML) { totalH2O = totalH2O / 1000; consumedH2O = consumedH2O / 1000; } + + if (consumedH2O > totalH2O) { + consumedH2O = totalH2O; + } + + double divide = consumedH2O / totalH2O; + String percentage = (divide * 100).toStringAsFixed(0); var remainingH2O = totalH2O - consumedH2O; - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - // SizedBox( - // height: 40, - // ), - Text( - TranslationBase.of(context).consumed, - style: TextStyle(fontSize: 16.0), - ), - SizedBox( - height: 4, - ), - Text( - model.userProgressData == null ? "0.0" : "$consumedH2O $unit", - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0, color: HexColor("#60BCF9")), - ), - SizedBox( - height: 4, - ), - SizedBox( - height: 5, - width: 50, - child: Container(), - ), - SizedBox( - height: 4, - ), - Text( - TranslationBase.of(context).remaining, - style: TextStyle(fontSize: 16.0), - ), - SizedBox( - height: 4, - ), - Text( - model.userProgressData == null - ? "0.0" - : (remainingH2O) < 0 - ? "0 $unit" - : '$remainingH2O $unit', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0), - ), - ], + return AspectRatio( + aspectRatio: 234 / 320, + child: Stack( + alignment: Alignment.center, + children: [ + ClipRRect( + borderRadius: BorderRadius.circular(18), + child: WaveWidget( + config: CustomConfig( + colors: [Color(0xff0d47a1), Color(0xff1976d2), Color(0xff2196f3)], + durations: [19440, 10800, 6000], + heightPercentages: [1 - divide - .10, 1 - divide - .05, 1 - divide], + blur: MaskFilter.blur(BlurStyle.solid, 0), + ), + waveAmplitude: 0, + backgroundColor: Color(0xff2e303a), + size: Size( + double.infinity, + double.infinity, + ), + ), + ), + Padding( + padding: const EdgeInsets.only(top: 12, bottom: 12), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + remainingH2O.toStringAsFixed(0) + "$unit " + TranslationBase.of(context).left.toLowerCase(), + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Colors.white, + letterSpacing: -0.56, + ), + ), + Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + "$percentage%", + style: TextStyle( + fontSize: 34, + fontWeight: FontWeight.bold, + color: Colors.white, + letterSpacing: -2.34, + ), + ), + Text( + TranslationBase.of(context).consumed, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Colors.white, + letterSpacing: -0.56, + ), + ), + ], + ), + ], + ), + ) + ], + ), ); }, ), ), - circularStrokeCap: CircularStrokeCap.butt, - backgroundColor: HexColor("#D1E3F6"), - progressColor: HexColor("#60BCF9"), - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - margin: EdgeInsets.only(bottom: 16), - height: 30, - width: 70, - decoration: BoxDecoration(color: HexColor("#D1E3F6"), borderRadius: BorderRadius.all(Radius.circular(30))), - ), - Text( - "${TranslationBase.of(context).remaining} %", - style: TextStyle(fontSize: 16.0), - ) - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - margin: EdgeInsets.only(bottom: 16), - height: 30, - width: 70, - decoration: BoxDecoration(color: HexColor("#60BCF9"), borderRadius: BorderRadius.all(Radius.circular(30))), - ), - Text( - "${TranslationBase.of(context).consumed} %", - style: TextStyle(fontSize: 16.0), - ) - ], + SizedBox(width: 21), + SizedBox( + height: double.infinity, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + _circularButton(context, 600, model), + SizedBox(height: 8), + _circularButton(context, 330, model), + SizedBox(height: 8), + _circularButton(context, 200, model), + // SizedBox(height: 8), + // _circularButton(context, 0, model, isCustom: true), + SizedBox(height: 8), + InkWell( + onTap: () => undoVolume(context, model), + child: Text( + TranslationBase.of(context).undo, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xffD02127), + letterSpacing: -0.56, + decoration: TextDecoration.underline, + ), + ), + ), + ], + ), ) ], ), - SizedBox( - height: 30, - ), - SizedBox( - height: 0.5, - width: MediaQuery.of(context).size.width, - child: Container( - color: Colors.grey, - ), - ), - ], - ), + ), + SizedBox(height: 40), + // Text( + // TranslationBase.of(context).addCustomAmount, + // style: TextStyle( + // fontSize: 14, + // height: 21 / 14, + // fontWeight: FontWeight.w600, + // color: Color(0xff2B353E), + // letterSpacing: -0.56, + // ), + // ), + + ], ), ), - floatingActionButton: H20FloatingActionButton( - // controller: _controller, - model: model, + // floatingActionButton: H20FloatingActionButton( + // // controller: _controller, + // model: model, + // ), + ), + ); + } + + Widget _circularButton(context, int value, model, {bool isCustom = false}) { + String _text = "$value${TranslationBase.of(context).ml}"; + if (isCustom) { + _text = TranslationBase.of(context).custom; + } + return InkWell( + onTap: () { + if (isCustom) { + Navigator.push( + context, + FadePage( + page: AddCustomAmount( + model: model, + ), + ), + ); + } else { + showConfirmMessage(context, value, model); + } + }, + child: Container( + padding: EdgeInsets.all(21), + alignment: Alignment.center, + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.circle, + border: Border.all(width: 1, color: Color(0xffDEDEDE)), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + TranslationBase.of(context).add, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w500, + color: Color(0xff575757), + letterSpacing: -0.44, + ), + ), + Text( + _text, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + ], ), ), ); } + + void showConfirmMessage(context, int amount, H2OViewModel model) { + showDialog( + context: context, + child: ConfirmAddAmountDialog( + model: model, + amount: amount, + ), + ); + } + + void undoVolume(context, H2OViewModel model) async { + GifLoaderDialogUtils.showMyDialog(context); + await model.undoUserActivity(); + GifLoaderDialogUtils.hideDialog(context); + } } diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index fe49fd52..2b49043e 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -74,6 +74,7 @@ class _BookConfirmState extends State { DoctorHeader( headerModel: HeaderModel( widget.doctor.name, + widget.doctor.doctorID, widget.doctor.doctorImageURL, widget.doctor.speciality, "", @@ -345,12 +346,12 @@ class _BookConfirmState extends State { } getToDoCount() { - toDoProvider.setState(0, true); + toDoProvider.setState(0, true, toDoProvider.notificationsCount); ClinicListService service = new ClinicListService(); service.getActiveAppointmentNo(context).then((res) { print(res['AppointmentActiveNumber']); if (res['MessageStatus'] == 1) { - toDoProvider.setState(res['AppointmentActiveNumber'], true); + toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); } else {} }).catchError((err) { print(err); diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index d9499eeb..2c278f5e 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -60,6 +60,7 @@ class _BookSuccessState extends State { DoctorHeader( headerModel: HeaderModel( widget.docObject.name, + widget.docObject.doctorID, widget.docObject.doctorImageURL, widget.docObject.speciality, "", diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index 6d3a3afa..e71fa02b 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -103,6 +103,7 @@ class _DoctorProfileState extends State with TickerProviderStateM DoctorHeader( headerModel: HeaderModel( widget.doctor.name, + widget.doctor.doctorID, widget.doctor.doctorImageURL, widget.doctor.speciality, "", @@ -145,7 +146,7 @@ class _DoctorProfileState extends State with TickerProviderStateM onTap: (index) { setState(() { if (index == 1) { - if (widget.doctor.clinicID == 17 || widget.doctor.clinicID == 23 || widget.isLiveCareAppointment) { + if (widget.doctor.clinicID == 17 || widget.doctor.clinicID == 23 || widget.doctor.clinicID == 47 || widget.isLiveCareAppointment) { _tabController.index = _tabController.previousIndex; showFooterButton = false; } else { @@ -499,7 +500,7 @@ class _DoctorProfileState extends State with TickerProviderStateM dialog.showAlertDialog(context); } } else - AppToast.showErrorToast(message: "Please select Time Slot to continue"); + AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); } navigateToLogin() { diff --git a/lib/pages/BookAppointment/book_reminder_page.dart b/lib/pages/BookAppointment/book_reminder_page.dart index fcdd8fd4..8066e369 100644 --- a/lib/pages/BookAppointment/book_reminder_page.dart +++ b/lib/pages/BookAppointment/book_reminder_page.dart @@ -70,6 +70,7 @@ class _BookReminderPageState extends State { DoctorHeader( headerModel: HeaderModel( widget.docObject.name, + widget.docObject.doctorID, widget.docObject.doctorImageURL, widget.docObject.speciality, "", @@ -191,7 +192,7 @@ class _BookReminderPageState extends State { disabledTextColor: Colors.white, disabledColor: CustomColors.green, onPressed: () async { - print(widget.patientShareResponse.appointmentNo); + print(widget.patientShareResponse.appointmentNo); showReminderDialog( context, widget.dateTime, @@ -201,7 +202,7 @@ class _BookReminderPageState extends State { widget.appoTimeFormatted, onSuccess: () { AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); - navigateToBookSuccess(context); + navigateToBookSuccess(context); }, ); }, diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index aaceb5ca..25f8cb9c 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -7,11 +7,13 @@ import 'package:diplomaticquarterapp/theme/colors.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/uitl/utils_new.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; -import 'package:table_calendar/table_calendar.dart'; + +import 'package:syncfusion_flutter_calendar/calendar.dart'; import '../../../uitl/date_uitl.dart'; @@ -24,6 +26,7 @@ class DocAvailableAppointments extends StatefulWidget { static String selectedTime; bool isLiveCareAppointment; final dynamic doctorSchedule; + DocAvailableAppointments({@required this.doctor, this.doctorSchedule, @required this.isLiveCareAppointment}); @override @@ -55,8 +58,8 @@ class _DocAvailableAppointmentsState extends State wit @override void didUpdateWidget(covariant DocAvailableAppointments oldWidget) { if (oldWidget.doctorSchedule != widget.doctorSchedule) { - _calendarController.setSelectedDay(DateUtil.convertStringToDate(widget.doctorSchedule['Date']), isProgrammatic: true); - _onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date']), List()); + _onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date'])); + _calendarController.selectedDate = DateUtil.convertStringToDate(widget.doctorSchedule['Date']); } super.didUpdateWidget(oldWidget); } @@ -99,28 +102,17 @@ class _DocAvailableAppointmentsState extends State wit super.dispose(); } - void _onDaySelected(DateTime day, List events) { + void _onDaySelected(DateTime day) { final DateFormat formatter = DateFormat('yyyy-MM-dd'); setState(() { this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, language); openTimeSlotsPickerForDate(day, docFreeSlots); DocAvailableAppointments.selectedDate = formatter.format(day); - print(DocAvailableAppointments.selectedDate); + _calendarController.selectedDate = day; + print(_calendarController.selectedDate); }); } - void _onVisibleDaysChanged(DateTime first, DateTime last, CalendarFormat format) { - print('CALLBACK: _onVisibleDaysChanged'); - print(first); - print(last); - } - - void _onCalendarCreated(DateTime first, DateTime last, CalendarFormat format) { - print('CALLBACK: _onCalendarCreated'); - print(first); - print(last); - } - @override Widget build(BuildContext context) { return SingleChildScrollView( @@ -134,30 +126,36 @@ class _DocAvailableAppointmentsState extends State wit padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16), child: Text(selectedDate, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)), ), - Container( - height: 40, - child: ListView.builder( - controller: _scrollController, - scrollDirection: Axis.horizontal, - itemCount: dayEvents.length, - itemBuilder: (context, index) { - return Container( - margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(5.0), - side: BorderSide( - color: index == selectedButtonIndex ? CustomColors.green : Colors.black, //Color of the border - style: BorderStyle.solid, //Style of the border - width: 1.5, //width of the border - ), - ), - minWidth: MediaQuery.of(context).size.width * 0.18, - child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index)), - ); - }, - ), - ), + DocAvailableAppointments.areSlotsAvailable + ? Container( + height: 40, + child: ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: dayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5.0), + side: BorderSide( + color: index == selectedButtonIndex ? CustomColors.green : Colors.black, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5, //width of the border + ), + ), + minWidth: MediaQuery.of(context).size.width * 0.18, + child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index)), + ); + }, + ), + ) + : Center( + child: Padding( + padding: const EdgeInsets.only(left: 12.0, right: 12.0), + child: Text(TranslationBase.of(context).noSlotsError, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.grey)), + )), ], ), ), @@ -166,99 +164,42 @@ class _DocAvailableAppointmentsState extends State wit Widget _buildTableCalendarWithBuilders() { return Card( - shape: cardRadius(12), - margin: EdgeInsets.all(16), - clipBehavior: Clip.antiAlias, - child: Padding( - padding: const EdgeInsets.only(bottom: 12), - child: TableCalendar( - locale: language == "en" ? 'en_US' : 'ar_SA', - calendarController: _calendarController, - events: _events, - initialCalendarFormat: CalendarFormat.month, - startDay: DateTime.now(), - formatAnimation: FormatAnimation.slide, - startingDayOfWeek: StartingDayOfWeek.sunday, - weekendDays: [DateTime.friday, DateTime.saturday], - availableGestures: AvailableGestures.horizontalSwipe, - availableCalendarFormats: const { - CalendarFormat.month: '', - CalendarFormat.week: '', - }, - calendarStyle: CalendarStyle( - outsideDaysVisible: false, - weekendStyle: TextStyle().copyWith(color: Colors.blue[800]), - holidayStyle: TextStyle().copyWith(color: Colors.blue[800]), - ), - daysOfWeekStyle: DaysOfWeekStyle( - weekendStyle: TextStyle().copyWith(color: Colors.black, fontSize: 11.0, fontWeight: FontWeight.w600), - weekdayStyle: TextStyle().copyWith(color: Colors.black, fontSize: 11.0, fontWeight: FontWeight.w600), - ), - headerStyle: HeaderStyle(centerHeaderTitle: true, formatButtonVisible: false, titleTextStyle: TextStyle(fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600)), - builders: CalendarBuilders( - selectedDayBuilder: (context, date, _) { - return FadeTransition( - opacity: Tween(begin: 0.0, end: 1.0).animate(_animationController), - child: Container( - margin: const EdgeInsets.all(4.0), - padding: const EdgeInsets.only(top: 5.0, left: 5.0), - color: Colors.transparent, - width: 0, - height: 0, - child: Text( - '${date.day}', - style: TextStyle().copyWith(fontSize: 14.0), - ), - ), - ); - }, - todayDayBuilder: (context, date, _) { - return Container( - decoration: BoxDecoration( - shape: BoxShape.circle, - color: _calendarController.isSelected(date) - ? Colors.green[400] - : _calendarController.isToday(date) - ? Colors.transparent - : Color(0xff76cfb7), - ), - width: 40.0, - height: 40.0, - child: Center( - child: Text( - '${date.day}', - style: TextStyle().copyWith( - color: Colors.white, - fontSize: 14.0, - ), - ), - ), - ); - }, - markersBuilder: (context, date, events, _) { - final children = []; - if (events.isNotEmpty) { - children.add( - Positioned( - right: 4, - bottom: 4, - child: _buildEventsMarker(date, events), - ), - ); - } - - return children; - }, + shape: cardRadius(12), + margin: EdgeInsets.all(16), + clipBehavior: Clip.antiAlias, + child: Padding( + padding: const EdgeInsets.only(bottom: 12), + child: Container( + child: SfCalendar( + controller: _calendarController, + minDate: DateTime.now(), + showNavigationArrow: true, + headerStyle: CalendarHeaderStyle(textAlign: TextAlign.center, textStyle: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46)), + viewHeaderStyle: ViewHeaderStyle(dayTextStyle: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black)), + view: CalendarView.month, + todayHighlightColor: CustomColors.green, + selectionDecoration: containerColorRadiusBorderWidthCircular(Colors.transparent, 4, CustomColors.green, 2.5), + cellBorderColor: Colors.white, + dataSource: MeetingDataSource(_getDataSource()), + monthViewSettings: const MonthViewSettings(appointmentDisplayMode: MonthAppointmentDisplayMode.indicator, showTrailingAndLeadingDates: false, appointmentDisplayCount: 1), + onTap: (CalendarTapDetails details) { + _calendarController.selectedDate = details.date; + _onDaySelected(details.date); + }, + ), ), - onDaySelected: (date, event, _) { - _onDaySelected(date, event); - _animationController.forward(from: 0.0); - }, - onVisibleDaysChanged: _onVisibleDaysChanged, - onCalendarCreated: _onCalendarCreated, - ), - ), - ); + )); + } + + List _getDataSource() { + final List meetings = []; + + _events.forEach((key, value) { + final DateTime startTime = DateTime(key.year, key.month, key.day, 9, 0, 0); + final DateTime endTime = startTime.add(const Duration(hours: 2)); + meetings.add(Meeting("", startTime, endTime, CustomColors.green, false)); + }); + return meetings; } openTimeSlotsPickerForDate(DateTime dateStart, List freeSlots) { @@ -270,14 +211,12 @@ class _DocAvailableAppointmentsState extends State wit }); setState(() { - if (dayEvents.length != 0) + if (dayEvents.length != 0) { DocAvailableAppointments.areSlotsAvailable = true; - else + selectedButtonIndex = 0; + DocAvailableAppointments.selectedTime = dayEvents[selectedButtonIndex].isoTime; + } else DocAvailableAppointments.areSlotsAvailable = false; - - selectedButtonIndex = 0; - - DocAvailableAppointments.selectedTime = dayEvents[selectedButtonIndex].isoTime; }); } @@ -299,7 +238,7 @@ class _DocAvailableAppointmentsState extends State wit selectedDateJSON = freeSlotsResponse[0]; }); openTimeSlotsPickerForDate(DateUtil.convertStringToDate(selectedDateJSON), docFreeSlots); - _calendarController.setFocusedDay(DateUtil.convertStringToDate(selectedDateJSON)); + _calendarController.selectedDate = DateUtil.convertStringToDate(selectedDateJSON); return _eventsParsed; } @@ -321,7 +260,8 @@ class _DocAvailableAppointmentsState extends State wit Widget getSelectedButton(int index) { return RaisedButton( - color: CustomColors.green, //Color of the border + color: CustomColors.green, + //Color of the border textColor: Colors.white, elevation: 0, onPressed: () { @@ -352,10 +292,7 @@ class _DocAvailableAppointmentsState extends State wit _events.clear(), _events = value, if (widget.doctorSchedule != null) - { - _calendarController.setSelectedDay(DateUtil.convertStringToDate(widget.doctorSchedule['Date']), isProgrammatic: true), - _onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date']), List()) - } + {_onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date'])), _calendarController.selectedDate = DateUtil.convertStringToDate(widget.doctorSchedule['Date'])} }); }); } else { @@ -403,29 +340,49 @@ class _DocAvailableAppointmentsState extends State wit this.language = languageID; }); } +} - Widget _buildEventsMarker(DateTime date, List events) { - return Container( - decoration: containerColorRadiusBorderWidth( - _calendarController.isSelected(date) - ? CustomColors.green - : _calendarController.isToday(date) - ? CustomColors.green.withOpacity(0.5) - : Colors.white, - 200, - _calendarController.isSelected(date) ? CustomColors.green : Colors.black, - 2), - width: 40.0, - height: 40.0, - child: Center( - child: Text( - '${date.day}', - style: TextStyle().copyWith( - color: _calendarController.isSelected(date) ? Colors.white : Colors.black, - fontSize: 14.0, - ), - ), - ), - ); +class MeetingDataSource extends CalendarDataSource { + MeetingDataSource(List source) { + appointments = source; } + + @override + DateTime getStartTime(int index) { + return _getMeetingData(index).from; + } + @override + DateTime getEndTime(int index) { + return _getMeetingData(index).to; + } + @override + String getSubject(int index) { + return _getMeetingData(index).eventName; + } + @override + Color getColor(int index) { + return _getMeetingData(index).background; + } + @override + bool isAllDay(int index) { + return _getMeetingData(index).isAllDay; + } + Meeting _getMeetingData(int index) { + final dynamic meeting = appointments[index]; + Meeting meetingData; + if (meeting is Meeting) { + meetingData = meeting; + } + return meetingData; + } +} + +class Meeting { + Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay); + + String eventName; + DateTime from; + DateTime to; + Color background; + bool isAllDay; } diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index dc983581..d1030636 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -1,5 +1,6 @@ import "dart:collection"; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; @@ -429,24 +430,36 @@ class _SearchByClinicState extends State { return false; } - getClinicsList() { + getClinicsList() async { GifLoaderDialogUtils.showMyDialog(context); - ClinicListService service = new ClinicListService(); - service.getClinicsList(context).then((res) { - if (res['MessageStatus'] == 1) { - setState(() { - isMobileAppDentalAllow = res['ISMobileAppDentalAllow']; - res['ListClinicCentralized'].forEach((v) { - clinicsList.add(new ListClinicCentralized.fromJson(v)); - }); + if (await sharedPref.getObject(CLINICS_LIST) != null) { + dynamic res = await sharedPref.getObject(CLINICS_LIST); + setState(() { + isMobileAppDentalAllow = res['ISMobileAppDentalAllow']; + res['ListClinicCentralized'].forEach((v) { + clinicsList.add(new ListClinicCentralized.fromJson(v)); }); - getProjectsList(); - GifLoaderDialogUtils.hideDialog(context); - } else {} - }).catchError((err) { - print(err); + }); + getProjectsList(); GifLoaderDialogUtils.hideDialog(context); - }); + } else { + ClinicListService service = new ClinicListService(); + service.getClinicsList(context).then((res) { + if (res['MessageStatus'] == 1) { + setState(() { + isMobileAppDentalAllow = res['ISMobileAppDentalAllow']; + res['ListClinicCentralized'].forEach((v) { + clinicsList.add(new ListClinicCentralized.fromJson(v)); + }); + }); + getProjectsList(); + GifLoaderDialogUtils.hideDialog(context); + } else {} + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + }); + } } getProjectsList() { diff --git a/lib/pages/BookAppointment/widgets/DoctorView.dart b/lib/pages/BookAppointment/widgets/DoctorView.dart index f909ce53..a73759b1 100644 --- a/lib/pages/BookAppointment/widgets/DoctorView.dart +++ b/lib/pages/BookAppointment/widgets/DoctorView.dart @@ -74,7 +74,7 @@ class DoctorView extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ if (doctor.clinicName != null) myRichText(TranslationBase.of(context).clinic + ":", doctor.clinicName, projectViewModel.isArabic), - if (doctor.projectName != null) myRichText(TranslationBase.of(context).hospital + ":", doctor.projectName, projectViewModel.isArabic), + if (doctor.projectName != null) myRichText(TranslationBase.of(context).branch, doctor.projectName, projectViewModel.isArabic), if (doctor.speciality != null) Text( getDoctorSpeciality(this.doctor.speciality).trim(), @@ -99,7 +99,11 @@ class DoctorView extends StatelessWidget { filledIcon: Icons.star, emptyIcon: Icons.star_border, ), - if (isShowFlag) Image.network(this.doctor.nationalityFlagURL, width: 22.0, height: 22.0) + if (isShowFlag) Icon( + Icons.arrow_forward, + color: Theme.of(context).primaryColor, + ), + // if (isShowFlag) Image.network(this.doctor.nationalityFlagURL, width: 22.0, height: 22.0) ], ), ], diff --git a/lib/pages/BookAppointment/widgets/reminder_dialog.dart b/lib/pages/BookAppointment/widgets/reminder_dialog.dart index 1e580712..2eb5e062 100644 --- a/lib/pages/BookAppointment/widgets/reminder_dialog.dart +++ b/lib/pages/BookAppointment/widgets/reminder_dialog.dart @@ -115,7 +115,7 @@ class _ReminderDialogState extends State { ), mHeight(20), Text( - "When would you like to set a reminder for this appointment?", + TranslationBase.of(context).appointmentReminder, style: TextStyle( fontSize: 16, color: Color(0xff2B353E), @@ -125,7 +125,7 @@ class _ReminderDialogState extends State { ), mHeight(20), Text( - "Please select from below options:", + TranslationBase.of(context).pleaseSelectFromBelowOptions, style: TextStyle( fontSize: 12, color: Color(0xff2B353E), @@ -135,7 +135,7 @@ class _ReminderDialogState extends State { ), ListTile( contentPadding: EdgeInsets.zero, - title: const Text('Before 30 Mins'), + title: Text(TranslationBase.of(context).appoReminder30), leading: Radio( value: 0, groupValue: i, @@ -148,7 +148,7 @@ class _ReminderDialogState extends State { ), ListTile( contentPadding: EdgeInsets.zero, - title: const Text('Before 1 Hour'), + title: Text(TranslationBase.of(context).appoReminder60), leading: Radio( value: 1, groupValue: i, @@ -161,7 +161,7 @@ class _ReminderDialogState extends State { ), ListTile( contentPadding: EdgeInsets.zero, - title: const Text('Before 1 Hour and 30 Mins'), + title: Text(TranslationBase.of(context).appoReminder90), leading: Radio( value: 2, groupValue: i, @@ -174,7 +174,7 @@ class _ReminderDialogState extends State { ), ListTile( contentPadding: EdgeInsets.zero, - title: const Text('Before 2 Hours'), + title: Text(TranslationBase.of(context).appoReminder120), leading: Radio( value: 3, groupValue: i, diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart index 2780d1d2..ceab7e45 100644 --- a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -45,7 +45,6 @@ class _HospitalsLiveChatPageState extends State { children: [ Text( TranslationBase.of(context).instructions, - textAlign: TextAlign.center, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), ), SizedBox(height: 20), @@ -87,12 +86,12 @@ class _HospitalsLiveChatPageState extends State { children: [ Expanded( child: Text( - model.LiveChatModelList[index]?.projectName ?? "", + model.LiveChatModelList[index].projectName.toString() + "\n" + model.LiveChatModelList[index].distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "", style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: tappedIndex == index ? Colors.white : Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), ), ), Icon( - Icons.arrow_forward_ios, + Icons.arrow_forward, color: tappedIndex == index ? Colors.white : Colors.black, ), ], diff --git a/lib/pages/ContactUs/LiveChat/livechat_page.dart b/lib/pages/ContactUs/LiveChat/livechat_page.dart index d2b24e89..fb9c0b0b 100644 --- a/lib/pages/ContactUs/LiveChat/livechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/livechat_page.dart @@ -45,7 +45,7 @@ class _LiveChatPageState extends State with SingleTickerProviderSt imagesInfo: imagesInfo, title: TranslationBase.of(context).liveChat, description: TranslationBase.of(context).infoChat, - appBarTitle: TranslationBase.of(context).service, + appBarTitle: TranslationBase.of(context).liveChat, showNewAppBar: true, showNewAppBarTitle: true, backgroundColor: CustomColors.appBackgroudGrey2Color, diff --git a/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart index f8926eed..2d99054e 100644 --- a/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart @@ -32,7 +32,6 @@ class PharmaciesLiveChatPage extends StatelessWidget { SizedBox(height: 20), Text( TranslationBase.of(context).instructions, - textAlign: TextAlign.center, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), ), ], @@ -44,14 +43,13 @@ class PharmaciesLiveChatPage extends StatelessWidget { padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), child: DefaultButton( TranslationBase.of(context).start, - () { - String chat; - chat = - "http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.isArabic ? 1 : 2}"; - launch(chat); - }, - color: Color(0xffD02127), - textColor: Colors.white, + null, + // () { + // String chat; + // chat = + // "http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.isArabic ? 1 : 2}"; + // launch(chat); + // }, disabledColor: Color(0xffEAEAEA), ), ), diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart index 5cdfd9d9..834d7a0a 100644 --- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart +++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart @@ -21,10 +21,11 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.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:flutter_svg/flutter_svg.dart'; import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; -import 'package:table_calendar/table_calendar.dart'; +// import 'package:table_calendar/table_calendar.dart'; + +import 'package:syncfusion_flutter_calendar/calendar.dart'; class CovidTimeSlots extends StatefulWidget { int projectID; @@ -100,24 +101,17 @@ class _CovidTimeSlotsState extends State with TickerProviderStat super.dispose(); } - void _onDaySelected(DateTime day, List events, ProjectViewModel projectViewModel) { + void _onDaySelected(DateTime day, ProjectViewModel projectViewModel) { final DateFormat formatter = DateFormat('yyyy-MM-dd'); setState(() { this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, projectViewModel.isArabic ? "ar" : "en"); openTimeSlotsPickerForDate(day, docFreeSlots); CovidTimeSlots.selectedDate = formatter.format(day); + _calendarController.selectedDate = day; print(CovidTimeSlots.selectedDate); }); } - void _onVisibleDaysChanged(DateTime first, DateTime last, CalendarFormat format) { - print('CALLBACK: _onVisibleDaysChanged'); - } - - void _onCalendarCreated(DateTime first, DateTime last, CalendarFormat format) { - print('CALLBACK: _onCalendarCreated'); - } - @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); @@ -151,6 +145,7 @@ class _CovidTimeSlotsState extends State with TickerProviderStat fontWeight: FontWeight.w600, ), ), + mHeight(12), Card( shape: cardRadius(12), child: _buildTableCalendarWithBuilders(projectViewModel), @@ -165,30 +160,36 @@ class _CovidTimeSlotsState extends State with TickerProviderStat ), ), mHeight(8), - Container( - height: 40, - child: ListView.builder( - controller: _scrollController, - scrollDirection: Axis.horizontal, - itemCount: dayEvents.length, - itemBuilder: (context, index) { - return Container( - margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 0 : 5.0, left: index == 0 ? 0 : 5), - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(5.0), - side: BorderSide( - color: index == selectedButtonIndex ? CustomColors.green : Colors.black, //Color of the border - style: BorderStyle.solid, //Style of the border - width: 1.5, //width of the border - ), - ), - minWidth: MediaQuery.of(context).size.width * 0.2, - child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index)), - ); - }, - ), - ), + CovidTimeSlots.areSlotsAvailable + ? Container( + height: 40, + child: ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: dayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 0 : 5.0, left: index == 0 ? 0 : 5), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5.0), + side: BorderSide( + color: index == selectedButtonIndex ? CustomColors.green : Colors.black, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5, //width of the border + ), + ), + minWidth: MediaQuery.of(context).size.width * 0.2, + child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index)), + ); + }, + ), + ) + : Center( + child: Padding( + padding: const EdgeInsets.only(left: 12.0, right: 12.0), + child: Text(TranslationBase.of(context).noSlotsError, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.grey)), + )), ], ), ), @@ -239,95 +240,35 @@ class _CovidTimeSlotsState extends State with TickerProviderStat } Widget _buildTableCalendarWithBuilders(ProjectViewModel projectViewModel) { - return TableCalendar( - locale: projectViewModel.isArabic ? 'ar_SA' : 'en_US', - calendarController: _calendarController, - events: _events, - initialCalendarFormat: CalendarFormat.month, - startDay: DateTime.now(), - formatAnimation: FormatAnimation.slide, - startingDayOfWeek: StartingDayOfWeek.sunday, - weekendDays: [DateTime.friday, DateTime.saturday], - availableGestures: AvailableGestures.horizontalSwipe, - availableCalendarFormats: const { - CalendarFormat.month: '', - CalendarFormat.week: '', - }, - calendarStyle: CalendarStyle( - outsideDaysVisible: false, - weekendStyle: TextStyle().copyWith(color: Colors.blue[800]), - holidayStyle: TextStyle().copyWith(color: Colors.blue[800]), - ), - daysOfWeekStyle: DaysOfWeekStyle( - weekendStyle: TextStyle().copyWith(color: Colors.black, fontSize: 11.0, fontWeight: FontWeight.w600), - weekdayStyle: TextStyle().copyWith(color: Colors.black, fontSize: 11.0, fontWeight: FontWeight.w600), - ), - headerStyle: HeaderStyle(centerHeaderTitle: true, formatButtonVisible: false, titleTextStyle: TextStyle(fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600)), - builders: CalendarBuilders( - selectedDayBuilder: (context, date, _) { - return FadeTransition( - opacity: Tween(begin: 0.0, end: 1.0).animate(_animationController), - child: Container( - margin: const EdgeInsets.all(4.0), - padding: const EdgeInsets.only(top: 5.0, left: 6.0), - color: Colors.transparent, - width: 0, - height: 0, - child: Text( - '${date.day}', - style: TextStyle().copyWith(fontSize: 14.0), - ), - ), - ); - }, - todayDayBuilder: (context, date, _) { - return Container( - decoration: BoxDecoration( - shape: BoxShape.circle, - color: _calendarController.isSelected(date) - ? Colors.green[400] - : _calendarController.isToday(date) - ? Colors.transparent - : Color(0xff76cfb7), - ), - width: 40.0, - height: 40.0, - child: Center( - child: Text( - '${date.day}', - style: TextStyle().copyWith( - color: Colors.white, - fontSize: 14.0, - ), - ), - ), - ); - }, - markersBuilder: (context, date, events, holidays) { - final children = []; - - if (events.isNotEmpty) { - children.add( - Positioned( - right: 4, - bottom: 4, - child: _buildEventsMarker(date, events), - ), - ); - } - - return children; - }, - ), - onDaySelected: (date, event, _) { - _onDaySelected(date, event, projectViewModel); - _animationController.forward(from: 0.0); + return SfCalendar( + controller: _calendarController, + minDate: DateTime.now(), + showNavigationArrow: true, + headerStyle: CalendarHeaderStyle(textAlign: TextAlign.center, textStyle: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46)), + viewHeaderStyle: ViewHeaderStyle(dayTextStyle: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black)), + view: CalendarView.month, + todayHighlightColor: CustomColors.green, + selectionDecoration: containerColorRadiusBorderWidthCircular(Colors.transparent, 4, CustomColors.green, 2.5), + cellBorderColor: Colors.white, + dataSource: MeetingDataSource(_getDataSource()), + monthViewSettings: const MonthViewSettings(appointmentDisplayMode: MonthAppointmentDisplayMode.indicator, showTrailingAndLeadingDates: false, appointmentDisplayCount: 1), + onTap: (CalendarTapDetails details) { + _calendarController.selectedDate = details.date; + _onDaySelected(details.date, projectViewModel); }, - onVisibleDaysChanged: _onVisibleDaysChanged, - onCalendarCreated: _onCalendarCreated, ); } + List _getDataSource() { + final List meetings = []; + _events.forEach((key, value) { + final DateTime startTime = DateTime(key.year, key.month, key.day, 9, 0, 0); + final DateTime endTime = startTime.add(const Duration(hours: 2)); + meetings.add(Meeting("", startTime, endTime, CustomColors.green, false)); + }); + return meetings; + } + openTimeSlotsPickerForDate(DateTime dateStart, List freeSlots) { dayEvents.clear(); DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); @@ -337,14 +278,12 @@ class _CovidTimeSlotsState extends State with TickerProviderStat }); setState(() { - if (dayEvents.length != 0) + if (dayEvents.length != 0) { CovidTimeSlots.areSlotsAvailable = true; - else + selectedButtonIndex = 0; + CovidTimeSlots.selectedTime = dayEvents[selectedButtonIndex].isoTime; + } else CovidTimeSlots.areSlotsAvailable = false; - - selectedButtonIndex = 0; - - CovidTimeSlots.selectedTime = dayEvents[selectedButtonIndex].isoTime; }); } @@ -366,43 +305,43 @@ class _CovidTimeSlotsState extends State with TickerProviderStat selectedDateJSON = freeSlotsResponse[0]['FreeTimeSlots']; }); openTimeSlotsPickerForDate(DateUtil.convertStringToDate(selectedDateJSON), docFreeSlots); - _calendarController.setFocusedDay(DateUtil.convertStringToDate(selectedDateJSON)); + _calendarController.selectedDate = DateUtil.convertStringToDate(selectedDateJSON); return _eventsParsed; } - Widget _buildEventsMarker(DateTime date, List events) { - return Container( - // decoration: BoxDecoration( - // shape: BoxShape.circle, - // color: _calendarController.isSelected(date) - // ? Colors.green[400] - // : _calendarController.isToday(date) - // ? Colors.brown[300] - // : Colors.blue[400], - // ), - - decoration: containerColorRadiusBorderWidth( - _calendarController.isSelected(date) - ? CustomColors.green - : _calendarController.isToday(date) - ? CustomColors.green.withOpacity(0.5) - : Colors.white, - 200, - _calendarController.isSelected(date) ? CustomColors.green : Colors.black, - 2), - width: 40.0, - height: 40.0, - child: Center( - child: Text( - '${date.day}', - style: TextStyle().copyWith( - color: _calendarController.isSelected(date) ? Colors.white : Colors.black, - fontSize: 13.0, - ), - ), - ), - ); - } + // Widget _buildEventsMarker(DateTime date, List events) { + // return Container( + // // decoration: BoxDecoration( + // // shape: BoxShape.circle, + // // color: _calendarController.isSelected(date) + // // ? Colors.green[400] + // // : _calendarController.isToday(date) + // // ? Colors.brown[300] + // // : Colors.blue[400], + // // ), + // + // decoration: containerColorRadiusBorderWidth( + // _calendarController.isSelected(date) + // ? CustomColors.green + // : _calendarController.isToday(date) + // ? CustomColors.green.withOpacity(0.5) + // : Colors.white, + // 200, + // _calendarController.isSelected(date) ? CustomColors.green : Colors.black, + // 2), + // width: 40.0, + // height: 40.0, + // child: Center( + // child: Text( + // '${date.day}', + // style: TextStyle().copyWith( + // color: _calendarController.isSelected(date) ? Colors.white : Colors.black, + // fontSize: 13.0, + // ), + // ), + // ), + // ); + // } Widget getNormalButton(int index) { return RaisedButton( @@ -436,12 +375,16 @@ class _CovidTimeSlotsState extends State with TickerProviderStat } bookCovidTestAppointment() { - GifLoaderDialogUtils.showMyDialog(context); - DoctorList docObject = new DoctorList(); - docObject.doctorID = widget.selectedDoctorID; - docObject.clinicID = widget.selectedClinicID; - docObject.projectID = widget.projectID; - insertAppointmentCovidTest(context, docObject); + if(CovidTimeSlots.areSlotsAvailable) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorList docObject = new DoctorList(); + docObject.doctorID = widget.selectedDoctorID; + docObject.clinicID = widget.selectedClinicID; + docObject.projectID = widget.projectID; + insertAppointmentCovidTest(context, docObject); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); + } } insertAppointmentCovidTest(context, DoctorList docObject) { @@ -485,12 +428,12 @@ class _CovidTimeSlotsState extends State with TickerProviderStat } getToDoCount() { - toDoProvider.setState(0, true); + toDoProvider.setState(0, true, toDoProvider.notificationsCount); ClinicListService service = new ClinicListService(); service.getActiveAppointmentNo(context).then((res) { print(res['AppointmentActiveNumber']); if (res['MessageStatus'] == 1) { - toDoProvider.setState(res['AppointmentActiveNumber'], true); + toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); } else {} }).catchError((err) { print(err); @@ -546,8 +489,8 @@ class _CovidTimeSlotsState extends State with TickerProviderStat if (res['COVID19_FreeTimeSlots'].length != 0) { freeSlotsResponse = res['COVID19_FreeTimeSlots']; _getJSONSlots().then((value) => { - setState(() => {widget.selectedClinicID = freeSlotsResponse[0]['ClinicID'], widget.selectedDoctorID = freeSlotsResponse[0]['DoctorID'], _events.clear(), _events = value}) - }); + setState(() => {widget.selectedClinicID = freeSlotsResponse[0]['ClinicID'], widget.selectedDoctorID = freeSlotsResponse[0]['DoctorID'], _events.clear(), _events = value}) + }); } else {} } else { GifLoaderDialogUtils.hideDialog(context); @@ -560,3 +503,53 @@ class _CovidTimeSlotsState extends State with TickerProviderStat }); } } + +class MeetingDataSource extends CalendarDataSource { + MeetingDataSource(List source) { + appointments = source; + } + + @override + DateTime getStartTime(int index) { + return _getMeetingData(index).from; + } + + @override + DateTime getEndTime(int index) { + return _getMeetingData(index).to; + } + + @override + String getSubject(int index) { + return _getMeetingData(index).eventName; + } + + @override + Color getColor(int index) { + return _getMeetingData(index).background; + } + + @override + bool isAllDay(int index) { + return _getMeetingData(index).isAllDay; + } + + Meeting _getMeetingData(int index) { + final dynamic meeting = appointments[index]; + Meeting meetingData; + if (meeting is Meeting) { + meetingData = meeting; + } + return meetingData; + } +} + +class Meeting { + Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay); + + String eventName; + DateTime from; + DateTime to; + Color background; + bool isAllDay; +} diff --git a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart index 458d9ec2..45cab249 100644 --- a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart +++ b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart @@ -170,6 +170,7 @@ class CovidDirveThruQuestionsState extends State { onChanged: (newValue) { setState(() { obj["ans"] = newValue; + checkAllChecked(); }); }), Text( @@ -192,6 +193,7 @@ class CovidDirveThruQuestionsState extends State { onChanged: (newValue) { setState(() { obj["ans"] = newValue; + checkAllChecked(); }); }), Text( @@ -228,7 +230,7 @@ class CovidDirveThruQuestionsState extends State { child: MaterialButton( height: 50, elevation: 0, - color: CustomColors.accentColor, + color: all2 ? CustomColors.accentColor : CustomColors.grey, disabledColor: Theme.of(context).appBarTheme.color.withOpacity(0.25), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), child: Text( @@ -249,6 +251,17 @@ class CovidDirveThruQuestionsState extends State { )); } + bool all2 = false; + + checkAllChecked() { + all2 = true; + qa.forEach((element) { + if (element["ans"] == 2 || element["ans"] == null) { + all2 = false; + } + }); + } + next() async { bool all = true; qa.forEach((element) { diff --git a/lib/pages/Covid-DriveThru/covid-payment-details.dart b/lib/pages/Covid-DriveThru/covid-payment-details.dart index 29a269af..81ba1285 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-details.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-details.dart @@ -117,6 +117,7 @@ class _CovidPaymentDetailsState extends State { onTap: () { setState(() { widget.selectedProcedure = widget.proceduresList[index]; + getPaymentInfo(context, widget.projectID.toString(), widget.selectedProcedure.procedureID); }); }, child: ListTile( diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart index 62eb6942..c47c8d36 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-summary.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.da import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; @@ -251,7 +252,16 @@ class _CovidPaymentSummaryState extends State { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); - if (isPaymentMade) checkPaymentStatus(appo); + if (isPaymentMade) { + checkPaymentStatus(appo); + } else { + print("onBrowserExit Payment Not made"); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + } } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { diff --git a/lib/pages/DrawerPages/family/add-family-member.dart b/lib/pages/DrawerPages/family/add-family-member.dart index be5c5152..75291ee2 100644 --- a/lib/pages/DrawerPages/family/add-family-member.dart +++ b/lib/pages/DrawerPages/family/add-family-member.dart @@ -51,6 +51,8 @@ class _AddMember extends State { return AppScaffold( appBarTitle: TranslationBase.of(context).myFamilyFiles, isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, body: isLoading == true ? AppCircularProgressIndicator() : SingleChildScrollView( @@ -69,7 +71,7 @@ class _AddMember extends State { Expanded( flex: 4, child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + // mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), //MobileNo(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), @@ -88,24 +90,24 @@ class _AddMember extends State { ], ), ), - // Expanded( - // flex: 3, - // child: Column( - // mainAxisAlignment: MainAxisAlignment.end, - // children: [ - // Row( - // children: [ - // Expanded( - // child: DefaultButton( - // TranslationBase.of(context).add, - // () => {this.addMember()}, - // color: isButtonDisabled == true ? Colors.grey : Colors.grey[900], - // textColor: Colors.white, - // )) - // ], - // ), - // ], - // )) + Expanded( + flex: 3, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Row( + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).add, + () => {this.addMember()}, + color: isButtonDisabled == true ? Colors.grey : Colors.red[600], + textColor: Colors.white, + )) + ], + ), + ], + )) ]), ))); } diff --git a/lib/pages/DrawerPages/family/add-family_type.dart b/lib/pages/DrawerPages/family/add-family_type.dart index 48773820..533669c7 100644 --- a/lib/pages/DrawerPages/family/add-family_type.dart +++ b/lib/pages/DrawerPages/family/add-family_type.dart @@ -6,6 +6,8 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:diplomaticquarterapp/widgets/habib_logo_widget.dart'; class AddFamilyMemberType extends StatelessWidget { static int loginType = 0; @@ -14,139 +16,204 @@ class AddFamilyMemberType extends StatelessWidget { return AppScaffold( appBarTitle: TranslationBase.of(context).myFamilyFiles, isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, body: Padding( - padding: EdgeInsets.all(20), - child: Column( - children: [ - Expanded( - flex: 6, - child: Column( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - 'assets/images/habib-logo.png', - height: 80, - width: 80, - ), - Padding( - padding: EdgeInsets.all(20), - child: AppText( - TranslationBase.of(context).registerInfoFamily, - fontSize: SizeConfig.textMultiplier * 3.5, - textAlign: TextAlign.left, - ), - ), - Padding( - padding: EdgeInsets.all(20), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: InkWell( - onTap: () => { - AddFamilyMemberType.loginType = 1, - Navigator.of(context) - .pushNamed(ADD_FAMILY_MEMBER) - }, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB( - 20, 10, 20, 10), - child: Column( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Image.asset( - 'assets/images/id_card_icon.png', - height: SizeConfig - .imageSizeMultiplier * - 12, - width: SizeConfig - .imageSizeMultiplier * - 15, - ), - SizedBox( - height: 20, - ), - AppText( - TranslationBase.of(context) - .idNo, - fontSize: SizeConfig - .textMultiplier * - 2, - ) - ], - ), - )))), - Expanded( - child: InkWell( - onTap: () => { - AddFamilyMemberType.loginType = 2, - Navigator.of(context) - .pushNamed(ADD_FAMILY_MEMBER) - }, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB( - 25, 10, 25, 10), - child: Column( - children: [ - Image.asset( - 'assets/images/my_file_white_icon.png', - height: SizeConfig - .imageSizeMultiplier * - 12, - width: SizeConfig - .imageSizeMultiplier * - 15, - ), - SizedBox( - height: 20, - ), - AppText( - TranslationBase.of(context) - .fileNo, - fontSize: SizeConfig - .textMultiplier * - 2, - ) - ], - ), - )))) - ], - )), - Divider( - color: Colors.grey, - height: 2, - ), - ]), - ), - // Expanded( - // flex: 2, - // child: Column( - // mainAxisAlignment: MainAxisAlignment.end, - // children: [ - // Row( - // children: [ - // Expanded( - // child: DefaultButton( - // TranslationBase.of(context).registerNow, - // () => { - // Navigator.of(context).pushNamed( - // REGISTER, - // ) - // }, - // )) - // ], - // ), - // ], - // )) - ], - ))); + padding: EdgeInsets.only(bottom: 20, left: 21, right: 21), + child: Column(children: [ + Expanded( + child: ListView( + padding: EdgeInsets.zero, + physics: BouncingScrollPhysics(), + children: [ + SizedBox(height: 12), + HabibLogoWidget(), + SizedBox(height: 50), + Text( + TranslationBase.of(context).logintypeRadio, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(top: 25), + shrinkWrap: true, + children: [ + getButton(context, TranslationBase.of(context).nationalIdNumber, 'assets/images/new/national_id.svg', 1), + getButton(context, TranslationBase.of(context).medicalFileNumber, 'assets/images/new/medical_file.svg', 2), + ], + ), + SizedBox(height: 20), + // RichText( + // text: TextSpan( + // text: TranslationBase.of(context).forgotPassword, + // style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12), + // recognizer: TapGestureRecognizer()..onTap = () => Navigator.of(context).push(FadePage(page: ForgotPassword())), + // ), + // ), + ], + ), + ), + // SizedBox( + // height: 43, + // width: double.infinity, + // child: FlatButton( + // onPressed: () {}, + // child: Text( + // TranslationBase.of(context).registerNow, + // style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48), + // ), + // color: Color(0xffD02127), + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(6), + // ), + // ), + // ), + ]), + )); + // body: Padding( + // padding: EdgeInsets.all(20), + // child: Column( + // children: [ + // Expanded( + // flex: 6, + // child: Column( + // // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Image.asset( + // 'assets/images/habib-logo.png', + // height: 80, + // width: 80, + // ), + // Padding( + // padding: EdgeInsets.all(20), + // child: AppText( + // TranslationBase.of(context).registerInfoFamily, + // fontSize: SizeConfig.textMultiplier * 3.5, + // textAlign: TextAlign.left, + // ), + // ), + // Padding( + // padding: EdgeInsets.all(20), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Expanded( + // child: InkWell( + // onTap: () => {AddFamilyMemberType.loginType = 1, Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER)}, + // child: RoundedContainer( + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(20, 10, 20, 10), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Image.asset( + // 'assets/images/id_card_icon.png', + // height: SizeConfig.imageSizeMultiplier * 12, + // width: SizeConfig.imageSizeMultiplier * 15, + // ), + // SizedBox( + // height: 20, + // ), + // AppText( + // TranslationBase.of(context).idNo, + // fontSize: SizeConfig.textMultiplier * 2, + // ) + // ], + // ), + // )))), + // Expanded( + // child: InkWell( + // onTap: () => {AddFamilyMemberType.loginType = 2, Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER)}, + // child: RoundedContainer( + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(25, 10, 25, 10), + // child: Column( + // children: [ + // Image.asset( + // 'assets/images/my_file_white_icon.png', + // height: SizeConfig.imageSizeMultiplier * 12, + // width: SizeConfig.imageSizeMultiplier * 15, + // ), + // SizedBox( + // height: 20, + // ), + // AppText( + // TranslationBase.of(context).fileNo, + // fontSize: SizeConfig.textMultiplier * 2, + // ) + // ], + // ), + // )))) + // ], + // )), + // Divider( + // color: Colors.grey, + // height: 2, + // ), + // ]), + // ), + // // Expanded( + // // flex: 2, + // // child: Column( + // // mainAxisAlignment: MainAxisAlignment.end, + // // children: [ + // // Row( + // // children: [ + // // Expanded( + // // child: DefaultButton( + // // TranslationBase.of(context).registerNow, + // // () => { + // // Navigator.of(context).pushNamed( + // // REGISTER, + // // ) + // // }, + // // )) + // // ], + // // ), + // // ], + // // )) + // ], + // ))); + } + + Widget getButton(BuildContext _context, String _title, String _icon, int _flag) { + return InkWell( + onTap: () { + AddFamilyMemberType.loginType = _flag; + Navigator.of(_context).pushNamed(ADD_FAMILY_MEMBER); + }, + child: Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SvgPicture.asset( + _icon, + height: 38, + width: 38, + ), + Text( + _title, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), + ), + ], + ), + ), + ); } } diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index fd6264ba..08491827 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -1,5 +1,6 @@ import 'dart:ui'; +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'; @@ -7,19 +8,23 @@ import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dar import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_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/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as list; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; -import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.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/buttons/button.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'; @@ -28,14 +33,13 @@ 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:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/routes.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; class MyFamily extends StatefulWidget { final bool isAppbarVisible; + MyFamily({this.isAppbarVisible = true}); + @override _MyFamily createState() => _MyFamily(); } @@ -55,6 +59,8 @@ class _MyFamily extends State with TickerProviderStateMixin { PharmacyModuleViewModel pharmacyModuleViewModel = locator(); ToDoCountProviderModel toDoProvider; var isVaiable = false; + bool isSwitchUser = false; + @override void initState() { _tabController = new TabController(length: 2, vsync: this, initialIndex: 0); @@ -80,6 +86,8 @@ class _MyFamily extends State with TickerProviderStateMixin { appBarTitle: TranslationBase.of(context).myFamilyFiles, isShowAppBar: widget.isAppbarVisible, imagesInfo: imagesInfo, + showNewAppBar: true, + showNewAppBarTitle: true, icon: "assets/images/new/bottom_nav/family_files.svg", description: TranslationBase.of(context).familyInfo, body: Scaffold( @@ -100,46 +108,64 @@ class _MyFamily extends State with TickerProviderStateMixin { // ), // ), // ), + // Center( + // child: Container( + // height: 60.0, + // // margin: EdgeInsets.only(top: 10.0), + // width: MediaQuery.of(context).size.width * 0.92, // 0.9, + // decoration: BoxDecoration( + // border: Border( + // bottom: BorderSide(color: Theme.of(context).dividerColor, width: 0.9), //width: 0.7 + // ), + // color: Colors.white), Center( - child: Container( - height: 60.0, - margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width * 0.92, // 0.9, - decoration: BoxDecoration( - border: Border( - bottom: BorderSide(color: Theme.of(context).dividerColor, width: 0.9), //width: 0.7 - ), - color: Colors.white), - child: Center( - child: TabBar( - isScrollable: true, - controller: _tabController, - indicatorWeight: 5.0, - //indicatorSize: TabBarIndicatorSize.label, - indicatorSize: TabBarIndicatorSize.tab, - - // indicatorColor: Theme.of(context).primaryColor, - // labelColor: Theme.of(context).primaryColor, - labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), - unselectedLabelColor: Colors.grey[800], - tabs: [ - Container( - width: MediaQuery.of(context).size.width * 0.30, - child: Center( - child: AppText(TranslationBase.of(context).family), - ), - ), - Container( - width: MediaQuery.of(context).size.width * 0.30, - child: Center( - child: AppText(TranslationBase.of(context).request), - ), - ), - ], - ), + child: + // TabBar( + // isScrollable: true, + // controller: _tabController, + // indicatorWeight: 5.0, + // indicatorSize: TabBarIndicatorSize.tab, + // labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), + // unselectedLabelColor: Colors.grey[800], + // tabs: [ + // Container( + // width: MediaQuery.of(context).size.width * 0.30, + // child: Center( + // child: AppText(TranslationBase.of(context).family), + // ), + // ), + // Container( + // width: MediaQuery.of(context).size.width * 0.30, + // child: Center( + // child: AppText(TranslationBase.of(context).request), + // ), + // ), + // ], + // ), + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, ), + tabs: [Text(TranslationBase.of(context).family), Text(TranslationBase.of(context).request)], ), ), + // ), + // ), ], ), ), @@ -157,15 +183,14 @@ class _MyFamily extends State with TickerProviderStateMixin { ], ), bottomSheet: Container( - width: MediaQuery.of(context).size.width, - height: 70.0, - margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0), - child: Button( - onTap: () async { + color: Theme.of(context).scaffoldBackgroundColor, + width: double.infinity, + padding: EdgeInsets.all(14), + child: DefaultButton( + TranslationBase.of(context).addFamilyMember, + () async { Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER_TYPE); }, - label: TranslationBase.of(context).addFamilyMember, - backgroundColor: Colors.red[900], ), ), ), @@ -193,50 +218,105 @@ class _MyFamily extends State with TickerProviderStateMixin { return Padding( padding: EdgeInsets.only(top: 50), child: Column(children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - flex: 3, - child: Texts( - TranslationBase.of(context).request, - textAlign: TextAlign.center, - )), - Expanded(flex: 2, child: Texts(TranslationBase.of(context).switchUser, textAlign: TextAlign.center)), - Expanded(flex: 1, child: Texts(TranslationBase.of(context).deleteView, textAlign: TextAlign.center)), - ], - ), + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Expanded( + // flex: 3, + // child: Texts( + // TranslationBase.of(context).request, + // textAlign: TextAlign.center, + // )), + // Expanded(flex: 2, child: Texts(TranslationBase.of(context).switchUser, textAlign: TextAlign.center)), + // Expanded(flex: 1, child: Texts(TranslationBase.of(context).deleteView, textAlign: TextAlign.center)), + // ], + // ), Column( mainAxisAlignment: MainAxisAlignment.start, children: snapshot.data.getAllSharedRecordsByStatusList.map((result) { return result.status == 3 - ? Padding( - padding: EdgeInsets.all(10), - child: Row( - children: [ - Expanded(flex: 3, child: Text(result.patientName)), - Expanded( - flex: 2, - child: IconButton( - icon: Icon(Icons.group), - color: Colors.black, - onPressed: () { - switchUser(result, context); - }, - )), - Expanded( - flex: 1, - child: IconButton( - icon: Icon( - Icons.delete, - color: Colors.black, - ), - onPressed: () { - deleteFamily(result, context); - }, - )), - ], - )) + ? Card( + margin: EdgeInsets.all(10), + shape: cardRadius(15), + color: result.gender == 1 ? Color(0xff6EA8FF) : Color(0xffFDA4B0), + elevation: 3, + child: Container( + // height: 130, + width: MediaQuery.of(context).size.width, + padding: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + result.patientName.toLowerCase().capitalizeFirstofEach, + fontSize: 22, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + Texts(TranslationBase.of(context).fileNumber + ': ' + result.responseID.toString(), fontSize: 12, color: Colors.white), + Texts(result.age.toString() + ' ' + TranslationBase.of(context).years + ', ' + result.genderDescription, fontSize: 12, color: Colors.white), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + CupertinoSwitch( + value: isSwitchUser, + onChanged: (value) { + setState(() { + isSwitchUser = value; + }); + if (isSwitchUser == true) switchUser(result, context); + }, + ), + Texts( + TranslationBase.of(context).switchUser, + color: Colors.white, + fontSize: 12, + ) + ], + ), + InkWell( + onTap: () { + deleteFamily(result, context); + }, + child: Row( + children: [ + Texts( + TranslationBase.of(context).delete, + color: Colors.white, + fontSize: 12, + ), + Icon( + Icons.delete, + color: Colors.white, + ), + ], + )) + ], + ) + // Expanded( + // flex: 2, + // child: IconButton( + // icon: Icon(Icons.group), + // color: Colors.black, + // onPressed: () { + // switchUser(result, context); + // }, + // )), + // Expanded( + // flex: 1, + // child: IconButton( + // icon: Icon( + // Icons.delete, + // color: Colors.black, + // ), + // onPressed: () { + // deleteFamily(result, context); + // }, + // )), + ], + ))) : SizedBox(); }).toList()) ])); @@ -281,7 +361,7 @@ class _MyFamily extends State with TickerProviderStateMixin { child: ExpansionTile( title: Text( TranslationBase.of(context).userViewRequest, - style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.black), ), children: [ FutureBuilder( @@ -294,51 +374,57 @@ class _MyFamily extends State with TickerProviderStateMixin { if (snapshot.hasError) return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable)); else - return Column( - children: [ - Column(children: [ - Padding( - padding: EdgeInsets.only(left: 10, right: 10), - child: Row(children: [ - Expanded(flex: 3, child: AppText(TranslationBase.of(context).name)), - Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow)), - Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject)), - ])), - Column( - children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map((result) { - return Padding( - padding: EdgeInsets.all(10), - child: Row( - children: [ - Expanded(flex: 3, child: Text(result.patientName)), - Expanded( - flex: 1, - child: IconButton( - icon: Icon( - Icons.check_circle, - color: Colors.black, - ), - onPressed: () { - acceptRemoveRequest(result.iD, 3, context); - }, - )), - Expanded( - flex: 1, - child: IconButton( - icon: Icon( - Icons.delete, - color: Colors.black, - ), - onPressed: () { - acceptRemoveRequest(result.iD, 4, context); - }, - )) - ], - )); - }).toList()) - ]) - ], - ); + return Container( + padding: EdgeInsets.all(15), + child: Card( + elevation: 3, + shape: cardRadius(8), + child: Column( + children: [ + Column(children: [ + Padding( + padding: EdgeInsets.all(10), + child: Row(children: [ + Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)), + 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), + Column( + children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map((result) { + return Container( + padding: EdgeInsets.all(10), + child: Row( + children: [ + Expanded(flex: 3, child: Text(result.patientName)), + Expanded( + flex: 1, + child: IconButton( + icon: Icon( + Icons.check_circle, + color: Colors.black, + ), + onPressed: () { + acceptRemoveRequest(result.iD, 3, context); + }, + )), + Expanded( + flex: 1, + child: IconButton( + icon: Icon( + Icons.delete, + color: Colors.black, + ), + onPressed: () { + acceptRemoveRequest(result.iD, 4, context); + }, + )) + ], + )); + }).toList()) + ]) + ], + ))); } }) ], @@ -348,7 +434,7 @@ class _MyFamily extends State with TickerProviderStateMixin { child: ExpansionTile( title: Text( TranslationBase.of(context).sentRequest, - style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.black), ), children: [ FutureBuilder( @@ -362,30 +448,40 @@ class _MyFamily extends State with TickerProviderStateMixin { return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable)); else return Container( + padding: EdgeInsets.all(15), height: SizeConfig.screenHeight * .3, - child: SingleChildScrollView( - child: Column( - children: [ - Padding(padding: EdgeInsets.only(left: 10, right: 10), child: Row(children: [Expanded(flex: 3, child: AppText(TranslationBase.of(context).theName))])), - Column( - children: snapshot.data.getAllSharedRecordsByStatusList.map((result) { - return Padding( + child: Card( + elevation: 3, + shape: cardRadius(8), + child: SingleChildScrollView( + child: Column( + children: [ + Padding( padding: EdgeInsets.all(10), - child: Row( - children: [ - Expanded(flex: 3, child: Text(result.patientName)), - Expanded( - flex: 2, - child: AppText( - result.statusDescription, - color: result.status == 3 ? Colors.green : Colors.red, - )), - ], - )); - }).toList(), - ) - ], - ))); + child: Row(children: [ + Expanded(flex: 3, child: AppText(TranslationBase.of(context).theName, fontWeight: FontWeight.w600)), + Expanded(flex: 2, child: AppText(TranslationBase.of(context).status, fontWeight: FontWeight.w600)) + ])), + Divider(color: Colors.black, height: 1), + Column( + children: snapshot.data.getAllSharedRecordsByStatusList.map((result) { + return Padding( + padding: EdgeInsets.all(10), + child: Row( + children: [ + Expanded(flex: 3, child: Text(result.patientName)), + Expanded( + flex: 2, + child: AppText( + result.statusDescription, + color: result.status == 3 ? Colors.green : Colors.red, + )), + ], + )); + }).toList(), + ) + ], + )))); } }) ], @@ -394,7 +490,7 @@ class _MyFamily extends State with TickerProviderStateMixin { child: ExpansionTile( title: Text( TranslationBase.of(context).userView, - style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.black), ), children: [ FutureBuilder( @@ -407,39 +503,45 @@ class _MyFamily extends State with TickerProviderStateMixin { if (snapshot.hasError) return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable)); else - return Column( - children: [ - Column(children: [ - Padding( - padding: EdgeInsets.only(left: 10, right: 10), - child: Row(children: [ - Expanded(flex: 3, child: AppText(TranslationBase.of(context).name)), - Expanded(flex: 1, child: AppText(TranslationBase.of(context).delete)), - ])), - Column( - children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map((result) { - return Padding( - padding: EdgeInsets.all(10), - child: Row( - children: [ - Expanded(flex: 3, child: AppText(result.patientName)), - Expanded( - flex: 1, - child: IconButton( - icon: Icon( - Icons.delete, - color: Colors.black, - ), - onPressed: () { - deactivateRequest(result.iD, 5, context); - }, - )), - ], - )); - }).toList()) - ]) - ], - ); + return Container( + padding: EdgeInsets.all(15), + child: Card( + elevation: 3, + shape: cardRadius(8), + child: Column( + children: [ + Column(children: [ + Padding( + padding: EdgeInsets.all(10), + child: Row(children: [ + Expanded(flex: 3, child: AppText(TranslationBase.of(context).name)), + Expanded(flex: 1, child: AppText(TranslationBase.of(context).delete)), + ])), + Divider(color: Colors.black), + Column( + children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map((result) { + return Padding( + padding: EdgeInsets.all(10), + child: Row( + children: [ + Expanded(flex: 3, child: AppText(result.patientName)), + Expanded( + flex: 1, + child: IconButton( + icon: Icon( + Icons.delete, + color: Colors.black, + ), + onPressed: () { + deactivateRequest(result.iD, 5, context); + }, + )), + ], + )); + }).toList()) + ]) + ], + ))); } }) ], @@ -523,38 +625,40 @@ class _MyFamily extends State with TickerProviderStateMixin { } loginAfter(result, context) async { - GifLoaderDialogUtils.hideDialog(context); var currentLang = await sharedPref.getString(APP_LANGUAGE); Provider.of(context, listen: false).setPrivilege(privilegeList: result, isLoginChild: true); result = list.CheckActivationCode.fromJson(result); + var familyFile = await sharedPref.getObject(FAMILY_FILE); - result = list.CheckActivationCode.fromJson(result); var mainUser = await sharedPref.getObject(MAIN_USER); - var bloodType = await sharedPref.getString(BLOOD_TYPE); + var loginType = await sharedPref.getInt(LAST_LOGIN); this.sharedPref.clear(); if (mainUser["PatientID"] != result.list.patientID) { result.list.isFamily = true; } + this.sharedPref.setString(APP_LANGUAGE, currentLang); + this.sharedPref.setInt(LAST_LOGIN, loginType); this.sharedPref.setObject(MAIN_USER, mainUser); this.sharedPref.setObject(USER_PROFILE, result.list); this.sharedPref.setObject(FAMILY_FILE, familyFile); this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); this.sharedPref.setString(TOKEN, result.authenticationTokenID); + await authenticatedUserObject.getUser(getUser: true); Provider.of(context, listen: false).user = authenticatedUserObject.user; Provider.of(context, listen: false).setUser(authenticatedUserObject.user); - await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { - if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser(); - }); + // await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { + // if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser(); + // }); appointmentRateViewModel .getIsLastAppointmentRatedList() .then((value) => { getToDoCount(), - // Utils.hideProgressDialog(), + GifLoaderDialogUtils.hideDialog(context), if (appointmentRateViewModel.isHaveAppointmentNotRate) { Navigator.pushAndRemoveUntil( @@ -577,7 +681,7 @@ class _MyFamily extends State with TickerProviderStateMixin { .catchError((err) { print(err); // Utils.hideProgressDialog(); - // GifLoaderDialogUtils.hideDialog(context); + GifLoaderDialogUtils.hideDialog(context); }); } @@ -610,12 +714,12 @@ class _MyFamily extends State with TickerProviderStateMixin { } getToDoCount() { - toDoProvider.setState(0, true); + toDoProvider.setState(0, true, toDoProvider.notificationsCount); ClinicListService service = new ClinicListService(); service.getActiveAppointmentNo(context).then((res) { print(res['AppointmentActiveNumber']); if (res['MessageStatus'] == 1 && res['AppointmentActiveNumber'] != null) { - toDoProvider.setState(res['AppointmentActiveNumber'], true); + toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); } else {} }).catchError((err) { print(err); diff --git a/lib/pages/DrawerPages/notifications/notification_details_page.dart b/lib/pages/DrawerPages/notifications/notification_details_page.dart index 12ed0bc4..ee1398be 100644 --- a/lib/pages/DrawerPages/notifications/notification_details_page.dart +++ b/lib/pages/DrawerPages/notifications/notification_details_page.dart @@ -50,13 +50,12 @@ class NotificationsDetailsPage extends StatelessWidget { height: 25, ), Container( - // margin: EdgeInsets.only(left: 30), width: double.infinity, color: Colors.grey[400], child: Padding( padding: const EdgeInsets.all(8.0), child: Texts( - getDateForm(notification.createdOn), + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(notification.createdOn)) + " " + DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(notification.createdOn), false), fontSize: 16, ), ), diff --git a/lib/pages/DrawerPages/notifications/notifications_page.dart b/lib/pages/DrawerPages/notifications/notifications_page.dart index 6f19c8af..aba2fb13 100644 --- a/lib/pages/DrawerPages/notifications/notifications_page.dart +++ b/lib/pages/DrawerPages/notifications/notifications_page.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_ import 'package:diplomaticquarterapp/core/viewModels/notifications_view_model.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notification_details_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -60,8 +61,9 @@ class NotificationsPage extends StatelessWidget { .map( (notification) => InkWell( onTap: () async { - if (!notification.isRead) + if (!notification.isRead) { model.markAsRead(notification.id); + } Navigator.push( context, FadePage( @@ -82,7 +84,7 @@ class NotificationsPage extends StatelessWidget { border: Border.all( color: notification.isRead ? Colors.grey[200] - : Theme.of(context).primaryColor, + : CustomColors.accentColor, width: 0.5), ), child: Row( @@ -93,7 +95,7 @@ class NotificationsPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts(getDateForm(notification.createdOn)), + Texts(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(notification.createdOn)) + " " + DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(notification.createdOn), false)), SizedBox( height: 5, ), diff --git a/lib/pages/ErService/ErOptions.dart b/lib/pages/ErService/ErOptions.dart index 1fbda90c..095ad884 100644 --- a/lib/pages/ErService/ErOptions.dart +++ b/lib/pages/ErService/ErOptions.dart @@ -87,7 +87,7 @@ class _ErOptionsState extends State { ), InkWell( onTap: () { - Navigator.push(context, FadePage(page: RRTMainScreen())); + if(rrtLocked) Navigator.push(context, FadePage(page: RRTMainScreen())); }, child: MedicalProfileItem( title: TranslationBase.of(context).rrtService, diff --git a/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart b/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart index 289785f1..c7c12a2d 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart @@ -5,6 +5,10 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; class RRTLogPage extends StatefulWidget { final List orders; @@ -18,10 +22,18 @@ class RRTLogPage extends StatefulWidget { class RRTLogPageState extends State { RRTViewModel viewModel; + @override + void initState() { + setState(() {}); + super.initState(); + } + @override Widget build(BuildContext context) { return BaseView( - onModelReady: (vm) => viewModel = vm, + onModelReady: (vm) => { + viewModel = vm, + }, builder: (ctx, vm, widgetState) { return ListView.builder( itemCount: widget.orders.length, @@ -36,12 +48,13 @@ class RRTLogPageState extends State { deleteOrder(PrescriptionsOrder order) async { GifLoaderDialogUtils.showMyDialog(context); var success = await viewModel.cancelOrder(order); - GifLoaderDialogUtils.hideDialog(context); + if (success) { - setState(() { - widget.orders.remove(order); - }); + viewModel.setState(ViewState.Busy); + await viewModel.getAllOrders(); + viewModel.setState(ViewState.Idle); + Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); + Navigator.push(context, FadePage(page: RRTMainScreen())); } - await viewModel.getAllOrders(); } } 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 6e875749..351c918a 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart @@ -9,6 +9,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class RRTMainScreen extends StatefulWidget { + final index = 0; + RRTMainScreen({index}); @override State createState() => RRTMainScreenState(); } diff --git a/lib/pages/ErService/rapid-response-team/rrt-order-list-item.dart b/lib/pages/ErService/rapid-response-team/rrt-order-list-item.dart index 656d47e0..a2ef7cd0 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-order-list-item.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-order-list-item.dart @@ -5,26 +5,37 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; final _item_content_seperator = Container(height: 0.25, padding: EdgeInsets.all(10), color: Colors.grey.withOpacity(0.5)); -class RRTLogListItem extends StatelessWidget { +class RRTLogListItem extends StatefulWidget { final PrescriptionsOrder order; final Function(PrescriptionsOrder) onCancel; RRTLogListItem(this.order, {this.onCancel}); - + @override + State createState() => RRTLogListItemState(); BuildContext _context; +} +class RRTLogListItemState extends State { + RRTViewModel viewModel; TranslationBase localize; @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - _context = context; + localize = TranslationBase.of(context); - int status = order.status; - String _statusDisp = projectViewModel.isArabic ? order.descriptionN : order.description; + int status = widget.order.status; + String _statusDisp = projectViewModel.isArabic ? widget.order.descriptionN : widget.order.description; Color _color; if (status == 1) { //pending @@ -39,119 +50,126 @@ class RRTLogListItem extends StatelessWidget { //cancel // Rejected _color = Color(0xffD02127); } - return Container( - margin: EdgeInsets.all(5), - decoration: BoxDecoration( - color: _color, - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), - boxShadow: [ - BoxShadow( - color: Color(0xff000000).withOpacity(.05), - blurRadius: 27, - offset: Offset(0, -3), - ), - ], - ), - child: Container( - // decoration: containerColorRadiusLeft(Colors.white, 12), - margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), - padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), - decoration: BoxDecoration( - color: Colors.white, - border: Border.all(color: Colors.white, width: 1), - borderRadius: BorderRadius.only( - bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), - topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), - bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), - topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), - ), - ), - // clipBehavior: Clip.antiAlias, - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, + return BaseView( + onModelReady: (vm) => { + viewModel = vm, + }, + builder: (ctx, vm, widgetState) { + return Container( + margin: EdgeInsets.all(5), + decoration: BoxDecoration( + color: _color, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Container( + // decoration: containerColorRadiusLeft(Colors.white, 12), + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + // clipBehavior: Clip.antiAlias, + child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - _statusDisp, - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10), - ), - SizedBox(height: 6), - Text( - '${TranslationBase.of(context).requestID}: ${order.iD}', - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - TranslationBase.of(context).locationa + ": ", - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), - ), - Expanded( - child: Text( - !projectViewModel.isArabic ? order.nearestProjectDescription.trim().toString() : order.nearestProjectDescriptionN.toString(), - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _statusDisp, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10), ), - ), - ], + SizedBox(height: 6), + Text( + '${TranslationBase.of(context).requestID}: ${widget.order.iD}', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).locationa + ": ", + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + !projectViewModel.isArabic ? widget.order.nearestProjectDescription.trim().toString() : widget.order.nearestProjectDescriptionN.toString(), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), + ), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + localize.pickupDate + ": ", + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + widget.order.getFormattedDateTime(), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), + ), + ), + ], + ), + ], + ), ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - localize.pickupDate + ": ", - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + DateUtil.getDayMonthYearDateFormattedLang(widget.order.createdOn, projectViewModel.isArabic), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), ), - Expanded( - child: Text( - order.getFormattedDateTime(), - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), + SizedBox(height: 12), + if (widget.order.status == 1 || widget.order.status == 2) + InkWell( + onTap: () { + //onCancel(order); + cancelOrders(widget.order); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), + decoration: BoxDecoration( + color: Color(0xffD02127), + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.circular(10), + ), + child: Text( + TranslationBase.of(context).cancel_nocaps, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), + ), + ), ), - ), ], ), ], ), ), - Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Text( - DateUtil.getDayMonthYearDateFormattedLang(order.createdOn, projectViewModel.isArabic), - 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) - InkWell( - onTap: () { - onCancel(order); - }, - child: Container( - padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), - decoration: BoxDecoration( - color: Color(0xffD02127), - border: Border.all(color: Colors.white, width: 1), - borderRadius: BorderRadius.circular(10), - ), - child: Text( - TranslationBase.of(context).cancel_nocaps, - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), - ), - ), - ), - ], - ), - ], - ), - ), - ); + ); + }); // return Container( // padding: EdgeInsets.all(15), @@ -207,4 +225,16 @@ class RRTLogListItem extends StatelessWidget { // style: TextStyle(color: Colors.white, fontSize: 13), // ), // ); + cancelOrders(order) async { + GifLoaderDialogUtils.showMyDialog(context); + var success = await viewModel.cancelOrder(order); + + if (success) { + viewModel.setState(ViewState.Busy); + await viewModel.getAllOrders(); + viewModel.setState(ViewState.Idle); + Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); + Navigator.push(context, FadePage(page: RRTMainScreen())); + } + } } diff --git a/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart index 7a82ecff..e738a438 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart @@ -116,9 +116,7 @@ class RRTRequestPickupAddressPageState extends State Utils.route(route, equalsTo: ErOptions)); + gotoRRTRoot() async { + viewModel.setState(ViewState.Busy); + await viewModel.getAllOrders(); + viewModel.setState(ViewState.Idle); + Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); + Navigator.push(_context, FadePage(page: RRTMainScreen())); } } diff --git a/lib/pages/ErService/rapid-response-team/rrt-request-page.dart b/lib/pages/ErService/rapid-response-team/rrt-request-page.dart index c6e56c34..28cd3cf4 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-request-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-request-page.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-ord import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.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'; @@ -190,6 +191,7 @@ class RRTRequestPageState extends State { else AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); }, + color: acceptTerms ? CustomColors.accentColor : Colors.grey, ), ), ], diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 13b86071..be44855d 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -94,6 +94,7 @@ class _AppointmentDetailsState extends State with SingleTick DoctorHeader( headerModel: HeaderModel( widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, + widget.appo.doctorID, widget.appo.doctorImageURL, widget.appo.doctorSpeciality, "", @@ -107,7 +108,7 @@ class _AppointmentDetailsState extends State with SingleTick "", //model.user.emailAddress, ), - isNeedToShowButton: (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) ? false : true, + isNeedToShowButton: (widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) ? false : true, buttonTitle: TranslationBase.of(context).schedule, buttonIcon: 'assets/images/new/Boo_ Appointment.svg', showConfirmMessageDialog: false, @@ -136,7 +137,7 @@ class _AppointmentDetailsState extends State with SingleTick onTap: (index) { setState(() { if (index == 1) { - if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) { + if (widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) { _tabController.index = _tabController.previousIndex; AppointmentDetails.showFooterButton = false; } else { @@ -147,7 +148,7 @@ class _AppointmentDetailsState extends State with SingleTick }, tabs: [ Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))), - widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment + widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 47 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment ? Tab( child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)), ) @@ -357,13 +358,15 @@ class _AppointmentDetailsState extends State with SingleTick width: 100.0, margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))), - Container( - margin: EdgeInsets.only(top: 10.0), - child: SizedBox( - width: getRatingWidth(doctorDetailsList[0].patientNumber), - height: 6.0, - child: Container( - color: Colors.green[700], + Expanded( + child: Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[0].patientNumber), + height: 6.0, + child: Container( + color: Colors.green[700], + ), ), ), ), @@ -579,11 +582,11 @@ class _AppointmentDetailsState extends State with SingleTick } getToDoCount() { - toDoProvider.setState(0, true); + toDoProvider.setState(0, true, toDoProvider.notificationsCount); ClinicListService service = new ClinicListService(); service.getActiveAppointmentNo(context).then((res) { if (res['MessageStatus'] == 1) { - toDoProvider.setState(res['AppointmentActiveNumber'], true); + toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); } else {} }).catchError((err) { print(err); diff --git a/lib/pages/MyAppointments/SchedulePage.dart b/lib/pages/MyAppointments/SchedulePage.dart index 3dea8b50..cd34a98e 100644 --- a/lib/pages/MyAppointments/SchedulePage.dart +++ b/lib/pages/MyAppointments/SchedulePage.dart @@ -167,7 +167,7 @@ class _SchedulePageState extends State { ? Icons .arrow_back_ios_outlined : Icons - .arrow_forward_ios_outlined, size: 16.0), + .arrow_forward_outlined, size: 16.0), ], ) ]))), diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index fd402a6b..ee94a616 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -67,7 +67,7 @@ class _AppointmentActionsState extends State { padding: EdgeInsets.all(21), shrinkWrap: true, itemBuilder: (context, index) { - bool shouldEnable = (widget.appo.clinicID == 17 && appoButtonsList[index].caller == "openReschedule"); + bool shouldEnable = (widget.appo.clinicID == 17 && widget.appo.clinicID == 47 && appoButtonsList[index].caller == "openReschedule"); return InkWell( onTap: shouldEnable ? null diff --git a/lib/pages/MyAppointments/widgets/PrescriptionReport.dart b/lib/pages/MyAppointments/widgets/PrescriptionReport.dart index c017a648..33c55ddd 100644 --- a/lib/pages/MyAppointments/widgets/PrescriptionReport.dart +++ b/lib/pages/MyAppointments/widgets/PrescriptionReport.dart @@ -74,7 +74,7 @@ class _PrescriptionReportState extends State { .prescriptionReportEnhList[index].itemDescription)), )), Icon( - Icons.arrow_forward_ios, + Icons.arrow_forward, size: 18, color: Colors.grey[500], ) diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart index fef55190..f2a96651 100644 --- a/lib/pages/ToDoList/payment_method_select.dart +++ b/lib/pages/ToDoList/payment_method_select.dart @@ -47,7 +47,7 @@ class _PaymentMethodState extends State { updateSelectedPaymentMethod("MADA"); }, child: Card( - elevation: 3.0, + elevation: 0.0, margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), color: Colors.white, shape: RoundedRectangleBorder( @@ -83,7 +83,7 @@ class _PaymentMethodState extends State { updateSelectedPaymentMethod("VISA"); }, child: Card( - elevation: 3.0, + elevation: 0.0, margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), color: Colors.white, shape: RoundedRectangleBorder( @@ -119,7 +119,7 @@ class _PaymentMethodState extends State { updateSelectedPaymentMethod("MASTERCARD"); }, child: Card( - elevation: 3.0, + elevation: 0.0, margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), color: Colors.white, shape: RoundedRectangleBorder( @@ -155,7 +155,7 @@ class _PaymentMethodState extends State { updateSelectedPaymentMethod("Installment"); }, child: Card( - elevation: 3.0, + elevation: 0.0, margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), color: Colors.white, shape: RoundedRectangleBorder( @@ -192,7 +192,7 @@ class _PaymentMethodState extends State { updateSelectedPaymentMethod("ApplePay"); }, child: Card( - elevation: 3.0, + elevation: 0.0, margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), color: Colors.white, shape: RoundedRectangleBorder( diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart index 7ba5e29c..a95fb425 100644 --- a/lib/pages/feedback/send_feedback_page.dart +++ b/lib/pages/feedback/send_feedback_page.dart @@ -5,7 +5,9 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode 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/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; @@ -13,6 +15,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -49,6 +52,8 @@ class _SendFeedbackPageState extends State { var reconizedWord; var event = RobotProvider(); + List appoList = []; + String getSelected(BuildContext context) { switch (messageType) { case MessageType.ComplaintOnAnAppointment: @@ -111,7 +116,7 @@ class _SendFeedbackPageState extends State { children: [ Text( TranslationBase.of(context).likeToHear, - textAlign: TextAlign.center, + // textAlign: TextAlign.center, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), ), SizedBox(height: 21), @@ -159,184 +164,50 @@ class _SendFeedbackPageState extends State { isShowListAppointHistory = true; }); }, - child: Container( - // margin: EdgeInsets.all(8.0), - 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( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(10.0), - child: Row( - children: [ - Expanded( - flex: 1, - child: LargeAvatar( - name: appointHistory.doctorNameObj, - url: appointHistory.doctorImageURL, - ), - ), - Expanded( - flex: 4, - child: Container( - margin: EdgeInsets.all(10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - appointHistory.doctorNameObj, - bold: true, - ), - Texts( - DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)), - variant: 'caption3', - ), - StarRating(totalAverage: appointHistory.doctorRate.toDouble(), forceStars: true), - ], - ), - ), - ), - ], - ), - ), - ], - ), - ), - Expanded( - flex: 1, - child: Center( - child: Icon( - Icons.arrow_forward_ios, - size: 15, - ), - ), - ) - ], - ), + child: DoctorCard( + onTap: null, + isInOutPatient: appointHistory.isInOutPatient, + name: appointHistory.doctorTitle + " " + appointHistory.doctorNameObj, + // billNo: _appointmentResult.invoiceNo, + profileUrl: appointHistory.doctorImageURL, + subName: appointHistory.projectName, + isLiveCareAppointment: appointHistory.isLiveCareAppointment, + date: DateUtil.convertStringToDate(appointHistory.appointmentDate), + rating: appointHistory.actualDoctorRate + 0.0, + appointmentTime: appointHistory.startTime.substring(0, 5), ), ), - if (messageType == MessageType.ComplaintOnAnAppointment && model.appointHistoryList.length != 0 && isShowListAppointHistory) + SizedBox(height: 12), + if (messageType == MessageType.ComplaintOnAnAppointment && appoList.length != 0 && isShowListAppointHistory) Container( - height: model.appointHistoryList.length > 2 ? MediaQuery.of(context).size.height * 0.25 : MediaQuery.of(context).size.height * 0.15, + margin: EdgeInsets.only(bottom: 10.0), + height: appoList.length > 2 ? MediaQuery.of(context).size.height * 0.35 : MediaQuery.of(context).size.height * 0.17, child: ListView.builder( - itemCount: model.appointHistoryList.length, + itemCount: appoList.length, itemBuilder: (context, index) => InkWell( onTap: () { setState(() { - appointHistory = model.appointHistoryList[index]; + appointHistory = appoList[index]; isShowListAppointHistory = false; }); }, - child: Container( - margin: EdgeInsets.only(left: 8, right: 8), - color: Colors.white, - child: Column( - children: [ - Row( - children: [ - Expanded( - flex: 4, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(10.0), - child: Row( - children: [ - Expanded( - flex: 1, - child: LargeAvatar( - name: model.appointHistoryList[index].doctorNameObj, - url: model.appointHistoryList[index].doctorImageURL, - ), - ), - Expanded( - flex: 4, - child: Container( - margin: EdgeInsets.all(10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - model.appointHistoryList[index].doctorNameObj, - bold: true, - ), - Texts( - DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)), - variant: 'caption3', - ), - StarRating(totalAverage: model.appointHistoryList[index].doctorRate.toDouble(), forceStars: true), - ], - ), - ), - ), - ], - ), - ), - ], - ), - ), - Expanded( - flex: 1, - child: Center( - child: Icon( - Icons.arrow_forward_ios, - size: 15, - ), - ), - ) - ], - ), - SizedBox( - height: 5, - ), - Divider( - height: 0.5, - color: Colors.grey[400], - ) - ], - ), + child: DoctorCard( + onTap: null, + isInOutPatient: appoList[index].isInOutPatient, + name: appoList[index].doctorTitle + " " + appoList[index].doctorNameObj, + profileUrl: appoList[index].doctorImageURL, + subName: appoList[index].projectName, + isLiveCareAppointment: appoList[index].isLiveCareAppointment, + date: DateUtil.convertStringToDate(appoList[index].appointmentDate), + rating: appoList[index].actualDoctorRate + 0.0, + appointmentTime: appoList[index].startTime.substring(0, 5), ), ), ), ), - inputWidget(TranslationBase.of(context).subject, "xxxxxxxx", titleController), + inputWidget(TranslationBase.of(context).subject, "", titleController), SizedBox(height: 12), - inputWidget(TranslationBase.of(context).message, "xxxxxxxx", messageController, lines: 11, suffixTap: () { + inputWidget(TranslationBase.of(context).message, "", messageController, lines: 11, suffixTap: () { openSpeechReco(); }), SizedBox(height: 12), @@ -492,7 +363,7 @@ class _SendFeedbackPageState extends State { TextField( enabled: isEnable, scrollPadding: EdgeInsets.zero, - keyboardType: TextInputType.number, + keyboardType: TextInputType.text, controller: _controller, maxLines: lines, onChanged: (value) => {setState(() {})}, @@ -515,19 +386,6 @@ class _SendFeedbackPageState extends State { ), suffixIconConstraints: BoxConstraints(minWidth: 50), suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap), - // prefixIconConstraints: BoxConstraints(minWidth: 50), - // prefixIcon: suffix == null - // ? null - // : Text( - // "+" + suffix, - // style: TextStyle( - // fontSize: 14, - // height: 21 / 14, - // fontWeight: FontWeight.w500, - // color: Color(0xff2E303A), - // letterSpacing: -0.56, - // ), - // ), contentPadding: EdgeInsets.zero, border: InputBorder.none, focusedBorder: InputBorder.none, @@ -570,19 +428,39 @@ class _SendFeedbackPageState extends State { // Show Dialog function void confirmBox(FeedbackViewModel model) { + DoctorsListService service = new DoctorsListService(); showDialog( context: context, child: FeedbackTypeDialog( messageTypeDialog: messageType, onValueSelected: (MessageType value) { if (value == MessageType.ComplaintOnAnAppointment) { + appoList.clear(); GifLoaderDialogUtils.showMyDialog(context); - model.getPatentAppointmentHistory().then((value) { + service.getPatientAppointmentHistory(false, context, isForCOC: true).then((res) { GifLoaderDialogUtils.hideDialog(context); setState(() { - appointHistory = null; + if (res['MessageStatus'] == 1) { + if (res['AppoimentAllHistoryResultList'].length != 0) { + res['AppoimentAllHistoryResultList'].forEach((v) { + appoList.add(new AppoitmentAllHistoryResultList.fromJson(v)); + }); + setState(() { + appointHistory = null; + isShowListAppointHistory = true; + }); + } else {} + } else { + } }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + // print(err); + // AppToast.showErrorToast(message: err); + // Navigator.of(context).pop(); }); + } else { + isShowListAppointHistory = false; } setMessageType(value); }, @@ -694,7 +572,7 @@ class FeedbackTypeDialogState extends State { leading: Radio( value: MessageType.NON, groupValue: messageTypeDialog, - activeColor: Theme.of(context).primaryColor, + activeColor: CustomColors.accentColor, onChanged: (MessageType value) => setMessageDialogType(value), ), ), @@ -716,7 +594,7 @@ class FeedbackTypeDialogState extends State { leading: Radio( value: MessageType.ComplaintOnAnAppointment, groupValue: messageTypeDialog, - activeColor: Theme.of(context).primaryColor, + activeColor: CustomColors.accentColor, onChanged: (MessageType value) => setMessageDialogType(value), ), ), @@ -738,7 +616,7 @@ class FeedbackTypeDialogState extends State { leading: Radio( value: MessageType.ComplaintWithoutAppointment, groupValue: messageTypeDialog, - activeColor: Theme.of(context).primaryColor, + activeColor: CustomColors.accentColor, onChanged: (MessageType value) => setMessageDialogType(value), ), ), @@ -760,7 +638,7 @@ class FeedbackTypeDialogState extends State { leading: Radio( value: MessageType.Question, groupValue: messageTypeDialog, - activeColor: Theme.of(context).primaryColor, + activeColor: CustomColors.accentColor, onChanged: (MessageType value) => setMessageDialogType(value), ), ), @@ -782,7 +660,7 @@ class FeedbackTypeDialogState extends State { leading: Radio( value: MessageType.Compliment, groupValue: messageTypeDialog, - activeColor: Theme.of(context).primaryColor, + activeColor: CustomColors.accentColor, onChanged: (MessageType value) => setMessageDialogType(value), ), ), @@ -804,7 +682,7 @@ class FeedbackTypeDialogState extends State { leading: Radio( value: MessageType.Suggestion, groupValue: messageTypeDialog, - activeColor: Theme.of(context).primaryColor, + activeColor: CustomColors.accentColor, onChanged: (MessageType value) => setMessageDialogType(value), ), ), @@ -837,7 +715,7 @@ class FeedbackTypeDialogState extends State { child: Center( child: Texts( TranslationBase.of(context).cancel, - color: Theme.of(context).primaryColor, + color: CustomColors.accentColor, ), ), ), diff --git a/lib/pages/feedback/status_feedback_page.dart b/lib/pages/feedback/status_feedback_page.dart index 18993f1d..cbbf2572 100644 --- a/lib/pages/feedback/status_feedback_page.dart +++ b/lib/pages/feedback/status_feedback_page.dart @@ -1,13 +1,16 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.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/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.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 'package:provider/provider.dart'; class StatusFeedbackPage extends StatefulWidget { @override @@ -17,6 +20,7 @@ class StatusFeedbackPage extends StatefulWidget { class _StatusFeedbackPageState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) => model.getCOC(), builder: (_, model, widget) => AppScaffold( @@ -28,67 +32,69 @@ class _StatusFeedbackPageState extends State { child: model.cOCItemList.isNotEmpty ? Container( margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0, bottom: 80), - padding: EdgeInsets.all(15.0), child: ListView.builder( itemCount: model.cOCItemList.length, itemBuilder: (context, index) => InkWell( - onTap: () { - gotodetails(model.cOCItemList[index]); - }, - child: Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - border: Border.all(color: Colors.white, width: 0.5), - borderRadius: BorderRadius.all(Radius.circular(5)), - color: Colors.white, - ), - margin: EdgeInsets.all(4), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 8, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts('${model.cOCItemList[index].cOCTitle}'), - Texts( - TranslationBase.of(context).number + ' : ${model.cOCItemList[index].itemID}', - variant: 'overline', - ), - ], - ), - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts('${model.cOCItemList[index].status}'), - Texts( - '${model.cOCItemList[index].date}', - variant: 'overline', - ), - ], - ), - ), - ], - ), - Texts('${model.cOCItemList[index].formType}'), - Divider( - height: 4.5, - color: Colors.grey[500], - ) - ], + onTap: () { + }, + child: Card( + shape: cardRadius(12), + margin: EdgeInsets.all(10), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(projectViewModel.isArabic ? model.cOCItemList[index].statusAr : model.cOCItemList[index].status, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)), + Container( + margin: EdgeInsets.only(top: 5.0), + child: Text(model.cOCItemList[index].formType.toString(), + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + color: Color(0xff2B353E), + letterSpacing: -0.48, + height: 18 / 12))), + myRichText(TranslationBase.of(context).number + ": ", model.cOCItemList[index].itemID.toString(), projectViewModel.isArabic), + Text(model.cOCItemList[index].cOCTitle, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + color: Color(0xff2B353E), + letterSpacing: -0.48, + height: 18 / 12)), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text(model.cOCItemList[index].date.split(" ")[0], + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + color: Color(0xff2B353E), + letterSpacing: -0.48)), + Text(model.cOCItemList[index].date.split(" ")[1], + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + color: Color(0xff2B353E), + letterSpacing: -0.48)), + ], + ), + ], + ), ), ), - ))), + )), ) : Center( child: Column( @@ -117,16 +123,17 @@ class _StatusFeedbackPageState extends State { ), ), ), - Container( - color: Colors.white, - padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), - child: DefaultButton( - TranslationBase.of(context).search, - () => {}, - ), - ), ], ), + bottomSheet: Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).search, + projectViewModel.isLogin ? null : () => {}, + disabledColor: Colors.grey, + ), + ), ), ); } diff --git a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart index 38fd75d5..8272f0c2 100644 --- a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart +++ b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; import 'package:flutter/cupertino.dart'; @@ -154,8 +155,12 @@ class _AttachInsuranceCardImageDialogState extends State { description: TranslationBase.of(context).infoApprovals, infoList: TranslationBase.of(context).infoApprovalPoints, imagesInfo: imagesInfo, - body: ListView.separated( + body: model.insuranceApproval.length > 0 ? ListView.separated( padding: EdgeInsets.all(21), physics: BouncingScrollPhysics(), itemBuilder: (_, index) { @@ -148,7 +150,7 @@ class _InsuranceApprovalState extends State { height: 48, alignment: Alignment.bottomRight, child: Icon( - Icons.visibility_sharp, + Icons.arrow_forward, color: Color(0xff2E303A), ), ) @@ -164,7 +166,7 @@ class _InsuranceApprovalState extends State { ); }, separatorBuilder: (context, index) => SizedBox(height: 12), - itemCount: model.insuranceApproval.length)), + itemCount: model.insuranceApproval.length) : getNoDataWidget(context)), ); } diff --git a/lib/pages/insurance/insurance_page.dart b/lib/pages/insurance/insurance_page.dart index e1f347a0..58a9e64a 100644 --- a/lib/pages/insurance/insurance_page.dart +++ b/lib/pages/insurance/insurance_page.dart @@ -150,7 +150,9 @@ class InsurancePage extends StatelessWidget { patientID: patientID, patientIdentificationID: patientIdentificationID, name: name, - ))); + ))).then((value) { + model.getInsuranceUpdated(); + }); } else { AppToast.showErrorToast(message: _insuranceCardService.error); } diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 7dc3b334..e5f8e35c 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -77,6 +77,8 @@ class _LandingPageState extends State with WidgetsBindingObserver { SignalRUtil signalRUtil; + ToDoCountProviderModel toDoProvider; + bool _showBottomNavigationBar = true; ///inject the user data @@ -505,6 +507,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { setState(() { notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); + model.setState(model.count, true, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount); }) } @@ -555,14 +558,14 @@ class _LandingPageState extends State with WidgetsBindingObserver { pageController.jumpToPage(0); }, ), - projectViewModel.isLogin && notificationCount != '' + projectViewModel.isLogin && model.notificationsCount != null ? new Positioned( right: projectViewModel.isArabic ? 35 : 0, top: 5, child: new Container( padding: EdgeInsets.all(4), decoration: new BoxDecoration( - color: Colors.red, + color: CustomColors.accentColor, borderRadius: BorderRadius.circular(20), ), constraints: BoxConstraints( @@ -570,7 +573,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { minHeight: 20, ), child: new Text( - notificationCount, + model.notificationsCount.toString(), style: new TextStyle( color: Colors.white, fontSize: projectViewModel.isArabic ? 8 : 9, @@ -677,6 +680,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { setState(() { if (value != null) { notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); + model.setState(model.count, true, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount); } }), diff --git a/lib/pages/landing/widgets/logged_slider_view.dart b/lib/pages/landing/widgets/logged_slider_view.dart index a73b4531..a239e789 100644 --- a/lib/pages/landing/widgets/logged_slider_view.dart +++ b/lib/pages/landing/widgets/logged_slider_view.dart @@ -137,19 +137,20 @@ class LoggedSliderView extends StatelessWidget { padding: const EdgeInsets.only(left: 20, right: 20), child: Row( children: [ - Expanded( flex: 3, + Expanded( + flex: 3, child: Row( children: [ SvgPicture.asset( 'assets/images/new/height.svg', - width: 12, - height: 12, + width: 11, + height: 11, ), mWidth(6), Texts( "${TranslationBase.of(context).height}: ${model.heightCm} ${TranslationBase.of(context).cm}", color: Colors.white, - fontSize: 10, + fontSize: 8, ) ], ), @@ -157,16 +158,21 @@ class LoggedSliderView extends StatelessWidget { SizedBox( width: 3, ), - Expanded( flex: 3, + Expanded( + flex: 3, child: Row( children: [ SvgPicture.asset( 'assets/images/new/weight.svg', - width: 12, - height: 12, + width: 11, + height: 11, ), mWidth(6), - Texts('${TranslationBase.of(context).weight}: ${model.weightKg} ${TranslationBase.of(context).kg}', color: Colors.white, fontSize: 10) + Texts( + '${TranslationBase.of(context).weight}: ${model.weightKg} ${TranslationBase.of(context).kg}', + color: Colors.white, + fontSize: 8, + ) ], ), ), @@ -179,11 +185,15 @@ class LoggedSliderView extends StatelessWidget { children: [ SvgPicture.asset( 'assets/images/new/blood.svg', - width: 12, - height: 12, + width: 11, + height: 11, ), mWidth(6), - Texts('${TranslationBase.of(context).bloodType1} ${model.booldType}', color: Colors.white, fontSize: 10) + Texts( + '${TranslationBase.of(context).bloodType1} ${model.booldType}', + color: Colors.white, + fontSize: 8, + ) ], ), ), diff --git a/lib/pages/livecare/livecare_type_select.dart b/lib/pages/livecare/livecare_type_select.dart index 2e22288d..765d6383 100644 --- a/lib/pages/livecare/livecare_type_select.dart +++ b/lib/pages/livecare/livecare_type_select.dart @@ -170,11 +170,11 @@ class _LiveCareTypeSelectState extends State { ), InkWell( onTap: (){ - Navigator.pop(context, "schedule"); + // Navigator.pop(context, "schedule"); }, child: Container( decoration: BoxDecoration( - color: Colors.grey[700], + color: Colors.grey[400], borderRadius: BorderRadius.all(Radius.circular(10.0))), height: 100.0, margin: EdgeInsets.only(top: 20.0), diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 2cef4da2..921bec0a 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -160,9 +160,9 @@ class _ConfirmLogin extends State { ), Text( user.editedOn != null - ? DateUtil.formatDateToDate(DateUtil.convertStringToDate(user.editedOn), projectViewModel.isArabic) + ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user.editedOn)) : user.createdOn != null - ? DateUtil.formatDateToDate(DateUtil.convertStringToDate(user.createdOn), projectViewModel.isArabic) + ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user.createdOn)) : '--', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), ), @@ -191,9 +191,9 @@ class _ConfirmLogin extends State { Expanded(child: SizedBox()), Text( user.editedOn != null - ? DateUtil.formatDateToTime(DateUtil.convertStringToDate(user.editedOn)) + ? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user.editedOn), false) : user.createdOn != null - ? DateUtil.formatDateToTime(DateUtil.convertStringToDate(user.createdOn)) + ? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user.createdOn), false) : '--', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48), ), @@ -391,14 +391,12 @@ class _ConfirmLogin extends State { } loginWithFingurePrintFace(type, int isActive) async { - if (isActive == 1 || isActive ==0) { - + if (isActive == 1 || isActive == 0) { const iosStrings = const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID'); try { authenticated = await auth.authenticateWithBiometrics(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, iOSAuthStrings: iosStrings); - } on PlatformException catch (e) { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: 'Please enable your Touch or Face ID'); @@ -584,11 +582,11 @@ class _ConfirmLogin extends State { } getToDoCount() { - toDoProvider.setState(0, true); + toDoProvider.setState(0, true, "0"); ClinicListService service = new ClinicListService(); service.getActiveAppointmentNo(context).then((res) { if (res['MessageStatus'] == 1) { - toDoProvider.setState(res['AppointmentActiveNumber'], true); + toDoProvider.setState(res['AppointmentActiveNumber'], true, "0"); } else {} }).catchError((err) { print(err); @@ -689,36 +687,36 @@ class _ConfirmLogin extends State { ), ); - return InkWell( - onTap: () { - if (_flag == 0) { - setState(() { - isMoreOption = true; - }); - } else { - authenticateUser(4, isActive: _loginIndex); - } - }, - child: RoundedContainer( - height: 150, - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB(30, 15, 30, 15), - child: Column( - children: [ - Image.asset( - _icon, - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, - ), - SizedBox( - height: 20, - ), - Texts(_title, fontSize: SizeConfig.textMultiplier * 2, color: Colors.black) - ], - ), - ))); + // return InkWell( + // onTap: () { + // if (_flag == 0) { + // setState(() { + // isMoreOption = true; + // }); + // } else { + // authenticateUser(4, isActive: _loginIndex); + // } + // }, + // child: RoundedContainer( + // height: 150, + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(30, 15, 30, 15), + // child: Column( + // children: [ + // Image.asset( + // _icon, + // height: SizeConfig.imageSizeMultiplier * 13, + // width: SizeConfig.imageSizeMultiplier * 16, + // ), + // SizedBox( + // height: 20, + // ), + // Texts(_title, fontSize: SizeConfig.textMultiplier * 2, color: Colors.black) + // ], + // ), + // ))); } // todo 'sikander' optimize this after knowing usage diff --git a/lib/pages/login/login-type.dart b/lib/pages/login/login-type.dart index 054d11a6..e2e08654 100644 --- a/lib/pages/login/login-type.dart +++ b/lib/pages/login/login-type.dart @@ -59,8 +59,7 @@ class LoginType extends StatelessWidget { RichText( text: TextSpan( text: TranslationBase.of(context).forgotPassword, - style: TextStyle( - decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12), + style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12), recognizer: TapGestureRecognizer()..onTap = () => Navigator.of(context).push(FadePage(page: ForgotPassword())), ), ), @@ -88,141 +87,141 @@ class LoginType extends StatelessWidget { ), ); - AppScaffold( - appBarTitle: TranslationBase.of(context).login, - isShowAppBar: true, - isShowDecPage: false, - body: SingleChildScrollView( - child: Container( - padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), - height: SizeConfig.realScreenHeight * .9, - width: SizeConfig.realScreenWidth, - child: Column( - children: [ - Expanded( - flex: 4, - child: Column( - // mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - 'assets/images/DQ/logo.png', - height: 90, - width: 90, - ), - AppText( - TranslationBase.of(context).logintypeRadio, - fontSize: SizeConfig.textMultiplier * 3.5, - textAlign: TextAlign.start, - marginBottom: 20.0, - marginTop: 20.0, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: InkWell( - onTap: () => { - LoginType.loginType = 1, - Navigator.of(context).push(FadePage(page: Login())), - }, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB(20, 10, 20, 10), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'assets/images/id_card_icon.png', - height: SizeConfig.imageSizeMultiplier * 12, - width: SizeConfig.imageSizeMultiplier * 15, - ), - SizedBox( - height: 20, - ), - AppText( - TranslationBase.of(context).idNo, - fontSize: SizeConfig.textMultiplier * 2, - fontWeight: FontWeight.bold, - ) - ], - ), - )))), - Expanded( - child: InkWell( - onTap: () => { - LoginType.loginType = 2, - Navigator.of(context).push(FadePage(page: Login())), - }, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB(25, 10, 25, 10), - child: Column( - children: [ - Image.asset( - 'assets/images/my_file_white_icon.png', - height: SizeConfig.imageSizeMultiplier * 12, - width: SizeConfig.imageSizeMultiplier * 15, - ), - SizedBox( - height: 20, - ), - AppText( - TranslationBase.of(context).fileNo, - fontSize: SizeConfig.textMultiplier * 2, - fontWeight: FontWeight.bold, - ) - ], - ), - )))) - ], - ), - SizedBox( - height: 25, - ), - Divider( - color: Colors.grey, - height: 2, - ), - Center( - child: InkWell( - onTap: () => { - Navigator.of(context).push(FadePage(page: ForgotPassword())), - }, - child: AppText(TranslationBase.of(context).forgotPassword, fontSize: SizeConfig.textMultiplier * 2.5, marginTop: 20.0, underline: true))) - ]), - ), - Expanded( - flex: 1, - child: Column( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Divider( - color: Colors.grey, - height: 2, - ), - SizedBox( - height: 10, - ), - Row( - children: [ - Expanded( - child: DefaultButton( - TranslationBase.of(context).registerNow, - () => { - Navigator.of(context).push(FadePage(page: Register())), - }, - )), - ], - ), - ], - )) - ], - )))); + // AppScaffold( + // appBarTitle: TranslationBase.of(context).login, + // isShowAppBar: true, + // isShowDecPage: false, + // body: SingleChildScrollView( + // child: Container( + // padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), + // height: SizeConfig.realScreenHeight * .9, + // width: SizeConfig.realScreenWidth, + // child: Column( + // children: [ + // Expanded( + // flex: 4, + // child: Column( + // // mainAxisAlignment: MainAxisAlignment.spaceEvenly, + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Image.asset( + // 'assets/images/DQ/logo.png', + // height: 90, + // width: 90, + // ), + // AppText( + // TranslationBase.of(context).logintypeRadio, + // fontSize: SizeConfig.textMultiplier * 3.5, + // textAlign: TextAlign.start, + // marginBottom: 20.0, + // marginTop: 20.0, + // ), + // Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Expanded( + // child: InkWell( + // onTap: () => { + // LoginType.loginType = 1, + // Navigator.of(context).push(FadePage(page: Login())), + // }, + // child: RoundedContainer( + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(20, 10, 20, 10), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Image.asset( + // 'assets/images/id_card_icon.png', + // height: SizeConfig.imageSizeMultiplier * 12, + // width: SizeConfig.imageSizeMultiplier * 15, + // ), + // SizedBox( + // height: 20, + // ), + // AppText( + // TranslationBase.of(context).idNo, + // fontSize: SizeConfig.textMultiplier * 2, + // fontWeight: FontWeight.bold, + // ) + // ], + // ), + // )))), + // Expanded( + // child: InkWell( + // onTap: () => { + // LoginType.loginType = 2, + // Navigator.of(context).push(FadePage(page: Login())), + // }, + // child: RoundedContainer( + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(25, 10, 25, 10), + // child: Column( + // children: [ + // Image.asset( + // 'assets/images/my_file_white_icon.png', + // height: SizeConfig.imageSizeMultiplier * 12, + // width: SizeConfig.imageSizeMultiplier * 15, + // ), + // SizedBox( + // height: 20, + // ), + // AppText( + // TranslationBase.of(context).fileNo, + // fontSize: SizeConfig.textMultiplier * 2, + // fontWeight: FontWeight.bold, + // ) + // ], + // ), + // )))) + // ], + // ), + // SizedBox( + // height: 25, + // ), + // Divider( + // color: Colors.grey, + // height: 2, + // ), + // Center( + // child: InkWell( + // onTap: () => { + // Navigator.of(context).push(FadePage(page: ForgotPassword())), + // }, + // child: AppText(TranslationBase.of(context).forgotPassword, fontSize: SizeConfig.textMultiplier * 2.5, marginTop: 20.0, underline: true))) + // ]), + // ), + // Expanded( + // flex: 1, + // child: Column( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // Divider( + // color: Colors.grey, + // height: 2, + // ), + // SizedBox( + // height: 10, + // ), + // Row( + // children: [ + // Expanded( + // child: DefaultButton( + // TranslationBase.of(context).registerNow, + // () => { + // Navigator.of(context).push(FadePage(page: Register())), + // }, + // )), + // ], + // ), + // ], + // )) + // ], + // )))); } Widget getButton(BuildContext _context, String _title, String _icon, int _flag) { diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index ceccf75f..b448e1a4 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -359,12 +359,12 @@ class _Login extends State { } getToDoCount() { - toDoProvider.setState(0, true); + toDoProvider.setState(0, true, toDoProvider.notificationsCount); ClinicListService service = new ClinicListService(); service.getActiveAppointmentNo(context).then((res) { print(res['AppointmentActiveNumber']); if (res['MessageStatus'] == 1) { - toDoProvider.setState(res['AppointmentActiveNumber'], true); + toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); } else {} }).catchError((err) { print(err); diff --git a/lib/pages/medical/active_medications/ActiveMedicationsPage.dart b/lib/pages/medical/active_medications/ActiveMedicationsPage.dart index 8299cad0..87f5b0c4 100644 --- a/lib/pages/medical/active_medications/ActiveMedicationsPage.dart +++ b/lib/pages/medical/active_medications/ActiveMedicationsPage.dart @@ -24,7 +24,7 @@ class ActiveMedicationsPage extends StatelessWidget { isShowDecPage: true, baseViewModel: model, appBarTitle: TranslationBase.of(context).activeMedications, - body: Container( + body: model.activePrescriptionReport.length > 0 ? Container( child: ListView.builder( itemCount: model.activePrescriptionReport.length, itemBuilder: (context, index) => Container( @@ -197,7 +197,7 @@ class ActiveMedicationsPage extends StatelessWidget { ), ), ), - ), + ) : getNoDataWidget(context), ), ); } diff --git a/lib/pages/medical/ask_doctor/ask_doctor_page.dart b/lib/pages/medical/ask_doctor/ask_doctor_page.dart index ccff9042..389baf24 100644 --- a/lib/pages/medical/ask_doctor/ask_doctor_page.dart +++ b/lib/pages/medical/ask_doctor/ask_doctor_page.dart @@ -4,9 +4,11 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/ask_doctor/request_type.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -22,7 +24,20 @@ class AskDoctorPage extends StatelessWidget { onModelReady: (model) => model.getMyDoctor(), builder: (_, model, w) => AppScaffold( baseViewModel: model, - body: _appointmentExpandableList(model.patientDoctorAppointmentListHospital, model), + body: model.patientDoctorAppointmentListHospital.length > 0 ? _appointmentExpandableList(model.patientDoctorAppointmentListHospital, model) : noDoctor(context), + ), + ); + } + + Widget noDoctor(BuildContext context) { + return Container( + margin: EdgeInsets.only(left: 50.0, right: 50.0), + child: Center( + child: Text(TranslationBase.of(context).askDocEmpty, textAlign: TextAlign.center, style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w400, + color: CustomColors.accentColor + )), ), ); } diff --git a/lib/pages/medical/ask_doctor/doctor_response.dart b/lib/pages/medical/ask_doctor/doctor_response.dart index 846c9a05..decca583 100644 --- a/lib/pages/medical/ask_doctor/doctor_response.dart +++ b/lib/pages/medical/ask_doctor/doctor_response.dart @@ -99,7 +99,7 @@ class DoctorResponse extends StatelessWidget { ), ), Icon(projectViewModel.isArabic - ? Icons.arrow_forward_ios + ? Icons.arrow_forward : Icons.arrow_back_ios) ], ), @@ -169,7 +169,7 @@ class DoctorResponse extends StatelessWidget { ), ), Icon(projectViewModel.isArabic - ? Icons.arrow_forward_ios + ? Icons.arrow_forward : Icons.arrow_back_ios) ], ), diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart index 9e1e042e..9e587b7f 100644 --- a/lib/pages/medical/balance/advance_payment_page.dart +++ b/lib/pages/medical/balance/advance_payment_page.dart @@ -15,6 +15,7 @@ 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.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'; @@ -258,16 +259,13 @@ class _AdvancePaymentPageState extends State { ), ), bottomSheet: Container( - height: 70, width: double.infinity, + color: Theme.of(context).scaffoldBackgroundColor, padding: EdgeInsets.all(12), - color: Colors.white, - child: SecondaryButton( - textColor: Colors.white, - label: TranslationBase.of(context).submit, - color: CustomColors.accentColor, - disabled: amount.isEmpty || _fileTextController.text.isEmpty || _selectedHospital == null, - onTap: () { + child: DefaultButton( + TranslationBase.of(context).submit, + (amount.isEmpty || _fileTextController.text.isEmpty || _selectedHospital == null) ? null : + () { var mobileNum; var patientName; @@ -320,6 +318,7 @@ class _AdvancePaymentPageState extends State { } }); }, + disabledColor: Colors.grey, ), )), ); diff --git a/lib/pages/medical/eye/EyeHomePage.dart b/lib/pages/medical/eye/EyeHomePage.dart index 4c945f7a..3d59af3d 100644 --- a/lib/pages/medical/eye/EyeHomePage.dart +++ b/lib/pages/medical/eye/EyeHomePage.dart @@ -41,10 +41,7 @@ class _EyeHomePageState extends State with SingleTickerProviderStat super.initState(); _tabController = TabController(length: 2, vsync: this); _tabController.addListener(() { - - setState(() { - - }); + setState(() {}); }); } @@ -61,7 +58,7 @@ class _EyeHomePageState extends State with SingleTickerProviderStat builder: (_, model, w) => AppScaffold( isShowAppBar: true, isShowDecPage: false, - appBarTitle: widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj, + appBarTitle: widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj, showNewAppBarTitle: true, showNewAppBar: true, backgroundColor: CustomColors.appBackgroudGreyColor, @@ -70,6 +67,7 @@ class _EyeHomePageState extends State with SingleTickerProviderStat DoctorHeader( headerModel: HeaderModel( widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj, + widget.appointmentAllHistoryResultList.doctorID, widget.appointmentAllHistoryResultList.doctorImageURL, widget.appointmentAllHistoryResultList.doctorSpeciality, "", @@ -83,7 +81,7 @@ class _EyeHomePageState extends State with SingleTickerProviderStat "", //model.user.emailAddress, ), - isNeedToShowButton: _tabController.index==0?true:projectViewModel.havePrivilege(15), + isNeedToShowButton: _tabController.index == 0 ? true : projectViewModel.havePrivilege(15), showConfirmMessageDialog: true, onRatingAndReviewTap: getDoctorRatingsDetails, onTap: () { diff --git a/lib/pages/medical/my_invoices/invoice_detail_page.dart b/lib/pages/medical/my_invoices/invoice_detail_page.dart index 13fd8e6f..0f35a96f 100644 --- a/lib/pages/medical/my_invoices/invoice_detail_page.dart +++ b/lib/pages/medical/my_invoices/invoice_detail_page.dart @@ -27,8 +27,7 @@ class InvoiceDetail extends StatefulWidget { final DentalInvoiceDetailResponse dentalInvoiceDetailResponse; final BuildContext context; - InvoiceDetail(this.doctor, this.listDentalAppointments, - this.dentalInvoiceDetailResponse, this.context); + InvoiceDetail(this.doctor, this.listDentalAppointments, this.dentalInvoiceDetailResponse, this.context); @override _InvoiceDetailState createState() => _InvoiceDetailState(); @@ -50,11 +49,7 @@ class _InvoiceDetailState extends State { ProjectViewModel projectViewModel = Provider.of(context); generateInvoiceDetails(); return AppScaffold( - appBarTitle: widget.doctor.doctorTitle != null - ? widget.doctor.doctorTitle.toString() - : TranslationBase.of(context).dr + - " " + - widget.doctor.name.toString(), + appBarTitle: widget.doctor.doctorTitle != null ? widget.doctor.doctorTitle.toString() : TranslationBase.of(context).dr + " " + widget.doctor.name.toString(), isShowAppBar: true, isShowDecPage: false, showNewAppBar: true, @@ -67,6 +62,7 @@ class _InvoiceDetailState extends State { DoctorHeader( headerModel: HeaderModel( widget.doctor.name, + widget.doctor.doctorID, widget.doctor.doctorImageURL, widget.doctor.speciality, widget.doctor.clinicName, @@ -76,7 +72,7 @@ class _InvoiceDetailState extends State { widget.doctor.nationalityFlagURL, widget.doctor.doctorRate, widget.doctor.actualDoctorRate, - widget.doctor.noOfPatientsRate, + widget.doctor.noOfPatientsRate ?? 0, projectViewModel.user.emailAddress), onTap: () { sendInvoiceEmail(); @@ -86,8 +82,7 @@ class _InvoiceDetailState extends State { child: Card( elevation: 3.0, shape: cardRadius(12), - margin: EdgeInsets.only( - left: 16, top: 8, right: 16, bottom: 16), + margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16), child: Padding( padding: const EdgeInsets.all(12.0), child: Column( @@ -112,8 +107,7 @@ class _InvoiceDetailState extends State { child: Card( elevation: 3.0, shape: cardRadius(12), - margin: EdgeInsets.only( - left: 16, top: 8, right: 16, bottom: 16), + margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16), child: Padding( padding: const EdgeInsets.all(15.0), child: Column( @@ -121,29 +115,12 @@ class _InvoiceDetailState extends State { children: [ Container( margin: EdgeInsets.only(bottom: 10.0), - child: Text(TranslationBase.of(context).cardDetail, - style: TextStyle( - color: Colors.black, - letterSpacing: -0.64, - fontSize: 18.0, - fontWeight: FontWeight.bold)), + child: Text(TranslationBase.of(context).cardDetail, style: TextStyle(color: Colors.black, letterSpacing: -0.64, fontSize: 18.0, fontWeight: FontWeight.bold)), ), - myRichText( - TranslationBase.of(context).insuranceCompany + - ": ", - widget.dentalInvoiceDetailResponse - .listEInvoiceForDental[0].companyName, - projectViewModel.isArabic), + myRichText(TranslationBase.of(context).insuranceCompany + ": ", widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].companyName, projectViewModel.isArabic), myRichText( TranslationBase.of(context).insuranceID + ": ", - widget - .dentalInvoiceDetailResponse - .listEInvoiceForDental[0] - .insuranceID != - null - ? widget.dentalInvoiceDetailResponse - .listEInvoiceForDental[0].insuranceID - : "N/A", + widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].insuranceID != null ? widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].insuranceID : "N/A", projectViewModel.isArabic), ], ), @@ -155,8 +132,7 @@ class _InvoiceDetailState extends State { child: Card( elevation: 3.0, shape: cardRadius(12), - margin: EdgeInsets.only( - left: 16, top: 8, right: 16, bottom: 16), + margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16), child: Padding( padding: const EdgeInsets.all(15.0), child: Column( @@ -164,13 +140,7 @@ class _InvoiceDetailState extends State { children: [ Container( margin: EdgeInsets.only(bottom: 10.0), - child: Text( - TranslationBase.of(context).totalBalance, - style: TextStyle( - letterSpacing: -0.64, - color: Colors.black, - fontSize: 18.0, - fontWeight: FontWeight.bold)), + child: Text(TranslationBase.of(context).totalBalance, style: TextStyle(letterSpacing: -0.64, color: Colors.black, fontSize: 18.0, fontWeight: FontWeight.bold)), ), Container( width: double.infinity, @@ -178,15 +148,10 @@ class _InvoiceDetailState extends State { child: Row( children: [ Expanded( - child: _getNormalText( - TranslationBase.of(context).discount), + child: _getNormalText(TranslationBase.of(context).discount), ), Expanded( - child: _getNormalText( - this.totalDiscount.toString() + - " " + - TranslationBase.of(context).sar, - isBold: true), + child: _getNormalText(this.totalDiscount.toString() + " " + TranslationBase.of(context).sar, isBold: true), ) ], ), @@ -198,26 +163,13 @@ class _InvoiceDetailState extends State { child: Row( children: [ Expanded( - child: _getNormalText( - TranslationBase.of(context) - .totalVAT - .toString() + - " (" + - widget - .dentalInvoiceDetailResponse - .listEInvoiceForDental[0] - .listConsultation[0] - .vATPercentage - .toString() + - "%): "), + child: _getNormalText(TranslationBase.of(context).totalVAT.toString() + + " (" + + widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].vATPercentage.toString() + + "%): "), ), Expanded( - child: _getNormalText( - num.tryParse(this.totalVAT.toString()) - .toStringAsFixed(2) + - " " + - TranslationBase.of(context).sar, - isBold: true), + child: _getNormalText(num.tryParse(this.totalVAT.toString()).toStringAsFixed(2) + " " + TranslationBase.of(context).sar, isBold: true), ) ], ), @@ -229,15 +181,10 @@ class _InvoiceDetailState extends State { child: Row( children: [ Expanded( - child: _getNormalText( - TranslationBase.of(context).total), + child: _getNormalText(TranslationBase.of(context).total), ), Expanded( - child: _getNormalText( - this.subTotal.toString() + - " " + - TranslationBase.of(context).sar, - isBold: true), + child: _getNormalText(this.subTotal.toString() + " " + TranslationBase.of(context).sar, isBold: true), ) ], ), @@ -249,15 +196,10 @@ class _InvoiceDetailState extends State { child: Row( children: [ Expanded( - child: _getNormalText( - TranslationBase.of(context).paid), + child: _getNormalText(TranslationBase.of(context).paid), ), Expanded( - child: _getNormalText( - this.grandTotal.toString() + - " " + - TranslationBase.of(context).sar, - isBold: true), + child: _getNormalText(this.grandTotal.toString() + " " + TranslationBase.of(context).sar, isBold: true), ) ], ), @@ -284,10 +226,8 @@ class _InvoiceDetailState extends State { List listConsultations = new List(); - widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation - .forEach((item) { - var i = listConsultations - .indexWhere((x) => x.procedureID == item.procedureID); + widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.forEach((item) { + var i = listConsultations.indexWhere((x) => x.procedureID == item.procedureID); if (i <= -1) { listConsultations.add(item); } @@ -308,16 +248,10 @@ class _InvoiceDetailState extends State { GifLoaderDialogUtils.showMyDialog(widget.context); MyInvoicesService myInvoicesService = new MyInvoicesService(); - myInvoicesService - .sendDentalAppointmentInvoiceEmail( - widget.listDentalAppointments.projectID, - widget.listDentalAppointments.appointmentNo, - widget.context) - .then((res) { + myInvoicesService.sendDentalAppointmentInvoiceEmail(widget.listDentalAppointments.projectID, widget.listDentalAppointments.appointmentNo, widget.context).then((res) { GifLoaderDialogUtils.hideDialog(widget.context); if (res['MessageStatus'] == 1) { - AppToast.showSuccessToast( - message: TranslationBase.of(widget.context).emailSentSuccessfully); + AppToast.showSuccessToast(message: TranslationBase.of(widget.context).emailSentSuccessfully); } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } @@ -342,37 +276,17 @@ class _InvoiceDetailState extends State { ], ), ); - for (int i = 0; - i < - widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0] - .listConsultation.length; - i++) { + for (int i = 0; i < widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length; i++) { tableRow.add( TableRow(children: [ - Utils.tableColumnValue( - '${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].procedureName}', - isLast: i == - (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0] - .listConsultation.length - - 1)), - Utils.tableColumnValue( - '${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].quantity}', - isLast: i == - (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0] - .listConsultation.length - - 1)), - Utils.tableColumnValue( - '${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].price.toString() + " " + TranslationBase.of(context).sar}', - isLast: i == - (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0] - .listConsultation.length - - 1)), - Utils.tableColumnValue( - '${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].total.toString() + " " + TranslationBase.of(context).sar}', - isLast: i == - (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0] - .listConsultation.length - - 1)), + Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].procedureName}', + isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length - 1)), + Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].quantity}', + isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length - 1)), + Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].price.toString() + " " + TranslationBase.of(context).sar}', + isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length - 1)), + Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].total.toString() + " " + TranslationBase.of(context).sar}', + isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length - 1)), ]), ); } diff --git a/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart b/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart index 1f1dda1c..d7dcafa7 100644 --- a/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart +++ b/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/TabBarWidget.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'; @@ -49,6 +50,7 @@ class _WeightHomePageState extends State with SingleTickerProvid showNewAppBar: true, showNewAppBarTitle: true, appBarTitle: TranslationBase.of(context).weight, + backgroundColor: CustomColors.appBackgroudGrey2Color, appBarIcons: [ IconButton( icon: Icon(Icons.email), @@ -106,35 +108,22 @@ class _WeightHomePageState extends State with SingleTickerProvid ) ], ), - floatingActionButton: Stack( - children: [ - Positioned( - bottom: 80, - right: projectViewModel.isArabic ? MediaQuery.of(context).size.width * .85 : 0, - child: InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: AddWeightPage( - model: model, - ))); - }, - child: Container( - width: 55, - height: 55, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: Theme.of(context).primaryColor, - ), - child: Center( - child: Icon( - Icons.add, - color: Colors.white, - ), - ), - ))) - ], + floatingActionButton: FloatingActionButton( + child: Icon( + Icons.add, + color: Colors.white, + ), + backgroundColor: CustomColors.accentColor, + onPressed: () { + Navigator.push( + context, + FadePage( + page: AddWeightPage( + model: model, + ), + ), + ); + }, ), ), ), diff --git a/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart index 5088d572..05485adf 100644 --- a/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart +++ b/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart @@ -2,9 +2,11 @@ import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -20,62 +22,74 @@ class WeightMonthlyPage extends StatelessWidget { this.model, }) : super(key: key); List monthlyGroup = []; + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); groupData(); return AppScaffold( isShowDecPage: false, + backgroundColor: CustomColors.appBackgroudGrey2Color, body: ListView( children: [ - Container( - width: double.maxFinite, - color: Colors.white, - child: MonthLineChartCurved( - horizontalInterval: 1.0, - title: TranslationBase.of(context).weight, - timeSeries: model.weighMonthTimeSeriesData.isEmpty ? [TimeSeriesSales3(0, 0.0)] : model.weighMonthTimeSeriesData, - indexes: model.weighMonthTimeSeriesData.length ~/ 5.5, - )), - SizedBox( - height: 12, - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Texts(TranslationBase.of(context).details), + Card( + shape: cardRadius(12), + elevation: 1, + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: MonthLineChartCurved( + horizontalInterval: 1.0, + title: TranslationBase.of(context).weight, + timeSeries: model.weighMonthTimeSeriesData.isEmpty ? [TimeSeriesSales3(0, 0.0)] : model.weighMonthTimeSeriesData, + indexes: model.weighMonthTimeSeriesData.length ~/ 5.5, + ), ), - Container( - padding: EdgeInsets.all(10), - color: Colors.transparent, + Card( + shape: cardRadius(12), + elevation: 1, + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), child: Column( crossAxisAlignment: CrossAxisAlignment.start, - children: [ - model.weighMonthTimeSeriesData.isEmpty - ? Container( - child: Center( - child: Texts(TranslationBase.of(context).noDataAvailable), - ), - ) - : Column(children: [ - for (var monthly in monthlyGroup) - Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - width: double.maxFinite, - padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)), - child: Texts(monthly[0])), - Table( - columnWidths: { - 0: FlexColumnWidth(2.5), - // 2: FlexColumnWidth(1.8), - }, - children: fullData(context, projectViewModel, monthly[1]), + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts(TranslationBase.of(context).details), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + model.weighMonthTimeSeriesData.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(context).noDataAvailable), + ), ) - ]) - ]) + : Column(children: [ + for (var monthly in monthlyGroup) + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Container( + width: double.maxFinite, + padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)), + child: Texts(monthly[0])), + Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + // 2: FlexColumnWidth(1.8), + }, + children: fullData(context, projectViewModel, monthly[1]), + ) + ]) + ]) + ], + ), + ) ], ), - ) + ), + mHeight(80), ], ), ); diff --git a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart index 81d8c150..2f3f7d0a 100644 --- a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart +++ b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart @@ -1,9 +1,11 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -25,46 +27,64 @@ class WeightWeeklyPage extends StatelessWidget { return AppScaffold( isShowDecPage: false, + backgroundColor: CustomColors.appBackgroudGrey2Color, body: ListView( children: [ - Container( - margin: EdgeInsets.only(top: 12, left: 8, right: 8), - color: Colors.white, + // Container( + // margin: EdgeInsets.only(top: 12, left: 8, right: 8), + // color: Colors.white, + // child: LineChartCurved( + // horizontalInterval: 1.0, + // title: TranslationBase.of(context).weight, + // timeSeries: model.weightWeekTimeSeriesData.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightWeekTimeSeriesData, + // indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0, + // ), + // ), + Card( + shape: cardRadius(12), + elevation: 1, + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), child: LineChartCurved( - horizontalInterval: 1.0, title: TranslationBase.of(context).weight, timeSeries: model.weightWeekTimeSeriesData.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightWeekTimeSeriesData, indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0, ), ), - SizedBox( - height: 12, - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Texts(TranslationBase.of(context).details), - ), - Container( - padding: EdgeInsets.all(10), - color: Colors.transparent, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - model.weightWeekTimeSeriesData.isEmpty - ? Container( - child: Center( - child: Texts(TranslationBase.of(context).noDataAvailable), - ), - ) - : Table( - columnWidths: { - 0: FlexColumnWidth(2.5), - }, - children: fullData(context, projectViewModel, model), - ), + Card( + shape: cardRadius(12), + elevation: 1, + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column(crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts(TranslationBase.of(context).details), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + model.weightWeekTimeSeriesData.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullData(context, projectViewModel, model), + ), + ], + ), + ) ], ), - ) + ), + mHeight(80), ], ), ); @@ -109,7 +129,11 @@ class WeightWeeklyPage extends StatelessWidget { model: model, ), ), - ); + ).then((value) { + if (model.weekWeightMeasurementResult.isEmpty) { + model.weightWeekTimeSeriesData.clear(); + } + }); }, child: Container( // height: 70, diff --git a/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart index 9c2414eb..843e438b 100644 --- a/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart +++ b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart @@ -2,9 +2,11 @@ import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -26,55 +28,63 @@ class WeightYearPage extends StatelessWidget { groupData(); return AppScaffold( isShowDecPage: false, + backgroundColor: CustomColors.appBackgroudGrey2Color, body: ListView( children: [ - Container( - width: double.maxFinite, - color: Colors.white, + Card( + shape: cardRadius(12), + elevation: 1, + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), child: LineChartCurved( horizontalInterval: 2.0, title: TranslationBase.of(context).weight, timeSeries: model.weightYearTimeSeriesData.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightYearTimeSeriesData, indexes: model.weightYearTimeSeriesData.length ~/ 5.5 ?? "", )), - SizedBox( - height: 12, - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Texts(TranslationBase.of(context).details), - ), - Container( - padding: EdgeInsets.all(10), - color: Colors.transparent, + + Card( + shape: cardRadius(12), + elevation: 1, + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - model.weightYearTimeSeriesData.isEmpty - ? Container( - child: Center( - child: Texts(TranslationBase.of(context).noDataAvailable), - ), - ) - : Column(children: [ - for (var monthly in monthlyGroup) - Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - width: double.maxFinite, - padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)), - child: Texts(monthly[0])), - Table( - columnWidths: { - 0: FlexColumnWidth(2.5), - }, - children: fullData(context, projectViewModel, monthly[1]), - ) - ]) - ]), - ], + crossAxisAlignment: CrossAxisAlignment.start,children: [ Padding( + padding: const EdgeInsets.all(8.0), + child: Texts(TranslationBase.of(context).details), ), - ) + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + model.weightYearTimeSeriesData.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(context).noDataAvailable), + ), + ) + : Column(children: [ + for (var monthly in monthlyGroup) + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Container( + width: double.maxFinite, + padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)), + child: Texts(monthly[0])), + Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullData(context, projectViewModel, monthly[1]), + ) + ]) + ]), + ], + ), + )], + ), + ), + mHeight(80), ], ), ); diff --git a/lib/pages/medical/my_trackers/blood_pressure/bloodPressureWeeklyPage.dart b/lib/pages/medical/my_trackers/blood_pressure/bloodPressureWeeklyPage.dart index 1262897c..b4974159 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/bloodPressureWeeklyPage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/bloodPressureWeeklyPage.dart @@ -111,7 +111,12 @@ class BloodPressureWeeklyPage extends StatelessWidget { measureTimeSelectedType: diabtec.measuredArmDesc, ), ), - ); + ).then((value) { + if(model.weekDiabtecPatientResult.isEmpty) { + model.weightWeekTimeSeriesDataTop.clear(); + model.weightWeekTimeSeriesDataLow.clear(); + } + }); }, child: Container( // height: 70, diff --git a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart index 9afcd888..537265ed 100644 --- a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart +++ b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart @@ -116,7 +116,11 @@ class BloodSugarWeeklyPage extends StatelessWidget { bloodSugarViewMode: bloodSugarViewMode, ), ), - ); + ).then((value) { + if(bloodSugarViewMode.weekDiabtecPatientResult.isEmpty) { + timeSeriesData.clear(); + } + }); }, child: Container( // height: 70, diff --git a/lib/pages/medical/my_trackers/widget/LineChartCurved.dart b/lib/pages/medical/my_trackers/widget/LineChartCurved.dart index 2597f17c..47a5d490 100644 --- a/lib/pages/medical/my_trackers/widget/LineChartCurved.dart +++ b/lib/pages/medical/my_trackers/widget/LineChartCurved.dart @@ -36,7 +36,7 @@ class LineChartCurved extends StatelessWidget { ), Text( title, - style: TextStyle(color: Colors.black, fontSize: 15, letterSpacing: 2), + style: TextStyle(color: Colors.black, fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600), textAlign: TextAlign.center, ), SizedBox( @@ -44,7 +44,7 @@ class LineChartCurved extends StatelessWidget { ), Expanded( child: Padding( - padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15, bottom: 15), + padding: const EdgeInsets.only(right: 18.0, left: 16.0), child: LineChart( sampleData1(context), swapAnimationDuration: const Duration(milliseconds: 250), @@ -80,6 +80,83 @@ class LineChartCurved extends StatelessWidget { } } } + + // LineChartData sampleData1(context) { + // return LineChartData( + // lineTouchData: LineTouchData( + // touchTooltipData: LineTouchTooltipData( + // tooltipBgColor: Colors.white, + // ), + // touchCallback: (LineTouchResponse touchResponse) {}, + // handleBuiltInTouches: true, + // ), + // gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: 14, verticalInterval: 14), + // titlesData: FlTitlesData( + // bottomTitles: SideTitles( + // showTitles: true, + // getTextStyles: (value) => const TextStyle( + // color: Colors.black, + // fontSize: 10, + // ), + // // rotateAngle: 90, + // //rotateAngle:-65, + // margin: 22, + // getTitles: (value) { + // if (timeSeries.length < 15) { + // if (timeSeries.length > value.toInt()) { + // return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; + // } else + // return ''; + // } else { + // if (value.toInt() == 0) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; + // if (value.toInt() == timeSeries.length - 1) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; + // if (xAxixs.contains(value.toInt())) { + // return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; + // } + // } + // return ''; + // }, + // ), + // leftTitles: SideTitles( + // showTitles: true, + // // interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200, + // interval: 3, + // getTextStyles: (value) => const TextStyle( + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 10, + // ), + // + // margin: 12, + // ), + // ), + // borderData: FlBorderData( + // show: true, + // border: const Border( + // bottom: BorderSide( + // color: Colors.black, + // width: 0.5, + // ), + // left: BorderSide( + // color: Colors.black, + // ), + // right: BorderSide( + // color: Colors.black, + // ), + // top: BorderSide( + // color: Colors.transparent, + // ), + // ), + // ), + // minX: 0, + // maxX: (timeSeries.length - 1).toDouble(), + // maxY: getMaxY() + 0.3, + // minY: 0, + // //getMinY(), + // lineBarsData: getData(context), + // ); + // } + LineChartData sampleData1(context) { return LineChartData( lineTouchData: LineTouchData( @@ -89,8 +166,7 @@ class LineChartCurved extends StatelessWidget { touchCallback: (LineTouchResponse touchResponse) {}, handleBuiltInTouches: true, ), - gridData: FlGridData( - horizontalInterval: horizontalInterval, show: true, drawVerticalLine: true, drawHorizontalLine: true), + gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: 14, verticalInterval: 14), titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, @@ -98,8 +174,7 @@ class LineChartCurved extends StatelessWidget { color: Colors.black, fontSize: 10, ), - // rotateAngle: 90, - //rotateAngle:-65, + rotateAngle: -65, margin: 22, getTitles: (value) { if (timeSeries.length < 15) { @@ -108,10 +183,8 @@ class LineChartCurved extends StatelessWidget { } else return ''; } else { - if (value.toInt() == 0) - return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; - if (value.toInt() == timeSeries.length - 1) - return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; + if (value.toInt() == 0) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; + if (value.toInt() == timeSeries.length - 1) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; if (xAxixs.contains(value.toInt())) { return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; } @@ -121,13 +194,21 @@ class LineChartCurved extends StatelessWidget { ), leftTitles: SideTitles( showTitles: true, - interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200, getTextStyles: (value) => const TextStyle( color: Colors.black, fontWeight: FontWeight.bold, fontSize: 10, ), - + interval: 3.0, + // interval: getMaxY() - getMinY() <= 500 + // ? getMaxY() - getMinY() <= 50 + // ? 10 + // : 10 + // : getMaxY() - getMinY() <= 1000 + // ? 100 + // : getMaxY() - getMinY() >= 10000 + // ? 5000 + // : 200, margin: 12, ), ), @@ -149,14 +230,14 @@ class LineChartCurved extends StatelessWidget { ), ), ), - minX: 0, - maxX: (timeSeries.length - 1).toDouble(), - maxY: getMaxY() + 0.3, - minY: 0,//getMinY(), + minX: 0, + maxX: (timeSeries.length - 1).toDouble(), + maxY: getMaxY() + 0.3, + minY: 0, + //getMinY(), lineBarsData: getData(context), ); } - double getMaxY() { double max = 0; timeSeries.forEach((element) { @@ -180,9 +261,6 @@ class LineChartCurved extends StatelessWidget { List getData(context) { List spots = List(); - if (timeSeries.length == 0) { - spots.add(FlSpot(0, 0)); - } for (int index = 0; index < timeSeries.length; index++) { spots.add(FlSpot(index.toDouble(), timeSeries[index].sales)); } @@ -191,9 +269,8 @@ class LineChartCurved extends StatelessWidget { spots: spots, isCurved: true, colors: [secondaryColor], - barWidth: 5, + barWidth: 1.5, isStrokeCapRound: true, - curveSmoothness: 0.12, dotData: FlDotData( show: false, ), diff --git a/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart b/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart index 5ef71f5b..c1ef7f5a 100644 --- a/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart +++ b/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart @@ -36,7 +36,7 @@ class MonthLineChartCurved extends StatelessWidget { ), Text( title, - style: TextStyle(color: Colors.black, fontSize: 15, letterSpacing: 2), + style: TextStyle(color: Colors.black, fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600), textAlign: TextAlign.center, ), SizedBox( @@ -91,7 +91,12 @@ class MonthLineChartCurved extends StatelessWidget { handleBuiltInTouches: true, ), gridData: FlGridData( - horizontalInterval: horizontalInterval, show: true, drawVerticalLine: true, drawHorizontalLine: true), + horizontalInterval: 12, + show: true, + drawVerticalLine: true, + drawHorizontalLine: true, + verticalInterval: 12, + ), titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, @@ -111,7 +116,11 @@ class MonthLineChartCurved extends StatelessWidget { fontWeight: FontWeight.bold, fontSize: 10, ), - interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200, + interval: getMaxY() - getMinY() <= 500 + ? 50 + : getMaxY() - getMinY() <= 1000 + ? 100 + : 200, // getTitles: (value) { // if (value.toInt() == 0) @@ -184,7 +193,7 @@ class MonthLineChartCurved extends StatelessWidget { spots: spots, isCurved: true, colors: [secondaryColor], - barWidth: 5, + barWidth: 1.5, isStrokeCapRound: true, curveSmoothness: 0.0, dotData: FlDotData( diff --git a/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart b/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart index 8f04d3a0..f4d3aaed 100644 --- a/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart +++ b/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart @@ -7,9 +7,12 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/PrescriptionDeliveryViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart'; 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/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; @@ -28,20 +31,13 @@ class PrescriptionDeliveryAddressPage extends StatefulWidget { final List prescriptionReportList; final List prescriptionReportEnhList; - const PrescriptionDeliveryAddressPage( - {Key key, - this.prescriptions, - this.prescriptionReportList, - this.prescriptionReportEnhList}) - : super(key: key); + const PrescriptionDeliveryAddressPage({Key key, this.prescriptions, this.prescriptionReportList, this.prescriptionReportEnhList}) : super(key: key); @override - _PrescriptionDeliveryAddressPageState createState() => - _PrescriptionDeliveryAddressPageState(); + _PrescriptionDeliveryAddressPageState createState() => _PrescriptionDeliveryAddressPageState(); } -class _PrescriptionDeliveryAddressPageState - extends State { +class _PrescriptionDeliveryAddressPageState extends State { AddressInfo _selectedAddress; Completer _controller = Completer(); @@ -79,218 +75,252 @@ class _PrescriptionDeliveryAddressPageState return BaseView( onModelReady: (model) => model.getCustomerInfo(), builder: (_, model, w) => AppScaffold( - isShowAppBar: true, - appBarTitle: TranslationBase.of(context).shippingAddresss, - baseViewModel: model, - body: Container( - height: MediaQuery.of(context).size.height * 0.65, - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox( - height: 8, - ), - InkWell( - onTap: () { - confirmSelectLocationDialog(model.addressesList); - }, - child: Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - height: 50, - decoration: BoxDecoration( - border: Border.all(color: Colors.grey), - borderRadius: BorderRadius.circular(7), - color: Colors.white, - shape: BoxShape.rectangle, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Container( - child: Text( - getAddressName(), - ), - margin: EdgeInsets.only(left: 10, right: 10), + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).shippingAddresss, + baseViewModel: model, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Container( + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Card( + margin: EdgeInsets.only(left: 12, right: 12, bottom: 12, top: 12), + shape: cardRadius(12), + elevation: 3, + child: Container( + child: InkWell( + onTap: () => confirmSelectLocationDialog(model.addressesList), + child: Container( + padding: EdgeInsets.all(8), + width: double.infinity, + // height: 65, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + getAddressName(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.45, + ), + ), + ), + Icon(Icons.arrow_drop_down) + ], ), ), ), - Icon( - Icons.arrow_drop_down, - size: 22, - color: Colors.grey, - ) - ], + height: 50, + width: double.infinity, + ), ), - ), - ), - SizedBox( - height: 10, - ), - _selectedAddress == null - ? Container( - child: Image.asset( - projectViewModel.isArabic - ? 'assets/images/pharmacy/shipping_image_ar.png' - : 'assets/images/pharmacy/shipping_image.png', - height: 300, - ), - ) - : Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Container( - decoration: BoxDecoration( - border: Border.all(color: Colors.grey)), - height: 200, - child: GoogleMap( - mapType: MapType.normal, - markers: markers, - initialCameraPosition: _kGooglePlex, - onMapCreated: - (GoogleMapController controller) { - _controller.complete(controller); - }, + InkWell( + onTap: () async { + Navigator.push( + context, + FadePage( + page: LocationPage( + latitude: latitude, + longitude: longitude, + )), + ).then((value) { + if (value != null && value is AddNewAddressRequestModel) { + setState(() { + _selectedAddress = AddressInfo( + id: value.customer.id.toString(), + email: value.customer.email, + firstName: value.customer.addresses[0].firstName, + lastName: value.customer.addresses[0].lastName, + address1: value.customer.addresses[0].address1, + address2: value.customer.addresses[0].address2, + city: value.customer.addresses[0].city, + country: value.customer.addresses[0].country, + phoneNumber: value.customer.addresses[0].phoneNumber, + latLong: value.customer.addresses[0].latLong, + company: value.customer.addresses[0].company, + countryId: value.customer.addresses[0].countryId, + createdOnUtc: value.customer.addresses[0].createdOnUtc, + customerAttributes: value.customer.addresses[0].customerAttributes, + faxNumber: value.customer.addresses[0].faxNumber, + province: value.customer.addresses[0].province, + stateProvinceId: value.customer.addresses[0].stateProvinceId, + zipPostalCode: value.customer.addresses[0].zipPostalCode, + ); + List latLongArr = _selectedAddress.latLong.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + markers = Set(); + markers.add( + Marker( + markerId: MarkerId( + _selectedAddress.latLong.hashCode.toString(), + ), + position: LatLng(latitude, longitude), ), + ); + _kGooglePlex = CameraPosition( + target: LatLng(latitude, longitude), + zoom: 14.4746, + ); + }); + } + }); + }, + child: Padding( + padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 8), + child: Row( + children: [ + Icon(Icons.add_circle_outline_sharp), + mWidth(12), + Text( + TranslationBase.of(context).addNewAddress, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, ), ), - SizedBox( - height: 10, - ), - Texts( - TranslationBase.of(context).shippingAddresss), - SizedBox( - height: 10, - ), - Texts( - '${model.user.firstName} ${model.user.lastName}'), - SizedBox( - height: 10, - ), - Texts(_selectedAddress.address1), - SizedBox( - height: 10, - ), - Texts(_selectedAddress.address2), - SizedBox( - height: 10, - ), - Texts(_selectedAddress.city + - " " + - _selectedAddress.country), ], ), + ), + ), + if (_selectedAddress != null) + Card( + shape: cardRadius(12), + color: Colors.white, + margin: EdgeInsets.all(12), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).selectAddress + ":", + fontSize: 12, + color: CustomColors.grey, + fontWeight: FontWeight.w600, + ), + mHeight(12), + Container( + height: 175, + decoration: containerColorRadiusBorder(Colors.white, 12, Colors.grey), + clipBehavior: Clip.antiAlias, + child: Card( + shape: cardRadius(12), + clipBehavior: Clip.antiAlias, + elevation: 0, + margin: const EdgeInsets.all(0), + // child: GoogleMap( + // mapType: MapType.normal, + // markers: markers, + // initialCameraPosition: _kGooglePlex, + // onMapCreated: (GoogleMapController controller) { + // _controller.complete(controller); + // }, + // ), + child: Image.network( + "https://maps.googleapis.com/maps/api/staticmap?center=" + + _kGooglePlex.target.latitude.toString() + + "," + + _kGooglePlex.target.longitude.toString() + + "&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7C" + + _kGooglePlex.target.latitude.toString() + + "," + + _kGooglePlex.target.longitude.toString() + + "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8", + width: double.infinity, + height: double.infinity, + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).shippingAddresss + ":", + fontSize: 12, + color: CustomColors.grey, + fontWeight: FontWeight.w600, + ), + SizedBox( + height: 2, + ), + Texts( + '${model.user.firstName} ${model.user.lastName}', + fontSize: 12, + fontWeight: FontWeight.w600, + ), + Texts( + _selectedAddress.address1, + fontSize: 12, + fontWeight: FontWeight.w600, + ), + Texts( + _selectedAddress.address2, + fontSize: 12, + fontWeight: FontWeight.w600, + ), + Texts( + _selectedAddress.city + " " + _selectedAddress.country, + fontSize: 12, + fontWeight: FontWeight.w600, + ), + ], + ), + ), ) - ], + ], + ), + ), ), - ), - ), - bottomSheet: Container( - width: double.infinity, - height: MediaQuery.of(context).size.height * 0.25, - color: Colors.grey[100], - child: Column( - children: [ - Divider(), - Container( - width: MediaQuery.of(context).size.width * 0.8, + Card( + shape: cardRadius(0), + margin: EdgeInsets.zero, + elevation: 20, + child: Container( + width: double.infinity, + padding: EdgeInsets.only(left: 16, right: 16, top: 16), child: Button( - label: - TranslationBase.of(context).addNewAddress.toUpperCase(), + label: TranslationBase.of(context).continues.toUpperCase(), + disabled: _selectedAddress == null, + backgroundColor: _selectedAddress == null ? CustomColors.grey2 : CustomColors.accentColor, onTap: () { Navigator.push( context, FadePage( - page: LocationPage( - latitude: latitude, - longitude: longitude, - )), - ).then((value) { - if (value != null && - value is AddNewAddressRequestModel) { - setState(() { - _selectedAddress = AddressInfo( - id: value.customer.id.toString(), - email: value.customer.email, - firstName: value.customer.addresses[0].firstName, - lastName: value.customer.addresses[0].lastName, - address1: value.customer.addresses[0].address1, - address2: value.customer.addresses[0].address2, - city: value.customer.addresses[0].city, - country: value.customer.addresses[0].country, - phoneNumber: value.customer.addresses[0].phoneNumber, - latLong: value.customer.addresses[0].latLong, - company: value.customer.addresses[0].company, - countryId: value.customer.addresses[0].countryId, - createdOnUtc: value.customer.addresses[0].createdOnUtc, - customerAttributes: value.customer.addresses[0].customerAttributes, - faxNumber: value.customer.addresses[0].faxNumber, - province: value.customer.addresses[0].province, - stateProvinceId: value.customer.addresses[0].stateProvinceId, - zipPostalCode: value.customer.addresses[0].zipPostalCode, - - ); - List latLongArr = _selectedAddress.latLong.split(','); - - latitude = double.parse(latLongArr[0]); - longitude = double.parse(latLongArr[1]); - markers = Set(); - markers.add( - Marker( - markerId: MarkerId( - _selectedAddress.latLong.hashCode.toString(), - ), - position: LatLng(latitude, longitude), - ), - ); - _kGooglePlex = CameraPosition( - target: LatLng(latitude, longitude), - zoom: 14.4746, - ); - }); - } - }); + page: PrescriptionOrderOverview( + latitude: latitude, + longitude: longitude, + prescriptionReportEnhList: widget.prescriptionReportEnhList, + prescriptionReportList: widget.prescriptionReportList, + prescriptions: widget.prescriptions, + selectedAddress: _selectedAddress, + ), + ), + ); }, ), ), - Container( - width: MediaQuery.of(context).size.width * 0.8, - child: Button( - label: - TranslationBase.of(context).continues.toUpperCase(), - disabled: _selectedAddress == null, - backgroundColor: _selectedAddress == null - ? Colors.green[300] - : Colors.green[700], - onTap: () { - Navigator.push( - context, - FadePage( - page: PrescriptionOrderOverview( - latitude: latitude, - longitude: longitude, - prescriptionReportEnhList: - widget.prescriptionReportEnhList, - prescriptionReportList: - widget.prescriptionReportList, - prescriptions: widget.prescriptions, - selectedAddress: _selectedAddress, - ), - ), - ); - }, - )) - ], - ), - )), + ), + ], + ), + ), + ), ); } diff --git a/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart index e77b29db..96283aa8 100644 --- a/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart +++ b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart @@ -5,8 +5,10 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_repor import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/PrescriptionDeliveryViewModel.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.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'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; @@ -21,6 +23,7 @@ class PrescriptionOrderOverview extends StatelessWidget { final AddressInfo selectedAddress; final double latitude; final double longitude; + PrescriptionOrderOverview({Key key, this.prescriptions, this.prescriptionReportList, this.prescriptionReportEnhList, this.selectedAddress, this.latitude, this.longitude}); @override @@ -30,143 +33,163 @@ class PrescriptionOrderOverview extends StatelessWidget { isShowAppBar: true, appBarTitle: TranslationBase.of(context).orderOverview, baseViewModel: model, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, body: Container( - height: MediaQuery.of(context).size.height * 0.8, + height: double.infinity, child: Column( children: [ - if (!prescriptions.isInOutPatient) - ...List.generate( - prescriptionReportList.length, - (index) => Container( - width: double.infinity, - margin: EdgeInsets.only(top: 10, left: 10, right: 10), - padding: EdgeInsets.all(8.0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), - border: Border.all(color: Colors.grey[200], width: 0.5), + Expanded( + child: Column( + children: [ + if (!prescriptions.isInOutPatient) + Card( + margin: EdgeInsets.all(12), + shape: cardRadius(12), + clipBehavior: Clip.antiAlias, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + children: [ + ...List.generate( + prescriptionReportList.length, + (index) => Card( + margin: EdgeInsets.all(0.0), + color: Colors.white, + shape: cardRadius(0), + elevation: 0, + child: Row( + children: [ + ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5)), + child: Image.network( + prescriptionReportList[index].imageSRCUrl, + fit: BoxFit.cover, + width: 60, + height: 70, + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts(prescriptionReportList[index].itemDescription.isNotEmpty + ? prescriptionReportList[index].itemDescription + : prescriptionReportList[index].itemDescriptionN)), + )), + ], + ), + )) + ], ), - child: Row( - children: [ - ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(5)), - child: Image.network( - prescriptionReportList[index].imageSRCUrl, - fit: BoxFit.cover, - width: 60, - height: 70, + ), + ) + else + Card( + margin: EdgeInsets.all(12), + shape: cardRadius(12), + clipBehavior: Clip.antiAlias, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...List.generate( + prescriptionReportEnhList.length, + (index) => Card( + margin: EdgeInsets.all(0.0), + color: Colors.white, + shape: cardRadius(0), + elevation: 0, + child: Row( + children: [ + Container( + margin: EdgeInsets.only(bottom: 10.0), + decoration: BoxDecoration( + border: Border.all(width: 1.0, color: Color(0xffEBEBEB)), + borderRadius: BorderRadius.all(Radius.circular(30.0)), + ), + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(30)), + child: Image.network( + prescriptionReportEnhList[index].imageSRCUrl, + fit: BoxFit.cover, + width: 48, + height: 48, + ), + ), + ), + SizedBox(width: 14), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(prescriptionReportEnhList[index].itemDescription), + ], + ), + ), + ), + ], + ), ), - ), - SizedBox( - width: 10, - ), - Expanded( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Center( - child: Texts( - prescriptionReportList[index].itemDescription.isNotEmpty ? prescriptionReportList[index].itemDescription : prescriptionReportList[index].itemDescriptionN)), - )), - Icon( - Icons.arrow_forward_ios, - size: 18, - color: Colors.grey[500], ) ], ), - )) - else - ...List.generate( - prescriptionReportEnhList.length, - (index) => Container( - margin: EdgeInsets.all(8.0), - color: Colors.white, - child: Row( - children: [ - ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(5)), - child: Image.network( - prescriptionReportEnhList[index].imageSRCUrl, - fit: BoxFit.cover, - width: 60, - height: 70, - ), - ), - SizedBox( - width: 10, - ), - Expanded( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts(prescriptionReportEnhList[index].itemDescription), - ], - ), - ), ), - Icon( - Icons.arrow_forward_ios, - size: 18, - color: Colors.grey[500], - ) - ], - ), - ), - ) - ], - ), - ), - bottomSheet: Container( - width: double.infinity, - height: MediaQuery.of(context).size.height * 0.15, - color: Colors.grey[100], - child: Column( - children: [ - SizedBox( - height: 12, + ), + ], + ), ), - Container( - width: MediaQuery.of(context).size.width * 0.8, - child: SecondaryButton( - label: TranslationBase.of(context).submit.toUpperCase(), - color: Colors.green[800], - onTap: () async { - showDialog( - context: context, - child: ConfirmWithMessageDialog( - message: TranslationBase.of(context).confirmPrescription, - okTitle: TranslationBase.of(context).ok, - onTap: () async { - GifLoaderDialogUtils.showMyDialog(context); - await model - .insertDeliveryOrder( - lineItemNo: 0, - longitude: longitude, - latitude: latitude, - appointmentNo: prescriptions.appointmentNo, - dischargeID: prescriptions.dischargeNo, - createdBy: model.user.patientID) - .then((value) { - GifLoaderDialogUtils.hideDialog(context); - if (model.state == ViewState.ErrorLocal) - showErrorDialog(context, model.error); - else { - Navigator.pop(context); - Navigator.pop(context); - Navigator.pop(context, true); - } - }).catchError((e) { - GifLoaderDialogUtils.hideDialog(context); - }); - }, - ), - ); - }, - )) + Card( + shape: cardRadius(0), + margin: EdgeInsets.zero, + elevation: 20, + child: Container( + width: double.infinity, + margin: EdgeInsets.all(12), + child: SecondaryButton( + label: TranslationBase.of(context).submit.toUpperCase(), + color: CustomColors.accentColor, + onTap: () async { + showDialog( + context: context, + child: ConfirmWithMessageDialog( + message: TranslationBase.of(context).confirmPrescription, + okTitle: TranslationBase.of(context).ok, + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + await model + .insertDeliveryOrder( + lineItemNo: 0, + longitude: longitude, + latitude: latitude, + appointmentNo: prescriptions.appointmentNo, + dischargeID: prescriptions.dischargeNo, + createdBy: model.user.patientID) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) + showErrorDialog(context, model.error); + else { + Navigator.pop(context); + Navigator.pop(context); + Navigator.pop(context, true); + } + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + }); + }, + ), + ); + }, + )), + ) ], ), ), diff --git a/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart b/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart index cdc7be72..c88283be 100644 --- a/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart +++ b/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart @@ -6,6 +6,7 @@ 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:giffy_dialog/giffy_dialog.dart'; import 'package:maps_launcher/maps_launcher.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -53,9 +54,7 @@ class PharmacyForPrescriptionsPage extends StatelessWidget { child: Padding( padding: const EdgeInsets.all(8.0), child: Center( - child: Texts(prescriptionReport.itemDescription.isNotEmpty - ? prescriptionReport.itemDescription - : prescriptionReport.itemDescriptionN ?? ''), + child: Texts(prescriptionReport.itemDescription.isNotEmpty ? prescriptionReport.itemDescription : prescriptionReport.itemDescriptionN ?? ''), ), ), ) @@ -68,70 +67,172 @@ class PharmacyForPrescriptionsPage extends StatelessWidget { scrollDirection: Axis.vertical, physics: BouncingScrollPhysics(), itemBuilder: (context, index) => Container( - width: double.infinity, - margin: EdgeInsets.only(top: 10, left: 10, right: 10), - padding: EdgeInsets.all(8.0), + margin: EdgeInsets.all(12.0), + padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), - border: Border.all(color: Colors.grey[200], width: 0.5), - ), + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(5)), - child: Image.network( - model.pharmacyPrescriptionsList[index].projectImageURL, - fit: BoxFit.cover, - width: 60, - height: 70, + InkWell( + onTap: () { + showDialog( + context: context, + builder: (_) => AssetGiffyDialog( + title: Text( + model.pharmacyPrescriptionsList[index].locationDescription, + style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600), + ), + image: Image.network( + model.pharmacyPrescriptionsList[index].projectImageURL.toString(), + fit: BoxFit.cover, + ), + buttonCancelText: Text(TranslationBase.of(context).cancel), + buttonCancelColor: Colors.grey, + onlyCancelButton: true, + ), + ); + }, + child: ClipRRect( + borderRadius: BorderRadius.circular(12), + child: Image.network( + model.pharmacyPrescriptionsList[index].projectImageURL.toString(), + width: 48, + height: 48, + fit: BoxFit.cover, + ), ), ), Expanded( child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts(model.pharmacyPrescriptionsList[index].locationDescription), - SizedBox( - height: 5, - ), - Texts(model.pharmacyPrescriptionsList[index].cityName), - ], + padding: EdgeInsets.only(left: 12, right: 12), + child: Text( + model.pharmacyPrescriptionsList[index].locationDescription?.trim().toString() + + "\n" + + model.pharmacyPrescriptionsList[index].cityName.trim().toString() + + "\n" + + model.pharmacyPrescriptionsList[index].distanceInKilometers.toString() + + " " + + TranslationBase.of(context).km_ ?? + "", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), ), ), - ), - InkWell( - onTap: () { - MapsLauncher.launchCoordinates(double.parse(model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude)); - }, - child: Icon( - Icons.pin_drop, - size: 18, - color: Colors.red[900], + ), //model.cOCItemList[index].cOCTitl + IconButton( + icon: Icon( + Icons.location_on, + color: Color(0xff2B353E), ), + constraints: BoxConstraints(), + padding: EdgeInsets.all(8), + tooltip: '', + onPressed: () { + // setState(() { + MapsLauncher.launchCoordinates(double.parse(model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude), + model.pharmacyPrescriptionsList[index].locationDescription); + // }); + }, ), - SizedBox( - width: 15, - ), - InkWell( - onTap: Feedback.wrapForTap(() { - launch("tel://${model.pharmacyPrescriptionsList[index].phoneNumber}"); - }, context), - child: Container( - child: Icon( - Icons.call, - size: 18, - color: Colors.red[900], - ), + IconButton( + icon: Icon( + Icons.phone, + color: Color(0xff2B353E), ), - ) + constraints: BoxConstraints(), + padding: EdgeInsets.all(8), + tooltip: '', + onPressed: () { + // setState(() { + launch("tel://" + model.pharmacyPrescriptionsList[index].phoneNumber); + // }); + }, + ), ], ), ), + // Container( + // width: double.infinity, + // margin: EdgeInsets.only(top: 10, left: 10, right: 10), + // padding: EdgeInsets.all(8.0), + // decoration: BoxDecoration( + // color: Colors.white, + // borderRadius: BorderRadius.all( + // Radius.circular(10.0), + // ), + // border: Border.all(color: Colors.grey[200], width: 0.5), + // ), + // child: Row( + // children: [ + // ClipRRect( + // borderRadius: BorderRadius.all(Radius.circular(5)), + // child: Image.network( + // model.pharmacyPrescriptionsList[index].projectImageURL, + // fit: BoxFit.cover, + // width: 60, + // height: 70, + // ), + // ), + // Expanded( + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Texts(model.pharmacyPrescriptionsList[index].locationDescription), + // SizedBox( + // height: 5, + // ), + // Texts(model.pharmacyPrescriptionsList[index].cityName), + // ], + // ), + // ), + // ), + // InkWell( + // onTap: () { + // MapsLauncher.launchCoordinates(double.parse(model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude)); + // }, + // child: Icon( + // Icons.pin_drop, + // size: 18, + // color: Colors.red[900], + // ), + // ), + // SizedBox( + // width: 15, + // ), + // InkWell( + // onTap: Feedback.wrapForTap(() { + // launch("tel://${model.pharmacyPrescriptionsList[index].phoneNumber}"); + // }, context), + // child: Container( + // child: Icon( + // Icons.call, + // size: 18, + // color: Colors.red[900], + // ), + // ), + // ) + // ], + // ), + // ), itemCount: model.pharmacyPrescriptionsList.length, ), ) diff --git a/lib/pages/medical/prescriptions/prescription_details_page.dart b/lib/pages/medical/prescriptions/prescription_details_page.dart index 9289ed75..860a362e 100644 --- a/lib/pages/medical/prescriptions/prescription_details_page.dart +++ b/lib/pages/medical/prescriptions/prescription_details_page.dart @@ -38,6 +38,7 @@ class PrescriptionDetailsPage extends StatelessWidget { DoctorHeader( headerModel: HeaderModel( prescriptions.doctorName, + prescriptions.doctorID, prescriptions.doctorImageURL, prescriptions.speciality, "", @@ -180,6 +181,32 @@ class PrescriptionDetailsPage extends StatelessWidget { }, ); return; + + showGeneralDialog( + barrierColor: Colors.black.withOpacity(0.5), + transitionBuilder: (context, a1, a2, widget) { + final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; + return Transform( + transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + child: Opacity( + opacity: a1.value, + child: PrescriptionReminderDialog( + eventId: prescriptionReport.itemID.toString(), + title: "${prescriptionReport.itemDescriptionN} Prescription Reminder", + description: "${prescriptionReport.itemDescriptionN} ${prescriptionReport.frequencyN} ${prescriptionReport.routeN} ", + startDate: startDate, + endDate: endDate, + location: prescriptionReport.remarks, + days: 1, + ), + ), + ); + }, + transitionDuration: Duration(milliseconds: 500), + barrierDismissible: true, + barrierLabel: '', + context: context, + pageBuilder: (context, animation1, animation2) {}); }, iconData: Icons.notifications_active, color: Color(0xffEAEAEA), diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart index 8695a88f..7fbb5745 100644 --- a/lib/pages/medical/prescriptions/prescription_items_page.dart +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -49,6 +49,7 @@ class PrescriptionItemsPage extends StatelessWidget { DoctorHeader( headerModel: HeaderModel( prescriptions.doctorName, + prescriptions.doctorID, prescriptions.doctorImageURL, prescriptions.speciality, "", @@ -186,7 +187,7 @@ class PrescriptionItemsPage extends StatelessWidget { ), ), Icon( - Icons.arrow_forward_ios, + Icons.arrow_forward, size: 16, ), ], @@ -306,7 +307,7 @@ class PrescriptionItemsPage extends StatelessWidget { ), ), Icon( - Icons.arrow_forward_ios, + Icons.arrow_forward, size: 16, ), ], diff --git a/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart index 8df6191e..c024b575 100644 --- a/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart @@ -109,11 +109,11 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - DateUtil.formatDateToDate(prescriptionsOrder.createdOn, projectViewModel.isArabic), + DateUtil.getDayMonthYearDateFormatted(prescriptionsOrder.createdOn), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), ), Text( - DateUtil.formatDateToTime(prescriptionsOrder.createdOn), + DateUtil.formatDateToTimeLang(prescriptionsOrder.createdOn, false), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), ), ], diff --git a/lib/pages/medical/prescriptions/prescriptions_history_page.dart b/lib/pages/medical/prescriptions/prescriptions_history_page.dart index 43904857..cfb24c2a 100644 --- a/lib/pages/medical/prescriptions/prescriptions_history_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_history_page.dart @@ -119,11 +119,11 @@ class PrescriptionsHistoryPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - DateUtil.formatDateToDate(prescriptionsViewModel.prescriptionsHistory[index].createdOn, projectViewModel.isArabic), + DateUtil.getDayMonthYearDateFormatted(prescriptionsViewModel.prescriptionsHistory[index].createdOn), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), ), Text( - DateUtil.formatDateToTime(prescriptionsViewModel.prescriptionsHistory[index].createdOn), + DateUtil.formatDateToTimeLang(prescriptionsViewModel.prescriptionsHistory[index].createdOn, false), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), ), ], @@ -133,7 +133,7 @@ class PrescriptionsHistoryPage extends StatelessWidget { ), ), Icon( - Icons.arrow_forward_ios, + Icons.arrow_forward, size: 16, ), mWidth(6), diff --git a/lib/pages/medical/prescriptions/prescriptions_home_page.dart b/lib/pages/medical/prescriptions/prescriptions_home_page.dart index 6fdba0e4..26c8dc22 100644 --- a/lib/pages/medical/prescriptions/prescriptions_home_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_home_page.dart @@ -1,5 +1,6 @@ import 'dart:ui'; +import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; @@ -26,7 +27,7 @@ class _HomePrescriptionsPageState extends State with Sing @override void initState() { super.initState(); - _tabController = TabController(length: 2, vsync: this); + _tabController = TabController(length: 3, vsync: this); imagesInfo.add(ImagesInfo( imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/ar/0.png')); imagesInfo.add(ImagesInfo( @@ -74,7 +75,8 @@ class _HomePrescriptionsPageState extends State with Sing letterSpacing: -0.48, ), tabs: [ - Text(TranslationBase.of(context).prescriptions, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')), + Text(TranslationBase.of(context).byClinic, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')), + Text(TranslationBase.of(context).byHospital, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')), Text(TranslationBase.of(context).orderLog, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')), ], ), @@ -84,9 +86,19 @@ class _HomePrescriptionsPageState extends State with Sing controller: _tabController, children: [ PrescriptionsPage( + FilterType.Clinic, prescriptionsViewModel: model, showOrderLog: () async { - _tabController.animateTo(1); + _tabController.animateTo(2); + await model.getPrescriptionsOrders(showLoading: true); + setState(() {}); + }, + ), + PrescriptionsPage( + FilterType.Hospital, + prescriptionsViewModel: model, + showOrderLog: () async { + _tabController.animateTo(2); await model.getPrescriptionsOrders(showLoading: true); setState(() {}); }, diff --git a/lib/pages/medical/prescriptions/prescriptions_page.dart b/lib/pages/medical/prescriptions/prescriptions_page.dart index 3fabcd8b..863a2209 100644 --- a/lib/pages/medical/prescriptions/prescriptions_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_page.dart @@ -16,86 +16,67 @@ import 'package:provider/provider.dart'; class PrescriptionsPage extends StatelessWidget { final VoidCallback showOrderLog; + final FilterType filterType; final PrescriptionsViewModel prescriptionsViewModel; - const PrescriptionsPage({Key key, this.prescriptionsViewModel, this.showOrderLog}) : super(key: key); + const PrescriptionsPage(this.filterType, {Key key, this.prescriptionsViewModel, this.showOrderLog}) : super(key: key); @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); return AppScaffold( - baseViewModel: prescriptionsViewModel, - body: FractionallySizedBox( - widthFactor: 1.0, - child: ListView( + baseViewModel: prescriptionsViewModel, + body: ListView.separated( physics: BouncingScrollPhysics(), - children: [ - Row( - children: [ - MyTabView(TranslationBase.of(context).byClinic, FilterType.Clinic, prescriptionsViewModel.filterType, () { - prescriptionsViewModel.setFilterType(FilterType.Clinic); - }), - MyTabView(TranslationBase.of(context).byHospital, FilterType.Hospital, prescriptionsViewModel.filterType, () { - prescriptionsViewModel.setFilterType(FilterType.Hospital); - }), - ], - ), - ListView.separated( - physics: NeverScrollableScrollPhysics(), - shrinkWrap: true, - padding: EdgeInsets.only(top: 12), - separatorBuilder: (context, index) { - return Container( - height: 12, - margin: EdgeInsets.only(left: 21, right: 21), - // color: Color(0xffD9D9D9), - ); - }, - itemBuilder: (context, index) { - List prescriptionsList = prescriptionsViewModel.prescriptionsOrderList[index].prescriptionsList; - return AppExpandableNotifier( - title: prescriptionsViewModel.prescriptionsOrderList[index].filterName, - bodyWidget: ListView.separated( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), - itemBuilder: (context, _index) { - Prescriptions prescriptions = prescriptionsList[_index]; - return DoctorCard( - onTap: () async { - final _shouldRecallApi = await Navigator.push( - context, - FadePage( - page: PrescriptionItemsPage( - prescriptions: prescriptions, - ), - ), - ); - if (_shouldRecallApi != null) { - showOrderLog(); - } - }, - name: prescriptions.doctorName, - profileUrl: prescriptions.doctorImageURL, - rating: prescriptions.actualDoctorRate.toDouble(), - subName: prescriptions.name, - isInOutPatient: prescriptions.isInOutPatient, - isLiveCareAppointment: prescriptions.isLiveCareAppointment, - // appointmentTime: DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions - // .appointmentDate)), - date: DateUtil.convertStringToDate(prescriptions - .appointmentDate) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)), - ); - }, - separatorBuilder: (context, index) => SizedBox(height: 14), - itemCount: prescriptionsList.length), - ); - }, - itemCount: prescriptionsViewModel.prescriptionsOrderList.length, - ) - ], - ), - ), - ); + padding: EdgeInsets.only(top: 12), + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + // color: Color(0xffD9D9D9), + ); + }, + itemBuilder: (context, index) { + List prescriptionsList = prescriptionsViewModel.prescriptionsOrderListByValue(filterType)[index].prescriptionsList; + return AppExpandableNotifier( + title: prescriptionsViewModel.prescriptionsOrderListByValue(filterType)[index].filterName, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + itemBuilder: (context, _index) { + Prescriptions prescriptions = prescriptionsList[_index]; + + bool _isSortByClinic = filterType == FilterType.Clinic; + return DoctorCard( + onTap: () async { + final _shouldRecallApi = await Navigator.push( + context, + FadePage( + page: PrescriptionItemsPage( + prescriptions: prescriptions, + ), + ), + ); + if (_shouldRecallApi != null) { + showOrderLog(); + } + }, + name: prescriptions.doctorName, + profileUrl: prescriptions.doctorImageURL, + rating: prescriptions.actualDoctorRate.toDouble(), + subName: _isSortByClinic ? prescriptions.name : prescriptions.clinicDescription, + isSortByClinic: _isSortByClinic, + isInOutPatient: prescriptions.isInOutPatient, + isLiveCareAppointment: prescriptions.isLiveCareAppointment, + date: DateUtil.convertStringToDate(prescriptions + .appointmentDate) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: prescriptionsList.length), + ); + }, + itemCount: prescriptionsViewModel.prescriptionsOrderListByValue(filterType).length, + )); } } diff --git a/lib/pages/medical/radiology/radiology_details_page.dart b/lib/pages/medical/radiology/radiology_details_page.dart index 1a61def8..e84a5063 100644 --- a/lib/pages/medical/radiology/radiology_details_page.dart +++ b/lib/pages/medical/radiology/radiology_details_page.dart @@ -40,6 +40,7 @@ class RadiologyDetailsPage extends StatelessWidget { DoctorHeader( headerModel: new HeaderModel( finalRadiology.doctorName, + finalRadiology.doctorID, finalRadiology.doctorImageURL, finalRadiology.speciality, finalRadiology.invoiceNo.toString(), diff --git a/lib/pages/medical/vital_sign/LineChartCurved.dart b/lib/pages/medical/vital_sign/LineChartCurved.dart index 34e3735e..f28c2801 100644 --- a/lib/pages/medical/vital_sign/LineChartCurved.dart +++ b/lib/pages/medical/vital_sign/LineChartCurved.dart @@ -137,15 +137,6 @@ class LineChartCurved extends StatelessWidget { fontSize: 10, ), interval: 3.0, - // interval: getMaxY() - getMinY() <= 500 - // ? getMaxY() - getMinY() <= 50 - // ? 10 - // : 10 - // : getMaxY() - getMinY() <= 1000 - // ? 100 - // : getMaxY() - getMinY() >= 10000 - // ? 5000 - // : 200, margin: 12, ), ), diff --git a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart index d11e91f5..89f5545f 100644 --- a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart +++ b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart @@ -33,7 +33,7 @@ class VitalSignDetailsScreen extends StatelessWidget { // vitalSigns.add(new VitalSign(TranslationBase.of(context).body, mode.bodyMax, TranslationBase.of(context).mass, "assets/images/new/")); vitalSigns.add(new VitalSign(TranslationBase.of(context).temperature, mode.temperatureCelcius, TranslationBase.of(context).tempC, "assets/images/new/temperature.svg")); vitalSigns.add(new VitalSign(TranslationBase.of(context).heart, mode.hartRat, TranslationBase.of(context).bpm, "assets/images/new/heart_rate.svg")); - vitalSigns.add(new VitalSign(TranslationBase.of(context).respirationRate, mode.respirationBeatPerMinute, TranslationBase.of(context).bpm, "assets/images/new/respiration_rate.svg")); + vitalSigns.add(new VitalSign(TranslationBase.of(context).respirationRate, mode.respirationBeatPerMinute, TranslationBase.of(context).respirationBPM, "assets/images/new/respiration_rate.svg")); vitalSigns.add(new VitalSign(TranslationBase.of(context).bloodPressure, mode.bloodPressure, TranslationBase.of(context).sysDias, "assets/images/new/blood_pressure.svg")); } @@ -71,7 +71,7 @@ class VitalSignDetailsScreen extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "Body Mass Index is: " + mode.bodyMax, + TranslationBase.of(context).bodyMassIndex + mode.bodyMax, style: TextStyle( fontSize: 16, letterSpacing: -0.64, @@ -83,15 +83,15 @@ class VitalSignDetailsScreen extends StatelessWidget { height: MediaQuery.of(context).size.width / 2.8, child: Row( children: [ - showMass(context, "Underweight", "< 18.5", double.parse(mode.bodyMax) <= 18.5 ? Colors.red : Colors.black, 8), + showMass(context, TranslationBase.of(context).underWeight, "< 18.5", double.parse(mode.bodyMax) <= 18.5 ? Colors.red : Colors.black, 8), mWidth(12), - showMass(context, "Normal", "18.5 - 24.9", (double.parse(mode.bodyMax) > 18.5 && double.parse(mode.bodyMax) < 25) ? Colors.red : Colors.black, 6), + showMass(context, TranslationBase.of(context).healthy, "18.5 - 24.9", (double.parse(mode.bodyMax) > 18.5 && double.parse(mode.bodyMax) < 25) ? Colors.red : Colors.black, 6), mWidth(12), - showMass(context, "Overweight", "25 - 29.9", (double.parse(mode.bodyMax) >= 25 && double.parse(mode.bodyMax) < 30) ? Colors.red : Colors.black, 4), + showMass(context, TranslationBase.of(context).overWeight, "25 - 29.9", (double.parse(mode.bodyMax) >= 25 && double.parse(mode.bodyMax) < 30) ? Colors.red : Colors.black, 4), mWidth(12), - showMass(context, "Obese", "30 - 34.9", (double.parse(mode.bodyMax) >= 30 && double.parse(mode.bodyMax) < 35) ? Colors.red : Colors.black, 2), + showMass(context, TranslationBase.of(context).obese, "30 - 34.9", (double.parse(mode.bodyMax) >= 30 && double.parse(mode.bodyMax) < 35) ? Colors.red : Colors.black, 2), mWidth(12), - showMass(context, "Extreme Obese", "> 35", (double.parse(mode.bodyMax) >= 35) ? Colors.red : Colors.black, 0), + showMass(context, TranslationBase.of(context).extremeObese, "> 35", (double.parse(mode.bodyMax) >= 35) ? Colors.red : Colors.black, 0), ], ), ), diff --git a/lib/pages/pharmacies/screens/cart-order-preview.dart b/lib/pages/pharmacies/screens/cart-order-preview.dart index 5d271a1a..dcf2ae64 100644 --- a/lib/pages/pharmacies/screens/cart-order-preview.dart +++ b/lib/pages/pharmacies/screens/cart-order-preview.dart @@ -330,7 +330,7 @@ class _SelectAddressWidgetState extends State { ), ), Icon( - Icons.arrow_forward_ios, + Icons.arrow_forward, size: 20, color: Colors.grey.shade400, ), @@ -537,7 +537,7 @@ class _SelectPaymentOptionWidgetState extends State { ), ), Icon( - Icons.arrow_forward_ios, + Icons.arrow_forward, size: 20, color: Colors.grey.shade400, ), diff --git a/lib/pages/rateAppointment/rate_appointment_clinic.dart b/lib/pages/rateAppointment/rate_appointment_clinic.dart index c6ab88ab..8eafe6cb 100644 --- a/lib/pages/rateAppointment/rate_appointment_clinic.dart +++ b/lib/pages/rateAppointment/rate_appointment_clinic.dart @@ -96,7 +96,7 @@ class _RateAppointmentClinicState extends State { height: 25 / 16), ), Text( - model.appointmentDetails.startTime, + model.appointmentDetails.startTime.toString().substring(0, 5), style: TextStyle( fontSize: 14, fontWeight: FontWeight.w600, @@ -131,7 +131,7 @@ class _RateAppointmentClinicState extends State { projectViewModel.isArabic), myRichText( TranslationBase.of(context).date + ":", - DateUtil.getMonthDayYearDateFormatted( + DateUtil.getDayMonthYearDateFormatted( DateUtil.convertStringToDate(model .appointmentDetails .appointmentDate)), diff --git a/lib/pages/rateAppointment/rate_appointment_doctor.dart b/lib/pages/rateAppointment/rate_appointment_doctor.dart index 241412e9..aaf9aa06 100644 --- a/lib/pages/rateAppointment/rate_appointment_doctor.dart +++ b/lib/pages/rateAppointment/rate_appointment_doctor.dart @@ -111,7 +111,6 @@ class _RateAppointmentDoctorState extends State { color: rating >= (index + 1) ? Color.fromRGBO(255, 186, 0, 1.0) : Colors.grey[400], - // Theme.of(context).hintColor, icon: Icon(rating >= (index + 1) ? Icons.star : Icons.star)), diff --git a/lib/pages/vaccine/my_vaccines_item_screen.dart b/lib/pages/vaccine/my_vaccines_item_screen.dart index 38911c90..56e23677 100644 --- a/lib/pages/vaccine/my_vaccines_item_screen.dart +++ b/lib/pages/vaccine/my_vaccines_item_screen.dart @@ -60,7 +60,7 @@ class _MyVaccinesItemPageState extends State { child: Texts( model.vaccinationItemList[index].dESCRIPTION)), Icon(projectViewModel.isArabic - ? Icons.arrow_forward_ios + ? Icons.arrow_forward : Icons.arrow_back_ios) ], ), diff --git a/lib/pages/vaccine/my_vaccines_screen.dart b/lib/pages/vaccine/my_vaccines_screen.dart index a41c8c99..f15ee9fb 100644 --- a/lib/pages/vaccine/my_vaccines_screen.dart +++ b/lib/pages/vaccine/my_vaccines_screen.dart @@ -53,7 +53,7 @@ class _MyVaccinesState extends State { separatorBuilder: (context, index) => SizedBox(height: 14), itemBuilder: (BuildContext context, int index) { return DoctorCard( - onTap: () {}, + onTap: null, isInOutPatient: true, isShowInOutPatient: false, name: TranslationBase.of(context).dr.toString() + " " + model.vaccineList[index].doctorName, diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 1c11e26b..3986c8e4 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -496,7 +496,7 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } - Future getPatientAppointmentHistory(bool isActiveAppointment, BuildContext context) async { + Future getPatientAppointmentHistory(bool isActiveAppointment, BuildContext context, {bool isForCOC = false}) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { @@ -520,6 +520,7 @@ class DoctorsListService extends BaseService { "DeviceTypeID": req.DeviceTypeID, "PatientID": authUser.patientID, "PatientTypeID": authUser.patientType, + "IsComingFromCOC": isForCOC, "PatientType": authUser.patientType }; diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 2b2d933f..d525dbb1 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -40,6 +40,7 @@ class ClinicListService extends BaseService { }, onFailure: (String error, int statusCode) { throw error; }, body: request); + sharedPref.setObject(CLINICS_LIST, localRes); return Future.value(localRes); } diff --git a/lib/services/family_files/family_files_provider.dart b/lib/services/family_files/family_files_provider.dart index cd83f2d9..5fbe2392 100644 --- a/lib/services/family_files/family_files_provider.dart +++ b/lib/services/family_files/family_files_provider.dart @@ -232,11 +232,11 @@ class FamilyFilesProvider with ChangeNotifier { var currentUser = AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER)); request['PatientOutSA'] = currentUser.outSA; //? 1 : 0; - request['LoginType'] = await sharedPref.getInt(LAST_LOGIN); + request['LoginType'] = await sharedPref.getInt(LAST_LOGIN) ?? 1; request['MobileNo'] = currentUser.mobileNumber[0].toString() == "0" ? currentUser.mobileNumber.toString() : '0' + currentUser.mobileNumber.toString(); request['PatientMobileNumber'] = currentUser.mobileNumber; //['MobileNumber']; request['SearchType'] = 2; - request['SuperUser'] = currentUser.patientID; //currentUser.PatientID; + // request['SuperUser'] = currentUser.patientID; //currentUser.PatientID; request['PatientIdentificationID'] = ''; request['IsSilentLogin'] = true; request['DeviceToken'] = await sharedPref.getString(PUSH_TOKEN); diff --git a/lib/theme/theme_value.dart b/lib/theme/theme_value.dart index 6d8c7f5d..2044d8e4 100644 --- a/lib/theme/theme_value.dart +++ b/lib/theme/theme_value.dart @@ -8,7 +8,7 @@ import 'package:hexcolor/hexcolor.dart'; /// //final projectProvider = Provider.of(AppGlobal.context); -final bluePrimary = Color(0xFF3F51B5); +final bluePrimary = Color(0xFF00000); final blueAccent = Color(0xFFFF9800); final blueBackground = Color(0xFFFFFFFF); diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart index 2d9c912e..34585002 100644 --- a/lib/uitl/date_uitl.dart +++ b/lib/uitl/date_uitl.dart @@ -406,7 +406,7 @@ class DateUtil { /// get data formatted like 10:30 according to lang static String formatDateToTimeLang(DateTime date, bool isArabic) { - return DateFormat('hh:mm a', isArabic ? "ar_SA" : "en_US").format(date); + return DateFormat('HH:mm', isArabic ? "ar_SA" : "en_US").format(date); } /// get data formatted like 26/4/2020 10:30 diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 8b3c72cf..0a3177e0 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -86,6 +86,8 @@ class TranslationBase { String get gender => localizedValues['gender'][locale.languageCode]; + String get pleaseSelectGender => localizedValues['please_select_gender'][locale.languageCode]; + String get nationality => localizedValues['nationality'][locale.languageCode]; String get docQualifications => localizedValues['docQualifications'][locale.languageCode]; @@ -108,6 +110,11 @@ class TranslationBase { String get appointmentCalendar => localizedValues['appointmentCalendar'][locale.languageCode]; + String get appointmentReminder => localizedValues['appointmentReminder'][locale.languageCode]; + String get prescriptionReminder => localizedValues['prescriptionReminder'][locale.languageCode]; + + String get pleaseSelectFromBelowOptions => localizedValues['please_select_from_below_options'][locale.languageCode]; + String get appointmentSuccess => localizedValues['appointmentSuccess'][locale.languageCode]; String get confirm => localizedValues['confirm'][locale.languageCode]; @@ -474,6 +481,8 @@ class TranslationBase { String get height => localizedValues['height'][locale.languageCode]; + String get unit => localizedValues['unit'][locale.languageCode]; + String get heightUnit => localizedValues['heightUnit'][locale.languageCode]; String get weightUnit => localizedValues['weightUnit'][locale.languageCode]; @@ -1299,6 +1308,8 @@ class TranslationBase { String get birth_date => localizedValues['birth_date'][locale.languageCode]; + String get dateOfBirth => localizedValues['date_of_birth'][locale.languageCode]; + String get mass => localizedValues['mass'][locale.languageCode]; String get tempC => localizedValues['temp-c'][locale.languageCode]; @@ -1783,8 +1794,12 @@ class TranslationBase { String get year => localizedValues['Year'][locale.languageCode]; + String get years => localizedValues['years'][locale.languageCode]; + String get month => localizedValues['Month'][locale.languageCode]; + String get enterDetailBelow => localizedValues['enter_detail_below'][locale.languageCode]; + String get point => localizedValues['point'][locale.languageCode]; String get riyal => localizedValues['riyal'][locale.languageCode]; @@ -2051,10 +2066,18 @@ class TranslationBase { String get remaining => localizedValues["remaining"][locale.languageCode]; + String get addCustomAmount => localizedValues["addCustomAmount"][locale.languageCode]; + + String get left => localizedValues["left"][locale.languageCode]; + String get taken => localizedValues["taken"][locale.languageCode]; String get ml => localizedValues["ml"][locale.languageCode]; + String get mililitre => localizedValues["mililitre"][locale.languageCode]; + + String get litre => localizedValues["litre"][locale.languageCode]; + String get l => localizedValues["l"][locale.languageCode]; String get customLabel => localizedValues["custom-label"][locale.languageCode]; @@ -2326,6 +2349,18 @@ class TranslationBase { String get rateAppointment => localizedValues["rateAppointment"][locale.languageCode]; + String get noInsuranceCardAttached => localizedValues["noInsuranceCardAttached"][locale.languageCode]; + + String get bodyMassIndex => localizedValues["bodyMassIndex"][locale.languageCode]; + + String get extremeObese => localizedValues["extremeObese"][locale.languageCode]; + + String get respirationBPM => localizedValues["respirationBPM"][locale.languageCode]; + + String get noSlotsError => localizedValues["noSlotsError"][locale.languageCode]; + + String get selectSlot => localizedValues["selectSlot"][locale.languageCode]; + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/uitl/utils_new.dart b/lib/uitl/utils_new.dart index 0040a1f2..0bbad901 100644 --- a/lib/uitl/utils_new.dart +++ b/lib/uitl/utils_new.dart @@ -1,6 +1,9 @@ import 'dart:ui'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; Decoration appGradient = BoxDecoration( gradient: LinearGradient( @@ -23,6 +26,22 @@ Color getColorFromHex(String hexColor) { return Color(int.parse(hexColor, radix: 16)); } +Widget getNoDataWidget(BuildContext context) { + return Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SvgPicture.asset('assets/images/new/not_found.svg', width: 110.0, height: 110.0), + Container( + margin: EdgeInsets.only(top: 15.0), + child: Text(TranslationBase.of(context).noResultFound, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Color(0xFFBABABA)))), + ], + ), + ), + ); +} + spacerVertical(double v) { return Container( height: v, @@ -291,6 +310,18 @@ Decoration containerColorRadiusBorderWidth(Color background, double radius, Colo ); } +Decoration containerColorRadiusBorderWidthCircular(Color background, double radius, Color color, double w) { + return BoxDecoration( + color: background, + border: Border.all( + width: w, // + color: color // <--- border width here + ), + // borderRadius: BorderRadius.circular(radius), + shape: BoxShape.circle, + ); +} + Decoration containerColorRadiusRight(Color background, double radius) { return BoxDecoration( color: background, diff --git a/lib/widgets/Loader/gif_loader_container.dart b/lib/widgets/Loader/gif_loader_container.dart index b7a20339..75083d1a 100644 --- a/lib/widgets/Loader/gif_loader_container.dart +++ b/lib/widgets/Loader/gif_loader_container.dart @@ -6,8 +6,7 @@ class GifLoaderContainer extends StatefulWidget { _GifLoaderContainerState createState() => _GifLoaderContainerState(); } -class _GifLoaderContainerState extends State - with TickerProviderStateMixin { +class _GifLoaderContainerState extends State with TickerProviderStateMixin { GifController controller1; @override @@ -15,8 +14,9 @@ class _GifLoaderContainerState extends State controller1 = GifController(vsync: this); WidgetsBinding.instance.addPostFrameCallback((_) { - controller1.repeat( - min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true); + try { + controller1.repeat(min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true); + } catch (ex) {} }); super.initState(); } @@ -30,14 +30,13 @@ class _GifLoaderContainerState extends State @override Widget build(BuildContext context) { return Center( - //progress-loading.gif + //progress-loading.gif child: Container( - // margin: EdgeInsets.only(bottom: 40), - child: GifImage( - controller: controller1, - image: AssetImage( - "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), - ), - )); + // margin: EdgeInsets.only(bottom: 40), + child: GifImage( + controller: controller1, + image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), + ), + )); } -} \ No newline at end of file +} diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart index fe82a982..53eb06a2 100644 --- a/lib/widgets/bottom_navigation/bottom_nav_bar.dart +++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart @@ -65,6 +65,7 @@ class _BottomNavBarState extends State { index: widget.index, currentIndex: 3, name: TranslationBase.of(context).myFamily, + // isDisabled: projectViewModel.isLoginChild, ), if (widget.index == 0) (widget.showHomeIcon) diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index 91aefc75..1515b239 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -16,17 +16,11 @@ class BottomNavigationItem extends StatelessWidget { final int index; final int currentIndex; final String name; + final bool isDisabled; - AuthenticatedUserObject authenticatedUserObject = - locator(); + AuthenticatedUserObject authenticatedUserObject = locator(); - BottomNavigationItem( - {this.icon, - this.activeIcon, - this.changeIndex, - this.index, - this.currentIndex, - this.name}); + BottomNavigationItem({this.icon, this.activeIcon, this.changeIndex, this.index, this.currentIndex, this.name, this.isDisabled = false}); @override Widget build(BuildContext context) { @@ -39,7 +33,9 @@ class BottomNavigationItem extends StatelessWidget { child: InkWell( highlightColor: Colors.transparent, splashColor: Colors.transparent, - onTap: () => changeIndex(currentIndex), + onTap: () { + if (!isDisabled) changeIndex(currentIndex); + }, child: currentIndex != 4 ? Column( mainAxisSize: MainAxisSize.min, @@ -49,11 +45,7 @@ class BottomNavigationItem extends StatelessWidget { height: 15, ), Container( - child: Icon(currentIndex == index ? activeIcon : icon, - color: currentIndex == index - ? secondaryColor - : Colors.grey, - size: 22.0), + child: Icon(currentIndex == index ? activeIcon : icon, color: currentIndex == index ? secondaryColor : Colors.grey, size: 22.0), ), SizedBox( height: 2, @@ -61,9 +53,7 @@ class BottomNavigationItem extends StatelessWidget { Texts( name, textAlign: TextAlign.center, - color: currentIndex == index - ? secondaryColor - : Colors.grey, + color: currentIndex == index ? secondaryColor : Colors.grey, fontSize: 11, ), SizedBox( @@ -86,9 +76,7 @@ class BottomNavigationItem extends StatelessWidget { borderRadius: BorderRadius.circular(8), badgeContent: Container( padding: EdgeInsets.all(2.0), - child: Text(model.count.toString(), - style: TextStyle( - color: Colors.white, fontSize: 14.0)), + child: Text(model.count.toString(), style: TextStyle(color: Colors.white, fontSize: 14.0)), ), ), ), @@ -100,12 +88,7 @@ class BottomNavigationItem extends StatelessWidget { height: 15, ), Container( - child: Icon( - currentIndex == index ? activeIcon : icon, - color: currentIndex == index - ? secondaryColor - : Theme.of(context).dividerColor, - size: 22.0), + child: Icon(currentIndex == index ? activeIcon : icon, color: currentIndex == index ? secondaryColor : Theme.of(context).dividerColor, size: 22.0), ), SizedBox( height: 2, @@ -113,9 +96,7 @@ class BottomNavigationItem extends StatelessWidget { Texts( name, textAlign: TextAlign.center, - color: currentIndex == index - ? Theme.of(context).primaryColor - : Colors.grey, + color: currentIndex == index ? Theme.of(context).primaryColor : Colors.grey, fontSize: 11, ), SizedBox( @@ -133,12 +114,7 @@ class BottomNavigationItem extends StatelessWidget { height: 15, ), Container( - child: Icon( - currentIndex == index ? activeIcon : icon, - color: currentIndex == index - ? secondaryColor - : Theme.of(context).dividerColor, - size: 22.0), + child: Icon(currentIndex == index ? activeIcon : icon, color: currentIndex == index ? secondaryColor : isDisabled ? Colors.grey[300] : Theme.of(context).dividerColor, size: 22.0), ), SizedBox( height: 2, @@ -146,9 +122,7 @@ class BottomNavigationItem extends StatelessWidget { Texts( name, textAlign: TextAlign.center, - color: currentIndex == index - ? secondaryColor - : Colors.grey, + color: currentIndex == index ? secondaryColor : isDisabled ? Colors.grey[300] : Colors.grey, fontSize: 11, ), SizedBox( diff --git a/lib/widgets/buttons/button.dart b/lib/widgets/buttons/button.dart index 99abad84..84f3cca6 100644 --- a/lib/widgets/buttons/button.dart +++ b/lib/widgets/buttons/button.dart @@ -10,15 +10,7 @@ import 'package:provider/provider.dart'; /// [loading] show the progress indicator /// [elevation] color elevation value class Button extends StatefulWidget { - Button( - {Key key, - this.label: "", - this.icon, - this.onTap, - this.backgroundColor, - this.loading: false, - this.elevation: true, this.disabled=false}) - : super(key: key); + Button({Key key, this.label: "", this.icon, this.onTap, this.backgroundColor, this.loading: false, this.elevation: true, this.disabled = false}) : super(key: key); final String label; final Widget icon; @@ -37,17 +29,11 @@ class _ButtonState extends State