import { Customer, CustomerGroup } from "@medusajs/medusa" import { Column } from "react-table" import CustomerAvatarItem from "../../molecules/customer-avatar-item" import { getColor } from "../../../utils/color" import SortingIcon from "../../fundamentals/icons/sorting-icon" import CustomersGroupsSummary from "../../molecules/customers-groups-summary" import IndeterminateCheckbox from "../../molecules/indeterminate-checkbox" import Table from "../../molecules/table" export const CUSTOMER_GROUPS_TABLE_COLUMNS: Column[] = [ { Header: () => (
Title
), accessor: "name", }, { Header: () => (
Members
), id: "members", accessor: (r) => r.customers?.length, }, ] export const CUSTOMER_GROUPS_CUSTOMERS_TABLE_COLUMNS: Column[] = [ { id: "selection", Header: ({ getToggleAllPageRowsSelectedProps }) => ( ), Cell: ({ row }) => { return ( e.stopPropagation()} className="w-[100px]"> ) }, }, { Header: () => (
Name
), id: "avatar", Cell: ({ row }) => ( ), }, { Header: () => (
Email
), accessor: "email", }, { accessor: "groups", Header: () =>
Segments
, Cell: ({ cell: { value } }) => , }, ] export const CUSTOMER_GROUPS_CUSTOMERS_LIST_TABLE_COLUMNS: Column[] = [ { Header: () => (
Name
), id: "avatar", Cell: ({ row }) => ( ), }, { Header: () => (
Email
), accessor: "email", }, { accessor: "groups", disableSortBy: true, Header: "Groups", Cell: ({ cell: { value } }) => , }, { Header: "", id: "settings-col", }, ]