UpdateFix dashboard scenario bugs
This commit is contained in:
@@ -46,7 +46,9 @@ export const DashboardScenarioService = {
|
|||||||
getScenarios(filters) {
|
getScenarios(filters) {
|
||||||
return axios.get('/scenarios-filter', {
|
return axios.get('/scenarios-filter', {
|
||||||
params: {
|
params: {
|
||||||
selectedAccount: filters
|
dateFrom: filters.dateFrom,
|
||||||
|
dateTo: filters.dateTo,
|
||||||
|
selectedAccount: filters.account
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -758,13 +758,7 @@ watch(selectedAccount, (newAccount) => {
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
|
|
||||||
watch(selectedScenarios, (newScenarios) => {
|
|
||||||
if (newScenarios && newScenarios.length > 0) {
|
|
||||||
console.log('Selected scenarios:', newScenarios);
|
|
||||||
} else {
|
|
||||||
console.log('No scenario selected');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//Nuova funzione
|
//Nuova funzione
|
||||||
function filterAppsByProjects(projectIds) {
|
function filterAppsByProjects(projectIds) {
|
||||||
@@ -798,7 +792,14 @@ console.log('Selected scenarios:', selectedScenarios);
|
|||||||
//function per Scenarios
|
//function per Scenarios
|
||||||
async function loadScenariosByAccount(selectedAccount) {
|
async function loadScenariosByAccount(selectedAccount) {
|
||||||
try {
|
try {
|
||||||
await dashboardScenarioStore.loadScenarios(selectedAccount);
|
|
||||||
|
const filterParams = {
|
||||||
|
dateFrom: formatLocalDate(dateRange.value?.[0]),
|
||||||
|
dateTo: null ? formatLocalDateTo(dateRange.value?.[0]):formatLocalDateTo(dateRange.value?.[1]),
|
||||||
|
account: selectedAccount || null,
|
||||||
|
}
|
||||||
|
|
||||||
|
await dashboardScenarioStore.loadScenarios(filterParams);
|
||||||
scenarioOptions.value = dashboardScenarioStore.allScenarios.map((scenario) => ({ ...scenario }));
|
scenarioOptions.value = dashboardScenarioStore.allScenarios.map((scenario) => ({ ...scenario }));
|
||||||
|
|
||||||
console.log('Scenarios loaded:', scenarioOptions.value);
|
console.log('Scenarios loaded:', scenarioOptions.value);
|
||||||
|
|||||||
Reference in New Issue
Block a user