commit
99a0590c69
|
|
@ -90,19 +90,6 @@ class CustomerGroupDataGrid
|
|||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'cg.is_user_defined',
|
||||
'alias' => 'User Defined',
|
||||
'type' => 'boolean',
|
||||
'label' => 'User Defined',
|
||||
'sortable' => true,
|
||||
'wrapper' => function ($value) {
|
||||
if($value == 1)
|
||||
return "False";
|
||||
else
|
||||
return "True";
|
||||
},
|
||||
],
|
||||
],
|
||||
//don't use aliasing in case of filters
|
||||
'filterable' => [
|
||||
|
|
@ -118,12 +105,6 @@ class CustomerGroupDataGrid
|
|||
'type' => 'number',
|
||||
'label' => 'ID'
|
||||
],
|
||||
[
|
||||
'column' => 'cg.is_user_defined',
|
||||
'alias' => 'User Defined',
|
||||
'type' => 'boolean',
|
||||
'label' => 'User Defined'
|
||||
]
|
||||
],
|
||||
//don't use aliasing in case of searchables
|
||||
'searchable' => [
|
||||
|
|
@ -158,6 +139,5 @@ class CustomerGroupDataGrid
|
|||
public function render() {
|
||||
|
||||
return $this->createCustomerGroupDataGrid()->render();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -7,9 +7,12 @@ use Illuminate\Auth\AuthenticationException;
|
|||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Database\Eloquent\PDOException;
|
||||
use Illuminate\Database\Eloquent\ErrorException;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
|
|
@ -20,20 +23,58 @@ class Handler extends ExceptionHandler
|
|||
public function render($request, Exception $exception)
|
||||
{
|
||||
if ($exception instanceof HttpException) {
|
||||
$statusCode = $exception->getCode();
|
||||
|
||||
if(strpos($_SERVER['REQUEST_URI'], 'admin') !== false) {
|
||||
return response(view('admin::errors.' . $statusCode, [
|
||||
'msg' => $exception->getMessage(),
|
||||
'code' => $statusCode
|
||||
]), $statusCode);
|
||||
$statusCode = $exception->getStatusCode();
|
||||
if (strpos($_SERVER['REQUEST_URI'], 'admin') !== false) {
|
||||
switch ($statusCode) {
|
||||
case 404:
|
||||
return response()->view('admin::errors.404', [], 404);
|
||||
break;
|
||||
case 403:
|
||||
return response()->view('admin::errors.403', [], 403);
|
||||
break;
|
||||
case 401:
|
||||
return response()->view('admin::errors.401', [], 401);
|
||||
break;
|
||||
default:
|
||||
return response()->view('admin::errors.500', [], 500);
|
||||
}
|
||||
} else {
|
||||
return response(view('shop::errors.' . $statusCode, [
|
||||
'msg' => $exception->getMessage(),
|
||||
'code' => $statusCode
|
||||
]), $statusCode);
|
||||
switch ($statusCode) {
|
||||
case 404:
|
||||
return response()->view('shop::errors.404', [], 404);
|
||||
break;
|
||||
case 403:
|
||||
return response()->view('shop::errors.403', [], 403);
|
||||
break;
|
||||
case 401:
|
||||
return response()->view('shop::errors.401', [], 401);
|
||||
break;
|
||||
default:
|
||||
return response()->view('shop::errors.500', [], 500);
|
||||
}
|
||||
}
|
||||
} else if ($exception instanceof ModelNotFoundException) {
|
||||
if (strpos($_SERVER['REQUEST_URI'], 'admin') !== false){
|
||||
return response()->view('admin::errors.404', [], 404);
|
||||
}else {
|
||||
return response()->view('shop::errors.404', [], 404);
|
||||
}
|
||||
} else if ($exception instanceof PDOException) {
|
||||
if (strpos($_SERVER['REQUEST_URI'], 'admin') !== false){
|
||||
return response()->view('admin::errors.500', [], 500);
|
||||
} else {
|
||||
return response()->view('shop::errors.500', [], 500);
|
||||
}
|
||||
}
|
||||
// else if ($exception instanceof ErrorException) {
|
||||
|
||||
// if(strpos($_SERVER['REQUEST_URI'], 'admin') !== false){
|
||||
// return response()->view('admin::errors.500', [], 500);
|
||||
// }else {
|
||||
// return response()->view('shop::errors.500', [], 500);
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ return [
|
|||
'go-to-home' => 'GO TO HOME',
|
||||
|
||||
'404' => [
|
||||
'page-title' => 'Page not found',
|
||||
'page-title' => '404 Page not found',
|
||||
'name' => '404',
|
||||
'title' => 'Page Not found',
|
||||
'message' => 'The Page you are looking for doesnt exist or have secrately escaped;head back to home and make a fresh move again.'
|
||||
|
|
@ -477,7 +477,13 @@ return [
|
|||
'page-title' => '500 Internal Server Error',
|
||||
'name' => '500',
|
||||
'title' => 'Internal Server Error',
|
||||
'message' => 'You do not have permission to access this page'
|
||||
]
|
||||
'message' => 'The Server Encountered an internal error.'
|
||||
],
|
||||
'401' => [
|
||||
'page-title' => '401 Unauthorized Error',
|
||||
'name' => '401',
|
||||
'title' => 'Unauthorized Error',
|
||||
'message' => 'The request has not been applied because it lacks valid authentication credentials for the target resource.'
|
||||
],
|
||||
]
|
||||
];
|
||||
|
|
@ -35,17 +35,6 @@
|
|||
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="is_user_defined">
|
||||
{{ __('admin::app.customers.groups.is_user_defined') }}
|
||||
</label>
|
||||
<span class="checkbox">
|
||||
<input type="checkbox" name="is_user_defined" value="0">
|
||||
<label class="checkbox-view" for="is_user_defined"></label>
|
||||
{{ __('admin::app.customers.groups.yes') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -36,18 +36,6 @@
|
|||
<input type="text" class="control" name="name" v-validate="'required'" value="{{ $group->name }}">
|
||||
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="is_user_defined">
|
||||
{{ __('admin::app.customers.groups.is_user_defined') }}
|
||||
</label>
|
||||
<span class="checkbox">
|
||||
<input type="checkbox" name="is_user_defined" value="{{ $group->is_user_defined }}" {{ $group->is_user_defined ? 'checked' : '' }}>
|
||||
<label class="checkbox-view" for="is_user_defined"></label>
|
||||
{{ __('admin::app.customers.groups.yes') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.error.401.page-title') }}
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div class="error-container" style="width: 100%; display: flex; justify-content: center;">
|
||||
|
||||
<div class="wrapper" style="display: flex; height: 60vh; width: 100%;
|
||||
justify-content: start; align-items: center;">
|
||||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.401.name') }}
|
||||
</div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.401.title') }}
|
||||
</div>
|
||||
|
||||
<div class="error-description" style="margin-top: 20px;margin-bottom: 20px;color: #242424">
|
||||
{{ __('admin::app.error.401.message') }}
|
||||
</div>
|
||||
|
||||
<a href="{{ route('admin.dashboard.index') }}">
|
||||
{{ __('admin::app.error.go-to-home') }}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="error-graphic icon-404" style="margin-left: 10% ;"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -12,7 +12,9 @@
|
|||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E"> {{ $code }}</div>
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.403.name') }}
|
||||
</div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.403.title') }}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@
|
|||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E"> {{ $code }}</div>
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.404.name') }}
|
||||
</div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.404.title') }}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.error.403.page-title') }}
|
||||
{{ __('admin::app.error.500.page-title') }}
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
|
@ -13,7 +13,9 @@
|
|||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E"> {{ $code }}</div>
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.500.name') }}
|
||||
</div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.500.title') }}
|
||||
|
|
|
|||
|
|
@ -604,6 +604,11 @@ section.slider-block {
|
|||
|
||||
li {
|
||||
display: flex;
|
||||
|
||||
img {
|
||||
max-width: 120px;
|
||||
max-height: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.error.401.page-title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="error-container" style="width: 100%; display: flex; justify-content: center;">
|
||||
|
||||
<div class="wrapper" style="display: flex; height: 60vh; width: 100%;
|
||||
justify-content: start; align-items: center;">
|
||||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E"> {{ __('admin::app.error.401.name') }} </div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.401.title') }}
|
||||
</div>
|
||||
|
||||
<div class="error-description" style="margin-top: 20px;margin-bottom: 20px;color: #242424">
|
||||
{{ __('admin::app.error.401.message') }}
|
||||
</div>
|
||||
|
||||
<a href="{{ route('shop.home.index') }}">
|
||||
{{ __('admin::app.error.go-to-home') }}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="error-graphic icon-404" style="margin-left: 10% ;"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.error.403.page-title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="error-container" style="width: 100%; display: flex; justify-content: center;">
|
||||
|
|
@ -9,7 +13,7 @@
|
|||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E"> {{ $code }}</div>
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E"> {{ __('admin::app.error.403.name') }} </div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.403.title') }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.error.404.page-title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="error-container" style="width: 100%; display: flex; justify-content: center;">
|
||||
|
|
@ -9,7 +13,9 @@
|
|||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E"> {{ $code }}</div>
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.404.name') }}
|
||||
</div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.404.title') }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.error.500.page-title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="error-container" style="width: 100%; display: flex; justify-content: center;">
|
||||
|
|
@ -9,7 +13,9 @@
|
|||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E"> {{ $code }}</div>
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.500.name') }}
|
||||
</div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.500.title') }}
|
||||
|
|
|
|||
|
|
@ -784,6 +784,11 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
|
|||
display: flex;
|
||||
}
|
||||
|
||||
.header .header-top div.left-content ul.logo-container li img {
|
||||
max-width: 120px;
|
||||
max-height: 40px;
|
||||
}
|
||||
|
||||
.header .header-top div.left-content ul.search-container li.search-group {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js",
|
||||
"/css/shop.css": "/css/shop.css"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue