Skip to content

Commit

Permalink
Merge pull request #81 from ibenitamar/main
Browse files Browse the repository at this point in the history
fix cloneWorkOrder listoutofbounds bug && events not propagated properly on reschedule confirm
  • Loading branch information
khawkins authored Oct 3, 2023
2 parents 5e3f833 + 1576a25 commit 4cfbce9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ export default class MobileAppointmentBookingLanding extends LightningElement {
+error
);
this.timeSlotDateWise = [];
this.allowScrolling();
});
}
})
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 4cfbce9

Please sign in to comment.