update approval parameter jenis jaminan
This commit is contained in:
parent
72851305b0
commit
f9a266d9b5
@ -91,6 +91,7 @@
|
||||
$_model = [
|
||||
'Parameter Cabang' => 'Branch',
|
||||
'Parameter Mata Uang' => 'Currency',
|
||||
'Parameter Jenis Jaminan' => 'GuaranteeType',
|
||||
];
|
||||
try {
|
||||
$approval = Approval::findOrFail($id);
|
||||
@ -98,7 +99,7 @@
|
||||
$approval->approved_at = date('Y-m-d H:i:s');
|
||||
$approval->status = $request->status;
|
||||
|
||||
$model = "Modules\\Writeoff\\Entities\\".$_model[$approval->menu];
|
||||
$model = "Modules\\Writeoff\\Entities\\" . $_model[$approval->menu];
|
||||
$model = new $model();
|
||||
//20555012,18
|
||||
if ($approval->status == 1) {
|
||||
|
@ -46,6 +46,9 @@
|
||||
// Emit a success event with a message
|
||||
$guarante = GuaranteeType::find($this->id);
|
||||
|
||||
$data['updated_by'] = auth()->user()->id;
|
||||
$data['updated_at'] = now();
|
||||
|
||||
$approval = [
|
||||
'method' => 'update',
|
||||
'menu' => 'Parameter Jenis Jaminan',
|
||||
@ -71,6 +74,10 @@
|
||||
}
|
||||
} else {
|
||||
// Emit a success event with a message
|
||||
|
||||
$data['created_by'] = auth()->user()->id;
|
||||
$data['created_at'] = now();
|
||||
|
||||
$approval = [
|
||||
'method' => 'create',
|
||||
'menu' => 'Parameter Jenis Jaminan',
|
||||
@ -115,6 +122,10 @@
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
$old = GuaranteeType::find($id);
|
||||
unset($old->deleted_at);
|
||||
unset($old->deleted_by);
|
||||
|
||||
$guarantee = GuaranteeType::find($id);
|
||||
$guarantee->delete_by = auth()->user()->id;
|
||||
$guarantee->deleted_at = now();
|
||||
@ -122,7 +133,8 @@
|
||||
$approval = [
|
||||
'method' => 'delete',
|
||||
'menu' => 'Parameter Jenis Jaminan',
|
||||
'old_request' => json_encode($guarantee),
|
||||
'new_request' => json_encode($guarantee),
|
||||
'old_request' => json_encode($old),
|
||||
'description' => 'Delete Parameter Jenis Jaminan',
|
||||
'status' => '0',
|
||||
'ref' => $guarantee->kode
|
||||
|
Loading…
Reference in New Issue
Block a user