mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 04:25:42 +00:00
fix type
This commit is contained in:
@ -37,7 +37,13 @@ import { InvenTreeTable } from '../../../tables/InvenTreeTable';
|
|||||||
import { NoPricingData } from './PricingPanel';
|
import { NoPricingData } from './PricingPanel';
|
||||||
|
|
||||||
// Display BOM data as a pie chart
|
// Display BOM data as a pie chart
|
||||||
function BomPieChart({ data, currency }: { data: any[]; currency: string }) {
|
function BomPieChart({
|
||||||
|
data,
|
||||||
|
currency
|
||||||
|
}: {
|
||||||
|
readonly data: any[];
|
||||||
|
readonly currency: string;
|
||||||
|
}) {
|
||||||
return (
|
return (
|
||||||
<ResponsiveContainer width="100%" height={500}>
|
<ResponsiveContainer width="100%" height={500}>
|
||||||
<PieChart>
|
<PieChart>
|
||||||
@ -78,7 +84,13 @@ function BomPieChart({ data, currency }: { data: any[]; currency: string }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Display BOM data as a bar chart
|
// Display BOM data as a bar chart
|
||||||
function BomBarChart({ data, currency }: { data: any[]; currency: string }) {
|
function BomBarChart({
|
||||||
|
data,
|
||||||
|
currency
|
||||||
|
}: {
|
||||||
|
readonly data: any[];
|
||||||
|
readonly currency: string;
|
||||||
|
}) {
|
||||||
return (
|
return (
|
||||||
<ResponsiveContainer width="100%" height={500}>
|
<ResponsiveContainer width="100%" height={500}>
|
||||||
<BarChart data={data}>
|
<BarChart data={data}>
|
||||||
@ -113,8 +125,8 @@ export default function BomPricingPanel({
|
|||||||
part,
|
part,
|
||||||
pricing
|
pricing
|
||||||
}: {
|
}: {
|
||||||
part: any;
|
readonly part: any;
|
||||||
pricing: any;
|
readonly pricing: any;
|
||||||
}): ReactNode {
|
}): ReactNode {
|
||||||
const table = useTable('pricing-bom');
|
const table = useTable('pricing-bom');
|
||||||
|
|
||||||
|
@ -43,9 +43,9 @@ export default function PricingPanel({
|
|||||||
label: panelOptions;
|
label: panelOptions;
|
||||||
title: string;
|
title: string;
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
disabled?: boolean | undefined;
|
disabled?: boolean;
|
||||||
}): ReactNode {
|
}): ReactNode {
|
||||||
const is_disabled = disabled === undefined ? false : disabled;
|
const is_disabled = disabled ?? false;
|
||||||
return (
|
return (
|
||||||
visible && (
|
visible && (
|
||||||
<Accordion.Item value={label} id={label}>
|
<Accordion.Item value={label} id={label}>
|
||||||
|
Reference in New Issue
Block a user