Backend Changes: - Add estimated_minutes field to tasks (stored as integer minutes) - Add tags field (JSON array) for categorizing tasks - Add flag_color field for visual priority indicators - Add search endpoint (/api/search) with project filtering - Update JSON import to handle new metadata fields Frontend Changes: - Display version v0.1.3 in header - Add search API client function - Add format utility for time display (30m, 1.5h, etc.) Example Data: - Update example-import.json with time estimates, tags, and flags - Demonstrate nested metadata inheritance Note: Frontend UI for displaying/editing these fields in progress
18 lines
393 B
JavaScript
18 lines
393 B
JavaScript
// Format minutes into display string
|
|
export function formatTime(minutes) {
|
|
if (!minutes || minutes === 0) return null;
|
|
|
|
if (minutes < 60) {
|
|
return `${minutes}m`;
|
|
}
|
|
|
|
const hours = minutes / 60;
|
|
return `${hours.toFixed(1)}h`;
|
|
}
|
|
|
|
// Format tags as comma-separated string
|
|
export function formatTags(tags) {
|
|
if (!tags || tags.length === 0) return null;
|
|
return tags.join(', ');
|
|
}
|