diff --git a/client/src/app/quotes/components/QuotesDataTable.tsx b/client/src/app/quotes/components/QuotesDataTable.tsx index 5f980c1..8eee8c7 100644 --- a/client/src/app/quotes/components/QuotesDataTable.tsx +++ b/client/src/app/quotes/components/QuotesDataTable.tsx @@ -65,8 +65,8 @@ export const QuotesDataTable = ({ const { download, ...downloadProps } = useDownloader(); - const columns = useMemo[]>( - () => [ + const columns = useMemo[]>(() => { + 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: () =>
{t("quotes.list.columns.total_price")}
, - cell: ({ row: { original } }) => { - const price = MoneyValue.create(original.total_price); - return ( -
{price.isSuccess ? price.object.toFormat() : "-"}
- ); - }, - },*/ + id: "total_price" as const, + accessor: "total_price", + header: () =>
{t("quotes.list.columns.total_price")}
, + cell: ({ row: { original } }) => { + const price = MoneyValue.create(original.total_price); + return ( +
{price.isSuccess ? price.object.toFormat() : "-"}
+ ); + }, + },*/ + ]; + + const actionColumn = [ { id: "row-actions", header: () => null, @@ -197,10 +200,10 @@ export const QuotesDataTable = ({ ), }, - ], - // eslint-disable-next-line react-hooks/exhaustive-deps - [] - ); + ]; + + return preview ? columns : [...columns, ...actionColumn]; + }, [preview]); const handleOnPaginationChange = () => { //setActiveRow(undefined); diff --git a/client/src/components/Layout/LayoutHeader.tsx b/client/src/components/Layout/LayoutHeader.tsx index 6eccdec..adc5467 100644 --- a/client/src/components/Layout/LayoutHeader.tsx +++ b/client/src/components/Layout/LayoutHeader.tsx @@ -17,9 +17,9 @@ export const LayoutHeader = () => { ); return ( -
-