Commit afe76cd
fix(ModalVerificationCode): keep modal open during signing request
On step 3, signDocument() was self-closing the modal immediately after
emitting 'change', causing a jarring UX: the modal disappeared while the
signing API call was still in-flight, leaving a spinner on a disappeared
dialog.
- Remove self-close from signDocument(); parent (Sign.vue) already calls
actionHandler.closeModal() on both sync and async signing paths, so the
modal closes at the right time after the request completes.
- Set loading=true in signDocument() so the dialog stays disabled and
shows a spinner while the API call runs.
- Add watcher on signStore.errors to reset loading=false when the signing
request fails, allowing the user to retry without being stuck.
- Async signing path is unaffected: Sign.vue closes the modal before
transitioning to the progress screen.
Tests added to cover:
- signDocument emits change with token and does not emit close
- signStore.errors watcher resets loading on failure (both modes)
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>1 parent 641bdc1 commit afe76cd
2 files changed
Lines changed: 79 additions & 4 deletions
File tree
- src
- tests/views/SignPDF/_partials
- views/SignPDF/_partials
Lines changed: 72 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
189 | 233 | | |
190 | 234 | | |
191 | 235 | | |
| |||
370 | 414 | | |
371 | 415 | | |
372 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
373 | 445 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
282 | 287 | | |
283 | 288 | | |
284 | 289 | | |
| |||
377 | 382 | | |
378 | 383 | | |
379 | 384 | | |
| 385 | + | |
380 | 386 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | 387 | | |
385 | 388 | | |
386 | 389 | | |
| |||
0 commit comments