Skip to content

Commit

Permalink
Merge pull request #3998 from LibreSign/backport/3996/stable30
Browse files Browse the repository at this point in the history
[stable30] fix: retrieve file when request to sign from file list
  • Loading branch information
vitormattos authored Nov 19, 2024
2 parents 55b15ca + ac19066 commit ddc875e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
26 changes: 14 additions & 12 deletions src/store/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,20 @@ export const useFilesStore = function(...args) {
if (!filter) {
return this.files
}
return Object.fromEntries(
Object.entries(this.files).filter(([key, value]) => {
if (filter.signer_uuid) {
// return true when found signer by signer_uuid
return value.signers.filter((signer) => {
// filter signers by signer_uuid
return signer.sign_uuid === filter.signer_uuid
}).length > 0
}
return false
}),
)
if (!filter.force_fetch) {
return Object.fromEntries(
Object.entries(this.files).filter(([key, value]) => {
if (filter.signer_uuid) {
// return true when found signer by signer_uuid
return value.signers.filter((signer) => {
// filter signers by signer_uuid
return signer.sign_uuid === filter.signer_uuid
}).length > 0
}
return false
}),
)
}
}
this.loading = true
const url = !this.paginationNextUrl
Expand Down
6 changes: 5 additions & 1 deletion src/views/FilesList/FileEntry/FileEntryActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ export default {
}
return accumulator
}, '')
this.signStore.setDocumentToSign(this.source)
const files = await this.filesStore.getAllFiles({
signer_uuid: signUuid,
force_fetch: true,
})
this.signStore.setDocumentToSign(files[this.source.nodeId])
this.$router.push({
name: 'SignPDF',
params: {
Expand Down

0 comments on commit ddc875e

Please sign in to comment.