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:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user