diff --git a/src/frontend/src/components/DashboardItemProxy.tsx b/src/frontend/src/components/DashboardItemProxy.tsx
index cc0efa3bd0ca..d0ed0015c88c 100644
--- a/src/frontend/src/components/DashboardItemProxy.tsx
+++ b/src/frontend/src/components/DashboardItemProxy.tsx
@@ -31,7 +31,7 @@ export function DashboardItemProxy({
queryFn: fetchData,
refetchOnWindowFocus: autoupdate
});
- const [dashdata, setDashData] = useState({ title: t`Title`, value: '000' });
+ const [dashData, setDashData] = useState({ title: t`Title`, value: '000' });
useEffect(() => {
if (data) {
@@ -44,7 +44,7 @@ export function DashboardItemProxy({
diff --git a/src/frontend/src/components/buttons/AdminButton.tsx b/src/frontend/src/components/buttons/AdminButton.tsx
index a9a81011d438..7adfe73f72ad 100644
--- a/src/frontend/src/components/buttons/AdminButton.tsx
+++ b/src/frontend/src/components/buttons/AdminButton.tsx
@@ -1,11 +1,8 @@
import { t } from '@lingui/macro';
import { IconUserStar } from '@tabler/icons-react';
import { useCallback, useMemo } from 'react';
-import { useNavigate } from 'react-router-dom';
import { ModelType } from '../../enums/ModelType';
-import { navigateToLink } from '../../functions/navigation';
-import { base_url } from '../../main';
import { useLocalState } from '../../states/LocalState';
import { useUserState } from '../../states/UserState';
import { ModelInformationDict } from '../render/ModelType';
diff --git a/src/frontend/src/components/buttons/PrintingActions.tsx b/src/frontend/src/components/buttons/PrintingActions.tsx
index f355f4f00c70..fbeb5deab146 100644
--- a/src/frontend/src/components/buttons/PrintingActions.tsx
+++ b/src/frontend/src/components/buttons/PrintingActions.tsx
@@ -2,7 +2,7 @@ import { t } from '@lingui/macro';
import { notifications } from '@mantine/notifications';
import { IconPrinter, IconReport, IconTags } from '@tabler/icons-react';
import { useQuery } from '@tanstack/react-query';
-import { useCallback, useEffect, useMemo, useState } from 'react';
+import { useMemo, useState } from 'react';
import { api } from '../../App';
import { ApiEndpoints } from '../../enums/ApiEndpoints';
diff --git a/src/frontend/src/components/details/DetailsImage.tsx b/src/frontend/src/components/details/DetailsImage.tsx
index fcc5a03ce580..f380997b9ec7 100644
--- a/src/frontend/src/components/details/DetailsImage.tsx
+++ b/src/frontend/src/components/details/DetailsImage.tsx
@@ -85,7 +85,7 @@ function UploadModal({
apiPath: string;
setImage: (image: string) => void;
}) {
- const [file1, setFile] = useState(null);
+ const [currentFile, setCurrentFile] = useState(null);
let uploading = false;
// Components to show in the Dropzone when no file is selected
@@ -168,7 +168,7 @@ function UploadModal({
return (
setFile(files[0])}
+ onDrop={(files) => setCurrentFile(files[0])}
maxFiles={1}
accept={IMAGE_MIME_TYPE}
loading={uploading}
@@ -198,7 +198,9 @@ function UploadModal({
}}
/>
- {file1 ? fileInfo(file1) : noFileIdle}
+
+ {currentFile ? fileInfo(currentFile) : noFileIdle}
+
-
@@ -354,31 +359,27 @@ export function DetailsImage(props: Readonly) {
};
return (
- <>
-
- <>
-
- {permissions.hasChangeRole(props.appRole) &&
- hasOverlay &&
- hovered && (
-
-
-
- )}
- >
-
- >
+
+ <>
+
+ {permissions.hasChangeRole(props.appRole) && hasOverlay && hovered && (
+
+
+
+ )}
+ >
+
);
}
diff --git a/src/frontend/src/components/errors/GenericErrorPage.tsx b/src/frontend/src/components/errors/GenericErrorPage.tsx
index 94405ba2816d..0e712e0bb03f 100644
--- a/src/frontend/src/components/errors/GenericErrorPage.tsx
+++ b/src/frontend/src/components/errors/GenericErrorPage.tsx
@@ -1,7 +1,6 @@
import { Trans } from '@lingui/macro';
import {
ActionIcon,
- Alert,
Button,
Card,
Center,
diff --git a/src/frontend/src/components/forms/fields/ApiFormField.tsx b/src/frontend/src/components/forms/fields/ApiFormField.tsx
index 7a41f1fa74cf..39890bacd59b 100644
--- a/src/frontend/src/components/forms/fields/ApiFormField.tsx
+++ b/src/frontend/src/components/forms/fields/ApiFormField.tsx
@@ -1,15 +1,7 @@
import { t } from '@lingui/macro';
-import {
- Alert,
- FileInput,
- NumberInput,
- Stack,
- Switch,
- TextInput
-} from '@mantine/core';
+import { Alert, FileInput, NumberInput, Stack, Switch } from '@mantine/core';
import { UseFormReturnType } from '@mantine/form';
import { useId } from '@mantine/hooks';
-import { IconX } from '@tabler/icons-react';
import { ReactNode, useCallback, useEffect, useMemo } from 'react';
import { Control, FieldValues, useController } from 'react-hook-form';
diff --git a/src/frontend/src/components/forms/fields/TableField.tsx b/src/frontend/src/components/forms/fields/TableField.tsx
index e66af3ab605f..c4eadc915b8c 100644
--- a/src/frontend/src/components/forms/fields/TableField.tsx
+++ b/src/frontend/src/components/forms/fields/TableField.tsx
@@ -1,5 +1,5 @@
import { Trans, t } from '@lingui/macro';
-import { Container, Flex, Group, Table } from '@mantine/core';
+import { Container, Group, Table } from '@mantine/core';
import { useEffect, useMemo } from 'react';
import { FieldValues, UseControllerReturn } from 'react-hook-form';
diff --git a/src/frontend/src/components/importer/ImporterImportProgress.tsx b/src/frontend/src/components/importer/ImporterImportProgress.tsx
index e44bcee76e02..dd98307fe101 100644
--- a/src/frontend/src/components/importer/ImporterImportProgress.tsx
+++ b/src/frontend/src/components/importer/ImporterImportProgress.tsx
@@ -29,18 +29,16 @@ export default function ImporterImportProgress({
}, []);
return (
- <>
-
-
-
- {t`Importing Records`}
-
-
- {t`Imported rows`}: {session.sessionData.row_count}
-
-
-
-
- >
+
+
+
+ {t`Importing Records`}
+
+
+ {t`Imported rows`}: {session.sessionData.row_count}
+
+
+
+
);
}
diff --git a/src/frontend/src/components/items/GettingStartedCarousel.tsx b/src/frontend/src/components/items/GettingStartedCarousel.tsx
index e317c3a81756..b34e6093b479 100644
--- a/src/frontend/src/components/items/GettingStartedCarousel.tsx
+++ b/src/frontend/src/components/items/GettingStartedCarousel.tsx
@@ -1,6 +1,6 @@
import { Trans } from '@lingui/macro';
import { Carousel } from '@mantine/carousel';
-import { Anchor, Button, Paper, Text, Title, rem } from '@mantine/core';
+import { Anchor, Button, Paper, Text, Title } from '@mantine/core';
import { DocumentationLinkItem } from './DocumentationLinks';
import * as classes from './GettingStartedCarousel.css';
diff --git a/src/frontend/src/components/modals/QrCodeModal.tsx b/src/frontend/src/components/modals/QrCodeModal.tsx
index b7907c8c8252..5d656b57782f 100644
--- a/src/frontend/src/components/modals/QrCodeModal.tsx
+++ b/src/frontend/src/components/modals/QrCodeModal.tsx
@@ -35,7 +35,7 @@ export function QrCodeModal({
key: 'camId',
defaultValue: null
});
- const [ScanningEnabled, setIsScanning] = useState(false);
+ const [scanningEnabled, setScanningEnabled] = useState(false);
const [wasAutoPaused, setWasAutoPaused] = useState(false);
const documentState = useDocumentVisibility();
@@ -48,7 +48,7 @@ export function QrCodeModal({
// Stop/star when leaving or reentering page
useEffect(() => {
- if (ScanningEnabled && documentState === 'hidden') {
+ if (scanningEnabled && documentState === 'hidden') {
stopScanning();
setWasAutoPaused(true);
} else if (wasAutoPaused && documentState === 'visible') {
@@ -128,12 +128,12 @@ export function QrCodeModal({
icon:
});
});
- setIsScanning(true);
+ setScanningEnabled(true);
}
}
function stopScanning() {
- if (qrCodeScanner && ScanningEnabled) {
+ if (qrCodeScanner && scanningEnabled) {
qrCodeScanner.stop().catch((err: string) => {
showNotification({
title: t`Error while stopping`,
@@ -142,7 +142,7 @@ export function QrCodeModal({
icon:
});
});
- setIsScanning(false);
+ setScanningEnabled(false);
}
}
@@ -151,7 +151,7 @@ export function QrCodeModal({
{camId?.label}
- {ScanningEnabled ? t`Scanning` : t`Not scanning`}
+ {scanningEnabled ? t`Scanning` : t`Not scanning`}
{!camId ? (
@@ -164,14 +164,14 @@ export function QrCodeModal({
startScanning()}
- disabled={camId != undefined && ScanningEnabled}
+ disabled={camId != undefined && scanningEnabled}
>
Start scanning
stopScanning()}
- disabled={!ScanningEnabled}
+ disabled={!scanningEnabled}
>
Stop scanning
diff --git a/src/frontend/src/components/nav/NotificationDrawer.tsx b/src/frontend/src/components/nav/NotificationDrawer.tsx
index 28464b4895a7..bc68fc0fa3fe 100644
--- a/src/frontend/src/components/nav/NotificationDrawer.tsx
+++ b/src/frontend/src/components/nav/NotificationDrawer.tsx
@@ -7,7 +7,6 @@ import {
Drawer,
Group,
Loader,
- LoadingOverlay,
Space,
Stack,
Text,
diff --git a/src/frontend/src/components/render/Instance.tsx b/src/frontend/src/components/render/Instance.tsx
index aa14af36d2f4..ab9cdd80e864 100644
--- a/src/frontend/src/components/render/Instance.tsx
+++ b/src/frontend/src/components/render/Instance.tsx
@@ -1,6 +1,6 @@
import { t } from '@lingui/macro';
import { Alert, Anchor, Group, Skeleton, Space, Text } from '@mantine/core';
-import { useQuery, useSuspenseQuery } from '@tanstack/react-query';
+import { useQuery } from '@tanstack/react-query';
import { ReactNode, useCallback } from 'react';
import { api } from '../../App';
diff --git a/src/frontend/src/components/render/Part.tsx b/src/frontend/src/components/render/Part.tsx
index f303b89acb2d..877f2f385aae 100644
--- a/src/frontend/src/components/render/Part.tsx
+++ b/src/frontend/src/components/render/Part.tsx
@@ -15,7 +15,7 @@ export function RenderPart(
const { instance } = props;
let badgeText = '';
- let badgeColor = 'green';
+ let badgeColor = '';
let stock = instance.total_in_stock;
diff --git a/src/frontend/src/forms/BuildForms.tsx b/src/frontend/src/forms/BuildForms.tsx
index f819f3cc19a7..16d8e948f15e 100644
--- a/src/frontend/src/forms/BuildForms.tsx
+++ b/src/frontend/src/forms/BuildForms.tsx
@@ -1,5 +1,5 @@
import { t } from '@lingui/macro';
-import { ActionIcon, Alert, Stack, Text } from '@mantine/core';
+import { Alert, Stack, Text } from '@mantine/core';
import {
IconCalendar,
IconLink,
diff --git a/src/frontend/src/forms/PurchaseOrderForms.tsx b/src/frontend/src/forms/PurchaseOrderForms.tsx
index 8876fca1db44..102818ddf6c4 100644
--- a/src/frontend/src/forms/PurchaseOrderForms.tsx
+++ b/src/frontend/src/forms/PurchaseOrderForms.tsx
@@ -33,10 +33,7 @@ import {
ApiFormAdjustFilterType,
ApiFormFieldSet
} from '../components/forms/fields/ApiFormField';
-import {
- TableField,
- TableFieldExtraRow
-} from '../components/forms/fields/TableField';
+import { TableFieldExtraRow } from '../components/forms/fields/TableField';
import { Thumbnail } from '../components/images/Thumbnail';
import { ProgressBar } from '../components/items/ProgressBar';
import { StylishText } from '../components/items/StylishText';
diff --git a/src/frontend/src/forms/StockForms.tsx b/src/frontend/src/forms/StockForms.tsx
index 8d7df62f5aea..4a937b98a674 100644
--- a/src/frontend/src/forms/StockForms.tsx
+++ b/src/frontend/src/forms/StockForms.tsx
@@ -7,13 +7,10 @@ import { Suspense, useCallback, useMemo, useState } from 'react';
import { api } from '../App';
import { ActionButton } from '../components/buttons/ActionButton';
-import { StandaloneField } from '../components/forms/StandaloneField';
import {
ApiFormAdjustFilterType,
- ApiFormField,
ApiFormFieldSet
} from '../components/forms/fields/ApiFormField';
-import { ChoiceField } from '../components/forms/fields/ChoiceField';
import { TableFieldExtraRow } from '../components/forms/fields/TableField';
import { Thumbnail } from '../components/images/Thumbnail';
import { StylishText } from '../components/items/StylishText';
diff --git a/src/frontend/src/hooks/UseImportSession.tsx b/src/frontend/src/hooks/UseImportSession.tsx
index 361206f5a744..bb5391eaeb28 100644
--- a/src/frontend/src/hooks/UseImportSession.tsx
+++ b/src/frontend/src/hooks/UseImportSession.tsx
@@ -1,8 +1,6 @@
import { useCallback, useMemo } from 'react';
-import { api } from '../App';
import { ApiEndpoints } from '../enums/ApiEndpoints';
-import { apiUrl } from '../states/ApiState';
import { useInstance } from './UseInstance';
/*
diff --git a/src/frontend/src/hooks/UseInstance.tsx b/src/frontend/src/hooks/UseInstance.tsx
index d4cd94c18eac..29713bd8e4a7 100644
--- a/src/frontend/src/hooks/UseInstance.tsx
+++ b/src/frontend/src/hooks/UseInstance.tsx
@@ -1,5 +1,5 @@
import { useQuery } from '@tanstack/react-query';
-import { useCallback, useMemo, useState } from 'react';
+import { useCallback, useState } from 'react';
import { api } from '../App';
import { ApiEndpoints } from '../enums/ApiEndpoints';
diff --git a/src/frontend/src/pages/Auth/Logged-In.tsx b/src/frontend/src/pages/Auth/Logged-In.tsx
index ad3fdd129183..c4939dd30d13 100644
--- a/src/frontend/src/pages/Auth/Logged-In.tsx
+++ b/src/frontend/src/pages/Auth/Logged-In.tsx
@@ -14,21 +14,19 @@ export default function Logged_In() {
}, [navigate]);
return (
- <>
-
-
-
-
-
- Checking if you are already logged in
-
-
-
-
-
-
-
-
- >
+
+
+
+
+
+ Checking if you are already logged in
+
+
+
+
+
+
+
+
);
}
diff --git a/src/frontend/src/pages/Auth/Logout.tsx b/src/frontend/src/pages/Auth/Logout.tsx
index 0270d1a79797..c8c0944016cc 100644
--- a/src/frontend/src/pages/Auth/Logout.tsx
+++ b/src/frontend/src/pages/Auth/Logout.tsx
@@ -14,21 +14,19 @@ export default function Logout() {
}, []);
return (
- <>
-
-
-
-
-
- Logging out
-
-
-
-
-
-
-
-
- >
+
+
+
+
+
+ Logging out
+
+
+
+
+
+
+
+
);
}
diff --git a/src/frontend/src/pages/Index/Playground.tsx b/src/frontend/src/pages/Index/Playground.tsx
index ad8cb38e91db..c7b9deb43d13 100644
--- a/src/frontend/src/pages/Index/Playground.tsx
+++ b/src/frontend/src/pages/Index/Playground.tsx
@@ -146,16 +146,14 @@ function ApiFormsPlayground() {
function StatusLabelPlayground() {
const [status, setStatus] = useState('10');
return (
- <>
-
- Stock Status
- setStatus(event.currentTarget.value)}
- />
-
-
- >
+
+ Stock Status
+ setStatus(event.currentTarget.value)}
+ />
+
+
);
}
@@ -202,14 +200,12 @@ function PlaygroundArea({
content: ReactNode;
}) {
return (
- <>
-
-
- {title}
-
- {content}
-
- >
+
+
+ {title}
+
+ {content}
+
);
}
diff --git a/src/frontend/src/pages/Index/Scan.tsx b/src/frontend/src/pages/Index/Scan.tsx
index f05de24f6cd2..3b5cf56c4fc7 100644
--- a/src/frontend/src/pages/Index/Scan.tsx
+++ b/src/frontend/src/pages/Index/Scan.tsx
@@ -41,7 +41,7 @@ import {
} from '@tabler/icons-react';
import { Html5Qrcode } from 'html5-qrcode';
import { CameraDevice } from 'html5-qrcode/camera/core';
-import { ReactNode, useEffect, useMemo, useState } from 'react';
+import { useEffect, useMemo, useState } from 'react';
import { api } from '../../App';
import { DocInfo } from '../../components/items/DocInfo';
@@ -553,7 +553,7 @@ function InputImageBarcode({ action }: Readonly) {
});
const [cameras, setCameras] = useState([]);
const [cameraValue, setCameraValue] = useState(null);
- const [ScanningEnabled, setIsScanning] = useState(false);
+ const [scanningEnabled, setScanningEnabled] = useState(false);
const [wasAutoPaused, setWasAutoPaused] = useState(false);
const documentState = useDocumentVisibility();
@@ -580,7 +580,7 @@ function InputImageBarcode({ action }: Readonly) {
// Stop/start when leaving or reentering page
useEffect(() => {
- if (ScanningEnabled && documentState === 'hidden') {
+ if (scanningEnabled && documentState === 'hidden') {
btnStopScanning();
setWasAutoPaused(true);
} else if (wasAutoPaused && documentState === 'visible') {
@@ -642,7 +642,7 @@ function InputImageBarcode({ action }: Readonly) {
}
function btnStartScanning() {
- if (camId && qrCodeScanner && !ScanningEnabled) {
+ if (camId && qrCodeScanner && !scanningEnabled) {
qrCodeScanner
.start(
camId.id,
@@ -662,12 +662,12 @@ function InputImageBarcode({ action }: Readonly) {
icon:
});
});
- setIsScanning(true);
+ setScanningEnabled(true);
}
}
function btnStopScanning() {
- if (qrCodeScanner && ScanningEnabled) {
+ if (qrCodeScanner && scanningEnabled) {
qrCodeScanner.stop().catch((err: string) => {
showNotification({
title: t`Error while stopping`,
@@ -676,7 +676,7 @@ function InputImageBarcode({ action }: Readonly) {
icon:
});
});
- setIsScanning(false);
+ setScanningEnabled(false);
}
}
@@ -690,7 +690,7 @@ function InputImageBarcode({ action }: Readonly) {
const cam = cameras.find((cam) => cam.id === cameraValue);
// stop scanning if cam changed while scanning
- if (qrCodeScanner && ScanningEnabled) {
+ if (qrCodeScanner && scanningEnabled) {
// stop scanning
qrCodeScanner.stop().then(() => {
// change ID
@@ -723,7 +723,7 @@ function InputImageBarcode({ action }: Readonly) {
})}
size="sm"
/>
- {ScanningEnabled ? (
+ {scanningEnabled ? (
) {
)}
-
- {ScanningEnabled ? t`Scanning` : t`Not scanning`}
+
+ {scanningEnabled ? t`Scanning` : t`Not scanning`}
diff --git a/src/frontend/src/pages/Index/Settings/AccountSettings/SecurityContent.tsx b/src/frontend/src/pages/Index/Settings/AccountSettings/SecurityContent.tsx
index 16de9036a857..1af5aadc1719 100644
--- a/src/frontend/src/pages/Index/Settings/AccountSettings/SecurityContent.tsx
+++ b/src/frontend/src/pages/Index/Settings/AccountSettings/SecurityContent.tsx
@@ -204,7 +204,7 @@ function EmailContent() {
function SsoContent({ dataProvider }: { dataProvider: any | undefined }) {
const [value, setValue] = useState('');
- const [currentProviders, setcurrentProviders] = useState<[]>();
+ const [currentProviders, setCurrentProviders] = useState<[]>();
const { isLoading, data } = useQuery({
queryKey: ['sso-list'],
queryFn: () =>
@@ -225,7 +225,7 @@ function SsoContent({ dataProvider }: { dataProvider: any | undefined }) {
// remove providers that are used currently
let newData = dataProvider.providers;
newData = newData.filter(isAlreadyInUse);
- setcurrentProviders(newData);
+ setCurrentProviders(newData);
}, [dataProvider, data]);
function removeProvider() {
diff --git a/src/frontend/src/pages/Index/Settings/UserSettings.tsx b/src/frontend/src/pages/Index/Settings/UserSettings.tsx
index 03c6b66e9f4f..614f84d4939a 100644
--- a/src/frontend/src/pages/Index/Settings/UserSettings.tsx
+++ b/src/frontend/src/pages/Index/Settings/UserSettings.tsx
@@ -120,18 +120,16 @@ export default function UserSettings() {
}
return (
- <>
-
- Switch to System Setting}
- switch_condition={user?.is_staff || false}
- />
-
-
- >
+
+ Switch to System Setting}
+ switch_condition={user?.is_staff || false}
+ />
+
+
);
}
diff --git a/src/frontend/src/pages/Notifications.tsx b/src/frontend/src/pages/Notifications.tsx
index 115865e39144..b8962e20eea6 100644
--- a/src/frontend/src/pages/Notifications.tsx
+++ b/src/frontend/src/pages/Notifications.tsx
@@ -147,11 +147,9 @@ export default function NotificationsPage() {
}, [unreadTable, readTable]);
return (
- <>
-
-
-
-
- >
+
+
+
+
);
}
diff --git a/src/frontend/src/pages/build/BuildIndex.tsx b/src/frontend/src/pages/build/BuildIndex.tsx
index 557de69c8712..a20c45a5b01c 100644
--- a/src/frontend/src/pages/build/BuildIndex.tsx
+++ b/src/frontend/src/pages/build/BuildIndex.tsx
@@ -9,11 +9,9 @@ import { BuildOrderTable } from '../../tables/build/BuildOrderTable';
*/
export default function BuildIndex() {
return (
- <>
-
-
-
-
- >
+
+
+
+
);
}
diff --git a/src/frontend/src/pages/company/CompanyDetail.tsx b/src/frontend/src/pages/company/CompanyDetail.tsx
index 3d542142bd29..39070a0814a9 100644
--- a/src/frontend/src/pages/company/CompanyDetail.tsx
+++ b/src/frontend/src/pages/company/CompanyDetail.tsx
@@ -39,7 +39,6 @@ import { UserRoles } from '../../enums/Roles';
import { companyFields } from '../../forms/CompanyForms';
import { useEditApiFormModal } from '../../hooks/UseForm';
import { useInstance } from '../../hooks/UseInstance';
-import { apiUrl } from '../../states/ApiState';
import { useUserState } from '../../states/UserState';
import { AddressTable } from '../../tables/company/AddressTable';
import { ContactTable } from '../../tables/company/ContactTable';
diff --git a/src/frontend/src/pages/part/PartPricingPanel.tsx b/src/frontend/src/pages/part/PartPricingPanel.tsx
index ce05c2c34238..c0526d155127 100644
--- a/src/frontend/src/pages/part/PartPricingPanel.tsx
+++ b/src/frontend/src/pages/part/PartPricingPanel.tsx
@@ -31,11 +31,7 @@ export enum panelOptions {
export default function PartPricingPanel({ part }: { part: any }) {
const user = useUserState();
- const {
- instance: pricing,
- refreshInstance,
- instanceQuery
- } = useInstance({
+ const { instance: pricing, instanceQuery } = useInstance({
pk: part?.pk,
hasPrimaryKey: true,
endpoint: ApiEndpoints.part_pricing_get,
diff --git a/src/frontend/src/pages/part/pricing/BomPricingPanel.tsx b/src/frontend/src/pages/part/pricing/BomPricingPanel.tsx
index 9ee05a7bf954..4584c394a62d 100644
--- a/src/frontend/src/pages/part/pricing/BomPricingPanel.tsx
+++ b/src/frontend/src/pages/part/pricing/BomPricingPanel.tsx
@@ -12,11 +12,7 @@ import { ReactNode, useMemo, useState } from 'react';
import { CHART_COLORS } from '../../../components/charts/colors';
import { tooltipFormatter } from '../../../components/charts/tooltipFormatter';
-import {
- formatCurrency,
- formatDecimal,
- formatPriceRange
-} from '../../../defaults/formatters';
+import { formatDecimal, formatPriceRange } from '../../../defaults/formatters';
import { ApiEndpoints } from '../../../enums/ApiEndpoints';
import { ModelType } from '../../../enums/ModelType';
import { useTable } from '../../../hooks/UseTable';
diff --git a/src/frontend/src/pages/purchasing/PurchasingIndex.tsx b/src/frontend/src/pages/purchasing/PurchasingIndex.tsx
index 2a47575ca598..408cf40a0aec 100644
--- a/src/frontend/src/pages/purchasing/PurchasingIndex.tsx
+++ b/src/frontend/src/pages/purchasing/PurchasingIndex.tsx
@@ -47,11 +47,9 @@ export default function PurchasingIndex() {
}, []);
return (
- <>
-
-
-
-
- >
+
+
+
+
);
}
diff --git a/src/frontend/src/pages/sales/SalesIndex.tsx b/src/frontend/src/pages/sales/SalesIndex.tsx
index db13d4b298d4..3de329ea7cf1 100644
--- a/src/frontend/src/pages/sales/SalesIndex.tsx
+++ b/src/frontend/src/pages/sales/SalesIndex.tsx
@@ -40,11 +40,9 @@ export default function PurchasingIndex() {
}, []);
return (
- <>
-
-
-
-
- >
+
+
+
+
);
}
diff --git a/src/frontend/src/tables/DownloadAction.tsx b/src/frontend/src/tables/DownloadAction.tsx
index e2d5c1d9ed25..ddcc83b206f3 100644
--- a/src/frontend/src/tables/DownloadAction.tsx
+++ b/src/frontend/src/tables/DownloadAction.tsx
@@ -1,5 +1,4 @@
import { t } from '@lingui/macro';
-import { ActionIcon, Menu, Tooltip } from '@mantine/core';
import {
IconDownload,
IconFileSpreadsheet,
@@ -33,12 +32,10 @@ export function DownloadAction({
}, [formatOptions, downloadCallback]);
return (
- <>
- }
- actions={actions}
- />
- >
+ }
+ actions={actions}
+ />
);
}
diff --git a/src/frontend/src/tables/UploadAction.tsx b/src/frontend/src/tables/UploadAction.tsx
index e958b26cd8f9..0230b975c741 100644
--- a/src/frontend/src/tables/UploadAction.tsx
+++ b/src/frontend/src/tables/UploadAction.tsx
@@ -4,9 +4,5 @@ import { IconUpload } from '@tabler/icons-react';
import { ActionButton } from '../components/buttons/ActionButton';
export function UploadAction({}) {
- return (
- <>
- } tooltip={t`Upload Data`} />
- >
- );
+ return } tooltip={t`Upload Data`} />;
}
diff --git a/src/frontend/src/tables/general/AttachmentTable.tsx b/src/frontend/src/tables/general/AttachmentTable.tsx
index d30ede40d049..9b20017e10ff 100644
--- a/src/frontend/src/tables/general/AttachmentTable.tsx
+++ b/src/frontend/src/tables/general/AttachmentTable.tsx
@@ -8,7 +8,7 @@ import {
IconUpload,
IconX
} from '@tabler/icons-react';
-import { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';
+import { ReactNode, useCallback, useMemo, useState } from 'react';
import { api } from '../../App';
import { ActionButton } from '../../components/buttons/ActionButton';
@@ -28,7 +28,7 @@ import { useUserState } from '../../states/UserState';
import { TableColumn } from '../Column';
import { TableFilter } from '../Filter';
import { InvenTreeTable } from '../InvenTreeTable';
-import { RowAction, RowDeleteAction, RowEditAction } from '../RowActions';
+import { RowDeleteAction, RowEditAction } from '../RowActions';
/**
* Define set of columns to display for the attachment table
diff --git a/src/frontend/src/tables/part/PartThumbTable.tsx b/src/frontend/src/tables/part/PartThumbTable.tsx
index 3862ab66a0db..73ec8681e4e5 100644
--- a/src/frontend/src/tables/part/PartThumbTable.tsx
+++ b/src/frontend/src/tables/part/PartThumbTable.tsx
@@ -128,13 +128,13 @@ export function PartThumbTable({
pk,
setImage
}: ThumbTableProps) {
- const [img, selectImage] = useState(null);
+ const [thumbImage, setThumbImage] = useState(null);
const [filterInput, setFilterInput] = useState('');
- const [filterQuery, setFilter] = useState(search);
+ const [filterQuery, setFilterQuery] = useState(search);
// Keep search filters from updating while user is typing
useEffect(() => {
- const timeoutId = setTimeout(() => setFilter(filterInput), 500);
+ const timeoutId = setTimeout(() => setFilterQuery(filterInput), 500);
return () => clearTimeout(timeoutId);
}, [filterInput]);
@@ -160,30 +160,28 @@ export function PartThumbTable({
- <>
-
- {!thumbQuery.isFetching
- ? thumbQuery.data?.data.map(
- (data: ImageElement, index: number) => (
-
- )
- )
- : [...Array(limit)].map((elem, idx) => (
-
+ {!thumbQuery.isFetching
+ ? thumbQuery.data?.data.map(
+ (data: ImageElement, index: number) => (
+
- ))}
-
- >
+ )
+ )
+ : [...Array(limit)].map((elem, idx) => (
+
+ ))}
+
@@ -197,8 +195,8 @@ export function PartThumbTable({
}}
/>
setNewImage(img, pk, setImage)}
+ disabled={!thumbImage}
+ onClick={() => setNewImage(thumbImage, pk, setImage)}
>
Select
diff --git a/src/frontend/src/tables/purchasing/PurchaseOrderLineItemTable.tsx b/src/frontend/src/tables/purchasing/PurchaseOrderLineItemTable.tsx
index 8083aafc9057..51664696378d 100644
--- a/src/frontend/src/tables/purchasing/PurchaseOrderLineItemTable.tsx
+++ b/src/frontend/src/tables/purchasing/PurchaseOrderLineItemTable.tsx
@@ -1,6 +1,5 @@
import { t } from '@lingui/macro';
import { Text } from '@mantine/core';
-import { Action } from '@mdxeditor/editor';
import { IconFileArrowLeft, IconSquareArrowRight } from '@tabler/icons-react';
import { useCallback, useMemo, useState } from 'react';
diff --git a/src/frontend/src/tables/settings/ImportSessionTable.tsx b/src/frontend/src/tables/settings/ImportSessionTable.tsx
index 6c71f5251ac2..219f5246b2df 100644
--- a/src/frontend/src/tables/settings/ImportSessionTable.tsx
+++ b/src/frontend/src/tables/settings/ImportSessionTable.tsx
@@ -25,7 +25,6 @@ import { RowAction, RowDeleteAction } from '../RowActions';
export default function ImportSesssionTable() {
const table = useTable('importsession');
- const user = useUserState();
const [opened, setOpened] = useState(false);
diff --git a/src/frontend/src/tables/stock/InstalledItemsTable.tsx b/src/frontend/src/tables/stock/InstalledItemsTable.tsx
index 027b49fe75e3..a2e97723d7f6 100644
--- a/src/frontend/src/tables/stock/InstalledItemsTable.tsx
+++ b/src/frontend/src/tables/stock/InstalledItemsTable.tsx
@@ -50,20 +50,18 @@ export default function InstalledItemsTable({
}, [user]);
return (
- <>
-
- >
+
);
}
diff --git a/src/frontend/tests/login.ts b/src/frontend/tests/login.ts
index d4cef1d681a7..5529e24d8c1b 100644
--- a/src/frontend/tests/login.ts
+++ b/src/frontend/tests/login.ts
@@ -1,5 +1,5 @@
import { expect } from './baseFixtures.js';
-import { baseUrl, loginUrl, logoutUrl, user } from './defaults';
+import { baseUrl, logoutUrl, user } from './defaults';
/*
* Perform form based login operation from the "login" URL
diff --git a/src/frontend/tests/pui_basic.spec.ts b/src/frontend/tests/pui_basic.spec.ts
index fa23b8227915..38534fbb923b 100644
--- a/src/frontend/tests/pui_basic.spec.ts
+++ b/src/frontend/tests/pui_basic.spec.ts
@@ -1,5 +1,5 @@
import { expect, test } from './baseFixtures.js';
-import { baseUrl, loginUrl, user } from './defaults.js';
+import { baseUrl, user } from './defaults.js';
import { doLogin, doQuickLogin } from './login.js';
test('PUI - Basic Login Test', async ({ page }) => {
diff --git a/src/frontend/tests/pui_general.spec.ts b/src/frontend/tests/pui_general.spec.ts
index a62547aca381..5c891b339ade 100644
--- a/src/frontend/tests/pui_general.spec.ts
+++ b/src/frontend/tests/pui_general.spec.ts
@@ -1,6 +1,6 @@
import { test } from './baseFixtures.js';
import { baseUrl } from './defaults.js';
-import { doLogout, doQuickLogin } from './login.js';
+import { doQuickLogin } from './login.js';
test('PUI - Parts', async ({ page }) => {
await doQuickLogin(page);
diff --git a/src/frontend/tests/pui_settings.spec.ts b/src/frontend/tests/pui_settings.spec.ts
index 0b6399f312b3..ba5deef57dd0 100644
--- a/src/frontend/tests/pui_settings.spec.ts
+++ b/src/frontend/tests/pui_settings.spec.ts
@@ -1,6 +1,6 @@
import { test } from './baseFixtures.js';
import { baseUrl } from './defaults.js';
-import { doLogout, doQuickLogin } from './login.js';
+import { doQuickLogin } from './login.js';
test('PUI - Admin', async ({ page }) => {
// Note here we login with admin access