FPSMS-frontend
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 1 месец
1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # PO Workbench module
  2. Purchase order receiving workbench at `/po/workbench`.
  3. ## Public API
  4. Only **`PoWorkbenchShell`** is imported from outside this folder (via `PoWorkbenchPageClient`). Do not import subfolders from other routes.
  5. ## Layout (desktop)
  6. ```
  7. searchCriteria | detailsHeader
  8. searchResults | details (form + line grid)
  9. ```
  10. - **layout/** — `PoWorkbenchShell` 2×2 grid tokens and `PoWorkbenchRegion` pane chrome.
  11. - **search/** — Criteria bar, advanced filters, PO list, `/po/list` hook and mappers.
  12. - **details/** — Selected PO summary header.
  13. - **detailsGrid/** — Receipt form and four-column line grid (mock lines until detail API).
  14. - **shared/** — Result summary, receive status chip, shared icon/typography tokens.
  15. - **mock/** — Optional local list fixtures (`PO_WORKBENCH_LIST_MOCK_ROWS`); not used by production shell.
  16. ## Naming
  17. | Kind | Pattern | Example |
  18. |------|---------|---------|
  19. | Component | `PoWorkbench` + PascalCase | `PoWorkbenchDetailsGrid.tsx` |
  20. | Hook | `usePoWorkbench` + camelCase | `usePoWorkbenchListSearch.ts` |
  21. | Helper / layout | `poWorkbench` + camelCase file | `poWorkbenchDetailsGridLayout.ts` |
  22. | Type | `PoWorkbench` + domain | `PoWorkbenchListRow` |
  23. | Constant | `PO_WORKBENCH_*` / `DETAILS_GRID_*` | `PO_WORKBENCH_GRID_TEMPLATE_COLUMNS` |
  24. ## Data flow
  25. 1. User filters → `usePoWorkbenchListSearch` → `GET /po/list` → `PoWorkbenchListRow[]`.
  26. 2. Selection → `PoWorkbenchDetailsHeader` + `PoWorkbenchDetailsGrid`.
  27. 3. Detail lines: `PO_WORKBENCH_DETAILS_GRID_MOCK_ROWS` (replace with API later).
  28. ## Comments
  29. Source comments are in **English**. UI strings use i18n (`poWorkbench`, `purchaseOrder` for status labels).