diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php index 851154410..65e0b823e 100644 --- a/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php @@ -32,12 +32,12 @@ class AttributeDataGrid 'aliased' => true, 'massoperations' => [ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ @@ -147,20 +147,17 @@ class AttributeDataGrid 'alias' => 'attributeId', 'type' => 'number', 'label' => 'ID', - ], - [ + ], [ 'column' => 'code', 'alias' => 'attributeCode', 'type' => 'string', 'label' => 'Code', - ], - [ + ], [ 'column' => 'admin_name', 'alias' => 'attributeAdminName', 'type' => 'string', - 'label' => 'AdminName', - ], - [ + 'label' => 'Name', + ], [ 'column' => 'type', 'alias' => 'attributeType', 'type' => 'string', @@ -174,13 +171,11 @@ class AttributeDataGrid 'column' => 'code', 'alias' => 'attributeCode', 'type' => 'string', - ], - [ + ], [ 'column' => 'admin_name', 'alias' => 'attributeAdminName', 'type' => 'string', - ], - [ + ], [ 'column' => 'type', 'alias' => 'attributeType', 'type' => 'string', diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php index 9a5dc85c4..9ff9261ba 100644 --- a/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php @@ -33,12 +33,12 @@ class AttributeFamilyDataGrid 'aliased' => false, //use this with false as default and true in case of joins 'massoperations' =>[ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ @@ -87,7 +87,7 @@ class AttributeFamilyDataGrid 'name' => 'name', 'alias' => 'attributeFamilyName', 'type' => 'string', - 'label' => 'Code', + 'label' => 'Name', 'sortable' => true, ], ], diff --git a/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php index 2f4d0f9eb..bd185f7df 100644 --- a/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php @@ -33,12 +33,12 @@ class CategoryDataGrid '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', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ @@ -112,7 +112,7 @@ class CategoryDataGrid 'alias' => 'cat_locale', 'type' => 'string', 'label' => 'Locale', - 'sortable' => true, + 'sortable' => false, 'filter' => [ 'function' => 'orWhere', 'condition' => ['ct.locale', app()->getLocale()] diff --git a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php index 6d2c9243c..eceb562d8 100644 --- a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php @@ -33,12 +33,12 @@ class ChannelDataGrid 'aliased' => false, //use this with false as default and true in case of joins 'massoperations' =>[ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php index a5c0ddec3..01abdfe6e 100644 --- a/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php @@ -33,12 +33,12 @@ class CountryDataGrid 'aliased' => false, //use this with false as default and true in case of joins 'massoperations' =>[ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php index a4c81b178..9b4162f46 100644 --- a/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php @@ -32,12 +32,12 @@ class CurrencyDataGrid 'aliased' => false, //use this with false as default and true in case of joins 'massoperations' =>[ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php index 16328fbe8..06d9235ae 100644 --- a/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php @@ -31,12 +31,12 @@ class CustomerDataGrid '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' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php index 3efe26e16..37649ee86 100644 --- a/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php @@ -32,23 +32,23 @@ class CustomerGroupDataGrid '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', - ], - [ - 'route' => route('admin.datagrid.index'), - 'method' => 'POST', - 'label' => 'View Grid', - 'type' => 'select', - 'options' =>[ - 1 => 'Edit', - 2 => 'Set', - 3 => 'Change Status' - ] - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], + // [ + // 'route' => route('admin.datagrid.index'), + // 'method' => 'POST', + // 'label' => 'View Grid', + // 'type' => 'select', + // 'options' =>[ + // 1 => 'Edit', + // 2 => 'Set', + // 3 => 'Change Status' + // ] + // ], ], 'actions' => [ [ diff --git a/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php index aae8fa614..c5143cf80 100644 --- a/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php @@ -33,12 +33,12 @@ class ExchangeRatesDataGrid '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', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php index 54dce8ae1..8dcf9bfe6 100644 --- a/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php @@ -31,12 +31,12 @@ class InventorySourcesDataGrid 'aliased' => false, //use this with false as default and true in case of joins 'massoperations' =>[ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php index d9f3d051c..c134a0f88 100644 --- a/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php @@ -32,12 +32,12 @@ class LocalesDataGrid 'aliased' => false, //use this with false as default and true in case of joins 'massoperations' =>[ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php index 92c735b4c..f98f24d6a 100644 --- a/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php @@ -31,21 +31,22 @@ class OrderInvoicesDataGrid 'aliased' => false, 'massoperations' =>[ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ + [ + 'type' => 'View', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon pencil-lg-icon', + ], // [ - // 'type' => 'View', - // 'route' => route('admin.datagrid.delete'), - // 'confirm_text' => 'Do you really want to do this?', - // 'icon' => 'icon pencil-lg-icon', - // ], [ // 'type' => 'Delete', // 'route' => route('admin.datagrid.delete'), // 'confirm_text' => 'Do you really want to do this?', @@ -53,7 +54,15 @@ class OrderInvoicesDataGrid // ] ], - 'join' => [], + 'join' => [ + [ + 'join' => 'leftjoin', + 'table' => 'orders as ors', + 'primaryKey' => 'inv.order_id', + 'condition' => '=', + 'secondaryKey' => 'ors.id', + ] + ], //use aliasing on secodary columns if join is performed @@ -65,23 +74,29 @@ class OrderInvoicesDataGrid 'label' => 'ID', 'sortable' => true ], [ - 'name' => 'inv.state', - 'alias' => 'invstate', + 'name' => 'inv.order_id', + 'alias' => 'invorderid', 'type' => 'number', - 'label' => 'State', + 'label' => 'Order ID', 'sortable' => true ], [ - 'name' => 'inv.total_qty', - 'alias' => 'invtotalqty', - 'type' => 'number', - 'label' => 'Quantity', - 'sortable' => true + 'name' => 'inv.state', + 'alias' => 'invstate', + 'type' => 'string', + 'label' => 'State', + 'sortable' => false ], [ 'name' => 'inv.grand_total', 'alias' => 'invgrandtotal', 'type' => 'number', - 'label' => 'Grand Total', - 'sortable' => true + 'label' => 'Amount', + 'sortable' => false + ], [ + 'name' => 'inv.created_at', + 'alias' => 'invcreated_at', + 'type' => 'date', + 'label' => 'Invoice Date', + 'sortable' => false ] ], diff --git a/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php index bbd835aaa..466942ec6 100644 --- a/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php @@ -22,41 +22,42 @@ class OrderShipmentsDataGrid */ public function createOrderShipmentsDataGrid() { - return DataGrid::make([ 'name' => 'shipments', 'table' => 'shipments as ship', 'select' => 'ship.id', 'perpage' => 10, - 'aliased' => false, + 'aliased' => true, 'massoperations' =>[ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ - // [ - // 'type' => 'View', - // 'route' => route('admin.datagrid.delete'), - // 'confirm_text' => 'Do you really want to do this?', - // 'icon' => 'icon pencil-lg-icon', - // ], [ - // 'type' => 'Delete', - // 'route' => route('admin.datagrid.delete'), - // 'confirm_text' => 'Do you really want to do this?', - // 'icon' => 'icon trash-icon', - // ] + [ + 'type' => 'View', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon pencil-lg-icon', + ], ], - 'join' => [], + 'join' => [ + [ + 'join' => 'leftjoin', + 'table' => 'orders as ors', + 'primaryKey' => 'ship.order_id', + 'condition' => '=', + 'secondaryKey' => 'ors.id', + ] + ], //use aliasing on secodary columns if join is performed - 'columns' => [ [ 'name' => 'ship.id', @@ -64,6 +65,30 @@ class OrderShipmentsDataGrid 'type' => 'number', 'label' => 'ID', 'sortable' => true + ], [ + 'name' => 'ship.order_id', + 'alias' => 'order_id', + 'type' => 'number', + 'label' => 'Order ID', + 'sortable' => true + ], [ + 'name' => 'ship.total_qty', + 'alias' => 'total_qty', + 'type' => 'number', + 'label' => 'Total Quantity', + 'sortable' => true + ], [ + 'name' => 'ors.customer_first_name', + 'alias' => 'order_customer_first_name', + 'type' => 'string', + 'label' => 'Customer Name', + 'sortable' => false + ], [ + 'name' => 'ors.created_at', + 'alias' => 'orscreated', + 'type' => 'date', + 'label' => 'Order Date', + 'sortable' => true ], [ 'name' => 'ship.status', 'alias' => 'shipstatus', @@ -81,8 +106,16 @@ class OrderShipmentsDataGrid return 'Closed'; else if($value == "pending") return 'Pending'; + else + return 'Un-Attended'; }, - ], + ], [ + 'name' => 'ship.created_at', + 'alias' => 'ship_date', + 'type' => 'string', + 'label' => 'Shipment Date', + 'sortable' => false + ] ], 'filterable' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php index a9c5fa443..27df69211 100644 --- a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php @@ -168,7 +168,6 @@ class ProductDataGrid 'nlike' => "not like", ], // 'css' => [] - ]); } diff --git a/packages/Webkul/Admin/src/DataGrids/ProductReviewDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ProductReviewDataGrid.php index 9ba659de2..5b6c3ce87 100644 --- a/packages/Webkul/Admin/src/DataGrids/ProductReviewDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ProductReviewDataGrid.php @@ -34,12 +34,12 @@ class ProductReviewDataGrid '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', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php index 74cc41cac..0d36da193 100644 --- a/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php @@ -33,12 +33,12 @@ class RolesDataGrid 'aliased' => false, //use this with false as default and true in case of joins 'massoperations' =>[ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php index 766dbfff2..14287c7c9 100644 --- a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php @@ -32,12 +32,12 @@ class SliderDataGrid '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', - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], ], 'actions' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php index d4e589a54..d84f10bfe 100644 --- a/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php @@ -32,23 +32,23 @@ class TaxCategoryDataGrid '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', - ], - [ - 'route' => route('admin.datagrid.index'), - 'method' => 'POST', - 'label' => 'View Grid', - 'type' => 'select', - 'options' =>[ - 1 => 'Edit', - 2 => 'Set', - 3 => 'Change Status' - ] - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], + // [ + // 'route' => route('admin.datagrid.index'), + // 'method' => 'POST', + // 'label' => 'View Grid', + // 'type' => 'select', + // 'options' =>[ + // 1 => 'Edit', + // 2 => 'Set', + // 3 => 'Change Status' + // ] + // ], ], 'actions' => [ [ diff --git a/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php b/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php index f93464664..b94780144 100644 --- a/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php @@ -31,23 +31,23 @@ class TaxRateDataGrid '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', - ], - [ - 'route' => route('admin.datagrid.index'), - 'method' => 'POST', - 'label' => 'View Grid', - 'type' => 'select', - 'options' =>[ - 1 => 'Edit', - 2 => 'Set', - 3 => 'Change Status' - ] - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], + // [ + // 'route' => route('admin.datagrid.index'), + // 'method' => 'POST', + // 'label' => 'View Grid', + // 'type' => 'select', + // 'options' =>[ + // 1 => 'Edit', + // 2 => 'Set', + // 3 => 'Change Status' + // ] + // ], ], 'actions' => [ [ diff --git a/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php index ad35971d1..c1928ae3f 100644 --- a/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php @@ -32,25 +32,26 @@ class UserDataGrid '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', - ], - [ - 'route' => route('admin.datagrid.index'), - 'method' => 'POST', - 'label' => 'View Grid', - 'type' => 'select', - 'options' =>[ - 1 => 'Edit', - 2 => 'Set', - 3 => 'Change Status' - ] - ], + 'massoperations' => [ + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], + // [ + // 'route' => route('admin.datagrid.index'), + // 'method' => 'POST', + // 'label' => 'View Grid', + // 'type' => 'select', + // 'options' =>[ + // 1 => 'Edit', + // 2 => 'Set', + // 3 => 'Change Status' + // ] + // ], ], + 'actions' => [ [ 'type' => 'Edit', diff --git a/packages/Webkul/Core/src/Database/Migrations/2018_11_27_174449_change_content_column_in_sliders_table.php b/packages/Webkul/Core/src/Database/Migrations/2018_11_27_174449_change_content_column_in_sliders_table.php new file mode 100644 index 000000000..785d202a5 --- /dev/null +++ b/packages/Webkul/Core/src/Database/Migrations/2018_11_27_174449_change_content_column_in_sliders_table.php @@ -0,0 +1,32 @@ +text('content')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('sliders', function (Blueprint $table) { + $table->string('content')->change(); + }); + } +} diff --git a/packages/Webkul/Ui/src/DataGrid/DataGrid.php b/packages/Webkul/Ui/src/DataGrid/DataGrid.php index 150456884..0196a6bd3 100644 --- a/packages/Webkul/Ui/src/DataGrid/DataGrid.php +++ b/packages/Webkul/Ui/src/DataGrid/DataGrid.php @@ -55,19 +55,15 @@ class DataGrid * Pagination variable * @var String */ - protected $perpage; - /** * Table * * @var String Classs name $table */ - protected $table; - /** * Join * @@ -82,82 +78,63 @@ class DataGrid * 'callback' => 'not supported yet' * ] */ - protected $join; - /** * Collection Object of Column $columns * * @var Collection */ - protected $columns; - /** * array of columns * to be filtered * @var Array */ - protected $filterable; - /** * array of columns * to be searched * * @var Array */ - protected $searchable; - /** * mass operations * * @var Array */ - protected $massoperations; - /** * Pagination $pagination * * @var Pagination */ - - protected $pagination; - /** * Css $css * * @var Css */ - protected $css; - /** * Actions $action * @var action */ - protected $actions; - /** * URL parse $parsed * @var parse */ - protected $parsed; - /* public function __construct( $name = null , @@ -515,10 +492,12 @@ class DataGrid { $parsed = []; $unparsed = url()->full(); - if (count(explode('?', $unparsed))>1) { + if (count(explode('?', $unparsed)) > 1) { $to_be_parsed = explode('?', $unparsed)[1]; + parse_str($to_be_parsed, $parsed); unset($parsed['page']); + return $parsed; } else { return $parsed; diff --git a/packages/Webkul/Ui/src/Resources/views/datagrid/table/body.blade.php b/packages/Webkul/Ui/src/Resources/views/datagrid/table/body.blade.php index 1430e81af..8588d0df2 100644 --- a/packages/Webkul/Ui/src/Resources/views/datagrid/table/body.blade.php +++ b/packages/Webkul/Ui/src/Resources/views/datagrid/table/body.blade.php @@ -8,13 +8,12 @@ @endif @foreach ($results as $result)