Skip to content

Commit

Permalink
Add NN Status to Query Form (#141)
Browse files Browse the repository at this point in the history
* Add NN status

* Add option to query by member name

* Add option to query by member name to query form

* pretty
  • Loading branch information
WillNilges authored Dec 12, 2024
1 parent 4f8fee7 commit 60cf3aa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/components/JoinForm/JoinForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -717,9 +717,7 @@ export default function JoinForm() {
</div>
<div className={styles.captchaDisclaimer}>
This site is protected by reCAPTCHA and the Google
<a href="https://policies.google.com/privacy">
Privacy Policy
</a> and
<a href="https://policies.google.com/privacy">Privacy Policy</a> and
<a href="https://policies.google.com/terms">
Terms of Service
</a>{" "}
Expand Down
7 changes: 5 additions & 2 deletions src/components/QueryForm/QueryForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const options = [
{ value: "network_number", label: "Network Number (NN)" },
{ value: "install_number", label: "Install Number (#)" },
{ value: "bin", label: "BIN" },
{ value: "name", label: "Member Name" },
];

import { AgGridReact } from "ag-grid-react"; // React Grid Logic
Expand Down Expand Up @@ -67,6 +68,7 @@ export function QueryForm() {

switch (queryForm.query_type) {
case "email_address":
case "name":
route = "members";
break;
case "street_address":
Expand Down Expand Up @@ -200,6 +202,7 @@ export function QueryForm() {
);
},
},
{ field: "status", headerName: "Node Status" },
{ field: "status", headerName: "Install Status" },
{ field: "notes", headerName: "Notes", width: 400 },
],
Expand Down Expand Up @@ -280,7 +283,7 @@ export function QueryForm() {
>
<strong>
Install # / Address / City / State / ZIP / Unit / Name / Email Address
/ Stripe Email / Phone / NN / Status
/ Stripe Email / Phone / NN / Node Status / Install Status
</strong>
<ul style={{ listStyleType: "none" }}>
{legacyQueryResults.map((r, key) => {
Expand All @@ -296,7 +299,7 @@ export function QueryForm() {
{r.stripe_email_address}
</a>
, <a href={"tel:" + r.phone_number}>{r.phone_number}</a>,{" "}
{r.network_number}, {r.status}
{r.network_number}, {r.network_number}, {r.status}
</li>
);
})}
Expand Down
5 changes: 3 additions & 2 deletions src/lib/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ export const QueryFormResponse = z.object({
street_address: z.string().nullable(),
unit: z.string(),
city: z.string(),
state: z.string(),
zip_code: z.string(),
state: z.string().nullable(),
zip_code: z.string().nullable(),
name: z.string(),
phone_number: z.string().nullable(),
primary_email_address: z.string().nullable(),
stripe_email_address: z.string().nullable(),
additional_email_addresses: z.array(z.string()).nullable(),
notes: z.string(),
network_number: z.number().nullable(),
network_number_status: z.string().nullable(),
status: z.string(),
}),
),
Expand Down

0 comments on commit 60cf3aa

Please sign in to comment.