Skip to content

Commit 7b20c80

Browse files
committed
- feat: Implemented a back button in the Settings component to navigate to the previous migration step.
- Updated ExecutionLogs component to improve error handling and user feedback with custom empty states. - Refactored filter modal styles .
1 parent 9eace91 commit 7b20c80

File tree

8 files changed

+185
-435
lines changed

8 files changed

+185
-435
lines changed

ui/src/components/Common/NoDataSVG/index.scss

Lines changed: 0 additions & 43 deletions
This file was deleted.

ui/src/components/Common/NoDataSVG/index.tsx

Lines changed: 0 additions & 130 deletions
This file was deleted.

ui/src/components/Common/Settings/Settings.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,8 @@
103103
color: #6c5ce7 !important;
104104
font-weight: 600;
105105
}
106+
107+
.back-button{
108+
cursor: pointer;
109+
margin-bottom: 20px ;
110+
}

ui/src/components/Common/Settings/index.tsx

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
PageLayout,
1313
Notification,
1414
cbModal,
15+
ClipBoard
1516
} from '@contentstack/venus-components';
1617

1718
// Redux
@@ -22,11 +23,7 @@ import { Setting } from './setting.interface';
2223
import { ModalObj } from '../../../components/Modal/modal.interface';
2324

2425
// Service
25-
import {
26-
deleteProject,
27-
getProject,
28-
updateProject
29-
} from '../../../services/api/project.service';
26+
import { deleteProject, getProject, updateProject } from '../../../services/api/project.service';
3027
import { CS_ENTRIES } from '../../../utilities/constants';
3128
import { getCMSDataFromFile } from '../../../cmsData/cmsSelector';
3229

@@ -54,13 +51,13 @@ const Settings = () => {
5451
const [projectId, setProjectId] = useState('');
5552
const [projectDescription, setProjectDescription] = useState('');
5653

57-
58-
59-
6054
const selectedOrganisation = useSelector(
6155
(state: RootState) => state?.authentication?.selectedOrganisation
6256
);
6357

58+
const currentStep = useSelector(
59+
(state: RootState) => state?.migration?.newMigrationData?.project_current_step
60+
);
6461

6562
const navigate = useNavigate();
6663
const dispatch = useDispatch();
@@ -159,6 +156,10 @@ const Settings = () => {
159156
}
160157
};
161158

159+
const handleBack = () => {
160+
navigate(`/projects/${params?.projectId}/migration/steps/${currentStep}`);
161+
}
162+
162163
const handleClick = () => {
163164
cbModal({
164165
component: (props: ModalObj) => (
@@ -261,7 +262,7 @@ const Settings = () => {
261262
</div>
262263
)}
263264
{active === cmsData?.execution_logs?.title && (
264-
<div style={{ height: '100px'}}>
265+
<div>
265266
<ExecutionLog projectId={projectId} />
266267
</div>
267268
)}
@@ -277,6 +278,20 @@ const Settings = () => {
277278
className="SectionHeader SectionHeader--extra-bold SectionHeader--medium SectionHeader--black SectionHeader--v2"
278279
aria-label={cmsData?.title}
279280
aria-level={1}>
281+
<div>
282+
<Icon
283+
version="v2"
284+
icon={'LeftArrow'}
285+
size="medium"
286+
onClick={() => {
287+
handleBack();
288+
}}
289+
withTooltip={true}
290+
tooltipContent={'Back'}
291+
tooltipPosition="right"
292+
className='back-button'
293+
/>
294+
</div>
280295
{cmsData?.title}
281296
</div>
282297

0 commit comments

Comments
 (0)