diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 10d8d078..f6704eac 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -236,14 +236,16 @@ const Map localizedValues = { "delete-view": {"en": "Delete", "ar": "حذف"}, // "my-family": {"en": "MY FAMILY", "ar": "عائلتي"}, "approvals": {"en": "Approvals", "ar": "موافقات التأمين"}, - "approvalNo": {"en": "Approval No.: ", "ar": "رقم الموافقة: "}, - "companyName": {"en": "Company Name ", "ar": "اسم الشركة: "}, - "receiptOn": {"en": "Receipt on: ", "ar": "تاريخ الفاتورة: "}, - "expiryDate": {"en": "Expiry Date: ", "ar": "تاريخ الانتهاء: "}, + "approvalNo": {"en": "Approval No:", "ar": "رقم الموافقة: "}, + "companyName": {"en": "Company Name", "ar": "اسم الشركة: "}, + "receiptOn": {"en": "Receipt on:", "ar": "تاريخ الفاتورة: "}, + "expiryDate": {"en": "Expiry Date:", "ar": "تاريخ الانتهاء: "}, + "expiryOn": {"en": "Expiry on:", "ar": "تاريخ الانتهاء: "}, "procedureName": {"en": "Procedure Name:", "ar": "اسم الاجراء:"}, + "procedure": {"en": "Procedure", "ar": "اسم الاجراء:"}, "procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"}, "usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"}, - "unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "}, + "unusedCount": {"en": "Unused Count:", "ar": "غير مستخدم: "}, "totalApproval": {"en": "Total approval unused", "ar": "اجمالي الموافقات الغير مستخدمة"}, "category": {"en": "Category: ", "ar": "الفئة"}, "expirationDate": {"en": "Expiration Date: ", "ar": "تاريخ الانتهاء"}, @@ -487,7 +489,7 @@ const Map localizedValues = { "products": {"en": "Products", "ar": "المنتجات"}, "reviews": {"en": "Reviews", "ar": "التقيمات"}, "brands": {"en": "Brands", "ar": "العلامات التجارية"}, - "productDetails": {"en": "Product Details", "ar": "تفاصيل المنتج"}, + "productDetails": {"en": "Product Details", "ar": "تفاصيل المنتج"}, // "medicationRefill": {"en": "Medication Refill", "ar": "تعبئة الأدوية"}, "pillReminder": {"en": "Pill Reminder", "ar": "تذكير الأدويه"}, "shippingAddresses": {"en": "Shipping Addresses", "ar": "عناوين الشحن"}, @@ -613,10 +615,7 @@ const Map localizedValues = { "select-age": {"en": "Select Your Age", "ar": "حدد العمر"}, "i-am": {"en": "I am", "ar": "أنا"}, "years-old": {"en": "years old", "ar": "سنة"}, - "drag-point": { - "en": "Drag point to change your age", - "ar": "اسحب لتغيير عمرك" - }, + "drag-point": {"en": "Drag point to change your age", "ar": "اسحب لتغيير عمرك"}, "refine": {"en": "Refine", "ar": "refine"}, "reset": {"en": "Reset", "ar": "اعادة تعيين"}, "apply": {"en": "Apply", "ar": "تطبيق"}, @@ -626,10 +625,7 @@ const Map localizedValues = { "myAccount": {"en": "My Account", "ar": "حسابي"}, "cart": {"en": "Cart", "ar": "التسوق"}, "Alhabibapp": {"en": "Al habib app", "ar": "تطبيق الحبيب"}, - "searchProductHere": { - "en": "Search Product here", - "ar": "البحث عن منتج" - }, + "searchProductHere": {"en": "Search Product here", "ar": "البحث عن منتج"}, "HHCNotAuthMsg": { "en": "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.", @@ -1291,7 +1287,12 @@ const Map localizedValues = { "verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"}, "select-location": {"en": "Select Location", "ar": "اختر موقعا"}, "result-header": {"en": "Get the result in Few Hours", "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 الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية" }, + "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": "يرجى اختيار أحد المواعيد المتاحة من أدناه:"}, "covid-alert-header": {"en": "Pay With-in 15 mins to confirm the appointment", "ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد"}, "covid-alert-info": { @@ -1482,24 +1483,27 @@ const Map localizedValues = { "online-clinics": {"en": "Online Clinics: ", "ar": "​العيادات المفتوحة: "}, "offline-clinics": {"en": "Offline Clinics: ", "ar": "العيادات المغلقة: "}, "clinic-schedule": {"en": "Clinic Schedule", "ar": "جدول العيادة"}, - "discount": { "en": "Discount:", "ar": "الخصم:" }, - "total-VAT": { "en": "VAT", "ar": "القيمة المضافة" }, - "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 لتسجيل الوصول" }, - "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 يوما : " }, - "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.", "ar": "مبروك, أنت حامل! الآن متى سيصل الطفل؟ لتقدير موعد الولادة, ادخل تاريخ بداية آخر دورة شهرية (اليوم الأول), ثم اضغط على الحساب" }, - "pregnancy-date-label": { "en": "What was the date of the first day of the last period?", "ar": "ما هو تاريخ أول يوم من أخر دورة شهرية ؟" }, - "ovulation-period": { "en": "The next ovulation period is estimated to be: ", "ar": "تقدر فترة الاباضة القادمة " }, - "from": { "en": "From: ", "ar": "من:" }, - "to": { "en": "To: ", "ar": "الى:" }, - "conceive": { "en": "You have conceived on: ", "ar": " تاريخ بداية الحمل" }, - "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": "اعرض قائمة الأطباء" } + "discount": {"en": "Discount:", "ar": "الخصم:"}, + "total-VAT": {"en": "VAT", "ar": "القيمة المضافة"}, + "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 لتسجيل الوصول"}, + "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 يوما : "}, + "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.", + "ar": "مبروك, أنت حامل! الآن متى سيصل الطفل؟ لتقدير موعد الولادة, ادخل تاريخ بداية آخر دورة شهرية (اليوم الأول), ثم اضغط على الحساب" + }, + "pregnancy-date-label": {"en": "What was the date of the first day of the last period?", "ar": "ما هو تاريخ أول يوم من أخر دورة شهرية ؟"}, + "ovulation-period": {"en": "The next ovulation period is estimated to be: ", "ar": "تقدر فترة الاباضة القادمة "}, + "from": {"en": "From: ", "ar": "من:"}, + "to": {"en": "To: ", "ar": "الى:"}, + "conceive": {"en": "You have conceived on: ", "ar": " تاريخ بداية الحمل"}, + "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": "اعرض قائمة الأطباء"} }; diff --git a/lib/pages/insurance/insurance_approval_detail_screen.dart b/lib/pages/insurance/insurance_approval_detail_screen.dart new file mode 100644 index 00000000..d91c266e --- /dev/null +++ b/lib/pages/insurance/insurance_approval_detail_screen.dart @@ -0,0 +1,124 @@ +import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class InsuranceApprovalDetail extends StatelessWidget { + final InsuranceApprovalModel insuranceApprovalModel; + InsuranceApprovalDetail({Key key, this.insuranceApprovalModel}) : super(key: key); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).insuranceApproval, + description: TranslationBase.of(context).infoApprovals, + infoList: TranslationBase.of(context).infoApprovalPoints, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + child: Container( + padding: EdgeInsets.fromLTRB(16, 12, 16, 12), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + insuranceApprovalModel.approvalStatusDescption, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: insuranceApprovalModel.status == 9 ? Color(0xff359846) : Color(0xffD02127), letterSpacing: -0.4, height: 18 / 10), + ), + Text( + insuranceApprovalModel.doctorName, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), + ), + SizedBox(height: 6), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + LargeAvatar( + name: insuranceApprovalModel.doctorName, + url: insuranceApprovalModel.doctorImageURL, + width: 48, + height: 48, + ), + SizedBox(width: 12), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + myRichText(TranslationBase.of(context).clinic + ":", insuranceApprovalModel?.clinicName.toLowerCase().capitalizeFirstofEach ?? "", projectViewModel.isArabic), + myRichText(TranslationBase.of(context).approvalNo, insuranceApprovalModel?.approvalNo.toString() ?? "", projectViewModel.isArabic), + myRichText(TranslationBase.of(context).unusedCount, insuranceApprovalModel?.unUsedCount.toString() ?? "", projectViewModel.isArabic), + myRichText(TranslationBase.of(context).companyName, "", projectViewModel.isArabic), + SizedBox(height: 6), + myRichText(TranslationBase.of(context).receiptOn, + DateUtil.formatDateToDate(DateUtil.convertStringToDateTime(insuranceApprovalModel.receiptOn), projectViewModel.isArabic) ?? "", projectViewModel.isArabic), + myRichText(TranslationBase.of(context).expiryOn, + DateUtil.formatDateToDate(DateUtil.convertStringToDateTime(insuranceApprovalModel.expiryDate), projectViewModel.isArabic) ?? "", projectViewModel.isArabic), + ], + ), + ), + ], + ), + SizedBox(height: 21), + Table(columnWidths: { + 0: FlexColumnWidth(1.8), + 1: FlexColumnWidth(1), + 2: FlexColumnWidth(1), + }, children: fullData(context)) + ], + ), + ), + ), + ); + } + + List fullData(context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).procedure), + Utils.tableColumnTitle(TranslationBase.of(context).status), + Utils.tableColumnTitle(TranslationBase.of(context).usageStatus) + ], + ), + ); + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue(insuranceApprovalModel?.apporvalDetails?.procedureName ?? '', isLast: true), + Utils.tableColumnValue(insuranceApprovalModel?.approvalStatusDescption ?? '', isLast: true), + Utils.tableColumnValue(insuranceApprovalModel?.apporvalDetails?.isInvoicedDesc.toString() ?? '', isLast: true), + ], + ), + ); + return tableRow; + } +} diff --git a/lib/pages/insurance/insurance_approval_screen.dart b/lib/pages/insurance/insurance_approval_screen.dart index 195b6060..8c443113 100644 --- a/lib/pages/insurance/insurance_approval_screen.dart +++ b/lib/pages/insurance/insurance_approval_screen.dart @@ -1,14 +1,21 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; import '../base/base_view.dart'; +import 'insurance_approval_detail_screen.dart'; class InsuranceApproval extends StatefulWidget { int appointmentNo; @@ -24,6 +31,7 @@ class _InsuranceApprovalState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); imagesInfo .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png')); imagesInfo @@ -31,288 +39,133 @@ class _InsuranceApprovalState extends State { return BaseView( onModelReady: widget.appointmentNo != null ? (model) => model.getInsuranceApproval(appointmentNo: widget.appointmentNo) : (model) => model.getInsuranceApproval(), builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold( - isShowAppBar: true, - showNewAppBar: true, - baseViewModel: model, - showNewAppBarTitle: true, - appBarTitle: TranslationBase.of(context).approvals, - description: TranslationBase.of(context).infoApprovals, - infoList: TranslationBase.of(context).infoApprovalPoints, - imagesInfo: imagesInfo, - body: SingleChildScrollView( - child: Container( - margin: EdgeInsets.only( - left: SizeConfig.screenWidth * 0.004, - right: SizeConfig.screenWidth * 0.004, - top: SizeConfig.screenWidth * 0.04, - ), - child: Column( - children: [ - Container( - width: double.infinity, - height: SizeConfig.screenHeight * 0.09, - color: Color(0xffEEEEEE), + isShowAppBar: true, + showNewAppBar: true, + baseViewModel: model, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).insuranceApproval, + description: TranslationBase.of(context).infoApprovals, + infoList: TranslationBase.of(context).infoApprovalPoints, + imagesInfo: imagesInfo, + body: ListView.separated( + padding: EdgeInsets.all(21), + itemBuilder: (context, index) { + Color _patientStatusColor; + String _patientStatusString; + + if (model.insuranceApproval[index].isLiveCareAppointment) { + _patientStatusColor = Color(0xff2E303A); + _patientStatusString = TranslationBase.of(context).liveCare.toLowerCase().capitalizeFirstofEach; + } else if (!model.insuranceApproval[index].isInOutPatient) { + _patientStatusColor = Color(0xffD02127); + _patientStatusString = TranslationBase.of(context).inPatient.toLowerCase().capitalizeFirstofEach; + } else { + _patientStatusString = TranslationBase.of(context).outpatient.toLowerCase().capitalizeFirstofEach; + _patientStatusColor = Color(0xffa9a089); + } + return InkWell( + onTap: () { + Navigator.push(context, FadePage(page: InsuranceApprovalDetail(insuranceApprovalModel: model.insuranceApproval[index]))); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: _patientStatusColor), child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Texts( - TranslationBase.of(context).totalApproval, - color: Color(0xff60688B), - fontSize: 19.0, - fontWeight: FontWeight.w600, + children: [ + SizedBox( + width: 16, + child: RotatedBox( + quarterTurns: 3, + child: Text( + _patientStatusString, + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w700, color: Colors.white, letterSpacing: -0.2, height: 16 / 10), + ), + ), ), - if (model.insuranceApproval.length > 0) - Container( - width: 60, - height: 40, - decoration: BoxDecoration(color: Theme.of(context).primaryColor, borderRadius: BorderRadius.circular(19.0)), - child: Center( - child: Texts( - model.insuranceApproval[0].unUsedCount.toString(), - color: Colors.white, - fontSize: 17.0, + Expanded( + child: Container( + padding: EdgeInsets.fromLTRB(12, 10, 12, 10), + decoration: BoxDecoration( + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: Radius.circular(10.0), + topRight: Radius.circular(10.0), ), - )) - ], - )), - ...List.generate(model.insuranceApproval.length, (index) { - return RoundedContainer( - backgroundColor: Colors.white, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ExpansionTile( - title: Container( - //height: 120.0, + color: Colors.white), child: Column( crossAxisAlignment: CrossAxisAlignment.start, - children: [ - model.insuranceApproval[index].isLiveCareAppointment - ? sideBadge(TranslationBase.of(context).liveCare, 0xffA9A089) - : model.insuranceApproval[index].isInOutPatient - ? sideBadge(TranslationBase.of(context).outpatient, 0xff505a5d) - : sideBadge(TranslationBase.of(context).inPatient, 0xffb8372c), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.0), - child: Texts( - model.insuranceApproval[index].clinicName, - fontSize: 20.0, - color: Color(0xff60686B), - fontWeight: FontWeight.w600, - ), + children: [ + Text( + model.insuranceApproval[index].approvalStatusDescption, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: model.insuranceApproval[index].status == 9 ? Color(0xff359846) : Color(0xffD02127), + letterSpacing: -0.4, + height: 18 / 10), ), - Texts( + Text( model.insuranceApproval[index].doctorName, - fontSize: 17.0, - ), - ], - ), - ), - children: [ - Padding( - padding: EdgeInsets.symmetric(vertical: 12.0, horizontal: 12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Texts( - TranslationBase.of(context).approvalNo, - fontSize: 18.0, - ), - Texts( - model.insuranceApproval[index].approvalNo.toString(), - fontSize: 18.0, - fontWeight: FontWeight.w600, - ), - ], - ), - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, - ), - Row( - children: [ - Texts( - TranslationBase.of(context).procedureStatus, - fontSize: 17.5, - ), - SizedBox( - width: 12, - ), - Texts( - model.insuranceApproval[index].approvalStatusDescption, - fontWeight: FontWeight.w600, - fontSize: 17.5, - ), - ], - ), - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, - ), - Row( - children: [ - Texts( - TranslationBase.of(context).unusedCount, - fontSize: 17.5, - ), - Texts( - model.insuranceApproval[index].unUsedCount.toString(), - fontSize: 17.5, - fontWeight: FontWeight.w600, - ), - ], - ), - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, - ), -// Text( -// 'Company Name: ' + -// model.insuranceApproval[index] -// .companyName == -// null -// ? '000' -// : model -// .insuranceApproval[index].companyName, -// style: TextStyle( -// fontSize: 17.5, -// fontWeight: FontWeight.w600), -// ), - Texts( - TranslationBase.of(context).companyName, + style: TextStyle( + fontSize: 16, fontWeight: FontWeight.w600, - fontSize: 17.5, - ), - - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, + color: Color(0xff2E303A), + letterSpacing: -0.64, ), - Row( - children: [ - Texts( - TranslationBase.of(context).receiptOn, - fontSize: 17.5, - fontWeight: FontWeight.w600, - ), - Texts( - convertDateFormat(model.insuranceApproval[index].receiptOn), - fontSize: 17.5, - fontWeight: FontWeight.w600, - ), - ], - ), - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, - ), - Row( - children: [ - Texts( - TranslationBase.of(context).expiryDate, - fontSize: 17.5, - fontWeight: FontWeight.w600, - ), - Texts( - convertDateFormat(model.insuranceApproval[index].expiryDate), - fontSize: 17.5, - fontWeight: FontWeight.w600, + ), + SizedBox(height: 6), + Row( + children: [ + LargeAvatar( + name: model.insuranceApproval[index].doctorName, + url: model.insuranceApproval[index].doctorImageURL, + width: 48, + height: 48, + ), + SizedBox(width: 12), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + myRichText(TranslationBase.of(context).clinic + ":", model.insuranceApproval[index]?.clinicName.toLowerCase().capitalizeFirstofEach ?? "", + projectViewModel.isArabic), + myRichText(TranslationBase.of(context).approvalNo, model.insuranceApproval[index]?.approvalNo.toString() ?? "", projectViewModel.isArabic), + ], ), - ], - ), - Divider( - color: Colors.black, - height: 55.0, - thickness: 1.2, - ), - IntrinsicHeight( - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Column( - children: [ - Text(TranslationBase.of(context).procedureName), - Padding( - padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0), - child: Text( - model.insuranceApproval[index].apporvalDetails?.procedureName ?? '', - style: TextStyle(fontWeight: FontWeight.w600, fontSize: 15.5), - ), - ), - ], - ), - ), - VerticalDivider( - width: 10.0, - thickness: 1.2, - color: Colors.black, - ), - Expanded( - flex: 1, - child: Column( - children: [ - Text(TranslationBase.of(context).procedureStatus), - Padding( - padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0), - child: Text( - model.insuranceApproval[index].apporvalDetails?.status ?? '', - style: TextStyle(fontSize: 17.5, fontWeight: FontWeight.w600), - ), - ), - ], - ), - ), - VerticalDivider( - width: 2.3, - thickness: 1.2, - color: Colors.black, - ), - Expanded( - flex: 1, - child: Column( - children: [ - Text(TranslationBase.of(context).usageStatus), - Padding( - padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0), - child: Text( - model.insuranceApproval[index].apporvalDetails?.isInvoicedDesc ?? '', - style: TextStyle(fontWeight: FontWeight.w600, fontSize: 17.5), - ), - ), - ], - ), - ), - ], ), - ), - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, - ), - ], - ), + Container( + height: 48, + alignment: Alignment.bottomRight, + child: Icon( + Icons.visibility_sharp, + color: Color(0xff2E303A), + ), + ) + ], + ) + ], ), - ], + ), ), ], ), - ); - }), - ], - ), - ), - ), - ), + ), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 12), + itemCount: model.insuranceApproval.length)), ); } diff --git a/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart index 0d955cb6..e451c317 100644 --- a/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart @@ -176,19 +176,6 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget { ), ], ), - // bottomSheet: Container( - // //padding: EdgeInsets.all(8.0), - // // margin: EdgeInsets.all(8.0), - // child: BottomButton( - // label: TranslationBase.of(context).cancelOrder, - // disabled: prescriptionsOrder.status != 1, - // textColor: Colors.white, - // onTap: () { - // showCDialog(model, context); - // //showAlertDialog(context); - // }, - // ), - // ), ); }, ); diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index e4bdfac2..cd16c74b 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -510,10 +510,14 @@ class TranslationBase { String get receiptOn => localizedValues['receiptOn'][locale.languageCode]; + String get expiryOn => localizedValues['expiryOn'][locale.languageCode]; + String get expiryDate => localizedValues['expiryDate'][locale.languageCode]; String get procedureName => localizedValues['procedureName'][locale.languageCode]; + String get procedure => localizedValues['procedure'][locale.languageCode]; + String get procedureStatus => localizedValues['procedureStatus'][locale.languageCode]; String get usageStatus => localizedValues['usageStatus'][locale.languageCode]; @@ -909,14 +913,10 @@ class TranslationBase { String get productDetails => localizedValues['productDetails'][locale.languageCode]; String get noReviewsAvailable => localizedValues['noReviewsAvailable'][locale.languageCode]; String get noLocationAvailable => localizedValues['noLocationAvailable'][locale.languageCode]; - String get myPrescriptions => - localizedValues['myPrescriptions'][locale.languageCode]; - String get medicationRefill => - localizedValues['medicationRefill'][locale.languageCode]; - String get pillReminder => - localizedValues['pillReminder'][locale.languageCode]; - String get shippingAddresses => - localizedValues['shippingAddresses'][locale.languageCode]; + String get myPrescriptions => localizedValues['myPrescriptions'][locale.languageCode]; + String get medicationRefill => localizedValues['medicationRefill'][locale.languageCode]; + String get pillReminder => localizedValues['pillReminder'][locale.languageCode]; + String get shippingAddresses => localizedValues['shippingAddresses'][locale.languageCode]; String get reachUs => localizedValues['reachUs'][locale.languageCode]; String get ourLocations => localizedValues['ourLocations'][locale.languageCode]; @@ -1746,12 +1746,9 @@ class TranslationBase { String get addToCart => localizedValues['addToCart'][locale.languageCode]; String get addToWishlist => localizedValues['addToWishlist'][locale.languageCode]; String get buyNow => localizedValues['buyNow'][locale.languageCode]; - String get quantityShortcut => - localizedValues['quantityShortcut'][locale.languageCode]; - String get noData => - localizedValues['noData'][locale.languageCode]; - String get no_data => - localizedValues['no_data'][locale.languageCode]; + String get quantityShortcut => localizedValues['quantityShortcut'][locale.languageCode]; + String get noData => localizedValues['noData'][locale.languageCode]; + String get no_data => localizedValues['no_data'][locale.languageCode]; String get year => localizedValues['Year'][locale.languageCode]; @@ -2255,8 +2252,6 @@ class TranslationBase { String get thirdTri => localizedValues["thirdTri"][locale.languageCode]; String get seeDoctorsList => localizedValues["seeDoctorsList"][locale.languageCode]; - - } class TranslationBaseDelegate extends LocalizationsDelegate {