code merged

merge-update-with-lab-changes
Haroon Amjad 1 year ago
parent 69493934b1
commit b042292f9a

@ -246,7 +246,8 @@ class _BookConfirmState extends State<BookConfirm> {
}
}
},
child: Text(widget.isWalkinAppointment ? TranslationBase.of(context).addToWaitingList : TranslationBase.of(context).bookAppo, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48, color: Colors.white)),
child: Text(widget.isWalkinAppointment ? TranslationBase.of(context).addToWaitingList : TranslationBase.of(context).bookAppo,
style: TextStyle(fontSize: 16.0, letterSpacing: -0.48, color: Colors.white)),
),
),
),
@ -270,7 +271,6 @@ class _BookConfirmState extends State<BookConfirm> {
widget.doctor.doctorID!,
)
.then((res) {
widget.patientShareResponse = new PatientShareResponse.fromJson(res["OnlineCheckInAppointmentsWalkInModel"]);
GifLoaderDialogUtils.hideDialog(context);
@ -609,7 +609,7 @@ class _BookConfirmState extends State<BookConfirm> {
DoctorsListService service = new DoctorsListService();
service.markAppointmentForTamara(appo.projectID!, appo.appointmentNo.toString()).then((res) {
GifLoaderDialogUtils.hideDialog(context);
sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(appo.appointmentNo), projectViewModel.waitingAppointmentProjectID);
sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(appo.appointmentNo), projectViewModel.waitingAppointmentProjectID, appo.clinicID);
}).catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
@ -789,7 +789,7 @@ class _BookConfirmState extends State<BookConfirm> {
if (widget.patientShareResponse.patientShareWithTax != 0 || widget.patientShareResponse.patientShareWithTax != 0.0) {
createAdvancePayment(paymentRes, appo);
} else {
sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(res["AppointmentNo"]), projectViewModel.waitingAppointmentProjectID);
sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(res["AppointmentNo"]), projectViewModel.waitingAppointmentProjectID, appo.clinicID);
}
}
});
@ -832,7 +832,7 @@ class _BookConfirmState extends State<BookConfirm> {
DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(appointmentID), projectViewModel.waitingAppointmentProjectID);
sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(appointmentID), projectViewModel.waitingAppointmentProjectID, appo.clinicID);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
@ -840,10 +840,10 @@ class _BookConfirmState extends State<BookConfirm> {
});
}
sendNfcCheckInRequest(String nfcId, int checkInBy, int appoNo, int projectID) {
sendNfcCheckInRequest(String nfcId, int checkInBy, int appoNo, int projectID, int clinicID) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.sendCheckinNfcRequest(appoNo, nfcId, projectID, checkInBy, context as int).then((res) {
service.sendCheckinNfcRequest(appoNo, nfcId, projectID, checkInBy, clinicID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
_showMyDialog(res["SuccessMsg"], this.context);
}).catchError((err) {
@ -876,20 +876,21 @@ class _BookConfirmState extends State<BookConfirm> {
cancelText: TranslationBase.of(context).newAppointment,
okFunction: () => {
ConfirmDialog.closeAlertDialog(context),
insertAppointment(widget.doctor, widget.initialSlotDuration, invoiceNumber: package.patientPackageComponents![0].invoiceNo, lineItemNo: package.patientPackageComponents![0].lineItemNo)
insertAppointment(context, widget.doctor, widget.initialSlotDuration,
invoiceNumber: package.patientPackageComponents![0].invoiceNo, lineItemNo: package.patientPackageComponents![0].lineItemNo)
},
cancelFunction: () => {insertAppointment(widget.doctor, widget.initialSlotDuration)},
cancelFunction: () => {insertAppointment(context, widget.doctor, widget.initialSlotDuration)},
);
dialog.showAlertDialog(context);
} else {
insertAppointment(widget.doctor, widget.initialSlotDuration);
insertAppointment(context, widget.doctor, widget.initialSlotDuration);
}
}).onError((error, stackTrace) {
insertAppointment(widget.doctor, widget.initialSlotDuration);
insertAppointment(context, widget.doctor, widget.initialSlotDuration);
});
}
insertAppointment(context, DoctorList docObject, int initialSlotDuration) async {
insertAppointment(context, DoctorList docObject, int initialSlotDuration, {int? invoiceNumber, int? lineItemNo}) async {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
String logs = await sharedPref.getString('selectedLogSlots');
List<dynamic> decodedLogs = json.decode(logs);

Loading…
Cancel
Save