Added logic for KT scenario
This commit is contained in:
@@ -40,7 +40,6 @@
|
||||
:invalidFileSizeMessage="'Invalid file size, file size should be smaller than 20 MB'"
|
||||
v-model:files="uploadedFiles"
|
||||
@before-send="onBeforeSend"
|
||||
|
||||
>
|
||||
<template #content="{ files, uploadedFiles, removeUploadedFileCallback, removeFileCallback }">
|
||||
<div class="pt-4">
|
||||
@@ -104,9 +103,8 @@
|
||||
:maxFileSize="20971520"
|
||||
v-model:files="uploadedFiles"
|
||||
@before-send="onBeforeSend"
|
||||
|
||||
>
|
||||
>
|
||||
>
|
||||
<template #content="{ files, uploadedFiles, removeUploadedFileCallback, removeFileCallback }">
|
||||
<div class="pt-4">
|
||||
<!-- Tabella per file in caricamento -->
|
||||
@@ -379,11 +377,8 @@ const isInputFilled = computed(() => {
|
||||
isFilled = false;
|
||||
} else {
|
||||
const processedData = { ...formData.value };
|
||||
if (processedData.video_group) {
|
||||
|
||||
processedData.video_group = JSON.stringify(
|
||||
processedData.video_group.map((item) => item.id)
|
||||
);
|
||||
if (processedData.input_multiselect) {
|
||||
processedData.input_multiselect = JSON.stringify(processedData.input_multiselect.map((item) => item.id));
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -450,7 +445,7 @@ function fetchScenario(id) {
|
||||
const onBeforeSend = (event) => {
|
||||
const { xhr } = event; // Estraggo l'oggetto XMLHttpRequest
|
||||
console.log('xhr', xhr);
|
||||
var token = auth.token()
|
||||
var token = auth.token();
|
||||
xhr.setRequestHeader('Authorization', 'Bearer ' + token); // Imposta il tipo di contenuto
|
||||
};
|
||||
|
||||
@@ -494,10 +489,10 @@ const execScenario = () => {
|
||||
|
||||
// Crea una copia dei dati del form
|
||||
const processedData = { ...formData.value };
|
||||
if (processedData.video_group) {
|
||||
processedData.video_group = JSON.stringify(
|
||||
processedData.video_group.map((item) => item.id)
|
||||
);
|
||||
if (processedData.input_multiselect) {
|
||||
processedData.input_multiselect_id = JSON.stringify(processedData.input_multiselect.map((item) => item.id));
|
||||
processedData.input_multiselect_name = JSON.stringify(processedData.input_multiselect.map((item) => item.name));
|
||||
delete processedData.input_multiselect;
|
||||
}
|
||||
|
||||
const data = {
|
||||
|
||||
Reference in New Issue
Block a user