import { ColumnHeader } from "@/shared/data-view/table-view"
import type { ColumnDef } from "@tanstack/react-table"
/** Core service columns shared between the services page and selector dialogs. */
export const serviceColumns = {
name: {
accessorKey: "labor_name",
header: ({ column }) => ,
cell: ({ row }) => {
const r = row.original as any
return (
{r.labor_name || r.name || "—"}
{r.service_code && (
{r.service_code}
)}
)
},
},
description: {
accessorKey: "description",
header: ({ column }) => ,
cell: ({ row }) => {
const val = (row.original as any).description
return val ? {val} : "—"
},
},
sellingPrice: {
accessorKey: "selling_price",
header: ({ column }) => ,
cell: ({ row }) => {
const val = (row.original as any).selling_price
return val != null ? `$${Number(val).toFixed(2)}` : "—"
},
},
} satisfies Record>