Skip to content

Override due date

Steps

  1. An internal updater picks a date within the limits the date picker allows (BR-SCR-002). Only the client enforces the window.
  2. 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).
  3. The handler calls PopulateModel with the parsed date, which calls the due-date update of NDReimbursementAPI.Client (known from the call site; package internals are unknown**), sets DueDateSuccess, and then loads the statement with the user checks (BR-APP-002, BR-APP-003).
  4. A parse failure or an update failure is caught by the handler (the update failure is rethrown inside PopulateModel first). The handler logs it, sets IsSuccessful to 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 && !HasPolicyNumber holds.
  5. 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.

Sources

  • src/NDReimbursementWebApp/Pages/NDReimbursement.cshtml.cs
  • src/NDReimbursementWebApp/wwwroot/js/DatePicker.js