Update application logic for retrieving docs

This commit is contained in:
2025-03-19 16:52:54 +01:00
parent 4a43ff984a
commit 0f93796b66
3 changed files with 15 additions and 25 deletions

View File

@@ -24,13 +24,10 @@ const loadingStore = LoadingStore()
async function updateApplication() {
await userPrefStore.setSelectedApp(selectedApp.value);
// here scenario_store.fetchApplicationScenarios();
}
function redirectProject() {
router.push({ name: 'projects-list' }); // Specifica il percorso per la pagina "Projects"
router.push({ name: 'projects-list' });
}
function appUpdated() {
@@ -86,28 +83,16 @@ watch(() => userPrefStore.getSelApp, appUpdated, { immediate: true });
</div>
</div>
<div class="layout-topbar-theme">
<span class="flex items-center mt-2">Project:</span>
</div>
<div class="topbar-project">
<button @click="redirectProject()" class="p-button p-button-outlined"
v-tooltip="'Click to change the project'"> {{ userPrefStore.user.selectedProject.fe_name
}}</button>
<!-- <span v-if="userPrefStore.user.selectedProject">
<small>PROJECT:</small> {{ userPrefStore.user.selectedProject.fe_name }}
</span> -->
</div>
<!-- <Dropdown v-model="selectedApp" :options="userPrefStore.availableApp" optionLabel="fe_name"
placeholder="Select an Application" class="dropdown-list menu-list" @change="updateApplication()"
:disabled="isDropdownDisabled" /> -->
<!--div class="relative">
<button
v-styleclass="{ selector: '@next', enterFromClass: 'hidden', enterActiveClass: 'animate-scalein', leaveToClass: 'hidden', leaveActiveClass: 'animate-fadeout', hideOnOutsideClick: true }"
type="button" class="layout-topbar-action layout-topbar-action-highlight">
<i class="pi pi-palette"></i>
</button>
<AppConfigurator />
</div-->
<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 }">
<i class="pi pi-ellipsis-v"></i>
@@ -134,10 +119,15 @@ watch(() => userPrefStore.getSelApp, appUpdated, { immediate: true });
.logo-image {
border-radius: 50%;
width: 40px;
/* Adjust the size as needed */
height: 40px;
/* Adjust the size as needed */
object-fit: cover;
/* Ensures the logo scales nicely within the circle */
}
.topbar-project {
display: flex;
align-items: center;
justify-content: left;
font-size: 1.2rem;
min-width: 100px;
}
</style>

View File

@@ -122,11 +122,11 @@ const openProject = async (project) => {
try {
// Esegui l'update del progetto
await userPrefStore.updateSelectedProject(project);
console.log('Progetto aggiornato e dati utente ricaricati');
console.log('Update project and user data');
router.push({ path: '/ksdocuments' });
} catch (error) {
console.error('Errore nel cambio progetto:', error);
console.error('Error while changing project:', error);
}

View File

@@ -156,7 +156,7 @@
<p v-if="selectedFile" class="text-center">You can execute the ingestion for the following file:</p>
<p v-if="selectedFile" class="text-center">{{ selectedFile.name }}</p>
<div class="flex justify-center mt-4">
<Button type="submit" label="Ingest" :fluid="false"></Button>
<Button :disabled="loadingStore.isLoading" type="submit" label="Ingest" :fluid="false"></Button>
</div>
</div>
<div class="flex justify-between pt-6">