Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/src/services/contentMapper.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand All @@ -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) => {
Expand Down
3 changes: 1 addition & 2 deletions api/src/services/sitecore.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions api/src/utils/content-type-creator.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 0 additions & 7 deletions ui/src/components/ContentMapper/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 0 additions & 14 deletions ui/src/components/ContentMapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2645,20 +2645,6 @@ const ContentMapper = forwardRef(({ handleStepChange }: contentMapperProps, ref:
initialRowSelectedData={initialRowSelectedData}
initialSelectedRowIds={rowIds}
itemSize={80}
// v2Features={{
// isNewEmptyState: true
// }}
// customEmptyState={
// <EmptyState
// forPage="list"
// heading={<div className="empty_search_heading">No Fields available</div>}
// 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: (
<div className='d-flex align-items-center'>
Expand Down
4 changes: 1 addition & 3 deletions ui/src/components/LegacyCms/Actions/LoadPrefix.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const LoadPreFix = (props: LoadSelectCmsProps) => {
};
dispatch(updateNewMigrationData(newMigrationDataObj));
}
}
};

/**** ALL USEEffects HERE ****/

Expand All @@ -146,9 +146,7 @@ const LoadPreFix = (props: LoadSelectCmsProps) => {
isReadOnly={newMigrationData?.legacy_cms?.uploadedFile?.isValidated}
onBlur={(e: React.FocusEvent<HTMLInputElement>) => {
handleOnBlur(e.target.value);

}}

/>
{isError && <p className="errorMessage">{errorMessage}</p>}
</div>
Expand Down
11 changes: 5 additions & 6 deletions ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
Expand All @@ -368,10 +371,6 @@ const LoadUploadFile = (props: LoadUploadFileProps) => {
setIsDisabled(false);
}
setReValidate(newMigrationData?.legacy_cms?.uploadedFile?.reValidate || false);

// else{
// setIsValidated(false);
// }
}, [isValidated, newMigrationData]);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down