Commit 7df5fa7
feat: show 'Request signatures' button only for draft signers in appropriate order
The 'Request signatures' button now appears conditionally based on signing flow:
- Parallel flow: Shows when any signer has DRAFT status (status === 0)
- Sequential flow: Shows only when current signing order has draft signers
- Finds the lowest pending order among unsigned signers
- Checks if that order contains any draft signers
This prevents requesting signatures from signers who aren't in their turn yet
in sequential signing, while maintaining flexibility in parallel signing.
Refactored logic into smaller, focused methods:
- hasAnyDraftSigner: Checks for any draft signer (parallel mode)
- hasSequentialDraftSigners: Orchestrates sequential mode verification
- getCurrentSigningOrder: Gets current order that should sign
- hasOrderDraftSigners: Checks if specific order has draft signers
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>1 parent 07285d7 commit 7df5fa7
1 file changed
Lines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
315 | 325 | | |
316 | 326 | | |
317 | 327 | | |
| |||
379 | 389 | | |
380 | 390 | | |
381 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
382 | 413 | | |
383 | 414 | | |
384 | 415 | | |
| |||
0 commit comments