fix: add type_formatted in item detail.

This commit is contained in:
elforjani13
2021-12-28 12:30:47 +02:00
parent d8efb17651
commit f2150a982a
2 changed files with 3 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ export default function ItemDetailHeader() {
</DetailsMenu>
<DetailsMenu direction={'horizantal'}>
<DetailItem label={intl.get('item_type')} children={item.type} />
<DetailItem label={intl.get('item_type')} children={item.type_formatted} />
<DetailItem
label={intl.get('item_code')}
children={defaultTo(item.code, '-')}

View File

@@ -69,9 +69,9 @@ export const SellPriceCell = ({ cell: { value } }) => {
};
export const ItemTypeAccessor = (row) => {
return row.type ? (
return row.type_formatted ? (
<Tag minimal={true} round={true} intent={Intent.NONE}>
{intl.get(row.type)}
{row.type_formatted}
</Tag>
) : null;
};