Add pinia dependency for state management
This commit is contained in:
@@ -4,29 +4,21 @@ import { useAuth } from '@websanova/vue-auth/src/v3.js';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
|
||||
import { ScenarioStore } from '../stores/ScenarioStore.js';
|
||||
import { UserPrefStore } from '../stores/UserPrefStore.js';
|
||||
|
||||
import AppConfigurator from './AppConfigurator.vue';
|
||||
import AppProfileMenu from './AppProfileMenu.vue';
|
||||
|
||||
const auth = useAuth();
|
||||
|
||||
const router = useRouter();
|
||||
const props = defineProps(['page']);
|
||||
|
||||
const userPrefStore = UserPrefStore();
|
||||
const scenario_store = ScenarioStore();
|
||||
|
||||
const { onMenuToggle, toggleDarkMode, isDarkTheme } = useLayout();
|
||||
|
||||
/*const fetchData = async () => {
|
||||
try {
|
||||
const response = await axios.get('/userApplications');
|
||||
items.value = response.data;
|
||||
} catch (error) {
|
||||
console.error('Errore durante il recupero dei dati:', error);
|
||||
}
|
||||
};
|
||||
|
||||
// Richiama il metodo all'inizializzazione del componente
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
});*/
|
||||
|
||||
</script>
|
||||
|
||||
@@ -83,7 +75,14 @@ onMounted(() => {
|
||||
<AppConfigurator />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Dropdown
|
||||
v-model="userPrefStore.selectedApp"
|
||||
:options="userPrefStore.availableApp"
|
||||
optionLabel="fe_name"
|
||||
placeholder="Select an Option"
|
||||
class="dropdown-list"
|
||||
@change="scenario_store.fetchApplicationScenarios()"
|
||||
/>
|
||||
<button
|
||||
class="layout-topbar-menu-button layout-topbar-action"
|
||||
v-styleclass="{ selector: '@next', enterFromClass: 'hidden', enterActiveClass: 'animate-scalein', leaveToClass: 'hidden', leaveActiveClass: 'animate-fadeout', hideOnOutsideClick: true }"
|
||||
|
||||
Reference in New Issue
Block a user