parfum/resources/views/livewire/studio/feature/choose-us.blade.php

67 lines
2.7 KiB
PHP

<flux:main>
<div class="flex justify-between items-center">
<div>
<flux:heading size="xl">{{ $pageTitle }}</flux:heading>
</div>
@can('create choose us')
<div>
<flux:modal.trigger name="form-modal">
<flux:button variant="primary" class="text-sm"
wire:click="$dispatch('modal:open', {method: 'create', 'modalTitle': 'Tambah Pilih Kami'})">
Tambah
</flux:button>
</flux:modal.trigger>
</div>
@endcan
</div>
<div class="mt-6">
<livewire:datatable.studio.feature.choose-us-table />
</div>
@include('components.confirmation.delete')
<flux:modal name="form-modal" class="w-[95%] max-w-sm md:max-w-xl mx-auto" @close="closeModal('form-modal')">
<div class="p-4 space-y-6">
<flux:heading size="lg">{{ $modalTitle }}</flux:heading>
<flux:field>
<flux:label>Nama <span class="text-red-500 ms-1">*</span></flux:label>
<flux:input placeholder="200+ Aroma" wire:model.live.debounce.500ms="form.name" autofocus
autocomplete="off" />
<flux:error name="form.name" />
</flux:field>
<flux:field>
<flux:label>Keterangan <span class="text-red-500 ms-1">*</span></flux:label>
<flux:textarea wire:model="form.description" placeholder="Kami punya 200 lebih aroma ..."
auotocomplete="off" />
</flux:field>
<div class="lg:col-span-2">
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<flux:field>
<flux:label>Warna <span class="text-red-500 ms-1">*</span></flux:label>
<flux:input type="color" wire:model="form.color" autofocus
autocomplete="off" />
<flux:error name="form.color" />
</flux:field>
<flux:field>
<flux:label>Icon <span class="text-red-500 ms-1">*</span></flux:label>
<flux:input type="text" wire:model="form.icon" autofocus
autocomplete="off" />
<flux:error name="form.icon" />
</flux:field>
</div>
</div>
<div class="flex">
<flux:spacer />
<flux:button variant="primary" class="sm:w-auto cursor-pointer" wire:click="{{ $method }}">
Simpan
</flux:button>
</div>
</div>
</flux:modal>
</flux:main>