diff --git a/src/views/products/Audit.jsx b/src/views/products/Audit.jsx index 9a23e0d..803507f 100644 --- a/src/views/products/Audit.jsx +++ b/src/views/products/Audit.jsx @@ -56,7 +56,7 @@ const Header = ({ title, agency, refresh, ...props }) => { ); }; -const PriceTable = ({ dataSource, refresh }) => { +const PriceTable = ({ productType, dataSource, refresh }) => { const { t } = useTranslation('products'); const [loading, activeAgency] = useProductsStore((state) => [state.loading, state.activeAgency]); const { message, notification } = App.useApp(); @@ -86,6 +86,7 @@ const PriceTable = ({ dataSource, refresh }) => { const columns = [ { key: 'title', dataIndex: ['info', 'title'], width: '16rem', title: t('Title'), onCell: (r, index) => ({ rowSpan: r.rowSpan }), render: (text, r) => text || r.lgc_details?.['2']?.title || r.lgc_details?.['1']?.title || '' }, + ...(productType === 'B' ? [{ key: 'km', dataIndex: ['info', 'km'], title: t('KM')}] : []), { key: 'adult', title: t('AgeType.Adult'), render: (_, { adult_cost, currency, unit_id, unit_name }) => `${adult_cost} ${currency} / ${t(`PriceUnit.${unit_id}`)}` }, { key: 'child', title: t('AgeType.Child'), render: (_, { child_cost, currency, unit_id, unit_name }) => `${child_cost} ${currency} / ${t(`PriceUnit.${unit_id}`)}` }, // {key: 'unit', title: t('Unit'), }, @@ -145,6 +146,7 @@ const TypesPanels = (props) => { children: ( r.concat(