feat: add task sets functionality with CRUD operations and UI integration

- Implemented NewTaskSetPage for creating task sets with templates.
- Created TaskSetsPage for listing and filtering task sets.
- Enhanced TaskTemplatesPage with navigation to task sets.
- Updated ProjectTaskForm to support task set selection.
- Modified PageHeader to support multiple action buttons.
- Initialized database with task_sets and task_set_templates tables.
- Added queries for task sets including creation, retrieval, and deletion.
- Implemented applyTaskSetToProject function for bulk task creation.
- Added test script for verifying task sets functionality.
This commit is contained in:
2025-10-07 21:58:08 +02:00
parent e19172d2bb
commit 952caf10d1
14 changed files with 1838 additions and 77 deletions

View File

@@ -40,8 +40,8 @@ export default function TaskTemplatesPage() {
<PageHeader
title={t('taskTemplates.title')}
description={t('taskTemplates.subtitle')}
action={
<Link href="/tasks/templates/new">
actions={[
<Link href="/tasks/templates/new" key="new-template">
<Button variant="primary" size="lg">
<svg
className="w-5 h-5 mr-2"
@@ -58,8 +58,26 @@ export default function TaskTemplatesPage() {
</svg>
{t('taskTemplates.newTemplate')}
</Button>
</Link>,
<Link href="/task-sets" key="task-sets">
<Button variant="secondary" size="lg">
<svg
className="w-5 h-5 mr-2"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
/>
</svg>
Zestawy zadań
</Button>
</Link>
}
]}
/>
<div className="text-center py-12">
<div className="text-gray-500">{t('common.loading')}</div>
@@ -73,8 +91,8 @@ export default function TaskTemplatesPage() {
<PageHeader
title={t('taskTemplates.title')}
description={t('taskTemplates.subtitle')}
action={
<Link href="/tasks/templates/new">
actions={[
<Link href="/tasks/templates/new" key="new-template">
<Button variant="primary" size="lg">
<svg
className="w-5 h-5 mr-2"
@@ -91,8 +109,26 @@ export default function TaskTemplatesPage() {
</svg>
{t('taskTemplates.newTemplate')}
</Button>
</Link>,
<Link href="/task-sets" key="task-sets">
<Button variant="secondary" size="lg">
<svg
className="w-5 h-5 mr-2"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
/>
</svg>
Zestawy zadań
</Button>
</Link>
}
]}
/>
{templates.length === 0 ? (