diff --git a/src/frontend/src/components/dashboard/DashboardMenu.tsx b/src/frontend/src/components/dashboard/DashboardMenu.tsx
index f6c2758361..ba2474bf62 100644
--- a/src/frontend/src/components/dashboard/DashboardMenu.tsx
+++ b/src/frontend/src/components/dashboard/DashboardMenu.tsx
@@ -30,14 +30,14 @@ export default function DashboardMenu({
onStartEdit,
onStartRemove,
onAcceptLayout
-}: {
+}: Readonly<{
editing: boolean;
removing: boolean;
onAddWidget: () => void;
onStartEdit: () => void;
onStartRemove: () => void;
onAcceptLayout: () => void;
-}) {
+}>) {
const user = useUserState();
const instanceName = useInstanceName();
diff --git a/src/frontend/src/components/dashboard/DashboardWidget.tsx b/src/frontend/src/components/dashboard/DashboardWidget.tsx
index 839279aab7..044c9f13e6 100644
--- a/src/frontend/src/components/dashboard/DashboardWidget.tsx
+++ b/src/frontend/src/components/dashboard/DashboardWidget.tsx
@@ -29,12 +29,12 @@ export default function DashboardWidget({
editing,
removing,
onRemove
-}: {
+}: Readonly<{
item: DashboardWidgetProps;
editing: boolean;
removing: boolean;
onRemove: () => void;
-}) {
+}>) {
// TODO: Implement visibility check
// if (!props?.visible?.() == false) {
// return null;
diff --git a/src/frontend/src/components/dashboard/DashboardWidgetDrawer.tsx b/src/frontend/src/components/dashboard/DashboardWidgetDrawer.tsx
index ab0063c072..f5a04d6299 100644
--- a/src/frontend/src/components/dashboard/DashboardWidgetDrawer.tsx
+++ b/src/frontend/src/components/dashboard/DashboardWidgetDrawer.tsx
@@ -26,12 +26,12 @@ export default function DashboardWidgetDrawer({
onClose,
onAddWidget,
currentWidgets
-}: {
+}: Readonly<{
opened: boolean;
onClose: () => void;
onAddWidget: (widget: string) => void;
currentWidgets: string[];
-}) {
+}>) {
// Load available widgets
const availableWidgets = useDashboardItems();
diff --git a/src/frontend/src/components/dashboard/widgets/NewsWidget.tsx b/src/frontend/src/components/dashboard/widgets/NewsWidget.tsx
index 6eaaa44231..183ad90179 100644
--- a/src/frontend/src/components/dashboard/widgets/NewsWidget.tsx
+++ b/src/frontend/src/components/dashboard/widgets/NewsWidget.tsx
@@ -24,7 +24,7 @@ import { StylishText } from '../../items/StylishText';
/**
* Render a link to an external news item
*/
-function NewsLink({ item }: { item: any }) {
+function NewsLink({ item }: Readonly<{ item: any }>) {
let link: string = item.link;
if (link?.startsWith('/')) {
@@ -45,10 +45,10 @@ function NewsLink({ item }: { item: any }) {
function NewsItem({
item,
onMarkRead
-}: {
+}: Readonly<{
item: any;
onMarkRead: (id: number) => void;
-}) {
+}>) {
const date: string = item.published?.split(' ')[0] ?? '';
return (
diff --git a/src/frontend/src/components/dashboard/widgets/QueryCountDashboardWidget.tsx b/src/frontend/src/components/dashboard/widgets/QueryCountDashboardWidget.tsx
index 577e6e03bb..6a3ec97d56 100644
--- a/src/frontend/src/components/dashboard/widgets/QueryCountDashboardWidget.tsx
+++ b/src/frontend/src/components/dashboard/widgets/QueryCountDashboardWidget.tsx
@@ -25,12 +25,12 @@ function QueryCountWidget({
title,
icon,
params
-}: {
+}: Readonly<{
modelType: ModelType;
title: string;
icon?: InvenTreeIconType;
params: any;
-}): ReactNode {
+}>): ReactNode {
const user = useUserState();
const navigate = useNavigate();
diff --git a/src/frontend/src/components/forms/AuthFormOptions.tsx b/src/frontend/src/components/forms/AuthFormOptions.tsx
index 002005224e..7fda658e70 100644
--- a/src/frontend/src/components/forms/AuthFormOptions.tsx
+++ b/src/frontend/src/components/forms/AuthFormOptions.tsx
@@ -8,10 +8,10 @@ import { LanguageToggle } from '../items/LanguageToggle';
export function AuthFormOptions({
hostname,
toggleHostEdit
-}: {
+}: Readonly<{
hostname: string;
toggleHostEdit: () => void;
-}) {
+}>) {
const [server] = useServerApiState((state) => [state.server]);
return (
diff --git a/src/frontend/src/components/forms/fields/TableField.tsx b/src/frontend/src/components/forms/fields/TableField.tsx
index ad53f9bf49..e979d0f7e3 100644
--- a/src/frontend/src/components/forms/fields/TableField.tsx
+++ b/src/frontend/src/components/forms/fields/TableField.tsx
@@ -26,7 +26,7 @@ function TableFieldRow({
control,
changeFn,
removeFn
-}: {
+}: Readonly<{
item: any;
idx: number;
errors: any;
@@ -34,7 +34,7 @@ function TableFieldRow({
control: UseControllerReturn;
changeFn: (idx: number, key: string, value: any) => void;
removeFn: (idx: number) => void;
-}) {
+}>) {
// Table fields require render function
if (!definition.modelRenderer) {
return (
@@ -62,11 +62,11 @@ export function TableFieldErrorWrapper({
props,
errorKey,
children
-}: {
+}: Readonly<{
props: TableFieldRowProps;
errorKey: string;
children: ReactNode;
-}) {
+}>) {
const msg = props?.rowErrors?.[errorKey];
return (
diff --git a/src/frontend/src/components/items/GettingStartedCarousel.tsx b/src/frontend/src/components/items/GettingStartedCarousel.tsx
index 8165266dc3..82592d3830 100644
--- a/src/frontend/src/components/items/GettingStartedCarousel.tsx
+++ b/src/frontend/src/components/items/GettingStartedCarousel.tsx
@@ -6,7 +6,7 @@ import * as classes from './GettingStartedCarousel.css';
import type { MenuLinkItem } from './MenuLinks';
import { StylishText } from './StylishText';
-function StartedCard({ title, description, link }: MenuLinkItem) {
+function StartedCard({ title, description, link }: Readonly) {
return (
diff --git a/src/frontend/src/components/modals/LicenseModal.tsx b/src/frontend/src/components/modals/LicenseModal.tsx
index 441d898509..4087fa8ce5 100644
--- a/src/frontend/src/components/modals/LicenseModal.tsx
+++ b/src/frontend/src/components/modals/LicenseModal.tsx
@@ -17,7 +17,7 @@ import { api } from '../../App';
import { ApiEndpoints } from '../../enums/ApiEndpoints';
import { apiUrl } from '../../states/ApiState';
-export function LicenceView(entries: any[]) {
+export function LicenceView(entries: Readonly
) {
return (
diff --git a/src/frontend/src/components/nav/NavigationDrawer.tsx b/src/frontend/src/components/nav/NavigationDrawer.tsx
index 1ff04e45eb..819d22e6df 100644
--- a/src/frontend/src/components/nav/NavigationDrawer.tsx
+++ b/src/frontend/src/components/nav/NavigationDrawer.tsx
@@ -46,7 +46,7 @@ export function NavigationDrawer({
);
}
-function DrawerContent({ closeFunc }: { closeFunc?: () => void }) {
+function DrawerContent({ closeFunc }: Readonly<{ closeFunc?: () => void }>) {
const user = useUserState();
const globalSettings = useGlobalSettingsState();
@@ -186,13 +186,11 @@ function DrawerContent({ closeFunc }: { closeFunc?: () => void }) {
/>
{plugins.length > 0 ? (
- <>
-
- >
+
) : (
<>>
)}
diff --git a/src/frontend/src/components/nav/NotificationDrawer.tsx b/src/frontend/src/components/nav/NotificationDrawer.tsx
index 3ff32fb6be..d83cdd733c 100644
--- a/src/frontend/src/components/nav/NotificationDrawer.tsx
+++ b/src/frontend/src/components/nav/NotificationDrawer.tsx
@@ -36,10 +36,10 @@ import { ModelInformationDict } from '../render/ModelType';
function NotificationEntry({
notification,
onRead
-}: {
+}: Readonly<{
notification: any;
onRead: () => void;
-}) {
+}>) {
const navigate = useNavigate();
let link = notification.target?.link;
diff --git a/src/frontend/src/components/nav/PageTitle.tsx b/src/frontend/src/components/nav/PageTitle.tsx
index 030a417e92..e20bc1b8c4 100644
--- a/src/frontend/src/components/nav/PageTitle.tsx
+++ b/src/frontend/src/components/nav/PageTitle.tsx
@@ -7,10 +7,10 @@ import { useGlobalSettingsState } from '../../states/SettingsState';
export default function PageTitle({
title,
subtitle
-}: {
+}: Readonly<{
title?: string;
subtitle?: string;
-}) {
+}>) {
const globalSettings = useGlobalSettingsState();
const pageTitle = useMemo(() => {
diff --git a/src/frontend/src/components/plugins/LocateItemButton.tsx b/src/frontend/src/components/plugins/LocateItemButton.tsx
index 0bcaea9327..cfe780944a 100644
--- a/src/frontend/src/components/plugins/LocateItemButton.tsx
+++ b/src/frontend/src/components/plugins/LocateItemButton.tsx
@@ -12,10 +12,10 @@ import type { PluginInterface } from './PluginInterface';
export default function LocateItemButton({
stockId,
locationId
-}: {
+}: Readonly<{
stockId?: number;
locationId?: number;
-}) {
+}>) {
const locatePlugins = usePluginsWithMixin('locate');
const [selectedPlugin, setSelectedPlugin] = useState(
diff --git a/src/frontend/src/components/plugins/PluginDrawer.tsx b/src/frontend/src/components/plugins/PluginDrawer.tsx
index 36e0aaf6c4..88569c7c82 100644
--- a/src/frontend/src/components/plugins/PluginDrawer.tsx
+++ b/src/frontend/src/components/plugins/PluginDrawer.tsx
@@ -18,10 +18,10 @@ import PluginSettingsPanel from './PluginSettingsPanel';
export default function PluginDrawer({
pluginKey,
pluginInstance
-}: {
+}: Readonly<{
pluginKey?: string;
pluginInstance: PluginInterface;
-}) {
+}>) {
const { id } = useParams();
const pluginPrimaryKey: string = useMemo(() => {
@@ -53,106 +53,104 @@ export default function PluginDrawer({
}
return (
- <>
-
-
+
+
+
+ {t`Plugin Information`}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {pluginInstance?.is_package && (
+
+ )}
+
+
+
+
+
+
+
+
+
+ {hasSettings && (
+
- {t`Plugin Information`}
+ {t`Plugin Settings`}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {pluginInstance?.is_package && (
-
- )}
-
-
-
-
-
-
-
+
+
+
- {hasSettings && (
-
-
- {t`Plugin Settings`}
-
-
-
-
-
-
-
- )}
- {pluginAdmin?.source && (
-
-
- {t`Plugin Configuration`}
-
-
-
-
-
-
-
- )}
-
- >
+ )}
+ {pluginAdmin?.source && (
+
+
+ {t`Plugin Configuration`}
+
+
+
+
+
+
+
+ )}
+
);
}
diff --git a/src/frontend/src/components/plugins/PluginSettingsPanel.tsx b/src/frontend/src/components/plugins/PluginSettingsPanel.tsx
index d107fe0e35..d365811df6 100644
--- a/src/frontend/src/components/plugins/PluginSettingsPanel.tsx
+++ b/src/frontend/src/components/plugins/PluginSettingsPanel.tsx
@@ -18,9 +18,9 @@ export interface PluginAdminInterface {
*/
export default function PluginSettingsPanel({
pluginAdmin
-}: {
+}: Readonly<{
pluginAdmin: PluginAdminInterface;
-}) {
+}>) {
const pluginContext = useInvenTreeContext();
return (
diff --git a/src/frontend/src/components/plugins/RemoteComponent.tsx b/src/frontend/src/components/plugins/RemoteComponent.tsx
index 0a16e60b24..d5834bba7b 100644
--- a/src/frontend/src/components/plugins/RemoteComponent.tsx
+++ b/src/frontend/src/components/plugins/RemoteComponent.tsx
@@ -21,11 +21,11 @@ export default function RemoteComponent({
source,
defaultFunctionName,
context
-}: {
+}: Readonly<{
source: string;
defaultFunctionName: string;
context: InvenTreeContext;
-}) {
+}>) {
const componentRef = useRef();
const [renderingError, setRenderingError] = useState(
@@ -78,28 +78,23 @@ export default function RemoteComponent({
}, [sourceFile, functionName, context]);
return (
- <>
-
+
+ {renderingError && (
+ }
+ >
+
+ {t`Error occurred while loading plugin content`}: {renderingError}
+
+
)}
- >
-
- {renderingError && (
- }
- >
-
- {t`Error occurred while loading plugin content`}:{' '}
- {renderingError}
-
-
- )}
-
-
-
- >
+
+
+
);
}
diff --git a/src/frontend/src/forms/SalesOrderForms.tsx b/src/frontend/src/forms/SalesOrderForms.tsx
index 889a88b717..72d986a025 100644
--- a/src/frontend/src/forms/SalesOrderForms.tsx
+++ b/src/frontend/src/forms/SalesOrderForms.tsx
@@ -121,11 +121,11 @@ function SalesOrderAllocateLineRow({
props,
record,
sourceLocation
-}: {
+}: Readonly<{
props: TableFieldRowProps;
record: any;
sourceLocation?: number | null;
-}) {
+}>) {
// Statically defined field for selecting the stock item
const stockItemField: ApiFormFieldType = useMemo(() => {
return {
@@ -360,7 +360,7 @@ export function useSalesOrderAllocationFields({
shipment
}: {
orderId?: number;
- shipment: any | null;
+ shipment: any;
}): ApiFormFieldSet {
return useMemo(() => {
return {
diff --git a/src/frontend/src/pages/part/PartAllocationPanel.tsx b/src/frontend/src/pages/part/PartAllocationPanel.tsx
index b2ffd12f5c..c905afe8e7 100644
--- a/src/frontend/src/pages/part/PartAllocationPanel.tsx
+++ b/src/frontend/src/pages/part/PartAllocationPanel.tsx
@@ -7,36 +7,34 @@ import { useUserState } from '../../states/UserState';
import PartBuildAllocationsTable from '../../tables/part/PartBuildAllocationsTable';
import PartSalesAllocationsTable from '../../tables/part/PartSalesAllocationsTable';
-export default function PartAllocationPanel({ part }: { part: any }) {
+export default function PartAllocationPanel({ part }: Readonly<{ part: any }>) {
const user = useUserState();
return (
- <>
-
- {part.component && user.hasViewRole(UserRoles.build) && (
-
-
- {t`Build Order Allocations`}
-
-
-
-
-
- )}
- {part.salable && user.hasViewRole(UserRoles.sales_order) && (
-
-
- {t`Sales Order Allocations`}
-
-
-
-
-
- )}
-
- >
+
+ {part.component && user.hasViewRole(UserRoles.build) && (
+
+
+ {t`Build Order Allocations`}
+
+
+
+
+
+ )}
+ {part.salable && user.hasViewRole(UserRoles.sales_order) && (
+
+
+ {t`Sales Order Allocations`}
+
+
+
+
+
+ )}
+
);
}
diff --git a/src/frontend/src/pages/part/PartSchedulingDetail.tsx b/src/frontend/src/pages/part/PartSchedulingDetail.tsx
index 771cf39cb6..bf5caa310d 100644
--- a/src/frontend/src/pages/part/PartSchedulingDetail.tsx
+++ b/src/frontend/src/pages/part/PartSchedulingDetail.tsx
@@ -26,7 +26,7 @@ import { TableHoverCard } from '../../tables/TableHoverCard';
/*
* Render a tooltip for the chart, with correct date information
*/
-function ChartTooltip({ label, payload }: ChartTooltipProps) {
+function ChartTooltip({ label, payload }: Readonly) {
if (!payload) {
return null;
}
@@ -56,7 +56,9 @@ function ChartTooltip({ label, payload }: ChartTooltipProps) {
);
}
-export default function PartSchedulingDetail({ part }: { part: any }) {
+export default function PartSchedulingDetail({
+ part
+}: Readonly<{ part: any }>) {
const table = useTable('part-scheduling');
const navigate = useNavigate();
diff --git a/src/frontend/src/pages/part/PartStocktakeDetail.tsx b/src/frontend/src/pages/part/PartStocktakeDetail.tsx
index 6ea21452a9..b51c3f32d0 100644
--- a/src/frontend/src/pages/part/PartStocktakeDetail.tsx
+++ b/src/frontend/src/pages/part/PartStocktakeDetail.tsx
@@ -33,7 +33,7 @@ import { RowDeleteAction, RowEditAction } from '../../tables/RowActions';
/*
* Render a tooltip for the chart, with correct date information
*/
-function ChartTooltip({ label, payload }: ChartTooltipProps) {
+function ChartTooltip({ label, payload }: Readonly) {
const formattedLabel: string = useMemo(() => {
if (label && typeof label === 'number') {
return formatDate(new Date(label).toISOString()) ?? label;
@@ -66,7 +66,9 @@ function ChartTooltip({ label, payload }: ChartTooltipProps) {
);
}
-export default function PartStocktakeDetail({ partId }: { partId: number }) {
+export default function PartStocktakeDetail({
+ partId
+}: Readonly<{ partId: number }>) {
const user = useUserState();
const table = useTable('part-stocktake');
diff --git a/src/frontend/src/pages/part/PartSupplierDetail.tsx b/src/frontend/src/pages/part/PartSupplierDetail.tsx
index 24ce2409c1..13c63eccfd 100644
--- a/src/frontend/src/pages/part/PartSupplierDetail.tsx
+++ b/src/frontend/src/pages/part/PartSupplierDetail.tsx
@@ -5,7 +5,9 @@ import { StylishText } from '../../components/items/StylishText';
import { ManufacturerPartTable } from '../../tables/purchasing/ManufacturerPartTable';
import { SupplierPartTable } from '../../tables/purchasing/SupplierPartTable';
-export default function PartSupplierDetail({ partId }: { partId: number }) {
+export default function PartSupplierDetail({
+ partId
+}: Readonly<{ partId: number }>) {
return (
diff --git a/src/frontend/src/tables/InvenTreeTableHeader.tsx b/src/frontend/src/tables/InvenTreeTableHeader.tsx
index 705e29d1e5..f696459d7d 100644
--- a/src/frontend/src/tables/InvenTreeTableHeader.tsx
+++ b/src/frontend/src/tables/InvenTreeTableHeader.tsx
@@ -41,7 +41,7 @@ export default function InvenTreeTableHeader({
columns,
filters,
toggleColumn
-}: {
+}: Readonly<{
tableUrl: string;
tableState: TableState;
tableProps: InvenTreeTableProps;
@@ -49,7 +49,7 @@ export default function InvenTreeTableHeader({
columns: any;
filters: TableFilter[];
toggleColumn: (column: string) => void;
-}) {
+}>) {
// Filter list visibility
const [filtersVisible, setFiltersVisible] = useState(false);
diff --git a/src/frontend/src/tables/RowExpansionIcon.tsx b/src/frontend/src/tables/RowExpansionIcon.tsx
index 374b2559c1..ad76ec39f9 100644
--- a/src/frontend/src/tables/RowExpansionIcon.tsx
+++ b/src/frontend/src/tables/RowExpansionIcon.tsx
@@ -4,10 +4,10 @@ import { IconChevronDown, IconChevronRight } from '@tabler/icons-react';
export default function RowExpansionIcon({
enabled,
expanded
-}: {
+}: Readonly<{
enabled: boolean;
expanded: boolean;
-}) {
+}>) {
return (
{expanded ? : }
diff --git a/src/frontend/src/tables/build/BuildLineTable.tsx b/src/frontend/src/tables/build/BuildLineTable.tsx
index 575da23583..d7266dbc4a 100644
--- a/src/frontend/src/tables/build/BuildLineTable.tsx
+++ b/src/frontend/src/tables/build/BuildLineTable.tsx
@@ -56,11 +56,11 @@ export function BuildLineSubTable({
lineItem,
onEditAllocation,
onDeleteAllocation
-}: {
+}: Readonly<{
lineItem: any;
onEditAllocation?: (pk: number) => void;
onDeleteAllocation?: (pk: number) => void;
-}) {
+}>) {
const user = useUserState();
const navigate = useNavigate();
diff --git a/src/frontend/src/tables/build/BuildOutputTable.tsx b/src/frontend/src/tables/build/BuildOutputTable.tsx
index 66516d7acd..e6f71bb891 100644
--- a/src/frontend/src/tables/build/BuildOutputTable.tsx
+++ b/src/frontend/src/tables/build/BuildOutputTable.tsx
@@ -61,61 +61,59 @@ function OutputAllocationDrawer({
output,
opened,
close
-}: {
+}: Readonly<{
build: any;
output: any;
opened: boolean;
close: () => void;
-}) {
+}>) {
return (
- <>
-
- {t`Build Output Stock Allocation`}
-
-
- {output?.serial && (
-
- {t`Serial Number`}: {output.serial}
-
- )}
- {output?.batch && (
-
- {t`Batch Code`}: {output.batch}
-
- )}
-
-
+
+ {t`Build Output Stock Allocation`}
+
+
+ {output?.serial && (
+
+ {t`Serial Number`}: {output.serial}
+
+ )}
+ {output?.batch && (
+
+ {t`Batch Code`}: {output.batch}
+
+ )}
+
+
+ }
+ opened={opened}
+ onClose={close}
+ withCloseButton
+ closeOnEscape
+ closeOnClickOutside
+ styles={{
+ header: {
+ width: '100%'
+ },
+ title: {
+ width: '100%'
}
- opened={opened}
- onClose={close}
- withCloseButton
- closeOnEscape
- closeOnClickOutside
- styles={{
- header: {
- width: '100%'
- },
- title: {
- width: '100%'
- }
- }}
- >
-
-
-
-
-
- >
+ }}
+ >
+
+
+
+
+
);
}
diff --git a/src/frontend/src/tables/part/PartBuildAllocationsTable.tsx b/src/frontend/src/tables/part/PartBuildAllocationsTable.tsx
index 61184aea50..d680836e70 100644
--- a/src/frontend/src/tables/part/PartBuildAllocationsTable.tsx
+++ b/src/frontend/src/tables/part/PartBuildAllocationsTable.tsx
@@ -27,9 +27,9 @@ import { BuildLineSubTable } from '../build/BuildLineTable';
*/
export default function PartBuildAllocationsTable({
partId
-}: {
+}: Readonly<{
partId: number;
-}) {
+}>) {
const user = useUserState();
const navigate = useNavigate();
const table = useTable('part-build-allocations');
@@ -106,25 +106,23 @@ export default function PartBuildAllocationsTable({
}, [table.isRowExpanded]);
return (
- <>
-
- >
+
);
}
diff --git a/src/frontend/src/tables/part/PartSalesAllocationsTable.tsx b/src/frontend/src/tables/part/PartSalesAllocationsTable.tsx
index fa8aaad4d1..27b9f59589 100644
--- a/src/frontend/src/tables/part/PartSalesAllocationsTable.tsx
+++ b/src/frontend/src/tables/part/PartSalesAllocationsTable.tsx
@@ -24,9 +24,9 @@ import SalesOrderAllocationTable from '../sales/SalesOrderAllocationTable';
export default function PartSalesAllocationsTable({
partId
-}: {
+}: Readonly<{
partId: number;
-}) {
+}>) {
const user = useUserState();
const navigate = useNavigate();
const table = useTable('part-sales-allocations');
@@ -109,24 +109,22 @@ export default function PartSalesAllocationsTable({
}, [table.isRowExpanded]);
return (
- <>
-
- >
+
);
}
diff --git a/src/frontend/src/tables/settings/BarcodeScanHistoryTable.tsx b/src/frontend/src/tables/settings/BarcodeScanHistoryTable.tsx
index be8c191627..98d5471bec 100644
--- a/src/frontend/src/tables/settings/BarcodeScanHistoryTable.tsx
+++ b/src/frontend/src/tables/settings/BarcodeScanHistoryTable.tsx
@@ -35,7 +35,7 @@ import { RowDeleteAction } from '../RowActions';
/*
* Render detail information for a particular barcode scan result.
*/
-function BarcodeScanDetail({ scan }: { scan: any }) {
+function BarcodeScanDetail({ scan }: Readonly<{ scan: any }>) {
const dataStyle: MantineStyleProp = {
textWrap: 'wrap',
lineBreak: 'auto',
@@ -51,93 +51,91 @@ function BarcodeScanDetail({ scan }: { scan: any }) {
}, [scan.context]);
return (
- <>
-
-
-
-
+
+
+
+
+
+
+ {t`Barcode Information`}
+
+
+
+ {t`Barcode`}
+
+
+ {scan.data}
+
+
+
+
+
+
+
+ {t`Timestamp`}
+ {scan.timestamp}
+
+
+ {t`User`}
+
+
+
+
+
+ {t`Endpoint`}
+ {scan.endpoint}
+
+
+ {t`Result`}
+
+
+
+
+ {hasContextData && (
- {t`Barcode Information`}
+ {t`Context`}
-
- {t`Barcode`}
-
-
- {scan.data}
-
-
-
-
-
-
-
- {t`Timestamp`}
- {scan.timestamp}
-
-
- {t`User`}
-
-
-
-
-
- {t`Endpoint`}
- {scan.endpoint}
-
-
- {t`Result`}
-
-
-
-
- {hasContextData && (
-
-
- {t`Context`}
+ )}
+ {hasContextData &&
+ Object.keys(scan.context).map((key) => (
+
+ {key}
+
+
+ {scan.context[key]}
+
+
+
+
- )}
- {hasContextData &&
- Object.keys(scan.context).map((key) => (
-
- {key}
-
-
- {scan.context[key]}
-
-
-
-
-
-
- ))}
- {hasResponseData && (
-
-
- {t`Response`}
+ ))}
+ {hasResponseData && (
+
+
+ {t`Response`}
+
+
+ )}
+ {hasResponseData &&
+ Object.keys(scan.response).map((key) => (
+
+ {key}
+
+
+ {scan.response[key]}
+
+
+
+
- )}
- {hasResponseData &&
- Object.keys(scan.response).map((key) => (
-
- {key}
-
-
- {scan.response[key]}
-
-
-
-
-
-
- ))}
-
-
-
- >
+ ))}
+
+
+
);
}
diff --git a/src/frontend/src/tables/settings/ErrorTable.tsx b/src/frontend/src/tables/settings/ErrorTable.tsx
index 7846478b4a..105c5c3dd1 100644
--- a/src/frontend/src/tables/settings/ErrorTable.tsx
+++ b/src/frontend/src/tables/settings/ErrorTable.tsx
@@ -15,7 +15,7 @@ import type { TableColumn } from '../Column';
import { InvenTreeTable } from '../InvenTreeTable';
import { type RowAction, RowDeleteAction } from '../RowActions';
-function ErrorDetail({ errorId }: { errorId?: number }) {
+function ErrorDetail({ errorId }: Readonly<{ errorId?: number }>) {
const { id } = useParams();
const errorPrimaryKey = useMemo(() => {
diff --git a/src/frontend/src/tables/settings/FailedTasksTable.tsx b/src/frontend/src/tables/settings/FailedTasksTable.tsx
index ecda2aef0e..9a2e179da2 100644
--- a/src/frontend/src/tables/settings/FailedTasksTable.tsx
+++ b/src/frontend/src/tables/settings/FailedTasksTable.tsx
@@ -15,9 +15,9 @@ import { InvenTreeTable } from '../InvenTreeTable';
export default function FailedTasksTable({
onRecordsUpdated
-}: {
+}: Readonly<{
onRecordsUpdated: () => void;
-}) {
+}>) {
const table = useTable('tasks-failed');
const user = useUserState();
diff --git a/src/frontend/src/tables/settings/PendingTasksTable.tsx b/src/frontend/src/tables/settings/PendingTasksTable.tsx
index 15b1f2a39f..990d5547d1 100644
--- a/src/frontend/src/tables/settings/PendingTasksTable.tsx
+++ b/src/frontend/src/tables/settings/PendingTasksTable.tsx
@@ -10,9 +10,9 @@ import { InvenTreeTable } from '../InvenTreeTable';
export default function PendingTasksTable({
onRecordsUpdated
-}: {
+}: Readonly<{
onRecordsUpdated: () => void;
-}) {
+}>) {
const table = useTable('tasks-pending');
const user = useUserState();