Promotion Backend v1
This commit is contained in:
parent
0ed47d3553
commit
f0da981737
43 changed files with 2765 additions and 45 deletions
|
|
@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
|||
use App\Models\Homeparty;
|
||||
use App\Models\HomepartyUser;
|
||||
use App\Models\Product;
|
||||
use App\Models\PromotionAdminProduct;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\ShoppingUser;
|
||||
use App\Models\UserCredit;
|
||||
|
|
@ -82,17 +83,18 @@ class ModalController extends Controller
|
|||
$ret = view("admin.modal.user-credit-status", compact('value', 'data'))->render();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*if($data['action'] === 'homeparty-add-product') {
|
||||
$homeparty = Homeparty::find($data['id']);
|
||||
$homeparty_user = HomepartyUser::find($data['user_id']);
|
||||
$data['homeparty'] = $homeparty;
|
||||
$ret = view("user.homeparty.modal_show_products", compact( 'data', 'homeparty', 'homeparty_user'))->render();
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
if($data['action'] === 'save-promotion_product'){
|
||||
if($data['id'] === 'new'){
|
||||
$value = new PromotionAdminProduct();
|
||||
$value->calcu_commission = true;
|
||||
$value->shipping = true;
|
||||
$value->active = true;
|
||||
}else{
|
||||
$value = PromotionAdminProduct::find($data['id']);
|
||||
}
|
||||
$ret = view("admin.modal.promotion-product", compact('value', 'data'))->render();
|
||||
}
|
||||
}
|
||||
return response()->json(['response' => $data, 'html'=>$ret, 'status'=>$status]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue