From 7a11e68c178b190b2d85143440600f50f42fb911 Mon Sep 17 00:00:00 2001 From: Nicholas Ward Date: Sun, 14 Jun 2026 23:31:12 +0000 Subject: [PATCH] add care history editing and snooze --- plant-manager-web/src/App.tsx | 24 ++ plant-manager-web/src/api.ts | 55 +++ .../src/components/CareHistoryView.tsx | 345 ++++++++++++++++++ plant-manager-web/src/components/CareView.tsx | 64 +++- plant-manager-web/src/domain.ts | 41 +++ plant-manager-web/src/form-state.ts | 2 +- plant-manager-web/src/styles.css | 26 ++ plant-manager-web/src/use-app-actions.ts | 74 +++- plant-manager-web/src/use-dashboard-data.ts | 14 +- plant-manager/Contracts.cs | 100 ++++- plant-manager/Data/ApplicationDbContext.cs | 18 + ... 20260614225310_InitialCreate.Designer.cs} | 56 ++- ...ate.cs => 20260614225310_InitialCreate.cs} | 42 +++ .../ApplicationDbContextModelSnapshot.cs | 54 +++ plant-manager/Data/Models/CareActivity.cs | 1 + plant-manager/Data/Models/CareSnooze.cs | 15 + plant-manager/Data/Models/Plant.cs | 1 + plant-manager/Endpoints/ActionLogEndpoints.cs | 122 +++++++ plant-manager/Endpoints/CareTaskEndpoints.cs | 148 +++++--- plant-manager/Endpoints/PlantEndpoints.cs | 18 + 20 files changed, 1162 insertions(+), 58 deletions(-) create mode 100644 plant-manager-web/src/components/CareHistoryView.tsx rename plant-manager/Data/Migrations/{20260614222157_InitialCreate.Designer.cs => 20260614225310_InitialCreate.Designer.cs} (94%) rename plant-manager/Data/Migrations/{20260614222157_InitialCreate.cs => 20260614225310_InitialCreate.cs} (93%) create mode 100644 plant-manager/Data/Models/CareSnooze.cs diff --git a/plant-manager-web/src/App.tsx b/plant-manager-web/src/App.tsx index 5930a87..cc02686 100644 --- a/plant-manager-web/src/App.tsx +++ b/plant-manager-web/src/App.tsx @@ -2,6 +2,7 @@ import { useState } from 'react'; import { ActionsView } from './components/ActionsView'; import { ActivitiesView } from './components/ActivitiesView'; import { CareView } from './components/CareView'; +import { CareHistoryView } from './components/CareHistoryView'; import { FlagsView } from './components/FlagsView'; import { GroupsView } from './components/GroupsView'; import { HomeView } from './components/HomeView'; @@ -23,6 +24,7 @@ export function App() { actionResources, careActions, careActivities, + careHistory, careTasks, dueCount, error, @@ -159,6 +161,7 @@ export function App() { removeAction, removeActivity, removeAssignedPlantFlag, + removeCareHistoryEvent, removeSchedule, removeFlagDefinition, removeLocation, @@ -180,6 +183,8 @@ export function App() { searchTaxonInfo, previewCatalogImportFile, setPlantInfoQuery, + snoozeCare, + updateCareHistoryEvent, } = useAppActions({ editors, loadDashboard, @@ -244,6 +249,13 @@ export function App() { > Care +