Refacto/remaining inplace input cells (#531)
* Add inplace date input component * Add inplace phone input component * Add inplace double text input component * Add inplace chip input component * Remove useless styled component * Reduce code through props destructuring
This commit is contained in:
@ -3,7 +3,7 @@ import { createColumnHelper } from '@tanstack/react-table';
|
||||
|
||||
import { CompanyAccountOwnerCell } from '@/companies/components/CompanyAccountOwnerCell';
|
||||
import { CompanyEditableNameChipCell } from '@/companies/components/CompanyEditableNameCell';
|
||||
import { EditableDate } from '@/ui/components/editable-cell/types/EditableDate';
|
||||
import { EditableDateCell } from '@/ui/components/editable-cell/types/EditableDateCell';
|
||||
import { EditableTextCell } from '@/ui/components/editable-cell/types/EditableTextCell';
|
||||
import { ColumnHead } from '@/ui/components/table/ColumnHead';
|
||||
import {
|
||||
@ -114,7 +114,7 @@ export const useCompaniesColumns = () => {
|
||||
/>
|
||||
),
|
||||
cell: (props) => (
|
||||
<EditableDate
|
||||
<EditableDateCell
|
||||
value={
|
||||
props.row.original.createdAt
|
||||
? new Date(props.row.original.createdAt)
|
||||
|
||||
@ -3,8 +3,8 @@ import { createColumnHelper } from '@tanstack/react-table';
|
||||
|
||||
import { EditablePeopleFullName } from '@/people/components/EditablePeopleFullName';
|
||||
import { PeopleCompanyCell } from '@/people/components/PeopleCompanyCell';
|
||||
import { EditableDate } from '@/ui/components/editable-cell/types/EditableDate';
|
||||
import { EditablePhone } from '@/ui/components/editable-cell/types/EditablePhone';
|
||||
import { EditableDateCell } from '@/ui/components/editable-cell/types/EditableDateCell';
|
||||
import { EditablePhoneCell } from '@/ui/components/editable-cell/types/EditablePhoneCell';
|
||||
import { EditableTextCell } from '@/ui/components/editable-cell/types/EditableTextCell';
|
||||
import { ColumnHead } from '@/ui/components/table/ColumnHead';
|
||||
import {
|
||||
@ -87,7 +87,7 @@ export const usePeopleColumns = () => {
|
||||
<ColumnHead viewName="Phone" viewIcon={<IconPhone size={16} />} />
|
||||
),
|
||||
cell: (props) => (
|
||||
<EditablePhone
|
||||
<EditablePhoneCell
|
||||
placeholder="Phone"
|
||||
value={props.row.original.phone || ''}
|
||||
changeHandler={async (value: string) => {
|
||||
@ -112,7 +112,7 @@ export const usePeopleColumns = () => {
|
||||
/>
|
||||
),
|
||||
cell: (props) => (
|
||||
<EditableDate
|
||||
<EditableDateCell
|
||||
value={
|
||||
props.row.original.createdAt
|
||||
? new Date(props.row.original.createdAt)
|
||||
|
||||
Reference in New Issue
Block a user