Skip to content

Commit

Permalink
Added icons to asset card in assetList (#3578)
Browse files Browse the repository at this point in the history
  • Loading branch information
patelaryan7751 authored Sep 14, 2022
1 parent 03525b7 commit 4f5ca0e
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/Components/Assets/AssetsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,27 @@ const AssetsList = () => {
className="w-full bg-white rounded-lg cursor-pointer border-1 shadow p-5 justify-center items-center border border-transparent hover:border-primary-500"
onClick={() => navigate(`/assets/${asset.id}`)}
>

<div className="md:flex">
<p className="text-xl font-normal capitalize break-words">
<span className="mr-2">
{" "}
{asset.asset_class === "HL7MONITOR" ? (
<i className="fa-solid fa-tv text-primary-500"></i>
) : (
""
)}
{asset.asset_class === "ONVIF" ? (
<i className="fa-solid fa-camera text-primary-500"></i>
) : (
""
)}
{asset.asset_class !== "HL7MONITOR" &&
asset.asset_class !== "ONVIF" ? (
<i className="fa-solid fa-cart-plus text-primary-500"></i>
) : (
""
)}
</span>
{asset.name}
</p>
</div>
Expand All @@ -340,7 +358,7 @@ const AssetsList = () => {
Updated at: {moment(asset.modified_date).format("lll")}
</span>
</p>

<div className="flex flex-wrap gap-2 mt-2">
{asset.is_working ? (
<Badge color="green" startIcon="cog" text="Working" />
Expand Down

0 comments on commit 4f5ca0e

Please sign in to comment.