mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-24 06:28:49 -05:00
fix: show responses in summary that doesn't fit the current schema (#2318)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
This commit is contained in:
committed by
GitHub
parent
6004505502
commit
dfb1f86ddb
+1
-1
@@ -77,7 +77,7 @@ export default function MultipleChoiceSummary({
|
||||
{result.others && result.others.length > 0 && (
|
||||
<div className="mt-4 rounded-lg border border-slate-200">
|
||||
<div className="grid h-12 grid-cols-2 content-center rounded-t-lg bg-slate-100 text-left text-sm font-semibold text-slate-900">
|
||||
<div className="col-span-1 pl-6 ">Specified "Other" answers</div>
|
||||
<div className="col-span-1 pl-6 ">Other values found</div>
|
||||
<div className="col-span-1 pl-6 ">{surveyType === "web" && "User"}</div>
|
||||
</div>
|
||||
{result.others
|
||||
|
||||
@@ -733,14 +733,13 @@ export const getQuestionWiseSummary = (
|
||||
});
|
||||
});
|
||||
|
||||
if (isOthersEnabled) {
|
||||
values.push({
|
||||
value: getLocalizedValue(lastChoice.label, "default") || "Other",
|
||||
count: otherValues.length,
|
||||
percentage: convertFloatTo2Decimal((otherValues.length / totalResponseCount) * 100),
|
||||
others: otherValues.slice(0, VALUES_LIMIT),
|
||||
});
|
||||
}
|
||||
// Push all other values
|
||||
values.push({
|
||||
value: "Other",
|
||||
count: otherValues.length,
|
||||
percentage: convertFloatTo2Decimal((otherValues.length / totalResponseCount) * 100),
|
||||
others: otherValues.slice(0, VALUES_LIMIT),
|
||||
});
|
||||
|
||||
summary.push({
|
||||
type: question.type,
|
||||
|
||||
Reference in New Issue
Block a user