48 lines
1.9 KiB
PHP
48 lines
1.9 KiB
PHP
<flux:main>
|
|
<div class="flex justify-between items-center">
|
|
<div>
|
|
<flux:heading size="xl">{{ $pageTitle }}</flux:heading>
|
|
</div>
|
|
@can('create faq')
|
|
<div>
|
|
<flux:modal.trigger name="form-modal">
|
|
<flux:button variant="primary" class="text-sm"
|
|
wire:click="$dispatch('modal:open', {method: 'create', 'modalTitle': 'Tambah FAQs'})">Tambah
|
|
</flux:button>
|
|
</flux:modal.trigger>
|
|
</div>
|
|
@endcan
|
|
</div>
|
|
|
|
<div class="mt-6">
|
|
<livewire:datatable.studio.manage.faqs-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>Pertanyaan <span class="text-red-500 ms-1">*</span></flux:label>
|
|
<flux:input placeholder="Bagaimana Cara Jadi Member?" wire:model.live.debounce.500ms="form.question"
|
|
autofocus autocomplete="off" />
|
|
<flux:error name="form.question" />
|
|
</flux:field>
|
|
|
|
<flux:field>
|
|
<flux:label>Jawaban <span class="text-red-500 ms-1">*</span></flux:label>
|
|
<flux:editor wire:model="form.answer" placeholder="1. Silakan Anda mendaftar terlebih dahulu."
|
|
auotocomplete="off" class="**:data-[slot=content]:min-h-[100px]!" />
|
|
</flux:field>
|
|
|
|
<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>
|