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

 Conflicts:
	lib/pages/landing/landing_page.dart
merge-requests/369/head
Elham Rababh 3 years ago
commit f85c359cf4

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project # Uncomment this line to define a global platform for your project
# platform :ios, '11.0' # platform :ios, '10.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'

@ -220,7 +220,6 @@
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */, EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */,
835BB6C21DD911F74065B670 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -320,23 +319,6 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
}; };
835BB6C21DD911F74065B670 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;

@ -33,8 +33,7 @@ const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints';
const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo'; const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo';
// Delivery Driver // Delivery Driver
const DRIVER_LOCATION = const DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation';
'Services/Patients.svc/REST/PatientER_GetDriverLocation';
//weather //weather
const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
@ -42,51 +41,37 @@ const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege';
// Wifi Credentials // Wifi Credentials
const WIFI_CREDENTIALS = const WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
"Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
///Doctor ///Doctor
const GET_MY_DOCTOR = const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_RATING_NOTES = const GET_DOCTOR_PRE_POST_IMAGES = 'Services/Doctors.svc/REST/GetDoctorPrePostImages';
'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; const GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
const GET_DOCTOR_RATING_DETAILS = const GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions ///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS = const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const GET_PRESCRIPTION_REPORT = const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail';
'Services/Patients.svc/REST/INP_GetPrescriptionReport'; const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const SEND_PRESCRIPTION_EMAIL =
'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
///Lab Order ///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
'Services/Patients.svc/REST/GetPatientLabSpecialResults'; const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail';
const SEND_LAB_RESULT_EMAIL = const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
'Services/Notifications.svc/REST/SendLabReportEmail'; const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
const GET_Patient_LAB_RESULT =
'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT =
'Services/Patients.svc/REST/GetPatientLabOrdersResults';
/// ///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_ORDERS_DETAILS = const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const SEND_RAD_REPORT_EMAIL = const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail';
'Services/Notifications.svc/REST/SendRadReportEmail';
///Feedback ///Feedback
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
@ -95,37 +80,28 @@ const GET_PATIENT_AppointmentHistory = 'Services'
'/Doctors.svc/REST/PateintHasAppoimentHistory'; '/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN ///VITAL SIGN
const GET_PATIENT_VITAL_SIGN = const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
///Er Nearest ///Er Nearest
const GET_NEAREST_HOSPITAL = const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///ED Online ///ED Online
const ER_GET_VISUAL_TRIAGE_QUESTIONS = const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
"services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_SAVE_TRIAGE_INFORMATION =
"services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_GetPatientPaymentInformationForERClinic = const ER_GetPatientPaymentInformationForERClinic =
"services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic";
///Er Nearest ///Er Nearest
const GET_AMBULANCE_REQUEST = const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PATIENT_ALL_PRES_ORDERS = const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
const UPDATE_PRESS_ORDER =
'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
const INSERT_ER_INERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder';
/// ER RRT /// ER RRT
const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation'; const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
const GET_ALL_RRT_QUESTIONS = const GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions';
'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; const GET_RRT_SERVICE_PRICE = 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice';
///FindUs ///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@ -134,15 +110,13 @@ const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
///babyInformation ///babyInformation
const GET_BABYINFORMATION_REQUEST = const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID';
'Services/Community.svc/REST/GetBabyByUserID';
///Get Baby By User ID ///Get Baby By User ID
const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID';
///userInformation ///userInformation
const GET_USERINFORMATION_REQUEST = const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New';
'Services/Community.svc/REST/GetUserInformation_New';
///Update email ///Update email
const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail';
@ -164,29 +138,21 @@ const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable';
const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities';
///BloodDetails ///BloodDetails
const GET_BLOOD_REQUEST = const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
const SAVE_BLOOD_REQUEST = const SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const GET_BLOOD_AGREEMENT = const GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation';
'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; const SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
const SAVE_BLOOD_AGREEMENT =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
///Reports ///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT = const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail';
const SEND_MEDICAL_REPORT_EMAIL =
'Services/Notifications.svc/REST/SendMedicalReportEmail';
///Rate ///Rate
const IS_LAST_APPOITMENT_RATED = const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
'Services/Doctors.svc/REST/IsLastAppoitmentRated'; const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const GET_APPOINTMENT_DETAILS_BY_NO =
'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
@ -198,8 +164,7 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
//URL to get active appointment list //URL to get active appointment list
const GET_ACTIVE_APPOINTMENTS_LIST_URL = const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
"Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
//URL to get projects list //URL to get projects list
const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
@ -208,118 +173,87 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
//URL to dental doctors list //URL to dental doctors list
const GET_DENTAL_DOCTORS_LIST_URL = const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
"Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
//URL to get doctor free slots //URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
//URL to insert appointment //URL to insert appointment
const INSERT_SPECIFIC_APPOINTMENT = const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment";
"Services/Doctors.svc/REST/InsertSpecificAppointment";
//URL to get patient share //URL to get patient share
const GET_PATIENT_SHARE = const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
//URL to get patient appointment history //URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY = const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
"Services/Doctors.svc/REST/PateintHasAppoimentHistory";
const SEND_REPORT_EYE_EMAIL = const SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
"Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
"Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
//URL to get patient appointment curfew history //URL to get patient appointment curfew history
const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
"Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
//URL to confirm appointment //URL to confirm appointment
const CONFIRM_APPOINTMENT = const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment";
"Services/MobileNotifications.svc/REST/ConfirmAppointment";
const INSERT_VIDA_REQUEST = const INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
"Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
//URL to cancel appointment //URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment";
//URL get appointment QR //URL get appointment QR
const GENERATE_QR_APPOINTMENT = const GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo";
"Services/Doctors.svc/REST/GenerateQRAppointmentNo";
//URL send email appointment QR //URL send email appointment QR
const EMAIL_QR_APPOINTMENT = const EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
"Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
//URL check payment status //URL check payment status
const CHECK_PAYMENT_STATUS = const CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
"Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
//URL create advance payment //URL create advance payment
const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment";
const HIS_CREATE_ADVANCE_PAYMENT = const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment";
"Services/Patients.svc/REST/HIS_CreateAdvancePayment";
const ADD_ADVANCE_NUMBER_REQUEST = const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
const IS_ALLOW_ASK_DOCTOR = const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const GET_CALL_REQUEST_TYPE = const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const ADD_VIDA_REQUEST =
'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_LIVECARE_CLINICS = const GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
const GET_LIVECARE_SCHEDULE_CLINICS = const GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
const GET_PATIENT_SHARE_LIVECARE = const GET_PATIENT_SHARE_LIVECARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare";
const GET_LIVECARE_CLINIC_TIMING = const GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
const GET_ER_APPOINTMENT_FEES = const GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime';
const ADD_NEW_CALL_FOR_PATIENT_ER = const ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER';
'Services/DoctorApplication.svc/REST/NewCallForPatientER';
const GET_LIVECARE_HISTORY = const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
const CANCEL_LIVECARE_REQUEST = const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
const SEND_LIVECARE_INVOICE_EMAIL =
'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions';
const UPDATE_HEALTH_TERMS = const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
const GET_PATIENT_HEALTH_STATS = const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts';
'Services/Patients.svc/REST/Med_GetTransactionsSts';
const SEND_CHECK_IN_NFC_REQUEST = const SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC';
'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC';
//URL to get medicine and pharmacies list //URL to get medicine and pharmacies list
const CHANNEL = 3; const CHANNEL = 3;
@ -340,21 +274,16 @@ var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const GET_PAtIENTS_INSURANCE = const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
"Services/Patients.svc/REST/Get_PatientInsuranceDetails"; const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
const GET_PATIENT_INSURANCE_DETAILS = const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const UPLOAD_INSURANCE_CARD =
'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
const GET_PAtIENTS_INSURANCE_APPROVALS = const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus_DWH";
"Services/Patients.svc/REST/GetApprovalStatus_DWH";
const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';
const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS";
@ -364,84 +293,56 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail';
const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const GET_PATIENT_INFO_BY_ID =
'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER =
'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber';
const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
const GET_COVID_DRIVETHRU_PROJECT_LIST = const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
const GET_COVID_DRIVETHRU_PAYMENT_INFO = const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_FREE_SLOTS = const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
const GET_COVID_DRIVETHRU_PROCEDURES_LIST = const GET_COVID_DRIVETHRU_PROCEDURES_LIST = 'Services/Doctors.svc/REST/COVID19_GetTestProcedures';
'Services/Doctors.svc/REST/COVID19_GetTestProcedures';
///Smartwatch Integration Services ///Smartwatch Integration Services
const GET_PATIENT_LAST_RECORD = const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord';
'Services/Patients.svc/REST/Med_GetPatientLastRecord';
///My Trackers ///My Trackers
const GET_DIABETIC_RESULT_AVERAGE = const GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults';
const GET_DIABTEC_RESULT = const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
'Services/Patients.svc/REST/Patient_GetDiabtecResults';
const ADD_DIABTEC_RESULT = const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
'Services/Patients.svc/REST/Patient_AddDiabtecResult'; const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
const ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
const GET_BLOOD_PRESSURE_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
const GET_BLOOD_PRESSURE_RESULT = const GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; const ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
const ADD_BLOOD_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
const GET_WEIGHT_PRESSURE_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
const GET_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
const ADD_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID =
'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
const GET_CALL_INFO_HOURS_RESULT = const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
'Services/Doctors.svc/REST/GetCallInfoHoursResult'; const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const GET_CALL_REQUEST_TYPE_LOV =
'Services/Doctors.svc/REST/GetCallRequestType_LOV'; const UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
const UPDATE_DIABETIC_RESULT = const SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; const DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus';
const DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
const SEND_AVERAGE_BLOOD_SUGAR_REPORT =
'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; const UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult';
const DEACTIVATE_DIABETIC_STATUS = const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport';
'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport';
const DEACTIVATE_BLOOD_PRESSURES_STATUS =
'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; const UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult';
const DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
const UPDATE_BLOOD_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult';
const SEND_AVERAGE_BLOOD_WEIGHT_REPORT =
'Services/Notifications.svc/REST/SendAverageBodyWeightReport';
const SEND_AVERAGE_BLOOD_PRESSURE_REPORT =
'Services/Notifications.svc/REST/SendAverageBloodPressureReport';
const UPDATE_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult';
const DEACTIVATE_WEIGHT_PRESSURE_RESULT =
'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse';
const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
@ -449,35 +350,25 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
// H2O // H2O
const H2O_GET_USER_PROGRESS = const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
"Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
const H2O_INSERT_USER_ACTIVITY = const H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New";
"Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; const H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New";
const H2O_GET_USER_DETAIL = const H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity";
"Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New";
const H2O_UPDATE_USER_DETAIL =
"Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New";
const H2O_UNDO_USER_ACTIVITY =
"Services/H2ORemainder.svc/REST/H2o_UndoUserActivity";
//E_Referral Services //E_Referral Services
const GET_ALL_RELATIONSHIP_TYPES = const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes";
"Services/Patients.svc/REST/GetAllRelationshipTypes"; const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL =
'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities';
const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
// Encillary Orders // Encillary Orders
const GET_ANCILLARY_ORDERS = const GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
const GET_ANCILLARY_ORDERS_DETAILS = const GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
//Pharmacy wishlist //Pharmacy wishlist
// const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; // const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/";
@ -509,50 +400,34 @@ const GET_SHIPPING_OPTIONS = "get_shipping_option/";
const DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; const DELETE_SHOPPING_CART = "delete_shopping_cart_items/";
const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/";
const ORDER_SHOPPING_CART = "orders"; const ORDER_SHOPPING_CART = "orders";
const GET_LACUM_ACCOUNT_INFORMATION = const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation";
"Services/Patients.svc/REST/GetLakumAccountInformation"; const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
const GET_LACUM_GROUP_INFORMATION = const LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation";
"Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; const LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation";
const LACUM_ACCOUNT_ACTIVATE = const CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount";
"Services/Patients.svc/REST/LakumAccountActivation"; const TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
const LACUM_ACCOUNT_DEACTIVATE = const LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
"Services/Patients.svc/REST/LakumAccountDeactivation";
const CREATE_LAKUM_ACCOUNT =
"Services/Patients.svc/REST/PHR_CreateLakumAccount";
const TRANSFER_YAHALA_LOYALITY_POINTS =
"Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
const LAKUM_GET_USER_TERMS_AND_CONDITIONS =
"Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; const GET_RECOMMENDED_PRODUCT = 'alsoProduct/';
const GET_MOST_VIEWED_PRODUCTS = "mostview?"; const GET_MOST_VIEWED_PRODUCTS = "mostview?";
const GET_NEW_PRODUCTS = "newproducts?"; const GET_NEW_PRODUCTS = "newproducts?";
// Home Health Care // Home Health Care
const HHC_GET_ALL_SERVICES = const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
"Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
const HHC_GET_ALL_CMC_SERVICES = const PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder";
"Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; const GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
const PATIENT_ER_UPDATE_PRES_ORDER = const GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
"Services/Patients.svc/REST/PatientER_UpdatePresOrder";
const GET_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
const GET_CMC_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems";
const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS =
'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ =
'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead';
const GET_PATIENT_ALL_PRES_ORD = const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const PATIENT_ER_INSERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews'; const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews';
const BLOOD_DONATION_REGISTER_BLOOD_TYPE = const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
//Pharmacy wishlist //Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/"; const GET_WISHLIST = "shopping_cart_items/";
@ -585,8 +460,7 @@ const GET_SUB_PRODUCTS = 'products?categoryid=';
const GET_FINAL_PRODUCTS = const GET_FINAL_PRODUCTS =
'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId='; 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';
const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory';
const GET_DISEASE_BY_CLINIC_ID = const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime';
const TIMER_MIN = 10; const TIMER_MIN = 10;
@ -602,8 +476,13 @@ const SCAN_QR_CODE = 'productbysku/';
const FILTERED_PRODUCTS = 'products?categoryids='; const FILTERED_PRODUCTS = 'products?categoryids=';
const GET_DOCTOR_LIST_CALCULATION = const GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors";
"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 { class AppGlobal {
static var context; static var context;

File diff suppressed because it is too large Load Diff

@ -86,4 +86,9 @@ class Addresses {
return data; return data;
} }
@override
String toString() {
return "${address1 ?? ""} ${address2 ?? ""}";
}
} }

@ -1,4 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class PrescriptionsOrder { class PrescriptionsOrder {
int iD; int iD;
@ -32,6 +35,19 @@ class PrescriptionsOrder {
dynamic projectDescription; dynamic projectDescription;
dynamic projectDescriptionN; dynamic projectDescriptionN;
String getNearestProjectDescription(){
return isAppArabic ? nearestProjectDescriptionN : nearestProjectDescription;
}
String getStatusName(TranslationBase localize){
if(status == 1)
return localize.pending;
else if(status == 3)
return localize.completed;
return '$status';
}
String getFormattedDateTime()=> DateUtil.getDateFormatted(pickupDateTime);
PrescriptionsOrder( PrescriptionsOrder(
{this.iD, {this.iD,
this.patientID, this.patientID,

@ -13,7 +13,7 @@ class SickLeave {
int appointmentNo; int appointmentNo;
int admissionNo; int admissionNo;
int actualDoctorRate; int actualDoctorRate;
String appointmentDate; DateTime appointmentDate;
String clinicName; String clinicName;
String doctorImageURL; String doctorImageURL;
String doctorName; String doctorName;
@ -80,7 +80,7 @@ class SickLeave {
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];
admissionNo = json['AdmissionNo']; admissionNo = json['AdmissionNo'];
actualDoctorRate = json['ActualDoctorRate']; actualDoctorRate = json['ActualDoctorRate'];
appointmentDate = json['AppointmentDate']; appointmentDate = DateUtil.convertStringToDate(json['AppointmentDate']);
clinicName = json['ClinicName']; clinicName = json['ClinicName'];
doctorImageURL = json['DoctorImageURL']; doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName']; doctorName = json['DoctorName'];

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart'; import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -11,14 +12,14 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
class FeedbackService extends BaseService { class FeedbackService extends BaseService {
List<COCItem> cOCItemList = List(); List<COCItem> cOCItemList = List();
RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem(); RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem();
List<AppointmentHistory> appointHistoryList = List(); List<AppoitmentAllHistoryResultList> appointHistoryList = List();
Future sendCOCItem( Future sendCOCItem(
{String title, {String title,
String details, String details,
String cOCTypeName, String cOCTypeName,
String attachment, String attachment,
AppointmentHistory appointHistory}) async { AppoitmentAllHistoryResultList appointHistory}) async {
hasError = false; hasError = false;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
@ -45,7 +46,7 @@ class FeedbackService extends BaseService {
if (appointHistory != null) { if (appointHistory != null) {
body['AppoinmentNo'] = appointHistory.appointmentNo; body['AppoinmentNo'] = appointHistory.appointmentNo;
body['AppointmentDate'] = DateUtil.convertDateToString(appointHistory.appointmentDate); body['AppointmentDate'] = appointHistory.appointmentDate;
body['ClinicID'] = appointHistory.clinicID; body['ClinicID'] = appointHistory.clinicID;
body['ClinicName'] = appointHistory.clinicName; body['ClinicName'] = appointHistory.clinicName;
body['DoctorID'] = appointHistory.doctorID; body['DoctorID'] = appointHistory.doctorID;
@ -88,7 +89,7 @@ class FeedbackService extends BaseService {
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
appointHistoryList = []; appointHistoryList = [];
response['AppoimentAllHistoryResultList'].forEach((appoint) { response['AppoimentAllHistoryResultList'].forEach((appoint) {
appointHistoryList.add(AppointmentHistory.fromJson(appoint)); appointHistoryList.add(AppoitmentAllHistoryResultList.fromJson(appoint));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

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

@ -1,5 +1,19 @@
import 'dart:async';
import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/rrt/service_price.dart';
import 'package:diplomaticquarterapp/services/pharmacy_services/pharmacyAddress_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:flutter/cupertino.dart';
import '../base_view_model.dart'; import '../base_view_model.dart';
@ -7,42 +21,127 @@ import '../base_view_model.dart';
class RRTService extends BaseService{ class RRTService extends BaseService{
} }
class _RRTServiceData{
List<PrescriptionsOrder> pendingOrders = [];
List<PrescriptionsOrder> completedOrders = [];
ServicePrice servicePrice;
}
class RRTViewModel extends BaseViewModel{ class RRTViewModel extends BaseViewModel{
var _service = RRTService(); var _service = RRTService();
var _pharmacy_service = locator<PharmacyModuleService>();
var _pharmacy_address_service = locator<PharmacyAddressService>();
Future createRequest(){ _RRTServiceData rrtServiceData = _RRTServiceData();
return null; Future<_RRTServiceData> loadRequiredData() async{
await getServicePrice();
await getAllOrders();
return rrtServiceData;
} }
Future<int> createOrder(Map<String, dynamic> body) async{
Future getAllRequest(){ body['IdentificationNo'] = user.patientIdentificationNo;
body['NationalityID'] = user.nationalityID;
return null; body['CreatedBy'] = user.patientIdentificationType;
body['OrderServiceID'] = 5;
int requestNo;
await _service.baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, body: body, onSuccess: (response, statusCode){
requestNo = response['RequestNo'];
}, onFailure: (error, statusCode){
AppToast.showErrorToast(message: error);
});
return requestNo;
} }
// Service ID: 4 == RRT
Future<_RRTServiceData> getAllOrders() async{
await _service.baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, body: {}, onSuccess: (response, statusCode){
var data = response["PatientER_GetPatientAllPresOrdersList"];
if(data != null && data is List){
data.forEach((json){
if(json["ServiceID"] == 5){
if(json["Status"] == 1){ // Pending
rrtServiceData.pendingOrders.clear();
rrtServiceData.pendingOrders.add(PrescriptionsOrder.fromJson(json));
}else if (json["Status"] == 3){ // Completed
rrtServiceData.completedOrders.clear();
rrtServiceData.completedOrders.add(PrescriptionsOrder.fromJson(json));
}
}
return Future.error("404");
});
}
}, onFailure: (error, statusCode){
AppToast.showErrorToast(message: error);
});
return rrtServiceData;
}
Future getRequestDetails(){
Future getOrderDetails() async{
return null; return null;
} }
Future getAllQuestions(){ Future getAllQuestions() async{
dynamic response_;
return null; await _service.baseAppClient.post(GET_ALL_RRT_QUESTIONS, body: {}, onSuccess: (response, statusCode){
response_ = response;
}, onFailure: (error, statusCode){
AppToast.showErrorToast(message: error);
});
return response_;
} }
Future getCancelReasons(){ Future<ServicePrice> getServicePrice() async{
Map<String,dynamic> body = {"IdentificationNo":user.patientIdentificationNo};
ServicePrice servicePrice;
await _service.baseAppClient.post(GET_RRT_SERVICE_PRICE, body: body, onSuccess: (response, statusCode){
var data = response['PatientE_RealRRT_GetServicePriceList'];
if(data != null && data is List){
var priceData = data.first;
if(priceData != null){
servicePrice = ServicePrice.fromJson(priceData);
rrtServiceData.servicePrice = servicePrice;
}
}
}, onFailure: (error, statusCode){
AppToast.showErrorToast(message: error);
});
return servicePrice;
}
return null; Future<bool> cancelOrder(PrescriptionsOrder order, {String reason = ""}) async{
var body = {"PresOrderID":order.iD, "PresOrderStatus":4,"EditedBy":3,"RejectionReason":reason};
var success = false;
await _service.baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER, body: body, onSuccess: (response, statusCode){
success = true;
}, onFailure: (error, statusCode){
AppToast.showErrorToast(message: error);
success = false;
});
return Future.value(success);
} }
Future cancelRequest(){ Future getCancelReasons(){
}
return null; Future<List<Addresses>> getAddresses() async{
Object error;
try{
var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
if(token == null)
await _pharmacy_service.generatePharmacyToken();
await _pharmacy_service.makeVerifyCustomer({'PatientID': user.patientID.toString()});
await _pharmacy_address_service.getAddresses();
return _pharmacy_address_service.addresses;
}catch(e){
error = e;
}
Future.error(error);
} }
} }

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart'; import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -23,7 +24,7 @@ class FeedbackViewModel extends BaseViewModel {
List<COCItem> get cOCItemList => _feedbackService.cOCItemList; List<COCItem> get cOCItemList => _feedbackService.cOCItemList;
List<AppointmentHistory> get appointHistoryList => List<AppoitmentAllHistoryResultList> get appointHistoryList =>
_feedbackService.appointHistoryList; _feedbackService.appointHistoryList;
Future<bool> sendCOCItem( Future<bool> sendCOCItem(
@ -31,7 +32,7 @@ class FeedbackViewModel extends BaseViewModel {
String details, String details,
String cOCTypeName, String cOCTypeName,
String attachment, String attachment,
AppointmentHistory appointHistory}) async { AppoitmentAllHistoryResultList appointHistory}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _feedbackService.sendCOCItem( await _feedbackService.sendCOCItem(
title: title, title: title,

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

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
var isAppArabic = false;
class ProjectViewModel extends BaseViewModel { class ProjectViewModel extends BaseViewModel {
// Platform Bridge // Platform Bridge
PlatformBridge platformBridge() { PlatformBridge platformBridge() {
@ -69,19 +70,19 @@ class ProjectViewModel extends BaseViewModel {
currentLanguage = currentLanguage =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_appLocale = Locale(currentLanguage); _appLocale = Locale(currentLanguage);
_isArabic = currentLanguage == 'ar'; isAppArabic = _isArabic = currentLanguage == 'ar';
notifyListeners(); notifyListeners();
} }
void changeLanguage(String lan) { void changeLanguage(String lan) {
if (lan != "en" && currentLanguage != lan) { if (lan != "en" && currentLanguage != lan) {
_appLocale = Locale("ar"); _appLocale = Locale("ar");
_isArabic = true; isAppArabic = _isArabic = true;
currentLanguage = 'ar'; currentLanguage = 'ar';
sharedPref.setString(APP_LANGUAGE, 'ar'); sharedPref.setString(APP_LANGUAGE, 'ar');
} else if (lan != "ar" && currentLanguage != lan) { } else if (lan != "ar" && currentLanguage != lan) {
_appLocale = Locale("en"); _appLocale = Locale("en");
_isArabic = false; isAppArabic = _isArabic = false;
currentLanguage = 'en'; currentLanguage = 'en';
sharedPref.setString(APP_LANGUAGE, 'en'); sharedPref.setString(APP_LANGUAGE, 'en');
} }

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

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

@ -0,0 +1,53 @@
class ServicePrice {
String currency;
double maxPrice;
double maxTotalPrice;
double maxVAT;
double minPrice;
double minTotalPrice;
double minVAT;
int price;
int totalPrice;
int vat;
ServicePrice({
this.currency,
this.maxPrice,
this.maxTotalPrice,
this.maxVAT,
this.minPrice,
this.minTotalPrice,
this.minVAT,
this.price,
this.totalPrice,
this.vat});
ServicePrice.fromJson(dynamic json) {
currency = json["Currency"];
maxPrice = json["MaxPrice"];
maxTotalPrice = json["MaxTotalPrice"];
maxVAT = json["MaxVAT"];
minPrice = json["MinPrice"];
minTotalPrice = json["MinTotalPrice"];
minVAT = json["MinVAT"];
price = json["Price"];
totalPrice = json["TotalPrice"];
vat = json["VAT"];
}
Map<String, dynamic> toJson() {
var map = <String, dynamic>{};
map["Currency"] = currency;
map["MaxPrice"] = maxPrice;
map["MaxTotalPrice"] = maxTotalPrice;
map["MaxVAT"] = maxVAT;
map["MinPrice"] = minPrice;
map["MinTotalPrice"] = minTotalPrice;
map["MinVAT"] = minVAT;
map["Price"] = price;
map["TotalPrice"] = totalPrice;
map["VAT"] = vat;
return map;
}
}

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

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

@ -7,8 +7,10 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
const activeCardColor = Color(0xff70777A); const activeCardColor = Color(0xff515a5d);
const inactiveCardColor = Color(0xffFAFAFd); const activeTextColor = Color(0xffFAFAFA);
const inactiveCardColor = Color(0xffFAFAFA);
const inactiveTextColor = Color(0xff60686B);
class BloodSugar extends StatefulWidget { class BloodSugar extends StatefulWidget {
@override @override
@ -20,6 +22,8 @@ Color color;
class _BloodSugarState extends State<BloodSugar> { class _BloodSugarState extends State<BloodSugar> {
Color cardMGColor = inactiveCardColor; Color cardMGColor = inactiveCardColor;
Color cardMMOLColor = inactiveCardColor; Color cardMMOLColor = inactiveCardColor;
Color textMGColor = inactiveTextColor;
Color textMMOLColor = inactiveTextColor;
void updateColor(int type) { void updateColor(int type) {
//MG/DLT card //MG/DLT card
@ -30,6 +34,8 @@ class _BloodSugarState extends State<BloodSugar> {
} else { } else {
cardMGColor = inactiveCardColor; cardMGColor = inactiveCardColor;
} }
textMGColor = activeTextColor;
textMMOLColor = inactiveTextColor;
} }
if (type == 2) { if (type == 2) {
if (cardMMOLColor == inactiveCardColor) { if (cardMMOLColor == inactiveCardColor) {
@ -38,6 +44,8 @@ class _BloodSugarState extends State<BloodSugar> {
} else { } else {
cardMMOLColor = inactiveCardColor; cardMMOLColor = inactiveCardColor;
} }
textMGColor = inactiveTextColor;
textMMOLColor = activeTextColor;
} }
} }
@ -45,7 +53,7 @@ class _BloodSugarState extends State<BloodSugar> {
if (textController.text.isEmpty) return; if (textController.text.isEmpty) return;
if (cardMGColor == activeCardColor) { if (cardMGColor == activeCardColor) {
inputValue = double.parse(textController.text); inputValue = double.parse(textController.text);
inputValue = inputValue / 15; inputValue = inputValue / 18;
unit = 'mmol/l'; unit = 'mmol/l';
} else if (cardMMOLColor == activeCardColor) { } else if (cardMMOLColor == activeCardColor) {
inputValue = double.parse(textController.text); inputValue = double.parse(textController.text);
@ -74,16 +82,17 @@ class _BloodSugarState extends State<BloodSugar> {
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
appBarTitle: TranslationBase.of(context).bloodSugarConversion, appBarTitle: TranslationBase.of(context).bloodSugarConversion,
body: Padding( body: Container(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: Column(
children: [
Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 0.7,
child: Column( child: Column(
//crossAxisAlignment: CrossAxisAlignment.start, //crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: 350.0, margin: EdgeInsets.symmetric(horizontal: 8),
child: Text( child: Text(
TranslationBase.of(context).convertBloodSugarStatement, TranslationBase.of(context).convertBloodSugarStatement,
//textAlign: TextAlign.center, //textAlign: TextAlign.center,
@ -91,18 +100,18 @@ class _BloodSugarState extends State<BloodSugar> {
), ),
), ),
SizedBox( SizedBox(
height: 15.0, height: 12.0,
), ),
Container( Container(
color: Colors.white, color: Colors.white,
height: 120.0,
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.symmetric(
vertical: 16.0, horizontal: 8),
child: Column( child: Column(
//crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 15.0), padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Row( child: Row(
children: [ children: [
Texts( Texts(
@ -112,81 +121,91 @@ class _BloodSugarState extends State<BloodSugar> {
), ),
), ),
SizedBox( SizedBox(
height: 9.0, height: 8.0,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
GestureDetector( SizedBox(
width: 16.0,
),
Expanded(
child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
updateColor(1); updateColor(1);
if (textController.text.isNotEmpty) { calculateBloodSugar();
inputValue =
double.parse(textController.text);
inputValue = inputValue / 15;
}
unit = 'mmol/l';
}); });
}, },
child: Container( child: Container(
height: 65.0, height: 65.0,
width: 150.0,
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset( offset: Offset(0,
0, 3), // changes position of shadow 3), // changes position of shadow
), ),
], ],
color: cardMGColor, color: cardMGColor,
borderRadius: BorderRadius.circular(3.0), borderRadius:
BorderRadius.circular(3.0),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0), vertical: 0.0, horizontal: 18.0),
child: Texts('MG/DLt TO \nMMOL/L'), child: Texts(
'MG/DLt TO \nMMOL/L',
color: textMGColor,
),
),
), ),
), ),
), ),
GestureDetector( SizedBox(
width: 12.0,
),
Expanded(
child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
updateColor(2); updateColor(2);
if (textController.text.isNotEmpty) { calculateBloodSugar();
inputValue =
double.parse(textController.text);
inputValue = inputValue / 18;
}
unit = 'mg/dlt';
}); });
}, },
child: Container( child: Container(
height: 65.0, height: 65.0,
width: 150.0,
decoration: BoxDecoration( decoration: BoxDecoration(
color: cardMMOLColor, color: cardMMOLColor,
borderRadius: BorderRadius.circular(3.0), borderRadius:
BorderRadius.circular(3.0),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset( offset: Offset(0,
0, 3), // changes position of shadow 3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 16.0), horizontal: 16.0),
child: Texts('\nMMOL/L TO MG/DLt '), child: Texts(
'MMOL/L TO MG/DLt ',
color: textMMOLColor,
),
), ),
), ),
), ),
),
SizedBox(
width: 16.0,
),
], ],
), ),
], ],
@ -194,10 +213,11 @@ class _BloodSugarState extends State<BloodSugar> {
), ),
), ),
SizedBox( SizedBox(
height: 25.0, height: 24.0,
), ),
Container( Container(
height: 65.0, height: 65.0,
padding: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
color: Colors.white, color: Colors.white,
@ -209,9 +229,19 @@ class _BloodSugarState extends State<BloodSugar> {
], ],
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
decoration: InputDecoration( decoration: InputDecoration(
labelText: TranslationBase.of(context).enterReadingValue, labelText:
border: OutlineInputBorder( TranslationBase.of(context).enterReadingValue,
borderSide: BorderSide(color: Colors.black45)), enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white),
),
disabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white),
),
border: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white)),
labelStyle: TextStyle( labelStyle: TextStyle(
color: Colors.black87, color: Colors.black87,
), ),
@ -219,7 +249,7 @@ class _BloodSugarState extends State<BloodSugar> {
), ),
), ),
SizedBox( SizedBox(
height: 25.0, height: 24.0,
), ),
Visibility( Visibility(
visible: _visible, visible: _visible,
@ -241,11 +271,12 @@ class _BloodSugarState extends State<BloodSugar> {
Row( Row(
children: [ children: [
Text( Text(
inputValue.toStringAsFixed(3), inputValue.toStringAsFixed(2),
style: TextStyle(fontSize: 35.0), style: TextStyle(fontSize: 35.0),
), ),
Padding( Padding(
padding: EdgeInsets.only(left: 4.0, top: 10.0), padding:
EdgeInsets.only(left: 4.0, top: 10.0),
child: Text( child: Text(
unit.toString(), unit.toString(),
style: TextStyle( style: TextStyle(
@ -262,15 +293,15 @@ class _BloodSugarState extends State<BloodSugar> {
), ),
), ),
), ),
SizedBox( ],
height: 30.0,
), ),
Flexible( ),
child: Container( ),
height: 50.0, Container(
width: 150.0, margin: EdgeInsets.symmetric(horizontal: 16),
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).calculate, label: TranslationBase.of(context).calculate,
color: Color(0XFF515A5D),
onTap: () { onTap: () {
setState(() { setState(() {
_visible == false _visible == false
@ -281,12 +312,9 @@ class _BloodSugarState extends State<BloodSugar> {
}, },
), ),
), ),
),
], ],
), ),
), ),
),
),
); );
} }
} }

@ -544,7 +544,7 @@ class _BookConfirmState extends State<BookConfirm> {
navigateToBookSuccess(context, docObject, widget.patientShareResponse); navigateToBookSuccess(context, docObject, widget.patientShareResponse);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); // AppToast.showErrorToast(message: err);
navigateToHome(context); navigateToHome(context);
print(err); 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/DoctorProfile.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.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/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.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/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_material_pickers/flutter_material_pickers.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'BookConfirm.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( Container(
margin: EdgeInsets.only(top: 10.0),
child: Divider( child: Divider(
color: Colors.grey[500], 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() { getDoctorRatings() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); 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) { void showRatingDialog(List<DoctorRateDetails> doctorDetailsList) {
showGeneralDialog( showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5), barrierColor: Colors.black.withOpacity(0.5),
@ -566,4 +612,6 @@ class _DoctorProfileState extends State<DoctorProfile>
selectedDate: DocAvailableAppointments.selectedDate, selectedDate: DocAvailableAppointments.selectedDate,
selectedTime: DocAvailableAppointments.selectedTime))); 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/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.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/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.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/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -14,6 +16,9 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'LiveCareBookAppointment.dart';
class SearchByClinic extends StatefulWidget { class SearchByClinic extends StatefulWidget {
final List clnicIds; final List clnicIds;
@ -36,6 +41,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
bool isLoaded = false; bool isLoaded = false;
bool isProjectLoaded = false; bool isProjectLoaded = false;
ListClinicCentralized selectedClinic;
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
@ -112,12 +122,30 @@ class _SearchByClinicState extends State<SearchByClinic> {
value: dropdownValue, value: dropdownValue,
items: clinicsList.map((item) { items: clinicsList.map((item) {
return new DropdownMenuItem<String>( return new DropdownMenuItem<String>(
value: item.clinicID.toString(), value: item.clinicID.toString() +
child: new Text(item.clinicDescription), "-" +
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(), }).toList(),
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
print(newValue);
dropdownValue = newValue; dropdownValue = newValue;
if (!isDentalSelectedAndSupported() && !nearestAppo) { if (!isDentalSelectedAndSupported() && !nearestAppo) {
projectDropdownValue = ""; projectDropdownValue = "";
@ -224,6 +252,17 @@ class _SearchByClinicState extends State<SearchByClinic> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
navigateToDentalComplaints(context, searchInfo); navigateToDentalComplaints(context, searchInfo);
} else if (dropdownValue.split("-")[1] == "true"
// &&
// authProvider.isLogin &&
// authUser.patientType == 1
) {
Navigator.push(
context,
FadePage(
page: LiveCareBookAppointment(),
),
);
} else { } else {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
List<String> arr = []; List<String> arr = [];
@ -236,7 +275,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.getDoctorsList( .getDoctorsList(
int.parse(dropdownValue), int.parse(dropdownValue.split("-")[0]),
projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0,
nearestAppo, nearestAppo,
context) 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 { class DoctorView extends StatelessWidget {
final DoctorList doctor; final DoctorList doctor;
bool isLiveCareAppointment; bool isLiveCareAppointment;
bool isShowFlag;
DoctorView({@required this.doctor, @required this.isLiveCareAppointment}); DoctorView({@required this.doctor, @required this.isLiveCareAppointment, this.isShowFlag = true});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return InkWell( return InkWell(
onTap: () { onTap: () {
if(isShowFlag)
getDoctorsProfile(context, doctor); getDoctorsProfile(context, doctor);
}, },
child: Card( child: Card(
@ -113,10 +115,10 @@ class DoctorView extends StatelessWidget {
filledIcon: Icons.star, filledIcon: Icons.star,
emptyIcon: Icons.star, emptyIcon: Icons.star,
), ),
Container( isShowFlag ? Container(
child: Image.network(this.doctor.nationalityFlagURL, child: Image.network(this.doctor.nationalityFlagURL,
width: 25.0, height: 25.0), width: 25.0, height: 25.0),
), ) : Container(),
], ],
), ),
], ],

@ -31,7 +31,7 @@ class _SummaryState extends State<Summary> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts(TranslationBase.of(context).RRTSummary), Texts(TranslationBase.of(context).rrtSummary),
SizedBox(height: 5,), SizedBox(height: 5,),
Container( Container(
width: double.infinity, width: double.infinity,

@ -117,7 +117,7 @@ class _ErOptionsState extends State<ErOptions> {
locked: rrtLocked, locked: rrtLocked,
image: 'assets/images/new-design/AM.PNG', image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).rrtService, text: TranslationBase.of(context).rrtService,
subText: TranslationBase.of(context).RapidResponseTeam, subText: TranslationBase.of(context).rapidResponseTeam,
onTap:(){ onTap:(){
Navigator.push( Navigator.push(
context, context,

@ -0,0 +1,49 @@
import 'package:diplomaticquarterapp/pages/conference/clipped_video.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 RRTAgreementPage extends StatelessWidget{
TranslationBase localize;
@override
Widget build(BuildContext context) {
localize = TranslationBase.of(context);
return AppScaffold(
appBarTitle: localize.userAgreement,
isShowAppBar: true,
showHomeAppBarIcon: false,
body: SingleChildScrollView(
padding: EdgeInsets.all(20),
child: Column(
children: [
Text(localize.rrtUserAgreementTitle, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500, fontSize: 22), maxLines: 100, textAlign: TextAlign.center),
SizedBox(height: 20),
text(localize.rrtUserAgreementP1),
text(localize.rrtUserAgreementP2),
text(localize.rrtUserAgreementP3)
],
),
)
);
}
Widget text(String string)=> Padding(
padding: const EdgeInsets.symmetric(vertical: 15),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
clipBehavior: Clip.hardEdge,
width: 10, height: 10,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), color: Colors.black)
),
SizedBox(width: 20),
Expanded(child: Text(string, style: TextStyle(color: Colors.black87, fontSize: 18), maxLines: 100, textAlign: TextAlign.justify)),
],
),
);
}

@ -1,94 +1,54 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-order-list-item.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class RRTLogPage extends StatefulWidget{ class RRTLogPage extends StatefulWidget{
final List<PrescriptionsOrder> orders;
const RRTLogPage({this.orders});
@override @override
State<StatefulWidget> createState() => RRTLogPageState(); State<StatefulWidget> createState() => RRTLogPageState();
} }
class RRTLogPageState extends State<RRTLogPage>{ class RRTLogPageState extends State<RRTLogPage>{
RRTViewModel viewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<RRTViewModel>(
onModelReady: (viewModel){
}, return BaseView<RRTViewModel>(
builder: (ctx, vm, widget){ onModelReady: (vm) => viewModel = vm,
builder: (ctx, vm, widgetState){
return ListView.builder( return ListView.builder(
itemCount: 10, itemCount: widget.orders.length,
itemBuilder: (ctx, idx) => RRTLogListItem() itemBuilder: (ctx, idx) {
); var order = widget.orders[idx];
return RRTLogListItem(order, onCancel: deleteOrder);
} }
); );
} }
}
// ------------------------
// List Item Widget
// ------------------------
final _item_content_seperator = Container(height: 0.25, padding: EdgeInsets.all(10), color: Colors.grey.withOpacity(0.5));
class RRTLogListItem extends StatelessWidget{
BuildContext _context;
@override
Widget build(BuildContext context) {
_context = context;
return Container(
padding: EdgeInsets.all(15), margin: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [BoxShadow(color: Colors.grey.withOpacity(0.25), spreadRadius: 1, blurRadius: 3)]
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_contentItem(label: "Request ID", value: "2318"),
_item_content_seperator,
_contentItem(label: "Status", value: "2318"),
_item_content_seperator,
_contentItem(label: "Pickup Date", value: "2318"),
_item_content_seperator,
_contentItem(label: "Location", value: "2318"),
_item_content_seperator,
SizedBox(height: 10),
FractionallySizedBox(child: cancelButton())
],
),
); );
} }
Widget _contentItem({@required String label, String value}){ deleteOrder(PrescriptionsOrder order) async {
return Container( GifLoaderDialogUtils.showMyDialog(context);
padding: EdgeInsets.symmetric(vertical: 10), var success = await viewModel.cancelOrder(order);
child: Column( GifLoaderDialogUtils.hideDialog(context);
crossAxisAlignment: CrossAxisAlignment.start, if(success)
children: [ setState(() {
Text(label, style: TextStyle(color: Theme.of(_context).appBarTheme.color, fontSize: 9, letterSpacing: 1),), widget.orders.remove(order);
SizedBox(height: 5,), });
Text(value, style: TextStyle(color: Theme.of(_context).appBarTheme.color,fontWeight: FontWeight.bold, fontSize: 14),),
],
),
);
} }
Widget cancelButton() => MaterialButton(
height: 45,
color: Color(0xFFc5272d),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
onPressed: () { },
child: Text("CANCEL", style: TextStyle(color: Colors.white, fontSize: 13),),
);
} }

@ -1,6 +1,9 @@
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -16,27 +19,55 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProvider
TabController tabController; TabController tabController;
PageController pageController = PageController(initialPage: 0, keepPage: true); PageController pageController = PageController(initialPage: 0, keepPage: true);
RRTViewModel viewModel;
bool loadingData;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
tabController = TabController(length: 2, vsync: this); tabController = TabController(length: 2, vsync: this);
} }
TranslationBase localize;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
localize = TranslationBase.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: 'Rapid Response Team', appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true, isShowAppBar: true,
body: Column( body: BaseView<RRTViewModel>(
onModelReady: (vm) async {
viewModel = vm;
loadingData = true;
await vm.loadRequiredData().then((value){
}).whenComplete(() => setState(() => loadingData = false));
},
builder: (ctx, vm, widget) => content(),
)
);
}
Widget content(){
if(loadingData == true){
return Center(child: CircularProgressIndicator());
// else if(viewModel.state == ViewState.Error)
}else if(viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null){
return Column(
children: [ children: [
tabBar(), tabBar(),
Expanded( Expanded(
child: contentPager() child: contentPager()
) )
], ],
),
); );
}else{
return Container(
alignment: Alignment.center,
child: Text(localize.somethingWentWrongTryLater, style: TextStyle(color: Colors.red), maxLines: 5,),
);
}
} }
Widget tabBar() => Container( Widget tabBar() => Container(
@ -52,10 +83,10 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProvider
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
tabs: [ tabs: [
Tab( Tab(
child: Text("Rapid Response Team", style: TextStyle(color: Theme.of(context).appBarTheme.color),), child: Text(localize.rapidResponseTeam, style: TextStyle(color: Theme.of(context).appBarTheme.color),),
), ),
Tab( Tab(
child: Text("Order Log", style: TextStyle(color: Theme.of(context).appBarTheme.color),), child: Text(localize.orderLog, style: TextStyle(color: Theme.of(context).appBarTheme.color),),
), ),
] ]
), ),
@ -65,8 +96,8 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProvider
onPageChanged: onPageChanged, onPageChanged: onPageChanged,
controller: pageController, controller: pageController,
children: [ children: [
RRTRequestPage(), RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders),
RRTLogPage(), RRTLogPage(orders: viewModel.rrtServiceData.completedOrders),
], ],
); );

@ -0,0 +1,71 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
final _item_content_seperator = Container(height: 0.25, padding: EdgeInsets.all(10), color: Colors.grey.withOpacity(0.5));
class RRTLogListItem extends StatelessWidget{
final PrescriptionsOrder order;
final Function(PrescriptionsOrder) onCancel;
RRTLogListItem(this.order, {this.onCancel});
BuildContext _context;
TranslationBase localize;
@override
Widget build(BuildContext context) {
_context = context;
localize = TranslationBase.of(context);
return Container(
padding: EdgeInsets.all(15), margin: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [BoxShadow(color: Colors.grey.withOpacity(0.25), spreadRadius: 1, blurRadius: 3)]
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_contentItem(label: localize.reqId, value: order.iD.toString()),
_item_content_seperator,
_contentItem(label: localize.status, value: order.getStatusName(localize)),
_item_content_seperator,
_contentItem(label: localize.pickupDate, value: order.getFormattedDateTime()),
_item_content_seperator,
_contentItem(label: localize.location, value: order.getNearestProjectDescription()),
_item_content_seperator,
SizedBox(height: 10),
if(onCancel != null)
FractionallySizedBox(child: cancelButton())
],
),
);
}
Widget _contentItem({@required String label, String value}){
return Container(
padding: EdgeInsets.symmetric(vertical: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(label, style: TextStyle(color: Theme.of(_context).appBarTheme.color, fontSize: 9, letterSpacing: 1),),
SizedBox(height: 5,),
Text(value, style: TextStyle(color: Theme.of(_context).appBarTheme.color,fontWeight: FontWeight.bold, fontSize: 14),),
],
),
);
}
Widget cancelButton() => MaterialButton(
height: 45,
color: Color(0xFFc5272d),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
onPressed: () => onCancel(order),
child: Text(localize.cancel, style: TextStyle(color: Colors.white, fontSize: 13),),
);
}

@ -1,52 +1,137 @@
import 'dart:async'; import 'dart:async';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/rrt/service_price.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/RadioStringDialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_material_pickers/flutter_material_pickers.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
import 'rrt-place-order.dart';
class RRTRequestPickupAddressPage extends StatefulWidget{ class RRTRequestPickupAddressPage extends StatefulWidget{
final ServicePrice servicePrice;
RRTRequestPickupAddressPage({@required this.servicePrice});
@override @override
State<StatefulWidget> createState() => RRTRequestPickupAddressPageState(); State<StatefulWidget> createState() => RRTRequestPickupAddressPageState();
} }
class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage>{ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage> with SingleTickerProviderStateMixin{
bool acceptTerms = false; bool acceptTerms = false;
Completer<GoogleMapController> mapController = Completer();
static final CameraPosition mapCamera = CameraPosition( bool mapIdle = true;
target: LatLng(37.42796133580664, -122.085749655962), Completer<GoogleMapController> mapController = Completer();
CameraPosition mapCameraPosition = CameraPosition(
target: LatLng(24.7114693, 46.67469582),
zoom: 14.4746, zoom: 14.4746,
); );
List<Addresses> myAddresses = [];
Addresses selectedAddress;
StreamController<int> addressStreamController = StreamController();
Stream<int> addressStream;
StreamController<int> addressLoadingStreamController = StreamController();
Stream<int> addressLoadingStream;
@override
void initState(){
super.initState();
goToCurrentLocation();
addressStream = addressStreamController.stream;
addressLoadingStream = addressLoadingStreamController.stream;
}
void loadAddresses() async{
// GifLoaderDialogUtils.showMyDialog(context);
myAddresses = await viewModel.getAddresses();
// GifLoaderDialogUtils.hideDialog(context);
if(myAddresses.isNotEmpty)
setState(() {});
}
TranslationBase localize;
RRTViewModel viewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<RRTViewModel>( localize = TranslationBase.of(context);
onModelReady: (viewModel){ ProjectViewModel projectViewModel = Provider.of(context);
addressStreamController.sink.add(0);
return BaseView<RRTViewModel>(
onModelReady: (vm){
viewModel = vm;
loadAddresses();
}, },
builder: (ctx, vm, widget) => AppScaffold( builder: (ctx, vm, widget) => AppScaffold(
appBarTitle: TranslationBase.of(context).pickupLocation, appBarTitle: localize.pickupLocation,
isShowAppBar: true, isShowAppBar: true,
body: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
selectAddress(), StreamBuilder<Object>(
stream: addressStream,
builder: (context, snapshot) {
return selectAddressField();
}
),
StreamBuilder<Object>(
stream: addressLoadingStream,
builder: (context, snapshot) {
return snapshot.hasData ? LinearProgressIndicator(backgroundColor: Colors.transparent) : Container(height: 4,);
}
),
Expanded( Expanded(
child: GoogleMap( child:
mapType: MapType.normal, PlacePicker(
initialCameraPosition: mapCamera, apiKey: GOOGLE_API_KEY,
onCameraIdle: (){ enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
searchForInitialValue: false,
selectedPlaceWidgetBuilder: (_, selectedPlace, state, isSearchBarFocused) {
if(state == SearchingState.Idle){
addressLoadingStreamController.sink.add(null);
if(selectedPlace != null){
var loc = selectedPlace.geometry.location;
var address1 = selectedPlace.addressComponents.first.longName;
var address2 = "";
if(selectedPlace.addressComponents.length > 1)
address2 = selectedPlace.addressComponents[1].longName;
selectedAddress = Addresses(latLong: '${loc.lat},${loc.lng}', address1: address1, address2: address2);
addressStreamController.sink.add(0);
}
}else{
addressLoadingStreamController.sink.add(0);
}
return Container();
}, },
onMapCreated: (controller){ initialPosition: LatLng(24.7114693, 46.67469582),
mapController.complete(controller); useCurrentLocation: false,
}, ),
)
), ),
continueButton() continueButton()
], ],
@ -55,24 +140,41 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
); );
} }
Widget selectAddress(){ Widget centerTargetPoint(){
double size = mapIdle ? 20 : 30;
double margin = mapIdle ? 3 : 10;
return Center(
child: Container(
width: size, height: size,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20), border: Border.all(width: 2, color: Theme.of(context).appBarTheme.color)
),
child: Container(
margin: EdgeInsets.all(margin),
decoration: BoxDecoration(
color: Theme.of(context).appBarTheme.color,
borderRadius: BorderRadius.circular(20))
),
),
);
}
Widget selectAddressField(){
var text = selectedAddress == null ? localize.selectAddress : selectedAddress.toString();
return Container( return Container(
margin: EdgeInsets.all(15), margin: EdgeInsets.all(10),
child: Expanded(
child: MaterialButton(
height: 50, height: 50,
color: Colors.white, child: MaterialButton(
height: 50, color: Colors.white,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
onPressed: () { }, onPressed: openAddressSelectDialog,
child: Row( child: Row(
children: [ children: [
Text(TranslationBase.of(context).selectAddress, style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1),), Expanded(child: Text(text, style: TextStyle(color: Colors.grey, fontSize: 13, letterSpacing: 1))),
Spacer(), Icon(Icons.keyboard_arrow_down, size: 20, color: Colors.grey,)
Icon(Icons.keyboard_arrow_down, size: 15, color: Colors.grey,)
], ],
), ),
), ),
),
); );
} }
@ -83,10 +185,68 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
height: 50, height: 50,
color: Theme.of(context).appBarTheme.color, color: Theme.of(context).appBarTheme.color,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
onPressed: () { }, onPressed: () =>
child: Text(TranslationBase.of(context).continues, style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1),), Navigator.push(
context,
FadePage(page: RRTPlaceOrderPage(selectedAddress: selectedAddress, servicePrice: widget.servicePrice,))
),
child: Text(localize.continues, style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1),),
), ),
); );
} }
openAddressSelectDialog(){
showMaterialResponsiveDialog(
hideButtons: true,
context: context,
title: localize.selectAddress,
child: ListView.separated(
shrinkWrap: true,
padding: EdgeInsets.all(10),
itemCount: myAddresses.length,
itemBuilder: (ctx,idx) {
var itm = myAddresses[idx];
return ListTile(
title: Text(itm.toString()),
onTap: (){
setState(() {
selectedAddress = itm;
Navigator.pop(context);
if(itm.latLong != null && itm.latLong.isNotEmpty && itm.latLong.split(',').length > 1){
var cordinates = itm.latLong.split(',');
var latlng = LatLng(double.parse(cordinates.first), double.parse(cordinates.last));
moveToLocation(latlng);
}else{
AppToast.showErrorToast(message: 'Invalid address coordinates');
}
});
},
);
},
separatorBuilder: (ctx,idx) => Container(height: 0.25, color: Colors.grey.withOpacity(0.7),)
)
);
}
moveToLocation(LatLng location, {bool animate = true}) async{
await Future.delayed(Duration(milliseconds: 200));
mapCameraPosition = CameraPosition(target: location, zoom: 16.4746,);
if(animate)
(await mapController.future).animateCamera(CameraUpdate.newCameraPosition(mapCameraPosition),);
else
(await mapController.future).moveCamera(CameraUpdate.newCameraPosition(mapCameraPosition),);
}
goToCurrentLocation() async{
var location = await Geolocator.getLastKnownPosition();
if(location == null){
Geolocator.getCurrentPosition().then((value){
moveToLocation(LatLng(value.latitude, value.longitude));
});
return;
}
moveToLocation(LatLng(location.latitude, location.longitude), animate: false);
}
} }

@ -0,0 +1,195 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/models/rrt/service_price.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_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:google_maps_flutter/google_maps_flutter.dart';
class RRTPlaceOrderPage extends StatelessWidget{
TranslationBase localize;
RRTViewModel viewModel;
Addresses selectedAddress;
final ServicePrice servicePrice;
RRTPlaceOrderPage({@required this.selectedAddress, @required this.servicePrice});
TextEditingController noteController = TextEditingController(text: '');
BuildContext _context;
@override
Widget build(BuildContext context) {
_context = context;
localize = TranslationBase.of(context);
var lat = selectedAddress.latLong.split(',').first;
var lng = selectedAddress.latLong.split(',').last;
return BaseView<RRTViewModel>(
onModelReady: (vm) => viewModel = vm,
builder: (ctx,vm,wState){
return AppScaffold(
appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true,
body: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(
child: SingleChildScrollView(
padding: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(localize.selectedLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),),
selectedAddressField(),
AspectRatio(
aspectRatio: 3/1,
child: ClipRRect(
clipBehavior: Clip.hardEdge,
borderRadius: BorderRadius.circular(10),
child: Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=$lat,$lng &zoom=16&size=800x400&maptype=roadmap&markers=color:red%7C$lat,$lng&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8",
fit: BoxFit.cover,
),
),
),
SizedBox(height: 10,),
Container(
height: 70,
margin: EdgeInsets.symmetric(vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(10),
boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2,2), color: Colors.grey.withOpacity(0.25))]
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(localize.totalAmountPayable, style: TextStyle(fontSize: 13),),
SizedBox(height: 5,),
Text("${servicePrice.totalPrice ?? '- - -'} ${localize.sar}" , style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),),
],
),
),
Container(
height: 70,
margin: EdgeInsets.symmetric(vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 0, vertical: 10),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(10),
boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2,2), color: Colors.grey.withOpacity(0.25))]
),
child: TextField(
controller: noteController,
style: TextStyle(fontSize: 18.0),
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
labelText: localize.notes,
contentPadding: const EdgeInsets.only(left: 14.0, bottom: 8.0, top: 8.0),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white),
borderRadius: BorderRadius.circular(10),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white),
borderRadius: BorderRadius.circular(10),
),
)
),
),
],
),
),
),
submitButton(context)
],
)
);
},
);
}
Widget selectedAddressField(){
var address = "${selectedAddress.address1 ?? ''} ${selectedAddress.address2 ?? ''}";
return Container(
margin: EdgeInsets.symmetric(vertical: 10),
child: Expanded(
child: MaterialButton(
height: 50, color: Colors.white,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
onPressed: (){},
child: Row(
children: [
Expanded(child: Text(address, style: TextStyle(color: Colors.black87, fontSize: 15, letterSpacing: 1))),
Icon(Icons.location_on_rounded, size: 30, color: Colors.black,)
],
),
),
),
);
}
Widget submitButton(BuildContext context){
return Padding(
padding: const EdgeInsets.all(15),
child: MaterialButton(
height: 50,
color: Theme.of(context).appBarTheme.color,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
onPressed: () => placeOrder(),
child: Text(localize.submit, style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1),),
),
);
}
placeOrder() async{
if(selectedAddress != null && selectedAddress.latLong != null && selectedAddress.latLong.isNotEmpty && selectedAddress.latLong.split(',').length > 1){
GifLoaderDialogUtils.showMyDialog(_context);
Map<String, dynamic> params = {};
var cordinates = selectedAddress.latLong.split(',');
var latlng = LatLng(double.parse(cordinates.first), double.parse(cordinates.last));
params['Latitude'] = latlng.latitude;
params['Longitude'] = latlng.longitude;
params['Notes'] = noteController.text;
var requestId = await viewModel.createOrder(params);
GifLoaderDialogUtils.hideDialog(_context);
if(requestId != null){
AlertDialogBox(
context: _context,
title: '',
confirmMessage: localize.rrtOrderSuccessMessage,
okText: localize.ok,
okFunction: (){
AlertDialogBox.closeAlertDialog(_context);
gotoRRTRoot();
}
).showAlertDialog(_context);
}
}else{
AppToast.showErrorToast(message: 'Invalid location selected');
}
}
gotoRRTRoot(){
Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: ErOptions));
}
}

@ -1,6 +1,13 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/rrt/service_price.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-agreement-page.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-order-list-item.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -8,6 +15,11 @@ import 'package:flutter/material.dart';
class RRTRequestPage extends StatefulWidget{ class RRTRequestPage extends StatefulWidget{
final List<PrescriptionsOrder> pendingOrders;
final ServicePrice servicePrice;
RRTRequestPage({this.pendingOrders, this.servicePrice});
@override @override
State<StatefulWidget> createState() => RRTRequestPageState(); State<StatefulWidget> createState() => RRTRequestPageState();
@ -15,13 +27,30 @@ class RRTRequestPage extends StatefulWidget{
class RRTRequestPageState extends State<RRTRequestPage>{ class RRTRequestPageState extends State<RRTRequestPage>{
bool acceptTerms = false; bool acceptTerms = false;
TranslationBase localize;
RRTViewModel viewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
localize = TranslationBase.of(context);
return BaseView<RRTViewModel>( return BaseView<RRTViewModel>(
onModelReady: (viewModel){ onModelReady: (vm){
viewModel = vm;
},
builder: (ctx, vm, widgetState){
if(widget.pendingOrders.isNotEmpty)
return currentOrderContent();
else
return requestContent();
}, },
builder: (ctx, vm, widget) => Column( );
}
Widget requestContent(){
return Column(
children: [ children: [
Expanded( Expanded(
child: ListView( child: ListView(
@ -38,7 +67,7 @@ class RRTRequestPageState extends State<RRTRequestPage>{
Container( Container(
padding: EdgeInsets.only(top: 20, bottom: 5), padding: EdgeInsets.only(top: 20, bottom: 5),
alignment: Alignment.center, alignment: Alignment.center,
child: Text(TranslationBase.of(context).YouCanPayByTheFollowingOptions, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color, fontWeight: FontWeight.w500), maxLines: 2) child: Text(localize.youCanPayByTheFollowingOptions, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color, fontWeight: FontWeight.w500), maxLines: 2)
), ),
paymentOptions(), paymentOptions(),
@ -48,7 +77,17 @@ class RRTRequestPageState extends State<RRTRequestPage>{
actionButtons() actionButtons()
], ],
) );
}
Widget currentOrderContent(){
var orders = widget.pendingOrders;
return ListView.builder(
itemCount: orders.length,
itemBuilder: (ctx, idx) {
var order = orders[idx];
return RRTLogListItem(order, onCancel: deleteOrder);
}
); );
} }
@ -56,7 +95,7 @@ class RRTRequestPageState extends State<RRTRequestPage>{
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(horizontal: 10),
child: Text( child: Text(
TranslationBase.of(context).RRTDDetails, localize.rrtDDetails,
textAlign: TextAlign.justify, textAlign: TextAlign.justify,
style: TextStyle(color: Theme.of(context).appBarTheme.color, fontSize: 15, height: 1.5, fontWeight: FontWeight.w300), style: TextStyle(color: Theme.of(context).appBarTheme.color, fontSize: 15, height: 1.5, fontWeight: FontWeight.w300),
), ),
@ -64,22 +103,25 @@ class RRTRequestPageState extends State<RRTRequestPage>{
Widget priceTable(BuildContext context){ Widget priceTable(BuildContext context){
var radius = Radius.circular(8); var radius = Radius.circular(8);
String amount = widget.servicePrice.price.toString();
String vat = widget.servicePrice.vat.toString();
String total = widget.servicePrice.totalPrice.toString();
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
Container( Container(
height: 30, height: 30,
decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)), decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)),
child: Center(child: Text(TranslationBase.of(context).ApproximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))), child: Center(child: Text(localize.approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))),
), ),
pricingRow(label: TranslationBase.of(context).AmountBeforeTax, value: '500 SAR'), pricingRow(label: localize.amountBeforeTax, value: '$amount ${localize.sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color), Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
pricingRow(label: TranslationBase.of(context).TaxAmount, value: '50 SAR'), pricingRow(label: localize.taxAmount, value: '$vat ${localize.sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color), Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
pricingRow(label: TranslationBase.of(context).TotalAmountPayable, value: '550 SAR', labelBold: true), pricingRow(label: localize.totalAmountPayable, value: '$total ${localize.sar}', labelBold: true),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color), Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
], ],
); );
@ -115,15 +157,18 @@ class RRTRequestPageState extends State<RRTRequestPage>{
}), }),
SizedBox(width: 10), SizedBox(width: 10),
Expanded( Expanded(
child: Text(TranslationBase.of(context).iAcceptTermsConditions, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color), maxLines: 2) child: Text(localize.iAcceptTermsConditions, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color), maxLines: 2)
), ),
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
width: MediaQuery.of(context).size.width * 0.25, width: MediaQuery.of(context).size.width * 0.25,
child: TextButton( child: TextButton(
child: Text(TranslationBase.of(context).clickHere, style: TextStyle(fontSize: 12, color: Colors.blue, fontWeight: FontWeight.w400)), child: Text(localize.clickHere, style: TextStyle(fontSize: 12, color: Colors.blue, fontWeight: FontWeight.w400)),
onPressed: (){ onPressed: (){
Navigator.push(
context,
FadePage(
page: RRTAgreementPage()));
} }
), ),
) )
@ -149,7 +194,7 @@ class RRTRequestPageState extends State<RRTRequestPage>{
color: Theme.of(context).appBarTheme.color, color: Theme.of(context).appBarTheme.color,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
onPressed: () { }, onPressed: () { },
child: Text(TranslationBase.of(context).cancel, style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1),), child: Text(localize.cancel, style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1),),
), ),
), ),
@ -159,13 +204,13 @@ class RRTRequestPageState extends State<RRTRequestPage>{
height: 50, height: 50,
color: Theme.of(context).appBarTheme.color, color: Theme.of(context).appBarTheme.color,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
child: Text(TranslationBase.of(context).ok, style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1),), child: Text(localize.ok, style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1),),
onPressed: () { onPressed: () {
Navigator.push( if(acceptTerms)
context, goToPickupAddress();
FadePage( else
page: RRTRequestPickupAddressPage())); AppToast.showErrorToast(message: localize.pleaseAcceptTerms);
}, }
), ),
) )
], ],
@ -173,4 +218,22 @@ class RRTRequestPageState extends State<RRTRequestPage>{
); );
} }
goToPickupAddress()async{
Navigator.push(
context,
FadePage(page: RRTRequestPickupAddressPage(servicePrice: widget.servicePrice,))
);
}
deleteOrder(PrescriptionsOrder order) async {
GifLoaderDialogUtils.showMyDialog(context);
var success = await viewModel.cancelOrder(order);
GifLoaderDialogUtils.hideDialog(context);
if(success)
setState(() {
widget.pendingOrders.remove(order);
});
}
} }

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart'; import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
@ -112,7 +113,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
e.title, e.title,
color: Color(0xffB8382C), color: Color(0xffB8382C),
variant: "overline", variant: "overline",
fontSize: SizeConfig.textMultiplier * 2.1, fontSize: SizeConfig.textMultiplier * 1.8,
), ),
), ),
Container( Container(
@ -122,7 +123,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
e.subtitle, e.subtitle,
color: Colors.black, color: Colors.black,
variant: "overline", variant: "overline",
fontSize: SizeConfig.textMultiplier * 1.9, fontSize: SizeConfig.textMultiplier * 1.6,
), ),
), ),
], ],
@ -685,7 +686,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
navigateToInsertComplaint() { navigateToInsertComplaint() {
Navigator.push(context, FadePage(page: FeedbackHomePage())); Navigator.push(context, FadePage(page: FeedbackHomePage(messageType: MessageType.ComplaintOnAnAppointment,appointment: widget.appo,)));
} }
rateAppointment() { rateAppointment() {

@ -5,7 +5,7 @@ class AppointmentHistory {
int projectID; int projectID;
int appointmentNo; int appointmentNo;
DateTime appointmentDate; DateTime appointmentDate;
Null appointmentDateN; dynamic appointmentDateN;
int appointmentType; int appointmentType;
String bookDate; String bookDate;
int patientType; int patientType;
@ -26,14 +26,14 @@ class AppointmentHistory {
String confirmedOn; String confirmedOn;
int arrivalChangedBy; int arrivalChangedBy;
DateTime arrivedOn; DateTime arrivedOn;
Null editedBy; dynamic editedBy;
Null editedOn; dynamic editedOn;
Null doctorName; dynamic doctorName;
Null doctorNameN; dynamic doctorNameN;
String statusDesc; String statusDesc;
Null statusDescN; dynamic statusDescN;
bool vitalStatus; bool vitalStatus;
Null vitalSignAppointmentNo; dynamic vitalSignAppointmentNo;
int episodeID; int episodeID;
int actualDoctorRate; int actualDoctorRate;
String clinicName; String clinicName;
@ -55,8 +55,8 @@ class AppointmentHistory {
bool isMedicalReportRequested; bool isMedicalReportRequested;
bool isOnlineCheckedIN; bool isOnlineCheckedIN;
String latitude; String latitude;
Null listHISGetContactLensPerscription; dynamic listHISGetContactLensPerscription;
Null listHISGetGlassPerscription; dynamic listHISGetGlassPerscription;
String longitude; String longitude;
int nextAction; int nextAction;
int noOfPatientsRate; int noOfPatientsRate;

@ -1,5 +1,7 @@
import 'dart:ui'; import 'dart:ui';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -10,6 +12,10 @@ import 'package:flutter/material.dart';
import 'status_feedback_page.dart'; import 'status_feedback_page.dart';
class FeedbackHomePage extends StatefulWidget { class FeedbackHomePage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment;
final MessageType messageType;
const FeedbackHomePage({Key key, this.appointment, this.messageType= MessageType.NON}) : super(key: key);
@override @override
_FeedbackHomePageState createState() => _FeedbackHomePageState(); _FeedbackHomePageState createState() => _FeedbackHomePageState();
} }
@ -106,7 +112,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
child: TabBarView( child: TabBarView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[SendFeedbackPage(), StatusFeedbackPage()], children: <Widget>[SendFeedbackPage(appointment: widget.appointment,messageType: widget.messageType,), StatusFeedbackPage()],
), ),
) )
], ],

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -20,6 +22,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_recognition_error.dart';
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
@ -27,6 +30,10 @@ import 'appointment_history.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt; import 'package:speech_to_text/speech_to_text.dart' as stt;
class SendFeedbackPage extends StatefulWidget { class SendFeedbackPage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment;
final MessageType messageType;
const SendFeedbackPage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key);
@override @override
_SendFeedbackPageState createState() => _SendFeedbackPageState(); _SendFeedbackPageState createState() => _SendFeedbackPageState();
} }
@ -36,7 +43,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
TextEditingController messageController = TextEditingController(); TextEditingController messageController = TextEditingController();
List<String> images = []; List<String> images = [];
String title; String title;
AppointmentHistory appointHistory; AppoitmentAllHistoryResultList appointHistory;
bool isShowListAppointHistory = true; bool isShowListAppointHistory = true;
String message; String message;
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
@ -73,11 +80,23 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
setMessageType(MessageType messageType) { setMessageType(MessageType messageType) {
setState(() { setState(() {
this.messageType = messageType; this.messageType = messageType;
this.appointHistory = widget.appointment;
}); });
} }
@override
void initState() {
setState(() {
this.messageType = widget.messageType;
this.appointHistory = widget.appointment;
});
requestPermissions();
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<FeedbackViewModel>( return BaseView<FeedbackViewModel>(
allowAny: true, allowAny: true,
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
@ -143,9 +162,54 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
}, },
child: Container( child: Container(
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Container(
width: projectViewModel.isArabic ? 27 : 20,
height: projectViewModel.isArabic ? 105 : 90,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: appointHistory.isLiveCareAppointment
? Color(0xff404545)
: !appointHistory.isInOutPatient
? Colors.red[900]
: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic
? Radius.circular(0)
: Radius.circular(8),
bottomLeft: projectViewModel.isArabic
? Radius.circular(0)
: Radius.circular(8),
topRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0),
bottomRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0),
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
appointHistory.isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !appointHistory.isInOutPatient
? TranslationBase.of(context)
.inPatient
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white,fontSize: 12),
),
)),
),
Expanded( Expanded(
flex: 4, flex: 4,
child: Column( child: Column(
@ -176,9 +240,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
), ),
Texts( Texts(
DateUtil DateUtil
.getMonthDayYearDateFormatted( .getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)),
appointHistory
.appointmentDate),
variant: 'caption3', variant: 'caption3',
), ),
StarRating( StarRating(
@ -272,10 +334,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
bold: true, bold: true,
), ),
Texts( Texts(
DateUtil.getMonthDayYearDateFormatted(model DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
.appointHistoryList[
index]
.appointmentDate),
variant: 'caption3', variant: 'caption3',
), ),
StarRating( StarRating(
@ -350,8 +409,6 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
controller: messageController, controller: messageController,
suffixIcon: Icons.mic, suffixIcon: Icons.mic,
onSuffixTap: () { onSuffixTap: () {
requestPermissions();
openSpeechReco(); openSpeechReco();
}, },
onChanged: (v) { onChanged: (v) {
@ -615,6 +672,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
@override @override
void initState() { void initState() {
messageTypeDialog = widget.messageTypeDialog; messageTypeDialog = widget.messageTypeDialog;
super.initState(); super.initState();
} }

@ -40,8 +40,7 @@ class HomePage extends StatefulWidget {
} }
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
PharmacyModuleViewModel pharmacyModuleViewModel = PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
locator<PharmacyModuleViewModel>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -67,9 +66,7 @@ class _HomePageState extends State<HomePage> {
height: 210, height: 210,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: ExactAssetImage( image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover),
'assets/images/dashboard_top_bg.png'),
fit: BoxFit.cover),
), ),
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
@ -78,8 +75,7 @@ class _HomePageState extends State<HomePage> {
left: 5, left: 5,
right: 5, right: 5,
child: Container( child: Container(
width: width: MediaQuery.of(context).size.width * 0.8,
MediaQuery.of(context).size.width * 0.8,
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -89,27 +85,32 @@ class _HomePageState extends State<HomePage> {
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage( image:
"assets/images/new-design/covid_bg_transparent.png"), AssetImage("assets/images/new-design/covid_bg_transparent.png"),
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
color: color: Colors.white.withOpacity(0.3),
Colors.white.withOpacity(0.3), borderRadius: BorderRadius.all(Radius.circular(5))),
borderRadius: BorderRadius.all( child: (model.user != null && model.user.outSA == 1)
Radius.circular(5))), ? Container(
child: Container( width: double.infinity,
height: double.infinity,
color: Colors.grey.shade500.withOpacity(0.3),
child: Icon(
Icons.lock_outline,
size: 40,
),
)
: Container(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).covidTest,
.covidTest,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceAround,
MainAxisAlignment
.spaceAround,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
@ -121,58 +122,39 @@ class _HomePageState extends State<HomePage> {
height: 45.0), height: 45.0),
), ),
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(top: 5.0),
top: 5.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Texts( Texts(
TranslationBase.of( TranslationBase.of(context).driveThru,
context) fontWeight: FontWeight.w700,
.driveThru,
fontWeight:
FontWeight.w700,
color: Colors.white, color: Colors.white,
), ),
ButtonTheme( ButtonTheme(
shape: shape: RoundedRectangleBorder(
RoundedRectangleBorder( borderRadius: BorderRadius.circular(5.0),
borderRadius: ),
BorderRadius minWidth: MediaQuery.of(context).size.width * 0.15,
.circular(
5.0),
),
minWidth: MediaQuery.of(
context)
.size
.width *
0.15,
height: 25.0, height: 25.0,
child: RaisedButton( child: RaisedButton(
color: Colors color: Colors.red[800],
.red[800], textColor: Colors.white,
textColor: disabledTextColor: Colors.white,
Colors.white, disabledColor: new Color(0xFFbcc2c4),
disabledTextColor: onPressed:
Colors.white, (model.user != null && model.user.outSA == 1)
disabledColor: ? () {}
new Color( : () {
0xFFbcc2c4),
onPressed: () {
navigateToCovidDriveThru(); navigateToCovidDriveThru();
}, },
child: Center( child: Center(
child: Center( child: Center(
child: Center( child: Center(
child: child: Center(
Center( child: Texts(
child: TranslationBase.of(context).bookNow,
Texts( fontWeight: FontWeight.w700,
TranslationBase.of(context) color: Colors.white,
.bookNow,
fontWeight:
FontWeight.w700,
color: Colors
.white,
), ),
), ),
), ),
@ -187,22 +169,18 @@ class _HomePageState extends State<HomePage> {
), ),
], ],
), ),
), )),
),
), ),
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () => Navigator.push(context, onTap: () => Navigator.push(context, FadePage(page: LiveCareHome())),
FadePage(page: LiveCareHome())),
child: Container( child: Container(
height: 125, height: 125,
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white color: Colors.white.withOpacity(0.3),
.withOpacity(0.3), borderRadius: BorderRadius.all(Radius.circular(5))),
borderRadius: BorderRadius.all(
Radius.circular(5))),
child: SvgPicture.asset( child: SvgPicture.asset(
projectViewModel.isArabic projectViewModel.isArabic
? 'assets/images/new-design/livecare_arabic_logo.svg' ? 'assets/images/new-design/livecare_arabic_logo.svg'
@ -218,23 +196,15 @@ class _HomePageState extends State<HomePage> {
], ],
), ),
), ),
Container( Container(width: double.infinity, height: projectViewModel.isArabic ? 110 : 80)
width: double.infinity,
height: projectViewModel.isArabic ? 110 : 80)
], ],
), ),
Positioned( Positioned(
top: 155, top: 155,
left: MediaQuery.of(context).size.width * left: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation == (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
Orientation.landscape
? 0.02
: 0.03),
right: MediaQuery.of(context).size.width * right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation == (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
Orientation.landscape
? 0.02
: 0.03),
child: (!model.isLogin) child: (!model.isLogin)
? Container( ? Container(
width: double.infinity, width: double.infinity,
@ -242,14 +212,10 @@ class _HomePageState extends State<HomePage> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#A59E9E'), color: HexColor('#A59E9E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(color: Colors.transparent, width: 0.5),
color: Colors.transparent, width: 0.5), borderRadius: BorderRadius.all(Radius.circular(9)),
borderRadius:
BorderRadius.all(Radius.circular(9)),
image: DecorationImage( image: DecorationImage(
image: ExactAssetImage( image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
'assets/images/bg_graphic.png'),
fit: BoxFit.cover)),
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Column( child: Column(
@ -265,37 +231,30 @@ class _HomePageState extends State<HomePage> {
fontSize: 23, fontSize: 23,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).myMedicalFileSubTitle,
.myMedicalFileSubTitle,
color: Colors.black, color: Colors.black,
fontSize: 16, fontSize: 16,
), ),
Align( Align(
alignment: projectViewModel.isArabic alignment:
? Alignment.bottomLeft projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
: Alignment.bottomRight,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
widget.goToMyProfile(); widget.goToMyProfile();
}, },
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 15, right: 15),
left: 15, right: 15),
width: 90, width: 90,
height: 30, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#D81A2E'), color: HexColor('#D81A2E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(color: Colors.transparent, width: 0.5),
color: Colors.transparent, borderRadius: BorderRadius.all(Radius.circular(0)),
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(0)),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
TranslationBase.of(context) TranslationBase.of(context).viewMore,
.viewMore,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 12, fontSize: 12,
@ -314,14 +273,10 @@ class _HomePageState extends State<HomePage> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#A59E9E'), color: HexColor('#A59E9E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(color: Colors.transparent, width: 0.5),
color: Colors.transparent, width: 0.5), borderRadius: BorderRadius.all(Radius.circular(9)),
borderRadius:
BorderRadius.all(Radius.circular(9)),
image: DecorationImage( image: DecorationImage(
image: ExactAssetImage( image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover),
'assets/images/bg_graphic.png'),
fit: BoxFit.cover),
), ),
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
@ -329,67 +284,42 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
if (projectViewModel.user != null && if (projectViewModel.user != null && model.isLogin)
model.isLogin)
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 8, height: 8,
), ),
model.user.cRSVerificationStatus == model.user.cRSVerificationStatus == 2
2
? Row( ? Row(
children: [ children: [
Texts( Texts(
model.user model.user.firstName + " " + model.user.lastName,
.firstName + color: Colors.grey[100],
" " +
model.user
.lastName,
color: Colors
.grey[100],
bold: true, bold: true,
fontSize: 15, fontSize: 15,
), ),
Container( Container(
margin: EdgeInsets margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
.fromLTRB(
8.0,
0.0,
8.0,
0.0),
child: SvgPicture.asset( child: SvgPicture.asset(
"assets/images/new-design/verification_check.svg"), "assets/images/new-design/verification_check.svg"),
), ),
], ],
) )
: model.user.cRSVerificationStatus == : model.user.cRSVerificationStatus == 3
3
? Row( ? Row(
children: [ children: [
Texts( Texts(
model.user model.user.firstName + " " + model.user.lastName,
.firstName + color: Colors.grey[100],
" " +
model.user
.lastName,
color: Colors
.grey[100],
bold: true, bold: true,
fontSize: 15, fontSize: 15,
), ),
Container( Container(
margin: EdgeInsets margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
.fromLTRB( child: SvgPicture.asset(
8.0,
0.0,
8.0,
0.0),
child: SvgPicture
.asset(
"assets/images/new-design/pending.svg"), "assets/images/new-design/pending.svg"),
), ),
], ],
@ -397,13 +327,8 @@ class _HomePageState extends State<HomePage> {
: Row( : Row(
children: [ children: [
Texts( Texts(
model.user model.user.firstName + " " + model.user.lastName,
.firstName + color: Colors.grey[100],
" " +
model.user
.lastName,
color: Colors
.grey[100],
bold: true, bold: true,
fontSize: 15, fontSize: 15,
), ),
@ -437,17 +362,14 @@ class _HomePageState extends State<HomePage> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#D81A2E'), color: HexColor('#D81A2E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(color: Colors.transparent, width: 0.5),
color: Colors.transparent,
width: 0.5),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5), Radius.circular(5),
), ),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
TranslationBase.of(context) TranslationBase.of(context).myMedicalFile,
.myMedicalFile,
color: Colors.white, color: Colors.white,
fontSize: 12, fontSize: 12,
textAlign: TextAlign.center, textAlign: TextAlign.center,
@ -486,10 +408,8 @@ class _HomePageState extends State<HomePage> {
width: 25, width: 25,
height: 40, height: 40,
), ),
Texts( Texts('${model.weightKg} ${TranslationBase.of(context).kg}',
'${model.weightKg} ${TranslationBase.of(context).kg}', color: Colors.white, fontSize: 17)
color: Colors.white,
fontSize: 17)
], ],
), ),
), ),
@ -504,9 +424,7 @@ class _HomePageState extends State<HomePage> {
width: 35, width: 35,
height: 40, height: 40,
), ),
Texts('${model.booldType}', Texts('${model.booldType}', color: Colors.white, fontSize: 17)
color: Colors.white,
fontSize: 17)
], ],
), ),
), ),
@ -520,12 +438,10 @@ class _HomePageState extends State<HomePage> {
], ],
), ),
Padding( Padding(
padding: padding: const EdgeInsets.only(bottom: 15, right: 15, left: 15),
const EdgeInsets.only(bottom: 15, right: 15, left: 15),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.of(context).push(MaterialPageRoute( Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesHomePage()));
builder: (context) => PackagesHomePage()));
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -572,13 +488,14 @@ class _HomePageState extends State<HomePage> {
}, },
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: (model.user != null && model.user.outSA == 1)
child: (model.user != null && ? const EdgeInsets.all(0.0)
model.user.outSA == 1) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container( ? Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
color: Colors.grey.withOpacity(0.7), color: Colors.grey.shade500.withOpacity(0.3),
child: Icon( child: Icon(
Icons.lock_outline, Icons.lock_outline,
size: 40, size: 40,
@ -595,14 +512,11 @@ class _HomePageState extends State<HomePage> {
height: 10, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).homeHealthCare,
.homeHealthCare,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: fontSize: SizeConfig.textMultiplier * 1.55,
SizeConfig.textMultiplier *
1.55,
) )
], ],
)), )),
@ -614,18 +528,17 @@ class _HomePageState extends State<HomePage> {
if (projectViewModel.havePrivilege(65)) if (projectViewModel.havePrivilege(65))
DashboardItem( DashboardItem(
onTap: () => onTap: () =>
(model.user != null && model.user.outSA == 1) (model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model),
? () {}
: getPharmacyToken(model),
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: (model.user != null && model.user.outSA == 1)
child: (model.user != null && ? const EdgeInsets.all(0.0)
model.user.outSA == 1) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container( ? Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
color: Colors.grey.withOpacity(0.7), color: Colors.grey.shade500.withOpacity(0.3),
child: Icon( child: Icon(
Icons.lock_outline, Icons.lock_outline,
size: 40, size: 40,
@ -648,14 +561,11 @@ class _HomePageState extends State<HomePage> {
height: 20, height: 20,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).onlinePharmacy,
.onlinePharmacy,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: fontSize: SizeConfig.textMultiplier * 1.55,
SizeConfig.textMultiplier *
1.55,
) )
], ],
), ),
@ -678,13 +588,14 @@ class _HomePageState extends State<HomePage> {
}, },
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: (model.user != null && model.user.outSA == 1)
child: (model.user != null && ? const EdgeInsets.all(0.0)
model.user.outSA == 1) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container( ? Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
color: Colors.grey.withOpacity(0.7), color: Colors.grey.shade500.withOpacity(0.3),
child: Icon( child: Icon(
Icons.lock_outline, Icons.lock_outline,
size: 40, size: 40,
@ -701,14 +612,11 @@ class _HomePageState extends State<HomePage> {
height: 10, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).cmcHeading,
.cmcHeading,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: fontSize: SizeConfig.textMultiplier * 1.55,
SizeConfig.textMultiplier *
1.55,
) )
], ],
)), )),
@ -724,8 +632,7 @@ class _HomePageState extends State<HomePage> {
height: 8, height: 8,
), ),
InkWell( InkWell(
onTap: () => onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
Navigator.push(context, FadePage(page: PaymentService())),
child: Container( child: Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
child: Row( child: Row(
@ -746,8 +653,7 @@ class _HomePageState extends State<HomePage> {
height: 5, height: 5,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).onlinePaymentService,
.onlinePaymentService,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
@ -778,8 +684,7 @@ class _HomePageState extends State<HomePage> {
height: 10, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).offersAndPackages,
.offersAndPackages,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
@ -819,13 +724,11 @@ class _HomePageState extends State<HomePage> {
height: 10, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).emergencyServices,
.emergencyServices,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
fontSize: fontSize: SizeConfig.textMultiplier * 1.7,
SizeConfig.textMultiplier * 1.7,
) )
], ],
), ),
@ -863,8 +766,7 @@ class _HomePageState extends State<HomePage> {
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).viewAllHabibMedicalService,
.viewAllHabibMedicalService,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 10, fontSize: 10,
@ -885,15 +787,13 @@ class _HomePageState extends State<HomePage> {
opacity: 0.5, opacity: 0.5,
color: Colors.grey[700], color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push( onTap: () => Navigator.push(context, FadePage(page: AllHabibMedicalService())),
context, FadePage(page: AllHabibMedicalService())),
), ),
DashboardItem( DashboardItem(
onTap: () { onTap: () {
// Navigator.push( // Navigator.push(
// context, FadePage(page: FeedbackHomePage())); // context, FadePage(page: FeedbackHomePage()));
Navigator.push( Navigator.push(context, FadePage(page: ContactUsPage()));
context, FadePage(page: ContactUsPage()));
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
@ -1015,10 +915,8 @@ class DashboardItem extends StatelessWidget {
? DecorationImage( ? DecorationImage(
image: ExactAssetImage('assets/images/$imageName'), image: ExactAssetImage('assets/images/$imageName'),
fit: BoxFit.cover, fit: BoxFit.cover,
colorFilter: hasColorFilter colorFilter:
? new ColorFilter.mode( hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
Colors.black.withOpacity(0.2), BlendMode.dstIn)
: null,
) )
: null, : null,
), ),

@ -42,9 +42,11 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import '../../locator.dart'; import '../../locator.dart';
import '../../routes.dart'; import '../../routes.dart';
import 'home_page.dart'; import 'home_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class LandingPage extends StatefulWidget { class LandingPage extends StatefulWidget {
static LandingPage shared; static LandingPage shared;
@ -73,6 +75,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
PageController pageController; PageController pageController;
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
ToDoCountProviderModel model;
var notificationCount = ''; var notificationCount = '';
var themeNotifier; var themeNotifier;
@ -104,10 +107,16 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
setState(() { setState(() {
if (widget.currentTab > 0 && tab == 2) if (widget.currentTab > 0 && tab == 2)
pageController.jumpToPage(0); pageController.jumpToPage(0);
else if (tab != 0) else if (tab != 0) {
if (tab == 4 && model.count == 0) {
AppToast.showErrorToast(
message: TranslationBase.of(context).noBookedAppo);
} else {
pageController.jumpToPage(tab); pageController.jumpToPage(tab);
else { }
} else {
IS_VOICE_COMMAND_CLOSED = false; IS_VOICE_COMMAND_CLOSED = false;
pageController.jumpToPage(tab); pageController.jumpToPage(tab);
} }
widget.currentTab = tab; widget.currentTab = tab;
@ -475,7 +484,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
model = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showHomeAppBarIcon: false, showHomeAppBarIcon: false,

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

@ -2,8 +2,9 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_user_requet.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'
as checkActivation;
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
@ -20,6 +21,10 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hijri/hijri_calendar.dart'; import 'package:hijri/hijri_calendar.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:provider/provider.dart';
class RegisterInfo extends StatefulWidget { class RegisterInfo extends StatefulWidget {
@override @override
@ -45,6 +50,13 @@ class _RegisterInfo extends State<RegisterInfo> {
String email = ''; String email = '';
String location = '1'; String location = '1';
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
ProjectViewModel projectViewModel;
AppointmentRateViewModel appointmentRateViewModel =
locator<AppointmentRateViewModel>();
@override @override
void initState() { void initState() {
@ -56,6 +68,8 @@ class _RegisterInfo extends State<RegisterInfo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).register, appBarTitle: TranslationBase.of(context).register,
isShowAppBar: true, isShowAppBar: true,
@ -301,16 +315,17 @@ class _RegisterInfo extends State<RegisterInfo> {
} }
else else
{ {
result = checkActivation.CheckActivationCode.fromJson(result),
result.list.isFamily = false, result.list.isFamily = false,
sharedPref.setObject(USER_PROFILE, result.list), sharedPref.setObject(USER_PROFILE, result.list),
this.sharedPref.setObject(MAIN_USER, result.list), this.sharedPref.setObject(MAIN_USER, result.list),
sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
sharedPref.setString(TOKEN, result.authenticationTokenID), sharedPref.setString(TOKEN, result.authenticationTokenID),
Navigator.of(context).pushNamed(HOME) this.setUser(result),
} }
}) })
.catchError((err) { .catchError((err) {
GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, context: context,
confirmMessage: err, confirmMessage: err,
@ -322,6 +337,15 @@ class _RegisterInfo extends State<RegisterInfo> {
}); });
} }
setUser(result) async {
await authenticatedUserObject.getUser(getUser: true);
authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
authenticatedUserObject.user = result.list;
Navigator.of(context).pushNamed(HOME);
}
getRegisterInfo() async { getRegisterInfo() async {
var data = var data =
RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA)); RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA));

@ -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/pages/medical/my_trackers/widget/MonthLineChartCurved.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -29,22 +30,7 @@ class WeightMonthlyPage extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
isShowDecPage: false, isShowDecPage: false,
body: model.weighMonthTimeSeriesData.isEmpty body: ListView(
? 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(
children: [ children: [
Container( Container(
width: double.maxFinite, width: double.maxFinite,
@ -52,7 +38,7 @@ class WeightMonthlyPage extends StatelessWidget {
child: MonthLineChartCurved( child: MonthLineChartCurved(
horizontalInterval: 1.0, horizontalInterval: 1.0,
title: TranslationBase.of(context).weight, title: TranslationBase.of(context).weight,
timeSeries: model.weighMonthTimeSeriesData, timeSeries: model.weighMonthTimeSeriesData.isEmpty?[TimeSeriesSales3(0, 0.0)]:model.weighMonthTimeSeriesData,
indexes: model.weighMonthTimeSeriesData.length ~/ 5.5, indexes: model.weighMonthTimeSeriesData.length ~/ 5.5,
)), )),
SizedBox( SizedBox(
@ -68,7 +54,11 @@ class WeightMonthlyPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Table( model.weighMonthTimeSeriesData.isEmpty? Container(
child: Center(
child: Texts(TranslationBase.of(context).noDataAvailable),
),
):Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]), 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/pages/medical/my_trackers/widget/LineChartCurved.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -25,22 +26,7 @@ class WeightWeeklyPage extends StatelessWidget {
return AppScaffold( return AppScaffold(
isShowDecPage: false, isShowDecPage: false,
body: model.weightWeekTimeSeriesData.isEmpty body: ListView(
? 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(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8), margin: EdgeInsets.only(top: 12, left: 8, right: 8),
@ -48,7 +34,9 @@ class WeightWeeklyPage extends StatelessWidget {
child: LineChartCurved( child: LineChartCurved(
horizontalInterval: 1.0, horizontalInterval: 1.0,
title: TranslationBase.of(context).weight, 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, indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0,
), ),
), ),
@ -65,9 +53,14 @@ class WeightWeeklyPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Table( model.weightWeekTimeSeriesData.isEmpty? Container(
child: Center(
child: Texts(TranslationBase.of(context).noDataAvailable),
),
):Table(
border: TableBorder.symmetric( 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), 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 = []; List<TableRow> tableRow = [];
tableRow.add( tableRow.add(
TableRow( TableRow(
@ -88,8 +82,12 @@ class WeightWeeklyPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0), topLeft: projectViewModel.isArabic
topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0), ? Radius.circular(0.0)
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
), ),
), ),
child: Center( child: Center(
@ -129,8 +127,12 @@ class WeightWeeklyPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0), topLeft: projectViewModel.isArabic
topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0), ? Radius.circular(10.0)
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
), ),
), ),
child: Center( 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/pages/medical/my_trackers/widget/LineChartCurved.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -28,22 +29,8 @@ class WeightYearPage extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
isShowDecPage: false, isShowDecPage: false,
body: model.weightYearTimeSeriesData.isEmpty body:
? Container( ListView(
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(
children: [ children: [
Container( Container(
width: double.maxFinite, width: double.maxFinite,
@ -51,7 +38,7 @@ class WeightYearPage extends StatelessWidget {
child: LineChartCurved( child: LineChartCurved(
horizontalInterval: 2.0, horizontalInterval: 2.0,
title: TranslationBase.of(context).weight, 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 ?? "", indexes: model.weightYearTimeSeriesData.length ~/ 5.5 ?? "",
)), )),
SizedBox( SizedBox(
@ -67,7 +54,11 @@ class WeightYearPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Table( model.weightYearTimeSeriesData.isEmpty? Container(
child: Center(
child: Texts(TranslationBase.of(context).noDataAvailable),
),
):Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]), inside: BorderSide(width: 2.0, color: Colors.grey[300]),
), ),

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

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

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

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

@ -47,7 +47,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
itemBuilder: (context, index) => DoctorCard( itemBuilder: (context, index) => DoctorCard(
isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment, isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment,
name: model.sickLeaveList[index].doctorName, name: model.sickLeaveList[index].doctorName,
date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].requestDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].requestDate), date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].appointmentDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].appointmentDate),
profileUrl: model.sickLeaveList[index].doctorImageURL, profileUrl: model.sickLeaveList[index].doctorImageURL,
rat: model.sickLeaveList[index].actualDoctorRate.toDouble(), rat: model.sickLeaveList[index].actualDoctorRate.toDouble(),
subName: model.sickLeaveList[index].projectName, subName: model.sickLeaveList[index].projectName,

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; 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/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -11,19 +12,59 @@ import 'package:url_launcher/url_launcher.dart';
class PharmacyForPrescriptionsPage extends StatelessWidget { class PharmacyForPrescriptionsPage extends StatelessWidget {
final itemID; final itemID;
final PrescriptionReport prescriptionReport;
PharmacyForPrescriptionsPage({Key key, this.itemID}); PharmacyForPrescriptionsPage({Key key, this.itemID, this.prescriptionReport});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PrescriptionsViewModel>( return BaseView<PrescriptionsViewModel>(
onModelReady: (model) => onModelReady: (model) => model.getListPharmacyForPrescriptions(itemId: itemID),
model.getListPharmacyForPrescriptions(itemId: itemID),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).availability, appBarTitle: TranslationBase.of(context).availability,
baseViewModel: model, baseViewModel: model,
body: ListView.builder( 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),
),
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: 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( itemBuilder: (context, index) => Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10), margin: EdgeInsets.only(top: 10, left: 10, right: 10),
@ -52,8 +93,7 @@ class PharmacyForPrescriptionsPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(model.pharmacyPrescriptionsList[index] Texts(model.pharmacyPrescriptionsList[index].locationDescription),
.locationDescription),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
@ -65,10 +105,8 @@ class PharmacyForPrescriptionsPage extends StatelessWidget {
InkWell( InkWell(
onTap: () { onTap: () {
MapsLauncher.launchCoordinates( MapsLauncher.launchCoordinates(
double.parse( double.parse(model.pharmacyPrescriptionsList[index].latitude),
model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude));
double.parse(
model.pharmacyPrescriptionsList[index].longitude));
}, },
child: Icon( child: Icon(
Icons.pin_drop, Icons.pin_drop,
@ -81,8 +119,7 @@ class PharmacyForPrescriptionsPage extends StatelessWidget {
), ),
InkWell( InkWell(
onTap: Feedback.wrapForTap(() { onTap: Feedback.wrapForTap(() {
launch( launch("tel://${model.pharmacyPrescriptionsList[index].phoneNumber}");
"tel://${model.pharmacyPrescriptionsList[index].phoneNumber}");
}, context), }, context),
child: Container( child: Container(
child: Icon( child: Icon(
@ -96,6 +133,15 @@ class PharmacyForPrescriptionsPage extends StatelessWidget {
), ),
), ),
itemCount: model.pharmacyPrescriptionsList.length, itemCount: model.pharmacyPrescriptionsList.length,
)
: Padding(
padding: const EdgeInsets.only(top: 65.0),
child: Texts(
TranslationBase.of(context).thisItemIsNotAvailable,
textAlign: TextAlign.center,
),
),
],
), ),
), ),
); );

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

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

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

@ -231,37 +231,21 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
Stack(children: [ Stack(children: [
Container( Container(
child: Align( child: Align(
alignment: alignment: Alignment.topRight,
Alignment child: itemID.contains(e.id)
.topRight,
child:
itemID.contains(e.id)
// !isInWishlist // !isInWishlist
? IconButton( ? IconButton(icon: Icon(Icons.favorite_border),
icon: color: Colors.grey, iconSize: 30,
Icon(Icons.favorite_border),
color:
Colors.grey,
iconSize:
30,
onPressed: onPressed:
() { () {
setState(() { setState(() {addToWishlistFunction(itemID);
addToWishlistFunction(itemID);
}); });
}, },
) )
: : IconButton(icon: Icon(Icons.favorite),
IconButton( color: Colors.red, iconSize: 30,
icon:
Icon(Icons.favorite),
color:
Colors.red,
iconSize:
30,
onPressed: onPressed:
() { () {setState(() {
setState(() {
deleteFromWishlistFunction(itemID); deleteFromWishlistFunction(itemID);
}); });
}, },
@ -269,149 +253,74 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
// //
), ),
), ),
Container( Container(margin: EdgeInsets.fromLTRB(0, 16, 10, 16),
margin: EdgeInsets alignment: Alignment.center,
.fromLTRB(0, 16,
10, 16),
alignment:
Alignment.center,
// padding: EdgeInsets.only(left: 25, bottom: 20), // padding: EdgeInsets.only(left: 25, bottom: 20),
child: (e.images != child: (e.images != null && e.images.length > 0)
null && ? Image.network(e.images[0].src.toString(),
e.images.length >
0)
? Image.network(
e.images[0]
.src
.toString(),
// item.images[0].src, // item.images[0].src,
fit: BoxFit fit: BoxFit.cover, height: 60,)
.cover, : Image.asset("assets/images/no_image.png", fit: BoxFit.cover, height: 60,
height: 60,
)
: Image.asset(
"assets/images/no_image.png",
fit: BoxFit
.cover,
height: 60,
), ),
), ),
Container( Container(width: e.rxMessage != null ? MediaQuery.of(context)
width: e.rxMessage != .size.width / 5 : 0,
null padding: EdgeInsets.all(4),
? MediaQuery.of( decoration: BoxDecoration(
context) color: Color(0xffb23838),
.size borderRadius: BorderRadius.only(topLeft: Radius.circular(6)),
.width /
5
: 0,
padding:
EdgeInsets.all(4),
decoration:
BoxDecoration(
color: Color(
0xffb23838),
borderRadius:
BorderRadius.only(
topLeft: Radius
.circular(
6)),
), ),
child: Texts( child: Texts(e.rxMessage != null ? e.rxMessage : "",
e.rxMessage != null
? e.rxMessage
: "",
color: Colors.white, color: Colors.white,
regular: true, regular: true,
fontSize: 10, fontSize: 10,
fontWeight: fontWeight: FontWeight.w400,
FontWeight.w400,
), ),
), ),
]), ]),
Container( Container(
margin: EdgeInsets margin: EdgeInsets
.symmetric( .symmetric(horizontal: 6, vertical: 0,
horizontal: 6,
vertical: 0,
), ),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: [ children: [
Text( Text(
languageID == "ar" languageID == "ar" ? e.namen : e.name,
? e.namen
: e.name,
style: TextStyle( style: TextStyle(
color: Colors color: Colors.black, fontSize: 13.0,
.black,
fontSize: 13.0,
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
), ),
), ),
Padding( Padding(
// padding: const EdgeInsets.only(top: 15, bottom: 10), // padding: const EdgeInsets.only(top: 15, bottom: 10),
padding: padding: const EdgeInsets.only(top: 10, bottom: 5),
const EdgeInsets child: Texts("SAR ${e.price}",
.only( bold: true, fontSize: 14,
top: 10,
bottom:
5),
child: Texts(
"SAR ${e.price}",
bold: true,
fontSize: 14,
), ),
), ),
], ],
), ),
), ),
Row( Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: <Widget>[ children: <Widget>[
Container( Container(
padding: EdgeInsets padding: EdgeInsets.only(right: 10),
.only(
right:
10),
// margin: EdgeInsets.only(left: 5), // margin: EdgeInsets.only(left: 5),
child: Align( child: Align(alignment: Alignment.topLeft,
alignment: child: RatingBar.readOnly(initialRating: e.approvedRatingSum.toDouble(),
Alignment
.topLeft,
child: RatingBar
.readOnly(
initialRating: e
.approvedRatingSum
.toDouble(),
// initialRating: productRate, // initialRating: productRate,
size: 13.0, size: 13.0, filledColor: Colors.yellow[700],
filledColor: emptyColor: Colors.grey[500],
Colors.yellow[ isHalfAllowed: true,
700], halfFilledIcon: Icons.star_half,
emptyColor: filledIcon: Icons.star,
Colors.grey[ emptyIcon: Icons.star,
500],
isHalfAllowed:
true,
halfFilledIcon:
Icons
.star_half,
filledIcon:
Icons
.star,
emptyIcon:
Icons
.star,
), ),
), ),
), ),
Texts( Texts("(${e.approvedTotalReviews.toString()})",
"(${e.approvedTotalReviews.toString()})",
// bold: true, // bold: true,
fontSize: 12, fontSize: 12,
), ),
@ -664,8 +573,7 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
return Card( return Card(
elevation: 2, elevation: 2,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: side: BorderSide(color: Colors.grey[300], width: 2),
BorderSide(color: Colors.grey[300], width: 2),
borderRadius: BorderRadius.circular(10)), borderRadius: BorderRadius.circular(10)),
// //
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
@ -692,14 +600,12 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
//wishlistVar[index].id.contains(model.recommendedProductList[index].id) //wishlistVar[index].id.contains(model.recommendedProductList[index].id)
!isInWishlist !isInWishlist
? IconButton( ? IconButton(
icon: Icon( icon: Icon(Icons.favorite_border),
Icons.favorite_border),
color: Colors.grey, color: Colors.grey,
iconSize: 30, iconSize: 30,
onPressed: () { onPressed: () {
setState(() { setState(() {
addToWishlistFunction( addToWishlistFunction(itemID);
itemID);
}); });
}, },
) )
@ -709,8 +615,7 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
iconSize: 30, iconSize: 30,
onPressed: () { onPressed: () {
setState(() { setState(() {
deleteFromWishlistFunction( deleteFromWishlistFunction(itemID);
itemID);
}); });
}, },
) )
@ -721,30 +626,20 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
margin: EdgeInsets.fromLTRB(0, 16, 10, 16), margin: EdgeInsets.fromLTRB(0, 16, 10, 16),
alignment: Alignment.center, alignment: Alignment.center,
// padding: EdgeInsets.only(left: 25, bottom: 20), // padding: EdgeInsets.only(left: 25, bottom: 20),
child: (model.recommendedProductList[index] child: (model.recommendedProductList[index].images != null &&
.images != model.recommendedProductList[index].images.length > 0)
null && ? Image.network(model.recommendedProductList[index].images[0].src.toString(),
model.recommendedProductList[index]
.images.length >
0)
? Image.network(
model.recommendedProductList[index]
.images[0].src
.toString(),
// item.images[0].src, // item.images[0].src,
fit: BoxFit.cover, fit: BoxFit.cover,
height: 60, height: 60,
) )
: Image.asset( : Image.asset("assets/images/no_image.png",
"assets/images/no_image.png",
fit: BoxFit.cover, fit: BoxFit.cover,
height: 60, height: 60,
), ),
), ),
Container( Container(
width: model.recommendedProductList[index] width: model.recommendedProductList[index].rxMessage != null
.rxMessage !=
null
? MediaQuery.of(context).size.width / 5 ? MediaQuery.of(context).size.width / 5
: 0, : 0,
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
@ -754,11 +649,8 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
topLeft: Radius.circular(6)), topLeft: Radius.circular(6)),
), ),
child: Texts( child: Texts(
model.recommendedProductList[index] model.recommendedProductList[index].rxMessage != null
.rxMessage != ? model.recommendedProductList[index].rxMessage
null
? model.recommendedProductList[index]
.rxMessage
: "", : "",
color: Colors.white, color: Colors.white,
regular: true, regular: true,
@ -773,12 +665,9 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
vertical: 2, vertical: 2,
), ),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
Text( Text(model.recommendedProductList[index].name,
model
.recommendedProductList[index].name,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 13.0, fontSize: 13.0,
@ -799,8 +688,7 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
), ),
), ),
Row( Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
@ -809,10 +697,7 @@ class _RecommendedProductPageState extends State<RecommendedProductPage>
child: Align( child: Align(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: RatingBar.readOnly( child: RatingBar.readOnly(
initialRating: model initialRating: model.recommendedProductList[index].approvedRatingSum.toDouble(),
.recommendedProductList[index]
.approvedRatingSum
.toDouble(),
// initialRating: productRate, // initialRating: productRate,
size: 13.0, size: 13.0,
filledColor: Colors.yellow[700], 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/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.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/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/doctor_pre_post_image.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Request.dart'; import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -51,7 +53,7 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID, "VersionID": req.VersionID,
"Channel": req.Channel, "Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958', "generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA, "PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,
"TokenID": "", "TokenID": "",
"DeviceTypeID": req.DeviceTypeID, "DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig", "SessionID": "YckwoXhUmWBsnHKEKig",
@ -157,7 +159,7 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID, "VersionID": req.VersionID,
"Channel": req.Channel, "Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958', "generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA, "PatientOutSA": authUser.outSA ?? false,
"TokenID": "", "TokenID": "",
"DeviceTypeID": req.DeviceTypeID, "DeviceTypeID": req.DeviceTypeID,
"SessionID": null, "SessionID": null,
@ -214,6 +216,33 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); 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 { Future<Map> getDoctorsRatingDetails(int docID, context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = var languageID =

@ -328,6 +328,7 @@ class AuthProvider with ChangeNotifier {
request['LanguageID'] = LANGUAGE_ID; request['LanguageID'] = LANGUAGE_ID;
var requestN = RegisterUserRequest.fromJson(request); var requestN = RegisterUserRequest.fromJson(request);
requestN.patientOutSA = requestN.patientobject.patientOutSA; requestN.patientOutSA = requestN.patientobject.patientOutSA;
await sharedPref.remove(USER_PROFILE);
// request.tokenID = ''; // request.tokenID = '';
dynamic localRes; dynamic localRes;
try { try {

@ -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);
}
}

@ -1,3 +1,5 @@
import 'dart:async';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
@ -10,12 +12,14 @@ class PharmacyAddressService extends BaseService {
CountryData country; CountryData country;
int selectedAddressIndex = 0; int selectedAddressIndex = 0;
Future getAddresses() async { Future<List<Addresses>> getAddresses() async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
Map<String, String> queryParams = {'fields': 'addresses'}; Map<String, String> queryParams = {'fields': 'addresses'};
hasError = false; hasError = false;
Addresses selectedAddress; Addresses selectedAddress;
try { try {
var completer = Completer();
await baseAppClient.getPharmacy("$GET_CUSTOMERS_ADDRESSES$customerId", await baseAppClient.getPharmacy("$GET_CUSTOMERS_ADDRESSES$customerId",
onSuccess: (dynamic response, int statusCode) async { onSuccess: (dynamic response, int statusCode) async {
addresses.clear(); addresses.clear();
@ -33,13 +37,19 @@ class PharmacyAddressService extends BaseService {
addresses.add(address); addresses.add(address);
index++; index++;
}); });
completer.complete();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, queryParams: queryParams); }, queryParams: queryParams);
await completer.future;
} catch (error){ } catch (error){
throw error; throw error;
} }
return addresses;
} }
Future getCountries(String countryName) async { Future getCountries(String countryName) async {

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/eye/EyeMeasurementsPage.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_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/my_trackers/my_trackers.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
@ -302,6 +303,17 @@ class Utils {
isEnable: projectViewModel.havePrivilege(6)), 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( medical.add(InkWell(
onTap: () => onTap: () =>
projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null, projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
@ -504,6 +516,13 @@ class Utils {
); );
}); });
} }
static bool route(Route route, {@required Type equalsTo}){
if((route is FadePage)){
return route.page.runtimeType == equalsTo;
}
return route.runtimeType == equalsTo;
}
} }
Widget applyShadow( Widget applyShadow(

@ -5,23 +5,27 @@ import 'package:flutter/material.dart';
class AlertDialogBox { class AlertDialogBox {
final BuildContext context; final BuildContext context;
final title;
final confirmMessage; final confirmMessage;
final okText; final okText;
final Function okFunction; final Function okFunction;
AlertDialogBox( AlertDialogBox(
{@required this.context, {@required this.context,
this.title,
@required this.confirmMessage, @required this.confirmMessage,
@required this.okText, @required this.okText,
@required this.okFunction}); @required this.okFunction});
showAlertDialog(BuildContext context) { showAlertDialog(BuildContext context) {
Widget continueButton = Widget continueButton =
FlatButton(child: Text(this.okText), onPressed: this.okFunction); FlatButton(child: Text(this.okText), onPressed: (){
this.okFunction();
});
// set up the AlertDialog // set up the AlertDialog
AlertDialog alert = AlertDialog( AlertDialog alert = AlertDialog(
title: Text(TranslationBase.of(context).confirm), title: Text(title ?? TranslationBase.of(context).confirm),
content: Text(this.confirmMessage), content: Text(this.confirmMessage),
actions: [ actions: [
continueButton, continueButton,
@ -31,7 +35,7 @@ class AlertDialogBox {
// show the dialog // show the dialog
showDialog( showDialog(
barrierDismissible: false, barrierDismissible: false,
context: context, context: this.context,
builder: (BuildContext context) { builder: (BuildContext context) {
return alert; return alert;
}, },

@ -0,0 +1,56 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class SelectionDialog<T> extends StatefulWidget{
@override
State<StatefulWidget> createState() => SelectionDialogState();
String title;
List<T> items;
show({@required String title, @required List<T> items}){
this.title = title;
}
}
class SelectionDialogState extends State<SelectionDialog>{
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(15)),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(15),
child: Text(widget.title,),
),
Container(height: 0.5, color: Colors.grey,),
ListView.separated(
padding: EdgeInsets.all(10),
itemCount: widget.items.length,
itemBuilder: (ctx,idx) => item(idx),
separatorBuilder: (ctx,idx) => Container(height: 0.25, color: Colors.grey.withOpacity(0.7),))
],
),
)
],
);
}
Widget item(int idx){
var model = widget.items[idx];
return Container(
padding: EdgeInsets.all(10),
height: 20,
color: Colors.blue,
child: Text(model.toString()),
);
}
}

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

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

Loading…
Cancel
Save