Skip to content

Commit

Permalink
column defs are in feature flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jsyro committed Nov 7, 2023
1 parent 7d788b2 commit 2b6ce54
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions services/core-web/src/components/mine/Permit/MinePermitTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const renderDeleteButtonForPermitAmendments = (record) => {
okText={isLinkedToNowApplication ? "Ok" : "Delete"}
cancelText="Cancel"
onConfirm={
isLinkedToNowApplication ? () => {} : () => record.handleDeletePermitAmendment(record)
isLinkedToNowApplication ? () => { } : () => record.handleDeletePermitAmendment(record)
}
>
<div className="custom-menu-item">
Expand Down Expand Up @@ -190,12 +190,6 @@ const renderPermitNo = (permit) => {
: permit.permit_no;
};

const colourMap = {
"Not Active": "#D8292F",
Pending: "#F1C21B",
Active: "#45A776",
};

const columns: ColumnsType<MinePermitTableItem> = [
{
title: "Permit No.",
Expand Down Expand Up @@ -227,16 +221,6 @@ const columns: ColumnsType<MinePermitTableItem> = [
key: "lastAmended",
render: (text) => <div title="Last Amended">{text}</div>,
},
{
title: "VC Issuance State",
dataIndex: "lastAmendedVC",
key: "lastAmendedVC",
render: (text) => {
const badgeText = text ? VC_CRED_ISSUE_STATES[text] : "N/A";
const colour = colourMap[badgeText] ?? "transparent";
return <Badge color={colour} text={badgeText} />;
},
},
{
title: "",
dataIndex: "addEditButton",
Expand Down Expand Up @@ -374,7 +358,7 @@ const columns: ColumnsType<MinePermitTableItem> = [
onConfirm={
isDeletionAllowed
? () => record.handleDeletePermit((record.permit as IPermit).permit_guid)
: () => {}
: () => { }
}
okText={isDeletionAllowed ? "Delete" : "Ok"}
cancelText="Cancel"
Expand Down

0 comments on commit 2b6ce54

Please sign in to comment.