update module debitur

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

View File

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

View File

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