updates to UI and add archiving option

This commit is contained in:
Simon Pocrnjič
2025-10-05 19:45:49 +02:00
parent fe91c7e4bc
commit bab9d6561f
50 changed files with 3337 additions and 416 deletions
@@ -373,7 +373,14 @@ function referenceOf(entityName, ent) {
<span>{{ activeEntity }}</span>
<span
v-if="r.entities[activeEntity].action_label"
class="text-[10px] px-1 py-0.5 rounded bg-gray-100"
:class="[
'text-[10px] px-1 py-0.5 rounded',
r.entities[activeEntity].action === 'create' && 'bg-emerald-100 text-emerald-700',
r.entities[activeEntity].action === 'update' && 'bg-blue-100 text-blue-700',
r.entities[activeEntity].action === 'reactivate' && 'bg-purple-100 text-purple-700 font-semibold',
r.entities[activeEntity].action === 'skip' && 'bg-gray-100 text-gray-600',
r.entities[activeEntity].action === 'implicit' && 'bg-teal-100 text-teal-700'
].filter(Boolean)"
>{{ r.entities[activeEntity].action_label }}</span
>
<span
@@ -502,10 +509,25 @@ function referenceOf(entityName, ent) {
</div>
<div>
Akcija:
<span class="font-medium">{{
r.entities[activeEntity].action_label ||
r.entities[activeEntity].action
}}</span>
<span
:class="[
'font-medium inline-flex items-center gap-1',
r.entities[activeEntity].action === 'reactivate' && 'text-purple-700'
].filter(Boolean)"
>{{
r.entities[activeEntity].action_label ||
r.entities[activeEntity].action
}}
<span
v-if="r.entities[activeEntity].reactivation"
class="text-[9px] px-1 py-0.5 rounded bg-purple-100 text-purple-700"
title="Pogodba bo reaktivirana"
>react</span
></span
>
</div>
<div v-if="r.entities[activeEntity].original_action === 'update' && r.entities[activeEntity].action === 'reactivate'" class="text-[10px] text-purple-600 mt-0.5">
(iz neaktivnega → aktivno)
</div>
</template>
<template v-else>
@@ -18,6 +18,7 @@ const form = useForm({
source_type: "csv",
default_record_type: "",
is_active: true,
reactivate: false,
client_uuid: null,
entities: [],
meta: {
@@ -285,6 +286,10 @@ watch(
<label for="is_active" class="text-sm font-medium text-gray-700"
>Active</label
>
<div class="flex items-center gap-2 ml-6">
<input id="reactivate" v-model="form.reactivate" type="checkbox" class="rounded" />
<label for="reactivate" class="text-sm font-medium text-gray-700">Reactivation import</label>
</div>
</div>
<div class="pt-4">
@@ -20,6 +20,7 @@ const form = useForm({
source_type: props.template.source_type,
default_record_type: props.template.default_record_type || "",
is_active: props.template.is_active,
reactivate: props.template.reactivate ?? false,
client_uuid: props.template.client_uuid || null,
sample_headers: props.template.sample_headers || [],
// Add meta with default delimiter support
@@ -434,9 +435,11 @@ watch(
type="checkbox"
class="rounded"
/>
<label for="is_active" class="text-sm font-medium text-gray-700"
>Aktivna</label
>
<label for="is_active" class="text-sm font-medium text-gray-700">Aktivna</label>
<div class="flex items-center gap-2 ml-6">
<input id="reactivate" v-model="form.reactivate" type="checkbox" class="rounded" />
<label for="reactivate" class="text-sm font-medium text-gray-700">Reaktivacija</label>
</div>
<button
@click.prevent="save"
class="ml-auto px-3 py-2 bg-indigo-600 text-white rounded"