Merge branch 'master' of https://gitlab.gcp.windtre.it/olympus_ai/hermione-fe
This commit is contained in:
@@ -41,11 +41,11 @@ export const ScenarioStore = defineStore('scenario_store', () => {
|
||||
|
||||
async function fetchApplicationScenarios() {
|
||||
loadingStore.scenario_loading = true;
|
||||
|
||||
console.log("fetchApplicationScenarios >= selectedApp", userPrefStore.selectedApp) ;
|
||||
await ScenarioService.getScenariosApplication(userPrefStore.selectedApp).then(resp=>{
|
||||
console.log("response scenari", resp);
|
||||
applicationScenarios.value = resp.data
|
||||
allScenarios.value = [...projectScenarios.value, ...applicationScenarios.value]
|
||||
allScenarios.value = [...projectScenarios.value, ...applicationScenarios.value]
|
||||
loadingStore.scenario_loading = false;
|
||||
|
||||
})
|
||||
|
||||
@@ -18,6 +18,7 @@ export const UserPrefStore = defineStore('userpref_store', () => {
|
||||
loadingStore.user_loading = true;
|
||||
await auth.fetch().then((fetchedUser) => {
|
||||
user.value = fetchedUser.data.data;
|
||||
selectedApp.value = user.value.selectedApplication;
|
||||
userLoaded.value = true;
|
||||
loadingStore.user_loading = false;
|
||||
}).catch((error) => {
|
||||
@@ -29,11 +30,8 @@ export const UserPrefStore = defineStore('userpref_store', () => {
|
||||
try {
|
||||
loadingStore.user_loading = true;
|
||||
selectedApp.value = null;
|
||||
|
||||
// Aspetta che l'aggiornamento del progetto finisca
|
||||
await ProjectService.updateSelectedProject(project);
|
||||
|
||||
|
||||
|
||||
} catch (error) {
|
||||
console.error("Errore durante l'aggiornamento del progetto:", error);
|
||||
@@ -46,8 +44,11 @@ export const UserPrefStore = defineStore('userpref_store', () => {
|
||||
|
||||
|
||||
|
||||
function setSelectedApp(app){
|
||||
async function setSelectedApp(app){
|
||||
loadingStore.user_loading = true;
|
||||
await ProjectService.updateSelectedApplication(app);
|
||||
selectedApp.value = app;
|
||||
loadingStore.user_loading = false;
|
||||
}
|
||||
|
||||
const selectedProject = computed(() => user.value.selectedProject)
|
||||
|
||||
Reference in New Issue
Block a user