Skip to content

Calculator ​

Calculator page screenshot

Overview ​

The calculator is a client-side lease payment and amortization preview form.

  • Route: /calculator (protected)
  • Source: front/src/pages/Calculator.tsx
  • Layout: DashboardLayout

User actions and data flow ​

The page maintains input state for simple, stepped, or date-band payments; lease dates, discount rate, currency, payment timing, prepaid amount, and rent-free periods. It uses calculation and payment-band utilities to produce a preview and offers report/download-related controls in the UI.

The page's visible calculations are implemented in front/src/utils/calculations.ts; do not treat the client preview as a backend result. The /calculator page itself does not call the backend preview endpoint in the inspected source. The separate lease-creation/edit wizard calls POST /leases/calculate-preview from its Review & Confirm step to retrieve backend-calculated preview values.

States and components ​

Uses shared inputs, selects, date range and payment-band pickers, and buttons. Calculation results are driven by local state. Source: front/src/pages/Calculator.tsx.

See POST /leases/calculate-preview for the backend preview used by the lease wizard Review & Confirm step.