Compare commits

..

9 Commits

@ -1,4 +1,4 @@
'# diplomaticquarterapp
# diplomaticquarterapp
A new Flutter application.

@ -142,7 +142,7 @@ dependencies {
// exclude group: 'com.google.protobuf',module: 'protobuf-javalite'
// exclude group: 'com.google.protobuf',module: 'protobuf-lite'
// })
implementation 'pub.devrel:easypermissions:3.0.0'
implementation 'pub.devrel:easypermissions:0.4.0'
// implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0'
// implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0'
implementation 'com.google.guava:guava:27.0.1-android'
@ -167,7 +167,7 @@ dependencies {
implementation "us.zoom.videosdk:zoomvideosdk-annotation:1.10.1"
implementation "us.zoom.videosdk:zoomvideosdk-videoeffects:1.10.1"
// implementation "org.jetbrains.anko:anko-commons:0.10.4"
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'
implementation 'com.google.android.gms:play-services-location:17.1.0'//for Android

@ -22,6 +22,7 @@ import com.github.kittinunf.fuel.httpPost
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import io.flutter.plugin.common.MethodChannel
import org.jetbrains.anko.doAsyncResult
import org.json.JSONArray
import org.json.JSONException
import org.json.JSONObject
@ -207,6 +208,7 @@ fun <T>httpPost(url: String, body: Map<String, Any?>, onSuccess: (response: HTTP
.header("Content-Type", "application/json")
.header("Allow", "*/*")
.response { request, response, result ->
result.doAsyncResult { }
result.fold({ data ->
val dataString = String(data)
if (isJSONValid(dataString)) {

@ -11,8 +11,7 @@ buildscript {
repositories {
google()
// jcenter()
mavenCentral()
jcenter()
maven { url 'https://developer.huawei.com/repo/' }
// maven {
@ -38,9 +37,6 @@ allprojects {
maven {
url 'https://developer.huawei.com/repo/'
}
maven {
url 'https://mvnrepository.com/artifact/'
}
maven {
url "https://artifactory.ess-dev.com/artifactory/gradle-dev-local"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

@ -1,7 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="21.035" height="25.699" viewBox="0 0 21.035 25.699">
<g id="file_4_" data-name="file (4)" transform="translate(0 0)">
<path id="Path_4376" data-name="Path 4376" d="M199.117,108.4h.751v18.461a2.228,2.228,0,0,0,2.225,2.225h13.668v.684a1.42,1.42,0,0,1-1.42,1.42H199.12a1.42,1.42,0,0,1-1.42-1.42V109.82A1.418,1.418,0,0,1,199.117,108.4Z" transform="translate(-197.7 -105.491)" fill="#00000"/>
<path id="Path_4377" data-name="Path 4377" d="M95.931,22.79H88.32a1.42,1.42,0,0,1-1.42-1.42V1.42A1.42,1.42,0,0,1,88.32,0H98.462V.47a1.378,1.378,0,0,0-.008.15V4.509a2,2,0,0,0,2,2h3.889c.04,0,.083,0,.123-.005h.494V21.371a1.42,1.42,0,0,1-1.42,1.42H95.931Zm-.287-4.825h4.962a.671.671,0,0,0,0-1.342H95.641a.671.671,0,1,0,0,1.342Zm-4.965-3.424h9.927a.671.671,0,0,0,0-1.342H90.679a.671.671,0,0,0,0,1.342Zm9.927-4.978H90.679a.671.671,0,0,0,0,1.342h9.927a.671.671,0,0,0,0-1.342Z" transform="translate(-83.924 0)" fill="#00000"/>
<path id="Path_4378" data-name="Path 4378" d="M92.626,6.481h-3.9A1.191,1.191,0,0,1,87.546,5.3V1.4a.6.6,0,0,1,.6-.6.582.582,0,0,1,.419.177L93.05,5.462A.6.6,0,0,1,92.626,6.481Z" transform="translate(-72.209 -0.779)" fill="#00000"/>
<path id="Path_4376" data-name="Path 4376" d="M199.117,108.4h.751v18.461a2.228,2.228,0,0,0,2.225,2.225h13.668v.684a1.42,1.42,0,0,1-1.42,1.42H199.12a1.42,1.42,0,0,1-1.42-1.42V109.82A1.418,1.418,0,0,1,199.117,108.4Z" transform="translate(-197.7 -105.491)" fill="#989898"/>
<path id="Path_4377" data-name="Path 4377" d="M95.931,22.79H88.32a1.42,1.42,0,0,1-1.42-1.42V1.42A1.42,1.42,0,0,1,88.32,0H98.462V.47a1.378,1.378,0,0,0-.008.15V4.509a2,2,0,0,0,2,2h3.889c.04,0,.083,0,.123-.005h.494V21.371a1.42,1.42,0,0,1-1.42,1.42H95.931Zm-.287-4.825h4.962a.671.671,0,0,0,0-1.342H95.641a.671.671,0,1,0,0,1.342Zm-4.965-3.424h9.927a.671.671,0,0,0,0-1.342H90.679a.671.671,0,0,0,0,1.342Zm9.927-4.978H90.679a.671.671,0,0,0,0,1.342h9.927a.671.671,0,0,0,0-1.342Z" transform="translate(-83.924 0)" fill="#989898"/>
<path id="Path_4378" data-name="Path 4378" d="M92.626,6.481h-3.9A1.191,1.191,0,0,1,87.546,5.3V1.4a.6.6,0,0,1,.6-.6.582.582,0,0,1,.419.177L93.05,5.462A.6.6,0,0,1,92.626,6.481Z" transform="translate(-72.209 -0.779)" fill="#989898"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

@ -1,6 +1,5 @@
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:flutter/material.dart';
final Color? secondaryColor = appColor;
final Color? secondaryColor = Colors.red[800];
final Color? dividerColor = Colors.grey[600];

@ -333,13 +333,20 @@ var GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSt
var SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC';
var CHECK_SCANNED_NFC_QR_CODE = 'Services/Patients.svc/REST/Patient_ValidationMachine_ForNFC';
var HAS_DENTAL_PLAN = 'Services/Doctors.svc/REST/Dental_IsPatientHasOnGoingEstimation';
var LASER_BODY_PARTS = 'Services/Patients.svc/REST/Laser_GetBodyPartsByCategory';
var INSERT_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Insert';
var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Update';
var GET_PATIENT_SHARE_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForWalkIn';
var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWalkinAppointment';
//URL to get medicine and pharmacies list
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
@ -601,9 +608,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/tamaralive/Home/GetInstallments';
var GET_TAMARA_PLAN = 'https://mdlaboratories.com/tamara/Home/GetInstallments';
var GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid=';
var GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamara/api/OnlineTamara/order_status?orderid=';
var UPDATE_TAMARA_STATUS = 'Services/PayFort_Serv.svc/REST/Tamara_UpdateRequestStatus';
@ -665,6 +672,8 @@ var GET_WE_CARE_TOUR_URL = 'Services/Consent.svc/Rest/Consent_VirtualJurny_Url_G
var GET_DENTAL_INSTRUCTIONS = 'Services/OUTPs.svc/Rest/getProcedureNotification';
var INSERT_WALKIN_APPOINTMENT = "Services/Doctors.svc/REST/InsertWalkinAppointment";
//PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";

@ -116,13 +116,13 @@ const Map localizedValues = {
"national-id-number": {"en": "National ID Number", "ar": "رقم الهوية الوطنية / الاقامة"},
"medical-file-number": {"en": "Medical File Number", "ar": "رقم الملف الطبي"},
'login': {'en': 'Login', 'ar': 'دخول'},
'loginregister': {'en': 'Login', 'ar': 'دخول'},
'loginregister': {'en': 'Login / Register', 'ar': 'دخول/ تسجيل'},
'poweredBy': {'en': 'Powered by', 'ar': 'مشغل بواسطة'},
"welcome": {"en": "Welcome", "ar": "مرحبا بكم"},
"welcome-to": {"en": "Welcome to", "ar": "مرحبا بك في"},
"patient-app": {"en": "Patient App", "ar": "تطبيق المراجعين"},
"welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف"},
"king-khalid-university": {"en": "King Khalid University", "ar": "جامعة الملك خالد"},
"dr-sulaiman-text": {"en": "Dr. Sulaiman Al Habib", "ar": "د. سليمان الحبيب"},
'welcome_text2': {'en': 'Have you previously visited the hospitals or medical centers of Dr. Sulaiman Al Habib?', 'ar': 'هل قمت مسبقا بزيارة مستشفيات او مراكز الدكتور سليمان الحبيب الطبية ؟'},
'yes': {'en': 'Yes', 'ar': 'نعم'},
'no': {'en': 'No', 'ar': 'لا'},
@ -269,7 +269,6 @@ const Map localizedValues = {
"register-info-family": {"en": "How would like to add the new member?", "ar": "كيف ترغب باضافة العضو الجديد؟"},
"remove-family-member": {"en": "Remove this member?", "ar": "إزالة ملف العضو؟"},
"MyMedicalFile": {"en": "My Medical File", 'ar': 'الملف الطبي الالكتروني'},
"MyMedicalFiles": {"en": "Medical File", 'ar': 'الملف الطبي'},
"myMedicalFileSubTitle": {"en": "All your medical records", 'ar': 'جميع سجلاتك الطبية'},
"viewMore": {"en": "View More", 'ar': 'عرض المزيد'},
"homeHealthCareService": {"en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية'},
@ -494,7 +493,7 @@ const Map localizedValues = {
"ar":
"توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية الاشعة التطعيمات العلاج الطبيعي) ... "
},
"LoginRegister": {"en": "Login", "ar": "دخول"},
"LoginRegister": {"en": "Login/Register", "ar": "دخول / تسجيل"},
"OrderLog": {"en": "Order Log", "ar": " سجل الطلبات"},
"info-lab": {
"en": "This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.",
@ -539,7 +538,6 @@ const Map localizedValues = {
"review": {"en": " reviews", "ar": "تقييمات"},
"viewMedicalFile": {"en": "View Details", "ar": "عرض الملف الطبي"},
"viewAllServices": {"en": "View All Services", "ar": "عرض جميع الخدمات"},
"allServices": {"en": "All Services", "ar": "جميع الخدمات"},
"medicalFile": {"en": "Medical File", "ar": "ملفي الطبي"},
"verified": {"en": "Verified", "ar": "تم التحقق"},
"checkup": {"en": "Checkup", "ar": "فحص"},
@ -552,7 +550,7 @@ const Map localizedValues = {
"erservices": {"en": "Emergency", "ar": "الطوارئ"},
"services2": {"en": "Services", "ar": "خدمات"},
"cantSeeProfile": {"en": "To view your medical profile, please log in or register now", "ar": "لتصفح ملفك الطبي الرجاء تسجيل الدخول أو التسجيل الآن"},
"loginRegisterNow": {"en": "Login Now", "ar": "تسجيل الدخول الآن"},
"loginRegisterNow": {"en": "Login or Register Now", "ar": "تسجيل الدخول أو التسجيل الآن"},
"HMGPharmacy": {"en": "HMG Pharmacy", "ar": "صيدلية HMG"},
"ecommerceSolution": {"en": "Ecommerce Solution", "ar": "حل التجارة الإلكترونية"},
"comprehensive": {"en": "Comprehensive", "ar": "شامل"},
@ -1815,37 +1813,37 @@ const Map localizedValues = {
"ar": "الرجاء السماح لتطبيق مجموعة الحبيب الطبية للظهورعلى سطح الشاشة عند استلام الاتصال من الطبيب لخدمة اللايف كير"
},
"cameraPermissionDialog": {
"en": "King Khalid University app needs to access Camera to enable virtual consultation between patient & doctor, attach images and scan QR for parking service.",
"ar": "يحتاج تطبيق جامعة الملك خالد إلى الوصول إلى الكاميرا لتمكين الاستشارة الافتراضية بين المريض والطبيب ، وإرفاق الصور ومسح QR لخدمة وقوف السيارات."
"en": "Dr. Al Habib app needs to access Camera to enable virtual consultation between patient & doctor, attach images and scan QR for parking service.",
"ar": "يحتاج تطبيق دكتور الحبيب الى صلاحية الوصول إلى الكاميرا لخدمة الاستشارة الافتراضية بين المراجع والطبيب وإرفاق الصور ومسح رمز الاستجابة السريع لخدمة مواقف السيارات."
},
"galleryPermission": {
"en": "King Khalid University app needs to access Read & write external storage to upload images & documents in the E-Referral module and renew and update the insurance cards.",
"ar": "يحتاج تطبيق جامعة الملك خالد إلى الوصول إلى وحدة التخزين الخارجية للقراءة والكتابة لتحميل الصور والمستندات في وحدة الإحالة الإلكترونية وتجديد وتحديث بطاقات التأمين."
"en": "Dr. Al Habib app needs to access Read & write external storage to upload images & documents in the E-Referral module and renew and update the insurance cards.",
"ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول إلى معرض الصور وذلك لتحميل الصور والمستندات لخدمة الإحالة الإلكترونية وكذلك لخدمة تجديد بطاقات التأمين وتحديثها."
},
"locationPermissionDialog": {
"en":
"King Khalid University app collects location data to show the nearest HMG hospitals and ER Locations and provides health care services to your location and Health weather indicators service and the medication delivery.",
"ar": "يجمع تطبيق جامعة الملك خالد بيانات الموقع لإظهار أقرب مستشفيات المجموعة ومواقع الطوارئ ويوفر خدمات الرعاية الصحية لموقعك وخدمة مؤشرات الطقس الصحي وتوصيل الأدوية."
"Dr. Al Habib app collects location data to show the nearest HMG hospitals and ER Locations and provides health care services to your location and Health weather indicators service and the medication delivery.",
"ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى الموقع لإظهار أقرب مستشفيات المجموعة، مواقع الطوارئ، تقديم خدمات الرعاية الصحية إلى موقعك، خدمة مؤشرات الطقس الصحية وكذلك خدمة توصيل الأدوية."
},
"calendarPermission": {
"en": "King Khalid University app collects calendar data to modify and set reminders for Appointments",
"ar": "يقوم تطبيق جامعة الملك خالد بجمع بيانات التقويم لتعديل وتعيين تذكيرات للمواعيد"
"en": "Dr. Al Habib app collects calendar data to modify and set reminders for Appointments",
"ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى التقويم وذلك لاضافة تذكيرات بالمواعيد في التقويم."
},
"recordAudioPermission": {
"en": "King Khalid University app needs audio permission to enable voice command features.",
"ar": "يحتاج تطبيق جامعة الملك خالد إلى إذن صوتي لتمكين ميزات الأوامر الصوتية."
"en": "Dr. Al Habib app needs audio permission to enable voice command features.",
"ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى الصوت لتفعيل خدمة الأوامر الصوتية."
},
"wifiPermission": {
"en": "King Khalid University app needs to access WiFi state permission to connect to the HMG WiFi network from within the app when you visit the hospital.",
"ar": "يحتاج تطبيق جامعة الملك خالد إلى الوصول إلى إذن حالة WiFi للاتصال بشبكة HMG WiFi من داخل التطبيق عند زيارة المستشفى."
"en": "Dr. Al Habib app needs to access WiFi state permission to connect to the HMG WiFi network from within the app when you visit the hospital.",
"ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى الواي فاي للاتصال بشبكة الواي فاي في المجموعة عند زيارة المستشفى."
},
"physicalActivityPermission": {
"en": "King Khalid University app collects physical activity data to read heart rate, steps & distance from your smartwatch & send it to your doctor.",
"ar": "يجمع تطبيق جامعة الملك خالد بيانات النشاط البدني لقراءة معدل ضربات القلب والخطوات والمسافة من ساعتك الذكية وإرسالها إلى طبيبك."
"en": "Dr. Al Habib app collects physical activity data to read heart rate, steps & distance from your smartwatch & send it to your doctor.",
"ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى بيانات النشاط البدني لقراءة معدل ضربات القلب والخطوات والمسافة من ساعتك الذكية وتحميلها على ملفك الطبي حتى يتمكن الطبيب من الاطلاع عليها."
},
"bluetoothPermission": {
"en": "King Khalid University app needs to access Bluetooth permission to connect blood pressure & blood sugar devices with the app to analyze the data",
"ar": "يحتاج تطبيق جامعة الملك خالد إلى الحصول على إذن Bluetooth لتوصيل أجهزة ضغط الدم وسكر الدم بالتطبيق لتحليل البيانات"
"en": "Dr. Al Habib app needs to access Bluetooth permission to connect blood pressure & blood sugar devices with the app to analyze the data",
"ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى البلوتوث لربط أجهزة ضغط الدم وسكر الدم بالتطبيق لتحليل البيانات وتحميلها على ملفك الطبي حتى يتمكن الطبيب من الاطلاع عليها."
},
"privacyPolicy": {"en": "Privacy Policy", "ar": "سياسة الخصوصية"},
"termsConditions": {"en": "Terms & Conditions", "ar": "الأحكام والشروط"},
@ -1978,4 +1976,11 @@ 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": "تعليماتي"},
"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": "تتيح لك خاصية انتظار المواعيد حجز موعد أثناء تواجدك داخل مبنى المستشفى، وفي حالة عدم وجود وقت متاح في جدول الطبيب."},
"waitingAppointmentText2": {"en": "Waiting for an appointment can take more than 2 hours.", "ar": "يمكن أن يستغرق انتظار الموعد أكثر من ساعتين."},
"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": "كيفية استخدام طرق التحقق؟"},
};

@ -193,7 +193,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021"; //0560717232
// body['PatientID'] = 283093; //4609100
// body['PatientID'] = 4768303; //4609100
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574

@ -18,6 +18,8 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart';
import '../../models/Appointments/DoctorListResponse.dart';
bool isAppArabic = false;
class ProjectViewModel extends BaseViewModel {
GAnalytics get analytics => locator<GAnalytics>();
@ -45,6 +47,25 @@ class ProjectViewModel extends BaseViewModel {
GetAdmissionInfoResponseModel getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel();
GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel();
int waitingAppointmentProjectID = 0;
DoctorList? waitingAppointmentDoctor;
String waitingAppointmentNFCCode = "";
setWaitingAppointmentDoctor(DoctorList waitingAppointmentDoctor) {
this.waitingAppointmentDoctor = waitingAppointmentDoctor;
notifyListeners();
}
setWaitingAppointmentNFCCode(String waitingAppointmentNFCCode) {
this.waitingAppointmentNFCCode = waitingAppointmentNFCCode;
notifyListeners();
}
setWaitingAppointmentProjectID(int projectID) {
this.waitingAppointmentProjectID = projectID;
notifyListeners();
}
void setIsAllAppointmentsLoaded(bool value) {
_isAllAppointmentsLoaded = value;
notifyListeners();

@ -41,7 +41,6 @@ class DoctorList {
dynamic serviceID;
String? setupID;
List<String>? speciality;
List<String>? specialityN;
dynamic workingHours;
dynamic decimalDoctorRate;
@ -88,7 +87,6 @@ class DoctorList {
this.serviceID,
this.setupID,
this.speciality,
this.specialityN,
this.workingHours,
this.decimalDoctorRate});
@ -135,7 +133,6 @@ class DoctorList {
serviceID = json['ServiceID'];
setupID = json['SetupID'];
if (json.containsKey('Speciality') && json['Speciality'] != null) speciality = json['Speciality'].cast<String>();
if (json.containsKey('SpecialityN') && json['SpecialityN'] != null) specialityN = json['SpecialityN'].cast<String>();
workingHours = json['WorkingHours'];
decimalDoctorRate = json['DecimalDoctorRate'];
}
@ -183,7 +180,6 @@ class DoctorList {
data['ServiceID'] = this.serviceID;
data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality;
data['SpecialityN'] = this.specialityN;
data['WorkingHours'] = this.workingHours;
data['DecimalDoctorRate'] = this.decimalDoctorRate;
return data;

@ -25,7 +25,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../../theme/theme_value.dart';
import '../dialogs/select_city_dialog.dart';
class NewEReferralStepThreePage extends StatefulWidget {
@ -162,7 +161,7 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
fontSize: 14,
letterSpacing: -0.56,
decoration: TextDecoration.underline,
color: appColor,
color: CustomColors.accentColor,
),
),
),
@ -249,7 +248,7 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
children: [
Checkbox(
value: isPatientInsured,
activeColor: CustomColors.primaryColor,
activeColor: CustomColors.accentColor,
onChanged: (bool? newValue) {
setState(() {
isPatientInsured = newValue!;
@ -343,7 +342,7 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
fontSize: 14,
letterSpacing: -0.56,
decoration: TextDecoration.underline,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
),
),

@ -669,7 +669,6 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
},

@ -174,7 +174,7 @@ class _BMICalculatorState extends State<BMICalculator> {
padding: EdgeInsets.all(16),
child: SecondaryButton(
label: TranslationBase.of(context).calculate,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
onTap: () {
setState(() {
calculateBMI();

@ -220,7 +220,7 @@ class _BmrCalculatorState extends State<BmrCalculator> {
child: Container(
width: double.infinity,
height: double.infinity,
decoration: containerRadius(!isMale ? CustomColors.primaryColor : Colors.white, 100),
decoration: containerRadius(!isMale ? CustomColors.accentColor : Colors.white, 100),
),
),
mWidth(12),
@ -254,7 +254,7 @@ class _BmrCalculatorState extends State<BmrCalculator> {
child: Container(
width: double.infinity,
height: double.infinity,
decoration: containerRadius(isMale ? CustomColors.primaryColor : Colors.white, 100),
decoration: containerRadius(isMale ? CustomColors.accentColor : Colors.white, 100),
),
),
mWidth(12),
@ -410,7 +410,7 @@ class _BmrCalculatorState extends State<BmrCalculator> {
color: Colors.white,
child: SecondaryButton(
label: TranslationBase.of(context).calculate,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
onTap: () {
setState(() {
calculateBmr();

@ -74,7 +74,7 @@ class BmrResultPage extends StatelessWidget {
),
],
),
progressColor: CustomColors.primaryColor,
progressColor: CustomColors.accentColor,
backgroundColor: Colors.white,
),
),
@ -98,7 +98,7 @@ class BmrResultPage extends StatelessWidget {
color: Colors.white,
child: SecondaryButton(
label: TranslationBase.of(context).viewDocList,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
onTap: () {
getDoctorsList(context);
},

@ -327,7 +327,7 @@ class _BodyFatState extends State<BodyFat> {
child: Container(
width: double.infinity,
height: double.infinity,
decoration: containerRadius(!isMale ? CustomColors.primaryColor : Colors.white, 100),
decoration: containerRadius(!isMale ? CustomColors.accentColor : Colors.white, 100),
),
),
mWidth(12),
@ -361,7 +361,7 @@ class _BodyFatState extends State<BodyFat> {
child: Container(
width: double.infinity,
height: double.infinity,
decoration: containerRadius(isMale ? CustomColors.primaryColor : Colors.white, 100),
decoration: containerRadius(isMale ? CustomColors.accentColor : Colors.white, 100),
),
),
mWidth(12),
@ -493,7 +493,7 @@ class _BodyFatState extends State<BodyFat> {
color: Colors.white,
child: SecondaryButton(
label: TranslationBase.of(context).calculate,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
onTap: () {
setState(() {
calculateBodyFat();

@ -78,7 +78,7 @@ class FatResult extends StatelessWidget {
),
],
),
progressColor: CustomColors.primaryColor,
progressColor: CustomColors.accentColor,
backgroundColor: Colors.white,
),
),
@ -96,7 +96,7 @@ class FatResult extends StatelessWidget {
color: Colors.white,
child: SecondaryButton(
label: TranslationBase.of(context).viewDocList,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
onTap: () {
getDoctorsList(context);
},

@ -156,7 +156,7 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
child: Container(
width: double.infinity,
height: double.infinity,
decoration: containerRadius(!isMale ? CustomColors.primaryColor : Colors.white, 100),
decoration: containerRadius(!isMale ? CustomColors.accentColor : Colors.white, 100),
),
),
mWidth(12),
@ -190,7 +190,7 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
child: Container(
width: double.infinity,
height: double.infinity,
decoration: containerRadius(isMale ? CustomColors.primaryColor : Colors.white, 100),
decoration: containerRadius(isMale ? CustomColors.accentColor : Colors.white, 100),
),
),
mWidth(12),
@ -344,7 +344,7 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
color: Colors.white,
child: SecondaryButton(
label: TranslationBase.of(context).calculate,
color: ageController.text.isNotEmpty ? int.parse(ageController.text) >120 ? Colors.grey : CustomColors.primaryColor : CustomColors.accentColor,
color: ageController.text.isNotEmpty ? int.parse(ageController.text) >120 ? Colors.grey : CustomColors.accentColor : CustomColors.accentColor,
onTap: () {
if(ageController.text.isNotEmpty && int.parse(ageController.text) <121 && int.parse(_heightController.text)<250 && int.parse(_weightController.text) <200)
setState(() {

@ -76,7 +76,7 @@ class CalorieResultPage extends StatelessWidget {
),
],
),
progressColor: CustomColors.primaryColor,
progressColor: CustomColors.accentColor,
backgroundColor: Colors.white,
),
),
@ -99,7 +99,7 @@ class CalorieResultPage extends StatelessWidget {
color: Colors.white,
child: SecondaryButton(
label: TranslationBase.of(context).viewDocList,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
onTap: () {
getDoctorsList(context);
},

@ -137,7 +137,7 @@ class _CarbsState extends State<Carbs> {
padding: const EdgeInsets.all(12.0),
child: Text(
TranslationBase.of(context).notSure,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.56, color: CustomColors.primaryColor, decoration: TextDecoration.underline),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.56, color: CustomColors.accentColor, decoration: TextDecoration.underline),
),
),
)
@ -230,7 +230,7 @@ class _CarbsState extends State<Carbs> {
color: Colors.white,
child: SecondaryButton(
label: TranslationBase.of(context).calculate,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
onTap: () {
setState(() {
{

@ -74,7 +74,7 @@ class CarbsResult extends StatelessWidget {
color: Colors.white,
child: SecondaryButton(
label: TranslationBase.of(context).seeListOfDoctor,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
onTap: () {
getDoctorsList(context);
},

@ -1,26 +1,38 @@
import 'dart:convert';
import 'dart:developer';
import 'dart:io';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/LiveCare/ApplePayInsertRequest.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart';
import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -41,7 +53,10 @@ class BookConfirm extends StatefulWidget {
bool isLiveCareAppointment;
int initialSlotDuration;
BookConfirm({required this.doctor, required this.selectedDate, required this.isLiveCareAppointment, required this.selectedTime, required this.initialSlotDuration});
bool isWalkinAppointment = false;
BookConfirm(
{required this.doctor, required this.selectedDate, required this.isLiveCareAppointment, required this.selectedTime, required this.initialSlotDuration, required this.isWalkinAppointment});
late DoctorsListService service;
late PatientShareResponse patientShareResponse;
@ -62,6 +77,13 @@ class _BookConfirmState extends State<BookConfirm> {
bool isEligible = false;
bool isCash = false;
String? selectedPaymentMethod = "";
String? selectedInstallments = "";
String? tamaraPaymentStatus;
String? tamaraOrderID;
String? transID;
late MyInAppBrowser browser;
@override
void initState() {
// widget.authUser = new AuthenticatedUser();
@ -212,10 +234,14 @@ class _BookConfirmState extends State<BookConfirm> {
elevation: 0,
onPressed: () async {
bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) ?? false;
if (isLiveCareSchedule) {
insertLiveCareScheduledAppointment(context, widget.doctor);
if (widget.isWalkinAppointment) {
getWalkinAppointmentPatientShare();
} else {
insertAppointment(context, widget.doctor, widget.initialSlotDuration);
if (isLiveCareSchedule) {
insertLiveCareScheduledAppointment(context, widget.doctor);
} else {
insertAppointment(context, widget.doctor, widget.initialSlotDuration);
}
}
},
child: Text(TranslationBase.of(context).bookAppo, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48, color: Colors.white)),
@ -226,6 +252,336 @@ class _BookConfirmState extends State<BookConfirm> {
);
}
openPaymentDialog(AppoitmentAllHistoryResultList appo, PatientShareResponse patientShareResponse) {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: PaymentDialog(
appo: appo,
patientShareResponse: patientShareResponse,
isCashPatient: isCash,
onPaymentMethodSelected: () {},
),
),
);
},
transitionDuration: Duration(milliseconds: 500),
barrierDismissible: false,
barrierLabel: '',
context: context,
pageBuilder: (context, animation1, animation2) => SizedBox()).then((value) {
print(value);
if (value != null) {
navigateToPaymentMethod(context, value as PatientShareResponse);
// projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo);
} else {
// projectViewModel.analytics.todoList.to_do_list_cancel_payment_details(appo);
}
});
}
Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse) async {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.doctor.projectID;
appo.clinicID = widget.doctor.clinicID;
appo.clinicName = widget.doctor.clinicName;
appo.projectName = widget.doctor.projectName;
appo.appointmentNo = DateTime.now().millisecondsSinceEpoch;
appo.isLiveCareAppointment = false;
appo.doctorID = widget.doctor.doctorID;
appo.appointmentDate = DateUtil.convertDateToString(DateTime.now()); //widget.patientShareResponse.appointmentDate;
appo.serviceID = widget.patientShareResponse.serviceID;
Navigator.push(
context,
FadePage(
page: PaymentMethod(
onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) {
setState(() {});
},
patientShare: widget.patientShareResponse.patientShareWithTax)))
.then((value) {
selectedPaymentMethod = value[0];
if (value != null) {
if (selectedPaymentMethod == "ApplePay") {
if (projectViewModel.havePrivilege(103)) {
startApplePay(appo, patientShareResponse);
} else {
openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
}
} else {
openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
}
projectViewModel.analytics.appointment.payment_method(appointment_type: 'Walk-In', clinic: widget.doctor.clinicName, payment_method: value[0], payment_type: 'appointment');
}
});
}
void startApplePay(AppoitmentAllHistoryResultList appo, PatientShareResponse patientShareResponse) async {
transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo);
print("TransactionID: $transID");
GifLoaderDialogUtils.showMyDialog(context);
LiveCareService service = new LiveCareService();
ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest();
PayfortProjectDetailsRespModel? payfortProjectDetailsRespModel;
await context.read<PayfortViewModel>().getProjectDetailsForPayfort(projectId: appo.projectID, serviceId: ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum()).then((value) {
payfortProjectDetailsRespModel = value!;
});
applePayInsertRequest.clientRequestID = transID;
applePayInsertRequest.clinicID = appo.clinicID;
applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR";
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.user.patientID;
applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = appo.doctorID;
applePayInsertRequest.projectID = appo.projectID.toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = projectViewModel.user.patientID;
applePayInsertRequest.patientTypeID = projectViewModel.user.patientType;
applePayInsertRequest.patientOutSA = projectViewModel.user.outSA;
applePayInsertRequest.appointmentDate = appo.appointmentDate;
applePayInsertRequest.appointmentNo = appo.appointmentNo;
applePayInsertRequest.orderDescription = "Appointment Payment";
applePayInsertRequest.liveServiceID = "0";
applePayInsertRequest.latitude = "0.0";
applePayInsertRequest.longitude = "0.0";
applePayInsertRequest.amount = patientShareResponse.patientShareWithTax.toString();
applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
applePayInsertRequest.userName = projectViewModel.user.patientID;
applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html";
applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html";
applePayInsertRequest.paymentOption = "ApplePay";
applePayInsertRequest.isMobSDK = true;
applePayInsertRequest.merchantReference = transID;
applePayInsertRequest.merchantIdentifier = payfortProjectDetailsRespModel!.merchantIdentifier!;
applePayInsertRequest.commandType = "PURCHASE";
applePayInsertRequest.signature = payfortProjectDetailsRespModel!.signature;
applePayInsertRequest.accessCode = payfortProjectDetailsRespModel!.accessCode;
applePayInsertRequest.shaRequestPhrase = payfortProjectDetailsRespModel!.shaRequest;
applePayInsertRequest.shaResponsePhrase = payfortProjectDetailsRespModel!.shaResponse;
applePayInsertRequest.returnURL = "";
service.applePayInsertRequest(applePayInsertRequest, context).then((res) async {
if (res["MessageStatus"] == 1) {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Walk-In appointment payment",
orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo);
},
projectId: appo.projectID,
serviceTypeEnum: ServiceTypeEnum.appointmentPayment,
);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: "An error occurred while processing your request");
}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
});
}
openPayment(List<String?> paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
selectedPaymentMethod = paymentMethod[0];
selectedInstallments = paymentMethod[1];
transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo);
browser.openPaymentBrowser(
amount,
"Walk-In appointment payment",
transID!,
appo.projectID.toString(),
authenticatedUser.emailAddress!,
paymentMethod[0]!,
authenticatedUser.patientType,
authenticatedUser.firstName!,
authenticatedUser.patientID,
authenticatedUser,
browser,
widget.patientShareResponse.isLiveCareAppointment!,
"2",
widget.patientShareResponse.isLiveCareAppointment! ? widget.patientShareResponse.clinicID.toString() : "",
context,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,
widget.patientShareResponse.doctorID,
paymentMethod[1]);
// }
}
onBrowserLoadStart(String url) {
if (selectedPaymentMethod == "TAMARA") {
if (Platform.isAndroid) {
Uri uri = new Uri.dataFromString(url);
tamaraPaymentStatus = uri.queryParameters['status'];
tamaraOrderID = uri.queryParameters['AuthorizePaymentId'];
} else {
Uri uri = new Uri.dataFromString(url);
tamaraPaymentStatus = uri.queryParameters['paymentStatus'];
tamaraOrderID = uri.queryParameters['orderId'];
}
}
MyInAppBrowser.successURLS.forEach((element) {
if (url.contains(element)) {
if (browser.isOpened()) browser.close();
MyInAppBrowser.isPaymentDone = true;
return;
}
});
MyInAppBrowser.errorURLS.forEach((element) {
if (url.contains(element)) {
if (browser.isOpened()) browser.close();
MyInAppBrowser.isPaymentDone = false;
return;
}
});
}
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
try {
if (selectedPaymentMethod == "TAMARA") {
checkTamaraPaymentStatus(transID!, appo);
// if (tamaraPaymentStatus != null && tamaraPaymentStatus!.toLowerCase() == "approved") {
// updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID!, num.parse(selectedInstallments!), appo);
// } else {
// updateTamaraRequestStatus(
// "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID! != null ? tamaraOrderID! : "", num.parse(selectedInstallments!), appo);
// }
} else {
checkPaymentStatus(appo);
}
} catch (err) {
print(err);
}
}
checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getTamaraPaymentStatus(orderID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["status"].toString().toLowerCase() == "success") {
updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID!, int.parse(selectedInstallments!), appo);
} else {
updateTamaraRequestStatus(
"Failed", "00", Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), tamaraOrderID != null ? tamaraOrderID! : "", int.parse(selectedInstallments!), appo);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, num selectedInstallments, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
try {
DoctorsListService service = new DoctorsListService();
service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (tamaraPaymentStatus!.toLowerCase() == "approved") {
insertWalkInAppointment(context, widget.doctor, widget.initialSlotDuration, tamaraOrderID);
}
}).catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
GifLoaderDialogUtils.hideDialog(context);
});
} catch (err) {
print(err);
}
}
addAdvancedNumberRequestTamara(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
markAppointmentForTamara(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.markAppointmentForTamara(appo.projectID!, appo.appointmentNo.toString()).then((res) {
GifLoaderDialogUtils.hideDialog(context);
sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(appo.appointmentNo), projectViewModel.waitingAppointmentProjectID);
}).catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
GifLoaderDialogUtils.hideDialog(context);
});
}
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
String txn_ref;
num amount;
String payment_method;
final currency = projectViewModel.user!.outSA == 0 ? "sar" : 'aed';
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(transID!, false, context).then((res) {
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
txn_ref = res['Merchant_Reference'];
amount = res['Amount'];
payment_method = res['PaymentMethod'];
GifLoaderDialogUtils.hideDialog(context);
insertWalkInAppointment(context, widget.doctor, widget.initialSlotDuration, res);
projectViewModel.analytics.appointment.payment_success(
appointment_type: 'Walk-In', payment_method: payment_method, clinic: appo.clinicName, hospital: appo.projectName, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['Response_Message']);
projectViewModel.analytics.appointment.payment_fail(
appointment_type: 'Walk-In',
payment_method: selectedPaymentMethod,
clinic: appo.clinicName,
hospital: appo.projectName,
txn_amount: widget.patientShareResponse.patientShareWithTax.toString(),
txn_currency: currency,
error_type: res['Response_Message']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err.toString());
print(err);
});
}
Widget showInfo(String title, String des) {
return Container(
child: Row(
@ -253,6 +609,52 @@ class _BookConfirmState extends State<BookConfirm> {
);
}
// canPayForWalkInAppointment() {
// GifLoaderDialogUtils.showMyDialog(context);
// widget.service
// .canPayForWalkInAppointment(
// widget.doctor.projectID!,
// widget.doctor.clinicID!,
// )
// .then((res) {
// GifLoaderDialogUtils.hideDialog(context);
// getWalkinAppointmentPatientShare();
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// AppToast.showErrorToast(message: err);
// print(err);
// });
// }
getWalkinAppointmentPatientShare() {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
GifLoaderDialogUtils.showMyDialog(context);
appo.doctorTitle = widget.doctor.doctorTitle;
appo.doctorNameObj = widget.doctor.name;
appo.appointmentDate = DateUtil.convertDateToString(DateTime.now());
appo.projectName = widget.doctor.projectName;
widget.service
.getPatientShareForWalkInAppointment(
widget.doctor.clinicID!,
widget.doctor.projectID!,
widget.doctor.doctorID!,
)
.then((res) {
widget.patientShareResponse = new PatientShareResponse.fromJson(res["OnlineCheckInAppointmentsWalkInModel"]);
GifLoaderDialogUtils.hideDialog(context);
if (widget.patientShareResponse.patientShareWithTax != 0 || widget.patientShareResponse.patientShareWithTax != 0.0) {
openPaymentDialog(appo, widget.patientShareResponse!);
} else {
insertWalkInAppointment(context, widget.doctor, widget.initialSlotDuration, null);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context) async {
ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false);
@ -320,11 +722,102 @@ class _BookConfirmState extends State<BookConfirm> {
});
}
insertWalkInAppointment(context, DoctorList docObject, int initialSlotDuration, paymentRes) async {
GifLoaderDialogUtils.showMyDialog(
context,
);
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.doctorID = docObject.doctorID;
appo.clinicID = docObject.clinicID;
appo.projectID = docObject.projectID;
widget.service
.insertWalkInAppointment(
docObject.doctorID!, docObject.clinicID!, docObject.projectID!, widget.selectedTime, widget.selectedDate, initialSlotDuration, projectViewModel.isArabic ? 1 : 2, context)
.then((res) {
if (res['MessageStatus'] == 1) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
appo.appointmentNo = res["AppointmentNo"]; // Add appointment No to the appointment project
Future.delayed(Duration(milliseconds: 500), () {
if (selectedPaymentMethod == "TAMARA") {
markAppointmentForTamara(appo);
addAdvancedNumberRequestTamara("Tamara-Advance-0000", paymentRes, res["AppointmentNo"].toString(), appo);
} else {
if (widget.patientShareResponse.patientShareWithTax != 0 || widget.patientShareResponse.patientShareWithTax != 0.0) {
createAdvancePayment(paymentRes, appo);
} else {
sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(res["AppointmentNo"]), projectViewModel.waitingAppointmentProjectID);
}
}
});
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
});
}
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(
context,
);
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
addAdvancedNumberRequest(
Utils.isVidaPlusProject(projectViewModel, appo.projectID!)
? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
: res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
appo.appointmentNo.toString(),
appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(
context,
);
DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(appointmentID), projectViewModel.waitingAppointmentProjectID);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
sendNfcCheckInRequest(String nfcId, int checkInBy, int appoNo, int projectID) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.sendCheckinNfcRequest(appoNo, nfcId, projectID, checkInBy, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
_showMyDialog(res["SuccessMsg"], this.context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
_showMyDialog(err, this.context);
});
}
insertAppointment(context, DoctorList docObject, int initialSlotDuration) async {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
String logs = await sharedPref.getString('selectedLogSlots');
List<dynamic> decodedLogs = json.decode(logs);
GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false);
GifLoaderDialogUtils.showMyDialog(
context,
);
AppoitmentAllHistoryResultList appo;
widget.service
// .insertAppointment(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, widget.selectedTime, widget.selectedDate, initialSlotDuration, context, 'null', null, null, projectViewModel)
@ -382,7 +875,9 @@ class _BookConfirmState extends State<BookConfirm> {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
widget.selectedDate = timeSlot!.toUtc().add(Duration(hours: 3)).toString().split(" ")[0];
widget.selectedTime = timeSlot.toUtc().add(Duration(hours: 3)).toString().split(" ")[1].substring(0, 5);
GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false);
GifLoaderDialogUtils.showMyDialog(
context,
);
AppoitmentAllHistoryResultList appo;
widget.service
.insertLiveCareScheduleAppointment(
@ -446,7 +941,9 @@ class _BookConfirmState extends State<BookConfirm> {
getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {
int languageID = projectViewModel.isArabic ? 1 : 2;
String errorMsg = "";
GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false);
GifLoaderDialogUtils.showMyDialog(
context,
);
widget.service.getPatientShare(appointmentNo, clinicID, projectID, languageID, context).then((res) {
projectViewModel.selectedBodyPartList.clear();
projectViewModel.laserSelectionDuration = 0;
@ -575,4 +1072,32 @@ class _BookConfirmState extends State<BookConfirm> {
),
);
}
Future<void> _showMyDialog(String message, BuildContext context) async {
return showDialog<void>(
context: context,
barrierDismissible: true, // user must tap button!
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Alert'),
content: SingleChildScrollView(
child: ListBody(
children: <Widget>[
Text(message),
],
),
),
actions: <Widget>[
TextButton(
child: const Text('OK'),
onPressed: () {
Navigator.of(context).pop();
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
},
),
],
);
},
);
}
}

@ -711,7 +711,6 @@ class _BookSuccessState extends State<BookSuccess> {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
},

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/doctor_post_pre_images_page.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/waiting_appointment/waiting_appointment_info.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -520,15 +521,9 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
// if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) {
// navigateToDentalComplaints(context);
// } else {
if (DocAvailableAppointments.areSlotsAvailable) {
if (DocAvailableAppointments.selectedTime == TranslationBase.of(context).waitingAppointment) {
if (projectViewModel.isLogin) {
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user!.age! > 12) {
navigateToDentalComplaints(context);
} else {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
navigateToBookConfirm(context);
projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot!, doctor: widget.doctor);
}
canPayForWalkInAppointment();
} else {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
@ -539,9 +534,30 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
} else
AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot);
// }
} else {
if (DocAvailableAppointments.areSlotsAvailable) {
if (projectViewModel.isLogin) {
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user!.age! > 12) {
navigateToDentalComplaints(context);
} else {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
navigateToBookConfirm(context);
projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot!, doctor: widget.doctor);
}
} else {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase.of(context).loginToUseService,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {navigateToLogin()},
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot);
}
}
}
Future navigateToDentalComplaints(BuildContext context) async {
@ -569,15 +585,11 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
});
}
navigateToLogin() async {
navigateToLogin() {
ConfirmDialog.closeAlertDialog(context);
var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(LOGIN_TYPE);
}
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
Future navigateToBookConfirm(context) async {
@ -590,8 +602,33 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
selectedDate: DocAvailableAppointments.selectedDate!,
selectedTime: DocAvailableAppointments.selectedTime!,
initialSlotDuration: DocAvailableAppointments.initialSlotDuration!,
isWalkinAppointment: false,
),
),
);
}
Future navigateToWaitingAppointment(context) async {
projectViewModel.setWaitingAppointmentProjectID(widget.doctor.projectID!);
projectViewModel.setWaitingAppointmentDoctor(widget.doctor);
Navigator.push(
context,
FadePage(
page: WaitingAppointmentInfo(),
),
);
}
canPayForWalkInAppointment() {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.canPayForWalkInAppointment(widget.doctor.clinicID!, widget.doctor.projectID!, widget.doctor.doctorID!).then((res) {
GifLoaderDialogUtils.hideDialog(context);
navigateToWaitingAppointment(context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
}

@ -384,9 +384,7 @@ class _QRCodeState extends State<QRCode> {
sendNfcCheckInRequest(String nfcId, int checkInBy) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.sendCheckinNfcRequest(widget!.patientShareResponse!.appointmentNo!, nfcId, widget.patientShareResponse!.projectID!, checkInBy, context).then((res) {
print(res);

@ -4,8 +4,6 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -19,7 +17,6 @@ import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import '../MyAppointments/MyAppointments.dart';
import 'BookSuccess.dart';
class BookReminderPage extends StatefulWidget {
@ -209,13 +206,18 @@ class _BookReminderPageState extends State<BookReminderPage> {
}
Future navigateToBookSuccess(BuildContext context) async {
Navigator.pop(context, null);
Navigator.pushAndRemoveUntil(
Navigator.push(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> route) => false,
FadePage(
page: BookSuccess(
docObject: widget.docObject,
patientShareResponse: widget.patientShareResponse,
appoDateFormatted: widget.appoDateFormatted,
appoTimeFormatted: widget.appoTimeFormatted,
isCash: widget.isCash,
),
),
);
Navigator.push(context, FadePage(page: MyAppointments()));
}
Future<Map<Permission, PermissionStatus>> requestPermissions() async {

@ -60,6 +60,8 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
var language;
bool isLiveCareSchedule = false;
bool isWaitingAppointmentAvailable = false;
// String selectedLogSlots ='';
@override
@ -206,7 +208,9 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
openTimeSlotsPickerForDate(DateTime dateStart, List<TimeSlot> freeSlots) {
dayEvents.clear();
DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0);
if (isWaitingAppointmentAvailable && DateUtils.isSameDay(dateStart, DateTime.now())) {
dayEvents.add(TimeSlot(isoTime: TranslationBase.of(context).waitingAppointment, start: DateTime.now(), end: DateTime.now(), vidaDate: ""));
}
freeSlots.forEach((v) {
if (v.start == dateStartObj) dayEvents.add(v);
});
@ -349,6 +353,8 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['FreeTimeSlots'].length != 0) {
// isWaitingAppointmentAvailable = res['IsAllowToBookWaitingAppointment']; // true;
isWaitingAppointmentAvailable = true; // true;
DocAvailableAppointments.initialSlotDuration = res['InitialSlotDuration'];
DocAvailableAppointments.areAppointmentsAvailable = true;
freeSlotsResponse = res['FreeTimeSlots'];
@ -362,7 +368,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
_calendarController.selectedDate = DateUtil.convertStringToDate(
widget.doctorSchedule['Date'],
)
}
},
});
});
} else {

@ -71,7 +71,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
minWidth: MediaQuery.of(context).size.width,
height: 45.0,
child: CustomTextButton(
backgroundColor: CustomColors.primaryColor,
backgroundColor: CustomColors.accentColor,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),

@ -0,0 +1,113 @@
import 'package:diplomaticquarterapp/pages/BookAppointment/waiting_appointment/waiting_appointment_verification.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class WaitingAppointmentInfo extends StatelessWidget {
const WaitingAppointmentInfo({super.key});
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).waitingAppointment,
isShowAppBar: true,
isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: MediaQuery.of(context).size.width,
decoration: containerRadius(Colors.white, 10),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
"assets/images/new/waitingAppo.svg",
width: 52.0,
height: 52.0,
),
mHeight(11),
Text(
TranslationBase.of(context).whatWaitingAppointment,
maxLines: 1,
style: TextStyle(fontSize: 17, fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
),
mHeight(11),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Text(
TranslationBase.of(context).waitingAppointmentText1,
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip),
),
),
mHeight(18),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Text(
TranslationBase.of(context).waitingAppointmentText2,
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip),
),
),
mHeight(24),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(
Icons.warning,
size: 20,
color: Color(0xffA78618),
),
mWidth(10),
Container(
width: MediaQuery.of(context).size.width * 0.7,
child: Text(
TranslationBase.of(context).waitingAppointmentText3,
style: TextStyle(
fontSize: 14, fontStyle: FontStyle.italic, fontWeight: FontWeight.w600, color: Color(0xffA78618), letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip),
),
),
],
),
],
),
),
),
],
),
),
),
bottomSheet: Container(
height: 80,
color: CustomColors.white,
padding: EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 25.0),
child: Container(
child: DefaultButton(
TranslationBase.of(context).continues,
() {
Navigator.push(
context,
FadePage(
page: WaitingAppointmentVerification(),
),
);
},
color: CustomColors.accentColor,
),
),
),
);
}
}

@ -0,0 +1,292 @@
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import '../../../uitl/utils.dart';
class WaitingAppointmentVerification extends StatefulWidget {
const WaitingAppointmentVerification({super.key});
@override
State<WaitingAppointmentVerification> createState() => _WaitingAppointmentVerificationState();
}
class _WaitingAppointmentVerificationState extends State<WaitingAppointmentVerification> {
String selectedVerificationMethod = "QR";
late ProjectViewModel projectViewModel;
late LocationUtils locationUtils;
ProjectDetailListModel projectDetailListModel = ProjectDetailListModel();
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).waitingAppointment,
isShowAppBar: true,
isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
mHeight(11),
Text(
TranslationBase.of(context).waitingAppointmentVerificationMethod,
maxLines: 1,
style: TextStyle(fontSize: 18, fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.04, height: 35 / 24),
),
mHeight(12),
Container(
width: MediaQuery.of(context).size.width,
decoration: containerRadius(Colors.white, 10),
child: Padding(
padding: const EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InkWell(
onTap: () {
setState(() {
selectedVerificationMethod = "QR";
});
},
child: Row(
children: [
Container(
width: 20,
height: 20,
decoration: containerColorRadiusBorderWidth(selectedVerificationMethod == "QR" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
),
mWidth(6),
Container(
height: 40.0,
width: 40.0,
padding: EdgeInsets.all(7.0),
child: SvgPicture.asset(
"assets/images/new/services/qr_code.svg",
),
),
Text(
TranslationBase.of(context).pharmaLiveCareScanQR,
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, fontWeight: FontWeight.w600, letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip),
),
],
),
),
Divider(),
InkWell(
onTap: () {
setState(() {
selectedVerificationMethod = "NFC";
});
},
child: Row(
children: [
Container(
width: 20,
height: 20,
decoration: containerColorRadiusBorderWidth(selectedVerificationMethod == "NFC" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
),
mWidth(6),
Container(
height: 40.0,
width: 40.0,
padding: EdgeInsets.all(7.0),
child: SvgPicture.asset(
"assets/images/new/services/contactless.svg",
),
),
Text(
TranslationBase.of(context).scanNFC,
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, fontWeight: FontWeight.w600, letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip),
),
],
),
),
Divider(),
InkWell(
onTap: () {
setState(() {
selectedVerificationMethod = "Location";
});
},
child: Row(
children: [
Container(
width: 20,
height: 20,
decoration: containerColorRadiusBorderWidth(selectedVerificationMethod == "Location" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
),
mWidth(6),
Container(
height: 40.0,
width: 40.0,
padding: EdgeInsets.all(7.0),
child: SvgPicture.asset(
"assets/images/new/services/location.svg",
),
),
Text(
TranslationBase.of(context).checkInViaLocation,
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, fontWeight: FontWeight.w600, letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip),
),
],
),
),
mHeight(6),
],
),
),
),
mHeight(12),
Container(
width: MediaQuery.of(context).size.width,
decoration: containerRadius(Colors.white, 10),
child: Padding(
padding: const EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
mHeight(12),
Text(
TranslationBase.of(context).howToUseVerificationMethod,
maxLines: 1,
style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -1.04, height: 35 / 24),
),
mHeight(12),
Image.asset(
'assets/images/new/NFCCheckIn_QR_gps_HMG.png',
fit: BoxFit.fitWidth,
width: MediaQuery.of(context).size.width,
),
mHeight(12),
],
),
),
),
],
),
),
),
bottomSheet: Container(
height: 80,
color: CustomColors.white,
padding: EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 25.0),
child: Container(
child: DefaultButton(
TranslationBase.of(context).continues,
() {
startVerification();
},
color: CustomColors.accentColor,
),
),
),
);
}
startVerification() {
switch (selectedVerificationMethod) {
case "QR":
startQRCodeScan();
break;
case "NFC":
startNFCScan();
break;
case "Location":
startLocationCheckIn();
break;
}
}
checkScannedNFCAndQRCode(String nfcId) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.checkScannedNFCAndQRCode(nfcId, projectViewModel.waitingAppointmentDoctor!.projectID!).then((res) {
GifLoaderDialogUtils.hideDialog(context);
projectViewModel.setWaitingAppointmentNFCCode(nfcId);
if (res["returnValue"] == 1) {
navigateToBookConfirm(context);
} else {
AppToast.showErrorToast(message: "Invalid verification point scanned.");
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
Future navigateToBookConfirm(context) async {
final DateFormat formatter = DateFormat('yyyy-MM-dd');
Navigator.push(
context,
FadePage(
page: BookConfirm(
doctor: projectViewModel.waitingAppointmentDoctor!,
isLiveCareAppointment: false,
selectedDate: formatter.format(DateTime.now()),
selectedTime: TranslationBase.of(context).waitingAppointment,
initialSlotDuration: 15,
isWalkinAppointment: true,
),
),
);
}
startLocationCheckIn() async {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
projectDetailListModel = Utils.getProjectDetailObj(projectViewModel, projectViewModel.waitingAppointmentProjectID);
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000;
projectViewModel.setWaitingAppointmentNFCCode(projectDetailListModel.checkInQrCode!);
print(dist);
if (dist <= projectDetailListModel.geofenceRadius!) {
navigateToBookConfirm(context);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError);
}
});
}
startNFCScan() {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
checkScannedNFCAndQRCode(nfcId);
});
}, onCancel: () {
// Navigator.of(context).pop();
// locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment!);
});
});
}
startQRCodeScan() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
if (onlineCheckInQRCode != "") {
checkScannedNFCAndQRCode(onlineCheckInQRCode);
} else {}
}
}

@ -36,7 +36,7 @@ class DoctorView extends StatefulWidget {
DoctorView(
{required this.doctor,
this.isLiveCareAppointment,
this.isLiveCareAppointment,
this.isObGyneAppointment = false,
this.isDoctorNameSearch = false,
this.isContinueDentalPlan = false,
@ -50,6 +50,7 @@ class DoctorView extends StatefulWidget {
}
class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMixin {
late ProjectViewModel projectViewModel;
@override
@ -98,12 +99,10 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
widget.isShowDate
? Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctor.date)),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
)
: Container(),
widget.isShowDate ? Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctor.date)),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
) : Container(),
],
),
if (widget.doctor.doctorTitle != null) SizedBox(height: 6),
@ -124,20 +123,12 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
children: <Widget>[
if (widget.doctor.clinicName != null) MyRichText(TranslationBase.of(context).clinic + ":", widget.doctor.clinicName!, context.read<ProjectViewModel>().isArabic),
if (widget.doctor.projectName != null) MyRichText(TranslationBase.of(context).branch, widget.doctor.projectName!, context.read<ProjectViewModel>().isArabic),
if (!projectViewModel.isArabic)
if (widget.doctor.speciality != null && widget.doctor.speciality!.length > 0)
Text(
this.widget.doctor.speciality![0].trim(),
// getDoctorSpeciality(this.doctor.speciality).trim(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
if (projectViewModel.isArabic)
if (widget.doctor.specialityN != null && widget.doctor.specialityN!.length > 0)
Text(
this.widget.doctor.specialityN![0].trim(),
// getDoctorSpeciality(this.doctor.speciality).trim(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
if (widget.doctor.speciality != null && widget.doctor.speciality!.length > 0)
Text(
this.widget.doctor.speciality![0].trim(),
// getDoctorSpeciality(this.doctor.speciality).trim(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
if (widget.doctor.nearestFreeSlot != null)
Text(
getDate(widget.doctor.nearestFreeSlot),
@ -156,18 +147,9 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
itemSize: 20,
ignoreGestures: true,
ratingWidget: RatingWidget(
full: Icon(
Icons.star,
color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star,
color: CustomColors.accentColor,
),
full: Icon(Icons.star, color: CustomColors.accentColor,),
half: Icon(Icons.star_half, color: CustomColors.accentColor,),
empty: Icon(Icons.star, color: CustomColors.accentColor,),
),
tapOnlyMode: true,
itemPadding: EdgeInsets.symmetric(horizontal: 4.0),
@ -285,14 +267,8 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
}
void next(BuildContext context) {
Navigator.push(
context,
FadePage(
page: ObGyneTimeSlots(
projectID: widget.doctor.projectID!,
selectedClinicID: widget.doctor.clinicID!,
selectedDoctorID: widget.doctor.doctorID!,
obGyneProcedureListResponse: widget.obGyneProcedureListResponse!)));
Navigator.push(context,
FadePage(page: ObGyneTimeSlots(projectID: widget.doctor.projectID!, selectedClinicID: widget.doctor.clinicID!, selectedDoctorID: widget.doctor.doctorID!, obGyneProcedureListResponse: widget.obGyneProcedureListResponse!)));
}
Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo, bool isContinueDentalPlan = false}) async {

@ -54,7 +54,6 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0.0)),
insetPadding: EdgeInsets.all(21),
child: ReminderDialog(
shouldPop: false,
onClick: (int i) async {
String text = "";
if (i == 0) {
@ -86,7 +85,6 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted,
scheduleDateTime: dateTime,
eventId: eventId);
Navigator.of(context).pop();
onSuccess();
}
} else {
@ -102,9 +100,8 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
class ReminderDialog extends StatefulWidget {
Function? onClick;
bool? shouldPop;
ReminderDialog({this.onClick, this.shouldPop = true});
ReminderDialog({this.onClick});
@override
_ReminderDialogState createState() => _ReminderDialogState();
@ -250,9 +247,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
TranslationBase.of(context).save,
() {
widget.onClick!(i);
if(widget.shouldPop == true) {
Navigator.pop(context);
}
Navigator.pop(context);
},
color: CustomColors.green,
),

@ -1,7 +1,6 @@
import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -111,7 +110,7 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
TranslationBase.of(context).start,
//Changed By Aamir URL
chat!.isEmpty ? null : () => {launch(chat!)},
color: appColor,
color: Color(0xffD02127),
textColor: chat!.isEmpty ? Color(0xff000000) : Colors.white,
disabledColor: Color(0xffEAEAEA),
),

@ -243,7 +243,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
width: 8,
height: 8,
decoration: containerRadius(
CustomColors.primaryColor,
CustomColors.accentColor,
100,
),
),

@ -226,7 +226,7 @@ class OrderLogPage extends StatelessWidget {
width: 8,
height: 8,
decoration: containerRadius(
CustomColors.primaryColor,
CustomColors.accentColor,
100,
),
),

@ -366,7 +366,7 @@ class RRTRequestPageState extends State<RRTRequestPage> {
else
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
},
color: acceptTerms ? CustomColors.primaryColor : Colors.grey,
color: acceptTerms ? CustomColors.accentColor : Colors.grey,
),
),
],

@ -10,11 +10,11 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/waiting_appointment/waiting_appointment_info.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -273,7 +273,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
TranslationBase.of(context).reviewAppointment,
goToBookConfirm,
// DocAvailableAppointments.areSlotsAvailable ? goToBookConfirm : null,
color: appColor,
color: Color(0xFFD02127),
disabledColor: Color(0xff28323A).withOpacity(0.3),
),
),
@ -300,23 +300,68 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
}
void goToBookConfirm() {
if (DocAvailableAppointments.areSlotsAvailable)
navigateToBookConfirm(context);
else
AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot);
if (DocAvailableAppointments.selectedTime == TranslationBase.of(context).waitingAppointment) {
canPayForWalkInAppointment();
} else {
if (DocAvailableAppointments.areSlotsAvailable)
navigateToBookConfirm(context);
else
AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot);
}
}
canPayForWalkInAppointment() {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.canPayForWalkInAppointment(widget.appo.clinicID!, widget.appo.projectID!, widget.appo.doctorID!).then((res) {
GifLoaderDialogUtils.hideDialog(context);
navigateToWaitingAppointment(context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err, localContext: context);
print(err);
});
}
Future navigateToWaitingAppointment(context) async {
DoctorList doctor = new DoctorList();
doctor.name = widget.appo.doctorNameObj;
doctor.clinicID = widget.appo.clinicID;
doctor.projectID = widget.appo.projectID;
doctor.doctorID = widget.appo.doctorID;
doctor.clinicName = widget.appo.clinicName;
doctor.projectName = widget.appo.projectName;
doctor.doctorTitle = widget.appo.doctorTitle;
doctor.doctorImageURL = widget.appo.doctorImageURL;
doctor.speciality = widget.appo.doctorSpeciality;
doctor.nationalityFlagURL = "";
doctor.doctorRate = widget.appo.doctorRate;
doctor.noOfPatientsRate = widget.appo.noOfPatientsRate;
projectViewModel?.setWaitingAppointmentProjectID(widget.appo.projectID!);
projectViewModel?.setWaitingAppointmentDoctor(doctor);
Navigator.push(
context,
FadePage(
page: WaitingAppointmentInfo(),
),
);
}
Future navigateToBookConfirm(context) async {
Navigator.push(
context,
FadePage(
page: BookConfirm(
context,
FadePage(
page: BookConfirm(
doctor: getDoctorObject(),
isLiveCareAppointment: widget.appo.isLiveCareAppointment!,
selectedDate: DocAvailableAppointments.selectedDate!,
selectedTime: DocAvailableAppointments.selectedTime!,
initialSlotDuration: 0,
)));
isWalkinAppointment: false,
),
),
);
}
void getDoctorRatingsDetails() {
@ -390,15 +435,15 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
ratingWidget: RatingWidget(
full: Icon(
Icons.star,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
),
tapOnlyMode: true,

@ -9,7 +9,6 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -508,7 +507,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
height: 22,
child: Radio(
value: _value,
activeColor: _value == _currentPage ? appColor : Color(0xffE8E8E8),
activeColor: _value == _currentPage ? Color(0xffD02127) : Color(0xffE8E8E8),
groupValue: _currentPage,
onChanged: (index) {
setState(() {

@ -21,11 +21,35 @@ class ArrivedButtons {
"icon": 'lab_result.svg',
"caller": "labResult",
},
{
"title": TranslationBase.of(AppGlobal.context).vitalSigns,
"subtitle": TranslationBase.of(AppGlobal.context).vitalSignsSubtitle,
"icon": 'vital_signs.svg',
"caller": "VitalSigns",
},
{
"title": TranslationBase.of(AppGlobal.context).raise,
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
"icon": "raise_comp.svg",
"caller": "insertComplaint",
},
{
"title": TranslationBase.of(AppGlobal.context).insuranceApproval,
"subtitle": TranslationBase.of(AppGlobal.context).insuranceApprovalSubtitle,
"icon": 'insurance_approval.svg',
"caller": "Insurance",
},
{
"title": TranslationBase.of(AppGlobal.context).askDoctor,
"subtitle": TranslationBase.of(AppGlobal.context).service,
"icon": 'ask_doctor.svg',
"caller": "askDoc",
},
{
"title": TranslationBase.of(AppGlobal.context).service,
"subtitle": TranslationBase.of(AppGlobal.context).appoSurvey,
"icon": "survey.svg",
"caller": "Survey",
}
];
}

@ -1114,7 +1114,6 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
projectViewModel.analytics.todoList.to_do_list_cancel_payment_details(appo);
}
});
projectViewModel.analytics.todoList.to_do_list_pay_now(appo);
}
@ -1445,7 +1444,6 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
},

@ -87,7 +87,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
Container(
width: 24,
height: 24,
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "MADA" ? CustomColors.primaryColor : Colors.transparent, 100, Colors.grey, 0.5),
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "MADA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
),
mWidth(12),
Container(
@ -137,7 +137,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
Container(
width: 24,
height: 24,
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "VISA" ? CustomColors.primaryColor : Colors.transparent, 100, Colors.grey, 0.5),
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "VISA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
),
mWidth(12),
Container(
@ -187,7 +187,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
Container(
width: 24,
height: 24,
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "MASTERCARD" ? CustomColors.primaryColor : Colors.transparent, 100, Colors.grey, 0.5),
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "MASTERCARD" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
),
mWidth(12),
Container(
@ -237,7 +237,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
Container(
width: 24,
height: 24,
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "TAMARA" ? CustomColors.primaryColor : Colors.transparent, 100, Colors.grey, 0.5),
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "TAMARA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
),
mWidth(12),
Container(
@ -287,7 +287,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
Container(
width: 24,
height: 24,
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "Installment" ? CustomColors.primaryColor : Colors.transparent, 100, Colors.grey, 0.5),
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "Installment" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
),
mWidth(12),
Container(
@ -338,7 +338,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
Container(
width: 24,
height: 24,
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "ApplePay" ? CustomColors.primaryColor : Colors.transparent, 100, Colors.grey, 0.5),
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "ApplePay" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
),
mWidth(12),
Container(

@ -80,7 +80,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
SizedBox(height: 12),
Text(
TranslationBase.of(context).appoPaymentConfirm,
style: TextStyle(fontSize: 14.0, color: CustomColors.primaryColor, fontWeight: FontWeight.w600, letterSpacing: -0.56),
style: TextStyle(fontSize: 14.0, color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.56),
),
SizedBox(height: 12),
Container(

@ -55,7 +55,7 @@ class _TodoListCardState extends State<TodoListCard> {
),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Text("01:23:22 " + TranslationBase.of(context).upcomingTimeLeft, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.primaryColor, letterSpacing: -0.48)),
child: Text("01:23:22 " + TranslationBase.of(context).upcomingTimeLeft, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48)),
),
],
),
@ -119,9 +119,9 @@ class _TodoListCardState extends State<TodoListCard> {
itemSize: 20,
ignoreGestures: true,
ratingWidget: RatingWidget(
full: Icon(Icons.star, color: CustomColors.primaryColor,),
half: Icon(Icons.star_half, color: CustomColors.primaryColor,),
empty: Icon(Icons.star, color: CustomColors.primaryColor,),
full: Icon(Icons.star, color: CustomColors.accentColor,),
half: Icon(Icons.star_half, color: CustomColors.accentColor,),
empty: Icon(Icons.star, color: CustomColors.accentColor,),
),
tapOnlyMode: true,
unratedColor: Colors.grey[500],
@ -158,7 +158,7 @@ class _TodoListCardState extends State<TodoListCard> {
padding: const EdgeInsets.only(top: 0.0),
child: Text(
"More Details",
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: CustomColors.primaryColor, letterSpacing: -0.48, height: 25 / 16, decoration: TextDecoration.underline),
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48, height: 25 / 16, decoration: TextDecoration.underline),
),
),
],

@ -8,7 +8,6 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -346,7 +345,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
});
}
},
color: appColor,
color: Color(0xffD02127),
textColor: Colors.white,
disabledColor: Color(0xffEAEAEA),
),

@ -209,7 +209,7 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
child: Container(
margin: EdgeInsets.only(top: 12),
decoration: BoxDecoration(
color: (cOCItemList[index].statusId==7||cOCItemList[index].statusId==8)?CustomColors.primaryColor:(cOCItemList[index].statusId==10||cOCItemList[index].statusId==6||cOCItemList[index].statusId==9)?CustomColors.green:CustomColors.orange,
color: (cOCItemList[index].statusId==7||cOCItemList[index].statusId==8)?CustomColors.accentColor:(cOCItemList[index].statusId==10||cOCItemList[index].statusId==6||cOCItemList[index].statusId==9)?CustomColors.green:CustomColors.orange,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),

@ -311,15 +311,15 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
ratingWidget: RatingWidget(
full: Icon(
Icons.star,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star_border,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
),
onRatingUpdate: (double value) {},
@ -506,15 +506,15 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
ratingWidget: RatingWidget(
full: Icon(
Icons.star,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star_border,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
),
onRatingUpdate: (double value) {},

@ -151,7 +151,7 @@ class _AttachInsuranceCardImageDialogState extends State<AttachInsuranceCardImag
);
},
textColor: Colors.white,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
),
Text(

@ -58,7 +58,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate> with SingleTickerProv
controller: _tabController,
isScrollable: false,
indicatorWeight: 3.0,
indicatorColor: CustomColors.primaryColor,
indicatorColor: CustomColors.accentColor,
labelColor: CustomColors.textDarkColor,
labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
unselectedLabelColor: CustomColors.textDarkColor,

@ -47,57 +47,43 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
super.initState();
}
// initialiseHmgServices(bool isLogin) {
// hmgServices.clear();
//
// hmgServices.add(HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
// // hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.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));
// // hmgServices.add(HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
// // hmgServices.add(HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
// // hmgServices.add(HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
// // hmgServices.add(HmgServices(7, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
// hmgServices.add(HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
// }
initialiseHmgServices(bool isLogin) {
hmgServices.clear();
hmgServices.add(HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.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));
hmgServices.add(HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(HmgServices(7, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
hmgServices.add(HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
}
initialiseInPatientHmgServices(bool isLogin) {
hmgServices.clear();
// hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
// hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
// hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
// hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
// hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
// hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
// hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
// hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
}
initServices(bool isLogin){
hmgServices.clear();
// hmgServices.add(HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
hmgServices.add(HmgServices(31, TranslationBase.of(context).myAppointments, TranslationBase.of(context).medicalFile, "assets/images/new/bottom_nav/my_file.svg", isLogin));
hmgServices.add(HmgServices(24, TranslationBase.of(context).myAppointments, TranslationBase.of(context).myAppointmentsList, "assets/images/new/services/appointment_list.svg", isLogin));
hmgServices.add(HmgServices(25, TranslationBase.of(context).lab, TranslationBase.of(context).labSubtitle, "assets/images/new/services/lab_result.svg", isLogin));
hmgServices.add(HmgServices(26, TranslationBase.of(context).radiology, TranslationBase.of(context).radiologySubtitle, "assets/images/new/services/radiology.svg", isLogin));
hmgServices.add(HmgServices(27, TranslationBase.of(context).medicines, TranslationBase.of(context).medicinesSubtitle, "assets/images/new/services/medicine_prescription.svg", isLogin));
// hmgServices.add(HmgServices(28, TranslationBase.of(context).vitalSigns, TranslationBase.of(context).vitalSignsSubtitle, "assets/images/new/services/vital_signs.svg", isLogin));
hmgServices.add(HmgServices(29, TranslationBase.of(context).myMedical, TranslationBase.of(context).myMedicalSubtitle, "assets/images/new/services/active_medication.svg", isLogin));
hmgServices.add(HmgServices(30, TranslationBase.of(context).myDoctor, TranslationBase.of(context).myDoctorSubtitle, "assets/images/new/services/my_doc.svg", isLogin));
// hmgServices.add(HmgServices(31, TranslationBase.of(context).invoicesList, TranslationBase.of(context).myInvoice, "assets/images/new/services/invoice_list.svg", isLogin));
// hmgServices.add(HmgServices(32, TranslationBase.of(context).anicllaryOrders, TranslationBase.of(context).myInvoice, "assets/images/new/services/ancillary.svg", isLogin));
// hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
// hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
}
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
initServices(false);
if (projectViewModel.isPatientAdmitted || projectViewModel.patientHasAdmissionRequest) {
initialiseInPatientHmgServices(false);
} else {
initialiseHmgServices(false);
}
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
// var userProvider = Provider.of<ToDoCountProviderModel>(context);
List<Widget> myMedicalList = Utils.myMedicalListHomePage(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin);
@ -141,109 +127,109 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
// height: MediaQuery.of(context).size.width / 2.6,
),
),
// projectViewModel.isLogin
// ? Column(
// children: [
// Padding(
// padding: projectViewModel.isArabic
// ? EdgeInsets.only(
// right: 20,
// left: 8,
// )
// : EdgeInsets.only(
// left: 20,
// right: 8,
// ),
// child: Row(
// children: [
// Expanded(
// child: Text(
// TranslationBase.of(context).myMedicalFile,
// style: TextStyle(
// color: Colors.black,
// fontSize: 16,
// fontWeight: FontWeight.bold,
// letterSpacing: -0.96,
// height: 19 / 16,
// ),
// ),
// ),
// TextButton(
// onPressed: () {
// widget.onMedicalFileClick!();
// // navigateTo(context, MedicalProfilePageNew());
// },
// child: Text(
// TranslationBase.of(context).viewMedicalFile,
// style: TextStyle(
// color: CustomColors.primaryColor,
// fontSize: 12,
// letterSpacing: -0.72,
// height: 23 / 12,
// ),
// ),
// ),
// ],
// ),
// ),
// mHeight(4),
// Container(
// width: double.infinity,
// height: MediaQuery.of(context).size.width * 0.26,
// child: ListView.separated(
// itemCount: myMedicalList.length,
// padding: EdgeInsets.zero,
// scrollDirection: Axis.horizontal,
// physics: BouncingScrollPhysics(),
// itemBuilder: (context, index) {
// return projectViewModel.isArabic
// ? Container(
// child: myMedicalList[index],
// width: MediaQuery.of(context).size.width * 0.26,
// height: MediaQuery.of(context).size.width * 0.26,
// margin: EdgeInsets.only(left: index == 4 ? 20 : 0, right: index == 0 ? 20 : 0),
// )
// : Container(
// child: myMedicalList[index],
// width: MediaQuery.of(context).size.width * 0.26,
// height: MediaQuery.of(context).size.width * 0.26,
// margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 4 ? 20 : 0),
// );
// },
// separatorBuilder: (BuildContext context, int index) {
// return mWidth(12);
// },
// ),
// ),
// ],
// )
// : Container(),
projectViewModel.isLogin
? Column(
children: [
Padding(
padding: projectViewModel.isArabic
? EdgeInsets.only(
right: 20,
left: 8,
)
: EdgeInsets.only(
left: 20,
right: 8,
),
child: Row(
children: [
Expanded(
child: Text(
TranslationBase.of(context).myMedicalFile,
style: TextStyle(
color: Colors.black,
fontSize: 16,
fontWeight: FontWeight.bold,
letterSpacing: -0.96,
height: 19 / 16,
),
),
),
TextButton(
onPressed: () {
widget.onMedicalFileClick!();
// navigateTo(context, MedicalProfilePageNew());
},
child: Text(
TranslationBase.of(context).viewMedicalFile,
style: TextStyle(
color: CustomColors.accentColor,
fontSize: 12,
letterSpacing: -0.72,
height: 23 / 12,
),
),
),
],
),
),
mHeight(4),
Container(
width: double.infinity,
height: MediaQuery.of(context).size.width * 0.26,
child: ListView.separated(
itemCount: myMedicalList.length,
padding: EdgeInsets.zero,
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
itemBuilder: (context, index) {
return projectViewModel.isArabic
? Container(
child: myMedicalList[index],
width: MediaQuery.of(context).size.width * 0.26,
height: MediaQuery.of(context).size.width * 0.26,
margin: EdgeInsets.only(left: index == 4 ? 20 : 0, right: index == 0 ? 20 : 0),
)
: Container(
child: myMedicalList[index],
width: MediaQuery.of(context).size.width * 0.26,
height: MediaQuery.of(context).size.width * 0.26,
margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 4 ? 20 : 0),
);
},
separatorBuilder: (BuildContext context, int index) {
return mWidth(12);
},
),
),
],
)
: Container(),
mHeight(16),
// Column(
// children: [
// Divider(
// height: 1,
// color: Color(0xFFC7C7C7),
// ),
// Container(
// width: double.infinity,
// height: MediaQuery.of(context).size.width * 0.3,
// padding: EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
// color: Colors.white,
// child: Row(
// children: [
// offersButton(),
// mWidth(10),
// hmgButton(),
// ],
// ),
// ),
// Divider(
// height: 1,
// color: Color(0xFFC7C7C7),
// ),
// ],
// ),
Column(
children: [
Divider(
height: 1,
color: Color(0xFFC7C7C7),
),
Container(
width: double.infinity,
height: MediaQuery.of(context).size.width * 0.3,
padding: EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
color: Colors.white,
child: Row(
children: [
offersButton(),
mWidth(10),
hmgButton(),
],
),
),
Divider(
height: 1,
color: Color(0xFFC7C7C7),
),
],
),
mHeight(12),
Column(
children: [
@ -261,7 +247,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
children: [
Expanded(
child: Text(
TranslationBase.of(context).allServices,
TranslationBase.of(context).hMGService,
style: TextStyle(
color: Colors.black,
fontSize: 16,
@ -271,29 +257,28 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
),
),
),
// TextButton(
// onPressed: () {
// // AppSharedPreferences().getAll().then((value){
// // debugPrint("ALL SHARED PREFERENCES!!!!!");
// // debugPrint(jsonEncode(value));
// // });
// Navigator.push(context, FadePage(page: AllHabibMedicalSevicePage2()));
// projectViewModel.analytics.hmgServices.viewAll();
// },
// child: Text(
// TranslationBase.of(context).viewAllServices,
// style: TextStyle(
// color: CustomColors.accentColor,
// fontSize: 12,
// letterSpacing: -0.72,
// height: 23 / 12,
// ),
// ),
// ),
TextButton(
onPressed: () {
// AppSharedPreferences().getAll().then((value){
// debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value));
// });
Navigator.push(context, FadePage(page: AllHabibMedicalSevicePage2()));
projectViewModel.analytics.hmgServices.viewAll();
},
child: Text(
TranslationBase.of(context).viewAllServices,
style: TextStyle(
color: CustomColors.accentColor,
fontSize: 12,
letterSpacing: -0.72,
height: 23 / 12,
),
),
),
],
),
),
mHeight(12),
projectViewModel.isPatientAdmitted || projectViewModel.patientHasAdmissionRequest
? Column(
children: [
@ -390,7 +375,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
width: double.infinity,
height: double.infinity,
// color: Color(0xFF2B353E),
decoration: containerRadius(CustomColors.primaryColor, 20),
decoration: containerRadius(CustomColors.accentColor, 20),
),
Container(
width: double.infinity,
@ -637,7 +622,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
return Container(
width: MediaQuery.of(context).size.width * 0.06,
height: MediaQuery.of(context).size.width * 0.06,
decoration: containerRadius(CustomColors.primaryColor, 100),
decoration: containerRadius(CustomColors.accentColor, 100),
padding: EdgeInsets.all(4),
child: SvgPicture.asset(icon),
);

@ -22,8 +22,7 @@ import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doct
import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'
as family;
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' as family;
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
@ -76,8 +75,7 @@ class LandingPage extends StatefulWidget {
class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var authProvider = new AuthProvider();
AppointmentRateViewModel appointmentRateViewModel =
locator<AppointmentRateViewModel>();
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
int currentTab = 0;
late PageController pageController;
@ -94,8 +92,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
bool _showBottomNavigationBar = true;
///inject the user data
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance;
final authService = new AuthProvider();
@ -122,22 +119,17 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
"appointmentdate": "2022-01-19",
"appointmenttime": "12:10",
"PatientName": "Testing",
"session_id":
"1_MX40NjIwOTk2Mn5-MTY0NzI1NjYxNDI2OX5ySXhlVjZjam13RFdMVmdleWVsSDhzQkx-fg",
"session_id": "1_MX40NjIwOTk2Mn5-MTY0NzI1NjYxNDI2OX5ySXhlVjZjam13RFdMVmdleWVsSDhzQkx-fg",
"token":
"T1==cGFydG5lcl9pZD00NjIwOTk2MiZzaWc9OGMyY2IyYWFiZmZmMzI4ZmEwMjgxNDdmMGFhZGI0N2JiZjdmZWY4MjpzZXNzaW9uX2lkPTFfTVg0ME5qSXdPVGsyTW41LU1UWTBOekkxTmpZeE5ESTJPWDV5U1hobFZqWmphbTEzUkZkTVZtZGxlV1ZzU0RoelFreC1mZyZjcmVhdGVfdGltZT0xNjQ3MjU2NjE0Jm5vbmNlPTAuMjgzNDgyNjM1NDczNjQ2OCZyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT0xNjQ3MjU4NDE0JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9",
"DoctorImageURL":
"https://image.shutterstock.com/image-vector/sample-stamp-square-grunge-sign-260nw-1474408826.jpg",
"DoctorImageURL": "https://image.shutterstock.com/image-vector/sample-stamp-square-grunge-sign-260nw-1474408826.jpg",
"callerID": "9920",
"PatientID": "1231755",
"is_call": "true"
};
void _requestIOSPermissions() {
flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation<
IOSFlutterLocalNotificationsPlugin>()
?.requestPermissions(
flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(
alert: true,
badge: true,
sound: true,
@ -153,8 +145,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return Future.value(false);
} else {
DateTime now = DateTime.now();
if (currentBackPressTime == null ||
now.difference(currentBackPressTime!) > Duration(seconds: 2)) {
if (currentBackPressTime == null || now.difference(currentBackPressTime!) > Duration(seconds: 2)) {
currentBackPressTime = now;
AppToast.showToast(message: TranslationBase.of(context).pressAgain);
return Future.value(false);
@ -169,18 +160,14 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
List<ImagesInfo> imagesInfo = [];
imagesInfo.add(
ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/0.png'),
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/0.png'),
);
imagesInfo.add(
ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/1.png'),
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/1.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/1.png'),
);
Navigator.push(
@ -199,11 +186,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}
if (tab == 4) {
List<ImagesInfo> imagesInfo = [];
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/ar/0.png'));
imagesInfo.add(
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/ar/0.png'));
Navigator.push(
context,
@ -248,8 +232,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
});
});
projectViewModel.analytics.bottomTabNavigation
.log(tabIndex: tab, isLoggedIn: projectViewModel.isLogin);
projectViewModel.analytics.bottomTabNavigation.log(tabIndex: tab, isLoggedIn: projectViewModel.isLogin);
}
getToDoCount() {
@ -260,11 +243,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
// toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
toDoProvider.setState(
res['AppointmentActiveNumber'],
res['AncillaryOrderListCount'],
true,
toDoProvider.notificationsCount);
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@ -303,10 +282,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin && !projectViewModel.isLoginChild) {
int languageID =
Provider.of<ProjectViewModel>(context, listen: false).isArabic
? 1
: 2;
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
familyFileProvider.getSharedRecordByStatus(languageID);
}
// Future.delayed(Duration(seconds: 3)).then((result) async {
@ -322,20 +298,20 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// HMGNetworkConnectivity(context).start();
_firebaseMessaging.getToken().then((String? token) {
print("Firebase Token: " + token!);
sharedPref.setString(PUSH_TOKEN, token!);
if (Platform.isIOS) {
FirebaseMessaging.instance.getAPNSToken().then((value) {
print("Push APNS getToken: " + value!);
AppSharedPreferences().setString(APNS_TOKEN, value);
AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, value);
});
// voIPKit.getVoIPToken().then((value) {
// print('🎈 example: getVoIPToken: $value');
// AppSharedPreferences().setString(APNS_TOKEN, value!);
// // getOneSignalVOIPToken(value);
// });
}
print("Firebase Token: " + token!);
sharedPref.setString(PUSH_TOKEN, token!);
if (Platform.isIOS) {
FirebaseMessaging.instance.getAPNSToken().then((value) {
print("Push APNS getToken: " + value!);
AppSharedPreferences().setString(APNS_TOKEN, value);
AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, value);
});
// voIPKit.getVoIPToken().then((value) {
// print('🎈 example: getVoIPToken: $value');
// AppSharedPreferences().setString(APNS_TOKEN, value!);
// // getOneSignalVOIPToken(value);
// });
}
if (token != null) {
DEVICE_TOKEN = token;
if (!projectViewModel.isLoginChild) {
@ -346,7 +322,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
startZoom();
// HMG_Geofencing(context).loadZones().then((instance) => instance.init());
}
void startZoom(){
void startZoom() {
var zoom = ZoomVideoSdk();
InitConfig initConfig = InitConfig(
domain: "zoom.us",
@ -397,27 +374,25 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(LOGIN_TYPE);
}
// AppGlobal.context = context;
// GifLoaderDialogUtils.showMyDialog(context);
// authService.selectDeviceImei(DEVICE_TOKEN).then((value) async {
// GifLoaderDialogUtils.hideDialog(context);
// var data = await sharedPref.getObject(IMEI_USER_DATA);
// if (value != null) {
// setUserValues(value);
// Navigator.of(context).pushNamed(CONFIRM_LOGIN);
// } else {
// GifLoaderDialogUtils.hideDialog(context);
// Navigator.of(context).pushNamed(
// WELCOME_LOGIN,
// );
// }
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// Navigator.of(context).pushNamed(WELCOME_LOGIN);
// });
// }
GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((value) async {
GifLoaderDialogUtils.hideDialog(context);
var data = await sharedPref.getObject(IMEI_USER_DATA);
if (value != null) {
setUserValues(value);
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pushNamed(WELCOME_LOGIN);
});
}
}
dummyCall() async {
@ -478,20 +453,14 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
getNotificationCount(token) async {
if (await sharedPref.getObject(USER_PROFILE) != null) {
var data =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) {
authService.getDashboard().then((value) => {
if (value != null)
{
setState(() {
notificationCount = value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount'] >
99
? '99+'
: value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount']
.toString();
notificationCount =
value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, 0, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
})
@ -521,11 +490,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
getText(currentTab).toUpperCase(),
style: TextStyle(
fontWeight: FontWeight.bold,
color: currentTab == 0
? CustomColors.backgroudGreyColor
: Theme.of(context).textTheme.headline1!.color,
fontFamily:
projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
color: currentTab == 0 ? CustomColors.backgroudGreyColor : Theme.of(context).textTheme.headline1!.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
// bold: true,
),
leading: Builder(
@ -534,14 +500,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
children: <Widget>[
currentTab == 0
? IconButton(
icon: SvgPicture.asset(
"assets/images/new/menu.svg"),
color: Theme.of(context)
.textTheme
.headline1!
.color,
onPressed: () =>
Scaffold.of(context).openDrawer(),
icon: SvgPicture.asset("assets/images/new/menu.svg"),
color: Theme.of(context).textTheme.headline1!.color,
onPressed: () => Scaffold.of(context).openDrawer(),
)
: IconButton(
icon: Icon(Icons.arrow_back),
@ -552,16 +513,14 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController.jumpToPage(0);
},
),
projectViewModel.isLogin &&
model.notificationsCount != null &&
!projectViewModel.isLoginChild
projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild
? Positioned(
right: projectViewModel.isArabic ? 35 : 0,
top: 5,
child: new Container(
padding: EdgeInsets.all(4),
decoration: new BoxDecoration(
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
@ -572,8 +531,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
model.notificationsCount.toString(),
style: TextStyle(
color: Colors.white,
fontSize:
projectViewModel.isArabic ? 8 : 9,
fontSize: projectViewModel.isArabic ? 8 : 9,
),
textAlign: TextAlign.center,
),
@ -652,23 +610,20 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
),
RobotIcon()
])),
// bottomNavigationBar: BottomNavBar(
// changeIndex: changeCurrentTab,
// index: currentTab,
// ),
floatingActionButtonLocation: FloatingActionButtonLocation.endContained,
floatingActionButton:
(projectViewModel.havePrivilege(34) && currentTab == 0)
? Padding(
padding: const EdgeInsets.only(bottom: 50.0, right: 10),
child: FloatingButton(
elevation: true,
onTap: () {
changeCurrentTab(2);
},
),
)
: null);
bottomNavigationBar: BottomNavBar(
changeIndex: changeCurrentTab,
index: currentTab,
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: (projectViewModel.havePrivilege(34) && currentTab == 0)
? FloatingButton(
elevation: true,
onTap: () {
changeCurrentTab(2);
projectViewModel.analytics.appointment.book_appointment();
},
)
: null);
}
triggerRobot() {
@ -696,22 +651,13 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
await PushNotificationHandler.getInstance().requestPermissions();
// authService.selectDeviceImei(token).then((SelectDeviceIMEIRES? value) => setUserValues(value));
if (authenticatedUserObject.isLogin) {
var data =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) {
authService
.registeredAuthenticatedUser(data, token, 0, 0)
.then((res) => {});
authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
authService.getDashboard().then((value) async {
setState(() {
if (value != null) {
notificationCount = value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount'] >
99
? '99+'
: value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount']
.toString();
if (value != null && value['List_PatientDashboard'].length != 0) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, 0, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(int.parse(notificationCount));

@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/slider_data.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
@ -60,7 +59,7 @@ class LoggedSliderView extends StatelessWidget {
Row(
children: [
Container(
decoration: projectViewModel.isArabic ? containerColorRadiusLeft(appColor, 100) : containerColorRadiusRight(appColor, 100),
decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100),
padding: EdgeInsets.only(left: 20, right: 16, top: 6, bottom: 6),
child: Text(
TranslationBase.of(context).medicalFile,
@ -133,75 +132,75 @@ class LoggedSliderView extends StatelessWidget {
),
),
mFlex(3),
// Padding(
// padding: const EdgeInsets.only(left: 20, right: 20),
// child: Row(
// children: <Widget>[
// Expanded(
// flex: 3,
// child: Row(
// children: <Widget>[
// SvgPicture.asset(
// 'assets/images/new/height.svg',
// width: 11,
// height: 11,
// ),
// mWidth(6),
// Texts(
// "${TranslationBase.of(context).height}: ${model.heightCm} ${TranslationBase.of(context).cm}",
// color: Colors.white,
// fontSize: 8,
// )
// ],
// ),
// ),
// SizedBox(
// width: 3,
// ),
// Expanded(
// flex: 3,
// child: Row(
// children: <Widget>[
// SvgPicture.asset(
// 'assets/images/new/weight.svg',
// width: 11,
// height: 11,
// ),
// mWidth(6),
// Texts(
// '${TranslationBase.of(context).weight}: ${model.weightKg} ${TranslationBase.of(context).kg}',
// color: Colors.white,
// fontSize: 8,
// )
// ],
// ),
// ),
// SizedBox(
// width: 3,
// ),
// Expanded(
// flex: 3,
// child: Row(
// children: <Widget>[
// SvgPicture.asset(
// 'assets/images/new/blood.svg',
// width: 11,
// height: 11,
// ),
// mWidth(6),
// Texts(
// '${TranslationBase.of(context).bloodType1} ${model.booldType}',
// color: Colors.white,
// fontSize: 7,
// )
// ],
// ),
// ),
// mFlex(1),
// ],
// ),
// ),
// mFlex(2),
Padding(
padding: const EdgeInsets.only(left: 20, right: 20),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Row(
children: <Widget>[
SvgPicture.asset(
'assets/images/new/height.svg',
width: 11,
height: 11,
),
mWidth(6),
Texts(
"${TranslationBase.of(context).height}: ${model.heightCm} ${TranslationBase.of(context).cm}",
color: Colors.white,
fontSize: 8,
)
],
),
),
SizedBox(
width: 3,
),
Expanded(
flex: 3,
child: Row(
children: <Widget>[
SvgPicture.asset(
'assets/images/new/weight.svg',
width: 11,
height: 11,
),
mWidth(6),
Texts(
'${TranslationBase.of(context).weight}: ${model.weightKg} ${TranslationBase.of(context).kg}',
color: Colors.white,
fontSize: 8,
)
],
),
),
SizedBox(
width: 3,
),
Expanded(
flex: 3,
child: Row(
children: <Widget>[
SvgPicture.asset(
'assets/images/new/blood.svg',
width: 11,
height: 11,
),
mWidth(6),
Texts(
'${TranslationBase.of(context).bloodType1} ${model.booldType}',
color: Colors.white,
fontSize: 7,
)
],
),
),
mFlex(1),
],
),
),
mFlex(2),
],
),
),

@ -1,8 +1,6 @@
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart';
import '../../../theme/theme_value.dart';
class OfferView extends StatelessWidget {
@override
Widget build(BuildContext context) {
@ -23,7 +21,7 @@ class OfferView extends StatelessWidget {
Text(
"Kid's Offer",
style: TextStyle(
color: appColor,
color: Color(0xFFFBF2E31),
fontSize: 18,
fontWeight: FontWeight.bold,
),
@ -42,14 +40,14 @@ class OfferView extends StatelessWidget {
Text(
"Only ",
style: TextStyle(
color: appColor,
color: Color(0xFFFBF2E31),
fontSize: 14,
),
),
Text(
"500 ",
style: TextStyle(
color: appColor,
color: Color(0xFFFBF2E31),
fontSize: 14,
fontWeight: FontWeight.bold,
),
@ -57,7 +55,7 @@ class OfferView extends StatelessWidget {
Text(
"SAR ",
style: TextStyle(
color: appColor,
color: Color(0xFFFBF2E31),
fontSize: 14,
),
),

@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/hmg_services.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart';
@ -29,7 +28,6 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
@ -41,16 +39,9 @@ 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';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../../locator.dart';
import '../../MyAppointments/MyAppointments.dart';
import '../../medical/active_medications/ActiveMedicationsPage.dart';
import '../../medical/doctor/doctor_home_page.dart';
import '../../medical/labs/labs_home_page.dart';
import '../../medical/prescriptions/prescriptions_home_page.dart';
import '../../medical/radiology/radiology_home_page.dart';
import '../landing_page_pharmcy.dart';
class ServicesView extends StatelessWidget {
@ -58,18 +49,14 @@ class ServicesView extends StatelessWidget {
int index;
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel =
locator<PharmacyModuleViewModel>();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
late LocationUtils locationUtils;
bool isHomePage;
ProjectViewModel? projectViewModel;
ServicesView(this.hmgServices, this.index, this.isHomePage);
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return InkWell(
onTap: () {
if (isHomePage) {
@ -81,9 +68,7 @@ class ServicesView extends StatelessWidget {
child: Container(
width: double.infinity,
height: double.infinity,
decoration: containerRadiusWithGradientServices(20,
lightColor: CustomColors.lightGreyColor,
darkColor: CustomColors.darkGreyColor),
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.darkGreyColor),
child: Stack(
children: [
Container(
@ -128,11 +113,7 @@ class ServicesView extends StatelessWidget {
Container(
width: double.infinity,
height: double.infinity,
padding: EdgeInsets.only(
left: SizeConfig.widthMultiplier! * 3,
right: SizeConfig.widthMultiplier! * 3,
top: SizeConfig.widthMultiplier! * 3,
bottom: SizeConfig.widthMultiplier! * 2),
padding: EdgeInsets.only(left: SizeConfig.widthMultiplier! * 3, right: SizeConfig.widthMultiplier! * 3, top: SizeConfig.widthMultiplier! * 3, bottom: SizeConfig.widthMultiplier! * 2),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -140,18 +121,12 @@ class ServicesView extends StatelessWidget {
hmgServices.action == (isHomePage ? 5 : 8)
? Image.asset(
hmgServices.icon,
height: index == 0
? MediaQuery.of(context).size.width / 18
: MediaQuery.of(context).size.width / 18,
height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 18,
)
: Container(
// color: Colors.yellow,
width: index == 4
? MediaQuery.of(context).size.width / 12
: MediaQuery.of(context).size.width / 12,
height: index == 4
? MediaQuery.of(context).size.width / 10
: MediaQuery.of(context).size.width / 12,
width: index == 4 ? MediaQuery.of(context).size.width / 12 : MediaQuery.of(context).size.width / 12,
height: index == 4 ? MediaQuery.of(context).size.width / 10 : MediaQuery.of(context).size.width / 12,
child: SvgPicture.asset(
hmgServices.icon,
// width: MediaQuery.of(context).size.width / 12,
@ -204,9 +179,7 @@ class ServicesView extends StatelessWidget {
locator<GAnalytics>().hmgServices.logServiceName('home health care');
} else if (hmgServices.action == 4) {
Navigator.push(context, FadePage(page: CMCPage()));
locator<GAnalytics>()
.hmgServices
.logServiceName('comprehensive medical checkup');
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
} else if (hmgServices.action == 5) {
Navigator.push(context, FadePage(page: PaymentService()));
locator<GAnalytics>().hmgServices.logServiceName('online payments');
@ -222,44 +195,6 @@ class ServicesView extends StatelessWidget {
} else if (hmgServices.action == 23) {
Navigator.push(context, FadePage(page: InPatientServicesHome()));
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
} else if (hmgServices.action == 31) {
Navigator.push(context, FadePage(page: MedicalProfilePageNew()));
locator<GAnalytics>().hmgServices.logServiceName('my medical file');
} else if (hmgServices.action == 24 &&
projectViewModel?.havePrivilege(5) == true) {
Navigator.push(context, FadePage(page: MyAppointments()));
locator<GAnalytics>().hmgServices.logServiceName('my appointment');
} else if (hmgServices.action == 25) {
Navigator.push(context, FadePage(page: LabsHomePage()));
locator<GAnalytics>().hmgServices.logServiceName('lab result');
} else if (hmgServices.action == 26 &&
projectViewModel?.havePrivilege(7) == true) {
Navigator.push(context, FadePage(page: RadiologyHomePage()));
locator<GAnalytics>().hmgServices.logServiceName('radiology result');
} else if (hmgServices.action == 27 &&
projectViewModel?.havePrivilege(12) == true) {
Navigator.push(context, FadePage(page: HomePrescriptionsPage()));
locator<GAnalytics>().hmgServices.logServiceName('medicine prescription');
} else if (hmgServices.action == 28 &&
projectViewModel?.havePrivilege(25) == true) {
Navigator.push(
context,
FadePage(page: VitalSignDetailsScreen()),
);
locator<GAnalytics>().hmgServices.logServiceName('vital signs');
} else if (hmgServices.action == 29 &&
projectViewModel?.havePrivilege(48) == true) {
Navigator.push(context, FadePage(page: ActiveMedicationsPage()));
locator<GAnalytics>().hmgServices.logServiceName('active medication');
} else if (hmgServices.action == 30 &&
projectViewModel?.havePrivilege(6) == true) {
Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('active medication');
}
}
@ -277,9 +212,7 @@ class ServicesView extends StatelessWidget {
locator<GAnalytics>().hmgServices.logServiceName('home health care');
} else if (hmgServices.action == 4) {
Navigator.push(context, FadePage(page: CMCPage()));
locator<GAnalytics>()
.hmgServices
.logServiceName('comprehensive medical checkup');
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
} else if (hmgServices.action == 5) {
// getPharmacyToken(context);
Uri uri = Uri.parse(PHARMACY_REDIRECT_URL);
@ -334,19 +267,15 @@ class ServicesView extends StatelessWidget {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl:
"https://twitter.com/hmg" //"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
),
title: "HMG News",
selectedUrl:"https://twitter.com/hmg" //"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
),
),
);
locator<GAnalytics>().hmgServices.logServiceName('latest news');
} else if (hmgServices.action == 22) {
Navigator.push(context, FadePage(page: ContactUsPage()));
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
} else if (hmgServices.action == 31) {
Navigator.push(context, FadePage(page: MedicalProfilePageNew()));
locator<GAnalytics>().hmgServices.logServiceName('my medical file');
}
// if (hmgServices.action == 10) {
@ -480,8 +409,7 @@ class ServicesView extends StatelessWidget {
title: TranslationBase.of(context).covidConsentHeader,
message: TranslationBase.of(context).covidConsent,
onTap: () async {
Navigator.push(
context, FadePage(page: CovidDrivethruLocation()));
Navigator.push(context, FadePage(page: CovidDrivethruLocation()));
},
));
} else {

@ -8,8 +8,6 @@ import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../theme/theme_value.dart';
class SliderView extends StatefulWidget {
VoidCallback onLoginClick;
@ -50,7 +48,7 @@ class _SliderViewState extends State<SliderView> {
children: [
mFlex(3),
Container(
decoration: projectViewModel.isArabic ? containerColorRadiusLeft(appColor, 100) : containerColorRadiusRight(appColor, 100),
decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100),
padding: EdgeInsets.only(left: projectViewModel.isArabic ? 16 : 20, right: projectViewModel.isArabic ? 20 : 16, top: 6, bottom: 6),
child: Text(
TranslationBase.of(context).medicalFile,
@ -100,7 +98,7 @@ class _SliderViewState extends State<SliderView> {
child: CustomTextButton(
shape: cardRadiusNew(8),
//shape: OutlinedBorder(),
backgroundColor: appColor,
backgroundColor: Color(0xFFFBF2E31),
elevation: 0,
onPressed: () {

@ -91,7 +91,7 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
letterSpacing: -0.66,
),
),
@ -255,7 +255,7 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
fontSize: 12.0,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
),
),

@ -47,7 +47,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
return Container(
margin: EdgeInsets.only(left: 12, right: 12, top: widget.isFirstOrLast == 0 ? 12 : 6, bottom: widget.isFirstOrLast == 1 ? 12 : 6),
decoration: BoxDecoration(
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),

@ -63,7 +63,7 @@ class _State extends State<ClinicCard> {
),
child: Container(
decoration: BoxDecoration(
color: widget.patientERGetClinicsList.isOnline == 1 ? CustomColors.green : CustomColors.primaryColor,
color: widget.patientERGetClinicsList.isOnline == 1 ? CustomColors.green : CustomColors.accentColor,
borderRadius: BorderRadius.all(
Radius.circular(6.0),
),
@ -110,7 +110,7 @@ class _State extends State<ClinicCard> {
width: 4,
height: 4,
decoration: containerRadius(
widget.patientERGetClinicsList.isOnline == 1 ? CustomColors.green : CustomColors.primaryColor,
widget.patientERGetClinicsList.isOnline == 1 ? CustomColors.green : CustomColors.accentColor,
100,
),
),
@ -120,7 +120,7 @@ class _State extends State<ClinicCard> {
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.w600,
color: widget.patientERGetClinicsList.isOnline == 1 ? CustomColors.green : CustomColors.primaryColor,
color: widget.patientERGetClinicsList.isOnline == 1 ? CustomColors.green : CustomColors.accentColor,
letterSpacing: -0.48,
),
),

@ -322,15 +322,17 @@ class _clinic_listState extends State<ClinicList> {
String pharmaLiveCareQRCodeValue = widget.pharmacyLiveCareQRCode;
Navigator.push(
context,
FadePage(
page: PaymentMethod(
context,
FadePage(
page: PaymentMethod(
onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) {
setState(() {});
},
patientShare: num.parse(getERAppointmentFeesList.total!),
isFromAdvancePayment: widget.isPharmacyLiveCare,
))).then((value) {
),
),
).then((value) {
if (value != null) {
selectedPaymentMethod = value[0];
print(value);
@ -413,28 +415,28 @@ class _clinic_listState extends State<ClinicList> {
service.applePayInsertRequest(applePayInsertRequest, localContext!).then((res) async {
if (res["MessageStatus"] == 1) {
await localContext!.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "LiveCare Payment",
orderAmount: double.parse(amount),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
GifLoaderDialogUtils.hideDialog(localContext!);
AppToast.showErrorToast(message: failureResult.toString());
},
onSuccess: (successResult) async {
GifLoaderDialogUtils.hideDialog(localContext!);
log("Payfort: ${successResult.responseMessage}");
await localContext!.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo);
},
projectId: appo.projectID,
serviceTypeEnum: ServiceTypeEnum.appointmentPayment,
);
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "LiveCare Payment",
orderAmount: double.parse(amount),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
GifLoaderDialogUtils.hideDialog(localContext!);
AppToast.showErrorToast(message: failureResult.toString());
},
onSuccess: (successResult) async {
GifLoaderDialogUtils.hideDialog(localContext!);
log("Payfort: ${successResult.responseMessage}");
await localContext!.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo);
},
projectId: appo.projectID,
serviceTypeEnum: ServiceTypeEnum.appointmentPayment,
);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: "An error occurred while processing your request");
@ -776,7 +778,7 @@ class _clinic_listState extends State<ClinicList> {
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: CustomTextButton(
backgroundColor: CustomColors.primaryColor,
backgroundColor: CustomColors.accentColor,
disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38),
disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12),
elevation: 0,

@ -109,7 +109,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
@override
void initState() {
AppGlobal.context = context;
_getAvailableBiometrics();
setDefault();
super.initState();
@ -308,7 +307,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Image.asset(
'assets/images/new/ic_logo.png',
'assets/images/habib-logo.png',
height: 90,
width: 90,
),

@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/login/forgot-password.dart';
import 'package:diplomaticquarterapp/pages/login/login.dart';
import 'package:diplomaticquarterapp/pages/login/register_new.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/habib_logo_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -69,26 +68,26 @@ class LoginType extends StatelessWidget {
],
),
),
// SizedBox(
// height: 43,
// width: double.infinity,
// child: TextButton(
// onPressed: () {
// Navigator.of(context).push(FadePage(page: RegisterNew()));
// locator<GAnalytics>().loginRegistration.register_now();
// },
// child: Text(
// TranslationBase.of(context).registerNow,
// style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48),
// ),
// style: TextButton.styleFrom(
// backgroundColor: appColor,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(6),
// ),
// ),
// ),
// ),
SizedBox(
height: 43,
width: double.infinity,
child: TextButton(
onPressed: () {
Navigator.of(context).push(FadePage(page: RegisterNew()));
locator<GAnalytics>().loginRegistration.register_now();
},
child: Text(
TranslationBase.of(context).registerNow,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48),
),
style: TextButton.styleFrom(
backgroundColor: Color(0xffD02127),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
),
),
),
]),
),
);

@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/pages/login/confirm-login.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/pages/login/login.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -161,8 +160,7 @@ class _Register extends State<Register> {
child: DefaultButton(TranslationBase.of(context).cancel, () {
Navigator.of(context).pop();
locator<GAnalytics>().loginRegistration.registration_cancel(step: 'enter details');
}, textColor: Colors.white,
color: appColor)),
}, textColor: Colors.white, color: Color(0xffD02127))),
),
Expanded(
child: Padding(

@ -84,7 +84,7 @@ class _WelcomeLogin extends State<WelcomeLogin> {
Navigator.of(context).push(FadePage(page: RegisterNew())),
locator<GAnalytics>().loginRegistration.visited_alhabib_group(false),
},
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
textColor: Colors.white,
),
),

@ -119,7 +119,7 @@ class _ViewDoctorResponsesPageState extends State<ViewDoctorResponsesPage> {
() {
openResponseRateDialog(context);
},
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
),
],
@ -216,7 +216,7 @@ class _ViewDoctorResponsesPageState extends State<ViewDoctorResponsesPage> {
rateDoctorResponse();
}
},
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
),
],
@ -303,7 +303,7 @@ class _ViewDoctorResponsesPageState extends State<ViewDoctorResponsesPage> {
decoration: InputDecoration(
isDense: true,
hintText: _hintText,
fillColor: CustomColors.primaryColor,
fillColor: CustomColors.accentColor,
hintStyle: TextStyle(
fontSize: isEnable ? 14 : 24,
height: 21 / 14,

@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_mod
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
@ -118,7 +117,7 @@ class _RequestTypePageState extends State<RequestTypePage> {
}
})
},
color: appColor,
color: Color(0xffD02127),
textColor: Colors.white,
disabledColor: Color(0xffEAEAEA),
),

@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStat
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -351,7 +350,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
});
projectViewModel.analytics.advancePayments.wallet_payment_details();
},
color: appColor,
color: Color(0xffD02127),
textColor: Colors.white,
disabledColor: Color(0xffEAEAEA),
),

@ -329,7 +329,6 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
},

@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -207,7 +206,7 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
return;
},
iconData: Icons.notifications_active,
color: appColor,
color: Color(0xffD02127),
fontSize: 13.0,
//textColor: Color(0xff2B353E),
),

@ -9,7 +9,6 @@ import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -234,7 +233,7 @@ class _PrescriptionDetailsPageState extends State<PrescriptionDetailsPage> {
}
},
iconData: Icons.notifications_active,
color: appColor,
color: Color(0xffD02127),
fontSize: 13.0,
//textColor: Color(0xff2B353E),
),

@ -95,7 +95,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ":", model.appointmentDetails.projectName ?? "", projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).clinic + ":", model.appointmentDetails.projectName, projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).date + ":", DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.appointmentDetails.appointmentDate)),
projectViewModel.isArabic),
],

@ -334,6 +334,58 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> insertWalkInAppointment(int docID, int clinicID, int projectID, String selectedTime, String selectedDate, int initialSlotDuration, int languageID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
Request req = appGlobal.getPublicRequest();
request = {
"IsForLiveCare": false,
"ProjectID": projectID,
"ClinicID": clinicID,
"DoctorID": docID,
"StartTime": selectedTime,
"SelectedTime": selectedTime,
"EndTime": selectedTime,
"InitialSlotDuration": initialSlotDuration,
"StrAppointmentDate": selectedDate,
"IsVirtual": false,
"DeviceType": Platform.isIOS ? 'iOS' : 'Android',
"BookedBy": 102,
"VisitType": 1,
"VisitFor": 1,
"GenderID": authUser.gender,
"Age": authUser.age != null ? authUser.age : 0,
"VersionID": req.VersionID,
"Channel": req.Channel,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
"SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false,
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType
};
dynamic localRes;
try {
await baseAppClient.post(INSERT_WALKIN_APPOINTMENT, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
} catch (e) {
return Future.error(e);
}
}
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]) async {
Map<String, dynamic> request;
@ -615,6 +667,32 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPatientShareForWalkInAppointment(int clinicID, int projectID, int doctorID) async {
Map<String, dynamic> request;
request = {"ProjectID": projectID, "ClinicID": clinicID, "DoctorID": doctorID};
dynamic localRes;
await baseAppClient.post(GET_PATIENT_SHARE_FOR_WALKIN_APPOINTMENT, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> canPayForWalkInAppointment(int clinicID, int projectID, int doctorID) async {
Map<String, dynamic> request;
request = {"ProjectID": projectID, "ClinicID": clinicID, "DoctorID": doctorID, "StartTime": "12:00", "EndTime": "12:00"};
dynamic localRes;
await baseAppClient.post(CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getPatientAppointmentHistory(bool isActiveAppointment, int languageID, BuildContext context, {bool isForCOC = false, isForUpcomming = false, IsForArrived = false}) async {
Map<String, dynamic> request;
@ -1548,6 +1626,19 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> checkScannedNFCAndQRCode(String nfcCode, int projectId) async {
Map<String, dynamic> request;
request = {"NFC_Code": nfcCode, "ProjectID": projectId};
dynamic localRes;
await baseAppClient.post(CHECK_SCANNED_NFC_QR_CODE, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> checkIfHasDentalPlan(int projectID, BuildContext context) async {
Map<String, dynamic> request;

@ -54,9 +54,8 @@ class PayfortService extends BaseService {
"Pat_Token": result.tokenName,
"IsRefund": false,
"RemmeberMe": false,
// "Reconciliation_Reference": result.reconciliationReference,
"Reconciliation_Reference": result.reconciliationReference,
"LanguageID": 1,
"PatientID": patientID
};
@ -177,7 +176,6 @@ class PayfortService extends BaseService {
merchantReference: merchantReference!,
currency: currency,
customerIp: (await _info.getWifiIP() ?? ''),
language: 'en'
);
_payfort.callPayFortForApplePay(

@ -97,7 +97,7 @@ class _SplashScreenState extends State<SplashScreen> {
Padding(
padding: EdgeInsets.symmetric(horizontal: 53),
child: Image.asset(
'assets/images/new/ic_logo.png',
'assets/images/new/hmg_logo.png',
fit: BoxFit.fitWidth,
width: MediaQuery.of(context).size.width,
),

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:flutter/material.dart';
class CustomColors {
@ -12,7 +11,6 @@ class CustomColors {
static const Color black = Color(0xFF141414);
static const Color white = Color(0xFFFFFFFF);
static const Color accentColor = Color(0xFFD02127);
static const Color primaryColor = appColor;
static const Color lightGreyColor = Color(0xFFE2E2E2);
static const Color devider = Color(0xFFE5E5E5);
static const Color darkGreyColor = Color(0xFFC9C9C9);

@ -10,27 +10,13 @@ import 'package:flutter/services.dart';
final bluePrimary = Color(0xFF00000);
final blueAccent = Color(0xFFFF9800);
final blueBackground = Color(0xFFFFFFFF);
const MaterialColor appColor = MaterialColor(
0xFF045531,
<int, Color>{
50: Color(0xFFFFEBEE),
100: Color(0xFF2E6049),
200: Color(0xFF185339),
300: Color(0xFF125939),
400: Color(0xE6085734),
500: Color(0xFF045531),
600: Color(0xFF024024),
700: Color(0xFF034226),
800: Color(0xFF022C1A),
900: Color(0xFF011C10),
},
);
defaultTheme({fontName}) {
return ThemeData(
fontFamily: fontName,
useMaterial3: false,
//projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: appColor,
primarySwatch: Colors.red,
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light,
pageTransitionsTheme: const PageTransitionsTheme(
@ -74,7 +60,7 @@ invertThemes({fontName}) {
return ThemeData(
fontFamily: fontName,
//projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: appColor,
primarySwatch: Colors.red,
useMaterial3: false,
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.dark,
@ -112,7 +98,7 @@ bwThemes({fontName}) {
return ThemeData(
fontFamily: fontName,
//projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: appColor,
primarySwatch: Colors.red,
useMaterial3: false,
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.dark,
@ -127,14 +113,14 @@ bwThemes({fontName}) {
hintColor: Colors.grey[400],
textTheme: TextTheme(
bodyText1: TextStyle(color: appColor[900]),
headline1: TextStyle(color: appColor[900]),
bodyText1: TextStyle(color: Colors.red[900]),
headline1: TextStyle(color: Colors.red[900]),
headline2: TextStyle(color: Colors.white),
bodyText2: TextStyle(color: appColor[900]),
subtitle1: TextStyle(color: appColor[900]),
bodyText2: TextStyle(color: Colors.red[900]),
subtitle1: TextStyle(color: Colors.red[900]),
),
tabBarTheme: TabBarTheme(labelColor: appColor[900]),
tabBarTheme: TabBarTheme(labelColor: Colors.red[900]),
disabledColor: Colors.grey[800],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
@ -162,7 +148,7 @@ dimTheme({fontName}) {
return ThemeData(
fontFamily: fontName,
//projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: appColor,
primarySwatch: Colors.red,
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.dark,
useMaterial3: false,

@ -157,7 +157,7 @@ class TranslationBase {
String get welcomeTo => localizedValues['welcome-to'][locale.languageCode];
String get kingKhalidUniversity => localizedValues['king-khalid-university'][locale.languageCode];
String get drSulaimanText => localizedValues['dr-sulaiman-text'][locale.languageCode];
String get patientApp => localizedValues['patient-app'][locale.languageCode];
@ -567,8 +567,6 @@ class TranslationBase {
String get myMedicalFile => localizedValues['MyMedicalFile'][locale.languageCode];
String get myMedicalFiles => localizedValues['MyMedicalFiles'][locale.languageCode];
String get myMedicalFileSubTitle => localizedValues['myMedicalFileSubTitle'][locale.languageCode];
String get viewMore => localizedValues['viewMore'][locale.languageCode];
@ -2965,7 +2963,13 @@ class TranslationBase {
String get selectHospitalBloodDonation => localizedValues["selectHospitalBloodDonation"][locale.languageCode];
String get wecare => localizedValues["wecare"][locale.languageCode];
String get myinstructions => localizedValues["myinstructions"][locale.languageCode];
String get allServices => localizedValues["allServices"][locale.languageCode];
String get waitingAppointment => localizedValues["waitingAppointment"][locale.languageCode];
String get whatWaitingAppointment => localizedValues["whatWaitingAppointment"][locale.languageCode];
String get waitingAppointmentText1 => localizedValues["waitingAppointmentText1"][locale.languageCode];
String get waitingAppointmentText2 => localizedValues["waitingAppointmentText2"][locale.languageCode];
String get waitingAppointmentText3 => localizedValues["waitingAppointmentText3"][locale.languageCode];
String get waitingAppointmentVerificationMethod => localizedValues["waitingAppointmentVerificationMethod"][locale.languageCode];
String get howToUseVerificationMethod => localizedValues["howToUseVerificationMethod"][locale.languageCode];
}

File diff suppressed because it is too large Load Diff

@ -1,6 +1,4 @@
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:gif_view/gif_view.dart';
class GifLoaderContainer extends StatefulWidget {
@ -44,8 +42,9 @@ class _GifLoaderContainerState extends State<GifLoaderContainer> with TickerProv
//progress-loading.gif
child: Container(
// margin: EdgeInsets.only(bottom: 40),
child: CircularProgressIndicator(
color: appColor,
child: GifView(
controller: controller,
image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"),
),
),
),

@ -57,15 +57,15 @@ class _BottomNavBarState extends State<BottomNavBar> {
currentIndex: 1,
name: TranslationBase.of(context).medicalFile,
),
// BottomNavigationItem(
// icon: "assets/images/new/bottom_nav/family_files.svg",
// activeIcon: "assets/images/new/bottom_nav/family_files.svg",
// changeIndex: _changeIndex,
// index: widget.index,
// currentIndex: 3,
// name: TranslationBase.of(context).myFamily,
// isDisabled: projectViewModel.isLoginChild,
// ),
BottomNavigationItem(
icon: "assets/images/new/bottom_nav/family_files.svg",
activeIcon: "assets/images/new/bottom_nav/family_files.svg",
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 3,
name: TranslationBase.of(context).myFamily,
isDisabled: projectViewModel.isLoginChild,
),
if (widget.index == 0)
(widget.showHomeIcon)
? BottomNavigationItem(
@ -94,15 +94,15 @@ class _BottomNavBarState extends State<BottomNavBar> {
// currentIndex: 2,
// name: TranslationBase.of(context).bookAppo,
// ),
// if (/*widget.index == 0 && */ projectViewModel.havePrivilege(34))
// BottomNavigationItem(
// icon: "assets/images/new/bottom_nav/todo.svg",
// activeIcon: "assets/images/new/bottom_nav/todo.svg",
// changeIndex: _changeIndex,
// index: widget.index,
// currentIndex: 4,
// name: TranslationBase.of(context).todoList,
// ),
if (/*widget.index == 0 && */ projectViewModel.havePrivilege(34))
BottomNavigationItem(
icon: "assets/images/new/bottom_nav/todo.svg",
activeIcon: "assets/images/new/bottom_nav/todo.svg",
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 4,
name: TranslationBase.of(context).todoList,
),
if (projectViewModel.havePrivilege(77))
BottomNavigationItem(
icon: "assets/images/new/bottom_nav/help.svg",

@ -1,8 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import '../../theme/theme_value.dart';
extension WithContainer on Widget {
Widget get insideContainer => Container(color: Colors.white, padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), child: this);
@ -23,7 +21,7 @@ class DefaultButton extends StatelessWidget {
final bool isTextExpanded;
final int count;
DefaultButton(this.text, this.onPress, {this.color = appColor, this.isTextExpanded = true, this.svgIcon, this.disabledColor, this.count = 0, this.textColor = Colors.white, this.iconData, this.fontSize});
DefaultButton(this.text, this.onPress, {this.color, this.isTextExpanded = true, this.svgIcon, this.disabledColor, this.count = 0, this.textColor = Colors.white, this.iconData, this.fontSize});
@override
Widget build(BuildContext context) {
@ -73,7 +71,7 @@ class DefaultButton extends StatelessWidget {
],
),
style: TextButton.styleFrom(
backgroundColor: color ?? appColor,
backgroundColor: color ?? const Color(0xffD02127),
disabledForegroundColor: disabledColor,
disabledBackgroundColor: disabledColor,
shape: RoundedRectangleBorder(

@ -1,12 +1,8 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import '../../uitl/translations_delegate_base.dart';
/// FloatingButton widget
/// [onTap] button function
/// [elevation] color elevation value
@ -74,42 +70,27 @@ class _FloatingButtonState extends State<FloatingButton>
child: AnimatedContainer(
duration: Duration(milliseconds: 150),
margin: EdgeInsets.only(bottom: 4),
child: Container(
width: 100,
height: 100,
decoration: BoxDecoration(
// borderRadius: BorderRadius.all(Radius.circular(70.0)),
color: appColor,
shape: BoxShape.circle,
),
child: Padding(
padding: const EdgeInsets.all(18),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/images/new/book appointment.svg",
width: 50,
height: 30,
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn)
),
Text(
TranslationBase.of(context).book,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, color: Colors.white,),
), Text(
TranslationBase.of(context).appointmentLabel,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 8, fontWeight: FontWeight.w400, color: Colors.white,),
),
],
),
),
)
),
)));
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(70.0)),
color: Theme.of(context).primaryColor,
boxShadow: [
BoxShadow(
color: Color.fromRGBO(
120, 71, 80, widget.elevation ? 0.28 : 0.0),
spreadRadius:
_buttonSize < 1.0 ? -(1 - _buttonSize) * 50 : 0.0,
offset: Offset(0, 7.0),
blurRadius: 70.0)
]),
child: Image.asset(
projectViewModel.isArabic
? 'assets/images/book_appointment_ar.png'
: 'assets/images/appointment_booking_en.png',
// fit: BoxFit.cover,
width: 90,
height: 90,
),
)),
));
}
}

@ -1,7 +1,6 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -97,7 +96,7 @@ class DoctorCard extends StatelessWidget {
: isLiveCareAppointment != null && isLiveCareAppointment == true
? Color(0xff2E303A)
: isInOutPatient != null && isInOutPatient == false
? appColor
? Color(0xffD02127)
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: projectViewModel!.isArabic ? Radius.circular(0) : Radius.circular(10),
@ -211,15 +210,15 @@ class DoctorCard extends StatelessWidget {
ratingWidget: RatingWidget(
full: Icon(
Icons.star,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star_border,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
),
unratedColor: Colors.grey[500],

@ -23,8 +23,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import '../../../theme/theme_value.dart';
class TimeLineView extends StatefulWidget {
bool isLogged, isArabic;
List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList;
@ -306,7 +304,7 @@ class _TimeLineViewState extends State<TimeLineView> {
child: CustomTextButton(
shape: cardRadiusNew(8),
elevation: 0,
backgroundColor: appColor,
backgroundColor: Color(0xFFFBF2E31),
onPressed: () {
// onLoginClick();
login();

@ -105,58 +105,65 @@ class _AppDrawerState extends State<AppDrawer> {
child: ListView(
padding: EdgeInsets.zero,
children: <Widget>[
InkWell(
child: Padding(
padding: const EdgeInsets.all(14.0),
child: Column(
children: <Widget>[
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 12),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset(
'assets/images/new/ic_logo.png',
fit: BoxFit.fitWidth,
height: 60,
width: 60,
),
IconButton(
icon: Icon(Icons.clear),
onPressed: () {
Navigator.pop(context);
},
)
],
Container(
height: SizeConfig.screenHeight! * .30,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(14.0),
child: Column(
children: <Widget>[
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 12),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SvgPicture.asset(
"assets/images/new/logo.svg",
height: 60,
width: 60,
),
IconButton(
icon: Icon(Icons.clear),
onPressed: () {
Navigator.pop(context);
},
)
],
),
),
),
SizedBox(
width: double.infinity,
// margin: EdgeInsets.only(top: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
(user != null && projectProvider!.isLogin) ? user!.firstName! + ' ' + user!.lastName! : TranslationBase.of(context).cantSeeProfile,
style: TextStyle(color: Color(0xff2E303A), fontWeight: FontWeight.bold, fontSize: 20, letterSpacing: -1.2, height: 35 / 20),
),
Text(
(user != null && projectProvider!.isLogin)
? TranslationBase.of(context).fileNumber + ": " + user!.patientID.toString()
: TranslationBase.of(context).loginRegisterNow,
style: TextStyle(
color: Color(0xff2E303A),
fontSize: 16,
letterSpacing: -0.96,
height: 1,
mHeight(12),
Container(
width: double.infinity,
margin: EdgeInsets.only(top: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
(user != null && projectProvider!.isLogin) ? user!.firstName! + ' ' + user!.lastName! : TranslationBase.of(context).cantSeeProfile,
style: TextStyle(color: Color(0xff2E303A), fontWeight: FontWeight.bold, fontSize: 20, letterSpacing: -1.2, height: 35 / 20),
),
),
],
Text(
(user != null && projectProvider!.isLogin)
? TranslationBase.of(context).fileNumber + ": " + user!.patientID.toString()
: TranslationBase.of(context).loginRegisterNow,
style: TextStyle(
color: Color(0xff2E303A),
fontSize: 16,
letterSpacing: -0.96,
height: 1,
),
),
mHeight(10.0),
(user != null && projectProvider!.isLogin)
? Image.network("https://api.qrserver.com/v1/create-qr-code/?size=250x250&data=${user!.patientID.toString()}", fit: BoxFit.fill, height: 70, width: 70)
: Container(),
],
),
),
),
],
],
),
),
),
),
@ -165,11 +172,11 @@ class _AppDrawerState extends State<AppDrawer> {
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
(user != null && projectProvider!.isLogin)
? SizedBox.shrink()
? Container()
: InkWell(
child: DrawerItem(
TranslationBase.of(context).arabicChange,
Image.asset('assets/images/lang.png'),
Padding(child: Image.asset('assets/images/lang.png'), padding: EdgeInsets.all(3)),
isImageIcon: true,
bottomLine: false,
projectProvider: projectProvider,
@ -192,6 +199,139 @@ class _AppDrawerState extends State<AppDrawer> {
? Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
(user!.isFamily == null || user!.isFamily == false)
? InkWell(
child: DrawerItem(TranslationBase.of(context).family, SvgPicture.asset("assets/images/new/family_files.svg"),
isImageIcon: true,
bottomLine: false,
textColor: Theme.of(context).textTheme.bodyText1!.color,
iconColor: Theme.of(context).textTheme.bodyText1!.color,
sideArrow: true,
letterSpacing: -0.84,
projectProvider: projectProvider),
onTap: () {
Navigator.of(context).pop();
Navigator.of(context).pushNamed(
MY_FAMILIY,
);
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('my family');
},
)
: SizedBox(),
FutureBuilder(
future: getFamilyFiles(), // async work
builder: (BuildContext context, AsyncSnapshot<GetAllSharedRecordsByStatusResponse?> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(padding: EdgeInsets.all(10), child: CircularProgressIndicator());
default:
if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(snapshot.error.toString()));
else
return Container(
child: Column(
children: [
user!.isFamily == true
? Container(
padding: EdgeInsets.only(bottom: 5, left: 4),
child: InkWell(
onTap: () {
switchUser(mainUser, context);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
child: SvgPicture.asset("assets/images/new/family_files.svg"),
),
Expanded(
flex: 7,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
mainUser!.firstName! + ' ' + mainUser!.lastName!,
color: Color(0xff2E303A), //Theme.of(context).textTheme.bodyText1.color,
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.33,
),
AppText(
TranslationBase.of(context).fileno + ": " + mainUser!.patientID.toString(),
color: Color(0xff989898),
fontSize: 12,
letterSpacing: -0.33,
),
Container(
height: 1,
margin: EdgeInsets.only(top: 7.5),
color: Color(0xffEDEDED),
),
],
),
),
],
),
),
)
: SizedBox(),
Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: snapshot.data!.getAllSharedRecordsByStatusList!.map<Widget>((result) {
return result.status == 3
? Container(
padding: EdgeInsets.only(bottom: 5),
child: InkWell(
onTap: () {
switchUser(result, context);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
child: Icon(Icons.person, color: result.responseID == user!.patientID ? Colors.transparent : Colors.transparent),
),
Expanded(
flex: 7,
child: Padding(
padding: EdgeInsets.only(left: 5, right: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
result.patientName!,
color: result.responseID == user!.patientID ? Color(0xffC5272D) : Color(0xff2B353E),
fontWeight: FontWeight.w600,
fontSize: 11,
letterSpacing: -0.33,
),
AppText(
TranslationBase.of(context).fileno + ": " + result.responseID.toString(),
color: result.responseID == user!.patientID ? Color(0xffC5272D) : Color(0xff989898),
fontSize: 11,
letterSpacing: -0.33,
),
Divider(
color: Colors.grey[400],
),
],
),
),
),
],
),
),
)
: SizedBox();
}).toList())
],
));
}
},
),
mHeight(20),
InkWell(
child: DrawerItem(TranslationBase.of(context).arabicChange,
Padding(child: Image.asset('assets/images/lang.png'), padding: EdgeInsets.only(left: 3, right: 3, top: 3, bottom: projectProvider!.isArabic ? 3 : 0)),
@ -228,7 +368,73 @@ class _AppDrawerState extends State<AppDrawer> {
// readQRCode();
// },
// ),
InkWell(
child: Stack(
children: [
DrawerItem(
TranslationBase.of(context).notification,
SvgPicture.asset("assets/images/new/notifications.svg"),
isImageIcon: true,
bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
projectProvider: projectProvider,
count: toDoProvider!.notificationsCount != "0" && !projectProvider!.isLoginChild
? new Container(
padding: EdgeInsets.all(4),
margin: EdgeInsets.all(2),
decoration: new BoxDecoration(
color: CustomColors.accentColor,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
toDoProvider!.notificationsCount.toString(),
style: new TextStyle(
color: Colors.white,
fontSize: projectProvider!.isArabic ? 8 : 9,
),
textAlign: TextAlign.center,
),
// ),
)
: SizedBox(),
),
],
),
onTap: () {
//NotificationsPage
// Navigator.of(context).pop();
if (!projectProvider!.isLoginChild) Navigator.push(context, FadePage(page: NotificationsPage()));
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('notifications');
},
),
if (projectProvider!.havePrivilege(3))
InkWell(
child: DrawerItem(TranslationBase.of(context).appsetting, SvgPicture.asset("assets/images/new/app_setting.svg"),
isImageIcon: true, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider),
onTap: () {
Navigator.of(context).pushNamed(
SETTINGS,
);
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('app settings');
},
),
InkWell(
child: DrawerItem(TranslationBase.of(context).rateApp, Icons.star, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider),
onTap: () {
openAppReviewDialog();
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('rate our app');
// if (Platform.isIOS) {
// launchUrl(Uri.parse("https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978"));
// } else {
// launchUrl(Uri.parse("https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en"));
// }
},
),
InkWell(
child: DrawerItem(TranslationBase.of(context).logout, SvgPicture.asset("assets/images/new/logout.svg"),
isImageIcon: true, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider),
@ -245,21 +451,21 @@ class _AppDrawerState extends State<AppDrawer> {
login();
},
),
// InkWell(
// child: DrawerItem(TranslationBase.of(context).privacyPolicy, Icons.web, letterSpacing: -0.84, fontSize: 14, bottomLine: false),
// onTap: () {
// if (projectProvider!.isArabic)
// launch("https://hmg.com/ar/Pages/Privacy.aspx");
// else
// launch("https://hmg.com/en/Pages/Privacy.aspx");
// },
// ),
// InkWell(
// child: DrawerItem(TranslationBase.of(context).termsConditions, Icons.web, letterSpacing: -0.84, fontSize: 14, bottomLine: false),
// onTap: () {
// Navigator.of(context).push(FadePage(page: UserAgreementPage()));
// },
// )
InkWell(
child: DrawerItem(TranslationBase.of(context).privacyPolicy, Icons.web, letterSpacing: -0.84, fontSize: 14, bottomLine: false),
onTap: () {
if (projectProvider!.isArabic)
launch("https://hmg.com/ar/Pages/Privacy.aspx");
else
launch("https://hmg.com/en/Pages/Privacy.aspx");
},
),
InkWell(
child: DrawerItem(TranslationBase.of(context).termsConditions, Icons.web, letterSpacing: -0.84, fontSize: 14, bottomLine: false),
onTap: () {
Navigator.of(context).push(FadePage(page: UserAgreementPage()));
},
)
],
))
],
@ -499,7 +705,7 @@ class _AppDrawerState extends State<AppDrawer> {
// result.list.cRSVerificationStatus = result['CRSVerificationStatus'];
await this.sharedPref.setString(APP_LANGUAGE, currentLang);
await this.sharedPref.setString(BLOOD_TYPE, bloodType);
await this.sharedPref.setInt(LAST_LOGIN, loginType ?? 1 );
await this.sharedPref.setInt(LAST_LOGIN, loginType ?? 1);
await this.sharedPref.setObject(MAIN_USER, mainUser);
await this.sharedPref.setObject(USER_PROFILE, result.list);
await this.sharedPref.setObject(FAMILY_FILE, familyFile);

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
@ -9,8 +8,8 @@ class HabibLogoWidget extends StatelessWidget {
Widget build(BuildContext context) {
return Row(
children: [
Image.asset(
'assets/images/new/ic_logo.png',
SvgPicture.asset(
"assets/images/new/hmg_icon.svg",
height: 62,
width: 62,
),
@ -26,12 +25,12 @@ class HabibLogoWidget extends StatelessWidget {
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.72, height: 23 / 12),
),
Text(
TranslationBase.of(context).kingKhalidUniversity,
TranslationBase.of(context).drSulaimanText,
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 23 / 24),
),
Text(
TranslationBase.of(context).patientApp,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: appColor, letterSpacing: -0.72),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffD02127), letterSpacing: -0.72),
),
SizedBox(height: 2),
],

@ -343,7 +343,7 @@ class MyInAppBrowser extends InAppBrowser {
form = form.replaceFirst('PROJECT_ID_VALUE', projId);
form = form.replaceFirst('PAYMENT_OPTION_VALUE', paymentMethod);
form = form.replaceFirst('LANG_VALUE', currentLanguageID);
form = form.replaceFirst('SERVICE_URL_VALUE', "https://mdlaboratories.com/tamaralive/Home/Checkout");
form = form.replaceFirst('SERVICE_URL_VALUE', "https://mdlaboratories.com/tamara/Home/Checkout");
form = form.replaceFirst('INSTALLMENTS_VALUE', installments);
form = form.replaceFirst('CUSTNATIONALID_VALUE', authUser.patientIdentificationNo!);

@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart'
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -140,15 +139,15 @@ class DoctorHeader extends StatelessWidget {
ratingWidget: RatingWidget(
full: Icon(
Icons.star,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star_border,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
),
unratedColor: Colors.grey[500],
@ -179,7 +178,7 @@ class DoctorHeader extends StatelessWidget {
child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 15, left: 15),
decoration: BoxDecoration(
color: appColor, borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : BorderRadius.only(topLeft: Radius.circular(10))),
color: Color(0XFFD02127), borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : BorderRadius.only(topLeft: Radius.circular(10))),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
@ -305,15 +304,15 @@ class DoctorHeader extends StatelessWidget {
ratingWidget: RatingWidget(
full: Icon(
Icons.star,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star_border,
color: CustomColors.primaryColor,
color: CustomColors.accentColor,
),
),
unratedColor: Colors.grey[500],

@ -1,8 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:flutter/material.dart';
import '../../theme/theme_value.dart';
class MyTabView extends StatelessWidget {
final String title;
final FilterType value;
@ -38,7 +36,7 @@ class MyTabView extends StatelessWidget {
Container(
margin: EdgeInsets.only(top: 13),
height: 3,
color: value == groupValue ? appColor : Colors.transparent,
color: value == groupValue ? Color(0xffD02127) : Colors.transparent,
)
],
),

@ -17,7 +17,6 @@ import 'package:flutter_svg/svg.dart';
import 'package:provider/provider.dart';
import '../../splashPage.dart';
import '../../theme/theme_value.dart';
class NotAutPage extends StatefulWidget {
final String title;
@ -115,7 +114,7 @@ class _NotAutPageState extends State<NotAutPage> {
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48),
),
style: TextButton.styleFrom(
backgroundColor: appColor,
backgroundColor: Color(0xffD02127),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
@ -335,8 +334,23 @@ class _NotAutPageState extends State<NotAutPage> {
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(LOGIN_TYPE);
GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES? value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
sharedPref.setObject(IMEI_USER_DATA, value);
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
});
}
}
}

Loading…
Cancel
Save