Skip to content

Commit

Permalink
Fix: Unlisted DDA should be in red colour
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <[email protected]>
  • Loading branch information
georgepadayatti committed Apr 9, 2024
1 parent b4883d0 commit 8d4ac2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/component/VersionDropDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const VersionDropdown = (props: Props) => {
renderValue={(value) => (
<span
style={{
color: record.publish_flag === "false" ? "#FF0C10" : "black",
color: record.status === "unlisted" ? "#FF0C10" : "black",
}}
>
{value}
Expand All @@ -43,7 +43,7 @@ const VersionDropdown = (props: Props) => {
<MenuItem
value={record.version}
style={{
color: record.publish_flag === "false" ? "#FF0C10" : "black",
color: record.status === "unlisted" ? "#FF0C10" : "black",
}}
>
{record.version}
Expand Down
11 changes: 7 additions & 4 deletions src/container/DDAgreements/ddaTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ const DDAtable = ({
<TableBody>
{tabledata?.dataDisclosureAgreements?.length > 0 ? (
tabledata.dataDisclosureAgreements.map((row, index) => (
<StyledTableRow key={row.templateId}>
<StyledTableCell>{row.purpose}</StyledTableCell>
<StyledTableRow key={row.templateId} style={{color: "red"}}>
<StyledTableCell style={{color: row.status === "unlisted" ? "red" : "black"}}>{row.purpose}</StyledTableCell>
<StyledTableCell>
<VersionDropdown record={row} />
</StyledTableCell>
<StyledTableCell>{getStatus(row.status)}</StyledTableCell>
<StyledTableCell>{row.lawfulBasis}</StyledTableCell>
<StyledTableCell style={{color: row.status === "unlisted" ? "red" : "black"}}>{getStatus(row.status)}</StyledTableCell>
<StyledTableCell style={{color: row.status === "unlisted" ? "red" : "black"}}>{row.lawfulBasis}</StyledTableCell>
<StyledTableCell
style={{
display: "flex",
Expand All @@ -94,6 +94,7 @@ const DDAtable = ({
>
<IconButton aria-label="delete">
<UploadOutlined
style={{color: row.status === "unlisted" ? "red" : "black"}}
fontSize="small"
onClick={() => {
setIsOpenPublish(true), setSelectedDDA(row);
Expand All @@ -108,6 +109,7 @@ const DDAtable = ({
>
<IconButton aria-label="edit">
<VisibilityOutlined
style={{color: row.status === "unlisted" ? "red" : "black"}}
fontSize="small"
onClick={() => {
setIsOpenViewDDA(true), setSelectedDDA(row);
Expand All @@ -122,6 +124,7 @@ const DDAtable = ({
>
<IconButton aria-label="delete">
<DeleteOutlineOutlined
style={{color: row.status === "unlisted" ? "red" : "black"}}
fontSize="small"
onClick={() => {
setIsOpenDelete(true), setSelectedDDA(row);
Expand Down

0 comments on commit 8d4ac2f

Please sign in to comment.