From 19119bd1f0a7fc2470510e70b2acdaca3bf7460c Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Tue, 8 Aug 2023 11:44:43 +0200 Subject: [PATCH] feat: default strategy variant (#4443) --- .../EditDefaultStrategy.tsx | 1 + .../ProjectDefaultStrategyForm.tsx | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/EditDefaultStrategy.tsx b/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/EditDefaultStrategy.tsx index 99eaea6bed..8b644373ae 100644 --- a/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/EditDefaultStrategy.tsx +++ b/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/EditDefaultStrategy.tsx @@ -170,6 +170,7 @@ export const createStrategyPayload = ( title: strategy.title, constraints: strategy.constraints ?? [], parameters: strategy.parameters ?? {}, + variants: strategy.variants ?? [], segments: segments.map(segment => segment.id), disabled: strategy.disabled ?? false, }); diff --git a/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/ProjectDefaultStrategyForm.tsx b/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/ProjectDefaultStrategyForm.tsx index e44bb103cc..323da5c1da 100644 --- a/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/ProjectDefaultStrategyForm.tsx +++ b/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/ProjectDefaultStrategyForm.tsx @@ -20,6 +20,7 @@ import { useHasProjectEnvironmentAccess } from 'hooks/useHasAccess'; import { FeatureStrategyConstraints } from 'component/feature/FeatureStrategy/FeatureStrategyConstraints/FeatureStrategyConstraints'; import { FeatureStrategyType } from 'component/feature/FeatureStrategy/FeatureStrategyType/FeatureStrategyType'; import { FeatureStrategyTitle } from 'component/feature/FeatureStrategy/FeatureStrategyForm/FeatureStrategyTitle/FeatureStrategyTitle'; +import { StrategyVariants } from 'component/feature/StrategyTypes/StrategyVariants'; interface IProjectDefaultStrategyFormProps { projectId: string; @@ -179,6 +180,21 @@ export const ProjectDefaultStrategyForm = ({ errors={errors} hasAccess={access} /> + + } + />