feat: add primary tag functionality to tasks

- Introduced `primaryTagId` to `Task` model and updated related components to support selecting a primary tag.
- Enhanced `TaskCard`, `EditTaskForm`, and `TagInput` to handle primary tag selection and display.
- Updated `TasksService` to manage primary tag data during task creation and updates.
- Added `emoji-regex` dependency for improved emoji handling in task titles.
This commit is contained in:
Julien Froidefond
2025-10-01 21:11:50 +02:00
parent 014b0269dc
commit e2527ca88a
12 changed files with 168 additions and 42 deletions

View File

@@ -46,6 +46,8 @@ model Task {
tfsRepository String?
tfsSourceBranch String?
tfsTargetBranch String?
primaryTagId String?
primaryTag Tag? @relation("PrimaryTag", fields: [primaryTagId], references: [id])
dailyCheckboxes DailyCheckbox[]
taskTags TaskTag[]
@@ -54,11 +56,12 @@ model Task {
}
model Tag {
id String @id @default(cuid())
name String @unique
color String @default("#6b7280")
isPinned Boolean @default(false)
taskTags TaskTag[]
id String @id @default(cuid())
name String @unique
color String @default("#6b7280")
isPinned Boolean @default(false)
taskTags TaskTag[]
primaryTasks Task[] @relation("PrimaryTag")
@@map("tags")
}