Add global settings (#40)

This commit is contained in:
Jonas Plum
2022-03-13 13:45:10 +01:00
committed by GitHub
parent 86daadc73d
commit 18a4dc54e7
30 changed files with 1297 additions and 255 deletions

View File

@@ -1,7 +1,7 @@
import Vue from "vue";
import Vuex, {ActionContext} from "vuex";
import {API} from "@/services/api";
import {UserData, TicketList, Settings, UserResponse} from "@/client";
import {UserData, TicketList, Settings, UserResponse, SettingsResponse} from "@/client";
import {AxiosResponse} from "axios";
import {Alert} from "@/types/types";
import {templateStore} from "./modules/templates";
@@ -68,7 +68,7 @@ export default new Vuex.Store({
})
},
getSettings (context: ActionContext<any, any>) {
API.getSettings().then((response: AxiosResponse<Settings>) => {
API.getSettings().then((response: AxiosResponse<SettingsResponse>) => {
context.commit("setSettings", response.data);
context.dispatch("fetchCount");
})