mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-31 10:23:58 +00:00
large commit
This commit is contained in:
@@ -5,6 +5,8 @@ namespace App\Http\Resources;
|
||||
use App\Classes\Modules\Orders\Services\ListsOrderHistory;
|
||||
use App\Classes\Modules\Steps\GetStep;
|
||||
use App\Classes\Modules\Steps\StepAttachments;
|
||||
use App\Models\OrderStep;
|
||||
use App\Http\Resources\OrderStep as OrderStepResource;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use App\Models\AddressBook;
|
||||
|
||||
@@ -27,13 +29,13 @@ class Order extends JsonResource
|
||||
'supplier_id' => $this->supplier_id,
|
||||
'warehouse_id' => $this->warehouse_id,
|
||||
'address' => new \App\Http\Resources\AddressBook($addressBook),
|
||||
'current_step' => $this->current_step,
|
||||
'complete' => (float)$this->complete,
|
||||
'date' => $this->created_at->format('d/m/Y'),
|
||||
'steps' => [
|
||||
'current_step' => [
|
||||
'details' => (new GetStep())->execute($this->current_step),
|
||||
'attachments' => (new StepAttachments())->execute($this->id, $this->current_step)
|
||||
],
|
||||
'steps' => OrderStepResource::collection(OrderStep::where('order_id', $this->id)->orderBy('sequence')->get()),
|
||||
'details' => (new ListsOrderHistory())->execute($this->id, $this->created_at, $this->complete, $this->updated_at)
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user