Importer update add support for meta data and multiple inserts for some entities like addresses and phones, updated other things

This commit is contained in:
Simon Pocrnjič
2025-10-09 22:28:48 +02:00
parent c8029c9eb0
commit 0598261cdc
27 changed files with 2517 additions and 375 deletions
+45 -5
View File
@@ -70,6 +70,14 @@ const logout = () => {
// Flash toast notifications (same as AppLayout for consistency)
const page = usePage();
const flash = computed(() => page.props.flash || {});
const isCompletedMode = computed(() => !!page.props.completed_mode);
// On mobile, always show labels in the overlay menu, regardless of collapsed state
const showLabels = computed(() => !sidebarCollapsed.value || isMobile.value);
// On mobile, force full width for the slide-out menu
const widthClass = computed(() =>
isMobile.value ? "w-64" : sidebarCollapsed.value ? "w-16" : "w-64"
);
const showToast = ref(false);
const toastMessage = ref("");
const toastType = ref("success");
@@ -113,7 +121,7 @@ const closeSearch = () => (searchOpen.value = false);
<!-- Sidebar -->
<aside
:class="[
sidebarCollapsed ? 'w-16' : 'w-64',
widthClass,
'bg-white border-r border-gray-200 transition-all duration-200 z-50',
isMobile
? 'fixed inset-y-0 left-0 transform ' +
@@ -124,18 +132,19 @@ const closeSearch = () => (searchOpen.value = false);
<div class="h-16 px-4 flex items-center justify-between border-b">
<Link :href="route('phone.index')" class="flex items-center gap-2">
<ApplicationMark class="h-8 w-auto" />
<span v-if="!sidebarCollapsed" class="text-sm font-semibold">Teren</span>
<span v-if="showLabels" class="text-sm font-semibold">Teren</span>
</Link>
</div>
<nav class="py-4">
<ul class="space-y-1">
<!-- Single phone link only -->
<!-- Assigned jobs link -->
<li>
<Link
:href="route('phone.index')"
:class="[
'flex items-center gap-3 px-4 py-2 text-sm hover:bg-gray-100',
route().current('phone.index') || route().current('phone.*')
route().current('phone.index') ||
(route().current('phone.case') && !isCompletedMode)
? 'bg-gray-100 text-gray-900'
: 'text-gray-600',
]"
@@ -156,7 +165,38 @@ const closeSearch = () => (searchOpen.value = false);
d="M9 6.75H7.5A2.25 2.25 0 005.25 9v9A2.25 2.25 0 007.5 20.25h9A2.25 2.25 0 0018.75 18v-9A2.25 2.25 0 0016.5 6.75H15M9 6.75A1.5 1.5 0 0010.5 5.25h3A1.5 1.5 0 0015 6.75M9 6.75A1.5 1.5 0 0110.5 8.25h3A1.5 1.5 0 0015 6.75M9 12h.008v.008H9V12zm0 3h.008v.008H9V15zm3-3h3m-3 3h3"
/>
</svg>
<span v-if="!sidebarCollapsed">Opravila</span>
<span v-if="showLabels">Opravila</span>
</Link>
</li>
<!-- Completed today link -->
<li>
<Link
:href="route('phone.completed')"
:class="[
'flex items-center gap-3 px-4 py-2 text-sm hover:bg-gray-100',
route().current('phone.completed') ||
(route().current('phone.case') && isCompletedMode)
? 'bg-gray-100 text-gray-900'
: 'text-gray-600',
]"
title="Zaključeno danes"
>
<!-- check-circle icon -->
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
class="w-5 h-5"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<span v-if="showLabels">Zaključeno danes</span>
</Link>
</li>
</ul>