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_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/'; // var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'https://uat.hmgwebservices.com/'; var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.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 CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 17.3; var VERSION_ID = 17.4;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // 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 GET_PATIENT_OCCUPATION_LIST = 'Services/Authentication.svc/REST/GetPatientOccupation';
var IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE = 'Services/OUTPs.svc/REST/HIS_IsDoctorAvailableByCalendarSchedule';
//PAYFORT //PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
var payFortEnvironment = FortEnvironment.production; // var payFortEnvironment = FortEnvironment.production;
var applePayMerchantId = "merchant.com.hmgwebservices"; // var applePayMerchantId = "merchant.com.hmgwebservices";
// var payFortEnvironment = FortEnvironment.test; var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal { class AppGlobal {
static var context; static var context;

@ -29,6 +29,25 @@ class AskDoctorService extends BaseService {
return Future.value(localRes); 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 { Future getCallRequestTypeLOV() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();

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

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

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

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

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

@ -351,7 +351,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
// var whatsappStatus = await channel.isWhatsAppInstalled(); // var whatsappStatus = await channel.isWhatsAppInstalled();
// if(whatsappStatus) { // if(whatsappStatus) {
// print("whatapp is installed"); // print("whatapp is installed");
channel.handleHandShake(); channel.handleHandShake();
// }else{ // }else{
// print("whatapp is not installed"); // print("whatapp is not installed");
// } // }
@ -709,37 +709,37 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
checkIfUserAgreedBefore(CheckActivationCode result) { checkIfUserAgreedBefore(CheckActivationCode result) {
// this.authService.checkIfUserAgreed().then((result) { this.authService.checkIfUserAgreed().then((result) {
// if (result['IsPatientAlreadyAgreed']) { if (result['IsPatientAlreadyAgreed']) {
// goToHome(); goToHome();
// } else { } else {
// this.authService.getUserAgreementContent().then((result) { this.authService.getUserAgreementContent().then((result) {
// GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
// Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
// context, context,
// FadePage( FadePage(
// page: UserLoginAgreementPage( page: UserLoginAgreementPage(
// userAgreementText: result['UserAgreementContent'], userAgreementText: result['UserAgreementContent'],
// authenticatedUserObject: authenticatedUserObject, authenticatedUserObject: authenticatedUserObject,
// appointmentRateViewModel: appointmentRateViewModel, appointmentRateViewModel: appointmentRateViewModel,
// selectedOption: selectedOption, selectedOption: selectedOption,
// ), ),
// ), ),
// (r) => false); (r) => false);
// }).catchError((err) { }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
// print(err); print(err);
// }); });
// } }
// }).catchError((err) { }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
// print(err); print(err);
// }); });
// if (result.isNeedUserAgreement == true) { // if (result.isNeedUserAgreement == true) {
//move to agreement page. // // move to agreement page.
// } else { // } else {
goToHome(); // goToHome();
// } // }
} }

@ -80,21 +80,23 @@ class AskDoctorPage extends StatelessWidget {
doctor: doctorList, doctor: doctorList,
isLiveCareAppointment: false, isLiveCareAppointment: false,
isShowFlag: false, isShowFlag: false,
onTap: () { onTap: () async {
GifLoaderDialogUtils.showMyDialog(context); if (await checkIfDoctorAvailable(_doctor, context)) {
service.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((res) { GifLoaderDialogUtils.showMyDialog(context);
GifLoaderDialogUtils.hideDialog(context); service.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((res) {
Navigator.push( GifLoaderDialogUtils.hideDialog(context);
context, Navigator.push(
FadePage( context,
page: RequestTypePage(doctorList: _doctor), FadePage(
), page: RequestTypePage(doctorList: _doctor),
); ),
}).catchError((err) { );
GifLoaderDialogUtils.hideDialog(context); }).catchError((err) {
if (err != null) AppToast.showErrorToast(message: err.toString()); GifLoaderDialogUtils.hideDialog(context);
print(err); 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) { String getDate(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date); DateTime dateObj = DateUtil.convertStringToDate(date);
return DateUtil.getWeekDay(dateObj.weekday) + return DateUtil.getWeekDay(dateObj.weekday) +

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

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

Loading…
Cancel
Save