Add upsert and remove actor routine effect functions in App.tsx

This commit is contained in:
2026-04-14 13:49:37 +02:00
parent 28c1d08023
commit 3bc6520bae

View File

@@ -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);