Exclude current category from parent options when editing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -65,7 +65,7 @@ const showDeleteDialog = ref(false)
|
||||
const deleteTarget = ref<CategoryTree | null>(null)
|
||||
const form = ref({ name: '', type: 'Expense', parentId: null as string | null, isActive: true })
|
||||
|
||||
const parentOptions = computed(() => allCategories.value.filter(c => !c.parentId))
|
||||
const parentOptions = computed(() => allCategories.value.filter(c => !c.parentId && c.id !== editingCategory.value?.id))
|
||||
|
||||
onMounted(async () => {
|
||||
await reloadCategories()
|
||||
|
||||
Reference in New Issue
Block a user