"Move into that day's note" vs "just set the due date" — the menu shown after * dropping a task on a calendar day.
( task: VaultTask, dateIso: string, onMoveTask: (task: VaultTask, dateIso: string) => void, onRescheduleTask: (task: VaultTask, dueIso: string) => void )
| 814 | /** "Move into that day's note" vs "just set the due date" — the menu shown after |
| 815 | * dropping a task on a calendar day. */ |
| 816 | function dropChoiceItems( |
| 817 | task: VaultTask, |
| 818 | dateIso: string, |
| 819 | onMoveTask: (task: VaultTask, dateIso: string) => void, |
| 820 | onRescheduleTask: (task: VaultTask, dueIso: string) => void |
| 821 | ): ContextMenuItem[] { |
| 822 | const label = parseIsoLocal(dateIso).toLocaleDateString(undefined, { |
| 823 | month: 'short', |
| 824 | day: 'numeric' |
| 825 | }) |
| 826 | return [ |
| 827 | { label: `Move into ${label}'s note`, onSelect: () => onMoveTask(task, dateIso) }, |
| 828 | { label: `Just set due: ${label}`, onSelect: () => onRescheduleTask(task, dateIso) } |
| 829 | ] |
| 830 | } |
| 831 | |
| 832 | interface RowProps { |
| 833 | task: VaultTask |
no test coverage detected