Compare commits
12 Commits
1124631170
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03dd5bd562 | ||
|
|
6a26794c86 | ||
| c9d9863099 | |||
| c1f3c4ccc0 | |||
| 366fba4568 | |||
| 2b90d2f776 | |||
| e6624d37f0 | |||
| 38dfcde152 | |||
|
|
a79a8e8ab8 | ||
|
|
c6e29d158a | ||
|
|
d697385c22 | ||
| c60d94a21c |
@@ -245,6 +245,7 @@ const safeOptions = computed(() => {
|
||||
|
||||
// Funzione per rimuovere una folder dalla selezione
|
||||
const removeFolder = (folderToRemove) => {
|
||||
if (props.disabled) return;
|
||||
if (!selectedValue.value || !Array.isArray(selectedValue.value)) return;
|
||||
|
||||
const newValue = selectedValue.value.filter(folder => {
|
||||
@@ -416,6 +417,30 @@ const onSelectionChange = (event) => {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
|
||||
/* Stili specifici per ks-folders */
|
||||
.ks-folders-panel .p-multiselect-item {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
.ks-folders-panel .pi-folder {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
/* Stili per le chips delle folders */
|
||||
.folder-chip {
|
||||
background-color: #f3e8ff;
|
||||
color: #7c3aed;
|
||||
border: 1px solid #c4b5fd;
|
||||
}
|
||||
|
||||
.folder-chip .pi-folder {
|
||||
color: #7c3aed;
|
||||
}
|
||||
|
||||
.folder-chip:hover {
|
||||
background-color: #e9d5ff;
|
||||
}
|
||||
|
||||
/* Stili per le icone dei file */
|
||||
.ks-documents-panel .pi {
|
||||
font-size: 1.2rem;
|
||||
|
||||
@@ -647,13 +647,13 @@ export default {
|
||||
const cells = row.querySelectorAll('th, td');
|
||||
const rowData = Array.from(cells).map((cell) => {
|
||||
let text = cell.textContent.trim();
|
||||
// Escape quotes and wrap in quotes if contains comma
|
||||
if (text.includes(',') || text.includes('"') || text.includes('\n')) {
|
||||
// Escape quotes and wrap in quotes if contains semicolon, quotes or newlines
|
||||
if (text.includes(';') || text.includes('"') || text.includes('\n')) {
|
||||
text = '"' + text.replace(/"/g, '""') + '"';
|
||||
}
|
||||
return text;
|
||||
});
|
||||
csv += rowData.join(',') + '\n';
|
||||
csv += rowData.join(';') + '\n';
|
||||
});
|
||||
|
||||
// Add UTF-8 BOM for proper character encoding
|
||||
|
||||
@@ -53,8 +53,8 @@ var auth = createAuth({
|
||||
}
|
||||
});
|
||||
|
||||
//axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;
|
||||
axios.defaults.baseURL = 'http://localhost:8081';
|
||||
axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;
|
||||
//axios.defaults.baseURL = 'http://localhost:8081';
|
||||
|
||||
console.log(import.meta.env.VITE_BACKEND_URL);
|
||||
|
||||
|
||||
28
src/service/KSVideoService.js
Normal file
28
src/service/KSVideoService.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import axios from 'axios';
|
||||
|
||||
export const KSVideoService = {
|
||||
/**
|
||||
* Recupera tutti i KSVideo per il progetto selezionato dall'utente corrente
|
||||
* @returns {Promise} Promise con la lista di KSVideo
|
||||
*/
|
||||
getKSVideos() {
|
||||
return axios.get('/ksVideos');
|
||||
},
|
||||
|
||||
/**
|
||||
* Recupera tutti i KSVideo completati per il progetto selezionato dall'utente corrente
|
||||
* @returns {Promise} Promise con la lista di KSVideo completati
|
||||
*/
|
||||
getCompletedKSVideos() {
|
||||
return axios.get('/ksVideos/completed');
|
||||
},
|
||||
|
||||
/**
|
||||
* Recupera tutti i KSVideo per un progetto specifico
|
||||
* @param {string} projectId - ID del progetto
|
||||
* @returns {Promise} Promise con la lista di KSVideo
|
||||
*/
|
||||
getKSVideosByProject(projectId) {
|
||||
return axios.post('/ksVideos/byProject', projectId);
|
||||
}
|
||||
};
|
||||
@@ -229,7 +229,12 @@ const filteredInputs = computed(() => {
|
||||
const filtered = {};
|
||||
for (const [key, value] of Object.entries(inputs.value)) {
|
||||
// Escludi tutti i campi che contengono "input_multiselect" e finiscono con "_id"
|
||||
if (!(key.includes('input_multiselect') && key.endsWith('_id'))) {
|
||||
// Escludi anche i campi "SelectedFolders_Name" e "SelectedFolders_Id"
|
||||
const shouldExclude = (key.includes('input_multiselect') && key.endsWith('_id')) ||
|
||||
key === 'selectedFolders_id' ||
|
||||
key === 'selectedFolders_name';
|
||||
|
||||
if (!shouldExclude) {
|
||||
filtered[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import MarkdownViewer from '@/components/MarkdownViewer.vue';
|
||||
import ScenarioFileUpload from '@/components/ScenarioFileUpload.vue';
|
||||
import WorkflowResponsePanel from '@/components/WorkflowResponsePanel.vue';
|
||||
import { KSDocumentService } from '@/service/KSDocumentService';
|
||||
import { KSVideoService } from '@/service/KSVideoService';
|
||||
import { FileUploadStore } from '@/stores/FileUploadStore';
|
||||
import { KsVideoGroupStore } from '@/stores/KsVideoGroupStore';
|
||||
import { LoadingStore } from '@/stores/LoadingStore';
|
||||
@@ -215,10 +216,18 @@ const extractFoldersFromItems = (items) => {
|
||||
|
||||
const loadKsFolders = async () => {
|
||||
try {
|
||||
const docsResponse = await KSDocumentService.getKSDocuments();
|
||||
const documents = docsResponse.data || [];
|
||||
// Carica sia documenti che video con query separate
|
||||
const [docsResponse, videosResponse] = await Promise.all([
|
||||
KSDocumentService.getKSDocuments(),
|
||||
KSVideoService.getKSVideos()
|
||||
]);
|
||||
|
||||
const allItems = [...documents, ...videoGroups.value];
|
||||
const documents = docsResponse.data || [];
|
||||
const videos = videosResponse.data || [];
|
||||
|
||||
// Combina documenti e video per l'estrazione dei folder
|
||||
// Facciamo distinct sui ksKnowledgePath
|
||||
const allItems = [...documents, ...videos];
|
||||
const { folders, folderMap } = extractFoldersFromItems(allItems);
|
||||
|
||||
// Calcola il numero di subfolder per ogni folder
|
||||
@@ -239,7 +248,7 @@ const loadKsFolders = async () => {
|
||||
|
||||
ksFolders.value = folders.map((path) => ({
|
||||
id: path,
|
||||
name: path === '/' ? '/ (Root)' : path,
|
||||
name: path === '/' ? '/ (Root) - ALL' : path,
|
||||
path: path,
|
||||
itemCount: folderMap[path]?.length || 0,
|
||||
subfolderCount: subfolderCounts[path] || 0
|
||||
|
||||
Reference in New Issue
Block a user