Fix on addresses
This commit is contained in:
@@ -51,11 +51,11 @@ class CustomerOrdersDataTable extends DataTable
|
|||||||
protected function getColumns()
|
protected function getColumns()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
Column::make('status')->title('Statut'),
|
|
||||||
Column::make('ref')->title('Ref'),
|
|
||||||
Column::make('created_at')->title('Date'),
|
Column::make('created_at')->title('Date'),
|
||||||
|
Column::make('ref')->title('Ref'),
|
||||||
Column::make('payment_type')->title('Règlement'),
|
Column::make('payment_type')->title('Règlement'),
|
||||||
Column::make('total_shipped')->title('Montant')->class('text-right'),
|
Column::make('total_shipped')->title('Montant')->class('text-right'),
|
||||||
|
Column::make('status')->title('Statut'),
|
||||||
$this->makeColumnButtons(),
|
$this->makeColumnButtons(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,19 +47,19 @@ class OrdersDataTable extends DataTable
|
|||||||
|
|
||||||
public function getHtmlButtons()
|
public function getHtmlButtons()
|
||||||
{
|
{
|
||||||
return self::getButtonShow();
|
return '<button type="button" data-id="{{$uuid}}" class="btn btn-xs btn-secondary btn-show mr-2"><i class="fa fa-fw fa-eye"></i></button>';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getColumns()
|
protected function getColumns()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
Column::make('ref')->title('Ref'),
|
|
||||||
Column::make('status')->title('Statut'),
|
|
||||||
Column::make('created_at')->title('Date'),
|
Column::make('created_at')->title('Date'),
|
||||||
|
Column::make('ref')->title('Ref'),
|
||||||
Column::make('customer.last_name')->title('Client'),
|
Column::make('customer.last_name')->title('Client'),
|
||||||
Column::make('delivery.name')->title('Point de distribution'),
|
Column::make('delivery.name')->title('Point de distribution'),
|
||||||
Column::make('payment_type')->title('Règlement'),
|
Column::make('payment_type')->title('Règlement'),
|
||||||
Column::make('total_shipped')->title('Montant')->class('text-right'),
|
Column::make('total_shipped')->title('Montant')->class('text-right'),
|
||||||
|
Column::make('status')->title('Statut'),
|
||||||
$this->makeColumnButtons(),
|
$this->makeColumnButtons(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ class BasketController extends Controller
|
|||||||
{
|
{
|
||||||
$offerId = $request->input('offer_id');
|
$offerId = $request->input('offer_id');
|
||||||
$quantity = $request->input('quantity') ?? 1;
|
$quantity = $request->input('quantity') ?? 1;
|
||||||
$price = Offers::getPrice($offerId, $quantity)->price_taxed;
|
$offer = Offers::getPrice($offerId, $quantity);
|
||||||
|
$price = $offer ? $offer->price_taxed : 0;
|
||||||
|
|
||||||
return number_format($quantity * $price, 2);
|
return number_format($quantity * $price, 2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,16 +2,19 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Shop;
|
namespace App\Http\Controllers\Shop;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use App\Repositories\Shop\Customers;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
|
||||||
|
use App\Repositories\Shop\Customers;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class CustomerController extends Controller
|
class CustomerController extends Controller
|
||||||
{
|
{
|
||||||
public function profile($id = false)
|
public function profile($id = false)
|
||||||
{
|
{
|
||||||
return view('Shop.Customers.profile', Customers::editProfile($id));
|
$data = Customers::editProfile($id);
|
||||||
|
|
||||||
|
return view('Shop.Customers.profile', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function modalProfile($id = false)
|
public function modalProfile($id = false)
|
||||||
@@ -23,14 +26,26 @@ class CustomerController extends Controller
|
|||||||
|
|
||||||
public function edit()
|
public function edit()
|
||||||
{
|
{
|
||||||
return view('Shop.Customers.edit', [
|
$id = Auth::id();
|
||||||
'customer' => Customers::getArray(Auth::id(), 'addresses'),
|
$data['customer'] = Customers::edit($id);
|
||||||
]);
|
|
||||||
|
return view('Shop.Customers.edit', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function storeProfileAjax(Request $request)
|
public function storeProfileAjax(Request $request)
|
||||||
{
|
{
|
||||||
$customer = Customers::store($request->all());
|
$data = $request->all();
|
||||||
|
$customer = Customers::store($data);
|
||||||
|
|
||||||
|
return response()->json(['error' => 0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$data = $request->all();
|
||||||
|
dump($data);
|
||||||
|
exit;
|
||||||
|
$customer = Customers::storeFull($data);
|
||||||
|
|
||||||
return response()->json(['error' => 0]);
|
return response()->json(['error' => 0]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use App\Repositories\Core\User\ShopCart;
|
|||||||
use App\Repositories\Shop\Baskets;
|
use App\Repositories\Shop\Baskets;
|
||||||
use App\Repositories\Shop\Customers;
|
use App\Repositories\Shop\Customers;
|
||||||
use App\Repositories\Shop\Deliveries;
|
use App\Repositories\Shop\Deliveries;
|
||||||
|
use App\Repositories\Shop\DeliveryTypes;
|
||||||
use App\Repositories\Shop\OrderMails;
|
use App\Repositories\Shop\OrderMails;
|
||||||
use App\Repositories\Shop\Orders;
|
use App\Repositories\Shop\Orders;
|
||||||
use App\Repositories\Shop\Paybox;
|
use App\Repositories\Shop\Paybox;
|
||||||
@@ -18,17 +19,19 @@ class OrderController extends Controller
|
|||||||
{
|
{
|
||||||
public function index(OrdersDataTable $dataTable)
|
public function index(OrdersDataTable $dataTable)
|
||||||
{
|
{
|
||||||
return $dataTable->render('Shop.Orders.partials.list', $data ?? []);
|
return $dataTable->render('Shop.Orders.partials.list');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function view($uuid)
|
public function view($uuid)
|
||||||
{
|
{
|
||||||
$data = Orders::getByUUID($uuid);
|
$data['order'] = Orders::view($uuid);
|
||||||
|
|
||||||
|
return view('Shop.Orders.view', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function pdf($uuid)
|
public function pdf($uuid)
|
||||||
{
|
{
|
||||||
$data = Orders::getByUUID($uuid);
|
$data['order'] = Orders::getByUUID($uuid);
|
||||||
|
|
||||||
return view('Shop.Orders.pdf', $data);
|
return view('Shop.Orders.pdf', $data);
|
||||||
}
|
}
|
||||||
@@ -43,6 +46,7 @@ class OrderController extends Controller
|
|||||||
'basket' => ShopCart::getSummary(),
|
'basket' => ShopCart::getSummary(),
|
||||||
'deliveries' => Deliveries::getAllWithSaleChannel()->toArray(),
|
'deliveries' => Deliveries::getAllWithSaleChannel()->toArray(),
|
||||||
'sale_channel' => SaleChannels::getDefault()->toArray(),
|
'sale_channel' => SaleChannels::getDefault()->toArray(),
|
||||||
|
'delivery_types' => DeliveryTypes::getAll(),
|
||||||
];
|
];
|
||||||
|
|
||||||
return view('Shop.Orders.order', $data);
|
return view('Shop.Orders.order', $data);
|
||||||
|
|||||||
23
app/Http/Requests/Admin/Shop/StoreArticlePost.php
Normal file
23
app/Http/Requests/Admin/Shop/StoreArticlePost.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Admin\Shop;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class StoreArticlePost extends FormRequest
|
||||||
|
{
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'ref' => 'required|unique:articles,ref,'.$this->ref,
|
||||||
|
'product_type' => 'required',
|
||||||
|
'product_id' => 'required',
|
||||||
|
'article_nature_id' => 'required',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,8 +4,6 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use App\Notifications\ResetPassword;
|
use App\Notifications\ResetPassword;
|
||||||
use App\Notifications\VerifyEmail;
|
use App\Notifications\VerifyEmail;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
@@ -23,37 +21,39 @@ class Customer extends Authenticatable
|
|||||||
|
|
||||||
protected $casts = ['email_verified_at' => 'datetime'];
|
protected $casts = ['email_verified_at' => 'datetime'];
|
||||||
|
|
||||||
public function addresses(): HasMany
|
|
||||||
|
public function delivery_addresses()
|
||||||
|
{
|
||||||
|
return $this->addresses()->byDelivery();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function invoice_addresses()
|
||||||
|
{
|
||||||
|
return $this->addresses()->byInvoicing();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function addresses()
|
||||||
{
|
{
|
||||||
return $this->hasMany(CustomerAddress::class);
|
return $this->hasMany(CustomerAddress::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function invoicing_addresses(): HasMany
|
public function customer_deliveries()
|
||||||
{
|
|
||||||
return $this->addresses()->where('type', 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function delivery_addresses(): HasMany
|
|
||||||
{
|
|
||||||
return $this->addresses()->where('type', 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function customer_deliveries(): HasMany
|
|
||||||
{
|
{
|
||||||
return $this->hasMany(CustomerDelivery::class);
|
return $this->hasMany(CustomerDelivery::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deliveries(): BelongsToMany
|
public function deliveries()
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(Delivery::class, CustomerDelivery::class);
|
return $this->belongsToMany(Delivery::class, CustomerDelivery::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function invoices(): HasMany
|
public function invoices()
|
||||||
{
|
{
|
||||||
return $this->hasMany(Invoice::class);
|
return $this->hasMany(Invoice::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function orders(): HasMany
|
public function orders()
|
||||||
{
|
{
|
||||||
return $this->hasMany(Order::class);
|
return $this->hasMany(Order::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,16 +17,17 @@ class Baskets
|
|||||||
return $data ? ShopCart::add($data, $update) : false;
|
return $data ? ShopCart::add($data, $update) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getBasketSummary($sale_channel_id = false)
|
public static function getBasketSummary($saleChannelId = false)
|
||||||
{
|
{
|
||||||
$basket = ShopCart::getContent();
|
$basket = ShopCart::getContent();
|
||||||
$offers = Offer::with('variation')->whereIn('id', ShopCart::keys())->get();
|
$offers = Offer::with('variation')->whereIn('id', ShopCart::keys())->get();
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$total_taxed = 0;
|
$totalTaxed = 0;
|
||||||
$shipping = 5;
|
$shipping = 5;
|
||||||
foreach ($basket as $item) {
|
foreach ($basket as $item) {
|
||||||
$offer = $offers->where('id', $item->id)->first();
|
$offer = $offers->where('id', $item->id)->first();
|
||||||
$prices = Offers::getPrice($item->id, $item->quantity, $sale_channel_id);
|
$prices = Offers::getPrice($item->id, $item->quantity, $saleChannelId);
|
||||||
|
$weight = $offer->weight * $item->quantity;
|
||||||
$detail[] = [
|
$detail[] = [
|
||||||
'offer_id' => (int) $item->id,
|
'offer_id' => (int) $item->id,
|
||||||
'name' => $offer->article->name.' ('.$offer->variation->name.')',
|
'name' => $offer->article->name.' ('.$offer->variation->name.')',
|
||||||
@@ -37,17 +38,18 @@ class Baskets
|
|||||||
'total' => self::getTotal($item->quantity, $prices->price),
|
'total' => self::getTotal($item->quantity, $prices->price),
|
||||||
'total_tax' => self::getTotal($item->quantity, $prices->price_taxed - $prices->price),
|
'total_tax' => self::getTotal($item->quantity, $prices->price_taxed - $prices->price),
|
||||||
'total_taxed' => self::getTotal($item->quantity, $prices->price_taxed),
|
'total_taxed' => self::getTotal($item->quantity, $prices->price_taxed),
|
||||||
|
'weight' => $weight,
|
||||||
];
|
];
|
||||||
$total += self::getTotal($item->quantity, $prices->price);
|
$total += self::getTotal($item->quantity, $prices->price);
|
||||||
$total_taxed += self::getTotal($item->quantity, $prices->price_taxed);
|
$totalTaxed += self::getTotal($item->quantity, $prices->price_taxed);
|
||||||
}
|
}
|
||||||
$data = [
|
$data = [
|
||||||
'detail' => $detail,
|
'detail' => $detail,
|
||||||
'total' => $total,
|
'total' => $total,
|
||||||
'taxes' => $total_taxed - $total,
|
'taxes' => $totalTaxed - $total,
|
||||||
'total_taxed' => $total_taxed,
|
'total_taxed' => $totalTaxed,
|
||||||
'shipping' => $shipping,
|
'shipping' => $shipping,
|
||||||
'total_shipped' => $total_taxed + $shipping,
|
'total_shipped' => $totalTaxed + $shipping,
|
||||||
];
|
];
|
||||||
|
|
||||||
return $data ?? false;
|
return $data ?? false;
|
||||||
@@ -58,9 +60,9 @@ class Baskets
|
|||||||
return $quantity * $price;
|
return $quantity * $price;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getBasket($sale_channel_id = false)
|
public static function getBasket($saleChannelId = false)
|
||||||
{
|
{
|
||||||
$sale_channel_id = $sale_channel_id ? $sale_channel_id : SaleChannels::getDefaultID();
|
$saleChannelId = $saleChannelId ? $saleChannelId : SaleChannels::getDefaultID();
|
||||||
$basket = ShopCart::getContent();
|
$basket = ShopCart::getContent();
|
||||||
// dump($basket->toArray());
|
// dump($basket->toArray());
|
||||||
$offers = Offer::with([
|
$offers = Offer::with([
|
||||||
@@ -69,7 +71,7 @@ class Baskets
|
|||||||
'article.product.Specie',
|
'article.product.Specie',
|
||||||
'article.image',
|
'article.image',
|
||||||
'price_lists.price_list_values',
|
'price_lists.price_list_values',
|
||||||
])->withPriceListsBySaleChannel($sale_channel_id)
|
])->withPriceListsBySaleChannel($saleChannelId)
|
||||||
->whereIn('id', ShopCart::keys())->get();
|
->whereIn('id', ShopCart::keys())->get();
|
||||||
foreach ($basket as $item) {
|
foreach ($basket as $item) {
|
||||||
$offer = $offers->where('id', $item->id)->first();
|
$offer = $offers->where('id', $item->id)->first();
|
||||||
|
|||||||
@@ -84,7 +84,9 @@ class Customers
|
|||||||
|
|
||||||
public static function getWithAddresses($id = false)
|
public static function getWithAddresses($id = false)
|
||||||
{
|
{
|
||||||
return self::get($id, ['invoicing_addresses', 'delivery_addresses']);
|
$id = $id ? $id : self::getId();
|
||||||
|
|
||||||
|
return self::get($id, ['invoice_addresses', 'delivery_addresses']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getName($id = false)
|
public static function getName($id = false)
|
||||||
@@ -99,18 +101,16 @@ class Customers
|
|||||||
return self::guard()->user();
|
return self::guard()->user();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get($id, $relations = false, $relationsCount = false)
|
|
||||||
{
|
|
||||||
$id = $id ? $id : self::getId();
|
|
||||||
|
|
||||||
return self::getModelRelations($relations, $relationsCount)->find($id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getId()
|
public static function getId()
|
||||||
{
|
{
|
||||||
return self::guard()->id();
|
return self::guard()->id();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function isNotConnected()
|
||||||
|
{
|
||||||
|
return ! self::isConnected();
|
||||||
|
}
|
||||||
|
|
||||||
public static function isConnected()
|
public static function isConnected()
|
||||||
{
|
{
|
||||||
return self::guard()->check();
|
return self::guard()->check();
|
||||||
@@ -118,7 +118,7 @@ class Customers
|
|||||||
|
|
||||||
public static function edit($id)
|
public static function edit($id)
|
||||||
{
|
{
|
||||||
$customer = self::get($id, 'addresses');
|
$customer = self::get($id, ['delivery_addresses', 'invoice_addresses']);
|
||||||
$data = $customer->toArray();
|
$data = $customer->toArray();
|
||||||
$data['deliveries'] = $customer->deliveries->pluck('id')->toArray();
|
$data['deliveries'] = $customer->deliveries->pluck('id')->toArray();
|
||||||
|
|
||||||
@@ -128,12 +128,12 @@ class Customers
|
|||||||
public static function storeFull($data)
|
public static function storeFull($data)
|
||||||
{
|
{
|
||||||
$deliveries = $data['deliveries'];
|
$deliveries = $data['deliveries'];
|
||||||
$addresses = $data['addresses'];
|
$invoices = $data['invoices'];
|
||||||
unset($data['deliveries']);
|
unset($data['deliveries']);
|
||||||
unset($data['addresses']);
|
unset($data['invoices']);
|
||||||
$customer = self::store($data);
|
$customer = self::store($data);
|
||||||
self::storeDeliveries($customer, $deliveries);
|
self::storeAddresses($customer, $deliveries);
|
||||||
self::storeAddresses($customer, $addresses);
|
self::storeAddresses($customer, $invoices);
|
||||||
|
|
||||||
return $customer->id;
|
return $customer->id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,17 +11,24 @@ class Offers
|
|||||||
return Offer::count();
|
return Offer::count();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getFull($id, $sale_channel_id = false)
|
public static function getWeight($id, $quantity = 1)
|
||||||
{
|
{
|
||||||
$sale_channel_id = $sale_channel_id ? $sale_channel_id : SaleChannels::getDefaultID();
|
$offer = self::get($id);
|
||||||
|
|
||||||
|
return $offer ? $offer->weight * $quantity : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getFull($id, $saleChannelId = false)
|
||||||
|
{
|
||||||
|
$saleChannelId = $saleChannelId ? $saleChannelId : SaleChannels::getDefaultID();
|
||||||
$offer = Offer::with([
|
$offer = Offer::with([
|
||||||
'article.article_nature',
|
'article.article_nature',
|
||||||
'article.product',
|
'article.product',
|
||||||
'tariff' => function ($query) use ($sale_channel_id) {
|
'tariff' => function ($query) use ($saleChannelId) {
|
||||||
$query->bySaleChannel($sale_channel_id);
|
$query->bySaleChannel($saleChannelId);
|
||||||
},
|
},
|
||||||
'tariff.price_lists' => function ($query) use ($sale_channel_id) {
|
'tariff.price_lists' => function ($query) use ($saleChannelId) {
|
||||||
$query->BySaleChannel($sale_channel_id);
|
$query->BySaleChannel($saleChannelId);
|
||||||
},
|
},
|
||||||
'tariff.price_lists.price_list_values',
|
'tariff.price_lists.price_list_values',
|
||||||
'variation',
|
'variation',
|
||||||
@@ -32,43 +39,43 @@ class Offers
|
|||||||
return $offer;
|
return $offer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getPrice($id, $quantity = 1, $sale_channel_id = false)
|
public static function getPrice($id, $quantity = 1, $saleChannelId = false)
|
||||||
{
|
{
|
||||||
$sale_channel_id = $sale_channel_id ? $sale_channel_id : SaleChannels::getDefaultID();
|
$saleChannelId = $saleChannelId ? $saleChannelId : SaleChannels::getDefaultID();
|
||||||
$offer = Offer::withPriceBySaleChannelByQuantity($sale_channel_id, $quantity)->find($id);
|
$offer = Offer::withPriceBySaleChannelByQuantity($saleChannelId, $quantity)->find($id);
|
||||||
|
|
||||||
return $offer->price_lists->first()->price_list_values->first();
|
return $offer->price_lists->first()->price_list_values->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getOffersByArticles($article_ids, $sale_channel_id = false)
|
public static function getOffersByArticles($article_ids, $saleChannelId = false)
|
||||||
{
|
{
|
||||||
return self::getOffersBySaleChannelRaw($sale_channel_id)->byArticles($article_ids)->get();
|
return self::getOffersBySaleChannelRaw($saleChannelId)->byArticles($article_ids)->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getOffersByArticle($article_id, $sale_channel_id = false)
|
public static function getOffersByArticle($article_id, $saleChannelId = false)
|
||||||
{
|
{
|
||||||
return self::getOffersBySaleChannelRaw($sale_channel_id)->byArticle($article_id)->get();
|
return self::getOffersBySaleChannelRaw($saleChannelId)->byArticle($article_id)->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getOffersBySaleChannel($sale_channel_id = false)
|
public static function getOffersBySaleChannel($saleChannelId = false)
|
||||||
{
|
{
|
||||||
return self::getOffersBySaleChannelRaw($sale_channel_id)->get();
|
return self::getOffersBySaleChannelRaw($saleChannelId)->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getOffersBySaleChannelRaw($sale_channel_id = false)
|
public static function getOffersBySaleChannelRaw($saleChannelId = false)
|
||||||
{
|
{
|
||||||
$sale_channel_id = $sale_channel_id ? $sale_channel_id : SaleChannels::getDefaultID();
|
$saleChannelId = $saleChannelId ? $saleChannelId : SaleChannels::getDefaultID();
|
||||||
|
|
||||||
return Offer::active()->byStockAvailable()
|
return Offer::active()->byStockAvailable()
|
||||||
->with([
|
->with([
|
||||||
'article_nature',
|
'article_nature',
|
||||||
'variation',
|
'variation',
|
||||||
'tariff.price_lists' => function ($query) use ($sale_channel_id) {
|
'tariff.price_lists' => function ($query) use ($saleChannelId) {
|
||||||
$query->bySaleChannel($sale_channel_id);
|
$query->bySaleChannel($saleChannelId);
|
||||||
},
|
},
|
||||||
'tariff.price_lists.price_list_values',
|
'tariff.price_lists.price_list_values',
|
||||||
])
|
])
|
||||||
->bySaleChannel($sale_channel_id);
|
->bySaleChannel($saleChannelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getThumbSrcById($id)
|
public static function getThumbSrcById($id)
|
||||||
|
|||||||
@@ -16,6 +16,22 @@ class Orders
|
|||||||
return Order::byUUID($uuid)->first();
|
return Order::byUUID($uuid)->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getFullByUUID($uuid)
|
||||||
|
{
|
||||||
|
return Order::with(['customer', 'delivery', 'delivery_address', 'detail', 'invoice.address', 'sale_channel'])
|
||||||
|
->byUUID($uuid)->first();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function view($uuid)
|
||||||
|
{
|
||||||
|
$data = [];
|
||||||
|
$order = self::getFullByUUID($uuid);
|
||||||
|
$data = $order->toArray();
|
||||||
|
$data['payment_type'] = InvoicePayments::getPaymentType($order->payment_type);
|
||||||
|
$data['status'] = Orders::getStatus($order->status);
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
public static function saveOrder($data)
|
public static function saveOrder($data)
|
||||||
{
|
{
|
||||||
$data += $data['basket'];
|
$data += $data['basket'];
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
{{ Form::label('model', 'Familles de produit') }}<br>
|
|
||||||
@include('components.form.select', [
|
@include('components.form.select', [
|
||||||
'name' => 'product_type',
|
'name' => 'product_type',
|
||||||
'id_name' => 'product_type',
|
'id_name' => 'product_type',
|
||||||
@@ -10,22 +9,23 @@
|
|||||||
'value' => $article['product_type'] ?? null,
|
'value' => $article['product_type'] ?? null,
|
||||||
'class' => 'select2',
|
'class' => 'select2',
|
||||||
'with_empty' => '',
|
'with_empty' => '',
|
||||||
'required' => true
|
'label' => 'Familles de produit',
|
||||||
|
'required' => true,
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
{{ Form::label('model_id', 'Produit') }}<br>
|
|
||||||
@include('components.form.select', [
|
@include('components.form.select', [
|
||||||
'name' => 'product_id',
|
'name' => 'product_id',
|
||||||
'id_name' => 'product_id',
|
'id_name' => 'product_id',
|
||||||
'list' => $products ?? [],
|
'list' => $products ?? [],
|
||||||
'value' => $article['product_id'] ?? null,
|
'value' => $article['product_id'] ?? null,
|
||||||
'class' => 'select2',
|
'class' => 'select2',
|
||||||
'with_empty' => ''
|
'with_empty' => '',
|
||||||
|
'label' => 'Produit',
|
||||||
|
'required' => true,
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
{{ Form::label('article_nature_id', __('shop.article_natures.name')) }}<br>
|
|
||||||
@include('components.form.select', [
|
@include('components.form.select', [
|
||||||
'name' => 'article_nature_id',
|
'name' => 'article_nature_id',
|
||||||
'id_name' => 'article_nature_id',
|
'id_name' => 'article_nature_id',
|
||||||
@@ -33,66 +33,75 @@
|
|||||||
'value' => $article['article_nature_id'] ?? null,
|
'value' => $article['article_nature_id'] ?? null,
|
||||||
'class' => 'select2',
|
'class' => 'select2',
|
||||||
'with_empty' => '',
|
'with_empty' => '',
|
||||||
'required' => true
|
'label' => __('shop.article_natures.name'),
|
||||||
|
'required' => true,
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
{{ Form::label('name', 'Nom') }}<br>
|
@include('components.form.input', [
|
||||||
@include('components.form.input', ['name' => 'name', 'value' => $article['name'] ?? null, 'required' => true])
|
'name' => 'name',
|
||||||
|
'value' => $article['name'] ?? null,
|
||||||
|
'label' => 'Nom',
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
{{ Form::label('ref', 'Référence') }}<br>
|
@include('components.form.input', [
|
||||||
@include('components.form.input', ['name' => 'ref', 'value' => $article['ref'] ?? null])
|
'name' => 'ref',
|
||||||
|
'value' => $article['ref'] ?? null,
|
||||||
|
'label' => 'Référence',
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
{{ Form::label('categories', __('shop.shelves.title')) }}<br>
|
|
||||||
@include('components.form.select', [
|
@include('components.form.select', [
|
||||||
'name' => 'categories[]',
|
'name' => 'categories[]',
|
||||||
'list' => $categories_options,
|
'list' => $categories_options,
|
||||||
'values' => $article['categories'] ?? null,
|
'values' => $article['categories'] ?? null,
|
||||||
'class' => 'select2',
|
'class' => 'select2',
|
||||||
'multiple' => true
|
'multiple' => true,
|
||||||
|
'label' => __('shop.shelves.title'),
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
{{ Form::label('visible', 'Visible') }}<br>
|
|
||||||
@include('components.form.toggle', [
|
@include('components.form.toggle', [
|
||||||
'name' => 'visible',
|
'name' => 'visible',
|
||||||
'value' => ($article['visible'] ?? null),
|
'value' => $article['visible'] ?? null,
|
||||||
'on' => __('oui'),
|
'on' => __('oui'),
|
||||||
'off' => __('non'),
|
'off' => __('non'),
|
||||||
'meta' => 'data-id=' . ($article['id'] ?? null),
|
'meta' => 'data-id=' . ($article['id'] ?? null),
|
||||||
'size' => 'sm',
|
'size' => 'sm',
|
||||||
|
'label' => 'Visible',
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
{{ Form::label('homepage', __('Accueil')) }}<br>
|
|
||||||
@include('components.form.toggle', [
|
@include('components.form.toggle', [
|
||||||
'name' => 'homepage',
|
'name' => 'homepage',
|
||||||
'value' => ($article['homepage'] ?? null),
|
'value' => $article['homepage'] ?? null,
|
||||||
'on' => __('oui'),
|
'on' => __('oui'),
|
||||||
'off' => __('non'),
|
'off' => __('non'),
|
||||||
'meta' => 'data-id=' . ($article['id'] ?? null),
|
'meta' => 'data-id=' . ($article['id'] ?? null),
|
||||||
'size' => 'sm',
|
'size' => 'sm',
|
||||||
|
'label' => 'Accueil',
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
{{ Form::label('tags', 'Tags') }}<br>
|
|
||||||
@include('components.form.selects.select-tree', [
|
@include('components.form.selects.select-tree', [
|
||||||
'name' => 'tags[]',
|
'name' => 'tags[]',
|
||||||
'list' => $tags_list,
|
'list' => $tags_list,
|
||||||
'values' => $article['tags'] ?? null,
|
'values' => $article['tags'] ?? null,
|
||||||
'class' => 'select2',
|
'class' => 'select2',
|
||||||
'multiple' => true
|
'multiple' => true,
|
||||||
|
'label' => 'Tags',
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -105,12 +114,12 @@
|
|||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
{{ Form::label('description', 'Description') }}
|
|
||||||
@include('components.form.textarea', [
|
@include('components.form.textarea', [
|
||||||
'name' => 'description',
|
'name' => 'description',
|
||||||
'value' => $article['description'] ?? null,
|
'value' => $article['description'] ?? null,
|
||||||
'class' => 'editor',
|
'class' => 'editor',
|
||||||
'required' => true
|
'required' => false,
|
||||||
|
'label' => 'Description',
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -120,38 +129,40 @@
|
|||||||
<div id="product_images_inherited">
|
<div id="product_images_inherited">
|
||||||
@include('Admin.Shop.Articles.partials.product.images')
|
@include('Admin.Shop.Articles.partials.product.images')
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@include('components.uploader.widget', [
|
@include('components.uploader.widget', [
|
||||||
'load_url' => route('Admin.Shop.Articles.getImages', ['id' => $article['id'] ?? false]),
|
'load_url' => route('Admin.Shop.Articles.getImages', ['id' => $article['id'] ?? false]),
|
||||||
'delete_url' => route('Admin.Shop.Articles.deleteImage'),
|
'delete_url' => route('Admin.Shop.Articles.deleteImage'),
|
||||||
'title' => 'Photos',
|
'title' => 'Photos',
|
||||||
'name' => 'images'
|
'name' => 'images',
|
||||||
])
|
])
|
||||||
|
|
||||||
@include('Admin.Core.Comments.partials.comments', [
|
@include('Admin.Core.Comments.partials.comments', [
|
||||||
'model' => 'Shop.Article',
|
'model' => 'Shop.Article',
|
||||||
'model_id' => $article['id'] ?? false,
|
'model_id' => $article['id'] ?? false,
|
||||||
'comments' => $article['comments'] ?? false
|
'comments' => $article['comments'] ?? false,
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script>
|
<script>
|
||||||
|
$("#product_id").change(function(e) {
|
||||||
$("#product_id").change( function(e) {
|
|
||||||
var product = $('#product_id').select2('data');
|
var product = $('#product_id').select2('data');
|
||||||
var name = product[0]['text'];
|
var name = product[0]['text'];
|
||||||
$('input[name="name"]').val(name);
|
$('input[name="name"]').val(name);
|
||||||
|
|
||||||
var product_type = $('#product_type').select2('data');
|
var product_type = $('#product_type').select2('data');
|
||||||
var name = product_type[0]['id'];
|
var name = product_type[0]['id'];
|
||||||
var url = "{{ route('Admin.Shop.Articles.getProductDescription') }}/" + product[0]['id'] + '/' + btoa(name);
|
var url = "{{ route('Admin.Shop.Articles.getProductDescription') }}/" + product[0]['id'] + '/' + btoa(
|
||||||
|
name);
|
||||||
$('#product_description').load(url);
|
$('#product_description').load(url);
|
||||||
|
|
||||||
var url = "{{ route('Admin.Shop.Articles.getProductImages') }}/" + product[0]['id'] + '/' + btoa(name);
|
var url = "{{ route('Admin.Shop.Articles.getProductImages') }}/" + product[0]['id'] + '/' + btoa(name);
|
||||||
$('#product_images_inherited').load(url);
|
$('#product_images_inherited').load(url);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#product_type').change( function() {
|
$('#product_type').change(function() {
|
||||||
var product_type = $(this).val();
|
var product_type = $(this).val();
|
||||||
switch (product_type) {
|
switch (product_type) {
|
||||||
case 'App\\Models\\Botanic\\Specie':
|
case 'App\\Models\\Botanic\\Specie':
|
||||||
@@ -171,10 +182,12 @@
|
|||||||
|
|
||||||
function loadArticleNatures(url) {
|
function loadArticleNatures(url) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : url,
|
url: url,
|
||||||
method : 'POST',
|
method: 'POST',
|
||||||
data: {product_type: $('#product_type').val()},
|
data: {
|
||||||
success : function(data) {
|
product_type: $('#product_type').val()
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
setOptions('#article_nature_id', data);
|
setOptions('#article_nature_id', data);
|
||||||
// $("#product_id").select2({data: data});
|
// $("#product_id").select2({data: data});
|
||||||
// $("#product_id").trigger('change');
|
// $("#product_id").trigger('change');
|
||||||
@@ -184,16 +197,17 @@
|
|||||||
|
|
||||||
function loadProducts(url) {
|
function loadProducts(url) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : url,
|
url: url,
|
||||||
method : 'POST',
|
method: 'POST',
|
||||||
data: {article_nature_id: $('#article_nature_id').val()},
|
data: {
|
||||||
success : function(data) {
|
article_nature_id: $('#article_nature_id').val()
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
setOptions('#product_id', data);
|
setOptions('#product_id', data);
|
||||||
// $("#product_id").select2({data: data});
|
// $("#product_id").select2({data: data});
|
||||||
// $("#product_id").trigger('change');
|
// $("#product_id").trigger('change');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
<x-card title="Détail de la {{ $detail_type }}" classBody="mt-3">
|
<x-card title="Détail de la {{ $detail_type }}">
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<table class="table table-bordered table-hover w-100 ">
|
<table class="table table-bordered table-hover w-100 ">
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
<th>Nom</th>
|
<th>Nom</th>
|
||||||
@@ -14,11 +12,11 @@
|
|||||||
@foreach ($order['detail'] as $detail)
|
@foreach ($order['detail'] as $detail)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $detail['name'] }}</td>
|
<td>{{ $detail['name'] }}</td>
|
||||||
<td align="right">{{ $detail['quantity'] }}</td>
|
<td class="text-right">{{ $detail['quantity'] }}</td>
|
||||||
<td align="right">{{ $detail['price'] }}</td>
|
<td class="text-right">{{ $detail['price'] }}</td>
|
||||||
<td align="right">{{ $detail['tax'] }}</td>
|
<td class="text-right">{{ $detail['tax'] }}</td>
|
||||||
<td align="right">{{ $detail['price_taxed'] }}</td>
|
<td class="text-right">{{ $detail['price_taxed'] }}</td>
|
||||||
<td align="right">{{ $detail['total_taxed'] }}</td>
|
<td class="text-right">{{ $detail['total_taxed'] }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -27,30 +25,34 @@
|
|||||||
<td style="font-size: 1.2em; font-weight: bold;">Total</td>
|
<td style="font-size: 1.2em; font-weight: bold;">Total</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td align="right"></td>
|
<td></td>
|
||||||
<td align="right"></td>
|
<td></td>
|
||||||
<td align="right" style="font-size: 1.2em; font-weight: bold;">{{ $order['total_taxed'] }}</td>
|
<td style="font-size: 1.2em; font-weight: bold;" class="text-right">
|
||||||
|
{{ $order['total_taxed'] }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@if ($order['shipping'] ?? false)
|
@if ($order['shipping'] ?? false)
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-size: 1.1em; font-weight: 500;">Livraison</td>
|
<td style="font-size: 1.1em; font-weight: 500;">Livraison</td>
|
||||||
<td align="right"></td>
|
<td></td>
|
||||||
<td align="right"></td>
|
<td></td>
|
||||||
<td align="right"></td>
|
<td></td>
|
||||||
<td align="right"></td>
|
<td></td>
|
||||||
<td align="right" style="font-size: 1.1em; font-weight: bold;">{{ $order['shipping'] }}</td>
|
<td style="font-size: 1.1em; font-weight: bold;" class="text-right">
|
||||||
|
{{ $order['shipping'] }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-size: 1.4em; font-weight: bold;">Total à payer</td>
|
<td style="font-size: 1.4em; font-weight: bold;">Total à payer</td>
|
||||||
<td align="right"></td>
|
<td></td>
|
||||||
<td align="right"></td>
|
<td></td>
|
||||||
<td align="right">{{ $order['taxes'] }}</td>
|
<td class="text-right">{{ $order['taxes'] }}</td>
|
||||||
<td align="right"></td>
|
<td></td>
|
||||||
<td align="right" style="font-size: 1.4em; font-weight: bold;">{{ $order['total_shipped'] }}</td>
|
<td style="font-size: 1.4em; font-weight: bold;" class="text-right">
|
||||||
|
{{ $order['total_shipped'] }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</x-card>
|
</x-card>
|
||||||
|
|||||||
@@ -3,7 +3,16 @@
|
|||||||
])
|
])
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="row">
|
{{ Form::open([
|
||||||
|
'route' => 'Shop.Customers.store',
|
||||||
|
'id' => 'customer-form',
|
||||||
|
'autocomplete' => 'off',
|
||||||
|
'files' => true,
|
||||||
|
]) }}
|
||||||
|
|
||||||
|
<input type="hidden" name="id" id="id" value="{{ $customer['id'] ?? null }}">
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<x-card title="Mes coordonnées" class="gradient-green1">
|
<x-card title="Mes coordonnées" class="gradient-green1">
|
||||||
@include('Shop.Customers.partials.registration')
|
@include('Shop.Customers.partials.registration')
|
||||||
@@ -11,7 +20,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<x-card title="Mes adresses de livraison" class="gradient-green1 mb-3">
|
<x-card title="Mes adresses de livraison" class="gradient-green1 mb-3">
|
||||||
@include('Shop.Customers.partials.addresses', ['addresses' => $customer['addresses']])
|
@include('Shop.Customers.partials.addresses', [
|
||||||
|
'prefix' => 'deliveries',
|
||||||
|
'addresses' => $customer['delivery_addresses'],
|
||||||
|
])
|
||||||
|
</x-card>
|
||||||
|
|
||||||
|
<x-card title="Mes adresses de facturation" class="gradient-green1 mb-3">
|
||||||
|
@include('Shop.Customers.partials.addresses', [
|
||||||
|
'prefix' => 'invoices',
|
||||||
|
'addresses' => $customer['invoice_addresses'],
|
||||||
|
])
|
||||||
</x-card>
|
</x-card>
|
||||||
|
|
||||||
<x-card title="Mon mot de passe" class="gradient-green1">
|
<x-card title="Mon mot de passe" class="gradient-green1">
|
||||||
@@ -20,6 +39,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<x-save />
|
<x-save />
|
||||||
|
</form>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
@include('load.form.save')
|
||||||
@include('load.layout.modal')
|
@include('load.layout.modal')
|
||||||
|
|
||||||
|
@push('js')
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
initSaveForm('#customer-form');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@include('components.form.input', [
|
@include('components.form.input', [
|
||||||
'name' => ($prefix ?? '') . 'address',
|
'name' => $prefix ?? false ? $prefix . "['address']" : 'address',
|
||||||
'value' => $customer['address'] ?? '',
|
'value' => $customer['address'] ?? '',
|
||||||
'label' => $label ?? '',
|
'label' => $label ?? '',
|
||||||
])
|
])
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@include('components.form.input', [
|
@include('components.form.input', [
|
||||||
'name' => ($prefix ?? '') . 'address2',
|
'name' => $prefix ?? false ? $prefix . "['address2']" : 'address2',
|
||||||
'value' => $customer['address2'] ?? '',
|
'value' => $customer['address2'] ?? '',
|
||||||
'label' => 'Complément d\'adresse',
|
'label' => 'Complément d\'adresse',
|
||||||
])
|
])
|
||||||
@@ -21,14 +21,14 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
@include('components.form.input', [
|
@include('components.form.input', [
|
||||||
'name' => ($prefix ?? '') . 'zipcode',
|
'name' => $prefix ?? false ? $prefix . "['zipcode']" : 'zipcode',
|
||||||
'value' => $customer['zipcode'] ?? '',
|
'value' => $customer['zipcode'] ?? '',
|
||||||
'label' => 'Code postal',
|
'label' => 'Code postal',
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
@include('components.form.input', [
|
@include('components.form.input', [
|
||||||
'name' => ($prefix ?? '') . 'city',
|
'name' => $prefix ?? false ? $prefix . "['city']" : 'city',
|
||||||
'value' => $customer['city'] ?? '',
|
'value' => $customer['city'] ?? '',
|
||||||
'label' => 'Ville',
|
'label' => 'Ville',
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,39 +1,42 @@
|
|||||||
@foreach ($addresses ?? [] as $address)
|
@foreach ($addresses ?? [] as $address)
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
<div class="col-1">
|
<div class="col-1">
|
||||||
<x-form.radios.icheck name="address_id" val="{{ $address['id'] }}" id="address_{{ $address['id'] }}"/>
|
<x-form.radios.icheck name="@if ($prefix ?? false) {{ $prefix }} . '[]' @endif address_id"
|
||||||
|
val="{{ $address['id'] }}" id="address_{{ $address['id'] }}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-11">
|
<div class="col-11">
|
||||||
{{ $address['address'] }}<br/>
|
{{ $address['address'] }}<br />
|
||||||
@if ($address['address2'])
|
@if ($address['address2'])
|
||||||
{{ $address['address2'] }}<br/>
|
{{ $address['address2'] }}<br />
|
||||||
@endif
|
@endif
|
||||||
{{ $address['zipcode'] }} {{ $address['city'] }}
|
{{ $address['zipcode'] }} {{ $address['city'] }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
<div id="add_address_container" class="green-dark d-none mb-3 mt-3">
|
<div id="add_address_container_{{ $prefix }}" class="green-dark d-none mb-3 mt-3">
|
||||||
<x-card classBody="bg-green-dark yellow" title="Nouvelle adresse">
|
<x-card classBody="bg-green-dark yellow" title="Nouvelle adresse">
|
||||||
@include('Shop.Customers.partials.address', [
|
@include('Shop.Customers.partials.address', [
|
||||||
'prefix' => 'deliveries',
|
'prefix' => $prefix,
|
||||||
'with_country' => false,
|
'with_country' => false,
|
||||||
'with_tab' => true,
|
'with_tab' => true,
|
||||||
'label' => 'Adresse',
|
'label' => 'Adresse',
|
||||||
|
'customer' => [],
|
||||||
])
|
])
|
||||||
</x-card>
|
</x-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 text-right">
|
<div class="col-12 text-right">
|
||||||
<x-form.button id="add_address" icon="fa-plus" txt="Ajouter une adresse" class="btn-warning btn-sm" />
|
<x-form.button id="add_address_{{ $prefix }}" icon="fa-plus" txt="Ajouter une adresse"
|
||||||
|
class="btn-warning btn-sm" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script>
|
<script>
|
||||||
$('#add_address').click(function() {
|
$('#add_address_{{ $prefix }}').click(function() {
|
||||||
$('#add_address_container').toggleClass('d-none');
|
$('#add_address_container_{{ $prefix }}').toggleClass('d-none');
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
@@ -48,4 +48,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@include('Shop.Customers.partials.address', ['label' => 'Adresse de facturation'])
|
@include('Shop.Customers.partials.address', ['label' => 'Adresse'])
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<div class="nav nav-tabs pl-2">
|
<div class="nav nav-tabs pl-2">
|
||||||
<a href="#deliveries" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="deliveries" aria-selected="true">
|
<a href="#deliveries" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="deliveries"
|
||||||
|
aria-selected="true">
|
||||||
MON MODE D'ACHAT
|
MON MODE D'ACHAT
|
||||||
</a>
|
</a>
|
||||||
<a href="#invoices" data-toggle="tab" class="nav-item nav-link" role="tab" aria-controls="invoices" aria-selected="false">
|
<a href="#invoices" data-toggle="tab" class="nav-item nav-link" role="tab" aria-controls="invoices"
|
||||||
|
aria-selected="false">
|
||||||
FACTURES ET SUIVI DE COMMANDES
|
FACTURES ET SUIVI DE COMMANDES
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -11,9 +13,13 @@
|
|||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane fade show active pt-0 pb-0" id="deliveries">
|
<div class="tab-pane fade show active pt-0 pb-0" id="deliveries">
|
||||||
|
<x-card classBody="bg-light">
|
||||||
@include('Shop.Customers.partials.deliveries')
|
@include('Shop.Customers.partials.deliveries')
|
||||||
|
</x-card>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane fade show pt-0 pb-0" id="invoices">
|
<div class="tab-pane fade show pt-0 pb-0" id="invoices">
|
||||||
|
<x-card classBody="bg-light">
|
||||||
@include('Shop.Customers.partials.invoices')
|
@include('Shop.Customers.partials.invoices')
|
||||||
|
</x-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<x-card title="Mes coordonnées" class="mb-3 gradient-green1" outline=false classBody="pt-3" tools="<button id='profile_edit' class='btn btn-outline-warning'><i class='fa fa-fw fa-edit'></i></button>">
|
<x-card title="Mes coordonnées" class="mb-3 gradient-green1" outline=false classBody="pt-3"
|
||||||
|
tools="<button id='profile_edit' class='btn btn-outline-warning'><i class='fa fa-fw fa-edit'></i></button>">
|
||||||
|
|
||||||
@if ($customer['company'])
|
@if ($customer['company'])
|
||||||
<i class="fa fa-building pr-2"></i>
|
<i class="fa fa-building pr-2"></i>
|
||||||
@@ -28,13 +29,6 @@
|
|||||||
<script>
|
<script>
|
||||||
$('#profile_edit').click(function() {
|
$('#profile_edit').click(function() {
|
||||||
window.location.assign("{{ route('Shop.Customers.edit') }}");
|
window.location.assign("{{ route('Shop.Customers.edit') }}");
|
||||||
/*
|
|
||||||
openModal('Modification de vos coordonnées',
|
|
||||||
'profile-form',
|
|
||||||
"{{ route('Shop.Customers.modalProfile') }}/",
|
|
||||||
"{{ route('Shop.Customers.storeProfile') }}",
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="@if ($basket['count']) col-8 @else col-12 @endif">
|
<div class="@if ($basket['count']) col-8 @else col-12 @endif">
|
||||||
@if (!App\Repositories\Shop\Customers::isConnected())
|
@if (App\Repositories\Shop\Customers::isNotConnected())
|
||||||
<p>
|
<p>
|
||||||
<a href="#" id="customer" class="pr-5">Déja client ?</a>
|
<a href="#" id="customer" class="pr-5">Déja client ?</a>
|
||||||
<button class="btn btn-secondary" id="register">Créez mon compte</button>
|
<button class="btn btn-secondary" id="register">Créez mon compte</button>
|
||||||
@@ -15,32 +15,14 @@
|
|||||||
@include('Shop.auth.partials.login')
|
@include('Shop.auth.partials.login')
|
||||||
</x-layout.collapse>
|
</x-layout.collapse>
|
||||||
|
|
||||||
<x-layout.collapse id="personal_data" title="Informations personnelles" class="d-none personal_data rounded-lg" uncollapsed=true>
|
<x-layout.collapse id="personal_data" title="Informations personnelles"
|
||||||
|
class="d-none personal_data rounded-lg" uncollapsed=true>
|
||||||
@include('Shop.auth.partials.register')
|
@include('Shop.auth.partials.register')
|
||||||
</x-layout.collapse>
|
</x-layout.collapse>
|
||||||
@else
|
@else
|
||||||
{{ Form::open(['route' => 'Shop.Orders.store', 'id' => 'order-form', 'autocomplete' => 'off']) }}
|
{{ Form::open(['route' => 'Shop.Orders.store', 'id' => 'order-form', 'autocomplete' => 'off']) }}
|
||||||
|
@include('Shop.Orders.partials.registered')
|
||||||
<div id="registred">
|
|
||||||
<x-layout.collapse id="adresses" title="Adresse de facturation" class="rounded-lg mb-3" uncollapsed=true>
|
|
||||||
@include('Shop.Orders.partials.addresses', ['addresses' => $customer['invoicing_addresses'] ?? false])
|
|
||||||
</x-layout.collapse>
|
|
||||||
|
|
||||||
<x-layout.collapse id="delivery_mode" title="Mode de livraison" class="rounded-lg mb-3" uncollapsed=true>
|
|
||||||
@include('Shop.Orders.partials.deliveries')
|
|
||||||
</x-layout.collapse>
|
|
||||||
|
|
||||||
<x-layout.collapse id="adresses" title="Adresse de livraison" class="rounded-lg mb-3 d-none" uncollapsed=true>
|
|
||||||
@include('Shop.Orders.partials.addresses', ['addresses' => $customer['delivery_addresses'] ?? false])
|
|
||||||
</x-layout.collapse>
|
|
||||||
|
|
||||||
<x-layout.collapse id="payment" title="Paiement" class="rounded-lg mb-3" uncollapsed=true>
|
|
||||||
@include('Shop.Orders.partials.payments')
|
|
||||||
</x-layout.collapse>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -63,13 +45,22 @@
|
|||||||
$('.identification').removeClass('d-none');
|
$('.identification').removeClass('d-none');
|
||||||
$('#identification').collapse('show');
|
$('#identification').collapse('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#register').click(function() {
|
$('#register').click(function() {
|
||||||
$('.identification').addClass('d-none');
|
$('.identification').addClass('d-none');
|
||||||
$(".personal_data").removeClass('d-none');
|
$(".personal_data").removeClass('d-none');
|
||||||
$('#personal_data').collapse('show');
|
$('#personal_data').collapse('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
initChevron();
|
$('#delivery_mode .delivery_mode').click(function() {
|
||||||
|
var test = $(this).hasClass('at_house');
|
||||||
|
if ($(this).hasClass('at_house')) {
|
||||||
|
$('#delivery_addresses').closest('.card').removeClass('d-none');
|
||||||
|
} else {
|
||||||
|
$('#delivery_addresses').closest('.card').addClass('d-none');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
initChevron();
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
@@ -6,16 +6,16 @@
|
|||||||
'name' => 'address_id',
|
'name' => 'address_id',
|
||||||
'val' => $address['id'],
|
'val' => $address['id'],
|
||||||
'id' => 'address_' . $address['id'],
|
'id' => 'address_' . $address['id'],
|
||||||
'value' => (count($addresses) === 1) ? $address['id'] : false,
|
'value' => count($addresses) === 1 ? $address['id'] : false,
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-11">
|
<div class="col-11">
|
||||||
{{ $address['name'] }}<br/>
|
{{ $address['name'] }}<br />
|
||||||
{{ $address['address'] }}<br/>
|
{{ $address['address'] }}<br />
|
||||||
@if ($address['address2'])
|
@if ($address['address2'])
|
||||||
{{ $address['address2'] }}<br/>
|
{{ $address['address2'] }}<br />
|
||||||
@endif
|
@endif
|
||||||
{{ $address['zipcode'] }} {{ $address['city'] }}<br/>
|
{{ $address['zipcode'] }} {{ $address['city'] }}<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
@@ -5,17 +5,18 @@
|
|||||||
'name' => 'delivery_id',
|
'name' => 'delivery_id',
|
||||||
'val' => $delivery['id'],
|
'val' => $delivery['id'],
|
||||||
'id' => 'delivery_' . $delivery['id'],
|
'id' => 'delivery_' . $delivery['id'],
|
||||||
'class' => $delivery['at_house'] ? 'at_house' : '',
|
'class' => 'delivery_mode' . ($delivery['at_house'] ? ' at_house' : ''),
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
<div class="col-11">
|
<div class="col-11">
|
||||||
<strong>{{ $delivery['name'] }} - Tarif appliqué {{ $delivery['sale_channel']['name'] }}</strong><br/>
|
<strong>{{ $delivery['name'] }} - Tarif appliqué {{ $delivery['sale_channel']['name'] }}</strong><br />
|
||||||
{!! $delivery['sale_channel']['description'] !!}
|
{!! $delivery['sale_channel']['description'] !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
Si vous voulez laisser un message à propos de votre commande, merci de bien vouloir le renseigner dans le champs ci-contre
|
Si vous voulez laisser un message à propos de votre commande, merci de bien vouloir le renseigner dans le champs
|
||||||
|
ci-contre
|
||||||
|
|
||||||
@include('components.form.textarea', [
|
@include('components.form.textarea', [
|
||||||
'name' => 'content',
|
'name' => 'content',
|
||||||
|
|||||||
23
resources/views/Shop/Orders/partials/registered.blade.php
Normal file
23
resources/views/Shop/Orders/partials/registered.blade.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<div id="registred">
|
||||||
|
<x-layout.collapse id="invoice_addresses" title="Adresse de facturation" class="rounded-lg mb-3" uncollapsed=true>
|
||||||
|
@include('Shop.Orders.partials.addresses', [
|
||||||
|
'addresses' => $customer['invoice_addresses'] ?? false,
|
||||||
|
])
|
||||||
|
</x-layout.collapse>
|
||||||
|
|
||||||
|
<x-layout.collapse id="delivery_mode" title="Mode de livraison" class="rounded-lg mb-3" uncollapsed=true>
|
||||||
|
@include('Shop.Orders.partials.deliveries')
|
||||||
|
</x-layout.collapse>
|
||||||
|
|
||||||
|
<x-layout.collapse id="delivery_addresses" title="Adresse de livraison" class="rounded-lg mb-3 d-none"
|
||||||
|
uncollapsed=true>
|
||||||
|
@include('Shop.Orders.partials.addresses', [
|
||||||
|
'addresses' => $customer['delivery_addresses'] ?? false,
|
||||||
|
])
|
||||||
|
@include('Shop.Orders.partials.shipping')
|
||||||
|
</x-layout.collapse>
|
||||||
|
|
||||||
|
<x-layout.collapse id="payment" title="Paiement" class="rounded-lg mb-3" uncollapsed=true>
|
||||||
|
@include('Shop.Orders.partials.payments')
|
||||||
|
</x-layout.collapse>
|
||||||
|
</div>
|
||||||
1
resources/views/Shop/Orders/partials/shipping.blade.php
Normal file
1
resources/views/Shop/Orders/partials/shipping.blade.php
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
74
resources/views/Shop/Orders/view.blade.php
Normal file
74
resources/views/Shop/Orders/view.blade.php
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
<h4>{{ $order['delivery']['name'] ?? '' }} </h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 text-right">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-6">
|
||||||
|
<h3>
|
||||||
|
{{ $order['customer']['last_name'] }} {{ $order['customer']['first_name'] }}
|
||||||
|
</h3>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
<x-card title="Adresse de facturation">
|
||||||
|
@if ($order['invoice']['address'])
|
||||||
|
{{ $order['invoice']['address']['address'] }}<br />
|
||||||
|
@isset($order['invoice']['address']['address2'])
|
||||||
|
{{ $order['invoice']['address']['address2'] }}<br />
|
||||||
|
@endisset
|
||||||
|
{{ $order['invoice']['address']['zipcode'] }}
|
||||||
|
{{ $order['invoice']['address']['city'] }}<br />
|
||||||
|
@endif
|
||||||
|
</x-card>
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<x-card title="Adresse de livraison">
|
||||||
|
@if ($order['delivery_address'])
|
||||||
|
{{ $order['delivery_address']['address'] }}<br />
|
||||||
|
@isset($order['delivery_address']['address2'])
|
||||||
|
{{ $order['delivery_address']['address2'] }}<br />
|
||||||
|
@endisset
|
||||||
|
{{ $order['delivery_address']['zipcode'] }}
|
||||||
|
{{ $order['delivery_address']['city'] }}<br />
|
||||||
|
@endif
|
||||||
|
</x-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-6" style="font-size: 1.2em; font-weight: 500;">
|
||||||
|
Commande N° {{ $order['ref'] }}<br />
|
||||||
|
du {{ Carbon\Carbon::parse($order['created_at'])->isoFormat('LLLL') }}
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
Statut : {{ $order['status'] }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-6">
|
||||||
|
Canal de vente : {{ $order['sale_channel']['name'] }}
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
Règlement : {{ $order['payment_type'] }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-4">
|
||||||
|
Type de livraison : {{ $order['delivery_type_id'] }}
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
Référence Colis : {{ $order['delivery_ref'] }}
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
Lien suivi : {{ $order['delivery_link'] }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@include('Admin.Shop.Orders.partials.detail', ['detail_type' => 'commande'])
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
<div class="row mb-3 mt-3">
|
<div class="row mb-3 mt-3">
|
||||||
<label for="new-password" class="col-md-6 control-label text-right">Mot de passe actuel</label>
|
<label for="new-password" class="col-md-6 control-label text-right">Mot de passe actuel</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input id="current-password" type="password" class="form-control" name="current-password" required>
|
@include('components.form.input', [
|
||||||
|
'name' => $prefix ?? false ? $prefix . "['current-password']" : 'current-password',
|
||||||
|
'label' => $label ?? '',
|
||||||
|
'type' => 'password',
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<div @isset($id_card) id="{{ $id_card }}" @endisset class="card {{ $class ?? 'mb-0' }} {{ isset($tabs) ? ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'card-outline-tabs' : 'card-tabs' : ''}} {{ ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'card-outline' : '' }} card-{{ $color ?? config('boilerplate.theme.card.default_color', 'info') }}">
|
<div @isset($id_card) id="{{ $id_card }}" @endisset
|
||||||
@if($title ?? $header ?? false)
|
class="card {{ $class ?? 'mb-0' }} {{ isset($tabs) ? ($outline ?? config('boilerplate.theme.card.outline', false) ? 'card-outline-tabs' : 'card-tabs') : '' }} {{ $outline ?? config('boilerplate.theme.card.outline', false) ? 'card-outline' : '' }} card-{{ $color ?? config('boilerplate.theme.card.default_color', 'info') }}">
|
||||||
<div class="card-header class="{{ $classHeader ?? '' }} {{ isset($tabs) ? ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'p-0' : 'p-0 pt-1' : '' }} border-bottom-0">
|
@if ($title ?? ($header ?? false))
|
||||||
|
<div
|
||||||
|
class="card-header {{ $classHeader ?? '' }} {{ isset($tabs) ? ($outline ?? config('boilerplate.theme.card.outline', false) ? 'p-0' : 'p-0 pt-1') : '' }} border-bottom-0">
|
||||||
@isset($header)
|
@isset($header)
|
||||||
{{ $header }}
|
{{ $header }}
|
||||||
@else
|
@else
|
||||||
@@ -13,7 +15,8 @@
|
|||||||
@endisset
|
@endisset
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<div class="card-body {{ $title ?? false ? ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'pt-0' : '' : '' }} {{ $class_body ?? '' }} {{ $classBody ?? '' }}">
|
<div
|
||||||
|
class="card-body {{ $title ?? false ? ($outline ?? config('boilerplate.theme.card.outline', false) ? 'pt-0' : '') : '' }} {{ $class_body ?? '' }} {{ $classBody ?? '' }}">
|
||||||
{{ $slot }}
|
{{ $slot }}
|
||||||
</div>
|
</div>
|
||||||
@isset($footer)
|
@isset($footer)
|
||||||
@@ -21,4 +24,4 @@
|
|||||||
{{ $footer }}
|
{{ $footer }}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ Route::prefix('Clients')->name('Customers.')->group(function () {
|
|||||||
Route::get('modalProfile/{id?}', 'CustomerController@modalProfile')->name('modalProfile');
|
Route::get('modalProfile/{id?}', 'CustomerController@modalProfile')->name('modalProfile');
|
||||||
Route::get('edit', 'CustomerController@edit')->name('edit');
|
Route::get('edit', 'CustomerController@edit')->name('edit');
|
||||||
Route::post('storeProfileAjax', 'CustomerController@storeProfileAjax')->name('storeProfileAjax');
|
Route::post('storeProfileAjax', 'CustomerController@storeProfileAjax')->name('storeProfileAjax');
|
||||||
Route::post('storeProfile', 'CustomerController@storeProfile')->name('storeProfile');
|
Route::post('store', 'CustomerController@store')->name('store');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user