From 611cf195f984d7804bdec6c538ab5a26c2f8ade0 Mon Sep 17 00:00:00 2001 From: william garrity Date: Tue, 3 Feb 2026 17:39:52 -0500 Subject: [PATCH] refactor(OrderCard): use design system components and CSS variables Component Integration: - Replace custom avatar div with Avatar component (name prop for initials) - Badge component already in use for status display - Card component already wrapping the content Theme Support (CSS Variables): - ring-primary for selected state (was ring-blue-500/400) - text-foreground for primary text (was text-gray-900/white) - text-muted-foreground for secondary text (was text-gray-500/400) - bg-muted for service tags (was bg-gray-100/800) - border-border for dividers (was border-gray-100/800) - bg-destructive/10 + text-destructive for rejection (was bg-red-50/900) - text-primary for links (was text-blue-600/400) - bg-primary for accept button (was bg-blue-600) Also adds --color-primary to @theme block in base.css to fix Tailwind v4 utility generation for text-primary, bg-primary, etc. --- src/components/OrderCard/OrderCard.tsx | 41 +++++++++++++------------- src/styles/base.css | 3 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/components/OrderCard/OrderCard.tsx b/src/components/OrderCard/OrderCard.tsx index 90b562b2..c8a1d458 100644 --- a/src/components/OrderCard/OrderCard.tsx +++ b/src/components/OrderCard/OrderCard.tsx @@ -1,6 +1,7 @@ 'use client'; import * as React from 'react'; +import { Avatar } from '../Avatar/Avatar'; import { Badge } from '../Badge/Badge'; import { Card } from '../Card/Card'; @@ -172,7 +173,7 @@ export function OrderCard({ return (
@@ -180,13 +181,13 @@ export function OrderCard({
- + #{orderNumber} {statusInfo.label}

{formatRelativeTime(createdAt)} @@ -194,7 +195,7 @@ export function OrderCard({

{totalAmount !== undefined && (
-

+

{formatCurrency(totalAmount, currency)}

@@ -204,18 +205,16 @@ export function OrderCard({ {/* Employee Info */}
-
- - {employee.firstName[0]} - {employee.lastName[0]} - -
+
-

+

{employee.firstName} {employee.lastName}

{employer && ( -

+

{employer.name}

)} @@ -225,20 +224,20 @@ export function OrderCard({ {/* Services */}
-

+

Services ({services.length})

{services.slice(0, 3).map((service) => ( {service.name} ))} {services.length > 3 && ( - + +{services.length - 3} more )} @@ -247,7 +246,7 @@ export function OrderCard({ {/* Scheduled Date */} {scheduledDate && ( -
+
+
Reason: {rejectionReason}
)} {/* Actions */} -
+
{onView && ( @@ -289,7 +288,7 @@ export function OrderCard({ @@ -298,7 +297,7 @@ export function OrderCard({ diff --git a/src/styles/base.css b/src/styles/base.css index 7f75e3f9..553391b3 100644 --- a/src/styles/base.css +++ b/src/styles/base.css @@ -11,7 +11,8 @@ /* BlueHive brand colors - exposed as Tailwind utilities */ @theme { - /* Primary Color Scale - Reference CSS custom properties for dynamic theming */ + /* Primary Color - Default + Scale */ + --color-primary: var(--mieweb-primary-500); --color-primary-50: var(--mieweb-primary-50); --color-primary-100: var(--mieweb-primary-100); --color-primary-200: var(--mieweb-primary-200);