close #2662 Fixed: Parent&Child category assign issue
This commit is contained in:
parent
ea5ce7f02b
commit
4021f4d2d4
8
public/css/app.css
vendored
8
public/css/app.css
vendored
@ -50034,10 +50034,6 @@ body{
|
|||||||
width: 20rem;
|
width: 20rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lg\:w-9{
|
|
||||||
width: 2.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lg\:w-8\/12{
|
.lg\:w-8\/12{
|
||||||
width: 66.666667%;
|
width: 66.666667%;
|
||||||
}
|
}
|
||||||
@ -50106,6 +50102,10 @@ body{
|
|||||||
width: 75%;
|
width: 75%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lg\:w-9{
|
||||||
|
width: 2.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.lg\:max-w-7xl{
|
.lg\:max-w-7xl{
|
||||||
max-width: 80rem;
|
max-width: 80rem;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ const app = new Vue({
|
|||||||
form: new Form('category'),
|
form: new Form('category'),
|
||||||
bulk_action: new BulkAction('categories'),
|
bulk_action: new BulkAction('categories'),
|
||||||
categoriesBasedTypes: null,
|
categoriesBasedTypes: null,
|
||||||
isParentCategoryDisabled: true,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -42,7 +41,6 @@ const app = new Vue({
|
|||||||
|
|
||||||
if (typeof JSON.parse(this.form.categories)[event] === 'undefined') {
|
if (typeof JSON.parse(this.form.categories)[event] === 'undefined') {
|
||||||
this.categoriesBasedTypes = [];
|
this.categoriesBasedTypes = [];
|
||||||
this.isParentCategoryDisabled = true;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -54,7 +52,6 @@ const app = new Vue({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.categoriesBasedTypes = JSON.parse(this.form.categories)[event];
|
this.categoriesBasedTypes = JSON.parse(this.form.categories)[event];
|
||||||
this.isParentCategoryDisabled = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -24,10 +24,10 @@
|
|||||||
<x-form.group.select name="type" label="{{ trans_choice('general.types', 1) }}" :options="$types" change="updateParentCategories" />
|
<x-form.group.select name="type" label="{{ trans_choice('general.types', 1) }}" :options="$types" change="updateParentCategories" />
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<x-form.group.select name="parent_id" label="{{ trans('general.parent') . ' ' . trans_choice('general.categories', 1) }}" :options="$categories[$category->type]" not-required dynamicOptions="categoriesBasedTypes" sort-options="false" v-disabled="isParentCategoryDisabled" />
|
<x-form.group.select name="parent_id" label="{{ trans('general.parent') . ' ' . trans_choice('general.categories', 1) }}" :options="$categories[$category->type]" not-required dynamicOptions="categoriesBasedTypes" sort-options="false" />
|
||||||
|
|
||||||
|
<x-form.input.hidden name="parent_category_id" value="{{ $category->parent_id }}" />
|
||||||
<x-form.input.hidden name="categories" value="{{ json_encode($categories) }}" />
|
<x-form.input.hidden name="categories" value="{{ json_encode($categories) }}" />
|
||||||
<x-form.input.hidden name="parent_category_id" :value="$category->parent_id" />
|
|
||||||
</x-slot>
|
</x-slot>
|
||||||
</x-form.section>
|
</x-form.section>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user