2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-15 03:23:07 +00:00
Oliver 5d05137630
[Platform] BOM Table (#5876)
* Add generic BooleanColumn for tables

* Edit BOM item

* Add 'building' quantity to BomItemSerializer

* Improve "available" column

* Fix yesnobutton

* Update 'available' and 'can_build' columns

* Delete BOM item

* Improve back-end ordering for BomItem list API

* Table tweaks

* Bump API version

* Tweak API notes
2023-11-08 07:37:17 +11:00

16 lines
313 B
TypeScript

import { t } from '@lingui/macro';
import { Badge } from '@mantine/core';
export function YesNoButton({ value }: { value: boolean }) {
return (
<Badge
color={value ? 'lime.5' : 'red.6'}
variant="filled"
radius="lg"
size="sm"
>
{value ? t`Yes` : t`No`}
</Badge>
);
}