diff --git a/apps/portal/src/features/billing/components/BillingSummary/BillingSummary.tsx b/apps/portal/src/features/billing/components/BillingSummary/BillingSummary.tsx index 24b20653..a0fdb6ca 100644 --- a/apps/portal/src/features/billing/components/BillingSummary/BillingSummary.tsx +++ b/apps/portal/src/features/billing/components/BillingSummary/BillingSummary.tsx @@ -27,18 +27,18 @@ const BillingSummary = forwardRef( return (
-
-
+
+
-
-
-
+
+
+
@@ -75,7 +75,7 @@ const BillingSummary = forwardRef(
( {/* Header */}
-
- +
+
-

Billing Summary

+

Billing Summary

{!compact && ( View All @@ -108,33 +108,33 @@ const BillingSummary = forwardRef( return (
-
{item.label}
+
{item.label}
{!compact && item.count > 0 && ( -
+
{item.count} invoice{item.count !== 1 ? "s" : ""}
)}
-
+
{formatAmount(item.amount)}
{compact && item.count > 0 && ( -
+
{item.count} invoice{item.count !== 1 ? "s" : ""}
)} @@ -146,20 +146,20 @@ const BillingSummary = forwardRef( {/* Total Invoices */} {!compact && ( -
+
- Total Invoices - {summary.invoiceCount.total} + Total Invoices + {summary.invoiceCount.total}
)} {/* Quick Actions */} {compact && ( -
+
View All Invoices diff --git a/apps/portal/src/features/billing/components/InvoiceStatusBadge.tsx b/apps/portal/src/features/billing/components/InvoiceStatusBadge.tsx index 103f7d39..b4b11682 100644 --- a/apps/portal/src/features/billing/components/InvoiceStatusBadge.tsx +++ b/apps/portal/src/features/billing/components/InvoiceStatusBadge.tsx @@ -12,55 +12,65 @@ import type { InvoiceStatus } from "@customer-portal/domain/billing"; type StatusConfig = { icon: ReactElement; color: string; + iconColor: string; label: string; }; const STATUS_CONFIG: Record = { Draft: { - icon: , - color: "bg-gray-100 text-gray-800 border-gray-200", + icon: , + iconColor: "text-neutral", + color: "bg-neutral-soft text-neutral border-neutral-border", label: "Draft", }, Pending: { - icon: , - color: "bg-blue-100 text-blue-800 border-blue-200", + icon: , + iconColor: "text-status-pending", + color: "bg-status-pending-bg text-status-pending border-status-pending-border", label: "Pending", }, Paid: { - icon: , - color: "bg-green-100 text-green-800 border-green-200", + icon: , + iconColor: "text-status-paid", + color: "bg-status-paid-bg text-status-paid border-status-paid-border", label: "Paid", }, Unpaid: { - icon: , - color: "bg-yellow-100 text-yellow-800 border-yellow-200", + icon: , + iconColor: "text-status-unpaid", + color: "bg-status-unpaid-bg text-status-unpaid border-status-unpaid-border", label: "Unpaid", }, Overdue: { - icon: , - color: "bg-red-100 text-red-800 border-red-200", + icon: , + iconColor: "text-status-overdue", + color: "bg-status-overdue-bg text-status-overdue border-status-overdue-border", label: "Overdue", }, Cancelled: { - icon: , - color: "bg-gray-100 text-gray-800 border-gray-200", + icon: , + iconColor: "text-neutral", + color: "bg-neutral-soft text-neutral border-neutral-border", label: "Cancelled", }, Refunded: { - icon: , - color: "bg-emerald-100 text-emerald-800 border-emerald-200", + icon: , + iconColor: "text-info", + color: "bg-info-soft text-info border-info-border", label: "Refunded", }, Collections: { - icon: , - color: "bg-red-100 text-red-900 border-red-200", + icon: , + iconColor: "text-destructive", + color: "bg-destructive-soft text-destructive border-destructive-border", label: "Collections", }, }; const DEFAULT_STATUS: StatusConfig = { - icon: , - color: "bg-gray-100 text-gray-800 border-gray-200", + icon: , + iconColor: "text-neutral", + color: "bg-neutral-soft text-neutral border-neutral-border", label: "Unknown", }; @@ -71,8 +81,8 @@ export function InvoiceStatusBadge({ status }: { status: InvoiceStatus }) { - {config.icon} - {config.label} + {config.icon} + {config.label} ); } diff --git a/apps/portal/src/features/billing/components/PaymentMethodCard/PaymentMethodCard.tsx b/apps/portal/src/features/billing/components/PaymentMethodCard/PaymentMethodCard.tsx index f2ee393b..ff3c60a5 100644 --- a/apps/portal/src/features/billing/components/PaymentMethodCard/PaymentMethodCard.tsx +++ b/apps/portal/src/features/billing/components/PaymentMethodCard/PaymentMethodCard.tsx @@ -36,16 +36,16 @@ const getPaymentMethodIcon = (type: PaymentMethod["type"]) => { const getCardBrandColor = (cardBrand?: string) => { switch (cardBrand?.toLowerCase()) { case "visa": - return "text-blue-600"; + return "text-info"; case "mastercard": - return "text-red-600"; + return "text-destructive"; case "amex": case "american express": - return "text-green-600"; + return "text-success"; case "discover": - return "text-orange-600"; + return "text-warning"; default: - return "text-gray-600"; + return "text-muted-foreground"; } }; @@ -78,8 +78,8 @@ const PaymentMethodCard = forwardRef( if (type === "BankAccount" || type === "RemoteBankAccount") { return (
-
{bankName || "Bank Account"}
-
+
{bankName || "Bank Account"}
+
{cardLastFour && •••• {cardLastFour}}
@@ -89,11 +89,11 @@ const PaymentMethodCard = forwardRef( // Credit Card return (
-
+
{cardType || "Credit Card"} {cardLastFour && •••• {cardLastFour}}
-
+
{formatExpiryDate(expiryDate) && Expires {formatExpiryDate(expiryDate)}} {gatewayName && • {gatewayName}}
@@ -105,9 +105,9 @@ const PaymentMethodCard = forwardRef(
(
{getPaymentMethodIcon(type)} @@ -134,7 +134,7 @@ const PaymentMethodCard = forwardRef( {/* Description if different from generated details */} {description && !description.includes(cardLastFour || "") && ( -
{description}
+
{description}
)} {/* Default badge */} @@ -153,7 +153,7 @@ const PaymentMethodCard = forwardRef(
); diff --git a/apps/portal/src/features/catalog/components/base/CardBadge.tsx b/apps/portal/src/features/catalog/components/base/CardBadge.tsx index 76b8cf99..4d4b757b 100644 --- a/apps/portal/src/features/catalog/components/base/CardBadge.tsx +++ b/apps/portal/src/features/catalog/components/base/CardBadge.tsx @@ -19,19 +19,19 @@ export function CardBadge({ text, variant = "default", size = "md" }: CardBadgeP const getVariantClasses = () => { switch (variant) { case "gold": - return "bg-yellow-50 text-yellow-700 border-yellow-200"; + return "bg-warning-bg text-warning border-warning-border"; case "platinum": - return "bg-indigo-50 text-indigo-700 border-indigo-200"; + return "bg-status-completed-bg text-status-completed border-status-completed-border"; case "silver": - return "bg-gray-50 text-gray-700 border-gray-200"; + return "bg-neutral-soft text-neutral border-neutral-border"; case "recommended": - return "bg-green-50 text-green-700 border-green-200"; + return "bg-success-bg text-success border-success-border"; case "family": - return "bg-blue-50 text-blue-700 border-blue-200"; + return "bg-info-soft text-info border-info-border"; case "new": - return "bg-purple-50 text-purple-700 border-purple-200"; + return "bg-primary/10 text-primary border-primary/20"; default: - return "bg-gray-50 text-gray-700 border-gray-200"; + return "bg-neutral-soft text-neutral border-neutral-border"; } }; diff --git a/apps/portal/src/features/sim-management/components/DataUsageChart.tsx b/apps/portal/src/features/sim-management/components/DataUsageChart.tsx index 52d61da2..69add8cc 100644 --- a/apps/portal/src/features/sim-management/components/DataUsageChart.tsx +++ b/apps/portal/src/features/sim-management/components/DataUsageChart.tsx @@ -38,29 +38,29 @@ export function DataUsageChart({ }; const getUsageColor = (percentage: number) => { - if (percentage >= 90) return "bg-red-500"; - if (percentage >= 75) return "bg-yellow-500"; - if (percentage >= 50) return "bg-orange-500"; - return "bg-green-500"; + if (percentage >= 90) return "bg-destructive"; + if (percentage >= 75) return "bg-warning"; + if (percentage >= 50) return "bg-status-unpaid"; + return "bg-success"; }; const getUsageTextColor = (percentage: number) => { - if (percentage >= 90) return "text-red-600"; - if (percentage >= 75) return "text-yellow-600"; - if (percentage >= 50) return "text-orange-600"; - return "text-green-600"; + if (percentage >= 90) return "text-destructive"; + if (percentage >= 75) return "text-warning"; + if (percentage >= 50) return "text-status-unpaid"; + return "text-success"; }; if (isLoading) { return ( -
+
-
-
-
+
+
+
-
-
+
+
@@ -69,11 +69,11 @@ export function DataUsageChart({ if (error) { return ( -
+
- -

Error Loading Usage Data

-

{error}

+ +

Error Loading Usage Data

+

{error}

); @@ -87,17 +87,17 @@ export function DataUsageChart({ return (
{/* Header */} -
+
-
- +
+
-

Data Usage

-

Current month usage and remaining quota

+

Data Usage

+

Current month usage and remaining quota

@@ -107,21 +107,21 @@ export function DataUsageChart({ {/* Current Usage Overview */}
- Used this month + Used this month {formatUsage(totalRecentUsage)} of {formatUsage(totalQuota)}
{/* Progress Bar */} -
+
-
+
0% {usagePercentage.toFixed(1)}% used @@ -132,17 +132,17 @@ export function DataUsageChart({ {/* Today's Usage */}
-
+
-
+
{formatUsage(usage.todayUsageMb)}
-
Used today
+
Used today
-
+
-
+
-
+
{formatUsage(remainingQuotaMb)}
-
Remaining
+
Remaining
-
+
0 && (
-

+

Recent Usage History

@@ -196,20 +196,20 @@ export function DataUsageChart({ const dayPercentage = totalQuota > 0 ? (day.usageMb / totalQuota) * 100 : 0; return (
- + {new Date(day.date).toLocaleDateString("en-US", { month: "short", day: "numeric", })}
-
+
- + {formatUsage(day.usageMb)}
@@ -223,12 +223,12 @@ export function DataUsageChart({ {/* Warnings */} {usagePercentage >= 90 && ( -
+
- +
-

High Usage Warning

-

+

High Usage Warning

+

You have used {usagePercentage.toFixed(1)}% of your data quota. Consider topping up to avoid service interruption.

@@ -238,12 +238,12 @@ export function DataUsageChart({ )} {usagePercentage >= 75 && usagePercentage < 90 && ( -
+
- +
-

Usage Notice

-

+

Usage Notice

+

You have used {usagePercentage.toFixed(1)}% of your data quota. Consider monitoring your usage.

diff --git a/apps/portal/src/features/subscriptions/components/SubscriptionDetails.tsx b/apps/portal/src/features/subscriptions/components/SubscriptionDetails.tsx index 657b1ee1..b2061188 100644 --- a/apps/portal/src/features/subscriptions/components/SubscriptionDetails.tsx +++ b/apps/portal/src/features/subscriptions/components/SubscriptionDetails.tsx @@ -62,8 +62,8 @@ export const SubscriptionDetails = forwardRef {getSubscriptionStatusIcon(subscription.status)}
-

Subscription Details

-

Service subscription information

+

Subscription Details

+

Service subscription information

- -

+ +

Billing Amount

-

+

{formatCurrency(subscription.amount)}

-

{getBillingCycleLabel(subscription.cycle)}

+

+ {getBillingCycleLabel(subscription.cycle)} +

{/* Next Due Date */}
- -

+ +

Next Due Date

-

+

{formatDate(subscription.nextDue)}

-

Due date

+

Due date

{/* Registration Date */}
- -

+ +

Registration Date

-

+

{formatDate(subscription.registrationDate)}

-

Service created

+

Service created

{/* Additional Details */} -
+
- -

Service ID

+ +

Service ID

-

{subscription.serviceId}

+

{subscription.serviceId}

{subscription.orderNumber && (
- -

Order Number

+ +

Order Number

-

{subscription.orderNumber}

+

+ {subscription.orderNumber} +

)} {subscription.groupName && (
-

Product Group

-

{subscription.groupName}

+

Product Group

+

{subscription.groupName}

)} {subscription.paymentMethod && (
-

Payment Method

-

+

Payment Method

+

{subscription.paymentMethod}

@@ -159,15 +163,17 @@ export const SubscriptionDetails = forwardRef 0 && ( -
-

Additional Information

+
+

+ Additional Information +

{Object.entries(subscription.customFields).map(([key, value]) => (
-

+

{key.replace(/([A-Z])/g, " $1").trim()}

-

{value}

+

{value}

))}
@@ -176,9 +182,9 @@ export const SubscriptionDetails = forwardRef -

Notes

-

+

+

Notes

+

{subscription.notes}

@@ -191,20 +197,20 @@ export const SubscriptionDetails = forwardRef}> -
+
-
- +
+
-

+

SIM Management Available

-

+

This subscription includes SIM management features such as data usage monitoring, top-up options, and service configuration.

-
    +
    • • Real-time data usage tracking
    • • Data top-up and plan changes
    • • Service feature toggles
    • @@ -222,19 +228,19 @@ export const SubscriptionDetails = forwardRef} > -
      +
      -
      - +
      +
      -

      +

      Internet Service Features

      -

      +

      Your internet service includes high-speed connectivity and support options.

      -
        +
        • • High-speed internet connection
        • • 24/7 technical support
        • • Service monitoring
        • @@ -249,19 +255,19 @@ export const SubscriptionDetails = forwardRef}> -
          +
          -
          - +
          +
          -

          +

          VPN Service Features

          -

          +

          Your VPN service provides secure and private internet access.

          -
            +
            • • Encrypted internet connection
            • • Multiple server locations
            • • No-logs policy
            • diff --git a/apps/portal/src/features/subscriptions/components/SubscriptionStatusBadge.tsx b/apps/portal/src/features/subscriptions/components/SubscriptionStatusBadge.tsx index f86f1ca4..753d971d 100644 --- a/apps/portal/src/features/subscriptions/components/SubscriptionStatusBadge.tsx +++ b/apps/portal/src/features/subscriptions/components/SubscriptionStatusBadge.tsx @@ -6,20 +6,25 @@ import { } from "@customer-portal/domain/subscriptions"; const STATUS_COLOR_MAP: Record = { - [SUBSCRIPTION_STATUS.ACTIVE]: "bg-green-100 text-green-800", - [SUBSCRIPTION_STATUS.INACTIVE]: "bg-gray-100 text-gray-800", - [SUBSCRIPTION_STATUS.PENDING]: "bg-blue-100 text-blue-800", - [SUBSCRIPTION_STATUS.SUSPENDED]: "bg-yellow-100 text-yellow-800", - [SUBSCRIPTION_STATUS.CANCELLED]: "bg-gray-100 text-gray-800", - [SUBSCRIPTION_STATUS.TERMINATED]: "bg-red-100 text-red-800", - [SUBSCRIPTION_STATUS.COMPLETED]: "bg-green-100 text-green-800", + [SUBSCRIPTION_STATUS.ACTIVE]: + "bg-status-active-bg text-status-active border-status-active-border", + [SUBSCRIPTION_STATUS.INACTIVE]: "bg-neutral-soft text-neutral border-neutral-border", + [SUBSCRIPTION_STATUS.PENDING]: + "bg-status-pending-bg text-status-pending border-status-pending-border", + [SUBSCRIPTION_STATUS.SUSPENDED]: + "bg-status-suspended-bg text-status-suspended border-status-suspended-border", + [SUBSCRIPTION_STATUS.CANCELLED]: "bg-neutral-soft text-neutral border-neutral-border", + [SUBSCRIPTION_STATUS.TERMINATED]: + "bg-status-terminated-bg text-status-terminated border-status-terminated-border", + [SUBSCRIPTION_STATUS.COMPLETED]: + "bg-status-completed-bg text-status-completed border-status-completed-border", }; export function SubscriptionStatusBadge({ status }: { status: SubscriptionStatus }) { - const color = STATUS_COLOR_MAP[status] ?? "bg-gray-100 text-gray-800"; + const color = STATUS_COLOR_MAP[status] ?? "bg-neutral-soft text-neutral border-neutral-border"; return ( - + {status} );