view all & customer name

This commit is contained in:
rahul shukla 2018-11-29 12:12:44 +05:30
parent e56c47697e
commit 41aae38b14
10 changed files with 52764 additions and 32 deletions

View File

@ -25,18 +25,18 @@ class CustomerDataGrid
return DataGrid::make([
'name' => 'Customer',
'table' => 'customers',
'select' => 'id',
'table' => 'customers as cus',
'select' => 'cus.id',
'perpage' => 10,
'aliased' => true, //use this with false as default and true in case of joins
'massoperations' =>[
// [
// 'route' => route('admin.datagrid.delete'),
// 'method' => 'DELETE',
// 'label' => 'Delete',
// 'type' => 'button', //select || button only
// ],
[
'route' => route('admin.datagrid.delete'),
'method' => 'DELETE',
'label' => 'Delete',
'type' => 'button', //select || button only
],
],
'actions' => [
@ -54,37 +54,50 @@ class CustomerDataGrid
],
'join' => [
[
'join' => 'leftjoin',
'table' => 'customer_groups as cg',
'primaryKey' => 'cus.customer_group_id',
'condition' => '=',
'secondaryKey' => 'cg.id',
]
],
//use aliasing on secodary columns if join is performed
'columns' => [
[
'name' => 'id',
'name' => 'cus.id',
'alias' => 'ID',
'type' => 'number',
'label' => 'ID',
'sortable' => true,
],
[
'name' => 'CONCAT(first_name, " ", last_name)',
'alias' => 'Name',
'name' => 'cus.first_name',
'alias' => 'FirstName',
'type' => 'string',
'label' => 'Name',
'sortable' => true,
'label' => 'First Name',
'sortable' => false,
],
[
'name' => 'email',
'name' => 'cus.email',
'alias' => 'Email',
'type' => 'string',
'label' => 'Email',
'sortable' => false,
],
[
'name' => 'customer_group_id',
'alias' => 'CustomerGroupId',
'name' => 'cus.phone',
'alias' => 'Phone',
'type' => 'number',
'label' => 'Group ID',
'label' => 'Phone',
'sortable' => true,
],
[
'name' => 'cg.name',
'alias' => 'CustomerGroupName',
'type' => 'string',
'label' => 'Group Name',
'sortable' => false,
],
],
@ -92,18 +105,23 @@ class CustomerDataGrid
//don't use aliasing in case of filters
'filterable' => [
[
'column' => 'id',
'column' => 'cus.id',
'alias' => 'ID',
'type' => 'number',
'label' => 'ID',
],
[
'column' => 'first_name',
'column' => 'cus.first_name',
'alias' => 'FirstName',
'type' => 'string',
'label' => 'First Name',
],
[
'column' => 'cg.name',
'alias' => 'CustomerGroupName',
'type' => 'string',
'label' => 'Group Name',
]
],

View File

@ -57,6 +57,8 @@ class CustomerController extends Controller
{
$this->_config = request('_config');
$this->middleware('admin');
$this->customer = $customer;
$this->customerGroup = $customerGroup;

View File

@ -39,6 +39,8 @@ class CustomerGroupController extends Controller
{
$this->_config = request('_config');
$this->middleware('admin');
$this->customerGroup = $customerGroup;
}

View File

@ -1,8 +1,8 @@
const { mix } = require("laravel-mix");
require("laravel-mix-merge-manifest");
var publicPath = 'publishable/assets';
// var publicPath = "../../../public/vendor/webkul/admin/assets";
// var publicPath = 'publishable/assets';
var publicPath = "../../../public/vendor/webkul/admin/assets";
mix.setPublicPath(publicPath).mergeManifest();
mix.disableNotifications();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/shop.js": "/js/shop.js?id=31a19d51860e4d8549a1",
"/css/shop.css": "/css/shop.css?id=2a9e3addb8dd8df86f03"
}
"/js/shop.js": "/js/shop.js",
"/css/shop.css": "/css/shop.css"
}

View File

@ -11,4 +11,15 @@ $disc-price: #FF6472;
$danger-color: #FF6472;
$disc-price-pro: #A5A5A5;
$other-font-color: #5E5E5E;
$title-color: #8E8E8E;
$address-card-border-color: #E8E8E8;
$bold-color: #3A3A3A;
$sticker-color: #2ED04C;
$stock-color: #4CAF50;
$rating-color: #FC6868;
$star-color: #d4d4d4;
$error-color: #ff5656;
$line-bar-color: #D8D8D8;
$btn-background-color: #fff;
$info-color: #204d74;
//shop variables ends here

View File

@ -129,8 +129,6 @@
</div>
@endforeach
<a href="{{ route('shop.reviews.index', $product->url_key) }}" class="view-all">View All</a>
</div>
</div>

View File

@ -1,8 +1,8 @@
const { mix } = require("laravel-mix");
require("laravel-mix-merge-manifest");
var publicPath = 'publishable/assets';
// var publicPath = "../../../public/themes/default/assets";
// var publicPath = 'publishable/assets';
var publicPath = "../../../public/themes/default/assets";
mix.setPublicPath(publicPath).mergeManifest();
mix.disableNotifications();