Fixed issue with category or attribute field left empty

This commit is contained in:
Prashant Singh 2019-08-21 12:19:53 +05:30
parent ec89315b42
commit 3c9ae5b35d
3 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ class CMSPageDataGrid extends DataGrid
$this->addColumn([
'index' => 'locale_id',
'label' => trans('admin::app.cms.pages.locale'),
'type' => 'string',
'type' => 'number',
'searchable' => false,
'sortable' => true,
'filterable' => true,

View File

@ -598,12 +598,12 @@
},
onSubmit: function (e) {
if (this.attribute_values.length > 0 || this.category_values.length > 0) {
if (this.attribute_values != null || this.category_values != null) {
for (i in this.attribute_values) {
delete this.attribute_values[i].options;
}
if (this.category_values.length > 0) {
if (this.category_values != null) {
this.all_attributes.categories = this.category_values;
}

View File

@ -684,7 +684,7 @@
},
onSubmit: function (e) {
if (this.attribute_values.length != 0 || this.category_values.length != 0) {
if (this.attribute_values != null || this.category_values != null) {
for (i in this.attribute_values) {
delete this.attribute_values[i].options;
}