fix route
This commit is contained in:
24
Gruntfile.js
24
Gruntfile.js
@@ -41,40 +41,21 @@ var jsAdminLTE = [
|
||||
]
|
||||
|
||||
var jsCoreInclude = [
|
||||
// 'build/js/include/core/appender.js',
|
||||
// 'build/js/include/core/cache.js',
|
||||
// 'build/js/include/core/handlebars.js',
|
||||
// 'build/js/include/core/lang.js',
|
||||
'build/js/include/core/objectLength.js',
|
||||
// 'build/js/include/core/session.js',
|
||||
'build/js/include/core/url.js',
|
||||
'build/js/include/core/user.js',
|
||||
// 'build/js/include/form/check_fields.js',
|
||||
// 'build/js/include/form/checkbox.js',
|
||||
// 'build/js/include/form/datetime.js',
|
||||
// 'build/js/include/form/multi-select.js',
|
||||
'build/js/include/form/radio.js',
|
||||
// 'build/js/include/form/select.js',
|
||||
'build/js/include/form/upload.js',
|
||||
'build/js/include/form/validator.js',
|
||||
'build/js/include/layout/animate.js',
|
||||
// 'build/js/include/layout/message.js',
|
||||
// 'build/js/include/layout/modal.js',
|
||||
'build/js/include/layout/scroll.js',
|
||||
'build/js/include/layout/tooltip.js',
|
||||
// 'build/js/include/datatable.js',
|
||||
// 'build/js/include/file.js',
|
||||
// 'build/js/include/uploader.js',
|
||||
]
|
||||
|
||||
var jsBundle = [
|
||||
'node_modules/jquery-ui-sortable/jquery-ui.min.js',
|
||||
'node_modules/jquery-serializejson/jquery.serializejson.min.js',
|
||||
// 'node_modules/moment/min/moment.min.js',
|
||||
'node_modules/jquery-placeholder/jquery.placeholder.js',
|
||||
// 'node_modules/daterangepicker/daterangepicker.js',
|
||||
// 'node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js',
|
||||
// 'node_modules/bootstrap4-toggle/js/bootstrap4-toggle.min.js',
|
||||
'node_modules/@claviska/jquery-minicolors/jquery.minicolors.js',
|
||||
'node_modules/bootstrap-validate/dist/bootstrap-validate.js',
|
||||
'node_modules/bootstrap-validator/dist/validator.min.js',
|
||||
@@ -87,15 +68,11 @@ var jsBundle = [
|
||||
'node_modules/jquery.quicksearch/dist/jquery.quicksearch.min.js',
|
||||
'node_modules/jquery.nicescroll/dist/jquery.nicescroll.js',
|
||||
'node_modules/jquery-slimscroll/jquery.slimscroll.min.js',
|
||||
// 'node_modules/superclick/dist/js/superclick.min.js',
|
||||
// 'node_modules/dropzone/dist/min/dropzone.min.js',
|
||||
'node_modules/handlebars/dist/handlebars.min.js',
|
||||
'node_modules/swag/lib/swag.min.js',
|
||||
'node_modules/multiselect/js/jquery.multi-select.js',
|
||||
'node_modules/screenfull/dist/screenfull.js',
|
||||
'node_modules/underscore/underscore-min.js',
|
||||
// 'Admin/js/themes/admin/layout.js',
|
||||
// 'node_modules/wew.js/dist/wew.min.js'
|
||||
]
|
||||
|
||||
var jsMain = [
|
||||
@@ -136,7 +113,6 @@ var cssMain = [
|
||||
]
|
||||
|
||||
var jsDataTables = [
|
||||
// 'build/Suite/js/datatables.js',
|
||||
'node_modules/jszip/dist/jszip.min.js',
|
||||
'node_modules/pdfmake/build/pdfmake.min.js',
|
||||
'node_modules/pdfmake/build/vfs_fonts.js',
|
||||
|
||||
@@ -15,7 +15,11 @@ class CustomerAddressController extends Controller
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('Admin.Shop.CustomerAddresses.create');
|
||||
$data = [
|
||||
'with_country' => false,
|
||||
];
|
||||
|
||||
return view('Admin.Shop.CustomerAddresses.create', $data);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
|
||||
@@ -45,7 +45,7 @@ class RegisterController extends Controller
|
||||
|
||||
return $request->wantsJson()
|
||||
? new JsonResponse([], 201)
|
||||
: redirect('home');
|
||||
: redirect()->route('home');
|
||||
}
|
||||
|
||||
public function emailVerify()
|
||||
|
||||
@@ -6,8 +6,4 @@ use App\Http\Controllers\Controller as ParentController;
|
||||
|
||||
class Controller extends ParentController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth.check');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,9 @@ class OrderController extends Controller
|
||||
{
|
||||
public function index(CustomerOrdersDataTable $dataTable)
|
||||
{
|
||||
if (Customers::isNotConnected()) {
|
||||
abort(403);
|
||||
}
|
||||
return $dataTable->render('Shop.Orders.partials.list');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function initValidator() {
|
||||
$( document ).ready(function() {
|
||||
// console.log('initValidator');
|
||||
console.log('initValidator');
|
||||
// $(window).on('load', function() {
|
||||
// window.addEventListener('load', function() {
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('shop.customers.title'),
|
||||
'subtitle' => __('shop.customers.add'),
|
||||
'breadcrumb' => [__('shop.customers.title')]
|
||||
'title' => __('shop.customer_addresses.title'),
|
||||
'subtitle' => __('shop.customer_addresses.add'),
|
||||
'breadcrumb' => [__('shop.customers.title')],
|
||||
])
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => 'Admin.Shop.Customers.store', 'id' => 'customer-form', 'autocomplete' => 'off']) }}
|
||||
@include('Admin.Shop.Customers.form')
|
||||
{{ Form::open([
|
||||
'route' => 'Admin.Shop.CustomerAddresses.store',
|
||||
'id' => 'customer_address-form',
|
||||
'autocomplete' => 'off',
|
||||
]) }}
|
||||
@include('components.address')
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@if (($mode ?? false) == 'view')
|
||||
<label class="{{ $classLabel ?? 'light' }}" for="{{ $prefix ?? null }}address">{{ __('address') }}</label><br/>
|
||||
<label class="{{ $classLabel ?? 'light' }}" for="{{ $prefix ?? null }}address">{{ __('address') }}</label><br />
|
||||
@if ($item[($prefix ?? null) . 'address'])
|
||||
{{ $item[($prefix ?? null) . 'address'] ?? null }}<br/>
|
||||
{{ $item[($prefix ?? null) . 'address'] ?? null }}<br />
|
||||
@endif
|
||||
@if ($item[($prefix ?? null) . 'address2'])
|
||||
{{ $item[($prefix ?? null) . 'address2'] ?? null }}
|
||||
@@ -16,26 +16,29 @@
|
||||
{{ $item[($prefix ?? null) . 'state'] ?? null }}
|
||||
@endif
|
||||
@if ($item[($prefix ?? null) . 'country_id'])
|
||||
{{ $countries[$item[($prefix ?? null) . 'country_id']] ?? null }}<br/>
|
||||
{{ $countries[$item[($prefix ?? null) . 'country_id']] ?? null }}<br />
|
||||
@endif
|
||||
@else
|
||||
@if ($with_id ?? false)
|
||||
<input type="hidden" name="{{ ($prefix ?? null) . (($with_tab ?? false) ? '[id]' : 'address_id') }}" value="{{ $with_id }}">
|
||||
<input type="hidden" name="{{ ($prefix ?? null) . ($with_tab ?? false ? '[id]' : 'address_id') }}"
|
||||
value="{{ $with_id }}">
|
||||
@endif
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
@include('components.form.input', [
|
||||
'label' => __('street'),
|
||||
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[address]' : 'address'),
|
||||
'value' => ($with_tab ?? false) ? $item['address'] ?? null : ($item[($prefix ?? null) . 'address'] ?? null),
|
||||
'disabled' => $disabled ?? false
|
||||
'name' => ($prefix ?? null) . ($with_tab ?? false ? '[address]' : 'address'),
|
||||
'value' =>
|
||||
$with_tab ?? false ? $item['address'] ?? null : $item[($prefix ?? null) . 'address'] ?? null,
|
||||
'disabled' => $disabled ?? false,
|
||||
])
|
||||
</div>
|
||||
<div class="col-12">
|
||||
@include('components.form.input', [
|
||||
'label' => __('street_complement'),
|
||||
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[address2]' : 'address2'),
|
||||
'value' => ($with_tab ?? false) ? $item['address2'] ?? null : ($item[($prefix ?? null) . 'address2'] ?? null),
|
||||
'name' => ($prefix ?? null) . ($with_tab ?? false ? '[address2]' : 'address2'),
|
||||
'value' =>
|
||||
$with_tab ?? false ? $item['address2'] ?? null : $item[($prefix ?? null) . 'address2'] ?? null,
|
||||
'disabled' => $disabled ?? false,
|
||||
])
|
||||
</div>
|
||||
@@ -44,16 +47,17 @@
|
||||
<div class="col-4">
|
||||
@include('components.form.input', [
|
||||
'label' => __('zipcode'),
|
||||
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[zipcode]' : 'zipcode'),
|
||||
'value' => ($with_tab ?? false) ? $item['zipcode'] ?? null : ($item[($prefix ?? null) . 'zipcode'] ?? null),
|
||||
'name' => ($prefix ?? null) . ($with_tab ?? false ? '[zipcode]' : 'zipcode'),
|
||||
'value' =>
|
||||
$with_tab ?? false ? $item['zipcode'] ?? null : $item[($prefix ?? null) . 'zipcode'] ?? null,
|
||||
'disabled' => $disabled ?? false,
|
||||
])
|
||||
</div>
|
||||
<div class="col-8">
|
||||
@include('components.form.input', [
|
||||
'label' => __('city'),
|
||||
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[city]' : 'city'),
|
||||
'value' => ($with_tab ?? false) ? $item['city'] ?? null : ($item[($prefix ?? null) . 'city'] ?? null),
|
||||
'name' => ($prefix ?? null) . ($with_tab ?? false ? '[city]' : 'city'),
|
||||
'value' => $with_tab ?? false ? $item['city'] ?? null : $item[($prefix ?? null) . 'city'] ?? null,
|
||||
'disabled' => $disabled ?? false,
|
||||
])
|
||||
</div>
|
||||
@@ -63,9 +67,12 @@
|
||||
<div class="col-12 col-lg-6">
|
||||
@include('components.form.select', [
|
||||
'label' => __('country'),
|
||||
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[country_id]' : 'country_id'),
|
||||
'name' => ($prefix ?? null) . ($with_tab ?? false ? '[country_id]' : 'country_id'),
|
||||
'list' => $countries ?? null,
|
||||
'value' => ($with_tab ?? false) ? $item['country_id'] ?? null : ($item[($prefix ?? null) . 'country_id'] ?? null),
|
||||
'value' =>
|
||||
$with_tab ?? false
|
||||
? $item['country_id'] ?? null
|
||||
: $item[($prefix ?? null) . 'country_id'] ?? null,
|
||||
'with_empty' => '',
|
||||
'required' => true,
|
||||
'disabled' => $disabled ?? false,
|
||||
@@ -73,9 +80,10 @@
|
||||
</div>
|
||||
<div class="col-12 col-lg-6">
|
||||
@include('components.form.input', [
|
||||
'label' => çç('state'),
|
||||
'name' => ($prefix ?? null) . (($with_tab ?? false) ? '[state]' : 'state'),
|
||||
'value' => ($with_tab ?? false) ? $item['state'] ?? null : ($item[($prefix ?? null) . 'state'] ?? null),
|
||||
'label' => 'state',
|
||||
'name' => ($prefix ?? null) . ($with_tab ?? false ? '[state]' : 'state'),
|
||||
'value' =>
|
||||
$with_tab ?? false ? $item['state'] ?? null : $item[($prefix ?? null) . 'state'] ?? null,
|
||||
'disabled' => $disabled ?? false,
|
||||
])
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user