Skip to content

Commit

Permalink
Adjust Save Checks
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonTarren committed Sep 28, 2023
1 parent e5d0372 commit ab2756e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
}

Expand All @@ -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;
}
}

Expand Down

0 comments on commit ab2756e

Please sign in to comment.