Merge branch 'dev_v3.13.6' of http://34.17.52.180/Haroon6138/diplomatic-quarter into dev_v3.13.6_search_hospital_by_region

# Conflicts:
#	lib/uitl/translations_delegate_base.dart
merge-update-with-lab-changes
taha.alam 10 months ago
commit d4c741e1ec

@ -37,6 +37,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
// classpath 'com.android.tools.build:gradle:8.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
// classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,9 @@
<svg id="route" xmlns="http://www.w3.org/2000/svg" width="27.521" height="27.521" viewBox="0 0 27.521 27.521">
<path id="Path_5246" data-name="Path 5246" d="M365.087,11.9a.806.806,0,0,0,1.457,0l2.916-6.138a4.034,4.034,0,1,0-7.288,0Zm.728-8.678a.806.806,0,1,1-.806.806A.806.806,0,0,1,365.815,3.225Z" transform="translate(-342.332)" fill="#28323a"/>
<ellipse id="Ellipse_225" data-name="Ellipse 225" cx="1.5" cy="1" rx="1.5" ry="1" transform="translate(14 21.522)" fill="#28323a"/>
<path id="Path_5247" data-name="Path 5247" d="M175.628,205.644a2.016,2.016,0,0,1,0-4.031h8.315L183.177,200h-7.549a3.628,3.628,0,0,0,0,7.257h4.537a3.235,3.235,0,0,1,0-1.613Z" transform="translate(-162.754 -189.249)" fill="#28323a"/>
<circle id="Ellipse_226" data-name="Ellipse 226" cx="1.5" cy="1.5" r="1.5" transform="translate(19 15.522)" fill="#28323a"/>
<path id="Path_5248" data-name="Path 5248" d="M350.39,305h-.183a3.236,3.236,0,0,1,0,1.613h.183a2.069,2.069,0,0,1,0,4.139H345.1a3.236,3.236,0,0,1,0,1.613h5.289a3.682,3.682,0,0,0,0-7.364Z" transform="translate(-326.551 -288.605)" fill="#28323a"/>
<path id="Path_5249" data-name="Path 5249" d="M167.02,412l.706,1.613h2.621a3.235,3.235,0,0,1,0-1.613Z" transform="translate(-158.042 -389.854)" fill="#28323a"/>
<path id="Path_5250" data-name="Path 5250" d="M5.311,322.415a.806.806,0,0,0-1.477,0l-3.763,8.6a.806.806,0,0,0,1.139,1.023l3.363-1.922,3.363,1.922a.806.806,0,0,0,1.139-1.023Z" transform="translate(0 -304.627)" fill="#28323a"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M27.2568 32L25.1631 30.6091C27.9468 26.2666 29.4463 21.2154 29.4998 15.9999C29.4463 10.7844 27.9468 5.73315 25.1631 1.39067L27.2568 0C30.304 4.75302 31.9441 10.2814 31.9998 15.9875L32 16.0001L31.9998 16.0128C31.9441 21.7186 30.304 27.247 27.2568 32ZM25.0625 16.0165L25.0627 15.9999L25.0625 15.983C25.0051 11.5525 23.6995 7.27342 21.2869 3.60788L19.2097 5.02439C21.3494 8.27467 22.5085 12.0694 22.5625 15.9999C22.5085 19.9301 21.3494 23.7248 19.2097 26.9751L21.2869 28.3916C23.6995 24.7263 25.0051 20.447 25.0625 16.0165ZM16.7007 22.9666C17.719 20.7477 18.2334 18.3302 18.188 15.9748C18.1284 12.8761 17.1565 9.86638 15.3779 7.27168L13.3276 8.72795C14.822 10.9081 15.6384 13.4313 15.6885 16.0247C15.7163 17.4783 15.4875 18.9644 15.0205 20.3943L1.56543 9.86414L0.925293 11.3547C0.887451 11.4427 0 13.5424 0 16.4452C0 19.4569 1.69165 22.1483 1.76367 22.2614L3.86157 20.8772C3.8479 20.8558 2.5 18.6766 2.5 16.4452C2.5 15.5068 2.61401 14.6693 2.75073 14.0018L16.0413 24.4033L16.7007 22.9666Z" fill="#2E303A"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1124.14 1256.39">
<defs>
<style>
.cls-1 {
fill: #231f20;
}
</style>
</defs>
<path class="cls-1" d="M699.62,1113.02h0c-20.06,44.48-33.32,92.75-38.4,143.37l424.51-90.24c20.06-44.47,33.31-92.75,38.4-143.37l-424.51,90.24Z"/>
<path class="cls-1" d="M1085.73,895.8c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.33v-135.2l292.27-62.11c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.27V66.13c-50.67,28.45-95.67,66.32-132.25,110.99v403.35l-132.25,28.11V0c-50.67,28.44-95.67,66.32-132.25,110.99v525.69l-295.91,62.88c-20.06,44.47-33.33,92.75-38.42,143.37l334.33-71.05v170.26l-358.3,76.14c-20.06,44.47-33.32,92.75-38.4,143.37l375.04-79.7c30.53-6.35,56.77-24.4,73.83-49.24l68.78-101.97v-.02c7.14-10.55,11.3-23.27,11.3-36.97v-149.98l132.25-28.11v270.4l424.53-90.28Z"/>
</svg>

After

Width:  |  Height:  |  Size: 923 B

@ -0,0 +1,5 @@
<svg id="Download" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
<path
class="color000000 svgShape"
d="M1344 1344q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm256 0q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128-224v320q0 40-28 68t-68 28H160q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h465l135 136q58 56 136 56t136-56l136-136h464q40 0 68 28t28 68zm-325-569q17 41-14 70l-448 448q-18 19-45 19t-45-19L403 621q-31-29-14-70 17-39 59-39h256V64q0-26 19-45t45-19h256q26 0 45 19t19 45v448h256q42 0 59 39z" fill="#ffffff"></path>
</svg>

After

Width:  |  Height:  |  Size: 585 B

@ -0,0 +1,3 @@
<svg width="22" height="29" viewBox="0 0 22 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.5498 11.4402C17.4647 9.69433 20.0542 7.33316 20.2903 1.69231H22V0H0V1.69231H1.70974C1.94576 7.33316 4.53533 9.69433 6.45023 11.4402C7.73475 12.6113 8.46154 13.3281 8.46154 14.441C8.46154 15.5539 7.73475 16.2707 6.45023 17.4419C4.53533 19.1877 1.94576 21.5489 1.70974 27.1897H0V28.8821H22V27.1897H20.2903C20.0542 21.5489 17.4647 19.1877 15.5498 17.4419C14.2653 16.2707 13.5385 15.5539 13.5385 14.441C13.5385 13.3281 14.2653 12.6113 15.5498 11.4402ZM10.1538 20.7837C9.8925 20.8376 9.63431 20.9161 9.38232 21.0203L4.19952 23.165C5.0459 21.0129 6.40911 19.7695 7.5904 18.6925C8.9087 17.4906 10.1538 16.3553 10.1538 14.441V20.7837ZM14.4096 18.6925C15.5909 19.7695 16.954 21.0129 17.8005 23.1649L12.6177 21.0203C12.3657 20.916 12.1075 20.8376 11.8462 20.7836V14.441C11.8462 16.3553 13.0913 17.4906 14.4096 18.6925ZM4.16979 5.64103C3.76065 4.57493 3.47809 3.2877 3.40413 1.69231H18.5958C18.5219 3.2877 18.2394 4.57493 17.8302 5.64103H4.16979Z" fill="#2E303A"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" width="31" height="31" viewBox="0 0 31 31">
<g id="route" transform="translate(0 0)">
<path id="Path_5246" data-name="Path 5246" d="M365.505,13.407a.908.908,0,0,0,1.641,0l3.284-6.914a4.544,4.544,0,1,0-8.209,0Zm.82-9.774a.908.908,0,1,1-.908.908A.908.908,0,0,1,366.326,3.633Z" transform="translate(-339.874)" fill="#da4a54"/>
<circle id="Ellipse_225" data-name="Ellipse 225" cx="1.5" cy="1.5" r="1.5" transform="translate(16 24)" fill="#2e303a"/>
<path id="Path_5247" data-name="Path 5247" d="M176.087,206.357a2.27,2.27,0,0,1,0-4.541h9.366L184.59,200h-8.5a4.087,4.087,0,0,0,0,8.174h5.11a3.644,3.644,0,0,1,0-1.816Z" transform="translate(-161.586 -187.891)" fill="#2e303a"/>
<circle id="Ellipse_226" data-name="Ellipse 226" cx="2" cy="2" r="2" transform="translate(21 17)" fill="#2e303a"/>
<path id="Path_5248" data-name="Path 5248" d="M351.059,305h-.206a3.644,3.644,0,0,1,0,1.816h.206a2.331,2.331,0,0,1,0,4.662H345.1a3.645,3.645,0,0,1,0,1.816h5.958a4.147,4.147,0,0,0,0-8.295Z" transform="translate(-324.206 -286.533)" fill="#2e303a"/>
<path id="Path_5249" data-name="Path 5249" d="M167.02,412l.795,1.816h2.952a3.644,3.644,0,0,1,0-1.816Z" transform="translate(-156.907 -387.055)" fill="#2e303a"/>
<path id="Path_5250" data-name="Path 5250" d="M5.982,322.476a.908.908,0,0,0-1.664,0L.08,332.164a.908.908,0,0,0,1.283,1.153l3.788-2.164,3.788,2.164a.908.908,0,0,0,1.283-1.153Z" transform="translate(0 -302.44)" fill="#2e303a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,3 @@
<svg width="23" height="29" viewBox="0 0 23 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.2821 9.01172C18.9238 9.01172 18.5814 9.08629 18.2671 9.22183C17.9481 7.9542 16.8772 7.01953 15.6088 7.01953C14.9039 7.01953 14.2599 7.3082 13.7722 7.78227C13.2844 7.3082 12.6405 7.01953 11.9356 7.01953C11.6137 7.01953 11.3046 7.0797 11.0173 7.1902V3.96484C11.0173 2.31711 9.78138 0.976562 8.2623 0.976562C6.74323 0.976562 5.50736 2.31711 5.50736 3.96484V12.7547C5.06406 12.2739 4.70028 11.8793 4.70028 11.8793C3.68187 10.7746 2.03312 10.7115 0.9489 11.7334C-0.14065 12.7546 -0.316355 14.5345 0.548882 15.7856C0.558678 15.7998 0.568841 15.8136 0.57937 15.8272L4.66385 21.1185C5.1074 21.6931 5.74741 22.0491 6.31205 22.3632C6.72296 22.5918 7.34399 22.9373 7.34399 23.1565V26.0117C7.34399 27.6595 8.57986 29 10.0989 29H17.4455C18.9645 29 20.2004 27.6595 20.2004 26.0117V23.9531C20.2004 23.5591 20.5492 23.0843 20.9185 22.5818C21.4428 21.8683 22.037 21.0596 22.037 19.9688V12C22.037 10.3523 20.8012 9.01172 19.2821 9.01172ZM19.4823 21.3401C18.958 22.0536 18.3638 22.8623 18.3638 23.9531V26.0117C18.3638 26.561 17.9518 27.0078 17.4455 27.0078H10.0989C9.59258 27.0078 9.18062 26.561 9.18062 26.0117V23.1564C9.18062 21.72 8.00707 21.0672 7.1501 20.5904C6.72064 20.3515 6.2766 20.1046 6.072 19.8395L2.006 14.572C1.73131 14.1561 1.79259 13.5755 2.15165 13.2389C2.51304 12.8982 3.06213 12.9197 3.4016 13.2879C3.4016 13.2879 5.62662 15.7015 5.77685 15.8641C6.35294 16.4878 7.34393 16.0456 7.34393 15.1591V3.96484C7.34393 3.4156 7.75588 2.96875 8.26224 2.96875C8.7686 2.96875 9.18056 3.4156 9.18056 3.96484V12C9.18056 12.5501 9.59172 12.9961 10.0989 12.9961C10.606 12.9961 11.0172 12.5501 11.0172 12V10.0078C11.0172 9.45857 11.4291 9.01172 11.9355 9.01172C12.4419 9.01172 12.8538 9.45857 12.8538 10.0078V12C12.8538 12.5501 13.265 12.9961 13.7721 12.9961C14.2793 12.9961 14.6905 12.5501 14.6905 12V10.0078C14.6905 9.45857 15.1024 9.01172 15.6088 9.01172C16.1151 9.01172 16.5271 9.45857 16.5271 10.0078V12C16.5271 12.5501 16.9382 12.9961 17.4454 12.9961C17.9526 12.9961 18.3637 12.5501 18.3637 12C18.3637 11.4508 18.7757 11.0039 19.282 11.0039C19.7884 11.0039 20.2003 11.4508 20.2003 12V19.9688H20.2004C20.2004 20.3628 19.8516 20.8375 19.4823 21.3401Z" fill="#2E303A"/>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="31" height="31" viewBox="0 0 31 31">
<g id="Group_8325" data-name="Group 8325" transform="translate(-75 -236)">
<circle id="Ellipse_223" data-name="Ellipse 223" cx="15.5" cy="15.5" r="15.5" transform="translate(75 236)" fill="#359846"/>
<path id="hour-glass" d="M8.73,10.811a1.46,1.46,0,0,0,0-2.122L8.647,8.61C7.085,7.119,5.878,5.968,5.515,3.556A1.413,1.413,0,0,1,6.992,2h7.091A1.413,1.413,0,0,1,15.56,3.556C15.2,5.968,13.99,7.119,12.429,8.61l-.083.079a1.46,1.46,0,0,0,0,2.122l.083.079c1.562,1.491,2.768,2.642,3.132,5.054A1.413,1.413,0,0,1,14.083,17.5H6.992a1.413,1.413,0,0,1-1.477-1.556c.364-2.412,1.57-3.563,3.132-5.054Zm.529,1.316-.006,0c-1.19,1.064-2.076,1.856-2.191,3.816a.363.363,0,0,0,.13.3.382.382,0,0,0,.247.09h6.194a.382.382,0,0,0,.282-.122.361.361,0,0,0,.1-.268c-.115-1.959-1-2.752-2.191-3.816-.315-.281-.651-.582-1-.928a.4.4,0,0,0-.569,0c-.347.344-.681.643-.993.923Z" transform="translate(80.35 241.75)" fill="#fff" fill-rule="evenodd"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1021 B

@ -583,7 +583,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -601,7 +601,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.999;
MARKETING_VERSION = 4.6.004;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -735,7 +735,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -753,7 +753,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.999;
MARKETING_VERSION = 4.6.004;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -779,7 +779,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -797,7 +797,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.999;
MARKETING_VERSION = 4.6.004;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

@ -21,8 +21,8 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';
@ -102,6 +102,7 @@ var GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrd
var SEND_COVID_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/GenerateCOVIDReport';
var COVID_PASSPORT_UPDATE = 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate';
var GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport';
var SEND_LAB_RESULT_EMAIL_NEW = 'ReportsAPI/api/reports/labReport';
var UPDATE_WORKPLACE_NAME = 'Services/Patients.svc/REST/ActivateSickLeave_FromVida';
var GET_SICKLEAVE_STATUS_ADMISSION_NO = 'Services/ChatBot_Service.svc/REST/GetSickLeaveStatusByAdmissionNo';
@ -352,7 +353,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 17.4;
var VERSION_ID = 17.9;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;
@ -699,10 +700,10 @@ var IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE = 'Services/OUTPs.svc/REST/HIS_IsDo
//PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
// var payFortEnvironment = FortEnvironment.production;
// var applePayMerchantId = "merchant.com.hmgwebservices";
var payFortEnvironment = FortEnvironment.test;
var applePayMerchantId = "merchant.com.hmgwebservices.uat";
var payFortEnvironment = FortEnvironment.production;
var applePayMerchantId = "merchant.com.hmgwebservices";
// var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal {
static var context;

@ -586,6 +586,7 @@ const Map localizedValues = {
"items": {"en": "item(s)", "ar": "عنصر"},
"checkOut": {"en": "CHECK OUT", "ar": "الدفع"},
"sar": {"en": "SAR", "ar": " ر.س "},
// "sar": {"en": "", "ar": ""},
"aed": {"en": "AED", "ar": "درهم"},
"payOnline": {"en": "PAY ONLINE", "ar": "اتمام عملية الدفع "},
"cancelOrder": {"en": "CANCEL ORDER", "ar": "الغاء الطلب "},

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

@ -125,7 +125,7 @@ class LabsService extends BaseService {
}
Future updateWorkplaceName(String workplaceName, String workplaceNameAR, String occupation, String occupationAR, int requestNumber, String setupID, int projectID) async {
// Future updateWorkplaceName(String workplaceName, String workplaceNameAR, int requestNumber, String setupID, int projectID) async {
// Future updateWorkplaceName(String workplaceName, String workplaceNameAR, int requestNumber, String setupID, int projectID) async {
hasError = false;
Map<String, dynamic> body = Map();
@ -209,7 +209,7 @@ class LabsService extends BaseService {
RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail();
Future sendLabReportEmail({PatientLabOrders? patientLabOrder, AuthenticatedUser? userObj, bool isVidaPlus = false, bool isDownload = false}) async {
Future sendLabReportEmail({PatientLabOrders? patientLabOrder, AuthenticatedUser? userObj, bool isVidaPlus = false, bool isDownload = false, int languageID = 1}) async {
_requestSendLabReportEmail.projectID = patientLabOrder!.projectID;
_requestSendLabReportEmail.invoiceNo = isVidaPlus ? "0" : patientLabOrder.invoiceNo;
_requestSendLabReportEmail.invoiceNoVP = isVidaPlus ? patientLabOrder.invoiceNo : "0";
@ -228,11 +228,12 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.orderNo = patientLabOrder.orderNo;
_requestSendLabReportEmail.isDownload = isDownload;
_requestSendLabReportEmail.doctorID = patientLabOrder.doctorID;
_requestSendLabReportEmail.languageID = 1;
_requestSendLabReportEmail.languageID = languageID;
await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {
// await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) {
if (isDownload) {
labReportPDF = response['LabReportsPDFContent'];
labReportPDF = isVidaPlus ? response['LabReportsPDFContent'] : response['PdfContent'];
}
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -1,3 +1,7 @@
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart';
@ -9,6 +13,8 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:open_filex/open_filex.dart';
import 'package:path_provider/path_provider.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
@ -76,13 +82,7 @@ class LabsViewModel extends BaseViewModel {
getLaboratoryResult({String? projectID, int? clinicID, String? invoiceNo, String? invoiceType, String? orderNo, String? setupID, bool? isVidaPlus}) async {
setState(ViewState.Busy);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo,
invoiceType: invoiceType,
orderNo: orderNo,
projectID: projectID,
clinicID: clinicID,
setupID: setupID,
isVidaPlus: isVidaPlus);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, invoiceType: invoiceType, orderNo: orderNo, projectID: projectID, clinicID: clinicID, setupID: setupID, isVidaPlus: isVidaPlus);
if (_labsService.hasError) {
error = _labsService.error!;
setState(ViewState.Error);
@ -109,7 +109,7 @@ class LabsViewModel extends BaseViewModel {
// })
// .toList();
// if (value.isEmpty)
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList!.add(element);
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList!.add(element);
} else {
labResultLists.add(LabResultList(filterName: element.testCode, lab: element));
}
@ -150,15 +150,31 @@ class LabsViewModel extends BaseViewModel {
}
}
sendLabReportEmail({PatientLabOrders? patientLabOrder, String? mes, AuthenticatedUser? userObj, required bool isVidaPlus, bool isDownload = false}) async {
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isVidaPlus: isVidaPlus, isDownload: isDownload);
sendLabReportEmail({PatientLabOrders? patientLabOrder, String? mes, AuthenticatedUser? userObj, required bool isVidaPlus, bool isDownload = false, int languageID = 1}) async {
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isVidaPlus: isVidaPlus, isDownload: isDownload, languageID: languageID);
if (_labsService.hasError) {
error = _labsService.error!;
} else {
if (isDownload) {
if (labReportPDF.isNotEmpty) {
String path = await _createFileFromString(labReportPDF, "pdf");
try {
OpenFilex.open(path);
} catch (ex) {
AppToast.showErrorToast(message: "Cannot open file.");
}
}
} else {
AppToast.showSuccessToast(message: mes!);
}
}
}
Future<String> _createFileFromString(String encodedStr, String ext) async {
Uint8List bytes = base64.decode(encodedStr);
String dir = (await getApplicationDocumentsDirectory()).path;
File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext);
await file.writeAsBytes(bytes);
return file.path;
}
}

@ -30,6 +30,7 @@ import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class AnicllaryOrdersDetails extends StatefulWidget {
@ -151,7 +152,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
width: MediaQuery.of(context).size.width * 0.75,
child: getPaymentMethods(),
),
_amountView(TranslationBase.of(context).patientShareTotalToDo, getTotalValue() + " " + TranslationBase.of(context).sar, isBold: true, isTotal: true),
_amountView(TranslationBase.of(context).patientShareTotalToDo, getTotalValue(), isBold: true, isTotal: true),
// _amountView(TranslationBase.of(context).patientShareTotalToDo, getTotalValue(), isBold: true, isTotal: true),
SizedBox(height: 12),
DefaultButton(
TranslationBase.of(context).payNow.toUpperCase(),
@ -177,15 +179,14 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
return Text(
text,
style: TextStyle(
fontSize: isBold
? isTotal
? 16
: 12
: 11,
letterSpacing: -0.5,
color: isBold ? Color(0xff2E303A) : Color(0xff575757),
fontWeight: isTotal ? FontWeight.bold : FontWeight.w600,
),
fontSize: isBold
? isTotal
? 16
: 12
: 11,
letterSpacing: -0.5,
color: isBold ? Color(0xff2E303A) : Color(0xff575757),
fontWeight: isTotal ? FontWeight.bold : FontWeight.w600),
);
}
@ -197,7 +198,15 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
child: _getNormalText(title),
),
Expanded(
child: _getNormalText(value, isBold: isBold, isTotal: isTotal),
child: Row(
children: [
projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
_getNormalText(value, isBold: isBold, isTotal: isTotal),
mWidth(6),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
),
),
]),
);
@ -319,7 +328,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
),
mWidth(3),
Text(
_ancillaryProcLists[0].ancillaryOrderProcDetailsList![0].orderNo.toString(),
// _ancillaryProcLists[0].ancillaryOrderProcDetailsList![0].orderNo.toString(),
_ancillaryProcLists[0].ancillaryOrderProcDetailsList!.isNotEmpty ? _ancillaryProcLists[0].ancillaryOrderProcDetailsList![0].orderNo.toString() : "0",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
@ -572,9 +582,9 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
});
}),
Utils.tableColumnValue('${value.procedureName}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${value.patientShare.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${value.patientTaxAmount.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${value.patientShareWithTax.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${value.patientShare.toString()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${value.patientTaxAmount.toString()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${value.patientShareWithTax.toString()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
]),
);
return tableRow;
@ -660,27 +670,27 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
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: "Ancillary Order Payment",
orderAmount: double.parse(getTotalValue()),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(AppoitmentAllHistoryResultList());
},
projectId: widget.projectID,
serviceTypeEnum: ServiceTypeEnum.ancillaryOrder,
);
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Ancillary Order Payment",
orderAmount: double.parse(getTotalValue()),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(AppoitmentAllHistoryResultList());
},
projectId: widget.projectID,
serviceTypeEnum: ServiceTypeEnum.ancillaryOrder,
);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: "An error occurred while processing your request");

@ -31,6 +31,7 @@ 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';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import '../../config/shared_pref_kay.dart';
@ -41,6 +42,7 @@ class BookSuccess extends StatefulWidget {
DoctorList docObject;
late MyInAppBrowser browser;
// final ChromeSafariBrowser chromeBrowser = new MyChromeSafariBrowser(new MyInAppBrowser());
String appoDateFormatted;
@ -123,8 +125,8 @@ class _BookSuccessState extends State<BookSuccess> {
),
TableRow(
children: [
TableCell(child: _getHeadingText("SR " + widget.patientShareResponse.patientShare.toString())),
TableCell(child: _getHeadingText("SR " + widget.patientShareResponse.patientShareWithTax.toString())),
TableCell(child: _getHeadingText(widget.patientShareResponse.patientShare.toString())),
TableCell(child: _getHeadingText(widget.patientShareResponse.patientShareWithTax.toString())),
],
),
],
@ -1094,15 +1096,23 @@ class _BookSuccessState extends State<BookSuccess> {
_getHeadingText(text) {
return Container(
padding: EdgeInsets.only(bottom: 10.0, left: 20, right: 20),
child: Text(
text,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 16.0,
letterSpacing: -0.64,
color: Colors.white,
fontWeight: FontWeight.w600,
),
child: Row(
children: [
projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16, color: Colors.white),
mWidth(6),
Text(
text,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 16.0,
letterSpacing: -0.64,
color: Colors.white,
fontWeight: FontWeight.w600,
),
),
mWidth(6),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16, color: Colors.white) : Container(),
],
),
);
}

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:flutter/cupertino.dart';
@ -45,16 +46,18 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
AppSharedPreferences sharedPref = new AppSharedPreferences();
var selectedDate = "";
var selectedNextDate = "";
dynamic selectedDateJSON;
dynamic jsonFreeSlots;
final DateFormat dateFormatter = DateFormat('yyyy-MM-dd');
List<TimeSlot> docFreeSlots = [];
List<TimeSlot> dayEvents = [];
List<TimeSlot> nextDayEvents = [];
int selectedButtonIndex = 0;
int selectedNextDayButtonIndex = -1;
dynamic freeSlotsResponse;
// String nextDayAppointmentDate ="";
late ScrollController _scrollController;
var language;
@ -115,9 +118,11 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
final DateFormat formatter = DateFormat('yyyy-MM-dd');
setState(() {
this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, language);
this.selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day.add(Duration(days: 1)), language);
_calendarController.selectedDate = day;
openTimeSlotsPickerForDate(day, docFreeSlots);
DocAvailableAppointments.selectedDate = formatter.format(day);
_calendarController.selectedDate = day;
selectedNextDayButtonIndex = -1;
print(_calendarController.selectedDate);
});
}
@ -139,19 +144,51 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
child: Text(selectedDate, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)),
),
DocAvailableAppointments.areSlotsAvailable
? Container(
height: 40,
child: ListView.builder(
controller: _scrollController,
scrollDirection: Axis.horizontal,
itemCount: dayEvents.length,
itemBuilder: (context, index) {
return Container(
margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5),
child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index),
);
},
),
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 40,
child: ListView.builder(
controller: _scrollController,
scrollDirection: Axis.horizontal,
itemCount: dayEvents.length,
itemBuilder: (context, index) {
return Container(
margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5),
child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index),
);
},
),
),
SizedBox(
height: 20,
),
nextDayEvents.isNotEmpty && projectViewModel.havePrivilege(110)
? Container(
padding: EdgeInsets.only(left: 20, right: 20, bottom: 20),
child: Text(
selectedNextDate,
style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black),
),
)
: SizedBox(),
Container(
height: 40,
padding: EdgeInsets.only(left: 0, right: 0),
child: ListView.builder(
controller: _scrollController,
scrollDirection: Axis.horizontal,
itemCount: nextDayEvents.length,
itemBuilder: (context, index) {
return Container(
margin: EdgeInsets.only(right: (index == nextDayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5),
child: index == selectedNextDayButtonIndex ? getSelectedNextDayButton(index) : getNormalNextDayButton(index),
);
},
),
)
],
)
: Center(
child: Padding(
@ -225,7 +262,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
Map<String, dynamic> timeSlot = {"isoTime": dayEvents[i].isoTime, "start": dayEvents[i].start.toString(), "end": dayEvents[i].end.toString(), "vidaDate": dayEvents[i].vidaDate};
timeList.add(timeSlot);
}
filterNextDayAppo(freeSlots, timeList.last);
AppSharedPreferences sharedPref = new AppSharedPreferences();
sharedPref.setString('selectedLogSlots', json.encode(timeList));
DocAvailableAppointments.selectedTime = dayEvents[selectedButtonIndex].isoTime;
@ -234,12 +271,27 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
});
}
filterNextDayAppo(List<TimeSlot> freeSlots, Map<String, dynamic> listList) {
DateTime dateStart = DateTime.parse(listList['end']).add(Duration(days: 1));
DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0);
nextDayEvents = [];
DateTime beforeHour = new DateTime(dateStart.year, dateStart.month, dateStart.day, 6, 0, 0, 0, 0);
if (projectViewModel.havePrivilege(110)) {
freeSlots.forEach((v) {
if (v.start == dateStartObj && v.end!.isBefore(beforeHour)) nextDayEvents.add(v);
});
} else {
nextDayEvents = [];
}
// print(nextDayEvents);
}
Future<Map<DateTime, List>> _getJSONSlots() async {
Map<DateTime, List> _eventsParsed;
List<FreeSlot> slotsList = [];
DateTime date;
final DateFormat formatter = DateFormat('HH:mm');
final DateFormat dateFormatter = DateFormat('yyyy-MM-dd');
for (var i = 0; i < freeSlotsResponse.length; i++) {
date = (isLiveCareSchedule != null && isLiveCareSchedule)
? DateUtil.convertStringToDate(freeSlotsResponse[i])
@ -259,6 +311,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
),
),
);
DocAvailableAppointments.selectedAppoDateTime = (isLiveCareSchedule != null && isLiveCareSchedule)
? DateUtil.convertStringToDate(freeSlotsResponse[0])
: DateUtil.convertStringToDateSaudiTimezone(
@ -277,6 +330,16 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
),
),
language);
selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted(
(isLiveCareSchedule != null && isLiveCareSchedule)
? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days: 1))
: DateUtil.convertStringToDateSaudiTimezone(
freeSlotsResponse[0],
int.parse(
widget.doctor.projectID.toString(),
),
).add(Duration(days: 1)),
language);
selectedDateJSON = freeSlotsResponse[0];
});
openTimeSlotsPickerForDate(
@ -320,8 +383,10 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
setState(() {
selectedButtonIndex = index;
selectedNextDayButtonIndex = -1;
DocAvailableAppointments.selectedTime = dayEvents[index].isoTime;
print(DocAvailableAppointments.selectedTime);
DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!);
});
projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor);
},
@ -342,6 +407,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
setState(() {
selectedButtonIndex = index;
DocAvailableAppointments.selectedTime = dayEvents[index].isoTime;
DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!);
print(DocAvailableAppointments.selectedTime);
});
},
@ -349,6 +415,54 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
);
}
Widget getNormalNextDayButton(int index) {
return CustomTextButton(
backgroundColor: Colors.white,
elevation: 0,
side: BorderSide(
color: Colors.black, //Color of the border
style: BorderStyle.solid, //Style of the border
width: 1.5 //width of the border
),
onPressed: () {
final timeslot = nextDayEvents[index];
DocAvailableAppointments.selectedAppoDateTime = timeslot.end;
setState(() {
selectedButtonIndex = -1;
selectedNextDayButtonIndex = index;
DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime;
DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days: 1)));
print(DocAvailableAppointments.selectedTime);
});
projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor);
},
child: Text(nextDayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Color(0xFF60686b))),
);
}
Widget getSelectedNextDayButton(int index) {
return CustomTextButton(
backgroundColor: nextDayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green,
elevation: 0,
side: BorderSide(
color: nextDayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, //Color of the border
style: BorderStyle.solid, //Style of the border
width: 1.5 //width of the border
),
onPressed: () {
setState(() {
selectedButtonIndex = -1;
selectedNextDayButtonIndex = index;
DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime;
DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days: 1)));
print(DocAvailableAppointments.selectedTime);
});
},
child: Text(nextDayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Colors.white)),
);
}
getDoctorFreeSlots(context, DoctorList docObject) {
print(DocAvailableAppointments.initialSlotDuration);
GifLoaderDialogUtils.showMyDialog(context);

@ -69,7 +69,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
@override
void initState() {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils = new LocationUtils(isShowConfirmDialog: true, isShowLocationTimeoutDialog: false, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
checkPVM();
super.initState();

@ -14,6 +14,8 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as list;
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/routes.dart';
@ -467,6 +469,42 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
});
}
checkIfIsInPatient(BuildContext context) {
bool isAdmitted = false;
bool hasAdmissionRequest = false;
GetAdmissionInfoResponseModel getAdmissionInfoResponseModel;
GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel;
ClinicListService service = new ClinicListService();
service.checkIfInPatientAPI(context).then((res) {
if (res['MessageStatus'] == 1) {
isAdmitted = res['isAdmitted'];
hasAdmissionRequest = res['hasAdmissionRequests'];
print("IS ADMITTED: $isAdmitted");
print("Has Admission Request: $hasAdmissionRequest");
if (isAdmitted) {
if (res['PatientAdmittedInformation'].length != 0) {
getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]);
projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']);
projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel);
projectViewModel.setIsPatientAdmitted(true);
}
}
if (hasAdmissionRequest) {
if (res['MedicalInstruction'].length != 0) {
getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]);
// projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']);
projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['projectId']);
projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel);
projectViewModel.setPatientHasAdmissionRequest(true);
}
}
} else {}
}).catchError((err) {
projectViewModel.setIsPatientAdmitted(false);
projectViewModel.setPatientHasAdmissionRequest(false);
});
}
loginAfter(result, context) async {
var currentLang = await sharedPref.getString(APP_LANGUAGE);
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).setPrivilege(privilegeList: result, isLoginChild: true);
@ -501,6 +539,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
try {
// await appointmentRateViewModel.getIsLastAppointmentRatedList();
checkIfIsInPatient(context);
await getToDoCount();
if (appointmentRateViewModel.isHaveAppointmentNotRate) {
Navigator.pushAndRemoveUntil(

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class BillAmount extends StatefulWidget {
final Function changeCurrentTab;
@ -98,7 +99,13 @@ class _BillAmountState extends State<BillAmount> {
child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo),
),
Expanded(
child: _getNormalText(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}', isBold: true, isTotal: true),
child: Row(
children: [
SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
_getNormalText(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}', isBold: true, isTotal: true),
],
),
)
],
),

@ -22,6 +22,7 @@ import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMa
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import '../AvailableAppointmentsPage.dart';
@ -48,7 +49,8 @@ class _PickupLocationState extends State<PickupLocation> {
// double _longitude;
AppoitmentAllHistoryResultList? myAppointment;
HospitalsModel? _selectedHospital;
LocationDetails? _result ;
LocationDetails? _result;
LocationUtils? locationUtils;
late ProjectViewModel projectViewModel;
@ -519,9 +521,19 @@ class _PickupLocationState extends State<PickupLocation> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar + (widget.patientER_RC.transportationDetails!.tripType == 1 ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
Row(
children: [
projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
Text(
(widget.patientER_RC.transportationDetails!.tripType == 1
? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}'
: ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
),
mWidth(6),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
),
],
)

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
enum Direction { ToHospital, FromHospital }
@ -123,13 +124,21 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
),
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].priceTotal}',
style: TextStyle(
fontSize: 12.0,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
child: Row(
children: [
projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
Text(
' ${widget.amRequestViewModel.amRequestModeList[index].priceTotal}',
style: TextStyle(
fontSize: 12.0,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
mWidth(6),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
),
)
],
@ -325,9 +334,17 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar + (_way == Way.OneWay ? ' ${_erTransportationMethod.priceTotal}' : ' ${(_erTransportationMethod.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
Row(
children: [
projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
Text(
(_way == Way.OneWay ? ' ${_erTransportationMethod.priceTotal}' : ' ${(_erTransportationMethod.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
),
mWidth(6),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
),
],
)

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.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';
@ -18,14 +19,14 @@ class Summary extends StatefulWidget {
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel;
final TabController tabController;
Summary({Key? key, required this.changeCurrentTab, required this.patientER, required this.patientER_RC, required this.amRequestViewModel, required this.tabController});
Summary({Key? key, required this.changeCurrentTab, required this.patientER, required this.patientER_RC, required this.amRequestViewModel, required this.tabController});
@override
_SummaryState createState() => _SummaryState();
}
class _SummaryState extends State<Summary> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -129,12 +130,19 @@ class _SummaryState extends State<Summary> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar +
Row(
children: [
projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
Text(
(widget.patientER_RC.transportationDetails!.tripType == 1
? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}'
: ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
),
mWidth(6),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
),
],
)

@ -27,6 +27,7 @@ import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class EROnlineCheckInPaymentDetails extends StatefulWidget {
@ -278,8 +279,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
width: MediaQuery.of(context).size.width * 0.75,
child: getPaymentMethods(),
),
_amountView(TranslationBase.of(context).patientShareTotalToDo, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax.toString() + " " + TranslationBase.of(context).sar,
isBold: true, isTotal: true),
_amountView(TranslationBase.of(context).patientShareTotalToDo, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax.toString(), isBold: true, isTotal: true),
SizedBox(height: 12),
DefaultButton(
TranslationBase.of(context).payNow.toUpperCase(),
@ -598,7 +598,15 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
child: _getNormalText(title),
),
Expanded(
child: _getNormalText(value, isBold: isBold, isTotal: isTotal),
child: Row(
children: [
projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
_getNormalText(value, isBold: isBold, isTotal: isTotal),
mWidth(6),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
),
),
]),
);

@ -13,10 +13,12 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/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';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:provider/provider.dart';
@ -91,9 +93,17 @@ class RRTPlaceOrderPage extends StatelessWidget {
SizedBox(
height: 5,
),
Text(
"${selectedProcedure.patientShareWithTax ?? '- - -'} ${localize.sar}",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
Row(
children: [
projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 18, height: 18),
mWidth(6),
Text(
"${selectedProcedure.patientShareWithTax ?? '- - -'}",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
),
mWidth(6),
projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 18, height: 18) : Container(),
],
),
],
),
@ -210,11 +220,9 @@ class RRTPlaceOrderPage extends StatelessWidget {
_context,
viewModel!.createdRequestNo.toString(),
onClick: () {
Navigator.pop(_context);
Navigator.pop(_context);
Navigator.pop(_context);
Navigator.pop(_context);
gotoRRTRoot();
},
);
}

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/rrt/RRTProcedureList.dart';
@ -12,11 +13,13 @@ import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class RRTRequestPage extends StatefulWidget {
@ -203,13 +206,21 @@ class RRTRequestPageState extends State<RRTRequestPage> {
),
),
Expanded(
child: Text(
'$amount ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
child: Row(
children: [
projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
Text(
amount,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
mWidth(6),
projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
),
),
],
@ -231,13 +242,21 @@ class RRTRequestPageState extends State<RRTRequestPage> {
),
),
Expanded(
child: Text(
'$vat ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
child: Row(
children: [
projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
Text(
vat,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
mWidth(6),
projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
),
),
],
@ -259,13 +278,17 @@ class RRTRequestPageState extends State<RRTRequestPage> {
),
),
Expanded(
child: Text(
'$total ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 14,
letterSpacing: -0.48,
fontWeight: FontWeight.bold,
),
child: Row(
children: [
projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 14, height: 14),
mWidth(6),
Text(
total,
style: TextStyle(fontSize: 14, letterSpacing: -0.48, fontWeight: FontWeight.bold, color: CustomColors.black),
),
mWidth(6),
projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
),
),
],

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:share_plus/share_plus.dart';
import 'package:url_launcher/url_launcher.dart';
@ -166,13 +167,19 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
letterSpacing: -0.64,
),
),
Text(
TranslationBase.of(context).sar + " ${widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].requestedAmount}",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
letterSpacing: -0.64,
),
Row(
children: [
SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
Text(
"${widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].requestedAmount}",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
letterSpacing: -0.64,
),
),
],
),
],
),

@ -214,7 +214,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
return SizedBox();
} else {
List<Widget> list = [];
if (widget.parentIndex == 0 && _tabController!.index == 0) {
if (widget.parentIndex == 0 && _tabController!.index == 0 && widget.appo.patientStatusType != 43) {
list.add(
Expanded(
child: DefaultButton(

@ -663,7 +663,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
setState(() {
if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, 0, true, notificationCount);
model.setState(model.count, model.ancillaryCount, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
// FlutterAppIconBadge.updateBadge(int.parse(notificationCount));
}

@ -133,14 +133,31 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
),
),
Expanded(
child: Text(
widget.getERAppointmentFeesList.amount! + " " + widget.getERAppointmentFeesList.currency!,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR")
? Row(
children: [
projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
Text(
widget.getERAppointmentFeesList.amount!,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
mWidth(6),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
)
: Text(
widget.getERAppointmentFeesList.amount! + " " + widget.getERAppointmentFeesList.currency!,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
],
),
@ -161,14 +178,31 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
),
),
Expanded(
child: Text(
widget.getERAppointmentFeesList.tax! + " " + widget.getERAppointmentFeesList.currency!,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR")
? Row(
children: [
projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
Text(
widget.getERAppointmentFeesList.tax!,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
mWidth(6),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
)
: Text(
widget.getERAppointmentFeesList.tax! + " " + widget.getERAppointmentFeesList.currency!,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
],
),
@ -189,14 +223,31 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
),
),
Expanded(
child: Text(
widget.getERAppointmentFeesList.total! + " " + widget.getERAppointmentFeesList.currency!,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR")
? Row(
children: [
projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
Text(
widget.getERAppointmentFeesList.total!,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
mWidth(6),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
)
: Text(
widget.getERAppointmentFeesList.total! + " " + widget.getERAppointmentFeesList.currency!,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
],
),

@ -501,12 +501,12 @@ class _clinic_listState extends State<ClinicList> {
);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: "An error occurred while processing your request");
AppToast.showErrorToast(message: "An error occurred while processing your request", localContext: context);
}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(localContext!);
AppToast.showErrorToast(message: err);
AppToast.showErrorToast(message: err, localContext: context);
});
} catch (ex) {
print(ex.toString());

@ -709,32 +709,36 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
checkIfUserAgreedBefore(CheckActivationCode result) {
this.authService.checkIfUserAgreed().then((result) {
if (result['IsPatientAlreadyAgreed']) {
goToHome();
} else {
this.authService.getUserAgreementContent().then((result) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: UserLoginAgreementPage(
userAgreementText: result['UserAgreementContent'],
authenticatedUserObject: authenticatedUserObject,
appointmentRateViewModel: appointmentRateViewModel,
selectedOption: selectedOption,
if (projectViewModel.havePrivilege(109)) {
this.authService.checkIfUserAgreed().then((result) {
if (result['IsPatientAlreadyAgreed']) {
goToHome();
} else {
this.authService.getUserAgreementContent().then((result) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: UserLoginAgreementPage(
userAgreementText: result['UserAgreementContent'],
authenticatedUserObject: authenticatedUserObject,
appointmentRateViewModel: appointmentRateViewModel,
selectedOption: selectedOption,
),
),
),
(r) => false);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
(r) => false);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
} else {
goToHome();
}
// if (result.isNeedUserAgreement == true) {
// // move to agreement page.

@ -3,6 +3,8 @@ import 'package:diplomaticquarterapp/core/viewModels/TermsConditionsViewModel.da
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
@ -13,6 +15,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/Loader/gif_loader_container.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -51,6 +54,7 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
NavigationDelegate(
onProgress: (int progress) {
// Update loading bar.
print("Progress: $progress");
},
onPageStarted: (String url) {},
onPageFinished: (String url) {
@ -82,7 +86,15 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
showNewAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).userAgreement,
body: WebViewWidget(controller: _controller),
body: isPageLoaded
? WebViewWidget(controller: _controller)
: Container(
child: Center(
child: GifLoaderContainer(
barrierDismissible: false,
),
),
),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: SingleChildScrollView(child: WebViewWidget(controller: _controller)
@ -193,6 +205,39 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
});
}
checkIfIsInPatient() {
bool isAdmitted = false;
bool hasAdmissionRequest = false;
GetAdmissionInfoResponseModel getAdmissionInfoResponseModel;
GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel;
ClinicListService service = new ClinicListService();
service.checkIfInPatientAPI(context).then((res) {
if (res['MessageStatus'] == 1) {
isAdmitted = res['isAdmitted'];
hasAdmissionRequest = res['hasAdmissionRequests'];
print("IS ADMITTED: $isAdmitted");
print("Has Admission Request: $hasAdmissionRequest");
if (isAdmitted) {
if (res['PatientAdmittedInformation'].length != 0) {
getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]);
projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']);
projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel);
projectViewModel.setIsPatientAdmitted(true);
}
}
if (hasAdmissionRequest) {
if (res['MedicalInstruction'].length != 0) {
getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]);
// projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']);
projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['projectId']);
projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel);
projectViewModel.setPatientHasAdmissionRequest(true);
}
}
} else {}
});
}
goToHome() async {
widget.authenticatedUserObject.isLogin = true;
widget.appointmentRateViewModel.isLogin = true;
@ -202,6 +247,7 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
// GifLoaderDialogUtils.hideDialog(context);
getToDoCount();
checkIfIsInPatient();
widget.appointmentRateViewModel
.getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2)
.then((value) => {

@ -108,21 +108,26 @@ class AskDoctorPage extends StatelessWidget {
);
}
Future<bool> checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) {
Future<bool> checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) async {
AskDoctorService askDocservice = new AskDoctorService();
bool isAvailable = false;
GifLoaderDialogUtils.showMyDialog(context);
service.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) {
await askDocservice.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['IsDoctorAvailable']);
if (res['IsDoctorAvailable']) {
isAvailable = true;
if (res != null) {
print(res['IsDoctorAvailable']);
if (res['IsDoctorAvailable']) {
isAvailable = true;
} else {
isAvailable = false;
AppToast.showErrorToast(message: res['endUserMessage'], localContext: context);
}
} else {
isAvailable = false;
AppToast.showErrorToast(message: res['endUserMessage']);
isAvailable = true;
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
if (err != null) AppToast.showErrorToast(message: err.toString());
if (err != null) AppToast.showErrorToast(message: err.toString(), localContext: context);
print(err);
});

@ -25,6 +25,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -149,16 +150,22 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
)
: Image.asset(getImagePath(widget.selectedPaymentMethod!)),
),
Text(
widget.advanceModel!.hospitalsModel!.projectOutSA!
? '${widget.advanceModel!.amount} ' + TranslationBase.of(context).aed
: '${widget.advanceModel!.amount} ' + TranslationBase.of(context).sar,
// '${widget.advanceModel.amount} ' + TranslationBase.of(context).sar,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w900,
letterSpacing: -0.48,
),
Row(
children: [
widget.advanceModel!.hospitalsModel!.projectOutSA! ? Container() : projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 20, height: 20),
mWidth(6),
Text(
widget.advanceModel!.hospitalsModel!.projectOutSA! ? '${widget.advanceModel!.amount} ' + TranslationBase.of(context).aed : '${widget.advanceModel!.amount}',
// '${widget.advanceModel.amount} ' + TranslationBase.of(context).sar,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w900,
letterSpacing: -0.48,
),
),
mWidth(6),
widget.advanceModel!.hospitalsModel!.projectOutSA! ? Container() : projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 20, height: 20) : Container(),
],
)
],
),
@ -320,27 +327,27 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
service.applePayInsertRequest(applePayInsertRequest, context).then((res) async {
if (res["MessageStatus"] == 1) {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${widget.advanceModel!.fileNumber!}@HMG.com",
orderDescription: "Advance Payment",
orderAmount: double.parse(widget.advanceModel!.amount!),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(num.parse(widget.advanceModel!.fileNumber!), result: successResult);
checkPaymentStatus(AppoitmentAllHistoryResultList());
},
projectId: widget.advanceModel!.hospitalsModel!.iD,
serviceTypeEnum: ServiceTypeEnum.advancePayment,
);
customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${widget.advanceModel!.fileNumber!}@HMG.com",
orderDescription: "Advance Payment",
orderAmount: double.parse(widget.advanceModel!.amount!),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(num.parse(widget.advanceModel!.fileNumber!), result: successResult);
checkPaymentStatus(AppoitmentAllHistoryResultList());
},
projectId: widget.advanceModel!.hospitalsModel!.iD,
serviceTypeEnum: ServiceTypeEnum.advancePayment,
);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: "An error occurred while processing your request");

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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';
@ -17,7 +18,7 @@ import 'package:provider/provider.dart';
import 'advance_payment_page.dart';
class MyBalancePage extends StatelessWidget {
List<ImagesInfo> imagesInfo =[];
List<ImagesInfo> imagesInfo = [];
late ProjectViewModel projectViewModel;
@ -95,18 +96,42 @@ class MyBalancePage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
Text(
double.parse(model.totalAdvanceBalanceAmount?.toString() ?? "0").toStringAsFixed(2),
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
letterSpacing: -1.44,
height: 24 / 23,
color: Colors.white,
),
Row(
children: [
projectViewModel.user!.outSA == 1
? Container()
: projectViewModel.isArabic
? Container()
: SvgPicture.asset(
"assets/images/new/Saudi_Riyal_Symbol.svg",
width: 22,
height: 22,
color: Colors.white,
),
mWidth(6),
Text(
double.parse(model.totalAdvanceBalanceAmount?.toString() ?? "0").toStringAsFixed(2),
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
letterSpacing: -1.44,
height: 24 / 21,
color: Colors.white,
),
),
mWidth(6),
projectViewModel.isArabic
? SvgPicture.asset(
"assets/images/new/Saudi_Riyal_Symbol.svg",
width: 22,
height: 22,
color: Colors.white,
)
: Container(),
],
),
Text(
projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : TranslationBase.of(context).sar,
projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : "",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
@ -156,14 +181,26 @@ class MyBalancePage extends StatelessWidget {
),
),
),
Text(
amount.toStringAsFixed(2) + " " + (projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : TranslationBase.of(context).sar),
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
fontWeight: amount > 0 ? FontWeight.bold : FontWeight.w500,
color: Color(0xff2E303A),
),
Row(
children: [
projectViewModel.user!.outSA == 1
? Container()
: projectViewModel.isArabic
? Container()
: SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16),
mWidth(6),
Text(
amount.toStringAsFixed(2) + " " + (projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : ""),
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
fontWeight: amount > 0 ? FontWeight.bold : FontWeight.w500,
color: Color(0xff2E303A),
),
),
mWidth(6),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
),
],
),

@ -64,6 +64,8 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
patientLabOrder: widget.patientLabOrders,
mes: TranslationBase.of(context).sendSuc,
userObj: projectViewModel.user,
languageID: projectViewModel.isArabic ? 1 : 2,
isDownload: true,
isVidaPlus: Utils.isVidaPlusProject(
projectViewModel,
int.parse(widget.patientLabOrders!.projectID!),
@ -118,14 +120,6 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
);
}
Future<String> _createFileFromString(String encodedStr, String ext) async {
Uint8List bytes = base64.decode(encodedStr);
String dir = (await getApplicationDocumentsDirectory()).path;
File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext);
await file.writeAsBytes(bytes);
return file.path;
}
String getSpecialResults(LabsViewModel model) {
String labResults = "";
model.patientLabSpecialResult.forEach((element) {

@ -151,7 +151,7 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
child: _getNormalText(TranslationBase.of(context).discount),
),
Expanded(
child: _getNormalText(this.totalDiscount.toString() + " " + TranslationBase.of(context).sar, isBold: true),
child: _getNormalText(this.totalDiscount.toString(), isBold: true),
)
],
),
@ -169,7 +169,7 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
"%): "),
),
Expanded(
child: _getNormalText(num.tryParse(this.totalVAT.toString())!.toStringAsFixed(2) + " " + TranslationBase.of(context).sar, isBold: true),
child: _getNormalText(num.tryParse(this.totalVAT.toString())!.toStringAsFixed(2), isBold: true),
)
],
),
@ -184,7 +184,7 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
child: _getNormalText(TranslationBase.of(context).total),
),
Expanded(
child: _getNormalText(this.subTotal.toString() + " " + TranslationBase.of(context).sar, isBold: true),
child: _getNormalText(this.subTotal.toString(), isBold: true),
)
],
),
@ -199,7 +199,7 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
child: _getNormalText(TranslationBase.of(context).paid),
),
Expanded(
child: _getNormalText(this.grandTotal.toString() + " " + TranslationBase.of(context).sar, isBold: true),
child: _getNormalText(this.grandTotal.toString(), isBold: true),
)
],
),
@ -283,9 +283,9 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].quantity}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].price.toString() + " " + TranslationBase.of(context).sar}',
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].price.toString()}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].total.toString() + " " + TranslationBase.of(context).sar}',
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].total.toString()}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
]),
);

@ -429,7 +429,7 @@ class ClinicListService extends BaseService {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
}, body: request, isAllowAny: true);
return Future.value(localRes);
}

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart';
import 'package:diplomaticquarterapp/services/payfort_services/payfort_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart';
@ -77,7 +78,8 @@ class PayfortViewModel extends ChangeNotifier {
);
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
} catch (e) {
Utils.showErrorToast(e.toString());
// Utils.showErrorToast(e.toString());
AppToast.showErrorToast(message: e.toString(), localContext: AppGlobal.context);
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
throw e;
}

@ -17,11 +17,12 @@ class LocationUtils {
AppSharedPreferences sharedPref = new AppSharedPreferences();
bool isShowConfirmDialog;
bool isShowLocationTimeoutDialog;
BuildContext context;
bool isHuawei;
final GeolocatorPlatform _geolocatorPlatform = GeolocatorPlatform.instance;
LocationUtils({required this.isShowConfirmDialog, required this.context, this.isHuawei = false});
LocationUtils({required this.isShowConfirmDialog, required this.context, this.isHuawei = false, this.isShowLocationTimeoutDialog = true});
void getCurrentLocation({Function(LatLng)? callBack}) async {
if (Platform.isAndroid && isHuawei) {
@ -31,12 +32,15 @@ class LocationUtils {
if (value) {
await Geolocator.checkPermission().then((permission) async {
if (permission == LocationPermission.always || permission == LocationPermission.whileInUse) {
Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.best, timeLimit: Duration(seconds: 5)).then((value) {
Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 5)).then((value) {
setLocation(value);
if (callBack != null) callBack(LatLng(value.latitude, value.longitude));
}).catchError((err) {
print(err);
if (isShowConfirmDialog) showLocationTimeOutDialog(failureCallBack: (){});
if (isShowConfirmDialog && isShowLocationTimeoutDialog)
showLocationTimeOutDialog(failureCallBack: () {
Geolocator.openAppSettings();
});
});
}
@ -50,7 +54,7 @@ class LocationUtils {
if (callBack != null) callBack(LatLng(value.latitude, value.longitude));
});
} else {
if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: (){});
if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: () {});
}
});
} else {
@ -58,7 +62,7 @@ class LocationUtils {
getCurrentLocation(callBack: callBack);
} else {
setZeroLocation();
if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: (){});
if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: () {});
}
}
}
@ -152,7 +156,9 @@ class LocationUtils {
accuracy: 1.0,
heading: 0.0,
speed: 0.0,
speedAccuracy: 1, altitudeAccuracy: 0.0, headingAccuracy: 0.0,
speedAccuracy: 1,
altitudeAccuracy: 0.0,
headingAccuracy: 0.0,
// altitudeAccuracy: 0.0,
// headingAccuracy: 0.0,
// altitudeAccuracy: 0,

@ -62,6 +62,7 @@ class TranslationBase {
String get hospitalName => localizedValues['hospitalName'][locale.languageCode];
String get doctorName => localizedValues['doctorName'][locale.languageCode];
String get NoClinicFound => localizedValues['NoClinicFound'][locale.languageCode];
String get nearestAppo => localizedValues['nearestAppo'][locale.languageCode];
@ -1136,6 +1137,7 @@ class TranslationBase {
String get myPrescription => localizedValues['myPrescription'][locale.languageCode];
String get quantity => localizedValues['quantity'][locale.languageCode];
String get productQuantity => localizedValues['productQuantity'][locale.languageCode];
String get conditionsHMG => localizedValues['conditionsHMG'][locale.languageCode];
@ -1483,6 +1485,7 @@ class TranslationBase {
String get enablingWifi => localizedValues['enablingWifi'][locale.languageCode];
String get offerAndPackages => localizedValues['offerAndPackages'][locale.languageCode];
String get orderHistory => localizedValues['orderHistory'][locale.languageCode];
String get offerAndPackagesDetails => localizedValues['offerAndPackagesDetails'][locale.languageCode];
@ -1854,6 +1857,7 @@ class TranslationBase {
String get needPrescription => localizedValues['needPrescription'][locale.languageCode];
String get outOfStockMsg => localizedValues['outOfStockMsg'][locale.languageCode];
String get productOutOfStock => localizedValues['productOutOfStock'][locale.languageCode];
String get noArabicLetters => localizedValues['noArabicLetters'][locale.languageCode];
@ -2816,233 +2820,453 @@ class TranslationBase {
String get submitReview => localizedValues["submitReview"][locale.languageCode];
String get Protein => localizedValues["Protein"][locale.languageCode];
String get Cals => localizedValues["Cals"][locale.languageCode];
String get gramsPerDay => localizedValues["gramsPerDay"][locale.languageCode];
String get gr => localizedValues["gr"][locale.languageCode];
String get gramsPerMeal => localizedValues["gramsPerMeal"][locale.languageCode];
String get cancelReminder => localizedValues["CancelReminder"][locale.languageCode];
String get reminderCancelSuccess => localizedValues["reminderCancelSuccess"][locale.languageCode];
String get syncSuccess => localizedValues["syncSuccess"][locale.languageCode];
String get useLakumPoints => localizedValues["useLakumPoints"][locale.languageCode];
String get points => localizedValues["points"][locale.languageCode];
String get availableBalance => localizedValues["availableBalance"][locale.languageCode];
String get ordersDashboard => localizedValues["ordersDashboard"][locale.languageCode];
String get requestedDateLiveCare => localizedValues["requestedDateLiveCare"][locale.languageCode];
String get yourTurn => localizedValues["yourTurn"][locale.languageCode];
String get patients => localizedValues["patients"][locale.languageCode];
String get group => localizedValues["group"][locale.languageCode];
String get ancillaryOrdersPaymentConfirm => localizedValues["ancillaryOrdersPaymentConfirm"][locale.languageCode];
String get covidTestTodo => localizedValues["covidTestTodo"][locale.languageCode];
String get successRegister => localizedValues["successRegister"][locale.languageCode];
String get pharmacyLiveCare => localizedValues["pharmacyLiveCare"][locale.languageCode];
String get ancillaryOrderPaymentSuccess => localizedValues["ancillaryOrderPaymentSuccess"][locale.languageCode];
String get connectTitle => localizedValues["connectTitle"][locale.languageCode];
String get connectSubtitle => localizedValues["connectSubtitle"][locale.languageCode];
String get declineLbl => localizedValues["declineLbl"][locale.languageCode];
String get covidConsent => localizedValues["covidConsent"][locale.languageCode];
String get covidConsentHeader => localizedValues["covidConsentHeader"][locale.languageCode];
String get drawOverAppsPermission => localizedValues["drawOverAppsPermission"][locale.languageCode];
String get selectTamaraPlan => localizedValues["selectTamaraPlan"][locale.languageCode];
String get installments => localizedValues["installments"][locale.languageCode];
String get cameraPermissionDialog => localizedValues["cameraPermissionDialog"][locale.languageCode];
String get galleryPermission => localizedValues["galleryPermission"][locale.languageCode];
String get locationPermissionDialog => localizedValues["locationPermissionDialog"][locale.languageCode];
String get calendarPermission => localizedValues["calendarPermission"][locale.languageCode];
String get recordAudioPermission => localizedValues["recordAudioPermission"][locale.languageCode];
String get wifiPermission => localizedValues["wifiPermission"][locale.languageCode];
String get physicalActivityPermission => localizedValues["physicalActivityPermission"][locale.languageCode];
String get bluetoothPermission => localizedValues["bluetoothPermission"][locale.languageCode];
String get privacyPolicy => localizedValues["privacyPolicy"][locale.languageCode];
String get termsConditions => localizedValues["termsConditions"][locale.languageCode];
String get liveCarePermissions => localizedValues["liveCarePermissions"][locale.languageCode];
String get prescriptionDeliveryError => localizedValues["prescriptionDeliveryError"][locale.languageCode];
String get lakumUnhold => localizedValues["lakumUnhold"][locale.languageCode];
String get lakumDiscontinue => localizedValues["lakumDiscontinue"][locale.languageCode];
String get lakumSuccess => localizedValues["lakumSuccess"][locale.languageCode];
String get deleteAccount => localizedValues["deleteAccount"][locale.languageCode];
String get deactivateAccount => localizedValues["deactivateAccount"][locale.languageCode];
String get accountDeactivated => localizedValues["accountDeactivated"][locale.languageCode];
String get accountDeactivatedMsg => localizedValues["accountDeactivatedMsg"][locale.languageCode];
String get updateInsuranceManually => localizedValues["updateInsuranceManually"][locale.languageCode];
String get enterInsuranceDetails => localizedValues["enterInsuranceDetails"][locale.languageCode];
String get cardHolderName => localizedValues["cardHolderName"][locale.languageCode];
String get membershipNo => localizedValues["membershipNo"][locale.languageCode];
String get insurancePolicyNo => localizedValues["policyNo"][locale.languageCode];
String get insuranceClassName => localizedValues["insuranceClassName"][locale.languageCode];
String get NFCNotSupported => localizedValues["NFCNotSupported"][locale.languageCode];
String get paymentOnly => localizedValues["paymentOnly"][locale.languageCode];
String get pendingOnly => localizedValues["pendingOnly"][locale.languageCode];
String get insuranceRequestSubmit => localizedValues["insuranceRequestSubmit"][locale.languageCode];
String get enterWorkplaceName => localizedValues["enter-workplace-name"][locale.languageCode];
String get workplaceName => localizedValues["workplaceName"][locale.languageCode];
String get needApproval => localizedValues["needApproval"][locale.languageCode];
String get callLiveCareSupport => localizedValues["callLiveCareSupport"][locale.languageCode];
String get pendingActivation => localizedValues["pendingActivation"][locale.languageCode];
String get awaitingApproval => localizedValues["awaitingApproval"][locale.languageCode];
String get liveCareSupportContact => localizedValues["liveCareSupportContact"][locale.languageCode];
String get scanNFC => localizedValues["scanNFC"][locale.languageCode];
String get pharmaLiveCare => localizedValues["pharmaLiveCare"][locale.languageCode];
String get pharmaLiveCare1 => localizedValues["pharmaLiveCare1"][locale.languageCode];
String get pharmaLiveCareDesc1 => localizedValues["pharmaLiveCareDesc1"][locale.languageCode];
String get wherePharmaLiveCare => localizedValues["wherePharmaLiveCare"][locale.languageCode];
String get pharmaLiveCareDesc2 => localizedValues["pharmaLiveCareDesc2"][locale.languageCode];
String get howPharmaLiveCare => localizedValues["howPharmaLiveCare"][locale.languageCode];
String get pharmaLiveCareDesc3 => localizedValues["pharmaLiveCareDesc3"][locale.languageCode];
String get pharmaLiveCareScanQR => localizedValues["pharmaLiveCareScanQR"][locale.languageCode];
String get pharmaLiveCareScanQR1 => localizedValues["pharmaLiveCareScanQR1"][locale.languageCode];
String get pharmaLiveCareMakePayment => localizedValues["pharmaLiveCareMakePayment"][locale.languageCode];
String get pharmaLiveCareMakePayment1 => localizedValues["pharmaLiveCareMakePayment1"][locale.languageCode];
String get pharmaLiveCareJoinConsultation => localizedValues["pharmaLiveCareJoinConsultation"][locale.languageCode];
String get pharmaLiveCareJoinConsultation1 => localizedValues["pharmaLiveCareJoinConsultation1"][locale.languageCode];
String get emergencyServicesSubtitle => localizedValues["emergencyServicesSubtitle"][locale.languageCode];
String get rateDoctorResponse => localizedValues["rateDoctorResponse"][locale.languageCode];
String get comments => localizedValues["comments"][locale.languageCode];
String get rateDoctorResponseHeading => localizedValues["rateDoctorResponseHeading"][locale.languageCode];
String get updateInsuranceManuallyDialog => localizedValues["updateInsuranceManuallyDialog"][locale.languageCode];
String get viewReport => localizedValues["viewReport"][locale.languageCode];
String get sickLeaveAdmittedPatient => localizedValues["sickLeaveAdmittedPatient"][locale.languageCode];
String get InPatient => localizedValues["InPatient"][locale.languageCode];
String get inPatientServices => localizedValues["InPatientServices"][locale.languageCode];
String get InPatientServicesHeader => localizedValues["InPatientServicesHeader"][locale.languageCode];
String get admissionGeneral => localizedValues["admissionGeneral"][locale.languageCode];
String get consent => localizedValues["consent"][locale.languageCode];
String get generalInstructionsTitle => localizedValues["generalInstructionsTitle"][locale.languageCode];
String get generalInstructionsSubTitle => localizedValues["generalInstructionsSubTitle"][locale.languageCode];
String get medicalInstructionsTitle => localizedValues["medicalInstructionsTitle"][locale.languageCode];
String get medicalInstructionsSubTitle => localizedValues["medicalInstructionsSubTitle"][locale.languageCode];
String get mealPlanTitle => localizedValues["mealPlanTitle"][locale.languageCode];
String get mealPlanSubTitle => localizedValues["mealPlanSubTitle"][locale.languageCode];
String get birthNotificationTitle => localizedValues["birthNotificationTitle"][locale.languageCode];
String get birthNotificationSubTitle => localizedValues["birthNotificationSubTitle"][locale.languageCode];
String get admissionNoticeTitle => localizedValues["admissionNoticeTitle"][locale.languageCode];
String get admissionNoticeSubTitle => localizedValues["admissionNoticeSubTitle"][locale.languageCode];
String get mothersMRN => localizedValues["mothersMRN"][locale.languageCode];
String get mothersName => localizedValues["mothersName"][locale.languageCode];
String get fathersNameEN => localizedValues["fathersNameEN"][locale.languageCode];
String get fathersNameAR => localizedValues["fathersNameAR"][locale.languageCode];
String get babysNameEN => localizedValues["babysNameEN"][locale.languageCode];
String get babysNameAR => localizedValues["babysNameAR"][locale.languageCode];
String get contactNumber => localizedValues["contactNumber"][locale.languageCode];
String get scanID => localizedValues["scanID"][locale.languageCode];
String get birthNotificationNotes1 => localizedValues["birthNotificationNotes1"][locale.languageCode];
String get birthNotificationNotes2 => localizedValues["birthNotificationNotes2"][locale.languageCode];
String get birthNotificationNotes3 => localizedValues["birthNotificationNotes3"][locale.languageCode];
String get placeOrder => localizedValues["placeOrder"][locale.languageCode];
String get isFasting => localizedValues["isFasting"][locale.languageCode];
String get noGeneralInstructions => localizedValues["noGeneralInstructions"][locale.languageCode];
String get noMedicalInstructions => localizedValues["noMedicalInstructions"][locale.languageCode];
String get medicalInstructions => localizedValues["medicalInstructions"][locale.languageCode];
String get generalInstructions => localizedValues["generalInstructions"][locale.languageCode];
String get copyLink => localizedValues["copyLink"][locale.languageCode];
String get copyLinkTxt => localizedValues["copyLinkTxt"][locale.languageCode];
String get paymentLinkCopied => localizedValues["paymentLinkCopied"][locale.languageCode];
String get proErrorMessage => localizedValues["proErrorMessage"][locale.languageCode];
String get admissionNo => localizedValues["admissionNo"][locale.languageCode];
String get admissionReqNo => localizedValues["admissionReqNo"][locale.languageCode];
String get dischargeDate => localizedValues["dischargeDate"][locale.languageCode];
String get selectAdmissionText => localizedValues["selectAdmissionText"][locale.languageCode];
String get onlyAdmitted => localizedValues["onlyAdmitted"][locale.languageCode];
String get assistYou => localizedValues["assistYou"][locale.languageCode];
String get receive => localizedValues["receive"][locale.languageCode];
String get PRO => localizedValues["PRO"][locale.languageCode];
String get patientRelationOffice => localizedValues["patientRelationOffice"][locale.languageCode];
String get roomNo => localizedValues["roomNo"][locale.languageCode];
String get generalConsent => localizedValues["generalConsent"][locale.languageCode];
String get generalConsent1 => localizedValues["generalConsent1"][locale.languageCode];
String get hospitalRules => localizedValues["hospitalRules"][locale.languageCode];
String get generalConsent2 => localizedValues["generalConsent2"][locale.languageCode];
String get communicationConsent => localizedValues["communicationConsent"][locale.languageCode];
String get generalConsent3 => localizedValues["generalConsent3"][locale.languageCode];
String get releaseConsent => localizedValues["releaseConsent"][locale.languageCode];
String get generalConsent4 => localizedValues["generalConsent4"][locale.languageCode];
String get generalConsent5 => localizedValues["generalConsent5"][locale.languageCode];
String get valuables => localizedValues["valuables"][locale.languageCode];
String get generalConsent6 => localizedValues["generalConsent6"][locale.languageCode];
String get financialConsent => localizedValues["financialConsent"][locale.languageCode];
String get generalConsent7 => localizedValues["generalConsent7"][locale.languageCode];
String get dataSharingConsent => localizedValues["dataSharingConsent"][locale.languageCode];
String get generalConsent8 => localizedValues["generalConsent8"][locale.languageCode];
String get permissionLeaveConsent => localizedValues["permissionLeaveConsent"][locale.languageCode];
String get generalConsent9 => localizedValues["generalConsent9"][locale.languageCode];
String get observeConsent => localizedValues["observeConsent"][locale.languageCode];
String get generalConsent10 => localizedValues["generalConsent10"][locale.languageCode];
String get noGuaranteeConsent => localizedValues["noGuaranteeConsent"][locale.languageCode];
String get generalConsent11 => localizedValues["generalConsent11"][locale.languageCode];
String get disputeConsent => localizedValues["disputeConsent"][locale.languageCode];
String get generalConsent12 => localizedValues["generalConsent12"][locale.languageCode];
String get patientsRightsConsent => localizedValues["patientsRightsConsent"][locale.languageCode];
String get generalConsent13 => localizedValues["generalConsent13"][locale.languageCode];
String get acknowledgementConsent => localizedValues["acknowledgementConsent"][locale.languageCode];
String get generalConsent14 => localizedValues["generalConsent14"][locale.languageCode];
String get invalidEligibility => localizedValues["invalidEligibility"][locale.languageCode];
String get invalidInsurance => localizedValues["invalidInsurance"][locale.languageCode];
String get continueCash => localizedValues["continueCash"][locale.languageCode];
String get updateInsuranceText => localizedValues["updateInsurance"][locale.languageCode];
String get downloadReport => localizedValues["downloadReport"][locale.languageCode];
String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode];
String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode];
String get validInsurance => localizedValues["validInsurance"][locale.languageCode];
String get contactRRT => localizedValues["contactRRT"][locale.languageCode];
String get checkInViaLocation => localizedValues["checkInViaLocation"][locale.languageCode];
String get locationCheckInError => localizedValues["locationCheckInError"][locale.languageCode];
String get upcoming => localizedValues["upcoming"][locale.languageCode];
String get noUpcomingAppointment => localizedValues["noUpcomingAppointment"][locale.languageCode];
String get locationTimeoutError => localizedValues["locationTimeoutError"][locale.languageCode];
String get loadMore => localizedValues["loadMore"][locale.languageCode];
String get selectHospitalBloodDonation => localizedValues["selectHospitalBloodDonation"][locale.languageCode];
String get wecare => localizedValues["wecare"][locale.languageCode];
String get myinstructions => localizedValues["myinstructions"][locale.languageCode];
String get clinicLocation => localizedValues["clinicLocation"][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];
String get addToWaitingList => localizedValues["addToWaitingList"][locale.languageCode];
String get searchClinic => localizedValues["searchClinic"][locale.languageCode];
String get enterMobileNumber => localizedValues["enterMobileNumber"][locale.languageCode];
String get videoCall => localizedValues["videoCall"][locale.languageCode];
String get audioCall => localizedValues["audioCall"][locale.languageCode];
String get phoneCall => localizedValues["phoneCall"][locale.languageCode];
String get selectCallType => localizedValues["selectCallType"][locale.languageCode];
String get selectedCallType => localizedValues["selectedCallType"][locale.languageCode];
String get selectBranch => localizedValues["selectBranch"][locale.languageCode];
String get searchByBranch => localizedValues["searchByBranch"][locale.languageCode];
String get existingPackage => localizedValues["existingPackage"][locale.languageCode];
String get continueOrbookNew => localizedValues["continueOrbookNew"][locale.languageCode];
String get newAppointment => localizedValues["newAppointment"][locale.languageCode];
String get proceedPackage => localizedValues["proceedPackage"][locale.languageCode];
String get hospitalNavigationTitle => localizedValues["hospitalNavigationTitle"][locale.languageCode];
String get hospitalNavigationSubtitle => localizedValues["hospitalNavigationSubtitle"][locale.languageCode];
String get workplaceNameAr => localizedValues["workplaceNameAr"][locale.languageCode];
String get occupationNameEn => localizedValues["occupationNameEn"][locale.languageCode];
String get occupationNameAr => localizedValues["occupationNameAr"][locale.languageCode];
String get continueAgreeTerms => localizedValues["continueAgreeTerms"][locale.languageCode];
String get agreeText => localizedValues["agreeText"][locale.languageCode];
String get ERCheckInSuccess => localizedValues["ERCheckInSuccess"][locale.languageCode];
String get generalConsentTitle => localizedValues["generalConsentTitle"][locale.languageCode];
String get generalConsentSubTitle => localizedValues["generalConsentSubTitle"][locale.languageCode];
String get incorrectNationalId => localizedValues["incorrectNationalId"][locale.languageCode];
String get resultStatus => localizedValues["resultStatus"][locale.languageCode];
String get labResultFlag => localizedValues["labResultFlag"][locale.languageCode];
String get selectOccupation => localizedValues["selectOccupation"][locale.languageCode];
String get selectOccupationError => localizedValues["selectOccupationError"][locale.languageCode];
String get whatIsOnlineCheckIn => localizedValues["whatIsOnlineCheckIn"][locale.languageCode];
String get EROnlineCheckInDesc1 => localizedValues["EROnlineCheckInDesc1"][locale.languageCode];
String get EROnlineCheckInHow => localizedValues["EROnlineCheckInHow"][locale.languageCode];
String get EROnlineCheckInTapOn => localizedValues["EROnlineCheckInTapOn"][locale.languageCode];
String get EROnlineCheckInTapOnCheckIn => localizedValues["EROnlineCheckInTapOnCheckIn"][locale.languageCode];
String get EROnlineCheckInHoldPhone => localizedValues["EROnlineCheckInHoldPhone"][locale.languageCode];
String get EROnlineCheckInHoldPhoneInstruction => localizedValues["EROnlineCheckInHoldPhoneInstruction"][locale.languageCode];
String get EROnlineCheckInWaitTurn => localizedValues["EROnlineCheckInWaitTurn"][locale.languageCode];
String get EROnlineCheckInWaitTurnInstruction => localizedValues["EROnlineCheckInWaitTurnInstruction"][locale.languageCode];
String get download => localizedValues["download"][locale.languageCode];
String get share => localizedValues["share"][locale.languageCode];
String get hmgHospital => localizedValues["hmgHospital"][locale.languageCode];
String get hmcHospital => localizedValues["hmcHospital"][locale.languageCode];

@ -41,6 +41,7 @@ import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.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/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
@ -824,18 +825,25 @@ class Utils {
);
}
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, bool isHighLow = false, required ProjectViewModel mProjectViewModel}) {
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, bool isHighLow = false, bool isCurrency = false, required ProjectViewModel mProjectViewModel}) {
ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 12),
Text(
isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: isHighLow ? CustomColors.accentColor : Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
Row(
children: [
Expanded(
child: Text(
isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: isHighLow ? CustomColors.accentColor : Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
),
isCurrency ? getSaudiRiyalSymbol() : Container(),
],
),
SizedBox(height: 12),
if (!isLast)
@ -963,6 +971,10 @@ class Utils {
return projectDetailListModel;
}
static Widget getSaudiRiyalSymbol({double fontSize = 16}) {
return Text(" SAR ", style: TextStyle(fontFamily: "SaudiRiyal", fontSize: fontSize));
}
//static String generateSignature() {}
}
@ -1032,6 +1044,26 @@ extension StringExtension on String {
}
}
extension TextToRichTextWithIcon on Text {
RichText toRichTextWithIcon() {
// Create the base TextSpan with the text data and style from the Text widget
return RichText(
text: TextSpan(
style: this.style, // Inherit the text style
children: [
WidgetSpan(
child: Text(" SAR ", style: TextStyle(fontFamily: "SaudiRiyal")),
),
TextSpan(
text: this.data, // Add the original text
style: this.style, // Inherit the text style
),
],
),
);
}
}
/*
userBoard.asMap().map((i, element) => MapEntry(i, Stack(
GestureDetector(onTap: () {

@ -20,13 +20,15 @@ class BottomNavigationItem extends StatelessWidget {
final String? name;
final bool? isDisabled;
late ToDoCountProviderModel toDoProvider;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
BottomNavigationItem({this.icon, this.activeIcon, this.changeIndex, this.index, this.currentIndex, this.name, this.isDisabled = false});
@override
Widget build(BuildContext context) {
var model = Provider.of<ToDoCountProviderModel>(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
ProjectViewModel projectViewModel = Provider.of(context);
return Expanded(
child: SizedBox(
@ -72,7 +74,7 @@ class BottomNavigationItem extends StatelessWidget {
),
],
)
: (authenticatedUserObject.isLogin && model.isShowBadge)
: (authenticatedUserObject.isLogin && toDoProvider.isShowBadge)
? Stack(
alignment: AlignmentDirectional.center,
children: [
@ -120,7 +122,7 @@ class BottomNavigationItem extends StatelessWidget {
// borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text((model.count! + model.ancillaryCount!).toString(), style: TextStyle(color: Colors.white, fontSize: 14.0)),
child: Text((toDoProvider.count! + toDoProvider.ancillaryCount!).toString(), style: TextStyle(color: Colors.white, fontSize: 14.0)),
),
),
),

@ -67,6 +67,10 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
widget.patientLabOrder!.actualDoctorRate!,
widget.patientLabOrder!.noOfPatientsRate!,
projectViewModel.user.emailAddress!),
buttonTitle: TranslationBase.of(context).download,
buttonIcon: "assets/images/new/download_1.svg",
showConfirmMessageDialog: false,
isDownload: true,
onTap: widget.onTap!,
),
SizedBox(height: 10),

@ -15,6 +15,8 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart';
import 'package:diplomaticquarterapp/pages/Blood/user_agreement_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notifications_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
@ -700,6 +702,42 @@ class _AppDrawerState extends State<AppDrawer> {
});
}
checkIfIsInPatient(BuildContext context) {
bool isAdmitted = false;
bool hasAdmissionRequest = false;
GetAdmissionInfoResponseModel getAdmissionInfoResponseModel;
GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel;
ClinicListService service = new ClinicListService();
service.checkIfInPatientAPI(context).then((res) {
if (res['MessageStatus'] == 1) {
isAdmitted = res['isAdmitted'];
hasAdmissionRequest = res['hasAdmissionRequests'];
print("IS ADMITTED: $isAdmitted");
print("Has Admission Request: $hasAdmissionRequest");
if (isAdmitted) {
if (res['PatientAdmittedInformation'].length != 0) {
getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]);
projectProvider?.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']);
projectProvider?.setInPatientAdmissionInfo(getAdmissionInfoResponseModel);
projectProvider?.setIsPatientAdmitted(true);
}
}
if (hasAdmissionRequest) {
if (res['MedicalInstruction'].length != 0) {
getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]);
// projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']);
projectProvider?.setInPatientProjectID(res['MedicalInstruction'][0]['projectId']);
projectProvider?.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel);
projectProvider?.setPatientHasAdmissionRequest(true);
}
}
} else {}
}).catchError((err) {
projectProvider?.setIsPatientAdmitted(false);
projectProvider?.setPatientHasAdmissionRequest(false);
});
}
loginAfter(result, context, isMainUser) async {
Utils.hideProgressDialog();
String APNSToken = "";
@ -741,6 +779,8 @@ class _AppDrawerState extends State<AppDrawer> {
await this.sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL);
checkIfIsInPatient(context);
appointmentRateViewModel
.getIsLastAppointmentRatedList(languageID)
.then((value) => {

@ -25,6 +25,7 @@ class DoctorHeader extends StatelessWidget {
final String? buttonIcon;
final bool isNeedToShowButton;
final bool isShowName;
final bool isDownload;
DoctorHeader(
{Key? key,
@ -35,6 +36,7 @@ class DoctorHeader extends StatelessWidget {
this.isShowName = false,
this.buttonIcon,
this.showConfirmMessageDialog = true,
this.isDownload = false,
this.onRatingAndReviewTap})
: super(key: key);
@ -107,7 +109,9 @@ class DoctorHeader extends StatelessWidget {
if (headerModel.nationalityFlagURL != null)
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: headerModel.nationalityFlagURL.isNotEmpty && headerModel.nationalityFlagURL != null && headerModel.nationalityFlagURL != 'null'? Image.network(headerModel.nationalityFlagURL, height: 20) : SizedBox(),
child: headerModel.nationalityFlagURL.isNotEmpty && headerModel.nationalityFlagURL != null && headerModel.nationalityFlagURL != 'null'
? Image.network(headerModel.nationalityFlagURL, height: 20)
: SizedBox(),
),
],
)
@ -178,7 +182,8 @@ class DoctorHeader extends StatelessWidget {
child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 15, left: 15),
decoration: BoxDecoration(
color: Color(0XFFD02127), borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : BorderRadius.only(topLeft: Radius.circular(10))),
color: isDownload ? CustomColors.green : CustomColors.accentColor,
borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : BorderRadius.only(topLeft: Radius.circular(10))),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.6.080+4050080
version: 4.6.085+4050085
environment:
sdk: ">=3.0.0 <3.13.0"
@ -60,7 +60,9 @@ dependencies:
local_auth: ^2.1.7
localstorage: ^4.0.0+1
maps_launcher: ^2.0.1
url_launcher: ^6.0.15
# url_launcher: ^6.0.15
url_launcher: ^6.3.1
url_launcher_ios: ^6.3.2
shared_preferences: ^2.0.0
# flutter_flexible_toast: ^0.1.4
fluttertoast: ^8.0.8
@ -97,7 +99,7 @@ dependencies:
# Qr code Scanner TODO fix it
location: ^5.0.3
barcode_scan2: ^4.2.2
barcode_scan2: 4.3.2
# Rating Stars
flutter_rating_bar: ^4.0.1
@ -187,6 +189,7 @@ dependencies:
firebase_crashlytics: ^3.0.0
cloudflare_turnstile: ^2.0.1
device_info_plus: ^10.1.2
# vital_sign_camera:
# path: ./packages/vital_sign_camera
@ -278,6 +281,11 @@ flutter:
fonts:
- asset: assets/app_icons/fonts/DQIcons.ttf
- family: SaudiRiyal
fonts:
# - asset: assets/fonts/saudi_riyal.ttf
- asset: assets/fonts/sar-Regular.otf
- family: Poppins
fonts:
- asset: assets/fonts/poppins/Poppins-Black.ttf

Loading…
Cancel
Save