order status error fix
This commit is contained in:
parent
eec0508967
commit
44310c1351
|
|
@ -23,7 +23,7 @@ class Vendors extends V1Controller
|
|||
public function sources(){
|
||||
$vendors = $this->vendorRepository->select('marketplace_sellers.id','url','shop_title')
|
||||
->where('is_approved',true)
|
||||
->with(['categories:seller_id,type,categories'])
|
||||
// ->with(['categories:seller_id,type,categories'])
|
||||
// ->leftJoin('seller_categories','marketplace_sellers.id','=','seller_categories.seller_id')
|
||||
->get();
|
||||
//return $vendors;
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ class Source extends \Illuminate\Http\Resources\Json\JsonResource
|
|||
'id' => $this->id,
|
||||
'shop_title' => $this->shop_title,
|
||||
'logo' => $this->logo_url,
|
||||
$this->mergeWhen(!empty($this->main_categories) && $this->main_categories->count(),[
|
||||
'categories' => VendorCategory::collection($this->main_categories)
|
||||
])
|
||||
// $this->mergeWhen(!empty($this->main_categories) && $this->main_categories->count(),[
|
||||
// 'categories' => VendorCategory::collection($this->main_categories)
|
||||
// ])
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -36,5 +36,11 @@ class Order extends \Webkul\Sales\Models\Order implements \Sarga\Shop\Contracts\
|
|||
public function canInvoice(): bool{
|
||||
return $this->status === self::STATUS_SHIPPING && parent::canInvoice();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the status label from status code
|
||||
*/
|
||||
public function getStatusLabelAttribute()
|
||||
{
|
||||
return $this->statusLabel[$this->status];
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue