mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fix type
This commit is contained in:
parent
9f16d3f957
commit
5b2668c4d9
@ -37,7 +37,13 @@ import { InvenTreeTable } from '../../../tables/InvenTreeTable';
|
||||
import { NoPricingData } from './PricingPanel';
|
||||
|
||||
// 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 (
|
||||
<ResponsiveContainer width="100%" height={500}>
|
||||
<PieChart>
|
||||
@ -78,7 +84,13 @@ function BomPieChart({ data, currency }: { data: any[]; currency: string }) {
|
||||
}
|
||||
|
||||
// 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 (
|
||||
<ResponsiveContainer width="100%" height={500}>
|
||||
<BarChart data={data}>
|
||||
@ -113,8 +125,8 @@ export default function BomPricingPanel({
|
||||
part,
|
||||
pricing
|
||||
}: {
|
||||
part: any;
|
||||
pricing: any;
|
||||
readonly part: any;
|
||||
readonly pricing: any;
|
||||
}): ReactNode {
|
||||
const table = useTable('pricing-bom');
|
||||
|
||||
|
@ -43,9 +43,9 @@ export default function PricingPanel({
|
||||
label: panelOptions;
|
||||
title: string;
|
||||
visible: boolean;
|
||||
disabled?: boolean | undefined;
|
||||
disabled?: boolean;
|
||||
}): ReactNode {
|
||||
const is_disabled = disabled === undefined ? false : disabled;
|
||||
const is_disabled = disabled ?? false;
|
||||
return (
|
||||
visible && (
|
||||
<Accordion.Item value={label} id={label}>
|
||||
|
Loading…
Reference in New Issue
Block a user