import { faBuildings, faCalendar, faEnvelope, faRectangleList, faUser, } from '@fortawesome/pro-regular-svg-icons'; import { faList, faMapPin, faPhone } from '@fortawesome/pro-solid-svg-icons'; import WithTopBarContainer from '../../layout/containers/WithTopBarContainer'; import Table from '../../components/table/Table'; import { Company } from '../../interfaces/company.interface'; import { Pipe } from '../../interfaces/pipe.interface'; import { createColumnHelper } from '@tanstack/react-table'; import styled from '@emotion/styled'; import ClickableCell from '../../components/table/ClickableCell'; import ColumnHead from '../../components/table/ColumnHead'; import personPlaceholder from './placeholder.png'; import { parsePhoneNumber, CountryCode } from 'libphonenumber-js'; import Checkbox from '../../components/form/Checkbox'; import HorizontalyAlignedContainer from '../../layout/containers/HorizontalyAlignedContainer'; import CompanyChip from '../../components/chips/CompanyChip'; type Person = { fullName: string; picture?: string; email: string; company: Company; phone: string; creationDate: Date; pipe: Pipe; city: string; countryCode: string; }; const StyledPeopleContainer = styled.div` display: flex; padding-left: ${(props) => props.theme.spacing(2)}; padding-right: ${(props) => props.theme.spacing(2)}; width: 100%; a { color: inherit; text-decoration: none; } `; const defaultData: Array = [ { fullName: 'Alexandre Prot', picture: personPlaceholder, email: 'alexandre@qonto.com', company: { id: 1, name: 'Qonto', domain: 'qonto.com' }, phone: '06 12 34 56 78', creationDate: new Date('Feb 23, 2018'), pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' }, city: 'Paris', countryCode: 'FR', }, { fullName: 'Alexandre Prot', picture: personPlaceholder, email: 'alexandre@qonto.com', company: { id: 2, name: 'LinkedIn', domain: 'linkedin.com' }, phone: '06 12 34 56 78', creationDate: new Date('Feb 23, 2018'), pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' }, city: 'Paris', countryCode: 'FR', }, { fullName: 'Alexandre Prot', picture: personPlaceholder, email: 'alexandre@qonto.com', company: { id: 1, name: 'Qonto', domain: 'qonto.com' }, phone: '06 12 34 56 78', creationDate: new Date('Feb 23, 2018'), pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' }, city: 'Paris', countryCode: 'FR', }, { fullName: 'Alexandre Prot', picture: personPlaceholder, email: 'alexandre@qonto.com', company: { id: 1, name: 'Slack', domain: 'slack.com' }, phone: '06 12 34 56 78', creationDate: new Date('Feb 23, 2018'), pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' }, city: 'Paris', countryCode: 'FR', }, { fullName: 'Alexandre Prot', picture: personPlaceholder, email: 'alexandre@qonto.com', company: { id: 2, name: 'Facebook', domain: 'facebook.com' }, phone: '06 12 34 56 78', creationDate: new Date('Feb 23, 2018'), pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' }, city: 'Paris', countryCode: 'FR', }, ]; const columnHelper = createColumnHelper(); const columns = [ columnHelper.accessor('fullName', { header: () => , cell: (props) => ( ), }), columnHelper.accessor('email', { header: () => , cell: (props) => ( {props.row.original.email} ), }), columnHelper.accessor('company', { header: () => , cell: (props) => ( ), }), columnHelper.accessor('phone', { header: () => , cell: (props) => ( {parsePhoneNumber( props.row.original.phone, props.row.original.countryCode as CountryCode, )?.formatInternational() || props.row.original.phone} ), }), columnHelper.accessor('creationDate', { header: () => , cell: (props) => new Intl.DateTimeFormat(undefined, { month: 'short', day: 'numeric', year: 'numeric', }).format(props.row.original.creationDate), }), columnHelper.accessor('pipe', { header: () => , cell: (props) => ( ), }), columnHelper.accessor('city', { header: () => , }), ]; function People() { return ( ); } export default People;