Files
famapp/src/modules/garden/server/care-utils.ts
T
ginnoir 7f2c5a44dd feat: garden care reminder bodies, task sync, upload cleanup
- 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"
2026-06-01 23:58:00 -05:00

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}`;
}