diff --git a/shared-helpers/src/views/accounts/AccountCard.module.scss b/shared-helpers/src/views/accounts/AccountCard.module.scss index 485bfb787a..c9fa125e30 100644 --- a/shared-helpers/src/views/accounts/AccountCard.module.scss +++ b/shared-helpers/src/views/accounts/AccountCard.module.scss @@ -1,13 +1,19 @@ .account-card { - --card-header-padding-inline-desktop: var(--seeds-s12); - --card-header-padding-inline-mobile: var(--seeds-s4); - --card-content-padding-inline-mobile: var(--seeds-s4); - --card-border-width: 0rem; - --card-divider-width: var(--seeds-border-1); width: 100%; + height: 100%; + justify-content: space-between; @media (max-width: theme("screens.sm")) { --card-spacing-lg: var(--seeds-s6); - --card-border-radius: 0rem; + } +} + +.account-card-inline-desktop { + --card-header-padding-inline-desktop: var(--seeds-s12); +} + +.account-card-inline-mobile { + @media (max-width: theme("screens.sm")) { + --card-header-padding-inline-mobile: var(--seeds-s4); } } @@ -16,8 +22,11 @@ } .account-card-heading-group { - --subheading-margin: var(--seeds-s3); --heading-margin: var(--seeds-s3); + --subheading-color: var(--seeds-text-color-light); + @media (max-width: theme("screens.sm")) { + --subheading-margin: var(--seeds-s3); + } } .account-card-heading { diff --git a/shared-helpers/src/views/accounts/AccountCard.tsx b/shared-helpers/src/views/accounts/AccountCard.tsx index f199d7809c..47ef391218 100644 --- a/shared-helpers/src/views/accounts/AccountCard.tsx +++ b/shared-helpers/src/views/accounts/AccountCard.tsx @@ -13,11 +13,15 @@ interface AccountCardProps { divider?: "flush" | "inset" headingPriority?: 1 | 2 | 3 | 4 | 5 | 6 className?: string + thinDesktop?: boolean + thinMobile?: boolean } const AccountCard = (props: AccountCardProps) => { const classNames = [styles["account-card"]] if (props.className) classNames.push(props.className) + if (!props.thinDesktop) classNames.push(styles["account-card-inline-desktop"]) + if (props.thinMobile) classNames.push(styles["account-card-inline-mobile"]) const customIcon = CustomIconMap[props.iconSymbol] diff --git a/sites/public/src/components/account/StatusItem.module.scss b/sites/public/src/components/account/StatusItem.module.scss index 8abc78ad41..203fab5a0d 100644 --- a/sites/public/src/components/account/StatusItem.module.scss +++ b/sites/public/src/components/account/StatusItem.module.scss @@ -1,8 +1,8 @@ .status-item { position: relative; padding: var(--seeds-s4); - background-color: var(--seeds-color-primary-lighter); - color: var(--seeds-gray-800); + background-color: var(--seeds-bg-color-muted); + color: var(--seeds-color-gray-900); border-bottom-width: 0.0625rem; border-style: solid; border-color: var(--seeds-color-gray-450); @@ -16,7 +16,7 @@ border-style: solid; border-color: var(--seeds-color-gray-450); margin-bottom: var(seeds-s4); - @media (max-width: theme("screens.md")) { + @media (max-width: theme("screens.sm")) { padding-bottom: var(--seeds-s2); display: block; } @@ -31,17 +31,22 @@ text-align: right; align-self: center; font-size: var(--seeds-font-size-sm); - @media (max-width: theme("screens.md")) { + color: var(--seeds-color-gray-750); + @media (max-width: theme("screens.sm")) { text-align: left; padding-top: var(--seeds-s2_5); } } +.status-item__due-date { + font-weight: var(--seeds-font-weight-semibold); +} + .status-item__content { display: flex; justify-content: space-between; padding-top: var(--seeds-s4); - @media (max-width: theme("screens.md")) { + @media (max-width: theme("screens.sm")) { display: grid; } } @@ -54,10 +59,9 @@ padding-top: 0; text-align: right; - @media (max-width: theme("screens.md")) { + @media (max-width: theme("screens.sm")) { text-align: center; padding-top: var(seeds-s4); - margin-bottom: var(--seeds-s4); } } @@ -68,15 +72,17 @@ justify-content: flex-start; padding-top: var(--seeds-s4); width: fit-content; - @media (max-width: theme("screens.md")) { + @media (max-width: theme("screens.sm")) { flex-direction: column; + padding-top: var(--seeds-s6); } } .status-item__status { padding-block: 0; font-size: var(--seeds-font-size-sm); - @media (max-width: theme("screens.md")) { + color: var(--seeds-color-gray-750); + @media (max-width: theme("screens.sm")) { padding-block: var(--seeds-s4); } } @@ -88,5 +94,6 @@ .status-item__confirm-number { font-size: var(--seeds-font-size-lg); + font-weight: var(--seeds-font-weight-semibold); padding-top: var(--seeds-s2); } diff --git a/sites/public/src/components/account/StatusItem.tsx b/sites/public/src/components/account/StatusItem.tsx index 94f32ad023..3237ee12cf 100644 --- a/sites/public/src/components/account/StatusItem.tsx +++ b/sites/public/src/components/account/StatusItem.tsx @@ -24,9 +24,7 @@ interface StatusItemProps { const StatusItem = (props: StatusItemProps) => { return ( - +

{props.listingName}

@@ -57,7 +55,7 @@ const StatusItem = (props: StatusItemProps) => { {props.applicationDueDate && (

{props.strings?.applicationsDeadline ?? t("listings.applicationDeadline")}:{" "} - {props.applicationDueDate} + {props.applicationDueDate}

)} @@ -70,7 +68,7 @@ const StatusItem = (props: StatusItemProps) => {
-
diff --git a/sites/public/src/components/applications/SubmittedApplicationView.modules.scss b/sites/public/src/components/applications/SubmittedApplicationView.modules.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sites/public/src/components/applications/SubmittedApplicationView.tsx b/sites/public/src/components/applications/SubmittedApplicationView.tsx new file mode 100644 index 0000000000..a500d8e07a --- /dev/null +++ b/sites/public/src/components/applications/SubmittedApplicationView.tsx @@ -0,0 +1,101 @@ +import { t } from "@bloom-housing/ui-components" +import { Button, Card, Heading, Icon } from "@bloom-housing/ui-seeds" +import FormSummaryDetails from "../shared/FormSummaryDetails" +import { listingSectionQuestions } from "@bloom-housing/shared-helpers" +import { + Application, + Listing, + MultiselectQuestionsApplicationSectionEnum, +} from "@bloom-housing/shared-helpers/src/types/backend-swagger" +import { useMemo } from "react" +import { DATE_FORMAT } from "../../lib/constants" +import dayjs from "dayjs" +import { faChevronLeft } from "@fortawesome/free-solid-svg-icons" + +interface SubmittedApplicationViewProps { + application: Application + listing: Listing + backHref: string +} + +const SubmittedApplicationView = ({ + application, + listing, + backHref, +}: SubmittedApplicationViewProps) => { + const confirmationDate = useMemo(() => { + return dayjs().format(DATE_FORMAT) + }, []) + + return ( + <> + + + + {listing?.name} + + + +
+ {listing && ( + + )} +
+
+
+ + + + + {t("application.confirmation.informationSubmittedTitle")} + +

+ {t("application.confirmation.submitted")} + {confirmationDate} +

+
+ +

{`${t("application.yourLotteryNumber")}:`}

+

+ {application?.confirmationCode || application?.id} +

+
+ + +
+ +
+
+
+ + ) +} + +export { SubmittedApplicationView as default, SubmittedApplicationView } diff --git a/sites/public/src/components/shared/FormSummaryDetails.tsx b/sites/public/src/components/shared/FormSummaryDetails.tsx index 3b1cd8ce01..0d96bdb970 100644 --- a/sites/public/src/components/shared/FormSummaryDetails.tsx +++ b/sites/public/src/components/shared/FormSummaryDetails.tsx @@ -142,7 +142,7 @@ const FormSummaryDetails = ({ ) => { return ( <> -

+

{header} {editMode && !validationError && }

@@ -187,7 +187,7 @@ const FormSummaryDetails = ({ return ( <> -

+

{t("t.you")} {editMode && }

@@ -304,7 +304,7 @@ const FormSummaryDetails = ({ {application.alternateContact.type !== "" && application.alternateContact.type !== "noContact" && (
-

+

{t("application.alternateContact.type.label")} {editMode && !validationError && ( @@ -365,7 +365,7 @@ const FormSummaryDetails = ({ {application.householdSize > 1 && (
-

+

{t("application.household.householdMembers")} {editMode && !validationError && ( @@ -417,7 +417,7 @@ const FormSummaryDetails = ({ )}
-

+

{t("application.review.householdDetails")} {editMode && !validationError && ( @@ -478,7 +478,7 @@ const FormSummaryDetails = ({ : null )} -

+

{t("t.income")} {editMode && !validationError && }

diff --git a/sites/public/src/pages/account/StatusItemWrapper.tsx b/sites/public/src/pages/account/StatusItemWrapper.tsx index 1629112a30..599359f4b0 100644 --- a/sites/public/src/pages/account/StatusItemWrapper.tsx +++ b/sites/public/src/pages/account/StatusItemWrapper.tsx @@ -11,11 +11,11 @@ interface StatusItemWrapperProps { } const StatusItemWrapper = (props: StatusItemWrapperProps) => { + const applicationDueDate = props.application?.fullListing?.applicationDueDate + return ( { const router = useRouter() const applicationId = router.query.id as string - const { applicationsService, listingsService } = useContext(AuthContext) - const { profile } = useContext(AuthContext) + const { applicationsService, listingsService, profile } = useContext(AuthContext) const [application, setApplication] = useState() const [listing, setListing] = useState() const [unauthorized, setUnauthorized] = useState(false) @@ -50,71 +49,41 @@ export default () => { {noApplication && ( - {t("account.application.error")}}> -

{t("account.application.noApplicationError")}

- - {t("account.application.return")} - -
+ + + + {t("account.application.error")} + + + +

{t("account.application.noApplicationError")}

+ +
+
)} {unauthorized && ( - {t("account.application.error")}}> -

{t("account.application.noAccessError")}

- - {t("account.application.return")} - -
+ + + + {t("account.application.error")} + + + +

{t("account.application.noAccessError")}

+ +
+
)} {application && ( - <> - {t("account.application.confirmation")}} - > -
- {listing && ( - - - {t("application.confirmation.viewOriginalListing")} - - - )} -
-
- - -
-

- {t("application.confirmation.informationSubmittedTitle")} -

-

- {t("application.confirmation.submitted")} - {dateToString(application.submissionDate)} -

-
-
-

- {t("application.confirmation.lotteryNumber")} -

- -

- {application.confirmationCode || application.id} -

-
- - - -
-
- -
-
-
- + )}
diff --git a/sites/public/src/pages/account/applications.tsx b/sites/public/src/pages/account/applications.tsx index 4f370fd3ed..793c8aa73a 100644 --- a/sites/public/src/pages/account/applications.tsx +++ b/sites/public/src/pages/account/applications.tsx @@ -62,21 +62,21 @@ const Applications = () => { const noApplicationsSection = () => { return ( - - {error ? ( - {`${t("account.errorFetchingApplications")}`} - ) : ( - <> - - {t("account.noApplications")} - - - - )} + +
+ {error ? ( + {`${t("account.errorFetchingApplications")}`} + ) : ( + <> + + {t("account.noApplications")} + + + + )} +
) } @@ -93,7 +93,9 @@ const Applications = () => { iconSymbol="application" title={t("account.myApplications")} subtitle={t("account.myApplicationsSubtitle")} + headingPriority={1} divider="inset" + thinMobile > <> diff --git a/sites/public/src/pages/account/dashboard.tsx b/sites/public/src/pages/account/dashboard.tsx index df964db8d5..e9087870e0 100644 --- a/sites/public/src/pages/account/dashboard.tsx +++ b/sites/public/src/pages/account/dashboard.tsx @@ -63,9 +63,11 @@ function Dashboard(props: DashboardProps) { iconSymbol="application" title={t("account.myApplications")} subtitle={t("account.myApplicationsSubtitle")} + thinDesktop > - + diff --git a/sites/public/src/pages/account/edit.tsx b/sites/public/src/pages/account/edit.tsx index 12525d9c5f..2132780793 100644 --- a/sites/public/src/pages/account/edit.tsx +++ b/sites/public/src/pages/account/edit.tsx @@ -156,6 +156,7 @@ const Edit = () => { subtitle={t("account.accountSettingsSubtitle")} divider="inset" headingPriority={1} + thinMobile > <> @@ -170,7 +171,7 @@ const Edit = () => { {nameAlert.message} )} - +