Merge pull request #1 from bagisto/master
Catalog Rules missing in the permissions list
This commit is contained in:
commit
33947fc72c
|
|
@ -12,6 +12,6 @@ class VerifyCsrfToken extends Middleware
|
|||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
'paypal/standard/ipn'
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,10 +18,12 @@
|
|||
"ext-pdo_mysql": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"astrotomic/laravel-translatable": "^11.0.0",
|
||||
"barryvdh/laravel-debugbar": "^3.1",
|
||||
"barryvdh/laravel-dompdf": "0.8.6",
|
||||
"doctrine/dbal": "2.9.2",
|
||||
"fideloper/proxy": "^4.2",
|
||||
"flynsarmy/db-blade-compiler": "^5.5",
|
||||
"fzaninotto/faker": "^1.9.1",
|
||||
"guzzlehttp/guzzle": "~6.3",
|
||||
"intervention/image": "^2.4",
|
||||
"intervention/imagecache": "^2.3",
|
||||
|
|
@ -29,11 +31,10 @@
|
|||
"konekt/concord": "^1.2",
|
||||
"laravel/framework": "^7.0",
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^2.0",
|
||||
"maatwebsite/excel": "3.1.19",
|
||||
"prettus/l5-repository": "^2.6",
|
||||
"tymon/jwt-auth": "^1.0.0",
|
||||
"barryvdh/laravel-debugbar": "^3.1",
|
||||
"fzaninotto/faker": "^1.9.1"
|
||||
"tymon/jwt-auth": "^1.0.0"
|
||||
},
|
||||
|
||||
"require-dev": {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f30430f65c1f5650515c1af10a9c5d9d",
|
||||
"content-hash": "8aafae843c854c6ea581deb957563009",
|
||||
"packages": [
|
||||
{
|
||||
"name": "astrotomic/laravel-translatable",
|
||||
|
|
@ -1889,6 +1889,61 @@
|
|||
],
|
||||
"time": "2020-04-07T15:01:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/ui",
|
||||
"version": "v2.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/ui.git",
|
||||
"reference": "15368c5328efb7ce94f35ca750acde9b496ab1b1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/ui/zipball/15368c5328efb7ce94f35ca750acde9b496ab1b1",
|
||||
"reference": "15368c5328efb7ce94f35ca750acde9b496ab1b1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/console": "^7.0",
|
||||
"illuminate/filesystem": "^7.0",
|
||||
"illuminate/support": "^7.0",
|
||||
"php": "^7.2.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.0",
|
||||
"phpunit/phpunit": "^8.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Laravel\\Ui\\UiServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Laravel\\Ui\\": "src/",
|
||||
"Illuminate\\Foundation\\Auth\\": "auth-backend/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "Laravel UI utilities and presets.",
|
||||
"keywords": [
|
||||
"laravel",
|
||||
"ui"
|
||||
],
|
||||
"time": "2020-04-29T15:06:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lcobucci/jwt",
|
||||
"version": "3.3.2",
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ return [
|
|||
'views' => true, // Views with their data
|
||||
'route' => true, // Current route information
|
||||
'auth' => false, // Display Laravel authentication status
|
||||
'gate' => true, // Display Laravel Gate checks
|
||||
'gate' => true, // Display Laravel Gate checks
|
||||
'session' => true, // Display session data
|
||||
'symfony_request' => true, // Only one can be enabled..
|
||||
'mail' => true, // Catch mail messages
|
||||
|
|
@ -122,7 +122,7 @@ return [
|
|||
'files' => false, // Show the included files
|
||||
'config' => false, // Display config settings
|
||||
'cache' => false, // Display cache events
|
||||
'models' => false, // Display models
|
||||
'models' => true, // Display models
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -179,7 +179,8 @@ return [
|
|||
| in conjunction with queued imports and exports.
|
||||
|
|
||||
*/
|
||||
'remote_disk' => null,
|
||||
'remote_disk' => null,
|
||||
'remote_prefix' => null,
|
||||
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -17,6 +17,21 @@ return [
|
|||
// App\Console\Commands\ExampleCommand::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Alias Whitelist
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Tinker will not automatically alias classes in your vendor namespaces
|
||||
| but you may explicitly allow a subset of classes to get aliased by
|
||||
| adding the names of each of those classes to the following list.
|
||||
|
|
||||
*/
|
||||
|
||||
'alias' => [
|
||||
//
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Alias Blacklist
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@
|
|||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Webkul\Checkout\Repositories\CartRepository;
|
||||
use Webkul\Checkout\Repositories\CartItemRepository;
|
||||
use Webkul\API\Http\Resources\Checkout\Cart as CartResource;
|
||||
|
|
@ -42,9 +45,9 @@ class CartController extends Controller
|
|||
/**
|
||||
* Controller instance
|
||||
*
|
||||
* @param \Webkul\Checkout\Repositories\CartRepository $cartRepository
|
||||
* @param \Webkul\Checkout\Repositories\CartItemRepository $cartItemRepository
|
||||
* @param \Webkul\Checkout\Repositories\WishlistRepository $wishlistRepository
|
||||
* @param \Webkul\Checkout\Repositories\CartRepository $cartRepository
|
||||
* @param \Webkul\Checkout\Repositories\CartItemRepository $cartItemRepository
|
||||
* @param \Webkul\Checkout\Repositories\WishlistRepository $wishlistRepository
|
||||
*/
|
||||
public function __construct(
|
||||
CartRepository $cartRepository,
|
||||
|
|
@ -69,7 +72,7 @@ class CartController extends Controller
|
|||
/**
|
||||
* Get customer cart
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
|
@ -86,10 +89,11 @@ class CartController extends Controller
|
|||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
* @param int $id
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function store($id)
|
||||
public function store($id): ?JsonResponse
|
||||
{
|
||||
if (request()->get('is_buy_now')) {
|
||||
Event::dispatch('shop.item.buy-now', $id);
|
||||
|
|
@ -97,36 +101,46 @@ class CartController extends Controller
|
|||
|
||||
Event::dispatch('checkout.cart.item.add.before', $id);
|
||||
|
||||
$result = Cart::addProduct($id, request()->except('_token'));
|
||||
try {
|
||||
$result = Cart::addProduct($id, request()->except('_token'));
|
||||
|
||||
if (! $result) {
|
||||
$message = session()->get('warning') ?? session()->get('error');
|
||||
if (is_array($result) && isset($result['warning'])) {
|
||||
return response()->json([
|
||||
'error' => $result['warning'],
|
||||
], 400);
|
||||
}
|
||||
|
||||
if ($customer = auth($this->guard)->user()) {
|
||||
$this->wishlistRepository->deleteWhere(['product_id' => $id, 'customer_id' => $customer->id]);
|
||||
}
|
||||
|
||||
Event::dispatch('checkout.cart.item.add.after', $result);
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
return response()->json([
|
||||
'error' => session()->get('warning'),
|
||||
], 400);
|
||||
'message' => __('shop::app.checkout.cart.item.success'),
|
||||
'data' => $cart ? new CartResource($cart) : null,
|
||||
]);
|
||||
} catch (Exception $e) {
|
||||
Log::error('API CartController: ' . $e->getMessage(),
|
||||
['product_id' => $id, 'cart_id' => cart()->getCart() ?? 0]);
|
||||
|
||||
return response()->json([
|
||||
'error' => [
|
||||
'message' => $e->getMessage(),
|
||||
'code' => $e->getCode()
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
if ($customer = auth($this->guard)->user()) {
|
||||
$this->wishlistRepository->deleteWhere(['product_id' => $id, 'customer_id' => $customer->id]);
|
||||
}
|
||||
|
||||
Event::dispatch('checkout.cart.item.add.after', $result);
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
return response()->json([
|
||||
'message' => __('shop::app.checkout.cart.item.success'),
|
||||
'data' => $cart ? new CartResource($cart) : null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function update()
|
||||
{
|
||||
|
|
@ -161,7 +175,7 @@ class CartController extends Controller
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function destroy()
|
||||
{
|
||||
|
|
@ -182,8 +196,9 @@ class CartController extends Controller
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
* @param int $id
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function destroyItem($id)
|
||||
{
|
||||
|
|
@ -206,7 +221,9 @@ class CartController extends Controller
|
|||
/**
|
||||
* Function to move a already added product to wishlist will run only on customer authentication.
|
||||
*
|
||||
* @param \Webkul\Checkout\Repositories\CartItemRepository $id
|
||||
* @param \Webkul\Checkout\Repositories\CartItemRepository $id
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function moveToWishlist($id)
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,12 +1,12 @@
|
|||
/*!
|
||||
* Sizzle CSS Selector Engine v2.3.4
|
||||
* Sizzle CSS Selector Engine v2.3.5
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://js.foundation/
|
||||
*
|
||||
* Date: 2019-04-08
|
||||
* Date: 2020-03-14
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.4.1
|
||||
* jQuery JavaScript Library v3.5.1
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2019-05-01T21:04Z
|
||||
* Date: 2020-05-04T22:49Z
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/admin.js": "/js/admin.js?id=2701b1627d73faa941d6",
|
||||
"/css/admin.css": "/css/admin.css?id=f22618adc68fda9b42c0"
|
||||
"/js/admin.js": "/js/admin.js?id=57beb5ab209dffdced7e",
|
||||
"/css/admin.css": "/css/admin.css?id=555d64d44d86c1ca638c"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,13 +53,13 @@ return [
|
|||
'key' => 'catalog.categories',
|
||||
'name' => 'admin::app.layouts.categories',
|
||||
'route' => 'admin.catalog.categories.index',
|
||||
'sort' => 3,
|
||||
'sort' => 2,
|
||||
'icon-class' => '',
|
||||
], [
|
||||
'key' => 'catalog.attributes',
|
||||
'name' => 'admin::app.layouts.attributes',
|
||||
'route' => 'admin.catalog.attributes.index',
|
||||
'sort' => 2,
|
||||
'sort' => 3,
|
||||
'icon-class' => '',
|
||||
], [
|
||||
'key' => 'catalog.families',
|
||||
|
|
|
|||
|
|
@ -59,13 +59,12 @@ class AddressDataGrid extends DataGrid
|
|||
$queryBuilder->groupBy('ca.id')
|
||||
->addSelect(DB::raw(DB::getTablePrefix() . 'country_states.default_name as state_name'));
|
||||
|
||||
$this->addFilter('address_id', 'ca.id');
|
||||
$this->addFilter('company_name', 'ca.company_name');
|
||||
$this->addFilter('address1', 'ca.address1');
|
||||
$this->addFilter('postcode', 'ca.postcode');
|
||||
$this->addFilter('city', 'ca.city');
|
||||
$this->addFilter('state_name', DB::raw(DB::getTablePrefix() . 'country_states.default_name'));
|
||||
$this->addFilter('country_name', DB::raw(DB::getTablePrefix() . 'countries.name'));
|
||||
$this->addFilter('postcode', 'ca.postcode');
|
||||
$this->addFilter('default_address', 'ca.default_address');
|
||||
|
||||
$this->setQueryBuilder($queryBuilder);
|
||||
|
|
@ -73,15 +72,6 @@ class AddressDataGrid extends DataGrid
|
|||
|
||||
public function addColumns()
|
||||
{
|
||||
$this->addColumn([
|
||||
'index' => 'address_id',
|
||||
'label' => trans('admin::app.customers.addresses.address-id'),
|
||||
'type' => 'number',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'company_name',
|
||||
'label' => trans('admin::app.customers.addresses.company-name'),
|
||||
|
|
@ -100,6 +90,15 @@ class AddressDataGrid extends DataGrid
|
|||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'postcode',
|
||||
'label' => trans('admin::app.customers.addresses.postcode'),
|
||||
'type' => 'string',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'city',
|
||||
'label' => trans('admin::app.customers.addresses.city'),
|
||||
|
|
@ -127,15 +126,6 @@ class AddressDataGrid extends DataGrid
|
|||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'postcode',
|
||||
'label' => trans('admin::app.customers.addresses.postcode'),
|
||||
'type' => 'string',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'default_address',
|
||||
'label' => trans('admin::app.customers.addresses.default-address'),
|
||||
|
|
|
|||
|
|
@ -5,8 +5,11 @@ namespace Webkul\Admin\Http\Controllers\Customer;
|
|||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Admin\Http\Controllers\Controller;
|
||||
use Webkul\Customer\Repositories\CustomerRepository;
|
||||
|
||||
use Webkul\Customer\Repositories\CustomerAddressRepository;
|
||||
use Webkul\Customer\Repositories\CustomerGroupRepository;
|
||||
use Webkul\Core\Repositories\ChannelRepository;
|
||||
|
||||
use Webkul\Admin\Mail\NewCustomerNotification;
|
||||
use Mail;
|
||||
|
||||
|
|
@ -26,6 +29,13 @@ class CustomerController extends Controller
|
|||
*/
|
||||
protected $customerRepository;
|
||||
|
||||
/**
|
||||
* CustomerAddress Repository object
|
||||
*
|
||||
* @var \Webkul\Customer\Repositories\CustomerAddressRepository
|
||||
*/
|
||||
protected $customerAddressRepository;
|
||||
|
||||
/**
|
||||
* CustomerGroupRepository object
|
||||
*
|
||||
|
|
@ -44,26 +54,26 @@ class CustomerController extends Controller
|
|||
* Create a new controller instance.
|
||||
*
|
||||
* @param \Webkul\Customer\Repositories\CustomerRepository $customerRepository
|
||||
* @param \Webkul\Customer\Repositories\CustomerAddressRepository $customerAddressRepository
|
||||
* @param \Webkul\Customer\Repositories\CustomerGroupRepository $customerGroupRepository
|
||||
* @param \Webkul\Core\Repositories\ChannelRepository $channelRepository
|
||||
*/
|
||||
public function __construct(
|
||||
CustomerRepository $customerRepository,
|
||||
CustomerAddressRepository $customerAddressRepository,
|
||||
CustomerGroupRepository $customerGroupRepository,
|
||||
ChannelRepository $channelRepository
|
||||
)
|
||||
{
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->middleware('admin');
|
||||
|
||||
$this->customerRepository = $customerRepository;
|
||||
|
||||
$this->customerGroupRepository = $customerGroupRepository;
|
||||
|
||||
$this->channelRepository = $channelRepository;
|
||||
|
||||
}
|
||||
)
|
||||
|
||||
{
|
||||
$this->_config = request('_config');
|
||||
$this->middleware('admin');
|
||||
$this->customerRepository = $customerRepository;
|
||||
|
||||
$this->customerAddressRepository = $customerAddressRepository;
|
||||
$this->customerGroupRepository = $customerGroupRepository;
|
||||
$this->channelRepository = $channelRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
|
|
@ -141,12 +151,11 @@ class CustomerController extends Controller
|
|||
public function edit($id)
|
||||
{
|
||||
$customer = $this->customerRepository->findOrFail($id);
|
||||
|
||||
$address = $this->customerAddressRepository->find($id);
|
||||
$customerGroup = $this->customerGroupRepository->findWhere([['code', '<>', 'guest']]);
|
||||
|
||||
$channelName = $this->channelRepository->all();
|
||||
|
||||
return view($this->_config['view'], compact('customer', 'customerGroup', 'channelName'));
|
||||
return view($this->_config['view'], compact('customer', 'address', 'customerGroup', 'channelName'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -319,4 +319,15 @@ body {
|
|||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.ticket-list {
|
||||
.control-group {
|
||||
&.date {
|
||||
&::after {
|
||||
left: unset;
|
||||
right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,10 @@
|
|||
.rtl {
|
||||
direction: rtl;
|
||||
|
||||
.form-container {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.navbar-top {
|
||||
.navbar-top-right {
|
||||
text-align: left;
|
||||
|
|
@ -43,6 +47,12 @@
|
|||
.control-group {
|
||||
margin-right: 20px;
|
||||
margin-left: 0px;
|
||||
|
||||
&.has-error.date, &.has-error.date {
|
||||
&::after {
|
||||
margin-top: -12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.control-group.date {
|
||||
|
|
@ -234,13 +244,19 @@
|
|||
|
||||
.control-group.date {
|
||||
&::after {
|
||||
margin-top: 15px;
|
||||
position: absolute;
|
||||
margin-right: -35px;
|
||||
right: calc(70% - 40px);
|
||||
}
|
||||
}
|
||||
|
||||
.pagination .page-item .icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.slot-list {
|
||||
.control-group.date::after {
|
||||
top: 18px;
|
||||
right: calc(100% - 40px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
<div class="control-group">
|
||||
<div class="control-group" :class="[errors.has(inputName + '[value]') ? 'has-error' : '']">
|
||||
<input type="number" v-validate="'required|min_value:0'" :name="[inputName + '[value]']" v-model="customerGroupPrice.value" class="control" data-vv-as=""{{ __('admin::app.catalog.products.value') }}""/>
|
||||
<input type="number" v-validate="'required|min_value:0'" :name="[inputName + '[value]']" v-model="customerGroupPrice.value" class="control" data-vv-as=""{{ __('admin::app.datagrid.price') }}""/>
|
||||
<span class="control-error" v-if="errors.has(inputName + '[value]')">@{{ errors.first(inputName + '[value]') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<select v-validate="'{{$validations}}'" class="control" id="{{ $attribute->code }}" name="{{ $attribute->code }}[]" data-vv-as=""{{ $attribute->admin_name }}"" multiple>
|
||||
|
||||
@foreach ($attribute->options as $option)
|
||||
@foreach ($attribute->options()->orderBy('sort_order')->get() as $option)
|
||||
<option value="{{ $option->id }}" {{ in_array($option->id, explode(',', $product[$attribute->code])) ? 'selected' : ''}}>
|
||||
{{ $option->admin_name }}
|
||||
</option>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
@if ($attribute->code != 'tax_category_id')
|
||||
|
||||
@foreach ($attribute->options as $option)
|
||||
@foreach ($attribute->options()->orderBy('sort_order')->get() as $option)
|
||||
<option value="{{ $option->id }}" {{ $option->id == $selectedOption ? 'selected' : ''}}>
|
||||
{{ $option->admin_name }}
|
||||
</option>
|
||||
|
|
|
|||
|
|
@ -6,129 +6,31 @@
|
|||
|
||||
@section('content')
|
||||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
<i class="icon angle-left-icon back-link" onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
|
||||
{{ $customer->first_name . " " . $customer->last_name }}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<tabs>
|
||||
{!! view_render_event('bagisto.admin.customer.edit.before', ['customer' => $customer]) !!}
|
||||
|
||||
<form method="POST" action="{{ route('admin.customer.update', $customer->id) }}">
|
||||
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
<i class="icon angle-left-icon back-link" onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
|
||||
|
||||
{{ __('admin::app.customers.customers.title') }}
|
||||
</h1>
|
||||
<tab name="{{ __('admin::app.sales.orders.info') }}" :selected="true">
|
||||
<div class="sale-container">
|
||||
@include('admin::customers.general')
|
||||
</div>
|
||||
</tab>
|
||||
|
||||
<div class="page-action">
|
||||
<button type="submit" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.customers.customers.save-btn-title') }}
|
||||
</button>
|
||||
<tab name="{{ __('admin::app.customers.customers.addresses') }}" :selected="false">
|
||||
<div class="style:overflow: auto;"> </div>
|
||||
{!! view_render_event('bagisto.admin.customer.addresses.list.before') !!}
|
||||
{!! app('Webkul\Admin\DataGrids\AddressDataGrid')->render() !!}
|
||||
{!! view_render_event('bagisto.admin.customer.addresses.list.after') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="form-container">
|
||||
@csrf()
|
||||
|
||||
<input name="_method" type="hidden" value="PUT">
|
||||
|
||||
<accordian :title="'{{ __('admin::app.account.general') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.form.before', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required"> {{ __('admin::app.customers.customers.first_name') }}</label>
|
||||
<input type="text" class="control" name="first_name" v-validate="'required'" value="{{old('first_name') ?:$customer->first_name}}"
|
||||
data-vv-as=""{{ __('shop::app.customer.signup-form.firstname') }}""/>
|
||||
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.first_name.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
|
||||
<label for="last_name" class="required"> {{ __('admin::app.customers.customers.last_name') }}</label>
|
||||
<input type="text" class="control" name="last_name" v-validate="'required'" value="{{old('last_name') ?:$customer->last_name}}" data-vv-as=""{{ __('shop::app.customer.signup-form.lastname') }}"">
|
||||
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.last_name.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="email" class="required"> {{ __('admin::app.customers.customers.email') }}</label>
|
||||
<input type="email" class="control" name="email" v-validate="'required|email'" value="{{old('email') ?:$customer->email}}" data-vv-as=""{{ __('shop::app.customer.signup-form.email') }}"">
|
||||
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.email.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('gender') ? 'has-error' : '']">
|
||||
<label for="gender" class="required">{{ __('admin::app.customers.customers.gender') }}</label>
|
||||
<select name="gender" class="control" value="{{ $customer->gender }}" v-validate="'required'" data-vv-as=""{{ __('admin::app.customers.customers.gender') }}"">
|
||||
<option value="" {{ $customer->gender == "" ? 'selected' : '' }}></option>
|
||||
<option value="{{ __('admin::app.customers.customers.male') }}" {{ $customer->gender == __('admin::app.customers.customers.male') ? 'selected' : '' }}>{{ __('admin::app.customers.customers.male') }}</option>
|
||||
<option value="{{ __('admin::app.customers.customers.female') }}" {{ $customer->gender == __('admin::app.customers.customers.female') ? 'selected' : '' }}>{{ __('admin::app.customers.customers.female') }}</option>
|
||||
<option value="{{ __('admin::app.customers.customers.other') }}" {{ $customer->gender == __('admin::app.customers.customers.other') ? 'selected' : '' }}>{{ __('admin::app.customers.customers.other') }}</option>
|
||||
</select>
|
||||
<span class="control-error" v-if="errors.has('gender')">@{{ errors.first('gender') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.gender.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group">
|
||||
<label for="status" class="required">{{ __('admin::app.customers.customers.status') }}</label>
|
||||
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="status" name="status" value="{{ $customer->status }}" {{ $customer->status ? 'checked' : '' }}>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
|
||||
<span class="control-error" v-if="errors.has('status')">@{{ errors.first('status') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.status.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('date_of_birth') ? 'has-error' : '']">
|
||||
<label for="dob">{{ __('admin::app.customers.customers.date_of_birth') }}</label>
|
||||
<input type="date" class="control" name="date_of_birth" value="{{ old('date_of_birth') ?:$customer->date_of_birth }}" v-validate="" data-vv-as=""{{ __('admin::app.customers.customers.date_of_birth') }}"">
|
||||
<span class="control-error" v-if="errors.has('date_of_birth')">@{{ errors.first('date_of_birth') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.date_of_birth.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('phone') ? 'has-error' : '']">
|
||||
<label for="phone">{{ __('admin::app.customers.customers.phone') }}</label>
|
||||
<input type="text" class="control" name="phone" value="{{ $customer->phone }}" data-vv-as=""{{ __('admin::app.customers.customers.phone') }}"">
|
||||
<span class="control-error" v-if="errors.has('phone')">@{{ errors.first('phone') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.phone.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group">
|
||||
<label for="customerGroup" >{{ __('admin::app.customers.customers.customer_group') }}</label>
|
||||
|
||||
@if (! is_null($customer->customer_group_id))
|
||||
<?php $selectedCustomerOption = $customer->group->id ?>
|
||||
@else
|
||||
<?php $selectedCustomerOption = '' ?>
|
||||
@endif
|
||||
|
||||
<select class="control" name="customer_group_id">
|
||||
@foreach ($customerGroup as $group)
|
||||
<option value="{{ $group->id }}" {{ $selectedCustomerOption == $group->id ? 'selected' : '' }}>
|
||||
{{ $group->name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</tab>
|
||||
{!! view_render_event('bagisto.admin.customer.edit.after', ['customer' => $customer]) !!}
|
||||
</tabs>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
{!! view_render_event('bagisto.admin.customer.edit.before', ['customer' => $customer]) !!}
|
||||
|
||||
<form method="POST" action="{{ route('admin.customer.update', $customer->id) }}">
|
||||
<div class="page-content">
|
||||
<div class="form-container">
|
||||
@csrf()
|
||||
|
||||
<input name="_method" type="hidden" value="PUT">
|
||||
<div class="style:overflow: auto;"> </div>
|
||||
|
||||
<div slot="body">
|
||||
{!! view_render_event('bagisto.admin.customer.edit.form.before', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required"> {{ __('admin::app.customers.customers.first_name') }}</label>
|
||||
<input type="text" class="control" name="first_name" v-validate="'required'" value="{{old('first_name') ?:$customer->first_name}}"
|
||||
data-vv-as=""{{ __('shop::app.customer.signup-form.firstname') }}""/>
|
||||
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.first_name.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
|
||||
<label for="last_name" class="required"> {{ __('admin::app.customers.customers.last_name') }}</label>
|
||||
<input type="text" class="control" name="last_name" v-validate="'required'" value="{{old('last_name') ?:$customer->last_name}}" data-vv-as=""{{ __('shop::app.customer.signup-form.lastname') }}"">
|
||||
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.last_name.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="email" class="required"> {{ __('admin::app.customers.customers.email') }}</label>
|
||||
<input type="email" class="control" name="email" v-validate="'required|email'" value="{{old('email') ?:$customer->email}}" data-vv-as=""{{ __('shop::app.customer.signup-form.email') }}"">
|
||||
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.email.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('gender') ? 'has-error' : '']">
|
||||
<label for="gender" class="required">{{ __('admin::app.customers.customers.gender') }}</label>
|
||||
<select name="gender" class="control" value="{{ $customer->gender }}" v-validate="'required'" data-vv-as=""{{ __('admin::app.customers.customers.gender') }}"">
|
||||
<option value="" {{ $customer->gender == "" ? 'selected' : '' }}></option>
|
||||
<option value="{{ __('admin::app.customers.customers.male') }}" {{ $customer->gender == __('admin::app.customers.customers.male') ? 'selected' : '' }}>{{ __('admin::app.customers.customers.male') }}</option>
|
||||
<option value="{{ __('admin::app.customers.customers.female') }}" {{ $customer->gender == __('admin::app.customers.customers.female') ? 'selected' : '' }}>{{ __('admin::app.customers.customers.female') }}</option>
|
||||
<option value="{{ __('admin::app.customers.customers.other') }}" {{ $customer->gender == __('admin::app.customers.customers.other') ? 'selected' : '' }}>{{ __('admin::app.customers.customers.other') }}</option>
|
||||
</select>
|
||||
<span class="control-error" v-if="errors.has('gender')">@{{ errors.first('gender') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.gender.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group">
|
||||
<label for="status" class="required">{{ __('admin::app.customers.customers.status') }}</label>
|
||||
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="status" name="status" value="{{ $customer->status }}" {{ $customer->status ? 'checked' : '' }}>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
|
||||
<span class="control-error" v-if="errors.has('status')">@{{ errors.first('status') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.status.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('date_of_birth') ? 'has-error' : '']">
|
||||
<label for="dob">{{ __('admin::app.customers.customers.date_of_birth') }}</label>
|
||||
<input type="date" class="control" name="date_of_birth" value="{{ old('date_of_birth') ?:$customer->date_of_birth }}" v-validate="" data-vv-as=""{{ __('admin::app.customers.customers.date_of_birth') }}"">
|
||||
<span class="control-error" v-if="errors.has('date_of_birth')">@{{ errors.first('date_of_birth') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.date_of_birth.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('phone') ? 'has-error' : '']">
|
||||
<label for="phone">{{ __('admin::app.customers.customers.phone') }}</label>
|
||||
<input type="text" class="control" name="phone" value="{{ $customer->phone }}" data-vv-as=""{{ __('admin::app.customers.customers.phone') }}"">
|
||||
<span class="control-error" v-if="errors.has('phone')">@{{ errors.first('phone') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.phone.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group">
|
||||
<label for="customerGroup" >{{ __('admin::app.customers.customers.customer_group') }}</label>
|
||||
|
||||
@if (! is_null($customer->customer_group_id))
|
||||
<?php $selectedCustomerOption = $customer->group->id ?>
|
||||
@else
|
||||
<?php $selectedCustomerOption = '' ?>
|
||||
@endif
|
||||
|
||||
<select class="control" name="customer_group_id">
|
||||
@foreach ($customerGroup as $group)
|
||||
<option value="{{ $group->id }}" {{ $selectedCustomerOption == $group->id ? 'selected' : '' }}>
|
||||
{{ $group->name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.customers.customers.save-btn-title') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{!! view_render_event('bagisto.admin.customer.edit.after', ['customer' => $customer]) !!}
|
||||
|
|
@ -13,8 +13,8 @@ class Booking extends Model implements BookingContract
|
|||
|
||||
protected $fillable = [
|
||||
'qty',
|
||||
'from',
|
||||
'to',
|
||||
'available_from',
|
||||
'available_to',
|
||||
'order_item_id',
|
||||
'booking_product_event_ticket_id',
|
||||
'product_id',
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@
|
|||
.has-control-group .control-group:last-child {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.rtl .control-group.date::after {
|
||||
right: 100%;
|
||||
margin-right: -40px;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
|
|
@ -149,6 +154,13 @@
|
|||
available_to: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created: function() {
|
||||
this.booking.available_from = "{{ $bookingProduct && $bookingProduct->available_from ? $bookingProduct->available_from->format('Y-m-d H:i:s') : '' }}";
|
||||
|
||||
|
||||
this.booking.available_to = "{{ $bookingProduct && $bookingProduct->available_to ? $bookingProduct->available_to->format('Y-m-d H:i:s') : '' }}";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
<label class="ticket-label">{{ __('bookingproduct::app.admin.catalog.products.special-price-from') }}</label>
|
||||
|
||||
<datetime>
|
||||
<input type="text" v-validate="'date_format:yyyy-MM-dd HH:mm:ss|after:{{\Carbon\Carbon::yesterday()->format('Y-m-d 23:59:59')}}'" :name="controlName + '[special_price_from]'" v-model="ticketItem.special_price_from" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.special-price-from') }}"" ref="special_price_from" style="width:70%"/>
|
||||
<input type="text" v-validate="'date_format:yyyy-MM-dd HH:mm:ss|after:{{\Carbon\Carbon::yesterday()->format('Y-m-d 23:59:59')}}'" :name="controlName + '[special_price_from]'" v-model="ticketItem.special_price_from" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.special-price-from') }}"" ref="special_price_from" style="width:100%"/>
|
||||
</datetime>
|
||||
|
||||
<span class="control-error" v-if="errors.has(controlName + '[special_price_from]')">@{{ errors.first(controlName + '[special_price_from]') }}</span>
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
<label class="ticket-label">{{ __('bookingproduct::app.admin.catalog.products.special-price-to') }}</label>
|
||||
|
||||
<datetime>
|
||||
<input type="text" v-validate="'date_format:yyyy-MM-dd HH:mm:ss|after:special_price_from'" :name="controlName + '[special_price_to]'" v-model="ticketItem.special_price_to" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.special-price-to') }}"" ref="special_price_to" style="width:70%"/>
|
||||
<input type="text" v-validate="'date_format:yyyy-MM-dd HH:mm:ss|after:special_price_from'" :name="controlName + '[special_price_to]'" v-model="ticketItem.special_price_to" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.special-price-to') }}"" ref="special_price_to" style="width:100%"/>
|
||||
</datetime>
|
||||
|
||||
<span class="control-error" v-if="errors.has(controlName + '[special_price_to]')">@{{ errors.first(controlName + '[special_price_to]') }}</span>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Webkul\Checkout;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Webkul\Checkout\Models\Cart as CartModel;
|
||||
use Webkul\Checkout\Models\CartAddress;
|
||||
use Webkul\Checkout\Repositories\CartRepository;
|
||||
|
|
@ -122,9 +124,11 @@ class Cart
|
|||
/**
|
||||
* Add Items in a cart with some cart and item details.
|
||||
*
|
||||
* @param int $productId
|
||||
* @param array $data
|
||||
* @return \Webkul\Checkout\Contracts\Cart|\Exception|array
|
||||
* @param int $productId
|
||||
* @param array $data
|
||||
*
|
||||
* @return \Webkul\Checkout\Contracts\Cart|string|array
|
||||
* @throws Exception
|
||||
*/
|
||||
public function addProduct($productId, $data)
|
||||
{
|
||||
|
|
@ -147,7 +151,7 @@ class Cart
|
|||
session()->forget('cart');
|
||||
}
|
||||
|
||||
throw new \Exception($cartProducts);
|
||||
throw new Exception($cartProducts);
|
||||
} else {
|
||||
$parentCartItem = null;
|
||||
|
||||
|
|
@ -161,7 +165,7 @@ class Cart
|
|||
if (! $cartItem) {
|
||||
$cartItem = $this->cartItemRepository->create(array_merge($cartProduct, ['cart_id' => $cart->id]));
|
||||
} else {
|
||||
if (isset($cartProduct['parent_id']) && $cartItem->parent_id != $parentCartItem->id) {
|
||||
if (isset($cartProduct['parent_id']) && $cartItem->parent_id !== $parentCartItem->id) {
|
||||
$cartItem = $this->cartItemRepository->create(array_merge($cartProduct, [
|
||||
'cart_id' => $cart->id
|
||||
]));
|
||||
|
|
@ -218,7 +222,7 @@ class Cart
|
|||
$cart = $this->cartRepository->create($cartData);
|
||||
|
||||
if (! $cart) {
|
||||
session()->flash('error', trans('shop::app.checkout.cart.create-error'));
|
||||
session()->flash('error', __('shop::app.checkout.cart.create-error'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -232,7 +236,8 @@ class Cart
|
|||
* Update cart items information
|
||||
*
|
||||
* @param array $data
|
||||
* @return bool|void|\Exception
|
||||
*
|
||||
* @return bool|void|Exception
|
||||
*/
|
||||
public function updateItems($data)
|
||||
{
|
||||
|
|
@ -246,13 +251,13 @@ class Cart
|
|||
if ($quantity <= 0) {
|
||||
$this->removeItem($itemId);
|
||||
|
||||
throw new \Exception(trans('shop::app.checkout.cart.quantity.illegal'));
|
||||
throw new Exception(__('shop::app.checkout.cart.quantity.illegal'));
|
||||
}
|
||||
|
||||
$item->quantity = $quantity;
|
||||
|
||||
if (! $this->isItemHaveQuantity($item)) {
|
||||
throw new \Exception(trans('shop::app.checkout.cart.quantity.inventory_warning'));
|
||||
throw new Exception(__('shop::app.checkout.cart.quantity.inventory_warning'));
|
||||
}
|
||||
|
||||
Event::dispatch('checkout.cart.update.before', $item);
|
||||
|
|
@ -499,7 +504,7 @@ class Cart
|
|||
$this->saveAddressesWhenRequested($data, $billingAddressData, $shippingAddressData);
|
||||
|
||||
$this->linkAddresses($cart, $billingAddressData, $shippingAddressData);
|
||||
|
||||
|
||||
$this->assignCustomerFields($cart);
|
||||
|
||||
$cart->save();
|
||||
|
|
|
|||
|
|
@ -3,12 +3,34 @@
|
|||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
use Webkul\Checkout\Models\Cart;
|
||||
use Webkul\Checkout\Models\CartItem;
|
||||
use Webkul\Product\Models\Product;
|
||||
|
||||
$factory->define(CartItem::class, function (Faker $faker) {
|
||||
$factory->define(CartItem::class, function (Faker $faker, array $attributes) {
|
||||
$now = date("Y-m-d H:i:s");
|
||||
|
||||
if (isset($attributes['product_id'])) {
|
||||
$product = Product::where('id', $attributes['product_id'])->first();
|
||||
} else {
|
||||
$product = factory(Product::class)->create();
|
||||
}
|
||||
|
||||
$fallbackPrice = $faker->randomFloat(4, 0, 1000);
|
||||
|
||||
return [
|
||||
'quantity' => 1,
|
||||
'sku' => $product->sku,
|
||||
'type' => $product->type,
|
||||
'name' => $product->name,
|
||||
'price' => $product->price ?? $fallbackPrice,
|
||||
'base_price' => $product->price ?? $fallbackPrice,
|
||||
'total' => $product->price ?? $fallbackPrice,
|
||||
'base_total' => $product->price ?? $fallbackPrice,
|
||||
'product_id' => $product->id,
|
||||
'cart_id' => function () {
|
||||
return factory(Cart::class)->create()->id;
|
||||
},
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class Grouped extends AbstractType
|
|||
* @var \Webkul\Product\Repositories\ProductGroupedProductRepository
|
||||
*/
|
||||
protected $productGroupedProductRepository;
|
||||
|
||||
|
||||
/**
|
||||
* Skip attribute for downloadable product type
|
||||
*
|
||||
|
|
@ -30,7 +30,7 @@ class Grouped extends AbstractType
|
|||
|
||||
/**
|
||||
* These blade files will be included in product edit page
|
||||
*
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $additionalViews = [
|
||||
|
|
@ -124,7 +124,7 @@ class Grouped extends AbstractType
|
|||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getMinimalPrice()
|
||||
public function getMinimalPrice($qty = null)
|
||||
{
|
||||
$minPrices = [];
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ class Grouped extends AbstractType
|
|||
if (is_string($cartProducts)) {
|
||||
return $cartProducts;
|
||||
}
|
||||
|
||||
|
||||
$products = array_merge($products, $cartProducts);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
use Webkul\Product\Models\Product;
|
||||
use Webkul\Sales\Models\Order;
|
||||
use Webkul\Product\Models\Product;
|
||||
use Webkul\Sales\Models\OrderItem;
|
||||
|
||||
$factory->define(OrderItem::class, function (Faker $faker, array $attributes) {
|
||||
|
|
@ -16,14 +16,16 @@ $factory->define(OrderItem::class, function (Faker $faker, array $attributes) {
|
|||
$product = factory(Product::class)->create();
|
||||
}
|
||||
|
||||
$fallbackPrice = $faker->randomFloat(4, 0, 1000);
|
||||
|
||||
return [
|
||||
'sku' => $product->sku,
|
||||
'type' => $product->type,
|
||||
'name' => $product->name,
|
||||
'price' => $product->price,
|
||||
'base_price' => $product->price,
|
||||
'total' => $product->price,
|
||||
'base_total' => $product->price,
|
||||
'price' => $product->price ?? $fallbackPrice,
|
||||
'base_price' => $product->price ?? $fallbackPrice,
|
||||
'total' => $product->price ?? $fallbackPrice,
|
||||
'base_total' => $product->price ?? $fallbackPrice,
|
||||
'product_id' => $product->id,
|
||||
'qty_ordered' => 1,
|
||||
'qty_shipped' => 0,
|
||||
|
|
@ -37,7 +39,4 @@ $factory->define(OrderItem::class, function (Faker $faker, array $attributes) {
|
|||
'updated_at' => $now,
|
||||
'product_type' => Product::class,
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Webkul\Shop\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Webkul\Customer\Repositories\WishlistRepository;
|
||||
use Webkul\Product\Repositories\ProductRepository;
|
||||
use Webkul\Checkout\Contracts\Cart as CartModel;
|
||||
|
|
@ -75,7 +76,7 @@ class CartController extends Controller
|
|||
}
|
||||
|
||||
if ($result instanceof CartModel) {
|
||||
session()->flash('success', trans('shop::app.checkout.cart.item.success'));
|
||||
session()->flash('success', __('shop::app.checkout.cart.item.success'));
|
||||
|
||||
if ($customer = auth()->guard('customer')->user()) {
|
||||
$this->wishlistRepository->deleteWhere(['product_id' => $id, 'customer_id' => $customer->id]);
|
||||
|
|
@ -88,10 +89,13 @@ class CartController extends Controller
|
|||
}
|
||||
}
|
||||
} catch(\Exception $e) {
|
||||
session()->flash('error', trans($e->getMessage()));
|
||||
session()->flash('error', __($e->getMessage()));
|
||||
|
||||
$product = $this->productRepository->find($id);
|
||||
|
||||
Log::error('Shop CartController: ' . $e->getMessage(),
|
||||
['product_id' => $id, 'cart_id' => cart()->getCart() ?? 0]);
|
||||
|
||||
return redirect()->route('shop.productOrCategory.index', $product->url_key);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,8 +67,17 @@ class ProductsCategoriesProxyController extends Controller
|
|||
return view($this->_config['product_view'], compact('product', 'customer'));
|
||||
}
|
||||
|
||||
abort(404);
|
||||
}
|
||||
|
||||
abort(404);
|
||||
$sliderRepository = app('Webkul\Core\Repositories\SliderRepository');
|
||||
|
||||
$sliderData = $sliderRepository
|
||||
->where('channel_id', core()->getCurrentChannel()->id)
|
||||
->where('locale', core()->getCurrentLocale()->code)
|
||||
->get()
|
||||
->toArray();
|
||||
|
||||
return view('shop::home.index', compact('sliderData'));
|
||||
}
|
||||
}
|
||||
|
|
@ -581,7 +581,7 @@ return [
|
|||
'subject' => 'Nuovo commento aggiunto al tuo ordine',
|
||||
'dear' => ':customer_name',
|
||||
'final-summary' => 'Grazie per aver mostrato interesse per il nostro store',
|
||||
'help' => 'Se hai bisogno di aiuto contattaci all'indirizzo :support_email',
|
||||
'help' => 'Se hai bisogno di aiuto contattaci all\'indirizzo :support_email',
|
||||
'thanks' => 'Graze!',
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@ return [
|
|||
|
||||
'total' => [
|
||||
'order-summary' => 'Podsumowanie zamówienia',
|
||||
'sub-total' => 'Produkty,
|
||||
'sub-total' => 'Produkty',
|
||||
'grand-total' => 'Suma łączna',
|
||||
'delivery-charges' => 'Koszty dostawy',
|
||||
'tax' => 'Podatek',
|
||||
|
|
@ -592,7 +592,7 @@ return [
|
|||
'discount' => 'Rabat',
|
||||
'grand-total' => 'Suma łączna',
|
||||
'final-summary' => 'Dziękujemy za zakupy w naszym sklepie',
|
||||
'help' => ''Jeśli potrzebujesz jakiejkolwiek pomocy, skontaktuj się z nami pod adresem :support_email',
|
||||
'help' => 'Jeśli potrzebujesz jakiejkolwiek pomocy, skontaktuj się z nami pod adresem :support_email',
|
||||
'thanks' => 'Dzięki!',
|
||||
]
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,15 +1,20 @@
|
|||
<template>
|
||||
<span>
|
||||
<span style="display: flex;align-items: center;">
|
||||
<slot>
|
||||
<input type="text" :name="name" class="control" :value="value" data-input>
|
||||
</slot>
|
||||
<button
|
||||
class="btn"
|
||||
style="height:100%;margin-left: 8px; margin-top: 5px;"
|
||||
@click.prevent="clear"
|
||||
> <span class="icon trash-icon"></span> </button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Flatpickr from 'flatpickr';
|
||||
import Flatpickr from 'flatpickr';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
props: {
|
||||
name: String,
|
||||
value: String,
|
||||
|
|
@ -27,12 +32,19 @@
|
|||
var element = this.$el.getElementsByTagName('input')[0];
|
||||
this.datepicker = new Flatpickr(
|
||||
element, {
|
||||
allowInput: true,
|
||||
altFormat: 'Y-m-d',
|
||||
dateFormat: 'Y-m-d',
|
||||
weekNumbers: true,
|
||||
onChange: function(selectedDates, dateStr, instance) {
|
||||
this_this.$emit('onChange', dateStr)
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clear() {
|
||||
this.datepicker.clear();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,15 +1,20 @@
|
|||
<template>
|
||||
<span>
|
||||
<span style="display: flex;align-items: center;">
|
||||
<slot>
|
||||
<input type="text" :name="name" class="control" :value="value" data-input>
|
||||
</slot>
|
||||
<button
|
||||
class="btn"
|
||||
style="height:100%;margin-left: 8px; margin-top: 5px;"
|
||||
@click.prevent="clear"
|
||||
> <span class="icon trash-icon"></span> </button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Flatpickr from "flatpickr";
|
||||
import Flatpickr from "flatpickr";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
props: {
|
||||
name: String,
|
||||
value: String
|
||||
|
|
@ -35,10 +40,17 @@
|
|||
dateFormat: "Y-m-d H:i:S",
|
||||
enableTime: true,
|
||||
time_24hr: true,
|
||||
weekNumbers: true,
|
||||
onChange: function (selectedDates, dateStr, instance) {
|
||||
this_this.$emit('onChange', dateStr)
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
clear() {
|
||||
this.datepicker.clear();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"/js/velocity.js": "/js/velocity.js?id=38c9bb2e6b07d87d123f",
|
||||
"/js/velocity.js": "/js/velocity.js?id=8800d2830d2fa9f0254d",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=612d35e452446366eef7",
|
||||
"/css/velocity.css": "/css/velocity.css?id=fb18207e4410872a861a"
|
||||
"/css/velocity.css": "/css/velocity.css?id=f672523a022f64a07558"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace Webkul\Velocity\Http\Controllers\Shop;
|
||||
|
||||
use Cart;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Webkul\Velocity\Helpers\Helper;
|
||||
use Webkul\Checkout\Contracts\Cart as CartModel;
|
||||
use Webkul\Product\Repositories\ProductRepository;
|
||||
|
|
@ -93,16 +94,19 @@ class CartController extends Controller
|
|||
} catch(\Exception $exception) {
|
||||
$product = $this->productRepository->find($id);
|
||||
|
||||
Log::error('Velocity CartController: ' . $exception->getMessage(),
|
||||
['product_id' => $id, 'cart_id' => cart()->getCart() ?? 0]);
|
||||
|
||||
$response = [
|
||||
'status' => 'danger',
|
||||
'message' => trans($exception->getMessage()),
|
||||
'message' => __($exception->getMessage()),
|
||||
'redirectionRoute' => route('shop.productOrCategory.index', $product->url_key),
|
||||
];
|
||||
}
|
||||
|
||||
return $response ?? [
|
||||
'status' => 'danger',
|
||||
'message' => trans('velocity::app.error.something_went_wrong'),
|
||||
'message' => __('velocity::app.error.something_went_wrong'),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
window.location.reload();
|
||||
}
|
||||
} else {
|
||||
window.showAlert(`alert-${response.data.status}`, response.data.label ? response.data.label : this.__('shop.general.alert.error'), response.data.message);
|
||||
window.showAlert(`alert-warning`, response.data.label ? response.data.label : this.__('shop.general.alert.warning'), response.data.message);
|
||||
|
||||
if (response.data.redirectionRoute) {
|
||||
window.location.href = response.data.redirectionRoute;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,16 @@ body {
|
|||
}
|
||||
|
||||
.selectdiv {
|
||||
select {
|
||||
float: unset;
|
||||
|
||||
~ .select-icon-container {
|
||||
top: 0;
|
||||
right: 100px;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
.select-icon {
|
||||
left: 8px;
|
||||
}
|
||||
|
|
@ -46,8 +56,8 @@ body {
|
|||
.mini-cart-container {
|
||||
#mini-cart {
|
||||
.badge {
|
||||
top: -14px;
|
||||
right: -38px;
|
||||
top: -6px;
|
||||
left: 90%;
|
||||
}
|
||||
|
||||
.cart-text {
|
||||
|
|
@ -55,7 +65,21 @@ body {
|
|||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
~ .compare-btn,
|
||||
~ .wishlist-btn {
|
||||
.badge-container {
|
||||
top: -6px;
|
||||
left: 20px;
|
||||
vertical-align: top;
|
||||
|
||||
.badge {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-container {
|
||||
.container {
|
||||
|
|
@ -151,6 +175,7 @@ body {
|
|||
margin-left: 7px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.filter-attributes-item {
|
||||
input[type=checkbox] {
|
||||
+ span {
|
||||
|
|
@ -237,6 +262,33 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
.modal-footer>:not(:last-child) {
|
||||
margin-left: .25rem;
|
||||
}
|
||||
|
||||
.compare-products {
|
||||
.wishlist-icon {
|
||||
left: 60px;
|
||||
right: unset;
|
||||
}
|
||||
|
||||
.material-icons.cross {
|
||||
left: 20px;
|
||||
right: unset;
|
||||
}
|
||||
}
|
||||
|
||||
#alert-container {
|
||||
right: unset;
|
||||
left: 15px;
|
||||
}
|
||||
|
||||
.alert-dismissible {
|
||||
.close {
|
||||
left: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
// Shared
|
||||
.text-right {
|
||||
text-align: left !important;
|
||||
|
|
@ -264,5 +316,11 @@ body {
|
|||
.ml15 {
|
||||
margin-right: 15px !important;
|
||||
}
|
||||
.pl30 {
|
||||
padding-right: 30px;
|
||||
}
|
||||
.ml-5 {
|
||||
margin-right: 3rem !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
$direction = core()->getCurrentLocale()->direction;
|
||||
@endphp
|
||||
|
||||
@if ($velocityMetaData->slider)
|
||||
@if ($velocityMetaData && $velocityMetaData->slider)
|
||||
<slider-component direction="{{ $direction }}"></slider-component>
|
||||
@endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,30 @@
|
|||
{!! view_render_event('bagisto.shop.layout.header.locale.before') !!}
|
||||
@php
|
||||
$searchQuery = request()->input();
|
||||
|
||||
if ($searchQuery && ! empty($searchQuery)) {
|
||||
$searchQuery = implode('&', array_map(
|
||||
function ($v, $k) {
|
||||
if (is_array($v)) {
|
||||
return $k. '[]=' . implode('&' . $k . '[]=', $v);
|
||||
} else {
|
||||
return $k . '=' . $v;
|
||||
}
|
||||
},
|
||||
$searchQuery,
|
||||
array_keys($searchQuery)
|
||||
));
|
||||
} else {
|
||||
$searchQuery = false;
|
||||
}
|
||||
@endphp
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.locale.before') !!}
|
||||
<div class="pull-left">
|
||||
<div class="dropdown">
|
||||
|
||||
@php
|
||||
$localeImage = null;
|
||||
@endphp
|
||||
|
||||
@foreach (core()->getCurrentChannel()->locales as $locale)
|
||||
@if ($locale->code == app()->getLocale())
|
||||
@php
|
||||
|
|
@ -28,11 +47,11 @@
|
|||
@if (count(core()->getCurrentChannel()->locales) == 1)
|
||||
disabled="disabled"
|
||||
@endif>
|
||||
|
||||
|
||||
@foreach (core()->getCurrentChannel()->locales as $locale)
|
||||
@if (isset($serachQuery))
|
||||
@if (isset($searchQuery) && $searchQuery)
|
||||
<option
|
||||
value="?{{ $serachQuery }}&locale={{ $locale->code }}"
|
||||
value="?{{ $searchQuery }}&locale={{ $locale->code }}"
|
||||
{{ $locale->code == app()->getLocale() ? 'selected' : '' }}>
|
||||
{{ $locale->name }}
|
||||
</option>
|
||||
|
|
@ -59,8 +78,8 @@
|
|||
class="btn btn-link dropdown-toggle control locale-switcher styled-select"
|
||||
onchange="window.location.href = this.value">
|
||||
@foreach (core()->getCurrentChannel()->currencies as $currency)
|
||||
@if (isset($serachQuery))
|
||||
<option value="?{{ $serachQuery }}¤cy={{ $currency->code }}" {{ $currency->code == core()->getCurrentCurrencyCode() ? 'selected' : '' }}>{{ $currency->code }}</option>
|
||||
@if (isset($searchQuery) && $searchQuery)
|
||||
<option value="?{{ $searchQuery }}¤cy={{ $currency->code }}" {{ $currency->code == core()->getCurrentCurrencyCode() ? 'selected' : '' }}>{{ $currency->code }}</option>
|
||||
@else
|
||||
<option value="?currency={{ $currency->code }}" {{ $currency->code == core()->getCurrentCurrencyCode() ? 'selected' : '' }}>{{ $currency->code }}</option>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
@section('title', __('Service Unavailable'))
|
||||
@section('code', '503')
|
||||
@section('message', __($exception->getMessage() ?: 'Srvice Unavailable'))
|
||||
@section('message', __($exception->getMessage() ?: 'Service Unavailable'))
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<table border="0" cellpadding="0" cellspacing="0" role="presentation">
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ $url }}" class="button button-{{ $color ?? 'primary' }}" target="_blank">{{ $slot }}</a>
|
||||
<a href="{{ $url }}" class="button button-{{ $color ?? 'primary' }}" target="_blank" rel="noopener">{{ $slot }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
<tr>
|
||||
<td class="header">
|
||||
<a href="{{ $url }}">
|
||||
<a href="{{ $url }}" style="display: inline-block;">
|
||||
@if (trim($slot) === 'Laravel')
|
||||
<img src="https://laravel.com/img/notification-logo.png" class="logo" alt="Laravel Logo">
|
||||
@else
|
||||
{{ $slot }}
|
||||
@endif
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -2,25 +2,21 @@
|
|||
|
||||
body,
|
||||
body *:not(html):not(style):not(br):not(tr):not(code) {
|
||||
box-sizing: border-box;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
|
||||
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #f8fafc;
|
||||
color: #74787e;
|
||||
-webkit-text-size-adjust: none;
|
||||
background-color: #ffffff;
|
||||
color: #718096;
|
||||
height: 100%;
|
||||
hyphens: auto;
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
-moz-hyphens: auto;
|
||||
-ms-word-break: break-all;
|
||||
padding: 0;
|
||||
width: 100% !important;
|
||||
-webkit-hyphens: auto;
|
||||
-webkit-text-size-adjust: none;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
p,
|
||||
|
|
@ -43,14 +39,13 @@ a img {
|
|||
|
||||
h1 {
|
||||
color: #3d4852;
|
||||
font-size: 19px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-top: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #3d4852;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-top: 0;
|
||||
|
|
@ -58,7 +53,6 @@ h2 {
|
|||
}
|
||||
|
||||
h3 {
|
||||
color: #3d4852;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
margin-top: 0;
|
||||
|
|
@ -66,7 +60,6 @@ h3 {
|
|||
}
|
||||
|
||||
p {
|
||||
color: #3d4852;
|
||||
font-size: 16px;
|
||||
line-height: 1.5em;
|
||||
margin-top: 0;
|
||||
|
|
@ -84,22 +77,22 @@ img {
|
|||
/* Layout */
|
||||
|
||||
.wrapper {
|
||||
background-color: #f8fafc;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
-premailer-width: 100%;
|
||||
background-color: #edf2f7;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
-premailer-width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
|
|
@ -110,154 +103,176 @@ img {
|
|||
}
|
||||
|
||||
.header a {
|
||||
color: #bbbfc3;
|
||||
color: #3d4852;
|
||||
font-size: 19px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
text-shadow: 0 1px 0 white;
|
||||
}
|
||||
|
||||
/* Logo */
|
||||
|
||||
.logo {
|
||||
height: 75px;
|
||||
width: 75px;
|
||||
}
|
||||
|
||||
/* Body */
|
||||
|
||||
.body {
|
||||
background-color: #ffffff;
|
||||
border-bottom: 1px solid #edeff2;
|
||||
border-top: 1px solid #edeff2;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
-premailer-width: 100%;
|
||||
background-color: #edf2f7;
|
||||
border-bottom: 1px solid #edf2f7;
|
||||
border-top: 1px solid #edf2f7;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inner-body {
|
||||
background-color: #ffffff;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 570px;
|
||||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
-premailer-width: 570px;
|
||||
background-color: #ffffff;
|
||||
border-color: #e8e5ef;
|
||||
border-radius: 2px;
|
||||
border-width: 1px;
|
||||
box-shadow: 0 2px 0 rgba(0, 0, 150, 0.025), 2px 4px 0 rgba(0, 0, 150, 0.015);
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 570px;
|
||||
}
|
||||
|
||||
/* Subcopy */
|
||||
|
||||
.subcopy {
|
||||
border-top: 1px solid #edeff2;
|
||||
border-top: 1px solid #e8e5ef;
|
||||
margin-top: 25px;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
.subcopy p {
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
|
||||
.footer {
|
||||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
-premailer-width: 570px;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
width: 570px;
|
||||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
-premailer-width: 570px;
|
||||
}
|
||||
|
||||
.footer p {
|
||||
color: #aeaeae;
|
||||
color: #b0adc5;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer a {
|
||||
color: #b0adc5;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
|
||||
.table table {
|
||||
margin: 30px auto;
|
||||
width: 100%;
|
||||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
-premailer-width: 100%;
|
||||
margin: 30px auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table th {
|
||||
border-bottom: 1px solid #edeff2;
|
||||
padding-bottom: 8px;
|
||||
margin: 0;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.table td {
|
||||
color: #74787e;
|
||||
font-size: 15px;
|
||||
line-height: 18px;
|
||||
padding: 10px 0;
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.content-cell {
|
||||
padding: 35px;
|
||||
max-width: 100vw;
|
||||
padding: 32px;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
|
||||
.action {
|
||||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
-premailer-width: 100%;
|
||||
margin: 30px auto;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
-premailer-width: 100%;
|
||||
}
|
||||
|
||||
.button {
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);
|
||||
-webkit-text-size-adjust: none;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-decoration: none;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
.button-blue,
|
||||
.button-primary {
|
||||
background-color: #3490dc;
|
||||
border-top: 10px solid #3490dc;
|
||||
border-right: 18px solid #3490dc;
|
||||
border-bottom: 10px solid #3490dc;
|
||||
border-left: 18px solid #3490dc;
|
||||
background-color: #2d3748;
|
||||
border-bottom: 8px solid #2d3748;
|
||||
border-left: 18px solid #2d3748;
|
||||
border-right: 18px solid #2d3748;
|
||||
border-top: 8px solid #2d3748;
|
||||
}
|
||||
|
||||
.button-green,
|
||||
.button-success {
|
||||
background-color: #38c172;
|
||||
border-top: 10px solid #38c172;
|
||||
border-right: 18px solid #38c172;
|
||||
border-bottom: 10px solid #38c172;
|
||||
border-left: 18px solid #38c172;
|
||||
background-color: #48bb78;
|
||||
border-bottom: 8px solid #48bb78;
|
||||
border-left: 18px solid #48bb78;
|
||||
border-right: 18px solid #48bb78;
|
||||
border-top: 8px solid #48bb78;
|
||||
}
|
||||
|
||||
.button-red,
|
||||
.button-error {
|
||||
background-color: #e3342f;
|
||||
border-top: 10px solid #e3342f;
|
||||
border-right: 18px solid #e3342f;
|
||||
border-bottom: 10px solid #e3342f;
|
||||
border-left: 18px solid #e3342f;
|
||||
background-color: #e53e3e;
|
||||
border-bottom: 8px solid #e53e3e;
|
||||
border-left: 18px solid #e53e3e;
|
||||
border-right: 18px solid #e53e3e;
|
||||
border-top: 8px solid #e53e3e;
|
||||
}
|
||||
|
||||
/* Panels */
|
||||
|
||||
.panel {
|
||||
margin: 0 0 21px;
|
||||
border-left: #2d3748 solid 4px;
|
||||
margin: 21px 0;
|
||||
}
|
||||
|
||||
.panel-content {
|
||||
background-color: #f1f5f8;
|
||||
background-color: #edf2f7;
|
||||
color: #718096;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.panel-content p {
|
||||
color: #718096;
|
||||
}
|
||||
|
||||
.panel-item {
|
||||
padding: 0;
|
||||
}
|
||||
|
|
@ -267,26 +282,8 @@ img {
|
|||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* Promotions */
|
||||
/* Utilities */
|
||||
|
||||
.promotion {
|
||||
background-color: #ffffff;
|
||||
border: 2px dashed #9ba2ab;
|
||||
margin: 0;
|
||||
margin-bottom: 25px;
|
||||
margin-top: 25px;
|
||||
padding: 24px;
|
||||
width: 100%;
|
||||
-premailer-cellpadding: 0;
|
||||
-premailer-cellspacing: 0;
|
||||
-premailer-width: 100%;
|
||||
}
|
||||
|
||||
.promotion h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.promotion p {
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
.break-all {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,13 +52,11 @@
|
|||
@slot('subcopy')
|
||||
@lang(
|
||||
"If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\n".
|
||||
'into your web browser: [:displayableActionUrl](:actionURL)',
|
||||
'into your web browser:',
|
||||
[
|
||||
'actionText' => $actionText,
|
||||
'actionURL' => $actionUrl,
|
||||
'displayableActionUrl' => $displayableActionUrl,
|
||||
]
|
||||
)
|
||||
) <span class="break-all">[{{ $displayableActionUrl }}]({{ $actionUrl }})</span>
|
||||
@endslot
|
||||
@endisset
|
||||
@endcomponent
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
@if ($paginator->hasPages())
|
||||
<nav role="navigation" aria-label="Pagination Navigation" class="flex justify-between">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md">
|
||||
{!! __('pagination.previous') !!}
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
|
||||
{!! __('pagination.previous') !!}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
|
||||
{!! __('pagination.next') !!}
|
||||
</a>
|
||||
@else
|
||||
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md">
|
||||
{!! __('pagination.next') !!}
|
||||
</span>
|
||||
@endif
|
||||
</nav>
|
||||
@endif
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
@if ($paginator->hasPages())
|
||||
<nav role="navigation" aria-label="Pagination Navigation" class="flex items-center justify-between">
|
||||
<div class="flex justify-between flex-1 sm:hidden">
|
||||
@if ($paginator->onFirstPage())
|
||||
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md">
|
||||
{!! __('pagination.previous') !!}
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $paginator->previousPageUrl() }}" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
|
||||
{!! __('pagination.previous') !!}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if ($paginator->hasMorePages())
|
||||
<a href="{{ $paginator->nextPageUrl() }}" class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
|
||||
{!! __('pagination.next') !!}
|
||||
</a>
|
||||
@else
|
||||
<span class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md">
|
||||
{!! __('pagination.next') !!}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
||||
<div>
|
||||
<p class="text-sm text-gray-700 leading-5">
|
||||
{!! __('Showing') !!}
|
||||
<span class="font-medium">{{ $paginator->firstItem() }}</span>
|
||||
{!! __('to') !!}
|
||||
<span class="font-medium">{{ $paginator->lastItem() }}</span>
|
||||
{!! __('of') !!}
|
||||
<span class="font-medium">{{ $paginator->total() }}</span>
|
||||
{!! __('results') !!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="relative z-0 inline-flex shadow-sm">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<span aria-disabled="true" aria-label="{{ __('pagination.previous') }}">
|
||||
<span class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-l-md leading-5" aria-hidden="true">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-l-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150" aria-label="{{ __('pagination.previous') }}">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<span aria-disabled="true">
|
||||
<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 cursor-default leading-5">{{ $element }}</span>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<span aria-current="page">
|
||||
<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">{{ $page }}</span>
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $url }}" class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 hover:text-gray-500 focus:z-10 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150" aria-label="{{ __('Go to page :page', ['page' => $page]) }}">
|
||||
{{ $page }}
|
||||
</a>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-r-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150" aria-label="{{ __('pagination.next') }}">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
@else
|
||||
<span aria-disabled="true" aria-label="{{ __('pagination.next') }}">
|
||||
<span class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-r-md leading-5" aria-hidden="true">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@endif
|
||||
Loading…
Reference in New Issue