mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-22 22:14:26 +00:00
fix unclaimed packing lists
This commit is contained in:
@@ -18,7 +18,7 @@ class PackageResource extends JsonResource
|
||||
{
|
||||
|
||||
$originalPackingList = $this->packingList->owner instanceof PackingList ? $this->packingList->owner->owner : $this->packingList->owner;
|
||||
|
||||
dd($originalPackingList);
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'type' => $this->type,
|
||||
|
||||
@@ -17,14 +17,14 @@ class TransportResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
// 'type' => $this->type,
|
||||
// 'courier' => $this->courier,
|
||||
// 'tracking_number' => $this->tracking_number,
|
||||
// 'dispatch_date' => $this->dispatch_date ? $this->dispatch_date->format('d-m-Y') : $this->dispatch_date,
|
||||
// 'drop_date' => $this->drop_date ? $this->drop_date->format('d-m-Y') : $this->drop_date,
|
||||
// 'status' => $this->status,
|
||||
// 'current_schedule' => new ScheduleResource($this->schedules()->where('status', '=', ApprovalStatus::APPROVED)->first()),
|
||||
// 'schedule_history' => ScheduleResource::collection($this->schedules()->where('status', '=', ApprovalStatus::EXPIRED)->get())
|
||||
'type' => $this->type,
|
||||
'courier' => $this->courier,
|
||||
'tracking_number' => $this->tracking_number,
|
||||
'dispatch_date' => $this->dispatch_date ? $this->dispatch_date->format('d-m-Y') : $this->dispatch_date,
|
||||
'drop_date' => $this->drop_date ? $this->drop_date->format('d-m-Y') : $this->drop_date,
|
||||
'status' => $this->status,
|
||||
'current_schedule' => new ScheduleResource($this->schedules()->where('status', '=', ApprovalStatus::APPROVED)->first()),
|
||||
'schedule_history' => ScheduleResource::collection($this->schedules()->where('status', '=', ApprovalStatus::EXPIRED)->get())
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user