Add vehicle management features in Falukant

- Introduced vehicle types and transport management in the backend, including new models and associations for vehicles and transports.
- Implemented service methods to retrieve vehicle types and handle vehicle purchases, ensuring user validation and transaction management.
- Updated the FalukantController and router to expose new endpoints for fetching vehicle types and buying vehicles.
- Enhanced the frontend with a new transport tab in BranchView, allowing users to buy vehicles, and added localization for vehicle-related terms.
- Included initialization logic for vehicle types in the database setup.
This commit is contained in:
Torsten Schulz (local)
2025-11-24 20:15:45 +01:00
parent 5ed27e5a6a
commit 3f043fc315
14 changed files with 544 additions and 12 deletions

View File

@@ -7,6 +7,8 @@ import path from 'path';
export default defineConfig(({ mode }) => {
// Lade Umgebungsvariablen explizit
const env = loadEnv(mode, process.cwd(), '');
// Kombiniere mit process.env, um auch Shell-Umgebungsvariablen zu berücksichtigen
const combinedEnv = { ...env, ...process.env };
return {
plugins: [vue()],
@@ -16,18 +18,18 @@ export default defineConfig(({ mode }) => {
'import.meta.env.DEV': false,
'import.meta.env.PROD': true,
'import.meta.env.MODE': '"production"',
// Stelle sicher, dass Umgebungsvariablen aus .env.production geladen werden
...(env.VITE_DAEMON_SOCKET && {
'import.meta.env.VITE_DAEMON_SOCKET': JSON.stringify(env.VITE_DAEMON_SOCKET)
// Stelle sicher, dass Umgebungsvariablen aus .env.production oder Shell-Umgebung geladen werden
...(combinedEnv.VITE_DAEMON_SOCKET && {
'import.meta.env.VITE_DAEMON_SOCKET': JSON.stringify(combinedEnv.VITE_DAEMON_SOCKET)
}),
...(env.VITE_API_BASE_URL && {
'import.meta.env.VITE_API_BASE_URL': JSON.stringify(env.VITE_API_BASE_URL)
...(combinedEnv.VITE_API_BASE_URL && {
'import.meta.env.VITE_API_BASE_URL': JSON.stringify(combinedEnv.VITE_API_BASE_URL)
}),
...(env.VITE_CHAT_WS_URL && {
'import.meta.env.VITE_CHAT_WS_URL': JSON.stringify(env.VITE_CHAT_WS_URL)
...(combinedEnv.VITE_CHAT_WS_URL && {
'import.meta.env.VITE_CHAT_WS_URL': JSON.stringify(combinedEnv.VITE_CHAT_WS_URL)
}),
...(env.VITE_SOCKET_IO_URL && {
'import.meta.env.VITE_SOCKET_IO_URL': JSON.stringify(env.VITE_SOCKET_IO_URL)
...(combinedEnv.VITE_SOCKET_IO_URL && {
'import.meta.env.VITE_SOCKET_IO_URL': JSON.stringify(combinedEnv.VITE_SOCKET_IO_URL)
})
},
optimizeDeps: {