Merge remote-tracking branch 'origin/dev_v3.13.6' into dev_v3.13.6

# Conflicts:
#	android/app/build.gradle
merge-update-with-lab-changes
Aamir 1 year ago
commit 45bc6a91a4

@ -35,8 +35,24 @@ apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
configurations.all {
c ->
c.resolutionStrategy.eachDependency {
DependencyResolveDetails dependency ->
println dependency.requested.group
if (dependency.requested.group == 'org.bouncycastle') {
dependency.useTarget 'org.bouncycastle:bcprov-jdk15to18:1.68'
}
}
}
//configurations.all {
// resolutionStrategy {
// force 'androidx.core:core-ktx:1.6.0'
// }
//}
android {
namespace = "com.ejada.hmg"
compileSdkVersion 34
// ndkVersion "24.0.8215888"
@ -44,26 +60,10 @@ android {
viewBinding true
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
kotlin {
jvmToolchain(17)
}
buildFeatures {
buildConfig = true
}
lintOptions {
disable 'MissingTranslation'
checkReleaseBuilds false
@ -71,9 +71,10 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.ejada.hmg"
minSdkVersion 26
targetSdkVersion 33
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
@ -127,6 +128,12 @@ android {
pickFirst '**/*.so'
}
compileOptions {
// coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
flutter {
@ -192,7 +199,6 @@ dependencies {
implementation files('libs/Penguin.aar')
implementation files('libs/PenguinRenderer.aar')
// implementation "org.jetbrains.anko:anko-commons:$anko_version"
// implementation "org.jetbrains.anko:anko-commons:0.10.4"
implementation 'com.github.kittinunf.fuel:fuel:2.3.0' //for JVM
implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0'
@ -206,6 +212,4 @@ dependencies {
implementation 'com.google.android.material:material:1.9.0'
androidTestImplementation "androidx.test:core:1.4.0"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
}

@ -34,9 +34,8 @@
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" />
<uses-feature android:name="android.hardware.sensor.stepcounter" android:required="false" />
<uses-feature android:name="android.hardware.sensor.stepdetector" android:required="false" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.INTERNET" />

@ -31,7 +31,7 @@ var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://webservices.hmg.com/';
// var BASE_URL = 'http://10.50.100.198:4422/';
// var BASE_URL = 'http://10.200.204.42/';
// Pharmacy UAT URLs
// var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -215,6 +215,7 @@ var GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
//URL to get clinic list
var GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
var GET_CLINICS_LIST_WRT_HOSPITAL_URL = "Services/Lists.svc/REST/GetClinicFromDoctorSchedule";
//URL to get active appointment list
var GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
@ -353,7 +354,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 16.4;
var VERSION_ID = 16.7;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;
@ -610,9 +611,9 @@ var GET_DENTAL_APPOINTMENT_INVOICE = "Services/Patients.svc/REST/HIS_eInvoiceFor
var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = "Services/Notifications.svc/REST/SendInvoiceForDental";
var GET_TAMARA_PLAN = 'https://mdlaboratories.com/tamara/Home/GetInstallments';
var GET_TAMARA_PLAN = 'https://mdlaboratories.com/tamaralive/Home/GetInstallments';
var GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamara/api/OnlineTamara/order_status?orderid=';
var GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid=';
var UPDATE_TAMARA_STATUS = 'Services/PayFort_Serv.svc/REST/Tamara_UpdateRequestStatus';
@ -679,10 +680,10 @@ var INSERT_WALKIN_APPOINTMENT = "Services/Doctors.svc/REST/InsertWalkinAppointme
//PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
var payFortEnvironment = FortEnvironment.production;
var applePayMerchantId = "merchant.com.hmgwebservices";
// var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat";
// var payFortEnvironment = FortEnvironment.production;
// var applePayMerchantId = "merchant.com.hmgwebservices";
var payFortEnvironment = FortEnvironment.test;
var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal {
static var context;

@ -45,6 +45,8 @@ const Map localizedValues = {
'name': {'en': 'Name', 'ar': 'الإسم'},
'doctor': {'en': 'Doctor', 'ar': 'الطبيب'},
'clinicName': {'en': 'Clinic Name', 'ar': 'اسم العيادة'},
'hospitalName': {'en': 'Hospital Name', 'ar': 'اسم المستشفى'},
'NoClinicFound': {'en': 'No Clinic Found', 'ar': 'لم يتم العثور على عيادة'},
'doctorName': {'en': 'Doctor Name', 'ar': 'إسم الطبيب'},
'nearestAppo': {'en': 'Nearest Appointment', 'ar': 'أقرب موعد'},
'searchByDocText': {'en': 'Type the name of the doctor to help you find him', 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'},
@ -1870,8 +1872,14 @@ const Map localizedValues = {
"insuranceClassName": {"en": "Insurance Class", "ar": "فئة التأمين"},
"insuranceRequestSubmit": {"en": "Your insurance update request has been submitted successfully.", "ar": "تم تقديم طلب تحديث التأمين الخاص بك بنجاح."},
"NFCNotSupported": {"en": "Your device does not support NFC. Please visit reception to Check-In", "ar": "جهازك لا يدعم NFC. يرجى زيارة مكتب الاستقبال لتسجيل الوصول"},
"enter-workplace-name": {"en": "Please enter your workplace name:", "ar": "رجاء إدخال مكان العمل:"},
"workplaceName": {"en": "Workplace name:", "ar": "مكان العمل:"},
"enter-workplace-name": {"en": "Please enter your workplace details:", "ar": "الرجاء إدخال تفاصيل مكان عملك:"},
// "workplaceName": {"en": "Workplace name:", "ar": "مكان العمل:"},
"workplaceName": {"en": "Workplace name English", "ar": "مكان العمل انجليزي:"},
"workplaceNameAr": {"en": "Workplace name Arabic *", "ar": "مكان العمل عربي:"},
"occupationNameEn": {"en": "Occupation name English", "ar": "مكان العمل انجليزي:"},
"occupationNameAr": {"en": "Occupation name Arabic *", "ar": "مكان العمل عربي:"},
"callLiveCareSupport": {"en": "Call LiveCare Support", "ar": "اتصل بدعم اللايف كير"},
"needApproval": {
"en": "Your sick leave is under process in medical administration, you will be notified once approved.",
@ -1943,8 +1951,15 @@ const Map localizedValues = {
"generalInstructions": {"en": "General Instructions:", "ar": "تعليمات عامة:"},
"copyLink": {"en": "COPY LINK", "ar": "نسخ الوصلة:"},
"paymentLinkCopied": {"en": "Payment link copied to your clipboard!'", "ar": "تم نسخ رابط الدفع إلى الحافظة الخاصة بك!"},
"copyLinkTxt": {"en": "Or you can copy the payment link from below & send it to someone who can pay on your behalf: ", "ar": "أو يمكنك نسخ رابط الدفع من الأسفل وإرساله إلى شخص يمكنه الدفع نيابة عنك:"},
"proErrorMessage": {"en": "Dear patient, Our staff is currently out of office, please note that our working hours are from 7:00 AM to 10:00 PM, and we'd love to help you during that time, or you can call <insert number here>", "ar": "عزيزي المريض ، طاقم العمل لدينا خارج المكتب حاليًا ، يرجى ملاحظة أن ساعات العمل لدينا من 7:00 صباحًا إلى 10:00 مساءً ، ويسعدنا مساعدتك خلال هذا الوقت ، أو يمكنك الاتصال بـ <أدخل الرقم هنا>"},
"copyLinkTxt": {
"en": "Or you can copy the payment link from below & send it to someone who can pay on your behalf: ",
"ar": "أو يمكنك نسخ رابط الدفع من الأسفل وإرساله إلى شخص يمكنه الدفع نيابة عنك:"
},
"proErrorMessage": {
"en":
"Dear patient, Our staff is currently out of office, please note that our working hours are from 7:00 AM to 10:00 PM, and we'd love to help you during that time, or you can call <insert number here>",
"ar": "عزيزي المريض ، طاقم العمل لدينا خارج المكتب حاليًا ، يرجى ملاحظة أن ساعات العمل لدينا من 7:00 صباحًا إلى 10:00 مساءً ، ويسعدنا مساعدتك خلال هذا الوقت ، أو يمكنك الاتصال بـ <أدخل الرقم هنا>"
},
"admissionNo": {"en": "Admission No", "ar": "رقم القبول:"},
"admissionReqNo": {"en": "Admission Request No", "ar": "رقم طلب القبول:"},
"dischargeDate": {"en": "Discharge Date", "ar": "تاريخ التفريغ"},
@ -1965,10 +1980,7 @@ const Map localizedValues = {
"validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"},
"contactRRT": {"en": "Contact RRT", "ar": "تواصل مع فريق الاستجابة السريعة"},
"checkInViaLocation": {"en": "Check-In Via Location", "ar": "تسجيل الوصول عبر الموقع"},
"locationCheckInError": {
"en": "Please make sure that you're within the hospital location to perform online check-in.",
"ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."
},
"locationCheckInError": {"en": "Please ensure you're within the hospital location to perform online check-in.", "ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."},
"upcoming": {"en": "Upcoming", "ar": "المواعيد القادمة"},
"noUpcomingAppointment": {"en": "No upcoming appointments", "ar": "لا توجد مواعيد القادمة"},
"locationTimeoutError": {"en": "Unable to fetch your location, Please try again.", "ar": "غير قادر على جلب موقعك، يرجى المحاولة مرة أخرى."},
@ -1976,21 +1988,29 @@ const Map localizedValues = {
"selectHospitalBloodDonation": {"en": "Please select the hospital you want to book an appointment with: ", "ar": "يرجى اختيار المستشفى الذي تريد حجز موعد معه:"},
"wecare": {"en": "We Care", "ar": "نحن نهتم"},
"myinstructions": {"en": "My Instructions", "ar": "تعليماتي"},
"existingPackage":{"en":"This patient has a package under this clinic,","ar":"هذا المريض لديه حزمة تحت هذه العيادة،"},
"continueOrbookNew":{"en":"do you want to continue with that package? or book new appointment?","ar":"هل تريد الاستمرار في هذه الباقة؟ أو حجز موعد جديد؟"},
"newAppointment":{"en":"New Appointment","ar":"موعد جديد"},
"proceedPackage":{"en":"Proceed with package","ar":"المضي قدما في الحزمة"},
"existingPackage": {"en": "This patient has a package under this clinic,", "ar": "هذا المريض لديه حزمة تحت هذه العيادة،"},
"continueOrbookNew": {"en": "do you want to continue with that package? or book new appointment?", "ar": "هل تريد الاستمرار في هذه الباقة؟ أو حجز موعد جديد؟"},
"newAppointment": {"en": "New Appointment", "ar": "موعد جديد"},
"proceedPackage": {"en": "Proceed with package", "ar": "المضي قدما في الحزمة"},
"clinicLocation": {"en": "Clinic Location", "ar": "موقع العيادة"},
"waitingAppointment": {"en": "Waiting appointment", "ar": "انتظار الموعد"},
"whatWaitingAppointment": {"en": "What is Waiting appointment?", "ar": "ما هو انتظار الموعد؟"},
"waitingAppointmentText1": {"en": "The waiting appointments feature allows you to book an appointment while you are inside the hospital building, and in case there is no available slot in the doctors schedule.", "ar": "تتيح لك خاصية انتظار المواعيد حجز موعد أثناء تواجدك داخل مبنى المستشفى، وفي حالة عدم وجود وقت متاح في جدول الطبيب."},
"waitingAppointmentText1": {
"en": "The waiting appointments feature allows you to book an appointment while you are inside the hospital building, and in case there is no available slot in the doctors schedule.",
"ar": "تتيح لك خاصية انتظار المواعيد حجز موعد أثناء تواجدك داخل مبنى المستشفى، وفي حالة عدم وجود وقت متاح في جدول الطبيب."
},
"waitingAppointmentText2": {"en": "The appointment with the doctor is confirmed, but the time of entry is uncertain", "ar": "دخول الموعد مؤكد, التوقيت غير محدد."},
"waitingAppointmentText3": {"en": "Note: You must have to pay within 10 minutes of booking, otherwise your appointment will be cancelled automatically", "ar": "ملحوظة: يجب عليك الدفع خلال 10 دقائق من الحجز، وإلا سيتم إلغاء موعدك تلقائيًا"},
"waitingAppointmentText3": {
"en": "Note: You must have to pay within 10 minutes of booking, otherwise your appointment will be cancelled automatically",
"ar": "ملحوظة: يجب عليك الدفع خلال 10 دقائق من الحجز، وإلا سيتم إلغاء موعدك تلقائيًا"
},
"waitingAppointmentVerificationMethod": {"en": "Please select verification method", "ar": "الرجاء تحديد طريقة التحقق"},
"howToUseVerificationMethod": {"en": "How to use verification methods?", "ar": "كيفية استخدام طرق التحقق؟"},
"addToWaitingList": {"en": "Add to waiting list", "ar": "اضافه الى قائمة الانتظار"},
"searchClinic": {"en": "Search Clinic", "ar": "بحث العيادة"},
"selectBranch":{"en":"Select Branch", "ar":"اختر الفرع"},
"searchByBranch":{"en":"Search By Branch Name", "ar":"البحث عن طريق اسم الفرع"}
"selectBranch": {"en": "Select Branch", "ar": "اختر الفرع"},
"searchByBranch": {"en": "Search By Branch Name", "ar": "البحث عن طريق اسم الفرع"},
"hospitalNavigationTitle": {"en": "Hospital", "ar": "الملاحة"},
"hospitalNavigationSubtitle": {"en": "Navigation", "ar": "المستشفى"},
};

@ -124,12 +124,15 @@ class LabsService extends BaseService {
return Future.value(localRes);
}
Future updateWorkplaceName(String workplaceName, String workplaceNameAR, int requestNumber, String setupID, int projectID) async {
Future updateWorkplaceName(String workplaceName, String workplaceNameAR, String occupation, String occupationAR, int requestNumber, String setupID, int projectID) async {
// Future updateWorkplaceName(String workplaceName, String workplaceNameAR, int requestNumber, String setupID, int projectID) async {
hasError = false;
Map<String, dynamic> body = Map();
body['Placeofwork'] = workplaceName;
body['Placeofworkar'] = workplaceNameAR;
body['PlaceofworkAr'] = workplaceNameAR;
body['Occupation'] = occupation;
body['OccupationAr'] = occupationAR;
body['Req_ID'] = requestNumber;
body['TargetSetupID'] = setupID;
body['ProjectID'] = projectID;

@ -72,11 +72,15 @@ class MedicalService extends BaseService {
dynamic localRes;
await baseAppClient.post(GET_DOCTOR_FREE_SLOTS, onSuccess: (response, statusCode) async {
localRes = response;
freeSlots.clear();
localRes['FreeTimeSlots'].forEach((item) => freeSlots.add(item));
}, onFailure: (String error, int statusCode) {
throw error;
hasError = true;
super.error = error;
// throw error;
}, body: request);
freeSlots.clear();
localRes['FreeTimeSlots'].forEach((item) => freeSlots.add(item));
// freeSlots.clear();
// localRes['FreeTimeSlots'].forEach((item) => freeSlots.add(item));
// localRes['List_DoctorWorkingHoursTable'].forEach((item) =>
// {doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))});
}

@ -44,6 +44,8 @@ class DoctorList {
List<String>? specialityN;
dynamic workingHours;
dynamic decimalDoctorRate;
String? projectBottomName;
String? projectTopName;
DoctorList(
{this.clinicID,
@ -90,7 +92,9 @@ class DoctorList {
this.speciality,
this.specialityN,
this.workingHours,
this.decimalDoctorRate});
this.decimalDoctorRate,
this.projectBottomName,
this.projectTopName});
DoctorList.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID'];
@ -138,6 +142,8 @@ class DoctorList {
if (json.containsKey('SpecialityN') && json['SpecialityN'] != null) specialityN = json['SpecialityN'].cast<String>();
workingHours = json['WorkingHours'];
decimalDoctorRate = json['DecimalDoctorRate'];
projectBottomName = json['ProjectNameBottom'];
projectTopName = json['ProjectNameTop'];
}
Map<String, dynamic> toJson() {
@ -188,6 +194,10 @@ class DoctorList {
data['DecimalDoctorRate'] = this.decimalDoctorRate;
return data;
}
String getProjectCompleteName(){
return "${this.projectTopName} ${this.projectBottomName}";
}
}
class PatientDoctorAppointmentList {

@ -15,8 +15,7 @@ class PatientPackageComponent {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.patientPackageComponents != null) {
data['PatientPackageComponents'] =
this.patientPackageComponents!.map((v) => v.toJson()).toList();
data['PatientPackageComponents'] = this.patientPackageComponents!.map((v) => v.toJson()).toList();
}
return data;
}
@ -30,15 +29,9 @@ class PatientPackageComponents {
int? projectID;
int? sequence;
String? setupID;
num? invoiceNo_VP;
PatientPackageComponents(
{this.invoiceNo,
this.lineItemNo,
this.procedureID,
this.procedureName,
this.projectID,
this.sequence,
this.setupID});
PatientPackageComponents({this.invoiceNo, this.lineItemNo, this.procedureID, this.procedureName, this.projectID, this.sequence, this.setupID, this.invoiceNo_VP});
PatientPackageComponents.fromJson(Map<String, dynamic> json) {
invoiceNo = json['InvoiceNo'];
@ -48,6 +41,7 @@ class PatientPackageComponents {
projectID = json['ProjectID'];
sequence = json['Sequence'];
setupID = json['SetupID'];
invoiceNo_VP = json['InvoiceNo_VP'];
}
Map<String, dynamic> toJson() {
@ -59,6 +53,7 @@ class PatientPackageComponents {
data['ProjectID'] = this.projectID;
data['Sequence'] = this.sequence;
data['SetupID'] = this.setupID;
data['InvoiceNo_VP'] = this.invoiceNo_VP;
return data;
}
}

@ -8,7 +8,7 @@ class WeeklyHeartRateResModel {
{this.valueAvg, this.machineDate, this.medCategoryID, this.patientID});
WeeklyHeartRateResModel.fromJson(Map<String, dynamic> json) {
num value = json['ValueAvg'];
num value = json['ValueAvg'] != null ? json['ValueAvg'] : 0.0;
valueAvg = json['ValueAvg'] != null ? value.toInt() : 0;
machineDate = json['MachineDate'];
medCategoryID = json['MedCategoryID'];

@ -15,7 +15,7 @@ class YearlyHeartRateResModel {
this.year});
YearlyHeartRateResModel.fromJson(Map<String, dynamic> json) {
num value = json['ValueAvg'];
num value = json['ValueAvg'] != null ? json['ValueAvg'] : 0.0;
valueAvg = json['ValueAvg'] != null ? value.toInt() : 0;
medCategoryID = json['MedCategoryID'];
month = json['Month'];

@ -680,7 +680,7 @@ class _BookConfirmState extends State<BookConfirm> {
);
}
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context, {int? invoiceNumber, int? lineItemNo}) async {
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context, {int? invoiceNumber, int? lineItemNo, String? invoiceNoVP}) async {
ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false);
DoctorsListService service = new DoctorsListService();
@ -692,7 +692,7 @@ class _BookConfirmState extends State<BookConfirm> {
if (isLiveCareSchedule != null && isLiveCareSchedule) {
insertLiveCareScheduledAppointment(context, widget.doctor);
} else {
insertAppointment(context, widget.doctor, widget.initialSlotDuration);
insertAppointment(context, widget.doctor, widget.initialSlotDuration, invoiceNumber: invoiceNumber, lineItemNo: lineItemNo, invoiceNoVP: invoiceNoVP);
}
});
} else {
@ -736,7 +736,7 @@ class _BookConfirmState extends State<BookConfirm> {
widget.service.convertPatientToCash(docObject.projectID!).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {
if(isLiveCareAppointment) {
if (isLiveCareAppointment) {
getLiveCareAppointmentPatientShare(context, appointmentNo, docObject!.clinicID!, docObject.projectID!, docObject);
} else {
getPatientShare(context, appointmentNo, docObject.clinicID!, docObject.projectID!, docObject);
@ -881,7 +881,9 @@ class _BookConfirmState extends State<BookConfirm> {
okFunction: () => {
ConfirmDialog.closeAlertDialog(context),
insertAppointment(context, widget.doctor, widget.initialSlotDuration,
invoiceNumber: package.patientPackageComponents![0].invoiceNo, lineItemNo: package.patientPackageComponents![0].lineItemNo)
invoiceNumber: package.patientPackageComponents![0].invoiceNo,
lineItemNo: package.patientPackageComponents![0].lineItemNo,
invoiceNoVP: package.patientPackageComponents![0].invoiceNo_VP.toString())
},
cancelFunction: () => {insertAppointment(context, widget.doctor, widget.initialSlotDuration)},
);
@ -894,7 +896,7 @@ class _BookConfirmState extends State<BookConfirm> {
});
}
insertAppointment(context, DoctorList docObject, int initialSlotDuration, {int? invoiceNumber, int? lineItemNo}) async {
insertAppointment(context, DoctorList docObject, int initialSlotDuration, {int? invoiceNumber, int? lineItemNo, String? invoiceNoVP}) async {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
String logs = await sharedPref.getString('selectedLogSlots');
List<dynamic> decodedLogs = json.decode(logs);
@ -903,7 +905,7 @@ class _BookConfirmState extends State<BookConfirm> {
widget.service
// .insertAppointment(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, widget.selectedTime, widget.selectedDate, initialSlotDuration, context, 'null', null, null, projectViewModel)
.insertAppointment(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, widget.selectedTime, widget.selectedDate, initialSlotDuration, projectViewModel.isArabic ? 1 : 2, context,
null, null, null, projectViewModel, invoiceNumber, lineItemNo)
null, null, null, projectViewModel, invoiceNumber, lineItemNo, invoiceNoVP)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/search_by_hospital_name.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -28,15 +29,20 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
@override
void initState() {
_tabController = new TabController(length: 2, vsync: this, initialIndex: widget.type, );
_tabController = new TabController(
length: 3,
vsync: this,
initialIndex: widget.type,
);
super.initState();
}
@override
Widget build(BuildContext context) {
AppGlobal.context = context;
// ProjectViewModel projectViewModel = Provider.of(context);
GAnalytics.TREATMENT_TYPE = null; // reset treatment type on start new booking
// ProjectViewModel projectViewModel = Provider.of(context);
GAnalytics.TREATMENT_TYPE =
null; // reset treatment type on start new booking
return AppScaffold(
isShowAppBar: false,
@ -54,32 +60,58 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelPadding:
EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle(
fontFamily: context.read<ProjectViewModel>().isArabic ? 'Cairo' : 'Poppins',
fontFamily: context.read<ProjectViewModel>().isArabic
? 'Cairo'
: 'Poppins',
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontFamily: context.read<ProjectViewModel>().isArabic ? 'Cairo' : 'Poppins',
fontFamily: context.read<ProjectViewModel>().isArabic
? 'Cairo'
: 'Poppins',
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase.of(context).clinicName), Text(TranslationBase.of(context).doctorName)],
tabs: [
Text(
TranslationBase.of(context).hospitalName,
style: TextStyle(fontSize: 12),
),
Text(
TranslationBase.of(context).clinicName,
style: TextStyle(fontSize: 12),
),
Text(
TranslationBase.of(context).doctorName,
style: TextStyle(fontSize: 12),
)
],
onTap: (idx) {
if (idx == 0)
context.read<ProjectViewModel>().analytics.appointment.book_appointment_by_clinic();
context
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_by_clinic();
else
context.read<ProjectViewModel>().analytics.appointment.book_appointment_by_doctor();
context
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_by_doctor();
},
),
Expanded(
child: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
SearchByHospital(),
SearchByClinic(clnicIds: widget.clnicIds),
SearchByDoctor(),
],

@ -280,23 +280,27 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
selectedDateJSON = freeSlotsResponse[0];
});
openTimeSlotsPickerForDate(
(isLiveCareSchedule != null && isLiveCareSchedule)
isWaitingAppointmentAvailable
? DateTime.now()
: (isLiveCareSchedule != null && isLiveCareSchedule)
? DateUtil.convertStringToDate(selectedDateJSON)
: DateUtil.convertStringToDateSaudiTimezone(
selectedDateJSON,
int.parse(
widget.doctor.projectID.toString(),
),
),
docFreeSlots);
_calendarController.selectedDate = isWaitingAppointmentAvailable
? DateTime.now()
: (isLiveCareSchedule != null && isLiveCareSchedule)
? DateUtil.convertStringToDate(selectedDateJSON)
: DateUtil.convertStringToDateSaudiTimezone(
selectedDateJSON,
int.parse(
widget.doctor.projectID.toString(),
),
),
docFreeSlots);
_calendarController.selectedDate = (isLiveCareSchedule != null && isLiveCareSchedule)
? DateUtil.convertStringToDate(selectedDateJSON)
: DateUtil.convertStringToDateSaudiTimezone(
selectedDateJSON,
int.parse(
widget.doctor.projectID.toString(),
),
);
);
_calendarController.displayDate = _calendarController.selectedDate;
return _eventsParsed;
}
@ -327,10 +331,10 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
Widget getSelectedButton(int index) {
return CustomTextButton(
backgroundColor: CustomColors.green,
backgroundColor: dayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green,
elevation: 0,
side: BorderSide(
color: CustomColors.green, //Color of the border
color: dayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, //Color of the border
style: BorderStyle.solid, //Style of the border
width: 1.5 //width of the border
),
@ -360,16 +364,16 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
freeSlotsResponse = res['FreeTimeSlots'];
_getJSONSlots().then((value) {
setState(() {
_events.clear();
_events = value;
if (widget.doctorSchedule != null)
{
_onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date']));
_calendarController.selectedDate = DateUtil.convertStringToDate(
widget.doctorSchedule['Date'],
);
};
});
_events.clear();
_events = value;
if (widget.doctorSchedule != null) {
_onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date']));
_calendarController.selectedDate = DateUtil.convertStringToDate(
widget.doctorSchedule['Date'],
);
}
;
});
});
} else {
DocAvailableAppointments.areAppointmentsAvailable = false;

@ -1,6 +1,7 @@
import "dart:collection";
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
@ -95,6 +96,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
@override
Widget build(BuildContext context) {
AppGlobal.context = context;
return Container(
child: SingleChildScrollView(
child: Column(
@ -648,7 +650,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
(elementClinic) => elementClinic.filterName == element.getProjectCompleteName(),
)
.toList();
@ -656,7 +658,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else {
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
.add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
}
});
} else {}

@ -105,13 +105,13 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.projectName).toList();
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else {
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
.add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
}
});
} else {

@ -0,0 +1,559 @@
import 'dart:collection';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../config/shared_pref_kay.dart';
import '../../../config/size_config.dart';
import '../../../core/model/hospitals/hospitals_model.dart';
import '../../../core/viewModels/project_view_model.dart';
import '../../../models/Appointments/DoctorListResponse.dart';
import '../../../models/Appointments/SearchInfoModel.dart';
import '../../../models/Clinics/ClinicListResponse.dart';
import '../../../services/appointment_services/GetDoctorsList.dart';
import '../../../services/authentication/auth_provider.dart';
import '../../../services/clinic_services/get_clinic_service.dart';
import '../../../uitl/app_toast.dart';
import '../../../uitl/gif_loader_dialog_utils.dart';
import '../../../uitl/translations_delegate_base.dart';
import '../../../widgets/transitions/fade_page.dart';
import '../../livecare/livecare_home.dart';
import '../DentalComplaints.dart';
import '../LaserBooking.dart';
import '../SearchResults.dart';
import '../dialog/clinic_list_dialog.dart';
import 'LiveCareBookAppointment.dart';
class SearchByHospital extends StatefulWidget {
@override
State<SearchByHospital> createState() => _SearchByHospitalState();
}
class _SearchByHospitalState extends State<SearchByHospital> {
HospitalsModel? selectedHospital;
bool nearestAppo = false;
String? selectedClinicName;
List<HospitalsModel> projectsList = [];
List<ListClinicCentralized>? clinicIds = List.empty();
final GlobalKey projectDropdownKey = GlobalKey();
List<ListClinicCentralized> clinicsList = [];
bool isMobileAppDentalAllow = false;
ListClinicCentralized? selectedClinic;
String? dropdownValue;
String dropdownTitle = "";
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getProjectsList());
}
@override
Widget build(BuildContext context) {
AppGlobal.context = context;
return Column(
children: [
Padding(
padding: const EdgeInsets.only(left: 6, right: 6, top: 16),
child: Row(
children: <Widget>[
Checkbox(
activeColor: CustomColors.accentColor,
value: nearestAppo,
onChanged: (bool? value) {
nearestAppo = value ?? false;
setState(() {});
},
),
AutoSizeText(
TranslationBase.of(context).nearestAppo.trim(),
maxLines: 1,
minFontSize: 10,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 1.4,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
// Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)),
],
),
),
mHeight(8),
InkWell(
onTap: () {
openDropdown(projectDropdownKey);
},
child: Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
margin: EdgeInsets.only(left: 20, right: 20),
padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12),
child: Row(
children: [
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).selectHospital,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
height: 18,
width: double.infinity,
child: DropdownButtonHideUnderline(
child: DropdownButton<HospitalsModel>(
key: projectDropdownKey,
hint: Text(
TranslationBase.of(context).selectHospital),
value: selectedHospital,
iconSize: 0,
isExpanded: true,
style: TextStyle(
fontSize: 14,
letterSpacing: -0.56,
color: Colors.black),
items: projectsList.map((HospitalsModel item) {
return DropdownMenuItem<HospitalsModel>(
value: item,
child: AutoSizeText(
item.name!,
maxLines: 1,
minFontSize: 10,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 1.6,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
// Text('${item.name!}'),
);
}).toList(),
onChanged: (HospitalsModel? newValue) {
getClinicWrtHospital(newValue);
setState(() {
selectedHospital = newValue;
});
},
),
),
),
],
),
),
Icon(Icons.keyboard_arrow_down),
],
)),
),
if (clinicIds?.isNotEmpty == true) ...[
mHeight(8),
InkWell(
onTap: () {
showClickListDialog(context, clinicIds ?? List.empty(),
onSelection: (ListClinicCentralized clincs) {
selectedClinic = clincs;
Navigator.pop(context);
setState(() {
dropdownTitle = clincs.clinicDescription!;
dropdownValue = clincs.clinicID.toString() +
"-" +
clincs.isLiveCareClinicAndOnline.toString() +
"-" +
clincs.liveCareClinicID.toString() +
"-" +
clincs.liveCareServiceID.toString();
});
getDoctorsList(context);
context
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_select_clinic(
appointment_type: 'regular',
clinic: clincs.clinicDescription);
});
},
child: Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
margin: EdgeInsets.only(left: 20, right: 20),
padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 8),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).selectClinic,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Padding(
padding: const EdgeInsets.only(top: 4, bottom: 2),
child: Text(
dropdownTitle,
style: TextStyle(
fontSize: 13,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
),
],
),
),
Icon(Icons.keyboard_arrow_down),
],
),
),
)
]
],
);
}
void openDropdown(GlobalKey key) {
GestureDetector? detector;
void searchForGestureDetector(BuildContext element) {
element.visitChildElements((element) {
if (element.widget != null && element.widget is GestureDetector) {
detector = element.widget as GestureDetector?;
//return false;
} else {
searchForGestureDetector(element);
}
//return true;
});
}
searchForGestureDetector(key.currentContext!);
assert(detector != null);
detector!.onTap!();
}
GestureDetector? searchForGestureDetector(BuildContext element) {
GestureDetector? detector;
element.visitChildElements((element) {
if (element.widget != null && element.widget is GestureDetector) {
detector = element.widget as GestureDetector?;
//return false;
} else {
searchForGestureDetector(element);
}
});
return detector;
}
getProjectsList() {
GifLoaderDialogUtils.showMyDialog(context);
int languageID = context.read<ProjectViewModel>().isArabic ? 1 : 2;
ClinicListService service = new ClinicListService();
List<HospitalsModel> projectsListLocal = [];
service.getProjectsList(languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
res['ListProject'].forEach((v) {
projectsListLocal.add(new HospitalsModel.fromJson(v));
});
projectsList = projectsListLocal;
});
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
void getClinicWrtHospital(HospitalsModel? newValue) async {
GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService();
List<HospitalsModel> projectsListLocal = [];
setState(() {
clinicIds = List.empty();
});
List<ListClinicCentralized> clinicId = [];
try {
Map res = await service.getClinicByHospital(
projectID: newValue?.mainProjectID.toString() ?? "");
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
List list = res['ListClinic'];
if (list.isEmpty) {
AppToast.showErrorToast(
message: TranslationBase.of(context).NoClinicFound,
);
}
res['ListClinic'].forEach((v) {
clinicId.add(ListClinicCentralized.fromJson(v));
});
clinicIds = clinicId;
setState(() {});
} else {
AppToast.showErrorToast(
message: TranslationBase.of(context).NoClinicFound,
);
}
} catch (e) {
print("the error is $e");
AppToast.showErrorToast(
message: TranslationBase.of(context).NoClinicFound,
);
GifLoaderDialogUtils.hideDialog(context);
}
// .then((res) {
// print("the result is obtained");
// GifLoaderDialogUtils.hideDialog(context);
// if (res['MessageStatus'] == 1) {
// List list = res['ListClinic'];
//
// if(list.isEmpty){
// AppToast.showErrorToast(message:
// TranslationBase.of(context).NoClinicFound,
// );
//
// }
// res['ListClinic'].forEach((v) {
// clinicId?.add(ListClinicCentralized.fromJson(v));
// });
// clinicIds = clinicId;
// setState(() {
//
// });
// } else {
// AppToast.showErrorToast(message:
// TranslationBase.of(context).NoClinicFound,
// );
// }
// }).catchError((err) {
// print('the error is $err');
// AppToast.showErrorToast(message:
// TranslationBase.of(context).NoClinicFound,
// );
// GifLoaderDialogUtils.hideDialog(context);
// }).catchError((err) {
// AppToast.showErrorToast(message:
// TranslationBase.of(context).NoClinicFound,
// );
// GifLoaderDialogUtils.hideDialog(context);
//
// print(err);
// });
}
@override
void dispose() {
super.dispose();
}
Future navigateToDentalComplaints(
BuildContext context, SearchInfo searchInfo) async {
Navigator.push(
context,
FadePage(
page: DentalComplaints(searchInfo: searchInfo),
),
).then((value) {
setState(() {
dropdownValue = null;
selectedHospital = null;
dropdownTitle = "";
clinicIds = List.empty();
});
});
}
callDoctorsSearchAPI(int clinicID) {
int languageID = context.read<ProjectViewModel>().isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorList> doctorsList = [];
List<String> arr = [];
List<String> arrDistance = [];
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
[];
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(
clinicID,
selectedHospital?.mainProjectID.toString() != ""
? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1")
: 0,
nearestAppo,
languageID,
null)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['DoctorList'].length != 0) {
doctorsList.clear();
res['DoctorList'].forEach((v) {
doctorsList.add(DoctorList.fromJson(v));
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.getProjectCompleteName(),
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList!
.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.getProjectCompleteName(),
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
}
});
} else {}
});
result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length;
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err, localContext: context);
});
}
Future navigateToSearchResults(
context,
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)))
.then((value) {
print("navigation return ");
dropdownValue = null;
dropdownTitle = "";
selectedHospital = null;
clinicIds = List.empty();
setState(() {});
// getProjectsList();
});
}
Future navigateToLaserClinic(BuildContext context) async {
Navigator.push(
context,
FadePage(
page: LaserBooking(),
),
).then((value) {
print("LaserBooking navigation return ");
setState(() {
dropdownValue = null;
selectedHospital = null;
dropdownTitle = "";
clinicIds = List.empty();
});
});
}
getDoctorsList(BuildContext context) {
SearchInfo searchInfo = new SearchInfo();
if (dropdownValue != null) if (dropdownValue!.split("-")[0] == "17") {
searchInfo.ProjectID = int.parse(selectedHospital?.mainProjectID.toString() ?? "");
searchInfo.ClinicID = int.parse(dropdownValue!.split("-")[0]);
searchInfo.hospital = selectedHospital;
searchInfo.clinic = selectedClinic;
searchInfo.date = DateTime.now();
if (context.read<ProjectViewModel>().isLogin) {
if (context.read<ProjectViewModel>().user.age! > 12) {
navigateToDentalComplaints(context, searchInfo);
} else {
callDoctorsSearchAPI(17);
}
} else {
navigateToDentalComplaints(context, searchInfo);
}
} else if (dropdownValue!.split("-")[0] == "253") {
navigateToLaserClinic(context);
// callDoctorsSearchAPI();
} else if (dropdownValue!.split("-")[1] == "true"
// && authProvider.isLogin &&
// authUser.patientType == 1
) {
Navigator.push(
context,
FadePage(
page: LiveCareBookAppointment(
clinicName: dropdownTitle,
liveCareClinicID: dropdownValue!.split("-")[2],
liveCareServiceID: dropdownValue!.split("-")[3]),
),
).then((value) {
print("navigation return ");
if (value == "false") dropdownValue = null;
// setState(() {
// });
if (value == "livecare") {
Navigator.push(context, FadePage(page: LiveCareHome()));
}
if (value == "schedule") {
callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0]));
}
});
setState(() {});
} else {
callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0]));
}
}
}

@ -115,7 +115,7 @@ class _ClickListDialogState extends State<ClickListDialog> {
),
),
),
tempClinicsList[index].isLiveCareClinicAndOnline!
tempClinicsList[index].isLiveCareClinicAndOnline == true
? SvgPicture.asset(
'assets/images/new-design/video_icon_green_right.svg',
height: 12,

@ -1,6 +1,7 @@
import 'dart:io';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
@ -44,10 +45,10 @@ showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, S
}
}
Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
Future<void> _showReminderDialog(BuildContext providedContext, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
{required Function onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool? isMultiAllowed}) async {
return showDialog<void>(
context: context,
context: providedContext,
barrierDismissible: true, // user must tap button!
builder: (BuildContext context) {
return Dialog(
@ -81,7 +82,7 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
if (onMultiDateSuccess == null) {
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
await calendarUtils.createOrUpdateEvent(
title: title ?? TranslationBase.of(context).reminderTitle + " " + doctorName,
title: title ?? TranslationBase.of(providedContext).reminderTitle + " " + doctorName,
description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted,
scheduleDateTime: dateTime,
eventId: eventId);

@ -191,8 +191,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
initPenguinSDK() async {
NavigationClinicDetails data = NavigationClinicDetails();
// data.clinicId = widget.appo.clinicID.toString();
data.clinicId = "49";
data.clinicId = widget.appo.clinicID.toString();
// data.clinicId = "49";
data.patientId = widget.appo.patientID.toString();
data.projectId = widget.appo.projectID.toString();
final bool permited = await AppPermission.askPenguinPermissions();

@ -378,12 +378,12 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
),
),
),
if (projectViewModel.isIndoorNavigationEnabled)
if (projectViewModel.isIndoorNavigationEnabled && projectViewModel.havePrivilege(107) && appoList[index].projectID == 130)
InkWell(
onTap: () {
NavigationClinicDetails data = NavigationClinicDetails();
// data.clinicId = appoList[index].clinicID.toString();
data.clinicId = "46";
data.clinicId = appoList[index].clinicID.toString();
// data.clinicId = "46";
data.patientId = appoList[index].patientID.toString();
data.projectId = appoList[index].projectID.toString();
initPenguinSDK(data);

@ -54,7 +54,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
projectViewModel.isIndoorNavigationEnabled
? hmgServices.add(HmgServices(2, "Hospital", "Navigation", "assets/images/new/indoor_nav_home.svg", isLogin))
? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin))
: hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
@ -346,7 +346,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
itemCount: hmgServices.length,
padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) {
return ServicesView(hmgServices[index], index, true, projectViewModel, isLocked: hmgServices[index].action == 2 ? !projectViewModel.havePrivilege(107) : false);
return ServicesView(hmgServices[index], index, true, projectViewModel, isLocked: (hmgServices[index].action == 2 && projectViewModel.isIndoorNavigationEnabled) ? !projectViewModel.havePrivilege(107) : false);
},
),
),

@ -195,6 +195,7 @@ class ServicesView extends StatelessWidget {
showDialog(
context: context,
builder: (cxt) => LocationSelectionDialog(
isArabic: projectViewModel.isArabic,
data: projectsListLocal,
selectedIndex: _selectedHospitalIndex,
onValueSelected: (index) {
@ -215,7 +216,7 @@ class ServicesView extends StatelessWidget {
Permission.bluetoothScan,
Permission.activityRecognition,
].request().whenComplete(() {
PenguinMethodChannel.launch("penguin", projectViewModel.isArabic ? "ar" : "en", "1231755");
PenguinMethodChannel.launch("penguin", projectViewModel.isArabic ? "ar" : "en", projectViewModel.authenticatedUserObject.user.patientID.toString());
});
} //
}

@ -25,6 +25,10 @@ class WorkplaceUpdatePage extends StatefulWidget {
class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
TextEditingController workplaceName = new TextEditingController();
TextEditingController workplaceNameAr = new TextEditingController();
TextEditingController occupationNameEn = new TextEditingController();
TextEditingController occupationNameAr = new TextEditingController();
bool? _isButtonDisabled;
ProjectViewModel? projectViewModel;
@ -66,7 +70,14 @@ class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
),
),
mHeight(8),
inputWidget(TranslationBase.of(context).workplaceName, "", workplaceName),
// inputWidget(TranslationBase.of(context).workplaceName, "", workplaceName),
inputWidget(TranslationBase.of(context).workplaceName, "", workplaceName, FilteringTextInputFormatter.allow(RegExp("[a-zA-Z ]"))),
mHeight(8),
inputWidget(TranslationBase.of(context).workplaceNameAr, "", workplaceNameAr, FilteringTextInputFormatter.allow(RegExp("[ء-ي ]"))),
mHeight(8),
inputWidget(TranslationBase.of(context).occupationNameEn, "", occupationNameEn, FilteringTextInputFormatter.allow(RegExp("[a-zA-Z ]"))),
mHeight(8),
inputWidget(TranslationBase.of(context).occupationNameAr, "", occupationNameAr, FilteringTextInputFormatter.allow(RegExp("[ء-ي ]"))),
],
),
),
@ -83,7 +94,7 @@ class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
height: 50,
elevation: 0,
color: CustomColors.accentColor,
disabledColor:Colors.grey.withOpacity(0.25),
disabledColor: Colors.grey.withOpacity(0.25),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
child: Text(
TranslationBase.of(context).submit,
@ -94,10 +105,12 @@ class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
),
),
onPressed: () {
if (_isButtonDisabled == false)
// if (_isButtonDisabled == false)
if (workplaceNameAr.text.isNotEmpty && occupationNameAr.text.isNotEmpty)
// AppToast.showSuccessToast(message: "API Called");
updateWorkplaceNameDialog();
else
AppToast.showErrorToast(message: TranslationBase.of(context).enterWorkplaceName);
AppToast.showErrorToast(message: TranslationBase.of(context).enterDetailBelow);
},
),
),
@ -109,7 +122,8 @@ class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
);
}
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) {
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, TextInputFormatter inputFormatter, {String? prefix, bool isEnable = true, bool hasSelection = false}) {
// Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) {
return Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center,
@ -145,7 +159,8 @@ class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
keyboardType: TextInputType.name,
controller: _controller,
inputFormatters: [
projectViewModel!.isArabic ? FilteringTextInputFormatter.allow(RegExp("[ء-ي ]")) : FilteringTextInputFormatter.allow(RegExp("[a-zA-Z ]")),
// projectViewModel!.isArabic ? FilteringTextInputFormatter.allow(RegExp("[ء-ي ]")) : FilteringTextInputFormatter.allow(RegExp("[a-zA-Z ]")),
inputFormatter
],
onChanged: (value) => {_onPassportTextChanged(value)},
style: TextStyle(
@ -207,8 +222,8 @@ class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
}
updateWorkplaceNameDialog() {
var messageEn = "The workplace name you entered is: " + workplaceName.text + ". Please confirm!";
var messageAr = "اسم مكان العمل الذي أدخلته هو: " + workplaceName.text + ". يرجى تأكيد!";
var messageEn = "The workplace name you entered is: " + workplaceNameAr.text + ". Please confirm!";
var messageAr = "اسم مكان العمل الذي أدخلته هو: " + workplaceNameAr.text + ". يرجى تأكيد!";
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: projectViewModel!.isArabic ? messageAr : messageEn,
@ -226,9 +241,10 @@ class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
LabsService service = new LabsService();
GifLoaderDialogUtils.showMyDialog(context);
service
.updateWorkplaceName(projectViewModel!.isArabic ? "-" : workplaceName.text, projectViewModel!.isArabic ? workplaceName.text : "-", widget.requestNumber, widget.setupID, widget.projectID)
.then((res) {
service.updateWorkplaceName(workplaceName.text, workplaceNameAr.text, occupationNameEn.text, occupationNameAr.text, widget.requestNumber, widget.setupID, widget.projectID).then((res) {
// service
// .updateWorkplaceName(projectViewModel!.isArabic ? "-" : workplaceName.text, projectViewModel!.isArabic ? workplaceName.text : "-", widget.requestNumber, widget.setupID, widget.projectID)
// .then((res) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pop(true);
}).catchError((err) {

@ -216,7 +216,7 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
(element) {
weeklyTimeSeriesData.add(
TimeSeriesSales2(
DateUtil.convertStringToDate(element.machineDate!),
DateUtil.convertStringToDate(element.machineDate ?? DateUtil.convertDateToString(DateTime.now())),
element.value != null ? (element.value!.toDouble() / 1000) : 0.0,
),
);
@ -501,7 +501,7 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
children: [
Utils.tableColumnValue(
'${DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(step.machineDate!),
DateUtil.convertStringToDate(step.machineDate ?? DateUtil.convertDateToString(DateTime.now())),
)} ',
isCapitable: false,
mProjectViewModel: projectViewModel),

@ -212,7 +212,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
(element) {
weeklyTimeSeriesData.add(
TimeSeriesSales2(
DateUtil.convertStringToDate(element.machineDate!),
DateUtil.convertStringToDate(element.machineDate ?? DateUtil.convertDateToString(DateTime.now())),
element.value != null ? element.value!.toDouble() : 0.0,
),
);
@ -527,7 +527,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
children: [
Utils.tableColumnValue(
'${DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(step.machineDate!),
DateUtil.convertStringToDate(step.machineDate ?? DateUtil.convertDateToString(DateTime.now())),
)} ',
isCapitable: false,
mProjectViewModel: projectViewModel),

@ -75,7 +75,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
Text(
model.appointmentDetails.startTime.toString().substring(0, 5),
model.appointmentDetails.startTime != "" ? model.appointmentDetails.startTime.toString().substring(0, 5) : "",
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
],

@ -34,7 +34,7 @@ class DoctorsListService extends BaseService {
String? tokenID;
List<LaserBodyPart> selectedBodyPartList = [];
Future<Map> getDoctorsList(int clinicID, int projectID, bool isNearest, int languageID, BuildContext context, {doctorId, doctorName, isContinueDentalPlan = false}) async {
Future<Map> getDoctorsList(int clinicID, int projectID, bool isNearest, int languageID, BuildContext? context, {doctorId, doctorName, isContinueDentalPlan = false}) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -387,7 +387,7 @@ class DoctorsListService extends BaseService {
}
Future<Map> insertAppointment(int docID, int clinicID, int projectID, String selectedTime, String selectedDate, int initialSlotDuration, int languageID, BuildContext context,
[String? procedureID, num? testTypeEnum, num? testProcedureEnum, ProjectViewModel? projectViewModel, int? invoiceNumber, int? lineItemNo]) async {
[String? procedureID, num? testTypeEnum, num? testProcedureEnum, ProjectViewModel? projectViewModel, int? invoiceNumber, int? lineItemNo, String? invoiceNoVP]) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -428,6 +428,7 @@ class DoctorsListService extends BaseService {
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType,
"InvoiceNo": invoiceNumber,
"InvoiceNo_VP": invoiceNoVP,
"LineItemNo": lineItemNo,
// "TokenID":"@dm!n"
};

@ -34,6 +34,19 @@ class ClinicListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getClinicByHospital({required String projectID}) async {
Map<String, dynamic> request = {"ProjectID": projectID};
dynamic localRes;
await baseAppClient.post(GET_CLINICS_LIST_WRT_HOSPITAL_URL, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getActiveAppointmentNo(context) async {
Map<String, dynamic> request = {};

@ -168,16 +168,16 @@ class PayfortService extends BaseService {
/// Step 4: Processing Payment [Don't multiply with 100]
/// Amount value send always round ex. [100] not [100.00, 100.21]
FortRequest request = FortRequest(
amount: orderAmount!,
customerName: customerName!,
customerEmail: customerEmail!,
orderDescription: orderDescription!,
sdkToken: sdkTokenResponse?.sdkToken ?? '',
merchantReference: merchantReference!,
currency: currency,
customerIp: (await _info.getWifiIP() ?? ''),
language: 'en'
);
amount: orderAmount!,
customerName: customerName!,
customerEmail: customerEmail!,
// orderDescription: orderDescription!,
orderDescription: "Dr. Sulaiman Al Habib Hospital",
sdkToken: sdkTokenResponse?.sdkToken ?? '',
merchantReference: merchantReference!,
currency: currency,
customerIp: (await _info.getWifiIP() ?? ''),
language: 'en');
_payfort.callPayFortForApplePay(
request: request,

@ -21,6 +21,7 @@ class CustomColors {
static const Color appBackgroudGrey2Color = Color(0xFFF8F8F8);
static const Color green = Color(0xFF359846);
static const Color orange = Color(0xFFCC9B14);
static const Color darkOrange = Color(0xFFE16F17);
static const Color femaleColor = Color(0xFF359846);
static const Color maleColor = Color(0xFFCC9B14);

@ -108,10 +108,10 @@ class CalendarUtils {
TZDateTime scheduleDateTimeUTZ = TZDateTime.from(scheduleDateTime!, _currentLocation);
// print("writableCalendars-name: " + writableCalendars.name);
// print("writableCalendars-Id: " + writableCalendars.id);
// print("writableCalendarsToString: " + writableCalendars.toString());
// print("writableCalendarsToString: " + writableCalendars!.id!);
print("writableCalendars-name: " + writableCalendars.name);
print("writableCalendars-Id: " + writableCalendars.id);
print("writableCalendarsToString: " + writableCalendars.toString());
print("writableCalendarsToString: " + writableCalendars!.id!);
Event event = Event(
writableCalendars!.id,
start: scheduleDateTimeUTZ,
@ -119,11 +119,21 @@ class CalendarUtils {
title: title,
description: description,
);
await deviceCalendarPlugin.createOrUpdateEvent(event).catchError((e) {
print("catchError " + e.toString());
}).whenComplete(() {
print("whenComplete " + eventId!);
});
if(Platform.isAndroid) {
Result<bool> result = await deviceCalendarPlugin.hasPermissions();
print(result);
await deviceCalendarPlugin.createOrUpdateEvent(event).catchError((e) {
print("catchError " + e.toString());
}).whenComplete(() {
print("whenComplete Calender ID " + eventId!);
});
}
}
deleteEvent(Calendar _calendar, Event _event) async {

@ -17,7 +17,8 @@ class PenguinMethodChannel {
"dataServiceName": "api",
"positionServiceName": "pe",
"clientID": "HMG",
"username": "test",
// "username": "Haroon",
"username": username,
"isSimulationModeEnabled": false,
"isShowUserName": false,
"isUpdateUserLocationSmoothly": true,

@ -59,7 +59,10 @@ class TranslationBase {
String get clinicName => localizedValues['clinicName'][locale.languageCode];
String get hospitalName => localizedValues['hospitalName'][locale.languageCode];
String get doctorName => localizedValues['doctorName'][locale.languageCode];
String get NoClinicFound => localizedValues['NoClinicFound'][locale.languageCode];
String get nearestAppo => localizedValues['nearestAppo'][locale.languageCode];
@ -2975,11 +2978,16 @@ class TranslationBase {
String get searchClinic => localizedValues["searchClinic"][locale.languageCode];
String get selectBranch => localizedValues["selectBranch"][locale.languageCode];
String get searchByBranch => localizedValues["searchByBranch"][locale.languageCode];
String get existingPackage => localizedValues["existingPackage"][locale.languageCode];
String get continueOrbookNew => localizedValues["continueOrbookNew"][locale.languageCode];
String get newAppointment => localizedValues["newAppointment"][locale.languageCode];
String get proceedPackage => localizedValues["proceedPackage"][locale.languageCode];
String get hospitalNavigationTitle => localizedValues["hospitalNavigationTitle"][locale.languageCode];
String get hospitalNavigationSubtitle => localizedValues["hospitalNavigationSubtitle"][locale.languageCode];
String get workplaceNameAr => localizedValues["workplaceNameAr"][locale.languageCode];
String get occupationNameEn => localizedValues["occupationNameEn"][locale.languageCode];
String get occupationNameAr => localizedValues["occupationNameAr"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -68,12 +68,12 @@ class Utils {
static var navigationProjectsList = [
{
"Desciption": "Sahafa Hospital",
"DesciptionN": null,
"DesciptionN": "مستشفى الصحافة",
"ID": 130,
"LegalName": "Sahafa Hospital",
"LegalNameN": "مستشفى الصحافة",
"Name": "Sahafa Hospital",
"NameN": null,
"NameN": "مستشفى الصحافة",
"PhoneNumber": "+966115222222",
"SetupID": "013311",
"DistanceInKilometers": 0,

@ -10,12 +10,9 @@ class LocationSelectionDialog extends StatelessWidget {
final List<HospitalsModel> data;
final Function(int)? onValueSelected;
final int? selectedIndex;
final bool isArabic;
const LocationSelectionDialog(
{super.key,
required this.data,
this.onValueSelected,
this.selectedIndex});
const LocationSelectionDialog({super.key, required this.data, this.onValueSelected, this.selectedIndex, required this.isArabic});
@override
Widget build(BuildContext context) {
@ -25,6 +22,7 @@ class LocationSelectionDialog extends StatelessWidget {
borderRadius: BorderRadius.circular(8),
),
child: LocationDialogBody(
isArabic: isArabic,
data: data,
onValueSelected: onValueSelected,
selectedIndex: selectedIndex,
@ -36,12 +34,9 @@ class LocationDialogBody extends StatefulWidget {
final List<HospitalsModel> data;
final Function(int)? onValueSelected;
final int? selectedIndex;
final bool isArabic;
const LocationDialogBody(
{super.key,
required this.data,
this.onValueSelected,
this.selectedIndex});
const LocationDialogBody({super.key, required this.data, this.onValueSelected, this.selectedIndex, required this.isArabic});
@override
State<LocationDialogBody> createState() => _LocationDialogBodyState();
@ -55,6 +50,7 @@ class _LocationDialogBodyState extends State<LocationDialogBody> {
Widget build(BuildContext context) {
return isListVisible
? LocationListExpandedBody(
isArabic: widget.isArabic,
data: widget.data,
onItemClick: (data) {
if (data.isEmpty) return;
@ -78,22 +74,19 @@ class _LocationDialogBodyState extends State<LocationDialogBody> {
isListVisible = true;
});
},
selectedText: currentlySelected == -1
? ""
: widget.data[currentlySelected].name ?? "");
selectedText: currentlySelected == -1 ? "" : widget.data[currentlySelected].name ?? "");
}
}
class LocationListExpandedBody extends StatefulWidget {
final List<HospitalsModel> data;
final Function(String) onItemClick;
final bool isArabic;
const LocationListExpandedBody(
{super.key, required this.data, required this.onItemClick});
const LocationListExpandedBody({super.key, required this.data, required this.onItemClick, required this.isArabic});
@override
State<LocationListExpandedBody> createState() =>
_LocationListExpandedBodyState();
State<LocationListExpandedBody> createState() => _LocationListExpandedBodyState();
}
class _LocationListExpandedBodyState extends State<LocationListExpandedBody> {
@ -117,17 +110,16 @@ class _LocationListExpandedBodyState extends State<LocationListExpandedBody> {
mainAxisSize: MainAxisSize.min,
children: [
SelectBranchHeader(),
SizedBox(height: 8,),
SizedBox(
height: 8,
),
TextField(
controller: controller,
onChanged: (v) {
tempListData.clear();
if (v.length > 0) {
for (int i = 0; i < widget.data.length; i++) {
if (widget.data[i].name
?.toLowerCase()
.contains(v.toLowerCase()) ==
true) {
if (widget.data[i].name?.toLowerCase().contains(v.toLowerCase()) == true) {
tempListData.add(widget.data[i]);
}
}
@ -140,7 +132,7 @@ class _LocationListExpandedBodyState extends State<LocationListExpandedBody> {
hintStyle: TextStyle(fontSize: 12),
hintText: TranslationBase.of(context).searchByBranch,
suffixIcon: Icon(Icons.search),
contentPadding: EdgeInsets.symmetric(vertical: 9,horizontal: 14),
contentPadding: EdgeInsets.symmetric(vertical: 9, horizontal: 14),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8.0),
borderSide: BorderSide(
@ -163,16 +155,11 @@ class _LocationListExpandedBodyState extends State<LocationListExpandedBody> {
height: 24,
child: InkWell(
onTap: () {
widget
.onItemClick(tempListData[index].name ?? "");
widget.onItemClick(tempListData[index].name ?? "");
},
child: Text(
"${tempListData[index].name ?? ""} ( ${tempListData[index].distanceInKilometers} km )",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Colors.black,
letterSpacing: -0.96),
"${widget.isArabic ? tempListData[index].nameN : tempListData[index].name ?? ""}",
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Colors.black, letterSpacing: -0.96),
),
),
),
@ -190,11 +177,7 @@ class LocationListWrapBody extends StatelessWidget {
final VoidCallback? onTextBoxClicked;
final String selectedText;
const LocationListWrapBody(
{super.key,
this.onConfirmClicked,
this.onTextBoxClicked,
required this.selectedText});
const LocationListWrapBody({super.key, this.onConfirmClicked, this.onTextBoxClicked, required this.selectedText});
@override
Widget build(BuildContext context) {
@ -203,7 +186,7 @@ class LocationListWrapBody extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SelectBranchHeader(),
SelectBranchHeader(),
SizedBox(
height: 24,
),
@ -213,21 +196,13 @@ class LocationListWrapBody extends StatelessWidget {
},
title: Text(
TranslationBase.of(context).selectBranch,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Colors.black,
letterSpacing: -0.96),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Colors.black, letterSpacing: -0.96),
),
subtitle: selectedText.isEmpty
? null
: Text(
selectedText,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w400,
color: Colors.black,
letterSpacing: -0.96),
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w400, color: Colors.black, letterSpacing: -0.96),
),
trailing: Icon(
Icons.arrow_drop_down_outlined,
@ -262,19 +237,15 @@ class LocationListWrapBody extends StatelessWidget {
}
}
class SelectBranchHeader extends StatelessWidget{
class SelectBranchHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Row(
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
TranslationBase.of(context).selectBranch,
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w600,
color: Colors.black,
letterSpacing: -0.96),
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Colors.black, letterSpacing: -0.96),
),
InkWell(
onTap: () {

@ -38,9 +38,9 @@ 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/PayFortWebLive/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 SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.5.065+4050065
version: 4.5.068+4050068
environment:
sdk: " >=3.5.0 <4.0.0"
@ -36,6 +36,7 @@ dependencies:
#Google Fit & Apple HealthKit
# health: ^3.0.3
health: ^11.1.0
pedometer: ^4.0.2
#chart
fl_chart: ^0.64.0
@ -107,7 +108,7 @@ dependencies:
flutter_svg: ^2.0.8
#Calendar Events
manage_calendar_events: ^2.0.3
manage_calendar_events: 2.0.3
#InAppBrowser
flutter_inappwebview: ^6.1.5

Loading…
Cancel
Save