diff --git a/CHANGELOG for v0.1.x.md b/CHANGELOG for v0.1.x.md new file mode 100644 index 000000000..3aa09d16c --- /dev/null +++ b/CHANGELOG for v0.1.x.md @@ -0,0 +1,69 @@ +# CHANGELOG for v0.1.x + +#### This changelog consists the bug & security fixes and new features being included in the releases listed below. + +## **v0.1.1(13th of November, 2018)** - *Release* + +#94 - [fixed] Sign-in page shows signup text(@prashant-webkul) + +#95 - [fixed] Buy Now Button does not work(@prashant-webkul) + +#96 - [fixed] Search button does not work(@prashant-webkul) + +**PR #118** - *List of the features and fixes covered:* + + * [fixed] Email templates logo issue fixed(@jitendra-webkul) + * [fixed] Front search issue fixed due to hardcoded attribute code in search criteria(@jitendra-webkul) + * [changed] Versioning of core packages + * [fixed] Buynow validation fixes(@jitendra-webkul) + * [feature] New action type added in datagrid + * [feature] Loader added in storefront product page + * [fixed] Tax rates and categories form fixes(@jitendra-webkul) + * [feature] Country state selector added where country and states were there originally in release v0.1.0 + * [feature] Multiple addresses for customers with CRUD + * [feature] Customer can now make any of his/her existing address a default address + * [fixed] Customer address 2 form field validation required changed to optional(@jitendra-webkul) + * [fixed] Tax rates validation fixes for zip ranges(@prashant-webkul) + * [feature] Print invoice feature added. + * [changed] Core packages composer file parameter name changed from namespace webkul to bagisto + * [feature] Payment package added in core packages + * [feature] Sales module added in admin with orders, invoices and shipments with datagrid + * [feature] Functionality to indicate the new and featured product in the product's add and edit form + * [feature] Cart actions more faster in storefront + * [changed] Responsive styles refined and extended for checkout pages on storefront + * [fixed] Various UI/UX fixes in store front styles and layouts(@prashant-webkul & @jitendra-webkul) + + +## **v0.1.0(30th of October 2018)** - *First release* + +**PR #117** - *List of the features and fixes covered:* + + * [feature] Add and modify product with simple and configurable types + * [feature] Add and modify attributes and attribute families for creating products. + * [feature] Datagrid for all the major core resources added as index for listing core resources like product, attributes. + * [feature] Add and modify channels for creating multiple storefront. + * [feature] Add and modify categories to be displayed on storefront. + * [feature] Add and modify customers. + * [feature] Add and modify customer groups. + * [feature] Add and modify customer reviews for moderation by admin. + * [feature] Add and modify currently logged in admin user details. + * [feature] Add and modify locales for multiple languages support system wide. + * [feature] Add and modify currencies to be used in channels + * [feature] Add and modify currency exchange rate for the stores accepting multiple currencies or using multiple channels. + * [feature] Add and modify inventory sources with priority to hold products quantities in real time. + * [feature] Add and modify channels. + * [feature] Add and modify user from admins access with customer roles. + * [feature] Add and modify customer roles for users. + * [feature] Add and modify slider for storefront as a CMS capability. + * [feature] Add and modify tax categories and tax rates. + * [feature] Shopping cart in storefront + * [feature] Wishlist for customer + * [feature] Single address for customer + * [feature] Customer can see his reviews in his account section when logged in. + * [feature] Customer profile edit feature account section when logged in. + * [feature] Customer can view his orders in account section when logged in. + * [feature] Customer order notifications via mails. + * [feature] Multiple locales and currencies on storefront. + * [feature] Locale translations are stored as a separate file in shop and admin packages. + * [feature] Single page checkout system for checkout. + * [feature] Custom themes and assets provisioning included as a integrated package called "theme" in packages. \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php index ff11441ea..0a02a2c4d 100644 --- a/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php @@ -44,12 +44,12 @@ class AttributeDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], ], @@ -65,73 +65,66 @@ class AttributeDataGrid 'type' => 'number', 'label' => 'ID', 'sortable' => true, - ], - [ + ], [ 'name' => 'code', 'alias' => 'attributeCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, - ], - [ + ], [ 'name' => 'admin_name', 'alias' => 'attributeAdminName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, - ], - [ + ], [ 'name' => 'type', 'alias' => 'attributeType', 'type' => 'string', 'label' => 'Type', - 'sortable' => false, - ], - [ + 'sortable' => true, + ], [ 'name' => 'is_required', 'alias' => 'attributeIsRequired', 'type' => 'string', 'label' => 'Required', - 'sortable' => false, + 'sortable' => true, 'wrapper' => function ($value) { if($value == 0) return "False"; else return "True"; }, - ], - [ + ], [ 'name' => 'is_unique', 'alias' => 'attributeIsUnique', 'type' => 'string', 'label' => 'Unique', - 'sortable' => false, + 'sortable' => true, 'wrapper' => function ($value) { if($value == 0) return "False"; else return "True"; }, - ], - [ + ], [ 'name' => 'value_per_locale', 'alias' => 'attributeValuePerLocale', 'type' => 'string', 'label' => 'ValuePerLocale', - 'sortable' => false, + 'sortable' => true, 'wrapper' => function ($value) { if($value == 0) return "False"; else return "True"; }, - ], - [ + ], [ 'name' => 'value_per_channel', 'alias' => 'attributeValuePerChannel', 'type' => 'string', 'label' => 'ValuePerChannel', - 'sortable' => false, + 'sortable' => true, 'wrapper' => function ($value) { if($value == 0) return "False"; diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php index 9ff9261ba..2bf1bae1c 100644 --- a/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php @@ -45,12 +45,12 @@ class AttributeFamilyDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], ], @@ -68,22 +68,19 @@ class AttributeFamilyDataGrid //use aliasing on secodary columns if join is performed 'columns' => [ - [ 'name' => 'id', 'alias' => 'attributeFamilyId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, - ], - [ + ], [ 'name' => 'code', 'alias' => 'attributeFamilyCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, - ], - [ + ], [ 'name' => 'name', 'alias' => 'attributeFamilyName', 'type' => 'string', @@ -98,14 +95,12 @@ class AttributeFamilyDataGrid 'alias' => 'attributeFamilyId', 'type' => 'number', 'label' => 'ID', - ], - [ + ], [ 'column' => 'code', 'alias' => 'attributeFamilyCode', 'type' => 'string', 'label' => 'Code', - ], - [ + ], [ 'column' => 'name', 'alias' => 'attributeFamilyName', 'type' => 'string', @@ -120,8 +115,7 @@ class AttributeFamilyDataGrid 'column' => 'name', 'type' => 'string', 'label' => 'Name', - ], - [ + ], [ 'column' => 'code', 'type' => 'string', 'label' => 'Code', diff --git a/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php index 1fc176f52..7cc12f244 100644 --- a/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php @@ -45,12 +45,12 @@ class CategoryDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], ], @@ -70,33 +70,25 @@ class CategoryDataGrid 'columns' => [ [ 'name' => 'cat.id', - 'alias' => 'cat_id', + 'alias' => 'catid', 'type' => 'number', - 'label' => 'Category ID', + 'label' => 'ID', 'sortable' => true, ], [ 'name' => 'ct.name', - 'alias' => 'cat_name', + 'alias' => 'catname', 'type' => 'string', - 'label' => 'Category Name', - 'sortable' => false, + 'label' => 'Name', + 'sortable' => true, ], [ 'name' => 'cat.position', - 'alias' => 'cat_position', + 'alias' => 'catposition', 'type' => 'string', - 'label' => 'Category Position', - 'sortable' => false, - ], - // [ - // 'name' => 'cta.name', - // 'alias' => 'parent_name', - // 'type' => 'string', - // 'label' => 'Parent Name', - // 'sortable' => true, - // ], - [ + 'label' => 'Position', + 'sortable' => true, + ], [ 'name' => 'cat.status', - 'alias' => 'cat_status', + 'alias' => 'catstatus', 'type' => 'string', 'label' => 'Visible in Menu', 'sortable' => true, @@ -106,13 +98,12 @@ class CategoryDataGrid else return "True"; }, - ], - [ + ], [ 'name' => 'ct.locale', - 'alias' => 'cat_locale', + 'alias' => 'catlocale', 'type' => 'string', 'label' => 'Locale', - 'sortable' => false, + 'sortable' => true, 'filter' => [ 'function' => 'orWhere', 'condition' => ['ct.locale', app()->getLocale()] @@ -123,24 +114,17 @@ class CategoryDataGrid 'filterable' => [ [ 'column' => 'cat.id', - 'alias' => 'cat_id', + 'alias' => 'catid', 'type' => 'number', - 'label' => 'Category ID', + 'label' => 'ID', ], [ 'column' => 'ct.name', - 'alias' => 'cat_name', + 'alias' => 'catname', 'type' => 'string', - 'label' => 'Category Name', - ], - // [ - // 'column' => 'cta.name', - // 'alias' => 'parentName', - // 'type' => 'string', - // 'label' => 'Parent Name', - // ], - [ + 'label' => 'Name', + ], [ 'column' => 'cat.status', - 'alias' => 'cat_status', + 'alias' => 'catstatus', 'type' => 'string', 'label' => 'Visible in Menu', ], @@ -152,11 +136,11 @@ class CategoryDataGrid [ 'column' => 'cat.id', 'type' => 'number', - 'label' => 'Category ID', + 'label' => 'ID', ], [ 'column' => 'ct.name', 'type' => 'string', - 'label' => 'Category Name', + 'label' => 'Name', ], [ 'column' => 'cat.status', 'type' => 'string', diff --git a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php index eceb562d8..7c6c03280 100644 --- a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php @@ -45,7 +45,7 @@ class ChannelDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really edit this record?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', @@ -68,51 +68,50 @@ class ChannelDataGrid //use aliasing on secodary columns if join is performed 'columns' => [ - [ 'name' => 'id', 'alias' => 'channelID', 'type' => 'number', - 'label' => 'Channel ID', + 'label' => 'ID', 'sortable' => true, - ], - [ + ], [ 'name' => 'code', 'alias' => 'channelCode', 'type' => 'string', - 'label' => 'Channel Code', + 'label' => 'Code', 'sortable' => true, - ], - [ + ], [ 'name' => 'name', 'alias' => 'channelName', 'type' => 'string', - 'label' => 'Channel Name', + 'label' => 'Name', + 'sortable' => true, + ], [ + 'name' => 'hostname', + 'alias' => 'channelHostName', + 'type' => 'string', + 'label' => 'Host Name', 'sortable' => true, ], - ], //don't use aliasing in case of filters - 'filterable' => [ [ 'column' => 'id', 'alias' => 'channelID', 'type' => 'number', - 'label' => 'Channel ID', - ], - [ + 'label' => 'ID', + ], [ 'column' => 'code', 'alias' => 'channelCode', 'type' => 'string', - 'label' => 'Channel Code', - ], - [ + 'label' => 'Code', + ], [ 'column' => 'name', 'alias' => 'channelName', 'type' => 'string', - 'label' => 'Channel Name', + 'label' => 'Name', ], ], @@ -122,12 +121,19 @@ class ChannelDataGrid [ 'column' => 'name', 'type' => 'string', - 'label' => 'Channel Name', - ], - [ + 'label' => 'Name', + ], [ 'column' => 'code', 'type' => 'string', - 'label' => 'Channel Code', + 'label' => 'Code', + ], [ + 'column' => 'hostname', + 'type' => 'string', + 'label' => 'Host Name', + ], [ + 'column' => 'name', + 'type' => 'string', + 'label' => 'Name', ], ], diff --git a/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php index 01abdfe6e..c4eeee72a 100644 --- a/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php @@ -45,12 +45,12 @@ class CountryDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], ], @@ -68,29 +68,25 @@ class CountryDataGrid //use aliasing on secodary columns if join is performed 'columns' => [ - [ 'name' => 'id', 'alias' => 'countryId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, - ], - [ + ], [ 'name' => 'code', 'alias' => 'countryCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, - ], - [ + ], [ 'name' => 'name', 'alias' => 'countryName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, - ], - [ + ], [ 'name' => 'status', 'alias' => 'countryStatus', 'type' => 'number', @@ -101,27 +97,23 @@ class CountryDataGrid ], //don't use aliasing in case of filters - 'filterable' => [ [ 'column' => 'id', 'alias' => 'countryId', 'type' => 'number', 'label' => 'ID', - ], - [ + ], [ 'column' => 'code', 'alias' => 'countryCode', 'type' => 'string', 'label' => 'Code', - ], - [ + ], [ 'column' => 'name', 'alias' => 'countryName', 'type' => 'string', 'label' => 'Name', - ], - [ + ], [ 'column' => 'status', 'alias' => 'countryStatus', 'type' => 'number', @@ -136,12 +128,19 @@ class CountryDataGrid 'column' => 'name', 'type' => 'string', 'label' => 'Name', - ], - [ + ], [ 'column' => 'code', 'type' => 'string', 'label' => 'Code', - ], + ], [ + 'column' => 'name', + 'type' => 'string', + 'label' => 'Name', + ], [ + 'column' => 'status', + 'type' => 'number', + 'label' => 'Code', + ] ], //list of viable operators that will be used diff --git a/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php index 9b4162f46..8d08c4f15 100644 --- a/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php @@ -44,7 +44,7 @@ class CurrencyDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really edit this record?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', @@ -74,15 +74,13 @@ class CurrencyDataGrid 'type' => 'number', 'label' => 'ID', 'sortable' => true, - ], - [ + ], [ 'name' => 'code', 'alias' => 'currencyCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, - ], - [ + ], [ 'name' => 'name', 'alias' => 'currencyName', 'type' => 'string', @@ -100,14 +98,12 @@ class CurrencyDataGrid 'alias' => 'currencyId', 'type' => 'number', 'label' => 'ID', - ], - [ + ], [ 'column' => 'code', 'alias' => 'currencyCode', 'type' => 'string', 'label' => 'Code', - ], - [ + ], [ 'column' => 'name', 'alias' => 'currencyName', 'type' => 'string', @@ -119,11 +115,14 @@ class CurrencyDataGrid 'searchable' => [ [ + 'column' => 'id', + 'alias' => 'currencyId', + 'type' => 'number', + ], [ 'column' => 'name', 'type' => 'string', 'label' => 'Name', - ], - [ + ], [ 'column' => 'code', 'type' => 'string', 'label' => 'Code', diff --git a/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php index d3f0a49b5..960103f1c 100644 --- a/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php @@ -43,12 +43,12 @@ class CustomerDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], ], @@ -71,29 +71,19 @@ class CustomerDataGrid 'type' => 'number', 'label' => 'ID', 'sortable' => true, - ], - [ - 'name' => 'cus.first_name', - 'alias' => 'FirstName', + ], [ + 'name' => 'CONCAT(first_name, " ", last_name)', + 'alias' => 'Name', 'type' => 'string', - 'label' => 'First Name', - 'sortable' => false, - ], - [ - 'name' => 'cus.email', + 'label' => 'Name', + 'sortable' => true, + ], [ + 'name' => 'email', 'alias' => 'Email', 'type' => 'string', 'label' => 'Email', 'sortable' => false, - ], - [ - 'name' => 'cus.phone', - 'alias' => 'Phone', - 'type' => 'number', - 'label' => 'Phone', - 'sortable' => true, - ], - [ + ], [ 'name' => 'cg.name', 'alias' => 'CustomerGroupName', 'type' => 'string', @@ -103,26 +93,18 @@ class CustomerDataGrid ], //don't use aliasing in case of filters - 'filterable' => [ [ 'column' => 'cus.id', 'alias' => 'ID', 'type' => 'number', 'label' => 'ID', - ], - [ - 'column' => 'cus.first_name', - 'alias' => 'FirstName', + ], [ + 'column' => 'email', + 'alias' => 'Email', 'type' => 'string', - 'label' => 'First Name', + 'label' => 'Email', ], - [ - 'column' => 'cg.name', - 'alias' => 'CustomerGroupName', - 'type' => 'string', - 'label' => 'Group Name', - ] ], //don't use aliasing in case of searchables @@ -132,11 +114,10 @@ class CustomerDataGrid 'column' => 'FirstName', 'type' => 'string', 'label' => 'First Name', - ], - [ + ], [ 'column' => 'email', + 'alias' => 'Email', 'type' => 'string', - 'label' => 'Email', ], ], diff --git a/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php index 37649ee86..6ce3070ff 100644 --- a/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php @@ -54,13 +54,13 @@ class CustomerGroupDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really wanis?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], ], @@ -82,8 +82,7 @@ class CustomerGroupDataGrid 'type' => 'number', 'label' => 'ID', 'sortable' => true, - ], - [ + ], [ 'name' => 'cg.name', 'alias' => 'Name', 'type' => 'string', @@ -91,6 +90,7 @@ class CustomerGroupDataGrid 'sortable' => true, ], ], + //don't use aliasing in case of filters 'filterable' => [ [ @@ -98,8 +98,7 @@ class CustomerGroupDataGrid 'alias' => 'Name', 'type' => 'string', 'label' => 'Name' - ], - [ + ], [ 'column' => 'cg.id', 'alias' => 'ID', 'type' => 'number', @@ -112,8 +111,7 @@ class CustomerGroupDataGrid 'column' => 'cg.id', 'type' => 'number', 'label' => 'Id' - ], - [ + ], [ 'column' => 'cg.name', 'type' => 'string', 'label' => 'Name' diff --git a/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php index 67ac589b2..5f2db32b8 100644 --- a/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php @@ -45,7 +45,7 @@ class ExchangeRatesDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really edit this record?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', @@ -85,6 +85,7 @@ class ExchangeRatesDataGrid 'alias' => 'exchrate', 'type' => 'string', 'label' => 'Exchange Rate', + 'sortable' => true ], ], @@ -100,6 +101,11 @@ class ExchangeRatesDataGrid 'alias' => 'exchcurrname', 'type' => 'string', 'label' => 'Currency Name', + ], [ + 'column' => 'cer.rate', + 'alias' => 'exchrate', + 'type' => 'string', + 'label' => 'Exchange Rate', ], ], @@ -109,6 +115,10 @@ class ExchangeRatesDataGrid 'column' => 'exchcurrname', 'type' => 'string', 'label' => 'Currency Name', + ], [ + 'column' => 'cer.rate', + 'type' => 'string', + 'label' => 'Exchange Rate', ], ], diff --git a/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php index 8dcf9bfe6..ca40fe7b6 100644 --- a/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php @@ -43,7 +43,7 @@ class InventorySourcesDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.edit'), - 'confirm_text' => 'Do you really edit this record?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', @@ -77,13 +77,13 @@ class InventorySourcesDataGrid 'alias' => 'inventoryCode', 'type' => 'string', 'label' => 'Code', - 'sortable' => false, + 'sortable' => true, ], [ 'name' => 'name', 'alias' => 'inventoryName', 'type' => 'string', 'label' => 'Name', - 'sortable' => false, + 'sortable' => true, ], [ 'name' => 'priority', 'alias' => 'inventoryPriority', @@ -114,14 +114,12 @@ class InventorySourcesDataGrid 'alias' => 'inventoryID', 'type' => 'number', 'label' => 'ID', - ], - [ + ], [ 'column' => 'code', 'alias' => 'inventoryCode', 'type' => 'string', 'label' => 'Code', - ], - [ + ], [ 'column' => 'name', 'alias' => 'inventoryName', 'type' => 'string', @@ -136,11 +134,14 @@ class InventorySourcesDataGrid 'column' => 'name', 'type' => 'string', 'label' => 'Name', - ], - [ + ], [ 'column' => 'code', 'type' => 'string', 'label' => 'Code', + ], [ + 'column' => 'name', + 'type' => 'string', + 'label' => 'Name', ], ], diff --git a/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php index c134a0f88..60dc9444a 100644 --- a/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php @@ -44,7 +44,7 @@ class LocalesDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really edit this record?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', @@ -64,25 +64,21 @@ class LocalesDataGrid // ] ], - //use aliasing on secodary columns if join is performed - + //use aliasing as attribute 'columns' => [ - [ 'name' => 'id', 'alias' => 'localeId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, - ], - [ + ], [ 'name' => 'code', 'alias' => 'localeCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, - ], - [ + ], [ 'name' => 'name', 'alias' => 'localeName', 'type' => 'string', @@ -93,21 +89,18 @@ class LocalesDataGrid ], //don't use aliasing in case of filters - 'filterable' => [ [ 'column' => 'id', 'alias' => 'localeId', 'type' => 'number', 'label' => 'ID', - ], - [ + ], [ 'column' => 'code', 'alias' => 'localeCode', 'type' => 'string', 'label' => 'Code', - ], - [ + ], [ 'column' => 'name', 'alias' => 'localeName', 'type' => 'string', @@ -116,14 +109,12 @@ class LocalesDataGrid ], //don't use aliasing in case of searchables - 'searchable' => [ [ 'column' => 'name', 'type' => 'string', 'label' => 'Name', - ], - [ + ], [ 'column' => 'code', 'type' => 'string', 'label' => 'Code', diff --git a/packages/Webkul/Admin/src/DataGrids/NewsLetterDataGrid.php b/packages/Webkul/Admin/src/DataGrids/NewsLetterDataGrid.php new file mode 100644 index 000000000..dc94780b2 --- /dev/null +++ b/packages/Webkul/Admin/src/DataGrids/NewsLetterDataGrid.php @@ -0,0 +1,139 @@ + @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class NewsLetterDataGrid +{ + /** + * The Data Grid implementation. + * + * @var newsletterDataGrid + * for orders + */ + public function newsLetterDataGrid() + { + + return DataGrid::make([ + 'name' => 'Subscriberslist', + 'table' => 'subscribers_list as sublist', + 'select' => 'sublist.id', + 'perpage' => 10, + 'aliased' => false, + //True in case of joins else aliasing key required on all cases + + 'massoperations' =>[ + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], + ], + + 'actions' => [ + [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to delete this record?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [], + + //use aliasing on secodary columns if join is performed + 'columns' => [ + [ + 'name' => 'sublist.id', + 'alias' => 'subid', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true + ], [ + 'name' => 'sublist.is_subscribed', + 'alias' => 'issubs', + 'type' => 'string', + 'label' => 'Subscribed', + 'sortable' => true, + 'wrapper' => function ($value) { + if($value == 0) + return "False"; + else + return "True"; + }, + ], [ + 'name' => 'sublist.email', + 'alias' => 'subsemail', + 'type' => 'string', + 'label' => 'Email', + 'sortable' => true + ] + ], + + 'filterable' => [ + [ + 'column' => 'sublist.id', + 'alias' => 'subid', + 'type' => 'number', + 'label' => 'ID', + ], [ + 'column' => 'sublist.is_subscribed', + 'alias' => 'issubs', + 'type' => 'string', + 'label' => 'Subscribed', + ], [ + 'column' => 'sublist.email', + 'alias' => 'subsemail', + 'type' => 'string', + 'label' => 'Email', + ] + ], + //don't use aliasing in case of searchables + + 'searchable' => [ + [ + 'column' => 'sublist.id', + 'type' => 'number', + 'label' => 'ID', + ], [ + 'column' => 'sublist.is_subscribed', + 'type' => 'string', + 'label' => 'Subscribed', + ], [ + 'column' => 'sublist.email', + 'type' => 'string', + 'label' => 'Email', + ] + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + ]); + } + + public function render() + { + return $this->newsLetterDataGrid()->render(); + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php index d927d59e6..59674fd0b 100644 --- a/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php @@ -44,7 +44,7 @@ class OrderDataGrid [ 'type' => 'View', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to view this record?', 'icon' => 'icon pencil-lg-icon', ], // [ @@ -92,16 +92,23 @@ class OrderDataGrid } ], [ 'name' => 'or.created_at', - 'alias' => 'created_at', + 'alias' => 'createdat', 'type' => 'string', 'label' => 'Order Date', - 'sortable' => false, + 'sortable' => true, + ], [ + 'name' => 'or.channel_name', + 'alias' => 'channelname', + 'type' => 'string', + 'label' => 'Channel Name', + 'sortable' => true, ], [ 'name' => 'or.status', 'alias' => 'orstatus', 'type' => 'string', 'label' => 'Status', 'sortable' => true, + 'closure' => true, //to be used when ever wrappers or callables are used 'wrapper' => function ($value) { if($value == 'processing') return 'Processing'; @@ -128,11 +135,11 @@ class OrderDataGrid 'type' => 'number', 'label' => 'ID', ], [ - 'name' => 'or.status', + 'column' => 'or.status', 'alias' => 'orstatus', 'type' => 'string', 'label' => 'Status' - ] + ], ], //don't use aliasing in case of searchables @@ -141,12 +148,10 @@ class OrderDataGrid 'column' => 'or.id', 'alias' => 'orderid', 'type' => 'number', - 'label' => 'ID', ], [ - 'name' => 'or.status', + 'column' => 'or.status', 'alias' => 'orstatus', 'type' => 'string', - 'label' => 'Status' ] ], diff --git a/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php index f98f24d6a..25aaf8853 100644 --- a/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php @@ -43,7 +43,7 @@ class OrderInvoicesDataGrid [ 'type' => 'View', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to view this record?', 'icon' => 'icon pencil-lg-icon', ], // [ @@ -55,13 +55,13 @@ class OrderInvoicesDataGrid ], 'join' => [ - [ - 'join' => 'leftjoin', - 'table' => 'orders as ors', - 'primaryKey' => 'inv.order_id', - 'condition' => '=', - 'secondaryKey' => 'ors.id', - ] + // [ + // 'join' => 'leftjoin', + // 'table' => 'orders as ors', + // 'primaryKey' => 'inv.order_id', + // 'condition' => '=', + // 'secondaryKey' => 'ors.id', + // ] ], //use aliasing on secodary columns if join is performed @@ -79,24 +79,26 @@ class OrderInvoicesDataGrid 'type' => 'number', 'label' => 'Order ID', 'sortable' => true - ], [ - 'name' => 'inv.state', - 'alias' => 'invstate', - 'type' => 'string', - 'label' => 'State', - 'sortable' => false - ], [ + ], + // [ + // 'name' => 'inv.state', + // 'alias' => 'invstate', + // 'type' => 'string', + // 'label' => 'State', + // 'sortable' => false + // ], + [ 'name' => 'inv.grand_total', 'alias' => 'invgrandtotal', 'type' => 'number', 'label' => 'Amount', - 'sortable' => false + 'sortable' => true ], [ 'name' => 'inv.created_at', 'alias' => 'invcreated_at', 'type' => 'date', 'label' => 'Invoice Date', - 'sortable' => false + 'sortable' => true ] ], diff --git a/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php index 8e97e58ac..51b3b0c70 100644 --- a/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php @@ -43,7 +43,7 @@ class OrderShipmentsDataGrid [ 'type' => 'View', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to view this record?', 'icon' => 'icon pencil-lg-icon', ], ], @@ -68,19 +68,19 @@ class OrderShipmentsDataGrid 'sortable' => true ], [ 'name' => 'ship.order_id', - 'alias' => 'order_id', + 'alias' => 'orderid', 'type' => 'number', 'label' => 'Order ID', 'sortable' => true ], [ 'name' => 'ship.total_qty', - 'alias' => 'total_qty', + 'alias' => 'shiptotalqty', 'type' => 'number', 'label' => 'Total Quantity', 'sortable' => true ], [ 'name' => 'CONCAT(ors.customer_first_name, " ", ors.customer_last_name)', - 'alias' => 'order_customer_first_name', + 'alias' => 'ordercustomerfirstname', 'type' => 'string', 'label' => 'Customer Name', 'sortable' => false, @@ -92,7 +92,7 @@ class OrderShipmentsDataGrid 'sortable' => true ], [ 'name' => 'ship.created_at', - 'alias' => 'ship_date', + 'alias' => 'shipdate', 'type' => 'string', 'label' => 'Shipment Date', 'sortable' => false @@ -111,10 +111,9 @@ class OrderShipmentsDataGrid 'searchable' => [ // [ - // 'column' => 'or.id', - // 'alias' => 'orderid', - // 'type' => 'number', - // 'label' => 'ID', + // 'column' => 'ors.customer_first_name', + // 'alias' => 'ordercustomerfirstname', + // 'type' => 'string', // ] ], diff --git a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php index 27df69211..28b3f86fd 100644 --- a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php @@ -37,12 +37,12 @@ class ProductDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], ], @@ -71,19 +71,19 @@ class ProductDataGrid 'alias' => 'ProductName', 'type' => 'string', 'label' => 'Name', - 'sortable' => false, + 'sortable' => true, ], [ 'name' => 'prods.type', 'alias' => 'ProductType', 'type' => 'string', 'label' => 'Type', - 'sortable' => false, + 'sortable' => true, ], [ 'name' => 'prods.status', 'alias' => 'ProductStatus', 'type' => 'string', 'label' => 'Status', - 'sortable' => false, + 'sortable' => true, 'wrapper' => function ($value) { if($value == 1) return 'Active'; @@ -95,16 +95,22 @@ class ProductDataGrid 'alias' => 'ProductPrice', 'type' => 'string', 'label' => 'Price', - 'sortable' => false, + 'sortable' => true, 'wrapper' => function ($value) { return core()->formatBasePrice($value); }, + ], [ + 'name' => 'prods.attribute_family_name', + 'alias' => 'productattributefamilyname', + 'type' => 'string', + 'label' => 'Attribute Family', + 'sortable' => true, ], [ 'name' => 'prods.quantity', 'alias' => 'ProductQuantity', 'type' => 'string', 'label' => 'Product Quantity', - 'sortable' => false, + 'sortable' => true, ], ], diff --git a/packages/Webkul/Admin/src/DataGrids/ProductReviewDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ProductReviewDataGrid.php index 5b6c3ce87..0e7bfb76b 100644 --- a/packages/Webkul/Admin/src/DataGrids/ProductReviewDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ProductReviewDataGrid.php @@ -46,12 +46,12 @@ class ProductReviewDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], ], @@ -69,7 +69,6 @@ class ProductReviewDataGrid //use aliasing on secodary columns if join is performed 'columns' => [ - [ 'name' => 'pr.id', 'alias' => 'reviewId', @@ -88,20 +87,19 @@ class ProductReviewDataGrid 'type' => 'string', 'label' => 'Comment', 'sortable' => true, - ], - [ + ], [ 'name' => 'pt.name', 'alias' => 'productName', 'type' => 'string', 'label' => 'Product Name', 'sortable' => true, - ], - [ + ], [ 'name' => 'pr.status', 'alias' => 'reviewStatus', 'type' => 'number', 'label' => 'Status', 'sortable' => true, + 'closure' => true, 'wrapper' => function ($value) { if($value == 'approved') return 'Approved'; @@ -133,7 +131,7 @@ class ProductReviewDataGrid 'alias' => 'productName', 'type' => 'string', 'label' => 'Product Name', - ],[ + ], [ 'column' => 'pr.status', 'alias' => 'reviewStatus', 'type' => 'string', @@ -151,6 +149,10 @@ class ProductReviewDataGrid 'column' => 'rating', 'type' => 'number', 'label' => 'Rating', + ], [ + 'column' => 'pt.name', + 'alias' => 'productName', + 'type' => 'string', ], ], diff --git a/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php index 0d36da193..82fdf957d 100644 --- a/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php @@ -45,7 +45,7 @@ class RolesDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really edit this record?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', diff --git a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php index 1bd679e15..0a4b9cfd2 100644 --- a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php @@ -44,7 +44,7 @@ class SliderDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really edit this record?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', @@ -78,13 +78,7 @@ class SliderDataGrid 'alias' => 'sliderTitle', 'type' => 'string', 'label' => 'title', - 'sortable' => false - ], [ - 'name' => 's.channel_id', - 'alias' => 'channelId', - 'type' => 'string', - 'label' => 'Channel ID', - 'sortable' => false, + 'sortable' => true ], [ 'name' => 'c.name', 'alias' => 'channelName', @@ -106,7 +100,12 @@ class SliderDataGrid 'alias' => 'sliderTitle', 'type' => 'string', 'label' => 'title' - ], + ], [ + 'column' => 'c.name', + 'alias' => 'channelName', + 'type' => 'string', + 'label' => 'Channel Name', + ] ], //don't use aliasing in case of searchables @@ -119,6 +118,10 @@ class SliderDataGrid 'column' => 's.title', 'type' => 'string', 'label' => 'Slider Title' + ], [ + 'column' => 'c.name', + 'type' => 'string', + 'label' => 'Channel Name', ] ], diff --git a/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php index de19cc205..f4eef1910 100644 --- a/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php @@ -54,13 +54,13 @@ class TaxCategoryDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really wanis?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], ], @@ -82,18 +82,13 @@ class TaxCategoryDataGrid 'type' => 'number', 'label' => 'ID', 'sortable' => true, - ], - [ + ], [ 'name' => 'tr.name', 'alias' => 'Name', 'type' => 'string', 'label' => 'Name', 'sortable' => true, - // 'wrapper' => function ($value, $object) { - // return '' . $object->Name . ''; - // }, - ], - [ + ], [ 'name' => 'tr.code', 'alias' => 'code', 'type' => 'string', @@ -101,6 +96,7 @@ class TaxCategoryDataGrid 'sortable' => true, ], ], + //don't use aliasing in case of filters 'filterable' => [ [ @@ -108,28 +104,26 @@ class TaxCategoryDataGrid 'alias' => 'ID', 'type' => 'number', 'label' => 'ID' - ], - [ + ], [ 'column' => 'tr.name', 'alias' => 'Name', 'type' => 'string', 'label' => 'Name' - ], - [ + ], [ 'column' => 'tr.code', 'alias' => 'code', 'type' => 'string', 'label' => 'Code' ] ], + //don't use aliasing in case of searchables 'searchable' => [ [ 'column' => 'tr.code', 'type' => 'string', 'label' => 'Code' - ], - [ + ], [ 'column' => 'tr.name', 'type' => 'string', 'label' => 'Name' diff --git a/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php b/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php index b94780144..d6f8eb1c7 100644 --- a/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php @@ -53,13 +53,13 @@ class TaxRateDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really wanis?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], ], @@ -73,8 +73,7 @@ class TaxRateDataGrid 'type' => 'number', 'label' => 'ID', 'sortable' => true, - ], - [ + ], [ 'name' => 'tr.identifier', 'alias' => 'identifier', 'type' => 'string', @@ -83,25 +82,21 @@ class TaxRateDataGrid // 'wrapper' => function ($value, $object) { // return '' . $object->identifier . ''; // }, - ], - [ + ], [ 'name' => 'tr.state', 'alias' => 'state', 'type' => 'string', 'label' => 'State', 'sortable' => true, - ], - [ + ], [ 'name' => 'tr.country', 'alias' => 'country', 'type' => 'string', 'label' => 'Country', 'sortable' => true, - ], - - [ + ], [ 'name' => 'tr.tax_rate', - 'alias' => 'tax_rate', + 'alias' => 'taxrate', 'type' => 'number', 'label' => 'Tax Rate', 'sortable' => true, @@ -131,7 +126,7 @@ class TaxRateDataGrid 'label' => 'Country', ], [ 'column' => 'tr.tax_rate', - 'alias' => 'tax_rate', + 'alias' => 'taxrate', 'type' => 'number', 'label' => 'Tax Rate', ], @@ -142,6 +137,18 @@ class TaxRateDataGrid 'column' => 'tr.identifier', 'type' => 'string', 'label' => 'Identifier', + ], [ + 'column' => 'tr.state', + 'type' => 'string', + 'label' => 'State', + ], [ + 'column' => 'tr.country', + 'type' => 'string', + 'label' => 'Country', + ], [ + 'column' => 'tr.tax_rate', + 'type' => 'number', + 'label' => 'Tax Rate', ], ], 'operators' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php index c1928ae3f..d8cfe0b45 100644 --- a/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php @@ -56,13 +56,13 @@ class UserDataGrid [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really wanis?', + 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', + 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], ], @@ -84,51 +84,55 @@ class UserDataGrid 'type' => 'string', 'label' => 'Admin ID', 'sortable' => true, - 'wrapper' => function ($value, $object) { - return '' . $object->ID . ''; - }, - ], - [ + // 'wrapper' => function ($value, $object) { + // return '' . $object->ID . ''; + // }, + ], [ 'name' => 'u.name', 'alias' => 'Name', 'type' => 'string', 'label' => 'Name', 'sortable' => true, - 'wrapper' => function ($value, $object) { - return '' . $object->Name . ''; - }, - ], - [ + // 'wrapper' => function ($value, $object) { + // return '' . $object->Name . ''; + // }, + ], [ 'name' => 'u.email', 'alias' => 'Email', 'type' => 'string', 'label' => 'Email', 'sortable' => true, - ], - [ + ], [ 'name' => 'r.name', - 'alias' => 'xa', + 'alias' => 'rolename', 'type' => 'string', 'label' => 'Role Name', 'sortable' => true, ], - ], //don't use aliasing in case of filters 'filterable' => [ - [ - 'column' => 'u.name', - 'alias' => 'Name', - 'type' => 'string', - 'label' => 'Name' - ], [ 'column' => 'u.id', 'alias' => 'ID', 'type' => 'number', 'label' => 'Admin ID' - ], - + ], [ + 'column' => 'u.name', + 'alias' => 'Name', + 'type' => 'string', + 'label' => 'Name' + ], [ + 'column' => 'u.email', + 'alias' => 'Email', + 'type' => 'string', + 'label' => 'Email', + ], [ + 'column' => 'r.name', + 'alias' => 'rolename', + 'type' => 'string', + 'label' => 'Role Name', + ] ], //don't use aliasing in case of searchables 'searchable' => [ @@ -140,6 +144,14 @@ class UserDataGrid 'column' => 'u.name', 'type' => 'string', 'label' => 'Name' + ], [ + 'column' => 'u.email', + 'type' => 'string', + 'label' => 'Email', + ], [ + 'column' => 'r.name', + 'type' => 'string', + 'label' => 'Role Name', ] ], 'operators' => [ diff --git a/packages/Webkul/Admin/src/Http/routes.php b/packages/Webkul/Admin/src/Http/routes.php index c6d3f8589..710ea06f1 100644 --- a/packages/Webkul/Admin/src/Http/routes.php +++ b/packages/Webkul/Admin/src/Http/routes.php @@ -459,22 +459,29 @@ Route::group(['middleware' => ['web']], function () { Route::put('/account', 'Webkul\User\Http\Controllers\AccountController@update')->name('admin.account.update'); //API Authorizations - Route::get('/api/clients', 'Webkul\Admin\Http\Controllers\AuthorizationController@show')->defaults('_config', [ - 'view' => 'admin::apiauth.client' - ])->name('admin.index.oauth.client'); + // Route::get('/api/clients', 'Webkul\Admin\Http\Controllers\AuthorizationController@show')->defaults('_config', [ + // 'view' => 'admin::apiauth.client' + // ])->name('admin.index.oauth.client'); - //view an OAuth API Client - Route::get('/api/clients/view/{id}', 'Webkul\Admin\Http\Controllers\AuthorizationController@view')->defaults('_config', [ - 'view' => 'admin::apiauth.view' - ])->name('admin.view.oauth.client'); + // //view an OAuth API Client + // Route::get('/api/clients/view/{id}', 'Webkul\Admin\Http\Controllers\AuthorizationController@view')->defaults('_config', [ + // 'view' => 'admin::apiauth.view' + // ])->name('admin.view.oauth.client'); - //edit an OAuth API Client - Route::get('/api/clients/delete/{id}', 'Webkul\Admin\Http\Controllers\AuthorizationController@delete')->defaults('_config', [ - 'view' => 'admin::apiauth.edit' - ])->name('admin.delete.oauth.client'); + // //edit an OAuth API Client + // Route::get('/api/clients/delete/{id}', 'Webkul\Admin\Http\Controllers\AuthorizationController@delete')->defaults('_config', [ + // 'view' => 'admin::apiauth.edit' + // ])->name('admin.delete.oauth.client'); // Admin Store Front Settings Route + Route::get('/subscribers','Webkul\Core\Http\Controllers\SubscriptionController@index')->defaults('_config',[ + 'view' => 'admin::settings.subscribers.index' + ])->name('admin.subscribers.index'); + + //destroy a newsletter subscription item + Route::get('subscribers/delete/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@destroy'); + //slider index Route::get('/slider','Webkul\Shop\Http\Controllers\SliderController@index')->defaults('_config',[ 'view' => 'admin::settings.sliders.index' diff --git a/packages/Webkul/Admin/src/Listeners/Product.php b/packages/Webkul/Admin/src/Listeners/Product.php index eb40c580c..cbe1b54b9 100644 --- a/packages/Webkul/Admin/src/Listeners/Product.php +++ b/packages/Webkul/Admin/src/Listeners/Product.php @@ -64,7 +64,7 @@ class Product { 'product_id' => $product->id, 'sku' => $product->sku, 'type' => $product->type, - 'attribute_family_name' => 'default', + 'attribute_family_name' => $product->toArray()['attribute_family']['name'], 'name' => $product->name, 'quantity' => 0, 'status' => $product->status, @@ -83,7 +83,7 @@ class Product { 'product_id' => $variant->id, 'sku' => $variant->sku, 'type' => $variant->type, - 'attibute_family_name' => 'default', + 'attribute_family_name' => $variant->toArray()['attribute_family']['name'], 'name' => $variant->name, 'quantity' => 0, 'status' => $variant->status, @@ -133,7 +133,7 @@ class Product { 'product_id' => $product->id, 'sku' => $product->sku, 'type' => $product->type, - 'attribute_family_name' => 'default', + 'attribute_family_name' => $product->toArray()['attribute_family']['name'], 'name' => $product->name, 'status' => $product->status, ]; @@ -162,7 +162,7 @@ class Product { 'product_id' => $variant->id, 'sku' => $variant->sku, 'type' => $variant->type, - 'attibute_family_name' => 'name', + 'attribute_family_name' => $variant->toArray()['attribute_family']['name'], 'name' => $variant->name, 'status' => $variant->status, 'price' => $variant->price, @@ -188,7 +188,7 @@ class Product { 'product_id' => $variant->id, 'sku' => $variant->sku, 'type' => $variant->type, - 'attibute_family_name' => 'default', + 'attribute_family_name' => $variant->toArray()['attribute_family']['name'], 'name' => $variant->name, 'status' => $variant->status, 'price' => $variant->price, diff --git a/packages/Webkul/Admin/src/Providers/EventServiceProvider.php b/packages/Webkul/Admin/src/Providers/EventServiceProvider.php index ba6f5da1a..0e2283949 100644 --- a/packages/Webkul/Admin/src/Providers/EventServiceProvider.php +++ b/packages/Webkul/Admin/src/Providers/EventServiceProvider.php @@ -108,7 +108,7 @@ class EventServiceProvider extends ServiceProvider 'route' => 'admin.account.edit', 'sort' => 1, 'icon-class' => '', - ], + ], // [ // 'key' => 'configuration.sales', // 'name' => 'Sales', @@ -121,7 +121,7 @@ class EventServiceProvider extends ServiceProvider // 'route' => 'admin.configuration.sales.general', // 'sort' => 1, // 'icon-class' => '', - // ], + // ], [ 'key' => 'settings', 'name' => 'Settings', @@ -200,6 +200,12 @@ class EventServiceProvider extends ServiceProvider 'route' => 'admin.tax-rates.index', 'sort' => 2, 'icon-class' => '', + ], [ + 'key' => 'settings.subscribers', + 'name' => 'Newsletter Subscription', + 'route' => 'admin.subscribers.index', + 'sort' => 9, + 'icon-class' => '', ], ]; @@ -276,11 +282,11 @@ class EventServiceProvider extends ServiceProvider $acl->add('catalog.attributes', 'Attributes', 'admin.catalog.attributes.index', 3); $acl->add('catalog.families', 'Families', 'admin.catalog.families.index', 4); - + $acl->add('customers', 'Customers', 'admin.customers.index', 4); $acl->add('customers.customers', 'Customers', 'admin.customers.index', 1); - + $acl->add('customers.groups', 'Groups', 'admin.groups.index', 2); $acl->add('customers.reviews', 'Reviews', 'admin.customers.reviews.index', 3); diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 3aa3437ef..5eeb27264 100644 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -499,6 +499,10 @@ return [ 'delete' => 'Tax Rate Deleted Successfully', 'atleast-one' => 'Cannot Delete Last Tax Rate' ], + + 'subscribers' => [ + 'title' => 'News Letter Subscribers' + ] ], 'customers' => [ diff --git a/packages/Webkul/Admin/src/Resources/views/settings/subscribers/index.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/subscribers/index.blade.php new file mode 100644 index 000000000..148538b95 --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/settings/subscribers/index.blade.php @@ -0,0 +1,28 @@ +@extends('admin::layouts.content') + +@section('page_title') + {{ __('admin::app.settings.subscribers.title') }} +@stop + +@section('content') + + +