Agregando daisy ui y cambiando componentes por las alternativas de daisy
This commit is contained in:
@@ -3,34 +3,47 @@
|
||||
|
||||
<div class="flex flex-col sm:flex-row gap-2 justify-between items-baseline mb-4">
|
||||
<x-title>Cajas</x-title>
|
||||
<x-button wire:click="createTurno" icon="plus">Registrar Caja</x-button>
|
||||
<button class="btn" wire:click="createTurno" icon="plus">Registrar Caja</button>
|
||||
</div>
|
||||
|
||||
<div class="flex">
|
||||
<div class="flex mb-4">
|
||||
<x-date label="Fecha" wire:model.live="searchFecha" helpers/>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<x-table striped :headers="$this->headers" :rows="$this->rows" paginate>
|
||||
@interact('column_fecha', $row)
|
||||
{{$row->fecha->format('d-m-Y')}}
|
||||
@endinteract
|
||||
@interact('column_ingresos', $row)
|
||||
{{Number::currency($row->ingresos()->sum('total'))}}
|
||||
@endinteract
|
||||
@interact('column_egresos', $row)
|
||||
{{Number::currency($row->egresos()->sum('valor'))}}
|
||||
@endinteract
|
||||
@interact('column_arqueo', $row)
|
||||
<span class="font-bold {{$row->arqueo >= 0 ? 'text-green-500' : 'text-red-500'}}">
|
||||
{{Number::currency($row->arqueo)}}
|
||||
</span>
|
||||
@endinteract
|
||||
@interact('column_action', $row)
|
||||
<x-button.circle icon="edit" :href="route('cajas.edit', $row->id)" wire:navigate :key="uniqid()"/>
|
||||
<x-button.circle icon="trash" color="red" wire:click="confirmDelete('{{$row->id}}')" :key="uniqid()"/>
|
||||
@endinteract
|
||||
</x-table>
|
||||
<div class="overflox-x-auto">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Fecha</th>
|
||||
<th>Caja</th>
|
||||
<th>Turno</th>
|
||||
<th>Ingresos</th>
|
||||
<th>Egresos</th>
|
||||
<th>Arqueo</th>
|
||||
<th class="text-end">Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($this->rows as $row)
|
||||
<tr>
|
||||
<td>{{$row->fecha->format('d-m-Y')}}</td>
|
||||
<td>{{$row->numero_caja}}</td>
|
||||
<td>{{$row->numero_turno}}</td>
|
||||
<td>{{Number::currency($row->ingresos()->sum('total'))}}</td>
|
||||
<td>{{Number::currency($row->egresos()->sum('valor'))}}</td>
|
||||
<td class="{{$row->arqueo >= 0 ? 'text-green-500' : 'text-red-500'}}">{{Number::currency($row->arqueo)}}</td>
|
||||
<td class="w-0 whitespace-nowrap">
|
||||
<a class="btn btn-circle btn-sm" wire:navigate href="{{route('cajas.edit', $row->id)}}">
|
||||
<i class="ti ti-edit"></i>
|
||||
</a>
|
||||
<button class="btn btn-circle btn-error btn-sm" wire:click="confirmDelete('{{$row->id}}')">
|
||||
<i class="ti ti-trash"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<x-modal title="Registrar Caja" wire center blur>
|
||||
|
||||
Reference in New Issue
Block a user