Skip to content

Commit

Permalink
fix: link account redirect new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
ter1203 committed Oct 16, 2024
1 parent 5c0992a commit caa57c0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
1 change: 0 additions & 1 deletion client/src/components/CustomTable/CustomTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ const CustomTable = ({
const newOrder = isAsc ? "desc" : "asc";
setOrder(newOrder);
setOrderBy(columnId);

if (sortConfig?.onSort) {
sortConfig.onSort(columnId, newOrder);
}
Expand Down
49 changes: 25 additions & 24 deletions client/src/components/ProspectingActiveAccount/AccountDetail.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Box, Card, Grid, Typography } from "@mui/material";
import CustomTable from "../CustomTable/CustomTable";
import CardActiveAccount from "./CardActiveAccount";
import { Link } from "react-router-dom";
import { tableColumns } from "../../pages/Prospecting/tableColumns";
import { useState } from "react";

Expand Down Expand Up @@ -61,29 +60,31 @@ const AccountDetail = ({
<CustomTable
tableData={{
columns: columnShows,
data: detailedActivationData.map((item) => ({
...item,
"account.name": (
<Link
href={`${instanceUrl}/${item.account?.id}`}
target="_blank"
rel="noopener noreferrer"
>
{item.account?.name || "N/A"}
</Link>
),
"opportunity.name": item.opportunity ? (
<Link
href={`${instanceUrl}/${item.opportunity.id}`}
target="_blank"
rel="noopener noreferrer"
>
{item.opportunity.name || "N/A"}
</Link>
) : (
"N/A"
),
})),
data: detailedActivationData.map((item) => {
return {
...item,
"account.name": (
<a
href={`${instanceUrl}/${item.account?.id}`}
target="_blank"
rel="noopener noreferrer"
>
{item.account?.name || "N/A"}
</a>
),
"opportunity.name": item.opportunity ? (
<a
href={`${instanceUrl}/${item.opportunity.id}`}
target="_blank"
rel="noopener noreferrer"
>
{item.opportunity.name || "N/A"}
</a>
) : (
"N/A"
),
};
}),
selectedIds: new Set(),
availableColumns: tableColumns,
}}
Expand Down

0 comments on commit caa57c0

Please sign in to comment.