fix new code to v7
This commit is contained in:
parent
e3e61228aa
commit
0e0ac2df09
|
|
@ -41,7 +41,7 @@ export default function PartPricingPanel({ part }: { part: any }) {
|
|||
}, [user, part]);
|
||||
|
||||
return (
|
||||
<Stack spacing="xs">
|
||||
<Stack gap="xs">
|
||||
<LoadingOverlay visible={instanceQuery.isLoading} />
|
||||
{!pricing && !instanceQuery.isLoading && (
|
||||
<Alert color="ref" title={t`Error`}>
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ export default function BomPricingPanel({
|
|||
const [chartType, setChartType] = useState<string>('pie');
|
||||
|
||||
return (
|
||||
<Stack spacing="xs">
|
||||
<Stack gap="xs">
|
||||
<SimpleGrid cols={2}>
|
||||
<InvenTreeTable
|
||||
tableState={table}
|
||||
|
|
@ -182,7 +182,7 @@ export default function BomPricingPanel({
|
|||
}}
|
||||
/>
|
||||
{bomPricingData.length > 0 ? (
|
||||
<Stack spacing="xs">
|
||||
<Stack gap="xs">
|
||||
{chartType == 'bar' && <BomBarChart data={bomPricingData} />}
|
||||
{chartType == 'pie' && <BomPieChart data={bomPricingData} />}
|
||||
<SegmentedControl
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ export default function PricingOverviewPanel({
|
|||
title: t`Pricing Category`,
|
||||
render: (record: PricingOverviewEntry) => {
|
||||
return (
|
||||
<Group position="left" spacing="xs">
|
||||
<Group justify="left" gap="xs">
|
||||
{record.icon}
|
||||
<Text weight={700}>{record.title}</Text>
|
||||
<Text fw={700}>{record.title}</Text>
|
||||
</Group>
|
||||
);
|
||||
}
|
||||
|
|
@ -143,9 +143,9 @@ export default function PricingOverviewPanel({
|
|||
// TODO: Add "update now" button
|
||||
|
||||
return (
|
||||
<Stack spacing="xs">
|
||||
<Stack gap="xs">
|
||||
<SimpleGrid cols={2}>
|
||||
<Stack spacing="xs">
|
||||
<Stack gap="xs">
|
||||
{pricing?.updated && (
|
||||
<Paper p="xs">
|
||||
<Alert color="blue" title={t`Last Updated`}>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export default function PricingPanel({
|
|||
|
||||
export function NoPricingData() {
|
||||
return (
|
||||
<Stack spacing="xs">
|
||||
<Stack gap="xs">
|
||||
<Alert icon={<IconExclamationCircle />} color="blue" title={t`No Data`}>
|
||||
<Text>{t`No pricing data available`}</Text>
|
||||
</Alert>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export default function PurchaseHistoryPanel({
|
|||
let units = record.supplier_part_detail?.pack_quantity;
|
||||
|
||||
return (
|
||||
<Group position="apart" spacing="xs">
|
||||
<Group justify="apart" gap="xs">
|
||||
<Text>{price}</Text>
|
||||
{units && <Text size="xs">[{units}]</Text>}
|
||||
</Group>
|
||||
|
|
@ -85,7 +85,7 @@ export default function PurchaseHistoryPanel({
|
|||
let units = record.part_detail?.units;
|
||||
|
||||
return (
|
||||
<Group position="apart" spacing="xs">
|
||||
<Group justify="apart" gap="xs">
|
||||
<Text>{price}</Text>
|
||||
{units && <Text size="xs">[{units}]</Text>}
|
||||
</Group>
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ export default function VariantPricingPanel({
|
|||
}, [table.records]);
|
||||
|
||||
return (
|
||||
<Stack spacing="xs">
|
||||
<Stack gap="xs">
|
||||
<SimpleGrid cols={2}>
|
||||
<InvenTreeTable
|
||||
tableState={table}
|
||||
|
|
|
|||
|
|
@ -196,8 +196,8 @@ export function AttachmentTable({
|
|||
attachmentType: 'file',
|
||||
callback: table.refreshTable
|
||||
});
|
||||
variant = 'default';
|
||||
}}
|
||||
variant="default"
|
||||
>
|
||||
<IconFileUpload />
|
||||
</ActionIcon>
|
||||
|
|
@ -216,8 +216,8 @@ export function AttachmentTable({
|
|||
attachmentType: 'link',
|
||||
callback: table.refreshTable
|
||||
});
|
||||
variant = 'default';
|
||||
}}
|
||||
variant="default"
|
||||
>
|
||||
<IconExternalLink />
|
||||
</ActionIcon>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export function SupplierPriceBreakColumns(): TableColumn[] {
|
|||
switchable: true,
|
||||
render: (record: any) => {
|
||||
return (
|
||||
<Group spacing="xs" noWrap>
|
||||
<Group gap="xs" wrap="nowrap">
|
||||
<Thumbnail
|
||||
src={
|
||||
record?.supplier_detail?.thumbnail ??
|
||||
|
|
@ -96,7 +96,7 @@ export function SupplierPriceBreakColumns(): TableColumn[] {
|
|||
});
|
||||
|
||||
return (
|
||||
<Group position="apart" spacing="xs" grow>
|
||||
<Group justify="apart" gap="xs" grow>
|
||||
<Text>{price}</Text>
|
||||
{units && <Text size="xs">[{units}]</Text>}
|
||||
</Group>
|
||||
|
|
|
|||
Loading…
Reference in New Issue