pénzügyi modul továbbfejlesztése (csomagkezelés)

This commit is contained in:
Roo
2026-07-29 09:46:10 +00:00
parent 6f28d3e70d
commit 75904cd2f8
50 changed files with 5851 additions and 312 deletions

View File

@@ -138,7 +138,27 @@ export const useVehicleStore = defineStore('vehicle', () => {
* Fetch all vehicles/assets for the current user or their organization.
* GET /assets/vehicles
*/
// P0 BUGFIX (2026-07-28): Deduplication guard to prevent multiple simultaneous
// calls from DashboardView.onMounted() and child components.
let _vehicleFetchInProgress = false
/**
* P0 BUGFIX (2026-07-28): Context-switching data leak fix.
* Clears the local vehicle cache and resets the deduplication guard.
* Called by DashboardView before re-fetching after organization switch.
*/
function clearCache() {
_vehicleFetchInProgress = false
vehicles.value = []
error.value = null
}
async function fetchVehicles() {
if (_vehicleFetchInProgress) {
// Skip duplicate: a fetch is already in flight
return vehicles.value
}
_vehicleFetchInProgress = true
isLoading.value = true
error.value = null
@@ -154,6 +174,7 @@ export const useVehicleStore = defineStore('vehicle', () => {
console.error('[VehicleStore] fetchVehicles error:', err)
} finally {
isLoading.value = false
_vehicleFetchInProgress = false
}
}
@@ -433,6 +454,7 @@ export const useVehicleStore = defineStore('vehicle', () => {
sortedVehicles,
// Actions
clearCache,
fetchVehicles,
fetchVehicleById,
createVehicle,