Whole site refactor. Added pinia stores and authentication capability.
This commit is contained in:
29
src/main.ts
29
src/main.ts
@@ -8,10 +8,35 @@ import MainForm from '@/components/MainForm.vue';
|
||||
import OrdersSelector from '@/components/OrdersSelector.vue'
|
||||
import ConfirmedForm from '@/components/ConfirmedForm.vue'
|
||||
import LoadingComponent from '@/components/LoadingComponent.vue'
|
||||
import axios from 'axios'
|
||||
import LoginModal from '@/components/LoginModal.vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import VueCookies from 'vue3-cookies'
|
||||
import { router } from '@/router/router'
|
||||
import { useSiteControlStore } from '@/stores/siteControl.store'
|
||||
import { useCategoriesStore } from '@/stores/categories.store'
|
||||
import { useOrdersStore } from '@/stores/orders.store'
|
||||
import { useContractorsStore } from '@/stores/contractors.store'
|
||||
|
||||
const app = createApp(App);
|
||||
const pinia = createPinia();
|
||||
app.use(pinia);
|
||||
app.use(VueCookies);
|
||||
app.use(router);
|
||||
useOrdersStore();
|
||||
useContractorsStore();
|
||||
useCategoriesStore();
|
||||
useSiteControlStore();
|
||||
|
||||
|
||||
export const axiosInstance = axios.create({
|
||||
baseURL: 'https://zamowienia.mleczarnia-kuzma.pl/api',
|
||||
withCredentials: true
|
||||
});
|
||||
|
||||
const app = createApp(App)
|
||||
app.component('VueDatePicker', VueDatePicker);
|
||||
app.component('ConfirmationModal', ConfirmationModal);
|
||||
app.component('LoginModal', LoginModal);
|
||||
app.component('NavBar', NavBar);
|
||||
app.component('MainForm', MainForm);
|
||||
app.component('OrdersSelector', OrdersSelector);
|
||||
@@ -56,7 +81,7 @@ export interface Contractor {
|
||||
Knt_Nazwa1: string,
|
||||
Knt_Nazwa2: string,
|
||||
Knt_Nazwa3: string,
|
||||
Knt_Niekatywny: number,
|
||||
Knt_Nieaktywny: number,
|
||||
Knt_NipE: string,
|
||||
Knt_NrDomu: string,
|
||||
Knt_OpiekunId: number,
|
||||
|
||||
Reference in New Issue
Block a user