fix: New PO Project Code Selection #126
Open
shad0w
wants to merge 2 commits from
claude/issue-124 into master
pull from: claude/issue-124
merge into: shad0w:master
shad0w:master
shad0w:claude/busy-boyd-b16092
shad0w:docs/changelog-microservices
shad0w:fix/po-pdf-cache
shad0w:fix/pdf-export-middleware
shad0w:claude/issue-121
shad0w:fix/reports-series-colors
shad0w:feat/staging-issue-verification
shad0w:fix/reports-chart-colors
shad0w:feat/reports
shad0w:feat/terms-conditions-admin
shad0w:feat/crewing-review-hardening
shad0w:feat/crewing-followups
shad0w:feat/crewing-appraisal
shad0w:feat/crewing-verification
shad0w:feat/crewing-signoff
shad0w:feat/crewing-admin
shad0w:feat/crewing-crew-records
shad0w:feat/crewing-onboarding
shad0w:feat/crewing-candidates
shad0w:feat/crewing-requisitions
shad0w:feat/crewing-foundations
shad0w:fix/xlsx-export-asset-sizing
shad0w:feat/po-cancel-supersede
shad0w:feat/company-header-logo-branding
shad0w:hotfix/button-portal-label
2 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
fd7b31e64d |
feat(reports): drill from cost centre / accounting code into PO History (#126)
Report detail pages now link to the underlying POs, addressing the PR #126 review comment: drilling into a cost centre or accounting code opens PO History pre-filtered to that dimension and the period in view. - Cost Centre / Accounting Code detail pages gain a "View POs" link. - periodRange() maps the on-screen period onto History's approved-date window (weekly→month, monthly→FY, yearly→full span); spend is dated by approvedAt. - PO History gains an accountId filter (any tree node, expanded to leaves via accountLeafIds()) matching PO-level OR line-item accounts — the same basis the reports use. - History page + CSV/PDF export share one buildPoHistoryWhere() builder so they never diverge. - Tests: unit (periodRange, accountLeafIds) + integration (History account filter across PO-level/line-item, with the approved window). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
4ed27d668b |
feat(po): Project Code dropdown on PO forms
Replace the free-text Project Code input with a native <select> carrying a fixed list of project codes (Petronet LNG Cochin, COMACOE Trombay, Haldia Reach, Haldia MMT, COMACOE Mandvi) plus an empty "— none —" option, across all three PO forms (new / edit / manager-edit). - Add a shared PROJECT_CODES constant in lib/validations/po.ts as the single source of truth. - Add a reusable <ProjectCodeField> (mirrors <DeliveryLocationField>): plain HTML select keeping name="projectCode" so the server actions are unchanged. - The field stays optional; projectCode remains a nullable free-text snapshot (no schema/migration, no validation tightening) so legacy/imported values are not rejected. On edit, a current value not in the list is preserved as a leading "(current)" option so it is never silently dropped. - Add unit tests for the new field. Fixes #124 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |