Skip to content

Commit

Permalink
Show Asset Downtime on assets lists page (#6952)
Browse files Browse the repository at this point in the history
* Show Asset Downtime on assets lists page

* fetch downtime from asset api

* update icon

* update to new api variable
  • Loading branch information
Pranshu1902 committed Feb 12, 2024
1 parent fcc276a commit 2a7c261
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Components/Assets/AssetTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export interface AssetData {
manufacturer: string;
warranty_amc_end_of_validity: string;
resolved_middleware?: ResolvedMiddleware;
latest_status: string;
last_service: AssetService;
meta?: {
[key: string]: any;
Expand Down
7 changes: 7 additions & 0 deletions src/Components/Assets/AssetsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,13 @@ const AssetsList = () => {
<Chip variant="danger" startIcon="l-cog" text="Not Working" />
)}
{warrantyAmcValidityChip(asset.warranty_amc_end_of_validity)}
{asset?.latest_status === "Down" && (
<Chip
variant="danger"
startIcon="l-link-broken"
text={asset?.latest_status}
/>
)}{" "}
</div>
</div>
</Link>
Expand Down

0 comments on commit 2a7c261

Please sign in to comment.