table constant data is added and Compliance Safety completed
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useState } from 'react';
|
||||
import { Plus, ShieldCheck, Clock, Check, AlertTriangle, QrCode, FileText, Eye } from 'lucide-react';
|
||||
import Button from "@/components/common/button";
|
||||
import { workPermitFilters } from '@/constants/constant';
|
||||
import { permitsData, workPermitFilters } from '@/constants/constant';
|
||||
import FilterTabs from '@/components/common/roundedFilters';
|
||||
import StatCard from '@/components/common/dashStatCard';
|
||||
import InfoBanner from '@/components/common/infoBanner';
|
||||
@@ -11,94 +11,9 @@ export default function WorkPermitPortal() {
|
||||
const [activeFilter, setActiveFilter] = useState<string>('All');
|
||||
|
||||
// Permit Data matching the UI
|
||||
const permitsData = [
|
||||
{
|
||||
permit: "PTW-2663",
|
||||
workingType: "Work at Height",
|
||||
location: "Atrium void",
|
||||
contractor: "Blue Star",
|
||||
validityDate: "Jun 26, 2026",
|
||||
validityTime: "08:30–17:00",
|
||||
crew: 2,
|
||||
status: "ACTIVE",
|
||||
actionText: "Close out",
|
||||
isHighlighted: false,
|
||||
},
|
||||
{
|
||||
permit: "PTW-2664",
|
||||
workingType: "Electrical Isolation",
|
||||
location: "STP wet well",
|
||||
contractor: "Sterling FM",
|
||||
validityDate: "Jun 26, 2026",
|
||||
validityTime: "09:00–13:00",
|
||||
crew: 3,
|
||||
status: "SUBMITTED",
|
||||
actionText: "Approve",
|
||||
isHighlighted: true, // Row with highlight bar
|
||||
},
|
||||
{
|
||||
permit: "PTW-2665",
|
||||
workingType: "Confined Space",
|
||||
location: "DG yard",
|
||||
contractor: "In-house team",
|
||||
validityDate: "Jun 26, 2026",
|
||||
validityTime: "14:00–18:00",
|
||||
crew: 4,
|
||||
status: "APPROVED",
|
||||
actionText: "Activate",
|
||||
isHighlighted: false,
|
||||
},
|
||||
{
|
||||
permit: "PTW-2666",
|
||||
workingType: "Hot Work",
|
||||
location: "Roof terrace",
|
||||
contractor: "Voltas Ltd",
|
||||
validityDate: "Jun 25, 2026",
|
||||
validityTime: "08:00–12:00",
|
||||
crew: 5,
|
||||
status: "EXPIRED",
|
||||
hasViewIconOnly: true,
|
||||
isHighlighted: false,
|
||||
},
|
||||
{
|
||||
permit: "PTW-2667",
|
||||
workingType: "Work at Height",
|
||||
location: "LT panel room",
|
||||
contractor: "Blue Star",
|
||||
validityDate: "Jun 25, 2026",
|
||||
validityTime: "10:00–16:00",
|
||||
crew: 2,
|
||||
status: "CLOSED",
|
||||
hasViewIconOnly: true,
|
||||
isHighlighted: false,
|
||||
},
|
||||
{
|
||||
permit: "PTW-2668",
|
||||
workingType: "Electrical Isolation",
|
||||
location: "Chiller plant",
|
||||
contractor: "Sterling FM",
|
||||
validityDate: "Jun 26, 2026",
|
||||
validityTime: "11:00–15:00",
|
||||
crew: 3,
|
||||
status: "REJECTED",
|
||||
hasViewIconOnly: true,
|
||||
isHighlighted: false,
|
||||
},
|
||||
{
|
||||
permit: "PTW-2726",
|
||||
workingType: "Work at Height",
|
||||
location: "Atrium void",
|
||||
contractor: "Blue Star",
|
||||
validityDate: "Jun 26, 2026",
|
||||
validityTime: "08:30–17:00",
|
||||
crew: 2,
|
||||
status: "DRAFT",
|
||||
actionText: "Submit",
|
||||
isHighlighted: false,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
const renderStatusBadge = (status: string) => {
|
||||
const renderStatusBadge = (status: string) => {
|
||||
switch (status) {
|
||||
case "ACTIVE":
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user