File tree Expand file tree Collapse file tree
app/(authenticated)/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
1212} from "@/components/ui/tooltip" ;
1313import { DataTable } from "@/components/data-table" ;
1414import { formatDate } from "@/lib/format" ;
15- import { statusBadgeClass } from "@/lib/service-status " ;
15+ import { statusBadgeClass , subscriptionBadgeClass } from "@/lib/service-badges " ;
1616
1717import { setServiceStatus } from "@/app/(authenticated)/services/actions" ;
1818import type { ServiceView } from "@/app/(authenticated)/services/queries" ;
@@ -61,6 +61,20 @@ export function ServicesDataTable({
6161 </ span >
6262 ) ,
6363 } ,
64+ {
65+ accessorKey : "requiresSubscription" ,
66+ header : "Subscription" ,
67+ cell : ( { row } ) => (
68+ < span
69+ className = {
70+ "inline-flex rounded-full px-2 py-0.5 text-xs capitalize " +
71+ subscriptionBadgeClass ( row . original . requiresSubscription )
72+ }
73+ >
74+ { row . original . requiresSubscription ? "Required" : "Not required" }
75+ </ span >
76+ ) ,
77+ } ,
6478 {
6579 id : "startDate" ,
6680 header : "Start Date" ,
Original file line number Diff line number Diff line change @@ -12,3 +12,9 @@ export function statusBadgeClass(status: ServiceStatus) {
1212 return "bg-muted text-muted-foreground" ;
1313 }
1414}
15+
16+ export function subscriptionBadgeClass ( requiresSubscription : boolean ) {
17+ return requiresSubscription
18+ ? "bg-blue-700/80 text-white"
19+ : "bg-secondary/80 text-secondary-foreground" ;
20+ }
You can’t perform that action at this time.
0 commit comments