reset to setup module state
Remove Task Manager implementation to match `# Setup module` in module.md. Backend src/ reduced to Kernel.php + empty Entity/, all migrations deleted, database dropped and recreated. Frontend components/views/services/stores removed, App.vue/router/style.css reduced to skeletons. CLAUDE.md shortened to Setup-stand. Old backend/plan.md, plan2.md removed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import * as api from '../services/api'
|
||||
|
||||
export const useCategoriesStore = defineStore('categories', () => {
|
||||
const items = ref([])
|
||||
const loaded = ref(false)
|
||||
|
||||
async function fetchCategories(force = false) {
|
||||
if (loaded.value && !force) return
|
||||
items.value = await api.getCategories()
|
||||
loaded.value = true
|
||||
}
|
||||
|
||||
async function addCategory(data) {
|
||||
const category = await api.createCategory(data)
|
||||
items.value.push(category)
|
||||
return category
|
||||
}
|
||||
|
||||
async function editCategory(id, data) {
|
||||
const updated = await api.updateCategory(id, data)
|
||||
const index = items.value.findIndex((c) => c.id === id)
|
||||
if (index !== -1) items.value[index] = updated
|
||||
return updated
|
||||
}
|
||||
|
||||
async function removeCategory(id) {
|
||||
await api.deleteCategory(id)
|
||||
items.value = items.value.filter((c) => c.id !== id)
|
||||
}
|
||||
|
||||
return { items, loaded, fetchCategories, addCategory, editCategory, removeCategory }
|
||||
})
|
||||
Reference in New Issue
Block a user