diff --git a/RescheduleAppointments/force-app/main/default/classes/AppointmentController.cls b/RescheduleAppointments/force-app/main/default/classes/AppointmentController.cls index 81f067b..307b01a 100644 --- a/RescheduleAppointments/force-app/main/default/classes/AppointmentController.cls +++ b/RescheduleAppointments/force-app/main/default/classes/AppointmentController.cls @@ -545,12 +545,13 @@ public without sharing class AppointmentController { ); if (String.isNotEmpty(newWOId)) { - ServiceAppointment sa = [ + ServiceAppointment sa; + ServiceAppointment saList = [ SELECT Id FROM ServiceAppointment WHERE ParentRecordId = :newWOId - ][0]; - if (sa == null) { + ]; + if (saList == null || saList.size() == 0) { sa = new ServiceAppointment(); sa.ParentRecordId = newWOId; sa.DueDate = dueDate; diff --git a/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingLanding/mobileAppointmentBookingLanding.js b/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingLanding/mobileAppointmentBookingLanding.js index ab7313c..b274306 100644 --- a/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingLanding/mobileAppointmentBookingLanding.js +++ b/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingLanding/mobileAppointmentBookingLanding.js @@ -754,6 +754,7 @@ export default class MobileAppointmentBookingLanding extends LightningElement { +error ); this.timeSlotDateWise = []; + this.allowScrolling(); }); } }) @@ -762,6 +763,7 @@ export default class MobileAppointmentBookingLanding extends LightningElement { "Error While assigning current user as required resource: " + error ); + this.allowScrolling(); }); }); } else if (saData.error) { diff --git a/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingRescheduleAppointment/mobileAppointmentBookingRescheduleAppointment.js b/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingRescheduleAppointment/mobileAppointmentBookingRescheduleAppointment.js index 32eaf84..1174f42 100644 --- a/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingRescheduleAppointment/mobileAppointmentBookingRescheduleAppointment.js +++ b/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingRescheduleAppointment/mobileAppointmentBookingRescheduleAppointment.js @@ -17,12 +17,16 @@ export default class MobileAppointmentBookingRescheduleAppointment extends Light @api appointmentNumber; @api assignToName; - handleConfirmBtnClose() { + handleConfirmBtnClose(event) { + event.preventDefault(); + event.stopPropagation(); const customEvent = new CustomEvent("rescheduleclosewindow"); this.dispatchEvent(customEvent); } - handleConfirm() { + handleConfirm(event) { + event.preventDefault(); + event.stopPropagation(); this.showSpinner = true; const customEvent = new CustomEvent("rescheduleconfirmed"); diff --git a/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingSettingsContainer/mobileAppointmentBookingSettingsContainer.js b/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingSettingsContainer/mobileAppointmentBookingSettingsContainer.js index 63c51b6..2090b40 100644 --- a/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingSettingsContainer/mobileAppointmentBookingSettingsContainer.js +++ b/RescheduleAppointments/force-app/main/default/lwc/mobileAppointmentBookingSettingsContainer/mobileAppointmentBookingSettingsContainer.js @@ -15,8 +15,8 @@ export default class MobileAppointmentBookingSettingsContainer extends Lightning recommendedScore = 80; _serviceAppointmentId; - @api operatingHours = "Israel OH"; - @api schedulingPolicy = "rescheduleLWC"; + @api operatingHours = "Gold Appointments Calendar"; + @api schedulingPolicy = "Customer First"; @api schedulingHorizonUnit = "Months"; @api schedulingHorizonValue = "3";