mirror of
https://github.com/crater-invoice/crater.git
synced 2026-02-09 12:22:40 -05:00
build version 400
This commit is contained in:
20
resources/assets/js/store/modules/disk/mutations.js
Normal file
20
resources/assets/js/store/modules/disk/mutations.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import * as types from './mutation-types'
|
||||
|
||||
export default {
|
||||
[types.SET_DISKS](state, disks) {
|
||||
state.disks = disks
|
||||
},
|
||||
|
||||
[types.SET_DISK_DRIVER](state, data) {
|
||||
state.diskDrivers = data.drivers
|
||||
},
|
||||
|
||||
[types.ADD_DISKS](state, data) {
|
||||
state.disks.push(data.disk)
|
||||
},
|
||||
|
||||
[types.DELETE_DISK](state, id) {
|
||||
let pos = state.disks.findIndex((disk) => disk.id === id)
|
||||
state.disks.splice(pos, 1)
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user