File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export default {
7070 }
7171 if (this .signRequestUuid !== ' ' ) {
7272 config .headers = {
73- ' LibreSign -sign-request-uuid' : this .signRequestUuid ,
73+ ' libresign -sign-request-uuid' : this .signRequestUuid ,
7474 }
7575 }
7676 await axios (config)
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export default {
7070 },
7171 computed: {
7272 signers () {
73- return this .filesStore .getFile ()? .signers ?? []
73+ return this .filesStore .getFile ().signers
7474 },
7575 sortableSigners: {
7676 get () {
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ const slugfy = (val) =>
3232 . replace ( / - + $ / , '' )
3333
3434export const useFilesStore = function ( ...args ) {
35+ const emptyFile = { signers : [ ] }
3536 const store = defineStore ( 'files' , {
3637 state : ( ) => {
3738 return {
@@ -68,7 +69,7 @@ export const useFilesStore = function(...args) {
6869 if ( typeof file === 'object' ) {
6970 return file
7071 }
71- return this . files [ this . selectedNodeId ] ?? { }
72+ return this . files [ this . selectedNodeId ] || emptyFile
7273 } ,
7374 async flushSelectedFile ( ) {
7475 const files = await this . getAllFiles ( {
@@ -222,6 +223,9 @@ export const useFilesStore = function(...args) {
222223 }
223224 }
224225 this . getFile ( ) . signers . push ( signer )
226+ const selected = this . selectedNodeId
227+ this . selectFile ( - 1 ) // to force reactivity
228+ this . selectFile ( selected ) // to force reactivity
225229 } ,
226230 async deleteSigner ( signer ) {
227231 if ( ! isNaN ( signer . signRequestId ) ) {
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export const useSignatureElementsStore = function(...args) {
5454 }
5555 if ( this . signRequestUuid !== '' ) {
5656 config . headers = {
57- 'LibreSign -sign-request-uuid' : this . signRequestUuid ,
57+ 'libresign -sign-request-uuid' : this . signRequestUuid ,
5858 }
5959 }
6060 await axios ( config )
@@ -98,7 +98,7 @@ export const useSignatureElementsStore = function(...args) {
9898 }
9999 if ( this . signRequestUuid !== '' ) {
100100 config . headers = {
101- 'LibreSign -sign-request-uuid' : this . signRequestUuid ,
101+ 'libresign -sign-request-uuid' : this . signRequestUuid ,
102102 }
103103 }
104104 await axios ( config )
@@ -128,7 +128,7 @@ export const useSignatureElementsStore = function(...args) {
128128 }
129129 if ( this . signRequestUuid !== '' ) {
130130 config . headers = {
131- 'LibreSign -sign-request-uuid' : this . signRequestUuid ,
131+ 'libresign -sign-request-uuid' : this . signRequestUuid ,
132132 }
133133 }
134134 await axios ( config )
You can’t perform that action at this time.
0 commit comments