From 1887cb45c981fb56df0ed9484f1ced7b3a5e7abd Mon Sep 17 00:00:00 2001 From: mertbagt Date: Sun, 5 Apr 2026 15:17:04 -0400 Subject: [PATCH 1/7] hearing held checks --- components/bill/Status.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/components/bill/Status.tsx b/components/bill/Status.tsx index b672769fd..534f14be5 100644 --- a/components/bill/Status.tsx +++ b/components/bill/Status.tsx @@ -24,6 +24,23 @@ export const Status = ({ bill }: BillProps) => { const handleShowBillHistory = () => setShowBillHistory(true) const handleCloseBillHistory = () => setShowBillHistory(false) const history = last(bill.history) + const today = new Date().toISOString() + const target = "Hearing scheduled for " + + let hearingDateString = "" + if (history?.Date) { + hearingDateString = history.Date + } + + let hearingCheck = false + if (history?.Action.startsWith(target)) { + hearingCheck = true + } + + let dateCheck = false + if (hearingDateString < today) { + dateCheck = true + } if (!history) return null return ( @@ -34,7 +51,7 @@ export const Status = ({ bill }: BillProps) => { className="text-truncate ps-4" onClick={handleShowBillHistory} > - {history.Action} + {hearingCheck && dateCheck ? "Hearing Held" : history.Action} From c7aaa3c12c64c83679a5c835f884ccb62cbc7023 Mon Sep 17 00:00:00 2001 From: mertbagt Date: Sun, 5 Apr 2026 15:19:19 -0400 Subject: [PATCH 2/7] string rename --- components/bill/Status.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/bill/Status.tsx b/components/bill/Status.tsx index 534f14be5..1ccb01bcd 100644 --- a/components/bill/Status.tsx +++ b/components/bill/Status.tsx @@ -27,9 +27,9 @@ export const Status = ({ bill }: BillProps) => { const today = new Date().toISOString() const target = "Hearing scheduled for " - let hearingDateString = "" + let hearingDate = "" if (history?.Date) { - hearingDateString = history.Date + hearingDate = history.Date } let hearingCheck = false @@ -38,7 +38,7 @@ export const Status = ({ bill }: BillProps) => { } let dateCheck = false - if (hearingDateString < today) { + if (hearingDate < today) { dateCheck = true } From 3b62a934d0aab3b046646863ab6a8532f910324a Mon Sep 17 00:00:00 2001 From: mertbagt Date: Wed, 8 Apr 2026 14:45:12 -0400 Subject: [PATCH 3/7] translation added --- components/bill/Status.tsx | 2 +- public/locales/en/common.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/bill/Status.tsx b/components/bill/Status.tsx index 1ccb01bcd..94b8fa0e1 100644 --- a/components/bill/Status.tsx +++ b/components/bill/Status.tsx @@ -51,7 +51,7 @@ export const Status = ({ bill }: BillProps) => { className="text-truncate ps-4" onClick={handleShowBillHistory} > - {hearingCheck && dateCheck ? "Hearing Held" : history.Action} + {hearingCheck && dateCheck ? t("bill.hearing_held") : history.Action} diff --git a/public/locales/en/common.json b/public/locales/en/common.json index a0a3d5fe2..8ad0918c4 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -23,8 +23,9 @@ "disclosure_date": "Disclosure Date", "download_pdf": "Download PDF", "example_name": "Example Name", + "hearing_held": "Hearing Held", "hearing_scheduled_for": "Hearing Scheduled for {{date, datetime(year: 'numeric'; month: 'long'; day: 'numeric'; hour: 'numeric'; minute: 'numeric')}}", - "hearing_video_and_transcript" : "Hearing Video + Transcript", + "hearing_video_and_transcript" : "Hearing Video + Transcript", "history": "History", "icon": { "commerce": "Commerce", From fae4baa57cc2330f85b4c602fffdcf3f00ccfcf3 Mon Sep 17 00:00:00 2001 From: mertbagt Date: Wed, 8 Apr 2026 14:49:58 -0400 Subject: [PATCH 4/7] handle - hearing rescheduled --- components/bill/Status.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/bill/Status.tsx b/components/bill/Status.tsx index 94b8fa0e1..89a92ce16 100644 --- a/components/bill/Status.tsx +++ b/components/bill/Status.tsx @@ -25,7 +25,8 @@ export const Status = ({ bill }: BillProps) => { const handleCloseBillHistory = () => setShowBillHistory(false) const history = last(bill.history) const today = new Date().toISOString() - const target = "Hearing scheduled for " + const target1 = "Hearing scheduled for " + const target2 = "Hearing rescheduled to " let hearingDate = "" if (history?.Date) { @@ -33,7 +34,10 @@ export const Status = ({ bill }: BillProps) => { } let hearingCheck = false - if (history?.Action.startsWith(target)) { + if ( + history?.Action.startsWith(target1) || + history?.Action.startsWith(target2) + ) { hearingCheck = true } From c7eb865002cca671d49e3616761e3aefb8b9c277 Mon Sep 17 00:00:00 2001 From: mertbagt Date: Wed, 8 Apr 2026 14:53:07 -0400 Subject: [PATCH 5/7] cleanup --- components/bill/Status.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/bill/Status.tsx b/components/bill/Status.tsx index 89a92ce16..ff8c823ac 100644 --- a/components/bill/Status.tsx +++ b/components/bill/Status.tsx @@ -28,11 +28,6 @@ export const Status = ({ bill }: BillProps) => { const target1 = "Hearing scheduled for " const target2 = "Hearing rescheduled to " - let hearingDate = "" - if (history?.Date) { - hearingDate = history.Date - } - let hearingCheck = false if ( history?.Action.startsWith(target1) || @@ -41,6 +36,10 @@ export const Status = ({ bill }: BillProps) => { hearingCheck = true } + let hearingDate = "" + if (history?.Date) { + hearingDate = history.Date + } let dateCheck = false if (hearingDate < today) { dateCheck = true From 5f83cdc0c093d8cd61db4c695e495b28c1606060 Mon Sep 17 00:00:00 2001 From: mertbagt Date: Tue, 28 Apr 2026 19:30:17 -0400 Subject: [PATCH 6/7] clarifying comments --- components/bill/Status.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/bill/Status.tsx b/components/bill/Status.tsx index ff8c823ac..2836c890f 100644 --- a/components/bill/Status.tsx +++ b/components/bill/Status.tsx @@ -25,6 +25,9 @@ export const Status = ({ bill }: BillProps) => { const handleCloseBillHistory = () => setShowBillHistory(false) const history = last(bill.history) const today = new Date().toISOString() + + // target1 and target2 are only used internally and never shown to the User + // as such they are not translated at this time const target1 = "Hearing scheduled for " const target2 = "Hearing rescheduled to " From 5a1b168922a7b4b6989d900ed720612f36481112 Mon Sep 17 00:00:00 2001 From: mertbagt Date: Tue, 28 Apr 2026 19:55:42 -0400 Subject: [PATCH 7/7] translation comments --- components/bill/Status.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/bill/Status.tsx b/components/bill/Status.tsx index 2836c890f..42226395f 100644 --- a/components/bill/Status.tsx +++ b/components/bill/Status.tsx @@ -26,8 +26,7 @@ export const Status = ({ bill }: BillProps) => { const history = last(bill.history) const today = new Date().toISOString() - // target1 and target2 are only used internally and never shown to the User - // as such they are not translated at this time + // revisit this when we revisit translations for the backend const target1 = "Hearing scheduled for " const target2 = "Hearing rescheduled to "