update module currency

This commit is contained in:
daengdeni 2024-01-10 11:40:32 +07:00
parent 3446107242
commit bd28c547e1
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['currency-table'].ajax.reload();
});
});
$('#kt_modal_add_currency').on('hidden.bs.modal', function () {
$(this).find('form').trigger('reset');
Livewire.dispatch('reload', false);
})
</script>
@endpush