myCRM/assets/app.js
2025-11-08 10:26:44 +01:00

43 lines
1.0 KiB
JavaScript

import './bootstrap.js';
/*
* Welcome to your app's main JavaScript file!
*
* This file will be included onto the page via the importmap() Twig function,
* which should already be in your base.html.twig.
*/
import './styles/app.scss';
import { createApp } from 'vue';
import { createPinia } from 'pinia';
import PrimeVue from 'primevue/config';
import Aura from '@primevue/themes/aura';
import router from './js/router';
import App from './js/App.vue';
import { useAuthStore } from './js/stores/auth';
// PrimeVue Components (lazy import as needed in components)
import 'primeicons/primeicons.css';
console.log('This log comes from assets/app.js - welcome to myCRM!');
const app = createApp(App);
const pinia = createPinia();
app.use(pinia);
app.use(router);
app.use(PrimeVue, {
theme: {
preset: Aura,
options: {
darkModeSelector: false, // Can be customized later
}
}
});
app.mount('#app');
// Initialize auth store with user data from backend
const authStore = useAuthStore();
authStore.initializeFromElement();