Agregando daisy ui y cambiando componentes por las alternativas de daisy
This commit is contained in:
@@ -1,19 +1,39 @@
|
||||
@use(Illuminate\Support\Number)
|
||||
<div>
|
||||
<form wire:submit.prevent="save" class="grid lg:grid-cols-[repeat(3,minmax(0,2fr))_1fr] gap-2 mb-4 items-end">
|
||||
<x-select.styled label="Tipo Documento" :options="$this->tipos" wire:model="tipo" id="tipo" required
|
||||
searchable invalidate/>
|
||||
<x-input label="Descripción" wire:model="descripcion" invalidate/>
|
||||
<x-input label="Total" wire:model="valor" invalidate/>
|
||||
<label class="form-control">
|
||||
<div class="label">
|
||||
<span class="label-text">Tipo Documento</span>
|
||||
</div>
|
||||
<select class="select select-bordered" required wire:model="tipo">
|
||||
@foreach($this->tipos as $tipo)
|
||||
<option>{{$tipo}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<x-button type="submit">
|
||||
<label class="form-control">
|
||||
<div class="label">
|
||||
<span class="label-text">Descripción</span>
|
||||
</div>
|
||||
<input class="input input-bordered" wire:model="descripcion"/>
|
||||
</label>
|
||||
<label class="form-control">
|
||||
<div class="label">
|
||||
<span class="label-text">Total</span>
|
||||
</div>
|
||||
<input type="number" class="input input-bordered" wire:model="valor"/>
|
||||
</label>
|
||||
|
||||
<button class="btn" type="submit">
|
||||
@if($this->currentDocumento)
|
||||
<i class="ti ti-device-floppy text-lg"></i>
|
||||
Guardar
|
||||
@else
|
||||
<i class="ti ti-plus text-lg"></i>
|
||||
Agregar
|
||||
@endif
|
||||
</x-button>
|
||||
|
||||
</button>
|
||||
|
||||
<p class="text-sm font-medium text-red-500">
|
||||
@error('tipo'){{$message}}@enderror
|
||||
@@ -24,17 +44,38 @@
|
||||
<p class="text-sm font-medium text-red-500">
|
||||
@error('valor'){{$message}}@enderror
|
||||
</p>
|
||||
|
||||
</form>
|
||||
<x-table striped :headers="$this->headers" :rows="$this->rows">
|
||||
@interact('column_valor', $row)
|
||||
{{Number::currency($row->valor)}}
|
||||
@endinteract
|
||||
@interact('column_action', $row)
|
||||
<x-button.circle icon="edit" wire:click="edit('{{$row->id}}')" :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>Tipo Documento</th>
|
||||
<th>Descripción</th>
|
||||
<th>Total</th>
|
||||
<th class="text-end">Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($this->rows as $row)
|
||||
<tr>
|
||||
<td>{{$row->tipo_documento}}</td>
|
||||
<td>{{$row->descripcion}}</td>
|
||||
<td>{{Number::currency($row->valor)}}</td>
|
||||
<td class="w-0 whitespace-nowrap">
|
||||
<button class="btn btn-circle btn-sm" wire:click="edit('{{$row->id}}')">
|
||||
<i class="ti ti-edit"></i>
|
||||
</button>
|
||||
<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>
|
||||
|
||||
<div class="mt-4">
|
||||
<p class="text-xl">Documentos Totales: <span class="font-bold">{{$this->totalDocumentos}}</span></p>
|
||||
|
||||
Reference in New Issue
Block a user