diff --git a/api/src/services/contentMapper.service.ts b/api/src/services/contentMapper.service.ts index 6943c700d..13692542a 100644 --- a/api/src/services/contentMapper.service.ts +++ b/api/src/services/contentMapper.service.ts @@ -751,7 +751,7 @@ const resetToInitialMapping = async (req: Request) => { const fieldMappingData = contentTypeData.fieldMapping.map((itemId: any) => { const fieldData = FieldMapperModel.chain .get("field_mapper") - .find({ id: itemId, projectId: projectId , contentTypeId: contentTypeId}) + .find({ id: itemId, projectId: projectId, contentTypeId: contentTypeId}) .value(); return fieldData; }); @@ -771,7 +771,7 @@ const resetToInitialMapping = async (req: Request) => { //await FieldMapperModel.read(); (fieldMappingData || []).forEach((field: any) => { const fieldIndex = FieldMapperModel.data.field_mapper.findIndex( - (f: any) => f?.id === field?.id && f?.projectId === projectId && f?.contentTypeId === contentTypeId + (f: any) => f?.id === field?.id && f?.projectId === projectId && f?.contentTypeId === contentTypeId ); if (fieldIndex > -1) { FieldMapperModel.update((data: any) => { diff --git a/api/src/services/sitecore.service.ts b/api/src/services/sitecore.service.ts index 03da4b23a..7247dff20 100644 --- a/api/src/services/sitecore.service.ts +++ b/api/src/services/sitecore.service.ts @@ -119,9 +119,8 @@ const uidCorrector = ({ uid } :{uid : string}) => { newUid = newUid .replace(/[ -]/g, '_') // Replace spaces and hyphens with underscores .replace(/[^a-zA-Z0-9_]+/g, '_') // Replace non-alphanumeric characters (except underscore) - .replace(/\$/g, '') // Remove dollar signs - .toLowerCase() // Convert to lowercase .replace(/([A-Z])/g, (match) => `_${match.toLowerCase()}`) // Handle camelCase + .toLowerCase() // Convert to lowercase .replace(/_+/g, '_') // Replace multiple underscores with single .replace(/^_|_$/g, ''); // Remove leading/trailing underscores diff --git a/api/src/utils/content-type-creator.utils.ts b/api/src/utils/content-type-creator.utils.ts index a6c7d63d7..9bc51d83a 100644 --- a/api/src/utils/content-type-creator.utils.ts +++ b/api/src/utils/content-type-creator.utils.ts @@ -88,9 +88,8 @@ const uidCorrector = ({ uid } : {uid : string}) => { newUid = newUid .replace(/[ -]/g, '_') // Replace spaces and hyphens with underscores .replace(/[^a-zA-Z0-9_]+/g, '_') // Replace non-alphanumeric characters (except underscore) - .replace(/\$/g, '') // Remove dollar signs - .toLowerCase() // Convert to lowercase .replace(/([A-Z])/g, (match) => `_${match.toLowerCase()}`) // Handle camelCase + .toLowerCase() // Convert to lowercase .replace(/_+/g, '_') // Replace multiple underscores with single .replace(/^_|_$/g, ''); // Remove leading/trailing underscores diff --git a/ui/src/components/ContentMapper/index.scss b/ui/src/components/ContentMapper/index.scss index d8ac18003..37eb6355b 100644 --- a/ui/src/components/ContentMapper/index.scss +++ b/ui/src/components/ContentMapper/index.scss @@ -152,14 +152,7 @@ .Table { border-left: 0 none; min-height: 26.25rem; - // &__rowgroup { - // display: flex; - // flex: 1; - // flex-direction: column; - // } .Table__body__row { - // height: auto!important; - // min-height: 80px; .Table-select-body { >.checkbox-wrapper { align-items: flex-start; diff --git a/ui/src/components/ContentMapper/index.tsx b/ui/src/components/ContentMapper/index.tsx index 61077da89..71dbd7b3b 100644 --- a/ui/src/components/ContentMapper/index.tsx +++ b/ui/src/components/ContentMapper/index.tsx @@ -2645,20 +2645,6 @@ const ContentMapper = forwardRef(({ handleStepChange }: contentMapperProps, ref: initialRowSelectedData={initialRowSelectedData} initialSelectedRowIds={rowIds} itemSize={80} - // v2Features={{ - // isNewEmptyState: true - // }} - // customEmptyState={ - // No Fields available} - // moduleIcon="NoSearchResult" - // description="Try changing the search query to find what you are looking for." - // version="v2" - // testId="no-results-found-page" - // className="custom-empty-state" - // /> - // } withExportCta={{ component: (
diff --git a/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx b/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx index 84343f755..29369aac5 100644 --- a/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx +++ b/ui/src/components/LegacyCms/Actions/LoadPrefix.tsx @@ -122,7 +122,7 @@ const LoadPreFix = (props: LoadSelectCmsProps) => { }; dispatch(updateNewMigrationData(newMigrationDataObj)); } - } + }; /**** ALL USEEffects HERE ****/ @@ -146,9 +146,7 @@ const LoadPreFix = (props: LoadSelectCmsProps) => { isReadOnly={newMigrationData?.legacy_cms?.uploadedFile?.isValidated} onBlur={(e: React.FocusEvent) => { handleOnBlur(e.target.value); - }} - /> {isError &&

{errorMessage}

}
diff --git a/ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx b/ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx index 502728e03..dfd29427d 100644 --- a/ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx +++ b/ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx @@ -357,9 +357,12 @@ const LoadUploadFile = (props: LoadUploadFileProps) => { setShowMessage(true); setValidationMessage('File validated successfully.'); setIsDisabled(true); + if ( !isEmptyString(newMigrationData?.legacy_cms?.selectedCms?.cms_id) || - (!isEmptyString(newMigrationData?.legacy_cms?.selectedFileFormat?.fileformat_id) && - props.handleStepChange(props?.currentStep, true)); + !isEmptyString(newMigrationData?.legacy_cms?.selectedFileFormat?.fileformat_id) + ) { + props.handleStepChange(props?.currentStep, true); + } } if (newMigrationData?.legacy_cms?.uploadedFile?.reValidate) { setValidationMessage(''); @@ -368,10 +371,6 @@ const LoadUploadFile = (props: LoadUploadFileProps) => { setIsDisabled(false); } setReValidate(newMigrationData?.legacy_cms?.uploadedFile?.reValidate || false); - - // else{ - // setIsValidated(false); - // } }, [isValidated, newMigrationData]); diff --git a/ui/src/components/Stepper/HorizontalStepper/HorizontalStepper.tsx b/ui/src/components/Stepper/HorizontalStepper/HorizontalStepper.tsx index de67b07ab..3a1be8f44 100644 --- a/ui/src/components/Stepper/HorizontalStepper/HorizontalStepper.tsx +++ b/ui/src/components/Stepper/HorizontalStepper/HorizontalStepper.tsx @@ -159,11 +159,6 @@ const HorizontalStepper = forwardRef( shouldCloseOnOverlayClick: false } }); - } else if ( - -1 < newMigrationData?.legacy_cms?.currentStep && - newMigrationData?.legacy_cms?.currentStep < 2 - ) { - // showNotification(newMigrationData?.legacy_cms?.currentStep + 1); } else if ( newMigrationData?.destination_stack?.selectedStack === undefined || newMigrationData?.destination_stack?.selectedStack === null ||