- Increased icon sizes in service items, service orders, users, and technician management for better visibility. - Added custom loading indicators with appropriate icons in search fields for vehicles, work orders, and technicians. - Introduced invoice management routes for better organization and access control. - Created a new test for the estimate PDF functionality to ensure proper rendering and data integrity.
44 lines
1.5 KiB
PHP
44 lines
1.5 KiB
PHP
@props([
|
|
'stashable' => null,
|
|
'sticky' => null,
|
|
])
|
|
|
|
@php
|
|
$classes = Flux::classes('[grid-area:sidebar]')
|
|
->add('z-1 flex flex-col gap-4 [:where(&)]:w-64 p-4')
|
|
;
|
|
|
|
if ($sticky) {
|
|
$attributes = $attributes->merge([
|
|
'x-bind:style' => '{ position: \'sticky\', top: $el.offsetTop + \'px\', \'max-height\': \'calc(100dvh - \' + $el.offsetTop + \'px)\' }',
|
|
'class' => 'max-h-dvh overflow-y-auto overscroll-contain',
|
|
]);
|
|
}
|
|
|
|
if ($stashable) {
|
|
$attributes = $attributes->merge([
|
|
'x-bind:data-stashed' => '! screenLg',
|
|
'x-resize.document' => 'screenLg = window.innerWidth >= 1024',
|
|
'x-init' => 'screenLg = window.innerWidth >= 1024; $el.classList.add(\'-translate-x-full\', \'rtl:translate-x-full\'); $el.removeAttribute(\'data-mobile-cloak\'); $el.classList.add(\'transition-transform\')',
|
|
])->class([
|
|
'max-lg:data-mobile-cloak:hidden',
|
|
'[[data-show-stashed-sidebar]_&]:translate-x-0! lg:translate-x-0!',
|
|
'z-20! data-stashed:start-0! data-stashed:fixed! data-stashed:top-0! data-stashed:min-h-dvh! data-stashed:max-h-dvh!'
|
|
]);
|
|
}
|
|
|
|
// Check if x-data already exists, if not add default
|
|
$existingXData = $attributes->get('x-data');
|
|
if (!$existingXData) {
|
|
$attributes = $attributes->merge(['x-data' => '{ screenLg: window.innerWidth >= 1024 }']);
|
|
}
|
|
@endphp
|
|
|
|
@if ($stashable)
|
|
<flux:sidebar.backdrop />
|
|
@endif
|
|
|
|
<div {{ $attributes->class($classes) }} data-mobile-cloak data-flux-sidebar>
|
|
{{ $slot }}
|
|
</div>
|