From 6ec9f11eb6bbb0790371470af7088440e44bde14 Mon Sep 17 00:00:00 2001 From: jennifer-bennett Date: Mon, 14 Aug 2023 13:40:41 -0500 Subject: [PATCH 1/4] Add .sf to gitignore and create feature branch. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 75a96fbfc..577fc12bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Salesforce / SFDX / CCI .cci .sfdx +.sf /src.orig /src From e5d0372eaac789e8840ff9431777ceb2127dad9c Mon Sep 17 00:00:00 2001 From: Tarren Anderson Date: Wed, 20 Sep 2023 10:14:15 -0500 Subject: [PATCH 2/4] WIP Debounce --- .../lwc/bulkServiceDeliveryUI/bulkServiceDeliveryUI.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/force-app/main/default/lwc/bulkServiceDeliveryUI/bulkServiceDeliveryUI.js b/force-app/main/default/lwc/bulkServiceDeliveryUI/bulkServiceDeliveryUI.js index c77cd8be4..f87abb54a 100644 --- a/force-app/main/default/lwc/bulkServiceDeliveryUI/bulkServiceDeliveryUI.js +++ b/force-app/main/default/lwc/bulkServiceDeliveryUI/bulkServiceDeliveryUI.js @@ -180,6 +180,10 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem return "error"; } + get isSaveDisabled() { + return this.isSaving; + } + addDelivery() { let serviceDelivery = { index: this._nextIndex, @@ -230,6 +234,7 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem handleSave() { let rows = this.template.querySelectorAll("c-service-delivery-row"); + this.isSaving = true; this.savedCount = 0; this.errorCount = 0; this.targetSaveCount = 0; @@ -247,6 +252,7 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem if (this.targetSaveCount === 0) { this.dispatchEvent(new CustomEvent("done")); + this.isSaving = false; } } @@ -260,6 +266,7 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem if (this.savedCount === this.targetSaveCount) { this.dispatchEvent(new CustomEvent("done")); + this.isSaving = false; } } From ab2756ebf379bfca27d4c310a87bd47b6ca2ada2 Mon Sep 17 00:00:00 2001 From: Tarren Anderson Date: Thu, 28 Sep 2023 14:42:21 -0500 Subject: [PATCH 3/4] Adjust Save Checks --- .../lwc/bulkServiceDeliveryUI/bulkServiceDeliveryUI.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/force-app/main/default/lwc/bulkServiceDeliveryUI/bulkServiceDeliveryUI.js b/force-app/main/default/lwc/bulkServiceDeliveryUI/bulkServiceDeliveryUI.js index f87abb54a..191efe86a 100644 --- a/force-app/main/default/lwc/bulkServiceDeliveryUI/bulkServiceDeliveryUI.js +++ b/force-app/main/default/lwc/bulkServiceDeliveryUI/bulkServiceDeliveryUI.js @@ -225,16 +225,15 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem // eslint-disable-next-line no-unused-vars handleRowError(event) { this.errorCount++; - if (this.savingComplete()) { this.showSaveSummaryToast(); + this.isSaving = false; } } handleSave() { let rows = this.template.querySelectorAll("c-service-delivery-row"); - this.isSaving = true; this.savedCount = 0; this.errorCount = 0; this.targetSaveCount = 0; @@ -246,13 +245,13 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem } if (row.isDirty) { this.currentSaveCount++; + this.isSaving = true; } row.saveRow(); }); if (this.targetSaveCount === 0) { this.dispatchEvent(new CustomEvent("done")); - this.isSaving = false; } } @@ -262,11 +261,11 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem if (this.savingComplete()) { this.showSaveSummaryToast(); + this.isSaving = false; } if (this.savedCount === this.targetSaveCount) { this.dispatchEvent(new CustomEvent("done")); - this.isSaving = false; } } From eba61695629c6f5c0f4cdba09e7be59166f16aa7 Mon Sep 17 00:00:00 2001 From: Tarren Anderson Date: Tue, 7 Nov 2023 09:55:59 -0600 Subject: [PATCH 4/4] Limit close event to non-navigation clause --- .../lwc/serviceScheduleCreator/serviceScheduleCreator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/force-app/main/default/lwc/serviceScheduleCreator/serviceScheduleCreator.js b/force-app/main/default/lwc/serviceScheduleCreator/serviceScheduleCreator.js index dd7eba3ac..7297d8a68 100644 --- a/force-app/main/default/lwc/serviceScheduleCreator/serviceScheduleCreator.js +++ b/force-app/main/default/lwc/serviceScheduleCreator/serviceScheduleCreator.js @@ -354,8 +354,8 @@ export default class ServiceScheduleCreator extends NavigationMixin(LightningEle this.navigate(); } else { this.init(); + this.dispatchEvent(new CustomEvent("close", { bubbles: true })); } - this.dispatchEvent(new CustomEvent("close", { bubbles: true })); } reset() {