- care reminders now fire with plant-specific body ("Time to water Pothos")
via title/body columns on the reminders table (migration 0016)
- bi-directional task sync: checking off a garden-linked task list item
creates a care log; logging care from garden marks the linked task done
(list_items.metadata stores gardenPlantId + gardenCareType linkage)
- upload error response no longer leaks debug detail; error message
corrected from "5 MB" to "100 MB"
17 lines
523 B
TypeScript
17 lines
523 B
TypeScript
const CARE_VERBS: Record<string, string> = {
|
|
watering: "Water",
|
|
fertilizing: "Fertilize",
|
|
repotting: "Repot",
|
|
pruning: "Prune",
|
|
};
|
|
|
|
export function buildCareTitle(careType: string, plantName: string): string {
|
|
const verb = CARE_VERBS[careType];
|
|
return verb ? `${verb} ${plantName}` : `${careType} — ${plantName}`;
|
|
}
|
|
|
|
export function buildCareReminderBody(careType: string, plantName: string): string {
|
|
const verb = CARE_VERBS[careType]?.toLowerCase() ?? careType;
|
|
return `Time to ${verb} ${plantName}`;
|
|
}
|