Compare commits

...

20 Commits

Author SHA1 Message Date
8eb8680bb1 Merged PR 199: Fix ksDocType filter
Fix ksDocType filter
2025-07-22 15:21:52 +00:00
0291546fca Fix ksDocType filter 2025-07-22 17:14:31 +02:00
ed5479de5b Merged PR 193: Update docType picklist 2025-07-07 15:28:11 +00:00
8dc495272d Merge branch 'master' into develop 2025-07-07 17:24:51 +02:00
Andrea Terzani
722af48aa6 Aggiornato i nomi delle opzioni video e aggiunto il tipo 'Estimation' nel mapping dei documenti 2025-07-07 16:18:01 +02:00
79b943af65 Update popup info for deletion 2025-07-07 12:17:59 +02:00
e297a5fa42 Merged PR 186: Fix bug popup location for delete
Fix bug popup location for delete
2025-07-01 10:58:08 +00:00
0b51206062 Fix bug popup location for delete 2025-07-01 12:54:23 +02:00
6e998b784b Merged PR 177: Update delete button and max_chunk_size for ingestion
Update delete button and max_chunk_size for ingestion
2025-06-27 11:59:49 +00:00
3269098801 Update delete button and max_chunk_size for ingestion 2025-06-27 11:14:43 +02:00
e7254c3d02 Merged PR 176: Added delete record button and redefined stores/services
Added delete record button and redefined stores/services
2025-06-25 12:11:25 +00:00
c1ebf55545 Merged PR 172: Fix path login
Fix path login
2025-06-17 08:53:28 +00:00
5df8ba3bf4 Merged PR 170: Fix path topbar
Fix path topbar
2025-06-16 15:59:52 +00:00
62d3f3f16a Merged PR 169: Fix login path and logs
Fix login path and logs
2025-06-16 13:31:32 +00:00
4cb5ddcab0 Merged PR 167: Fix login with retry
Fix login with retry
2025-06-13 15:35:17 +00:00
32c3b5923c Merged PR 166: Fix apollo callback
Fix apollo callback
2025-06-12 14:58:28 +00:00
4b4d9cd53d Merged PR 152: Refactor
Refactor
2025-06-05 10:58:29 +00:00
4caa23efdb Merged PR 150: Bug fetch-user
Bug fetch-user
2025-06-05 10:22:01 +00:00
8a325afeb8 Merged PR 147: Update auth and logs
Update auth and logs
2025-06-04 11:50:30 +00:00
f0c01ad7af Merged PR 137: Update function
Update function
2025-05-21 14:16:23 +00:00
4 changed files with 84 additions and 52 deletions

View File

@@ -201,11 +201,12 @@ const groupDocType = ref('');
const uploadPercentage = ref(0);
const videoTypeOptions = ref([
{ name: 'Functional video', value: 'functional_video' },
{ name: 'Code Instruction video', value: 'code_instruction_video' },
{ name: 'Specification video', value: 'specification_video' },
{ name: 'Functional', value: 'functional_video' },
{ name: 'Code Instruction', value: 'code_instruction_video' },
{ name: 'Estimation', value: 'estimation_video' },
{ name: 'Other', value: 'other_video' }
]);
const availableAppOptions = ref([
{ name: 'Cross', value: '' },
...userPrefStore.availableApp.map(app => ({ name: app.internal_name, value: app.internal_name }))

View File

@@ -361,27 +361,43 @@ const confirmDeleteFromVectorStore = (id) => {
// Funzione per cancellare record in stato LOADED
const deleteLoadedRecord = async (id) => {
toast.add({ severity: 'info', summary: 'Info', detail: 'Deleting record...', life: 3000 });
const videoToDelete = ksVideos.value.find(video => video.id === id);
if (!videoToDelete) {
toast.add({ severity: 'error', summary: 'Error', detail: 'Video not found', life: 3000 });
return;
}
const requestPayload = {
ksDocumentId: videoToDelete.id,
ksIngestionInfoId: videoToDelete.ingestionInfo.id,
ksDocType: videoToDelete.ingestionInfo.metadata.KsDoctype,
ksDocSource: videoToDelete.ingestionInfo.metadata.KsDocSource,
ksFileSource: videoToDelete.ingestionInfo.metadata.KsFileSource,
ksApplicationName: videoToDelete.ingestionInfo.metadata.KsApplicationName,
};
try {
await ksVideoStore.deleteKsVideoRecord(requestPayload);
toast.add({ severity: 'success', summary: 'Success', detail: 'Record deleted', life: 3000 });
updateVideos();
} catch (error) {
toast.add({ severity: 'error', summary: 'Error', detail: 'Error deleting record', life: 3000 });
}
confirm.require({
target: event.target,
message: 'Are you sure you want to proceed?',
icon: 'pi pi-exclamation-triangle',
rejectProps: {
label: 'Cancel',
class: "p-button",
outlined: true,
},
acceptProps: {
label: 'Delete',
severity: 'danger',
},
accept: async () => {
toast.add({ severity: 'info', summary: 'Info', detail: 'Deleting record...', life: 3000 });
const videoToDelete = ksVideos.value.find(video => video.id === id);
if (!videoToDelete) {
toast.add({ severity: 'error', summary: 'Error', detail: 'Video not found', life: 3000 });
return;
}
const requestPayload = {
ksDocumentId: videoToDelete.id,
ksIngestionInfoId: videoToDelete.ingestionInfo.id,
ksDocType: videoToDelete.ingestionInfo.metadata.KsDoctype,
ksDocSource: videoToDelete.ingestionInfo.metadata.KsDocSource,
ksFileSource: videoToDelete.ingestionInfo.metadata.KsFileSource,
ksApplicationName: videoToDelete.ingestionInfo.metadata.KsApplicationName,
};
try {
await ksVideoStore.deleteKsVideoRecord(requestPayload);
toast.add({ severity: 'success', summary: 'Success', detail: 'Record deleted', life: 3000 });
updateVideos();
} catch (error) {
toast.add({ severity: 'error', summary: 'Error', detail: 'Error deleting record', life: 3000 });
}
}
})
};

View File

@@ -157,6 +157,7 @@ const initFilters = () => {
'ingestionInfo.metadata.KsApplicationName': { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] },
'ingestionInfo.metadata.KsFileSource': { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] },
'ingestionInfo.metadata.KsDocSource': { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] },
'ingestionInfo.metadata.KsDoctype': { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] },
ingestionDateFormat: { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] },
ingestionStatus: { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }
};
@@ -314,7 +315,7 @@ const confirmDeleteFromVectorStore = (id) => {
console.log("Updated element", element)
}
});
toast.add({ severity: 'success', summary: 'Success', detail: 'Deletion Completed', life: 3000 });
toast.add({ severity: 'info', summary: 'Info', detail: 'Deletion started', life: 3000 });
})
.catch(error => {
console.error('Error deleting records: ', error)
@@ -326,26 +327,42 @@ const confirmDeleteFromVectorStore = (id) => {
// Funzione per cancellare record in stato LOADED
const deleteLoadedRecord = async (id) => {
toast.add({ severity: 'info', summary: 'Info', detail: 'Deleting record...', life: 3000 });
const documentToDelete = ksdocuments.value.find(doc => doc.id === id);
if (!documentToDelete) {
toast.add({ severity: 'error', summary: 'Error', detail: 'Document not found', life: 3000 });
return;
}
const requestPayload = {
ksDocumentId: documentToDelete.id,
ksIngestionInfoId: documentToDelete.ingestionInfo.id,
ksDoctype: documentToDelete.ingestionInfo.metadata.KsDoctype,
ksDocSource: documentToDelete.ingestionInfo.metadata.KsDocSource,
ksFileSource: documentToDelete.ingestionInfo.metadata.KsFileSource,
ksApplicationName: documentToDelete.ingestionInfo.metadata.KsApplicationName,
};
try {
await ksDocumentStore.deleteKsDocumentRecord(requestPayload);
toast.add({ severity: 'success', summary: 'Success', detail: 'Record deleted', life: 3000 });
} catch (error) {
toast.add({ severity: 'error', summary: 'Error', detail: 'Error deleting record', life: 3000 });
}
confirm.require({
target: event.target,
message: 'Are you sure you want to proceed?',
icon: 'pi pi-exclamation-triangle',
rejectProps: {
label: 'Cancel',
class: "p-button",
outlined: true,
},
acceptProps: {
label: 'Delete',
severity: 'danger',
},
accept: async () => {
toast.add({ severity: 'info', summary: 'Info', detail: 'Deleting record...', life: 3000 });
const documentToDelete = ksdocuments.value.find(doc => doc.id === id);
if (!documentToDelete) {
toast.add({ severity: 'error', summary: 'Error', detail: 'Document not found', life: 3000 });
return;
}
const requestPayload = {
ksDocumentId: documentToDelete.id,
ksIngestionInfoId: documentToDelete.ingestionInfo.id,
ksDoctype: documentToDelete.ingestionInfo.metadata.KsDoctype,
ksDocSource: documentToDelete.ingestionInfo.metadata.KsDocSource,
ksFileSource: documentToDelete.ingestionInfo.metadata.KsFileSource,
ksApplicationName: documentToDelete.ingestionInfo.metadata.KsApplicationName,
};
try {
await ksDocumentStore.deleteKsDocumentRecord(requestPayload);
toast.add({ severity: 'success', summary: 'Success', detail: 'Record deleted', life: 3000 });
} catch (error) {
toast.add({ severity: 'error', summary: 'Error', detail: 'Error deleting record', life: 3000 });
}
}
})
};
//ingestion
@@ -423,8 +440,7 @@ const mapDocType = (type) => {
const mapping = {
'functional': 'Functional',
'code_instruction': 'Code Instruction',
'specification': 'Specification',
'other': 'Other'
'estimation': 'Estimation'
};
return mapping[type] || type;
};

View File

@@ -208,7 +208,7 @@ const required = ref([]);
const ingestionResult = ref('');
const fileUploaded = ref(false);
const minChunkSize = ref(50);
const maxNumberOfChunks = ref(1000);
const maxNumberOfChunks = ref(10000);
const minChunkSizeToEmbed = ref(50);
const fileUpload = ref(null);
const selectedFile = ref(null);
@@ -222,8 +222,7 @@ const uploadPercentage = ref(0);
const documentTypeOptions = ref([
{ name: 'Functional', value: 'functional' },
{ name: 'Code Instruction', value: 'code_instruction' },
{ name: 'Specification', value: 'specification' },
{ name: 'Other', value: 'other' }
{ name: 'Estimation', value: 'estimation' }
]);
const availableAppOptions = ref([
{ name: 'Cross', value: '' },
@@ -245,7 +244,7 @@ const formData = ref({
ksDocSource: '',
defaultChunkSize: 2000,
minChunkSize: 50,
maxNumberOfChunks: 1000,
maxNumberOfChunks: 10000,
minChunkSizeToEmbed: 50
});
@@ -262,7 +261,7 @@ watch(
);
watch(
() => formData.value.maxNumberOfChunks,
(newValue) => validateField("maxNumberOfChunks", newValue, maxNumberOfChunks.value, 2000)
(newValue) => validateField("maxNumberOfChunks", newValue, maxNumberOfChunks.value, 20000)
);
watch(
() => formData.value.minChunkSizeToEmbed,