feat: Add Recurrence Pattern and Update Expense Schema

- Introduced a new `RecurrencePattern` model to manage recurrence details for expenses, allowing for daily, weekly, monthly, and yearly patterns.
- Updated the `Expense` model to include fields for recurrence management, such as `is_recurring`, `recurrence_pattern_id`, and `next_occurrence`.
- Modified the database schema to reflect these changes, including alterations to existing columns and the removal of obsolete fields.
- Enhanced the expense creation logic to accommodate recurring expenses and updated related CRUD operations accordingly.
- Implemented necessary migrations to ensure database integrity and support for the new features.
This commit is contained in:
mohamad 2025-05-23 21:01:37 +02:00
parent ee6d96d9ec
commit 821a26e681
2 changed files with 9 additions and 2 deletions

9
fe/package-lock.json generated
View File

@ -4405,6 +4405,13 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/date-fns": {
"version": "2.5.3",
"resolved": "https://registry.npmjs.org/@types/date-fns/-/date-fns-2.5.3.tgz",
"integrity": "sha512-4KVPD3g5RjSgZtdOjvI/TDFkLNUHhdoWxmierdQbDeEg17Rov0hbBYtIzNaQA67ORpteOhvR9YEMTb6xeDCang==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/aria-query": { "node_modules/@types/aria-query": {
"version": "5.0.4", "version": "5.0.4",
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
@ -13859,4 +13866,4 @@
} }
} }
} }
} }

View File

@ -304,8 +304,8 @@ import { choreService } from '../services/choreService' // Assuming choreService
import { useNotificationStore } from '../stores/notifications' import { useNotificationStore } from '../stores/notifications'
import type { Chore as OriginalChore, ChoreCreate as OriginalChoreCreate, ChoreUpdate, ChoreFrequency } from '../types/chore' // Assuming these types exist import type { Chore as OriginalChore, ChoreCreate as OriginalChoreCreate, ChoreUpdate, ChoreFrequency } from '../types/chore' // Assuming these types exist
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { groupService } from '../services/groupService' // Assuming groupService exists
import { useStorage } from '@vueuse/core' import { useStorage } from '@vueuse/core'
import { groupService } from '@/services/groupService'
// Extend Chore type to include completion status // Extend Chore type to include completion status
interface Chore extends OriginalChore { interface Chore extends OriginalChore {