TP-17651 | Added Email Id in APi Headers + CSS Fixes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import DarkKnight from '@super-app/dark-knight';
|
||||
import axios from 'axios';
|
||||
import React, { Suspense, useEffect, useState } from 'react';
|
||||
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
||||
import LeftSideBar from './components/LeftSideBar';
|
||||
@@ -43,6 +44,10 @@ const App = () => {
|
||||
redirectUri: `${window.location.protocol}//${window.location.host}/agent/login/?redirectUri=${window.location.href}`,
|
||||
});
|
||||
}
|
||||
axios.defaults.headers.common['X-Session-Token'] =
|
||||
auth.sessionToken || '';
|
||||
axios.defaults.headers.common['X-Email-Id'] =
|
||||
auth.idTokenParsed?.emailId || '';
|
||||
dispatch(setAuthData(auth.idTokenParsed));
|
||||
dispatch(setAuthToken(auth.sessionToken));
|
||||
setIsAuthenticated(true);
|
||||
|
||||
@@ -89,7 +89,7 @@ const AddVariantForm = (props: AddVariantFormProps) => {
|
||||
setFieldValue(`variants[${index}].weight`, newValue);
|
||||
}
|
||||
}}
|
||||
containerClassName={`${styles['percentage-input']} ${styles['width-60']}`}
|
||||
containerClassName={`${styles['percentage-input']} ${styles['width-80']}`}
|
||||
/>
|
||||
</div>
|
||||
<DropDownSelect
|
||||
|
||||
@@ -196,7 +196,6 @@
|
||||
|
||||
.create-experiment-wrapper {
|
||||
padding: 0 0 16px 48px;
|
||||
height: inherit;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,15 +91,17 @@ const CreateStrategyForm = (props: CreateStrategyFormProps) => {
|
||||
/>
|
||||
)}
|
||||
{strategyData?.stickiness === StickinessType.CUSTOM && (
|
||||
<BorderedInput
|
||||
inputLabel="Custom Stickiness name"
|
||||
inputSize="medium"
|
||||
placeholder="Stickiness name"
|
||||
name={`strategies[${index}].customStickinessName`}
|
||||
onChange={handleChange}
|
||||
value={strategyData?.customStickinessName}
|
||||
containerClassName={commonStyles['custom-borderd-input']}
|
||||
/>
|
||||
<div style={{ marginTop: '16px' }}>
|
||||
<BorderedInput
|
||||
inputLabel="Custom Stickiness name"
|
||||
inputSize="medium"
|
||||
placeholder="Stickiness name"
|
||||
name={`strategies[${index}].customStickinessName`}
|
||||
onChange={handleChange}
|
||||
value={strategyData?.customStickinessName}
|
||||
containerClassName={commonStyles['custom-borderd-input']}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{strategyData?.strategy !== StrategiesType.FLEXIBLE_ROLLOUT && (
|
||||
<DropDownSelect
|
||||
|
||||
@@ -18,7 +18,11 @@ import {
|
||||
} from '../../../redux/slices/FormSlice';
|
||||
import { useExperimentsApi } from '../../../utils/Api';
|
||||
import ExperimentFooter from '../Footer';
|
||||
import { getSaveExperimentPayload, objToQueryString, showErrorToast } from '../../../utils';
|
||||
import {
|
||||
getSaveExperimentPayload,
|
||||
objToQueryString,
|
||||
showErrorToast,
|
||||
} from '../../../utils';
|
||||
import styles from '../CreateExperiment.module.scss';
|
||||
import commonStyles from '../../Common.module.scss';
|
||||
import StepperComponent from '../../../components/Stepper';
|
||||
@@ -63,11 +67,7 @@ const StatisticsRequirements = () => {
|
||||
|
||||
if (!payload) return showErrorToast('Variants sum should be 100 !!');
|
||||
|
||||
createExperiment(
|
||||
payload,
|
||||
() => navigate('/'),
|
||||
'experiments/create',
|
||||
);
|
||||
createExperiment(payload, () => navigate('/'), 'experiments/create');
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -109,7 +109,7 @@ const StatisticsRequirements = () => {
|
||||
<Tooltip
|
||||
text="Confidence Interval should be between 95 to 99"
|
||||
position="top"
|
||||
style={{ height: '23px' }}
|
||||
style={{ display: 'flex' }}
|
||||
>
|
||||
<AlertOutlineIcon />
|
||||
</Tooltip>
|
||||
|
||||
Reference in New Issue
Block a user