feat: rename js files to ts
This commit is contained in:
parent
4cff3ebee1
commit
15b67136fe
114 changed files with 0 additions and 0 deletions
23
src/store/modules/attachments.ts
Normal file
23
src/store/modules/attachments.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import {findIndexById} from '@/helpers/utils'
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: () => ({
|
||||
attachments: [],
|
||||
}),
|
||||
mutations: {
|
||||
set(state, attachments) {
|
||||
console.debug('Set attachments', attachments)
|
||||
state.attachments = attachments
|
||||
},
|
||||
add(state, attachment) {
|
||||
console.debug('Add attachement', attachment)
|
||||
state.attachments.push(attachment)
|
||||
},
|
||||
removeById(state, id) {
|
||||
const attachmentIndex = findIndexById(state.attachments, id)
|
||||
state.attachments.splice(attachmentIndex, 1)
|
||||
console.debug('Remove attachement', id)
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in a new issue