Previous datagrid columns for date and booleans were of type string but they have been changed according to the new filters for the respective

This commit is contained in:
prashant-webkul 2018-12-10 09:58:45 +05:30
parent 529e0ecd3b
commit 60babb693d
6 changed files with 48 additions and 13 deletions

View File

@ -92,7 +92,7 @@ class AttributeDataGrid
], [
'name' => 'is_unique',
'alias' => 'attributeIsUnique',
'type' => 'string',
'type' => 'boolean',
'label' => 'Unique',
'sortable' => true,
'wrapper' => function ($value) {
@ -104,7 +104,7 @@ class AttributeDataGrid
], [
'name' => 'value_per_locale',
'alias' => 'attributeValuePerLocale',
'type' => 'string',
'type' => 'boolean',
'label' => 'Locale based',
'sortable' => true,
'wrapper' => function ($value) {
@ -116,7 +116,7 @@ class AttributeDataGrid
], [
'name' => 'value_per_channel',
'alias' => 'attributeValuePerChannel',
'type' => 'string',
'type' => 'boolean',
'label' => 'Channel based',
'sortable' => true,
'wrapper' => function ($value) {
@ -125,7 +125,7 @@ class AttributeDataGrid
else
return "True";
},
],
]
],
'filterable' => [
@ -154,7 +154,22 @@ class AttributeDataGrid
'alias' => 'attributeIsRequired',
'type' => 'boolean',
'label' => 'Required',
],
], [
'name' => 'is_unique',
'alias' => 'attributeIsUnique',
'type' => 'boolean',
'label' => 'Unique',
], [
'name' => 'value_per_locale',
'alias' => 'attributeValuePerLocale',
'type' => 'boolean',
'label' => 'Locale based',
], [
'name' => 'value_per_channel',
'alias' => 'attributeValuePerChannel',
'type' => 'boolean',
'label' => 'Channel based',
]
],
//don't use aliasing in case of searchables

View File

@ -85,7 +85,7 @@ class CategoryDataGrid
], [
'name' => 'cat.status',
'alias' => 'catstatus',
'type' => 'string',
'type' => 'boolean',
'label' => 'Visible in Menu',
'sortable' => true,
'wrapper' => function ($value) {
@ -121,7 +121,7 @@ class CategoryDataGrid
], [
'column' => 'cat.status',
'alias' => 'catstatus',
'type' => 'string',
'type' => 'boolean',
'label' => 'Visible in Menu',
],
],

View File

@ -89,7 +89,7 @@ class InventorySourcesDataGrid
], [
'name' => 'status',
'alias' => 'inventoryStatus',
'type' => 'string',
'type' => 'boolean',
'label' => 'Status',
'sortable' => true,
'wrapper' => function ($value) {
@ -120,6 +120,11 @@ class InventorySourcesDataGrid
'alias' => 'inventoryName',
'type' => 'string',
'label' => 'Name',
], [
'name' => 'status',
'alias' => 'inventoryStatus',
'type' => 'boolean',
'label' => 'Status',
],
],

View File

@ -76,7 +76,7 @@ class OrderInvoicesDataGrid
'alias' => 'invstate',
'type' => 'string',
'label' => 'State',
'sortable' => false
'sortable' => true
], [
'name' => 'inv.grand_total',
'alias' => 'invgrandtotal',
@ -89,7 +89,7 @@ class OrderInvoicesDataGrid
], [
'name' => 'inv.created_at',
'alias' => 'invcreated_at',
'type' => 'date',
'type' => 'datetime',
'label' => 'Invoice Date',
'sortable' => true
]
@ -101,6 +101,11 @@ class OrderInvoicesDataGrid
'alias' => 'invid',
'type' => 'number',
'label' => 'ID',
], [
'column' => 'inv.created_at',
'alias' => 'invcreated_at',
'type' => 'datetime',
'label' => 'Invoice Date',
]
],
//don't use aliasing in case of searchables

View File

@ -91,9 +91,9 @@ class OrderShipmentsDataGrid
], [
'name' => 'ship.created_at',
'alias' => 'shipdate',
'type' => 'string',
'type' => 'datetime',
'label' => 'Shipment Date',
'sortable' => false
'sortable' => true
]
],
@ -103,6 +103,11 @@ class OrderShipmentsDataGrid
'alias' => 'shipID',
'type' => 'number',
'label' => 'ID',
], [
'column' => 'ship.created_at',
'alias' => 'shipdate',
'type' => 'datetime',
'label' => 'Shipment Date',
]
],
//don't use aliasing in case of searchables

View File

@ -93,7 +93,7 @@ class ProductDataGrid
], [
'name' => 'prods.status',
'alias' => 'ProductStatus',
'type' => 'string',
'type' => 'boolean',
'label' => 'Status',
'sortable' => true,
'wrapper' => function ($value) {
@ -148,6 +148,11 @@ class ProductDataGrid
'alias' => 'ProductType',
'type' => 'string',
'label' => 'Product Type',
], [
'name' => 'prods.status',
'alias' => 'ProductStatus',
'type' => 'boolean',
'label' => 'Status'
]
],
//don't use aliasing in case of searchables