mitlist/fe/src/router/routes.ts
Mohamad.Elsena 29ccab2f7e feat: Implement chore management feature with personal and group chores
This commit introduces a comprehensive chore management system, allowing users to create, manage, and track both personal and group chores. Key changes include:
- Addition of new API endpoints for personal and group chores in `be/app/api/v1/endpoints/chores.py`.
- Implementation of chore models and schemas to support the new functionality in `be/app/models.py` and `be/app/schemas/chore.py`.
- Integration of chore services in the frontend to handle API interactions for chore management.
- Creation of new Vue components for displaying and managing chores, including `ChoresPage.vue` and `PersonalChoresPage.vue`.
- Updates to the router to include chore-related routes and navigation.

This feature enhances user collaboration and organization within shared living environments, aligning with the project's goal of streamlining household management.
2025-05-21 18:18:22 +02:00

91 lines
2.7 KiB
TypeScript

// src/router/routes.ts
// Adapt paths to new component locations
import type { RouteRecordRaw } from 'vue-router'
const routes: RouteRecordRaw[] = [
{
path: '/',
component: () => import('../layouts/MainLayout.vue'), // Use .. alias
children: [
{ path: '', redirect: '/lists' },
{
path: 'lists',
name: 'PersonalLists',
component: () => import('../pages/ListsPage.vue'),
meta: { keepAlive: true },
},
{
path: 'lists/:id',
name: 'ListDetail',
component: () => import('../pages/ListDetailPage.vue'),
props: true,
meta: { keepAlive: true },
},
{
path: 'groups',
name: 'GroupsList',
component: () => import('../pages/GroupsPage.vue'),
meta: { keepAlive: true },
},
{
path: 'groups/:id',
name: 'GroupDetail',
component: () => import('../pages/GroupDetailPage.vue'),
props: true,
meta: { keepAlive: true },
},
{
path: 'groups/:groupId/lists',
name: 'GroupLists',
component: () => import('../pages/ListsPage.vue'), // Reusing ListsPage
props: true,
meta: { keepAlive: true },
},
{
path: 'account',
name: 'Account',
component: () => import('../pages/AccountPage.vue'),
meta: { keepAlive: true },
},
{
path: '/groups/:groupId/chores',
name: 'GroupChores',
component: () => import('@/pages/ChoresPage.vue'),
props: (route) => ({ groupId: Number(route.params.groupId) }),
meta: { requiresAuth: true, keepAlive: false },
},
{
path: '/chores',
name: 'Chores',
component: () => import('@/pages/ChoresPage.vue'),
meta: { requiresAuth: true, keepAlive: false },
},
{
path: '/personal-chores',
name: 'PersonalChores',
component: () => import('@/pages/PersonalChoresPage.vue'),
meta: { requiresAuth: true, keepAlive: false },
},
],
},
{
path: '/auth', // Group auth routes under a common path for clarity (optional)
component: () => import('../layouts/AuthLayout.vue'),
children: [
{ path: 'login', name: 'Login', component: () => import('../pages/LoginPage.vue') },
{ path: 'signup', name: 'Signup', component: () => import('../pages/SignupPage.vue') },
{
path: 'callback',
name: 'AuthCallback',
component: () => import('../pages/AuthCallbackPage.vue'),
},
],
},
// {
// path: '/:catchAll(.*)*', name: '404',
// component: () => import('../pages/ErrorNotFound.vue'),
// },
]
export default routes