toby/resources/js/app.js
Adrian Hopek db4be79c91
#62 - vacation request list for approvers (#69)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* #5 - bump dependencies

* #43 - wip

* #43 - add composer script

* #43 - fix

* #43 - fix

* #43 - wip

* #43 - ecs fix

* #43 - cr fix

* #43 - cr fix

* #43 - fix

* #62 - wip

* #62 - wip

* #62 - wip

* #62 - fix

* #62 - fix

* #62 - fix

* #62 - fix

* #62 - fix

* #62 - ecs fix

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
2022-03-08 09:25:24 +01:00

45 lines
1005 B
JavaScript

import {createApp, h} from 'vue'
import {createInertiaApp, Head, Link} from '@inertiajs/inertia-vue3'
import {InertiaProgress} from '@inertiajs/progress'
import AppLayout from '@/Shared/Layout/AppLayout'
import Flatpickr from 'flatpickr'
import { Polish } from 'flatpickr/dist/l10n/pl.js'
import Toast from 'vue-toastification'
createInertiaApp({
resolve: name => {
const page = require(`./Pages/${name}`).default
page.layout = page.layout || AppLayout
return page
},
setup({el, App, props, plugin}) {
createApp({render: () => h(App, props)})
.use(plugin)
.use(Toast, {
position: 'bottom-right',
maxToast: 5,
})
.component('InertiaLink', Link)
.component('InertiaHead', Head)
.mount(el)
},
title: title => `${title} - Toby`,
})
InertiaProgress.init({
delay: 0,
color: 'red',
})
Flatpickr.localize(Polish)
Flatpickr.setDefaults({
dateFormat: 'Y-m-d',
enableTime: false,
altFormat: 'd.m.Y',
altInput: true,
})