commit fix bugs

This commit is contained in:
dalia.florinda
2025-12-19 10:01:43 +01:00
parent af8a8b67c3
commit 9c254c9c28
6 changed files with 40 additions and 19 deletions

View File

@@ -610,7 +610,7 @@ export default {
// Add global functions for table operations
if (!window.copyTable) {
window.copyTable = (tableId) => {
const wrapper = markdownContainer.value.querySelector(`[data-table-id="${tableId}"]`);
const wrapper = document.querySelector(`[data-table-id="${tableId}"]`);
const table = wrapper?.querySelector('table');
if (!table) return;
@@ -637,7 +637,7 @@ export default {
if (!window.exportTableToCSV) {
window.exportTableToCSV = (tableId) => {
const wrapper = markdownContainer.value.querySelector(`[data-table-id="${tableId}"]`);
const wrapper = document.querySelector(`[data-table-id="${tableId}"]`);
const table = wrapper?.querySelector('table');
if (!table) return;
@@ -656,7 +656,9 @@ export default {
csv += rowData.join(',') + '\n';
});
const blob = new Blob([csv], { type: 'text/csv' });
// Add UTF-8 BOM for proper character encoding
const BOM = '\uFEFF';
const blob = new Blob([BOM + csv], { type: 'text/csv;charset=utf-8;' });
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;

View File

@@ -158,7 +158,7 @@ const formatSize = (bytes) => {
</label>
<div>
<FileUpload
:name="inputName"
name="MultiFileUpload"
:customUpload="false"
:url="uploadUrl"
@upload="handleUpload"

View File

@@ -2,7 +2,7 @@
<div class="config-panel hidden">
<div class="config-panel-content">
<span class="config-panel-label">Welcome </span>
<span v-if="user">
<span v-if="user" class="user-name">
{{ user.name + " " + user.surname }}
</span>
<!-- <button @click="redirectProject()" class="p-button p-button-outlined">Projects</button> -->
@@ -15,10 +15,10 @@
<script setup>
import { ScenarioStore } from '@/stores/ScenarioStore';
import { useAuth } from '@websanova/vue-auth/src/v3.js';
import { computed } from 'vue';
import { useRouter } from 'vue-router';
import { ScenarioStore } from '@/stores/ScenarioStore';
const auth = useAuth();
@@ -41,3 +41,10 @@ function logout() {
}
</script>
<style scoped>
.config-panel-label,
.user-name {
color: #000000 !important;
}
</style>

View File

@@ -82,7 +82,7 @@ watch(() => userPrefStore.getSelApp, appUpdated, { immediate: true });
<div v-if="loadingStore.isLoading">
<!--<ProgressSpinner v-if="loadingStore.loadingType=='data'" style="width: 25px; height: 25px; margin-top: 6px" strokeWidth="2" fill="transparent"/>-->
<JellyfishLoader v-if="loadingStore.loadingType == 'ai'" scale="0.5" color="#a100ff" style="width: 25px; height: 10px; margin-right: 25px; margin-top: -5px" />
<RiseLoader v-if="loadingStore.loadingType == 'data'" color="#a100ff" style="scale: 0.5; height: 10px; margin-top: 5px" />
<RiseLoader v-if="loadingStore.loadingType == 'data'" color="#ffffff" style="scale: 0.5; height: 10px; margin-top: 5px" />
</div>
<!-- <button @click="router.push('/mdcanvas')" class="layout-topbar-action" >
<i class="pi pi-pencil"></i>
@@ -117,19 +117,12 @@ watch(() => userPrefStore.getSelApp, appUpdated, { immediate: true });
</div>
<Dropdown v-model="selectedApp" :options="userPrefStore.availableApp" optionLabel="fe_name" placeholder="Select an Application" class="dropdown-list menu-list" @change="updateApplication()" :disabled="isDropdownDisabled" />
<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>
</button>
<div class="layout-topbar-menu hidden lg:block">
<div class="layout-topbar-menu">
<div class="layout-topbar-menu-content">
<button
v-styleclass="{ selector: '@next', enterFromClass: 'hidden', enterActiveClass: 'animate-scalein', leaveToClass: 'hidden', leaveActiveClass: 'animate-fadeout', hideOnOutsideClick: true }"
type="button"
class="layout-topbar-action"
class="layout-topbar-action user-menu-button"
>
<i class="pi pi-user"></i>
</button>
@@ -197,4 +190,8 @@ watch(() => userPrefStore.getSelApp, appUpdated, { immediate: true });
border-color: rgba(255, 255, 255, 0.5);
box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}
.user-menu-button i {
color: #ffffff !important;
}
</style>

View File

@@ -78,9 +78,9 @@ import ProgressSpinner from 'primevue/progressspinner';
import { computed, onMounted, reactive, ref } from 'vue';
import { useRouter } from 'vue-router';
import { LoadingStore } from '../../stores/LoadingStore.js';
import { UserPrefStore } from '../../stores/UserPrefStore.js';
import { ScenarioStore } from '../../stores/ScenarioStore.js';
import { ScenarioExecutionStore } from '../../stores/ScenarioExecutionStore.js';
import { ScenarioStore } from '../../stores/ScenarioStore.js';
import { UserPrefStore } from '../../stores/UserPrefStore.js';
const loadingStore = LoadingStore()
@@ -116,7 +116,7 @@ const scenario_execution_store = ScenarioExecutionStore();
return data.search
.toLowerCase()
.split(" ")
.every((v) => item.name.toLowerCase().includes(v));
.every((v) => item.fe_name.toLowerCase().includes(v));
});
} else {
return data.projects;

View File

@@ -76,6 +76,16 @@ const isInputFilled = computed(() => {
return inputValue && Array.isArray(inputValue) && inputValue.length > 0;
}
// For file uploads, check if the file has been uploaded
if (input.type === 'singlefile' || input.type === 'singlefile_acceptall') {
return inputValue !== undefined && inputValue !== '';
}
// For multifile, it's optional so always return true
if (input.type === 'multifile') {
return true;
}
return inputValue !== undefined && inputValue !== '';
});
});
@@ -191,8 +201,13 @@ const onDynamicPickerChange = (inputName, value) => {
// ============= File Upload Handlers =============
const handleFileUpload = (data) => {
console.log('handleFileUpload - data.fileName:', data.fileName);
console.log('handleFileUpload - data.response:', data.response);
console.log('handleFileUpload - data.inputName:', data.inputName);
if (data.inputName === 'SingleFileUpload') {
formData.value['SingleFileUpload'] = data.fileName;
formData.value['Folder'] = data.response;
numberPrFiles.value += 1;
} else {
formData.value['MultiFileUpload'] = data.response;