mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 20:13:21 +03:00
Add name, company and pipe styling
This commit is contained in:
parent
f5b16c7f6d
commit
759f91b066
@ -12,6 +12,7 @@ import { Company } from '../../interfaces/company.interface';
|
|||||||
import { Pipe } from '../../interfaces/pipe.interface';
|
import { Pipe } from '../../interfaces/pipe.interface';
|
||||||
import { createColumnHelper } from '@tanstack/react-table';
|
import { createColumnHelper } from '@tanstack/react-table';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
|
import CellLink from '../../components/cell-link/CellLink';
|
||||||
import TableHeader from '../../components/table/TableHeader';
|
import TableHeader from '../../components/table/TableHeader';
|
||||||
|
|
||||||
type Person = {
|
type Person = {
|
||||||
@ -86,13 +87,26 @@ const columnHelper = createColumnHelper<Person>();
|
|||||||
const columns = [
|
const columns = [
|
||||||
columnHelper.accessor('fullName', {
|
columnHelper.accessor('fullName', {
|
||||||
header: () => <TableHeader viewName="People" viewIcon={faUser} />,
|
header: () => <TableHeader viewName="People" viewIcon={faUser} />,
|
||||||
|
cell: (props) => (
|
||||||
|
<CellLink
|
||||||
|
name={props.row.original.fullName}
|
||||||
|
picture={props.row.original.picture}
|
||||||
|
href="#"
|
||||||
|
/>
|
||||||
|
),
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor('email', {
|
columnHelper.accessor('email', {
|
||||||
header: () => <TableHeader viewName="Email" viewIcon={faEnvelope} />,
|
header: () => <TableHeader viewName="Email" viewIcon={faEnvelope} />,
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor('company', {
|
columnHelper.accessor('company', {
|
||||||
cell: (props) => <span>{props.row.original.company.name}</span>,
|
|
||||||
header: () => <TableHeader viewName="Company" viewIcon={faBuilding} />,
|
header: () => <TableHeader viewName="Company" viewIcon={faBuilding} />,
|
||||||
|
cell: (props) => (
|
||||||
|
<CellLink
|
||||||
|
name={props.row.original.company.name}
|
||||||
|
picture={props.row.original.company.logo}
|
||||||
|
href="#"
|
||||||
|
/>
|
||||||
|
),
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor('phone', {
|
columnHelper.accessor('phone', {
|
||||||
header: () => <TableHeader viewName="Phone" viewIcon={faPhone} />,
|
header: () => <TableHeader viewName="Phone" viewIcon={faPhone} />,
|
||||||
@ -101,8 +115,14 @@ const columns = [
|
|||||||
header: () => <TableHeader viewName="Creation" viewIcon={faCalendar} />,
|
header: () => <TableHeader viewName="Creation" viewIcon={faCalendar} />,
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor('pipe', {
|
columnHelper.accessor('pipe', {
|
||||||
cell: (props) => <span>{props.row.original.pipe.name}</span>,
|
|
||||||
header: () => <TableHeader viewName="Pipe" viewIcon={faRectangleList} />,
|
header: () => <TableHeader viewName="Pipe" viewIcon={faRectangleList} />,
|
||||||
|
cell: (props) => (
|
||||||
|
<CellLink
|
||||||
|
name={props.row.original.pipe.name}
|
||||||
|
picture={props.row.original.pipe.icon}
|
||||||
|
href="#"
|
||||||
|
/>
|
||||||
|
),
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor('city', {
|
columnHelper.accessor('city', {
|
||||||
header: () => <TableHeader viewName="City" viewIcon={faMapPin} />,
|
header: () => <TableHeader viewName="City" viewIcon={faMapPin} />,
|
||||||
|
Loading…
Reference in New Issue
Block a user