mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 05:06:41 +02:00
refactor(todo): rename priority labels for better natural language input
- low → "Später" (was "Niedrig") - medium → "Normal" (was "Mittel") - high → "Wichtig" (was "Hoch") - urgent → "Dringend" (unchanged) CommandBar syntax now supports: !später, !normal, !wichtig, !dringend Shortcut syntax still works: !, !!, !!! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6aa8554e21
commit
330b9907b0
15 changed files with 346 additions and 190 deletions
|
|
@ -69,6 +69,9 @@ export const REMINDER_PRESETS = [
|
|||
{ label: '1 week before', minutes: 10080 },
|
||||
] as const;
|
||||
|
||||
// Re-export task-specific constants (German localized versions)
|
||||
export * from './task';
|
||||
|
||||
// View types
|
||||
export type ViewType =
|
||||
| 'inbox'
|
||||
|
|
|
|||
55
apps/todo/packages/shared/src/constants/task.ts
Normal file
55
apps/todo/packages/shared/src/constants/task.ts
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
import type { TaskPriority, TaskStatus } from '../types/task';
|
||||
|
||||
export interface PriorityOption {
|
||||
value: TaskPriority;
|
||||
label: string;
|
||||
color: string;
|
||||
}
|
||||
|
||||
export interface StatusOption {
|
||||
value: TaskStatus;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface RecurrenceOption {
|
||||
value: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export const PRIORITY_OPTIONS: PriorityOption[] = [
|
||||
{ value: 'low', label: 'Später', color: '#22c55e' },
|
||||
{ value: 'medium', label: 'Normal', color: '#eab308' },
|
||||
{ value: 'high', label: 'Wichtig', color: '#f97316' },
|
||||
{ value: 'urgent', label: 'Dringend', color: '#ef4444' },
|
||||
];
|
||||
|
||||
export const STATUS_OPTIONS: StatusOption[] = [
|
||||
{ value: 'pending', label: 'Offen' },
|
||||
{ value: 'in_progress', label: 'In Arbeit' },
|
||||
{ value: 'completed', label: 'Erledigt' },
|
||||
{ value: 'cancelled', label: 'Abgebrochen' },
|
||||
];
|
||||
|
||||
export const RECURRENCE_OPTIONS: RecurrenceOption[] = [
|
||||
{ value: '', label: 'Keine Wiederholung' },
|
||||
{ value: 'FREQ=DAILY', label: 'Täglich' },
|
||||
{ value: 'FREQ=WEEKLY', label: 'Wöchentlich' },
|
||||
{ value: 'FREQ=WEEKLY;INTERVAL=2', label: 'Alle 2 Wochen' },
|
||||
{ value: 'FREQ=MONTHLY', label: 'Monatlich' },
|
||||
{ value: 'FREQ=YEARLY', label: 'Jährlich' },
|
||||
];
|
||||
|
||||
// Fibonacci sequence for story points
|
||||
export const STORYPOINT_OPTIONS = [1, 2, 3, 5, 8, 13, 21] as const;
|
||||
|
||||
// Helper to get priority label
|
||||
export function getPriorityLabel(priority: TaskPriority): string {
|
||||
const option = PRIORITY_OPTIONS.find((p) => p.value === priority);
|
||||
return option?.label ?? priority;
|
||||
}
|
||||
|
||||
// Helper to get status label
|
||||
export function getStatusLabel(status: TaskStatus): string {
|
||||
const option = STATUS_OPTIONS.find((s) => s.value === status);
|
||||
return option?.label ?? status;
|
||||
}
|
||||
|
|
@ -108,6 +108,7 @@ export interface UpdateTaskInput {
|
|||
recurrenceEndDate?: string | null;
|
||||
subtasks?: Subtask[] | null;
|
||||
metadata?: TaskMetadata | null;
|
||||
labelIds?: string[];
|
||||
}
|
||||
|
||||
export interface QueryTasksInput {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue