Merge branch 'haroon-new-design' into 'development_new_design_2.0'

HarHaroon new design

See merge request Cloud_Solution/diplomatic-quarter!438
merge-requests/439/merge
haroon amjad 3 years ago
commit 32e5f43e96

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -438,6 +438,11 @@ const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews';
const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
// CMC RC SERVICES
const GET_ALL_CMC_SERVICES_RC = 'rc/api/cmc/getallcmc';
const ADD_CMC_ORDER_RC = 'rc/api/cmc/add';
//Pharmacy wishlist //Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/"; const GET_WISHLIST = "shopping_cart_items/";
const DELETE_WISHLIST = "delete_shopping_cart_item_by_product?customer_id="; const DELETE_WISHLIST = "delete_shopping_cart_item_by_product?customer_id=";

@ -894,7 +894,7 @@ const Map localizedValues = {
"somethingWentWrongTryLater": {"en": "Sorry something went wrong please try again later", "ar": "نعتذر عن خدمتك يرجى المحاولة لاحقا"}, "somethingWentWrongTryLater": {"en": "Sorry something went wrong please try again later", "ar": "نعتذر عن خدمتك يرجى المحاولة لاحقا"},
"TotalAmountPayable": {"en": "Total Amount Payable:", "ar": " إجمالي المبلغ المستحق:"}, "TotalAmountPayable": {"en": "Total Amount Payable:", "ar": " إجمالي المبلغ المستحق:"},
"iAcceptTermsConditions": {"en": "I Accept the Terms and Conditions", "ar": "أوافق على الشروط والأحكام"}, "iAcceptTermsConditions": {"en": "I Accept the Terms and Conditions", "ar": "أوافق على الشروط والأحكام"},
"YouCanPayByTheFollowingOptions": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"}, "YouCanPayByTheFollowingOptions": {"en": "You can pay by the following options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"},
"RRTDDetails": { "RRTDDetails": {
"en": "en":
"The RRT service provides medical service for urgent and stable cases, not life-threatening situations or extremities, and the service includes providing medical care from a complete medical team at home.", "The RRT service provides medical service for urgent and stable cases, not life-threatening situations or extremities, and the service includes providing medical care from a complete medical team at home.",
@ -1146,7 +1146,7 @@ const Map localizedValues = {
"other": {"en": "Other", "ar": "آخر"}, "other": {"en": "Other", "ar": "آخر"},
"measure-unit": {"en": "Measure unit", "ar": "وحدة القياس"}, "measure-unit": {"en": "Measure unit", "ar": "وحدة القياس"},
"measure-time": {"en": "Measure time", "ar": "وقت القياس"}, "measure-time": {"en": "Measure time", "ar": "وقت القياس"},
"update": {"en": "Update", "ar": "تعديل"}, "update": {"en": "Update", "ar": "تحديث"},
"bloodD-enter-desc": {"en": "Enter the required information, in order to register for Blood Donation Service", "ar": "أدخل المعلومات المطلوبة ، للتسجيل في خدمة التبرع بالدم"}, "bloodD-enter-desc": {"en": "Enter the required information, in order to register for Blood Donation Service", "ar": "أدخل المعلومات المطلوبة ، للتسجيل في خدمة التبرع بالدم"},
"viewTermsConditions": {"en": "To view the terms and conditions", "ar": "لعرض الشروط والأحكام"}, "viewTermsConditions": {"en": "To view the terms and conditions", "ar": "لعرض الشروط والأحكام"},
"WalkinAppo": {"en": "Hospital Visit Appointment", "ar": "موعد زيارة للمستشفى"}, "WalkinAppo": {"en": "Hospital Visit Appointment", "ar": "موعد زيارة للمستشفى"},
@ -1497,4 +1497,7 @@ const Map localizedValues = {
"years": {"en": "Years", "ar": "سنوات"}, "years": {"en": "Years", "ar": "سنوات"},
"respirationBPM": {"en": "bpm", "ar": "نفس"}, "respirationBPM": {"en": "bpm", "ar": "نفس"},
"extremeObese": {"en": "Extreme Obese", "ar": "السمنة المفرطة"}, "extremeObese": {"en": "Extreme Obese", "ar": "السمنة المفرطة"},
"invoiceDetails": { "en": "Invoice Details", "ar": "تفاصيل الفاتورة" },
"appoDetails": {"en": "Appointment Details", "ar": "تفاصيل الموعد"},
"appoPaymentConfirm": {"en": "Are you sure you Want to make payment for this appointment?", "ar": "هل أنت متأكد من أنك تريد سداد هذا الموعد؟"},
}; };

@ -73,20 +73,21 @@ class CMCInsertPresOrderRequestModel {
data['LanguageID'] = this.languageID; data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress; data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid; data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA; data['patientOutSa'] = this.patientOutSA;
data['isOutPatient'] = this.patientOutSA == 0 ? false : true;
data['SessionID'] = this.sessionID; data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID; data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID; data['patientId'] = this.patientID.toString();
data['TokenID'] = this.tokenID; data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType; data['PatientType'] = this.patientType;
data['Latitude'] = this.latitude; data['latitude'] = this.latitude;
data['Longitude'] = this.longitude; data['longitude'] = this.longitude;
data['CreatedBy'] = this.createdBy; // data['CreatedBy'] = this.createdBy;
data['OrderServiceID'] = this.orderServiceID; data['OrderServiceID'] = this.orderServiceID;
if (this.patientERCMCInsertServicesList != null) { if (this.patientERCMCInsertServicesList != null) {
data['PatientER_CMC_InsertServicesList'] = data['procedures'] =
this.patientERCMCInsertServicesList.map((v) => v.toJson()).toList(); this.patientERCMCInsertServicesList.map((v) => v.toJson()).toList();
} }
return data; return data;

@ -1,44 +1,56 @@
class GetCMCServicesResponseModel { class GetCMCServicesResponseModel {
String description; int id;
String descriptionN; String serviceID;
int iD; int orderServiceID;
bool isActive; String text;
String textN;
dynamic price; dynamic price;
int serviceID; dynamic priceVAT;
dynamic totalPrice; dynamic priceTotal;
dynamic vAT; bool isEnabled;
int orderId;
int quantity;
GetCMCServicesResponseModel( GetCMCServicesResponseModel(
{this.description, {this.id,
this.descriptionN,
this.iD,
this.isActive,
this.price,
this.serviceID, this.serviceID,
this.totalPrice, this.orderServiceID,
this.vAT}); this.text,
this.textN,
this.price,
this.priceVAT,
this.priceTotal,
this.isEnabled,
this.orderId,
this.quantity});
GetCMCServicesResponseModel.fromJson(Map<String, dynamic> json) { GetCMCServicesResponseModel.fromJson(Map<String, dynamic> json) {
description = json['Description']; id = json['id'];
descriptionN = json['DescriptionN']; serviceID = json['serviceID'];
iD = json['ID']; orderServiceID = json['orderServiceID'];
isActive = json['IsActive']; text = json['text'];
price = json['Price']; textN = json['textN'];
serviceID = json['ServiceID']; price = json['price'];
totalPrice = json['TotalPrice']; priceVAT = json['priceVAT'];
vAT = json['VAT']; priceTotal = json['priceTotal'];
isEnabled = json['isEnabled'];
orderId = json['orderId'];
quantity = json['quantity'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['Description'] = this.description; data['id'] = this.id;
data['DescriptionN'] = this.descriptionN; data['serviceID'] = this.serviceID;
data['ID'] = this.iD; data['orderServiceID'] = this.orderServiceID;
data['IsActive'] = this.isActive; data['text'] = this.text;
data['Price'] = this.price; data['textN'] = this.textN;
data['ServiceID'] = this.serviceID; data['price'] = this.price;
data['TotalPrice'] = this.totalPrice; data['priceVAT'] = this.priceVAT;
data['VAT'] = this.vAT; data['priceTotal'] = this.priceTotal;
data['isEnabled'] = this.isEnabled;
data['orderId'] = this.orderId;
data['quantity'] = this.quantity;
return data; return data;
} }
} }

@ -23,17 +23,30 @@ class CMCService extends BaseService {
bool isOrderUpdated; bool isOrderUpdated;
Future getCMCAllServices() async { Future getCMCAllServices() async {
GetCMCServicesRequestModel getCMCServicesRequestModel = new GetCMCServicesRequestModel(genderID: authenticatedUserObject.user.gender, identificationNo: authenticatedUserObject.user.patientIdentificationNo); GetCMCServicesRequestModel getCMCServicesRequestModel =
new GetCMCServicesRequestModel(genderID: authenticatedUserObject.user.gender, identificationNo: authenticatedUserObject.user.patientIdentificationNo);
hasError = false; hasError = false;
await baseAppClient.post(HHC_GET_ALL_CMC_SERVICES, onSuccess: (dynamic response, int statusCode) {
// RC IMPLEMENTATION
await baseAppClient.post(GET_ALL_CMC_SERVICES_RC + "?patientID=" + user.patientID.toString(), isAllowAny: true, onSuccess: (dynamic response, int statusCode) {
cmcAllServicesList.clear(); cmcAllServicesList.clear();
response['PatientER_CMC_GetAllServicesList'].forEach((data) { response.forEach((data) {
cmcAllServicesList.add(GetCMCServicesResponseModel.fromJson(data)); cmcAllServicesList.add(GetCMCServicesResponseModel.fromJson(data));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: getCMCServicesRequestModel.toJson()); }, body: {});
// await baseAppClient.post(HHC_GET_ALL_CMC_SERVICES, onSuccess: (dynamic response, int statusCode) {
// cmcAllServicesList.clear();
// response['PatientER_CMC_GetAllServicesList'].forEach((data) {
// cmcAllServicesList.add(GetCMCServicesResponseModel.fromJson(data));
// });
// }, onFailure: (String error, int statusCode) {
// hasError = true;
// super.error = error;
// }, body: getCMCServicesRequestModel.toJson());
} }
Future getCmcAllPresOrders() async { Future getCmcAllPresOrders() async {
@ -87,12 +100,25 @@ class CMCService extends BaseService {
}, body: updatePresOrderRequestModel.toJson()); }, body: updatePresOrderRequestModel.toJson());
} }
Future<String> insertCMCOrderRC({CMCInsertPresOrderRequestModel order}) async {
hasError = false;
String reqId = "";
await baseAppClient.post(ADD_CMC_ORDER_RC, onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true;
reqId = response['RequestNo'].toString();
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: order.toJson());
return reqId;
}
Future<String> insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async { Future<String> insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async {
hasError = false; hasError = false;
String reqId=""; String reqId = "";
await baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true; isOrderUpdated = true;
reqId=response['RequestNo'].toString(); reqId = response['RequestNo'].toString();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -116,6 +116,9 @@ class EReferralService extends BaseService {
SearchEReferralRequestModel searchEReferralRequestModel) async { SearchEReferralRequestModel searchEReferralRequestModel) async {
_allReferral.clear(); _allReferral.clear();
hasError = false; hasError = false;
searchEReferralRequestModel.patientMobileNumber = "966545156035";
// TODO return this code when the fix the server // TODO return this code when the fix the server
await baseAppClient.post(GET_E_REFERRALS, await baseAppClient.post(GET_E_REFERRALS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -113,6 +113,16 @@ class BaseAppClient {
} }
} }
// For RC Services
// if(body.containsKey("patientId"))
// body.remove("PatientID");
//
// if(body.containsKey("patientOutSa"))
// body.remove("PatientOutSA");
// body['PatientID'] = 1018977;
// body['TokenID'] = "@dm!n";
print("URL : $url"); print("URL : $url");
final jsonBody = json.encode(body); final jsonBody = json.encode(body);
print(jsonBody); print(jsonBody);
@ -126,6 +136,10 @@ class BaseAppClient {
} else { } else {
var decoded = utf8.decode(response.bodyBytes); var decoded = utf8.decode(response.bodyBytes);
var parsed = json.decode(utf8.decode(response.bodyBytes)); var parsed = json.decode(utf8.decode(response.bodyBytes));
if (isAllowAny) {
onSuccess(parsed, statusCode);
} else {
if (parsed['Response_Message'] != null) { if (parsed['Response_Message'] != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
@ -185,6 +199,7 @@ class BaseAppClient {
} }
} }
} }
}
} else { } else {
onFailure('Please Check The Internet Connection', -1); onFailure('Please Check The Internet Connection', -1);
} }

@ -34,10 +34,10 @@ class PrescriptionsService extends BaseService {
} }
Future getPrescriptionsOrders() async { Future getPrescriptionsOrders() async {
prescriptionsOrderList.clear();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, onSuccess: (dynamic response, int statusCode) {
prescriptionsOrderList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((prescriptionsOrder) { response['PatientER_GetPatientAllPresOrdersList'].forEach((prescriptionsOrder) {
prescriptionsOrderList.add(PrescriptionsOrder.fromJson(prescriptionsOrder)); prescriptionsOrderList.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
}); });

@ -38,9 +38,6 @@ class CMCViewModel extends BaseViewModel {
Future getCMCAllServices() async { Future getCMCAllServices() async {
await _cMCService.getCMCAllServices(); await _cMCService.getCMCAllServices();
CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel(checkupType: cmcAllServicesList[0].iD);
await getCheckupItems(cMCGetItemsRequestModel: cMCGetItemsRequestModel, isFirst: true);
if (_cMCService.hasError) { if (_cMCService.hasError) {
error = _cMCService.error; error = _cMCService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -92,7 +89,6 @@ class CMCViewModel extends BaseViewModel {
await _cMCService.getOrderDetailByOrderID(getOrderDetailByOrderIDRequestModel); await _cMCService.getOrderDetailByOrderID(getOrderDetailByOrderIDRequestModel);
} }
//TODO check it in uat
Future<String> insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async { Future<String> insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
order.createdBy = user.patientID; order.createdBy = user.patientID;
@ -104,7 +100,20 @@ class CMCViewModel extends BaseViewModel {
} else { } else {
getCmcAllPresOrders(); getCmcAllPresOrders();
} }
return requestId;
}
Future<String> insertCMCOrderRC({CMCInsertPresOrderRequestModel order}) async {
setState(ViewState.Busy);
order.createdBy = user.patientID;
order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService();
String requestId = await _cMCService.insertCMCOrderRC(order: order);
if (_cMCService.hasError) {
error = _cMCService.error;
setState(ViewState.ErrorLocal);
} else {
getCmcAllPresOrders();
}
return requestId; return requestId;
} }

@ -77,7 +77,9 @@ class PrescriptionsViewModel extends BaseViewModel {
} }
getPrescriptionsOrders({bool showLoading = false}) async { getPrescriptionsOrders({bool showLoading = false}) async {
if (showLoading) setState(ViewState.Busy); // print(showLoading);
setState(ViewState.Busy);
Future.delayed(new Duration(milliseconds: 300)).then((value) async {
await _prescriptionsService.getPrescriptionsOrders(); await _prescriptionsService.getPrescriptionsOrders();
if (_prescriptionsService.hasError) { if (_prescriptionsService.hasError) {
error = _prescriptionsService.error; error = _prescriptionsService.error;
@ -85,6 +87,7 @@ class PrescriptionsViewModel extends BaseViewModel {
} else { } else {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
});
} }
setFilterType(FilterType filterType) { setFilterType(FilterType filterType) {

@ -46,11 +46,11 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
patientERCMCInsertServicesList = new PatientERCMCInsertServicesList( patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
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].text,
selectedServiceNameAR: widget.model.cmcAllServicesList[0].descriptionN, selectedServiceNameAR: widget.model.cmcAllServicesList[0].textN,
recordID: 1, recordID: 1,
totalPrice: widget.model.cmcAllServicesList[0].totalPrice, totalPrice: widget.model.cmcAllServicesList[0].priceTotal,
vAT: widget.model.cmcAllServicesList[0].vAT); vAT: widget.model.cmcAllServicesList[0].priceVAT);
cMCInsertPresOrderRequestModel = new CMCInsertPresOrderRequestModel(patientERCMCInsertServicesList: [patientERCMCInsertServicesList]); cMCInsertPresOrderRequestModel = new CMCInsertPresOrderRequestModel(patientERCMCInsertServicesList: [patientERCMCInsertServicesList]);
} }

@ -63,18 +63,18 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
return Row( return Row(
children: [ children: [
Radio( Radio(
value: widget.model.cmcAllServicesList[index].serviceID, value: num.tryParse(widget.model.cmcAllServicesList[index].serviceID),
activeColor: Colors.red[800], activeColor: Colors.red[800],
onChanged: (newValue) async { onChanged: (newValue) async {
selectedItem = index; selectedItem = index;
PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList( PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
price: widget.model.cmcAllServicesList[index].price, price: widget.model.cmcAllServicesList[index].price,
serviceID: widget.model.cmcAllServicesList[index].serviceID.toString(), serviceID: widget.model.cmcAllServicesList[index].serviceID,
selectedServiceName: widget.model.cmcAllServicesList[index].description, selectedServiceName: widget.model.cmcAllServicesList[index].text,
selectedServiceNameAR: widget.model.cmcAllServicesList[index].descriptionN, selectedServiceNameAR: widget.model.cmcAllServicesList[index].textN,
recordID: 1, recordID: 1,
totalPrice: widget.model.cmcAllServicesList[index].totalPrice, totalPrice: widget.model.cmcAllServicesList[index].priceTotal,
vAT: widget.model.cmcAllServicesList[index].vAT); vAT: widget.model.cmcAllServicesList[index].priceVAT);
setState(() { setState(() {
widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList]; widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList];
}); });
@ -93,7 +93,7 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
bottom: 20, bottom: 20,
), ),
child: Text( child: Text(
projectViewModel.isArabic ? widget.model.cmcAllServicesList[index].descriptionN : widget.model.cmcAllServicesList[index].description, projectViewModel.isArabic ? widget.model.cmcAllServicesList[index].textN : widget.model.cmcAllServicesList[index].text,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -135,50 +135,6 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
), ),
], ],
), ),
// Card(
// shape: cardRadius(12),
// elevation: 4,
// child: Container(
// width: double.infinity,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Padding(
// padding: const EdgeInsets.only(left: 12, right: 12, top: 12),
// child: Text(
// TranslationBase.of(context).coveredService,
// style: TextStyle(
// fontSize: 14,
// fontWeight: FontWeight.w600,
// letterSpacing: -0.45,
// ),
// ),
// ),
// ListView.separated(
// itemBuilder: (context, index) {
// return Padding(
// padding: const EdgeInsets.all(12.0),
// child: Text(
// widget.model.checkupItems[index].itemName,
// style: TextStyle(
// fontSize: 12,
// fontWeight: FontWeight.w600,
// letterSpacing: -0.45,
// ),
// ),
// );
// },
// separatorBuilder: (context, index) {
// return mDivider(Colors.grey);
// },
// physics: NeverScrollableScrollPhysics(),
// shrinkWrap: true,
// itemCount: widget.model.checkupItems.length,
// ),
// ],
// ),
// ),
// ),
], ],
), ),
), ),
@ -194,13 +150,16 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList( PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
price: widget.model.cmcAllServicesList[selectedItem].price, price: widget.model.cmcAllServicesList[selectedItem].price,
serviceID: widget.model.cmcAllServicesList[selectedItem].serviceID.toString(), serviceID: widget.model.cmcAllServicesList[selectedItem].serviceID.toString(),
selectedServiceName: widget.model.cmcAllServicesList[selectedItem].description, selectedServiceName: widget.model.cmcAllServicesList[selectedItem].text,
selectedServiceNameAR: widget.model.cmcAllServicesList[selectedItem].descriptionN, selectedServiceNameAR: widget.model.cmcAllServicesList[selectedItem].textN,
recordID: 1, recordID: 1,
totalPrice: widget.model.cmcAllServicesList[selectedItem].totalPrice, totalPrice: widget.model.cmcAllServicesList[selectedItem].priceTotal,
vAT: widget.model.cmcAllServicesList[selectedItem].vAT, vAT: widget.model.cmcAllServicesList[selectedItem].priceVAT,
); );
widget.cMCInsertPresOrderRequestModel.patientID = projectViewModel.user.patientID;
widget.cMCInsertPresOrderRequestModel.patientOutSA = projectViewModel.user.outSA;
widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList]; widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList];
await widget.model.getCustomerInfo(); await widget.model.getCustomerInfo();
// if (widget.model.state == ViewState.ErrorLocal) { // if (widget.model.state == ViewState.ErrorLocal) {

@ -202,7 +202,7 @@ class _NewCMCStepThreePageState extends State<NewCMCStepThreePage> {
color: CustomColors.green, color: CustomColors.green,
onTap: () async { onTap: () async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
String requestId = await widget.model.insertPresPresOrder(order: widget.cmcInsertPresOrderRequestModel); String requestId = await widget.model.insertCMCOrderRC(order: widget.cmcInsertPresOrderRequestModel);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (widget.model.state != ViewState.ErrorLocal) { if (widget.model.state != ViewState.ErrorLocal) {
//show scuccess dialog //show scuccess dialog

@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dial
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart';
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/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/buttons/defaultButton.dart';
@ -54,9 +55,6 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
super.initState(); super.initState();
} }
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
void showSMSDialog(EReferralViewModel model) { void showSMSDialog(EReferralViewModel model) {
SMSOTP( SMSOTP(
context, context,
@ -69,29 +67,12 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
Navigator.pop(context), Navigator.pop(context),
}, },
).displayDialog(context); ).displayDialog(context);
// showDialog(
// context: context,
// barrierDismissible: false,
// child: EReferralConfirmSMSDialog(
// phoneNumber: _selectedCountry['code'] + _mobileTextController.text,
// onSucces: () {
// Navigator.of(context).pop();
// widget.changePageViewIndex(1);
// widget.createEReferralRequestModel.requesterName =
// _nameTextController.text;
// widget.createEReferralRequestModel.requesterContactNo =
// _selectedCountry['code'].toString().substring(1) +
// _mobileTextController.text;
// widget.createEReferralRequestModel.requesterRelationship =
// _selectedRelation.iD;
// }),
// ).then((value) {
// print("dialog dismissed");
// print(value);
// if (value != null && value) {}
// });
} }
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<EReferralViewModel>( return BaseView<EReferralViewModel>(
onModelReady: (model) => model.getRelationTypes(), onModelReady: (model) => model.getRelationTypes(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
@ -205,6 +186,10 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
await model.checkActivationCodeForEReferral(checkActivationCodeForEReferralRequestModel); await model.checkActivationCodeForEReferral(checkActivationCodeForEReferralRequestModel);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Future.delayed(Duration(seconds: 1), () {
AppToast.showErrorToast(message: model.error);
showSMSDialog(model);
});
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pop(); Navigator.of(context).pop();

@ -42,7 +42,7 @@ class _ReferralDetailsState extends State<ReferralDetails> {
Container( Container(
margin: EdgeInsets.only(bottom: 10.0), margin: EdgeInsets.only(bottom: 10.0),
child: Text( child: Text(
TranslationBase.of(context).referralDetails, TranslationBase.of(context).ereferral,
style: TextStyle( style: TextStyle(
letterSpacing: -0.64, letterSpacing: -0.64,
color: Colors.black, color: Colors.black,
@ -116,7 +116,7 @@ class _ReferralDetailsState extends State<ReferralDetails> {
), ),
Expanded( Expanded(
child: _getNormalText( child: _getNormalText(
DateUtil.getMonthDayYearDateFormatted( DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDateNoTimeZone( DateUtil.convertStringToDateNoTimeZone(
widget.referral.referralDate)), widget.referral.referralDate)),
isBold: true), isBold: true),

@ -172,7 +172,7 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
child: myRichText(TranslationBase.of(context).patientName + ": ", model.allReferral[index].patientName, projectViewModel.isArabic)), child: myRichText(TranslationBase.of(context).patientName + ": ", model.allReferral[index].patientName, projectViewModel.isArabic)),
myRichText(TranslationBase.of(context).hospital + ": ", model.allReferral[index].preferredBranchName, projectViewModel.isArabic), myRichText(TranslationBase.of(context).hospital + ": ", model.allReferral[index].preferredBranchName, projectViewModel.isArabic),
myRichText(TranslationBase.of(context).referralDate + ": ", myRichText(TranslationBase.of(context).referralDate + ": ",
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDateNoTimeZone(model.allReferral[index].referralDate)), projectViewModel.isArabic), DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateNoTimeZone(model.allReferral[index].referralDate)), projectViewModel.isArabic),
], ],
), ),
Icon(projectViewModel.isArabic ? Icons.arrow_back_ios_outlined : Icons.arrow_forward_outlined), Icon(projectViewModel.isArabic ? Icons.arrow_back_ios_outlined : Icons.arrow_forward_outlined),

@ -1,20 +1,15 @@
import 'dart:ui'; import 'dart:ui';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.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/pages/AlHabibMedicalService/h2o/h20_setting.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.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';
@ -77,67 +72,6 @@ class _H2OPageState extends State<H2OPage> with SingleTickerProviderStateMixin {
}, },
), ),
], ],
body: Scaffold(
// extendBodyBehindAppBar: true,
// appBar: PreferredSize(
// preferredSize: Size.fromHeight(65.0),
// child: Stack(
// children: <Widget>[
// Positioned(
// bottom: 1,
// left: 0,
// right: 0,
// child: BackdropFilter(
// filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
// child: Container(
// color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.8),
// height: 70.0,
// ),
// ),
// ),
// Center(
// child: Container(
// height: 60.0,
// alignment: Alignment.center,
// // margin: EdgeInsets.only(top: 10.0),
// // width: MediaQuery.of(context).size.width * 0.9,
//
// child: TabBar(
// isScrollable: false,
// controller: _tabController,
// indicatorWeight: 5.0,
// indicatorSize: TabBarIndicatorSize.tab,
// indicatorColor: Colors.red[800],
// labelColor: Theme.of(context).primaryColor,
// labelPadding: EdgeInsets.only(top: 4.0, left: 10.0, right: 13.0),
// unselectedLabelColor: Colors.grey[800],
// tabs: [
// Container(
// width: MediaQuery.of(context).size.width * 0.28,
// child: Center(
// child: Texts(TranslationBase.of(context).today),
// ),
// ),
// Container(
// width: MediaQuery.of(context).size.width * 0.28,
// child: Center(
// child: Texts(TranslationBase.of(context).week),
// ),
// ),
// Container(
// width: MediaQuery.of(context).size.width * 0.28,
// child: Center(
// child: Texts(TranslationBase.of(context).month),
// ),
// ),
// ],
// ),
// ),
// ),
// ],
// ),
// ),
// backgroundColor: Colors.white,
body: Column( body: Column(
children: <Widget>[ children: <Widget>[
TabBar( TabBar(
@ -170,40 +104,6 @@ class _H2OPageState extends State<H2OPage> with SingleTickerProviderStateMixin {
) )
], ],
), ),
bottomNavigationBar: BottomNavBar(
changeIndex: (index) {
if (index == 0) {
IS_VOICE_COMMAND_CLOSED = false;
} else if (index == 1) {
Navigator.push(
context,
FadePage(
page: AppScaffold(
appBarTitle: TranslationBase.of(context).medicalProfile,
isShowAppBar: true,
showHomeAppBarIcon: false,
appBarIcons: [
IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
color: Colors.white,
onPressed: () => Navigator.of(context).pushNamed(
SETTINGS,
),
),
],
body: MedicalProfilePageNew())));
} else if (index == 2) {
Navigator.of(context).pushNamedAndRemoveUntil(HOME, (Route<dynamic> route) => false);
} else if (index == 3) {
Navigator.of(context).pushNamed(MY_FAMILIY);
} else if (index == 4) {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: false)));
}
},
showHomeIcon: true,
index: 0,
),
),
), ),
); );
} }

@ -175,7 +175,7 @@ class _BookSuccessState extends State<BookSuccess> {
), ),
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF60686b), color: CustomColors.green,
textColor: Colors.white, textColor: Colors.white,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
@ -365,10 +365,11 @@ class _BookSuccessState extends State<BookSuccess> {
), ),
], ],
), ),
Container( // Container(
margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0), // margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0),
child: Image.asset("assets/images/new-design/payment-method.png"), // child: Image.asset("assets/images/new-design/payment-method.png"),
), // ),
Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()),
], ],
); );
} }
@ -447,10 +448,7 @@ class _BookSuccessState extends State<BookSuccess> {
fontSize: 12.0, fontSize: 12.0,
letterSpacing: -0.36, letterSpacing: -0.36,
)), )),
Container( Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()),
margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0),
child: Image.asset("assets/images/new-design/payment-method.png"),
),
Text( Text(
TranslationBase.of(context).payNowBookSuccesstext2, TranslationBase.of(context).payNowBookSuccesstext2,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,

@ -262,10 +262,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
letterSpacing: -0.46, letterSpacing: -0.46,
), ),
), ),
Container( Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()),
margin: EdgeInsets.only(top: 12, bottom: 12),
child: Image.asset("assets/images/new-design/payment_options_invoice_confirmation.png", width: 300),
),
], ],
), ),
), ),

@ -13,6 +13,7 @@ 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.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.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/dragable_sheet.dart'; import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
@ -95,9 +96,9 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
decoration: containerColorRadiusBorderWidth(CustomColors.accentColor, 200, Colors.white, 4), decoration: containerColorRadiusBorderWidth(CustomColors.accentColor, 200, Colors.white, 4),
), ),
Container( Container(
height: 60.0, height: 100.0,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
child: widget.selectedPaymentMethod == "ApplePay" ? SvgPicture.asset(getImagePath(widget.selectedPaymentMethod)) : Image.asset(getImagePath(widget.selectedPaymentMethod)), child: Image.asset(getImagePath(widget.selectedPaymentMethod), width: 100, height: 100),
), ),
mFlex(1), mFlex(1),
InkWell( InkWell(
@ -154,17 +155,16 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
color: Colors.white, color: Theme.of(context).scaffoldBackgroundColor,
height: MediaQuery.of(context).size.height * 0.1, margin: EdgeInsets.only(bottom: 5.0),
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: DefaultButton(
textColor: Colors.white, TranslationBase.of(context).confirm.toUpperCase(),
color: CustomColors.green, () {
label: TranslationBase.of(context).confirm.toUpperCase(),
onTap: () {
startPaymentProcess(projectViewModel.user); startPaymentProcess(projectViewModel.user);
}, },
color: CustomColors.green,
), ),
), ),
); );
@ -335,25 +335,25 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
String getImagePath(String paymentMethod) { String getImagePath(String paymentMethod) {
switch (paymentMethod) { switch (paymentMethod) {
case "MADA": case "MADA":
return 'assets/images/new-design/mada.png'; return 'assets/images/new/payment/Mada.png';
break;
case "SADAD":
return 'assets/images/new-design/sadad.png';
break; break;
// case "SADAD":
// return 'assets/images/new-design/sadad.png';
// break;
case "VISA": case "VISA":
return 'assets/images/new-design/visa.png'; return 'assets/images/new/payment/visa.png';
break; break;
case "MASTERCARD": case "MASTERCARD":
return 'assets/images/new-design/mastercard.png'; return 'assets/images/new/payment/Mastercard.png';
break; break;
case "Installment": case "Installment":
return 'assets/images/new-design/installment.png'; return 'assets/images/new/payment/installments.png';
break; break;
case "ApplePay": case "ApplePay":
return 'assets/images/new-design/applepay.svg'; return 'assets/images/new/payment/Apple_Pay.png';
break; break;
} }
return 'assets/images/new-design/mada.png'; return 'assets/images/new/payment/Mada.png';
} }
} }

@ -1,33 +1,30 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
class SchedulePage extends StatefulWidget { class SchedulePage extends StatefulWidget {
DoctorList doctorList; DoctorList doctorList;
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
SchedulePage({ SchedulePage({
this.appo, this.appo,
this.doctorList, this.doctorList,
}); });
@override @override
_SchedulePageState createState() => _SchedulePageState(); _SchedulePageState createState() => _SchedulePageState();
} }
@ -45,6 +42,7 @@ class _SchedulePageState extends State<SchedulePage> {
bool isPageChange = false; bool isPageChange = false;
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
@override @override
void initState() { void initState() {
this.doctorList = widget.doctorList; this.doctorList = widget.doctorList;
@ -76,18 +74,14 @@ class _SchedulePageState extends State<SchedulePage> {
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Color(0xffF7F7F7),
baseViewModel: model2, baseViewModel: model2,
isShowDecPage: false, isShowDecPage: false,
body: Column( body: SizedBox(
height: MediaQuery.of(context).size.height,
child: Stack(
children: [ children: [
SizedBox(height: 21), Container(
PageViewIndicator( margin: EdgeInsets.only(top: 40),
isActive: true,
currentPage: this.currentPage,
length: weeks.length,
),
Expanded(
child: PageView.builder( child: PageView.builder(
controller: _pageController, controller: _pageController,
itemCount: weeks.length, itemCount: weeks.length,
@ -98,127 +92,94 @@ class _SchedulePageState extends State<SchedulePage> {
}); });
}, },
itemBuilder: (context, index) { itemBuilder: (context, index) {
return ListView.separated( return Container(
child: ListView.builder(
itemCount: weeks[index].length, itemCount: weeks[index].length,
padding: EdgeInsets.all(21), itemBuilder: (context, index2) => InkWell(
separatorBuilder: (context, index) => SizedBox(height: 12),
itemBuilder: (context, index2) {
bool isToday = DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10);
Color toDayColor = isToday ? Color(0xff359846) : Colors.white;
return InkWell(
onTap: () { onTap: () {
openBookAppointment(weeks[index][index2]); openBookAppointment(weeks[index][index2]);
}, },
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded( Expanded(
flex: 1, flex: 1,
child: Column( child: Padding(
mainAxisSize: MainAxisSize.min, padding: projectViewModel.isArabic ? EdgeInsets.only(right: 20) : EdgeInsets.only(left: 20),
crossAxisAlignment: CrossAxisAlignment.start, child: Row(children: [
Column(
children: [ children: [
Text( Texts(
weeks[index][index2]['DayName'], weeks[index][index2]['DayName'],
style: TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w600, fontWeight: projectViewModel.isArabic ? FontWeight.w600 : FontWeight.w500,
color: Color(0xff2E303A),
letterSpacing: -0.52,
), ),
), Texts(
Text( getDayMonths(
getDayMonths(DateUtil.convertStringToDate(weeks[index][index2]['Date'])), DateUtil.convertStringToDate(
style: TextStyle( weeks[index][index2]['Date'],
fontSize: 18,
fontWeight: FontWeight.w700,
color: Color(0xff2E303A),
letterSpacing: -0.72,
), ),
), ),
fontWeight: FontWeight.bold,
fontSize: 18,
)
], ],
), )
])),
), ),
Expanded( Expanded(
flex: 3, flex: 3,
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(20.0)),
child: Container( child: Container(
decoration: BoxDecoration( padding: EdgeInsets.only(left: 10, right: 10, top: 15, bottom: 20),
color: toDayColor, margin: EdgeInsets.only(left: 20, right: 20, top: 7, bottom: 7),
borderRadius: BorderRadius.all( decoration: BoxDecoration(boxShadow: [
Radius.circular(10.0), DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10)
), ? BoxShadow(color: Colors.green, offset: Offset(projectViewModel.isArabic ? 5 : -5, 0))
boxShadow: [ : BoxShadow(
BoxShadow( color: Colors.grey[100],
color: Color(0xff000000).withOpacity(.05), blurRadius: 5,
blurRadius: 27, spreadRadius: 4,
offset: Offset(0, -3), offset: Offset(0, 10),
),
],
),
child: Container(
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0),
padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12),
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.only(
bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
),
), ),
child: Row( ], borderRadius: const BorderRadius.all(Radius.circular(10.0)), color: Colors.white),
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
if (isToday) DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10)
Text( ? Texts(
TranslationBase.of(context).today, TranslationBase.of(context).today,
style: TextStyle( color: Colors.green,
fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: toDayColor, fontSize: 12,
letterSpacing: -0.48, marginTop: 0,
), )
), : SizedBox(),
Row( Row(
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
weeks[index][index2]['WorkingHours'], weeks[index][index2]['WorkingHours'],
style: TextStyle( style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.56,
), ),
), ),
), ),
Icon(Icons.arrow_forward, size: 16.0),
], ],
) )
]), ]))),
), ),
Icon(Icons.arrow_forward, color: Color(0xff2B353E)),
], ],
), ))));
),
),
),
],
),
);
});
}, },
), )),
), PageViewIndicator(
isActive: true,
currentPage: this.currentPage,
length: weeks.length,
)
], ],
), )));
); }));
}),
);
} }
generateWeeksSchedules() { generateWeeksSchedules() {
@ -284,3 +245,289 @@ class _SchedulePageState extends State<SchedulePage> {
// ); // );
} }
} }
// import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
// import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
//
// import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart';
// import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart';
// import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
// import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
// import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
// import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
// import 'package:flutter/material.dart';
// import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
// import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
// import 'package:diplomaticquarterapp/pages/base/base_view.dart';
// import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
// import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
// import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
// import 'package:diplomaticquarterapp/uitl/app_toast.dart';
// import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
// import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
// import 'package:provider/provider.dart';
// import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
//
// class SchedulePage extends StatefulWidget {
// DoctorList doctorList;
// AppoitmentAllHistoryResultList appo;
// SchedulePage({
// this.appo,
// this.doctorList,
// });
// @override
// _SchedulePageState createState() => _SchedulePageState();
// }
//
// class _SchedulePageState extends State<SchedulePage> {
// DoctorsListService service;
// PageController _pageController = PageController();
// double currentPage = 0;
// int selectedindex = 0;
// List weeks = [];
// List<DoctorScheduleResponse> doctorScheduleResponse = [];
// int weekMS = 604800 * 1000;
// DoctorList doctorList;
// List<String> freeSlots = [];
// bool isPageChange = false;
//
// AppSharedPreferences sharedPref = AppSharedPreferences();
// @override
// void initState() {
// this.doctorList = widget.doctorList;
//
// super.initState();
// }
//
// @override
// Widget build(BuildContext context) {
// ProjectViewModel projectViewModel = Provider.of(context);
// return BaseView<MedicalViewModel>(
// onModelReady: (model) => model.getDoctorSchedule(doctorList),
// allowAny: true,
// builder: (_, model, widget) => BaseView<MedicalViewModel>(
// onModelReady: (model2) => model2.getFreeSlots(doctorList),
// allowAny: true,
// builder: (_, model2, widget2) {
// if (model2.freeSlots.length > 0 && isPageChange == false && model2.state == ViewState.Idle) {
// this.freeSlots = model2.freeSlots;
// this.doctorScheduleResponse = model.getDoctorScheduleList;
//
// this.generateWeeksSchedules();
// } else if (model2.freeSlots.length == 0 && model2.state == ViewState.Idle) {
// AppToast.showErrorToast(message: TranslationBase.of(context).emptySchedule);
// Navigator.pop(context);
// }
// return AppScaffold(
// appBarTitle: TranslationBase.of(context).schedule,
// showNewAppBar: true,
// showNewAppBarTitle: true,
// isShowAppBar: true,
// backgroundColor: Color(0xffF7F7F7),
// baseViewModel: model2,
// isShowDecPage: false,
// body: Column(
// children: [
// SizedBox(height: 21),
// PageViewIndicator(
// isActive: true,
// currentPage: this.currentPage,
// length: weeks.length,
// ),
// Expanded(
// child: PageView.builder(
// controller: _pageController,
// itemCount: weeks.length,
// onPageChanged: (index) {
// setState(() {
// isPageChange = true;
// this.currentPage = index.toDouble();
// });
// },
// itemBuilder: (context, index) {
// return ListView.separated(
// itemCount: weeks[index].length,
// padding: EdgeInsets.all(21),
// separatorBuilder: (context, index) => SizedBox(height: 12),
// itemBuilder: (context, index2) {
// bool isToday = DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10);
// Color toDayColor = isToday ? Color(0xff359846) : Colors.white;
// return InkWell(
// onTap: () {
// openBookAppointment(weeks[index][index2]);
// },
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Expanded(
// flex: 1,
// child: Column(
// mainAxisSize: MainAxisSize.min,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text(
// weeks[index][index2]['DayName'],
// style: TextStyle(
// fontSize: 13,
// fontWeight: FontWeight.w600,
// color: Color(0xff2E303A),
// letterSpacing: -0.52,
// ),
// ),
// Text(
// getDayMonths(DateUtil.convertStringToDate(weeks[index][index2]['Date'])),
// style: TextStyle(
// fontSize: 18,
// fontWeight: FontWeight.w700,
// color: Color(0xff2E303A),
// letterSpacing: -0.72,
// ),
// ),
// ],
// ),
// ),
// Expanded(
// flex: 3,
// child: Container(
// decoration: BoxDecoration(
// color: toDayColor,
// borderRadius: BorderRadius.all(
// Radius.circular(10.0),
// ),
// boxShadow: [
// BoxShadow(
// color: Color(0xff000000).withOpacity(.05),
// blurRadius: 27,
// offset: Offset(0, -3),
// ),
// ],
// ),
// child: Container(
// margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0),
// padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12),
// decoration: BoxDecoration(
// color: Colors.white,
// border: Border.all(color: Colors.white, width: 1),
// borderRadius: BorderRadius.only(
// bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
// topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
// bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
// topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
// ),
// ),
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Expanded(
// child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
// if (isToday)
// Text(
// TranslationBase.of(context).today,
// style: TextStyle(
// fontSize: 12,
// fontWeight: FontWeight.w600,
// color: toDayColor,
// letterSpacing: -0.48,
// ),
// ),
// Row(
// children: [
// Expanded(
// child: Text(
// weeks[index][index2]['WorkingHours'],
// style: TextStyle(
// fontSize: 13,
// fontWeight: FontWeight.w600,
// color: Color(0xff2E303A),
// letterSpacing: -0.56,
// ),
// ),
// ),
// ],
// )
// ]),
// ),
// Icon(Icons.arrow_forward, color: Color(0xff2B353E)),
// ],
// ),
// ),
// ),
// ),
// ],
// ),
// );
// });
// },
// ),
// ),
// ],
// ),
// );
// }),
// );
// }
//
// generateWeeksSchedules() {
// this.weeks.clear();
// for (var i = 0; i < 8; i++) {
// var weekSchedule = generateNewWeekSchedule(i);
// this.markWeekFreeDays(weekSchedule);
// this.weeks.add(weekSchedule);
// }
// //print(this.weeks);
// }
//
// markWeekFreeDays(schedule) {
// for (var workDay in schedule) {
// workDay['fullDay'] = !this.hasFreeSlot(workDay['Date']);
// }
// }
//
// generateNewWeekSchedule(weekIndex) {
// var weekMSOffset = weekIndex * weekMS;
//
// var newWeekSchedule = [];
// for (var workDay in this.doctorScheduleResponse) {
// Map<String, dynamic> newWorkDay = Map();
// newWorkDay['Date'] = DateUtil.convertDateMSToJsonDate(DateUtil.convertStringToDate(workDay.date).millisecondsSinceEpoch + weekMSOffset);
// newWorkDay['DayName'] = workDay.dayName;
// newWorkDay['WorkingHours'] = workDay.workingHours;
// newWeekSchedule.add(newWorkDay);
// }
// return newWeekSchedule;
// }
//
// hasFreeSlot(String jsonDate) {
// var date = DateUtil.convertStringToDate(jsonDate);
// var scheduleDay = date;
// for (var event in this.freeSlots) {
// var date = DateUtil.convertStringToDate(event);
// var nDate = DateTime(date.year, date.month, date.day);
//
// if (nDate.millisecondsSinceEpoch == scheduleDay.millisecondsSinceEpoch) {
// return true;
// }
// }
// return false;
// }
//
// String getDayMonths(DateTime dateTime) {
// String dateFormat = '${dateTime.day} ${DateUtil.getMonth(dateTime.month).toString().substring(0, 3)}';
// return dateFormat;
// }
//
// openBookAppointment(selectedDate) {
// //sharedPref.setObject(DOCTOR_SCHEDULE_DATE_SEL, selectedDate);
// Navigator.of(context).pop(selectedDate);
// // Navigator.push(
// // context,
// // FadePage(
// // page: AppointmentDetails(
// // appo: widget.appo,
// // doctorSchedule: selectedDate,
// // ),
// // ),
// // );
// }
// }

@ -57,6 +57,8 @@ class _ToDoState extends State<ToDo> {
ToDoCountProviderModel toDoProvider; ToDoCountProviderModel toDoProvider;
CountdownTimerController controller; CountdownTimerController controller;
ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
widget.patientShareResponse = new PatientShareResponse(); widget.patientShareResponse = new PatientShareResponse();
@ -73,7 +75,7 @@ class _ToDoState extends State<ToDo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context); toDoProvider = Provider.of<ToDoCountProviderModel>(context);
ProjectViewModel projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).todoList, appBarTitle: TranslationBase.of(context).todoList,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
@ -169,12 +171,12 @@ class _ToDoState extends State<ToDo> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
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: -0.64)),
if (getDoctorSpeciality(widget.appoList[index].doctorSpeciality) != "null\n") if (getDoctorSpeciality(widget.appoList[index].doctorSpeciality) != "null\n")
Container( Container(
margin: EdgeInsets.only(top: 3.0, bottom: 3.0), margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
child: Text(getDoctorSpeciality(widget.appoList[index].doctorSpeciality).trim(), child: Text(getDoctorSpeciality(widget.appoList[index].doctorSpeciality).trim(),
style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)), style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: -0.64)),
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -267,7 +269,7 @@ class _ToDoState extends State<ToDo> {
color: Color(0xff20bc44), color: Color(0xff20bc44),
), ),
height: 30.0, height: 30.0,
padding: EdgeInsets.only(right: 15), padding: EdgeInsets.only(right: 10, left: 10),
margin: EdgeInsets.symmetric(horizontal: 20), margin: EdgeInsets.symmetric(horizontal: 20),
transform: Matrix4.translationValues(0.0, -8.0, 0.0), transform: Matrix4.translationValues(0.0, -8.0, 0.0),
child: Row( child: Row(
@ -319,11 +321,11 @@ class _ToDoState extends State<ToDo> {
break; break;
case 15: case 15:
return widget.languageID == 'ar' ? "assets/images/new-design/pay_online_button_arabic_disabled.png" : "assets/images/new-design/pay_online_button_disabled.png"; return projectViewModel.isArabic ? "assets/images/new-design/pay_online_button_arabic_disabled.png" : "assets/images/new-design/pay_online_button_disabled.png";
break; break;
case 20: case 20:
return widget.languageID == 'ar' ? "assets/images/new-design/pay_online_button_arabic.png" : "assets/images/new-design/pay_online_button.png"; return projectViewModel.isArabic ? "assets/images/new-design/pay_online_button_arabic.png" : "assets/images/new-design/pay_online_button.png";
break; break;
case 30: case 30:

@ -60,7 +60,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
height: 60.0, height: 60.0,
width: 60, width: 60,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
child: Image.asset("assets/images/new-design/mada.png"), child: Image.asset("assets/images/new/payment/Mada.png"),
), ),
mWidth(12), mWidth(12),
Text( Text(
@ -96,7 +96,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
height: 60.0, height: 60.0,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
width: 60, width: 60,
child: Image.asset("assets/images/new-design/visa.png"), child: Image.asset("assets/images/new/payment/visa.png"),
), ),
mWidth(12), mWidth(12),
Text( Text(
@ -132,7 +132,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
height: 60.0, height: 60.0,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
width: 60, width: 60,
child: Image.asset("assets/images/new-design/mastercard.png"), child: Image.asset("assets/images/new/payment/Mastercard.png"),
), ),
mWidth(12), mWidth(12),
Text( Text(
@ -168,7 +168,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
height: 60.0, height: 60.0,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
width: 60, width: 60,
child: Image.asset("assets/images/new-design/installment.png"), child: Image.asset("assets/images/new/payment/installments.png"),
), ),
mWidth(12), mWidth(12),
Text( Text(
@ -205,7 +205,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
height: 60.0, height: 60.0,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
width: 60, width: 60,
child: SvgPicture.asset("assets/images/new-design/applepay.svg"), child: Image.asset("assets/images/new/payment/Apple_Pay.png"),
), ),
mWidth(12), mWidth(12),
Text( Text(

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/theme/colors.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_new.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class PaymentDialog extends StatefulWidget { class PaymentDialog extends StatefulWidget {
@ -21,48 +23,29 @@ class _PaymentDialogState extends State<PaymentDialog> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
child: Dialog( child: Dialog(
shape: shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
child: Container( child: Container(
height: 550.0, height: 550.0,
width: 450.0, width: 450.0,
child: Column( child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.max, children: <Widget>[
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container( Container(
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 5.0),
child: Text("Invoice Detail", child: Text(TranslationBase.of(context).invoiceDetails, style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.bold)),
style: TextStyle(
fontSize: 25.0,
fontWeight: FontWeight.bold,
fontFamily: "Open-Sans-Bold")),
), ),
Divider( Divider(
color: Colors.grey, color: Colors.grey,
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
child: Text("Appointment Details", child: Text(TranslationBase.of(context).appoDetails, style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.bold)),
style: TextStyle(
fontSize: 15.0,
fontWeight: FontWeight.bold,
fontFamily: "Open-Sans-Bold")),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
child: Text( child: Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, style: TextStyle(color: Colors.grey[700], fontSize: 15.0, fontWeight: FontWeight.bold)),
widget.appo.doctorTitle + " " + widget.appo.doctorNameObj,
style: TextStyle(
color: Colors.grey[700],
fontSize: 15.0,
fontWeight: FontWeight.bold,
fontFamily: "Open-Sans-Bold")),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
child: Text(getDate(widget.appo.appointmentDate), child: Text(getDate(widget.appo.appointmentDate), style: getTextStyle()),
style: getTextStyle()),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
@ -76,62 +59,31 @@ class _PaymentDialogState extends State<PaymentDialog> {
child: Table( child: Table(
children: [ children: [
TableRow(children: [ TableRow(children: [
TableCell( TableCell(child: _getNormalText(TranslationBase.of(context).patientShareToDo)),
child: _getNormalText( TableCell(child: _getNormalText(widget.patientShareResponse.patientShare.toString())),
TranslationBase.of(context).patientShareToDo)),
TableCell(
child: _getNormalText(widget
.patientShareResponse.patientShare
.toString())),
]), ]),
TableRow(children: [ TableRow(children: [
TableCell( TableCell(child: _getNormalText(TranslationBase.of(context).patientTaxToDo)),
child: _getNormalText( TableCell(child: _getNormalText(widget.patientShareResponse.patientTaxAmount.toString())),
TranslationBase.of(context).patientTaxToDo)),
TableCell(
child: _getNormalText(widget
.patientShareResponse.patientTaxAmount
.toString())),
]), ]),
TableRow(children: [ TableRow(children: [
TableCell( TableCell(child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo)),
child: _getNormalText(TranslationBase.of(context) TableCell(child: _getNormalText(widget.patientShareResponse.patientShareWithTax.toString())),
.patientShareTotalToDo)),
TableCell(
child: _getNormalText(widget
.patientShareResponse.patientShareWithTax
.toString())),
]), ]),
], ],
), ),
), ),
Container( Divider(
alignment: Alignment.center, color: Colors.grey,
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 5.0),
child: Text("You can pay by following options: ",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
fontFamily: "Open-Sans")),
), ),
Container( Container(
alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 5.0),
child: Image.asset( child: Text(TranslationBase.of(context).YouCanPayByTheFollowingOptions, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold)),
"assets/images/new-design/payment_options_invoice_confirmation.png",
width: 300),
), ),
Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()),
Container( Container(
alignment: Alignment.center, margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 15.0),
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 15.0), child: Text(TranslationBase.of(context).appoPaymentConfirm, style: TextStyle(fontSize: 14.0, color: CustomColors.accentColor)),
child: Text(
"Are You Sure You Want To Make payment for this Appointment?",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14.0,
color: Colors.red[700],
fontFamily: "Open-Sans")),
), ),
Divider( Divider(
color: Colors.grey, color: Colors.grey,
@ -148,10 +100,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
Navigator.pop(context, null); Navigator.pop(context, null);
}, },
child: Container( child: Container(
child: Text("Cancel", child: Text(TranslationBase.of(context).cancel, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, color: CustomColors.accentColor)),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 18.0, color: Colors.red[700])),
), ),
), ),
), ),
@ -162,7 +111,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
// widget.onPaymentMethodSelected(); // widget.onPaymentMethodSelected();
}, },
child: Container( child: Container(
child: Text("Ok", child: Text(TranslationBase.of(context).ok,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 18.0, fontSize: 18.0,
@ -182,19 +131,12 @@ class _PaymentDialogState extends State<PaymentDialog> {
_getNormalText(text) { _getNormalText(text) {
return Container( return Container(
margin: EdgeInsets.only(top: 10.0, right: 10.0), margin: EdgeInsets.only(top: 10.0, right: 10.0),
child: Text(text, child: Text(text, style: TextStyle(fontSize: 13, letterSpacing: 0.5, color: Colors.grey[700])),
textAlign: TextAlign.end,
style: TextStyle(
fontSize: 15,
fontFamily: 'Open-Sans',
letterSpacing: 0.5,
color: Colors.grey[700])),
); );
} }
TextStyle getTextStyle() { TextStyle getTextStyle() {
return TextStyle( return TextStyle(color: Colors.grey[700], fontSize: 13.0);
color: Colors.grey[700], fontSize: 15.0, fontFamily: "Open-Sans-Bold");
} }
// Future navigateToPaymentMethod(context) async { // Future navigateToPaymentMethod(context) async {

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart'; import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.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_new.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -38,7 +39,7 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
child: Container( child: Container(
height: 600.0, height: 600.0,
margin: EdgeInsets.all(20.0), margin: EdgeInsets.all(20.0),
width: 450.0, width: 500.0,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -81,10 +82,8 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
], ],
), ),
Container( Container(
alignment: Alignment.center,
margin: EdgeInsets.only(bottom: 10.0, top: 10.0), margin: EdgeInsets.only(bottom: 10.0, top: 10.0),
child: Text(widget.clinicName, child: Text(widget.clinicName,
textAlign: TextAlign.center,
style: style:
TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)), TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)),
), ),
@ -194,21 +193,13 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
color: Colors.grey[400], color: Colors.grey[400],
), ),
Container( Container(
alignment: Alignment.center,
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: new Text( child: new Text(
TranslationBase.of(context).upComingPayOption, TranslationBase.of(context).upComingPayOption,
textAlign: TextAlign.center,
style: new TextStyle(fontSize: 14.0), style: new TextStyle(fontSize: 14.0),
), ),
), ),
Container( Container(margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0), child: getPaymentMethods()),
alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 5.0),
child: Image.asset(
"assets/images/new-design/payment_options_invoice_confirmation.png",
width: 300),
),
Divider( Divider(
thickness: 1.0, thickness: 1.0,
color: Colors.grey[400], color: Colors.grey[400],
@ -272,10 +263,9 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
return Container( return Container(
margin: EdgeInsets.only(top: 10.0, right: 10.0), margin: EdgeInsets.only(top: 10.0, right: 10.0),
child: Text(text, child: Text(text,
textAlign: TextAlign.end, textAlign: TextAlign.start,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
// fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
letterSpacing: 0.5, letterSpacing: 0.5,
color: Colors.black)), color: Colors.black)),
); );
@ -285,10 +275,9 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
return Container( return Container(
margin: EdgeInsets.only(top: 10.0, right: 10.0, bottom: 10.0), margin: EdgeInsets.only(top: 10.0, right: 10.0, bottom: 10.0),
child: Text(text, child: Text(text,
textAlign: TextAlign.end, textAlign: TextAlign.start,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
// fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
letterSpacing: 0.5, letterSpacing: 0.5,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black)), color: Colors.black)),

@ -21,6 +21,7 @@ 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/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
@ -439,7 +440,7 @@ class _clinic_listState extends State<ClinicList> {
isDataLoaded isDataLoaded
? Container( ? Container(
height: MediaQuery.of(context).size.height * 0.7, height: MediaQuery.of(context).size.height * 0.7,
child: Column( child: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length > 0 ? Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
ListView.builder( ListView.builder(
@ -465,7 +466,7 @@ class _clinic_listState extends State<ClinicList> {
height: 10.0, height: 10.0,
), ),
], ],
), ): getNoDataWidget(context),
) )
: Container(), : Container(),
isDataLoaded isDataLoaded

@ -10,7 +10,6 @@ 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/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/dialogs/ConfirmWithMessageDialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.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';
@ -77,9 +76,11 @@ class PrescriptionOrderOverview extends StatelessWidget {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Center(
child: Text(prescriptionReportList[index].itemDescription.isNotEmpty child: Text(
prescriptionReportList[index].itemDescription.isNotEmpty
? prescriptionReportList[index].itemDescription ? prescriptionReportList[index].itemDescription
: prescriptionReportList[index].itemDescriptionN)), : prescriptionReportList[index].itemDescriptionN,
style: TextStyle(fontFamily: prescriptionReportList[index].itemDescription.isNotEmpty ? 'Poppins' : 'Cairo'))),
)), )),
], ],
), ),
@ -130,7 +131,16 @@ class PrescriptionOrderOverview extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text(prescriptionReportEnhList[index].itemDescription), Text(
(prescriptionReportList[index].itemDescription.isNotEmpty
? prescriptionReportList[index].itemDescription
: prescriptionReportList[index].itemDescriptionN ?? ''),
style: TextStyle(
fontFamily: prescriptionReportList[index].itemDescription.isNotEmpty ? 'Poppins' : 'Cairo',
letterSpacing: -0.64,
color: Color(0xff2E303A),
fontSize: 16.0,
fontWeight: FontWeight.w600)),
], ],
), ),
), ),

@ -2361,6 +2361,14 @@ class TranslationBase {
String get selectSlot => localizedValues["selectSlot"][locale.languageCode]; String get selectSlot => localizedValues["selectSlot"][locale.languageCode];
String get invoiceDetails => localizedValues["invoiceDetails"][locale.languageCode];
String get appoDetails => localizedValues["appoDetails"][locale.languageCode];
String get appoPaymentConfirm => localizedValues["appoPaymentConfirm"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -26,6 +26,22 @@ Color getColorFromHex(String hexColor) {
return Color(int.parse(hexColor, radix: 16)); return Color(int.parse(hexColor, radix: 16));
} }
Widget getPaymentMethods() {
return Container(
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset("assets/images/new/payment/Mada.png", width: 50, height: 50),
Image.asset("assets/images/new/payment/visa.png", width: 50, height: 50),
Image.asset("assets/images/new/payment/Mastercard.png", width: 50, height: 50),
Image.asset("assets/images/new/payment/Apple_Pay.png", width: 50, height: 50),
Image.asset("assets/images/new/payment/installments.png", width: 50, height: 50),
],
),
);
}
Widget getNoDataWidget(BuildContext context) { Widget getNoDataWidget(BuildContext context) {
return Container( return Container(
child: Center( child: Center(

@ -244,6 +244,7 @@ flutter:
- assets/images/new/bottom_nav/ - assets/images/new/bottom_nav/
- assets/images/new/services/ - assets/images/new/services/
- assets/images/new/appointment-rating/ - assets/images/new/appointment-rating/
- assets/images/new/payment/
fonts: fonts:
- family: WorkSans - family: WorkSans

Loading…
Cancel
Save