Skip to content

Commit

Permalink
Merge branch 'james/hardcode_different_domain' of github.com:nycmeshn…
Browse files Browse the repository at this point in the history
…et/meshforms into james/hardcode_different_domain
  • Loading branch information
james-otten committed Aug 21, 2024
2 parents 6463cb5 + a5d5816 commit 0303bd9
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions components/QueryForm/QueryForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,15 @@ export function QueryForm() {

// Column Definitions: Defines & controls grid columns.
const colDefs: ColDef[] = useMemo(() => [
{ field: "install_number", headerName: 'Install #', width: 100 },
{
field: "install_number", headerName: 'Install #', width: 100, cellRenderer: (props: any) => {
return (
<a href={`${process.env.NEXT_PUBLIC_MESHDB_URL}/admin/meshapi/install/${props.value}`}>
{props.value}
</a>
);
}
},
{ field: "street_address", headerName: 'Address', width: 250 },
{ field: "unit", headerName: 'Unit', width: 100 },
{ field: "city", headerName: 'City', width: 100 },
Expand All @@ -130,7 +138,7 @@ export function QueryForm() {
{
field: "phone_number", headerName: 'Phone Number', width: 250, cellRenderer: (props: any) => {
return (
<a href={"tel:" + props.value}>
<a href={`tel:${props.value}`}>
{props.value}
</a>
);
Expand All @@ -139,7 +147,7 @@ export function QueryForm() {
{
field: "primary_email_address", headerName: 'Email', width: 300, cellRenderer: (props: any) => {
return (
<a href={"mailto:" + props.value}>
<a href={`mailto:${props.value}`}>
{props.value}
</a>
);
Expand All @@ -148,7 +156,7 @@ export function QueryForm() {
{
field: "stripe_email_address", headerName: 'Stripe Email', width: 300, cellRenderer: (props: any) => {
return (
<a href={"mailto:" + props.value}>
<a href={`mailto:${props.value}`}>
{props.value}
</a>
);
Expand All @@ -160,7 +168,15 @@ export function QueryForm() {
cellEditorPopup: true,
/*cellEditorPopupPosition: 'over' as 'over',*/
},
{ field: "network_number", headerName: 'NN', width: 80 },
{
field: "network_number", headerName: 'NN', width: 80, cellRenderer: (props: any) => {
return (
<a href={`${process.env.NEXT_PUBLIC_MESHDB_URL}/admin/meshapi/node/${props.value}`}>
{props.value}
</a>
);
}
},
{ field: "status", headerName: 'Install Status', width: 160 },
{ field: "notes",
headerName: 'Notes',
Expand Down

0 comments on commit 0303bd9

Please sign in to comment.