fix: notion integration (#2888)

This commit is contained in:
Dhruwang Jariwala
2024-07-15 19:59:42 +05:30
committed by GitHub
parent 8ac9b23de3
commit aa495312db
2 changed files with 6 additions and 4 deletions

View File

@@ -309,7 +309,7 @@ export const AddIntegrationModal = ({
col={mapping[idx].column}
ques={mapping[idx].question}
/>
<div className="flex w-full items-center gap-3">
<div className="flex w-full items-center">
<div className="flex w-full items-center">
<div className="w-[340px] max-w-full">
<DropdownSelector
@@ -483,7 +483,7 @@ export const AddIntegrationModal = ({
{selectedDatabase && selectedSurvey && (
<div>
<Label>Map Formbricks fields to Notion property</Label>
<div className="mt-4">
<div className="mt-4 max-h-[20vh] w-full overflow-y-auto">
{mapping.map((_, idx) => (
<MappingRow idx={idx} key={idx} />
))}

View File

@@ -227,7 +227,7 @@ const buildNotionPayloadProperties = (
} else {
const value = responses[map.question.id];
properties[map.column.name] = {
[map.column.type]: getValue(map.column.type, processResponseData(value)),
[map.column.type]: getValue(map.column.type, value),
};
}
});
@@ -245,7 +245,9 @@ const getValue = (colType: string, value: string | string[] | number | Record<st
name: value,
};
case "multi_select":
return (value as []).map((v: string) => ({ name: v }));
if (Array.isArray(value)) {
return value.map((v: string) => ({ name: v }));
}
case "title":
return [
{