Appearance
Salesman Visits
| Backlog field | Value |
|---|---|
| Story ID | AP-VAN-002 |
| Epic | Van Sales |
| Story type | Business workflow |
| Review status | Draft - business analyst and business owner review required |
| Source evidence | AppsPortal.Apis controller, application command/query handlers, validators, domain entities, and matching MFE workflow where available |
| Last source review | 2026-07-10 |
User story
As distribution managers, I want to plan and review salesperson visits so that field activity follows assigned customers and schedules.
Acceptance criteria
- Only authorized users can view or execute the feature's actions.
- Required business data, active dependencies, tenant/branch scope, and current document state are validated.
- Invalid requests return actionable validation errors without applying a partial change.
- Search, list, view, print, and export operations use the same authorized business scope.
- Material create, edit, status, approval, posting, reversal, and integration actions are auditable where applicable.
- Financial or stock effects are applied atomically and no more than once.
Business rules
Required
Salesperson, customer/location, planned date/time, route/plan, and status are required.
Optional or conditional
Notes, objectives, outcomes, attachments, and reschedule reason are optional/conditional.
Action behavior
Start/complete/cancel updates visit status/history only; invoices/orders follow their own posting rules.
Blocking rule or downstream effect
A user cannot complete an unauthorized or invalid-sequence visit.
Frontend page coverage
The following UI coverage is sourced from the pulled MFE route configuration. A Module-level supporting artifact mapping is evidence of a reachable screen, but requires BA confirmation that it belongs to this story rather than a more specific feature story.
| Route/page | Component | Mode | Route permission/guard | Mapping confidence | Source |
|---|---|---|---|---|---|
| salesman-distribution-sales-report | SalesmanDistributionSalesReportComponent | Report/print | No route-level permission/guard found in source window | Feature token match | apps/distribution/src/app/remote-entry/reports/reports-routing.module.ts:17 |
Observed frontend fields and validation
| Component | Control | Observed frontend rule | Component source |
|---|---|---|---|
| SalesmanDistributionSalesReportFiltersComponent | customerIds | Visible control; optional or API-dependent | apps/distribution/src/app/remote-entry/reports/salesman-distribution-sales-report/components/salesman-distribution-sales-report-filters/salesman-distribution-sales-report-filters.component.ts |
| SalesmanDistributionSalesReportFiltersComponent | salesmanIds | Visible control; optional or API-dependent | apps/distribution/src/app/remote-entry/reports/salesman-distribution-sales-report/components/salesman-distribution-sales-report-filters/salesman-distribution-sales-report-filters.component.ts |
Observed frontend actions
| Component | Click action/handler | Business review requirement | Component source |
|---|---|---|---|
| SalesmanDistributionSalesReportComponent | onPrint | Generate the printout for the selected record and authorized branch/tenant; use posted/current values and surface print, template, ZATCA/ETA, or popup failures without changing transaction state. | apps/distribution/src/app/remote-entry/reports/salesman-distribution-sales-report/salesman-distribution-sales-report.component.ts |
| SalesmanDistributionSalesReportComponent | onSalesmanClick | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/distribution/src/app/remote-entry/reports/salesman-distribution-sales-report/salesman-distribution-sales-report.component.ts |
| SalesmanDistributionSalesReportComponent | onViewData | Open the authorized record in view mode with its status, totals, lines, source and generated-document links; handle deleted, forbidden, and missing records without exposing stale data. | apps/distribution/src/app/remote-entry/reports/salesman-distribution-sales-report/salesman-distribution-sales-report.component.ts |
Page-specific frontend acceptance criteria
- salesman-distribution-sales-report - Report/print: Expose documented filters, validation, empty/loading/error states, authorized results, totals, drill-through, print, and export behavior where present. Security observed: No route-level permission/guard found in source window