feat: Select Inbox project by default when creating a task

This commit is contained in:
2024-03-13 08:44:45 +01:00
parent 751ee38d32
commit 8d49154be3
3 changed files with 3 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
- Add Linear Project and Team icons - Add Linear Project and Team icons
- Add Slack notifications (ie. save for later) support - Add Slack notifications (ie. save for later) support
- Set `Inbox` project as default when creating or planning a task
## [0.1.3] - 2024-02-05 ## [0.1.3] - 2024-02-05

View File

@@ -53,6 +53,7 @@ export function CreateTaskFromNotification({ notification, mutate }: CreateTaskF
const { handleSubmit, itemProps } = useForm<TaskCreationFormValues>({ const { handleSubmit, itemProps } = useForm<TaskCreationFormValues>({
initialValues: { initialValues: {
title: notification.title, title: notification.title,
project: projects?.find((p) => p.name === "Inbox")?.source_id,
dueAt: new Date(), dueAt: new Date(),
priority: `${TaskPriority.P4 as number}`, priority: `${TaskPriority.P4 as number}`,
}, },

View File

@@ -51,6 +51,7 @@ export function PlanTask({ notification, mutate }: PlanTaskProps) {
const { handleSubmit, itemProps } = useForm<TaskPlanningFormValues>({ const { handleSubmit, itemProps } = useForm<TaskPlanningFormValues>({
initialValues: { initialValues: {
dueAt: new Date(), dueAt: new Date(),
project: projects?.find((p) => p.name === "Inbox")?.source_id,
priority: `${TaskPriority.P4 as number}`, priority: `${TaskPriority.P4 as number}`,
}, },
async onSubmit(values) { async onSubmit(values) {