user logs update
This commit is contained in:
@ -28,7 +28,12 @@ class ConfDistributionController extends Controller
|
||||
{
|
||||
$data = [];
|
||||
|
||||
UserLogs::insert(Auth::user()->id, "Access Distribution Category menu");
|
||||
$log = [
|
||||
"module" => "Distribution Category",
|
||||
"action" => "View",
|
||||
"desc" => "Open Distribution Category menu",
|
||||
];
|
||||
UserLogs::insert(Auth::user()->id, $log);
|
||||
return view("menu_v1.configs.distribution_category", $data);
|
||||
}
|
||||
|
||||
@ -102,7 +107,13 @@ class ConfDistributionController extends Controller
|
||||
$apiResp = Responses::created("success " . ($tipe == "new" ? "add new" : "edit") . " distribution category");
|
||||
|
||||
DB::commit();
|
||||
UserLogs::insert(Auth::user()->id, "".($tipe == "new" ? "Add new" : "Edit")." distribution category: ".$req->dc_name);
|
||||
|
||||
$log = [
|
||||
"module" => "Distribution Category",
|
||||
"action" => "".($tipe == "new" ? "Create" : "Update")."",
|
||||
"desc" => "".($tipe == "new" ? "Add new" : "Update")." distribution category: ".$req->dc_name,
|
||||
];
|
||||
UserLogs::insert(Auth::user()->id, $log);
|
||||
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
@ -204,6 +215,12 @@ class ConfDistributionController extends Controller
|
||||
DB::commit();
|
||||
|
||||
$apiResp = Responses::success("success delete vehicle type");
|
||||
|
||||
$log = [
|
||||
"module" => "Distribution Category",
|
||||
"action" => "Delete",
|
||||
"desc" => "Delete distribution category: ".$dtl[0]->dc_name,
|
||||
];
|
||||
UserLogs::insert(Auth::user()->id, "Delete distribution category: ".$dtl[0]->dc_name);
|
||||
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user