add customer without orders list

This commit is contained in:
omair saleh
2021-10-08 22:34:54 +08:00
parent a9c914b41c
commit e6c42ef55c
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -36,6 +36,7 @@ class CompanyResource extends JsonResource
'employee' => new UserResource($companyModule->employees()->first()),
'company_module' => new CompanyModuleResource($companyModule),
'last_order' => new OrderResource($companyModule ? $companyModule->orders()->orderBy('id', 'DESC')->first(): null),
'order_count' => $this->orders()->count(),
'identification' => new DocumentResource($this->documents->whereIn('document_type', DocumentType::IDENTIFICATION_DOCUMENTS)->first()),
'created_at' => $this->created_at->format('d-m-Y')
@@ -10,12 +10,17 @@
<div class="font-heading all-caps fs-11">{{this.item.name}}</div>
<div class="font-heading all-caps fs-11">CIEF/{{this.item.company_module.marking}}</div>
</div>
<div class="col-auto text-center">
<div class="font-heading all-caps fs-11">Orders</div>
<div class="font-heading all-caps fs-11">{{this.item.order_count}}</div>
</div>c
<div class="col-auto">
<div class="font-heading all-caps fs-11">Date</div>
<div class="font-heading all-caps fs-11">{{this.item.created_at}}</div>
</div>
<div class="col-auto text-center">
<div class="font-heading all-caps fs-11 p-l-15 p-r-15 p-t-5 p-b-5 bg-master-lighter btn-rounded"><i class="fa fa-circle m-r-10" :class="{'text-danger': item.status !==2, 'text-success': item.status ==2}"></i>{{this.item.status === 2 ? 'Active':'Inactive'}}</div>
<!--{{this.item.status === 2 ? 'Active':'Inactive'}}-->
<div class="font-heading all-caps fs-11 p-l-15 p-r-15 p-t-5 p-b-5 bg-master-lighter btn-rounded"><i class="fa fa-circle" :class="{'text-danger': item.status !==2, 'text-success': item.status ==2}"></i></div>
</div>
<div class="col-auto text-right pull-right">
<a :href="route('customer.profile', item.company_module.marking)">