diff --git a/PWA/public/RouteEvents.js b/PWA/public/RouteEvents.js index 7c5eb95..4391835 100644 --- a/PWA/public/RouteEvents.js +++ b/PWA/public/RouteEvents.js @@ -21,6 +21,7 @@ RouteEvents.codeInputFound = "/entry.html"; RouteEvents.postCreateDistribution = "/create_distrib"; RouteEvents.postSelectDistribution = "/select_distrib"; RouteEvents.postDeleteDistribution = "/delete_distrib"; +RouteEvents.postDeleteDistributionConfirm = "/delete_distrib_confirm"; RouteEvents.listDistributionsFormAction = "/distrib?"; RouteEvents.chooseBeneficiaryCodeInputMethod = "/choose_input_method?"; RouteEvents.selectBeneficiaryCodeInputMethod = "/save_input_method"; diff --git a/PWA/public/Services/FetchEventHandlers/DeleteDistributionsConfirmHandler.js b/PWA/public/Services/FetchEventHandlers/DeleteDistributionsConfirmHandler.js index b78c126..4b44ca5 100644 --- a/PWA/public/Services/FetchEventHandlers/DeleteDistributionsConfirmHandler.js +++ b/PWA/public/Services/FetchEventHandlers/DeleteDistributionsConfirmHandler.js @@ -2,7 +2,7 @@ import { RouteEvents } from "../../RouteEvents.js"; import { ResponseTools } from "../ResponseTools.js"; export class DeleteDistributionsConfirmHandler { canHandleEvent(event) { - return event.request.url.endsWith(RouteEvents.confirmDistributionDeletion); + return event.request.url.endsWith(RouteEvents.postDeleteDistributionConfirm); } async handleEvent(event) { return await ResponseTools.wrapInHtmlTemplate(RouteEvents.confirmDistributionDeletion); diff --git a/PWA/src/RouteEvents.ts b/PWA/src/RouteEvents.ts index 8842a14..ef37504 100644 --- a/PWA/src/RouteEvents.ts +++ b/PWA/src/RouteEvents.ts @@ -21,6 +21,7 @@ export class RouteEvents { static postCreateDistribution = "/create_distrib" static postSelectDistribution = "/select_distrib" static postDeleteDistribution = "/delete_distrib" + static postDeleteDistributionConfirm = "/delete_distrib_confirm" static listDistributionsFormAction = "/distrib?" static chooseBeneficiaryCodeInputMethod = "/choose_input_method?" static selectBeneficiaryCodeInputMethod = "/save_input_method" diff --git a/PWA/src/Services/FetchEventHandlers/DeleteDistributionsConfirmHandler.ts b/PWA/src/Services/FetchEventHandlers/DeleteDistributionsConfirmHandler.ts index 0272aa9..4e6007f 100644 --- a/PWA/src/Services/FetchEventHandlers/DeleteDistributionsConfirmHandler.ts +++ b/PWA/src/Services/FetchEventHandlers/DeleteDistributionsConfirmHandler.ts @@ -5,7 +5,7 @@ import { ResponseTools } from "../ResponseTools.js"; export class DeleteDistributionsConfirmHandler implements FetchEventHandler { canHandleEvent(event: FetchEvent): boolean { - return event.request.url.endsWith(RouteEvents.confirmDistributionDeletion); + return event.request.url.endsWith(RouteEvents.postDeleteDistributionConfirm); } async handleEvent(event: FetchEvent): Promise {