Browse Source

Store: data terbaru

master
unknown 1 year ago
parent
commit
e03fcfccf3
  1. 14
      app/Http/Controllers/API/v1/PeminjamanApi/PeminjamanApiController.php
  2. 12
      app/Http/Controllers/PetiController.php
  3. 6
      resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/show.blade.php

14
app/Http/Controllers/API/v1/PeminjamanApi/PeminjamanApiController.php

@ -22,7 +22,7 @@ class PeminjamanApiController extends Controller
public function show($id)
{
$peminjaman = asset_status::with(['peti', 'warehouse'])->find($id);
$peminjaman = asset_status::with(['peti.customer', 'peti.tipe_peti', 'warehouse'])->find($id);
return ResponseFormatter::success([
'message' => 'Data peminjaman berhasil diambil ID',
@ -32,12 +32,22 @@ class PeminjamanApiController extends Controller
public function store(Request $request)
{
$this->validate($request, [
'peti_id' => 'required',
'exit_at' => 'required',
'exit_pic' => 'required',
'exit_warehouse' => 'required',
'est_pengembalian' => 'required',
'created_by' => 'required',
'updated_by' => 'required',
]);
$peminjaman = asset_status::create([
'asset_id' => $request->asset_id,
'peti_id' => $request->peti_id,
'exit_at' => $request->exit_at,
'exit_pic' => $request->exit_pic,
'exit_warehouse' => $request->exit_warehouse,
'est_pengembalian' => $request->est_pengembalian,
'created_by' => $request->created_by,
'updated_by' => $request->updated_by,
]);

12
app/Http/Controllers/PetiController.php

@ -115,9 +115,15 @@ class PetiController extends Controller
'Code Customer : ' .
$petiqr->customer->code_customer .
"\n" .
'ID Peti : ' .
$petiqr->tipe_peti->id .
"\n" .
'Type Peti : ' .
$petiqr->tipe_peti->type .
"\n" .
'ID Warehouse : ' .
$petiqr->warehouse->id .
"\n" .
'Warehouse : ' .
$petiqr->warehouse->name .
"\n" .
@ -223,9 +229,15 @@ class PetiController extends Controller
'Code Customer : ' .
$peti->customer->code_customer .
"\n" .
'ID Peti : ' .
$peti->tipe_peti->id .
"\n" .
'Type Peti : ' .
$peti->tipe_peti->type .
"\n" .
'ID Warehouse : ' .
$peti->warehouse->id .
"\n" .
'Warehouse : ' .
$peti->warehouse->name .
"\n" .

6
resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/show.blade.php

@ -43,9 +43,15 @@
'Code Customer : ' .
$peti->customer->code_customer .
"\n" .
'ID Peti : ' .
$peti->tipe_peti->id .
"\n" .
'Type Peti : ' .
$peti->tipe_peti->type .
"\n" .
'ID Warehouse : ' .
$peti->warehouse->id .
"\n" .
'Warehouse : ' .
$peti->warehouse->name .
"\n" .

Loading…
Cancel
Save