New report system and views
This commit is contained in:
@@ -751,6 +751,14 @@ async function fetchColumns() {
|
||||
|
||||
async function applyTemplateToImport() {
|
||||
if (!importId.value || !form.value.import_template_id) return;
|
||||
|
||||
// Find the selected template to get its UUID
|
||||
const template = (props.templates || []).find((t) => t.id === form.value.import_template_id);
|
||||
if (!template?.uuid) {
|
||||
console.error('Template UUID not found');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (templateApplied.value) {
|
||||
const ok = window.confirm(
|
||||
@@ -762,7 +770,7 @@ async function applyTemplateToImport() {
|
||||
}
|
||||
await axios.post(
|
||||
route("importTemplates.apply", {
|
||||
template: form.value.import_template_id,
|
||||
template: template.uuid,
|
||||
import: importId.value,
|
||||
}),
|
||||
{},
|
||||
|
||||
Reference in New Issue
Block a user