diff --git a/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/user-table-row.tsx b/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/user-table-row.tsx index 54294280..12ab56ae 100644 --- a/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/user-table-row.tsx +++ b/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/user-table-row.tsx @@ -15,23 +15,23 @@ import { Iconify } from 'src/components/iconify'; // ---------------------------------------------------------------------- -export type UserProps = { - id: string; - name: string; - role: string; +export type EnvelopeProps = { + title: string; status: string; - company: string; - avatarUrl: string; - isVerified: boolean; + type: string; + isPartiallySigned: boolean; + isTotallySigned: boolean; + addedWhen: Date; + changedWhen: Date; }; -type UserTableRowProps = { - row: UserProps; +type EnvelopeTableRowProps = { + row: EnvelopeProps; selected: boolean; onSelectRow: () => void; }; -export function UserTableRow({ row, selected, onSelectRow }: UserTableRowProps) { +export function EnvelopeTableRow({ row, selected, onSelectRow }: EnvelopeTableRowProps) { const [openPopover, setOpenPopover] = useState(null); const handleOpenPopover = useCallback((event: React.MouseEvent) => { @@ -57,27 +57,26 @@ export function UserTableRow({ row, selected, onSelectRow }: UserTableRowProps) alignItems: 'center', }} > - - {row.name} + {row.title} - {row.company} - - {row.role} - - - {row.isVerified ? ( - - ) : ( - '-' - )} - - + {/* TODO: arrange the status, type */} + {row.type} + + + {row.isTotallySigned + ? + : row.isPartiallySigned + ? + : + } + + diff --git a/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/utils.ts b/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/utils.ts index 162e24da..0ece07e5 100644 --- a/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/utils.ts +++ b/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/utils.ts @@ -1,4 +1,4 @@ -import type { UserProps } from './user-table-row'; +import type { EnvelopeProps } from './user-table-row'; // ---------------------------------------------------------------------- @@ -53,7 +53,7 @@ export function getComparator( // ---------------------------------------------------------------------- type ApplyFilterProps = { - inputData: UserProps[]; + inputData: EnvelopeProps[]; filterName: string; comparator: (a: any, b: any) => number; }; diff --git a/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/view/user-view.tsx b/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/view/user-view.tsx index f5b97f3d..26cfced9 100644 --- a/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/view/user-view.tsx +++ b/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-react-ui/src/sections/user/view/user-view.tsx @@ -16,13 +16,13 @@ import { Iconify } from 'src/components/iconify'; import { Scrollbar } from 'src/components/scrollbar'; import { TableNoData } from '../table-no-data'; -import { UserTableRow } from '../user-table-row'; +import { EnvelopeTableRow } from '../user-table-row'; import { UserTableHead } from '../user-table-head'; import { TableEmptyRows } from '../table-empty-rows'; import { UserTableToolbar } from '../user-table-toolbar'; import { emptyRows, applyFilter, getComparator } from '../utils'; -import type { UserProps } from '../user-table-row'; +import type { EnvelopeProps } from '../user-table-row'; // ---------------------------------------------------------------------- @@ -31,7 +31,7 @@ export function UserView() { const [filterName, setFilterName] = useState(''); - const dataFiltered: UserProps[] = applyFilter({ + const dataFiltered: EnvelopeProps[] = applyFilter({ inputData: _users, comparator: getComparator(table.order, table.orderBy), filterName, @@ -101,7 +101,7 @@ export function UserView() { table.page * table.rowsPerPage + table.rowsPerPage ) .map((row) => ( -