update module loan type

This commit is contained in:
daengdeni 2024-01-10 11:51:05 +07:00
parent 880eb3ec50
commit 5f5d6d87ed
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['loan-type-table'].ajax.reload();
});
});
$('#kt_modal_add_loan_type').on('hidden.bs.modal', function () {
$(this).find('form').trigger('reset');
Livewire.dispatch('reload', false);
})
</script>
@endpush