Merge branch 'create-new-filter-to-order-by-arrival-dates'

# Conflicts:
#	routes/api.php
This commit is contained in:
omair saleh
2021-10-30 12:30:58 +08:00
parent 02c6825c4a
commit 2675fd8704
+1 -6
View File
@@ -28,16 +28,11 @@ class CompanyResource extends JsonResource
'business_type' => (int) $this->business_type,
'status' => (int) $this->status,
'contact' => new ContactResource ($this->when($this->has('contacts'), $this->contacts->first())),
'employee' => new UserResource($companyModule ? $companyModule->employees()->first() : null),
'employee' => new UserResource($companyModule->employees()->first()),
'company_module' => new CompanyModuleResource($companyModule),
'last_order' => new OrderResource($companyModule ? $companyModule->orders()->orderBy('id', 'DESC')->first(): null),
<<<<<<< HEAD
// 'order_count' => $this->orders()->count(),
'identification' => new DocumentResource($this->documents->whereIn('document_type', DocumentType::IDENTIFICATION_DOCUMENTS)->first()),
=======
'order_count' => $this->orders()->count(),
'identification' => new DocumentResource($this->documents->whereIn('document_type', DocumentType::IDENTIFICATION_DOCUMENTS)->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED])->first()),
>>>>>>> origin/master
'created_at' => $this->created_at->format('d-m-Y')
];