@bloom-housing/ui-components 4.0.1-alpha.6 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -252,6 +252,20 @@
252
252
  "general": {
253
253
  "title": "En base a la información que usted ingresó, su hogar no ha solicitado ninguna preferencia de vivienda.",
254
254
  "preamble": "Estará en el grupo general de solicitantes."
255
+ },
256
+ "rosefieldLive": {
257
+ "title": "Anterior Residentes de Rosefield Village reubicados fuera de la ciudad de Alameda",
258
+ "yes": {
259
+ "label": "Al menos un miembro de mi hogar fue residente anterior de Rosefield Village",
260
+ "description": "Al menos un miembro de mi hogar fue residente anterior de Rosefield Village"
261
+ }
262
+ },
263
+ "rosefieldAUSD": {
264
+ "title": "Empleado(a) del Distrito Escolar Unificado Alameda (AUSD)",
265
+ "yes": {
266
+ "label": "Al menos un miembro de mi hogar es empleado del Distrito Escolar Unificado de Alameda",
267
+ "description": "Al menos un miembro de mi hogar es empleado del Distrito Escolar Unificado de Alameda"
268
+ }
255
269
  }
256
270
  },
257
271
  "review": {
@@ -459,6 +473,7 @@
459
473
  "additionalInformation": "Información adicional",
460
474
  "allUnits": "Todas las viviendas",
461
475
  "allUnitsReservedFor": "Todas las viviendas reservadas para %{type}",
476
+ "annualIncome": "%{income} al año",
462
477
  "applicationDeadline": "Fecha límite de solicitud",
463
478
  "applicationFCFS": "Atención por orden de llegada",
464
479
  "applicationFee": "Cargo de solicitud",
@@ -477,7 +492,7 @@
477
492
  "howToApply": "Cómo presentar una Solicitud",
478
493
  "paperApplicationsMustBeMailed": "Las solicitudes impresas deben ser enviadas a través del Servicio Postal de los EE.UU. y no pueden ser entregadas en persona.",
479
494
  "pickUpAnApplication": "Recoja una solicitud.",
480
- "postmarkedApplicationsMustBeReceivedByDate": "Las solicitudes deben recibirse para la fecha límite. Si envía la solicitud a través del Servicio Postal de los EE.UU., la solicitud debe llevar el matasellos a más tardar del %{applicationDueDate} y ser recibida por correo a más tardar el %{postmarkReceivedByDate}. Las solicitudes recibidas por correo después del %{postmarkReceivedByDate} no serán aceptadas incluso si el matasellos lleva una fecha de a más tardar el %{applicationDueDate}. %{developer} no es responsable de correo extraviado o demorado.",
495
+ "submitPaperDueDatePostMark": "Las solicitudes deben recibirse para la fecha límite. Si envía la solicitud a través del Servicio Postal de los EE.UU., la solicitud debe llevar el matasellos a más tardar del %{applicationDueDate} y ser recibida por correo a más tardar el %{postmarkReceivedByDate}. Las solicitudes recibidas por correo después del %{postmarkReceivedByDate} no serán aceptadas incluso si el matasellos lleva una fecha de a más tardar el %{applicationDueDate}. %{developer} no es responsable de correo extraviado o demorado.",
481
496
  "sendByUsMail": "Enviar la Solicitud a través del Servicio Postal de los EE.UU.",
482
497
  "submitAPaperApplication": "Envíe una Solicitud impresa"
483
498
  },
@@ -511,6 +526,7 @@
511
526
  },
512
527
  "maxIncomeMonth": "Ingresos máximos / Mes",
513
528
  "maxIncomeYear": "Ingresos máximos / Año",
529
+ "monthlyIncome": "%{income} al mes",
514
530
  "moreBuildingSelectionCriteria": "Obtenga más información sobre los Criterios de Selección de Edificaciones",
515
531
  "noAvailableUnits": "No hay viviendas disponibles en este momento.",
516
532
  "noOpenListings": "Actualmente ningún listado tiene solicitudes abiertas.",
@@ -242,7 +242,11 @@
242
242
  "provideAMailingAddress": "Provide an address where you can receive updates and materials about your application.",
243
243
  "doYouWorkIn": "Do you work in %{county} County?",
244
244
  "doYouWorkInDescription": "TBD",
245
- "workAddress": "Work Address"
245
+ "workAddress": "Work Address",
246
+ "verifyAddressTitle": "We have located the following address. Please confirm it's correct.",
247
+ "couldntLocateAddress": "We couldn't locate the address you entered. Please confirm it's correct.",
248
+ "suggestedAddress": "Suggested Address:",
249
+ "youEntered": "You Entered:"
246
250
  },
247
251
  "alternateContact": {
248
252
  "type": {
@@ -421,6 +425,17 @@
421
425
  "doNotConsider": {
422
426
  "label": "No"
423
427
  }
428
+ },
429
+ "rentBasedOnIncome": {
430
+ "summary": "Flat Rent & Rent Based on Income",
431
+ "flatRent": {
432
+ "label": "Affordable apartment with flat rent",
433
+ "description": "I would like to apply for an affordable flat rent apartment, which has a set monthly rent amount that is below market rate. Note - applicants with Section 8 Mobile Housing Choice Vouchers (HCV) are welcome to apply."
434
+ },
435
+ "30Percent": {
436
+ "label": "Project based affordable apartments with a rent at 30% of your income",
437
+ "description": "I would like to apply for an apartment with Project-Based subsidy. These apartments require initial screening and yearly certification by the Housing Authority. The Housing Authority will calculate my monthly rent payment to approximately 30% of monthly income."
438
+ }
424
439
  }
425
440
  },
426
441
  "preferences": {
@@ -639,6 +654,20 @@
639
654
  "address": "Address",
640
655
  "name": "Name",
641
656
  "organization": "Name of Organization"
657
+ },
658
+ "rosefieldLive": {
659
+ "title": "Previous Residents of Rosefield Village Relocated Outside of the City of Alameda",
660
+ "yes": {
661
+ "label": "At least one member of my household was a previous resident of Rosefield Village",
662
+ "description": "At least one member of my household was a previous resident of Rosefield Village"
663
+ }
664
+ },
665
+ "rosefieldAUSD": {
666
+ "title": "Alameda Unified School District (AUSD) employee",
667
+ "yes": {
668
+ "label": "At least one member of my household is an Alameda Unified School District employee",
669
+ "description": "At least one member of my household is an Alameda Unified School District employee."
670
+ }
642
671
  }
643
672
  },
644
673
  "review": {
@@ -945,7 +974,7 @@
945
974
  "es": "Español",
946
975
  "zh": "中文",
947
976
  "vi": "Tiếng Việt",
948
- "tl": "Tagalog"
977
+ "tl": "Filipino"
949
978
  },
950
979
  "leasingAgent": {
951
980
  "contact": "Contact Leasing Agent",
@@ -1002,7 +1031,6 @@
1002
1031
  "applicationsClosed": "Applications Closed",
1003
1032
  "applicationDropOffQuestion": "Can applications be dropped off?",
1004
1033
  "apply": {
1005
- "applicationsMustBeReceivedByDeadline": "Applications must be received by the deadline and postmarks will not be considered.",
1006
1034
  "applicationWillBeAvailableOn": "Application will be available for download and pick up on %{openDate}",
1007
1035
  "applyOnline": "Apply Online",
1008
1036
  "downloadApplication": "Download Application",
@@ -1012,9 +1040,12 @@
1012
1040
  "howToApply": "How to Apply",
1013
1041
  "paperApplicationsMustBeMailed": "Paper applications must be sent by US Mail and cannot be submitted in person.",
1014
1042
  "pickUpAnApplication": "Pick up an application",
1015
- "postmarkedApplicationsMustBeReceivedByDate": "Applications must be received by the deadline. If sending by U.S. Mail, the application must be postmarked by %{applicationDueDate} and received by mail no later than %{postmarkReceivedByDate}. Applications received after %{postmarkReceivedByDate} via mail will not be accepted even if they are postmarked by %{applicationDueDate}. %{developer} is not responsible for lost or delayed mail.",
1016
1043
  "sendByUsMail": "Send Application by US Mail",
1017
- "submitAPaperApplication": "Submit a Paper Application"
1044
+ "submitAPaperApplication": "Submit a Paper Application",
1045
+ "submitPaperDueDateNoPostMark": "Applications must be received by the deadline. If sending by U.S. Mail, the application must be postmarked by %{applicationDueDate}. %{developer} is not responsible for lost or delayed mail.",
1046
+ "submitPaperDueDatePostMark": "Applications must be received by the deadline. If sending by U.S. Mail, the application must be postmarked by %{applicationDueDate} and received by mail no later than %{postmarkReceivedByDate}. Applications received after %{postmarkReceivedByDate} via mail will not be accepted even if they are postmarked by %{applicationDueDate}. %{developer} is not responsible for lost or delayed mail.",
1047
+ "submitPaperNoDueDateNoPostMark": "%{developer} is not responsible for lost or delayed mail.",
1048
+ "submitPaperNoDueDatePostMark": "Applications must be received by the deadline. If sending by U.S. Mail, the application must be received by mail no later than %{postmarkReceivedByDate}. Applications received after %{postmarkReceivedByDate} via mail will not be accepted. %{developer} is not responsible for lost or delayed mail."
1018
1049
  },
1019
1050
  "atAnotherAddress": "At another address",
1020
1051
  "atLeasingAgentAddress": "At the leasing agent address",
@@ -1109,6 +1140,8 @@
1109
1140
  "pickupAddress": "Pickup Address",
1110
1141
  "postmarkByDate": "Postmark by Date",
1111
1142
  "postmarkByTime": "Postmark by Time",
1143
+ "receivedByDate": "Received by Date",
1144
+ "receivedByTime": "Received by Time",
1112
1145
  "postmarksConsideredQuestion": "Are postmarks considered?",
1113
1146
  "priorityUnits": "Priority Units",
1114
1147
  "priorityUnitsDescription": "This building has units set aside if any of the following apply to you or someone in your household:",
@@ -1,4 +1,4 @@
1
- {
1
+ {
2
2
  "account": {
3
3
  "accountSettings": "Thiết lập Tài khoản",
4
4
  "accountSettingsSubtitle": "Thiết lập Tài khoản, email và mật khẩu",
@@ -249,6 +249,20 @@
249
249
  "general": {
250
250
  "title": "Dựa trên thông tin quý vị đã nhập, hộ gia đình của quý vị chưa yêu cầu bất kỳ lựa chọn ưu tiên nhà ở nào.",
251
251
  "preamble": "Quý vị sẽ thuộc nhóm các ứng viên chung."
252
+ },
253
+ "rosefieldLive": {
254
+ "title": "Cư dân trước đây của Làng Rosefield đã tái định cư bên ngoài Thành phố Alameda",
255
+ "yes": {
256
+ "label": "Ít nhất một thành viên trong gia đình tôi là cư dân trước đây của Làng Rosefield",
257
+ "description": "Ít nhất một thành viên trong gia đình tôi là cư dân trước đây của Làng Rosefield"
258
+ }
259
+ },
260
+ "rosefieldAUSD": {
261
+ "title": "Nhân viên của Học khu Thống nhất Alameda (AUSD)",
262
+ "yes": {
263
+ "label": "Ít nhất một thành viên trong gia đình tôi là nhân viên của Học khu Thống nhất Alameda",
264
+ "description": "Ít nhất một thành viên trong gia đình tôi là nhân viên của Học khu Thống nhất Alameda"
265
+ }
252
266
  }
253
267
  },
254
268
  "review": {
@@ -458,6 +472,7 @@
458
472
  "additionalInformation": "Thông tin Bổ sung",
459
473
  "allUnits": "Tất cả các Căn nhà",
460
474
  "allUnitsReservedFor": "Tất cả các căn nhà được dành cho %{type}",
475
+ "annualIncome": "%{income} mỗi năm",
461
476
  "applicationDeadline": "Hạn nộp Đơn ghi danh",
462
477
  "applicationFCFS": "Ai Nộp đơn Trước Được Nhận trước",
463
478
  "applicationFee": "Lệ phí Ghi danh",
@@ -476,7 +491,7 @@
476
491
  "howToApply": "Cách Ghi danh",
477
492
  "paperApplicationsMustBeMailed": "Mẫu đơn ghi danh Giấy phải được gửi thư bưu điện Hoa Kỳ và không thể nộp trực tiếp.",
478
493
  "pickUpAnApplication": "Nhận đơn ghi danh",
479
- "postmarkedApplicationsMustBeReceivedByDate": "Đơn ghi danh phải được nhận trước thời hạn. Nếu gửi qua đường bưu điện U.S Mail, đơn ghi danh phải được đóng dấu bưu điện trước %{applicationDueDate} và nhận qua thư trước ngày %{postmarkReceiveByDate}. Các đơn ghi danh nhận được sau %{postmarkReceiveByDate} qua đường bưu điện sẽ không được chấp nhận ngay cả khi chúng được đóng dấu bưu điện trước %{applicationDueDate}. %{developer} không chịu trách nhiệm về thư bị thất lạc hoặc bị trễ.",
494
+ "submitPaperDueDatePostMark": "Đơn ghi danh phải được nhận trước thời hạn. Nếu gửi qua đường bưu điện U.S Mail, đơn ghi danh phải được đóng dấu bưu điện trước %{applicationDueDate} và nhận qua thư trước ngày %{postmarkReceiveByDate}. Các đơn ghi danh nhận được sau %{postmarkReceiveByDate} qua đường bưu điện sẽ không được chấp nhận ngay cả khi chúng được đóng dấu bưu điện trước %{applicationDueDate}. %{developer} không chịu trách nhiệm về thư bị thất lạc hoặc bị trễ.",
480
495
  "sendByUsMail": "Gửi Đơn ghi danh qua đường bưu điện US Mail",
481
496
  "submitAPaperApplication": "Gửi Giấy ghi danh"
482
497
  },
@@ -510,6 +525,7 @@
510
525
  },
511
526
  "maxIncomeMonth": "Thu nhập Tối đa / Tháng",
512
527
  "maxIncomeYear": "Thu nhập Tối đa / Năm",
528
+ "monthlyIncome": "%{income} mỗi tháng",
513
529
  "moreBuildingSelectionCriteria": "Tìm hiểu thêm về Tiêu chí Lựa chọn Tòa nhà",
514
530
  "noAvailableUnits": "Không có căn nhà nào còn trống tại thời điểm này.",
515
531
  "noOpenListings": "Không có danh sách nhà nào hiện đang mở nhận đơn ghi danh.",
@@ -249,6 +249,20 @@
249
249
  "general": {
250
250
  "title": "根據您填寫的資料,您的家庭沒有要求任何住房優先權。",
251
251
  "preamble": "您將被分配到一般申請人組別。"
252
+ },
253
+ "rosefieldLive": {
254
+ "title": "罗斯菲尔德村以前的居民搬迁到阿拉米达市外",
255
+ "yes": {
256
+ "label": "我的至少一名家庭成员曾是罗斯菲尔德村的居民",
257
+ "description": "我的至少一名家庭成员曾是罗斯菲尔德村的居民"
258
+ }
259
+ },
260
+ "rosefieldAUSD": {
261
+ "title": "阿拉米达联合学区 (AUSD) 员工",
262
+ "yes": {
263
+ "label": "我的至少一名家庭成员是阿拉米达联合学区的雇员",
264
+ "description": "我的至少一名家庭成员是阿拉米达联合学区的雇员"
265
+ }
252
266
  }
253
267
  },
254
268
  "review": {
@@ -458,6 +472,7 @@
458
472
  "additionalInformation": "其他資訊",
459
473
  "allUnits": "所有單位",
460
474
  "allUnitsReservedFor": "保留給 %{type} 的所有單位",
475
+ "annualIncome": "每年 %{income}",
461
476
  "applicationDeadline": "申請截止日期",
462
477
  "applicationFCFS": "先申請先服務",
463
478
  "applicationFee": "申請費",
@@ -476,7 +491,7 @@
476
491
  "howToApply": "如何申請",
477
492
  "paperApplicationsMustBeMailed": "紙本申請表必須經由美國郵政寄回,並且不能親自提交。",
478
493
  "pickUpAnApplication": "領取申請表",
479
- "postmarkedApplicationsMustBeReceivedByDate": "申請表必須在截止日期前收到。如果經由美國郵政寄送,則申請表上的郵戳日期必須在 %{applicationDueDate} 前,郵件最遲要在 %{postmarkReceivedByDate} 前寄達。我們不會受理在 %{postmarkReceivedByDate} 之後郵寄送達的申請表,即使郵戳日期在 %{applicationDueDate} 之前也一樣。若郵件有任何遺失或延誤,%{developer} 概不負責。",
494
+ "submitPaperDueDatePostMark": "申請表必須在截止日期前收到。如果經由美國郵政寄送,則申請表上的郵戳日期必須在 %{applicationDueDate} 前,郵件最遲要在 %{postmarkReceivedByDate} 前寄達。我們不會受理在 %{postmarkReceivedByDate} 之後郵寄送達的申請表,即使郵戳日期在 %{applicationDueDate} 之前也一樣。若郵件有任何遺失或延誤,%{developer} 概不負責。",
480
495
  "sendByUsMail": "用美國郵政寄送申請表",
481
496
  "submitAPaperApplication": "提交紙本申請表"
482
497
  },
@@ -510,6 +525,7 @@
510
525
  },
511
526
  "maxIncomeMonth": "最高收入 / 月",
512
527
  "maxIncomeYear": "最高收入 / 年",
528
+ "monthlyIncome": "每月 %{income}",
513
529
  "moreBuildingSelectionCriteria": "了解「樓宇選擇標準」詳情",
514
530
  "noAvailableUnits": "目前並無單位提供。",
515
531
  "noOpenListings": "目前沒有上市名單接受申請。",
@@ -1,7 +1,6 @@
1
1
  import React from "react"
2
2
  import "./Modal.scss"
3
3
  import { Icon } from "../icons/Icon"
4
- import { GridCell, GridSection } from "../sections/GridSection"
5
4
  import { Overlay, OverlayProps } from "./Overlay"
6
5
 
7
6
  export interface ModalProps extends Omit<OverlayProps, "children"> {
@@ -18,14 +18,39 @@ export interface ListingCardHeaderProps {
18
18
  }
19
19
  export interface ListingCardProps {
20
20
  imageCardProps: ImageCardProps
21
+ children?: React.ReactElement
21
22
  seeDetailsLink?: string
22
23
  tableHeaderProps?: ListingCardHeaderProps
23
- tableProps: ListingCardTableProps
24
+ tableProps?: ListingCardTableProps
24
25
  detailsLinkClass?: string
25
26
  }
26
27
 
27
28
  const ListingCard = (props: ListingCardProps) => {
28
- const { imageCardProps, tableProps, detailsLinkClass, tableHeaderProps } = props
29
+ const { imageCardProps, tableProps, detailsLinkClass, tableHeaderProps, children } = props
30
+
31
+ const tableHeader = () => {
32
+ return (
33
+ <h3
34
+ className={`listings-row_title ${
35
+ tableHeaderProps?.tableHeaderClass && tableHeaderProps?.tableHeaderClass
36
+ }`}
37
+ >
38
+ {tableHeaderProps?.tableHeader}
39
+ </h3>
40
+ )
41
+ }
42
+
43
+ const tableSubHeader = () => {
44
+ return (
45
+ <h4
46
+ className={`listings-row_subtitle ${
47
+ tableHeaderProps?.tableSubHeaderClass && tableHeaderProps?.tableSubHeaderClass
48
+ }`}
49
+ >
50
+ {tableHeaderProps?.tableSubHeader}
51
+ </h4>
52
+ )
53
+ }
29
54
 
30
55
  return (
31
56
  <article className="listings-row" data-test-id={"listing-card-component"}>
@@ -33,26 +58,11 @@ const ListingCard = (props: ListingCardProps) => {
33
58
  <ImageCard {...imageCardProps} />
34
59
  </div>
35
60
  <div className="listings-row_content">
36
- {tableHeaderProps?.tableHeader && (
37
- <h3
38
- className={`listings-row_title ${
39
- tableHeaderProps.tableHeaderClass && tableHeaderProps.tableHeaderClass
40
- }`}
41
- >
42
- {tableHeaderProps?.tableHeader}
43
- </h3>
44
- )}
45
- {tableHeaderProps?.tableSubHeader && (
46
- <h4
47
- className={`listings-row_subtitle ${
48
- tableHeaderProps.tableSubHeaderClass && tableHeaderProps.tableSubHeaderClass
49
- }`}
50
- >
51
- {tableHeaderProps?.tableSubHeader}
52
- </h4>
53
- )}
61
+ {tableHeaderProps?.tableHeader && tableHeader()}
62
+ {tableHeaderProps?.tableSubHeader && tableSubHeader()}
54
63
  <div className="listings-row_table">
55
- {(tableProps.data || tableProps.stackedData) && (
64
+ {children && children}
65
+ {tableProps && (tableProps.data || tableProps.stackedData) && (
56
66
  <>
57
67
  {tableHeaderProps?.stackedTable ? (
58
68
  <StackedTable {...(tableProps as StackedTableProps)} />
@@ -6,44 +6,71 @@
6
6
 
7
7
  .listings-group__header {
8
8
  @apply flex;
9
- @apply flex-row;
10
- @apply flex-wrap;
9
+ @apply flex-col;
11
10
  @apply max-w-5xl;
12
11
  @apply m-auto;
13
12
  @apply mt-6;
14
13
  @apply mb-8;
15
14
  @apply p-3;
15
+ @apply justify-between;
16
+
17
+ @screen md {
18
+ @apply flex-row;
19
+ }
16
20
  }
17
21
 
18
22
  .listings-group__icon {
19
23
  @apply hidden;
20
- @apply pt-2;
21
24
  @apply pr-5;
25
+ @apply mr-5;
26
+ @apply border-r-4;
27
+ @apply border-gray-700;
28
+ @apply items-center;
29
+ @apply hidden;
30
+ @screen md {
31
+ @apply flex;
32
+ }
33
+ }
34
+
35
+ .listings-group__content {
36
+ @apply flex;
37
+ @apply flex-row;
38
+ flex-grow: 2;
39
+ margin-right: 15px;
22
40
 
41
+ @apply max-w-full;
23
42
  @screen md {
24
- @apply inline-block;
43
+ max-width: 70%;
25
44
  }
26
45
  }
27
46
 
28
47
  .listings-group__header-group {
29
- @apply w-full;
48
+ max-width: inherit;
30
49
  @apply flex;
31
- @apply items-center;
32
- @apply mb-4;
50
+ @apply flex-col;
51
+ @apply items-start;
52
+ @apply justify-center;
53
+ @apply h-full;
54
+ }
33
55
 
56
+ .listings-group__info {
57
+ @apply text-gray-750;
58
+ @apply pt-1;
59
+ @apply pt-2;
34
60
  @screen md {
35
- @apply w-7/12;
36
- @apply mb-0;
61
+ @apply pt-0;
37
62
  }
38
63
  }
39
64
 
40
65
  .listings-group__button {
41
- @apply w-full;
42
66
  @apply flex;
43
67
  @apply items-center;
44
-
68
+ flex-shrink: 0;
69
+ @apply ml-0;
70
+ @apply pt-5;
45
71
  @screen md {
46
- @apply w-4/12;
72
+ @apply ml-6;
73
+ @apply pt-0;
47
74
  }
48
75
  }
49
76
 
@@ -51,15 +78,13 @@
51
78
  @apply uppercase;
52
79
  @apply font-alt-sans;
53
80
  @apply font-black;
54
- @apply my-1;
55
81
  @apply tracking-widest;
56
82
  @apply border-b-4;
57
- @apply border-gray-600;
83
+ @apply border-gray-700;
58
84
  @apply pb-1;
59
85
 
60
86
  @screen md {
61
- @apply px-4;
62
- @apply border-b-0;
63
- @apply border-l-4;
87
+ @apply pb-0;
88
+ @apply border-0;
64
89
  }
65
90
  }
@@ -1,43 +1,41 @@
1
1
  import React, { useState } from "react"
2
2
  import { Button } from "../../actions/Button"
3
- import { Icon } from "../../icons/Icon"
3
+ import { Icon, IconTypes } from "../../icons/Icon"
4
4
  import "./ListingsGroup.scss"
5
5
 
6
6
  export interface ListingsGroupProps {
7
7
  children?: React.ReactNode
8
- listingsCount: number
9
8
  header: string
9
+ hideButtonText: string
10
+ icon?: IconTypes
10
11
  info?: string
12
+ listingsCount: number
11
13
  showButtonText: string
12
- hideButtonText: string
13
14
  }
14
15
 
15
16
  const ListingsGroup = (props: ListingsGroupProps) => {
16
17
  const [showListings, setShowListings] = useState(false)
17
18
  const toggleListings = () => setShowListings(!showListings)
18
19
 
19
- let buttonText
20
-
21
20
  const listingsCount = ` (${props.listingsCount})`
22
- if (showListings) {
23
- buttonText = props.hideButtonText + listingsCount
24
- } else {
25
- buttonText = props.showButtonText + listingsCount
26
- }
27
21
 
28
22
  return (
29
23
  <div className="listings-group">
30
24
  <div className="listings-group__header">
31
- <div className="listings-group__icon">
32
- <Icon size="xlarge" symbol="clock" />
33
- </div>
34
- <div className="listings-group__header-group">
35
- <h2 className="listings-group__title">{props.header}</h2>
36
- {props.info && <div className="px-4 my-2">{props.info}</div>}
25
+ <div className={"listings-group__content"}>
26
+ <div className="listings-group__icon">
27
+ <Icon size="xlarge" symbol={props.icon ?? `clock`} />
28
+ </div>
29
+ <div className="listings-group__header-group">
30
+ <h2 className="listings-group__title">{props.header}</h2>
31
+ {props.info && <div className="listings-group__info">{props.info}</div>}
32
+ </div>
37
33
  </div>
38
34
  <div className="listings-group__button">
39
35
  <Button className="w-full" onClick={() => toggleListings()}>
40
- {buttonText}
36
+ {showListings
37
+ ? props.hideButtonText + listingsCount
38
+ : props.showButtonText + listingsCount}
41
39
  </Button>
42
40
  </div>
43
41
  </div>
@@ -5,7 +5,6 @@ import { LinkButton } from "../../../actions/LinkButton"
5
5
  import { AppearanceStyleType } from "../../../global/AppearanceTypes"
6
6
  import { Address } from "../../../helpers/address"
7
7
  import { SidebarAddress } from "./SidebarAddress"
8
- import { NumberedHeader } from "./NumberedHeader"
9
8
  import { OrDivider } from "./OrDivider"
10
9
  import { ListingStatus } from "@bloom-housing/backend-core/types"
11
10
 
@@ -16,7 +15,6 @@ export interface PaperApplication {
16
15
 
17
16
  export interface ApplicationsProps {
18
17
  onlineApplicationURL?: string
19
- applicationsDueDate?: string
20
18
  applicationsOpen: boolean
21
19
  applicationsOpenDate?: string
22
20
  paperApplications?: PaperApplication[]
@@ -67,7 +65,7 @@ const GetApplication = (props: ApplicationsProps) => {
67
65
  {props.applicationsOpen && props.paperMethod && (
68
66
  <>
69
67
  {props.onlineApplicationURL && <OrDivider bgColor="white" />}
70
- <NumberedHeader num={1} text={t("listings.apply.getAPaperApplication")} />
68
+ <div className="text-serif-lg">{t("listings.apply.getAPaperApplication")}</div>
71
69
  <Button
72
70
  styleType={
73
71
  !props.preview && props.onlineApplicationURL ? AppearanceStyleType.primary : undefined
@@ -1,6 +1,6 @@
1
1
  import * as React from "react"
2
2
  import { t } from "../../../helpers/translator"
3
- import moment from "moment"
3
+ import dayjs from "dayjs"
4
4
 
5
5
  interface ListingUpdatedProps {
6
6
  listingUpdated: Date
@@ -11,7 +11,7 @@ const ListingUpdated = (props: ListingUpdatedProps) => {
11
11
  return (
12
12
  <section className="aside-block">
13
13
  <p className="text-tiny text-gray-800">
14
- {`${t("listings.listingUpdated")}: ${moment(listingUpdated).format("MMMM DD, YYYY")}`}
14
+ {`${t("listings.listingUpdated")}: ${dayjs(listingUpdated).format("MMMM DD, YYYY")}`}
15
15
  </p>
16
16
  </section>
17
17
  )
@@ -2,14 +2,13 @@ import * as React from "react"
2
2
  import { t } from "../../../helpers/translator"
3
3
  import { Address } from "../../../helpers/address"
4
4
  import { SidebarAddress } from "./SidebarAddress"
5
- import { NumberedHeader } from "./NumberedHeader"
6
5
  import { OrDivider } from "./OrDivider"
7
6
  import { ListingStatus } from "@bloom-housing/backend-core/types"
8
7
 
9
8
  export interface PostmarkedApplication {
10
- postmarkedApplicationsReceivedByDate: string
9
+ postmarkedApplicationsReceivedByDate: string | null
11
10
  developer: string
12
- applicationsDueDate: string
11
+ applicationsDueDate: string | null
13
12
  }
14
13
 
15
14
  export interface ApplicationAddressesProps {
@@ -22,50 +21,61 @@ export interface ApplicationAddressesProps {
22
21
  }
23
22
 
24
23
  const SubmitApplication = (props: ApplicationAddressesProps) => {
25
- if (props.listingStatus === ListingStatus.closed) {
24
+ if (
25
+ props.listingStatus === ListingStatus.closed ||
26
+ !(props.applicationMailingAddress || props.applicationDropOffAddress)
27
+ ) {
26
28
  return null
27
29
  }
28
30
 
31
+ const getPostmarkString = () => {
32
+ const applicationDueDate = props.postmarkedApplicationData?.applicationsDueDate
33
+ const postmarkReceivedByDate =
34
+ props.postmarkedApplicationData?.postmarkedApplicationsReceivedByDate
35
+ const developer = props.postmarkedApplicationData?.developer
36
+ if (applicationDueDate) {
37
+ return postmarkReceivedByDate
38
+ ? t("listings.apply.submitPaperDueDatePostMark", {
39
+ applicationDueDate,
40
+ postmarkReceivedByDate,
41
+ developer,
42
+ })
43
+ : t("listings.apply.submitPaperDueDateNoPostMark", {
44
+ applicationDueDate,
45
+ developer,
46
+ })
47
+ } else {
48
+ return postmarkReceivedByDate
49
+ ? t("listings.apply.submitPaperNoDueDatePostMark", { postmarkReceivedByDate, developer })
50
+ : t("listings.apply.submitPaperNoDueDateNoPostMark", { developer })
51
+ }
52
+ }
53
+
29
54
  return (
30
55
  <>
31
- {(props.applicationMailingAddress ||
32
- props.applicationDropOffAddress ||
33
- props.postmarkedApplicationData) && (
34
- <section className="aside-block is-tinted bg-gray-100">
35
- <NumberedHeader num={2} text={t("listings.apply.submitAPaperApplication")} />
36
- {(props.applicationMailingAddress || props.postmarkedApplicationData) && (
56
+ <section className="aside-block is-tinted bg-gray-100">
57
+ <div className="text-serif-lg">{t("listings.apply.submitAPaperApplication")}</div>
58
+ {props.applicationMailingAddress && (
59
+ <>
60
+ <h3 className="text-caps-tiny">{t("listings.apply.sendByUsMail")}</h3>
37
61
  <>
38
- <h3 className="text-caps-tiny">{t("listings.apply.sendByUsMail")}</h3>
39
62
  <p className="text-gray-700">{props.applicationOrganization}</p>
40
- {props.applicationMailingAddress && (
41
- <SidebarAddress address={props.applicationMailingAddress} />
42
- )}
43
- <p className="mt-4 text-tiny text-gray-750">
44
- {props.postmarkedApplicationData?.postmarkedApplicationsReceivedByDate
45
- ? t("listings.apply.postmarkedApplicationsMustBeReceivedByDate", {
46
- applicationDueDate: props.postmarkedApplicationData?.applicationsDueDate,
47
- postmarkReceivedByDate:
48
- props.postmarkedApplicationData?.postmarkedApplicationsReceivedByDate,
49
- developer: props.postmarkedApplicationData?.developer,
50
- })
51
- : t("listings.apply.applicationsMustBeReceivedByDeadline")}
52
- </p>
53
- </>
54
- )}
55
- {props.applicationMailingAddress && props.applicationDropOffAddress && (
56
- <OrDivider bgColor="gray-100" />
57
- )}
58
- {props.applicationDropOffAddress && (
59
- <>
60
- <h3 className="text-caps-tiny">{t("listings.apply.dropOffApplication")}</h3>
61
- <SidebarAddress
62
- address={props.applicationDropOffAddress}
63
- officeHours={props.applicationDropOffAddressOfficeHours}
64
- />
63
+ <SidebarAddress address={props.applicationMailingAddress} />
65
64
  </>
66
- )}
67
- </section>
68
- )}
65
+ <p className="mt-4 text-tiny text-gray-750">{getPostmarkString()}</p>
66
+ </>
67
+ )}
68
+ {props.applicationDropOffAddress && (
69
+ <>
70
+ {props.applicationMailingAddress && <OrDivider bgColor="gray-100" />}
71
+ <h3 className="text-caps-tiny">{t("listings.apply.dropOffApplication")}</h3>
72
+ <SidebarAddress
73
+ address={props.applicationDropOffAddress}
74
+ officeHours={props.applicationDropOffAddressOfficeHours}
75
+ />
76
+ </>
77
+ )}
78
+ </section>
69
79
  </>
70
80
  )
71
81
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react"
2
2
  import { ListingEvent } from "@bloom-housing/backend-core/types"
3
3
  import { t } from "../../../../helpers/translator"
4
- import moment from "moment"
4
+ import dayjs from "dayjs"
5
5
 
6
6
  const DownloadLotteryResults = (props: { event: ListingEvent; pdfUrl: string }) => {
7
7
  const { event, pdfUrl } = props
@@ -12,7 +12,7 @@ const DownloadLotteryResults = (props: { event: ListingEvent; pdfUrl: string })
12
12
  <section className="aside-block text-center">
13
13
  <h2 className="text-caps pb-4">{t("listings.lotteryResults.header")}</h2>
14
14
  <p className="uppercase text-gray-800 text-tiny font-semibold pb-4">
15
- {moment(event.startTime).format("MMMM D, YYYY")}
15
+ {dayjs(event.startTime).format("MMMM D, YYYY")}
16
16
  </p>
17
17
  <a
18
18
  className="button is-primary w-full mb-2"