diff --git a/sites/partners/page_content/locale_overrides/general.json b/sites/partners/page_content/locale_overrides/general.json index 78c2db41a5..e2838522b7 100644 --- a/sites/partners/page_content/locale_overrides/general.json +++ b/sites/partners/page_content/locale_overrides/general.json @@ -222,6 +222,8 @@ "listings.pdfHelperText": "Select PDF file", "listings.pickupAddress": "Pickup Address", "listings.postmarksConsideredQuestion": "Are postmarks considered?", + "listings.providesAdditionalFields": "Provides additional fields", + "listings.providesAdditionalFields.info": "This preference provides additional details that will be included in the exported data", "listings.publishThisListing": "Publishing will push the listing live on the public site.", "listings.receivedByDate": "Received by Date", "listings.receivedByTime": "Received by Time", diff --git a/sites/partners/src/components/applications/PaperApplicationForm/PaperApplicationForm.tsx b/sites/partners/src/components/applications/PaperApplicationForm/PaperApplicationForm.tsx index 870bde765b..ba04129551 100644 --- a/sites/partners/src/components/applications/PaperApplicationForm/PaperApplicationForm.tsx +++ b/sites/partners/src/components/applications/PaperApplicationForm/PaperApplicationForm.tsx @@ -172,6 +172,7 @@ const ApplicationForm = ({ listingId, editMode, application }: ApplicationFormPr <> diff --git a/sites/partners/src/components/listings/PaperListingForm/sections/SelectAndOrder.tsx b/sites/partners/src/components/listings/PaperListingForm/sections/SelectAndOrder.tsx index ae0e276ec5..0583489b64 100644 --- a/sites/partners/src/components/listings/PaperListingForm/sections/SelectAndOrder.tsx +++ b/sites/partners/src/components/listings/PaperListingForm/sections/SelectAndOrder.tsx @@ -1,8 +1,9 @@ import React, { useState, useEffect, useMemo, useCallback } from "react" import { t, MinimalTable, Drawer, Field, StandardTableData } from "@bloom-housing/ui-components" -import { Button, Card, Grid } from "@bloom-housing/ui-seeds" +import { Button, Card, Grid, Tag, Icon } from "@bloom-housing/ui-seeds" import { useFormContext } from "react-hook-form" import { ApplicationSection, MultiselectQuestion } from "@bloom-housing/backend-core/types" +import { faInfoCircle } from "@fortawesome/free-solid-svg-icons" import LinkComponent from "../../../../components/core/LinkComponent" import SectionWithGrid from "../../../shared/SectionWithGrid" @@ -75,10 +76,21 @@ const SelectAndOrder = ({ [draftListingData] ) + const additionalFieldsTag = () => ( + + {t("listings.providesAdditionalFields")} + + ) + const draggableTableData: StandardTableData = useMemo( () => draftListingData.map((item) => ({ name: { content: item.text }, + additionalFields: { + content: ( + <>{item?.options.some((item) => item.collectAddress) && additionalFieldsTag()} + ), + }, action: { content: (
@@ -104,6 +116,11 @@ const SelectAndOrder = ({ listingData.map((item, index) => ({ order: { content: index + 1 }, name: { content: item.text }, + additionalFields: { + content: ( + <>{item?.options.some((item) => item.collectAddress) && additionalFieldsTag()} + ), + }, action: { content: (
@@ -145,11 +162,17 @@ const SelectAndOrder = ({ const formTableHeaders = { order: "t.order", name: "t.name", + ...(formKey === "preference" && { + additionalFields: "settings.preferenceAdditionalFields", + }), action: "", } const draggableTableHeaders = { name: "t.name", + ...(formKey === "preference" && { + additionalFields: "settings.preferenceAdditionalFields", + }), action: "", } @@ -188,11 +211,19 @@ const SelectAndOrder = ({ })}
)} + {option.collectAddress && ( +
+ ({t("listings.providesAdditionalFields.info")}) +
+ )}
) } return (
+ {item.options.some((option) => option.collectAddress) && ( +
{additionalFieldsTag()}
+ )}