diff --git a/ui/src/components/Card/index.tsx b/ui/src/components/Card/index.tsx index 2e3810f1..f3e047c5 100644 --- a/ui/src/components/Card/index.tsx +++ b/ui/src/components/Card/index.tsx @@ -64,10 +64,10 @@ const CardList = ({ project }: ProjectType) => { return (
-
onClickProject(project?.id || '')}> +
onClickProject(project?.id ?? '')}>
- +
{project?.name &&

{project?.name}

}
diff --git a/ui/src/components/ContentMapper/index.tsx b/ui/src/components/ContentMapper/index.tsx index 1c97b2dc..305f97bb 100644 --- a/ui/src/components/ContentMapper/index.tsx +++ b/ui/src/components/ContentMapper/index.tsx @@ -929,7 +929,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R data?.otherCmsField === 'url' || data?.otherCmsField === 'reference'|| data?.contentstackFieldType === "global_field" || - newMigrationData?.project_current_step?.toString() !== stepId + newMigrationData?.project_current_step > 4 } />
@@ -955,7 +955,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R onClick={() => handleAdvancedSetting(fieldLabel, data?.advanced || {}, data?.uid, data) } - disabled={newMigrationData?.project_current_step?.toString() !== stepId} + disabled={newMigrationData?.project_current_step > 4} /> )} @@ -1412,7 +1412,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R maxWidth="290px" isClearable={selectedOptions?.includes(existingField?.[data?.uid]?.label ?? '')} options={adjustedOptions} - isDisabled={OptionValue?.isDisabled || newMigrationData?.project_current_step?.toString() !== stepId} + isDisabled={OptionValue?.isDisabled || newMigrationData?.project_current_step > 4} />
{!OptionValue?.isDisabled && ( @@ -1427,7 +1427,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R >
)} @@ -2071,7 +2071,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R className="saveButton" onClick={handleSaveContentType} version="v2" - disabled={newMigrationData?.project_current_step?.toString() !== stepId} + disabled={newMigrationData?.project_current_step > 4} > Save diff --git a/ui/src/components/MigrationFlowHeader/index.tsx b/ui/src/components/MigrationFlowHeader/index.tsx index ab735811..a44a622b 100644 --- a/ui/src/components/MigrationFlowHeader/index.tsx +++ b/ui/src/components/MigrationFlowHeader/index.tsx @@ -21,6 +21,13 @@ type MigrationFlowHeaderProps = { finalExecutionStarted?: boolean; }; +/** + * Renders a MigrationFlowHeader component to show the project name and CTA to proceed to next step + * @param projectData - The projectData object containing project details. + * @param handleOnClick - Callback function to proceed to next step. + * @param isLoading - isLoading flag to load redux data + * @param finalExecutionStarted - The finalExecutionStarted boolean to check if migration execution is started to disable Start Migration button. + */ const MigrationFlowHeader = ({projectData, handleOnClick, isLoading, finalExecutionStarted }: MigrationFlowHeaderProps) => { const [projectName, setProjectName] = useState(''); const [currentStep, setCurrentStep] = useState(0); @@ -37,6 +44,9 @@ const MigrationFlowHeader = ({projectData, handleOnClick, isLoading, finalExecut }, [selectedOrganisation?.value, params?.projectId]); /******** Function to get project ********/ + /** + * Fetch the project details project name and current step. + */ const fetchProject = async () => { setProjectName(projectData?.name); setCurrentStep(projectData?.current_step); @@ -59,7 +69,7 @@ const MigrationFlowHeader = ({projectData, handleOnClick, isLoading, finalExecut
{ projectName && - +

{projectName}

}
diff --git a/ui/src/pages/Projects/index.scss b/ui/src/pages/Projects/index.scss index 9e8e6d71..edd496b2 100644 --- a/ui/src/pages/Projects/index.scss +++ b/ui/src/pages/Projects/index.scss @@ -24,7 +24,6 @@ width: 100% !important; } .PageLayout__head { - border-top: 0 none; height: auto; border-bottom: 1px solid $color-brand-secondary-lightest; border-top: 1px solid $color-brand-secondary-lightest; @@ -32,6 +31,7 @@ padding:20px 10px 20px 13px; position: fixed; width: calc(100% - 56px) !important; + z-index: 1; } } }