parfum/resources/views/livewire/studio/information/faqs.blade.php
Yoga Pangestu 77d91b977f feat(faq): implemntasi testing
- kasih return type
- menyesuaikan factory
- mengganti modalName
- menyesuaikan seeder
- menyesuaikan panggil component
2025-12-10 13:26:44 +07:00

56 lines
2.2 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.information.faqs-table />
</div>
@include('components.modals.confirmation', [
'modalName' => 'delete-confirmation',
'modalTitle' => 'Apakah Anda yakin?',
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
'buttonVariant' => 'primary',
'buttonColor' => 'danger',
'buttonText' => 'Ya, Hapus',
])
<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>