Skip to content

Commit

Permalink
chore: implement validate
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Oct 19, 2024
1 parent a88675c commit afc3f1b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/views/FilesList/FileEntry/FileEntryActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'
import { useActionsMenuStore } from '../../../store/actionsmenu.js'
import { useFilesStore } from '../../../store/files.js'
import { useSidebarStore } from '../../../store/sidebar.js'
import { useSignStore } from '../../../store/sign.js'
export default {
Expand Down Expand Up @@ -65,10 +66,12 @@ export default {
setup() {
const actionsMenuStore = useActionsMenuStore()
const filesStore = useFilesStore()
const sidebarStore = useSidebarStore()
const signStore = useSignStore()
return {
actionsMenuStore,
filesStore,
sidebarStore,
signStore,
}
},
Expand Down Expand Up @@ -112,9 +115,11 @@ export default {
},
methods: {
async onActionClick(action) {
const uuid = this.source.uuid
this.openedMenu = null
this.sidebarStore.hideSidebar()
if (action.id === 'sign') {
this.openedMenu = null
const uuid = this.source.signers
this.source.signers
.reduce((accumulator, signer) => {
if (signer.me) {
return signer.sign_uuid
Expand All @@ -124,6 +129,8 @@ export default {
this.signStore.setDocumentToSign(this.source)
this.$router.push({ name: 'SignPDF', params: { uuid } })
this.filesStore.selectFile(this.source.nodeId)
} else if (action.id === 'validate') {
this.$router.push({ name: 'ValidationFile', params: { uuid } })
}
},
registerAction(action) {
Expand Down

0 comments on commit afc3f1b

Please sign in to comment.