Frontend: - Consolidate duplicate API layers into single src/lib/axios.ts per app - Remove src/lib/api-client.ts and src/utils/api.ts (admin) - Add src/lib/query-client.ts with TanStack Query config per app - Update all imports and auto-import config Backend: - Fix organisations.billing_status default to 'trial' - Fix user_invitations.invited_by_user_id to nullOnDelete - Add MeResource with separated app_roles and pivot-based org roles - Add cross-org check to EventPolicy view() and update() - Restrict EventPolicy create/update to org_admin/event_manager (not org_member) - Attach creator as org_admin on organisation store - Add query scopes to Event and UserInvitation models - Improve factories with Dutch test data - Expand test suite from 29 to 41 tests (90 assertions) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
import { createApp } from 'vue'
|
|
import { VueQueryPlugin } from '@tanstack/vue-query'
|
|
import { queryClientConfig } from '@/lib/query-client'
|
|
|
|
import App from '@/App.vue'
|
|
import { registerPlugins } from '@core/utils/plugins'
|
|
|
|
// Styles
|
|
import '@core/scss/template/index.scss'
|
|
import '@styles/styles.scss'
|
|
|
|
// Create vue app
|
|
const app = createApp(App)
|
|
|
|
// Error handler for unhandled errors
|
|
app.config.errorHandler = (err, instance, info) => {
|
|
console.error('Vue Error:', err, info)
|
|
console.error('Component:', instance)
|
|
}
|
|
|
|
// Register plugins
|
|
app.use(VueQueryPlugin, queryClientConfig)
|
|
|
|
try {
|
|
registerPlugins(app)
|
|
} catch (error) {
|
|
console.error('Failed to register plugins:', error)
|
|
throw error
|
|
}
|
|
|
|
// Mount vue app
|
|
try {
|
|
app.mount('#app')
|
|
} catch (error) {
|
|
console.error('Failed to mount app:', error)
|
|
// Show error message to user
|
|
document.getElementById('app')!.innerHTML = `
|
|
<div style="padding: 20px; text-align: center;">
|
|
<h1>Application Error</h1>
|
|
<p>Failed to start the application. Please check the console for details.</p>
|
|
<pre style="text-align: left; background: #f5f5f5; padding: 10px; border-radius: 4px; overflow: auto;">${error}</pre>
|
|
</div>
|
|
`
|
|
}
|