|
|
|
@ -25,6 +25,26 @@ class PengembalianBarangApiController extends Controller
|
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function show($id) |
|
|
|
|
{ |
|
|
|
|
$pengembalian = \App\Models\asset_status::with([ |
|
|
|
|
'peti.customer:id,name,code_customer,lot_no,nip,no_hp,tgl_lahir,jenis_kelamin,agama,address', |
|
|
|
|
'peti.tipe_peti:id,type,size_peti,description', |
|
|
|
|
'warehouse', |
|
|
|
|
'warehouseEnter' |
|
|
|
|
])->find($id); |
|
|
|
|
|
|
|
|
|
if (!$pengembalian) { |
|
|
|
|
return ResponseFormatter::error([ |
|
|
|
|
'message' => 'Data pengembalian tidak ditemukan', |
|
|
|
|
], 'Data Not Found', 404); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ResponseFormatter::success([ |
|
|
|
|
'message' => 'Data pengembalian berhasil diambil', |
|
|
|
|
'asset_status' => $pengembalian, |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function update(Request $request, $id) |
|
|
|
|
{ |
|
|
|
|