pull/62/head
haroon amjad 1 month ago
parent f7e26da6f4
commit a07369165d

@ -0,0 +1,3 @@
<svg width="30" height="26" viewBox="0 0 30 26" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.7787 1.62383C17.9327 0.00618458 21.4984 -0.965477 25.473 1.47256C28.2213 3.15838 29.7678 6.67982 29.2251 10.7258C28.6799 14.7914 26.0484 19.3896 20.4756 23.5144L20.3369 23.6171C18.4017 25.0503 17.1201 25.9994 15.0001 25.9994C12.88 25.9994 11.5984 25.0503 9.66323 23.6171L9.5245 23.5144C3.95169 19.3896 1.32025 14.7914 0.77498 10.7258C0.232334 6.67982 1.77878 3.15838 4.5271 1.47256C8.50173 -0.965478 12.0674 0.00618442 14.2214 1.62383C14.5758 1.88996 14.819 2.07209 15.0001 2.19508C15.1811 2.07209 15.4243 1.88996 15.7787 1.62383ZM15.2118 2.3251C15.2117 2.3251 15.2108 2.32473 15.209 2.32395L15.2072 2.32309C15.2104 2.32437 15.2119 2.32511 15.2118 2.3251ZM14.7929 2.32309C14.7875 2.32524 14.7868 2.32588 14.7911 2.32395L14.7929 2.32309ZM24.4273 3.17739C21.2508 1.22896 18.5751 2.02499 16.9797 3.22308L16.9519 3.24398C16.5914 3.51473 16.2816 3.74735 16.0339 3.90952C15.9052 3.99381 15.7626 4.07964 15.6146 4.1465C15.4742 4.20996 15.2585 4.28934 15.0001 4.28934C14.7416 4.28934 14.5259 4.20996 14.3855 4.1465C14.2375 4.07964 14.0949 3.99381 13.9662 3.90952C13.7185 3.74736 13.4089 3.51481 13.0484 3.24407L13.0204 3.22308C11.4251 2.02499 8.74927 1.22896 5.57284 3.17739C3.62867 4.36994 2.29796 7.03563 2.75723 10.46C2.76742 10.536 2.7785 10.6123 2.79049 10.689C2.85811 10.6746 2.92826 10.667 3.00018 10.667L5.7991 10.6669C6.42367 10.666 6.97406 10.6652 7.47333 10.8468C8.17556 11.1023 8.66627 11.6989 8.95799 12.0536C8.982 12.0828 9.00493 12.1106 9.02624 12.1362C9.04161 12.1547 9.05631 12.1736 9.07032 12.1932L10.2586 13.8481L13.476 8.48583C13.6606 8.17823 13.9958 7.99305 14.3544 8.00054C14.7131 8.00804 15.0402 8.20707 15.2118 8.52212L17.452 12.6363C17.7498 13.112 17.7869 13.1449 17.8184 13.1691C17.9144 13.2428 18.0296 13.289 18.2138 13.3136C18.3868 13.3367 18.5557 13.3358 18.7968 13.3344C18.8593 13.334 18.9267 13.3337 19.0002 13.3337H20.3335C20.8858 13.3337 21.3335 13.7814 21.3335 14.3337C21.3335 14.8859 20.8858 15.3337 20.3335 15.3337H19.0002C18.9535 15.3337 18.9012 15.3345 18.8442 15.3355C18.3195 15.3445 17.388 15.3603 16.6002 14.7552C16.2445 14.4821 16.0142 14.1116 15.7919 13.7542L15.7402 13.6711C15.7296 13.6541 15.7195 13.6369 15.7099 13.6193L14.2914 11.0141L11.191 16.1815C11.0178 16.4701 10.711 16.6523 10.3747 16.6661C10.0383 16.68 9.71756 16.5237 9.52122 16.2502L7.46691 13.3891C7.08115 12.9274 6.93061 12.7776 6.78959 12.7263C6.66628 12.6815 6.50179 12.667 5.66685 12.667H3.28376C4.27649 15.5775 6.55282 18.8266 10.7144 21.9068C12.8239 23.4682 13.5939 23.9994 15.0001 23.9994C16.4062 23.9994 17.1762 23.4682 19.2858 21.9068C24.5367 18.0202 26.7862 13.8648 27.2429 10.46C27.7021 7.03563 26.3714 4.36994 24.4273 3.17739Z" fill="#ED1C2B"/>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -0,0 +1,3 @@
<svg width="26" height="28" viewBox="0 0 26 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.666748 8.66634C0.666748 12.9303 3.86919 16.4463 8.00008 16.9403V20.333C8.00008 24.3831 11.2833 27.6663 15.3334 27.6663C19.3835 27.6663 22.6667 24.3831 22.6667 20.333V19.5283C24.2058 19.093 25.3334 17.678 25.3334 15.9997C25.3334 13.9746 23.6918 12.333 21.6667 12.333C19.6417 12.333 18.0001 13.9746 18.0001 15.9997C18.0001 17.678 19.1277 19.093 20.6667 19.5283V20.333C20.6667 23.2785 18.2789 25.6663 15.3334 25.6663C12.3879 25.6663 10.0001 23.2785 10.0001 20.333V16.9403C14.131 16.4463 17.3334 12.9303 17.3334 8.66634V3.99967C17.3334 2.71101 16.2887 1.66634 15.0001 1.66634H13.3334V1.33301C13.3334 0.780724 12.8857 0.333008 12.3334 0.333008C11.7811 0.333008 11.3334 0.780724 11.3334 1.33301V3.99967C11.3334 4.55196 11.7811 4.99967 12.3334 4.99967C12.8857 4.99967 13.3334 4.55196 13.3334 3.99967V3.66634H15.0001C15.1842 3.66634 15.3334 3.81558 15.3334 3.99967V8.66634C15.3334 12.1641 12.4979 14.9997 9.00008 14.9997C5.50228 14.9997 2.66675 12.1641 2.66675 8.66634V3.99967C2.66675 3.81558 2.81599 3.66634 3.00008 3.66634H4.66675V3.99967C4.66675 4.55196 5.11446 4.99967 5.66675 4.99967C6.21903 4.99967 6.66675 4.55196 6.66675 3.99967V1.33301C6.66675 0.780724 6.21903 0.333008 5.66675 0.333008C5.11446 0.333008 4.66675 0.780724 4.66675 1.33301V1.66634H3.00008C1.71142 1.66634 0.666748 2.71101 0.666748 3.99967V8.66634ZM21.6667 17.6663C20.7463 17.6663 20.0001 16.9202 20.0001 15.9997C20.0001 15.0792 20.7463 14.333 21.6667 14.333C22.5872 14.333 23.3334 15.0792 23.3334 15.9997C23.3334 16.9202 22.5872 17.6663 21.6667 17.6663Z" fill="#ED1C2B"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -1,8 +1,5 @@
<svg data-name="Group 8404" height="26" id="Group_8404" viewBox="0 0 26 26" <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
width="26" xmlns="http://www.w3.org/2000/svg"> <rect width="14" height="14" rx="3" fill="#0B85F7"/>
<rect data-name="Rectangle 17531" fill="#69a6e2" height="26" id="Rectangle_17531" rx="4" <path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
width="26" /> <path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
<path d="M2.914,17.807s.731-.005,1.246-.005l3.9.019c.466,0,.854-.488.876-1.193l0-3.213c0-.685.311-1.221.793-1.252l1.2-.009c.483.029.814.572.814,1.253l0,3.231c.021.7.346,1.165.814,1.165l5.254.014.01-3.971c0-.683-.333-1.214-.82-1.245l-2.11-.01c-.467,0-.834-.486-.854-1.191l-.008-1.074c.023-.7.392-1.189.86-1.189l2.122.006c.482-.031.8-.592.8-1.274l.005-4.957a2.126,2.126,0,0,1-.693.69,2.164,2.164,0,0,1-.933.312l-3.569,0c-.465,0-.854.5-.876,1.2V8.295c-.022.7-.387,1.2-.854,1.2l-1.08-.008c-.468,0-.842-.482-.864-1.183l0-3.218c-.021-.705-.392-1.178-.859-1.178l-5.179,0V7.87c0,.684.324,1.231.808,1.263l2.122-.009c.48.031.82.595.82,1.275l-.007.916c0,.683-.328,1.23-.81,1.261l-2.126-.005c-.484.034-.808.572-.808,1.256Z" data-name="Path 5276"
fill="#fff"
id="Path_5276" transform="translate(2.327 2.327)" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -1,8 +1,5 @@
<svg data-name="Group 8404" height="26" id="Group_8404" viewBox="0 0 26 26" <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
width="26" xmlns="http://www.w3.org/2000/svg"> <rect width="14" height="14" rx="3" fill="#ED1C2B"/>
<rect data-name="Rectangle 17531" fill="#cc2229" height="26" id="Rectangle_17531" rx="4" <path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
width="26" /> <path d="M2.54806 11.4469C2.54806 11.4469 2.98492 11.4437 3.29241 11.4437L5.6242 11.455C5.90252 11.455 6.13431 11.1634 6.14737 10.7422L6.15002 8.82227C6.15002 8.41291 6.3357 8.09262 6.6236 8.07432L7.33877 8.06869C7.62708 8.08618 7.825 8.4105 7.825 8.81725L7.82316 10.7474C7.83581 11.1685 8.03006 11.4433 8.30981 11.4433L11.4488 11.4518L11.4545 9.07923C11.4545 8.67107 11.2554 8.354 10.9648 8.3353L9.70382 8.32907C9.4249 8.32907 9.20555 8.03893 9.19372 7.6173L9.18882 6.97551C9.20269 6.55449 9.42326 6.26496 9.7028 6.26496L10.9707 6.26858C11.2588 6.25028 11.4465 5.91511 11.4465 5.50755L11.4496 2.5459C11.346 2.71309 11.2043 2.85421 11.0357 2.95807C10.8671 3.06193 10.6763 3.12568 10.4784 3.14426L8.34613 3.14245C8.06843 3.14245 7.83602 3.44083 7.82296 3.86185L7.82296 5.76371C7.8099 6.18393 7.59178 6.4813 7.31285 6.4813L6.66767 6.47647C6.38793 6.47647 6.1643 6.18875 6.15165 5.76974L6.15328 3.84698C6.14063 3.42575 5.91904 3.14326 5.63991 3.14326L2.54562 3.14466L2.54562 5.50997C2.54562 5.91853 2.73925 6.24565 3.02817 6.26455L4.29609 6.25933C4.58277 6.27782 4.78579 6.61481 4.78579 7.02115L4.78192 7.56865C4.78192 7.97701 4.58604 8.30373 4.29793 8.32223L3.02797 8.31921C2.73905 8.33932 2.54541 8.66102 2.54541 9.06938L2.54806 11.4469Z" fill="white"/>
<path d="M2.914,17.807s.731-.005,1.246-.005l3.9.019c.466,0,.854-.488.876-1.193l0-3.213c0-.685.311-1.221.793-1.252l1.2-.009c.483.029.814.572.814,1.253l0,3.231c.021.7.346,1.165.814,1.165l5.254.014.01-3.971c0-.683-.333-1.214-.82-1.245l-2.11-.01c-.467,0-.834-.486-.854-1.191l-.008-1.074c.023-.7.392-1.189.86-1.189l2.122.006c.482-.031.8-.592.8-1.274l.005-4.957a2.126,2.126,0,0,1-.693.69,2.164,2.164,0,0,1-.933.312l-3.569,0c-.465,0-.854.5-.876,1.2V8.295c-.022.7-.387,1.2-.854,1.2l-1.08-.008c-.468,0-.842-.482-.864-1.183l0-3.218c-.021-.705-.392-1.178-.859-1.178l-5.179,0V7.87c0,.684.324,1.231.808,1.263l2.122-.009c.48.031.82.595.82,1.275l-.007.916c0,.683-.328,1.23-.81,1.261l-2.126-.005c-.484.034-.808.572-.808,1.256Z" data-name="Path 5276"
fill="#fff"
id="Path_5276" transform="translate(2.327 2.327)" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -176,8 +176,8 @@ class ApiClientImp implements ApiClient {
body[_appState.isAuthenticated ? 'TokenID' : 'LogInTokenID'] = _appState.appAuthToken; body[_appState.isAuthenticated ? 'TokenID' : 'LogInTokenID'] = _appState.appAuthToken;
} }
body['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
body['PatientID'] = 4767477; // body['PatientID'] = 4767477;
} }
body.removeWhere((key, value) => value == null); body.removeWhere((key, value) => value == null);

@ -727,7 +727,7 @@ const FAMILY_FILES= 'Services/Authentication.svc/REST/GetAllSharedRecordsByStatu
class ApiConsts { class ApiConsts {
static const maxSmallScreen = 660; static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat; static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -135,6 +135,8 @@ class AppAssets {
static const String visa_mastercard_icon = '$svgBasePath/visa_mastercard.svg'; static const String visa_mastercard_icon = '$svgBasePath/visa_mastercard.svg';
static const String small_livecare_icon = '$svgBasePath/small_livecare_icon.svg'; static const String small_livecare_icon = '$svgBasePath/small_livecare_icon.svg';
static const String walkin_appointment_icon = '$svgBasePath/walkin_appointment_icon.svg'; static const String walkin_appointment_icon = '$svgBasePath/walkin_appointment_icon.svg';
static const String cardiology_clinic_icon = '$svgBasePath/cardiology_clinic_icon.svg';
static const String generic_clinic_icon = '$svgBasePath/generic_clinic_icon.svg';
//bottom navigation// //bottom navigation//
static const String homeBottom = '$svgBasePath/home_bottom.svg'; static const String homeBottom = '$svgBasePath/home_bottom.svg';

@ -2,11 +2,12 @@ import 'dart:math';
import 'package:hmg_patient_app_new/core/cache_consts.dart' show CacheConst; import 'package:hmg_patient_app_new/core/cache_consts.dart' show CacheConst;
import 'package:hmg_patient_app_new/core/utils/utils.dart' show Utils; import 'package:hmg_patient_app_new/core/utils/utils.dart' show Utils;
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/doctors_list_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/doctor_list_api_response.dart' show RegionList, PatientDoctorAppointmentList, DoctorList, PatientDoctorAppointmentListByRegion; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/doctor_list_api_response.dart' show RegionList, PatientDoctorAppointmentList, DoctorList, PatientDoctorAppointmentListByRegion;
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/hospital_model.dart' show HospitalsModel; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/hospital_model.dart' show HospitalsModel;
class DoctorMapper{ class DoctorMapper{
static Future<RegionList> getMappedDoctor(List<DoctorList> doctorList, static Future<RegionList> getMappedDoctor(List<DoctorsListResponseModel> doctorList,
{bool isArabic = false,double lat = 0.0,double long = 0.0}) async { {bool isArabic = false,double lat = 0.0,double long = 0.0}) async {
RegionList regionList = RegionList(); RegionList regionList = RegionList();
@ -41,16 +42,16 @@ class DoctorMapper{
isHMC: element.isHMC isHMC: element.isHMC
); );
if(element.projectDistanceInKiloMeters!= null ){ if(element.projectDistanceInKiloMeters!= null ){
if(regionDoctorList!.distance>element.projectDistanceInKiloMeters){ if(regionDoctorList!.distance>element.projectDistanceInKiloMeters!){
regionDoctorList.distance = element.projectDistanceInKiloMeters; regionDoctorList.distance = element.projectDistanceInKiloMeters!;
} }
if (element.isHMC == true && if (element.isHMC == true &&
element.projectDistanceInKiloMeters < element.projectDistanceInKiloMeters! <
regionDoctorList.hmcDistance) { regionDoctorList.hmcDistance) {
regionDoctorList.hmcDistance = element.projectDistanceInKiloMeters; regionDoctorList.hmcDistance = element.projectDistanceInKiloMeters!;
} else if (element.projectDistanceInKiloMeters < } else if (element.projectDistanceInKiloMeters! <
regionDoctorList.hmgDistance) { regionDoctorList.hmgDistance) {
regionDoctorList.hmgDistance = element.projectDistanceInKiloMeters; regionDoctorList.hmgDistance = element.projectDistanceInKiloMeters!;
} }
}else }else
if (lat != 0&& if (lat != 0&&
@ -65,12 +66,12 @@ class DoctorMapper{
regionDoctorList.distance = distance; regionDoctorList.distance = distance;
} }
if (element.isHMC == true && if (element.isHMC == true &&
element.projectDistanceInKiloMeters < (element.projectDistanceInKiloMeters??0) <
regionDoctorList.hmcDistance) { regionDoctorList.hmcDistance) {
regionDoctorList.hmcDistance = element.projectDistanceInKiloMeters; regionDoctorList.hmcDistance = element.projectDistanceInKiloMeters??0;
} else if (element.projectDistanceInKiloMeters < } else if ((element.projectDistanceInKiloMeters??0) <
regionDoctorList.hmgDistance) { regionDoctorList.hmgDistance) {
regionDoctorList.hmgDistance = element.projectDistanceInKiloMeters; regionDoctorList.hmgDistance = element.projectDistanceInKiloMeters??0;
} }
} }
targetList?.add(newAppointment); targetList?.add(newAppointment);

@ -113,6 +113,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
isDoctorsListLoading = true; isDoctorsListLoading = true;
isDoctorProfileLoading = true; isDoctorProfileLoading = true;
isLiveCareSchedule = false; isLiveCareSchedule = false;
currentlySelectedHospitalFromRegionFlow = null;
clinicsList.clear(); clinicsList.clear();
doctorsList.clear(); doctorsList.clear();
liveCareClinicsList.clear(); liveCareClinicsList.clear();
@ -289,6 +290,42 @@ class BookAppointmentsViewModel extends ChangeNotifier {
); );
} }
Future<void> getMappedDoctors(
{int projectID = 0, bool isNearest = false, int doctorId = 0, String doctorName = "", isContinueDentalPlan = false, Function(dynamic)? onSuccess, Function(String)? onError}) async {
filteredHospitalList = null;
hospitalList = null;
isRegionListLoading = true;
notifyListeners();
projectID = currentlySelectedHospitalFromRegionFlow != null ? int.parse(currentlySelectedHospitalFromRegionFlow!) : projectID;
final result = await bookAppointmentsRepo.getDoctorsList(selectedClinic.clinicID ?? 0, projectID, isNearest, doctorId, doctorName);
result.fold(
(failure) async {
onError!("No doctors found for the search criteria".needTranslation);
},
(apiResponse) async {
if (apiResponse.messageStatus == 2) {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) {
var doctorList = apiResponse.data!;
hospitalList = await DoctorMapper.getMappedDoctor(
doctorList,
isArabic: _appState.isArabic(),
lat: _appState.userLat,
long: _appState.userLong,
);
var isLocationEnabled = (_appState.userLat != 0) && (_appState.userLong != 0);
hospitalList = await DoctorMapper.sortList(isLocationEnabled, hospitalList!);
isRegionListLoading = false;
filteredHospitalList = hospitalList;
notifyListeners();
}
},
);
}
Future<void> getDoctorProfile({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getDoctorProfile({Function(dynamic)? onSuccess, Function(String)? onError}) async {
final result = await bookAppointmentsRepo.getDoctorProfile(selectedDoctor.clinicID ?? 0, selectedDoctor.projectID ?? 0, selectedDoctor.doctorID ?? 0, onError: onError); final result = await bookAppointmentsRepo.getDoctorProfile(selectedDoctor.clinicID ?? 0, selectedDoctor.projectID ?? 0, selectedDoctor.doctorID ?? 0, onError: onError);

@ -59,6 +59,13 @@ class DoctorsListResponseModel {
int? virtualEmploymentType; int? virtualEmploymentType;
dynamic workingHours; dynamic workingHours;
dynamic vida3Id; dynamic vida3Id;
String? region;
String? regionArabic;
String? regionEnglish;
String? regionID;
String? projectBottomName;
String? projectTopName;
DoctorsListResponseModel( DoctorsListResponseModel(
{this.clinicID, {this.clinicID,
@ -120,7 +127,13 @@ class DoctorsListResponseModel {
this.transactionType, this.transactionType,
this.virtualEmploymentType, this.virtualEmploymentType,
this.workingHours, this.workingHours,
this.vida3Id}); this.vida3Id,
this.region,
this.regionArabic,
this.regionEnglish,
this.regionID,
this.projectBottomName,
this.projectTopName,});
DoctorsListResponseModel.fromJson(Map<String, dynamic> json) { DoctorsListResponseModel.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
@ -183,6 +196,10 @@ class DoctorsListResponseModel {
virtualEmploymentType = json['VirtualEmploymentType']; virtualEmploymentType = json['VirtualEmploymentType'];
workingHours = json['WorkingHours']; workingHours = json['WorkingHours'];
vida3Id = json['vida3Id']; vida3Id = json['vida3Id'];
regionArabic = json['RegionNameN'];
regionEnglish = json['RegionName'];
projectBottomName = json['ProjectNameBottom'];
projectTopName = json['ProjectNameTop'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -249,4 +266,21 @@ class DoctorsListResponseModel {
data['vida3Id'] = this.vida3Id; data['vida3Id'] = this.vida3Id;
return data; return data;
} }
String? getRegionName(bool isArabic) {
if (isArabic) {
return regionArabic;
}
return regionEnglish;
}
String getProjectCompleteName(){
return "${this.projectTopName} ${this.projectBottomName}";
}
String getProjectCompleteNameWithLocale({bool isArabic = false}) {
if (isArabic) {
return "${this.projectBottomName} ${this.projectTopName}";
}
return "${this.projectTopName} ${this.projectBottomName}";
}
} }

@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart' show ChangeNotifier;
import 'package:hmg_patient_app_new/core/app_state.dart' show AppState; import 'package:hmg_patient_app_new/core/app_state.dart' show AppState;
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/doctor_list_api_response.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/doctor_list_api_response.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/select_clinic_page.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/select_clinic_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/select_doctor_page.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart'; import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart'; import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
@ -14,6 +15,11 @@ enum AppointmentViaRegionState {
DOCTOR_SELECTION DOCTOR_SELECTION
} }
enum RegionBottomSheetType{
FOR_REGION,
FOR_CLINIIC
}
class AppointmentViaRegionViewmodel extends ChangeNotifier { class AppointmentViaRegionViewmodel extends ChangeNotifier {
String? selectedRegionId; String? selectedRegionId;
String? selectedFacilityType; String? selectedFacilityType;
@ -23,6 +29,8 @@ class AppointmentViaRegionViewmodel extends ChangeNotifier {
AppointmentViaRegionState.REGION_SELECTION; AppointmentViaRegionState.REGION_SELECTION;
final AppState appState; final AppState appState;
RegionBottomSheetType regionBottomSheetType = RegionBottomSheetType.FOR_REGION;
AppointmentViaRegionViewmodel({required this.navigationService,required this.appState}); AppointmentViaRegionViewmodel({required this.navigationService,required this.appState});
void setSelectedRegionId(String? regionId) { void setSelectedRegionId(String? regionId) {
@ -35,12 +43,17 @@ class AppointmentViaRegionViewmodel extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
void setBottomSheetType(RegionBottomSheetType type) {
regionBottomSheetType = type;
notifyListeners();
}
void setBottomSheetState(AppointmentViaRegionState state) { void setBottomSheetState(AppointmentViaRegionState state) {
bottomSheetState = state; bottomSheetState = state;
notifyListeners(); notifyListeners();
} }
void handleLastStep(){ void handleLastStepForRegion(){
navigationService.pop(); navigationService.pop();
navigationService.push(CustomPageRoute( navigationService.push(CustomPageRoute(
page: SelectClinicPage(), page: SelectClinicPage(),
@ -65,6 +78,7 @@ class AppointmentViaRegionViewmodel extends ChangeNotifier {
void flush() { void flush() {
setSelectedRegionId(null); setSelectedRegionId(null);
setFacility(null); setFacility(null);
setBottomSheetType(RegionBottomSheetType.FOR_REGION);
setBottomSheetState(AppointmentViaRegionState.REGION_SELECTION); setBottomSheetState(AppointmentViaRegionState.REGION_SELECTION);
} }
@ -73,4 +87,11 @@ class AppointmentViaRegionViewmodel extends ChangeNotifier {
} }
bool get isArabic => appState.isArabic(); bool get isArabic => appState.isArabic();
void handleLastStepForClinic() {
navigationService.pop();
navigationService.push(CustomPageRoute(
page: SelectDoctorPage(),
),);
}
} }

@ -1,4 +1,5 @@
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/doctors_list_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/hospital_model.dart' show HospitalsModel; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/hospital_model.dart' show HospitalsModel;
class DoctorList { class DoctorList {
@ -236,7 +237,7 @@ class DoctorList {
class PatientDoctorAppointmentList { class PatientDoctorAppointmentList {
String? filterName = ""; String? filterName = "";
String? distanceInKMs = ""; String? distanceInKMs = "";
List<DoctorList>? patientDoctorAppointmentList = []; List<DoctorsListResponseModel>? patientDoctorAppointmentList = [];
String? projectTopName = ""; String? projectTopName = "";
String? projectBottomName = ""; String? projectBottomName = "";
bool? isHMC; bool? isHMC;
@ -247,7 +248,7 @@ class PatientDoctorAppointmentList {
this.distanceInKMs, this.distanceInKMs,
this.projectTopName, this.projectTopName,
this.projectBottomName, this.projectBottomName,
DoctorList? patientDoctorAppointment, DoctorsListResponseModel? patientDoctorAppointment,
HospitalsModel? model, HospitalsModel? model,
this.isHMC = false}) { this.isHMC = false}) {
if (model != null) { if (model != null) {

@ -139,16 +139,16 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
? "Not Confirmed".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500) ? "Not Confirmed".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500)
: "Confirmed".needTranslation.toText12(color: AppColors.successColor, fontWeight: FontWeight.w500)), : "Confirmed".needTranslation.toText12(color: AppColors.successColor, fontWeight: FontWeight.w500)),
SizedBox(height: 16.h), SizedBox(height: 16.h),
//TODO Add countdown timer in case of LiveCare Appointment
widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false
? Row( ? Row(
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 58.h, height: 58.h), Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 40.h, height: 40.h),
SizedBox(width: 18.h), SizedBox(width: 12.h),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"LiveCare Appointment".toText18(color: AppColors.textColor, isBold: true),
"The doctor will call you once the appointment time approaches." "The doctor will call you once the appointment time approaches."
.needTranslation .needTranslation
.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), .toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),

@ -96,8 +96,15 @@ class HospitalBottomSheetBody extends StatelessWidget {
isLocationEnabled: appointmentsViewModel.isLocationEnabled(), isLocationEnabled: appointmentsViewModel.isLocationEnabled(),
).onPress(() { ).onPress(() {
regionalViewModel.setHospitalModel(hospital); regionalViewModel.setHospitalModel(hospital);
if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_REGION) {
regionalViewModel.setBottomSheetState(AppointmentViaRegionState.CLINIC_SELECTION); regionalViewModel.setBottomSheetState(AppointmentViaRegionState.CLINIC_SELECTION);
regionalViewModel.handleLastStep(); regionalViewModel.handleLastStepForRegion();
}else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_CLINIIC) {
regionalViewModel.setBottomSheetState(AppointmentViaRegionState.DOCTOR_SELECTION);
regionalViewModel.handleLastStepForClinic();
}
});}, });},
separatorBuilder: (_, __) => SizedBox( separatorBuilder: (_, __) => SizedBox(
height: 16.h, height: 16.h,

@ -6,14 +6,11 @@ import 'package:hmg_patient_app_new/core/utils/utils.dart' show Utils;
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart' import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart' show MyAppointmentsViewModel;
show MyAppointmentsViewModel; import 'package:hmg_patient_app_new/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart' show RegionListItem;
import 'package:hmg_patient_app_new/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart'
show RegionListItem;
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class RegionBottomSheetBody extends StatefulWidget { class RegionBottomSheetBody extends StatefulWidget {
const RegionBottomSheetBody({super.key}); const RegionBottomSheetBody({super.key});
@override @override
@ -27,7 +24,11 @@ class _RegionBottomSheetBodyState extends State<RegionBottomSheetBody> {
@override @override
void initState() { void initState() {
scheduleMicrotask(() { scheduleMicrotask(() {
if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_REGION) {
myAppointmentsViewModel.getRegionMappedProjectList(); myAppointmentsViewModel.getRegionMappedProjectList();
} else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_CLINIIC) {
myAppointmentsViewModel.getMappedDoctors();
}
}); });
super.initState(); super.initState();
} }
@ -53,26 +54,19 @@ class _RegionBottomSheetBodyState extends State<RegionBottomSheetBody> {
return SizedBox( return SizedBox(
height: MediaQuery.of(context).size.height * 0.5, height: MediaQuery.of(context).size.height * 0.5,
child: ListView.separated( child: ListView.separated(
itemCount: itemCount: myAppointmentsVM.hospitalList?.registeredDoctorMap?.length ?? 0,
myAppointmentsVM.hospitalList?.registeredDoctorMap?.length ??
0,
separatorBuilder: (_, __) { separatorBuilder: (_, __) {
return SizedBox( return SizedBox(
height: 16.h, height: 16.h,
); );
}, },
itemBuilder: (_, index) { itemBuilder: (_, index) {
String key = myAppointmentsVM String key = myAppointmentsVM.hospitalList?.registeredDoctorMap?.keys.toList()[index] ?? '';
.hospitalList?.registeredDoctorMap?.keys
.toList()[index] ??
'';
return RegionListItem( return RegionListItem(
title: key, title: key,
subTitle: "", subTitle: "",
hmcCount: hmcCount: "${myAppointmentsVM.hospitalList?.registeredDoctorMap?[key]?.hmcSize ?? 0}",
"${myAppointmentsVM.hospitalList?.registeredDoctorMap?[key]?.hmcSize ?? 0}", hmgCount: "${myAppointmentsVM.hospitalList?.registeredDoctorMap?[key]?.hmgSize ?? 0}",
hmgCount:
"${myAppointmentsVM.hospitalList?.registeredDoctorMap?[key]?.hmgSize ?? 0}",
).onPress(() { ).onPress(() {
regionalViewModel.setSelectedRegionId(key); regionalViewModel.setSelectedRegionId(key);
regionalViewModel.setBottomSheetState(AppointmentViaRegionState.TYPE_SELECTION); regionalViewModel.setBottomSheetState(AppointmentViaRegionState.TYPE_SELECTION);

@ -58,7 +58,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
title: LocaleKeys.bookAppo.tr(context: context), title: LocaleKeys.bookAppo.tr(context: context),
isLeading: Navigator.canPop(context), isLeading: false,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) { child: Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) {
return Column( return Column(
@ -156,6 +156,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
], ],
).onPress(() { ).onPress(() {
bookAppointmentsViewModel.setIsDoctorSearchByNameStarted(false); bookAppointmentsViewModel.setIsDoctorSearchByNameStarted(false);
bookAppointmentsViewModel.setProjectID(null);
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: SearchDoctorByName(), page: SearchDoctorByName(),
@ -185,7 +186,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
flipX: appState.isArabic() ? true : false, child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 15.h, height: 15.h)), flipX: appState.isArabic() ? true : false, child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 15.h, height: 15.h)),
], ],
).onPress(() { ).onPress(() {
openRegionListBottomSheet(context); bookAppointmentsViewModel.setProjectID(null);
openRegionListBottomSheet(context, RegionBottomSheetType.FOR_REGION);
}), }),
], ],
), ),
@ -291,7 +293,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
flipX: appState.isArabic() ? true : false, child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 15.h, height: 15.h)), flipX: appState.isArabic() ? true : false, child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 15.h, height: 15.h)),
], ],
).onPress(() { ).onPress(() {
openRegionListBottomSheet(context); openRegionListBottomSheet(context, RegionBottomSheetType.FOR_REGION);
}), }),
], ],
), ),
@ -305,8 +307,9 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
return Container(); return Container();
} }
void openRegionListBottomSheet(BuildContext context) { void openRegionListBottomSheet(BuildContext context, RegionBottomSheetType type) {
regionalViewModel.flush(); regionalViewModel.flush();
regionalViewModel.setBottomSheetType(type);
// AppointmentViaRegionViewmodel? viewmodel = null; // AppointmentViaRegionViewmodel? viewmodel = null;
showCommonBottomSheetWithoutHeight(context, title: "", titleWidget: Consumer<AppointmentViaRegionViewmodel>(builder: (_, data, __) => getTitle(data)), isDismissible: false, showCommonBottomSheetWithoutHeight(context, title: "", titleWidget: Consumer<AppointmentViaRegionViewmodel>(builder: (_, data, __) => getTitle(data)), isDismissible: false,
child: Consumer<AppointmentViaRegionViewmodel>(builder: (_, data, __) { child: Consumer<AppointmentViaRegionViewmodel>(builder: (_, data, __) {

@ -13,12 +13,17 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_clinic_list_response_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_clinic_list_response_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_livecare_clinics_response_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_livecare_clinics_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/faculity_selection/facility_type_selection_widget.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/region_bottomsheet/region_list_widget.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/select_doctor_page.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/select_doctor_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/select_livecare_clinic_page.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/select_livecare_clinic_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/clinic_card.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/clinic_card.dart';
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/input_widget.dart'; import 'package:hmg_patient_app_new/widgets/input_widget.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart'; import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
@ -34,7 +39,7 @@ class SelectClinicPage extends StatefulWidget {
class _SelectClinicPageState extends State<SelectClinicPage> { class _SelectClinicPageState extends State<SelectClinicPage> {
TextEditingController searchEditingController = TextEditingController(); TextEditingController searchEditingController = TextEditingController();
FocusNode textFocusNode = FocusNode(); FocusNode textFocusNode = FocusNode();
late AppointmentViaRegionViewmodel regionalViewModel;
late AppState appState; late AppState appState;
late BookAppointmentsViewModel bookAppointmentsViewModel; late BookAppointmentsViewModel bookAppointmentsViewModel;
@ -55,6 +60,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
bookAppointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false); bookAppointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false);
regionalViewModel = Provider.of<AppointmentViaRegionViewmodel>(context, listen: true);
appState = getIt.get<AppState>(); appState = getIt.get<AppState>();
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
@ -197,15 +203,69 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
if (clinic.isLiveCareClinicAndOnline ?? false) { if (clinic.isLiveCareClinicAndOnline ?? false) {
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: SelectLivecareClinicPage(), page: SelectLivecareClinicPage(onNegativeClicked: (){
openRegionListBottomSheet(context, RegionBottomSheetType.FOR_CLINIIC);
},),
), ),
); );
} else { } else {
Navigator.of(context).push( openRegionListBottomSheet(context, RegionBottomSheetType.FOR_CLINIIC);
CustomPageRoute( // Navigator.of(context).push(
page: SelectDoctorPage(), // CustomPageRoute(
), // page: SelectDoctorPage(),
// ),
// );
}
}
void openRegionListBottomSheet(BuildContext context, RegionBottomSheetType type) {
bookAppointmentsViewModel.setProjectID(null);
regionalViewModel.flush();
regionalViewModel.setBottomSheetType(type);
// AppointmentViaRegionViewmodel? viewmodel = null;
showCommonBottomSheetWithoutHeight(context, title: "", titleWidget: Consumer<AppointmentViaRegionViewmodel>(builder: (_, data, __) => getTitle(data)), isDismissible: false,
child: Consumer<AppointmentViaRegionViewmodel>(builder: (_, data, __) {
return getRegionalSelectionWidget(data);
}), callBackFunc: () {});
}
Widget getRegionalSelectionWidget(AppointmentViaRegionViewmodel data) {
if (data.bottomSheetState == AppointmentViaRegionState.REGION_SELECTION) {
return RegionBottomSheetBody();
}
if (data.bottomSheetState == AppointmentViaRegionState.TYPE_SELECTION) {
bookAppointmentsViewModel.resetFilterList();
return FacilityTypeSelectionWidget(
selectedRegion: data.selectedRegionId ?? "",
); );
} }
if (data.bottomSheetState == AppointmentViaRegionState.HOSPITAL_SELECTION) {
return HospitalBottomSheetBody();
}
if(data.bottomSheetState == AppointmentViaRegionState.DOCTOR_SELECTION){
bookAppointmentsViewModel.setProjectID(regionalViewModel.selectedHospital?.patientDoctorAppointmentList?.first.projectID.toString());
}
else {
return SizedBox.shrink();
}
return SizedBox.shrink();
}
getTitle(AppointmentViaRegionViewmodel data) {
if (data.selectedRegionId == null) {
return LocaleKeys.selectRegion.tr().toText20(weight: FontWeight.w600);
} else {
return Transform.flip(
flipX: data.isArabic ? true : false,
child: Utils.buildSvgWithAssets(
icon: AppAssets.arrow_back,
iconColor: Color(0xff2B353E),
fit: BoxFit.contain,
),
).onPress(() {
data.handleBackPress();
});
}
} }
} }

@ -14,7 +14,9 @@ import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart'; import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
class SelectLivecareClinicPage extends StatelessWidget { class SelectLivecareClinicPage extends StatelessWidget {
const SelectLivecareClinicPage({super.key});
final VoidCallback? onNegativeClicked;
const SelectLivecareClinicPage({super.key, this.onNegativeClicked});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -122,11 +124,12 @@ class SelectLivecareClinicPage extends StatelessWidget {
text: "No, Thanks. I would like a physical visit".needTranslation, text: "No, Thanks. I would like a physical visit".needTranslation,
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
Navigator.of(context).push( onNegativeClicked?.call();
CustomPageRoute( // Navigator.of(context).push(
page: SelectDoctorPage(), // CustomPageRoute(
), // page: SelectDoctorPage(),
); // ),
// );
}, },
backgroundColor: AppColors.secondaryLightRedColor, backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor,

@ -59,8 +59,8 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
@override @override
void initState() { void initState() {
scheduleMicrotask(() {
_calendarController = CalendarController(); _calendarController = CalendarController();
scheduleMicrotask(() {
_events = { _events = {
_selectedDay: ['Event A0'] _selectedDay: ['Event A0']
}; };

@ -32,7 +32,7 @@ class ClinicCard extends StatelessWidget {
child: Column( child: Column(
children: [ children: [
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
"".toText16(isBold: true).toShimmer2(isShow: isLoading), Utils.buildSvgWithAssets(icon: AppAssets.generic_clinic_icon, width: 24.h, height: 24.h, fit: BoxFit.contain).toShimmer2(isShow: isLoading),
(clinicsListResponseModel.isLiveCareClinicAndOnline ?? true) (clinicsListResponseModel.isLiveCareClinicAndOnline ?? true)
? Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 32.h, height: 32.h, fit: BoxFit.contain).toShimmer2(isShow: isLoading) ? Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 32.h, height: 32.h, fit: BoxFit.contain).toShimmer2(isShow: isLoading)
: SizedBox.shrink(), : SizedBox.shrink(),

@ -210,7 +210,7 @@ class _LandingPageState extends State<LandingPage> {
: 3, : 3,
layout: SwiperLayout.STACK, layout: SwiperLayout.STACK,
loop: true, loop: true,
itemWidth: MediaQuery.of(context).size.width - 72, itemWidth: MediaQuery.of(context).size.width - 48.h,
indicatorLayout: PageIndicatorLayout.COLOR, indicatorLayout: PageIndicatorLayout.COLOR,
axisDirection: AxisDirection.right, axisDirection: AxisDirection.right,
controller: _controller, controller: _controller,

@ -468,7 +468,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
backgroundColor: AppColors.secondaryLightRedColor, backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
fontSize: 14, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12.h, borderRadius: 12.h,
height: 40.h, height: 40.h,
@ -485,7 +485,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
backgroundColor: AppColors.secondaryLightRedColor, backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
fontSize: 14, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12.h, borderRadius: 12.h,
height: 40.h, height: 40.h,

@ -32,7 +32,7 @@ class LabRadCard extends StatelessWidget {
fit: BoxFit.contain, fit: BoxFit.contain,
).toShimmer2(isShow: false, radius: 12.h), ).toShimmer2(isShow: false, radius: 12.h),
SizedBox(width: 8.h), SizedBox(width: 8.h),
labelText.toText14(isBold: true).toShimmer2(isShow: false, radius: 6.h, height: 32.h), labelText.toText13(isBold: true).toShimmer2(isShow: false, radius: 6.h, height: 32.h),
], ],
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),

@ -110,15 +110,15 @@ class PatientMedicalReportCard extends StatelessWidget {
onPressed: () async { onPressed: () async {
getMedicalReportPDF(false, context, _appState); getMedicalReportPDF(false, context, _appState);
}, },
backgroundColor: AppColors.secondaryLightRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.secondaryLightRedColor, borderColor: AppColors.primaryRedColor,
textColor: AppColors.primaryRedColor, textColor: AppColors.whiteColor,
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12.h, borderRadius: 12.h,
height: 40.h, height: 40.h,
icon: AppAssets.download_1, icon: AppAssets.download_1,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.whiteColor,
iconSize: 16.h, iconSize: 16.h,
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
), ),

@ -48,11 +48,11 @@ class _SplashScreenState extends State<SplashPage> {
Timer(Duration(seconds: 2, milliseconds: 500), () async { Timer(Duration(seconds: 2, milliseconds: 500), () async {
LocalNotification.init(onNotificationClick: (payload) {}); LocalNotification.init(onNotificationClick: (payload) {});
if (await Utils.getBoolFromPrefs(CacheConst.firstLaunch)) { // if (await Utils.getBoolFromPrefs(CacheConst.firstLaunch)) {
Navigator.of(context).pushReplacement(FadePage(page: SplashAnimationScreen(routeWidget: OnboardingScreen()))); Navigator.of(context).pushReplacement(FadePage(page: SplashAnimationScreen(routeWidget: OnboardingScreen())));
} else { // } else {
Navigator.of(context).pushReplacement(FadePage(page: SplashAnimationScreen(routeWidget: LandingNavigation()))); // Navigator.of(context).pushReplacement(FadePage(page: SplashAnimationScreen(routeWidget: LandingNavigation())));
} // }
}); });
var zoom = ZoomVideoSdk(); var zoom = ZoomVideoSdk();
InitConfig initConfig = InitConfig( InitConfig initConfig = InitConfig(

Loading…
Cancel
Save