Resolve bug

This commit is contained in:
2025-03-19 16:54:36 +01:00
parent 4546ea18b0
commit 9ad16d69a2
2 changed files with 6 additions and 3 deletions

View File

@@ -17,14 +17,14 @@ export const ScenarioExecutionStore = defineStore('scenario_execution_store', ()
async function fetchScenariosExecution(page = 0, size = 10, filters, sortField, sortOrder) {
loadingStore.scenario_loading = true;
try {
console.log("Recupero delle esecuzioni con filtri:", page, size, filters, sortField, sortOrder);
console.log("Fetching executions with filters:", page, size, filters, sortField, sortOrder);
const resp = await ScenarioService.getExecScenariosByUser(page, size, filters, sortField, sortOrder); // Passiamo anche i filtri
lstScenarioExecution.value = resp.data.content;
totalRecords.value = resp.data.totalElements;
currentPage.value = page;
pageSize.value = size;
} catch (error) {
console.error("Errore nel recupero delle esecuzioni:", error);
console.error("Error fetching executions:", error);
} finally {
loadingStore.scenario_loading = false;
}
@@ -56,7 +56,7 @@ export const ScenarioExecutionStore = defineStore('scenario_execution_store', ()
// Funzione per aggiornare i filtri
const updateFilters = (newFilters) => {
console.log("Nuovi filtri:", newFilters);
console.log("New filters:", newFilters);
filters.value = newFilters;
filters.value = encodeURIComponent(JSON.stringify(newFilters));
fetchScenariosExecution(currentPage.value, pageSize.value, filters.value); // Ricarica con i nuovi filtri