mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-06 17:36:28 +00:00
a4f0087b6c
Introduce project detail screens and reusable status UI. Adds ProjectDetailComponent, WorkOrderCard, StatusTimeline, AssignedPeople, and a new BadgeStatus component with STATUS_BADGE_MAP and STATUS_LIST in badge.tsx to centralize status styling. Adds IProject type (type.project.ts) and project detail page routing. Update existing client/assignment views to use BadgeStatus, improve UI copy and link behavior (ExternalLink icon), handle nullable end dates in forms, include client_id in payload, and improve empty-state handling and descriptions. Misc: rename assignment page export, tweak form labels/placeholders, and small layout/UX refinements.
12 lines
493 B
TypeScript
12 lines
493 B
TypeScript
import { Badge, STATUS_BADGE_MAP } from "@/components/ui/badge"
|
|
|
|
export default function BadgeStatus({ status, className }: { status: string, className?: string }) { // e.g. status = "UAT"
|
|
return (
|
|
<Badge variant={STATUS_BADGE_MAP[status?.toLowerCase()] || "default"} className={className}>
|
|
{status?.toLowerCase()
|
|
.split(' ')
|
|
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
|
.join(' ')}
|
|
</Badge>
|
|
)
|
|
} |