Configure Completed is added

This commit is contained in:
2026-07-25 18:56:15 +05:30
parent a5394823f3
commit cdb52e717e
38 changed files with 5170 additions and 14 deletions

View File

@@ -13,8 +13,10 @@ import {
import Button from "@/components/common/button";
import StatCard from "@/components/common/dashStatCard";
import InfoBanner from '@/components/common/infoBanner';
import {Card} from '@/components/common/cardWrapper'; // Assuming Card wrapper location
import { Card } from '@/components/common/cardWrapper'; // Assuming Card wrapper location
import { CardHeader } from '@/components/common/cardHeader'; // Assuming CardHeader location
import Table from '@/components/common/dataTable';
import { assetHealthheaders, assetHealthrows } from '@/constants/tabledata';
export default function AssetHealthPortal() {
return (
@@ -23,13 +25,13 @@ export default function AssetHealthPortal() {
<div className="flex flex-col md:flex-row md:items-start md:justify-between gap-4 mb-6">
<div>
<div className="flex items-center gap-2 text-[10px] font-bold tracking-widest uppercase font-mono">
<span className="text-teal-400">Apple One HQ Tower</span>
<span className="text-teal-400">Apple One HQ Tower</span>
<span className="text-slate-500"></span>
<span className="text-slate-500">INTELLIGENCE</span>
<span className="text-slate-500"></span>
<span className="text-slate-500">ASSET HEALTH</span>
</div>
<h1 className="text-2xl font-bold text-white tracking-tight mt-2">
<h1 className="text-2xl font-bold text-white tracking-tight mt-2">
Asset health & reliability
</h1>
<p className="text-sm font-medium text-slate-400 mt-2 max-w-xl leading-relaxed">
@@ -54,7 +56,7 @@ export default function AssetHealthPortal() {
{/* --- STAT CARDS --- */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
{/* Card 1: Predicted failures */}
<StatCard
<StatCard
variant="icon"
title="Fleet health index"
value="69"
@@ -95,10 +97,84 @@ export default function AssetHealthPortal() {
/>
</div>
{/* --- MAIN CONTENT GRID (TABLE + RIGHT SIDE CARDS) --- */}
<div className="grid grid-cols-1 lg:grid-cols-3 gap-4">
{/* Left Section: Asset Health Register Table Container */}
<div className="lg:col-span-2 bg-[#0b1727] border
border-slate-800/80 rounded-xl p-4 flex flex-col justify-between">
<div>
<div className="flex items-center justify-between mb-4">
<h2 className="text-base font-bold text-white tracking-tight">Asset health register</h2>
<span className="text-xs font-mono text-slate-500 lowercase">condition-based</span>
</div>
<Table headers={assetHealthheaders} rows={assetHealthrows}/>
</div>
</div>
{/* Right Section: Reliability & Condition Mix Side Panel */}
<div className="flex flex-col gap-4">
{/* Card 1: Reliability by group */}
<div className="bg-[#0b1727] border border-slate-800/80 rounded-xl p-5">
<h3 className="text-base font-bold text-white mb-6">Reliability by group</h3>
<div className="space-y-4 text-sm font-medium">
{/* Electrical */}
<div className="flex items-center justify-between gap-4">
<span className="text-slate-300 w-24">Electrical</span>
<div className="flex-1 bg-slate-800/80 h-2 rounded-full overflow-hidden">
<div className="bg-amber-400 h-full rounded-full" style={{ width: '75%' }}></div>
</div>
<span className="text-amber-400 font-bold font-mono text-xs w-6 text-right">75</span>
</div>
{/* Plumbing */}
<div className="flex items-center justify-between gap-4">
<span className="text-slate-300 w-24">Plumbing</span>
<div className="flex-1 bg-slate-800/80 h-2 rounded-full overflow-hidden">
<div className="bg-emerald-400 h-full rounded-full" style={{ width: '86%' }}></div>
</div>
<span className="text-emerald-400 font-bold font-mono text-xs w-6 text-right">86</span>
</div>
</div>
</div>
{/* Card 2: Condition mix */}
<div className="bg-[#0b1727] border border-slate-800/80 rounded-xl p-5 ">
<h3 className="text-base font-bold text-white mb-6">Condition mix</h3>
<div className="space-y-4 text-sm font-medium">
{/* Healthy */}
<div className="flex items-center justify-between gap-4">
<span className="text-slate-300 w-24">Healthy</span>
<div className="flex-1 bg-slate-800/80 h-2 rounded-full overflow-hidden">
<div className="bg-emerald-400 h-full rounded-full" style={{ width: '50%' }}></div>
</div>
<span className="text-slate-300 font-bold font-mono text-xs w-6 text-right">4</span>
</div>
{/* Watch */}
<div className="flex items-center justify-between gap-4">
<span className="text-slate-300 w-24">Watch</span>
<div className="flex-1 bg-slate-800/80 h-2 rounded-full overflow-hidden">
<div className="bg-amber-400 h-full rounded-full" style={{ width: '50%' }}></div>
</div>
<span className="text-slate-300 font-bold font-mono text-xs w-6 text-right">4</span>
</div>
{/* At risk */}
<div className="flex items-center justify-between gap-4">
<span className="text-slate-300 w-24">At risk</span>
<div className="flex-1 bg-slate-800/80 h-2 rounded-full overflow-hidden">
<div className="bg-rose-500 h-full rounded-full" style={{ width: '0%' }}></div>
</div>
<span className="text-slate-300 font-bold font-mono text-xs w-6 text-right">0</span>
</div>
</div>
</div>
</div>
</div>
{/* --- INFO BANNER --- */}
<div className="mt-5">
<InfoBanner
<InfoBanner
boldText="How it works:"
normalText="reliability signals (runtime, faults, vibration, PPM history) roll into a 0100 health index. Assets that drop below threshold auto-surface here and can raise a condition-based PM in one click — replacing fixed-calendar servicing on healthy assets."
/>