Add tables for almost every admin change, update composer dependencies

This commit is contained in:
Matthew Penner 2021-01-05 14:52:49 -07:00
parent 8f1a5bf0ab
commit 59de9576c9
42 changed files with 3327 additions and 1241 deletions

View 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;