Skip to content

Commit 3f98b99

Browse files
committed
[CMG-418] - Content mapper | after test migration not able to update content mapping
1 parent 59c920f commit 3f98b99

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

ui/src/components/Card/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ const CardList = ({ project }: ProjectType) => {
6464

6565
return (
6666
<div style={{ margin: '0 19px 20px 0' }}>
67-
<div onClick={() => onClickProject(project?.id || '')}>
67+
<div onClick={() => onClickProject(project?.id ?? '')}>
6868
<div className="ProjectCard">
6969
<div className='ProjectCardWrapper'>
70-
<Tooltip content={project?.name} position="top" type="primary" variantType="basic">
70+
<Tooltip content={project?.name} position="right" type="primary" variantType="basic">
7171
<div className="ProjectCard__heading">
7272
{project?.name && <h4 className="ProjectCard__title flex-v-center">{project?.name}</h4>}
7373
</div>

ui/src/components/ContentMapper/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
895895
data?.otherCmsField === 'url' ||
896896
data?.otherCmsField === 'reference'||
897897
data?.contentstackFieldType === "global_field" ||
898-
newMigrationData?.project_current_step?.toString() !== stepId
898+
newMigrationData?.project_current_step > 4
899899
}
900900
/>
901901
</div>
@@ -921,7 +921,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
921921
onClick={() =>
922922
handleAdvancedSetting(fieldLabel, data?.advanced || {}, data?.uid, data)
923923
}
924-
disabled={newMigrationData?.project_current_step?.toString() !== stepId}
924+
disabled={newMigrationData?.project_current_step > 4}
925925
/>
926926
</Tooltip>
927927
)}
@@ -1376,7 +1376,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
13761376
maxWidth="290px"
13771377
isClearable={selectedOptions?.includes(existingField?.[data?.uid]?.label ?? '')}
13781378
options={adjustedOptions}
1379-
isDisabled={OptionValue?.isDisabled || newMigrationData?.project_current_step?.toString() !== stepId}
1379+
isDisabled={OptionValue?.isDisabled || newMigrationData?.project_current_step > 4}
13801380
/>
13811381
</div>
13821382
{!OptionValue?.isDisabled && (
@@ -1391,7 +1391,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
13911391
>
13921392
<Button
13931393
buttonType="light"
1394-
disabled={(contentTypeSchema && existingField[data?.uid] || newMigrationData?.project_current_step?.toString() !== stepId) ? true : false}
1394+
disabled={(contentTypeSchema && existingField[data?.uid] || newMigrationData?.project_current_step > 4) ? true : false}
13951395
>
13961396
<Icon
13971397
version={'v2'}
@@ -1995,7 +1995,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
19951995
placeholder={otherContentType?.label}
19961996
isSearchable
19971997
version="v2"
1998-
isDisabled={newMigrationData?.project_current_step?.toString() !== stepId}
1998+
isDisabled={newMigrationData?.project_current_step > 4}
19991999
/>
20002000
</div>
20012001
)}
@@ -2015,7 +2015,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
20152015
className="saveButton"
20162016
onClick={handleSaveContentType}
20172017
version="v2"
2018-
disabled={newMigrationData?.project_current_step?.toString() !== stepId}
2018+
disabled={newMigrationData?.project_current_step > 4}
20192019
>
20202020
Save
20212021
</Button>

ui/src/components/MigrationFlowHeader/index.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ type MigrationFlowHeaderProps = {
2121
finalExecutionStarted?: boolean;
2222
};
2323

24+
/**
25+
* Renders a MigrationFlowHeader component to show the project name and CTA to proceed to next step
26+
* @param projectData - The projectData object containing project details.
27+
* @param handleOnClick - Callback function to proceed to next step.
28+
* @param isLoading - isLoading flag to load redux data
29+
* @param finalExecutionStarted - The finalExecutionStarted boolean to check if migration execution is started to disable Start Migration button.
30+
*/
2431
const MigrationFlowHeader = ({projectData, handleOnClick, isLoading, finalExecutionStarted }: MigrationFlowHeaderProps) => {
2532
const [projectName, setProjectName] = useState('');
2633
const [currentStep, setCurrentStep] = useState<number>(0);
@@ -37,6 +44,9 @@ const MigrationFlowHeader = ({projectData, handleOnClick, isLoading, finalExecut
3744
}, [selectedOrganisation?.value, params?.projectId]);
3845

3946
/******** Function to get project ********/
47+
/**
48+
* Fetch the project details project name and current step.
49+
*/
4050
const fetchProject = async () => {
4151
setProjectName(projectData?.name);
4252
setCurrentStep(projectData?.current_step);
@@ -59,7 +69,7 @@ const MigrationFlowHeader = ({projectData, handleOnClick, isLoading, finalExecut
5969
<div className='d-flex align-items-center justify-content-between migration-flow-header'>
6070
<div className='d-flex align-items-center'>
6171
{ projectName &&
62-
<Tooltip content={projectName} position='top' version={'v2'}>
72+
<Tooltip content={projectName} position='right' version={'v2'}>
6373
<h1 className='project-name-ellipsis'>{projectName}</h1>
6474
</Tooltip>}
6575
</div>

ui/src/pages/Projects/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
width: 100% !important;
2525
}
2626
.PageLayout__head {
27-
border-top: 0 none;
2827
height: auto;
2928
border-bottom: 1px solid $color-brand-secondary-lightest;
3029
border-top: 1px solid $color-brand-secondary-lightest;
3130
left: 56px;
3231
padding:20px 10px 20px 13px;
3332
position: fixed;
3433
width: calc(100% - 56px) !important;
34+
z-index: 1;
3535
}
3636
}
3737
}

0 commit comments

Comments
 (0)