Merge branch 'development' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan-patientapp

merge-requests/358/head
Sultan Khan 3 years ago
commit 5b656b0b51

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -14,11 +14,11 @@ const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
const BASE_URL = 'https://uat.hmgwebservices.com/';
//const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
//const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
//const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// Pharmacy Production URLs
const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
@ -49,6 +49,7 @@ const WIFI_CREDENTIALS =
const GET_MY_DOCTOR =
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_PRE_POST_IMAGES = 'Services/Doctors.svc/REST/GetDoctorPrePostImages';
const GET_DOCTOR_RATING_NOTES =
'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
const GET_DOCTOR_RATING_DETAILS =
@ -605,6 +606,15 @@ const FILTERED_PRODUCTS = 'products?categoryids=';
const GET_DOCTOR_LIST_CALCULATION =
"Services/Doctors.svc/REST/GetCallculationDoctors";
const GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC =
"Services/Patients.svc/REST/GetDentalAppointments";
const GET_DENTAL_APPOINTMENT_INVOICE =
"Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo";
const SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL =
"Services/Notifications.svc/REST/SendInvoiceForDental";
class AppGlobal {
static var context;

File diff suppressed because it is too large Load Diff

@ -23,8 +23,7 @@ class PrescriptionsService extends BaseService {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(PRESCRIPTIONS,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(PRESCRIPTIONS, onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) {
prescriptionsList.add(Prescriptions.fromJson(prescriptions));
@ -38,13 +37,10 @@ class PrescriptionsService extends BaseService {
Future getPrescriptionsOrders() async {
Map<String, dynamic> body = Map();
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) {
prescriptionsOrderList
.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
response['PatientER_GetPatientAllPresOrdersList'].forEach((prescriptionsOrder) {
prescriptionsOrderList.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -53,8 +49,7 @@ class PrescriptionsService extends BaseService {
}
RequestPrescriptionReport _requestPrescriptionReport =
RequestPrescriptionReport(
appointmentNo: 0, isDentalAllowedBackend: false);
RequestPrescriptionReport(appointmentNo: 0, isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport({Prescriptions prescriptions}) async {
@ -70,25 +65,19 @@ class PrescriptionsService extends BaseService {
_requestPrescriptionReport.episodeID = prescriptions.episodeID;
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.post(
prescriptions.isInOutPatient
? GET_PRESCRIPTION_REPORT_ENH
: GET_PRESCRIPTION_REPORT,
await baseAppClient.post(prescriptions.isInOutPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear();
prescriptionReportEnhList.clear();
if (prescriptions.isInOutPatient) {
response['ListPRM'].forEach((prescriptions) {
prescriptionReportList
.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
prescriptionReportListINP.clear();
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
prescriptionReportListINP
.add(PrescriptionReportINP.fromJson(prescriptions));
prescriptionReportListINP.add(PrescriptionReportINP.fromJson(prescriptions));
});
}
}, onFailure: (String error, int statusCode) {
@ -97,13 +86,12 @@ class PrescriptionsService extends BaseService {
}, body: _requestPrescriptionReport.toJson());
}
RequestSendPrescriptionEmail _requestSendPrescriptionEmail =
RequestSendPrescriptionEmail(
RequestSendPrescriptionEmail _requestSendPrescriptionEmail = RequestSendPrescriptionEmail(
isDentalAllowedBackend: false,
);
Future sendPrescriptionEmail(String appointmentDate, int patientID,
String clinicName, String doctorName, int doctorID, int projectID) async {
Future sendPrescriptionEmail(
String appointmentDate, int patientID, String clinicName, String doctorName, int doctorID, int projectID) async {
_requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList;
_requestSendPrescriptionEmail.appointmentDate = appointmentDate;
_requestSendPrescriptionEmail.patientID = patientID;
@ -112,25 +100,21 @@ class PrescriptionsService extends BaseService {
_requestSendPrescriptionEmail.projectID = projectID;
_requestSendPrescriptionEmail.to = user.emailAddress;
_requestSendPrescriptionEmail.dateofBirth = user.dateofBirth;
_requestSendPrescriptionEmail.patientIditificationNum =
user.patientIdentificationNo;
_requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo;
_requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber;
_requestSendPrescriptionEmail.doctorID = doctorID;
_requestSendPrescriptionEmail.patientName =
user.firstName + " " + user.lastName;
_requestSendPrescriptionEmail.patientName = user.firstName + " " + user.lastName;
_requestSendPrescriptionEmail.setupID = user.setupID;
_requestSendPrescriptionEmail.to = user.emailAddress;
hasError = false;
await baseAppClient
.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {},
onFailure: (String error, int statusCode) {
await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSendPrescriptionEmail.toJson());
}
RequestGetListPharmacyForPrescriptions
requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions(
latitude: 0,
longitude: 0,
@ -141,12 +125,11 @@ class PrescriptionsService extends BaseService {
Future getListPharmacyForPrescriptions({int itemId}) async {
hasError = false;
requestGetListPharmacyForPrescriptions.itemID = itemId;
await baseAppClient.post(GET_PHARMACY_LIST,
onSuccess: (dynamic response, int statusCode) {
pharmacyPrescriptionsList.clear();
await baseAppClient.post(GET_PHARMACY_LIST, onSuccess: (dynamic response, int statusCode) {
pharmacyPrescriptionsList.clear();
response['PharmList'].forEach((prescriptions) {
pharmacyPrescriptionsList
.add(PharmacyPrescriptions.fromJson(prescriptions));
pharmacyPrescriptionsList.add(PharmacyPrescriptions.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -154,15 +137,13 @@ class PrescriptionsService extends BaseService {
}, body: requestGetListPharmacyForPrescriptions.toJson());
}
RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
RequestPrescriptionReportEnh(
RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh(
isDentalAllowedBackend: false,
);
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
Future getPrescriptionReportEnh(
{PrescriptionsOrder prescriptionsOrder}) async {
Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async {
///This logic copy from the old app from class [order-history.component.ts] in line 45
bool isInPatient = false;
prescriptionsList.forEach((element) {
@ -177,8 +158,7 @@ class PrescriptionsService extends BaseService {
isInPatient = element.isInOutPatient;
}
} else {
if (int.parse(prescriptionsOrder.appointmentNo) ==
element.appointmentNo) {
if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
@ -194,20 +174,17 @@ class PrescriptionsService extends BaseService {
hasError = false;
await baseAppClient.post(
isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
await baseAppClient.post(isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear();
if (isInPatient) {
response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
PrescriptionReportEnh reportEnh =
PrescriptionReportEnh.fromJson(prescriptions);
PrescriptionReportEnh reportEnh = PrescriptionReportEnh.fromJson(prescriptions);
reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
prescriptionReportEnhList.add(reportEnh);
});
@ -226,8 +203,7 @@ class PrescriptionsService extends BaseService {
body['RejectionReason'] = '';
body['PresOrderStatus'] = 4;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(UPDATE_PRESS_ORDER,
onSuccess: (dynamic response, int statusCode) {},
await baseAppClient.post(UPDATE_PRESS_ORDER, onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -19,25 +19,18 @@ class PrescriptionsViewModel extends BaseViewModel {
List<PrescriptionsList> _prescriptionsOrderListClinic = List();
List<PrescriptionsList> _prescriptionsOrderListHospital = List();
List<PrescriptionReport> get prescriptionReportList =>
_prescriptionsService.prescriptionReportList;
List<PrescriptionReport> get prescriptionReportList => _prescriptionsService.prescriptionReportList;
List<PrescriptionReportINP> get prescriptionReportListINP =>
_prescriptionsService.prescriptionReportListINP;
List<PrescriptionReportINP> get prescriptionReportListINP => _prescriptionsService.prescriptionReportListINP;
List<Prescriptions> get prescriptionsList =>
_prescriptionsService.prescriptionsList;
List<Prescriptions> get prescriptionsList => _prescriptionsService.prescriptionsList;
List<PrescriptionsOrder> get prescriptionsHistory =>
_prescriptionsService.prescriptionsOrderList;
List<PrescriptionsOrder> get prescriptionsHistory => _prescriptionsService.prescriptionsOrderList;
List<PharmacyPrescriptions> get pharmacyPrescriptionsList =>
_prescriptionsService.pharmacyPrescriptionsList;
List<PharmacyPrescriptions> get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList;
List<PrescriptionsList> get prescriptionsOrderList =>
filterType == FilterType.Clinic
? _prescriptionsOrderListClinic
: _prescriptionsOrderListHospital;
filterType == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital;
getPrescriptions() async {
setState(ViewState.Busy);
@ -55,38 +48,32 @@ class PrescriptionsViewModel extends BaseViewModel {
void _filterList() {
_prescriptionsService.prescriptionsList.forEach((element) {
/// PrescriptionsList list sort clinic
List<PrescriptionsList> prescriptionsByClinic =
_prescriptionsOrderListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
List<PrescriptionsList> prescriptionsByClinic = _prescriptionsOrderListClinic
.where((elementClinic) => elementClinic.filterName == element.clinicDescription)
.toList();
if (prescriptionsByClinic.length != 0) {
_prescriptionsOrderListClinic[
_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])]
_prescriptionsOrderListClinic[_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListClinic.add(PrescriptionsList(
filterName: element.clinicDescription, prescriptions: element));
_prescriptionsOrderListClinic
.add(PrescriptionsList(filterName: element.clinicDescription, prescriptions: element));
}
/// PrescriptionsList list sort via hospital
List<PrescriptionsList> prescriptionsByHospital =
_prescriptionsOrderListHospital
.where(
(elementClinic) => elementClinic.filterName == element.name,
)
.toList();
List<PrescriptionsList> prescriptionsByHospital = _prescriptionsOrderListHospital
.where(
(elementClinic) => elementClinic.filterName == element.name,
)
.toList();
if (prescriptionsByHospital.length != 0) {
_prescriptionsOrderListHospital[_prescriptionsOrderListHospital
.indexOf(prescriptionsByHospital[0])]
_prescriptionsOrderListHospital[_prescriptionsOrderListHospital.indexOf(prescriptionsByHospital[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListHospital.add(PrescriptionsList(
filterName: element.name, prescriptions: element));
_prescriptionsOrderListHospital.add(PrescriptionsList(filterName: element.name, prescriptions: element));
}
});
}
@ -108,8 +95,7 @@ class PrescriptionsViewModel extends BaseViewModel {
getPrescriptionReport({Prescriptions prescriptions}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(
prescriptions: prescriptions);
await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
@ -127,8 +113,8 @@ class PrescriptionsViewModel extends BaseViewModel {
String mes,
int projectID}) async {
setState(ViewState.BusyLocal);
await _prescriptionsService.sendPrescriptionEmail(appointmentDate,
patientID, clinicName, doctorName, doctorID, projectID);
await _prescriptionsService.sendPrescriptionEmail(
appointmentDate, patientID, clinicName, doctorName, doctorID, projectID);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
@ -144,19 +130,17 @@ class PrescriptionsViewModel extends BaseViewModel {
await _prescriptionsService.getListPharmacyForPrescriptions(itemId: itemId);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
List<PrescriptionReportEnh> get prescriptionReportEnhList =>
_prescriptionsService.prescriptionReportEnhList;
List<PrescriptionReportEnh> get prescriptionReportEnhList => _prescriptionsService.prescriptionReportEnhList;
getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReportEnh(
prescriptionsOrder: prescriptionsOrder);
await _prescriptionsService.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);

@ -21,6 +21,7 @@ class DoctorList {
bool isDoctorAllowVedioCall;
bool isDoctorDummy;
bool isLiveCare;
bool isDoctorHasPrePostImages;
String latitude;
String longitude;
String nationalityFlagURL;
@ -62,6 +63,7 @@ class DoctorList {
this.isDoctorAllowVedioCall,
this.isDoctorDummy,
this.isLiveCare,
this.isDoctorHasPrePostImages,
this.latitude,
this.longitude,
this.nationalityFlagURL,
@ -103,6 +105,7 @@ class DoctorList {
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isDoctorDummy = json['IsDoctorDummy'];
isLiveCare = json['IsLiveCare'];
isDoctorHasPrePostImages = json['IsDoctorHasPrePostImages'];
latitude = json['Latitude'];
longitude = json['Longitude'];
nationalityFlagURL = json['NationalityFlagURL'];
@ -147,6 +150,7 @@ class DoctorList {
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
data['IsDoctorDummy'] = this.isDoctorDummy;
data['IsLiveCare'] = this.isLiveCare;
data['IsDoctorHasPrePostImages'] = this.isDoctorHasPrePostImages;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['NationalityFlagURL'] = this.nationalityFlagURL;

@ -24,6 +24,7 @@ class DoctorProfileList {
Null isRegistered;
Null isDoctorDummy;
bool isActive;
bool isDoctorHasPrePostImages;
Null isDoctorAppointmentDisplayed;
bool doctorClinicActive;
Null isbookingAllowed;
@ -67,6 +68,7 @@ class DoctorProfileList {
this.isRegistered,
this.isDoctorDummy,
this.isActive,
this.isDoctorHasPrePostImages,
this.isDoctorAppointmentDisplayed,
this.doctorClinicActive,
this.isbookingAllowed,
@ -110,6 +112,7 @@ class DoctorProfileList {
isRegistered = json['IsRegistered'];
isDoctorDummy = json['IsDoctorDummy'];
isActive = json['IsActive'];
isDoctorHasPrePostImages = json['IsDoctorHasPrePostImages'];
isDoctorAppointmentDisplayed = json['IsDoctorAppointmentDisplayed'];
doctorClinicActive = json['DoctorClinicActive'];
isbookingAllowed = json['IsbookingAllowed'];
@ -155,6 +158,7 @@ class DoctorProfileList {
data['IsRegistered'] = this.isRegistered;
data['IsDoctorDummy'] = this.isDoctorDummy;
data['IsActive'] = this.isActive;
data['IsDoctorHasPrePostImages'] = this.isDoctorHasPrePostImages;
data['IsDoctorAppointmentDisplayed'] = this.isDoctorAppointmentDisplayed;
data['DoctorClinicActive'] = this.doctorClinicActive;
data['IsbookingAllowed'] = this.isbookingAllowed;

@ -0,0 +1,107 @@
import 'dart:convert';
import 'dart:typed_data';
import 'package:diplomaticquarterapp/uitl/utils.dart';
class DoctorPrePostImages {
DoctorPrePostImageModel pre;
DoctorPrePostImageModel post;
Uint8List getPreBytes(){
try{
var b64 = pre.imageStr.replaceFirst('data:image/png;base64,', '');
if(pre.imageStr != null && isBase64(b64))
return Utils.dataFromBase64String(b64);
}catch(e){
}
return null;
}
Uint8List getPostBytes(){
try{
var b64 = post.imageStr.replaceFirst('data:image/png;base64,', '');
if(post.imageStr != null && isBase64(b64))
return Utils.dataFromBase64String(b64);
}catch(e){
}
return null;
}
bool isBase64(String str) {
RegExp _base64 = RegExp(
r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$');
return _base64.hasMatch(str);
}
}
class DoctorPrePostImageModel {
String setupID;
int projectID;
int clinicId;
int doctorId;
int lineItemNo;
String imageStr;
int imageType;
String description;
dynamic isNewUpdated;
bool isActive;
String createdOn;
int createdBy;
dynamic editedOn;
dynamic editedBy;
DoctorPrePostImageModel({
this.setupID,
this.projectID,
this.clinicId,
this.doctorId,
this.lineItemNo,
this.imageStr,
this.imageType,
this.description,
this.isNewUpdated,
this.isActive,
this.createdOn,
this.createdBy,
this.editedOn,
this.editedBy});
DoctorPrePostImageModel.fromJson(dynamic json) {
setupID = json["SetupID"];
projectID = json["ProjectID"];
clinicId = json["ClinicId"];
doctorId = json["DoctorId"];
lineItemNo = json["LineItemNo"];
imageStr = json["ImageStr"];
imageType = json["ImageType"];
description = json["Description"];
isNewUpdated = json["IsNewUpdated"];
isActive = json["IsActive"];
createdOn = json["CreatedOn"];
createdBy = json["CreatedBy"];
editedOn = json["EditedOn"];
editedBy = json["EditedBy"];
}
Map<String, dynamic> toJson() {
var map = <String, dynamic>{};
map["SetupID"] = setupID;
map["ProjectID"] = projectID;
map["ClinicId"] = clinicId;
map["DoctorId"] = doctorId;
map["LineItemNo"] = lineItemNo;
map["ImageStr"] = imageStr;
map["ImageType"] = imageType;
map["Description"] = description;
map["IsNewUpdated"] = isNewUpdated;
map["IsActive"] = isActive;
map["CreatedOn"] = createdOn;
map["CreatedBy"] = createdBy;
map["EditedOn"] = editedOn;
map["EditedBy"] = editedBy;
return map;
}
}

@ -0,0 +1,489 @@
class DentalInvoiceDetailResponse {
List<ListEInvoiceForDental> listEInvoiceForDental;
DentalInvoiceDetailResponse({this.listEInvoiceForDental});
DentalInvoiceDetailResponse.fromJson(Map<String, dynamic> json) {
if (json['List_eInvoiceForDental'] != null) {
listEInvoiceForDental = new List<ListEInvoiceForDental>();
json['List_eInvoiceForDental'].forEach((v) {
listEInvoiceForDental.add(new ListEInvoiceForDental.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.listEInvoiceForDental != null) {
data['List_eInvoiceForDental'] =
this.listEInvoiceForDental.map((v) => v.toJson()).toList();
}
return data;
}
}
class ListEInvoiceForDental {
int projectID;
int doctorID;
dynamic grandTotal;
dynamic quantity;
dynamic total;
dynamic discount;
dynamic subTotal;
int invoiceNo;
String createdOn;
dynamic procedureID;
dynamic procedureName;
dynamic procedureNameN;
dynamic procedurePrice;
dynamic patientShare;
dynamic companyShare;
dynamic totalPatientShare;
dynamic totalCompanyShare;
dynamic totalShare;
dynamic discountAmount;
dynamic vATPercentage;
dynamic patientVATAmount;
dynamic companyVATAmount;
dynamic totalVATAmount;
dynamic price;
int patientID;
String patientName;
dynamic patientNameN;
String nationalityID;
String doctorName;
dynamic doctorNameN;
int clinicID;
String clinicDescription;
dynamic clinicDescriptionN;
String appointmentDate;
int appointmentNo;
String insuranceID;
int companyID;
String companyName;
dynamic companyNameN;
String companyAddress;
dynamic companyAddressN;
String companyGroupAddress;
String groupName;
dynamic groupNameN;
String patientAddress;
String vATNo;
String paymentDate;
String projectName;
dynamic totalDiscount;
dynamic totalPatientShareWithQuantity;
String legalName;
dynamic legalNameN;
dynamic advanceAdjustment;
String doctorImageURL;
List<ListConsultation> listConsultation;
ListEInvoiceForDental(
{this.projectID,
this.doctorID,
this.grandTotal,
this.quantity,
this.total,
this.discount,
this.subTotal,
this.invoiceNo,
this.createdOn,
this.procedureID,
this.procedureName,
this.procedureNameN,
this.procedurePrice,
this.patientShare,
this.companyShare,
this.totalPatientShare,
this.totalCompanyShare,
this.totalShare,
this.discountAmount,
this.vATPercentage,
this.patientVATAmount,
this.companyVATAmount,
this.totalVATAmount,
this.price,
this.patientID,
this.patientName,
this.patientNameN,
this.nationalityID,
this.doctorName,
this.doctorNameN,
this.clinicID,
this.clinicDescription,
this.clinicDescriptionN,
this.appointmentDate,
this.appointmentNo,
this.insuranceID,
this.companyID,
this.companyName,
this.companyNameN,
this.companyAddress,
this.companyAddressN,
this.companyGroupAddress,
this.groupName,
this.groupNameN,
this.patientAddress,
this.vATNo,
this.paymentDate,
this.projectName,
this.totalDiscount,
this.totalPatientShareWithQuantity,
this.legalName,
this.legalNameN,
this.advanceAdjustment,
this.doctorImageURL,
this.listConsultation});
ListEInvoiceForDental.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
doctorID = json['DoctorID'];
grandTotal = json['GrandTotal'];
quantity = json['Quantity'];
total = json['Total'];
discount = json['Discount'];
subTotal = json['SubTotal'];
invoiceNo = json['InvoiceNo'];
createdOn = json['CreatedOn'];
procedureID = json['ProcedureID'];
procedureName = json['ProcedureName'];
procedureNameN = json['ProcedureNameN'];
procedurePrice = json['ProcedurePrice'];
patientShare = json['PatientShare'];
companyShare = json['CompanyShare'];
totalPatientShare = json['TotalPatientShare'];
totalCompanyShare = json['TotalCompanyShare'];
totalShare = json['TotalShare'];
discountAmount = json['DiscountAmount'];
vATPercentage = json['VATPercentage'];
patientVATAmount = json['PatientVATAmount'];
companyVATAmount = json['CompanyVATAmount'];
totalVATAmount = json['TotalVATAmount'];
price = json['Price'];
patientID = json['PatientID'];
patientName = json['PatientName'];
patientNameN = json['PatientNameN'];
nationalityID = json['NationalityID'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
clinicID = json['ClinicID'];
clinicDescription = json['ClinicDescription'];
clinicDescriptionN = json['ClinicDescriptionN'];
appointmentDate = json['AppointmentDate'];
appointmentNo = json['AppointmentNo'];
insuranceID = json['InsuranceID'];
companyID = json['CompanyID'];
companyName = json['CompanyName'];
companyNameN = json['CompanyNameN'];
companyAddress = json['CompanyAddress'];
companyAddressN = json['CompanyAddressN'];
companyGroupAddress = json['CompanyGroupAddress'];
groupName = json['GroupName'];
groupNameN = json['GroupNameN'];
patientAddress = json['PatientAddress'];
vATNo = json['VATNo'];
paymentDate = json['PaymentDate'];
projectName = json['ProjectName'];
totalDiscount = json['TotalDiscount'];
totalPatientShareWithQuantity = json['TotalPatientShareWithQuantity'];
legalName = json['LegalName'];
legalNameN = json['LegalNameN'];
advanceAdjustment = json['AdvanceAdjustment'];
doctorImageURL = json['DoctorImageURL'];
if (json['listConsultation'] != null) {
listConsultation = new List<ListConsultation>();
json['listConsultation'].forEach((v) {
listConsultation.add(new ListConsultation.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['DoctorID'] = this.doctorID;
data['GrandTotal'] = this.grandTotal;
data['Quantity'] = this.quantity;
data['Total'] = this.total;
data['Discount'] = this.discount;
data['SubTotal'] = this.subTotal;
data['InvoiceNo'] = this.invoiceNo;
data['CreatedOn'] = this.createdOn;
data['ProcedureID'] = this.procedureID;
data['ProcedureName'] = this.procedureName;
data['ProcedureNameN'] = this.procedureNameN;
data['ProcedurePrice'] = this.procedurePrice;
data['PatientShare'] = this.patientShare;
data['CompanyShare'] = this.companyShare;
data['TotalPatientShare'] = this.totalPatientShare;
data['TotalCompanyShare'] = this.totalCompanyShare;
data['TotalShare'] = this.totalShare;
data['DiscountAmount'] = this.discountAmount;
data['VATPercentage'] = this.vATPercentage;
data['PatientVATAmount'] = this.patientVATAmount;
data['CompanyVATAmount'] = this.companyVATAmount;
data['TotalVATAmount'] = this.totalVATAmount;
data['Price'] = this.price;
data['PatientID'] = this.patientID;
data['PatientName'] = this.patientName;
data['PatientNameN'] = this.patientNameN;
data['NationalityID'] = this.nationalityID;
data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN;
data['ClinicID'] = this.clinicID;
data['ClinicDescription'] = this.clinicDescription;
data['ClinicDescriptionN'] = this.clinicDescriptionN;
data['AppointmentDate'] = this.appointmentDate;
data['AppointmentNo'] = this.appointmentNo;
data['InsuranceID'] = this.insuranceID;
data['CompanyID'] = this.companyID;
data['CompanyName'] = this.companyName;
data['CompanyNameN'] = this.companyNameN;
data['CompanyAddress'] = this.companyAddress;
data['CompanyAddressN'] = this.companyAddressN;
data['CompanyGroupAddress'] = this.companyGroupAddress;
data['GroupName'] = this.groupName;
data['GroupNameN'] = this.groupNameN;
data['PatientAddress'] = this.patientAddress;
data['VATNo'] = this.vATNo;
data['PaymentDate'] = this.paymentDate;
data['ProjectName'] = this.projectName;
data['TotalDiscount'] = this.totalDiscount;
data['TotalPatientShareWithQuantity'] = this.totalPatientShareWithQuantity;
data['LegalName'] = this.legalName;
data['LegalNameN'] = this.legalNameN;
data['AdvanceAdjustment'] = this.advanceAdjustment;
data['DoctorImageURL'] = this.doctorImageURL;
if (this.listConsultation != null) {
data['listConsultation'] =
this.listConsultation.map((v) => v.toJson()).toList();
}
return data;
}
}
class ListConsultation {
dynamic projectID;
dynamic doctorID;
dynamic grandTotal;
int quantity;
int total;
dynamic discount;
int subTotal;
dynamic invoiceNo;
dynamic createdOn;
String procedureID;
String procedureName;
dynamic procedureNameN;
dynamic procedurePrice;
int patientShare;
dynamic companyShare;
int totalPatientShare;
dynamic totalCompanyShare;
dynamic totalShare;
dynamic discountAmount;
int vATPercentage;
int patientVATAmount;
dynamic companyVATAmount;
dynamic totalVATAmount;
int price;
dynamic patientID;
dynamic patientName;
dynamic patientNameN;
dynamic nationalityID;
dynamic doctorName;
dynamic doctorNameN;
dynamic clinicID;
dynamic clinicDescription;
dynamic clinicDescriptionN;
dynamic appointmentDate;
dynamic appointmentNo;
dynamic insuranceID;
dynamic companyID;
dynamic companyName;
dynamic companyNameN;
dynamic companyAddress;
dynamic companyAddressN;
dynamic companyGroupAddress;
dynamic groupName;
dynamic groupNameN;
dynamic patientAddress;
String vATNo;
dynamic paymentDate;
dynamic projectName;
dynamic totalDiscount;
dynamic totalPatientShareWithQuantity;
dynamic legalName;
dynamic legalNameN;
int advanceAdjustment;
ListConsultation(
{this.projectID,
this.doctorID,
this.grandTotal,
this.quantity,
this.total,
this.discount,
this.subTotal,
this.invoiceNo,
this.createdOn,
this.procedureID,
this.procedureName,
this.procedureNameN,
this.procedurePrice,
this.patientShare,
this.companyShare,
this.totalPatientShare,
this.totalCompanyShare,
this.totalShare,
this.discountAmount,
this.vATPercentage,
this.patientVATAmount,
this.companyVATAmount,
this.totalVATAmount,
this.price,
this.patientID,
this.patientName,
this.patientNameN,
this.nationalityID,
this.doctorName,
this.doctorNameN,
this.clinicID,
this.clinicDescription,
this.clinicDescriptionN,
this.appointmentDate,
this.appointmentNo,
this.insuranceID,
this.companyID,
this.companyName,
this.companyNameN,
this.companyAddress,
this.companyAddressN,
this.companyGroupAddress,
this.groupName,
this.groupNameN,
this.patientAddress,
this.vATNo,
this.paymentDate,
this.projectName,
this.totalDiscount,
this.totalPatientShareWithQuantity,
this.legalName,
this.legalNameN,
this.advanceAdjustment});
ListConsultation.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
doctorID = json['DoctorID'];
grandTotal = json['GrandTotal'];
quantity = json['Quantity'];
total = json['Total'];
discount = json['Discount'];
subTotal = json['SubTotal'];
invoiceNo = json['InvoiceNo'];
createdOn = json['CreatedOn'];
procedureID = json['ProcedureID'];
procedureName = json['ProcedureName'];
procedureNameN = json['ProcedureNameN'];
procedurePrice = json['ProcedurePrice'];
patientShare = json['PatientShare'];
companyShare = json['CompanyShare'];
totalPatientShare = json['TotalPatientShare'];
totalCompanyShare = json['TotalCompanyShare'];
totalShare = json['TotalShare'];
discountAmount = json['DiscountAmount'];
vATPercentage = json['VATPercentage'];
patientVATAmount = json['PatientVATAmount'];
companyVATAmount = json['CompanyVATAmount'];
totalVATAmount = json['TotalVATAmount'];
price = json['Price'];
patientID = json['PatientID'];
patientName = json['PatientName'];
patientNameN = json['PatientNameN'];
nationalityID = json['NationalityID'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
clinicID = json['ClinicID'];
clinicDescription = json['ClinicDescription'];
clinicDescriptionN = json['ClinicDescriptionN'];
appointmentDate = json['AppointmentDate'];
appointmentNo = json['AppointmentNo'];
insuranceID = json['InsuranceID'];
companyID = json['CompanyID'];
companyName = json['CompanyName'];
companyNameN = json['CompanyNameN'];
companyAddress = json['CompanyAddress'];
companyAddressN = json['CompanyAddressN'];
companyGroupAddress = json['CompanyGroupAddress'];
groupName = json['GroupName'];
groupNameN = json['GroupNameN'];
patientAddress = json['PatientAddress'];
vATNo = json['VATNo'];
paymentDate = json['PaymentDate'];
projectName = json['ProjectName'];
totalDiscount = json['TotalDiscount'];
totalPatientShareWithQuantity = json['TotalPatientShareWithQuantity'];
legalName = json['LegalName'];
legalNameN = json['LegalNameN'];
advanceAdjustment = json['AdvanceAdjustment'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['DoctorID'] = this.doctorID;
data['GrandTotal'] = this.grandTotal;
data['Quantity'] = this.quantity;
data['Total'] = this.total;
data['Discount'] = this.discount;
data['SubTotal'] = this.subTotal;
data['InvoiceNo'] = this.invoiceNo;
data['CreatedOn'] = this.createdOn;
data['ProcedureID'] = this.procedureID;
data['ProcedureName'] = this.procedureName;
data['ProcedureNameN'] = this.procedureNameN;
data['ProcedurePrice'] = this.procedurePrice;
data['PatientShare'] = this.patientShare;
data['CompanyShare'] = this.companyShare;
data['TotalPatientShare'] = this.totalPatientShare;
data['TotalCompanyShare'] = this.totalCompanyShare;
data['TotalShare'] = this.totalShare;
data['DiscountAmount'] = this.discountAmount;
data['VATPercentage'] = this.vATPercentage;
data['PatientVATAmount'] = this.patientVATAmount;
data['CompanyVATAmount'] = this.companyVATAmount;
data['TotalVATAmount'] = this.totalVATAmount;
data['Price'] = this.price;
data['PatientID'] = this.patientID;
data['PatientName'] = this.patientName;
data['PatientNameN'] = this.patientNameN;
data['NationalityID'] = this.nationalityID;
data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN;
data['ClinicID'] = this.clinicID;
data['ClinicDescription'] = this.clinicDescription;
data['ClinicDescriptionN'] = this.clinicDescriptionN;
data['AppointmentDate'] = this.appointmentDate;
data['AppointmentNo'] = this.appointmentNo;
data['InsuranceID'] = this.insuranceID;
data['CompanyID'] = this.companyID;
data['CompanyName'] = this.companyName;
data['CompanyNameN'] = this.companyNameN;
data['CompanyAddress'] = this.companyAddress;
data['CompanyAddressN'] = this.companyAddressN;
data['CompanyGroupAddress'] = this.companyGroupAddress;
data['GroupName'] = this.groupName;
data['GroupNameN'] = this.groupNameN;
data['PatientAddress'] = this.patientAddress;
data['VATNo'] = this.vATNo;
data['PaymentDate'] = this.paymentDate;
data['ProjectName'] = this.projectName;
data['TotalDiscount'] = this.totalDiscount;
data['TotalPatientShareWithQuantity'] = this.totalPatientShareWithQuantity;
data['LegalName'] = this.legalName;
data['LegalNameN'] = this.legalNameN;
data['AdvanceAdjustment'] = this.advanceAdjustment;
return data;
}
}

@ -0,0 +1,100 @@
class GetDentalAppointmentsResponse {
List<ListDentalAppointments> listDentalAppointments;
GetDentalAppointmentsResponse({this.listDentalAppointments});
GetDentalAppointmentsResponse.fromJson(Map<String, dynamic> json) {
if (json['List_DentalAppointments'] != null) {
listDentalAppointments = new List<ListDentalAppointments>();
json['List_DentalAppointments'].forEach((v) {
listDentalAppointments.add(new ListDentalAppointments.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.listDentalAppointments != null) {
data['List_DentalAppointments'] =
this.listDentalAppointments.map((v) => v.toJson()).toList();
}
return data;
}
}
class ListDentalAppointments {
String setupId;
int projectID;
int patientID;
int appointmentNo;
String appointmentDate;
dynamic appointmentDateN;
int clinicID;
int doctorID;
int invoiceNo;
int status;
String arrivedOn;
String doctorName;
dynamic doctorNameN;
String clinicName;
String doctorImageURL;
String projectName;
ListDentalAppointments(
{this.setupId,
this.projectID,
this.patientID,
this.appointmentNo,
this.appointmentDate,
this.appointmentDateN,
this.clinicID,
this.doctorID,
this.invoiceNo,
this.status,
this.arrivedOn,
this.doctorName,
this.doctorNameN,
this.clinicName,
this.doctorImageURL,
this.projectName});
ListDentalAppointments.fromJson(Map<String, dynamic> json) {
setupId = json['SetupId'];
projectID = json['ProjectID'];
patientID = json['PatientID'];
appointmentNo = json['AppointmentNo'];
appointmentDate = json['AppointmentDate'];
appointmentDateN = json['AppointmentDateN'];
clinicID = json['ClinicID'];
doctorID = json['DoctorID'];
invoiceNo = json['InvoiceNo'];
status = json['Status'];
arrivedOn = json['ArrivedOn'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
clinicName = json['ClinicName'];
doctorImageURL = json['DoctorImageURL'];
projectName = json['ProjectName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupId'] = this.setupId;
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentDate'] = this.appointmentDate;
data['AppointmentDateN'] = this.appointmentDateN;
data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID;
data['InvoiceNo'] = this.invoiceNo;
data['Status'] = this.status;
data['ArrivedOn'] = this.arrivedOn;
data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN;
data['ClinicName'] = this.clinicName;
data['DoctorImageURL'] = this.doctorImageURL;
data['ProjectName'] = this.projectName;
return data;
}
}

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
import 'package:intl/intl.dart';
import 'package:jiffy/jiffy.dart';
import 'ovulation_result_page.dart';
@ -22,6 +23,8 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
int lutealPhaseLength = 0;
String selectedDate;
var dateFrom = DateTime.now();
var babyAgeWeeks;
var babyAgeDays;
var dateTo = DateTime.now();
var conceivedDate = DateTime.now();
var deliveryDue = DateTime.now();
@ -78,10 +81,15 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
bloodSugarDate = date;
dateFrom = date.add(Duration(days: 10));
updatedDt = DateFormat.yMMMEd().format(dateFrom);
dateTo = date.add(Duration(days: 20));
conceivedDate = date.add(Duration(days: 14));
deliveryDue = date.add(Duration(days: 280));
// babyAge = Jiffy([DateTime.now()]).diff(Jiffy([date]), Units.WEEK);
babyAgeWeeks = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day])
.diff(Jiffy([date.year, date.month, dateTo.day]), Units.WEEK);
babyAgeDays = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day])
.diff(Jiffy([date.year, date.month, dateTo.day]), Units.DAY);
});
},
currentTime: DateTime.now(),
@ -91,9 +99,7 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -124,8 +130,7 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
@ -146,10 +151,8 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
@ -166,8 +169,7 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
),
onTap: () {
setState(() {
if (cycleLength < 45)
cycleLength++;
if (cycleLength < 45) cycleLength++;
});
},
),
@ -179,8 +181,7 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
),
onTap: () {
setState(() {
if (cycleLength > 0)
cycleLength--;
if (cycleLength > 0) cycleLength--;
});
},
),
@ -229,8 +230,7 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
@ -245,17 +245,14 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
children: <Widget>[
Expanded(
child: Center(
child:
Text(lutealPhaseLength.toString()),
child: Text(lutealPhaseLength.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
@ -272,8 +269,7 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
),
onTap: () {
setState(() {
if (lutealPhaseLength < 15)
lutealPhaseLength++;
if (lutealPhaseLength < 15) lutealPhaseLength++;
});
},
),
@ -285,8 +281,7 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
),
onTap: () {
setState(() {
if (lutealPhaseLength > 0)
lutealPhaseLength--;
if (lutealPhaseLength > 0) lutealPhaseLength--;
});
},
),
@ -332,11 +327,13 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
context,
FadePage(
page: OvulationResult(
conceivedDate: conceivedDate,
dateFrom: dateFrom,
dateTo: dateTo,
deliveryDue: deliveryDue,
)),
conceivedDate: conceivedDate,
dateFrom: dateFrom,
dateTo: dateTo,
deliveryDue: deliveryDue,
babyAge: babyAgeWeeks,
babyAgeDays: babyAgeDays,
)),
);
}
});

@ -11,7 +11,17 @@ class OvulationResult extends StatelessWidget {
var dateTo;
var conceivedDate;
var deliveryDue;
OvulationResult({this.dateFrom, this.dateTo, this.deliveryDue, this.conceivedDate});
var babyAge;
var babyAgeDays;
OvulationResult({
this.dateFrom,
this.dateTo,
this.deliveryDue,
this.conceivedDate,
this.babyAge,
this.babyAgeDays,
});
//var newFormat = DateFormat("yy-MM-dd");
@override
@ -68,7 +78,7 @@ class OvulationResult extends StatelessWidget {
fontWeight: FontWeight.w400,
),
Texts(
'5 Weeks, 2',
babyAge.toString() + " Weeks," + "2",
fontWeight: FontWeight.w800,
fontSize: 21.0,
),

@ -544,7 +544,7 @@ class _BookConfirmState extends State<BookConfirm> {
navigateToBookSuccess(context, docObject, widget.patientShareResponse);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
// AppToast.showErrorToast(message: err);
navigateToHome(context);
print(err);
});

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/doctor_post_pre_images_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
@ -14,6 +15,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_material_pickers/flutter_material_pickers.dart';
import 'package:rating_bar/rating_bar.dart';
import 'BookConfirm.dart';
@ -176,8 +178,15 @@ class _DoctorProfileState extends State<DoctorProfile>
)),
),
),
if(widget.docProfileList.isDoctorHasPrePostImages == true)
Container(
height: 50,
alignment: Alignment.center,
child: prePostImagesButton(context)
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Divider(
color: Colors.grey[500],
),
@ -225,6 +234,19 @@ class _DoctorProfileState extends State<DoctorProfile>
);
}
Widget prePostImagesButton(BuildContext context){
return Padding(
padding: const EdgeInsets.all(10),
child: MaterialButton(
height: 50,
color: Theme.of(context).appBarTheme.color,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
onPressed: () => openDoctorPrePostImages(),
child: Text(TranslationBase.of(context).beforeAfterImages, style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1),),
),
);
}
getDoctorRatings() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
@ -265,6 +287,30 @@ class _DoctorProfileState extends State<DoctorProfile>
});
}
openDoctorPrePostImages(){
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService().getDoctorPrePostImages(widget.docProfileList, context).then((images) {
GifLoaderDialogUtils.hideDialog(context);
showDialog(
context: context, barrierDismissible: true,
builder: (ctx){
return DoctorPostPreImagesContent(doctorPrePostImages: images);
}
);
// Navigator.push(
// context,
// FadePage(
// page: DoctorPostPreImagesPage(doctorPrePostImages: images,)
// )
// );
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
void showRatingDialog(List<DoctorRateDetails> doctorDetailsList) {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
@ -566,4 +612,6 @@ class _DoctorProfileState extends State<DoctorProfile>
selectedDate: DocAvailableAppointments.selectedDate,
selectedTime: DocAvailableAppointments.selectedTime)));
}
}

@ -0,0 +1,52 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
class LiveCareBookAppointment extends StatefulWidget {
@override
_LiveCareBookAppointmentState createState() =>
_LiveCareBookAppointmentState();
}
class _LiveCareBookAppointmentState extends State<LiveCareBookAppointment> {
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.all(5.0),
child: Text(TranslationBase.of(context).clinicAcceptLivecare,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontSize: 16.0,
letterSpacing: 0.5)),
),
Container(
margin: EdgeInsets.all(15.0),
padding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
decoration: BoxDecoration(
color: Colors.green,
borderRadius: BorderRadius.all(Radius.circular(8.0))),
child: Text(TranslationBase.of(context).livecareModalTop,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
fontWeight: FontWeight.w600,
letterSpacing: 0.5)),
),
],
),
),
));
}
}

@ -3,10 +3,12 @@ import "dart:collection";
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -14,6 +16,9 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'LiveCareBookAppointment.dart';
class SearchByClinic extends StatefulWidget {
final List clnicIds;
@ -36,6 +41,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
bool isLoaded = false;
bool isProjectLoaded = false;
ListClinicCentralized selectedClinic;
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
@ -112,12 +122,30 @@ class _SearchByClinicState extends State<SearchByClinic> {
value: dropdownValue,
items: clinicsList.map((item) {
return new DropdownMenuItem<String>(
value: item.clinicID.toString(),
child: new Text(item.clinicDescription),
value: item.clinicID.toString() +
"-" +
item.isLiveCareClinicAndOnline.toString() +
"-" +
item.liveCareClinicID.toString() +
"-" +
item.liveCareServiceID.toString(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(item.clinicDescription),
item.isLiveCareClinicAndOnline
? SvgPicture.asset(
'assets/images/new-design/video_icon_green_right.svg',
height: 15,
width: 15,
fit: BoxFit.cover)
: Container(),
]),
);
}).toList(),
onChanged: (newValue) {
setState(() {
print(newValue);
dropdownValue = newValue;
if (!isDentalSelectedAndSupported() && !nearestAppo) {
projectDropdownValue = "";
@ -224,6 +252,17 @@ class _SearchByClinicState extends State<SearchByClinic> {
GifLoaderDialogUtils.hideDialog(context);
navigateToDentalComplaints(context, searchInfo);
} else if (dropdownValue.split("-")[1] == "true"
// &&
// authProvider.isLogin &&
// authUser.patientType == 1
) {
Navigator.push(
context,
FadePage(
page: LiveCareBookAppointment(),
),
);
} else {
List<DoctorList> doctorsList = [];
List<String> arr = [];
@ -236,7 +275,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(
int.parse(dropdownValue),
int.parse(dropdownValue.split("-")[0]),
projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0,
nearestAppo,
context)

@ -0,0 +1,121 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/models/Appointments/doctor_pre_post_image.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class DoctorPostPreImagesPage extends StatefulWidget{
final DoctorPrePostImages doctorPrePostImages;
const DoctorPostPreImagesPage({this.doctorPrePostImages});
@override
State<StatefulWidget> createState() => DoctorPostPreImagesPageState();
}
class DoctorPostPreImagesPageState extends State<DoctorPostPreImagesPage>{
@override
Widget build(BuildContext context) {
var images = widget.doctorPrePostImages;
return AppScaffold(
appBarTitle: TranslationBase.of(context).beforeAfterImages,
isShowAppBar: true,
isShowDecPage: false,
body: Padding(
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 10),
child: Row(
children: [
Expanded(
child: Column(
children: [
Text("Before Image", style: TextStyle(color: Colors.black, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
Image.memory(images.getPreBytes(), errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
)
),
Divider(color: Colors.grey.withOpacity(0.5)),
Expanded(
child: Column(
children: [
Text("After Image", style: TextStyle(color: Colors.black, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
Image.memory(images.getPostBytes(),errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
)
)
],
),
)
);
}
}
class DoctorPostPreImagesContent extends StatefulWidget{
final DoctorPrePostImages doctorPrePostImages;
const DoctorPostPreImagesContent({this.doctorPrePostImages});
@override
DoctorPostPreImagesContentState createState() => DoctorPostPreImagesContentState();
}
class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent>{
@override
Widget build(BuildContext context) {
var images = widget.doctorPrePostImages;
return Material(
color: Colors.transparent,
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
Expanded(
child: Column(
children: [
Text("Before", style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
SizedBox(height: 10,),
Image.memory(images.getPreBytes(), errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
)
),
Divider(color: Colors.grey.withOpacity(0.5)),
Expanded(
child: Column(
children: [
Text("After", style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
SizedBox(height: 10,),
Image.memory(images.getPostBytes(),errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
)
)
],
),
],
),
),
);
}
}

@ -13,13 +13,15 @@ import '../DoctorProfile.dart';
class DoctorView extends StatelessWidget {
final DoctorList doctor;
bool isLiveCareAppointment;
bool isShowFlag;
DoctorView({@required this.doctor, @required this.isLiveCareAppointment});
DoctorView({@required this.doctor, @required this.isLiveCareAppointment, this.isShowFlag = true});
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () {
if(isShowFlag)
getDoctorsProfile(context, doctor);
},
child: Card(
@ -113,10 +115,10 @@ class DoctorView extends StatelessWidget {
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
Container(
isShowFlag ? Container(
child: Image.network(this.doctor.nationalityFlagURL,
width: 25.0, height: 25.0),
),
) : Container(),
],
),
],

@ -112,7 +112,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
e.title,
color: Color(0xffB8382C),
variant: "overline",
fontSize: SizeConfig.textMultiplier * 2.1,
fontSize: SizeConfig.textMultiplier * 1.8,
),
),
Container(
@ -122,7 +122,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
e.subtitle,
color: Colors.black,
variant: "overline",
fontSize: SizeConfig.textMultiplier * 1.9,
fontSize: SizeConfig.textMultiplier * 1.6,
),
),
],

@ -40,8 +40,7 @@ class HomePage extends StatefulWidget {
}
class _HomePageState extends State<HomePage> {
PharmacyModuleViewModel pharmacyModuleViewModel =
locator<PharmacyModuleViewModel>();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
@override
Widget build(BuildContext context) {
@ -66,9 +65,7 @@ class _HomePageState extends State<HomePage> {
height: 210,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage(
'assets/images/dashboard_top_bg.png'),
fit: BoxFit.cover),
image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover),
),
child: Stack(
children: <Widget>[
@ -77,131 +74,112 @@ class _HomePageState extends State<HomePage> {
left: 5,
right: 5,
child: Container(
width:
MediaQuery.of(context).size.width * 0.8,
width: MediaQuery.of(context).size.width * 0.8,
child: Row(
children: <Widget>[
Expanded(
child: Container(
height: 125,
padding: EdgeInsets.all(5),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(
"assets/images/new-design/covid_bg_transparent.png"),
fit: BoxFit.fill,
),
color:
Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(
Radius.circular(5))),
child: Container(
child: Column(
children: <Widget>[
Texts(
TranslationBase.of(context)
.covidTest,
color: Colors.white,
fontWeight: FontWeight.w700,
height: 125,
padding: EdgeInsets.all(5),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
image: DecorationImage(
image:
AssetImage("assets/images/new-design/covid_bg_transparent.png"),
fit: BoxFit.fill,
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceAround,
children: <Widget>[
Container(
margin: EdgeInsets.only(
top: 15.0,
),
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 45.0,
height: 45.0),
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(Radius.circular(5))),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.shade500.withOpacity(0.3),
child: Icon(
Icons.lock_outline,
size: 40,
),
Container(
margin: EdgeInsets.only(
top: 5.0),
child: Column(
children: <Widget>[
Texts(
TranslationBase.of(
context)
.driveThru,
fontWeight:
FontWeight.w700,
color: Colors.white,
),
ButtonTheme(
shape:
RoundedRectangleBorder(
borderRadius:
BorderRadius
.circular(
5.0),
)
: Container(
child: Column(
children: <Widget>[
Texts(
TranslationBase.of(context).covidTest,
color: Colors.white,
fontWeight: FontWeight.w700,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Container(
margin: EdgeInsets.only(
top: 15.0,
),
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 45.0,
height: 45.0),
),
minWidth: MediaQuery.of(
context)
.size
.width *
0.15,
height: 25.0,
child: RaisedButton(
color: Colors
.red[800],
textColor:
Colors.white,
disabledTextColor:
Colors.white,
disabledColor:
new Color(
0xFFbcc2c4),
onPressed: () {
navigateToCovidDriveThru();
},
child: Center(
child: Center(
child: Center(
child:
Center(
child:
Texts(
TranslationBase.of(context)
.bookNow,
fontWeight:
FontWeight.w700,
color: Colors
.white,
Container(
margin: EdgeInsets.only(top: 5.0),
child: Column(
children: <Widget>[
Texts(
TranslationBase.of(context).driveThru,
fontWeight: FontWeight.w700,
color: Colors.white,
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0),
),
minWidth: MediaQuery.of(context).size.width * 0.15,
height: 25.0,
child: RaisedButton(
color: Colors.red[800],
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed:
(model.user != null && model.user.outSA == 1)
? () {}
: () {
navigateToCovidDriveThru();
},
child: Center(
child: Center(
child: Center(
child: Center(
child: Texts(
TranslationBase.of(context).bookNow,
fontWeight: FontWeight.w700,
color: Colors.white,
),
),
),
),
),
),
),
),
],
),
),
),
],
),
],
),
],
),
],
),
],
),
),
),
)),
),
Expanded(
child: InkWell(
onTap: () => Navigator.push(context,
FadePage(page: LiveCareHome())),
onTap: () => Navigator.push(context, FadePage(page: LiveCareHome())),
child: Container(
height: 125,
padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color: Colors.white
.withOpacity(0.3),
borderRadius: BorderRadius.all(
Radius.circular(5))),
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(Radius.circular(5))),
child: SvgPicture.asset(
projectViewModel.isArabic
? 'assets/images/new-design/livecare_arabic_logo.svg'
@ -217,23 +195,15 @@ class _HomePageState extends State<HomePage> {
],
),
),
Container(
width: double.infinity,
height: projectViewModel.isArabic ? 110 : 80)
Container(width: double.infinity, height: projectViewModel.isArabic ? 110 : 80)
],
),
Positioned(
top: 155,
left: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
(MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
(MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
child: (!model.isLogin)
? Container(
width: double.infinity,
@ -241,14 +211,10 @@ class _HomePageState extends State<HomePage> {
decoration: BoxDecoration(
color: HexColor('#A59E9E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent, width: 0.5),
borderRadius:
BorderRadius.all(Radius.circular(9)),
border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage(
'assets/images/bg_graphic.png'),
fit: BoxFit.cover)),
image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
child: Container(
margin: EdgeInsets.all(5),
child: Column(
@ -264,37 +230,30 @@ class _HomePageState extends State<HomePage> {
fontSize: 23,
),
Texts(
TranslationBase.of(context)
.myMedicalFileSubTitle,
TranslationBase.of(context).myMedicalFileSubTitle,
color: Colors.black,
fontSize: 16,
),
Align(
alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
alignment:
projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
child: InkWell(
onTap: () {
widget.goToMyProfile();
},
child: Container(
margin: EdgeInsets.only(
left: 15, right: 15),
margin: EdgeInsets.only(left: 15, right: 15),
width: 90,
height: 30,
decoration: BoxDecoration(
color: HexColor('#D81A2E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(0)),
border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(0)),
),
child: Center(
child: Texts(
TranslationBase.of(context)
.viewMore,
TranslationBase.of(context).viewMore,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: 12,
@ -313,14 +272,10 @@ class _HomePageState extends State<HomePage> {
decoration: BoxDecoration(
color: HexColor('#A59E9E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent, width: 0.5),
borderRadius:
BorderRadius.all(Radius.circular(9)),
border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage(
'assets/images/bg_graphic.png'),
fit: BoxFit.cover),
image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover),
),
child: Container(
margin: EdgeInsets.all(5),
@ -328,81 +283,51 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[
Row(
children: <Widget>[
if (projectViewModel.user != null &&
model.isLogin)
if (projectViewModel.user != null && model.isLogin)
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
),
model.user.cRSVerificationStatus ==
2
model.user.cRSVerificationStatus == 2
? Row(
children: [
Texts(
model.user
.firstName +
" " +
model.user
.lastName,
color: Colors
.grey[100],
model.user.firstName + " " + model.user.lastName,
color: Colors.grey[100],
bold: true,
fontSize: 15,
),
Container(
margin: EdgeInsets
.fromLTRB(
8.0,
0.0,
8.0,
0.0),
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
child: SvgPicture.asset(
"assets/images/new-design/verification_check.svg"),
),
],
)
: model.user.cRSVerificationStatus ==
3
: model.user.cRSVerificationStatus == 3
? Row(
children: [
Texts(
model.user
.firstName +
" " +
model.user
.lastName,
color: Colors
.grey[100],
model.user.firstName + " " + model.user.lastName,
color: Colors.grey[100],
bold: true,
fontSize: 15,
),
Container(
margin: EdgeInsets
.fromLTRB(
8.0,
0.0,
8.0,
0.0),
child: SvgPicture
.asset(
"assets/images/new-design/pending.svg"),
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
child: SvgPicture.asset(
"assets/images/new-design/pending.svg"),
),
],
)
: Row(
children: [
Texts(
model.user
.firstName +
" " +
model.user
.lastName,
color: Colors
.grey[100],
model.user.firstName + " " + model.user.lastName,
color: Colors.grey[100],
bold: true,
fontSize: 15,
),
@ -436,17 +361,14 @@ class _HomePageState extends State<HomePage> {
decoration: BoxDecoration(
color: HexColor('#D81A2E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent,
width: 0.5),
border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(5),
),
),
child: Center(
child: Texts(
TranslationBase.of(context)
.myMedicalFile,
TranslationBase.of(context).myMedicalFile,
color: Colors.white,
fontSize: 12,
textAlign: TextAlign.center,
@ -485,10 +407,8 @@ class _HomePageState extends State<HomePage> {
width: 25,
height: 40,
),
Texts(
'${model.weightKg} ${TranslationBase.of(context).kg}',
color: Colors.white,
fontSize: 17)
Texts('${model.weightKg} ${TranslationBase.of(context).kg}',
color: Colors.white, fontSize: 17)
],
),
),
@ -503,9 +423,7 @@ class _HomePageState extends State<HomePage> {
width: 35,
height: 40,
),
Texts('${model.booldType}',
color: Colors.white,
fontSize: 17)
Texts('${model.booldType}', color: Colors.white, fontSize: 17)
],
),
),
@ -519,12 +437,10 @@ class _HomePageState extends State<HomePage> {
],
),
Padding(
padding:
const EdgeInsets.only(bottom: 15, right: 15, left: 15),
padding: const EdgeInsets.only(bottom: 15, right: 15, left: 15),
child: InkWell(
onTap: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (context) => PackagesHomePage()));
Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesHomePage()));
},
child: Container(
decoration: BoxDecoration(
@ -571,13 +487,14 @@ class _HomePageState extends State<HomePage> {
},
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: (model.user != null &&
model.user.outSA == 1)
padding: (model.user != null && model.user.outSA == 1)
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.withOpacity(0.7),
color: Colors.grey.shade500.withOpacity(0.3),
child: Icon(
Icons.lock_outline,
size: 40,
@ -594,14 +511,11 @@ class _HomePageState extends State<HomePage> {
height: 10,
),
Texts(
TranslationBase.of(context)
.homeHealthCare,
TranslationBase.of(context).homeHealthCare,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize:
SizeConfig.textMultiplier *
1.55,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
)),
@ -613,18 +527,17 @@ class _HomePageState extends State<HomePage> {
if (projectViewModel.havePrivilege(65))
DashboardItem(
onTap: () =>
(model.user != null && model.user.outSA == 1)
? () {}
: getPharmacyToken(model),
(model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model),
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: (model.user != null &&
model.user.outSA == 1)
padding: (model.user != null && model.user.outSA == 1)
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.withOpacity(0.7),
color: Colors.grey.shade500.withOpacity(0.3),
child: Icon(
Icons.lock_outline,
size: 40,
@ -647,14 +560,11 @@ class _HomePageState extends State<HomePage> {
height: 20,
),
Texts(
TranslationBase.of(context)
.onlinePharmacy,
TranslationBase.of(context).onlinePharmacy,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize:
SizeConfig.textMultiplier *
1.55,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
),
@ -677,13 +587,14 @@ class _HomePageState extends State<HomePage> {
},
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: (model.user != null &&
model.user.outSA == 1)
padding: (model.user != null && model.user.outSA == 1)
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.withOpacity(0.7),
color: Colors.grey.shade500.withOpacity(0.3),
child: Icon(
Icons.lock_outline,
size: 40,
@ -700,14 +611,11 @@ class _HomePageState extends State<HomePage> {
height: 10,
),
Texts(
TranslationBase.of(context)
.cmcHeading,
TranslationBase.of(context).cmcHeading,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize:
SizeConfig.textMultiplier *
1.55,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
)),
@ -723,8 +631,7 @@ class _HomePageState extends State<HomePage> {
height: 8,
),
InkWell(
onTap: () =>
Navigator.push(context, FadePage(page: PaymentService())),
onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
@ -745,8 +652,7 @@ class _HomePageState extends State<HomePage> {
height: 5,
),
Texts(
TranslationBase.of(context)
.onlinePaymentService,
TranslationBase.of(context).onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
@ -777,8 +683,7 @@ class _HomePageState extends State<HomePage> {
height: 10,
),
Texts(
TranslationBase.of(context)
.offersAndPackages,
TranslationBase.of(context).offersAndPackages,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
@ -818,13 +723,11 @@ class _HomePageState extends State<HomePage> {
height: 10,
),
Texts(
TranslationBase.of(context)
.emergencyServices,
TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize:
SizeConfig.textMultiplier * 1.7,
fontSize: SizeConfig.textMultiplier * 1.7,
)
],
),
@ -862,8 +765,7 @@ class _HomePageState extends State<HomePage> {
fontWeight: FontWeight.normal,
),
Texts(
TranslationBase.of(context)
.viewAllHabibMedicalService,
TranslationBase.of(context).viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
@ -884,15 +786,13 @@ class _HomePageState extends State<HomePage> {
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push(
context, FadePage(page: AllHabibMedicalService())),
onTap: () => Navigator.push(context, FadePage(page: AllHabibMedicalService())),
),
DashboardItem(
onTap: () {
// Navigator.push(
// context, FadePage(page: FeedbackHomePage()));
Navigator.push(
context, FadePage(page: ContactUsPage()));
Navigator.push(context, FadePage(page: ContactUsPage()));
},
child: Container(
width: double.infinity,
@ -1014,10 +914,8 @@ class DashboardItem extends StatelessWidget {
? DecorationImage(
image: ExactAssetImage('assets/images/$imageName'),
fit: BoxFit.cover,
colorFilter: hasColorFilter
? new ColorFilter.mode(
Colors.black.withOpacity(0.2), BlendMode.dstIn)
: null,
colorFilter:
hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
)
: null,
),

@ -64,6 +64,11 @@ class _Login extends State<Login> {
void initState() {
// getDeviceToken();
super.initState();
if(BASE_URL.contains("uat.")){
nationalIDorFile.text = "1231755";
mobileNumberController.text = mobileNo = "537503378";
}
}
getDeviceToken() async {

@ -0,0 +1,339 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/MyInvoices/DentalInvoiceDetailResponse.dart';
import 'package:diplomaticquarterapp/models/MyInvoices/GetDentalAppointmentsResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/services/my_invoice_service/my_invoice_services.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class InvoiceDetail extends StatelessWidget {
final DoctorList doctor;
final ListDentalAppointments listDentalAppointments;
final DentalInvoiceDetailResponse dentalInvoiceDetailResponse;
final BuildContext context;
int totalServiceRate = 0;
int totalDiscount = 0;
int totalVAT = 0;
int subTotal = 0;
int grandTotal = 0;
InvoiceDetail(this.doctor, this.listDentalAppointments,
this.dentalInvoiceDetailResponse, this.context);
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).myInvoice,
isShowAppBar: true,
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
child: Column(
children: [
DoctorView(
doctor: doctor,
isLiveCareAppointment: false,
isShowFlag: false),
Container(
margin: EdgeInsets.only(left: 10.0, right: 10.0),
padding: EdgeInsets.only(
top: 10.0, left: 10.0, right: 10.0, bottom: 10.0),
decoration: BoxDecoration(
color: Colors.grey[800],
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: Table(
children: [
TableRow(children: [
Text("Description",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
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(
margin: EdgeInsets.only(top: 0.0, left: 10.0, right: 10.0),
padding: EdgeInsets.only(
top: 10.0, left: 10.0, right: 10.0, bottom: 15.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(8),
bottomRight: Radius.circular(8),
)),
child: Table(children: fullData(context)),
),
Container(
margin: EdgeInsets.only(top: 3.0, left: 12.0, right: 12.0),
child: Divider(
color: Colors.grey[400],
thickness: 0.7,
),
),
Container(
child: AppExpandableNotifier(
title: "Total Price: " + grandTotal.toString() + " SAR",
isExpand: true,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Table(
children: [
TableRow(children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Discount: ",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(totalDiscount.toString() + " SAR",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
),
]),
TableRow(children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(
"VAT (" +
dentalInvoiceDetailResponse
.listEInvoiceForDental[0]
.listConsultation[0]
.vATPercentage
.toString() +
"%)",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(totalVAT.toString() + " SAR",
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(
margin: EdgeInsets.only(top: 3.0, left: 12.0, right: 12.0),
child: Divider(
color: Colors.grey[400],
thickness: 0.7,
),
),
Container(
margin: EdgeInsets.only(top: 0.0, left: 10.0, right: 10.0),
padding: EdgeInsets.only(
top: 10.0, left: 10.0, right: 10.0, bottom: 15.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8))),
child: Table(children: [
TableRow(children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Insurance: ",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(top: 10.0, bottom: 5.0),
child: Text(
dentalInvoiceDetailResponse
.listEInvoiceForDental[0].companyName,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
),
]),
TableRow(children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Insurance ID: ",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
child: Text(
dentalInvoiceDetailResponse
.listEInvoiceForDental[0].insuranceID,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
),
]),
]),
),
SizedBox(
height: 100.0,
),
],
),
),
),
bottomSheet: Container(
width: MediaQuery.of(context).size.width,
height: 70.0,
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0),
child: Button(
onTap: () {
sendInvoiceEmail();
},
label: TranslationBase.of(context).sendEmail,
backgroundColor: Colors.red[900],
),
),
);
}
sendInvoiceEmail() {
GifLoaderDialogUtils.showMyDialog(context);
MyInvoicesService myInvoicesService = new MyInvoicesService();
myInvoicesService
.sendDentalAppointmentInvoiceEmail(
12, listDentalAppointments.appointmentNo, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(
message: TranslationBase.of(context).emailSentSuccessfully);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
Navigator.of(context).pop();
});
}
List<TableRow> fullData(context) {
List<TableRow> tableRow = [];
dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation
.forEach((lab) {
tableRow.add(
TableRow(children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(lab.procedureName,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(lab.quantity.toString(),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(lab.price.toString() + " SAR",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(lab.total.toString() + " SAR",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
),
]),
);
});
return tableRow;
}
}

@ -0,0 +1,256 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'
as DoctorListResponse;
import 'package:diplomaticquarterapp/models/MyInvoices/DentalInvoiceDetailResponse.dart';
import 'package:diplomaticquarterapp/models/MyInvoices/GetDentalAppointmentsResponse.dart';
import 'package:diplomaticquarterapp/pages/medical/my_invoices/invoice_detail_page.dart';
import 'package:diplomaticquarterapp/services/my_invoice_service/my_invoice_services.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MyInvoices extends StatefulWidget {
@override
_MyInvoicesState createState() => _MyInvoicesState();
}
class _MyInvoicesState extends State<MyInvoices> {
bool isDataLoaded = false;
GetDentalAppointmentsResponse getDentalAppointmentsResponse;
DentalInvoiceDetailResponse dentalInvoiceDetailResponse;
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) {
getDentalAppointments();
});
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).myInvoice,
isShowAppBar: true,
isShowDecPage: true,
body: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: isDataLoaded
? Column(
children: [
...List.generate(
getDentalAppointmentsResponse
.listDentalAppointments.length,
(index) => InkWell(
onTap: () {
openInvoiceDetailsPage(getDentalAppointmentsResponse
.listDentalAppointments[index]);
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.all(Radius.circular(8.0)),
),
margin: EdgeInsets.all(10.0),
width: MediaQuery.of(context).size.width,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
child: Container(
margin: EdgeInsets.fromLTRB(
20.0, 10.0, 20.0, 10.0),
child: ClipRRect(
borderRadius:
BorderRadius.circular(100.0),
child: Image.asset(
"assets/images/new-design/ViewDetailsIco.png",
fit: BoxFit.fill,
height: 60.0,
width: 60.0),
),
),
),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Appointment No: ",
style: TextStyle(
fontSize: 14.0,
color: Colors.black,
letterSpacing: 0.5)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Appointment Date: ",
style: TextStyle(
fontSize: 14.0,
color: Colors.black,
letterSpacing: 0.5)),
),
Container(
margin: EdgeInsets.only(
top: 10.0, bottom: 10.0),
child: Text("Clinic: ",
style: TextStyle(
fontSize: 14.0,
color: Colors.black,
letterSpacing: 0.5)),
),
],
),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(
getDentalAppointmentsResponse
.listDentalAppointments[index]
.appointmentNo
.toString(),
style: TextStyle(
fontSize: 14.0,
color: Colors.black,
fontWeight: FontWeight.bold,
letterSpacing: 0.5)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(
DateUtil.getMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
getDentalAppointmentsResponse
.listDentalAppointments[
index]
.appointmentDate)),
style: TextStyle(
fontSize: 14.0,
color: Colors.black,
fontWeight: FontWeight.bold,
letterSpacing: 0.5)),
),
Container(
margin: EdgeInsets.only(
top: 10.0, bottom: 10.0),
child: Text(
getDentalAppointmentsResponse
.listDentalAppointments[index]
.clinicName,
style: TextStyle(
fontSize: 14.0,
color: Colors.black,
fontWeight: FontWeight.bold,
letterSpacing: 0.5)),
),
],
),
projectViewModel.isArabic
? Container(
margin: EdgeInsets.only(left: 15.0),
child: Image.asset(
"assets/images/new-design/arrow_menu_black-ar.png",
fit: BoxFit.fill,
height: 20.0,
width: 12.0),
)
: Container(
margin: EdgeInsets.only(right: 15.0),
child: Image.asset(
"assets/images/new-design/arrow_menu_black-en.png",
fit: BoxFit.fill,
height: 20.0,
width: 12.0),
),
],
),
),
),
),
],
)
: Container(),
),
));
}
openInvoiceDetailsPage(ListDentalAppointments listDentalAppointments) {
GifLoaderDialogUtils.showMyDialog(context);
MyInvoicesService myInvoicesService = new MyInvoicesService();
DoctorListResponse.DoctorList doctor = new DoctorListResponse.DoctorList();
doctor.name = listDentalAppointments.doctorName;
doctor.projectName = listDentalAppointments.projectName;
doctor.date = listDentalAppointments.appointmentDate;
doctor.actualDoctorRate = 0;
doctor.doctorImageURL = listDentalAppointments.doctorImageURL;
doctor.dayName = listDentalAppointments.invoiceNo;
doctor.doctorTitle = "Dr.";
doctor.clinicName = "InvoiceNo: " + listDentalAppointments.invoiceNo.toString();
myInvoicesService.getDentalAppointmentInvoice(12, listDentalAppointments.appointmentNo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
setState(() {
if (res['MessageStatus'] == 1) {
dentalInvoiceDetailResponse =
DentalInvoiceDetailResponse.fromJson(res);
print(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length);
Navigator.push(
context,
FadePage(
page: InvoiceDetail(
doctor,
listDentalAppointments,
dentalInvoiceDetailResponse,
context
)));
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
isDataLoaded = true;
});
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err.toString());
Navigator.of(context).pop();
});
}
getDentalAppointments() {
GifLoaderDialogUtils.showMyDialog(context);
MyInvoicesService myInvoicesService = new MyInvoicesService();
myInvoicesService.getAllDentalAppointments(12, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
setState(() {
if (res['MessageStatus'] == 1) {
getDentalAppointmentsResponse =
GetDentalAppointmentsResponse.fromJson(res);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
isDataLoaded = true;
});
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
Navigator.of(context).pop();
});
}
}

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@ -29,22 +30,7 @@ class WeightMonthlyPage extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
body: model.weighMonthTimeSeriesData.isEmpty
? Container(
child: Center(
child: Container(
child: Center(
child: MonthLineChartCurved(
horizontalInterval: 1.0,
title: TranslationBase.of(context).weight,
timeSeries: model.weighMonthTimeSeriesData,
indexes: model.weighMonthTimeSeriesData.length ~/ 5.5 ?? 0,
),
),
),
),
)
: ListView(
body: ListView(
children: [
Container(
width: double.maxFinite,
@ -52,7 +38,7 @@ class WeightMonthlyPage extends StatelessWidget {
child: MonthLineChartCurved(
horizontalInterval: 1.0,
title: TranslationBase.of(context).weight,
timeSeries: model.weighMonthTimeSeriesData,
timeSeries: model.weighMonthTimeSeriesData.isEmpty?[TimeSeriesSales3(0, 0.0)]:model.weighMonthTimeSeriesData,
indexes: model.weighMonthTimeSeriesData.length ~/ 5.5,
)),
SizedBox(
@ -68,7 +54,11 @@ class WeightMonthlyPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Table(
model.weighMonthTimeSeriesData.isEmpty? Container(
child: Center(
child: Texts(TranslationBase.of(context).noDataAvailable),
),
):Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -25,22 +26,7 @@ class WeightWeeklyPage extends StatelessWidget {
return AppScaffold(
isShowDecPage: false,
body: model.weightWeekTimeSeriesData.isEmpty
? Container(
child: Center(
child: Container(
child: Center(
child: LineChartCurved(
horizontalInterval: 1.0,
title: TranslationBase.of(context).weight,
timeSeries: model.weightWeekTimeSeriesData,
indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0,
),
),
),
),
)
: ListView(
body: ListView(
children: [
Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8),
@ -48,7 +34,9 @@ class WeightWeeklyPage extends StatelessWidget {
child: LineChartCurved(
horizontalInterval: 1.0,
title: TranslationBase.of(context).weight,
timeSeries: model.weightWeekTimeSeriesData,
timeSeries: model.weightWeekTimeSeriesData.isEmpty
? [TimeSeriesSales2(DateTime.now(), 0.0)]
: model.weightWeekTimeSeriesData,
indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0,
),
),
@ -65,9 +53,14 @@ class WeightWeeklyPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Table(
model.weightWeekTimeSeriesData.isEmpty? Container(
child: Center(
child: Texts(TranslationBase.of(context).noDataAvailable),
),
):Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
inside:
BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(context, projectViewModel, model),
),
@ -79,7 +72,8 @@ class WeightWeeklyPage extends StatelessWidget {
);
}
List<TableRow> fullData(BuildContext context, ProjectViewModel projectViewModel, WeightPressureViewModel model) {
List<TableRow> fullData(BuildContext context,
ProjectViewModel projectViewModel, WeightPressureViewModel model) {
List<TableRow> tableRow = [];
tableRow.add(
TableRow(
@ -88,8 +82,12 @@ class WeightWeeklyPage extends StatelessWidget {
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
topLeft: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
),
),
child: Center(
@ -129,8 +127,12 @@ class WeightWeeklyPage extends StatelessWidget {
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
topLeft: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
),
),
child: Center(

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@ -28,22 +29,8 @@ class WeightYearPage extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
body: model.weightYearTimeSeriesData.isEmpty
? Container(
child: Center(
child: Container(
child: Center(
child: LineChartCurved(
horizontalInterval: 1.0,
title: TranslationBase.of(context).weight,
timeSeries: model.weightYearTimeSeriesData,
indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0,
),
),
),
),
)
: ListView(
body:
ListView(
children: [
Container(
width: double.maxFinite,
@ -51,7 +38,7 @@ class WeightYearPage extends StatelessWidget {
child: LineChartCurved(
horizontalInterval: 2.0,
title: TranslationBase.of(context).weight,
timeSeries: model.weightYearTimeSeriesData,
timeSeries: model.weightYearTimeSeriesData.isEmpty?[TimeSeriesSales2(DateTime.now(),0.0)]:model.weightYearTimeSeriesData,
indexes: model.weightYearTimeSeriesData.length ~/ 5.5 ?? "",
)),
SizedBox(
@ -67,7 +54,11 @@ class WeightYearPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Table(
model.weightYearTimeSeriesData.isEmpty? Container(
child: Center(
child: Texts(TranslationBase.of(context).noDataAvailable),
),
):Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),

@ -144,7 +144,7 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
),
InkWell(
onTap: () {
confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeEnList : measureTimeArList);
confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeArList : measureTimeEnList);
},
child: Container(
padding: EdgeInsets.all(12),

@ -30,7 +30,7 @@ class BloodMonthlyPage extends StatelessWidget {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
baseViewModel: bloodSugarViewMode,
// baseViewModel: bloodSugarViewMode,
body: ListView(
children: [
Container(

@ -25,7 +25,7 @@ class BloodYearPage extends StatelessWidget {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
baseViewModel: bloodSugarViewMode,
// baseViewModel: bloodSugarViewMode,
body: ListView(
children: [
Container(

@ -31,7 +31,7 @@ class BloodSugarWeeklyPage extends StatelessWidget {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
baseViewModel: bloodSugarViewMode,
// baseViewModel: bloodSugarViewMode,
body: ListView(
children: [
Container(

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -11,91 +12,136 @@ import 'package:url_launcher/url_launcher.dart';
class PharmacyForPrescriptionsPage extends StatelessWidget {
final itemID;
final PrescriptionReport prescriptionReport;
PharmacyForPrescriptionsPage({Key key, this.itemID});
PharmacyForPrescriptionsPage({Key key, this.itemID, this.prescriptionReport});
@override
Widget build(BuildContext context) {
return BaseView<PrescriptionsViewModel>(
onModelReady: (model) =>
model.getListPharmacyForPrescriptions(itemId: itemID),
onModelReady: (model) => model.getListPharmacyForPrescriptions(itemId: itemID),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).availability,
baseViewModel: model,
body: ListView.builder(
itemBuilder: (context, index) => Container(
width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
body: Column(
children: [
Container(
width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(color: Colors.grey[200], width: 0.5),
),
border: Border.all(color: Colors.grey[200], width: 0.5),
),
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.pharmacyPrescriptionsList[index].projectImageURL,
fit: BoxFit.cover,
width: 60,
height: 70,
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
prescriptionReport.imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(model.pharmacyPrescriptionsList[index]
.locationDescription),
SizedBox(
height: 5,
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(prescriptionReport.itemDescription.isNotEmpty
? prescriptionReport.itemDescription
: prescriptionReport.itemDescriptionN ?? ''),
),
),
)
],
),
),
model.pharmacyPrescriptionsList.isNotEmpty == true
? ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemBuilder: (context, index) => Container(
width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
Texts(model.pharmacyPrescriptionsList[index].cityName),
],
border: Border.all(color: Colors.grey[200], width: 0.5),
),
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.pharmacyPrescriptionsList[index].projectImageURL,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(model.pharmacyPrescriptionsList[index].locationDescription),
SizedBox(
height: 5,
),
Texts(model.pharmacyPrescriptionsList[index].cityName),
],
),
),
),
InkWell(
onTap: () {
MapsLauncher.launchCoordinates(
double.parse(model.pharmacyPrescriptionsList[index].latitude),
double.parse(model.pharmacyPrescriptionsList[index].longitude));
},
child: Icon(
Icons.pin_drop,
size: 18,
color: Colors.red[900],
),
),
SizedBox(
width: 15,
),
InkWell(
onTap: Feedback.wrapForTap(() {
launch("tel://${model.pharmacyPrescriptionsList[index].phoneNumber}");
}, context),
child: Container(
child: Icon(
Icons.call,
size: 18,
color: Colors.red[900],
),
),
)
],
),
),
),
),
InkWell(
onTap: () {
MapsLauncher.launchCoordinates(
double.parse(
model.pharmacyPrescriptionsList[index].latitude),
double.parse(
model.pharmacyPrescriptionsList[index].longitude));
},
child: Icon(
Icons.pin_drop,
size: 18,
color: Colors.red[900],
),
),
SizedBox(
width: 15,
),
InkWell(
onTap: Feedback.wrapForTap(() {
launch(
"tel://${model.pharmacyPrescriptionsList[index].phoneNumber}");
}, context),
child: Container(
child: Icon(
Icons.call,
size: 18,
color: Colors.red[900],
itemCount: model.pharmacyPrescriptionsList.length,
)
: Padding(
padding: const EdgeInsets.only(top: 65.0),
child: Texts(
TranslationBase.of(context).thisItemIsNotAvailable,
textAlign: TextAlign.center,
),
),
)
],
),
),
itemCount: model.pharmacyPrescriptionsList.length,
],
),
),
);

@ -51,10 +51,9 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
prescriptionReport.itemDescription.isNotEmpty
? prescriptionReport.itemDescription
: prescriptionReport.itemDescriptionN ?? ''),
child: Texts(prescriptionReport.itemDescription.isNotEmpty
? prescriptionReport.itemDescription
: prescriptionReport.itemDescriptionN ?? ''),
),
),
)
@ -71,7 +70,8 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
context,
FadePage(
page: PharmacyForPrescriptionsPage(
itemID: prescriptionReport.itemID),
itemID: prescriptionReport.itemID,
),
),
),
child: Center(
@ -79,9 +79,7 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
children: <Widget>[
Container(
width: 50,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle),
decoration: BoxDecoration(color: Colors.white, shape: BoxShape.rectangle),
child: Column(
children: <Widget>[
Icon(
@ -108,9 +106,7 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
color: Colors.white,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
child: Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
outside: BorderSide(width: 0.5)),
border: TableBorder.symmetric(inside: BorderSide(width: 0.5), outside: BorderSide(width: 0.5)),
children: [
TableRow(
children: [
@ -159,28 +155,22 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child: Text(prescriptionReport.routeN ?? ''))),
child: Center(child: Text(prescriptionReport.routeN ?? ''))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child:
Text(prescriptionReport.frequencyN ?? ''))),
child: Center(child: Text(prescriptionReport.frequencyN ?? ''))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child: Text(
'${prescriptionReport.doseDailyQuantity}'))),
child: Center(child: Text('${prescriptionReport.doseDailyQuantity}'))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child:
Center(child: Text('${prescriptionReport.days}')))
child: Center(child: Text('${prescriptionReport.days}')))
],
),
],
@ -222,18 +212,15 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
return GestureDetector(
onTap: () {
DateTime startDate = DateTime.now();
DateTime endDate = DateTime(startDate.year, startDate.month,
startDate.day + prescriptionReport.days);
DateTime endDate = DateTime(startDate.year, startDate.month, startDate.day + prescriptionReport.days);
print(prescriptionReport);
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue =
Curves.easeInOutBack.transform(a1.value) - 1.0;
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform:
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: ReminderDialog(
@ -241,8 +228,7 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
title: "Prescription Reminder",
description:
"${prescriptionReport.itemDescriptionN} ${prescriptionReport.frequencyN} ${prescriptionReport.routeN} ",
startDate:
"/Date(${startDate.millisecondsSinceEpoch}+0300)/",
startDate: "/Date(${startDate.millisecondsSinceEpoch}+0300)/",
endDate: "/Date(${endDate.millisecondsSinceEpoch}+0300)/",
location: prescriptionReport.remarks,
),
@ -262,10 +248,10 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
// height: 100.0,
margin: EdgeInsets.all(7.0),
padding: EdgeInsets.only(bottom: 4.0),
decoration: BoxDecoration(boxShadow: [
BoxShadow(
color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
], borderRadius: BorderRadius.circular(10), color: Colors.white),
decoration: BoxDecoration(
boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)],
borderRadius: BorderRadius.circular(10),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
@ -274,31 +260,20 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
margin: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 0.0),
child: Text("add",
overflow: TextOverflow.clip,
style: TextStyle(
color: new Color(0xffB8382C),
letterSpacing: 1.0,
fontSize: 18.0)),
style: TextStyle(color: new Color(0xffB8382C), letterSpacing: 1.0, fontSize: 18.0)),
),
Container(
margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
child: Text("reminder",
overflow: TextOverflow.clip,
style: TextStyle(
color: Colors.black,
letterSpacing: 1.0,
fontSize: 15.0)),
style: TextStyle(color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
),
Container(
alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
margin: projectViewModel.isArabic
? EdgeInsets.fromLTRB(10.0, 7.0, 0.0, 8.0)
: EdgeInsets.fromLTRB(0.0, 7.0, 10.0, 8.0),
child: Image.asset(
"assets/images/new-design/reminder_icon.png",
width: 45.0,
height: 45.0),
child: Image.asset("assets/images/new-design/reminder_icon.png", width: 45.0, height: 45.0),
),
],
),

@ -50,10 +50,9 @@ class PrescriptionDetailsPage extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
prescriptionReport.itemDescription.isNotEmpty
? prescriptionReport.itemDescription
: prescriptionReport.itemDescriptionN ?? ''),
child: Texts(prescriptionReport.itemDescription.isNotEmpty
? prescriptionReport.itemDescription
: prescriptionReport.itemDescriptionN ?? ''),
),
),
)
@ -70,7 +69,9 @@ class PrescriptionDetailsPage extends StatelessWidget {
context,
FadePage(
page: PharmacyForPrescriptionsPage(
itemID: prescriptionReport.itemID),
itemID: prescriptionReport.itemID,
prescriptionReport: prescriptionReport,
),
),
),
child: Center(
@ -78,9 +79,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
children: <Widget>[
Container(
width: 50,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle),
decoration: BoxDecoration(color: Colors.white, shape: BoxShape.rectangle),
child: Column(
children: <Widget>[
Icon(
@ -107,9 +106,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
color: Colors.white,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
child: Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
outside: BorderSide(width: 0.5)),
border: TableBorder.symmetric(inside: BorderSide(width: 0.5), outside: BorderSide(width: 0.5)),
children: [
TableRow(
children: [
@ -158,28 +155,22 @@ class PrescriptionDetailsPage extends StatelessWidget {
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child: Text(prescriptionReport.routeN ?? ''))),
child: Center(child: Text(prescriptionReport.routeN ?? ''))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child:
Text(prescriptionReport.frequencyN ?? ''))),
child: Center(child: Text(prescriptionReport.frequencyN ?? ''))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child: Text(
'${prescriptionReport.doseDailyQuantity}'))),
child: Center(child: Text('${prescriptionReport.doseDailyQuantity}'))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child:
Center(child: Text('${prescriptionReport.days}')))
child: Center(child: Text('${prescriptionReport.days}')))
],
),
],
@ -221,18 +212,15 @@ class PrescriptionDetailsPage extends StatelessWidget {
return GestureDetector(
onTap: () {
DateTime startDate = DateTime.now();
DateTime endDate = DateTime(startDate.year, startDate.month,
startDate.day + prescriptionReport.days);
DateTime endDate = DateTime(startDate.year, startDate.month, startDate.day + prescriptionReport.days);
print(prescriptionReport);
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue =
Curves.easeInOutBack.transform(a1.value) - 1.0;
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform:
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: ReminderDialog(
@ -240,8 +228,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
title: "Prescription Reminder",
description:
"${prescriptionReport.itemDescriptionN} ${prescriptionReport.frequencyN} ${prescriptionReport.routeN} ",
startDate:
"/Date(${startDate.millisecondsSinceEpoch}+0300)/",
startDate: "/Date(${startDate.millisecondsSinceEpoch}+0300)/",
endDate: "/Date(${endDate.millisecondsSinceEpoch}+0300)/",
location: prescriptionReport.remarks,
),
@ -261,10 +248,10 @@ class PrescriptionDetailsPage extends StatelessWidget {
// height: 100.0,
margin: EdgeInsets.all(7.0),
padding: EdgeInsets.only(bottom: 4.0),
decoration: BoxDecoration(boxShadow: [
BoxShadow(
color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
], borderRadius: BorderRadius.circular(10), color: Colors.white),
decoration: BoxDecoration(
boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)],
borderRadius: BorderRadius.circular(10),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
@ -273,31 +260,20 @@ class PrescriptionDetailsPage extends StatelessWidget {
margin: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 0.0),
child: Text("add",
overflow: TextOverflow.clip,
style: TextStyle(
color: new Color(0xffB8382C),
letterSpacing: 1.0,
fontSize: 18.0)),
style: TextStyle(color: new Color(0xffB8382C), letterSpacing: 1.0, fontSize: 18.0)),
),
Container(
margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
child: Text("reminder",
overflow: TextOverflow.clip,
style: TextStyle(
color: Colors.black,
letterSpacing: 1.0,
fontSize: 15.0)),
style: TextStyle(color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
),
Container(
alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
margin: projectViewModel.isArabic
? EdgeInsets.fromLTRB(10.0, 7.0, 0.0, 8.0)
: EdgeInsets.fromLTRB(0.0, 7.0, 10.0, 8.0),
child: Image.asset(
"assets/images/new-design/reminder_icon.png",
width: 45.0,
height: 45.0),
child: Image.asset("assets/images/new-design/reminder_icon.png", width: 45.0, height: 45.0),
),
],
),

@ -22,6 +22,8 @@ int price = 0;
var languageID;
bool isOverQuantity = false;
bool isInWishlit = false;
//int isSelected = 1;
bool isSelected= true;
String itemID;
var customerId;
CompareList compareItems = new CompareList();
@ -642,14 +644,12 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
padding: EdgeInsets.only(bottom: 5),
// margin: EdgeInsets.symmetric(horizontal: 6, vertical: 4),
child: BaseView<PharmacyModuleViewModel>(
onModelReady: (model) =>
model.getRecommendedProducts(
widget.product.id.toString()),
onModelReady: (model) => model.getRecommendedProducts(widget.product.id.toString()),
builder: (_, model, wi) => Container(
child:
// Text(model.recommendedProductList[0].id),
model.recommendedProductList.length !=
null
model.recommendedProductList.length != null
? Expanded(
child: ListView.builder(
scrollDirection:
@ -657,11 +657,8 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
shrinkWrap: true,
physics: ScrollPhysics(),
// physics: NeverScrollableScrollPhysics(),
itemCount: model
.recommendedProductList
.length,
itemBuilder:
(context, index) {
itemCount: model.recommendedProductList.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
Navigator.push(
@ -674,42 +671,22 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
elevation: 2,
shape: RoundedRectangleBorder(
side: BorderSide(
color: Colors
.grey[
300],
color: Colors.grey[300],
width: 2),
borderRadius:
BorderRadius
.circular(
10)),
margin: EdgeInsets
.symmetric(
borderRadius: BorderRadius.circular(10)),
margin: EdgeInsets.symmetric(
horizontal: 8,
vertical: 0,
),
child: Container(
decoration:
BoxDecoration(
borderRadius:
BorderRadius
.all(
Radius.circular(
15),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(15),
),
),
padding: EdgeInsets
.symmetric(
horizontal:
4),
width: MediaQuery.of(
context)
.size
.width /
3,
padding: EdgeInsets.symmetric(horizontal: 4),
width: MediaQuery.of(context).size.width / 3,
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
children: [
@ -717,11 +694,10 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
child: Align(
alignment: Alignment.topRight,
child: IconButton(
icon: Icon(!isInWishlit
? Icons.favorite_border
: Icons.favorite),
icon: Icon(!isInWishlit ? Icons.favorite_border : Icons.favorite),
color: !isInWishlit ? Colors.grey : Colors.red,
onPressed: () async {
if (customerId != null) {
if (!isInWishlit) {
await addToWishlistFunction(model.recommendedProductList[index].id);
@ -734,29 +710,36 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
setState(() {});
},
)),
// itemID.contains(model.recommendedProductList[index].id)
// child: Align(
// alignment: Alignment.topRight,
// child:itemID.contains(model.recommendedProductList[index].id)
// // !isInWishlist
// ? IconButton(
// icon: Icon(Icons.favorite_border),
// color: Colors.red,
// color: Colors.grey,
// iconSize: 30,
// onPressed: () {
// setState(() {
// deleteFromWishlistFunction(itemID);
// });
// if (customerId != null && isInWishlit ) {
// deleteFromWishlistFunction(
// model.recommendedProductList[index].id);
// } });
// },
// )
// : IconButton(
// icon: Icon(Icons.favorite),
// color: Colors.grey,
// color: Colors.red,
// iconSize: 30,
// onPressed: () {
// setState(() {
// addToWishlistFunction(itemID);
// });
// if (customerId != null && !isInWishlit ) {
// addToWishlistFunction(
// model.recommendedProductList[index].id);
// } });
// },
// )
//
// ),
),
Container(

@ -231,37 +231,21 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
Stack(children: [
Container(
child: Align(
alignment:
Alignment
.topRight,
child:
itemID.contains(e.id)
alignment: Alignment.topRight,
child: itemID.contains(e.id)
// !isInWishlist
? IconButton(
icon:
Icon(Icons.favorite_border),
color:
Colors.grey,
iconSize:
30,
? IconButton(icon: Icon(Icons.favorite_border),
color: Colors.grey, iconSize: 30,
onPressed:
() {
setState(() {
addToWishlistFunction(itemID);
setState(() {addToWishlistFunction(itemID);
});
},
)
:
IconButton(
icon:
Icon(Icons.favorite),
color:
Colors.red,
iconSize:
30,
: IconButton(icon: Icon(Icons.favorite),
color: Colors.red, iconSize: 30,
onPressed:
() {
setState(() {
() {setState(() {
deleteFromWishlistFunction(itemID);
});
},
@ -269,149 +253,74 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
//
),
),
Container(
margin: EdgeInsets
.fromLTRB(0, 16,
10, 16),
alignment:
Alignment.center,
Container(margin: EdgeInsets.fromLTRB(0, 16, 10, 16),
alignment: Alignment.center,
// padding: EdgeInsets.only(left: 25, bottom: 20),
child: (e.images !=
null &&
e.images.length >
0)
? Image.network(
e.images[0]
.src
.toString(),
child: (e.images != null && e.images.length > 0)
? Image.network(e.images[0].src.toString(),
// item.images[0].src,
fit: BoxFit
.cover,
height: 60,
)
: Image.asset(
"assets/images/no_image.png",
fit: BoxFit
.cover,
height: 60,
fit: BoxFit.cover, height: 60,)
: Image.asset("assets/images/no_image.png", fit: BoxFit.cover, height: 60,
),
),
Container(
width: e.rxMessage !=
null
? MediaQuery.of(
context)
.size
.width /
5
: 0,
padding:
EdgeInsets.all(4),
decoration:
BoxDecoration(
color: Color(
0xffb23838),
borderRadius:
BorderRadius.only(
topLeft: Radius
.circular(
6)),
Container(width: e.rxMessage != null ? MediaQuery.of(context)
.size.width / 5 : 0,
padding: EdgeInsets.all(4),
decoration: BoxDecoration(
color: Color(0xffb23838),
borderRadius: BorderRadius.only(topLeft: Radius.circular(6)),
),
child: Texts(
e.rxMessage != null
? e.rxMessage
: "",
child: Texts(e.rxMessage != null ? e.rxMessage : "",
color: Colors.white,
regular: true,
fontSize: 10,
fontWeight:
FontWeight.w400,
fontWeight: FontWeight.w400,
),
),
]),
Container(
margin: EdgeInsets
.symmetric(
horizontal: 6,
vertical: 0,
.symmetric(horizontal: 6, vertical: 0,
),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
languageID == "ar"
? e.namen
: e.name,
languageID == "ar" ? e.namen : e.name,
style: TextStyle(
color: Colors
.black,
fontSize: 13.0,
color: Colors.black, fontSize: 13.0,
// fontWeight: FontWeight.bold,
),
),
Padding(
// padding: const EdgeInsets.only(top: 15, bottom: 10),
padding:
const EdgeInsets
.only(
top: 10,
bottom:
5),
child: Texts(
"SAR ${e.price}",
bold: true,
fontSize: 14,
padding: const EdgeInsets.only(top: 10, bottom: 5),
child: Texts("SAR ${e.price}",
bold: true, fontSize: 14,
),
),
],
),
),
Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
padding: EdgeInsets
.only(
right:
10),
padding: EdgeInsets.only(right: 10),
// margin: EdgeInsets.only(left: 5),
child: Align(
alignment:
Alignment
.topLeft,
child: RatingBar
.readOnly(
initialRating: e
.approvedRatingSum
.toDouble(),
child: Align(alignment: Alignment.topLeft,
child: RatingBar.readOnly(initialRating: e.approvedRatingSum.toDouble(),
// initialRating: productRate,
size: 13.0,
filledColor:
Colors.yellow[
700],
emptyColor:
Colors.grey[
500],
isHalfAllowed:
true,
halfFilledIcon:
Icons
.star_half,
filledIcon:
Icons
.star,
emptyIcon:
Icons
.star,
size: 13.0, filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
),
Texts(
"(${e.approvedTotalReviews.toString()})",
Texts("(${e.approvedTotalReviews.toString()})",
// bold: true,
fontSize: 12,
),
@ -664,8 +573,7 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
return Card(
elevation: 2,
shape: RoundedRectangleBorder(
side:
BorderSide(color: Colors.grey[300], width: 2),
side: BorderSide(color: Colors.grey[300], width: 2),
borderRadius: BorderRadius.circular(10)),
//
margin: EdgeInsets.symmetric(
@ -692,14 +600,12 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
//wishlistVar[index].id.contains(model.recommendedProductList[index].id)
!isInWishlist
? IconButton(
icon: Icon(
Icons.favorite_border),
icon: Icon(Icons.favorite_border),
color: Colors.grey,
iconSize: 30,
onPressed: () {
setState(() {
addToWishlistFunction(
itemID);
addToWishlistFunction(itemID);
});
},
)
@ -709,8 +615,7 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
iconSize: 30,
onPressed: () {
setState(() {
deleteFromWishlistFunction(
itemID);
deleteFromWishlistFunction(itemID);
});
},
)
@ -721,30 +626,20 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
margin: EdgeInsets.fromLTRB(0, 16, 10, 16),
alignment: Alignment.center,
// padding: EdgeInsets.only(left: 25, bottom: 20),
child: (model.recommendedProductList[index]
.images !=
null &&
model.recommendedProductList[index]
.images.length >
0)
? Image.network(
model.recommendedProductList[index]
.images[0].src
.toString(),
child: (model.recommendedProductList[index].images != null &&
model.recommendedProductList[index].images.length > 0)
? Image.network(model.recommendedProductList[index].images[0].src.toString(),
// item.images[0].src,
fit: BoxFit.cover,
height: 60,
)
: Image.asset(
"assets/images/no_image.png",
: Image.asset("assets/images/no_image.png",
fit: BoxFit.cover,
height: 60,
),
),
Container(
width: model.recommendedProductList[index]
.rxMessage !=
null
width: model.recommendedProductList[index].rxMessage != null
? MediaQuery.of(context).size.width / 5
: 0,
padding: EdgeInsets.all(4),
@ -754,11 +649,8 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
topLeft: Radius.circular(6)),
),
child: Texts(
model.recommendedProductList[index]
.rxMessage !=
null
? model.recommendedProductList[index]
.rxMessage
model.recommendedProductList[index].rxMessage != null
? model.recommendedProductList[index].rxMessage
: "",
color: Colors.white,
regular: true,
@ -773,12 +665,9 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
vertical: 2,
),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
model
.recommendedProductList[index].name,
Text(model.recommendedProductList[index].name,
style: TextStyle(
color: Colors.black,
fontSize: 13.0,
@ -799,8 +688,7 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
),
),
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
padding: EdgeInsets.only(
@ -809,10 +697,7 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
child: Align(
alignment: Alignment.topLeft,
child: RatingBar.readOnly(
initialRating: model
.recommendedProductList[index]
.approvedRatingSum
.toDouble(),
initialRating: model.recommendedProductList[index].approvedRatingSum.toDouble(),
// initialRating: productRate,
size: 13.0,
filledColor: Colors.yellow[700],

@ -4,7 +4,9 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/doctor_pre_post_image.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -51,7 +53,7 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig",
@ -157,7 +159,7 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"PatientOutSA": authUser.outSA ?? false,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null,
@ -184,7 +186,7 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorsRating(int docID, context) async {
Map<String, dynamic> request;
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
@ -207,13 +209,40 @@ class DoctorsListService extends BaseService {
await baseAppClient.post(GET_DOCTOR_RATING_NOTES,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<DoctorPrePostImages> getDoctorPrePostImages(DoctorProfileList doctorProfile, context) async {
Map<String, dynamic> request;
request = {
"PatientOutSA": authUser.outSA ?? 0,
"isDentalAllowedBackend": false,
"DoctorID" : doctorProfile.doctorID,
"ClinicID":doctorProfile.clinicID,
"ProjectID":doctorProfile.projectID
};
var images = DoctorPrePostImages();
await baseAppClient.post(GET_DOCTOR_PRE_POST_IMAGES,
onSuccess: (response, statusCode) async {
var list = response['DoctorPrePostImagesList'];
if (list is List && list.length > 0){
list.forEach((j) {
var image = DoctorPrePostImageModel.fromJson(j);
if(image.imageType == 1) images.pre = image;
if(image.imageType == 2) images.post = image;
});
}
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(images);
}
Future<Map> getDoctorsRatingDetails(int docID, context) async {
Map<String, dynamic> request;
var languageID =

@ -0,0 +1,121 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
class MyInvoicesService extends BaseService {
AppSharedPreferences sharedPref = AppSharedPreferences();
AppGlobal appGlobal = new AppGlobal();
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
Future<Map> getAllDentalAppointments(int projectID, context) async {
Map<String, dynamic> request;
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null,
"PatientID": authUser.patientID,
"License": true,
"IsRegistered": true,
"ProjectID": projectID,
"PatientTypeID": authUser.patientIdentificationType,
"PatientType": authUser.patientType,
"isDentalAllowedBackend": false
};
dynamic localRes;
await baseAppClient.post(GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getDentalAppointmentInvoice(int projectID, int appoNo, context) async {
Map<String, dynamic> request;
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null,
"PatientID": authUser.patientID,
"License": true,
"AppointmentNo": appoNo,
"IsRegistered": true,
"ProjectID": projectID,
"PatientTypeID": authUser.patientIdentificationType,
"PatientType": authUser.patientType,
"isDentalAllowedBackend": false
};
dynamic localRes;
await baseAppClient.post(GET_DENTAL_APPOINTMENT_INVOICE,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> sendDentalAppointmentInvoiceEmail(int projectID, int appoNo, context) async {
Map<String, dynamic> request;
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null,
"PatientID": authUser.patientID,
"License": true,
"AppointmentNo": appoNo,
"To": authUser.emailAddress,
"IsRegistered": true,
"ProjectID": projectID,
"PatientTypeID": authUser.patientIdentificationType,
"PatientType": authUser.patientType,
"isDentalAllowedBackend": false
};
dynamic localRes;
await baseAppClient.post(SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

File diff suppressed because it is too large Load Diff

@ -21,6 +21,7 @@ import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'
import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_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/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
@ -302,6 +303,17 @@ class Utils {
isEnable: projectViewModel.havePrivilege(6)),
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myInvoice,
imagePath: 'Invoice.png',
subTitle: TranslationBase.of(context).invoicesList,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/mobile_number.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import '../../Constants.dart';
@ -127,7 +128,9 @@ class _MobileNo extends State<MobileNo> {
controller: widget.controller,
keyboardType: TextInputType.number,
maxLength: 10,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.allow(RegExp("[0-9]")),
],
// maxLengthEnforced: true,
// onChanged: (value) {
// widget.controller.text = countryCode;

@ -148,6 +148,8 @@ dependencies:
#Handle Geolocation
geolocator: ^6.1.10
jiffy: ^3.0.0
screen: ^0.0.5
#google maps places
google_maps_place_picker: ^1.0.0

Loading…
Cancel
Save