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

merge-requests/390/head
Sultan Khan 5 years ago
commit 4d00664045

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@ -1175,6 +1175,7 @@ const Map localizedValues = {
"generalHealth": {"en": "General Health", "ar": "صحة عامة"}, "generalHealth": {"en": "General Health", "ar": "صحة عامة"},
"womanHealth": {"en": "Women's Health", "ar": "صحة المرأة"}, "womanHealth": {"en": "Women's Health", "ar": "صحة المرأة"},
"bmi": {"en": "BMI", "ar": "الكتلة"}, "bmi": {"en": "BMI", "ar": "الكتلة"},
"bloodType": {"en": "Blood Type:", "ar": ":فصيلة الدم"},
"calc-health": {"en": "Calculators", "ar": "الصحية"}, "calc-health": {"en": "Calculators", "ar": "الصحية"},
"calories": {"en": "Calories", "ar": "سعرات"}, "calories": {"en": "Calories", "ar": "سعرات"},
"bmr": {"en": "BMR", "ar": "معدل الأيض القاعدي"}, "bmr": {"en": "BMR", "ar": "معدل الأيض القاعدي"},
@ -1334,9 +1335,9 @@ const Map localizedValues = {
"تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات  التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة" "تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات  التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة"
}, },
"MRN": {"en": "MRN", "ar": "ایم آر این"}, "MRN": {"en": "MRN", "ar": "ایم آر این"},
"appointment-date": {"en": "Appointment Date", "ar": "تقرری کی تاریخ"}, "appointment-date": {"en": "Appointment Date", "ar": "تاريخ الموعد"},
"appointment-no": {"en": "Appointment No", "ar": "تقرری نمبر"}, "appointment-no": {"en": "Appointment No", "ar": "رقم الموعد"},
"insurance-id": {"en": "Insurance ID", "ar": "انشورنس ID"}, "insurance-id": {"en": "Insurance ID", "ar": "رقم العضويه"},
"chiefComplaints": {"en": "Chief Complaints", "ar": "الشكوى الرئيسة"}, "chiefComplaints": {"en": "Chief Complaints", "ar": "الشكوى الرئيسة"},
"errorChiefComplaints": {"en": "Please Chief Complaints", "ar": "يرجى ادخال الشكوى الرئيسة"}, "errorChiefComplaints": {"en": "Please Chief Complaints", "ar": "يرجى ادخال الشكوى الرئيسة"},
"errorExpectedArrivalTimes": {"en": "Please Expected arrival time", "ar": "يرجى ادخال الوقت المتوقع للوصول"}, "errorExpectedArrivalTimes": {"en": "Please Expected arrival time", "ar": "يرجى ادخال الوقت المتوقع للوصول"},
@ -1466,4 +1467,24 @@ const Map localizedValues = {
"online-clinics": {"en": "Online Clinics: ", "ar": "​العيادات المفتوحة: "}, "online-clinics": {"en": "Online Clinics: ", "ar": "​العيادات المفتوحة: "},
"offline-clinics": {"en": "Offline Clinics: ", "ar": "العيادات المغلقة: "}, "offline-clinics": {"en": "Offline Clinics: ", "ar": "العيادات المغلقة: "},
"clinic-schedule": {"en": "Clinic Schedule", "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": "اعرض قائمة الأطباء" }
}; };

@ -23,12 +23,9 @@ class CMCService extends BaseService {
bool isOrderUpdated; bool isOrderUpdated;
Future getCMCAllServices() async { Future getCMCAllServices() async {
GetCMCServicesRequestModel getCMCServicesRequestModel = new GetCMCServicesRequestModel(genderID: user.gender, identificationNo: user.patientIdentificationNo);
GetCMCServicesRequestModel getCMCServicesRequestModel= new GetCMCServicesRequestModel(genderID: user.gender, identificationNo: user.patientIdentificationNo);
hasError = false; hasError = false;
await baseAppClient.post(HHC_GET_ALL_CMC_SERVICES, await baseAppClient.post(HHC_GET_ALL_CMC_SERVICES, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
cmcAllServicesList.clear(); cmcAllServicesList.clear();
response['PatientER_CMC_GetAllServicesList'].forEach((data) { response['PatientER_CMC_GetAllServicesList'].forEach((data) {
cmcAllServicesList.add(GetCMCServicesResponseModel.fromJson(data)); cmcAllServicesList.add(GetCMCServicesResponseModel.fromJson(data));
@ -39,79 +36,67 @@ class CMCService extends BaseService {
}, body: getCMCServicesRequestModel.toJson()); }, body: getCMCServicesRequestModel.toJson());
} }
Future getCmcAllPresOrders() async { Future getCmcAllPresOrders() async {
GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel = GetHHCAllPresOrdersRequestModel();
GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel= GetHHCAllPresOrdersRequestModel();
hasError = false; hasError = false;
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { cmcAllPresOrdersList.clear();
cmcAllPresOrdersList.clear(); cmcAllOrderDetail.clear();
cmcAllOrderDetail.clear(); response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
response['PatientER_GetPatientAllPresOrdersList'].forEach((data) { if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService()) cmcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService())
cmcAllPresOrdersList
.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: getHHCAllPresOrdersRequestModel.toJson()); }, body: getHHCAllPresOrdersRequestModel.toJson());
} }
Future getOrderDetailByOrderID(GetOrderDetailByOrderIDRequestModel getOrderDetailByOrderIDRequestModel) async { Future getOrderDetailByOrderID(GetOrderDetailByOrderIDRequestModel getOrderDetailByOrderIDRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_CMC_ORDER_DETAIL_BY_ID, await baseAppClient.post(GET_CMC_ORDER_DETAIL_BY_ID, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { cmcAllOrderDetail.clear();
cmcAllOrderDetail.clear(); response['PatientER_CMC_GetTransactionsForOrderList'].forEach((data) {
response['PatientER_CMC_GetTransactionsForOrderList'].forEach((data) { cmcAllOrderDetail.add(GetOrderDetailByOrderIDResponseModel.fromJson(data));
cmcAllOrderDetail.add(GetOrderDetailByOrderIDResponseModel.fromJson(data)); });
}); }, onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) { hasError = true;
hasError = true; super.error = error;
super.error = error; }, body: getOrderDetailByOrderIDRequestModel.toJson());
}, body: getOrderDetailByOrderIDRequestModel.toJson());
} }
Future getCheckupItems(CMCGetItemsRequestModel cMCGetItemsRequestModel) async { Future getCheckupItems(CMCGetItemsRequestModel cMCGetItemsRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_CHECK_UP_ITEMS, await baseAppClient.post(GET_CHECK_UP_ITEMS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { checkupItemsList.clear();
checkupItemsList.clear(); response['GetCheckUpItemsList'].forEach((data) {
response['GetCheckUpItemsList'].forEach((data) { checkupItemsList.add(CMCGetItemsResponseModel.fromJson(data));
checkupItemsList.add(CMCGetItemsResponseModel.fromJson(data)); });
}); }, onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) { hasError = true;
hasError = true; super.error = error;
super.error = error; }, body: cMCGetItemsRequestModel.toJson());
}, body: cMCGetItemsRequestModel.toJson());
} }
Future updateCmcPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async { Future updateCmcPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER, await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { isOrderUpdated = true;
isOrderUpdated = true; }, onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) { hasError = true;
hasError = true; super.error = error;
super.error = error; }, body: updatePresOrderRequestModel.toJson());
}, body: updatePresOrderRequestModel.toJson());
} }
Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async { Future<String> insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async {
hasError = false; hasError = false;
await baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, String reqId="";
onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true; isOrderUpdated = true;
}, onFailure: (String error, int statusCode) { reqId=response['RequestNo'].toString();
hasError = true; }, onFailure: (String error, int statusCode) {
super.error = error; hasError = true;
}, body: order.toJson()); super.error = error;
}, body: order.toJson());
return reqId;
} }
} }

@ -3,9 +3,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_model.dart'; import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_request_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart'; import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_request_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -69,8 +67,7 @@ class BariatricsService extends BaseService {
body['Longitude'] = 0; body['Longitude'] = 0;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(SEARCH_DOCTOR_BY_TIME, onSuccess: (dynamic response, int statusCode) {}, await baseAppClient.post(SEARCH_DOCTOR_BY_TIME, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, body: body);
@ -92,8 +89,7 @@ class BariatricsService extends BaseService {
body['PatientID'] = 0; body['PatientID'] = 0;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
if(disease != null) if (disease != null) body['DiseaseID'] = disease.diseasesID;
body['DiseaseID'] = disease.diseasesID;
await baseAppClient.post(GET_DOCTOR_LIST_BY_TIME, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(GET_DOCTOR_LIST_BY_TIME, onSuccess: (dynamic response, int statusCode) {
doctorListByTime.clear(); doctorListByTime.clear();
@ -106,4 +102,23 @@ class BariatricsService extends BaseService {
super.error = error; super.error = error;
}, body: body); }, body: body);
} }
Future getCalculationDoctors({@required int calculationID}) async {
hasError = false;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Map<String, dynamic> body = Map();
body['CalculationID'] = calculationID; // hint: it is static depend on IONIC project
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
dynamic localRes;
await baseAppClient.post(GET_DOCTOR_LIST_CALCULATION, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
} }

@ -68,11 +68,11 @@ class InsuranceCardService extends BaseService {
Future getInsuranceApproval({int appointmentNo}) async { Future getInsuranceApproval({int appointmentNo}) async {
hasError = false; hasError = false;
if (appointmentNo != null) { if (appointmentNo != null) {
_requestInsuranceApprovalModel.appointmentNo = appointmentNo; _requestInsuranceApprovalModel.appointmentNo = appointmentNo;
_requestInsuranceApprovalModel.eXuldAPPNO = 0; _requestInsuranceApprovalModel.eXuldAPPNO = 0;
_requestInsuranceApprovalModel.projectID = 0; _requestInsuranceApprovalModel.projectID = 0;
} else { } else {
_requestInsuranceApprovalModel.appointmentNo = 0; _requestInsuranceApprovalModel.appointmentNo = 0;
_requestInsuranceApprovalModel.eXuldAPPNO = 0; _requestInsuranceApprovalModel.eXuldAPPNO = 0;
_requestInsuranceApprovalModel.projectID = 0; _requestInsuranceApprovalModel.projectID = 0;
} }
@ -99,21 +99,25 @@ class InsuranceCardService extends BaseService {
} }
Future getSharedRecordByStatus() async { Future getSharedRecordByStatus() async {
try { if (await sharedPref.getObject(FAMILY_FILE) != null) {
dynamic localRes; return Future.value(GetAllSharedRecordsByStatusResponse.fromJson(await sharedPref.getObject(FAMILY_FILE)));
var request = GetAllSharedRecordsByStatusReq(); } else {
request.status = 0; try {
await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS, onSuccess: (dynamic response, int statusCode) { dynamic localRes;
localRes = response; var request = GetAllSharedRecordsByStatusReq();
}, onFailure: (String error, int statusCode) { request.status = 0;
AppToast.showErrorToast(message: error); await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
AppToast.showErrorToast(message: error);
throw error;
}, body: request.toJson());
sharedPref.setObject(FAMILY_FILE, localRes);
getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(localRes);
} catch (error) {
print(error);
throw error; throw error;
}, body: request.toJson()); }
sharedPref.setObject(FAMILY_FILE, localRes);
getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(localRes);
} catch (error) {
print(error);
throw error;
} }
} }

@ -17,34 +17,28 @@ import '../../../locator.dart';
import 'add_new_address_Request_Model.dart'; import 'add_new_address_Request_Model.dart';
class CMCViewModel extends BaseViewModel { class CMCViewModel extends BaseViewModel {
CMCService _cMCService = CMCService _cMCService = locator<CMCService>();
locator<CMCService>(); CustomerAddressesService _customerAddressesService = locator<CustomerAddressesService>();
CustomerAddressesService _customerAddressesService =
locator<CustomerAddressesService>();
List<AddressInfo> get addressesList =>
_customerAddressesService.addressesList;
List<GetCMCServicesResponseModel> get cmcAllServicesList =>
_cMCService.cmcAllServicesList; List<AddressInfo> get addressesList => _customerAddressesService.addressesList;
List<GetHHCAllPresOrdersResponseModel> get cmcAllPresOrders => List<GetCMCServicesResponseModel> get cmcAllServicesList => _cMCService.cmcAllServicesList;
_cMCService.cmcAllPresOrdersList;
List<GetOrderDetailByOrderIDResponseModel> get cmcAllOrderDetail => List<GetHHCAllPresOrdersResponseModel> get cmcAllPresOrders => _cMCService.cmcAllPresOrdersList;
_cMCService.cmcAllOrderDetail;
List<CMCGetItemsResponseModel> get checkupItems =>
_cMCService.checkupItemsList;
PharmacyModuleService _pharmacyModuleService = locator<PharmacyModuleService>(); List<GetOrderDetailByOrderIDResponseModel> get cmcAllOrderDetail => _cMCService.cmcAllOrderDetail;
List<CMCGetItemsResponseModel> get checkupItems => _cMCService.checkupItemsList;
PharmacyModuleService _pharmacyModuleService = locator<PharmacyModuleService>();
bool get isOrderUpdated => _cMCService.isOrderUpdated; bool get isOrderUpdated => _cMCService.isOrderUpdated;
Future getCMCAllServices() async { Future getCMCAllServices() async {
await _cMCService await _cMCService.getCMCAllServices();
.getCMCAllServices();
CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel(checkupType: cmcAllServicesList[0].iD); CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel(checkupType: cmcAllServicesList[0].iD);
await getCheckupItems(cMCGetItemsRequestModel: cMCGetItemsRequestModel,isFirst: true); await getCheckupItems(cMCGetItemsRequestModel: cMCGetItemsRequestModel, isFirst: true);
if (_cMCService.hasError) { if (_cMCService.hasError) {
error = _cMCService.error; error = _cMCService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -52,16 +46,15 @@ class CMCViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
Future getCheckupItems({CMCGetItemsRequestModel cMCGetItemsRequestModel, bool isFirst = false}) async { Future getCheckupItems({CMCGetItemsRequestModel cMCGetItemsRequestModel, bool isFirst = false}) async {
if(!isFirst) if (!isFirst) setState(ViewState.Busy);
setState(ViewState.Busy);
await _cMCService.getCheckupItems(cMCGetItemsRequestModel); await _cMCService.getCheckupItems(cMCGetItemsRequestModel);
if (_cMCService.hasError) { if (_cMCService.hasError) {
error = _cMCService.error; error = _cMCService.error;
setState(ViewState.Error); setState(ViewState.Error);
} }
if(!isFirst) if (!isFirst) setState(ViewState.Idle);
setState(ViewState.Idle);
} }
Future getCmcAllPresOrders() async { Future getCmcAllPresOrders() async {
@ -71,9 +64,7 @@ class CMCViewModel extends BaseViewModel {
error = _cMCService.error; error = _cMCService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
var pendingOrder = _cMCService.cmcAllPresOrdersList.firstWhere( var pendingOrder = _cMCService.cmcAllPresOrdersList.firstWhere((element) => element.status == 1 || element.status == 2, orElse: () => null);
(element) => element.status == 1 || element.status == 2,
orElse: () => null);
if (pendingOrder != null) { if (pendingOrder != null) {
await getOrderDetailByOrderID(pendingOrder); await getOrderDetailByOrderID(pendingOrder);
setState(ViewState.Idle); setState(ViewState.Idle);
@ -83,11 +74,9 @@ class CMCViewModel extends BaseViewModel {
} }
} }
Future updateCmcPresOrder( Future updateCmcPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _cMCService.updateCmcPresOrder( await _cMCService.updateCmcPresOrder(updatePresOrderRequestModel);
updatePresOrderRequestModel);
if (_cMCService.hasError) { if (_cMCService.hasError) {
error = _cMCService.error; error = _cMCService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -97,23 +86,24 @@ class CMCViewModel extends BaseViewModel {
} }
Future getOrderDetailByOrderID(GetHHCAllPresOrdersResponseModel order) async { Future getOrderDetailByOrderID(GetHHCAllPresOrdersResponseModel order) async {
GetOrderDetailByOrderIDRequestModel getOrderDetailByOrderIDRequestModel = GetOrderDetailByOrderIDRequestModel getOrderDetailByOrderIDRequestModel = GetOrderDetailByOrderIDRequestModel(presOrderID: order.iD);
GetOrderDetailByOrderIDRequestModel(presOrderID: order.iD); await _cMCService.getOrderDetailByOrderID(getOrderDetailByOrderIDRequestModel);
await _cMCService
.getOrderDetailByOrderID(getOrderDetailByOrderIDRequestModel);
} }
//TODO check it in uat //TODO check it in uat
Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async { Future<String> insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
order.createdBy = user.patientID; order.createdBy = user.patientID;
order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService(); order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService();
await _cMCService.insertPresPresOrder(order: order); String requestId = await _cMCService.insertPresPresOrder(order: order);
if (_cMCService.hasError) { if (_cMCService.hasError) {
error = _cMCService.error; error = _cMCService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
getCmcAllPresOrders(); getCmcAllPresOrders();
} }
return requestId;
} }
Future getCustomerAddresses() async { Future getCustomerAddresses() async {
@ -129,7 +119,7 @@ class CMCViewModel extends BaseViewModel {
Future getCustomerInfo() async { Future getCustomerInfo() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _pharmacyModuleService.generatePharmacyToken().then((value) async{ await _pharmacyModuleService.generatePharmacyToken().then((value) async {
await _customerAddressesService.getCustomerInfo(); await _customerAddressesService.getCustomerInfo();
}); });
if (_customerAddressesService.hasError) { if (_customerAddressesService.hasError) {
@ -140,14 +130,9 @@ class CMCViewModel extends BaseViewModel {
} }
} }
Future addAddressInfo( Future addAddressInfo({AddNewAddressRequestModel addNewAddressRequestModel}) async {
{AddNewAddressRequestModel addNewAddressRequestModel}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _customerAddressesService.addAddressInfo( await _customerAddressesService.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel);
addNewAddressRequestModel: addNewAddressRequestModel
);
if (_customerAddressesService.hasError) { if (_customerAddressesService.hasError) {
error = _customerAddressesService.error; error = _customerAddressesService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -267,27 +267,27 @@ class ListConsultation {
dynamic projectID; dynamic projectID;
dynamic doctorID; dynamic doctorID;
dynamic grandTotal; dynamic grandTotal;
int quantity; dynamic quantity;
int total; dynamic total;
dynamic discount; dynamic discount;
int subTotal; dynamic subTotal;
dynamic invoiceNo; dynamic invoiceNo;
dynamic createdOn; dynamic createdOn;
String procedureID; String procedureID;
String procedureName; String procedureName;
dynamic procedureNameN; dynamic procedureNameN;
dynamic procedurePrice; dynamic procedurePrice;
int patientShare; dynamic patientShare;
dynamic companyShare; dynamic companyShare;
int totalPatientShare; dynamic totalPatientShare;
dynamic totalCompanyShare; dynamic totalCompanyShare;
dynamic totalShare; dynamic totalShare;
dynamic discountAmount; dynamic discountAmount;
int vATPercentage; dynamic vATPercentage;
int patientVATAmount; dynamic patientVATAmount;
dynamic companyVATAmount; dynamic companyVATAmount;
dynamic totalVATAmount; dynamic totalVATAmount;
int price; dynamic price;
dynamic patientID; dynamic patientID;
dynamic patientName; dynamic patientName;
dynamic patientNameN; dynamic patientNameN;
@ -316,7 +316,7 @@ class ListConsultation {
dynamic totalPatientShareWithQuantity; dynamic totalPatientShareWithQuantity;
dynamic legalName; dynamic legalName;
dynamic legalNameN; dynamic legalNameN;
int advanceAdjustment; dynamic advanceAdjustment;
ListConsultation( ListConsultation(
{this.projectID, {this.projectID,

@ -10,9 +10,7 @@ class ConfirmCancelOrderDialog extends StatefulWidget {
final CMCViewModel model; final CMCViewModel model;
final Function onTap; final Function onTap;
ConfirmCancelOrderDialog({Key key, this.model, this.onTap});
ConfirmCancelOrderDialog(
{Key key, this.model, this.onTap});
@override @override
_ConfirmCancelOrderDialogState createState() => _ConfirmCancelOrderDialogState(); _ConfirmCancelOrderDialogState createState() => _ConfirmCancelOrderDialogState();
@ -27,11 +25,13 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SimpleDialog( return SimpleDialog(
contentPadding: EdgeInsets.fromLTRB(28.0, 24.0, 28.0, 0.0), contentPadding: EdgeInsets.fromLTRB(28.0, 2.0, 28.0, 0.0),
title: Center( title: Text(
child: Texts( TranslationBase.of(context).confirm,
TranslationBase.of(context).confirm, style: TextStyle(
color: Colors.black, fontSize: 16,
fontWeight: FontWeight.bold,
letterSpacing: -0.46,
), ),
), ),
children: [ children: [
@ -39,13 +39,13 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
children: [ children: [
Divider(), Divider(),
Center( Center(
child: Texts( child: Text(
TranslationBase.of(context).cancelOrderMsg , TranslationBase.of(context).cancelOrderMsg,
color: Colors.grey, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, letterSpacing: -0.46, color: Colors.grey[600]),
), ),
), ),
SizedBox( SizedBox(
height: 5.0, height: 12.0,
), ),
Row( Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -60,9 +60,14 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Container( child: Container(
child: Center( child: Center(
child: Texts( child: Text(
TranslationBase.of(context).cancel.toUpperCase(), TranslationBase.of(context).cancel.toUpperCase(),
color: Colors.red, style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w700,
letterSpacing: -0.46,
color: Colors.red,
),
), ),
), ),
), ),
@ -77,28 +82,32 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () async{ onTap: () async {
widget.onTap(); widget.onTap();
Navigator.pop(context); Navigator.pop(context);
}, },
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Center(
child: Texts( child: Text(
TranslationBase.of(context).ok, TranslationBase.of(context).ok.toUpperCase(),
fontWeight: FontWeight.w400, style: TextStyle(
)), fontSize: 14,
fontWeight: FontWeight.w700,
letterSpacing: -0.46,
),
)),
), ),
), ),
), ),
], ],
) ),
SizedBox(
height: 5.0,
),
], ],
) )
], ],
); );
} }
} }

@ -0,0 +1,98 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:flutter/material.dart';
import 'package:progress_hud_v2/generated/i18n.dart';
Future<void> showCMCConfirmDialog(BuildContext context, String requestId, {Function onClick}) async {
return showDialog<void>(
context: context,
barrierDismissible: false, // user must tap button!
builder: (BuildContext context) {
return Dialog(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ConfirmDialog(requestId,onClick: onClick,),
],
),
);
},
);
}
class ConfirmDialog extends StatelessWidget {
String requestId;
Function onClick;
ConfirmDialog(this.requestId, {this.onClick});
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
padding: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
mFlex(1),
IconButton(
icon: Icon(
Icons.close,
),
onPressed: () {
onClick();
Navigator.pop(context);
},
),
],
),
Text(
"Request has been sent successfully. You will be contacted soon.",
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
letterSpacing: -0.46,
),
),
mHeight(20),
Text(
"Request ID",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.grey[600],
letterSpacing: -0.46,
),
),
Text(
requestId ?? "",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.black,
letterSpacing: -0.46,
),
),
mHeight(20),
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: TranslationBase.of(context).ok.toUpperCase(),
color: CustomColors.accentColor,
onTap: () async {
onClick();
Navigator.pop(context);
},
textColor: Theme.of(context).backgroundColor),
),
],
),
);
}
}

@ -1,10 +1,12 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -22,9 +24,7 @@ class CMCLocationPage extends StatefulWidget {
final double longitude; final double longitude;
final dynamic model; final dynamic model;
const CMCLocationPage( const CMCLocationPage({Key key, this.onPick, this.latitude, this.longitude, this.model}) : super(key: key);
{Key key, this.onPick, this.latitude, this.longitude, this.model})
: super(key: key);
@override @override
_CMCLocationPageState createState() => _CMCLocationPageState(); _CMCLocationPageState createState() => _CMCLocationPageState();
@ -39,7 +39,7 @@ class _CMCLocationPageState extends State<CMCLocationPage> {
void initState() { void initState() {
latitude = widget.latitude; latitude = widget.latitude;
longitude = widget.longitude; longitude = widget.longitude;
if(latitude == 0.0 && longitude == 0.0) { if (latitude == 0.0 && longitude == 0.0) {
showCurrentLocation = true; showCurrentLocation = true;
} }
super.initState(); super.initState();
@ -54,6 +54,14 @@ class _CMCLocationPageState extends State<CMCLocationPage> {
isShowDecPage: false, isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
description: TranslationBase.of(context).infoCMC,
imagesInfo: [
ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png'),
],
appBarTitle: TranslationBase.of(context).addNewAddress,
body: PlacePicker( body: PlacePicker(
apiKey: GOOGLE_API_KEY, apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true, enableMyLocationButton: true,
@ -66,10 +74,8 @@ class _CMCLocationPageState extends State<CMCLocationPage> {
onPlacePicked: (PickResult result) { onPlacePicked: (PickResult result) {
print(result.adrAddress); print(result.adrAddress);
}, },
selectedPlaceWidgetBuilder: selectedPlaceWidgetBuilder: (_, selectedPlace, state, isSearchBarFocused) {
(_, selectedPlace, state, isSearchBarFocused) { print("state: $state, isSearchBarFocused: $isSearchBarFocused");
print(
"state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused return isSearchBarFocused
? Container() ? Container()
: FloatingCard( : FloatingCard(
@ -85,67 +91,45 @@ class _CMCLocationPageState extends State<CMCLocationPage> {
child: Column( child: Column(
children: [ children: [
SecondaryButton( SecondaryButton(
color: Colors.grey[800], color: CustomColors.accentColor,
textColor: Colors.white, textColor: Colors.white,
onTap: () async { onTap: () async {
print(selectedPlace); print(selectedPlace);
AddNewAddressRequestModel AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel(
addNewAddressRequestModel =
new AddNewAddressRequestModel(
customer: Customer(addresses: [ customer: Customer(addresses: [
Addresses( Addresses(
address1: selectedPlace address1: selectedPlace.formattedAddress,
.formattedAddress, address2: selectedPlace.formattedAddress,
address2: selectedPlace
.formattedAddress,
customerAttributes: "", customerAttributes: "",
city: "", city: "",
createdOnUtc: "", createdOnUtc: "",
id: 0, id: 0,
latLong: latLong: "$latitude,$longitude",
"$latitude,$longitude",
email: "") email: "")
]), ]),
); );
selectedPlace.addressComponents selectedPlace.addressComponents.forEach((e) {
.forEach((e) {
if (e.types.contains("country")) { if (e.types.contains("country")) {
addNewAddressRequestModel addNewAddressRequestModel.customer.addresses[0].country = e.longName;
.customer
.addresses[0]
.country = e.longName;
} }
if (e.types if (e.types.contains("postal_code")) {
.contains("postal_code")) { addNewAddressRequestModel.customer.addresses[0].zipPostalCode = e.longName;
addNewAddressRequestModel
.customer
.addresses[0]
.zipPostalCode = e.longName;
} }
if (e.types.contains("locality")) { if (e.types.contains("locality")) {
addNewAddressRequestModel addNewAddressRequestModel.customer.addresses[0].city = e.longName;
.customer
.addresses[0]
.city = e.longName;
} }
}); });
await model.addAddressInfo( await model.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel);
addNewAddressRequestModel: if (model.state == ViewState.ErrorLocal) {
addNewAddressRequestModel);
if (model.state ==
ViewState.ErrorLocal) {
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);
} else { } else {
AppToast.showSuccessToast( AppToast.showSuccessToast(message: "Address Added Successfully");
message:
"Address Added Successfully");
} }
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
label: TranslationBase.of(context) label: TranslationBase.of(context).addNewAddress,
.addNewAddress,
), ),
], ],
), ),

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -47,19 +48,14 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
price: widget.model.cmcAllServicesList[0].price, price: widget.model.cmcAllServicesList[0].price,
serviceID: widget.model.cmcAllServicesList[0].serviceID.toString(), serviceID: widget.model.cmcAllServicesList[0].serviceID.toString(),
selectedServiceName: widget.model.cmcAllServicesList[0].description, selectedServiceName: widget.model.cmcAllServicesList[0].description,
selectedServiceNameAR: selectedServiceNameAR: widget.model.cmcAllServicesList[0].descriptionN,
widget.model.cmcAllServicesList[0].descriptionN,
recordID: 1, recordID: 1,
totalPrice: widget.model.cmcAllServicesList[0].totalPrice, totalPrice: widget.model.cmcAllServicesList[0].totalPrice,
vAT: widget.model.cmcAllServicesList[0].vAT); vAT: widget.model.cmcAllServicesList[0].vAT);
cMCInsertPresOrderRequestModel = new CMCInsertPresOrderRequestModel( cMCInsertPresOrderRequestModel = new CMCInsertPresOrderRequestModel(patientERCMCInsertServicesList: [patientERCMCInsertServicesList]);
patientERCMCInsertServicesList: [patientERCMCInsertServicesList]);
} }
cMCInsertPresOrderRequestModel = new CMCInsertPresOrderRequestModel( cMCInsertPresOrderRequestModel = new CMCInsertPresOrderRequestModel(patientERCMCInsertServicesList: patientERCMCInsertServicesList != null ? [patientERCMCInsertServicesList] : []);
patientERCMCInsertServicesList: patientERCMCInsertServicesList != null
? [patientERCMCInsertServicesList]
: []);
_controller = new PageController(); _controller = new PageController();
@ -89,26 +85,18 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage( void showConfirmMessage(CMCViewModel model, GetOrderDetailByOrderIDResponseModel order) {
CMCViewModel model, GetOrderDetailByOrderIDResponseModel order) {
showDialog( showDialog(
context: context, context: context,
child: ConfirmCancelOrderDialog( child: ConfirmCancelOrderDialog(
model: model, model: model,
onTap: () async { onTap: () async {
UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.presOrderID, rejectionReason: "", presOrderStatus: 4, editedBy: 3);
UpdatePresOrderRequestModel(
presOrderID: order.presOrderID,
rejectionReason: "",
presOrderStatus: 4,
editedBy: 3);
await model.updateCmcPresOrder(updatePresOrderRequestModel); await model.updateCmcPresOrder(updatePresOrderRequestModel);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);
} else { } else {
AppToast.showSuccessToast( AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully);
message:
TranslationBase.of(context).processDoneSuccessfully);
await model.getCmcAllPresOrders(); await model.getCmcAllPresOrders();
} }
}, },
@ -117,291 +105,119 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
return Scaffold( return Scaffold(
body: SafeArea( body: SafeArea(
child: SingleChildScrollView( child: Container(
child: Container( child: widget.model.cmcAllOrderDetail.length != 0
height: MediaQuery.of(context).size.height * 0.8, ? Column(
child: Column( children: [
children: [ Container(
if (widget.model.cmcAllOrderDetail.length == 0) width: double.infinity,
Container( padding: EdgeInsets.only(left: 12, right: 12, top: 12),
margin: EdgeInsets.only( child: Card(
left: MediaQuery.of(context).size.width * 0.05, shape: cardRadius(12),
right: MediaQuery.of(context).size.width * 0.05), elevation: 2,
child: StepsWidget( margin: EdgeInsets.zero,
index: _currentIndex, color: Color(0xffcd9e1b),
changeCurrentTab: changePageViewIndex, clipBehavior: Clip.antiAlias,
), child: Container(
), // decoration: containerColorRadiusLeft(Colors.white, 12),
Expanded( margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 8, right: projectViewModel.isArabic ? 8 : 0),
child: PageView( padding: EdgeInsets.all(12),
physics: NeverScrollableScrollPhysics(), // color: Colors.white,
controller: _controller, decoration: BoxDecoration(
onPageChanged: (index) { shape: BoxShape.rectangle,
setState(() { color: Colors.white,
_currentIndex = index; borderRadius: BorderRadius.only(
}); topLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0),
}, topRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero,
scrollDirection: Axis.horizontal, bottomLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0),
children: <Widget>[ bottomRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero,
widget.model.cmcAllOrderDetail.length != 0 ),
? FractionallySizedBox( ),
widthFactor: 0.9, // clipBehavior: Clip.antiAlias,
child: SingleChildScrollView( child: Row(
children: [
Expanded(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Text(
width: double.infinity, TranslationBase.of(context).OrderStatus +
margin: EdgeInsets.only(top: 15), ' ' +
decoration: BoxDecoration( (projectViewModel.isArabic ? widget.model.cmcAllOrderDetail[0].descriptionN : widget.model.cmcAllOrderDetail[0].description),
border: Border.all( style: TextStyle(
color: Colors.grey, width: 1), fontSize: 12,
borderRadius: letterSpacing: -0.48,
BorderRadius.circular(12), color: Color(0xffcd9e1b),
color: fontWeight: FontWeight.w700,
Theme.of(context).primaryColor),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15,
bottom: 15,
top: 15,
right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Theme.of(context)
.primaryColor),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context)
.requestID,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model
.cmcAllOrderDetail[0].iD
.toString(),
fontSize: 22,
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15,
bottom: 15,
top: 15,
right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Theme.of(context)
.primaryColor),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
projectViewModel.isArabic
? widget
.model
.cmcAllOrderDetail[0]
.descriptionN
: widget
.model
.cmcAllOrderDetail[0]
.description,
fontSize: 22,
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15,
bottom: 15,
top: 15,
right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Theme.of(context)
.primaryColor),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context)
.pickupDate,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
widget
.model
.cmcAllOrderDetail[
0]
.createdOn)),
fontSize: 22,
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Theme.of(context)
.primaryColor),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context)
.serviceName,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
!projectViewModel.isArabic
? widget
.model
.cmcAllOrderDetail[0]
.description
.toString()
: widget
.model
.cmcAllOrderDetail[0]
.descriptionN
.toString(),
fontSize: 22,
),
],
),
),
SizedBox(
height: 12,
),
Center(
child: Container(
width: MediaQuery.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: TranslationBase.of(
context)
.cancel
.toUpperCase(),
onTap: () {
showConfirmMessage(
widget.model,
widget.model
.cmcAllOrderDetail[0]);
},
color: Colors.red[800],
disabled: false,
textColor: Theme.of(context)
.backgroundColor),
),
),
SizedBox(
height: 22,
),
],
), ),
), ),
SizedBox( mHeight(12),
height: 22, Text(
TranslationBase.of(context).requestID + ' ' + widget.model.cmcAllOrderDetail[0].iD.toString(),
style: TextStyle(
fontSize: 16,
letterSpacing: -0.48,
fontWeight: FontWeight.w700,
),
),
Text(
TranslationBase.of(context).serviceName,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w500,
),
),
Text(
!projectViewModel.isArabic ? widget.model.cmcAllOrderDetail[0].description.toString() : widget.model.cmcAllOrderDetail[0].descriptionN.toString(),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w700,
),
), ),
], ],
), ),
), ),
) Column(
: NewCMCStepOnePage( children: [
changePageViewIndex: changePageViewIndex, Text(
cMCInsertPresOrderRequestModel: DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.model.cmcAllOrderDetail[0].createdOn)),
cMCInsertPresOrderRequestModel, style: TextStyle(
model: widget.model, fontSize: 12,
), letterSpacing: -0.48,
NewCMCStepTowPage( fontWeight: FontWeight.w700,
longitude: _longitude, ),
latitude: _latitude, ),
changePageViewIndex: changePageViewIndex, mHeight(8),
cmcInsertPresOrderRequestModel: SecondaryButton(
cMCInsertPresOrderRequestModel, onTap: () {
model: widget.model, showConfirmMessage(widget.model, widget.model.cmcAllOrderDetail[0]);
), },
NewCMCStepThreePage( label: TranslationBase.of(context).cancel,
changePageViewIndex: changePageViewIndex, color: Colors.red[900],
cmcInsertPresOrderRequestModel: small: true,
cMCInsertPresOrderRequestModel, )
model: widget.model, ],
),
],
),
),
), ),
], ),
],
)
: Container(
color: Colors.red,
child: NewCMCStepOnePage(
changePageViewIndex: changePageViewIndex,
cMCInsertPresOrderRequestModel: cMCInsertPresOrderRequestModel,
model: widget.model,
latitude: _latitude,
longitude: _longitude,
), ),
), ),
],
),
),
), ),
), ),
); );

@ -3,8 +3,10 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/Comprehens
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -12,17 +14,16 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'new_cmc_step_tow_page.dart';
class NewCMCStepOnePage extends StatefulWidget { class NewCMCStepOnePage extends StatefulWidget {
final CMCInsertPresOrderRequestModel cMCInsertPresOrderRequestModel; final CMCInsertPresOrderRequestModel cMCInsertPresOrderRequestModel;
final Function changePageViewIndex; final Function changePageViewIndex;
final CMCViewModel model; final CMCViewModel model;
const NewCMCStepOnePage( final double latitude;
{Key key, final double longitude;
this.cMCInsertPresOrderRequestModel, const NewCMCStepOnePage({Key key, this.cMCInsertPresOrderRequestModel, this.model, this.changePageViewIndex,this.latitude,this.longitude}) : super(key: key);
this.model,
this.changePageViewIndex})
: super(key: key);
@override @override
_NewCMCStepOnePageState createState() => _NewCMCStepOnePageState(); _NewCMCStepOnePageState createState() => _NewCMCStepOnePageState();
@ -44,175 +45,107 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Container( child: Container(
margin: EdgeInsets.all(12), margin: EdgeInsets.only(left: 12, right: 12),
child: Center( child: Center(
child: Column( child: Column(
children: [ children: [
FractionallySizedBox( ListView.separated(
widthFactor: 0.94, physics: NeverScrollableScrollPhysics(),
child: Column( shrinkWrap: true,
crossAxisAlignment: CrossAxisAlignment.start, itemBuilder: (context, index) {
children: [ return Row(
SizedBox( children: [
height: 20, Radio(
), value: widget.model.cmcAllServicesList[index].serviceID,
Texts( activeColor: Colors.red[800],
TranslationBase.of(context).selectService, onChanged: (newValue) async {
textAlign: TextAlign.center, PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
), price: widget.model.cmcAllServicesList[index].price,
Column( serviceID: widget.model.cmcAllServicesList[index].serviceID.toString(),
children: selectedServiceName: widget.model.cmcAllServicesList[index].description,
widget.model.cmcAllServicesList.map((service) { selectedServiceNameAR: widget.model.cmcAllServicesList[index].descriptionN,
return Container( recordID: 1,
margin: EdgeInsets.only(top: 15), totalPrice: widget.model.cmcAllServicesList[index].totalPrice,
decoration: BoxDecoration( vAT: widget.model.cmcAllServicesList[index].vAT);
border: setState(() {
Border.all(color: Colors.grey, width: 1), widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList];
borderRadius: BorderRadius.circular(12), });
color: Theme.of(context).primaryColor), CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel(checkupType: newValue);
child: Column( await widget.model.getCheckupItems(cMCGetItemsRequestModel: cMCGetItemsRequestModel);
children: [ },
Row( groupValue: widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length > 0
children: [ ? int.parse(widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList[0].serviceID)
Radio( : 1),
value: service.serviceID, Expanded(
activeColor: Colors.red[800], child: Padding(
onChanged: (newValue) async { padding: const EdgeInsets.only(
PatientERCMCInsertServicesList left: 10,
patientERCMCInsertServicesList = right: 10,
new PatientERCMCInsertServicesList( top: 20,
price: service.price, bottom: 20,
serviceID: service.serviceID ),
.toString(), child: Text(
selectedServiceName: projectViewModel.isArabic ? widget.model.cmcAllServicesList[index].descriptionN : widget.model.cmcAllServicesList[index].description,
service.description, style: TextStyle(
selectedServiceNameAR: fontSize: 14,
service.descriptionN, fontWeight: FontWeight.w600,
recordID: 1, letterSpacing: -0.45,
totalPrice:
service.totalPrice,
vAT: service.vAT);
setState(() {
widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList = [
patientERCMCInsertServicesList
];
});
CMCGetItemsRequestModel
cMCGetItemsRequestModel =
new CMCGetItemsRequestModel(
checkupType: newValue);
await widget.model.getCheckupItems(
cMCGetItemsRequestModel:
cMCGetItemsRequestModel);
},
groupValue: widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList
.length >
0
? int.parse(widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList[
0]
.serviceID)
: 1),
Expanded(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Texts(
projectViewModel.isArabic
? service.descriptionN
: service.description,
fontSize: 15,
),
),
),
],
), ),
], ),
), ),
); ),
}).toList(),
),
],
),
),
SizedBox(
height: 30,
),
Container(
color: Theme.of(context).primaryColor,
width: double.infinity,
child: Column(
children: [
Row(
children: [
Container(
margin: EdgeInsets.only(right: 10, left: 10),
child: Texts(
TranslationBase.of(context).coveredService,
fontWeight: FontWeight.bold,
))
], ],
), );
Column( },
crossAxisAlignment: CrossAxisAlignment.start, separatorBuilder: (context, index) {
children: widget.model.checkupItems.map((item) { return mDivider(Colors.grey);
return Center( },
child: FractionallySizedBox( itemCount: widget.model.cmcAllServicesList.length),
widthFactor: 1, Card(
child: Container( shape: cardRadius(12),
margin: EdgeInsets.only(top: 15), elevation: 4,
decoration: BoxDecoration( child: Container(
color: Theme.of(context).primaryColor), width: double.infinity,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start, children: [
children: [ Padding(
SizedBox( padding: const EdgeInsets.only(left: 12,right: 12,top: 12),
height: 12, child: Text(
), TranslationBase.of(context).coveredService,
Container( style: TextStyle(
width: double.infinity, fontSize: 14,
padding: EdgeInsets.only( fontWeight: FontWeight.w600,
left: 15, bottom: 5, top: 5), letterSpacing: -0.45,
decoration: BoxDecoration( ),
border: BorderDirectional( ),
bottom: BorderSide( ),
style: BorderStyle.solid, ListView.separated(
width: 0.5, itemBuilder: (context, index) {
color: Colors.grey)), return Padding(
//borderRadius: , padding: const EdgeInsets.all(12.0),
color: child: Text(
Theme.of(context).primaryColor), widget.model.checkupItems[index].itemName,
child: Column( style: TextStyle(
crossAxisAlignment: fontSize: 12,
CrossAxisAlignment.start, fontWeight: FontWeight.w600,
children: [ letterSpacing: -0.45,
Container(
margin: EdgeInsets.only(
right: 10, left: 10),
child: Texts(item.itemName,
fontSize: 15,
fontWeight: FontWeight.bold),
),
],
),
),
SizedBox(
height: 12,
),
],
),
), ),
), ),
); );
}).toList()), },
], separatorBuilder: (context, index) {
return mDivider(Colors.grey);
},
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: widget.model.checkupItems.length,
),
],
),
), ),
) ),
mHeight(MediaQuery.of(context).size.height * 0.12),
], ],
), ),
), ),
@ -221,49 +154,41 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10, height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity, width: double.infinity,
color: CustomColors.appBackgroudGreyColor,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).next, label: TranslationBase.of(context).next,
textColor: Theme.of(context).backgroundColor, textColor: Theme.of(context).backgroundColor,
color: Colors.grey[800], color: CustomColors.accentColor,
onTap: () async { onTap: () async {
if (widget.cMCInsertPresOrderRequestModel if (widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length != 0 || widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList == null) {
.patientERCMCInsertServicesList.length !=
0 ||
widget.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList ==
null) {
int index = widget.model.cmcAllServicesList.length; int index = widget.model.cmcAllServicesList.length;
PatientERCMCInsertServicesList PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
patientERCMCInsertServicesList = price: widget.model.cmcAllServicesList[index - 1].price,
new PatientERCMCInsertServicesList( serviceID: widget.model.cmcAllServicesList[index - 1].serviceID.toString(),
price: widget selectedServiceName: widget.model.cmcAllServicesList[index - 1].description,
.model.cmcAllServicesList[index - 1].price, selectedServiceNameAR: widget.model.cmcAllServicesList[index - 1].descriptionN,
serviceID: widget recordID: 1,
.model.cmcAllServicesList[index - 1].serviceID totalPrice: widget.model.cmcAllServicesList[index - 1].totalPrice,
.toString(), vAT: widget.model.cmcAllServicesList[index - 1].vAT);
selectedServiceName: widget.model
.cmcAllServicesList[index - 1].description,
selectedServiceNameAR: widget.model
.cmcAllServicesList[index - 1].descriptionN,
recordID: 1,
totalPrice: widget
.model.cmcAllServicesList[index - 1].totalPrice,
vAT:
widget.model.cmcAllServicesList[index - 1].vAT);
widget.cMCInsertPresOrderRequestModel widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList];
.patientERCMCInsertServicesList = [
patientERCMCInsertServicesList
];
await widget.model.getCustomerInfo(); await widget.model.getCustomerInfo();
if (widget.model.state == ViewState.ErrorLocal) { if (widget.model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(); Utils.showErrorToast();
} else { } else {
widget.changePageViewIndex(1); navigateTo(context,NewCMCStepTowPage(
longitude: widget.longitude,
latitude: widget.latitude,
cmcInsertPresOrderRequestModel: widget.cMCInsertPresOrderRequestModel,
model: widget.model,
));
// widget.changePageViewIndex(1);
} }
} }
}, },

@ -2,9 +2,14 @@ import 'dart:async';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -15,14 +20,9 @@ import 'package:provider/provider.dart';
class NewCMCStepThreePage extends StatefulWidget { class NewCMCStepThreePage extends StatefulWidget {
final CMCInsertPresOrderRequestModel cmcInsertPresOrderRequestModel; final CMCInsertPresOrderRequestModel cmcInsertPresOrderRequestModel;
final Function changePageViewIndex;
final CMCViewModel model; final CMCViewModel model;
NewCMCStepThreePage( NewCMCStepThreePage({Key key, this.model, this.cmcInsertPresOrderRequestModel});
{Key key,
this.changePageViewIndex,
this.model,
this.cmcInsertPresOrderRequestModel});
@override @override
_NewCMCStepThreePageState createState() => _NewCMCStepThreePageState(); _NewCMCStepThreePageState createState() => _NewCMCStepThreePageState();
@ -44,15 +44,12 @@ class _NewCMCStepThreePageState extends State<NewCMCStepThreePage> {
markers.add( markers.add(
Marker( Marker(
markerId: MarkerId( markerId: MarkerId(
widget.cmcInsertPresOrderRequestModel.latitude.hashCode widget.cmcInsertPresOrderRequestModel.latitude.hashCode.toString(),
.toString(),
), ),
position: LatLng(widget.cmcInsertPresOrderRequestModel.latitude, position: LatLng(widget.cmcInsertPresOrderRequestModel.latitude, widget.cmcInsertPresOrderRequestModel.longitude)),
widget.cmcInsertPresOrderRequestModel.longitude)),
); );
_kGooglePlex = CameraPosition( _kGooglePlex = CameraPosition(
target: LatLng(widget.cmcInsertPresOrderRequestModel.latitude, target: LatLng(widget.cmcInsertPresOrderRequestModel.latitude, widget.cmcInsertPresOrderRequestModel.longitude),
widget.cmcInsertPresOrderRequestModel.longitude),
zoom: 14.4746, zoom: 14.4746,
); );
} }
@ -63,7 +60,15 @@ class _NewCMCStepThreePageState extends State<NewCMCStepThreePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
isShowDecPage: false, isShowAppBar: true,
description: TranslationBase.of(context).infoCMC,
imagesInfo: [
ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png'),
],
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
baseViewModel: widget.model, baseViewModel: widget.model,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
@ -74,79 +79,109 @@ class _NewCMCStepThreePageState extends State<NewCMCStepThreePage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( SizedBox(
TranslationBase.of(context).orderDetails, height: 12,
fontWeight: FontWeight.bold, ),
Text(
TranslationBase.of(context).orderSummary,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
letterSpacing: -0.46,
),
), ),
SizedBox( SizedBox(
height: 12, height: 12,
), ),
Container( Card(
decoration: BoxDecoration( shape: cardRadius(12),
color: Theme.of(context).primaryColor, elevation: 4,
borderRadius: BorderRadius.circular(12)), child: Container(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Text(
TranslationBase.of(context).orderLocation + " : ", TranslationBase.of(context).orderDetails + " : ",
fontWeight: FontWeight.bold, style: TextStyle(
), fontSize: 14,
SizedBox( fontWeight: FontWeight.bold,
height: 12, letterSpacing: -0.46,
), color: CustomColors.grey,
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: 200,
child: GoogleMap(
mapType: MapType.normal,
markers: markers,
initialCameraPosition: _kGooglePlex,
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
), ),
), ),
), SizedBox(
SizedBox( height: 6,
height: 12, ),
), Padding(
Texts(TranslationBase.of(context).selectedService), padding: const EdgeInsets.all(8.0),
...List.generate( child: Container(
widget.cmcInsertPresOrderRequestModel height: 200,
.patientERCMCInsertServicesList.length, decoration: containerColorRadiusBorder(Colors.white, 12, Colors.grey),
(index) => Container( clipBehavior: Clip.antiAlias,
child: Column( child: Card(
crossAxisAlignment: CrossAxisAlignment.start, shape: cardRadius(12),
children: [ clipBehavior: Clip.antiAlias,
Texts( elevation: 0,
TranslationBase.of(context).serviceName, margin: const EdgeInsets.all(0),
fontSize: 12, // child: GoogleMap(
fontWeight: FontWeight.bold, // mapType: MapType.normal,
), // markers: markers,
SizedBox( // initialCameraPosition: _kGooglePlex,
height: 5, // onMapCreated: (GoogleMapController controller) {
), // _controller.complete(controller);
Texts( // },
projectViewModel.isArabic // ),
? widget child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" +
.cmcInsertPresOrderRequestModel widget.cmcInsertPresOrderRequestModel.latitude.toString() +
.patientERCMCInsertServicesList[index] "," +
.selectedServiceNameAR widget.cmcInsertPresOrderRequestModel.longitude.toString() +
: widget "&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7C" +
.cmcInsertPresOrderRequestModel widget.cmcInsertPresOrderRequestModel.latitude.toString() +
.patientERCMCInsertServicesList[index] "," +
.selectedServiceName, widget.cmcInsertPresOrderRequestModel.longitude.toString() +
fontSize: 15, "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8",
bold: true, width: double.infinity,
height: double.infinity,
fit: BoxFit.cover,
), ),
], ),
), ),
), ),
) SizedBox(
], height: 12,
),
Text(
TranslationBase.of(context).selectedService,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
letterSpacing: -0.46,
color: CustomColors.grey,
),
),
...List.generate(
widget.cmcInsertPresOrderRequestModel.patientERCMCInsertServicesList.length,
(index) => Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
projectViewModel.isArabic
? widget.cmcInsertPresOrderRequestModel.patientERCMCInsertServicesList[index].selectedServiceNameAR
: widget.cmcInsertPresOrderRequestModel.patientERCMCInsertServicesList[index].selectedServiceName,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
letterSpacing: -0.46,
),
),
],
),
),
)
],
),
), ),
) )
], ],
@ -156,19 +191,30 @@ class _NewCMCStepThreePageState extends State<NewCMCStepThreePage> {
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10, height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity, width: double.infinity,
color: Colors.white,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).confirm, label: TranslationBase.of(context).confirm,
color: Colors.grey[800], color: CustomColors.green,
onTap: () async { onTap: () async {
await widget.model.insertPresPresOrder( GifLoaderDialogUtils.showMyDialog(context);
order: widget.cmcInsertPresOrderRequestModel); String requestId = await widget.model.insertPresPresOrder(order: widget.cmcInsertPresOrderRequestModel);
GifLoaderDialogUtils.hideDialog(context);
if (widget.model.state != ViewState.ErrorLocal) { if (widget.model.state != ViewState.ErrorLocal) {
widget.changePageViewIndex(0); //show scuccess dialog
} showCMCConfirmDialog(
context,
requestId,
onClick: () {
Navigator.pop(context);
Navigator.pop(context);
},
);
} else {}
}, },
textColor: Theme.of(context).backgroundColor), textColor: Theme.of(context).backgroundColor),
), ),

@ -1,9 +1,14 @@
import 'dart:async';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -13,29 +18,23 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart'; import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'cmc_location_page.dart'; import 'cmc_location_page.dart';
import 'new_cmc_step_three_page.dart';
class NewCMCStepTowPage extends StatefulWidget { class NewCMCStepTowPage extends StatefulWidget {
final Function(PickResult) onPick; final Function(PickResult) onPick;
final double latitude; final double latitude;
final double longitude; final double longitude;
final CMCInsertPresOrderRequestModel cmcInsertPresOrderRequestModel; final CMCInsertPresOrderRequestModel cmcInsertPresOrderRequestModel;
final Function changePageViewIndex;
final CMCViewModel model; final CMCViewModel model;
const NewCMCStepTowPage( const NewCMCStepTowPage({Key key, this.onPick, this.latitude, this.longitude, this.cmcInsertPresOrderRequestModel, this.model}) : super(key: key);
{Key key,
this.onPick,
this.latitude,
this.longitude,
this.cmcInsertPresOrderRequestModel,
this.changePageViewIndex,
this.model})
: super(key: key);
@override @override
_NewCMCStepTowPageState createState() => _NewCMCStepTowPageState(); _NewCMCStepTowPageState createState() => _NewCMCStepTowPageState();
@ -47,36 +46,83 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
AddressInfo _selectedAddress; AddressInfo _selectedAddress;
bool showCurrentLocation = false; bool showCurrentLocation = false;
@override Completer<GoogleMapController> _controller = Completer();
void initState() { GoogleMapController googleMapController;
if (widget.cmcInsertPresOrderRequestModel.latitude == null) { static CameraPosition _kGooglePlex = CameraPosition(
setLatitudeAndLongitude(); target: LatLng(37.42796133580664, -122.085749655962),
zoom: 14.4746,
);
LatLng currentPostion;
void _getUserLocation() async {
if (await Permission.contacts.request().isGranted) {
// Either the permission was already granted before or the user just granted it.
var position = await GeolocatorPlatform.instance.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
currentPostion = LatLng(position.latitude, position.longitude);
setMap();
} else { } else {
latitude = widget.cmcInsertPresOrderRequestModel.latitude; requestPermissions().then((value) async {
longitude = widget.cmcInsertPresOrderRequestModel.longitude; if (value[Permission.location].isGranted) {
var position = await GeolocatorPlatform.instance.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
currentPostion = LatLng(position.latitude, position.longitude);
setMap();
}
});
} }
}
@override
void initState() {
_getUserLocation();
super.initState(); super.initState();
} }
setLatitudeAndLongitude({bool isSetState = false, String latLong}) async { setMap() {
if (latLong == null){ setState(() {
if(widget.model.addressesList.isEmpty) { _kGooglePlex = CameraPosition(
target: currentPostion,
zoom: 14.4746,
);
googleMapController.animateCamera(
CameraUpdate.newCameraPosition(
CameraPosition(
target: currentPostion,
zoom: 20,
),
),
);
});
}
Future<Map<Permission, PermissionStatus>> requestPermissions() async {
var permissionResults = [
Permission.location,
Permission.locationAlways,
].request();
return permissionResults;
}
setLatitudeAndLongitude({bool isSetState = false, String latLong}) async {
if (latLong == null) {
if (widget.model.addressesList.isEmpty) {
setState(() { setState(() {
showCurrentLocation = true; showCurrentLocation = true;
}); });
} else { } else {
latLong = widget latLong = widget.model.addressesList[widget.model.addressesList.length - 1].latLong;
.model.addressesList[widget.model.addressesList.length - 1].latLong;
} }
} }
if(!showCurrentLocation) { if (!showCurrentLocation) {
List latLongArr = latLong.split(','); List latLongArr = latLong.split(',');
latitude = double.parse(latLongArr[0]); latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]); longitude = double.parse(latLongArr[1]);
setMap();
} }
} }
@ -84,118 +130,141 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
isShowDecPage: false, isShowAppBar: true,
body: Stack( description: TranslationBase.of(context).infoCMC,
imagesInfo: [
ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png'),
],
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
body: Column(
children: [ children: [
PlacePicker( if (widget.model.addressesList.isNotEmpty)
apiKey: GOOGLE_API_KEY, Card(
enableMyLocationButton: true, margin: EdgeInsets.only(left: 12, right: 12, bottom: 12, top: 12),
automaticallyImplyAppBarLeading: false, shape: cardRadius(12),
autocompleteOnTrailingWhitespace: true, elevation: 3,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
searchForInitialValue: false,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
widget.changePageViewIndex(3);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: Column(
children: [
SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
Navigator.push(
context,
FadePage(
page: CMCLocationPage(
latitude: latitude,
longitude: longitude,
),
),
);
},
label: TranslationBase.of(context)
.addNewAddress,
),
SizedBox(
height: 10,
),
SecondaryButton(
color: Colors.red[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.cmcInsertPresOrderRequestModel
.latitude =
selectedPlace.geometry.location.lat;
widget.cmcInsertPresOrderRequestModel
.longitude =
selectedPlace.geometry.location.lng;
});
widget.changePageViewIndex(3);
},
label: TranslationBase.of(context).confirm,
),
],
)),
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: showCurrentLocation,
),
if(widget.model.addressesList.isNotEmpty)
Container(
child: InkWell(
onTap: () =>
confirmSelectLocationDialog(widget.model.addressesList),
child: Container( child: Container(
padding: EdgeInsets.all(10), child: InkWell(
width: double.infinity, onTap: () => confirmSelectLocationDialog(widget.model.addressesList),
// height: 65, child: Container(
decoration: BoxDecoration( padding: EdgeInsets.all(8),
borderRadius: BorderRadius.circular(10), width: double.infinity,
color: Theme.of(context).primaryColor), // height: 65,
child: Row( decoration: BoxDecoration(
mainAxisAlignment: MainAxisAlignment.spaceBetween, borderRadius: BorderRadius.circular(10),
children: [ color: Colors.white,
Expanded( ),
child: Texts( child: Row(
getAddressName(), mainAxisAlignment: MainAxisAlignment.spaceBetween,
fontSize: 14, children: [
), Expanded(
child: Text(
getAddressName(),
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.45,
),
),
),
Icon(Icons.arrow_drop_down)
],
), ),
Icon(Icons.arrow_drop_down) ),
],
), ),
height: 50,
width: double.infinity,
),
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: CMCLocationPage(
latitude: latitude,
longitude: longitude,
),
),
);
},
child: Padding(
padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 8),
child: Row(
children: [
Icon(Icons.add_circle_outline_sharp),
mWidth(12),
Text(
TranslationBase.of(context).addNewAddress,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
letterSpacing: -0.46,
),
),
],
), ),
), ),
height: 56, ),
width: double.infinity, Expanded(
color: Theme.of(context).scaffoldBackgroundColor, child: Stack(
) alignment: Alignment.center,
children: [
GoogleMap(
mapType: MapType.normal,
zoomControlsEnabled: false,
myLocationButtonEnabled: true,
myLocationEnabled: true,
initialCameraPosition: _kGooglePlex,
onCameraMove: ((_position) => _updatePosition(_position)),
onMapCreated: (GoogleMapController controller) {
googleMapController = controller;
_controller.complete(controller);
},
),
Icon(
Icons.place,
color: CustomColors.accentColor,
size: 50,
),
],
),
),
Padding(
padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
child: SecondaryButton(
color: Colors.red[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.cmcInsertPresOrderRequestModel.latitude = latitude;
widget.cmcInsertPresOrderRequestModel.longitude = longitude;
});
// widget.changePageViewIndex(3);
navigateTo(
context,
NewCMCStepThreePage(
cmcInsertPresOrderRequestModel: widget.cmcInsertPresOrderRequestModel,
model: widget.model,
),
);
},
label: TranslationBase.of(context).continues,
),
),
], ],
), ),
); );
} }
void _updatePosition(CameraPosition _position) {
latitude = _position.target.latitude;
longitude = _position.target.longitude;
}
void confirmSelectLocationDialog(List<AddressInfo> addresses) { void confirmSelectLocationDialog(List<AddressInfo> addresses) {
showDialog( showDialog(
context: context, context: context,

@ -3,6 +3,7 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -42,93 +43,69 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
isShowAppBar: true, isShowAppBar: true,
description: TranslationBase.of(context).infoCMC, description: TranslationBase.of(context).infoCMC,
imagesInfo: [ imagesInfo: [
ImagesInfo( ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png'),
imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png')
], ],
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup, appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
body: Scaffold( showNewAppBar: true,
extendBodyBehindAppBar: true, showNewAppBarTitle: true,
appBar: PreferredSize( backgroundColor: CustomColors.appBackgroudGreyColor,
preferredSize: Size.fromHeight(65.0), body: Column(
child: Stack( children: <Widget>[
children: <Widget>[ Container(
Positioned( height: 60.0,
bottom: 1, width: double.infinity,
left: 0, child: Center(
right: 0, child: TabBar(
child: BackdropFilter( isScrollable: false,
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), controller: _tabController,
child: Container( indicatorWeight: 3.0,
color: Theme.of(context).primaryColor.withOpacity(0.8), indicatorSize: TabBarIndicatorSize.tab,
height: 70.0, indicatorColor: CustomColors.accentColor,
), labelColor: Colors.black,
), labelPadding: EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
), unselectedLabelColor: Colors.grey[800],
Center( tabs: [
child: Container( Center(
height: 60.0, child: Text(
margin: EdgeInsets.only(top: 10.0), TranslationBase.of(context).comprehensiveMedicalCheckup,
width: MediaQuery.of(context).size.width * 0.9, textAlign: TextAlign.center,
decoration: BoxDecoration( style: TextStyle(
border: Border( fontSize: 13,
bottom: BorderSide( fontWeight: FontWeight.w600,
color: Theme.of(context).dividerColor, letterSpacing: -0.34,
width: 0.7),
), ),
color: Theme.of(context).primaryColor),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.37,
child: Center(
child: Texts(TranslationBase.of(context)
.comprehensiveMedicalCheckup),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.37,
child: Center(
child:
Texts(TranslationBase.of(context).orderLog),
),
),
],
), ),
), ),
), Center(
), child: Text(
], TranslationBase.of(context).orderLog,
), textAlign: TextAlign.center,
), style: TextStyle(
body: Column( fontSize: 13,
children: <Widget>[ fontWeight: FontWeight.w600,
Expanded( letterSpacing: -0.34,
child: TabBarView( ),
physics: BouncingScrollPhysics(), ),
controller: _tabController,
children: <Widget>[
NewCMCPage(
model: model,
), ),
OrdersLogDetailsPage(
model: model,
)
], ],
), ),
) ),
], ),
), Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
NewCMCPage(
model: model,
),
OrdersLogDetailsPage(
model: model,
)
],
),
)
],
), ),
), ),
); );

@ -22,26 +22,20 @@ class OrdersLogDetailsPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage( void showConfirmMessage(CMCViewModel model, GetHHCAllPresOrdersResponseModel order) {
CMCViewModel model, GetHHCAllPresOrdersResponseModel order) {
showDialog( showDialog(
context: context, context: context,
child: ConfirmCancelOrderDialog( child: ConfirmCancelOrderDialog(
model: model, model: model,
onTap: () async { onTap: () async {
UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3);
UpdatePresOrderRequestModel(
presOrderID: order.iD,
rejectionReason: "",
presOrderStatus: 4, editedBy: 3);
await model.updateCmcPresOrder(updatePresOrderRequestModel); await model.updateCmcPresOrder(updatePresOrderRequestModel);
if(model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);
} else { } else {
AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully ); AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully);
await model.getCmcAllPresOrders(); await model.getCmcAllPresOrders();
} }
}, },
@ -49,205 +43,210 @@ class OrdersLogDetailsPage extends StatelessWidget {
} }
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Container( child: Container(
margin: EdgeInsets.all(12), margin: EdgeInsets.all(12),
child: Center( child: Center(
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.94, widthFactor: 0.94,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( Column(
height: 50, crossAxisAlignment: CrossAxisAlignment.start,
), children: model.cmcAllPresOrders.map((order) {
Column( return Container(
crossAxisAlignment: CrossAxisAlignment.start, width: double.infinity,
children: model.cmcAllPresOrders.map((order) { margin: EdgeInsets.only(top: 12),
return Container( clipBehavior: Clip.antiAlias,
width: double.infinity, decoration: BoxDecoration(border: Border.all(color: Colors.grey, width: 1), borderRadius: BorderRadius.circular(12), color: Colors.white),
margin: EdgeInsets.only(top: 15), child: Column(
decoration: BoxDecoration( crossAxisAlignment: CrossAxisAlignment.start,
border: children: [
Border.all(color: Colors.grey, width: 1), SizedBox(
borderRadius: BorderRadius.circular(12), height: 6,
color: Colors.white), ),
child: Column( Container(
crossAxisAlignment: CrossAxisAlignment.start, width: double.infinity,
children: [ padding: EdgeInsets.only(left: 15, bottom: 15, top: 8, right: 15),
SizedBox( decoration: BoxDecoration(
height: 12, border: Border(
), bottom: BorderSide(
Container( color: Colors.grey,
width: double.infinity, width: 1.0,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
), ),
// borderRadius: BorderRadius.circular(12), ),
color: Colors.white), // borderRadius: BorderRadius.circular(12),
child: Column( ),
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Texts( children: [
TranslationBase Text(
.of(context) TranslationBase.of(context).requestID,
.requestID, style: TextStyle(
bold: false,
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
), ),
SizedBox( ),
height: 4, SizedBox(
height: 4,
),
Text(
order.iD.toString(),
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
), ),
Texts( ),
order.iD.toString(), ],
fontSize: 22,
),
],
),
), ),
Container( ),
width: double.infinity, Container(
padding: EdgeInsets.only( width: double.infinity,
left: 15, bottom: 15, top: 15,right: 15), padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: Colors.grey, color: Colors.grey,
width: 1.0, width: 1.0,
),
), ),
// borderRadius: BorderRadius.circular(12), ),
color: Colors.white), // borderRadius: BorderRadius.circular(12),
child: Column( ),
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Texts( children: [
TranslationBase Text(
.of(context) TranslationBase.of(context).OrderStatus,
.OrderStatus, style: TextStyle(
bold: false,
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
), ),
SizedBox( ),
height: 4, SizedBox(
height: 4,
),
Text(
projectViewModel.isArabic ? order.descriptionN : order.description,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
), ),
Texts( ),
],
projectViewModel.isArabic ? order
.descriptionN : order.description,
fontSize: 22,
),
],
),
), ),
Container( ),
width: double.infinity, Container(
padding: EdgeInsets.only( width: double.infinity,
left: 15, bottom: 15, top: 15,right: 15), padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: Colors.grey, color: Colors.grey,
width: 1.0, width: 1.0,
),
), ),
// borderRadius: BorderRadius.circular(12), ),
color: Colors.white), // borderRadius: BorderRadius.circular(12),
child: Column( ),
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Texts( children: [
TranslationBase.of(context).pickupDate, Text(
bold: false, TranslationBase.of(context).pickupDate,
style: TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
), ),
SizedBox( ),
height: 4, SizedBox(
height: 4,
),
Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)),
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
), ),
Texts( ),
DateUtil.getDayMonthYearDateFormatted( ],
DateUtil.convertStringToDate(order.createdOn)),
fontSize: 22,
),
],
),
), ),
Container( ),
width: double.infinity, Container(
padding: EdgeInsets.only( width: double.infinity,
left: 15, bottom: 15, top: 15,right: 15), clipBehavior: Clip.antiAlias,
decoration: BoxDecoration( padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15),
border: Border( decoration: BoxDecoration(
bottom: BorderSide( border: Border(
color: Colors.grey, bottom: BorderSide(
width: 1.0, color: (order.status == 1 || order.status == 2) ? Colors.grey : Colors.transparent,
), width: (order.status == 1 || order.status == 2) ? 1.0 : 0,
), ),
// borderRadius: BorderRadius.circular(12), ),
color: Colors.white), // borderRadius: BorderRadius.circular(12),
child: Column( ),
crossAxisAlignment: child: Column(
CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Text(
TranslationBase.of(context).orderLocation, TranslationBase.of(context).orderLocation,
bold: false, style: TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
), ),
SizedBox( ),
height: 4, SizedBox(
), height: 4,
Texts( ),
!projectViewModel.isArabic?order. Text(
projectDescription.toString() : !projectViewModel.isArabic ? order.projectDescription.toString() : order.projectDescriptionN.toString(),
order style: TextStyle(
.projectDescriptionN fontSize: 13,
.toString(), fontWeight: FontWeight.w600,
fontSize: 22, letterSpacing: -0.45,
), ),
], ),
), ],
),
SizedBox(
height: 12,
), ),
if (order.status == 1 ||order.status == 2 ) ),
(order.status == 1 || order.status == 2)
? SizedBox(
height: 12,
)
: Container(),
if (order.status == 1 || order.status == 2)
Center( Center(
child: Container( child: Container(
width: MediaQuery width: MediaQuery.of(context).size.width * 0.85,
.of(context)
.size
.width *
0.85,
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).cancel.toUpperCase(), label: TranslationBase.of(context).cancel.toUpperCase(),
onTap: () { onTap: () {
showConfirmMessage(model, showConfirmMessage(model, order);
order); },
}
,
color: Colors.red[800], color: Colors.red[800],
disabled: false, disabled: false,
textColor: Theme textColor: Theme.of(context).backgroundColor),
.of(context)
.backgroundColor),
), ),
), ),
SizedBox( (order.status == 1 || order.status == 2)
height: 22, ? SizedBox(
), height: 12,
], )
), : SizedBox(
); height: 2,
),
],
),
);
}).toList()) }).toList())
], ],
), ),

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -12,170 +14,87 @@ class StepsWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); return showRow();
return !projectViewModel.isArabic? Stack( }
children: [
Container(
height: 50,
width: MediaQuery.of(context).size.width,
color: Colors.transparent,
child: Center(
child: Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
),
),
Positioned(
top: 10,
left: 0,
child: InkWell(
onTap: () => changeCurrentTab(0),
child: Container(
width: 35,
height: 35,
decoration: BoxDecoration(
border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75),
shape: BoxShape.circle,
color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white,
),
child: Center(
child: Texts(
'1',
color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800],
),
),
),
),
),
Positioned(
top: 10,
left: MediaQuery.of(context).size.width * 0.42,
child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Container(
width: 35,
height: 35,
decoration: BoxDecoration(
border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75),
shape: BoxShape.circle,
color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white,
),
child: Center(
child: Texts(
'2',
color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800],
),
),
),
),
),
Positioned(
top: 10,
right: 0,
child: InkWell(
onTap: () => index == 2 ?changeCurrentTab(3) : null,
child: Container(
width: 35,
height: 35,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: Colors.black,width: 0.75),
color: index == 2 ? Colors.grey[800] : Colors.white,
),
child: Center(
child: Texts(
'3',
color: index == 2 ? Colors.white : Colors.grey[800],
),
),
),
),
),
], Widget showRow() {
):Stack( return Container(
children: [ width: double.infinity,
Container( child: Row(
height: 50, children: [
width: MediaQuery.of(context).size.width, InkWell(
color: Colors.transparent,
child: Center(
child: Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
),
),
Positioned(
top: 10,
right: 0,
child: InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab(0),
child: Container( child: Container(
width: 35, width: 35,
height: 35, height: 35,
decoration: BoxDecoration( decoration: containerColorRadiusBorder(
border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75), index == 0
shape: BoxShape.circle, ? CustomColors.accentColor
color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white, : index > 0
), ? Colors.green[700]
: Colors.white,
2000,
Colors.black),
child: Center( child: Center(
child: Texts( child: Text(
'1', "1",
color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800], style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
), ),
), ),
), ),
), ),
), Expanded(child: mDivider(Colors.grey)),
Positioned( InkWell(
top: 10,
left: MediaQuery.of(context).size.width * 0.42,
child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null, onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Container( child: Container(
width: 35, width: 35,
height: 35, height: 35,
decoration: BoxDecoration( decoration: containerColorRadiusBorder(
border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75), index == 1
shape: BoxShape.circle, ? CustomColors.accentColor
color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white, : index > 1
), ? Colors.green[700]
: Colors.white,
2000,
Colors.black),
child: Center( child: Center(
child: Texts( child: Text(
'2', "2",
color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800], style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
), ),
), ),
), ),
), ),
), Expanded(child: mDivider(Colors.grey)),
Positioned( InkWell(
top: 10, onTap: () => index == 2 ? changeCurrentTab(3) : null,
left: 0,
child: InkWell(
onTap: () => index == 2 ?changeCurrentTab(3) : null,
child: Container( child: Container(
width: 35, width: 35,
height: 35, height: 35,
decoration: BoxDecoration( decoration: containerColorRadiusBorder(
shape: BoxShape.circle, index == 2 ? CustomColors.accentColor : Colors.white,
border: Border.all(color: Colors.black,width: 0.75), 2000,
color: index == 2 ? Colors.grey[800] : Colors.white, Colors.black,
), ),
child: Center( child: Center(
child: Texts( child: Text(
'3', "3",
color: index == 2 ? Colors.white : Colors.grey[800], style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
), ),
), ),
), ),
), ),
), ],
], ),
); );
} }
} }

@ -14,6 +14,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dar
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart';
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
@ -24,6 +25,7 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
@ -176,7 +178,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: MedicalProfilePage(), page: MedicalProfilePageNew(),
), ),
); );
}, },
@ -197,9 +199,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
page: BookingOptions( page: Search(),
isAppbar: true,
),
), ),
), ),
imageLocation: 'assets/images/new-design/booking_icon_active.png', imageLocation: 'assets/images/new-design/booking_icon_active.png',
@ -230,7 +230,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
context, context,
FadePage(page: CovidDrivethruLocation()), FadePage(page: CovidDrivethruLocation()),
), ),
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png', imageLocation: 'assets/images/covid-car.png',
title: TranslationBase.of(context).covid19_driveThrueTest, title: TranslationBase.of(context).covid19_driveThrueTest,
), ),
ServicesContainer( ServicesContainer(
@ -276,7 +276,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: MyFamily(), page: MyFamily(),
), ),
), ),
imageLocation: 'assets/images/new-design/family_menu_icon_red.png', imageLocation: 'assets/images/new-design/family_icon_bottom_bar.png',
title: TranslationBase.of(context).myFamily, title: TranslationBase.of(context).myFamily,
), ),
if (projectViewModel.havePrivilege(35)) if (projectViewModel.havePrivilege(35))
@ -296,14 +296,6 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png', imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
// if (projectViewModel.havePrivilege(42))
// ServicesContainer(
// onTap: () => Navigator.push(
// context,
// FadePage(page: SymptomInfo()),
// ),
// imageLocation: 'assets/images/new-design/body_icon.png',
// title: TranslationBase.of(context).symptomCheckerTitle),
if (projectViewModel.havePrivilege(36)) if (projectViewModel.havePrivilege(36))
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(

@ -1,6 +1,6 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -40,16 +40,18 @@ class _DeliveryDueState extends State<DeliveryDue> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Delivery Due Date', showNewAppBar: true,
showNewAppBarTitle: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).pregnancyTitle,
body: Padding( body: Padding(
padding: EdgeInsets.symmetric(horizontal: 35.0, vertical: 20.0), padding: EdgeInsets.symmetric(horizontal: 35.0, vertical: 20.0),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
//mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
Texts( Texts(
'Congratulations, you are pregnant! Now when will the new baby arrive? To estimate the due date, enter the date when the last menstrual perios began (the first day), then click calculate.', TranslationBase.of(context).pregnancyDesc,
), ),
Divider( Divider(
//height: 2, //height: 2,
@ -58,7 +60,7 @@ class _DeliveryDueState extends State<DeliveryDue> {
Column( Column(
children: [ children: [
Texts( Texts(
'What was the date of the first day of the last period?', TranslationBase.of(context).pregnancyDateLabel,
), ),
InkWell( InkWell(
onTap: () { onTap: () {
@ -86,6 +88,7 @@ class _DeliveryDueState extends State<DeliveryDue> {
}, },
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
margin: EdgeInsets.only(top: 15.0),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
@ -95,7 +98,7 @@ class _DeliveryDueState extends State<DeliveryDue> {
Row( Row(
children: [ children: [
Icon(Icons.date_range), Icon(Icons.date_range),
Texts('Date'), Texts(TranslationBase.of(context).date),
], ],
), ),
Texts(getDate()), Texts(getDate()),
@ -111,9 +114,9 @@ class _DeliveryDueState extends State<DeliveryDue> {
Container( Container(
height: 50.0, height: 50.0,
width: 350.0, width: 350.0,
child: SecondaryButton( child: DefaultButton(
label: 'CALCULATE', TranslationBase.of(context).calculate,
onTap: () { () {
setState(() { setState(() {
{ {
Navigator.push( Navigator.push(

@ -1,5 +1,9 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -14,19 +18,17 @@ class DeliveryDueResult extends StatelessWidget {
var firstTrimester; var firstTrimester;
var secondTrimester; var secondTrimester;
var thirdTrimester; var thirdTrimester;
DeliveryDueResult(
{this.dateFrom, DeliveryDueResult({this.dateFrom, this.dateTo, this.conceivedDate, this.deliveryDue, this.firstTrimester, this.secondTrimester, this.thirdTrimester});
this.dateTo,
this.conceivedDate,
this.deliveryDue,
this.firstTrimester,
this.secondTrimester,
this.thirdTrimester});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Delivery Due Date', showNewAppBar: true,
showNewAppBarTitle: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).pregnancyTitle,
body: Padding( body: Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 12.0), padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 12.0),
child: SingleChildScrollView( child: SingleChildScrollView(
@ -37,23 +39,21 @@ class DeliveryDueResult extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
Texts( Texts(
'The next ovulation period is estimated to be:', TranslationBase.of(context).ovulationPeriod,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
Texts( Texts(
'From:', TranslationBase.of(context).from,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
Texts(DateFormat.yMMMEd().format(dateFrom), Texts(DateFormat.yMMMEd().format(dateFrom), fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)),
fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)),
Texts( Texts(
'To:', TranslationBase.of(context).to,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
Texts(DateFormat.yMMMEd().format(dateTo), Texts(DateFormat.yMMMEd().format(dateTo), fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)),
fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)),
Texts( Texts(
'You have conceived on:', TranslationBase.of(context).conceive,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
Texts( Texts(
@ -62,7 +62,7 @@ class DeliveryDueResult extends StatelessWidget {
fontSize: 21.0, fontSize: 21.0,
), ),
Texts( Texts(
'First Trimester Ends (12 weeks):', TranslationBase.of(context).firstTri,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
Texts( Texts(
@ -71,7 +71,7 @@ class DeliveryDueResult extends StatelessWidget {
fontSize: 21.0, fontSize: 21.0,
), ),
Texts( Texts(
'Second Trimester Ends (27 weeks):', TranslationBase.of(context).secondTri,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
Texts( Texts(
@ -80,7 +80,7 @@ class DeliveryDueResult extends StatelessWidget {
fontSize: 21.0, fontSize: 21.0,
), ),
Texts( Texts(
'Third Trimester, Estimated Due Date (40 weeks):', TranslationBase.of(context).thirdTri,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
Texts( Texts(
@ -90,13 +90,10 @@ class DeliveryDueResult extends StatelessWidget {
), ),
Container( Container(
width: 350, width: 350,
child: Button( child: DefaultButton(
label: 'See List Of Doctors', TranslationBase.of(context).seeDoctorsList,
onTap: () { () {
Navigator.push( getDoctorsList(context);
context,
FadePage(page: DoctorList()),
);
}, },
), ),
), ),
@ -107,4 +104,66 @@ class DeliveryDueResult extends StatelessWidget {
), ),
); );
} }
getDoctorsList(BuildContext context) {
GifLoaderDialogUtils.showMyDialog(context);
BariatricsService service = new BariatricsService();
List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
service.getCalculationDoctors(calculationID: 6).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['List_CalculationTable'].length);
if (res['MessageStatus'] == 1) {
if (res['List_CalculationTable'].length != 0) {
res['List_CalculationTable'].forEach((item) {
DoctorList docList = new DoctorList();
docList.clinicID = item['ClinicID'];
docList.clinicName = item['ClinicName'];
docList.doctorID = item['DoctorID'];
docList.doctorImageURL = item['DoctorImageURL'];
docList.name = item['DoctorName'];
docList.doctorTitle = item['DoctorTitle'];
docList.gender = item['Gender'];
docList.genderDescription = item['GenderDescription'];
docList.nationalityName = item['Nationality'];
docList.nationalityFlagURL = item['NationalityFlagURL'];
docList.projectID = item['ProjectID'];
docList.projectName = item['ProjectName'];
docList.actualDoctorRate = 0;
doctorsList.add(docList);
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else {
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: "0", patientDoctorAppointment: element));
}
});
Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: doctorsList,
patientDoctorAppointmentListHospital:
_patientDoctorAppointmentListHospital)));
}
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
} }

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -41,10 +43,6 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
return "${DateUtil.getMonth(selectedDateTime.month)} ${selectedDateTime.day}, ${selectedDateTime.year}"; return "${DateUtil.getMonth(selectedDateTime.month)} ${selectedDateTime.day}, ${selectedDateTime.year}";
} }
// void calculate() {}
//
// void calculateFertility(DateTime selectedDate) {const diff = Date.}
calculateBabyInformation() { calculateBabyInformation() {
setState(() { setState(() {
bloodSugarDate = selectedDateTime; bloodSugarDate = selectedDateTime;
@ -64,7 +62,10 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Ovulation Period', showNewAppBar: true,
showNewAppBarTitle: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).ovulation,
body: Padding( body: Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0), padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0),
child: SingleChildScrollView( child: SingleChildScrollView(
@ -73,7 +74,7 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts('Calculates Ovulation Period'), Texts(TranslationBase.of(context).ovulationDesc),
SizedBox( SizedBox(
height: 12.0, height: 12.0,
), ),
@ -108,7 +109,7 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Texts('Date'), Texts(TranslationBase.of(context).date),
Texts(getDate()), Texts(getDate()),
], ],
), ),
@ -118,7 +119,7 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
height: 5.0, height: 5.0,
), ),
Texts( Texts(
'Average Cycle Length (usually 28 days):', TranslationBase.of(context).cycleLabel,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
SizedBox( SizedBox(
@ -218,7 +219,7 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
], ],
), ),
Texts( Texts(
'Average Luteal Phase Length (usually 14 days):', TranslationBase.of(context).lutealLabel,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
SizedBox( SizedBox(
@ -323,9 +324,9 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
Container( Container(
height: 50.0, height: 50.0,
width: 350.0, width: 350.0,
child: SecondaryButton( child: DefaultButton(
label: 'CALCULATE', TranslationBase.of(context).calculate,
onTap: () { () {
calculateBabyInformation(); calculateBabyInformation();
Navigator.push( Navigator.push(
context, context,

@ -1,5 +1,10 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -27,8 +32,10 @@ class OvulationResult extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, showNewAppBar: true,
appBarTitle: 'Ovulation Period', showNewAppBarTitle: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).ovulation,
body: Padding( body: Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 15.0), padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 15.0),
child: SingleChildScrollView( child: SingleChildScrollView(
@ -78,7 +85,7 @@ class OvulationResult extends StatelessWidget {
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
Texts( Texts(
babyAge <= 0 ? "baby age is not available" : babyAge.toString() + " Weeks," + "3", babyAge <= 0 ? "baby age is not available" : babyAge.toString() + " Weeks",
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontSize: 21.0, fontSize: 21.0,
), ),
@ -93,13 +100,10 @@ class OvulationResult extends StatelessWidget {
), ),
Container( Container(
width: 350, width: 350,
child: Button( child: DefaultButton(
label: 'See List Of Doctors', TranslationBase.of(context).seeDoctorsList,
onTap: () { () {
Navigator.push( getDoctorsList(context);
context,
FadePage(page: DoctorList()),
);
}, },
), ),
), ),
@ -110,4 +114,67 @@ class OvulationResult extends StatelessWidget {
), ),
); );
} }
getDoctorsList(BuildContext context) {
GifLoaderDialogUtils.showMyDialog(context);
BariatricsService service = new BariatricsService();
List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
service.getCalculationDoctors(calculationID: 6).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['List_CalculationTable'].length);
if (res['MessageStatus'] == 1) {
if (res['List_CalculationTable'].length != 0) {
res['List_CalculationTable'].forEach((item) {
DoctorList docList = new DoctorList();
docList.clinicID = item['ClinicID'];
docList.clinicName = item['ClinicName'];
docList.doctorID = item['DoctorID'];
docList.doctorImageURL = item['DoctorImageURL'];
docList.name = item['DoctorName'];
docList.doctorTitle = item['DoctorTitle'];
docList.gender = item['Gender'];
docList.genderDescription = item['GenderDescription'];
docList.nationalityName = item['Nationality'];
docList.nationalityFlagURL = item['NationalityFlagURL'];
docList.projectID = item['ProjectID'];
docList.projectName = item['ProjectName'];
docList.actualDoctorRate = 0;
doctorsList.add(docList);
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else {
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: "0", patientDoctorAppointment: element));
}
});
Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: doctorsList,
patientDoctorAppointmentListHospital:
_patientDoctorAppointmentListHospital)));
}
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
} }

@ -16,9 +16,13 @@ class HealthConverter extends StatefulWidget {
class _HealthConverterState extends State<HealthConverter> { class _HealthConverterState extends State<HealthConverter> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
List<Widget> myMedicalList = myOptionsList(context);
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).converters, appBarTitle: TranslationBase.of(context).converters,
body: Column( body: Column(
children: [ children: [
@ -26,72 +30,66 @@ class _HealthConverterState extends State<HealthConverter> {
width: double.infinity, width: double.infinity,
height: 30, height: 30,
), ),
Row( Padding(
children: [ padding: EdgeInsets.only(left: 12, right: 12),
Expanded( child: GridView.builder(
flex: 1, shrinkWrap: true,
child: InkWell( primary: false,
onTap: () { physics: NeverScrollableScrollPhysics(),
Navigator.push( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
context, padding: EdgeInsets.zero,
FadePage(page: BloodSugar()), itemCount: myMedicalList.length,
); itemBuilder: (BuildContext context, int index) {
}, return myMedicalList[index];
child: MedicalProfileItem( },
title: TranslationBase.of(context).bloodSugar, ),
imagePath: 'blood_sugar_icon.png',
subTitle: TranslationBase.of(context).sugar,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: BloodCholesterol(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).bloodCholesterol,
imagePath: 'blood_cholesterol_icon.png',
subTitle: TranslationBase.of(context).cholesterol,
),
),
),
],
), ),
Row(
children: [
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: Triglycerides(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).triglycerides,
imagePath: 'triglycerides_blood_icon.png',
subTitle: TranslationBase.of(context).fatInBlood,
),
),
),
Expanded(
flex: 1,
child: Container(),
),
],
)
], ],
), ),
); );
} }
List<Widget> myOptionsList(BuildContext context) {
List<Widget> medical = List();
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: BloodSugar()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).bloodSugar,
imagePath: 'assets/images/new-design/blood_sugar_icon.png',
subTitle: TranslationBase.of(context).sugar,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: BloodCholesterol()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).bloodCholesterol,
imagePath: 'assets/images/new-design/blood_cholesterol_icon.png',
subTitle: TranslationBase.of(context).cholesterol,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: Triglycerides()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).triglycerides,
imagePath: 'assets/images/new-design/triglycerides_blood_icon.png',
subTitle: TranslationBase.of(context).fatInBlood,
isPngImage: true,
),
));
return medical;
}
} }

@ -7,7 +7,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
const activeCardColor = Color(0xff70777A); const activeCardColor = Color(0xffD02127);
const inactiveCardColor = Color(0xffFAFAFd); const inactiveCardColor = Color(0xffFAFAFd);
class BloodCholesterol extends StatefulWidget { class BloodCholesterol extends StatefulWidget {
@ -65,6 +65,8 @@ class _BloodCholesterolState extends State<BloodCholesterol> {
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).bloodCholesterol, appBarTitle: TranslationBase.of(context).bloodCholesterol,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
body: Padding( body: Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView( child: SingleChildScrollView(

@ -1,13 +1,12 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
const activeCardColor = Color(0xff515a5d); const activeCardColor = Color(0xffD02127);
const activeTextColor = Color(0xffFAFAFA); const activeTextColor = Color(0xffFAFAFA);
const inactiveCardColor = Color(0xffFAFAFA); const inactiveCardColor = Color(0xffFAFAFA);
const inactiveTextColor = Color(0xff60686B); const inactiveTextColor = Color(0xff60686B);
@ -81,6 +80,8 @@ class _BloodSugarState extends State<BloodSugar> {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).bloodSugarConversion, appBarTitle: TranslationBase.of(context).bloodSugarConversion,
body: Container( body: Container(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
@ -89,13 +90,11 @@ class _BloodSugarState extends State<BloodSugar> {
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
//crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 8), margin: EdgeInsets.symmetric(horizontal: 8),
child: Text( child: Text(
TranslationBase.of(context).convertBloodSugarStatement, TranslationBase.of(context).convertBloodSugarStatement,
//textAlign: TextAlign.center,
style: TextStyle(fontSize: 20.0), style: TextStyle(fontSize: 20.0),
), ),
), ),
@ -105,13 +104,11 @@ class _BloodSugarState extends State<BloodSugar> {
Container( Container(
color: Colors.white, color: Colors.white,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 8),
vertical: 16.0, horizontal: 8),
child: Column( child: Column(
children: [ children: [
Padding( Padding(
padding: padding: const EdgeInsets.symmetric(horizontal: 16.0),
const EdgeInsets.symmetric(horizontal: 16.0),
child: Row( child: Row(
children: [ children: [
Texts( Texts(
@ -144,19 +141,16 @@ class _BloodSugarState extends State<BloodSugar> {
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 1,
blurRadius: 7, blurRadius: 7,
offset: Offset(0, offset: Offset(0, 3), // changes position of shadow
3), // changes position of shadow
), ),
], ],
color: cardMGColor, color: cardMGColor,
borderRadius: borderRadius: BorderRadius.circular(3.0),
BorderRadius.circular(3.0),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
vertical: 0.0, horizontal: 18.0),
child: Texts( child: Texts(
'MG/DLt TO \nMMOL/L', 'MG/DLt TO \nMMOL/L',
color: textMGColor, color: textMGColor,
@ -180,21 +174,18 @@ class _BloodSugarState extends State<BloodSugar> {
height: 65.0, height: 65.0,
decoration: BoxDecoration( decoration: BoxDecoration(
color: cardMMOLColor, color: cardMMOLColor,
borderRadius: borderRadius: BorderRadius.circular(3.0),
BorderRadius.circular(3.0),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset(0, offset: Offset(0, 3), // changes position of shadow
3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(horizontal: 16.0),
horizontal: 16.0),
child: Texts( child: Texts(
'MMOL/L TO MG/DLt ', 'MMOL/L TO MG/DLt ',
color: textMMOLColor, color: textMMOLColor,
@ -229,8 +220,7 @@ class _BloodSugarState extends State<BloodSugar> {
], ],
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
decoration: InputDecoration( decoration: InputDecoration(
labelText: labelText: TranslationBase.of(context).enterReadingValue,
TranslationBase.of(context).enterReadingValue,
enabledBorder: UnderlineInputBorder( enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white), borderSide: BorderSide(color: Colors.white),
), ),
@ -240,8 +230,7 @@ class _BloodSugarState extends State<BloodSugar> {
focusedBorder: UnderlineInputBorder( focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white), borderSide: BorderSide(color: Colors.white),
), ),
border: UnderlineInputBorder( border: UnderlineInputBorder(borderSide: BorderSide(color: Colors.white)),
borderSide: BorderSide(color: Colors.white)),
labelStyle: TextStyle( labelStyle: TextStyle(
color: Colors.black87, color: Colors.black87,
), ),
@ -275,8 +264,7 @@ class _BloodSugarState extends State<BloodSugar> {
style: TextStyle(fontSize: 35.0), style: TextStyle(fontSize: 35.0),
), ),
Padding( Padding(
padding: padding: EdgeInsets.only(left: 4.0, top: 10.0),
EdgeInsets.only(left: 4.0, top: 10.0),
child: Text( child: Text(
unit.toString(), unit.toString(),
style: TextStyle( style: TextStyle(
@ -299,18 +287,12 @@ class _BloodSugarState extends State<BloodSugar> {
), ),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 16), margin: EdgeInsets.symmetric(horizontal: 16),
child: SecondaryButton( child: DefaultButton(TranslationBase.of(context).calculate, () {
label: TranslationBase.of(context).calculate, setState(() {
color: Color(0XFF515A5D), _visible == false ? _visible = !_visible : _visible = _visible;
onTap: () { calculateBloodSugar();
setState(() { });
_visible == false }),
? _visible = !_visible
: _visible = _visible;
calculateBloodSugar();
});
},
),
), ),
], ],
), ),

@ -67,6 +67,8 @@ class _TriglyceridesState extends State<Triglycerides> {
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).triglycerides, appBarTitle: TranslationBase.of(context).triglycerides,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
body: Padding( body: Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView( child: SingleChildScrollView(

@ -1,16 +1,16 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/qr_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/qr_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../d_q_icons_icons.dart'; import '../../d_q_icons_icons.dart';
class ParkingPage extends StatelessWidget { class ParkingPage extends StatelessWidget {
@ -21,11 +21,11 @@ class ParkingPage extends StatelessWidget {
onModelReady: (model) => model.getIsSaveParking(), onModelReady: (model) => model.getIsSaveParking(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).parking, appBarTitle: TranslationBase.of(context).parking,
description: TranslationBase.of(context).parkingDescription, description: TranslationBase.of(context).parkingDescription,
imagesInfo: [ imagesInfo: [ImagesInfo(imageAr: 'assets/images/bc_parking.png', imageEn: 'assets/images/bc_parking.png', isAsset: true)],
ImagesInfo(imageAr: 'assets/images/bc_parking.png', imageEn: 'assets/images/bc_parking.png', isAsset: true)
],
body: SingleChildScrollView( body: SingleChildScrollView(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: !model.isSavePark child: !model.isSavePark
@ -61,10 +61,7 @@ class ParkingPage extends StatelessWidget {
child: Container( child: Container(
height: 150, height: 150,
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -86,16 +83,13 @@ class ParkingPage extends StatelessWidget {
Container( Container(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
height: 70, height: 70,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(TranslationBase.of(context).showMyPark), Texts(TranslationBase.of(context).showMyPark),
Texts(projectViewModel.isArabic Texts(projectViewModel.isArabic ? model.qrParkingModel.floorDescriptionN : model.qrParkingModel.floorDescription),
? model.qrParkingModel.floorDescriptionN
: model.qrParkingModel.floorDescription),
], ],
), ),
), ),
@ -103,8 +97,7 @@ class ParkingPage extends StatelessWidget {
height: 15, height: 15,
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
width: double.infinity, width: double.infinity,
height: 70, height: 70,
@ -112,9 +105,7 @@ class ParkingPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(TranslationBase.of(context).gate), Texts(TranslationBase.of(context).gate),
Texts(projectViewModel.isArabic Texts(projectViewModel.isArabic ? model.qrParkingModel.gateDescriptionN : model.qrParkingModel.gateDescription),
? model.qrParkingModel.gateDescriptionN
: model.qrParkingModel.gateDescription),
], ],
), ),
), ),
@ -122,8 +113,7 @@ class ParkingPage extends StatelessWidget {
height: 15, height: 15,
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
width: double.infinity, width: double.infinity,
height: 70, height: 70,
@ -131,9 +121,7 @@ class ParkingPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(TranslationBase.of(context).building), Texts(TranslationBase.of(context).building),
Texts(projectViewModel.isArabic Texts(projectViewModel.isArabic ? model.qrParkingModel.buildingDescriptionN : model.qrParkingModel.buildingDescription),
? model.qrParkingModel.buildingDescriptionN
: model.qrParkingModel.buildingDescription),
], ],
), ),
), ),
@ -142,17 +130,14 @@ class ParkingPage extends StatelessWidget {
), ),
Container( Container(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
width: double.infinity, width: double.infinity,
height: 70, height: 70,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(TranslationBase.of(context).branch), Texts(TranslationBase.of(context).branch),
Texts(projectViewModel.isArabic Texts(projectViewModel.isArabic ? model.qrParkingModel.branchDescriptionN : model.qrParkingModel.branchDescription),
? model.qrParkingModel.branchDescriptionN
: model.qrParkingModel.branchDescription),
], ],
), ),
), ),
@ -170,13 +155,7 @@ class ParkingPage extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Container( Container(
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( child: DefaultButton(TranslationBase.of(context).readBarcode, () => {model.readQr()}),
onTap: () async {
model.readQr();
},
label: TranslationBase.of(context).readBarcode,
loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor),
), ),
], ],
), ),
@ -189,16 +168,14 @@ class ParkingPage extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Container( Container(
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( child: DefaultButton(
onTap: () async { TranslationBase.of(context).showMyPark,
MapsLauncher.launchCoordinates( () => {
model.qrParkingModel.latitude, MapsLauncher.launchCoordinates(
model.qrParkingModel.longitude, model.qrParkingModel.latitude,
); model.qrParkingModel.longitude,
}, ),
disabled: model.qrParkingModel.longitude == 0, }),
label: TranslationBase.of(context).showMyPark,
textColor: Theme.of(context).backgroundColor),
), ),
SizedBox( SizedBox(
height: 12, height: 12,

@ -1,17 +1,17 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:provider/provider.dart';
import 'health_calculator/bmi_calculator/bmi_calculator.dart'; import 'health_calculator/bmi_calculator/bmi_calculator.dart';
import 'health_calculator/bmr_calculator/bmr_calculator.dart'; import 'health_calculator/bmr_calculator/bmr_calculator.dart';
import 'health_calculator/calorie_calculator/calorie_calculator.dart';
import 'health_calculator/delivery_due/delivery_due.dart'; import 'health_calculator/delivery_due/delivery_due.dart';
import 'health_calculator/ideal_body/ideal_body.dart'; import 'health_calculator/ideal_body/ideal_body.dart';
@ -22,6 +22,7 @@ class HealthCalculators extends StatefulWidget {
class _HealthCalculatorsState extends State<HealthCalculators> with SingleTickerProviderStateMixin { class _HealthCalculatorsState extends State<HealthCalculators> with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
void initState() { void initState() {
super.initState(); super.initState();
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
@ -34,249 +35,216 @@ class _HealthCalculatorsState extends State<HealthCalculators> with SingleTicker
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
List<Widget> generalHealthList = getGeneralHealthList(context);
List<Widget> womenHealthList = getWomenHealthList(context);
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).calculators, appBarTitle: TranslationBase.of(context).calculators,
body: Scaffold( body: Column(
extendBodyBehindAppBar: true, children: [
appBar: PreferredSize( TabBar(
preferredSize: Size.fromHeight(70.0), controller: _tabController,
child: Stack( isScrollable: true,
children: [ indicatorWeight: 4.0,
Center( indicatorColor: Colors.red,
child: Container( labelColor: Theme.of(context).buttonColor,
height: 60.0, labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
margin: EdgeInsets.only(top: 10.0), unselectedLabelColor: Colors.grey,
width: MediaQuery.of(context).size.width * 1.9, labelStyle: TextStyle(
decoration: BoxDecoration( fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
border: Border( fontSize: 16,
bottom: BorderSide( fontWeight: FontWeight.w600,
color: Theme.of(context).dividerColor, letterSpacing: -0.48,
width: 5.7, ),
), tabs: <Widget>[
), Container(
color: Colors.white, width: MediaQuery.of(context).size.width * 0.35,
), child: Center(
child: Center( child: Text(TranslationBase.of(context).generalHealth),
child: TabBar(
controller: _tabController,
isScrollable: true,
indicatorWeight: 4.0,
indicatorColor: Colors.red,
labelColor: Theme.of(context).buttonColor,
labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
unselectedLabelColor: Colors.grey,
tabs: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Texts(TranslationBase.of(context).generalHealth),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Texts(TranslationBase.of(context).womanHealth),
),
),
],
),
),
), ),
) ),
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Text(TranslationBase.of(context).womanHealth),
),
),
], ],
), ),
), Expanded(
body: Column( child: TabBarView(
children: [ physics: NeverScrollableScrollPhysics(),
Expanded( controller: _tabController,
child: TabBarView( children: [
physics: BouncingScrollPhysics(), Container(
controller: _tabController, margin: EdgeInsets.all(20.0),
children: [ child: Column(
Container( children: [
child: Column( Padding(
children: [ padding: EdgeInsets.only(left: 12, right: 12),
Container( child: GridView.builder(
width: double.infinity, shrinkWrap: true,
height: 80, primary: false,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: generalHealthList.length,
itemBuilder: (BuildContext context, int index) {
return generalHealthList[index];
},
), ),
Row( ),
children: [ ],
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(page: BMICalculator()),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).bmi,
imagePath: 'bmi_health_calculator.png',
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: CalorieCalculator(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).calories,
imagePath: 'calories-calculator.png',
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
],
),
Row(
children: [
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: BmrCalculator(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).bmr,
imagePath: 'BMR_calculator.png',
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: IdealBody(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).idealBody,
imagePath: 'body_weight.png',
subTitle: TranslationBase.of(context).weight,
),
),
),
],
),
Row(
children: [
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: BodyFat(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).bodyWord,
imagePath: 'body_fat.png',
subTitle: TranslationBase.of(context).fat,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: Carbs(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).carbohydrate,
imagePath: 'carb_protein.png',
subTitle: TranslationBase.of(context).proteinFat,
),
),
),
],
),
],
),
), ),
Container( ),
child: Column( Container(
children: [ margin: EdgeInsets.all(20.0),
Container( child: Column(
width: double.infinity, children: [
height: 80, Padding(
), padding: EdgeInsets.only(left: 12, right: 12),
Row( child: GridView.builder(
children: [ shrinkWrap: true,
Expanded( primary: false,
flex: 1, physics: NeverScrollableScrollPhysics(),
child: InkWell( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
onTap: () { padding: EdgeInsets.zero,
Navigator.push( itemCount: womenHealthList.length,
context, itemBuilder: (BuildContext context, int index) {
FadePage(page: OvulationPeriod()), return womenHealthList[index];
); },
},
child: MedicalProfileItem(
title: TranslationBase.of(context).ovulation,
imagePath: 'ovulation_period_icon.png',
subTitle: TranslationBase.of(context).period,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: DeliveryDue(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).delivery,
imagePath: 'delivery_date_icon.png',
subTitle: TranslationBase.of(context).dueDate,
),
),
),
],
), ),
], ),
), ],
), ),
], ),
), ],
) ),
], ),
), ],
), ),
); );
} }
List<Widget> getGeneralHealthList(BuildContext context) {
List<Widget> medical = List();
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: BMICalculator()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).bmi,
imagePath: 'assets/images/new-design/bmi_health_calculator.png',
subTitle: TranslationBase.of(context).calcHealth,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: CalorieCalculator()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).calories,
imagePath: 'assets/images/new-design/calories-calculator.png',
subTitle: TranslationBase.of(context).calcHealth,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: BmrCalculator()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).bmr,
imagePath: 'assets/images/new-design/BMR_calculator.png',
subTitle: TranslationBase.of(context).calcHealth,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: IdealBody()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).idealBody,
imagePath: 'assets/images/new-design/body_weight.png',
subTitle: TranslationBase.of(context).weight,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: BodyFat()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).bodyWord,
imagePath: 'assets/images/new-design/body_fat.png',
subTitle: TranslationBase.of(context).fat,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: Carbs()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).carbohydrate,
imagePath: 'assets/images/new-design/carb_protein.png',
subTitle: TranslationBase.of(context).proteinFat,
isPngImage: true,
),
));
return medical;
}
List<Widget> getWomenHealthList(BuildContext context) {
List<Widget> medical = List();
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: OvulationPeriod()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).ovulation,
imagePath: 'assets/images/new-design/ovulation_period_icon.png',
subTitle: TranslationBase.of(context).period,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: DeliveryDue()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).delivery,
imagePath: 'assets/images/new-design/delivery_date_icon.png',
subTitle: TranslationBase.of(context).dueDate,
isPngImage: true,
),
));
return medical;
}
} }

@ -17,7 +17,7 @@ import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectCiteisD
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -83,6 +83,8 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
onModelReady: (model) => model.getCities(), //model.getHospitals(), onModelReady: (model) => model.getCities(), //model.getHospitals(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
baseViewModel: model, baseViewModel: model,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
description: TranslationBase.of(context).bloodDonationInfo, description: TranslationBase.of(context).bloodDonationInfo,
@ -108,10 +110,10 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor), decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [Texts(getHospitalName(projectProvider, context)), Icon(Icons.arrow_drop_down)], children: [Texts(getHospitalName(projectProvider, context), color: Colors.black), Icon(Icons.arrow_drop_down)],
), ),
), ),
), ),
@ -121,17 +123,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
InkWell( InkWell(
//======Gender======== //======Gender========
onTap: () => confirmSelectGenderDialog(), onTap: () => confirmSelectGenderDialog(),
//confirmSelectBeneficiaryDialog(model),
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor), decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
//Texts(getBeneficiaryType()), Texts(getGender(context), color: Colors.black),
Texts(getGender(context)),
Icon(Icons.arrow_drop_down) Icon(Icons.arrow_drop_down)
], ],
), ),
@ -143,19 +143,14 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
InkWell( InkWell(
//======Gender======== //======Gender========
onTap: () => confirmSelectBloodDialog(), onTap: () => confirmSelectBloodDialog(),
//confirmSelectBeneficiaryDialog(model),
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor), decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [Texts(getBlood(), color: Colors.black), Icon(Icons.arrow_drop_down)],
//Texts(getBeneficiaryType()),
Texts(getBlood()),
Icon(Icons.arrow_drop_down)
],
), ),
), ),
), ),
@ -163,12 +158,13 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
height: 12, height: 12,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Container( Container(
child: Text(TranslationBase.of(context).viewTermsConditions), child: Text(
), TranslationBase.of(context).viewTermsConditions + ":",
SizedBox( style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold),
width: MediaQuery.of(context).size.height * 0.10, ),
), ),
InkWell( InkWell(
onTap: () { onTap: () {
@ -178,6 +174,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
child: Texts( child: Texts(
TranslationBase.of(context).clickHere, TranslationBase.of(context).clickHere,
color: Colors.blue, color: Colors.blue,
fontSize: 14.0,
), ),
), ),
) )
@ -194,22 +191,12 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
checkedValue = value; checkedValue = value;
}); });
}, },
// tristate: checkedValue==true,//i == 1,
value: checkedValue, value: checkedValue,
activeColor: Color(0xFFc5272d), //Color(0xFF6200EE), activeColor: Color(0xFFc5272d),
),
SizedBox(
height: 10,
),
Row(
children: [],
),
SizedBox(
width: 10,
), ),
Text( Text(
TranslationBase.of(context).iAgreeToTheTermsAndConditions, TranslationBase.of(context).iAgreeToTheTermsAndConditions,
style: Theme.of(context).textTheme.subtitle1.copyWith(color: checkedValue ? Color(0xFFc5272d) : Colors.black), style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold),
), ),
], ],
), ),
@ -239,7 +226,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
onlyCancelButton: true, onlyCancelButton: true,
)); ));
}, },
child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png')), child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png'), color: Colors.white),
), ),
), ),
), ),
@ -253,41 +240,27 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: DefaultButton(TranslationBase.of(context).save, () async {
textColor: Colors.white, if (_selectedHospital == null) {
color: checkedValue == false AppToast.showErrorToast(message: TranslationBase.of(context).selectCity);
? Color(0xFFa0a4a6) return;
: Color.fromRGBO( }
63, bloodDetails.city = projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
72, bloodDetails.cityCode = _selectedHospital.iD.toString();
74, bloodDetails.gender = gender == Gender.Male ? 1 : 2;
1, await model.updateBloodGroup(bloodDetails);
), if (model.state == ViewState.Idle) {
label: TranslationBase.of(context).save, AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage);
onTap: () async { } else {
if (_selectedHospital == null) { AppToast.showErrorToast(message: model.error);
AppToast.showErrorToast(message: TranslationBase.of(context).selectCity); }
return; }),
}
bloodDetails.city = projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
bloodDetails.cityCode = _selectedHospital.iD.toString();
bloodDetails.gender = gender == Gender.Male ? 1 : 2;
await model.updateBloodGroup(bloodDetails);
if (model.state == ViewState.Idle) {
AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage);
} else {
AppToast.showErrorToast(message: model.error);
}
},
),
)), )),
); );
} }
//==============
void confirmSelectBeneficiaryDialog(MyBalanceViewModel model) { void confirmSelectBeneficiaryDialog(MyBalanceViewModel model) {
showDialog( showDialog(
context: context, context: context,

@ -12,6 +12,8 @@ class UserAgreementPage extends StatelessWidget {
onModelReady: (model) => model.getUserTermsAndConditions(), onModelReady: (model) => model.getUserTermsAndConditions(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBarTitle: true,
showNewAppBar: true,
appBarTitle: TranslationBase.of(context).userAgreement, appBarTitle: TranslationBase.of(context).userAgreement,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Html( child: Html(

@ -112,7 +112,7 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
widget.doctor.nationalityFlagURL, widget.doctor.nationalityFlagURL,
widget.doctor.doctorRate, widget.doctor.doctorRate,
widget.doctor.actualDoctorRate, widget.doctor.actualDoctorRate,
widget.doctor.noOfPatientsRate, widget.docProfileList.noOfPatientsRate,
"", "",
), ),
buttonIcon: 'assets/images/new/Boo_ Appointment.svg', buttonIcon: 'assets/images/new/Boo_ Appointment.svg',

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -43,7 +44,6 @@ class _QRCodeState extends State<QRCode> {
widget.authUser = new AuthenticatedUser(); widget.authUser = new AuthenticatedUser();
NFC.isNDEFSupported.then((supported) { NFC.isNDEFSupported.then((supported) {
setState(() { setState(() {
print("nfc supprted");
_supportsNFC = true; _supportsNFC = true;
}); });
}); });
@ -56,6 +56,8 @@ class _QRCodeState extends State<QRCode> {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).attendRegisterCode, appBarTitle: TranslationBase.of(context).attendRegisterCode,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
@ -146,7 +148,7 @@ class _QRCodeState extends State<QRCode> {
child: Text(TranslationBase.of(context).appoInfo, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)), child: Text(TranslationBase.of(context).appoInfo, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(left: 20.0, bottom: 20.0), margin: EdgeInsets.only(left: 20.0, bottom: 20.0, right: 20.0),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
color: Colors.grey[200], color: Colors.grey[200],
@ -161,10 +163,11 @@ class _QRCodeState extends State<QRCode> {
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.doctorNameObj, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)), child: Text(widget.patientShareResponse.doctorNameObj, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
), ),
Container( if (getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality) != "null\n")
margin: EdgeInsets.only(bottom: 10.0, left: 20.0, right: 20.0), Container(
child: Text(getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])), margin: EdgeInsets.only(bottom: 10.0, left: 20.0, right: 20.0),
), child: Text(getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
Container( Container(
margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0), margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.projectName, style: TextStyle(fontSize: 18.0, color: Colors.grey[700])), child: Text(widget.patientShareResponse.projectName, style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
@ -177,57 +180,12 @@ class _QRCodeState extends State<QRCode> {
), ),
), ),
Container( Container(
margin: EdgeInsets.zero, margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 15.0),
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
ButtonTheme( DefaultButton(TranslationBase.of(context).sendEmail.toUpperCase(), () => {sendEmail()})
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: new Color(0xFFbcc2c4),
onPressed: () {
// navigateToQR(context);
// getAppoQR(context);
sendEmail();
},
child: Text(TranslationBase.of(context).sendEmail.toUpperCase(), style: TextStyle(fontSize: 18.0)),
),
),
],
),
),
Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.1,
margin: EdgeInsets.only(bottom: 20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
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: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(TranslationBase.of(context).close.toUpperCase(), style: TextStyle(fontSize: 18.0)),
),
),
], ],
), ),
), ),

@ -1,10 +1,12 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'components/SearchByClinic.dart'; import 'components/SearchByClinic.dart';
@ -31,6 +33,7 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AppGlobal.context = context; AppGlobal.context = context;
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
isShowDecPage: false, isShowDecPage: false,
@ -46,11 +49,13 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
unselectedLabelColor: Color(0xff575757), unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle( labelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
unselectedLabelStyle: TextStyle( unselectedLabelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,

@ -43,7 +43,7 @@ class _SearchResultsState extends State<SearchResults> {
}, },
itemBuilder: (context, index) { itemBuilder: (context, index) {
return AppExpandableNotifier( return AppExpandableNotifier(
title: widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km, title: (widget.patientDoctorAppointmentListHospital[index].distanceInKMs != "0") ? widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km : widget.patientDoctorAppointmentListHospital[index].filterName,
isTitleSingleLine: false, isTitleSingleLine: false,
bodyWidget: ListView.separated( bodyWidget: ListView.separated(
shrinkWrap: true, shrinkWrap: true,

@ -53,11 +53,10 @@ class DoctorView extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (doctor.doctorTitle != null) Text(
Text( doctor.name,
doctor.doctorTitle + " " + doctor.name, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), ),
),
if (doctor.doctorTitle != null) SizedBox(height: 6), if (doctor.doctorTitle != null) SizedBox(height: 6),
Row( Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

@ -26,6 +26,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/countdown_timer_controller.dart'; import 'package:flutter_countdown_timer/countdown_timer_controller.dart';
import 'package:flutter_countdown_timer/current_remaining_time.dart'; import 'package:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
@ -114,12 +115,13 @@ class _ToDoState extends State<ToDo> {
children: <Widget>[ children: <Widget>[
Image.asset("assets/images/new-design/time_icon.png", width: 20.0, height: 20.0), Image.asset("assets/images/new-design/time_icon.png", width: 20.0, height: 20.0),
Container( Container(
width: MediaQuery.of(context).size.width * 0.4,
margin: EdgeInsets.only(left: 10.0, right: 10.0), margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Text( child: Text(
DateUtil.getWeekDayMonthDayYearDateFormatted( DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(widget.appoList[index].appointmentDate), projectViewModel.isArabic ? "ar" : "en") + DateUtil.convertStringToDate(widget.appoList[index].appointmentDate), projectViewModel.isArabic ? "ar" : "en") +
" " + " " +
widget.appoList[index].startTime.substring(0, 5), widget.appoList[index].startTime.substring(0, 5), overflow: TextOverflow.clip,
style: TextStyle(fontSize: 10.0)), style: TextStyle(fontSize: 10.0)),
), ),
!widget.appoList[index].isLiveCareAppointment ? Image.asset("assets/images/new-design/hospital_address_icon.png", width: 20.0, height: 20.0) : Container(), !widget.appoList[index].isLiveCareAppointment ? Image.asset("assets/images/new-design/hospital_address_icon.png", width: 20.0, height: 20.0) : Container(),
@ -161,11 +163,12 @@ class _ToDoState extends State<ToDo> {
children: <Widget>[ children: <Widget>[
Text(widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj, Text(widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj,
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.bold, letterSpacing: 1.0)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.bold, letterSpacing: 1.0)),
Container( if (getDoctorSpeciality(widget.appoList[index].doctorSpeciality) != "null\n")
margin: EdgeInsets.only(top: 3.0, bottom: 3.0), Container(
child: Text(getDoctorSpeciality(widget.appoList[index].doctorSpeciality).trim(), margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)), child: Text(getDoctorSpeciality(widget.appoList[index].doctorSpeciality).trim(),
), style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)),
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
@ -189,7 +192,7 @@ class _ToDoState extends State<ToDo> {
widgetBuilder: (_, CurrentRemainingTime time) { widgetBuilder: (_, CurrentRemainingTime time) {
return time != null return time != null
? Text( ? Text(
'${time.days != null ? time.days : "0"}:${time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours}:${time.min}:${time.sec} ' + '${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} ' +
TranslationBase.of(context).upcomingTimeLeft, TranslationBase.of(context).upcomingTimeLeft,
style: TextStyle(fontSize: 12.0, color: Color(0xff40ACC9))) style: TextStyle(fontSize: 12.0, color: Color(0xff40ACC9)))
: Container(); : Container();
@ -229,7 +232,7 @@ class _ToDoState extends State<ToDo> {
Expanded( Expanded(
flex: 2, flex: 2,
child: Container( child: Container(
child: Text(getNextActionDescription(widget.appoList[index].nextAction), style: TextStyle(fontSize: 12.0, color: Colors.grey[700])), child: Text(getNextActionDescription(widget.appoList[index].nextAction), style: TextStyle(fontSize: 11.0, color: Colors.grey[700])),
), ),
), ),
Expanded( Expanded(
@ -240,7 +243,7 @@ class _ToDoState extends State<ToDo> {
}, },
child: Container( child: Container(
child: Text(TranslationBase.of(context).upcomingDetails, child: Text(TranslationBase.of(context).upcomingDetails,
textAlign: TextAlign.end, style: TextStyle(fontSize: 12.0, color: new Color(0xFF40ACC9), decoration: TextDecoration.underline)), textAlign: TextAlign.end, style: TextStyle(fontSize: 11.0, color: new Color(0xFF40ACC9), decoration: TextDecoration.underline)),
), ),
), ),
) )
@ -264,10 +267,23 @@ class _ToDoState extends State<ToDo> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
widget.appoList[index].isLiveCareAppointment ? Image.asset("assets/images/new-design/video.png") : Image.asset("assets/images/new-design/walkin.png"), widget.appoList[index].clinicID == 265
widget.appoList[index].isLiveCareAppointment ? Container(
? Text(TranslationBase.of(context).videoAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0)) margin: EdgeInsets.only(left: 5.0, right: 5.0),
: Text(TranslationBase.of(context).walkinAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0)) child: SvgPicture.asset(
"assets/images/new/car_icon.svg",
height: 15,
width: 15,
),
)
: widget.appoList[index].isLiveCareAppointment
? Image.asset("assets/images/new-design/video.png")
: Image.asset("assets/images/new-design/walkin.png"),
widget.appoList[index].clinicID == 265
? Text(TranslationBase.of(context).drivethruAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
: widget.appoList[index].isLiveCareAppointment
? Text(TranslationBase.of(context).videoAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
: Text(TranslationBase.of(context).walkinAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
], ],
), ),
), ),
@ -304,7 +320,7 @@ class _ToDoState extends State<ToDo> {
break; break;
case 30: case 30:
return "assets/images/new-design/qr_code_button.png"; return "assets/images/new-design/NFCIcon_option2.png";
break; break;
case 40: case 40:
@ -320,7 +336,7 @@ class _ToDoState extends State<ToDo> {
break; break;
case 90: case 90:
return "assets/images/new-design/check-in.png"; return "assets/images/new-design/NFCIcon_option2.png";
break; break;
default: default:
@ -410,7 +426,11 @@ class _ToDoState extends State<ToDo> {
break; break;
case 30: case 30:
return TranslationBase.of(context).upcomingQR; return TranslationBase.of(context).upcomingQRNFC;
break;
case 90:
return TranslationBase.of(context).upcomingQRNFC;
break; break;
case 40: case 40:
@ -549,7 +569,6 @@ class _ToDoState extends State<ToDo> {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.generateAppointmentQR(patientShareResponse, context).then((res) { service.generateAppointmentQR(patientShareResponse, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res);
navigateToQR(context, res['AppointmentQR'], patientShareResponse); navigateToQR(context, res['AppointmentQR'], patientShareResponse);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);

@ -81,10 +81,11 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
navigateTo(context, MedicalProfilePageNew()); navigateTo(context, MedicalProfilePageNew());
}, },
child: LoggedSliderView( child: LoggedSliderView(
projectViewModel, projectViewModel,
new SliderData(TranslationBase.of(context).fileno + ": " + projectViewModel.user.patientID.toString(), projectViewModel.user.firstName + ' ' + projectViewModel.user.lastName, new SliderData(TranslationBase.of(context).fileno + ": " + projectViewModel.user.patientID.toString(), projectViewModel.user.firstName + ' ' + projectViewModel.user.lastName,
"", bannerColor[0].darkColor, bannerColor[0].lightColor), "", bannerColor[0].darkColor, bannerColor[0].lightColor),
widget.model), widget.model,
),
), ),
), ),
) )

@ -11,7 +11,6 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
@ -22,9 +21,7 @@ import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' as family; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' as family;
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/HMGNetworkConnectivity.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart';
@ -33,6 +30,7 @@ import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.da
import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart'; import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -41,7 +39,7 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import '../../locator.dart'; import '../../locator.dart';
import '../../routes.dart'; import '../../routes.dart';
@ -252,10 +250,10 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_firebaseMessaging.getToken().then((String token) { _firebaseMessaging.getToken().then((String token) {
print("Firebase Token: " + token); print("Firebase Token: " + token);
sharedPref.setString(PUSH_TOKEN, token); sharedPref.setString(PUSH_TOKEN, token);
if (token != null && DEVICE_TOKEN == "") { if (token != null) {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
checkUserStatus(token); checkUserStatus(token);
if (projectViewModel.isLogin) this.getNotificationCount(DEVICE_TOKEN); // if (projectViewModel.isLogin) this.getNotificationCount(DEVICE_TOKEN);
} }
}); });
if (results[Permission.location].isGranted) {} if (results[Permission.location].isGranted) {}
@ -491,16 +489,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (await sharedPref.getObject(USER_PROFILE) != null) { if (await sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) { if (data != null) {
// authService
// .registeredAuthenticatedUser(data, token, 0, 0)
// .then((res) => {print(res)});
authService.getDashboard().then((value) => { authService.getDashboard().then((value) => {
if (value != null) if (value != null)
{ {
setState(() { setState(() {
notificationCount = notificationCount =
value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
sharedPref.setString(NOTIFICATION_COUNT, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
}) })
} }
@ -665,18 +659,19 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
void checkUserStatus(token) async { void checkUserStatus(token) async {
authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value)); authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value));
if (projectViewModel.isLoading == true) { if (authenticatedUserObject.isLogin) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) { if (data != null) {
authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {}); authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
authService.getDashboard().then((value) => { authService.getDashboard().then((value) => {
setState(() { setState(() {
if (value != null) { if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
} }
}) }),
}); });
} }
} } else {}
} }
} }

@ -138,7 +138,7 @@ class LoggedSliderView extends StatelessWidget {
padding: const EdgeInsets.only(left: 20, right: 20), padding: const EdgeInsets.only(left: 20, right: 20),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded( flex: 3,
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
SvgPicture.asset( SvgPicture.asset(
@ -155,7 +155,10 @@ class LoggedSliderView extends StatelessWidget {
], ],
), ),
), ),
Expanded( SizedBox(
width: 3,
),
Expanded( flex: 3,
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
SvgPicture.asset( SvgPicture.asset(
@ -168,7 +171,11 @@ class LoggedSliderView extends StatelessWidget {
], ],
), ),
), ),
SizedBox(
width: 3,
),
Expanded( Expanded(
flex: 3,
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
SvgPicture.asset( SvgPicture.asset(
@ -177,10 +184,11 @@ class LoggedSliderView extends StatelessWidget {
height: 12, height: 12,
), ),
mWidth(6), mWidth(6),
Texts('${TranslationBase.of(context).bloodType}: ${model.booldType}', color: Colors.white, fontSize: 10) Texts('${TranslationBase.of(context).bloodType1} ${model.booldType}', color: Colors.white, fontSize: 10)
], ],
), ),
), ),
mFlex(1),
], ],
), ),
), ),

@ -572,6 +572,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
authService.insertDeviceImei(selectedOption).then((value) => {goToHome()}).catchError((err) { authService.insertDeviceImei(selectedOption).then((value) => {goToHome()}).catchError((err) {
print(err); print(err);
}); });
// authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
} }
getToDoCount() { getToDoCount() {

@ -7,7 +7,7 @@ import 'package:diplomaticquarterapp/services/my_invoice_service/my_invoice_serv
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -19,14 +19,13 @@ class InvoiceDetail extends StatelessWidget {
final DentalInvoiceDetailResponse dentalInvoiceDetailResponse; final DentalInvoiceDetailResponse dentalInvoiceDetailResponse;
final BuildContext context; final BuildContext context;
int totalServiceRate = 0; dynamic totalServiceRate = 0;
int totalDiscount = 0; dynamic totalDiscount = 0;
int totalVAT = 0; dynamic totalVAT = 0;
int subTotal = 0; dynamic subTotal = 0;
int grandTotal = 0; dynamic grandTotal = 0;
InvoiceDetail(this.doctor, this.listDentalAppointments, InvoiceDetail(this.doctor, this.listDentalAppointments, this.dentalInvoiceDetailResponse, this.context);
this.dentalInvoiceDetailResponse, this.context);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -35,18 +34,16 @@ class InvoiceDetail extends StatelessWidget {
appBarTitle: TranslationBase.of(context).myInvoice, appBarTitle: TranslationBase.of(context).myInvoice,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
DoctorView( DoctorView(doctor: doctor, isLiveCareAppointment: false, isShowFlag: false),
doctor: doctor,
isLiveCareAppointment: false,
isShowFlag: false),
Container( Container(
margin: EdgeInsets.only(left: 10.0, right: 10.0), margin: EdgeInsets.only(left: 10.0, right: 10.0),
padding: EdgeInsets.only( padding: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0, bottom: 10.0),
top: 10.0, left: 10.0, right: 10.0, bottom: 10.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.grey[800], color: Colors.grey[800],
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@ -57,34 +54,17 @@ class InvoiceDetail extends StatelessWidget {
child: Table( child: Table(
children: [ children: [
TableRow(children: [ TableRow(children: [
Text("Description", Text(TranslationBase.of(context).description, textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
textAlign: TextAlign.center, Text(TranslationBase.of(context).quantity, textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
style: TextStyle( Text(TranslationBase.of(context).price, textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
color: Colors.white, Text(TranslationBase.of(context).total, textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
fontWeight: FontWeight.bold)),
Text("Quantity",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold)),
Text("Price",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold)),
Text("Total",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold)),
]), ]),
], ],
), ),
), ),
Container( Container(
margin: EdgeInsets.only(top: 0.0, left: 10.0, right: 10.0), margin: EdgeInsets.only(top: 0.0, left: 10.0, right: 10.0),
padding: EdgeInsets.only( padding: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0, bottom: 15.0),
top: 10.0, left: 10.0, right: 10.0, bottom: 15.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@ -102,97 +82,59 @@ class InvoiceDetail extends StatelessWidget {
), ),
Container( Container(
child: AppExpandableNotifier( child: AppExpandableNotifier(
title: "Total Price: " + grandTotal.toString() + " SAR", title: TranslationBase.of(context).patientShareTotal.toString() + " " + dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].grandTotal.toString() + " SAR",
isExpand: true, isExpand: true,
bodyWidget: Column( bodyWidget: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
crossAxisAlignment: CrossAxisAlignment.start, Table(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Table( TableRow(children: [
children: [ Container(
TableRow(children: [ margin: EdgeInsets.only(top: 10.0),
Container( child: Text(TranslationBase.of(context).discount, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
margin: EdgeInsets.only(top: 10.0), ),
child: Text("Discount: ", Container(
textAlign: TextAlign.center, margin: EdgeInsets.only(top: 10.0),
style: TextStyle( child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].discountAmount.toString() + " " + TranslationBase.of(context).sar,
color: Colors.black, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
fontWeight: FontWeight.bold)), ),
), ]),
Container( TableRow(children: [
margin: EdgeInsets.only(top: 10.0), Container(
child: Text(totalDiscount.toString() + " SAR", margin: EdgeInsets.only(top: 10.0),
textAlign: TextAlign.center, child: Text(TranslationBase.of(context).totalVAT.toString() + " (" + dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].vATPercentage.toString() + "%): ",
style: TextStyle( textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
color: Colors.black, ),
fontWeight: FontWeight.bold)), Container(
), margin: EdgeInsets.only(top: 10.0),
]), child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].patientVATAmount.toString() + " " + TranslationBase.of(context).sar,
TableRow(children: [ textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
Container( ),
margin: EdgeInsets.only(top: 10.0), ]),
child: Text( TableRow(children: [
"VAT (" + Container(
dentalInvoiceDetailResponse margin: EdgeInsets.only(top: 10.0),
.listEInvoiceForDental[0] child: Text(TranslationBase.of(context).total.toString() + ": ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
.listConsultation[0] ),
.vATPercentage Container(
.toString() + margin: EdgeInsets.only(top: 10.0),
"%)", child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].totalPatientShare.toString() + " " + TranslationBase.of(context).sar,
textAlign: TextAlign.center, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
style: TextStyle( ),
color: Colors.black, ]),
fontWeight: FontWeight.bold)), TableRow(children: [
), Container(
Container( margin: EdgeInsets.only(top: 10.0),
margin: EdgeInsets.only(top: 10.0), child: Text(TranslationBase.of(context).paid.toString() + ": ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
child: Text(totalVAT.toString() + " SAR", ),
textAlign: TextAlign.center, Container(
style: TextStyle( margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
color: Colors.black, child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].totalPatientShare.toString() + " " + TranslationBase.of(context).sar,
fontWeight: FontWeight.bold)), textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
), ),
]), ]),
TableRow(children: [ ],
Container( ),
margin: EdgeInsets.only(top: 10.0), ]),
child: Text("Total: ",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(grandTotal.toString() + " SAR",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
),
]),
TableRow(children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Paid: ",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
),
Container(
margin:
EdgeInsets.only(top: 10.0, bottom: 10.0),
child: Text(grandTotal.toString() + " SAR",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
),
]),
],
),
]),
), ),
), ),
Container( Container(
@ -204,50 +146,27 @@ class InvoiceDetail extends StatelessWidget {
), ),
Container( Container(
margin: EdgeInsets.only(top: 0.0, left: 10.0, right: 10.0), margin: EdgeInsets.only(top: 0.0, left: 10.0, right: 10.0),
padding: EdgeInsets.only( padding: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0, bottom: 15.0),
top: 10.0, left: 10.0, right: 10.0, bottom: 15.0), decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(8))),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8))),
child: Table(children: [ child: Table(children: [
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Insurance: ", child: Text(TranslationBase.of(context).dentalInsurance + ": ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, bottom: 5.0), margin: EdgeInsets.only(top: 10.0, bottom: 5.0),
child: Text( child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].companyName, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
dentalInvoiceDetailResponse
.listEInvoiceForDental[0].companyName,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
]), ]),
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Insurance ID: ", child: Text(TranslationBase.of(context).insuranceID + ": ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
child: Text( child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].insuranceID, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
dentalInvoiceDetailResponse
.listEInvoiceForDental[0].insuranceID,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
]), ]),
]), ]),
@ -261,15 +180,9 @@ class InvoiceDetail extends StatelessWidget {
), ),
bottomSheet: Container( bottomSheet: Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: 70.0, // height: 70.0,
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0), margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0, bottom: 20.0),
child: Button( child: DefaultButton(TranslationBase.of(context).sendEmail, () => {sendInvoiceEmail()}),
onTap: () {
sendInvoiceEmail();
},
label: TranslationBase.of(context).sendEmail,
backgroundColor: Colors.red[900],
),
), ),
); );
} }
@ -278,14 +191,10 @@ class InvoiceDetail extends StatelessWidget {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
MyInvoicesService myInvoicesService = new MyInvoicesService(); MyInvoicesService myInvoicesService = new MyInvoicesService();
myInvoicesService myInvoicesService.sendDentalAppointmentInvoiceEmail(listDentalAppointments.projectID, listDentalAppointments.appointmentNo, context).then((res) {
.sendDentalAppointmentInvoiceEmail(
12, listDentalAppointments.appointmentNo, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast( AppToast.showSuccessToast(message: TranslationBase.of(context).emailSentSuccessfully);
message: TranslationBase.of(context).emailSentSuccessfully);
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
@ -299,37 +208,24 @@ class InvoiceDetail extends StatelessWidget {
List<TableRow> fullData(context) { List<TableRow> fullData(context) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.forEach((lab) {
.forEach((lab) {
tableRow.add( tableRow.add(
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(lab.procedureName, child: Text(lab.procedureName, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(lab.quantity.toString(), child: Text(lab.quantity.toString(), textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(lab.price.toString() + " SAR", child: Text(lab.price.toString() + " " + TranslationBase.of(context).sar, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(lab.total.toString() + " SAR", child: Text(lab.total.toString() + " " + TranslationBase.of(context).sar, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
), ),
]), ]),
); );

@ -46,6 +46,8 @@ class _MyInvoicesState extends State<MyInvoices> {
appBarTitle: TranslationBase.of(context).myInvoice, appBarTitle: TranslationBase.of(context).myInvoice,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: true, isShowDecPage: true,
showNewAppBar: true,
showNewAppBarTitle: true,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
body: Container( body: Container(
child: SingleChildScrollView( child: SingleChildScrollView(
@ -94,7 +96,7 @@ class _MyInvoicesState extends State<MyInvoices> {
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Appointment No: ", child: Text(TranslationBase.of(context).appointmentNo + ": ",
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.black, color: Colors.black,
@ -102,7 +104,7 @@ class _MyInvoicesState extends State<MyInvoices> {
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Appointment Date: ", child: Text(TranslationBase.of(context).appointmentDate + ": ",
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.black, color: Colors.black,
@ -111,7 +113,7 @@ class _MyInvoicesState extends State<MyInvoices> {
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 10.0, bottom: 10.0), top: 10.0, bottom: 10.0),
child: Text("Clinic: ", child: Text(TranslationBase.of(context).clinic + ": ",
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.black, color: Colors.black,
@ -201,22 +203,21 @@ class _MyInvoicesState extends State<MyInvoices> {
DoctorListResponse.DoctorList doctor = new DoctorListResponse.DoctorList(); DoctorListResponse.DoctorList doctor = new DoctorListResponse.DoctorList();
doctor.name = listDentalAppointments.doctorName; doctor.name = projectViewModel.isArabic ? listDentalAppointments.doctorNameN : listDentalAppointments.doctorName;
doctor.projectName = listDentalAppointments.projectName; doctor.projectName = listDentalAppointments.projectName;
doctor.date = listDentalAppointments.appointmentDate; doctor.date = listDentalAppointments.appointmentDate;
doctor.actualDoctorRate = 0; doctor.actualDoctorRate = 0;
doctor.doctorImageURL = listDentalAppointments.doctorImageURL; doctor.doctorImageURL = listDentalAppointments.doctorImageURL;
doctor.projectID = listDentalAppointments.projectID;
doctor.dayName = listDentalAppointments.invoiceNo; doctor.dayName = listDentalAppointments.invoiceNo;
doctor.doctorTitle = "Dr.";
doctor.clinicName = "InvoiceNo: " + listDentalAppointments.invoiceNo.toString(); doctor.clinicName = "InvoiceNo: " + listDentalAppointments.invoiceNo.toString();
myInvoicesService.getDentalAppointmentInvoice(12, listDentalAppointments.appointmentNo, context).then((res) { myInvoicesService.getDentalAppointmentInvoice(listDentalAppointments.projectID, listDentalAppointments.appointmentNo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
setState(() { setState(() {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
dentalInvoiceDetailResponse = dentalInvoiceDetailResponse =
DentalInvoiceDetailResponse.fromJson(res); DentalInvoiceDetailResponse.fromJson(res);
print(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length);
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
@ -235,7 +236,6 @@ class _MyInvoicesState extends State<MyInvoices> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err.toString()); AppToast.showErrorToast(message: err.toString());
Navigator.of(context).pop();
}); });
} }

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
@ -10,15 +9,14 @@ import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_de
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../../widgets/dialogs/confirm_send_email_dialog.dart'; import '../../../widgets/dialogs/confirm_send_email_dialog.dart';
import 'PrescriptionIDeliveryAddressPage.dart'; import 'PrescriptionIDeliveryAddressPage.dart';
@ -327,13 +325,12 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 2), padding: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 20),
child: Container( child: Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Button( child: DefaultButton(
label: TranslationBase.of(context).resendOrder, TranslationBase.of(context).resendOrder,
backgroundColor: Colors.green[800], () {
onTap: () {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
@ -345,6 +342,7 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
); );
}, },
color: Colors.green[800],
), ),
), ),
), ),

@ -74,8 +74,8 @@ class PrescriptionsPage extends StatelessWidget {
subName: prescriptions.name, subName: prescriptions.name,
isInOutPatient: prescriptions.isInOutPatient, isInOutPatient: prescriptions.isInOutPatient,
isLiveCareAppointment: prescriptions.isLiveCareAppointment, isLiveCareAppointment: prescriptions.isLiveCareAppointment,
appointmentTime: DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions // appointmentTime: DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions
.appointmentDate)), // .appointmentDate)),
date: DateUtil.convertStringToDate(prescriptions date: DateUtil.convertStringToDate(prescriptions
.appointmentDate) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)), .appointmentDate) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)),
); );

@ -1,15 +1,12 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -90,13 +87,10 @@ class RadiologyDetailsPage extends StatelessWidget {
(projectViewModel.havePrivilege(9) || projectViewModel.havePrivilege(8)) (projectViewModel.havePrivilege(9) || projectViewModel.havePrivilege(8))
? (finalRadiology.dIAPACSURL != "" && projectViewModel.havePrivilege(9)) ? (finalRadiology.dIAPACSURL != "" && projectViewModel.havePrivilege(9))
? Container( ? Container(
width: MediaQuery.of(context).size.width * 0.8, child: DefaultButton(
child: Button( TranslationBase.of(context).openRad,
onTap: () { () => {launch(model.radImageURL)},
launch(model.radImageURL); textColor: Colors.white,
},
label: TranslationBase.of(context).openRad,
backgroundColor: CustomColors.accentColor,
), ),
) )
: Container() : Container()
@ -109,31 +103,6 @@ class RadiologyDetailsPage extends StatelessWidget {
], ],
), ),
), ),
// bottomSheet: (projectViewModel.havePrivilege(9) || projectViewModel.havePrivilege(8))
// ? Container(
// width: double.infinity,
// height: finalRadiology.dIAPACSURL != "" ? MediaQuery.of(context).size.height * 0.25 : MediaQuery.of(context).size.height * 0.14,
// color: Colors.grey[100],
// child: Column(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Divider(),
// if (projectViewModel.havePrivilege(8))
// Container(
// width: MediaQuery.of(context).size.width * 0.8,
// child: Button(
// onTap: () {
// showConfirmMessage(finalRadiology: finalRadiology, model: model);
// },
// label: TranslationBase.of(context).sendCopyRad,
// loading: model.state == ViewState.BusyLocal,
// backgroundColor: Theme.of(context).primaryColor,
// ),
// )
// ],
// ),
// )
// : Container(),
), ),
); );
} }

@ -295,7 +295,7 @@ class DoctorsListService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2, "LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20", "IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958", "generalid": "Cs2020@2016\$2958",
"PatientOutSA": authUser.outSA, "PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,
"SessionID": null, "SessionID": null,
"isDentalAllowedBackend": false, "isDentalAllowedBackend": false,
"DeviceTypeID": 1 "DeviceTypeID": 1

@ -138,7 +138,7 @@ class ProductDetailService extends BaseService {
Future getWishlistItems() async { Future getWishlistItems() async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
hasError = false; hasError = false;
await baseAppClient.getPharmacy(GET_WISHLIST+customerId+"?shopping_cart_type=2", await baseAppClient.getPharmacy(GET_WISHLIST.toString()+customerId.toString()+"?shopping_cart_type=2",
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_wishListProducts.clear(); _wishListProducts.clear();
response['shopping_carts'].forEach((item) { response['shopping_carts'].forEach((item) {

@ -20,6 +20,8 @@ class TranslationBase {
String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode];
String get bloodType1 => localizedValues['bloodType'][locale.languageCode];
String get settings => localizedValues['settings'][locale.languageCode]; String get settings => localizedValues['settings'][locale.languageCode];
String get language => localizedValues['language'][locale.languageCode]; String get language => localizedValues['language'][locale.languageCode];
@ -93,18 +95,25 @@ class TranslationBase {
String get patientShare => localizedValues['patientShare'][locale.languageCode]; String get patientShare => localizedValues['patientShare'][locale.languageCode];
String get neverWait => localizedValues['neverWait'][locale.languageCode]; String get neverWait => localizedValues['neverWait'][locale.languageCode];
String get patientShareWithTax => localizedValues['patientShareWithTax'][locale.languageCode]; String get patientShareWithTax => localizedValues['patientShareWithTax'][locale.languageCode];
String get reminderTitle => localizedValues['reminderTitle'][locale.languageCode]; String get reminderTitle => localizedValues['reminderTitle'][locale.languageCode];
String get confirmAppo => localizedValues['confirmAppo'][locale.languageCode]; String get confirmAppo => localizedValues['confirmAppo'][locale.languageCode];
String get appointmentCalendar => localizedValues['appointmentCalendar'][locale.languageCode]; String get appointmentCalendar => localizedValues['appointmentCalendar'][locale.languageCode];
String get appointmentSuccess => localizedValues['appointmentSuccess'][locale.languageCode]; String get appointmentSuccess => localizedValues['appointmentSuccess'][locale.languageCode];
String get confirm => localizedValues['confirm'][locale.languageCode]; String get confirm => localizedValues['confirm'][locale.languageCode];
String get pressAgain => localizedValues['pressAgain'][locale.languageCode]; String get pressAgain => localizedValues['pressAgain'][locale.languageCode];
String get confirmLiveCare => localizedValues['confirmLiveCare'][locale.languageCode]; String get confirmLiveCare => localizedValues['confirmLiveCare'][locale.languageCode];
String get doctorFilter => localizedValues['doctorFilter'][locale.languageCode]; String get doctorFilter => localizedValues['doctorFilter'][locale.languageCode];
String get waitingForDoctor => localizedValues['waitingForDoctor'][locale.languageCode]; String get waitingForDoctor => localizedValues['waitingForDoctor'][locale.languageCode];
String get confirmLater => localizedValues['confirmLater'][locale.languageCode]; String get confirmLater => localizedValues['confirmLater'][locale.languageCode];
@ -724,9 +733,13 @@ class TranslationBase {
String get sentRequest => localizedValues['sent-requests'][locale.languageCode]; String get sentRequest => localizedValues['sent-requests'][locale.languageCode];
String get km => localizedValues['km'][locale.languageCode]; String get km => localizedValues['km'][locale.languageCode];
String get km_ => localizedValues['km_'][locale.languageCode]; String get km_ => localizedValues['km_'][locale.languageCode];
String get patientHealthSummaryReport => localizedValues['PatientHealthSummaryReport'][locale.languageCode]; String get patientHealthSummaryReport => localizedValues['PatientHealthSummaryReport'][locale.languageCode];
String get toViewTheTermsAndConditions => localizedValues['ToViewTheTermsAndConditions'][locale.languageCode]; String get toViewTheTermsAndConditions => localizedValues['ToViewTheTermsAndConditions'][locale.languageCode];
String get clickHere => localizedValues['ClickHere'][locale.languageCode]; String get clickHere => localizedValues['ClickHere'][locale.languageCode];
String get iAgreeToTheTermsAndConditions => localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode]; String get iAgreeToTheTermsAndConditions => localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode];
@ -800,7 +813,9 @@ class TranslationBase {
String get country => localizedValues['country'][locale.languageCode]; String get country => localizedValues['country'][locale.languageCode];
String get ok => localizedValues['Ok'][locale.languageCode]; String get ok => localizedValues['Ok'][locale.languageCode];
String get averageWaitingTime => localizedValues['averageWaitingTime'][locale.languageCode]; String get averageWaitingTime => localizedValues['averageWaitingTime'][locale.languageCode];
String get waterConsumedInWeek => localizedValues['WaterConsumedInWeek'][locale.languageCode]; String get waterConsumedInWeek => localizedValues['WaterConsumedInWeek'][locale.languageCode];
String get waterConsumedInMonth => localizedValues['WaterConsumedInMonth'][locale.languageCode]; String get waterConsumedInMonth => localizedValues['WaterConsumedInMonth'][locale.languageCode];
@ -1067,9 +1082,13 @@ class TranslationBase {
String get consumed => localizedValues['consumed'][locale.languageCode]; String get consumed => localizedValues['consumed'][locale.languageCode];
String get transferred => localizedValues['transferred'][locale.languageCode]; String get transferred => localizedValues['transferred'][locale.languageCode];
String get checkBeneficiary => localizedValues['checkBeneficiary'][locale.languageCode]; String get checkBeneficiary => localizedValues['checkBeneficiary'][locale.languageCode];
String get beneficiaryName => localizedValues['beneficiaryName'][locale.languageCode]; String get beneficiaryName => localizedValues['beneficiaryName'][locale.languageCode];
String get accountActivation => localizedValues['accountActivation'][locale.languageCode]; String get accountActivation => localizedValues['accountActivation'][locale.languageCode];
String get nonRecommended => localizedValues['nonRecommended'][locale.languageCode]; String get nonRecommended => localizedValues['nonRecommended'][locale.languageCode];
String get lakumTransfer => localizedValues['lakumTransfer'][locale.languageCode]; String get lakumTransfer => localizedValues['lakumTransfer'][locale.languageCode];
@ -2088,7 +2107,9 @@ class TranslationBase {
String get upComingPayOption => localizedValues["upcoming-pay-options"][locale.languageCode]; String get upComingPayOption => localizedValues["upcoming-pay-options"][locale.languageCode];
String get pleaseAcceptTerms => localizedValues["please-accept-terms"][locale.languageCode]; String get pleaseAcceptTerms => localizedValues["please-accept-terms"][locale.languageCode];
String get pleaseSelectAllQuestionToContinue => localizedValues["pleaseSelectAllQuestionToContinue"][locale.languageCode]; String get pleaseSelectAllQuestionToContinue => localizedValues["pleaseSelectAllQuestionToContinue"][locale.languageCode];
String get type => localizedValues["type"][locale.languageCode]; String get type => localizedValues["type"][locale.languageCode];
String get eReferralInfo => localizedValues["info-ereferral"][locale.languageCode]; String get eReferralInfo => localizedValues["info-ereferral"][locale.languageCode];
@ -2126,35 +2147,104 @@ class TranslationBase {
String get noThankyou => localizedValues["no-thankyou"][locale.languageCode]; String get noThankyou => localizedValues["no-thankyou"][locale.languageCode];
String get visitClinic => localizedValues["visit-clinic"][locale.languageCode]; String get visitClinic => localizedValues["visit-clinic"][locale.languageCode];
String get generateCovidCertificate => localizedValues["generate-covid-certificate"][locale.languageCode]; String get generateCovidCertificate => localizedValues["generate-covid-certificate"][locale.languageCode];
String get isReportOutsideKsa => localizedValues["is-report-outside-ksa"][locale.languageCode]; String get isReportOutsideKsa => localizedValues["is-report-outside-ksa"][locale.languageCode];
String get passportNumber => localizedValues["passport-number"][locale.languageCode]; String get passportNumber => localizedValues["passport-number"][locale.languageCode];
String get enterPassportNumber => localizedValues["enter-passport-number"][locale.languageCode]; String get enterPassportNumber => localizedValues["enter-passport-number"][locale.languageCode];
String get validPassportNumber => localizedValues["valid-passport-number"][locale.languageCode]; String get validPassportNumber => localizedValues["valid-passport-number"][locale.languageCode];
String get continuePlan => localizedValues["continue-plan"][locale.languageCode]; String get continuePlan => localizedValues["continue-plan"][locale.languageCode];
String get dentalProcedureList => localizedValues["dental-procedure-list"][locale.languageCode]; String get dentalProcedureList => localizedValues["dental-procedure-list"][locale.languageCode];
String get aboutApp => localizedValues["about-app"][locale.languageCode]; String get aboutApp => localizedValues["about-app"][locale.languageCode];
String get aboutPointsLength => localizedValues["about-points"]['length'][locale.languageCode]; String get aboutPointsLength => localizedValues["about-points"]['length'][locale.languageCode];
String get timeNeeded => localizedValues["time-needed"][locale.languageCode]; String get timeNeeded => localizedValues["time-needed"][locale.languageCode];
String get totalTimeNeeded => localizedValues["total-time-needed"][locale.languageCode]; String get totalTimeNeeded => localizedValues["total-time-needed"][locale.languageCode];
String get infoEye => localizedValues["info-eye"][locale.languageCode]; String get infoEye => localizedValues["info-eye"][locale.languageCode];
String get infoVaccines => localizedValues["info-vaccines"][locale.languageCode]; String get infoVaccines => localizedValues["info-vaccines"][locale.languageCode];
String get infoTrackers => localizedValues["info-trackers"][locale.languageCode]; String get infoTrackers => localizedValues["info-trackers"][locale.languageCode];
String get infoHealthData => localizedValues["info-health-data"][locale.languageCode]; String get infoHealthData => localizedValues["info-health-data"][locale.languageCode];
String get infoAskDoc => localizedValues["info-ask-doc"][locale.languageCode]; String get infoAskDoc => localizedValues["info-ask-doc"][locale.languageCode];
String get infoAutoWifi => localizedValues["info-auto-wifi"][locale.languageCode]; String get infoAutoWifi => localizedValues["info-auto-wifi"][locale.languageCode];
String get autoWifi => localizedValues["auto-wifi"][locale.languageCode]; String get autoWifi => localizedValues["auto-wifi"][locale.languageCode];
String get childVaccineInfo => localizedValues["child-vaccine-info"][locale.languageCode]; String get childVaccineInfo => localizedValues["child-vaccine-info"][locale.languageCode];
String get h2oInfo => localizedValues["h2o-info"][locale.languageCode]; String get h2oInfo => localizedValues["h2o-info"][locale.languageCode];
String get sysdias => localizedValues["sys/dias"][locale.languageCode]; String get sysdias => localizedValues["sys/dias"][locale.languageCode];
String get arm => localizedValues["arm"][locale.languageCode]; String get arm => localizedValues["arm"][locale.languageCode];
String get removeMeasure => localizedValues["remove-measure"][locale.languageCode]; String get removeMeasure => localizedValues["remove-measure"][locale.languageCode];
String get selectArm => localizedValues["select-arm"][locale.languageCode]; String get selectArm => localizedValues["select-arm"][locale.languageCode];
String get askDocEmpty => localizedValues["ask-doc-empty"][locale.languageCode]; String get askDocEmpty => localizedValues["ask-doc-empty"][locale.languageCode];
String get onlineClinics => localizedValues["online-clinics"][locale.languageCode]; String get onlineClinics => localizedValues["online-clinics"][locale.languageCode];
String get offlineClinics => localizedValues["offline-clinics"][locale.languageCode]; String get offlineClinics => localizedValues["offline-clinics"][locale.languageCode];
String get clinicSchedule => localizedValues["clinic-schedule"][locale.languageCode]; String get clinicSchedule => localizedValues["clinic-schedule"][locale.languageCode];
String get discount => localizedValues["discount"][locale.languageCode];
String get totalVAT => localizedValues["total-VAT"][locale.languageCode];
String get paid => localizedValues["paid"][locale.languageCode];
String get dentalInsurance => localizedValues["dental-insurance"][locale.languageCode];
String get drivethruAppo => localizedValues["drivethru-appo"][locale.languageCode];
String get upcomingQRNFC => localizedValues["upcoming-QR-NFC"][locale.languageCode];
String get ovulationDesc => localizedValues["ovulation-desc"][locale.languageCode];
String get cycleLabel => localizedValues["cycle-label"][locale.languageCode];
String get lutealLabel => localizedValues["luteal-label"][locale.languageCode];
String get pregnancyTitle => localizedValues["pregnancy-title"][locale.languageCode];
String get pregnancyDesc => localizedValues["pregnancy-desc"][locale.languageCode];
String get pregnancyDateLabel => localizedValues["pregnancy-date-label"][locale.languageCode];
String get ovulationPeriod => localizedValues["ovulation-period"][locale.languageCode];
String get from => localizedValues["from"][locale.languageCode];
String get to => localizedValues["to"][locale.languageCode];
String get conceive => localizedValues["conceive"][locale.languageCode];
String get firstTri => localizedValues["firstTri"][locale.languageCode];
String get secondTri => localizedValues["secondTri"][locale.languageCode];
String get thirdTri => localizedValues["thirdTri"][locale.languageCode];
String get seeDoctorsList => localizedValues["seeDoctorsList"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -9,6 +9,7 @@ import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
@ -21,7 +22,6 @@ import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart'; import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/pages/medical/my_invoices/my_invoice_page.dart'; import 'package:diplomaticquarterapp/pages/medical/my_invoices/my_invoice_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/my_trackers.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/my_trackers.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
@ -308,6 +308,16 @@ class Utils {
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)), 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(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myInvoice,
imagePath: 'invoice_list.svg',
subTitle: TranslationBase.of(context).invoicesList,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null, onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(

@ -1,13 +1,10 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:flutter_countdown_timer/countdown_timer_controller.dart'; import 'package:flutter_countdown_timer/countdown_timer_controller.dart';
import 'package:flutter_countdown_timer/current_remaining_time.dart'; import 'package:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
@ -138,7 +135,7 @@ class DoctorCard extends StatelessWidget {
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48, height: 18 / 12),
), ),
], ],
) ),
], ],
), ),
Row( Row(
@ -221,11 +218,14 @@ class DoctorCard extends StatelessWidget {
Widget myRichText(String title, String value, bool isArabic) { Widget myRichText(String title, String value, bool isArabic) {
return RichText( return RichText(
maxLines: 1, maxLines: 1,
text: TextSpan(text: title, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10), children: <TextSpan>[ text: TextSpan(
TextSpan( text: title,
text: " $value", style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), children: <TextSpan>[
) TextSpan(
]), text: " $value",
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
)
]),
); );
} }

@ -10,8 +10,7 @@ class SelectLocationDialog extends StatefulWidget {
final Function(AddressInfo) onValueSelected; final Function(AddressInfo) onValueSelected;
AddressInfo selectedAddress; AddressInfo selectedAddress;
SelectLocationDialog( SelectLocationDialog({Key key, this.addresses, this.onValueSelected, this.selectedAddress});
{Key key, this.addresses, this.onValueSelected, this.selectedAddress});
@override @override
_SelectLocationDialogState createState() => _SelectLocationDialogState(); _SelectLocationDialogState createState() => _SelectLocationDialogState();
@ -27,7 +26,14 @@ class _SelectLocationDialogState extends State<SelectLocationDialog> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SimpleDialog( return SimpleDialog(
title: Texts(TranslationBase.of(context).selectAddress), title: Text(
TranslationBase.of(context).selectAddress,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
letterSpacing: -0.46,
),
),
children: [ children: [
Column( Column(
children: [ children: [
@ -39,7 +45,7 @@ class _SelectLocationDialogState extends State<SelectLocationDialog> {
Divider(), Divider(),
...List.generate( ...List.generate(
widget.addresses.length, widget.addresses.length,
(index) => Column( (index) => Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
@ -56,7 +62,13 @@ class _SelectLocationDialogState extends State<SelectLocationDialog> {
}); });
}, },
child: ListTile( child: ListTile(
title: Text(widget.addresses[index].address1), title: Text(
widget.addresses[index].address1,
style: TextStyle(
fontWeight: FontWeight.w600,
letterSpacing: -0.46,
),
),
leading: Radio( leading: Radio(
value: widget.addresses[index], value: widget.addresses[index],
groupValue: widget.selectedAddress, groupValue: widget.selectedAddress,
@ -98,9 +110,14 @@ class _SelectLocationDialogState extends State<SelectLocationDialog> {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Container( child: Container(
child: Center( child: Center(
child: Texts( child: Text(
TranslationBase.of(context).cancel.toUpperCase(), TranslationBase.of(context).cancel.toUpperCase(),
color: Colors.red, style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
letterSpacing: -0.46,
color: Colors.red,
),
), ),
), ),
), ),
@ -122,10 +139,14 @@ class _SelectLocationDialogState extends State<SelectLocationDialog> {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Center(
child: Texts( child: Text(
TranslationBase.of(context).ok, TranslationBase.of(context).ok.toUpperCase(),
fontWeight: FontWeight.w400, style: TextStyle(
)), fontSize: 14,
fontWeight: FontWeight.w600,
letterSpacing: -0.46,
),
)),
), ),
), ),
), ),

Loading…
Cancel
Save