Enable editing of supplier products and listing services connected to them

This commit is contained in:
Deon George
2022-06-30 23:51:20 +10:00
parent fb416306e7
commit 5297ae8a62
33 changed files with 963 additions and 182 deletions

View File

@@ -14,6 +14,7 @@ use App\Http\Controllers\{AdminController,
ServiceController,
SupplierController,
WelcomeController};
use App\Models\Supplier;
/*
|--------------------------------------------------------------------------
@@ -72,6 +73,18 @@ Route::group(['middleware'=>['theme:adminlte-be','auth','role:wholesaler'],'pref
->where('o','[0-9]+');
Route::get('supplier/cost/{o}',[SupplierController::class,'cost'])
->where('o','[0-9]+');
Route::get('supplier/product/add',[SupplierController::class,'product_add']);
Route::get('supplier/product/addedit/{o}/{oo}/{type}',[SupplierController::class,'product_view'])
->where('o','[0-9]+')
->where('oo','[0-9]+')
->whereIn('type',Supplier::offeringTypeKeys()->toArray());
Route::post('supplier/product/addedit/{o}/{oo}/{type}',[SupplierController::class,'product_addedit'])
->where('o','[0-9]+')
->where('oo','[0-9]+')
->whereIn('type',Supplier::offeringTypeKeys()->toArray());
Route::post('supplier/product/view/{type}/{oo?}',[SupplierController::class,'product_view_type'])
->whereIn('type',Supplier::offeringTypeKeys()->toArray())
->where('oo','[0-9]+');
//Route::get('report/products','Wholesale\ReportController@products');
// Charges - @todo This should probably go to resellers