Track machine counters and maintenance with counter and time intervals

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
2026-11-26 16:52:49 +02:00
co-authored by Claude Sonnet 5.5
parent aac579257a
commit 3e1c671949
53 changed files with 2636 additions and 6 deletions
@@ -104,6 +104,29 @@ new class extends Component
</li>
@endif
@endcan
@can('machines.use')
@if ($overview->lateMaintenance !== [])
<li>
<x-link :href="route('machines.show', $overview->lateMaintenance[0]['machineId']).'#maintenance-heading'" navigate>
{{ trans_choice('dashboard.todo.maintenance', count($overview->lateMaintenance), ['count' => count($overview->lateMaintenance)]) }}
</x-link>
<ul class="mt-1 ml-4 list-disc">
@foreach ($overview->lateMaintenance as $late)
<li>{{ __('dashboard.todo.maintenance_line', ['machine' => $late['machine'], 'item' => $late['item']]) }}</li>
@endforeach
</ul>
</li>
@endif
@endcan
@can('inventory.view')
@if ($overview->stockItemsToOrder > 0)
<li>
<x-link :href="route('inventory.index', ['tilattavat' => 1])" navigate>
{{ trans_choice('dashboard.todo.stock', $overview->stockItemsToOrder, ['count' => $overview->stockItemsToOrder]) }}
</x-link>
</li>
@endif
@endcan
@can('reports.view')
<li>
<x-link :href="route('reports.unbilled')" navigate>{{ __('dashboard.todo.unbilled', ['amount' => $this->money($overview->unbilledValueCents)]) }}</x-link>