fix unclaimed packing lists

This commit is contained in:
omair saleh
2022-02-23 13:48:34 +08:00
parent 47704001dd
commit 1dc23b088e
2 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ class PackageResource extends JsonResource
'order' => New OrderResource($originalPackingList->owner)
]),
'container' => new ContainerResource($originalPackingList->containers()->first()),
// 'transport' => new TransportResource($originalPackingList->transports()->first())
'transport' => new TransportResource($originalPackingList->transports()->first())
];
}
}
+8 -8
View File
@@ -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())
];
}
}