Commit 48d50fc
feat(finance,frontend): add product cost-sheet export UI, fill parameter drawer, and UI fixes (mutugading#74)
* fix(finance): remove unused CalculateRMCost generated types
Follows the backend/proto removal of the synchronous, admin-only
CalculateRMCost RPC (V1 consumption-only calc, superseded by V2 and the
async TriggerRMCostCalculation RPC). No frontend service/hook/BFF route
ever invoked this RPC — dead code.
Removes CalculateRMCostRequest/CalculateRMCostResponse from the generated
proto types and from the hand-written re-export wrapper.
Authored-By: Ilham R <ilhamram332@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(frontend): resolve fill-config UUID display + responsiveness bugs
Global Defaults and Product Overrides tabs on the fill-config page
rendered raw actor UUIDs instead of user/dept names. Add
FillConfigActorLabel to resolve unprefixed USER/DEPT actor values via
UserName/DeptName, and fix fixed-width popovers/grids on
FillConfigForm and the fill-tasks request picker so they don't
overflow on small screens.
* feat(frontend): replace fill parameters page with an inline drawer
Remove the standalone fill/[taskId] route and FillParamEntryPage in
favor of FillParamDrawer opened directly from FillTaskRow, matching
the drawer pattern used elsewhere in the fill-assignment flow.
Drop the Card wrapper from FillParamProductSection to match the
Edit Params drawer used on the product-request detail page, convert
FillTrackingTable to shadcn Table components, and add a breadcrumb
override on the request detail page to avoid flashing the raw
request ID.
* feat(finance): regenerate TS types for product cost-sheet export contracts
Generated from goapps-shared-proto's finance/v1/cost_calc.proto after
adding the export/batch/route-cost-sheet/period RPCs and messages.
Authored-By: Ilham R <ilhamram332@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* feat(finance): add product cost-sheet export UI, BFF routes, and hooks
Adds the BFF proxy routes for the async export pipeline (request-export,
periods, and the exports/[jobId] status/download/download-all/children
tree, including per-child download-url) and the corresponding
TanStack Query hooks in use-cost-calc.ts (useRequestCostSheetExport,
useExportJobStatus, useExportBatchProgress, recent-exports list).
ExportCostSheetButton drives both standalone and batch-parent export
jobs from one control: shows live progress for batch children, renders
a Download action once a standalone job completes, and exposes a
dismiss control to clear a previously-selected job back to idle.
ExportBatchFilesPopover lists per-child download links (each presigned
fresh on click) plus a download-all zip action.
RecentExportsPopover lets a user reopen a past export by job id without
re-triggering a new one.
cost-results-page-client.tsx replaces the standalone cost-result-filters
component with an inline filter bar wired to the new product_type_ids/
sort_by/sort_order/period params, and threads exportJobId through URL
state so a selected export survives a refresh. data-table.tsx gains
hideColumnsButton (the export toolbar owns its own actions) and switches
skeleton loading to per-row TableRow cells so column widths don't jump
once data arrives. notification-actions.ts generalizes the
notification-click download-route map to also cover
finance.product_cost_sheet_export.
Authored-By: Ilham R <ilhamram332@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(frontend): breadcrumb never falls back to raw sys-id on cost result detail
The cost-result detail page previously let dynamic-breadcrumb derive the
trail from the URL segment, which showed the raw system id when the
product/period label hadn't loaded yet (and could flash the id before
the real label painted in). Adds useBreadcrumbTrail so the page can push
an explicit, already-resolved trail (using the new calcTypeLabel helper
in format.ts, also shared by the results list), and switches
dynamic-breadcrumb's override wiring to useIsomorphicLayoutEffect so the
trail is set before first paint instead of flashing the fallback first.
Authored-By: Ilham R <ilhamram332@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(finance): resolve MASTER_LOOKUP params in formula input picker
Formula inputs such as F_YARN_VB1_LOSS consume MASTER_LOOKUP params
(CHANGE_OVER_QLTY_LOSS, VOLUME_BUCKET_1_QTY), but the input picker only
queried INPUT/RATE/CALCULATED, so those ids were unresolvable and
rendered as raw UUIDs with no way to checklist them. Adds the
MASTER_LOOKUP param query to the pool and a resolveParamLabel fallback
that checks the pool first, then the formula's own joined inputParams,
before ever falling back to a placeholder — never a bare UUID.
Authored-By: Ilham R <ilhamram332@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* docs(frontend): clarify use-url-state ref staleness in the setState comment
The comment claimed the ref was synced during render, but it is synced
in a passive effect and lags by one commit. No functional change — the
lag is not currently observable since every caller passes a whole new
object or derives from state directly — just correcting the comment so
it doesn't mislead the next person relying on the ref inside an
earlier-running effect.
Authored-By: Ilham R <ilhamram332@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>42 files changed
Lines changed: 5889 additions & 1435 deletions
File tree
- src
- app
- (dashboard)/finance
- costing
- fill-config
- fill-tasks
- product-requests/[requestId]
- fill/[taskId]
- api/v1/finance/cost-results
- exports
- [jobId]
- children
- [childJobId]/download-url
- download-all
- download
- status
- periods
- request-export
- components
- common
- finance
- cost-results
- fill-assignment
- formula
- iam/notifications
- config
- hooks/finance
- lib/hooks
- types
- finance
- generated/finance/v1
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 194 additions & 131 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
15 | 25 | | |
16 | 26 | | |
17 | 27 | | |
| |||
56 | 66 | | |
57 | 67 | | |
58 | 68 | | |
59 | | - | |
| 69 | + | |
60 | 70 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
67 | | - | |
| 79 | + | |
68 | 80 | | |
69 | 81 | | |
70 | 82 | | |
| |||
149 | 161 | | |
150 | 162 | | |
151 | 163 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
163 | 169 | | |
164 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
165 | 175 | | |
166 | | - | |
167 | | - | |
168 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
169 | 180 | | |
170 | 181 | | |
171 | 182 | | |
| |||
226 | 237 | | |
227 | 238 | | |
228 | 239 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
243 | 266 | | |
244 | 267 | | |
245 | 268 | | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
Lines changed: 58 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
Lines changed: 54 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
0 commit comments