From 3bc6520bae8fb6b6adb900889e40fc3f9eb9b9d6 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 14 Apr 2026 13:49:37 +0200 Subject: [PATCH] Add upsert and remove actor routine effect functions in App.tsx --- src/app/App.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index 53ca2a97..8894fe86 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -3810,6 +3810,25 @@ export function App({ store, initialStatusMessage }: AppProps) { } }; + const upsertActorRoutineEffect = ( + routine: ProjectScheduleRoutine, + effect: ProjectScheduleRoutine["effects"][number] + ) => { + routine.effects = [ + ...routine.effects.filter((candidate) => candidate.type !== effect.type), + effect + ]; + }; + + const removeActorRoutineEffect = ( + routine: ProjectScheduleRoutine, + effectType: ProjectScheduleRoutine["effects"][number]["type"] + ) => { + routine.effects = routine.effects.filter( + (candidate) => candidate.type !== effectType + ); + }; + const resolveProjectScheduleTargetOption = (targetKey: string) => getProjectScheduleTargetOptionByKey(projectScheduleTargetOptions, targetKey);