Skip to content

Commit 66d95e7

Browse files
committed
feat: auto-save signer with status 0 when added
Automatically saves the signer to the server with status 0 (draft) when the user adds a new signer through the Add Signer dialog. This eliminates the need for a separate manual save action after adding each signer. The PATCH request is sent to /apps/libresign/api/v1/request-signature with status: 0 immediately after the signer is added to the local state. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent efacc43 commit 66d95e7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Components/Request/IdentifySigner.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default {
113113
this.displayName = signer?.displayName ?? ''
114114
this.identify = signer?.id ?? ''
115115
},
116-
saveSigner() {
116+
async saveSigner() {
117117
if (!this.signer?.method || !this.signer?.id) {
118118
return
119119
}
@@ -127,6 +127,13 @@ export default {
127127
},
128128
],
129129
})
130+
131+
try {
132+
await this.filesStore.saveWithVisibleElements({ visibleElements: [] })
133+
} catch (error) {
134+
console.error('Error saving signer:', error)
135+
}
136+
130137
this.displayName = ''
131138
this.identify = ''
132139
this.signer = {}

0 commit comments

Comments
 (0)