.
This commit is contained in:
parent
1fd2d79bbe
commit
3bc8d10f56
@ -65,8 +65,8 @@ export const QuotesDataTable = ({
|
||||
|
||||
const { download, ...downloadProps } = useDownloader();
|
||||
|
||||
const columns = useMemo<ColumnDef<IListQuotes_Response_DTO, any>[]>(
|
||||
() => [
|
||||
const columns = useMemo<ColumnDef<IListQuotes_Response_DTO, any>[]>(() => {
|
||||
const columns = [
|
||||
{
|
||||
id: "reference" as const,
|
||||
accessorKey: "reference",
|
||||
@ -138,16 +138,19 @@ export const QuotesDataTable = ({
|
||||
size: 600,
|
||||
},
|
||||
/*{
|
||||
id: "total_price" as const,
|
||||
accessor: "total_price",
|
||||
header: () => <div className='text-right'>{t("quotes.list.columns.total_price")}</div>,
|
||||
cell: ({ row: { original } }) => {
|
||||
const price = MoneyValue.create(original.total_price);
|
||||
return (
|
||||
<div className='text-right'>{price.isSuccess ? price.object.toFormat() : "-"}</div>
|
||||
);
|
||||
},
|
||||
},*/
|
||||
id: "total_price" as const,
|
||||
accessor: "total_price",
|
||||
header: () => <div className='text-right'>{t("quotes.list.columns.total_price")}</div>,
|
||||
cell: ({ row: { original } }) => {
|
||||
const price = MoneyValue.create(original.total_price);
|
||||
return (
|
||||
<div className='text-right'>{price.isSuccess ? price.object.toFormat() : "-"}</div>
|
||||
);
|
||||
},
|
||||
},*/
|
||||
];
|
||||
|
||||
const actionColumn = [
|
||||
{
|
||||
id: "row-actions",
|
||||
header: () => null,
|
||||
@ -197,10 +200,10 @@ export const QuotesDataTable = ({
|
||||
</ButtonGroup>
|
||||
),
|
||||
},
|
||||
],
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[]
|
||||
);
|
||||
];
|
||||
|
||||
return preview ? columns : [...columns, ...actionColumn];
|
||||
}, [preview]);
|
||||
|
||||
const handleOnPaginationChange = () => {
|
||||
//setActiveRow(undefined);
|
||||
|
||||
@ -17,9 +17,9 @@ export const LayoutHeader = () => {
|
||||
);
|
||||
|
||||
return (
|
||||
<header className='sticky top-0 z-20 flex items-center h-16 gap-8 px-4 border-b shadow bg-accent md:px-6'>
|
||||
<nav className='flex-col hidden gap-6 text-lg font-medium md:flex md:flex-row md:items-center md:gap-5 md:text-sm lg:gap-6'>
|
||||
<Link to='/' className='flex items-center font-semibold'>
|
||||
<header className='sticky top-0 z-20 flex items-center h-16 gap-6 px-4 border-b shadow bg-accent md:px-6'>
|
||||
<nav className='flex-col hidden gap-6 text-lg font-medium md:flex md:flex-row md:items-center md:text-sm'>
|
||||
<Link to='/' className='flex items-center mr-6 font-semibold'>
|
||||
<UeckoLogo className='w-24' />
|
||||
<span className='sr-only'>Uecko</span>
|
||||
</Link>
|
||||
@ -99,6 +99,10 @@ export const LayoutHeader = () => {
|
||||
</nav>
|
||||
</SheetContent>
|
||||
</Sheet>
|
||||
<Link to='/' className='flex items-center font-semibold shrink-0 md:hidden'>
|
||||
<UeckoLogo className='w-24' />
|
||||
<span className='sr-only'>Uecko</span>
|
||||
</Link>
|
||||
<div className='flex items-center justify-end w-full gap-4 md:ml-auto md:gap-2 lg:gap-4'>
|
||||
<UserButton />
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user