Skip to content

Commit 061a0e0

Browse files
committed
fix(Sign): prioritize signed result in envelope flow
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent afe383f commit 061a0e0

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

src/views/SignPDF/_partials/Sign.vue

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,19 @@ defineOptions({
296296
}
297297
}
298298
299-
if (anySigningInProgress) {
300-
this.actionHandler.closeModal(methodConfig.modalCode || methodConfig.method || 'token')
301-
this.$emit('signing-started', {
302-
signRequestUuid: myEnvelopeSigners[0].sign_request_uuid,
303-
async: true,
304-
})
305-
} else if (lastResult?.status === 'signed') {
299+
if (lastResult?.status === 'signed') {
306300
this.actionHandler.closeModal(methodConfig.modalCode || methodConfig.method || 'token')
307301
this.sidebarStore.hideSidebar()
308302
this.$emit('signed', {
309303
...lastResult.data,
310304
signRequestUuid: myEnvelopeSigners[0].sign_request_uuid,
311305
})
306+
} else if (anySigningInProgress) {
307+
this.actionHandler.closeModal(methodConfig.modalCode || methodConfig.method || 'token')
308+
this.$emit('signing-started', {
309+
signRequestUuid: myEnvelopeSigners[0].sign_request_uuid,
310+
async: true,
311+
})
312312
}
313313
} else {
314314
const payload = { ...basePayload }
@@ -711,19 +711,19 @@ let submitSignature = async (methodConfig: SignatureMethodConfig = {}) => {
711711
}
712712
713713
ensureServices()
714-
if (anySigningInProgress) {
715-
actionHandler!.closeModal(methodConfig.modalCode || methodConfig.method || 'token')
716-
emit('signing-started', {
717-
signRequestUuid: myEnvelopeSigners[0].sign_request_uuid,
718-
async: true,
719-
})
720-
} else if (lastResult?.status === 'signed') {
714+
if (lastResult?.status === 'signed') {
721715
actionHandler!.closeModal(methodConfig.modalCode || methodConfig.method || 'token')
722716
sidebarStore.hideSidebar()
723717
emit('signed', {
724718
...lastResult.data,
725719
signRequestUuid: myEnvelopeSigners[0].sign_request_uuid,
726720
})
721+
} else if (anySigningInProgress) {
722+
actionHandler!.closeModal(methodConfig.modalCode || methodConfig.method || 'token')
723+
emit('signing-started', {
724+
signRequestUuid: myEnvelopeSigners[0].sign_request_uuid,
725+
async: true,
726+
})
727727
}
728728
} else {
729729
const payload = { ...basePayload }

0 commit comments

Comments
 (0)