Skip to content

Policy Summary

Policy Summary is the landing page of the Policy Services Portal once a policy is in context. Underwriting and customer-service staff reach it from the menu or from Policy Search, and use it to confirm coverage dates, the premium balance, and the current payroll report status before acting on the policy. The page loads the policy named by the WebContext policy number, renders the summary panels, and exposes handlers to refresh the premium balance, print the declaration page, and open the payroll report history in a dialog. From here the user moves to payroll reports, a new endorsement, or the premium ledger.

Route

Page Handler Verb URL Route parameters Page model Layout
/Policy/Summary OnGetAsync GET /Policy/Summary/{policyNumber?} policyNumber SummaryModel (Pages/Policy/Summary.cshtml.cs) _PolicyLayout
/Policy/Summary OnPostRefreshBalanceAsync POST /Policy/Summary?handler=RefreshBalance — SummaryModel _PolicyLayout

Access

Requirement Declared on Effect
[SecurityApiAuthorize("PolicyServices.Read,PolicyServices.Underwriting")] BolPolicyModel† Only users holding one of the two roles can open any page that derives from the policy page model
[SecurityApiAuthorize("PolicyServices.Underwriting")] SummaryModel.OnPostRefreshBalanceAsync Only underwriting staff can refresh the balance; others receive a redirect to /AccessDenied
IsAuthorizedAsync(Roles.Billing) SummaryModel.OnGetAsync Billing roles see the Premium ledger link; other users do not
Anti-forgery validation Razor Pages default for unsafe verbs Covers OnPostRefreshBalanceAsync; the page form emits the token through the form tag helper

Entry conditions

  • The user selects Policy Summary from the policy menu; the entry is BasicAppMap.PageIds.PolicySummary.
  • The user follows an Open link from Policy Search, which passes policyNumber as a route parameter.
  • The page requires a policy number in WebContext. When none is present the base page model redirects to /Policy/Search†.

Fields

Field Binds to Control Purpose Validation
Policy number Summary.PolicyNumber Read-only <span> Identifies the policy in context None; display only
Employer Summary.EmployerName Read-only <span> Insured employer of record None; display only
Coverage period Summary.EffectiveDate, Summary.ExpirationDate Read-only <span> Current term of the policy None; display only
Premium balance Summary.PremiumBalance Read-only <span> Outstanding premium balance, formatted as currency None; display only
Report year ReportYear Kendo DropDownList Year used when the payroll report dialog opens [BindProperty(SupportsGet = true)]; must be a year listed in the policy history; client-side yes
Refresh balance — Button Re-reads the premium balance from the billing service Subject to anti-forgery validation

Operations

Operation Trigger Request Description Delegates to
load-summary Page load GET /Policy/Summary Reads the policy and premium balance for the policy number in context and populates the summary panels GetPolicySummary in SAIF.Policy.Services†
refresh-balance btnRefreshBalance click POST /Policy/Summary?handler=RefreshBalance Re-reads the premium balance from the billing service and redisplays the page RefreshPremiumBalance
print-declaration Print declaration link GET /Policy/Summary?handler=Declaration Streams the declaration page for the policy as a PDF file result RenderDeclaration in SAIF.Policy.Documents†
open-payroll-history lnkPayrollHistory click GET /Policy/Summary?handler=PayrollHistory Returns the payroll report history partial for the selected report year —

Dialogs and partials

Name Opens as Returned by Purpose
_PayrollHistory Bootstrap modal, fetched into #dlgPayroll GET /Policy/Summary?handler=PayrollHistory Lists payroll reports filed for the selected year with their status

AJAX and grid actions

Request Kind Called by Returns
GET /Policy/Summary?handler=PayrollHistory Partial fetch policySummary.openPayrollHistory() _PayrollHistory partial view
GET /Policy/Summary?handler=Declaration File handler Print declaration link FileStreamResult, application/pdf

Client-side behavior

  • Script module: wwwroot/js/policy/summary.js
  • The ReportYear dropdown is a Kendo DropDownList; changing it reloads the payroll history partial when the dialog is open.
  • policySummary.openPayrollHistory() fetches the partial with fetch, injects it into #dlgPayroll, and shows the Bootstrap modal.
  • Failed fetches raise a toast through the BolMiddleware notification helper†.

States

State Condition
Redirect to /AccessDenied The user lacks the role required by the handler
ErrorMessage banner The billing service call fails during Refresh balance; the page redisplays with the previous balance
Premium ledger link hidden The user does not hold a billing role

Business rules

Rule ID Rule Enforcement Source
BR-SCR-001 Only underwriting staff can refresh a premium balance [SecurityApiAuthorize] on OnPostRefreshBalanceAsync src/SAIF.Policy.Portal/Pages/Policy/Summary.cshtml.cs:64
BR-SCR-002 Payroll history can only be requested for a year in the policy history ReportYear validated against Summary.PolicyYears in OnGetPayrollHistoryAsync src/SAIF.Policy.Portal/Pages/Policy/Summary.cshtml.cs:92
BR-APP-001 A policy number must be in context before a policy page renders Base page model redirect† BolPolicyModel†
Target Trigger Parameters
Payroll Reports Payroll reports menu entry or panel link policyNumber route parameter
New Endorsement Start endorsement button policyNumber route parameter
Premium Ledger Premium ledger link, shown to billing roles policyNumber route parameter

Screen flow diagram

flowchart TD
    A[Policy Summary] -->|Payroll reports| B[Payroll Reports]
    A -->|Start endorsement| C[New Endorsement]
    A -->|Premium ledger| D[Premium Ledger]
    B -->|Back to summary| A

[!NOTE] Statements marked with * are inferred from code patterns. Statements marked with ** could not be verified from available source. Statements marked with † are sourced from package documentation retrieved with the Legends CLI.

Sources

  • src/SAIF.Policy.Portal/Pages/Policy/Summary.cshtml
  • src/SAIF.Policy.Portal/Pages/Policy/Summary.cshtml.cs
  • src/SAIF.Policy.Portal/Pages/Policy/_PayrollHistory.cshtml
  • src/SAIF.Policy.Portal/Models/PolicySummaryViewModel.cs
  • src/SAIF.Policy.Portal/wwwroot/js/policy/summary.js