update module facility types

This commit is contained in:
daengdeni 2024-01-10 11:40:49 +07:00
parent ed55516583
commit 2b74e8f14f
2 changed files with 12 additions and 0 deletions

View File

@ -21,6 +21,7 @@
protected $listeners = [
'delete' => 'delete',
'update' => 'update',
'reload' => 'reload',
];
public function render()
@ -142,6 +143,12 @@
}
}
public function reload()
{
$this->edit_mode = false;
$this->reset();
}
public function hydrate()
{
$this->resetErrorBag();

View File

@ -92,6 +92,11 @@
LaravelDataTables['facility-type-table'].ajax.reload();
});
});
$('#kt_modal_add_facility_type').on('hidden.bs.modal', function () {
$(this).find('form').trigger('reset');
Livewire.dispatch('reload', false);
})
</script>
@endpush