mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-18 05:20:45 +01:00
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>
This commit is contained in:
parent
efacc43884
commit
66d95e7dcc
1 changed files with 8 additions and 1 deletions
|
|
@ -113,7 +113,7 @@ export default {
|
|||
this.displayName = signer?.displayName ?? ''
|
||||
this.identify = signer?.id ?? ''
|
||||
},
|
||||
saveSigner() {
|
||||
async saveSigner() {
|
||||
if (!this.signer?.method || !this.signer?.id) {
|
||||
return
|
||||
}
|
||||
|
|
@ -127,6 +127,13 @@ export default {
|
|||
},
|
||||
],
|
||||
})
|
||||
|
||||
try {
|
||||
await this.filesStore.saveWithVisibleElements({ visibleElements: [] })
|
||||
} catch (error) {
|
||||
console.error('Error saving signer:', error)
|
||||
}
|
||||
|
||||
this.displayName = ''
|
||||
this.identify = ''
|
||||
this.signer = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue