Skip to content

Commit

Permalink
[#31418] Remove ability to Delete Categories
Browse files Browse the repository at this point in the history
  • Loading branch information
bd-viget committed Sep 20, 2024
1 parent a8baa88 commit 336211f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
9 changes: 0 additions & 9 deletions resources/js/components/Category/Editable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
v-show="!originalId && isDirty()"
><i class="fa fa-floppy-o"></i
></BButton>
<BButton @click="emitDeleteCategory" class="btn btn-danger" title="Delete"
><i class="fa fa-trash"></i
></BButton>
</BInputGroupAppend>
</BInputGroup>
</template>
Expand Down Expand Up @@ -124,12 +121,6 @@ export default {
(cat) => parseInt(cat.value) === this.originalId,
).text;
},
emitDeleteCategory() {
if (!confirm('Are you sure you want to delete this category?')) {
return;
}
this.$emit('delete-category', this.categoryId, this.categoryIndex);
},
isDirty() {
if (!this.selectedId) {
return !!this.categoryId;
Expand Down
1 change: 0 additions & 1 deletion resources/js/components/Concept/Default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
:is-primary="0 === index"
:selected-categories="selectedCategories"
@save-category="saveCategory"
@delete-category="deleteCategory"
@change="flagDirty"
></EditableCategory>
</p>
Expand Down
5 changes: 0 additions & 5 deletions resources/js/components/Concept/mixins/Category.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ export default {

this.cleanDirty({ id: categoryId });

this.updateCategories().then();
},
deleteCategory(categoryId, index) {
this.cats.splice(index, 1);

this.updateCategories().then();
},
},
Expand Down

0 comments on commit 336211f

Please sign in to comment.