diff --git a/frontend/src/component/common/Input/Input.tsx b/frontend/src/component/common/Input/Input.tsx index ebf4d1c407..827951d435 100644 --- a/frontend/src/component/common/Input/Input.tsx +++ b/frontend/src/component/common/Input/Input.tsx @@ -11,6 +11,8 @@ interface IInputProps extends React.InputHTMLAttributes { onChange: (e: any) => any; onFocus?: (e: any) => any; onBlur?: (e: any) => any; + multiline?: boolean; + rows?: number; } const Input = ({ diff --git a/frontend/src/component/feature/CreateFeature/EditFeature/EditFeature.tsx b/frontend/src/component/feature/CreateFeature/EditFeature/EditFeature.tsx index 80d05f6ee9..c0b1708c8b 100644 --- a/frontend/src/component/feature/CreateFeature/EditFeature/EditFeature.tsx +++ b/frontend/src/component/feature/CreateFeature/EditFeature/EditFeature.tsx @@ -68,7 +68,7 @@ const EditFeature = () => { }/api/admin/projects/${projectId}/features/${featureId}' \\ --header 'Authorization: INSERT_API_KEY' \\ --header 'Content-Type: application/json' \\ - --data-raw '${JSON.stringify(getTogglePayload(), undefined, 2)}'`; + --data-raw '${JSON.stringify(createPatch(), undefined, 2)}'`; }; const handleCancel = () => { diff --git a/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.styles.ts b/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.styles.ts index ee92ce8ac7..bb01c34ecc 100644 --- a/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.styles.ts +++ b/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.styles.ts @@ -29,7 +29,7 @@ export const useStyles = makeStyles(theme => ({ justifyContent: 'flex-end', }, cancelButton: { - marginRight: '1.5rem', + marginLeft: '1.5rem', }, inputDescription: { marginBottom: '0.5rem', diff --git a/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.tsx b/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.tsx index 4247a1376a..e56502a99a 100644 --- a/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.tsx +++ b/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.tsx @@ -130,10 +130,10 @@ const FeatureForm: React.FC = ({
+ {children} - {children}
); diff --git a/frontend/src/component/feature/FeatureView2/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/FeatureOverviewEnvironment.tsx b/frontend/src/component/feature/FeatureView2/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/FeatureOverviewEnvironment.tsx index c327c05159..6163a183f4 100644 --- a/frontend/src/component/feature/FeatureView2/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/FeatureOverviewEnvironment.tsx +++ b/frontend/src/component/feature/FeatureView2/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/FeatureOverviewEnvironment.tsx @@ -134,6 +134,7 @@ const FeatureOverviewEnvironment = ({ name )} arrow + key={name} >
{ propagateErrors: true, }); - const validateFeatureToggleName = async ( - name: string, - ) => { + const validateFeatureToggleName = async (name: string) => { const path = `api/admin/features/validate`; const req = createRequest(path, { method: 'POST', @@ -26,10 +24,9 @@ const useFeatureApi = () => { } }; - const createFeatureToggle = async ( projectId: string, - featureToggle: IFeatureToggleDTO, + featureToggle: IFeatureToggleDTO ) => { const path = `api/admin/projects/${projectId}/features`; const req = createRequest(path, { @@ -168,6 +165,7 @@ const useFeatureApi = () => { featureId: string, patchPayload: any ) => { + console.log(patchPayload); const path = `api/admin/projects/${projectId}/features/${featureId}`; const req = createRequest(path, { method: 'PATCH', @@ -183,7 +181,11 @@ const useFeatureApi = () => { } }; - const patchFeatureVariants = async (projectId: string, featureId: string, patchPayload: Operation[]) => { + const patchFeatureVariants = async ( + projectId: string, + featureId: string, + patchPayload: Operation[] + ) => { const path = `api/admin/projects/${projectId}/features/${featureId}/variants`; const req = createRequest(path, { method: 'PATCH',