order status error fix

This commit is contained in:
merdan 2022-12-05 12:46:01 +05:00
parent eec0508967
commit 44310c1351
3 changed files with 11 additions and 5 deletions

View File

@ -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;

View File

@ -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)
// ])
];
}
}

View File

@ -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];
}
}