Sammelbestellung von Extern
This commit is contained in:
parent
d01b4bd560
commit
582ca8299d
33 changed files with 3437 additions and 1466 deletions
|
|
@ -6,13 +6,12 @@ use Request;
|
|||
use App\User;
|
||||
use App\Services\Payment;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Services\UserService;
|
||||
use App\Models\ShippingCountry;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Repositories\ShopApiRepository;
|
||||
|
||||
|
||||
|
||||
|
||||
class ShopApiController extends Controller
|
||||
{
|
||||
|
||||
|
|
@ -44,12 +43,6 @@ class ShopApiController extends Controller
|
|||
switch($data['user_shop_api_orders_action']){
|
||||
case 'order':
|
||||
$shopApiOrderCart = $this->shopApiRepository->order($data);
|
||||
|
||||
/*$user = User::find(Auth::user()->id);
|
||||
$shipping_country = ShippingCountry::whereCountryId($user->account->country_id)->first();
|
||||
UserService::checkUserTaxShippingCountry($user, $shipping_country->id);*/
|
||||
|
||||
//card_info = UserService::getYardInfo();
|
||||
return view('user.shop.sales.api_order_list', compact('shopApiOrderCart', 'data'));
|
||||
break;
|
||||
case 'remove':
|
||||
|
|
@ -66,15 +59,8 @@ class ShopApiController extends Controller
|
|||
|
||||
public function checkout(){
|
||||
|
||||
$data = Request::all();
|
||||
$shopApiOrderCart = $this->shopApiRepository->checkout($data);
|
||||
//TODO store in ShopApiOrderCart
|
||||
//TO checkout
|
||||
dd($shopApiOrderCart);
|
||||
|
||||
|
||||
return redirect(route('user_shop_api_orders'));
|
||||
|
||||
$data = Request::all();
|
||||
return $this->shopApiRepository->checkout($data);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -130,6 +116,12 @@ class ShopApiController extends Controller
|
|||
data-route="'.route('modal_load').'"><span class="far fa-eye"></span></button>';
|
||||
})
|
||||
->addColumn('api_status', function (ShoppingOrder $ShoppingOrder) {
|
||||
if($ShoppingOrder->api_status === 2){
|
||||
$shopping_oder_id = isset($ShoppingOrder->api_notice['shopping_order_id']) ? $ShoppingOrder->api_notice['shopping_order_id'] : null;
|
||||
if($shopping_oder_id){
|
||||
return '<a class="btn btn-sm btn-secondary btn-round" href="'.route('user_order_detail', [$shopping_oder_id]).'"><i class="fa fa-check fa-check-circle-o"> '.$shopping_oder_id.'</a>';
|
||||
}
|
||||
}
|
||||
return '<span class="badge badge-pill badge-'.$ShoppingOrder->getAPIStatusColor().'">'.$ShoppingOrder->getAPIStatusType().'</span>';
|
||||
})
|
||||
->addColumn('created_at', function (ShoppingOrder $ShoppingOrder) {
|
||||
|
|
@ -161,7 +153,7 @@ class ShopApiController extends Controller
|
|||
return '<span class="badge badge-pill badge-'.$ShoppingOrder->getShippedColor().'">'.$ShoppingOrder->getShippedType().'</span>
|
||||
';
|
||||
})
|
||||
|
||||
|
||||
->orderColumn('payment_for', 'payment_for $1')
|
||||
|
||||
->orderColumn('id', 'id $1')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue