Skip to content
Merged

Dev #177

Changes from 1 commit
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
Prev Previous commit
Next Next commit
refactor:added id to mapper
  • Loading branch information
AishDani committed Jul 9, 2024
commit 31c063a29b8f087870f309f536e09059fcae6315
11 changes: 11 additions & 0 deletions uplaode-api/migration-sitecore/libs/contenttypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const ContentTypeSchema = ({ type, name, uid, default_value = "", description =
switch (type) {
case 'Single-Line Text': {
return {
id: id,
uid: sitecoreKey,
"otherCmsField": name,
"otherCmsType": type,
Expand All @@ -118,6 +119,7 @@ const ContentTypeSchema = ({ type, name, uid, default_value = "", description =
}
case 'Checkbox': {
return {
id: id,
uid: sitecoreKey,
"otherCmsField": name,
"otherCmsType": type,
Expand All @@ -130,6 +132,7 @@ const ContentTypeSchema = ({ type, name, uid, default_value = "", description =
}
case 'Rich Text': {
return {
id: id,
uid: sitecoreKey,
"otherCmsField": name,
"otherCmsType": type,
Expand All @@ -142,6 +145,7 @@ const ContentTypeSchema = ({ type, name, uid, default_value = "", description =

case 'Droplist': {
return {
id: id,
uid: sitecoreKey,
"otherCmsField": name,
"otherCmsType": type,
Expand All @@ -154,6 +158,7 @@ const ContentTypeSchema = ({ type, name, uid, default_value = "", description =

case "Image": {
return {
id: id,
uid: sitecoreKey,
"otherCmsField": name,
"otherCmsType": type,
Expand All @@ -166,6 +171,7 @@ const ContentTypeSchema = ({ type, name, uid, default_value = "", description =
case "General Link":
case "Internal Link": {
return {
id: id,
uid: sitecoreKey,
"otherCmsField": name,
"otherCmsType": type,
Expand All @@ -178,6 +184,7 @@ const ContentTypeSchema = ({ type, name, uid, default_value = "", description =

case "Multi-Line Text": {
return {
id: id,
uid: sitecoreKey,
"otherCmsField": name,
"otherCmsType": type,
Expand All @@ -192,6 +199,7 @@ const ContentTypeSchema = ({ type, name, uid, default_value = "", description =
case "Integer":
case "Number": {
return {
id: id,
uid: sitecoreKey,
"otherCmsField": name,
"otherCmsType": type,
Expand All @@ -206,6 +214,7 @@ const ContentTypeSchema = ({ type, name, uid, default_value = "", description =
case "Date":
case "Time": {
return {
id: id,
uid: sitecoreKey,
"otherCmsField": name,
"otherCmsType": type,
Expand All @@ -219,6 +228,7 @@ const ContentTypeSchema = ({ type, name, uid, default_value = "", description =
case 'Grouped Droplist': {
if (choices?.length) {
return {
id: id,
uid: sitecoreKey,
"otherCmsField": name,
"otherCmsType": type,
Expand All @@ -233,6 +243,7 @@ const ContentTypeSchema = ({ type, name, uid, default_value = "", description =
case "Treelist": {
if (sourLet?.key !== "source") {
return {
id: id,
uid: sitecoreKey,
"otherCmsField": name,
"otherCmsType": type,
Expand Down