mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-07 06:12:31 -06:00
fix: added support for date, matrix, address and cal question to notion integration (#2726)
This commit is contained in:
committed by
GitHub
parent
cb44b575c2
commit
48638e8ca2
@@ -263,11 +263,14 @@ export const AddIntegrationModal = ({
|
||||
</>
|
||||
);
|
||||
case ERRORS.MAPPING:
|
||||
const question = questionTypes.find((qt) => qt.id === ques.type);
|
||||
if (!question) return null;
|
||||
return (
|
||||
<>
|
||||
- <i>"{ques.name}"</i> of type{" "}
|
||||
<b>{questionTypes.find((qt) => qt.id === ques.type)?.label}</b> can't be mapped to the
|
||||
column <i>"{col.name}"</i> of type <b>{col.type}</b>
|
||||
- <i>"{ques.name}"</i> of type <b>{question.label}</b> can't be mapped to the
|
||||
column <i>"{col.name}"</i> of type <b>{col.type}</b>. Instead use column of type{" "}
|
||||
{""}
|
||||
<b>{TYPE_MAPPING[question.id].join(" ,")}.</b>
|
||||
</>
|
||||
);
|
||||
default:
|
||||
|
||||
@@ -22,6 +22,10 @@ export const TYPE_MAPPING = {
|
||||
[TSurveyQuestionType.Rating]: ["number"],
|
||||
[TSurveyQuestionType.PictureSelection]: ["url"],
|
||||
[TSurveyQuestionType.FileUpload]: ["url"],
|
||||
[TSurveyQuestionType.Date]: ["date"],
|
||||
[TSurveyQuestionType.Address]: ["rich_text"],
|
||||
[TSurveyQuestionType.Matrix]: ["rich_text"],
|
||||
[TSurveyQuestionType.Cal]: ["checkbox"],
|
||||
};
|
||||
|
||||
export const UNSUPPORTED_TYPES_BY_NOTION = [
|
||||
|
||||
@@ -165,7 +165,7 @@ const buildNotionPayloadProperties = (
|
||||
const value = responses[map.question.id];
|
||||
|
||||
properties[map.column.name] = {
|
||||
[map.column.type]: getValue(map.column.type, value),
|
||||
[map.column.type]: getValue(map.column.type, processResponseData(value)),
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user