From ad0a2b59d2a466aff05f208ec8e525ecb332ecb6 Mon Sep 17 00:00:00 2001 From: HarshGurnani Date: Fri, 24 May 2024 11:42:56 -0700 Subject: [PATCH 1/2] minor changes --- frontend/src/app/staff/vsr/page.tsx | 4 ++-- frontend/src/components/VSRTable/FilterModal/index.tsx | 2 +- frontend/src/components/shared/StatusDropdown/index.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/staff/vsr/page.tsx b/frontend/src/app/staff/vsr/page.tsx index d9aa6ea..9e9729a 100644 --- a/frontend/src/app/staff/vsr/page.tsx +++ b/frontend/src/app/staff/vsr/page.tsx @@ -252,9 +252,9 @@ export default function VSRTableView() {

Status:

{ - if (value === "Any") { + if (value === "All Statuses") { setStatus(undefined); fetchVSRs(search, filteredZipCodes, filteredIncome, undefined); } else { diff --git a/frontend/src/components/VSRTable/FilterModal/index.tsx b/frontend/src/components/VSRTable/FilterModal/index.tsx index dbb4bcf..b0cb9ba 100644 --- a/frontend/src/components/VSRTable/FilterModal/index.tsx +++ b/frontend/src/components/VSRTable/FilterModal/index.tsx @@ -6,7 +6,6 @@ import TextField from "@/components/shared/input/TextField"; import MultipleChoice from "@/components/shared/input/MultipleChoice"; import { incomeOptions } from "@/constants/fieldOptions"; import FilterChip from "@/components/VSRTable/FilterChip"; -import { on } from "events"; interface FilterModalProps { isOpen: boolean; @@ -85,6 +84,7 @@ const FilterModal = ({ isOpen, onClose, onInputEntered, onResetFilters }: Filter Date: Fri, 24 May 2024 12:54:50 -0700 Subject: [PATCH 2/2] changes discussed in meeting; need to change popup to not be full screen --- frontend/src/app/staff/vsr/page.tsx | 4 +- .../components/VSRTable/FilterModal/index.tsx | 40 ++++++------------- .../VSRTable/FilterModal/styles.module.css | 16 +------- 3 files changed, 18 insertions(+), 42 deletions(-) diff --git a/frontend/src/app/staff/vsr/page.tsx b/frontend/src/app/staff/vsr/page.tsx index 9e9729a..79deeaf 100644 --- a/frontend/src/app/staff/vsr/page.tsx +++ b/frontend/src/app/staff/vsr/page.tsx @@ -304,7 +304,9 @@ export default function VSRTableView() { {/* {searchOnOwnRow ? : null} */} -

Applied Filters:

+ {(filteredZipCodes && filteredZipCodes.length > 0) || filteredIncome ? ( +

Applied Filters:

+ ) : null} {filteredZipCodes?.map((zipCode) => ( { - if (currentZipCode.trim()) { - setZipCodes((prevZipCodes) => [...prevZipCodes, currentZipCode.trim()]); - setCurrentZipCode(""); // Clear the text field after adding the zipcode - } - }; - return ( <>
-
- -
+
{zipCodes?.map((zipCode) => ( @@ -127,7 +111,9 @@ const FilterModal = ({ isOpen, onClose, onInputEntered, onResetFilters }: Filter outlined={false} text="Apply Filters" onClick={handleApplyFilter} - className={styles.button} + className={`${styles.button} ${ + zipCodes.length > 0 || currentZipCode !== "" || income !== "" ? "" : styles.disabled + }`} />
} diff --git a/frontend/src/components/VSRTable/FilterModal/styles.module.css b/frontend/src/components/VSRTable/FilterModal/styles.module.css index 174e5c6..70e224d 100644 --- a/frontend/src/components/VSRTable/FilterModal/styles.module.css +++ b/frontend/src/components/VSRTable/FilterModal/styles.module.css @@ -43,18 +43,6 @@ margin: 0 0 16px; } -.zipCodeContainer { - display: flex; - flex-direction: row; - gap: 32px; - align-items: flex-end; -} - -.enterButton { - width: 20%; - padding: 12px 24px; - text-align: center; - font-family: "Lora"; - font-size: 18px; - font-weight: 700; +.disabled { + background-color: grey !important; }