From 927db41068ef2b0f90ae8b414ac7cbed884d3f04 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 9 Mar 2022 14:17:27 +0300 Subject: [PATCH] Covid updates & other fixes --- lib/config/config.dart | 660 +++++++++--------- lib/config/localized_values.dart | 6 +- lib/core/service/client/base_app_client.dart | 48 +- .../parmacyModule/parmacy_module_service.dart | 2 +- lib/main.dart | 12 + .../BookAppointment/book_reminder_page.dart | 2 - lib/pages/ToDoList/ToDo.dart | 9 +- lib/pages/landing/landing_page.dart | 8 +- lib/pages/landing/widgets/services_view.dart | 27 +- lib/pages/livecare/incoming_call.dart | 129 +--- lib/pages/livecare/widgets/clinic_list.dart | 1 - lib/pages/settings/profile_setting.dart | 21 +- lib/pages/webRTC/call_page.dart | 4 +- lib/pages/webRTC/signaling.dart | 38 +- .../clinic_services/get_clinic_service.dart | 4 +- lib/uitl/translations_delegate_base.dart | 2 + lib/widgets/dialogs/confirm_dialog.dart | 12 - lib/widgets/dialogs/covid_consent_dialog.dart | 84 +++ lib/widgets/drawer/app_drawer_widget.dart | 3 +- lib/widgets/in_app_browser/InAppBrowser.dart | 9 +- pubspec.yaml | 1 + 21 files changed, 546 insertions(+), 536 deletions(-) create mode 100644 lib/widgets/dialogs/covid_consent_dialog.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index edfda947..6fccb5ae 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -3,707 +3,707 @@ import 'dart:io'; import 'package:diplomaticquarterapp/models/Request.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -const MAX_SMALL_SCREEN = 660; +var MAX_SMALL_SCREEN = 660; // PACKAGES and OFFERS -const EXA_CART_API_BASE_URL = 'https://mdlaboratories.com/offersdiscounts'; -// const EXA_CART_API_BASE_URL = 'http://10.200.101.75:9000'; -const PACKAGES_CATEGORIES = '/api/categories'; -const PACKAGES_TOKEN = '/api/token'; -const PACKAGES_PRODUCTS = '/api/products'; -const PACKAGES_CUSTOMER = '/api/customers'; -const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; -const PACKAGES_ORDERS = '/api/orders'; -const PACKAGES_ORDER_HISTORY = '/api/orders/items'; -const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; -// const BASE_URL = 'http://10.50.100.198:3334/'; - const BASE_URL = 'https://uat.hmgwebservices.com/'; -// const BASE_URL = 'https://hmgwebservices.com/'; +var EXA_CART_API_BASE_URL = 'https://mdlaboratories.com/offersdiscounts'; +// var EXA_CART_API_BASE_URL = 'http://10.200.101.75:9000'; +var PACKAGES_CATEGORIES = '/api/categories'; +var PACKAGES_TOKEN = '/api/token'; +var PACKAGES_PRODUCTS = '/api/products'; +var PACKAGES_CUSTOMER = '/api/customers'; +var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; +var PACKAGES_ORDERS = '/api/orders'; +var PACKAGES_ORDER_HISTORY = '/api/orders/items'; +var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; +// var BASE_URL = 'http://10.50.100.198:3334/'; + var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs -// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; -// const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +// var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +// var PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // // Pharmacy Production URLs -const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; -const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; +var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; +var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; // // Pharmacy Pre-Production URLs -// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapitest/api/'; -// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/'; +// var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapitest/api/'; +// var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/'; // RC API URL -const RC_BASE_URL = 'https://rc.hmg.com/'; +var RC_BASE_URL = 'https://rc.hmg.com/'; -const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; +var PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; -const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; +var GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; ///Geofencing -const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints'; -const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo'; +var GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints'; +var LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo'; // Delivery Driver -const DRIVER_LOCATION = +var DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation'; //weather -const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; +var WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; -const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; +var GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; // Wifi Credentials -const WIFI_CREDENTIALS = +var WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; ///Doctor -const GET_MY_DOCTOR = +var GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; -const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; -const GET_DOCTOR_PRE_POST_IMAGES = +var GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; +var GET_DOCTOR_PRE_POST_IMAGES = 'Services/Doctors.svc/REST/GetDoctorPrePostImages'; -const GET_DOCTOR_RATING_NOTES = +var GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; -const GET_DOCTOR_RATING_DETAILS = +var GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; -const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; +var GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; ///Prescriptions -// const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; -const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; +// var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; +var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; -const GET_PRESCRIPTIONS_ALL_ORDERS = +var GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PRESCRIPTION_REPORT = +var GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; -const SEND_PRESCRIPTION_EMAIL = +var SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; -const GET_PRESCRIPTION_REPORT_ENH = +var GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; ///Lab Order -const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; -const GET_Patient_LAB_SPECIAL_RESULT = +var GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; +var GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; -const SEND_LAB_RESULT_EMAIL = +var SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; -const GET_Patient_LAB_RESULT = +var GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; -const GET_Patient_LAB_ORDERS_RESULT = +var GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; -const SEND_COVID_LAB_RESULT_EMAIL = +var SEND_COVID_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/GenerateCOVIDReport'; -const COVID_PASSPORT_UPDATE = +var COVID_PASSPORT_UPDATE = 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate'; -const GET_PATIENT_PASSPORT_NUMBER = +var GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport'; /// -const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; -const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = +var GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; +var GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; -const GET_PATIENT_ORDERS_DETAILS = +var GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; -const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; -const SEND_RAD_REPORT_EMAIL = +var GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; +var SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail'; ///Feedback -const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; -const GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC'; -// const GET_PATIENT_AppointmentHistory = 'Services' +var SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; +var GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC'; +// var GET_PATIENT_AppointmentHistory = 'Services' // '/Doctors.svc/REST/PateintHasAppoimentHistory'; -const GET_PATIENT_AppointmentHistory = 'Services' +var GET_PATIENT_AppointmentHistory = 'Services' '/Doctors.svc/REST/PateintHasAppoimentHistory_Async'; ///VITAL SIGN -const GET_PATIENT_VITAL_SIGN = +var GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; ///Er Nearest -const GET_NEAREST_HOSPITAL = +var GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; ///ED Online -const ER_GET_VISUAL_TRIAGE_QUESTIONS = +var ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; -const ER_SAVE_TRIAGE_INFORMATION = +var ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation"; -const ER_GetPatientPaymentInformationForERClinic = +var ER_GetPatientPaymentInformationForERClinic = "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; ///Er Nearest -const GET_AMBULANCE_REQUEST = +var GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; -const GET_PATIENT_ALL_PRES_ORDERS = +var GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = +var GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; -const UPDATE_PRESS_ORDER = +var UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; -const INSERT_ER_INERT_PRES_ORDER = +var INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; /// ER RRT -const GET_ALL_RC_TRANSPORTATION = 'api/Transportation/getalltransportation'; -const GET_ALL_TRANSPORTATIONS_RC = 'api/Transportation/getalltransportation'; -const GET_ALL_RRT_QUESTIONS = +var GET_ALL_RC_TRANSPORTATION = 'api/Transportation/getalltransportation'; +var GET_ALL_TRANSPORTATIONS_RC = 'api/Transportation/getalltransportation'; +var GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; -const GET_RRT_SERVICE_PRICE = +var GET_RRT_SERVICE_PRICE = 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice'; -const GET_ALL_TRANSPORTATIONS_ORDERS = 'api/Transportation/get'; +var GET_ALL_TRANSPORTATIONS_ORDERS = 'api/Transportation/get'; -const CANCEL_AMBULANCE_REQUEST = "api/Transportation/update"; +var CANCEL_AMBULANCE_REQUEST = "api/Transportation/update"; -const INSERT_TRANSPORTATION_ORDER_RC = "api/Transportation/add"; +var INSERT_TRANSPORTATION_ORDER_RC = "api/Transportation/add"; ///FindUs -const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; +var GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; ///LiveChat -const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; +var GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; ///babyInformation -const GET_BABYINFORMATION_REQUEST = +var GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID'; ///Get Baby By User ID -const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; +var GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; ///userInformation -const GET_USERINFORMATION_REQUEST = +var GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New'; ///Update email -const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; -const UPDATE_PATENT_INFO = 'Services/Community.svc/REST/UpdateUserInfo_New'; +var UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; +var UPDATE_PATENT_INFO = 'Services/Community.svc/REST/UpdateUserInfo_New'; ///addNewChild -const GET_NEWCHILD_REQUEST = 'Services/Community.svc/REST/CreateNewBaby'; +var GET_NEWCHILD_REQUEST = 'Services/Community.svc/REST/CreateNewBaby'; ///newUserId -const GET_NEW_USER_REQUEST = 'Services/Community.svc/REST/CreateNewUser_New'; +var GET_NEW_USER_REQUEST = 'Services/Community.svc/REST/CreateNewUser_New'; ///delete Child -const DELETE_CHILD_REQUEST = 'Services/Community.svc/REST/DeleteBaby'; +var DELETE_CHILD_REQUEST = 'Services/Community.svc/REST/DeleteBaby'; ///addNewTABLE -const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable'; +var GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable'; ///BloodDenote -const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; +var GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; ///BloodDetails -const GET_BLOOD_REQUEST = +var GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; -const SAVE_BLOOD_REQUEST = +var SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -const GET_BLOOD_AGREEMENT = +var GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; -const SAVE_BLOOD_AGREEMENT = +var SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; ///Reports -const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; -const INSERT_REQUEST_FOR_MEDICAL_REPORT = +var REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; +var INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; -const SEND_MEDICAL_REPORT_EMAIL = +var SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail'; ///Rate -// const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; -const IS_LAST_APPOITMENT_RATED = +// var IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; +var IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated_Async'; -const GET_APPOINTMENT_DETAILS_BY_NO = +var GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; -const NEW_RATE_APPOINTMENT_URL = +var NEW_RATE_APPOINTMENT_URL = "Services/Doctors.svc/REST/AppointmentsRating_InsertAppointmentRate"; -const NEW_RATE_DOCTOR_URL = +var NEW_RATE_DOCTOR_URL = "Services/Doctors.svc/REST/DoctorsRating_InsertDoctorRate"; -const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; +var GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; //URL to get clinic list -const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; +var GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; //URL to get active appointment list -const GET_ACTIVE_APPOINTMENTS_LIST_URL = +var GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; //URL to get projects list -const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; +var GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; //URL to get doctors list -const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; +var GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; //URL to dental doctors list -const GET_DENTAL_DOCTORS_LIST_URL = +var GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; //URL to get doctor free slots -const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; +var GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; //URL to insert appointment -const INSERT_SPECIFIC_APPOINTMENT = +var INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment"; //URL to get patient share -const GET_PATIENT_SHARE = +var GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; //URL to get patient appointment history -const GET_PATIENT_APPOINTMENT_HISTORY = +var GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; -const GET_OBGYNE_ORDERS_LIST = +var GET_OBGYNE_ORDERS_LIST = "services/Patients.svc/REST/HIS_OBGYNEProcedureGet"; -const GET_OBGYNE_DOCTORS_LIST = +var GET_OBGYNE_DOCTORS_LIST = "services/Doctors.svc/REST/HIS_ObgyneUltrasoundDoctors"; -const OBGYNE_PROCEDURE_UPDATE = +var OBGYNE_PROCEDURE_UPDATE = "services/Patients.svc/REST/HIS_OBGYNEProcedure_Update"; -const DOCTOR_SCHEDULE_URL = +var DOCTOR_SCHEDULE_URL = 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; -const SEND_REPORT_EYE_EMAIL = +var SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; -const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = +var SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; //URL to get patient appointment curfew history -// const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; -const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = +// var GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; +var GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew_Async"; //URL to confirm appointment -const CONFIRM_APPOINTMENT = +var CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment"; -const INSERT_VIDA_REQUEST = +var INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; //URL to cancel appointment -const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; +var CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; //URL get appointment QR -const GENERATE_QR_APPOINTMENT = +var GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; //URL send email appointment QR -const EMAIL_QR_APPOINTMENT = +var EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; //URL check payment status -const CHECK_PAYMENT_STATUS = +var CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; //URL create advance payment -const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; +var CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; -const HIS_CREATE_ADVANCE_PAYMENT = +var HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; -const ADD_ADVANCE_NUMBER_REQUEST = +var ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; -const GENERATE_ANCILLARY_ORDERS_INVOICE = +var GENERATE_ANCILLARY_ORDERS_INVOICE = 'Services/Doctors.svc/REST/AutoGenerateAncillaryOrderInvoice'; -const IS_ALLOW_ASK_DOCTOR = +var IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; -const GET_CALL_REQUEST_TYPE = +var GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; -const ADD_VIDA_REQUEST = +var ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; -const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; +var SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; -const GET_LIVECARE_CLINICS = +var GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; -const GET_LIVECARE_SCHEDULE_CLINICS = +var GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; -const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = +var GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; -const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = +var GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; -const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = +var INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; -const GET_PATIENT_SHARE_LIVECARE = +var GET_PATIENT_SHARE_LIVECARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; -const GET_LIVECARE_CLINIC_TIMING = +var GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; -const GET_ER_APPOINTMENT_FEES = +var GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; -const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; +var GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; -const ADD_NEW_CALL_FOR_PATIENT_ER = +var ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; -const GET_LIVECARE_HISTORY = +var GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; -const CANCEL_LIVECARE_REQUEST = +var CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; -const SEND_LIVECARE_INVOICE_EMAIL = +var SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; -const APPLE_PAY_INSERT_REQUEST = +var APPLE_PAY_INSERT_REQUEST = 'Services/PayFort_Serv.svc/REST/PayFort_ApplePayRequestData_Insert'; -const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; -const UPDATE_HEALTH_TERMS = +var GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; +var UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; -const GET_PATIENT_HEALTH_STATS = +var GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts'; -const SEND_CHECK_IN_NFC_REQUEST = +var SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; -const HAS_DENTAL_PLAN = +var HAS_DENTAL_PLAN = 'Services/Doctors.svc/REST/Dental_IsPatientHasOnGoingEstimation'; -const LASER_BODY_PARTS = 'Services/Patients.svc/REST/Laser_GetBodyPartsByCategory'; +var LASER_BODY_PARTS = 'Services/Patients.svc/REST/Laser_GetBodyPartsByCategory'; -const INSERT_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Insert'; -const UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Update'; +var INSERT_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Insert'; +var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Update'; //URL to get medicine and pharmacies list -const CHANNEL = 3; -const GENERAL_ID = 'Cs2020@2016\$2958'; -const IP_ADDRESS = '10.20.10.20'; -const VERSION_ID = 7.3; -const SETUP_ID = '91877'; -const LANGUAGE = 2; -const PATIENT_OUT_SA = 0; -const SESSION_ID = 'TMRhVmkGhOsvamErw'; -const IS_DENTAL_ALLOWED_BACKEND = false; -const PATIENT_TYPE = 1; -const PATIENT_TYPE_ID = 1; +var CHANNEL = 3; +var GENERAL_ID = 'Cs2020@2016\$2958'; +var IP_ADDRESS = '10.20.10.20'; +var VERSION_ID = 7.3; +var SETUP_ID = '91877'; +var LANGUAGE = 2; +var PATIENT_OUT_SA = 0; +var SESSION_ID = 'TMRhVmkGhOsvamErw'; +var IS_DENTAL_ALLOWED_BACKEND = false; +var PATIENT_TYPE = 1; +var PATIENT_TYPE_ID = 1; var DEVICE_TOKEN = ""; var IS_VOICE_COMMAND_CLOSED = true; var IS_TEXT_COMPLETED = false; var DeviceTypeID = Platform.isIOS ? 1 : 2; -const LANGUAGE_ID = 2; -const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; -const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; -const GET_PAtIENTS_INSURANCE = +var LANGUAGE_ID = 2; +var GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; +var GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; +var GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; -const GET_PAtIENTS_INSURANCE_UPDATED = +var GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; -const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; -const GET_PATIENT_INSURANCE_DETAILS = +var INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; +var GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; -const UPLOAD_INSURANCE_CARD = +var UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; -const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; -const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; -const GET_PAtIENTS_INSURANCE_APPROVALS = +var GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; +var GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; +var GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus_Async"; -// const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; -const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; +// var GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; +var SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; -const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; -const GET_VACCINATION_ONHAND = "/Services/ERP.svc/REST/GET_VACCINATION_ONHAND"; +var GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; +var GET_VACCINATION_ONHAND = "/Services/ERP.svc/REST/GET_VACCINATION_ONHAND"; -const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; +var GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; -const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; +var SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; -const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = +var GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; -const GET_PATIENT_INFO_BY_ID = +var GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; -const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = +var GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; -const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = +var SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; -const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = +var CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; -const GET_COVID_DRIVETHRU_PROJECT_LIST = +var GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; -const GET_COVID_DRIVETHRU_PAYMENT_INFO = +var GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; -const GET_COVID_DRIVETHRU_FREE_SLOTS = +var GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; -const GET_COVID_DRIVETHRU_PROCEDURES_LIST = +var GET_COVID_DRIVETHRU_PROCEDURES_LIST = 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; ///Smartwatch Integration Services -const GET_PATIENT_LAST_RECORD = +var GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; -const INSERT_PATIENT_HEALTH_DATA = +var INSERT_PATIENT_HEALTH_DATA = 'Services/Patients.svc/REST/Med_InsertTransactions'; ///My Trackers -const GET_DIABETIC_RESULT_AVERAGE = +var GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; -const GET_DIABTEC_RESULT = +var GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; -const ADD_DIABTEC_RESULT = +var ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; -const GET_BLOOD_PRESSURE_RESULT_AVERAGE = +var GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; -const GET_BLOOD_PRESSURE_RESULT = +var GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; -const ADD_BLOOD_PRESSURE_RESULT = +var ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; -const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = +var GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; -const GET_WEIGHT_PRESSURE_RESULT = +var GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; -const ADD_WEIGHT_PRESSURE_RESULT = +var ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; -const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = +var ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; -const GET_CALL_INFO_HOURS_RESULT = +var GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; -const GET_CALL_REQUEST_TYPE_LOV = +var GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; -const UPDATE_DIABETIC_RESULT = +var UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; -const SEND_AVERAGE_BLOOD_SUGAR_REPORT = +var SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; -const DEACTIVATE_DIABETIC_STATUS = +var DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; -const DEACTIVATE_BLOOD_PRESSURES_STATUS = +var DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; -const UPDATE_BLOOD_PRESSURE_RESULT = +var UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; -const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = +var SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; -const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = +var SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; -const UPDATE_WEIGHT_PRESSURE_RESULT = +var UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; -const DEACTIVATE_WEIGHT_PRESSURE_RESULT = +var DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; -const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; -const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; -const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; +var GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; +var UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; +var INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; -const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; +var GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; // H2O -const H2O_GET_USER_PROGRESS = +var H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; -const H2O_INSERT_USER_ACTIVITY = +var H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; -const H2O_GET_USER_DETAIL = +var H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; -const H2O_UPDATE_USER_DETAIL = +var H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; -const H2O_UNDO_USER_ACTIVITY = +var H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; //E_Referral Services -const GET_ALL_RELATIONSHIP_TYPES = +var GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes"; -const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = +var SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; -const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = +var CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; -const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; -const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; -const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; +var GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; +var CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; +var GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; // Encillary Orders -const GET_ANCILLARY_ORDERS = +var GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; -const GET_ANCILLARY_ORDERS_DETAILS = +var GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; //Pharmacy wishlist -// const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; +// var GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; -const GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime"; +var GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime"; // pharmacy -const PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer"; -const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; -const PHARMACY_GET_COUNTRY = "countries"; -// const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer"; -const PHARMACY_CREATE_CUSTOMER = "getorcreateCustomer"; -const GET_PHARMACY_BANNER = "promotionbanners"; -const GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer"; -const GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts"; -const GET_PHARMACY_PRODUCTs_BY_IDS = "productsbyids/"; -const GET_PHARMACY_PRODUCTs_BY_SKU = "productbysku/"; -const GET_CUSTOMERS_ADDRESSES = "Customers/"; -const SUBSCRIBE_PRODUCT = "subscribe?"; -const GET_ORDER = "orders?"; -const GET_ORDER_DETAILS = "orders/"; -const ADD_CUSTOMER_ADDRESS = "addcustomeraddress"; -const EDIT_CUSTOMER_ADDRESS = "editcustomeraddress"; -const DELETE_CUSTOMER_ADDRESS = "deletecustomeraddress"; -const GET_ADDRESS = "Customers/"; -const GET_Cancel_ORDER = "cancelorder/"; -const WRITE_REVIEW = "Content-Type" + "text/plain; charset=utf-8"; -const GET_SHOPPING_CART = "shopping_cart_items/"; -const GET_SHIPPING_OPTIONS = "get_shipping_option/"; -const DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; -const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; -const ORDER_SHOPPING_CART = "orders"; -const GET_LACUM_ACCOUNT_INFORMATION = +var PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer"; +var PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; +var PHARMACY_GET_COUNTRY = "countries"; +// var PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer"; +var PHARMACY_CREATE_CUSTOMER = "getorcreateCustomer"; +var GET_PHARMACY_BANNER = "promotionbanners"; +var GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer"; +var GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts"; +var GET_PHARMACY_PRODUCTs_BY_IDS = "productsbyids/"; +var GET_PHARMACY_PRODUCTs_BY_SKU = "productbysku/"; +var GET_CUSTOMERS_ADDRESSES = "Customers/"; +var SUBSCRIBE_PRODUCT = "subscribe?"; +var GET_ORDER = "orders?"; +var GET_ORDER_DETAILS = "orders/"; +var ADD_CUSTOMER_ADDRESS = "addcustomeraddress"; +var EDIT_CUSTOMER_ADDRESS = "editcustomeraddress"; +var DELETE_CUSTOMER_ADDRESS = "deletecustomeraddress"; +var GET_ADDRESS = "Customers/"; +var GET_Cancel_ORDER = "cancelorder/"; +var WRITE_REVIEW = "Content-Type" + "text/plain; charset=utf-8"; +var GET_SHOPPING_CART = "shopping_cart_items/"; +var GET_SHIPPING_OPTIONS = "get_shipping_option/"; +var DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; +var DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; +var ORDER_SHOPPING_CART = "orders"; +var GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation"; -const GET_LACUM_GROUP_INFORMATION = +var GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; -const LACUM_ACCOUNT_ACTIVATE = +var LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation"; -const LACUM_ACCOUNT_DEACTIVATE = +var LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation"; -const CREATE_LAKUM_ACCOUNT = +var CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount"; -const TRANSFER_YAHALA_LOYALITY_POINTS = +var TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; -const LAKUM_GET_USER_TERMS_AND_CONDITIONS = +var 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_Async'; +// var PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; +var PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; -const GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; -const GET_MOST_VIEWED_PRODUCTS = "mostview"; -const GET_NEW_PRODUCTS = "newproducts"; +var GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; +var GET_MOST_VIEWED_PRODUCTS = "mostview"; +var GET_NEW_PRODUCTS = "newproducts"; // Home Health Care -const HHC_GET_ALL_SERVICES = +var HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; -const HHC_GET_ALL_CMC_SERVICES = +var HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; -const PATIENT_ER_UPDATE_PRES_ORDER = +var PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; -const GET_ORDER_DETAIL_BY_ID = +var GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; -const GET_CMC_ORDER_DETAIL_BY_ID = +var GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; -const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; -const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = +var GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; +var PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; -const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = +var PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; -const GET_PATIENT_ALL_PRES_ORD = +var GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const PATIENT_ER_INSERT_PRES_ORDER = +var PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; -const BLOOD_DONATION_REGISTER_BLOOD_TYPE = +var BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = +var ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; // HHC RC SERVICES -const HHC_GET_ALL_SERVICES_RC = "api/HHC/getallhhc"; -const ADD_HHC_ORDER_RC = "api/HHC/add"; -const GET_ALL_HHC_ORDERS_RC = 'api/hhc/list'; -const UPDATE_HHC_ORDER_RC = 'api/hhc/update'; +var HHC_GET_ALL_SERVICES_RC = "api/HHC/getallhhc"; +var ADD_HHC_ORDER_RC = "api/HHC/add"; +var GET_ALL_HHC_ORDERS_RC = 'api/hhc/list'; +var UPDATE_HHC_ORDER_RC = 'api/hhc/update'; // CMC RC SERVICES -const GET_ALL_CMC_SERVICES_RC = 'api/cmc/getallcmc'; -const ADD_CMC_ORDER_RC = 'api/cmc/add'; -const GET_ALL_CMC_ORDERS_RC = 'api/cmc/list'; -const UPDATE_CMC_ORDER_RC = 'api/cmc/update'; +var GET_ALL_CMC_SERVICES_RC = 'api/cmc/getallcmc'; +var ADD_CMC_ORDER_RC = 'api/cmc/add'; +var GET_ALL_CMC_ORDERS_RC = 'api/cmc/list'; +var UPDATE_CMC_ORDER_RC = 'api/cmc/update'; // RRT RC SERVICES -const ADD_RRT_ORDER_RC = "api/rrt/add"; -const GET_ALL_RRT_ORDERS_RC = "api/rrt/list"; -const UPDATE_RRT_ORDER_RC = 'api/rrt/update'; +var ADD_RRT_ORDER_RC = "api/rrt/add"; +var GET_ALL_RRT_ORDERS_RC = "api/rrt/list"; +var UPDATE_RRT_ORDER_RC = 'api/rrt/update'; // PRESCRIPTION RC SERVICES -const ADD_PRESCRIPTION_ORDER_RC = "api/prescription/add"; -const GET_ALL_PRESCRIPTION_ORDERS_RC = "api/prescription/list"; -const GET_ALL_PRESCRIPTION_INFO_RC = "api/Prescription/info"; -const UPDATE_PRESCRIPTION_ORDER_RC = 'api/prescription/update'; +var ADD_PRESCRIPTION_ORDER_RC = "api/prescription/add"; +var GET_ALL_PRESCRIPTION_ORDERS_RC = "api/prescription/list"; +var GET_ALL_PRESCRIPTION_INFO_RC = "api/Prescription/info"; +var UPDATE_PRESCRIPTION_ORDER_RC = 'api/prescription/update'; //Pharmacy wishlist -const GET_WISHLIST = "shopping_cart_items/"; -const DELETE_WISHLIST = "delete_shopping_cart_item_by_product?customer_id="; -const GET_REVIEW = "customerreviews/"; -const GET_BRANDS = "manufacturer"; -const GET_TOP_BRANDS = "topmanufacturer?page=1&limit=8"; -const GET_PRODUCT_DETAIL = "products/"; -const GET_LOCATION = "Services/Patients.svc/REST/GetPharmcyListBySKU"; -const GET_SPECIFICATION = "productspecification/"; -const GET_BRAND_ITEMS = "products"; -const PHARMACY_MAKE_REVIEW = 'insertreviews'; +var GET_WISHLIST = "shopping_cart_items/"; +var DELETE_WISHLIST = "delete_shopping_cart_item_by_product?customer_id="; +var GET_REVIEW = "customerreviews/"; +var GET_BRANDS = "manufacturer"; +var GET_TOP_BRANDS = "topmanufacturer?page=1&limit=8"; +var GET_PRODUCT_DETAIL = "products/"; +var GET_LOCATION = "Services/Patients.svc/REST/GetPharmcyListBySKU"; +var GET_SPECIFICATION = "productspecification/"; +var GET_BRAND_ITEMS = "products"; +var PHARMACY_MAKE_REVIEW = 'insertreviews'; // External API -const ADD_ADDRESS_INFO = "addcustomeraddress"; -const GET_CUSTOMER_ADDRESSES = "Customers/"; -const GET_CUSTOMER_INFO = "VerifyCustomer"; +var ADD_ADDRESS_INFO = "addcustomeraddress"; +var GET_CUSTOMER_ADDRESSES = "Customers/"; +var GET_CUSTOMER_INFO = "VerifyCustomer"; //Pharmacy -const GET_PHARMACY_CATEGORISE = +var GET_PHARMACY_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0'; -const GET_OFFERS_CATEGORISE = 'discountcategories'; -const GET_OFFERS_PRODUCTS = 'offerproducts/'; -const GET_CATEGORISE_PARENT = +var GET_OFFERS_CATEGORISE = 'discountcategories'; +var GET_OFFERS_PRODUCTS = 'offerproducts/'; +var GET_CATEGORISE_PARENT = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; -const GET_PARENT_PRODUCTS = 'products?categoryid='; -const GET_SUB_CATEGORISE = +var GET_PARENT_PRODUCTS = 'products?categoryid='; +var GET_SUB_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; -const GET_SUB_PRODUCTS = 'products?categoryid='; -const GET_FINAL_PRODUCTS = +var GET_SUB_PRODUCTS = 'products?categoryid='; +var 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='; -const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; -const GET_DISEASE_BY_CLINIC_ID = +var GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; +var GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; -const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; +var SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; -const TIMER_MIN = 10; +var TIMER_MIN = 10; -const GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw"; +var GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw"; -const GET_BRANDS_LIST = 'categoryManufacturer?categoryids='; +var GET_BRANDS_LIST = 'categoryManufacturer?categoryids='; -const GET_SEARCH_PRODUCTS = +var GET_SEARCH_PRODUCTS = 'searchproducts?fields=id,discount_ids,reviews,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&search_key='; -const SCAN_QR_CODE = 'productbysku/'; +var SCAN_QR_CODE = 'productbysku/'; -const FILTERED_PRODUCTS = 'products?categoryids='; +var FILTERED_PRODUCTS = 'products?categoryids='; -const GET_DOCTOR_LIST_CALCULATION = +var GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors"; -const GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = +var GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = "Services/Patients.svc/REST/GetDentalAppointments"; -const GET_DENTAL_APPOINTMENT_INVOICE = +var GET_DENTAL_APPOINTMENT_INVOICE = "Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo"; -const SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = +var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = "Services/Notifications.svc/REST/SendInvoiceForDental"; class AppGlobal { diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index e6916cae..ffcca5d7 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -637,6 +637,7 @@ const Map localizedValues = { "accountActivation": {"en": "Account Activation", "ar": "تفعيل الحساب"}, "lakumTransfer": {"en": "Lakum Transfer", "ar": "تحويل نقاط لكم"}, "acceptLbl": {"en": "Accept", "ar": "موافقة"}, + "declineLbl": {"en": "Decline", "ar": "انخفاض"}, "select-gender": {"en": "Select Gender", "ar": "اختر الجنس"}, "i-am-a": {"en": "I am a ...", "ar": "أنا ..."}, "select-age": {"en": "Select Your Age", "ar": "حدد العمر"}, @@ -957,9 +958,8 @@ const Map localizedValues = { "iAcceptTermsConditions": {"en": "I Accept the Terms and Conditions", "ar": "أوافق على الشروط والأحكام"}, "YouCanPayByTheFollowingOptions": {"en": "You can pay by the following options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"}, "RRTDDetails": { - "en": - "The RRT service provides medical service for urgent and stable cases, not life-threatening situations or extremities, and the service includes providing medical care from a complete medical team at home.", - "ar": "توفر خدمة فريق الاستجابة السريع RRT خدمه طبيه للحالات المستعجله والمستقره وليست الحالات المهدده للحياه او الاطراف ، وتشمل الخدمه تقديم رعايه طبيه من فريق طبي متكامل بالمنزل." + "en": "The Rapid response team provides a comprehensive medical service for all sorts of urgent and stable cases of all ages, including adult and paediatric patients, the service is covered by a fully equipped and highly trained medical team capable of providing the best medical care at the patient’s home.", + "ar": "فريق الاستجابة السريعة يقوم بتقديم رعاية صحية متكاملة لجميع الحالات الطارئة و المستقرة، الخدمة تشمل جميع الأعمار بما في ذلك حالات الأطفال، تشمل الخدمة إرسال فريق طبي كامل الجاهزية و على مستوى عالي من التدريب قادر على تقديم أفضل رعاية صحية من داخل المنزل." }, "rrtService": {"en": "RRT Service", "ar": "خدمة RRT"}, "bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"}, diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index c337de3c..70532e36 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -124,7 +124,7 @@ class BaseAppClient { // body['IdentificationNo'] = 2076117163; // body['MobileNo'] = "966503109207"; - // body['PatientID'] = 2380476; //3844083 + // body['PatientID'] = 3114694; //3844083 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 @@ -140,7 +140,7 @@ class BaseAppClient { if (await Utils.checkConnection()) { final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final int statusCode = response.statusCode; - print("statusCode :$statusCode"); + // print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { onFailure('Error While Fetching data', statusCode); } else { @@ -307,14 +307,14 @@ class BaseAppClient { } } - print("URL : $url"); - print("Body : ${json.encode(body)}"); - print("Headers : ${json.encode(headers)}"); + // print("URL : $url"); + // print("Body : ${json.encode(body)}"); + // print("Headers : ${json.encode(headers)}"); if (await Utils.checkConnection()) { final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final int statusCode = response.statusCode; - print("statusCode :$statusCode"); + // print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { onFailure('Error While Fetching data', statusCode); } else { @@ -409,7 +409,7 @@ class BaseAppClient { url += '?' + queryString; } - print("URL : $url"); + // print("URL : $url"); if (await Utils.checkConnection()) { final response = await http.get( @@ -417,7 +417,7 @@ class BaseAppClient { headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}, ); final int statusCode = response.statusCode; - print("statusCode :$statusCode"); + // print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { onFailure('Error While Fetching data', statusCode); @@ -465,7 +465,7 @@ class BaseAppClient { 'Host': "mdlaboratories.com", }); final int statusCode = response.statusCode; - print("statusCode :$statusCode"); + // print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode == 401) { @@ -473,7 +473,7 @@ class BaseAppClient { Navigator.of(AppGlobal.context).pushNamed(HOME); } else { var bodyUtf = json.decode(utf8.decode(response.bodyBytes)); - print(bodyUtf); + // print(bodyUtf); onFailure(bodyUtf['error']['ErrorEndUserMsg'], statusCode); } } else { @@ -494,8 +494,8 @@ class BaseAppClient { Function(String error, int statusCode) onFailure, }) async { String url = fullUrl; - print("URL Query String: $url"); - print("body: $body"); + // print("URL Query String: $url"); + // print("body: $body"); if (await Utils.checkConnection()) { headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); @@ -505,10 +505,10 @@ class BaseAppClient { headers: headers, ); final int statusCode = response.statusCode; - print("statusCode :$statusCode"); + // print("statusCode :$statusCode"); if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePost(fullUrl, onFailure: onFailure, onSuccess: onSuccess, body: body, headers: headers); - print(response.body.toString()); + // print(response.body.toString()); if (statusCode < 200 || statusCode >= 400 || json == null) { onFailure('Error While Fetching data', statusCode); @@ -529,7 +529,7 @@ class BaseAppClient { if (haveParams) { String queryString = Uri(queryParameters: queryParams).query; url += '?' + queryString; - print("URL Query String: $url"); + // print("URL Query String: $url"); } if (await Utils.checkConnection()) { @@ -540,7 +540,7 @@ class BaseAppClient { ); final int statusCode = response.statusCode; - print("statusCode :$statusCode"); + // print("statusCode :$statusCode"); if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleGet(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, queryParams: queryParams); if (statusCode < 200 || statusCode >= 400 || json == null) { @@ -555,7 +555,7 @@ class BaseAppClient { simplePut(String fullUrl, {Map body, Map headers, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure}) async { String url = fullUrl; - print("URL Query String: $url"); + // print("URL Query String: $url"); if (await Utils.checkConnection()) { headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); @@ -566,7 +566,7 @@ class BaseAppClient { ); final int statusCode = response.statusCode; - print("statusCode :$statusCode"); + // print("statusCode :$statusCode"); if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePut(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, body: body); if (statusCode < 200 || statusCode >= 400 || json == null) { @@ -582,13 +582,13 @@ class BaseAppClient { simpleDelete(String fullUrl, {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map queryParams, Map headers}) async { String url = fullUrl; - print("URL Query String: $url"); + // print("URL Query String: $url"); var haveParams = (queryParams != null); if (haveParams) { String queryString = Uri(queryParameters: queryParams).query; url += '?' + queryString; - print("URL Query String: $url"); + // print("URL Query String: $url"); } if (await Utils.checkConnection()) { @@ -599,7 +599,7 @@ class BaseAppClient { ); final int statusCode = response.statusCode; - print("statusCode :$statusCode"); + // print("statusCode :$statusCode"); if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleDelete(fullUrl, onFailure: onFailure, onSuccess: onSuccess, queryParams: queryParams, headers: headers); if (statusCode < 200 || statusCode >= 400 || json == null) { @@ -729,8 +729,8 @@ class BaseAppClient { } } - print("URL : $url"); - print("Body : ${json.encode(body)}"); + // print("URL : $url"); + // print("Body : ${json.encode(body)}"); var ss = json.encode(body); if (await Utils.checkConnection()) { @@ -746,7 +746,7 @@ class BaseAppClient { 'Username': user != null ? user['PatientID'].toString() : "", }); final int statusCode = response.statusCode; - print("statusCode :$statusCode"); + // print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { var parsed = json.decode(utf8.decode(response.bodyBytes)); onFailure(parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode); diff --git a/lib/core/service/parmacyModule/parmacy_module_service.dart b/lib/core/service/parmacyModule/parmacy_module_service.dart index d13a8895..297c8e53 100644 --- a/lib/core/service/parmacyModule/parmacy_module_service.dart +++ b/lib/core/service/parmacyModule/parmacy_module_service.dart @@ -44,7 +44,7 @@ class PharmacyModuleService extends BaseService { var data = await sharedPref.getObject(USER_PROFILE); var languageID = await sharedPref.getString(APP_LANGUAGE); Map queryParams = { - 'Phone': data['MobileNumber'], + 'Phone': Utils.getPhoneNumberWithoutZero(data['MobileNumber']), 'FileNumber': data['PatientID'].toString(), 'Language': languageID.toString() == 'en' ? '2' : '1', 'Iqama': data['PatientIdentificationNo'], diff --git a/lib/main.dart b/lib/main.dart index 12789f28..254e0456 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:diplomaticquarterapp/core/viewModels/PharmacyPagesViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; @@ -32,6 +34,7 @@ void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); setupLocator(); + HttpOverrides.global = MyHttpOverrides(); runApp(MyApp()); } @@ -40,6 +43,15 @@ class MyApp extends StatefulWidget { _MyApp createState() => new _MyApp(); } +class MyHttpOverrides extends HttpOverrides{ + @override + HttpClient createHttpClient(SecurityContext context){ + return super.createHttpClient(context) + ..badCertificateCallback = (X509Certificate cert, String host, int port)=> true; + } +} + + class _MyApp extends State { AppUpdateInfo _updateInfo; diff --git a/lib/pages/BookAppointment/book_reminder_page.dart b/lib/pages/BookAppointment/book_reminder_page.dart index ddf741f1..8085976c 100644 --- a/lib/pages/BookAppointment/book_reminder_page.dart +++ b/lib/pages/BookAppointment/book_reminder_page.dart @@ -58,8 +58,6 @@ class _BookReminderPageState extends State { @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); - // print("selectedTime "+selectedTime??""); - print("appointmentNo1 " + widget.patientShareResponse.appointmentNo.toString() ?? ""); return AppScaffold( appBarTitle: widget.docObject.doctorTitle + " " + widget.docObject.name, isShowDecPage: false, diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index cc3af6f7..5e6997bd 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -12,7 +12,6 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart'; -import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; @@ -130,7 +129,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { controller: _tabController, children: [ Container( - child: ListView.builder( + child: widget.appoList.length != 0 ? ListView.builder( scrollDirection: Axis.vertical, shrinkWrap: true, physics: ScrollPhysics(), @@ -287,10 +286,10 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { ), ); }, - ), + ) : getNoDataWidget(context), ), Container( - child: ListView.builder( + child: widget.obGyneAppoList.length != 0 ? ListView.builder( scrollDirection: Axis.vertical, shrinkWrap: true, physics: ScrollPhysics(), @@ -386,7 +385,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { ), ); }, - ), + ) : getNoDataWidget(context), ), ], ), diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 3a980884..1fcc0c24 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -186,12 +186,12 @@ class _LandingPageState extends State with WidgetsBindingObserver { pageController.jumpToPage(0); currentTab = tab; } else if (tab != 0) { - if (tab == 4 && projectViewModel.isLogin && model.count == 0) { - AppToast.showErrorToast(message: TranslationBase.of(context).noBookedAppo); - } else { + // if (tab == 4 && projectViewModel.isLogin && model.count == 0) { + // AppToast.showErrorToast(message: TranslationBase.of(context).noBookedAppo); + // } else { pageController.jumpToPage(tab); currentTab = tab; - } + // } } else { pageController.jumpToPage(tab); currentTab = tab; diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart index ef5ad06b..323b37de 100644 --- a/lib/pages/landing/widgets/services_view.dart +++ b/lib/pages/landing/widgets/services_view.dart @@ -14,9 +14,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dar import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart'; import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; -import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/new/child_initial_page.dart'; -import 'package:diplomaticquarterapp/pages/ChildVaccines/new/child_vaccine_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; @@ -29,7 +27,9 @@ import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -59,7 +59,7 @@ class ServicesView extends StatelessWidget { }); } else if (index == 1) { locator().hmgServices.logServiceName('covid-test drive-thru'); - Navigator.push(context, FadePage(page: CovidDrivethruLocation())); + showCovidDialog(context); } else if (index == 2) { locator().hmgServices.logServiceName('online payments'); Navigator.push(context, FadePage(page: PaymentService())); @@ -167,11 +167,14 @@ class ServicesView extends StatelessWidget { launch("https://hmgwebservices.com/vt_mobile/html/index.html"); } else if (index == 22) { locator().hmgServices.logServiceName('latest news'); - Navigator.of(context).push(MaterialPageRoute( + Navigator.of(context).push( + MaterialPageRoute( builder: (BuildContext context) => MyWebView( title: "HMG News", selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", - ),),); + ), + ), + ); } }, child: Container( @@ -274,6 +277,20 @@ class ServicesView extends StatelessWidget { ); } + showCovidDialog(BuildContext context) { + showDialog( + context: context, + builder: (cxt) => CovidConsentDialog( + okTitle: TranslationBase.of(context).acceptLbl, + title: "User Consent", + message: + "Covid-19 Test feature allows you to book appointment for Covid-19 Lab test within HMG branches where a swab sample will be collected & will be processed. Once the result has been processed you shall be notified via SMS on your registered mobile number & the test result will also be available in the Lab Results section of this app. Please note that this result is only available to you & not publicly available to anyone else. \nPlease accept to confirm & proceed.", + onTap: () async { + Navigator.push(context, FadePage(page: CovidDrivethruLocation())); + }, + )); + } + getPharmacyToken(BuildContext context) async { if (!authProvider.isLogin) { Navigator.push(context, FadePage(page: LandingPagePharmacy())); diff --git a/lib/pages/livecare/incoming_call.dart b/lib/pages/livecare/incoming_call.dart index a420dc94..e3de76b4 100644 --- a/lib/pages/livecare/incoming_call.dart +++ b/lib/pages/livecare/incoming_call.dart @@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/pages/conference/web_rtc/call_home_page.dar import 'package:diplomaticquarterapp/pages/conference/web_rtc/call_home_page_.dart'; import 'package:diplomaticquarterapp/pages/conference/widgets/platform_exception_alert_dialog.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -29,6 +30,8 @@ class _IncomingCallState extends State with SingleTickerProviderSt CameraController _controller; Future _initializeControllerFuture; bool isCameraReady = false; + Signaling signaling = Signaling()..init(); + @override void initState() { @@ -198,119 +201,6 @@ class _IncomingCallState extends State with SingleTickerProviderSt } }, ), - // body: isCameraReady - // ? - // : Container( - // height: 200.0, - // width: 200.0, - // color: Colors.green, - // ), - // body: Container( - // decoration: BoxDecoration(color: Colors.grey[700]), - // child: Column( - // mainAxisAlignment: MainAxisAlignment.start, - // mainAxisSize: MainAxisSize.max, - // children: [ - // Container( - // margin: EdgeInsets.only(top: 30.0), - // alignment: Alignment.center, - // child: Text("Incoming Video Call", textAlign: TextAlign.center, style: TextStyle(fontSize: 26.0, color: Colors.white, letterSpacing: 1.0)), - // ), - // Container( - // alignment: Alignment.center, - // margin: EdgeInsets.fromLTRB(50.0, 30.0, 50.0, 20.0), - // child: Image.asset('assets/images/new-design/hmg_full_logo_hd_white.png'), - // ), - // Container( - // margin: EdgeInsets.fromLTRB(30.0, 10.0, 30.0, 0.0), - // child: Divider( - // color: Colors.white, - // thickness: 1.0, - // ), - // ), - // Container( - // margin: EdgeInsets.only(top: 20.0), - // alignment: Alignment.center, - // child: Text("Dr Eyad Ismail Abu Jayab", textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, letterSpacing: 0.8, color: Colors.white)), - // ), - // Container( - // margin: EdgeInsets.only(top: 10.0), - // alignment: Alignment.center, - // child: Text("ENT Clinic", textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, letterSpacing: 0.8, color: Colors.white)), - // ), - // Container( - // margin: EdgeInsets.only(top: 10.0), - // alignment: Alignment.center, - // child: Text("Speciality", textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, letterSpacing: 0.8, color: Colors.white)), - // ), - // Container( - // decoration: BoxDecoration( - // color: Colors.grey[900].withOpacity(0.8), - // borderRadius: BorderRadius.all(Radius.circular(10.0)), - // ), - // padding: EdgeInsets.all(20.0), - // margin: EdgeInsets.only(top: 20.0), - // child: Column( - // children: [ - // Text("Appointment Information", textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold, letterSpacing: 1.0, color: Colors.white)), - // Container( - // margin: EdgeInsets.only(top: 20.0), - // child: Text("Sun, 15th Dec, 2019, 09:00", textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, letterSpacing: 1.0, color: Colors.white)), - // ), - // Container( - // margin: EdgeInsets.only(top: 20.0), - // child: Text("ENT Clinic", textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, letterSpacing: 1.0, color: Colors.white)), - // ), - // ], - // ), - // ), - // Container( - // margin: EdgeInsets.only(top: 100.0), - // alignment: Alignment.center, - // child: Row( - // mainAxisSize: MainAxisSize.max, - // mainAxisAlignment: MainAxisAlignment.spaceEvenly, - // children: [ - // RotationTransition( - // turns: Tween(begin: 0.0, end: -.1).chain(CurveTween(curve: Curves.elasticIn)).animate(_animationController), - // child: Container( - // child: RawMaterialButton( - // onPressed: () { - // _submit(); - // }, - // elevation: 2.0, - // fillColor: Colors.green, - // child: Icon( - // Icons.call, - // color: Colors.white, - // size: 35.0, - // ), - // padding: EdgeInsets.all(15.0), - // shape: CircleBorder(), - // ), - // )), - // Container( - // child: RawMaterialButton( - // onPressed: () { - // LandingPage.isOpenCallPage = false; - // backToHome(); - // }, - // elevation: 2.0, - // fillColor: Colors.red, - // child: Icon( - // Icons.call_end, - // color: Colors.white, - // size: 35.0, - // ), - // padding: EdgeInsets.all(15.0), - // shape: CircleBorder(), - // ), - // ), - // ], - // ), - // ), - // ], - // )), ); } @@ -338,17 +228,8 @@ class _IncomingCallState extends State with SingleTickerProviderSt } Future _submit() async { - // backToHome(); try { final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity); - - // await Navigator.of(context).push( - // MaterialPageRoute( - // fullscreenDialog: true, - // builder: (BuildContext context) => - // ConferencePage(roomModel: roomModel), - // ), - // ); await _controller.dispose(); await Navigator.of(context).pushReplacement( MaterialPageRoute( @@ -364,10 +245,10 @@ class _IncomingCallState extends State with SingleTickerProviderSt } } - void backToHome() { + void backToHome() async { + final connected = await signaling.declineCall(widget.incomingCallData.callerID, widget.incomingCallData.receiverID); LandingPage.isOpenCallPage = false; player.stop(); -// disposeAudioResources(); Navigator.of(context).pop(); } diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 49ef4c1c..36be3926 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -391,7 +391,6 @@ class _clinic_listState extends State { } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - // AppToast.showErrorToast(message: err); print(err); }); } diff --git a/lib/pages/settings/profile_setting.dart b/lib/pages/settings/profile_setting.dart index efb4ecae..8769b00a 100644 --- a/lib/pages/settings/profile_setting.dart +++ b/lib/pages/settings/profile_setting.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; @@ -26,20 +27,20 @@ class _ProfileSettings extends State with TickerProviderStateMi TextEditingController emergencyContact = new TextEditingController(); TextEditingController emailController = new TextEditingController(); TextEditingController emergencyContactName = new TextEditingController(); + ProjectViewModel projectProvider; @override void initState() { - Future.delayed(new Duration(seconds: 0), () { - ProjectViewModel projectProvider; - projectProvider = Provider.of(context); - if (projectProvider.isLogin == true) getSettings(context); - }); + super.initState(); } Widget build(BuildContext context) { + projectProvider = Provider.of(context); return BaseView( - onModelReady: (model) => {}, + onModelReady: (model) => { + getSettings() + }, builder: (_, model, wi) => Container( child: model.user != null ? Column( @@ -329,9 +330,11 @@ class _ProfileSettings extends State with TickerProviderStateMi ); } - getSettings(context) { - GifLoaderDialogUtils.showMyDialog(context); - authService.getSettings().then((result) => {GifLoaderDialogUtils.hideDialog(context), setValue(result["PateintInfoForUpdateList"][0])}); + getSettings() { + // GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + authService.getSettings().then((result) => { + // GifLoaderDialogUtils.hideDialog(AppGlobal.context), + setValue(result["PateintInfoForUpdateList"][0])}); } setValue(value) { diff --git a/lib/pages/webRTC/call_page.dart b/lib/pages/webRTC/call_page.dart index c85fba95..8a5625b2 100644 --- a/lib/pages/webRTC/call_page.dart +++ b/lib/pages/webRTC/call_page.dart @@ -119,8 +119,8 @@ class _CallPageState extends State { dummyCall() async { final json = { - "callerID": "12345", - "receiverID": "54321", + "callerID": "9920", + "receiverID": "2001273", "msgID": "123", "notfID": "123", "notification_foreground": "true", diff --git a/lib/pages/webRTC/signaling.dart b/lib/pages/webRTC/signaling.dart index 44de7488..a4ba6900 100644 --- a/lib/pages/webRTC/signaling.dart +++ b/lib/pages/webRTC/signaling.dart @@ -26,7 +26,8 @@ class Signaling { initializeSignalR(String userName) async { if (signalR != null) await signalR.closeConnection(); // https://vcallapi.hmg.com/webRTCHub?source=web&username=zohaib - signalR = SignalRUtil(hubName: "https://vcallapi.hmg.com/webRTCHub?source=mobile&username=$userName"); + // signalR = SignalRUtil(hubName: "https://vcallapi.hmg.com/webRTCHub?source=mobile&username=$userName"); + signalR = SignalRUtil(hubName: "http://35.193.237.29/webRTCHub?source=mobile&username=$userName"); final connected = await signalR.openConnection(); if (!connected) throw 'Failed to connect SignalR'; } @@ -39,12 +40,24 @@ class Signaling { // ] 'iceServers': [ + // {'url': "stun:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3478"}, + // {'url': "turn:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3479", 'credential': "admin", 'username': "admin"} + // {'url': "stun:15.185.116.59:3478"}, // { - // 'urls': ['stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302'] + // "url":"turn:15.185.116.59:3479", + // "username": "admin", + // "credential":"admin" // } - - {'url': "stun:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3478"}, - {'url': "turn:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3479", 'credential': "admin", 'username': "admin"} + { + "url": "stun:global.stun.twilio.com:3478?transport=udp", + "urls": "stun:global.stun.twilio.com:3478?transport=udp" + }, + { + "url": "turn:global.turn.twilio.com:3478?transport=udp", + "username": "f18fc347ba4aeeaa1b00f5199b1e900834b464962d434a4a89b4cdba02510047", + "urls": "turn:global.turn.twilio.com:3478?transport=udp", + "credential": "WX16BB+9nKm0f+Whf5EwpM8S/Yv+T2tlvQWLfdV7oqo=" + } ] }; @@ -66,7 +79,7 @@ class Signaling { // } Future acceptCall(String caller, String receiver, {@required MediaStream localMediaStream, @required Function(MediaStream) onRemoteMediaStream}) async { - await initializeSignalR(receiver); + await initializeSignalR("2001273"); signalR.setContributors(caller: caller, receiver: receiver); await signalR.acceptCall(receiver, caller).catchError((e) => throw 'Failed to inform signalR that i accepted a call'); @@ -76,7 +89,20 @@ class Signaling { remoteStream = stream; onRemoteMediaStream?.call(stream); }; + return true; + } + Future declineCall(String caller, String receiver) async { + await initializeSignalR(receiver); + signalR.setContributors(caller: caller, receiver: receiver); + await signalR.declineCall(receiver, caller).catchError((e) => throw 'Failed to inform signalR that i accepted a call'); + + // peerConnection.addStream(localMediaStream); + // + // peerConnection?.onAddStream = (MediaStream stream) { + // remoteStream = stream; + // onRemoteMediaStream?.call(stream); + // }; return true; } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index d525dbb1..54c7cc24 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -166,8 +166,8 @@ class ClinicListService extends BaseService { "PatientOutSA": 0, "SessionID": null, "isDentalAllowedBackend": true, - "Latitude": lat.toString(), - "Longitude": long.toString(), + "Latitude": lat != null ? lat.toString() : "0.0", + "Longitude": long != null ? long.toString() : "0.0", "DeviceTypeID": req.DeviceTypeID, "IsPublicRequest": true }; diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index d1ab1259..67f08479 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2832,6 +2832,8 @@ class TranslationBase { String get connectTitle => localizedValues["connectTitle"][locale.languageCode]; String get connectSubtitle => localizedValues["connectSubtitle"][locale.languageCode]; + + String get declineLbl => localizedValues["declineLbl"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/dialogs/confirm_dialog.dart b/lib/widgets/dialogs/confirm_dialog.dart index 24827349..b677fb3e 100644 --- a/lib/widgets/dialogs/confirm_dialog.dart +++ b/lib/widgets/dialogs/confirm_dialog.dart @@ -18,18 +18,6 @@ class ConfirmDialog { ConfirmDialog({@required this.context, this.title, @required this.confirmMessage, @required this.okText, @required this.cancelText, @required this.okFunction, @required this.cancelFunction}); showAlertDialog(BuildContext context) { - // set up the buttons - - // set up the AlertDialog - // AlertDialog alert = AlertDialog( - // title: title != null ? Text(title) : Text(TranslationBase.of(context).confirm), - // content: Text(this.confirmMessage), - // actions: [ - // cancelButton, - // continueButton, - // ], - // ); - Dialog alert = Dialog( child: Container( color: Colors.transparent, diff --git a/lib/widgets/dialogs/covid_consent_dialog.dart b/lib/widgets/dialogs/covid_consent_dialog.dart new file mode 100644 index 00000000..1b8585bf --- /dev/null +++ b/lib/widgets/dialogs/covid_consent_dialog.dart @@ -0,0 +1,84 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:flutter/material.dart'; + +class CovidConsentDialog extends StatelessWidget { + final String title; + final String message; + final String okTitle; + final VoidCallback onTap; + + const CovidConsentDialog({Key key, this.title, @required this.message, this.okTitle, this.onTap}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Dialog( + backgroundColor: Colors.white, + shape: RoundedRectangleBorder(), + insetPadding: EdgeInsets.only(left: 21, right: 21), + child: Padding( + padding: EdgeInsets.only(left: 20, right: 20, top: 18, bottom: 28), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.only(top: 16.0), + child: Text( + title ?? TranslationBase.of(context).confirm, + style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Color(0xff2B353E), height: 35 / 24, letterSpacing: -0.96), + ), + ), + ), + IconButton( + padding: EdgeInsets.zero, + icon: Icon(Icons.close), + color: Color(0xff2B353E), + constraints: BoxConstraints(), + onPressed: () { + Navigator.pop(context); + }, + ) + ], + ), + Text( + message, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff808080), letterSpacing: -0.48), + ), + SizedBox(height: 28), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).declineLbl, + () => Navigator.pop(context), + textColor: Colors.white, + color: CustomColors.accentColor, + ), + ), + SizedBox(width: 10), + Expanded( + child: DefaultButton( + okTitle ?? TranslationBase.of(context).ok, + () { + Navigator.pop(context); + onTap(); + }, + textColor: Colors.white, + color: CustomColors.green, + ), + ), + ], + ), + ], + ), + ), + ); + } +} diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index c74eb3d3..6348edfc 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -16,6 +16,7 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStat import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notifications_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; +import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart'; import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; @@ -443,7 +444,7 @@ class _AppDrawerState extends State { mHeight(12), InkWell( onTap: () { - // Navigator.push(context, FadePage(page: CallPage())); + Navigator.push(context, FadePage(page: CallPage())); locator().hamburgerMenu.logMenuItemClick('cloud solution logo tap'); String patientID = '2001273'; GifLoaderDialogUtils.showMyDialog(context); diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 66b9a342..39c620d5 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -31,13 +31,12 @@ class MyInAppBrowser extends InAppBrowser { // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWeb/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE - static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT - // static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT - - static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store + // static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store // static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; diff --git a/pubspec.yaml b/pubspec.yaml index ab0a256d..dad0f3df 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -204,6 +204,7 @@ dependency_overrides: provider : ^5.0.0 permission_handler : ^6.0.1+1 flutter_svg: ^1.0.0 + firebase_messaging_platform_interface: 3.1.6 dev_dependencies: