From 96df955f3213ba018c3a9a0f4f1d64e9271dc910 Mon Sep 17 00:00:00 2001 From: Alexandra Goff Date: Fri, 12 Apr 2024 11:23:25 -0700 Subject: [PATCH] [C] add numbers to review + xlsx --- app/api/xlsx/formatter/index.ts | 6 ++++-- components/factories/ReviewFactory/index.tsx | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/api/xlsx/formatter/index.ts b/app/api/xlsx/formatter/index.ts index 5dec5779..da0bff75 100644 --- a/app/api/xlsx/formatter/index.ts +++ b/app/api/xlsx/formatter/index.ts @@ -6,13 +6,14 @@ import select from "./select"; import multiPart from "./inline"; import widget from "./widget"; import tabular from "./tabular"; -import calculator from './calculator' +import calculator from "./calculator"; import { InlineQuestionData, TextInput, WidgetInput } from "@/types/answers"; import { InlineReviewProps, ReviewPart, } from "@/components/questions/Review/Inline"; import { Equation } from "@/types/calculators"; +import { AnswerType } from "@/types/questions"; interface FormatterBaseProps { locale: string; @@ -69,7 +70,7 @@ type Formatter = | TabularFormatter | CalculatorFormatter; -const formatters: Record = { +const formatters: Record = { text, textarea: text, select, @@ -77,6 +78,7 @@ const formatters: Record = { multiPart, tabular, calculator, + number: text, }; export default formatters; diff --git a/components/factories/ReviewFactory/index.tsx b/components/factories/ReviewFactory/index.tsx index 4e0fa092..3940ac67 100644 --- a/components/factories/ReviewFactory/index.tsx +++ b/components/factories/ReviewFactory/index.tsx @@ -17,6 +17,7 @@ const QUESTION_MAP: Record> = { multiPart: Review.Inline, tabular: Review.Tabular, calculator: Review.Calculator, + number: Review.Text, }; const ReviewFactory: FunctionComponent = ({