Commit c7f6aa8
feat(approvals): enrich inbox rows with payload_labels (snapshot field labels)
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 d75edb9 commit c7f6aa8
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 | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
601 | 622 | | |
602 | 623 | | |
603 | 624 | | |
| |||
Lines changed: 38 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1968 | 1968 | | |
1969 | 1969 | | |
1970 | 1970 | | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
1971 | 1990 | | |
1972 | 1991 | | |
1973 | 1992 | | |
1974 | | - | |
1975 | | - | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
1976 | 1996 | | |
1977 | 1997 | | |
1978 | 1998 | | |
| |||
2011 | 2031 | | |
2012 | 2032 | | |
2013 | 2033 | | |
| 2034 | + | |
| 2035 | + | |
2014 | 2036 | | |
2015 | 2037 | | |
2016 | 2038 | | |
| 2039 | + | |
| 2040 | + | |
2017 | 2041 | | |
2018 | 2042 | | |
2019 | 2043 | | |
| |||
2081 | 2105 | | |
2082 | 2106 | | |
2083 | 2107 | | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
2084 | 2120 | | |
2085 | 2121 | | |
2086 | 2122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
93 | 102 | | |
94 | 103 | | |
95 | 104 | | |
| |||
0 commit comments