Updates & fixes, CR 6038 Ask Dr changes implemented

merge-update-with-lab-changes
haroon amjad 1 year ago
parent a31c677919
commit 780f645cbe

@ -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/';
@ -352,7 +352,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.3;
var VERSION_ID = 17.4;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;
@ -694,13 +694,15 @@ var GET_PROJECT_FROM_NFC = 'Services/OUTPs.svc/Rest/GetProjectByNFC';
var GET_PATIENT_OCCUPATION_LIST = 'Services/Authentication.svc/REST/GetPatientOccupation';
var IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE = 'Services/OUTPs.svc/REST/HIS_IsDoctorAvailableByCalendarSchedule';
//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;

@ -29,6 +29,25 @@ class AskDoctorService extends BaseService {
return Future.value(localRes);
}
Future isDoctorAvailable({int? projectId, int? doctorId, int? clinicId}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['DoctorID'] = doctorId;
body['ProjectID'] = projectId;
body['ClinicID'] = clinicId;
dynamic localRes;
await baseAppClient.post(IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
Future getCallRequestTypeLOV() async {
hasError = false;
Map<String, dynamic> body = Map();

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

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

@ -423,8 +423,9 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");

@ -514,7 +514,8 @@ class InPatientGeneralConsent extends StatelessWidget {
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {
AppToast.showErrorToast(message: res["SuccessMsg"]);
AppToast.showSuccessToast(message: res["SuccessMsg"] ?? TranslationBase.of(context).success);
Navigator.of(context);
} else {
AppToast.showErrorToast(message: res["endUserMessage"]);
}

@ -486,9 +486,9 @@ class _clinic_listState extends State<ClinicList> {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
GifLoaderDialogUtils.hideDialog(localContext!);
AppToast.showErrorToast(message: failureResult.toString());
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
GifLoaderDialogUtils.hideDialog(localContext!);

@ -351,7 +351,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
// var whatsappStatus = await channel.isWhatsAppInstalled();
// if(whatsappStatus) {
// print("whatapp is installed");
channel.handleHandShake();
channel.handleHandShake();
// }else{
// print("whatapp is not installed");
// }
@ -709,37 +709,37 @@ 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,
// ),
// ),
// (r) => false);
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// print(err);
// });
// }
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// print(err);
// });
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);
});
// if (result.isNeedUserAgreement == true) {
//move to agreement page.
// // move to agreement page.
// } else {
goToHome();
// goToHome();
// }
}

@ -80,21 +80,23 @@ class AskDoctorPage extends StatelessWidget {
doctor: doctorList,
isLiveCareAppointment: false,
isShowFlag: false,
onTap: () {
GifLoaderDialogUtils.showMyDialog(context);
service.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
FadePage(
page: RequestTypePage(doctorList: _doctor),
),
);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
if (err != null) AppToast.showErrorToast(message: err.toString());
print(err);
});
onTap: () async {
if (await checkIfDoctorAvailable(_doctor, context)) {
GifLoaderDialogUtils.showMyDialog(context);
service.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
FadePage(
page: RequestTypePage(doctorList: _doctor),
),
);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
if (err != null) AppToast.showErrorToast(message: err.toString());
print(err);
});
}
},
);
},
@ -106,6 +108,27 @@ class AskDoctorPage extends StatelessWidget {
);
}
Future<bool> checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) {
bool isAvailable = false;
GifLoaderDialogUtils.showMyDialog(context);
service.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['IsDoctorAvailable']);
if (res['IsDoctorAvailable']) {
isAvailable = true;
} else {
isAvailable = false;
AppToast.showErrorToast(message: res['endUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
if (err != null) AppToast.showErrorToast(message: err.toString());
print(err);
});
return Future.value(isAvailable);
}
String getDate(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date);
return DateUtil.getWeekDay(dateObj.weekday) +

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

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.5.079+4050079
version: 4.6.080+4050080
environment:
sdk: ">=3.0.0 <3.13.0"

Loading…
Cancel
Save