-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename incorrect spelling of beneficiary
- Loading branch information
Showing
25 changed files
with
93 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...eBenificiaryCodeInputMethodPageHandler.js → ...eBeneficiaryCodeInputMethodPageHandler.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
PWA/public/Services/FetchEventHandlers/SelectBeneficiaryCodeInputMethodHandler.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { RouteEvents } from "../../RouteEvents.js"; | ||
import { ActiveSessionContainer } from "../ActiveSession.js"; | ||
import { DeserialisationService } from "../DeserialisationService.js"; | ||
import { ResponseTools } from "../ResponseTools.js"; | ||
export class SelectBeneficiaryCodeInputMethodHandler extends ActiveSessionContainer { | ||
canHandleEvent(event) { | ||
return event.request.url.endsWith(RouteEvents.selectBeneficiaryCodeInputMethod); | ||
} | ||
async handleEvent(event) { | ||
try { | ||
const post = await DeserialisationService.deserializeFormDataFromRequest(event.request); | ||
return ResponseTools.wrapInHtmlTemplate(this.templatepageForInputMethod(post.input_method)); | ||
} | ||
catch (error) { | ||
console.error(error); | ||
return fetch(RouteEvents.home); | ||
} | ||
} | ||
templatepageForInputMethod(inputMethod) { | ||
this.activeSession.nameOfLastUsedDistributionInputMethod = inputMethod; | ||
if (inputMethod == "video") { | ||
this.activeSession.nameOfLastUsedDistributionInputMethod = inputMethod; | ||
return RouteEvents.codeInputUsingCamera; | ||
} | ||
else if (inputMethod == "text") { | ||
this.activeSession.nameOfLastUsedDistributionInputMethod = inputMethod; | ||
return RouteEvents.codeinputUsingTextField; | ||
} | ||
else { | ||
throw "Unexpected input method: " + inputMethod; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.