Small changes

This commit is contained in:
Simon Pocrnjič 2026-01-27 19:49:09 +01:00
parent fb7704027b
commit 33b236d881
2 changed files with 4 additions and 3 deletions

View File

@ -27,7 +27,7 @@ public function index(Client $client, Request $request)
->where('person.full_name', 'ilike', '%'.$search.'%')
->groupBy('clients.id');
})
->where('clients.active', 1)
//->where('clients.active', 1)
// Use LEFT JOINs for aggregated data to avoid subqueries
->leftJoin('client_cases', 'client_cases.client_id', '=', 'clients.id')
->leftJoin('contracts', function ($join) {
@ -51,7 +51,7 @@ public function index(Client $client, Request $request)
return Inertia::render('Client/Index', [
'clients' => $query
->paginate($request->integer('per_page', 15))
->paginate($request->integer('per_page', default: 100))
->withQueryString(),
'filters' => $request->only(['search']),
]);

View File

@ -162,7 +162,7 @@ const fmtCurrency = (v) => {
</script>
<template>
<AppLayout>
<AppLayout title="Clients">
<template #header> </template>
<div class="py-6">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
@ -201,6 +201,7 @@ const fmtCurrency = (v) => {
:show-pagination="false"
:show-toolbar="true"
:hoverable="true"
:page-size="100"
row-key="uuid"
:striped="true"
empty-text="Ni najdenih naročnikov."