Skip to content

Commit

Permalink
Merge branch 'master' into product-custom-options
Browse files Browse the repository at this point in the history
  • Loading branch information
devansh-webkul committed Dec 17, 2024
2 parents 4174214 + 1980a68 commit f9082b6
Show file tree
Hide file tree
Showing 158 changed files with 2,739 additions and 2,139 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"pusher/pusher-php-server": "^7.0",
"shetabit/visitor": "^4.1",
"spatie/laravel-responsecache": "^7.4",
"spatie/laravel-sitemap": "^7.2"
"spatie/laravel-sitemap": "^7.3"
},
"require-dev": {
"bagisto/laravel-datafaker": "2.2.*",
Expand Down
1,792 changes: 1,042 additions & 750 deletions composer.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions config/repository.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
|--------------------------------------------------------------------------
| Prettus Repository Config
Expand Down
2 changes: 1 addition & 1 deletion packages/Webkul/Admin/src/Config/acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
[
'key' => 'catalog',
'name' => 'admin::app.acl.catalog',
'route' => 'admin.catalog.index',
'route' => 'admin.catalog.products.index',
'sort' => 3,
], [
'key' => 'catalog.products',
Expand Down
6 changes: 3 additions & 3 deletions packages/Webkul/Admin/src/Config/system.php
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@
'name' => 'street_lines',
'title' => 'admin::app.configuration.index.customer.address.information.street-lines',
'type' => 'text',
'validation' => 'between:1,4',
'validation' => 'between:1,4|integer',
'channel_based' => true,
'default_value' => 1,
],
Expand Down Expand Up @@ -1499,7 +1499,7 @@
'title' => 'admin::app.configuration.index.sales.shipping-methods.flat-rate-shipping.rate',
'type' => 'text',
'depends' => 'active:1',
'validation' => 'required_if:active,1',
'validation' => 'required_if:active,1|numeric',
'channel_based' => true,
'locale_based' => false,
], [
Expand Down Expand Up @@ -2014,7 +2014,7 @@
'name' => 'invoice_number_length',
'title' => 'admin::app.configuration.index.sales.invoice-settings.invoice-number.length',
'type' => 'text',
'validation' => 'numeric',
'validation' => 'numeric|min:0|max:10',
'channel_based' => true,
'locale_based' => true,
], [
Expand Down
32 changes: 24 additions & 8 deletions packages/Webkul/Admin/src/DataGrids/Catalog/AttributeDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,12 @@ public function prepareColumns()
'searchable' => true,
'filterable' => true,
'sortable' => true,
'closure' => function ($value) {
return trans('admin::app.catalog.attributes.index.datagrid.'.($value->is_required ? 'true' : 'false'));
'closure' => function ($row) {
if ($row->is_required) {
return trans('admin::app.catalog.attributes.index.datagrid.true');
}

return trans('admin::app.catalog.attributes.index.datagrid.false');
},
]);

Expand All @@ -137,8 +141,12 @@ public function prepareColumns()
'searchable' => true,
'filterable' => true,
'sortable' => true,
'closure' => function ($value) {
return trans('admin::app.catalog.attributes.index.datagrid.'.($value->is_unique ? 'true' : 'false'));
'closure' => function ($row) {
if ($row->is_unique) {
return trans('admin::app.catalog.attributes.index.datagrid.true');
}

return trans('admin::app.catalog.attributes.index.datagrid.false');
},
]);

Expand All @@ -149,8 +157,12 @@ public function prepareColumns()
'searchable' => true,
'filterable' => true,
'sortable' => true,
'closure' => function ($value) {
return trans('admin::app.catalog.attributes.index.datagrid.'.($value->value_per_locale ? 'true' : 'false'));
'closure' => function ($row) {
if ($row->value_per_locale) {
return trans('admin::app.catalog.attributes.index.datagrid.true');
}

return trans('admin::app.catalog.attributes.index.datagrid.false');
},
]);

Expand All @@ -161,8 +173,12 @@ public function prepareColumns()
'searchable' => true,
'filterable' => true,
'sortable' => true,
'closure' => function ($value) {
return trans('admin::app.catalog.attributes.index.datagrid.'.($value->value_per_channel ? 'true' : 'false'));
'closure' => function ($row) {
if ($row->value_per_channel) {
return trans('admin::app.catalog.attributes.index.datagrid.true');
}

return trans('admin::app.catalog.attributes.index.datagrid.false');
},
]);

Expand Down
18 changes: 14 additions & 4 deletions packages/Webkul/Admin/src/DataGrids/Catalog/CategoryDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,20 @@ public function prepareColumns()
]);

$this->addColumn([
'index' => 'status',
'label' => trans('admin::app.catalog.categories.index.datagrid.status'),
'type' => 'boolean',
'filterable' => true,
'index' => 'status',
'label' => trans('admin::app.catalog.categories.index.datagrid.status'),
'type' => 'boolean',
'filterable' => true,
'filterable_options' => [
[
'label' => trans('admin::app.catalog.categories.index.datagrid.active'),
'value' => 1,
],
[
'label' => trans('admin::app.catalog.categories.index.datagrid.inactive'),
'value' => 0,
],
],
'sortable' => true,
'closure' => function ($value) {
if ($value->status) {
Expand Down
18 changes: 14 additions & 4 deletions packages/Webkul/Admin/src/DataGrids/Catalog/ProductDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,20 @@ public function prepareColumns()
]);

$this->addColumn([
'index' => 'status',
'label' => trans('admin::app.catalog.products.index.datagrid.status'),
'type' => 'boolean',
'filterable' => true,
'index' => 'status',
'label' => trans('admin::app.catalog.products.index.datagrid.status'),
'type' => 'boolean',
'filterable' => true,
'filterable_options' => [
[
'label' => trans('admin::app.catalog.products.index.datagrid.active'),
'value' => 1,
],
[
'label' => trans('admin::app.catalog.products.index.datagrid.disable'),
'value' => 0,
],
],
'sortable' => true,
]);

Expand Down
18 changes: 14 additions & 4 deletions packages/Webkul/Admin/src/DataGrids/Customers/CustomerDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,20 @@ public function prepareColumns()
]);

$this->addColumn([
'index' => 'status',
'label' => trans('admin::app.customers.customers.index.datagrid.status'),
'type' => 'boolean',
'filterable' => true,
'index' => 'status',
'label' => trans('admin::app.customers.customers.index.datagrid.status'),
'type' => 'boolean',
'filterable' => true,
'filterable_options' => [
[
'label' => trans('admin::app.customers.customers.index.datagrid.active'),
'value' => 1,
],
[
'label' => trans('admin::app.customers.customers.index.datagrid.inactive'),
'value' => 0,
],
],
'sortable' => true,
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,22 @@ public function prepareColumns()
]);

$this->addColumn([
'index' => 'status',
'label' => trans('admin::app.marketing.communications.campaigns.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'sortable' => true,
'filterable' => true,
'index' => 'status',
'label' => trans('admin::app.marketing.communications.campaigns.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'sortable' => true,
'filterable' => true,
'filterable_options' => [
[
'label' => trans('admin::app.marketing.communications.campaigns.index.datagrid.active'),
'value' => 1,
],
[
'label' => trans('admin::app.marketing.communications.campaigns.index.datagrid.inactive'),
'value' => 0,
],
],
'closure' => function ($value) {
if ($value->status) {
return trans('admin::app.marketing.communications.campaigns.index.datagrid.active');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,26 @@ public function prepareColumns()
]);

$this->addColumn([
'index' => 'status',
'label' => trans('admin::app.marketing.communications.templates.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'filterable' => true,
'index' => 'status',
'label' => trans('admin::app.marketing.communications.templates.index.datagrid.status'),
'type' => 'string',
'searchable' => true,
'filterable' => true,
'filterable_type' => 'dropdown',
'filterable_options' => [
[
'label' => trans('admin::app.marketing.communications.templates.index.datagrid.active'),
'value' => 'active',
],
[
'label' => trans('admin::app.marketing.communications.templates.index.datagrid.inactive'),
'value' => 'inactive',
],
[
'label' => trans('admin::app.marketing.communications.templates.index.datagrid.draft'),
'value' => 'draft',
],
],
'sortable' => true,
'closure' => function ($value) {
if ($value->status == 'active') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,28 @@ public function prepareColumns()
]);

$this->addColumn([
'index' => 'status',
'label' => trans('admin::app.marketing.promotions.cart-rules.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'filterable' => true,
'index' => 'status',
'label' => trans('admin::app.marketing.promotions.cart-rules.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'filterable' => true,
'filterable_options' => [
[
'label' => trans('admin::app.marketing.promotions.cart-rules.index.datagrid.active'),
'value' => 1,
],
[
'label' => trans('admin::app.marketing.promotions.cart-rules.index.datagrid.inactive'),
'value' => 0,
],
],
'sortable' => true,
'closure' => function ($value) {
if ($value->status == 1) {
return trans('admin::app.marketing.promotions.cart-rules.index.datagrid.active');
} elseif ($value->status == 0) {
return trans('admin::app.marketing.promotions.cart-rules.index.datagrid.inactive');
}

return trans('admin::app.marketing.promotions.cart-rules.index.datagrid.draft');
return trans('admin::app.marketing.promotions.cart-rules.index.datagrid.inactive');
},
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,21 @@ public function prepareColumns()
]);

$this->addColumn([
'index' => 'status',
'label' => trans('admin::app.marketing.promotions.catalog-rules.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'filterable' => true,
'index' => 'status',
'label' => trans('admin::app.marketing.promotions.catalog-rules.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'filterable' => true,
'filterable_options' => [
[
'label' => trans('admin::app.marketing.promotions.catalog-rules.index.datagrid.active'),
'value' => 1,
],
[
'label' => trans('admin::app.marketing.promotions.catalog-rules.index.datagrid.inactive'),
'value' => 0,
],
],
'sortable' => true,
'closure' => function ($value) {
if ($value->status) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,21 @@ public function prepareColumns()
]);

$this->addColumn([
'index' => 'status',
'label' => trans('admin::app.settings.inventory-sources.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'filterable' => true,
'index' => 'status',
'label' => trans('admin::app.settings.inventory-sources.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'filterable' => true,
'filterable_options' => [
[
'label' => trans('admin::app.settings.inventory-sources.index.datagrid.active'),
'value' => 1,
],
[
'label' => trans('admin::app.settings.inventory-sources.index.datagrid.inactive'),
'value' => 0,
],
],
'sortable' => true,
'closure' => function ($value) {
if ($value->status) {
Expand Down
20 changes: 15 additions & 5 deletions packages/Webkul/Admin/src/DataGrids/Settings/UserDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,21 @@ public function prepareColumns()
]);

$this->addColumn([
'index' => 'status',
'label' => trans('admin::app.settings.users.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'filterable' => true,
'index' => 'status',
'label' => trans('admin::app.settings.users.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'filterable' => true,
'filterable_options' => [
[
'label' => trans('admin::app.settings.users.index.datagrid.active'),
'value' => 1,
],
[
'label' => trans('admin::app.settings.users.index.datagrid.inactive'),
'value' => 0,
],
],
'sortable' => true,
'closure' => function ($value) {
if ($value->status) {
Expand Down
20 changes: 15 additions & 5 deletions packages/Webkul/Admin/src/DataGrids/Theme/ThemeDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,21 @@ public function prepareColumns()
]);

$this->addColumn([
'index' => 'status',
'label' => trans('admin::app.settings.themes.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'filterable' => true,
'index' => 'status',
'label' => trans('admin::app.settings.themes.index.datagrid.status'),
'type' => 'boolean',
'searchable' => true,
'filterable' => true,
'filterable_options' => [
[
'label' => trans('admin::app.settings.themes.index.datagrid.active'),
'value' => 1,
],
[
'label' => trans('admin::app.settings.themes.index.datagrid.inactive'),
'value' => 0,
],
],
'sortable' => true,
'closure' => function ($value) {
if ($value->status) {
Expand Down
Loading

0 comments on commit f9082b6

Please sign in to comment.