201 előtti mentés

This commit is contained in:
Roo
2026-03-26 07:09:44 +00:00
parent 89668a9beb
commit 03258db091
124 changed files with 13619 additions and 13347 deletions

View File

@@ -0,0 +1,28 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import api from '@/services/api'
export const useExpenseStore = defineStore('expense', () => {
const isLoading = ref(false)
const error = ref(null)
async function createExpense(expenseData) {
isLoading.value = true
error.value = null
try {
const response = await api.post('/api/v1/expenses/', expenseData)
return response.data
} catch (err) {
error.value = err.response?.data?.detail || err.message
throw err
} finally {
isLoading.value = false
}
}
return {
isLoading,
error,
createExpense,
}
})