Admin panel updated with shadcn-vue components

This commit is contained in:
Simon Pocrnjič
2026-01-05 18:27:35 +01:00
parent 70a5d015e0
commit c4d9ecb39e
37 changed files with 5407 additions and 3740 deletions
+9 -7
View File
@@ -751,14 +751,16 @@ 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);
const template = (props.templates || []).find(
(t) => t.id === form.value.import_template_id
);
if (!template?.uuid) {
console.error('Template UUID not found');
console.error("Template UUID not found");
return;
}
try {
if (templateApplied.value) {
const ok = window.confirm(
@@ -1137,12 +1139,12 @@ async function fetchSimulation() {
// V2 format
paymentSimRows.value = Array.isArray(data?.rows) ? data.rows : [];
paymentSimSummary.value = data?.summaries || null;
// Extract unique entity types from rows for SimulationModal
const entitySet = new Set();
for (const row of data?.rows || []) {
if (row.entities && typeof row.entities === 'object') {
Object.keys(row.entities).forEach(key => entitySet.add(key));
if (row.entities && typeof row.entities === "object") {
Object.keys(row.entities).forEach((key) => entitySet.add(key));
}
}
paymentSimEntities.value = Array.from(entitySet);