Override due date¶
Steps¶
- An internal updater picks a date within the limits the date picker allows (BR-SCR-002). Only the client enforces the window.
- The form posts to the due-date handler with no anti-forgery token (BR-APP-006). The handler checks no role (TD-APP-003) and parses the date with
DateTime.Parse(TD-APP-008). - The handler calls
PopulateModelwith the parsed date, which calls the due-date update ofNDReimbursementAPI.Client(known from the call site; package internals are unknown**), setsDueDateSuccess, and then loads the statement with the user checks (BR-APP-002, BR-APP-003). - A parse failure or an update failure is caught by the handler (the update failure is rethrown inside
PopulateModelfirst). The handler logs it, setsIsSuccessfulto false and the message "An error has occurred while updating due date", and re-renders the page; the message is displayed only if the view condition!IsSuccessful && !HasPolicyNumberholds. - The new due date applies at 18:00 (BR-SCR-001).
Process flow¶
The diagram shows the due-date update and the caught-failure path that sets error state and re-renders the page.
flowchart TD
A["Pick date"] --> B["POST DueDate"]
B --> C["Parse date"]
C -- "Parse error" --> X["Log, set error message, re-render page"]
C --> D["UpdateDueDate via API client"]
D -- "Exception rethrown, caught by handler" --> X
D --> E["Repopulate and render"]
Note: Statements marked with
**could not be confirmed; treat as unknown until verified.
Related documentation¶
Sources¶
- src/NDReimbursementWebApp/Pages/NDReimbursement.cshtml.cs
- src/NDReimbursementWebApp/wwwroot/js/DatePicker.js