Merge branch 'development_new_design_2.0' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan_new_design

merge-update-with-lab-changes
Sultan Khan 4 years ago
commit 54ac31a74c

@ -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": "اعرض قائمة الأطباء"}
};

@ -2,5 +2,5 @@ extension CapExtension on String {
String get toCamelCase => "${this[0].toUpperCase()}${this.substring(1)}";
String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}';
String get allInCaps => this.toUpperCase();
String get capitalizeFirstofEach => this.length > 0 ? this.split(" ").map((str) => str.inCaps).join(" ") : "";
String get capitalizeFirstofEach => this.trim().length > 0 ? this.trim().toLowerCase().split(" ").map((str) => str.inCaps).join(" ") : "";
}

@ -86,14 +86,30 @@ class _HospitalsPageState extends State<HospitalsPage> {
Expanded(
child: Padding(
padding: EdgeInsets.only(left: 12, right: 12),
child: Text(
_location.locationName?.trim() ?? "",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
child: Column(
children: [
Text(
_location.locationName?.trim() ?? "",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
),
Text(
TranslationBase.of(context).km+" "+ _location.distanceInKilometers.toString() ?? "",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
),
],
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
),
),
), //model.cOCItemList[index].cOCTitl

@ -105,7 +105,7 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
),
),
SizedBox(
height: 4,
height: 2,
),
Text(
_location.cityName?.trim() ?? "",
@ -116,6 +116,18 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
letterSpacing: -0.56,
),
),
SizedBox(
height: 2,
),
Text(
TranslationBase.of(context).km+" "+ _location.distanceInKilometers.toString() ?? "",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
),
],
),
),

@ -6,12 +6,15 @@ import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCe
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.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.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.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:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart';
@ -34,6 +37,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
List<ImagesInfo> imagesInfo = List();
DriveThroughTestingCenterModel selectedProject;
final GlobalKey locationDropdownKey = GlobalKey();
ProjectViewModel projectViewModel;
@ -61,167 +65,187 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
imagesInfo: imagesInfo,
description: TranslationBase.of(context).covidInfo,
isShowDecPage: true,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0),
child: Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 22.0, color: Colors.black)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 16.0, color: Colors.black)),
),
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.grey[700])),
),
Container(
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(
color: Colors.grey[400],
width: 1.0,
),
borderRadius: BorderRadius.circular(10),
),
padding: EdgeInsets.all(8.0),
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(top: 15.0),
child: DropdownButtonHideUnderline(
child: DropdownButton<DriveThroughTestingCenterModel>(
hint: new Text(TranslationBase.of(context).selectAddress),
value: selectedProject,
items: projectsList.map((DriveThroughTestingCenterModel item) {
return new DropdownMenuItem<DriveThroughTestingCenterModel>(
value: item,
child: new Text(item.projectName),
);
}).toList(),
onChanged: (newValue) {
setState(() {
selectedProject = newValue;
setProjectLocation(newValue);
});
},
),
)),
isLocationSelected
? Container(
margin: EdgeInsets.only(top: 15.0),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.black)),
)
: Container(),
isLocationSelected
? Container(
margin: EdgeInsets.only(top: 5.0),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey[400], width: 1.0),
),
child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" +
this.projectLat +
"," +
this.projectLong +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
this.projectLat +
"," +
this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
)
: SizedBox(
height: MediaQuery.of(context).size.height * 0.35,
),
Container(
height: MediaQuery.of(context).size.height * 0.15,
width: double.infinity,
showNewAppBarTitle: true,
showNewAppBar: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Container(
child: Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 10.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.91,
height: 45.0,
child: RaisedButton(
color: new Color(0xFFc5272d),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.red[300],
onPressed: () {
getDirections();
},
child: Text(TranslationBase.of(context).getDirections, style: TextStyle(fontSize: 18.0)),
),
),
),
Container(
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
child: Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.grey[500],
onPressed: () {
back();
},
child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 18.0)),
),
),
),
Padding(
padding: const EdgeInsets.only(left: 14, right: 14),
child: Column(
children: [
Container(
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, color: Colors.black, letterSpacing: -1.14)),
),
Container(
margin: EdgeInsets.only(top: 6.0),
child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 14.0, color: Colors.black, letterSpacing: -0.56)),
),
Expanded(
flex: 1,
InkWell(
onTap: () {
// dropdownKey.currentState;
// openDropdown(clinicDropdownKey);
},
child: Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.grey[500],
onPressed: () {
next();
},
child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)),
),
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
margin: EdgeInsets.only(top: 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12),
child: Row(
children: [
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).selectLocation,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
height: 18,
child: DropdownButtonHideUnderline(
child: DropdownButton<DriveThroughTestingCenterModel>(
onTap: () {
print("Clicked");
},
key: locationDropdownKey,
hint: new Text(
TranslationBase.of(context).selectAddress,
),
value: selectedProject,
iconSize: 0,
isExpanded: true,
style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
items: projectsList.map((DriveThroughTestingCenterModel item) {
return new DropdownMenuItem<DriveThroughTestingCenterModel>(
value: item,
child: new Text(item.projectName),
);
}).toList(),
onChanged: (newValue) {
setState(() {
selectedProject = newValue;
setProjectLocation(newValue);
});
},
),
),
),
],
),
),
Icon(Icons.keyboard_arrow_down),
],
),
),
),
],
),
),
mHeight(20),
isLocationSelected
? Stack(
children: [
Container(
margin: EdgeInsets.only(top: 5.0),
child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" +
this.projectLat +
"," +
this.projectLong +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
this.projectLat +
"," +
this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
InkWell(
onTap: () {
getDirections();
},
child: Card(
shape: cardRadius(1000),
elevation: 4,
margin: EdgeInsets.all(12),
child: Padding(
padding: const EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6),
child: Row(
children: [
SvgPicture.asset(
"assets/images/new/blood_pressure.svg",
width: 18,
height: 18,
),
mWidth(6),
Text(
TranslationBase.of(context).getDirections,
style: TextStyle(
color: Colors.black,
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
)
],
),
),
),
),
],
),
],
)
: SizedBox(
height: MediaQuery.of(context).size.height * 0.35,
),
mHeight(12),
],
),
),
],
),
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: CustomColors.accentColor,
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: CustomColors.accentColor,
onPressed: () {
next();
},
child: Text(
TranslationBase.of(context).next,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
letterSpacing: -0.44,
),
),
),
)),
],
),
);
}

@ -0,0 +1,115 @@
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: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 ?? "", 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, insuranceApprovalModel?.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: [
TableRow(
children: [
Utils.tableColumnTitle(TranslationBase.of(context).procedure),
Utils.tableColumnTitle(TranslationBase.of(context).status),
Utils.tableColumnTitle(TranslationBase.of(context).usageStatus)
],
),
TableRow(
children: [
Utils.tableColumnValue(insuranceApprovalModel?.apporvalDetails?.procedureName ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(insuranceApprovalModel?.approvalStatusDescption ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(insuranceApprovalModel?.apporvalDetails?.isInvoicedDesc.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel),
],
),
])
],
),
),
),
);
}
}

@ -1,14 +1,19 @@
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,295 +29,142 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
@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
.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png'));
return BaseView<InsuranceViewModel>(
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: <Widget>[
Container(
width: double.infinity,
height: SizeConfig.screenHeight * 0.09,
color: Color(0xffEEEEEE),
builder: (BuildContext _context, InsuranceViewModel model, Widget child) => AppScaffold(
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),
physics: BouncingScrollPhysics(),
itemBuilder: (_, index) {
Color _patientStatusColor;
String _patientStatusString;
if (model.insuranceApproval[index].isLiveCareAppointment) {
_patientStatusColor = Color(0xff2E303A);
_patientStatusString = TranslationBase.of(context).liveCare.capitalizeFirstofEach;
} else if (!model.insuranceApproval[index].isInOutPatient) {
_patientStatusColor = Color(0xffD02127);
_patientStatusString = TranslationBase.of(context).inPatient.capitalizeFirstofEach;
} else {
_patientStatusString = TranslationBase.of(context).outpatient.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: <Widget>[
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: <Widget>[
ExpansionTile(
title: Container(
//height: 120.0,
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
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: <Widget>[
Padding(
padding: EdgeInsets.symmetric(vertical: 12.0, horizontal: 12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
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: <Widget>[
Expanded(
flex: 1,
child: Column(
children: <Widget>[
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: <Widget>[
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: <Widget>[
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)),
);
}

@ -153,7 +153,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
width: double.infinity,
height: MediaQuery.of(context).size.width * 0.26,
child: ListView.separated(
itemCount: 4,
itemCount: 5,
padding: EdgeInsets.zero,
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
@ -163,13 +163,13 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
child: myMedicalList[index],
width: MediaQuery.of(context).size.width * 0.26,
height: MediaQuery.of(context).size.width * 0.26,
margin: EdgeInsets.only(left: index == 3 ? 20 : 0, right: index == 0 ? 20 : 0),
margin: EdgeInsets.only(left: index == 4 ? 20 : 0, right: index == 0 ? 20 : 0),
)
: Container(
child: myMedicalList[index],
width: MediaQuery.of(context).size.width * 0.26,
height: MediaQuery.of(context).size.width * 0.26,
margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 3 ? 20 : 0),
margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 4 ? 20 : 0),
);
},
separatorBuilder: (BuildContext context, int index) {

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog_prescription.dart';
@ -13,6 +14,7 @@ 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 PrescriptionDetailsPage extends StatelessWidget {
final PrescriptionReport prescriptionReport;
@ -21,6 +23,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
@ -97,7 +100,24 @@ class PrescriptionDetailsPage extends StatelessWidget {
],
),
SizedBox(height: 12),
Table(children: fullData(context)),
Table(children: [
TableRow(
children: [
Utils.tableColumnTitle(TranslationBase.of(context).route),
Utils.tableColumnTitle(TranslationBase.of(context).frequency),
Utils.tableColumnTitle(TranslationBase.of(context).dailyDoses),
Utils.tableColumnTitle(TranslationBase.of(context).duration)
],
),
TableRow(
children: [
Utils.tableColumnValue(prescriptionReport?.routeN ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(prescriptionReport?.frequencyN ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(prescriptionReport?.doseDailyQuantity.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(prescriptionReport?.days.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel),
],
),
]),
Text(
TranslationBase.of(context).remarks,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48),
@ -183,29 +203,4 @@ class PrescriptionDetailsPage extends StatelessWidget {
),
);
}
List<TableRow> fullData(context) {
List<TableRow> tableRow = [];
tableRow.add(
TableRow(
children: [
Utils.tableColumnTitle(TranslationBase.of(context).route),
Utils.tableColumnTitle(TranslationBase.of(context).frequency),
Utils.tableColumnTitle(TranslationBase.of(context).dailyDoses),
Utils.tableColumnTitle(TranslationBase.of(context).duration)
],
),
);
tableRow.add(
TableRow(
children: [
Utils.tableColumnValue(prescriptionReport?.routeN ?? '', isLast: true),
Utils.tableColumnValue(prescriptionReport?.frequencyN ?? '', isLast: true),
Utils.tableColumnValue(prescriptionReport?.doseDailyQuantity.toString() ?? '', isLast: true),
Utils.tableColumnValue(prescriptionReport?.days.toString() ?? '', isLast: true),
],
),
);
return tableRow;
}
}

@ -84,98 +84,105 @@ class PrescriptionItemsPage extends StatelessWidget {
margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4),
shape: cardRadius(12),
child: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 20, left: 20, right: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
padding: EdgeInsets.only(top: 12, bottom: 20, left:projectViewModel.isArabic? 12:20, right: projectViewModel.isArabic? 20:12),
child: Row(
children: [
Text(
model.prescriptionReportListINP[index].itemDescription.isNotEmpty
? model.prescriptionReportListINP[index].itemDescription
: model.prescriptionReportListINP[index].itemDescriptionN ?? '',
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
mHeight(10),
Row(
children: [
Container(
child: Card(
child: Image.network(
model.prescriptionReportListINP[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 60,
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
model.prescriptionReportListINP[index].itemDescription.isNotEmpty
? model.prescriptionReportListINP[index].itemDescription
: model.prescriptionReportListINP[index].itemDescriptionN ?? '',
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
shape: cardRadius(2000),
),
clipBehavior: Clip.antiAlias,
decoration: containerColorRadiusBorderWidth(Colors.white, 200, Colors.grey[200], 1),
),
mWidth(12),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
TranslationBase.of(context).route + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
mHeight(10),
Row(
children: [
Container(
child: Card(
child: Image.network(
model.prescriptionReportListINP[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 60,
),
margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
shape: cardRadius(2000),
),
Text(
model.prescriptionReportListINP[index].route,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
clipBehavior: Clip.antiAlias,
decoration: containerColorRadiusBorderWidth(Colors.white, 200, Colors.grey[200], 1),
),
mWidth(12),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
TranslationBase.of(context).route + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
Text(
model.prescriptionReportListINP[index].route,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
),
],
),
Row(
children: [
Text(
TranslationBase.of(context).dailyDoses + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
Row(
children: [
Text(
TranslationBase.of(context).dailyDoses + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
Text(
model.prescriptionReportListINP[index].doseDailyQuantity.toString(),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
),
Text(
model.prescriptionReportListINP[index].doseDailyQuantity.toString(),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
mHeight(12),
Text(
model.prescriptionReportListINP[index].remarks,
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
),
],
),
mHeight(12),
Text(
model.prescriptionReportListINP[index].remarks,
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
],
)
],
],
)
],
),
],
),
),
Icon(Icons.arrow_forward_ios,size: 16,),
],
),
),
@ -231,61 +238,68 @@ class PrescriptionItemsPage extends StatelessWidget {
],
),
child: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 20, left: 20, right: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
padding: EdgeInsets.only(top: 12, bottom: 20, left:projectViewModel.isArabic? 12:20, right: projectViewModel.isArabic? 20:12),
child: Row(
children: [
Text(
(model.prescriptionReportEnhList[index].itemDescription.isNotEmpty
? model.prescriptionReportEnhList[index].itemDescription
: model.prescriptionReportEnhList[index].itemDescriptionN ?? '')
.toLowerCase()
.capitalizeFirstofEach,
style: TextStyle(
fontSize: 16,
color: Color(0xff2E303A),
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
mHeight(10),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Card(
child: Image.network(
model.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 48,
height: 48,
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
(model.prescriptionReportEnhList[index].itemDescription.isNotEmpty
? model.prescriptionReportEnhList[index].itemDescription
: model.prescriptionReportEnhList[index].itemDescriptionN ?? '')
.toLowerCase()
.capitalizeFirstofEach,
style: TextStyle(
fontSize: 16,
color: Color(0xff2E303A),
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
shape: cardRadius(2000),
),
mWidth(12),
Expanded(
child: Column(
mHeight(10),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
myRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route, projectViewModel.isArabic),
myRichText(
TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(), projectViewModel.isArabic),
mHeight(9),
Text(
model.prescriptionReportEnhList[index].remarks,
style: TextStyle(
color: Color(0xff575757),
fontSize: 12,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
Card(
child: Image.network(
model.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 48,
height: 48,
),
margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
shape: cardRadius(2000),
),
mWidth(12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
myRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route, projectViewModel.isArabic),
myRichText(
TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(), projectViewModel.isArabic),
mHeight(9),
Text(
model.prescriptionReportEnhList[index].remarks,
style: TextStyle(
color: Color(0xff575757),
fontSize: 12,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
],
),
)
],
),
)
],
],
),
),
Icon(Icons.arrow_forward_ios,size: 16,),
],
),
),

@ -1,13 +1,17 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/BottomButton.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PrescriptionsHistoryDetailsPage extends StatelessWidget {
final PrescriptionsOrder prescriptionsOrder;
@ -16,138 +20,174 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PrescriptionsViewModel>(
onModelReady: (model) => model.getPrescriptionReportEnh(
prescriptionsOrder: prescriptionsOrder),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).orderDetails,
baseViewModel: model,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.all(15.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
),
Container(
width: double.infinity,
decoration: BoxDecoration(
color: prescriptionsOrder.status == 3 ?Colors.green : prescriptionsOrder.status ==2 ? Colors.grey: Colors.red,
borderRadius: BorderRadius.circular(5)),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(TranslationBase.of(context).orderStatus +' : ${prescriptionsOrder.descriptionN}',color: Colors.white,),
)),
SizedBox(
height: 15,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
outside: BorderSide(width: 0.5)),
children: [
TableRow(children: [
Container(
height: 50,
color: Colors.white,
child: Center(
child: Texts(TranslationBase.of(context).orderNo),
),
),
Container(
height: 50,
color: Colors.white,
child: Center(
child: Texts(TranslationBase.of(context).date),
),
),
]),
TableRow(children: [
Container(
height: 70,
color: Colors.white,
child: Center(
child: Texts('${prescriptionsOrder.iD}'),
),
),
Container(
height: 70,
color: Colors.white,
child: Center(
child: Texts('${prescriptionsOrder.createdOn.year}-${prescriptionsOrder.createdOn.day}-${prescriptionsOrder.createdOn.day} ${prescriptionsOrder.createdOn.hour}:${prescriptionsOrder.createdOn.minute}'),
onModelReady: (model) => model.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder),
builder: (_, model, widget) {
int status = prescriptionsOrder.status;
String _statusDisp = projectViewModel.isArabic ? prescriptionsOrder.descriptionN : prescriptionsOrder.description;
Color _color;
if (status == 1) {
//pending
_color = Color(0xffCC9B14);
} else if (status == 2) {
//processing
_color = Color(0xff2E303A);
} else if (status == 3) {
//completed
_color = Color(0xff359846);
} else if (status == 4) {
//cancel // Rejected
_color = Color(0xffD02127);
}
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).orderDetails,
baseViewModel: model,
showNewAppBar: true,
backgroundColor: Color(0xffF8F8F8),
showNewAppBarTitle: true,
body: Column(
children: [
Expanded(
child: ListView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.all(21),
children: <Widget>[
Container(
decoration: BoxDecoration(
color: _color,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
),
])
],
),
SizedBox(
height: 15,
),
...List.generate(
model.prescriptionReportEnhList.length,
(index) => Container(
margin: EdgeInsets.all(8.0),
color: Colors.white,
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
child: Container(
margin: EdgeInsets.only(left: 6),
padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12),
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(10.0),
topRight: Radius.circular(10.0),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(model.prescriptionReportEnhList[index]
.itemDescription),
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_statusDisp,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10),
),
Text(
'${TranslationBase.of(context).orderNo}. ${prescriptionsOrder.iD}',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
],
),
),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.formatDateToDate(prescriptionsOrder.createdOn, projectViewModel.isArabic),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
Text(
DateUtil.formatDateToTime(prescriptionsOrder.createdOn),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
],
)
],
),
),
SizedBox(height: 16),
ListView.separated(
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) => Row(
children: <Widget>[
Container(
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(
model.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 48,
height: 48,
),
),
),
SizedBox(width: 14),
Expanded(
child: Text(
(model.prescriptionReportEnhList[index].itemDescription.isNotEmpty
? model.prescriptionReportEnhList[index].itemDescription
: model.prescriptionReportEnhList[index].itemDescriptionN ?? '')
.toLowerCase()
.capitalizeFirstofEach,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
),
)
],
),
separatorBuilder: (context, index) => SizedBox(height: 12),
itemCount: model.prescriptionReportEnhList.length)
],
),
],
),
),
),
],
),
SizedBox(height: 120,)
],
),
),
),
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);
},
),
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).cancelOrder,
prescriptionsOrder.status != 1
? null
: () {
showCDialog(model, context);
},
disabledColor: Color(0xff575757),
),
),
],
),
),
),
);
},
);
}
showCDialog(PrescriptionsViewModel model,context){
showCDialog(PrescriptionsViewModel model, context) {
ConfirmDialog(
context: context,
confirmMessage: "Are you sure ?",
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel,
okFunction: () {
okFunction: () {
Navigator.of(context).pop();
model.updatePressOrder(presOrderID: prescriptionsOrder.iD).then((value) {
Navigator.of(context).pop();
@ -156,5 +196,4 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
cancelFunction: () => {}).showAlertDialog(context);
// dialog.showAlertDialog(context);
}
}

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -77,14 +78,17 @@ class PrescriptionsHistoryPage extends StatelessWidget {
decoration: BoxDecoration(
color: _color,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
bottomLeft: Radius.circular(10.0),
topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
bottomLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight:projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
bottomRight:projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
),
),
),
Expanded(
child: Padding(
padding: EdgeInsets.only(left: 12, right: 12),
padding: EdgeInsets.only(left: projectViewModel.isArabic?6:12, right: projectViewModel.isArabic?12:6),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
@ -122,7 +126,9 @@ class PrescriptionsHistoryPage extends StatelessWidget {
],
),
),
)
),
Icon(Icons.arrow_forward_ios,size: 16,),
mWidth(6),
],
),
));

@ -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<TranslationBase> {

@ -572,19 +572,6 @@ class Utils {
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(6)
? Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
)
: null,
child:
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
child: MedicalProfileItem(
@ -595,31 +582,6 @@ class Utils {
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(25)
? Navigator.push(
context,
FadePage(page: VitalSignDetailsScreen()),
)
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).vitalSigns,
imagePath: 'vital_signs.png',
subTitle: TranslationBase.of(context).vitalSignsSubtitle,
isEnable: projectViewModel.havePrivilege(25),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myMedical,
imagePath: 'active_medications.png',
subTitle: TranslationBase.of(context).myMedicalSubtitle,
isEnable: false,
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(6)
? Navigator.push(
@ -629,196 +591,10 @@ class Utils {
),
)
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myDoctor, imagePath: 'doctor_icon.png', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myInvoice,
imagePath: 'Invoice.png',
subTitle: TranslationBase.of(context).invoicesList,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement_icon.png',
subTitle: TranslationBase.of(context).eyeSubtitle,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(22) ? Navigator.push(context, FadePage(page: InsuranceCard())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context).insuranceSubtitle,
isEnable: projectViewModel.havePrivilege(22),
),
));
medical.add(InkWell(
onTap: () {
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).updateInsurance,
imagePath: 'insurance_update_icon_.png',
subTitle: TranslationBase.of(context).updateInsuranceSubtitle,
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insuranceApproval,
imagePath: 'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context).insuranceApprovalSubtitle,
isEnable: projectViewModel.havePrivilege(18),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).allergies,
imagePath: 'my_allergies_icon.png',
subTitle: TranslationBase.of(context).allergiesSubtitle,
isEnable: projectViewModel.havePrivilege(23),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myVaccines,
imagePath: 'my_vaccines_icon.png',
subTitle: TranslationBase.of(context).myVaccinesSubtitle,
isEnable: projectViewModel.havePrivilege(26),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png',
subTitle: TranslationBase.of(context).medicalSubtitle,
isEnable: projectViewModel.havePrivilege(20),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).monthly,
imagePath: 'monthly_reports_icon.png',
subTitle: TranslationBase.of(context).monthlySubtitle,
isEnable: projectViewModel.havePrivilege(19),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).sick,
imagePath: 'sick_leaves_icons.png',
subTitle: TranslationBase.of(context).sickSubtitle,
isEnable: projectViewModel.havePrivilege(16),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myBalance,
imagePath: 'check-in.png',
subTitle: TranslationBase.of(context).myBalanceSubtitle,
isEnable: projectViewModel.havePrivilege(47),
),
));
// TODO mosa check it
medical.add(MedicalProfileItem(
title: TranslationBase.of(context).patientCall,
imagePath: 'medical_history_icon.png',
subTitle: TranslationBase.of(context).patientCallSubtitle,
isEnable: projectViewModel.havePrivilege(61),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myTrackers,
imagePath: 'my_tracker_icon.png',
subTitle: TranslationBase.of(context).myTrackersSubtitle,
isEnable: projectViewModel.havePrivilege(24),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatches,
imagePath: 'smartwatch_icon.png',
subTitle: TranslationBase.of(context).smartWatchesSubtitle,
isEnable: projectViewModel.havePrivilege(30),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor_icon.png', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)),
child:
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell(
onTap: () {
if (projectViewModel.isLogin) {
userData().then((userData_) {
String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
});
} else {
Navigator.push(
context,
FadePage(
page: NotAutPage(
title: TranslationBase.of(context).autoWifi,
description: TranslationBase.of(context).infoAutoWifi,
infoList: [],
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/ar/0.png'),
],
)));
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).internet,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context).internetSubtitle,
),
));
}
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).chatbot,
imagePath: 'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context).chatbotSubtitle,
isEnable: projectViewModel.havePrivilege(40),
),
));
return medical;
}
@ -865,8 +641,8 @@ class Utils {
);
}
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true}) {
ProjectViewModel projectViewModel = Provider.of(AppGlobal.context);
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, ProjectViewModel mProjectViewModel}) {
ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,

Loading…
Cancel
Save