fix subrogasi jamkrindo

This commit is contained in:
daengdeni 2024-02-21 12:02:07 +07:00
parent 1e2a92e5cf
commit edaab6a935

View File

@ -9,8 +9,8 @@
use Modules\Writeoff\Entities\Debitur;
use Modules\Writeoff\Entities\Rekening;
use Modules\Writeoff\Entities\SubrogasiJamkrindo;
use Modules\Writeoff\Http\Requests\SubrogasiJamkrindo\StoreHapusBukuRequest;
use Modules\Writeoff\Http\Requests\SubrogasiJamkrindo\UpdateHapusBukuRequest;
use Modules\Writeoff\Http\Requests\SubrogasiJamkrindo\StoreSubrogasiJamkrindoRequest;
use Modules\Writeoff\Http\Requests\SubrogasiJamkrindo\UpdateSubrogasiJamkrindoRequest;
class SubrogasiJamkrindoModal extends Component
{
@ -70,17 +70,6 @@
'status' => $this->status
];
if ($this->edit_mode) {
// Emit a success event with a message
$subrogasi_jamkrindo = SubrogasiJamkrindo::find($this->id);
$subrogasi_jamkrindo->update($data);
$this->dispatch('success', __('Subrogasi Jamkrindo updated'));
} else {
// Emit a success event with a message
SubrogasiJamkrindo::create($data);
$this->dispatch('success', __('New Subrogasi Jamkrindo created'));
}
if ($this->edit_mode) {
// Emit a success event with a message
@ -96,11 +85,11 @@
'new_request' => json_encode($data),
'description' => 'Update Subrogasi Jamkrindo',
'status' => '0',
'ref' => $this->kode
'ref' => $this->nomor_pinjaman
];
$is_approval = Approval::where('menu', 'Subrogasi Jamkrindo')
->where('ref', $this->kode)
->where('ref', $this->nomor_pinjaman)
->where('status', '0')
->where('method', 'update')
->get()
@ -123,11 +112,11 @@
'new_request' => json_encode($data),
'description' => 'Create Subrogasi Jamkrindo',
'status' => '0',
'ref' => $this->kode
'ref' => $this->nomor_pinjaman
];
$is_approval = Approval::where('menu', 'Subrogasi Jamkrindo')
->where('ref', $this->kode)
->where('ref', $this->nomor_pinjaman)
->where('status', '0')
->where('method', 'create')
->get()
@ -257,9 +246,9 @@
{
if ($this->edit_mode) {
$request = new UpdateHapusBukuRequest();
$request = new UpdateSubrogasiJamkrindoRequest();
} else {
$request = new StoreHapusBukuRequest();
$request = new StoreSubrogasiJamkrindoRequest();
}