update aktif after approval

This commit is contained in:
Daeng Deni Mardaeni 2023-09-21 11:08:59 +07:00
parent bd0ec45d5a
commit 95c9d342a9

View File

@ -135,11 +135,12 @@
'keterangan' => ''
];
//echo json_encode($detail);exit;
DocumentDetail::create($detail);
return redirect()->route('document.index')->with('success', 'Document created successfully.');
} catch (Exception $e) {
return redirect()->route('document.index')->with('error', 'Document created failed, ' . $e->getMessage());
}
}
@ -160,6 +161,7 @@
$data = [
'approval_flag' => $request->flag ?? null,
'status' => $request->keterangan == "" ? '1' : '3',
'aktif' => 1,
'keterangan' => $request->keterangan ?? null,
'approved_at' => date('Y-m-d H:i:s'),
'approved_by' => $this->user->id