Commit f34b6b4
feat(showcase): stamp real submitters on the seeded approval requests
Every seeded request had a null submitter, because the demo launches flows as
SYS and the approval node stamps the requester from the flow context
(`submitterId: context?.userId ?? null`, approval-node.ts). Consequences, all
invisible until you go looking:
* 申请人 rendered as `—` on every row and in the drawer;
* the "我发起的" inbox tab was empty for every user, so that whole surface
was dead; and
* the submitter-only affordances never rendered anywhere — `Send reminder`
and `Recall` are gated on `submitter_id == ctx.user.id`, so with no
submitter they were unreachable and only 5 of the 7 declared approval
actions could ever appear.
Pass `userId` on the engine context and route it deliberately:
* Invoice Dual Sign-off → submitted by the **admin**, so the logged-in dev
admin owns one request and "我发起的" is non-empty with the submitter-only
actions visible;
* Committee Quorum and Expense Sign-off → submitted by **Mei Phone (demo)**,
who holds no approval position and is therefore a clean requester who is
never one of her own approvers.
Verified in the running console: 申请人 now shows real names, "我发起的" holds
the admin's request, and the same viewer sees `Approve / Reject / Reassign /
Send back / Request info` on Mei's requests but those **plus** `Send reminder`
and `Recall` on his own — i.e. all 7 declared actions render, gated by role.
`tsc --noEmit` passes; boot log stays at 0 ERROR.
From the #3358 §1 evidence pass; follow-up to #3409.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent b132181 commit f34b6b4
1 file changed
Lines changed: 37 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
195 | 204 | | |
196 | 205 | | |
197 | 206 | | |
| |||
213 | 222 | | |
214 | 223 | | |
215 | 224 | | |
| 225 | + | |
216 | 226 | | |
217 | 227 | | |
218 | 228 | | |
| |||
250 | 260 | | |
251 | 261 | | |
252 | 262 | | |
253 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
254 | 266 | | |
255 | 267 | | |
256 | 268 | | |
| |||
272 | 284 | | |
273 | 285 | | |
274 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
275 | 290 | | |
276 | 291 | | |
277 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
278 | 302 | | |
279 | 303 | | |
280 | 304 | | |
281 | 305 | | |
282 | 306 | | |
283 | 307 | | |
284 | 308 | | |
285 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
286 | 319 | | |
287 | 320 | | |
288 | 321 | | |
| |||
299 | 332 | | |
300 | 333 | | |
301 | 334 | | |
| 335 | + | |
302 | 336 | | |
303 | 337 | | |
304 | 338 | | |
| |||
0 commit comments