feat(formula): menambahkan kondisi untuk update dan delete data
- mengilangkan filter outlet di overview dan analysis jika hanya terdapat 1 outlet saja
This commit is contained in:
parent
62e2182dd2
commit
8077f626ac
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<flux:separator vertical class="hidden lg:block mx-2 my-2" />
|
<flux:separator vertical class="hidden lg:block mx-2 my-2" />
|
||||||
|
|
||||||
|
@if (count($outlets) > 1)
|
||||||
<div class="flex flex-wrap gap-2 w-full sm:w-auto">
|
<div class="flex flex-wrap gap-2 w-full sm:w-auto">
|
||||||
<flux:checkbox.group wire:model.live="selectedOutletIds" variant="buttons">
|
<flux:checkbox.group wire:model.live="selectedOutletIds" variant="buttons">
|
||||||
@foreach ($outlets as $key => $value)
|
@foreach ($outlets as $key => $value)
|
||||||
@ -23,8 +24,8 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</flux:checkbox.group>
|
</flux:checkbox.group>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<flux:separator vertical class="hidden lg:block mx-2 my-2" />
|
<flux:separator vertical class="hidden lg:block mx-2 my-2" />
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="w-full sm:w-auto">
|
<div class="w-full sm:w-auto">
|
||||||
<flux:date-picker mode="range" wire:model.live="range">
|
<flux:date-picker mode="range" wire:model.live="range">
|
||||||
@ -39,7 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<flux:separator class="mb-6"/>
|
<flux:separator class="mb-6" />
|
||||||
|
|
||||||
<flux:heading>Counting Data</flux:heading>
|
<flux:heading>Counting Data</flux:heading>
|
||||||
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-3 mb-6 mt-2">
|
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-3 mb-6 mt-2">
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
<flux:text class="mb-6 mt-2 text-base">Selamat datang di Studio Yadi Parfum.</flux:text>
|
<flux:text class="mb-6 mt-2 text-base">Selamat datang di Studio Yadi Parfum.</flux:text>
|
||||||
|
|
||||||
<div class="mt-6">
|
<div class="mt-6">
|
||||||
|
@if (count($outlets) > 1)
|
||||||
<div class="mb-6 grid grid-cols-1 lg:grid-cols-2 gap-4">
|
<div class="mb-6 grid grid-cols-1 lg:grid-cols-2 gap-4">
|
||||||
<flux:checkbox.group wire:model.live="selectedOutletIds" variant="buttons">
|
<flux:checkbox.group wire:model.live="selectedOutletIds" variant="buttons">
|
||||||
@foreach ($outlets as $key => $value)
|
@foreach ($outlets as $key => $value)
|
||||||
@ -10,8 +11,8 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</flux:checkbox.group>
|
</flux:checkbox.group>
|
||||||
</div>
|
</div>
|
||||||
|
<flux:separator class="mb-6" />
|
||||||
<flux:separator class="mb-6"/>
|
@endif
|
||||||
|
|
||||||
<flux:subheading>Data yang ditampilkan di bawah ini adalah data hari ini dan hari kemarin.</flux:subheading>
|
<flux:subheading>Data yang ditampilkan di bawah ini adalah data hari ini dan hari kemarin.</flux:subheading>
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-4 mb-6 mt-2">
|
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-4 mb-6 mt-2">
|
||||||
|
|||||||
@ -31,7 +31,9 @@
|
|||||||
<flux:text class="text-xs text-gray-400">({{ $item['volume'] }} ml)</flux:text>
|
<flux:text class="text-xs text-gray-400">({{ $item['volume'] }} ml)</flux:text>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@canany(['update formula', 'delete formula'])
|
||||||
<x-slot name="actions">
|
<x-slot name="actions">
|
||||||
|
@can('update formula')
|
||||||
<flux:modal.trigger name="form-modal">
|
<flux:modal.trigger name="form-modal">
|
||||||
<flux:tooltip content="Ubah">
|
<flux:tooltip content="Ubah">
|
||||||
<flux:button variant="primary" color="yellow" icon="pencil-square"
|
<flux:button variant="primary" color="yellow" icon="pencil-square"
|
||||||
@ -40,6 +42,9 @@
|
|||||||
</flux:button>
|
</flux:button>
|
||||||
</flux:tooltip>
|
</flux:tooltip>
|
||||||
</flux:modal.trigger>
|
</flux:modal.trigger>
|
||||||
|
@endcan
|
||||||
|
|
||||||
|
@can('delete formula')
|
||||||
<flux:modal.trigger name="delete">
|
<flux:modal.trigger name="delete">
|
||||||
<flux:tooltip content="Hapus">
|
<flux:tooltip content="Hapus">
|
||||||
<flux:button variant="danger" icon="trash" size="sm"
|
<flux:button variant="danger" icon="trash" size="sm"
|
||||||
@ -47,7 +52,9 @@
|
|||||||
</flux:button>
|
</flux:button>
|
||||||
</flux:tooltip>
|
</flux:tooltip>
|
||||||
</flux:modal.trigger>
|
</flux:modal.trigger>
|
||||||
|
@endcan
|
||||||
</x-slot>
|
</x-slot>
|
||||||
|
@endcanany
|
||||||
</flux:callout>
|
</flux:callout>
|
||||||
@endforeach
|
@endforeach
|
||||||
</flux:card>
|
</flux:card>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user