pull/130/head
haroon amjad 4 months ago
parent 5581346a2d
commit f886357bcd

@ -700,7 +700,7 @@ var GET_PRESCRIPTION_INSTRUCTIONS_PDF = 'Services/ChatBot_Service.svc/REST/Chatb
class ApiConsts { class ApiConsts {
static const maxSmallScreen = 660; static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -110,7 +110,7 @@ class PayfortViewModel extends ChangeNotifier {
onError!(failure.message); onError!(failure.message);
}, },
(apiResponse) { (apiResponse) {
log(apiResponse.data); log(apiResponse.data.toString());
if (onSuccess != null) { if (onSuccess != null) {
onSuccess(apiResponse); onSuccess(apiResponse);
} }
@ -134,7 +134,7 @@ class PayfortViewModel extends ChangeNotifier {
onError!(failure.message); onError!(failure.message);
}, },
(apiResponse) { (apiResponse) {
log(apiResponse.data); log(apiResponse.data.toString());
if (onSuccess != null) { if (onSuccess != null) {
onSuccess(apiResponse); onSuccess(apiResponse);
} }

@ -60,7 +60,7 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000; double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000;
print(dist); print(dist);
if (dist <= projectDetailListModel.geofenceRadius!) { if (dist <= projectDetailListModel.geofenceRadius!) {
sendCheckInRequest(projectDetailListModel.checkInQrCode!, context); sendCheckInRequest(projectDetailListModel.checkInQrCode!, 3, context);
} else { } else {
showCommonBottomSheetWithoutHeight(context, showCommonBottomSheetWithoutHeight(context,
title: "Error".needTranslation, title: "Error".needTranslation,
@ -79,7 +79,7 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
Future.delayed(const Duration(milliseconds: 500), () { Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) { showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () { Future.delayed(const Duration(milliseconds: 100), () {
sendCheckInRequest(nfcId, context); sendCheckInRequest(nfcId, 1, context);
}); });
}, onCancel: () {}); }, onCancel: () {});
}); });
@ -92,7 +92,7 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
).onPress(() async { ).onPress(() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
if (onlineCheckInQRCode != "") { if (onlineCheckInQRCode != "") {
sendCheckInRequest(onlineCheckInQRCode, context); sendCheckInRequest(onlineCheckInQRCode, 2, context);
} else {} } else {}
}), }),
], ],
@ -140,12 +140,12 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
); );
} }
void sendCheckInRequest(String scannedCode, BuildContext context) async { void sendCheckInRequest(String scannedCode, int checkInType, BuildContext context) async {
LoaderBottomSheet.showLoader(loadingText: "Processing Check-In...".needTranslation); LoaderBottomSheet.showLoader(loadingText: "Processing Check-In...".needTranslation);
await myAppointmentsViewModel.sendCheckInNfcRequest( await myAppointmentsViewModel.sendCheckInNfcRequest(
patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel, patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
scannedCode: scannedCode, scannedCode: scannedCode,
checkInType: 2, checkInType: checkInType,
onSuccess: (apiResponse) { onSuccess: (apiResponse) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context, title: "Success".needTranslation, child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr()), callBackFunc: () async { showCommonBottomSheetWithoutHeight(context, title: "Success".needTranslation, child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr()), callBackFunc: () async {

@ -322,15 +322,29 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
} }
Future<bool> askVideoCallPermission() async { Future<bool> askVideoCallPermission() async {
bool hasPermission = false;
if (Platform.isIOS) {
Map<Permission, PermissionStatus> statuses = await [Permission.camera, Permission.microphone].request();
if (statuses[Permission.camera] == PermissionStatus.granted && statuses[Permission.microphone] == PermissionStatus.granted) {
// Camera permission granted
hasPermission = true;
} else {
hasPermission = false;
}
} else {
Map<Permission, PermissionStatus> statuses = await [Permission.camera, Permission.microphone, Permission.notification].request(); Map<Permission, PermissionStatus> statuses = await [Permission.camera, Permission.microphone, Permission.notification].request();
if (statuses[Permission.camera] == PermissionStatus.granted && statuses[Permission.microphone] == PermissionStatus.granted && statuses[Permission.notification] == PermissionStatus.granted) { if (statuses[Permission.camera] == PermissionStatus.granted && statuses[Permission.microphone] == PermissionStatus.granted && statuses[Permission.notification] == PermissionStatus.granted) {
// Camera permission granted // Camera permission granted
return true; hasPermission = true;
} else { } else {
return false; hasPermission = false;
}
} }
return hasPermission;
// if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) { // if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) {
// return false; // return false;
// } // }

@ -405,13 +405,13 @@ class _LandingPageState extends State<LandingPage> {
SizedBox(height: 10.h), SizedBox(height: 10.h),
"Hala ${appState.getAuthenticatedUser()!.firstName}!!!".needTranslation.toText16(isBold: true), "Hala ${appState.getAuthenticatedUser()!.firstName}!!!".needTranslation.toText16(isBold: true),
SizedBox(height: 8.h), SizedBox(height: 8.h),
"Your turn is after ${immediateLiveCareVM.patientLiveCareHistoryList[0].patCount} patients.".toText14(isBold: true), "Your turn is after ${immediateLiveCareVM.patientLiveCareHistoryList[0].patCount} patients.".needTranslation.toText14(isBold: true),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Expected waiting time: ".toText12(isBold: true), "Expected waiting time: ".needTranslation.toText12(isBold: true),
SizedBox(height: 8.h), SizedBox(height: 7.h),
ValueListenableBuilder<Duration>( ValueListenableBuilder<Duration>(
valueListenable: immediateLiveCareVM.durationNotifier, valueListenable: immediateLiveCareVM.durationNotifier,
builder: (context, duration, child) { builder: (context, duration, child) {
@ -423,7 +423,6 @@ class _LandingPageState extends State<LandingPage> {
); );
}, },
), ),
SizedBox(height: 12.h),
], ],
), ),
// CustomButton( // CustomButton(

Loading…
Cancel
Save