65 lines
2.6 KiB
PHP
65 lines
2.6 KiB
PHP
<flux:main>
|
|
<div class="flex justify-between items-center">
|
|
<div>
|
|
<flux:heading size="xl">{{ $pageTitle }}</flux:heading>
|
|
</div>
|
|
<div>
|
|
<flux:modal.trigger name="form-modal">
|
|
<flux:button href="javascript:void(0)" variant="primary" class="text-sm"
|
|
wire:click="$dispatch('modal:open', {method: 'create', 'modalTitle': 'Tambah Membership'})">Tambah
|
|
</flux:button>
|
|
</flux:modal.trigger>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-6">
|
|
<livewire:datatable.memberships-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:input label="Nama" placeholder="Masukkan nama membership" wire:model.live.debounce.500ms="form.name"
|
|
autofocus autocomplete="off" clearable />
|
|
|
|
<flux:field>
|
|
<flux:label>Min. Belanja</flux:label>
|
|
<flux:input.group>
|
|
<flux:input.group.prefix>Rp</flux:input.group.prefix>
|
|
|
|
<flux:input placeholder="Masukkan minimal belanja" x-mask:dynamic="$money($input, ',')"
|
|
wire:model.live.debounce.500ms="form.min_purchase" autocomplete="off" clearable />
|
|
</flux:input.group>
|
|
|
|
<flux:error name="form.min_purchase" />
|
|
</flux:field>
|
|
|
|
<flux:field>
|
|
<flux:label>Persentase Diskon</flux:label>
|
|
<flux:input.group>
|
|
<flux:input placeholder="Masukkan persentase diskon"
|
|
wire:model.live.debounce.500ms="form.discount_percentage" autocomplete="off" clearable />
|
|
|
|
<flux:input.group.suffix>%</flux:input.group.suffix>
|
|
</flux:input.group>
|
|
|
|
<flux:error name="form.discount_percentage" />
|
|
</flux:field>
|
|
|
|
<flux:editor label="Syarat dan Ketentuan" wire:model="form.terms_conditions"
|
|
placeholder="Masukkan syarat dan ketentuan" auotocomplete="off"
|
|
class="**:data-[slot=content]:min-h-[100px]!" />
|
|
|
|
<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>
|