Commit debc23a
feat(approvals): enrich inbox rows with payload_labels (snapshot field labels) (#3501)
The approvals inbox summary title-cased raw snapshot machine keys
("assessment_status" → "Assessment Status") because the API sent no field
labels. Add `payload_labels` (snapshot field key → the target object's field
label) to the inbox enrichment, symmetric with the existing `payload_display`
(which resolves the values). For a single-locale project the schema label is
already the localized string, so the client can render "考核状态" instead of a
prettified English key; the client falls back to the prettified key when a
label is absent.
- ApprovalRequestRow contract: add `payload_labels?`.
- ApprovalService.enrichRows: resolve per-object field labels and attach the
ones whose keys are present in the snapshot.
- Add a service test.
Action/param i18n (the `_actions` translation bundles) is intentionally NOT
included here — framework main already ships complete action translations for
sys_approval_request across en/zh-CN/ja-JP/es-ES.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 879ea13 commit debc23a
4 files changed
Lines changed: 83 additions & 2 deletions
File tree
- .changeset
- packages
- plugins/plugin-approvals/src
- spec/src/contracts
| 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 | + | |
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
858 | 858 | | |
859 | 859 | | |
860 | 860 | | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
861 | 882 | | |
862 | 883 | | |
863 | 884 | | |
| |||
Lines changed: 38 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2292 | 2292 | | |
2293 | 2293 | | |
2294 | 2294 | | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
2295 | 2314 | | |
2296 | 2315 | | |
2297 | 2316 | | |
2298 | | - | |
2299 | | - | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
2300 | 2320 | | |
2301 | 2321 | | |
2302 | 2322 | | |
| |||
2335 | 2355 | | |
2336 | 2356 | | |
2337 | 2357 | | |
| 2358 | + | |
| 2359 | + | |
2338 | 2360 | | |
2339 | 2361 | | |
2340 | 2362 | | |
| 2363 | + | |
| 2364 | + | |
2341 | 2365 | | |
2342 | 2366 | | |
2343 | 2367 | | |
| |||
2405 | 2429 | | |
2406 | 2430 | | |
2407 | 2431 | | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
2408 | 2444 | | |
2409 | 2445 | | |
2410 | 2446 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
115 | 124 | | |
116 | 125 | | |
117 | 126 | | |
| |||
0 commit comments