Files

54 lines
3.4 KiB
PHP

<section>
<x-header>
{{ __('Calculationpreset') }}
<x-slot name="headerleft">
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-black/10 border-white/20 rounded text-gray-50 placeholder:text-gray-200 focus:border-white/50 focus:ring-white/50" />
</x-slot>
<x-slot name="headerright">
<flux:button wire:click="create" variant="primary" class="bg-selective hover:bg-selective-600 text-gray-950 transition ease-in-out hover:cursor-pointer">Create Calculationpreset</flux:button>
</x-slot>
</x-header>
<div class="container m-auto my-8 bg-elephant border border-elephant-900 rounded-lg shadow p-6 text-gray-50">
</div>
<div class="container m-auto my-8 bg-elephant border border-elephant-900 rounded-lg shadow p-6 text-gray-50">
<x-table>
<x-slot name="tableheader">
<x-table.header class="w-[50px]">ID</x-table.header>
<x-table.header>Name</x-table.header>
<x-table.header>Price kw/h</x-table.header>
<x-table.header>Factor Printer</x-table.header>
<x-table.header>Factor Maintenance</x-table.header>
<x-table.header>Factor Price</x-table.header>
<x-table.header class="w-[150px]">Actions</x-table.header>
</x-slot>
@foreach ($calculationpresets as $calculationpreset)
<tr wire:key="{{ $calculationpreset->id }}" class="text-gray-200 border-b border-white/50 hover:bg-white/10 transition duration-150 ease-in-out">
<x-table.item><p class="p-4 px-3 pl-6">{{ $calculationpreset->id }}</p></x-table.item>
<x-table.item><p class="p-4 px-3 font-bold">{{ $calculationpreset->name }}</p></x-table.item>
<x-table.item><p class="p-4 px-3">{{ $calculationpreset->price_kwh }}/kWh</p></x-table.item>
<x-table.item><p class="p-4 px-3">{{ $calculationpreset->factor_printer }}/h</p></x-table.item>
<x-table.item><p class="p-4 px-3">{{ $calculationpreset->factor_maintenance }}/h</p></x-table.item>
<x-table.item><p class="p-4 px-3">{{ $calculationpreset->factor_price }}%</p></x-table.item>
<x-table.item>
<div class="flex flex-row gap-4 justify-end pr-8">
<flux:button variant="primary" class="text-gray-200 bg-transparent shadow-none hover:bg-cornflower hover:shadow hover:text-gray-950 hover:cursor-pointer" wire:click="show({{ $calculationpreset->id }})" icon="magnifying-glass"></flux:button>
<flux:button variant="primary" class="text-gray-200 bg-transparent shadow-none hover:bg-gold-drop hover:shadow hover:text-gray-950 hover:cursor-pointer" wire:click="edit({{ $calculationpreset->id }})" icon="pencil"></flux:button>
<flux:button variant="primary" class="text-gray-200 bg-transparent shadow-none hover:bg-red-700 hover:shadow hover:cursor-pointer" wire:click="delete({{ $calculationpreset->id }})" icon="trash"></flux:button>
</div>
</x-table.item>
</tr>
@endforeach
<x-slot name="pagination">
{{ $calculationpresets->links() }}
</x-slot>
</x-table>
</div>
</section>