Add tables for almost every admin change, update composer dependencies
This commit is contained in:
parent
8f1a5bf0ab
commit
59de9576c9
42 changed files with 3327 additions and 1241 deletions
27
resources/scripts/state/admin/mounts.ts
Normal file
27
resources/scripts/state/admin/mounts.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
import { action, Action } from 'easy-peasy';
|
||||
|
||||
export interface AdminMountStore {
|
||||
selectedMounts: number[];
|
||||
|
||||
setSelectedMounts: Action<AdminMountStore, number[]>;
|
||||
appendSelectedMount: Action<AdminMountStore, number>;
|
||||
removeSelectedMount: Action<AdminMountStore, number>;
|
||||
}
|
||||
|
||||
const mounts: AdminMountStore = {
|
||||
selectedMounts: [],
|
||||
|
||||
setSelectedMounts: action((state, payload) => {
|
||||
state.selectedMounts = payload;
|
||||
}),
|
||||
|
||||
appendSelectedMount: action((state, payload) => {
|
||||
state.selectedMounts = state.selectedMounts.filter(id => id !== payload).concat(payload);
|
||||
}),
|
||||
|
||||
removeSelectedMount: action((state, payload) => {
|
||||
state.selectedMounts = state.selectedMounts.filter(id => id !== payload);
|
||||
}),
|
||||
};
|
||||
|
||||
export default mounts;
|
Loading…
Add table
Add a link
Reference in a new issue