lizerk
|
19f6f660b0
|
refactor: extract procurement page orchestration into hook
- add useProcurementPage hook for loading, filters, modal state and workflow actions
- keep procurement page focused on rendering and section layout
- preserve existing UI behavior while removing API/state orchestration from page component
- frontend checks: eslint clean, TypeScript typecheck clean
- backend checks: realtime websocket smoke, procurement and equipment suites green
|
2026-04-01 16:34:04 +03:00 |
|
lizerk
|
0a80eb86cf
|
refactor: extract shared utils/components, split requests page data into hook
- Create frontend/src/lib/shared/ with formatters, userUtils, paginationUtils
(formatDate, formatMoney, displayUserName, userProfileLink, extractNextPage, loadAllPages)
- Create frontend/src/components/shared/SearchableSelect.tsx
(SearchableSelectSingle + SearchableSelectMulti, replaces 3 inline copies)
- Extract requests page data/state/actions into useRequestsPage hook
(requests/page.tsx: 1580 → ~280 lines of pure JSX)
- Replace duplicated helpers in equipment/page.tsx with shared imports
(~80 lines removed: formatDate, formatMoney, displayUserName, extractNextPage,
loadAllPages, inline SearchableSelectSingle)
- Replace duplicated helpers in procurement/page.tsx with shared imports
(~90 lines removed: fmt, money, displayUserName, extractNextPage,
inline departments loader, inline SearchableSelectSingle)
- 609 backend tests pass, TypeScript typecheck clean, ESLint clean
|
2026-04-01 16:21:02 +03:00 |
|