mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 11:42:15 +01:00
refactor tag components and tagCreate events, change global week_start and timezone settings, fix pie charts
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import './bootstrap';
|
||||
import '../css/app.css';
|
||||
import type { DefineComponent } from 'vue';
|
||||
import { type DefineComponent } from 'vue';
|
||||
import { createApp, h } from 'vue';
|
||||
import { createInertiaApp } from '@inertiajs/vue3';
|
||||
import { createInertiaApp, usePage } from '@inertiajs/vue3';
|
||||
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
|
||||
import { ZiggyVue } from '../../vendor/tightenco/ziggy';
|
||||
import { createPinia } from 'pinia';
|
||||
import type { User } from '@/types/models';
|
||||
|
||||
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
|
||||
const pinia = createPinia();
|
||||
@@ -24,6 +25,22 @@ createInertiaApp({
|
||||
if (window.vueAppSetupHook) {
|
||||
window.vueAppSetupHook(app);
|
||||
}
|
||||
window.getWeekStartSetting = function () {
|
||||
const page = usePage<{
|
||||
auth: {
|
||||
user: User;
|
||||
};
|
||||
}>();
|
||||
return page.props.auth.user.week_start;
|
||||
};
|
||||
window.getTimezoneSetting = function () {
|
||||
const page = usePage<{
|
||||
auth: {
|
||||
user: User;
|
||||
};
|
||||
}>();
|
||||
return page.props.auth.user.timezone;
|
||||
};
|
||||
|
||||
app.use(plugin).use(pinia).use(ZiggyVue).mount(el);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user