Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

chore: migrate old eslint comments

Sidwebworks2ea03b8fe3b1
diff --git a/apps/academy/app/routes/_auth+/health.tsx b/apps/academy/app/routes/_auth+/health.tsx
index 66971aee0d..0106517cf6 100644
--- a/apps/academy/app/routes/_auth+/health.tsx
+++ b/apps/academy/app/routes/_auth+/health.tsx
@@ -7,7 +7,6 @@ export async function loader() {
if (test.error !== null) throw test.error;
return new Response("OK");
} catch (error: unknown) {
- // eslint-disable-next-line no-console
console.log("health ❌", { error });
return new Response("ERROR", { status: 500 });
}
diff --git a/apps/academy/app/routes/lesson+/$id.tsx b/apps/academy/app/routes/lesson+/$id.tsx
index b74a2e4814..b0e7227676 100644
--- a/apps/academy/app/routes/lesson+/$id.tsx
+++ b/apps/academy/app/routes/lesson+/$id.tsx
@@ -162,7 +162,6 @@ export default function LessonRoute() {
return () => {
window.removeEventListener("message", handleMessage);
};
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [id]);
return (
diff --git a/apps/academy/vite.config.ts b/apps/academy/vite.config.ts
index 757a3db663..eaf6ca1789 100644
--- a/apps/academy/vite.config.ts
+++ b/apps/academy/vite.config.ts
@@ -49,7 +49,6 @@ export default defineConfig({
serverModuleFormat: "esm",
routes: async (defineRoutes) => {
return flatRoutes("routes", defineRoutes, {
- // eslint-disable-next-line no-undef
appDir: path.resolve(__dirname, "app"),
});
},
diff --git a/apps/erp/app/components/Chat/ChatInterface.tsx b/apps/erp/app/components/Chat/ChatInterface.tsx
index f73a84b2de..d0fca953e0 100644
--- a/apps/erp/app/components/Chat/ChatInterface.tsx
+++ b/apps/erp/app/components/Chat/ChatInterface.tsx
@@ -88,7 +88,7 @@ export function ChatInterface({ geo }: Props) {
});
}
),
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[accessToken]
);
diff --git a/apps/erp/app/components/Configurator/ConfigurationEditor/ConfigurationEditor.ee.tsx b/apps/erp/app/components/Configurator/ConfigurationEditor/ConfigurationEditor.ee.tsx
index 5bde0ec311..783fd1524b 100644
--- a/apps/erp/app/components/Configurator/ConfigurationEditor/ConfigurationEditor.ee.tsx
+++ b/apps/erp/app/components/Configurator/ConfigurationEditor/ConfigurationEditor.ee.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable no-new-func */
import {
Badge,
Button,
@@ -225,8 +224,6 @@ export default function Configurator({
if (fetcher.data?.success === true) {
onClose();
}
-
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data]);
const runCode = useCallback(() => {
diff --git a/apps/erp/app/components/Documents.tsx b/apps/erp/app/components/Documents.tsx
index c064701938..0bd14ffeab 100644
--- a/apps/erp/app/components/Documents.tsx
+++ b/apps/erp/app/components/Documents.tsx
@@ -136,7 +136,7 @@ const Documents = ({
console.error(error);
}
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
diff --git a/apps/erp/app/components/Editable/EditableList.tsx b/apps/erp/app/components/Editable/EditableList.tsx
index 83b736d3e2..cde0f61f3c 100644
--- a/apps/erp/app/components/Editable/EditableList.tsx
+++ b/apps/erp/app/components/Editable/EditableList.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable react/display-name */
import { Combobox } from "@carbon/react";
import type { PostgrestSingleResponse } from "@supabase/supabase-js";
import type { EditableTableCellComponentProps } from "~/components/Editable";
diff --git a/apps/erp/app/components/Editable/EditableNumber.tsx b/apps/erp/app/components/Editable/EditableNumber.tsx
index 9d0155de04..4e69deeae8 100644
--- a/apps/erp/app/components/Editable/EditableNumber.tsx
+++ b/apps/erp/app/components/Editable/EditableNumber.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable react/display-name */
import type { NumberFieldProps } from "@carbon/react";
import { Input, NumberField } from "@carbon/react";
import type { PostgrestSingleResponse } from "@supabase/supabase-js";
diff --git a/apps/erp/app/components/Editable/EditableText.tsx b/apps/erp/app/components/Editable/EditableText.tsx
index 16bbfcda5d..0dd7ddf547 100644
--- a/apps/erp/app/components/Editable/EditableText.tsx
+++ b/apps/erp/app/components/Editable/EditableText.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable react/display-name */
import { Input } from "@carbon/react";
import type { PostgrestSingleResponse } from "@supabase/supabase-js";
import type { FocusEvent, KeyboardEvent } from "react";
@@ -53,7 +52,6 @@ const EditableText =
}
};
- // eslint-disable-next-line jsx-a11y/no-autofocus
return (
<Input
autoFocus
diff --git a/apps/erp/app/components/Form/AccountSubcategory.tsx b/apps/erp/app/components/Form/AccountSubcategory.tsx
index fd6861dced..4cd204f440 100644
--- a/apps/erp/app/components/Form/AccountSubcategory.tsx
+++ b/apps/erp/app/components/Form/AccountSubcategory.tsx
@@ -26,7 +26,6 @@ const AccountSubcategory = (props: AccountSubcategorySelectProps) => {
path.to.api.accountingSubcategories(props.accountCategoryId)
);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.accountCategoryId]);
const options = useMemo(
diff --git a/apps/erp/app/components/Form/AddressAutocomplete.tsx b/apps/erp/app/components/Form/AddressAutocomplete.tsx
index c624470077..fdec7abb4c 100644
--- a/apps/erp/app/components/Form/AddressAutocomplete.tsx
+++ b/apps/erp/app/components/Form/AddressAutocomplete.tsx
@@ -66,7 +66,6 @@ const AddressAutocomplete = ({
if (userInteracted) {
debouncedGetSuggestions(value || "");
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [value, userInteracted]);
useEffect(() => {
diff --git a/apps/erp/app/components/Form/CustomerContact.tsx b/apps/erp/app/components/Form/CustomerContact.tsx
index da0250c15b..f82681e23e 100644
--- a/apps/erp/app/components/Form/CustomerContact.tsx
+++ b/apps/erp/app/components/Form/CustomerContact.tsx
@@ -1,15 +1,14 @@
+import type { ComboboxProps } from "@carbon/form";
+import { CreatableCombobox } from "@carbon/form";
+import { Avatar, HStack, useDisclosure } from "@carbon/react";
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo, useRef, useState } from "react";
import type {
CustomerContact as CustomerContactType,
getCustomerContacts
} from "~/modules/sales";
-import { path } from "~/utils/path";
-
-import type { ComboboxProps } from "@carbon/form";
-import { CreatableCombobox } from "@carbon/form";
-import { Avatar, HStack, useDisclosure } from "@carbon/react";
import CustomerContactForm from "~/modules/sales/ui/Customer/CustomerContactForm";
+import { path } from "~/utils/path";
type CustomerContactSelectProps = Omit<
ComboboxProps,
@@ -96,7 +95,6 @@ function useCustomerContacts(customerId?: string) {
if (customerId) {
customerContactsFetcher.load(path.to.api.customerContacts(customerId));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [customerId]);
const options = useMemo(
diff --git a/apps/erp/app/components/Form/CustomerLocation.tsx b/apps/erp/app/components/Form/CustomerLocation.tsx
index 289aa31fc7..c253e43eea 100644
--- a/apps/erp/app/components/Form/CustomerLocation.tsx
+++ b/apps/erp/app/components/Form/CustomerLocation.tsx
@@ -1,16 +1,15 @@
+import type { ComboboxProps } from "@carbon/form";
+import { CreatableCombobox } from "@carbon/form";
+import { useDisclosure } from "@carbon/react";
+import { formatAddress } from "@carbon/utils";
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo, useRef, useState } from "react";
import {
type CustomerLocation as CustomerLocationType,
type getCustomerLocations
} from "~/modules/sales";
-import { path } from "~/utils/path";
-
-import type { ComboboxProps } from "@carbon/form";
-import { CreatableCombobox } from "@carbon/form";
-import { useDisclosure } from "@carbon/react";
-import { formatAddress } from "@carbon/utils";
import CustomerLocationForm from "~/modules/sales/ui/Customer/CustomerLocationForm";
+import { path } from "~/utils/path";
type CustomerLocationSelectProps = Omit<
ComboboxProps,
@@ -44,7 +43,6 @@ const CustomerLocation = (props: CustomerLocationSelectProps) => {
path.to.api.customerLocations(props.customer)
);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.customer]);
const options = useMemo(
diff --git a/apps/erp/app/components/Form/Item.tsx b/apps/erp/app/components/Form/Item.tsx
index 4d47f35cb4..bfc64c7fc1 100644
--- a/apps/erp/app/components/Form/Item.tsx
+++ b/apps/erp/app/components/Form/Item.tsx
@@ -1,29 +1,29 @@
import type { ComboboxProps } from "@carbon/form";
import { useControlField, useField } from "@carbon/form";
import {
- Button,
- cn,
- CreatableCombobox,
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuRadioGroup,
- DropdownMenuRadioItem,
- DropdownMenuTrigger,
- FormControl,
- FormErrorMessage,
- FormHelperText,
- FormLabel,
- IconButton,
- Modal,
- ModalBody,
- ModalContent,
- ModalFooter,
- ModalHeader,
- ModalTitle,
- Tooltip,
- TooltipContent,
- TooltipTrigger,
- useDisclosure
+ Button,
+ cn,
+ CreatableCombobox,
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuRadioGroup,
+ DropdownMenuRadioItem,
+ DropdownMenuTrigger,
+ FormControl,
+ FormErrorMessage,
+ FormHelperText,
+ FormLabel,
+ IconButton,
+ Modal,
+ ModalBody,
+ ModalContent,
+ ModalFooter,
+ ModalHeader,
+ ModalTitle,
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+ useDisclosure
} from "@carbon/react";
import { useEffect, useMemo, useRef, useState } from "react";
import { LuFilter } from "react-icons/lu";
@@ -32,7 +32,7 @@ import ConsumableForm from "~/modules/items/ui/Consumables/ConsumableForm";
import MaterialForm from "~/modules/items/ui/Materials/MaterialForm";
import PartForm from "~/modules/items/ui/Parts/PartForm";
import ToolForm from "~/modules/items/ui/Tools/ToolForm";
-import { methodItemType, type MethodItemType } from "~/modules/shared";
+import { type MethodItemType, methodItemType } from "~/modules/shared";
import { useItems } from "~/stores";
import { MethodItemTypeIcon } from "../Icons";
@@ -111,7 +111,6 @@ const Item = ({
}
return results;
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
items,
props?.includeInactive,
diff --git a/apps/erp/app/components/Form/MaterialDimension.tsx b/apps/erp/app/components/Form/MaterialDimension.tsx
index 44a433957a..272f98ea79 100644
--- a/apps/erp/app/components/Form/MaterialDimension.tsx
+++ b/apps/erp/app/components/Form/MaterialDimension.tsx
@@ -1,15 +1,14 @@
+import type { ComboboxProps } from "@carbon/form";
+import { CreatableCombobox } from "@carbon/form";
+import { useDisclosure, useMount } from "@carbon/react";
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo, useRef, useState } from "react";
import type {
- MaterialDimension as MaterialDimensionType,
- getMaterialDimensionList
+ getMaterialDimensionList,
+ MaterialDimension as MaterialDimensionType
} from "~/modules/items";
-import { path } from "~/utils/path";
-
-import type { ComboboxProps } from "@carbon/form";
-import { CreatableCombobox } from "@carbon/form";
-import { useDisclosure, useMount } from "@carbon/react";
import MaterialDimensionForm from "~/modules/items/ui/MaterialDimensions/MaterialDimensionForm";
+import { path } from "~/utils/path";
type MaterialDimensionSelectProps = Omit<
ComboboxProps,
@@ -51,7 +50,6 @@ const MaterialDimension = (props: MaterialDimensionSelectProps) => {
path.to.api.materialDimensions(props.formId)
);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.formId]);
const options = useMemo(() => {
diff --git a/apps/erp/app/components/Form/MaterialFinish.tsx b/apps/erp/app/components/Form/MaterialFinish.tsx
index 684835dfc8..a1df8b98a3 100644
--- a/apps/erp/app/components/Form/MaterialFinish.tsx
+++ b/apps/erp/app/components/Form/MaterialFinish.tsx
@@ -1,15 +1,14 @@
+import type { ComboboxProps } from "@carbon/form";
+import { CreatableCombobox } from "@carbon/form";
+import { useDisclosure, useMount } from "@carbon/react";
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo, useRef, useState } from "react";
import type {
- MaterialFinish as MaterialFinishType,
- getMaterialFinishList
+ getMaterialFinishList,
+ MaterialFinish as MaterialFinishType
} from "~/modules/items";
-import { path } from "~/utils/path";
-
-import type { ComboboxProps } from "@carbon/form";
-import { CreatableCombobox } from "@carbon/form";
-import { useDisclosure, useMount } from "@carbon/react";
import MaterialFinishForm from "~/modules/items/ui/MaterialFinishes/MaterialFinishForm";
+import { path } from "~/utils/path";
type MaterialFinishSelectProps = Omit<
ComboboxProps,
@@ -51,7 +50,6 @@ const MaterialFinish = (props: MaterialFinishSelectProps) => {
path.to.api.materialFinishes(props.substanceId)
);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.substanceId]);
const options = useMemo(() => {
diff --git a/apps/erp/app/components/Form/MaterialGrade.tsx b/apps/erp/app/components/Form/MaterialGrade.tsx
index c3ec9fb1e3..198b5b4cd4 100644
--- a/apps/erp/app/components/Form/MaterialGrade.tsx
+++ b/apps/erp/app/components/Form/MaterialGrade.tsx
@@ -1,15 +1,14 @@
+import type { ComboboxProps } from "@carbon/form";
+import { CreatableCombobox } from "@carbon/form";
+import { useDisclosure, useMount } from "@carbon/react";
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo, useRef, useState } from "react";
import type {
- MaterialGrade as MaterialGradeType,
- getMaterialGradeList
+ getMaterialGradeList,
+ MaterialGrade as MaterialGradeType
} from "~/modules/items";
-import { path } from "~/utils/path";
-
-import type { ComboboxProps } from "@carbon/form";
-import { CreatableCombobox } from "@carbon/form";
-import { useDisclosure, useMount } from "@carbon/react";
import MaterialGradeForm from "~/modules/items/ui/MaterialGrades/MaterialGradeForm";
+import { path } from "~/utils/path";
type MaterialGradeSelectProps = Omit<
ComboboxProps,
@@ -47,7 +46,6 @@ const MaterialGrade = (props: MaterialGradeSelectProps) => {
if (props.substanceId) {
materialGradesLoader.load(path.to.api.materialGrades(props.substanceId));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.substanceId]);
const options = useMemo(() => {
diff --git a/apps/erp/app/components/Form/MaterialType.tsx b/apps/erp/app/components/Form/MaterialType.tsx
index f85a5d203c..8d7ea503bf 100644
--- a/apps/erp/app/components/Form/MaterialType.tsx
+++ b/apps/erp/app/components/Form/MaterialType.tsx
@@ -1,12 +1,11 @@
-import { useFetcher } from "@remix-run/react";
-import { useEffect, useMemo, useRef, useState } from "react";
-import type { getMaterialTypeList } from "~/modules/items";
-import { path } from "~/utils/path";
-
import type { ComboboxProps } from "@carbon/form";
import { CreatableCombobox } from "@carbon/form";
import { useDisclosure, useMount } from "@carbon/react";
+import { useFetcher } from "@remix-run/react";
+import { useEffect, useMemo, useRef, useState } from "react";
+import type { getMaterialTypeList } from "~/modules/items";
import MaterialTypeForm from "~/modules/items/ui/MaterialTypes/MaterialTypeForm";
+import { path } from "~/utils/path";
type MaterialTypeSelectProps = Omit<
ComboboxProps,
@@ -98,7 +97,6 @@ export const useMaterialTypes = (substanceId?: string, formId?: string) => {
if (substanceId && formId) {
materialTypes.load(path.to.api.materialTypes(substanceId, formId));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [substanceId, formId]);
const options = useMemo(() => {
diff --git a/apps/erp/app/components/Form/Shelf.tsx b/apps/erp/app/components/Form/Shelf.tsx
index 048e3d9140..d0d7cadcca 100644
--- a/apps/erp/app/components/Form/Shelf.tsx
+++ b/apps/erp/app/components/Form/Shelf.tsx
@@ -89,7 +89,6 @@ export function useShelves(locationId?: string, itemId?: string) {
}
shelvesFetcher.load(path.to.api.shelves(locationId));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [locationId, itemId]);
const options = useMemo(() => {
diff --git a/apps/erp/app/components/Form/Shift.tsx b/apps/erp/app/components/Form/Shift.tsx
index ef00b9651f..6c0ac44f95 100644
--- a/apps/erp/app/components/Form/Shift.tsx
+++ b/apps/erp/app/components/Form/Shift.tsx
@@ -2,9 +2,8 @@ import type { SelectProps } from "@carbon/form";
import { Select } from "@carbon/form";
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo } from "react";
-import { path } from "~/utils/path";
-
import type { getShiftsList } from "~/modules/people";
+import { path } from "~/utils/path";
type ShiftSelectProps = Omit<SelectProps, "options"> & {
location?: string;
@@ -29,7 +28,6 @@ export const useShifts = (props?: { location?: string }) => {
if (props?.location) {
shiftFetcher.load(path.to.api.shifts(props.location));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [props?.location]);
const options = useMemo(
diff --git a/apps/erp/app/components/Form/SupplierContact.tsx b/apps/erp/app/components/Form/SupplierContact.tsx
index 6489ea2c2a..6836a8f9a0 100644
--- a/apps/erp/app/components/Form/SupplierContact.tsx
+++ b/apps/erp/app/components/Form/SupplierContact.tsx
@@ -1,15 +1,14 @@
+import type { ComboboxProps } from "@carbon/form";
+import { CreatableCombobox } from "@carbon/form";
+import { Avatar, HStack, useDisclosure } from "@carbon/react";
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo, useRef, useState } from "react";
import type {
- SupplierContact as SupplierContactType,
- getSupplierContacts
+ getSupplierContacts,
+ SupplierContact as SupplierContactType
} from "~/modules/purchasing";
-import { path } from "~/utils/path";
-
-import type { ComboboxProps } from "@carbon/form";
-import { CreatableCombobox } from "@carbon/form";
-import { Avatar, HStack, useDisclosure } from "@carbon/react";
import { SupplierContactForm } from "~/modules/purchasing/ui/Supplier";
+import { path } from "~/utils/path";
type SupplierContactSelectProps = Omit<
ComboboxProps,
@@ -52,7 +51,6 @@ const SupplierContact = (props: SupplierContactSelectProps) => {
path.to.api.supplierContacts(props.supplier)
);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.supplier]);
const options = useMemo(
diff --git a/apps/erp/app/components/Grid/Grid.tsx b/apps/erp/app/components/Grid/Grid.tsx
index 449b767427..680eb199dc 100644
--- a/apps/erp/app/components/Grid/Grid.tsx
+++ b/apps/erp/app/components/Grid/Grid.tsx
@@ -1,4 +1,5 @@
import {
+ cn,
HStack,
Table,
Tbody,
@@ -6,10 +7,9 @@ import {
Th,
Thead,
Tr,
- VStack,
- cn,
useEscape,
- useMount
+ useMount,
+ VStack
} from "@carbon/react";
import { clamp } from "@carbon/utils";
import type { ColumnDef, ColumnOrderState } from "@tanstack/react-table";
@@ -311,7 +311,6 @@ const Grid = <T extends object>({
// reset the selected cell when the table data changes
useEffect(() => {
setSelectedCell(null);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [columnOrder, columnVisibility]);
useMount(() => {
diff --git a/apps/erp/app/components/ImportCSVModal/FieldMappings.tsx b/apps/erp/app/components/ImportCSVModal/FieldMappings.tsx
index 64c185627a..3a0ae73902 100644
--- a/apps/erp/app/components/ImportCSVModal/FieldMappings.tsx
+++ b/apps/erp/app/components/ImportCSVModal/FieldMappings.tsx
@@ -4,15 +4,15 @@ import { useCarbon } from "@carbon/auth";
import type { Database } from "@carbon/database";
import { Combobox, useFormContext } from "@carbon/form";
import {
- Button,
- ModalDescription,
- ModalHeader,
- ModalTitle,
- toast,
- Tooltip,
- TooltipContent,
- TooltipProvider,
- TooltipTrigger
+ Button,
+ ModalDescription,
+ ModalHeader,
+ ModalTitle,
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+ toast
} from "@carbon/react";
import { formatDate } from "@carbon/utils";
import { useFetcher } from "@remix-run/react";
@@ -88,7 +88,6 @@ export function FieldMapping({
encType: "application/json"
}
);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fileColumns, firstRows]);
useEffect(() => {
@@ -112,7 +111,6 @@ export function FieldMapping({
);
});
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data]);
const enumFields: [
diff --git a/apps/erp/app/components/ImportCSVModal/ImportCSVModal.tsx b/apps/erp/app/components/ImportCSVModal/ImportCSVModal.tsx
index 4a3a1ff3e7..3395807010 100644
--- a/apps/erp/app/components/ImportCSVModal/ImportCSVModal.tsx
+++ b/apps/erp/app/components/ImportCSVModal/ImportCSVModal.tsx
@@ -5,8 +5,8 @@ import { useEffect, useState } from "react";
import { flushSync } from "react-dom";
import { z } from "zod/v3";
import {
- importSchemas,
- type fieldMappings
+ type fieldMappings,
+ importSchemas
} from "~/modules/shared/imports.models";
import type { action } from "~/routes/x+/shared+/import.$tableId";
import { path } from "~/utils/path";
@@ -49,7 +49,6 @@ export const ImportCSVModal = ({ table, onClose }: ImportCSVModalProps) => {
} else if (fetcher.data?.success === false) {
toast.error(fetcher.data.message);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data?.success]);
// if the file upload is successful, set the page to field-mapping
diff --git a/apps/erp/app/components/Layout/Navigation/GroupedContentSidebar.tsx b/apps/erp/app/components/Layout/Navigation/GroupedContentSidebar.tsx
index fb6b6680e1..47a66f0dd9 100644
--- a/apps/erp/app/components/Layout/Navigation/GroupedContentSidebar.tsx
+++ b/apps/erp/app/components/Layout/Navigation/GroupedContentSidebar.tsx
@@ -200,7 +200,6 @@ const ViewsReorderGroup = ({
useEffect(() => {
setSortedViews([...views].sort((a, b) => a.sortOrder - b.sortOrder));
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [views.length, viewNames]);
const debouncedOnReorder = useDebounce(onReorder, 500, true);
diff --git a/apps/erp/app/components/Layout/Topbar/Notifications.tsx b/apps/erp/app/components/Layout/Topbar/Notifications.tsx
index 4309e04956..4a6decafa3 100644
--- a/apps/erp/app/components/Layout/Topbar/Notifications.tsx
+++ b/apps/erp/app/components/Layout/Topbar/Notifications.tsx
@@ -365,7 +365,6 @@ const Notifications = () => {
if (isOpen && hasUnseenNotifications) {
markAllMessagesAsSeen();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [hasUnseenNotifications, isOpen]);
const outstandingTrainings = trainingsFetcher.data?.data ?? [];
diff --git a/apps/erp/app/components/OnshapeSync.tsx b/apps/erp/app/components/OnshapeSync.tsx
index f925b59924..b331a4d84a 100644
--- a/apps/erp/app/components/OnshapeSync.tsx
+++ b/apps/erp/app/components/OnshapeSync.tsx
@@ -3,6 +3,7 @@ import { OnshapeLogo } from "@carbon/ee";
import {
Badge,
Button,
+ cn,
Combobox,
DropdownMenu,
DropdownMenuContent,
@@ -15,7 +16,6 @@ import {
PulsingDot,
Spinner,
Status,
- cn,
toast,
useDisclosure,
useMount
@@ -97,7 +97,6 @@ export const OnshapeSync = ({
if (!isDisabled && initialized) {
documentsFetcher.load(path.to.api.onShapeDocuments);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [initialized]);
useEffect(() => {
@@ -127,7 +126,6 @@ export const OnshapeSync = ({
if (documentId && !isDisabled && initialized) {
versionsFetcher.load(path.to.api.onShapeVersions(documentId));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [documentId, initialized]);
const versionOptions =
@@ -151,7 +149,6 @@ export const OnshapeSync = ({
if (documentId && versionId && !isDisabled && initialized) {
elementsFetcher.load(path.to.api.onShapeElements(documentId, versionId));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [documentId, versionId, initialized]);
const elementOptions =
@@ -231,7 +228,6 @@ export const OnshapeSync = ({
if (upsertBomFetcher.data?.success === false) {
toast.error(upsertBomFetcher.data.message);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [bomRows.length, upsertBomFetcher.data]);
return (
diff --git a/apps/erp/app/components/RealtimeDataProvider.tsx b/apps/erp/app/components/RealtimeDataProvider.tsx
index f83ac35301..35c3c31566 100644
--- a/apps/erp/app/components/RealtimeDataProvider.tsx
+++ b/apps/erp/app/components/RealtimeDataProvider.tsx
@@ -124,8 +124,6 @@ const RealtimeDataProvider = ({ children }: { children: React.ReactNode }) => {
useEffect(() => {
if (!companyId) return;
hydrate();
-
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [companyId]);
useRealtimeChannel({
diff --git a/apps/erp/app/components/Selectors/UserSelect/useUserSelect.ts b/apps/erp/app/components/Selectors/UserSelect/useUserSelect.ts
index 06bb07b03a..a5b3069ee4 100644
--- a/apps/erp/app/components/Selectors/UserSelect/useUserSelect.ts
+++ b/apps/erp/app/components/Selectors/UserSelect/useUserSelect.ts
@@ -10,7 +10,7 @@ import {
useId,
useMemo,
useRef,
- useState
+ useState,
} from "react";
import type { Group } from "~/modules/users";
import { path } from "~/utils/path";
@@ -21,7 +21,7 @@ import type {
SelectionItemsById,
TreeNode,
UserSelectionGenericQueryFilters,
- UserSelectProps
+ UserSelectProps,
} from "./types";
const defaultProps = {
@@ -41,7 +41,7 @@ const defaultProps = {
selectionsMaxHeight: 400,
showAvatars: false,
usersOnly: false,
- onCancel: () => {}
+ onCancel: () => {},
};
export default function useUserSelect(props: UserSelectProps) {
@@ -49,7 +49,7 @@ export default function useUserSelect(props: UserSelectProps) {
const innerProps = useMemo(
() => ({
...defaultProps,
- ...props
+ ...props,
}),
[props]
);
@@ -62,7 +62,6 @@ export default function useUserSelect(props: UserSelectProps) {
useEffect(() => {
groupsFetcher.load(path.to.api.groupsByType(innerProps.type));
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [innerProps.type]);
/* Refs */
@@ -109,14 +108,14 @@ export default function useUserSelect(props: UserSelectProps) {
...group.data,
uid: getOptionId(groupId, group.data.id),
label: group.data.name || "",
- children: group.children
+ children: group.children,
});
const subgroups = group.children.map((subgroup) => ({
...subgroup.data,
uid: getOptionId(groupId, subgroup.data.id),
label: subgroup.data.name || "",
- children: subgroup.children
+ children: subgroup.children,
}));
result.push(...subgroups);
@@ -126,7 +125,7 @@ export default function useUserSelect(props: UserSelectProps) {
return {
...user,
uid: getOptionId(groupId, user.id),
- label: user.fullName || ""
+ label: user.fullName || "",
};
});
@@ -149,7 +148,7 @@ export default function useUserSelect(props: UserSelectProps) {
uid,
expanded: false,
items: makeGroupItems(group as Group, uid),
- name: group.data.name || ""
+ name: group.data.name || "",
});
}
return acc;
@@ -168,7 +167,7 @@ export default function useUserSelect(props: UserSelectProps) {
if (innerProps.value!.includes(item.id)) {
return {
...acc,
- [item.id]: item
+ [item.id]: item,
};
}
return acc;
@@ -182,7 +181,7 @@ export default function useUserSelect(props: UserSelectProps) {
);
if (selection) {
setSelectionItemsById({
- [selection?.id]: selection
+ [selection?.id]: selection,
});
}
}
@@ -200,7 +199,7 @@ export default function useUserSelect(props: UserSelectProps) {
return acc.concat({
...group,
expanded: true,
- items: matches
+ items: matches,
});
} else {
return acc;
@@ -228,7 +227,7 @@ export default function useUserSelect(props: UserSelectProps) {
handler: () => {
clear();
commit();
- }
+ },
});
const focusInput = useCallback(() => {
@@ -394,7 +393,7 @@ export default function useUserSelect(props: UserSelectProps) {
getPreviousNode,
getNextNode,
scrollTo,
- setFocusedId
+ setFocusedId,
]
);
@@ -450,7 +449,7 @@ export default function useUserSelect(props: UserSelectProps) {
setSelectionItemsById((previousSelections) => {
const nextSelections = innerProps.isMulti
? {
- ...previousSelections
+ ...previousSelections,
}
: {};
@@ -473,7 +472,7 @@ export default function useUserSelect(props: UserSelectProps) {
innerProps.resetAfterSelection,
onChange,
setFocusedId,
- setSelectionItemsById
+ setSelectionItemsById,
]
);
@@ -513,7 +512,7 @@ export default function useUserSelect(props: UserSelectProps) {
setSelectionItemsById((previousSelections) => {
const nextSelections = {
...previousSelections,
- [selectionItem.id]: toggleChecked(selectionItem)
+ [selectionItem.id]: toggleChecked(selectionItem),
};
onCheckedChange(Object.values(nextSelections));
@@ -552,7 +551,7 @@ export default function useUserSelect(props: UserSelectProps) {
dropdown,
innerProps.isMulti,
removeSelections,
- setControlledValue
+ setControlledValue,
]
);
@@ -570,7 +569,7 @@ export default function useUserSelect(props: UserSelectProps) {
newSelectionItems[user.id] = {
...user,
uid: getOptionId(id, user.id),
- label: user.fullName || ""
+ label: user.fullName || "",
};
});
@@ -578,7 +577,7 @@ export default function useUserSelect(props: UserSelectProps) {
newSelectionItems[group.data.id] = {
...group.data,
uid: getOptionId(id, group.data.id),
- label: group.data.name || ""
+ label: group.data.name || "",
};
});
@@ -691,7 +690,7 @@ export default function useUserSelect(props: UserSelectProps) {
onSelect,
onToggle,
resetFocus,
- setFocus
+ setFocus,
]
);
@@ -703,7 +702,7 @@ export default function useUserSelect(props: UserSelectProps) {
() => ({
id: instanceId,
role: "tree",
- tabIndex: -1
+ tabIndex: -1,
}),
[instanceId]
);
@@ -717,7 +716,7 @@ export default function useUserSelect(props: UserSelectProps) {
"aria-autocomplete": "list",
"aria-activedescendant": undefined, // TODO
autoComplete: "off",
- autoCorrect: "off"
+ autoCorrect: "off",
}),
[instanceId, dropdown.isOpen]
);
@@ -726,7 +725,7 @@ export default function useUserSelect(props: UserSelectProps) {
() => ({
inputProps,
listBoxProps,
- popoverProps
+ popoverProps,
}),
[inputProps, listBoxProps, popoverProps]
);
@@ -734,7 +733,7 @@ export default function useUserSelect(props: UserSelectProps) {
let inputValue =
innerProps.isMulti || focusedId || controlledValue
? controlledValue
- : (Object.values(selectionItemsById)?.[0]?.label ?? "");
+ : Object.values(selectionItemsById)?.[0]?.label ?? "";
return {
aria,
@@ -757,7 +756,7 @@ export default function useUserSelect(props: UserSelectProps) {
listBoxRef,
popoverRef,
buttonRef,
- focusableNodes
+ focusableNodes,
},
// event handlers
onClearInput,
@@ -773,7 +772,7 @@ export default function useUserSelect(props: UserSelectProps) {
onExplode,
onMouseOver,
setControlledValue,
- setSelectionItemsById
+ setSelectionItemsById,
};
}
@@ -788,7 +787,7 @@ function getGroupId(instanceId: string, groupId: string) {
function checked(item: IndividualOrGroup): IndividualOrGroup {
return {
...item,
- isChecked: true
+ isChecked: true,
};
}
@@ -802,7 +801,7 @@ export function isGroup(item: IndividualOrGroup) {
function toggleChecked(item: IndividualOrGroup): IndividualOrGroup {
return {
...item,
- isChecked: !item.isChecked || false
+ isChecked: !item.isChecked || false,
};
}
diff --git a/apps/erp/app/components/Table/Table.tsx b/apps/erp/app/components/Table/Table.tsx
index f52649d895..9ae3b5c124 100644
--- a/apps/erp/app/components/Table/Table.tsx
+++ b/apps/erp/app/components/Table/Table.tsx
@@ -338,7 +338,6 @@ const Table = <T extends object>({
};
});
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [view]);
/* Sorting */
@@ -428,7 +427,6 @@ const Table = <T extends object>({
if (typeof onSelectedRowsChange === "function") {
onSelectedRowsChange(selectedRows);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [rowSelection, onSelectedRowsChange]);
const [editMode, setEditMode] = useState(false);
@@ -639,7 +637,6 @@ const Table = <T extends object>({
useEffect(() => {
if (selectedCell) setSelectedCell(null);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [editMode, pagination.pageIndex, pagination.pageSize]);
useMount(() => {
diff --git a/apps/erp/app/components/Table/components/Filter/ActiveFilters.tsx b/apps/erp/app/components/Table/components/Filter/ActiveFilters.tsx
index 58246cafb6..3716115f26 100644
--- a/apps/erp/app/components/Table/components/Filter/ActiveFilters.tsx
+++ b/apps/erp/app/components/Table/components/Filter/ActiveFilters.tsx
@@ -103,7 +103,6 @@ const ActiveFilter = ({ filter, operator, value }: ActiveFilterProps) => {
setLoading(false);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data, filter.filter.type]);
const makeLabel = (v: string) => {
diff --git a/apps/erp/app/components/Table/components/Filter/Filter.tsx b/apps/erp/app/components/Table/components/Filter/Filter.tsx
index 4d1d5a7617..1bd9668523 100644
--- a/apps/erp/app/components/Table/components/Filter/Filter.tsx
+++ b/apps/erp/app/components/Table/components/Filter/Filter.tsx
@@ -104,7 +104,7 @@ const Filter = forwardRef<HTMLButtonElement, FilterProps>(
fetcher.load(filter.filter.endpoint);
}
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[filters]
);
diff --git a/apps/erp/app/components/Table/components/TableHeader.tsx b/apps/erp/app/components/Table/components/TableHeader.tsx
index 0fcaf0fab4..46df97f0c7 100644
--- a/apps/erp/app/components/Table/components/TableHeader.tsx
+++ b/apps/erp/app/components/Table/components/TableHeader.tsx
@@ -28,7 +28,7 @@ import type {
ColumnOrderState,
ColumnPinningState
} from "@tanstack/react-table";
-import { useEffect, useState, type ReactNode } from "react";
+import { type ReactNode, useEffect, useState } from "react";
import { BsThreeDotsVertical } from "react-icons/bs";
import {
LuCheck,
@@ -47,12 +47,12 @@ import { savedViewValidator } from "~/modules/shared/shared.models";
import type { action as savedViewAction } from "~/routes/x+/shared+/views";
import { path } from "~/utils/path";
import Columns from "./Columns";
+import Download from "./Download";
import { ActiveFilters, Filter } from "./Filter";
import type { ColumnFilter } from "./Filter/types";
import type { PaginationProps } from "./Pagination";
import { PaginationButtons } from "./Pagination";
import Sort from "./Sort";
-import Download from "./Download";
type HeaderProps<T> = {
renderActions?: (selectedRows: T[]) => ReactNode;
@@ -128,7 +128,6 @@ const TableHeader = <T extends object>({
} else if (fetcher.data?.success === false) {
toast.error(fetcher.data.message);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state, fetcher.data?.success]);
const { currentView, hasView } = useSavedViews();
diff --git a/apps/erp/app/components/Table/types.ts b/apps/erp/app/components/Table/types.ts
index fc78662156..13c0624b7c 100644
--- a/apps/erp/app/components/Table/types.ts
+++ b/apps/erp/app/components/Table/types.ts
@@ -3,7 +3,6 @@ import type { ReactElement } from "react";
import type { ColumnFilterData } from "./components/Filter/types";
declare module "@tanstack/react-table" {
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
interface ColumnMeta<TData extends unknown, TValue> {
filter?: ColumnFilterData;
pluralHeader?: string;
diff --git a/apps/erp/app/hooks/useGooglePlaces.tsx b/apps/erp/app/hooks/useGooglePlaces.tsx
index fb49ce7ff2..5e092e5973 100644
--- a/apps/erp/app/hooks/useGooglePlaces.tsx
+++ b/apps/erp/app/hooks/useGooglePlaces.tsx
@@ -1,6 +1,6 @@
-import { useCallback, useRef, useState } from "react";
-import { nanoid } from "nanoid";
import { GOOGLE_PLACES_API_KEY } from "@carbon/auth";
+import { nanoid } from "nanoid";
+import { useCallback, useRef, useState } from "react";
interface PlaceSuggestion {
placeId: string;
@@ -227,7 +227,7 @@ export const useGooglePlaces = () => {
return addressComponents;
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
diff --git a/apps/erp/app/hooks/useTags.tsx b/apps/erp/app/hooks/useTags.tsx
index e5ab209696..83bea2b1be 100644
--- a/apps/erp/app/hooks/useTags.tsx
+++ b/apps/erp/app/hooks/useTags.tsx
@@ -20,7 +20,7 @@ export function useTags({ id, table }: { id?: string; table: string }) {
action: path.to.tags
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[id, table]
);
diff --git a/apps/erp/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable.tsx b/apps/erp/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable.tsx
index 2091a8a5e0..d151715110 100644
--- a/apps/erp/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable.tsx
+++ b/apps/erp/app/modules/accounting/ui/AccountCategories/AccountCategoriesTable.tsx
@@ -8,9 +8,9 @@ import {
import { Link, useNavigate } from "@remix-run/react";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo, useState } from "react";
-import { LuListChecks, LuPencil, LuTrash } from "react-icons/lu";
import { BiAddToQueue } from "react-icons/bi";
import { BsListUl } from "react-icons/bs";
+import { LuListChecks, LuPencil, LuTrash } from "react-icons/lu";
import { Hyperlink, New, Table } from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { ConfirmDelete } from "~/components/Modals";
@@ -160,7 +160,7 @@ const AccountCategoriesTable = memo(
</>
);
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[navigate, params, permissions]
);
diff --git a/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsx b/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsx
index 53481b03ba..82274faec8 100644
--- a/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsx
+++ b/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsx
@@ -1,6 +1,7 @@
import {
Badge,
BadgeCloseButton,
+ cn,
Command,
CommandGroup,
CommandInput,
@@ -11,7 +12,6 @@ import {
Popover,
PopoverContent,
PopoverTrigger,
- cn,
useDisclosure
} from "@carbon/react";
import { convertKbToString, filterEmpty, formatDate } from "@carbon/utils";
@@ -380,7 +380,6 @@ const DocumentsTable = memo(
}
];
// Don't put the revalidator in the deps array
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
extensions,
labelOptions,
@@ -402,7 +401,6 @@ const DocumentsTable = memo(
};
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: Document) => (
<>
<MenuItem disabled={canUpdate(row)} onClick={() => edit(row)}>
diff --git a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptForm/useReceiptForm.tsx b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptForm/useReceiptForm.tsx
index fa889cb3c1..ac04adf287 100644
--- a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptForm/useReceiptForm.tsx
+++ b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptForm/useReceiptForm.tsx
@@ -98,7 +98,6 @@ export default function useReceiptForm({
if (status !== "Posted") {
fetchSourceDocuments();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [sourceDocument, status]);
return {
diff --git a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptLines.tsx b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptLines.tsx
index c49cbc5f10..097e03cb80 100644
--- a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptLines.tsx
+++ b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptLines.tsx
@@ -65,12 +65,12 @@ import { useUnitOfMeasure } from "~/components/Form/UnitOfMeasure";
import { ConfirmDelete } from "~/components/Modals";
import { useRouteData, useUser } from "~/hooks";
import {
- ShelfForm,
- splitValidator,
type BatchProperty,
type ItemTracking,
type Receipt,
- type ReceiptLine
+ type ReceiptLine,
+ ShelfForm,
+ splitValidator
} from "~/modules/inventory";
import { getDocumentType } from "~/modules/shared/shared.service";
import type { action as receiptLinesUpdateAction } from "~/routes/x+/receipt+/lines.update";
@@ -185,7 +185,6 @@ const ReceiptLines = () => {
};
}, {})
);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [routeData?.receipt?.sourceDocumentId, routeData?.receiptLines?.length]);
const onUpdateReceiptLine = useCallback(
@@ -214,7 +213,7 @@ const ReceiptLines = () => {
action: path.to.bulkUpdateReceiptLine
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
diff --git a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptPostModal.tsx b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptPostModal.tsx
index a810afdad9..2bbe0a2168 100644
--- a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptPostModal.tsx
+++ b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptPostModal.tsx
@@ -142,7 +142,6 @@ const ReceiptPostModal = ({ onClose }: { onClose: () => void }) => {
if (fetcher.state === "idle" && submitted.current) {
onClose();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
return (
diff --git a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentForm/useShipmentForm.tsx b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentForm/useShipmentForm.tsx
index 87b28ddacf..417932a8e9 100644
--- a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentForm/useShipmentForm.tsx
+++ b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentForm/useShipmentForm.tsx
@@ -115,7 +115,6 @@ export default function useShipmentForm({
if (status !== "Posted") {
fetchSourceDocuments();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [sourceDocument, status]);
return {
diff --git a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentLines.tsx b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentLines.tsx
index 4d0a99d7cf..a36488c8bd 100644
--- a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentLines.tsx
+++ b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentLines.tsx
@@ -175,7 +175,6 @@ const ShipmentLines = () => {
};
}, {})
);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [routeData?.shipment?.sourceDocumentId, routeData?.shipmentLines?.length]);
const onUpdateShipmentLine = useCallback(
@@ -204,7 +203,7 @@ const ShipmentLines = () => {
action: path.to.bulkUpdateShipmentLine
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
@@ -630,7 +629,6 @@ function BatchForm({
});
}
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [line.shippedQuantity]);
const getShelfFromBatchNumber = async (trackedEntityId: string) => {
@@ -657,7 +655,6 @@ function BatchForm({
if (values.number && values.number.trim()) {
getShelfFromBatchNumber(values.number);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [values.number]);
const updateBatchNumber = async (newValues: typeof values, isNew = false) => {
@@ -1198,7 +1195,6 @@ export function useSerialNumbers(itemId?: string, isReadOnly = false) {
if (itemId) {
serialNumbersFetcher.load(path.to.api.serialNumbers(itemId, isReadOnly));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [itemId]);
return { data: serialNumbersFetcher.data };
@@ -1212,7 +1208,6 @@ export function useBatchNumbers(itemId?: string) {
if (itemId) {
batchNumbersFetcher.load(path.to.api.batchNumbers(itemId));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [itemId]);
return { data: batchNumbersFetcher.data };
diff --git a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentPostModal.tsx b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentPostModal.tsx
index 22756ff472..07e5167ecc 100644
--- a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentPostModal.tsx
+++ b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentPostModal.tsx
@@ -138,7 +138,6 @@ const ShipmentPostModal = ({ onClose }: { onClose: () => void }) => {
if (fetcher.state === "idle" && submitted.current) {
onClose();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
return (
diff --git a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentVoidModal.tsx b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentVoidModal.tsx
index 98085184ee..1329426da4 100644
--- a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentVoidModal.tsx
+++ b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentVoidModal.tsx
@@ -30,7 +30,6 @@ const ShipmentVoidModal = ({ onClose }: { onClose: () => void }) => {
if (fetcher.state === "idle" && submitted.current) {
onClose();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
return (
diff --git a/apps/erp/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable.tsx b/apps/erp/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable.tsx
index 8518616e18..6b3326eecf 100644
--- a/apps/erp/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable.tsx
+++ b/apps/erp/app/modules/inventory/ui/ShippingMethods/ShippingMethodsTable.tsx
@@ -14,7 +14,7 @@ import { Hyperlink, New, Table } from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { usePermissions, useUrlParams } from "~/hooks";
import { useCustomColumns } from "~/hooks/useCustomColumns";
-import { shippingCarrierType, type ShippingMethod } from "~/modules/inventory";
+import { type ShippingMethod, shippingCarrierType } from "~/modules/inventory";
import { path } from "~/utils/path";
type ShippingMethodsTableProps = {
@@ -91,7 +91,6 @@ const ShippingMethodsTable = memo(
}
])
: result;
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [permissions, customColumns]);
const renderContextMenu = useCallback(
diff --git a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferCompleteModal.tsx b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferCompleteModal.tsx
index db0e4e69c7..39841b32f1 100644
--- a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferCompleteModal.tsx
+++ b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferCompleteModal.tsx
@@ -109,7 +109,6 @@ const StockTransferPostModal = ({ onClose }: { onClose: () => void }) => {
if (fetcher.state === "idle" && submitted.current) {
onClose();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
return (
diff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicePostModal.tsx b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicePostModal.tsx
index 5997c4860f..fe6995e517 100644
--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicePostModal.tsx
+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicePostModal.tsx
@@ -52,7 +52,6 @@ const PurchaseInvoicePostModal = ({
} else if (fetcher.data?.success === false && fetcher.data?.message) {
toast.error(fetcher.data.message);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data?.success]);
return (
diff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceProperties.tsx b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceProperties.tsx
index 81818ac6f8..3faf89dc52 100644
--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceProperties.tsx
+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceProperties.tsx
@@ -4,18 +4,18 @@ import {
Button,
HStack,
IconButton,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { useLocale } from "@react-aria/i18n";
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect, useMemo } from "react";
import { LuCopy, LuInfo, LuLink, LuRefreshCcw } from "react-icons/lu";
-import { z } from "zod/v3";
import { zfd } from "zod-form-data";
+import { z } from "zod/v3";
import { Assignee, useOptimisticAssignment } from "~/components";
import {
Currency,
@@ -75,7 +75,7 @@ const PurchaseInvoiceProperties = () => {
action: path.to.bulkUpdatePurchaseInvoice
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[invoiceId, routeData?.purchaseInvoice]
);
@@ -92,7 +92,7 @@ const PurchaseInvoiceProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[invoiceId]
);
diff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicesTable.tsx b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicesTable.tsx
index 936b02025b..7ef51e59e5 100644
--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicesTable.tsx
+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoicesTable.tsx
@@ -266,7 +266,6 @@ const PurchaseInvoicesTable = memo(
}, [currencyFormatter, customColumns, people, suppliers]);
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: PurchaseInvoice) => (
<>
<MenuItem
diff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicePostModal.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicePostModal.tsx
index 1d29389bc9..f0bad20a96 100644
--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicePostModal.tsx
+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicePostModal.tsx
@@ -64,7 +64,6 @@ const SalesInvoicePostModal = ({
} else if (fetcher.data?.success === false && fetcher.data?.message) {
toast.error(fetcher.data.message);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data?.success]);
return (
diff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceProperties.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceProperties.tsx
index 2363f56bd5..39b6ac49ea 100644
--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceProperties.tsx
+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceProperties.tsx
@@ -4,18 +4,18 @@ import {
Button,
HStack,
IconButton,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { useLocale } from "@react-aria/i18n";
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect, useMemo } from "react";
import { LuCopy, LuInfo, LuLink, LuRefreshCcw } from "react-icons/lu";
-import { z } from "zod/v3";
import { zfd } from "zod-form-data";
+import { z } from "zod/v3";
import { Assignee, useOptimisticAssignment } from "~/components";
import {
Currency,
@@ -75,7 +75,7 @@ const SalesInvoiceProperties = () => {
action: path.to.bulkUpdateSalesInvoice
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[invoiceId, routeData?.salesInvoice]
);
@@ -92,7 +92,7 @@ const SalesInvoiceProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[invoiceId]
);
diff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceVoidModal.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceVoidModal.tsx
index 674ee18ef9..dfd7d2d331 100644
--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceVoidModal.tsx
+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceVoidModal.tsx
@@ -30,7 +30,6 @@ const SalesInvoiceVoidModal = ({ onClose }: { onClose: () => void }) => {
if (fetcher.state === "idle" && submitted.current) {
onClose();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
return (
diff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicesTable.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicesTable.tsx
index f3fbd07cd9..4a29cd7431 100644
--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicesTable.tsx
+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoicesTable.tsx
@@ -260,7 +260,6 @@ const SalesInvoicesTable = memo(({ data, count }: SalesInvoicesTableProps) => {
}, [currencyFormatter, customColumns, people, customers]);
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: SalesInvoice) => (
<>
<MenuItem
diff --git a/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsx b/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsx
index d1aa0ace5c..872bb50008 100644
--- a/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsx
+++ b/apps/erp/app/modules/items/ui/Consumables/ConsumableProperties.tsx
@@ -3,24 +3,24 @@ import { InputControlled, ValidatedForm } from "@carbon/form";
import {
Badge,
Button,
+ cn,
DropdownMenu,
DropdownMenuContent,
DropdownMenuIcon,
DropdownMenuItem,
DropdownMenuTrigger,
HStack,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- cn,
- toast
+ VStack
} from "@carbon/react";
import { Await, useFetcher, useParams } from "@remix-run/react";
import { Suspense, useCallback, useEffect } from "react";
import { LuCopy, LuLink } from "react-icons/lu";
-import { z } from "zod/v3";
import { zfd } from "zod-form-data";
+import { z } from "zod/v3";
import { MethodBadge, MethodIcon, TrackingTypeIcon } from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { Boolean, Tags } from "~/components/Form";
@@ -97,7 +97,7 @@ const ConsumableProperties = () => {
action: path.to.bulkUpdateItems
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[itemId]
);
@@ -117,7 +117,7 @@ const ConsumableProperties = () => {
action: path.to.tags
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[routeData?.consumableSummary?.readableId]
);
@@ -134,7 +134,7 @@ const ConsumableProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[routeData?.consumableSummary?.readableId]
);
diff --git a/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsx b/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsx
index 95b3b94a64..9079e12f45 100644
--- a/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsx
+++ b/apps/erp/app/modules/items/ui/Consumables/ConsumablesTable.tsx
@@ -293,7 +293,7 @@ const ConsumablesTable = memo(
action: path.to.bulkUpdateItems
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
@@ -358,7 +358,6 @@ const ConsumablesTable = memo(
);
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: Consumable) => (
<>
<MenuItem onClick={() => navigate(path.to.consumable(row.id!))}>
diff --git a/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx b/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx
index 9f8d99f15c..e9bfd0b5f1 100644
--- a/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx
+++ b/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx
@@ -43,6 +43,7 @@ import { AnimatePresence, LayoutGroup, motion, Reorder } from "framer-motion";
import { nanoid } from "nanoid";
import type { Dispatch, SetStateAction } from "react";
import { useEffect, useMemo, useRef, useState } from "react";
+import { flushSync } from "react-dom";
import {
LuActivity,
LuChevronRight,
@@ -68,6 +69,8 @@ import {
Empty,
TimeTypeIcon
} from "~/components";
+import { ConfigurationEditor } from "~/components/Configurator/ConfigurationEditor";
+import type { Configuration } from "~/components/Configurator/types";
import {
Hidden,
InputControlled,
@@ -85,18 +88,16 @@ import {
UnitOfMeasure,
WorkCenter
} from "~/components/Form";
-
-import { flushSync } from "react-dom";
-import { ConfigurationEditor } from "~/components/Configurator/ConfigurationEditor";
-import type { Configuration } from "~/components/Configurator/types";
-
+import Procedure from "~/components/Form/Procedure";
+import { SupplierProcessPreview } from "~/components/Form/SupplierProcess";
import { getUnitHint } from "~/components/Form/UnitHint";
+import { useUnitOfMeasure } from "~/components/Form/UnitOfMeasure";
+import { ProcedureStepTypeIcon } from "~/components/Icons";
import { ConfirmDelete } from "~/components/Modals";
import type { Item, SortableItemRenderProps } from "~/components/SortableList";
import { SortableList, SortableListItem } from "~/components/SortableList";
import { usePermissions, useUser } from "~/hooks";
import { useTags } from "~/hooks/useTags";
-
import type {
OperationParameter,
OperationStep,
@@ -111,17 +112,11 @@ import {
procedureStepType,
standardFactorType
} from "~/modules/shared";
-
import type { action as editMethodOperationParameterAction } from "~/routes/x+/items+/methods+/operation.parameter.$id";
import type { action as newMethodOperationParameterAction } from "~/routes/x+/items+/methods+/operation.parameter.new";
import type { action as editMethodOperationStepAction } from "~/routes/x+/items+/methods+/operation.step.$id";
import type { action as editMethodOperationToolAction } from "~/routes/x+/items+/methods+/operation.tool.$id";
import type { action as newMethodOperationToolAction } from "~/routes/x+/items+/methods+/operation.tool.new";
-
-import Procedure from "~/components/Form/Procedure";
-import { SupplierProcessPreview } from "~/components/Form/SupplierProcess";
-import { useUnitOfMeasure } from "~/components/Form/UnitOfMeasure";
-import { ProcedureStepTypeIcon } from "~/components/Icons";
import { useItems, useTools } from "~/stores";
import { getPrivateUrl, path } from "~/utils/path";
import { methodOperationValidator } from "../../items.models";
@@ -2025,7 +2020,6 @@ function AttributesListItem({
disclosure.onClose();
submitted.current = false;
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
const [type, setType] = useState<OperationStep["type"]>(attribute.type);
@@ -2514,7 +2508,6 @@ function ParametersListItem({
disclosure.onClose();
submitted.current = false;
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
const isUpdated = updatedBy !== null;
@@ -2786,7 +2779,6 @@ function ToolsListItem({
disclosure.onClose();
submitted.current = false;
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
const tools = useTools();
diff --git a/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx b/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx
index 1d23a9ba45..a6f6d6da35 100644
--- a/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx
+++ b/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx
@@ -1,6 +1,6 @@
-/* eslint-disable react/jsx-no-undef */
import {
Badge,
+ cn,
Copy,
DropdownMenu,
DropdownMenuContent,
@@ -10,18 +10,17 @@ import {
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuTrigger,
- HStack,
HoverCard,
HoverCardContent,
HoverCardTrigger,
+ HStack,
IconButton,
Input,
InputGroup,
InputLeftElement,
- VStack,
- cn,
useDisclosure,
- useMount
+ useMount,
+ VStack
} from "@carbon/react";
import { useOptimisticLocation } from "@carbon/remix";
import { Link, useNavigate, useParams } from "@remix-run/react";
diff --git a/apps/erp/app/modules/items/ui/Item/ItemDocuments.tsx b/apps/erp/app/modules/items/ui/Item/ItemDocuments.tsx
index 5db19fa1bf..65b6acf0a0 100644
--- a/apps/erp/app/modules/items/ui/Item/ItemDocuments.tsx
+++ b/apps/erp/app/modules/items/ui/Item/ItemDocuments.tsx
@@ -18,25 +18,24 @@ import {
Td,
Th,
Thead,
- toast,
- Tr
+ Tr,
+ toast
} from "@carbon/react";
import { convertKbToString } from "@carbon/utils";
-import { LuAxis3D, LuEllipsisVertical, LuUpload } from "react-icons/lu";
-import { DocumentPreview, FileDropzone, Hyperlink } from "~/components";
-import DocumentIcon from "~/components/DocumentIcon";
-import type { MethodItemType, OptimisticFileObject } from "~/modules/shared";
-import { getDocumentType } from "~/modules/shared";
-import type { ItemFile } from "../../types";
-
import { Link, useFetchers, useRevalidator, useSubmit } from "@remix-run/react";
import type { FileObject } from "@supabase/storage-js";
import type { ChangeEvent } from "react";
import { useCallback } from "react";
+import { LuAxis3D, LuEllipsisVertical, LuUpload } from "react-icons/lu";
+import { DocumentPreview, FileDropzone, Hyperlink } from "~/components";
+import DocumentIcon from "~/components/DocumentIcon";
import { usePermissions, useUser } from "~/hooks";
+import type { MethodItemType, OptimisticFileObject } from "~/modules/shared";
+import { getDocumentType } from "~/modules/shared";
import type { ModelUpload } from "~/types";
import { path } from "~/utils/path";
import { stripSpecialCharacters } from "~/utils/string";
+import type { ItemFile } from "../../types";
type ItemDocumentsProps = {
files: ItemFile[];
@@ -356,7 +355,7 @@ export const useItemDocuments = ({ itemId, type }: Props) => {
console.error(error);
}
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
@@ -379,7 +378,7 @@ export const useItemDocuments = ({ itemId, type }: Props) => {
console.error(error);
}
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[getPath]
);
diff --git a/apps/erp/app/modules/items/ui/Item/RevisionForm.tsx b/apps/erp/app/modules/items/ui/Item/RevisionForm.tsx
index f97e6d3830..5c682770be 100644
--- a/apps/erp/app/modules/items/ui/Item/RevisionForm.tsx
+++ b/apps/erp/app/modules/items/ui/Item/RevisionForm.tsx
@@ -52,7 +52,6 @@ const RevisionForm = ({
if (fetcher.data?.success === false) {
toast.error(fetcher.data.message);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data]);
return (
diff --git a/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsx b/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsx
index 73a82ec1dd..df4faf0aca 100644
--- a/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsx
+++ b/apps/erp/app/modules/items/ui/Materials/MaterialProperties.tsx
@@ -5,6 +5,7 @@ import {
AlertTitle,
Badge,
Button,
+ cn,
DropdownMenu,
DropdownMenuContent,
DropdownMenuIcon,
@@ -17,19 +18,18 @@ import {
ModalFooter,
ModalHeader,
ModalTitle,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- cn,
- toast,
- useDisclosure
+ useDisclosure,
+ VStack
} from "@carbon/react";
import { Await, useFetcher, useParams } from "@remix-run/react";
import { Suspense, useCallback, useEffect, useState } from "react";
import { LuCopy, LuKeySquare, LuLink, LuTriangleAlert } from "react-icons/lu";
-import { z } from "zod/v3";
import { zfd } from "zod-form-data";
+import { z } from "zod/v3";
import { MethodBadge, MethodIcon, TrackingTypeIcon } from "~/components";
import { Boolean, Tags, UnitOfMeasure } from "~/components/Form";
import CustomFormInlineFields from "~/components/Form/CustomFormInlineFields";
@@ -137,7 +137,7 @@ const MaterialProperties = () => {
action: path.to.bulkUpdateItems
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[itemId]
);
@@ -202,7 +202,7 @@ const MaterialProperties = () => {
action: path.to.tags
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[routeData?.materialSummary?.readableId]
);
@@ -219,7 +219,7 @@ const MaterialProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[routeData?.materialSummary?.readableId]
);
diff --git a/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsx b/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsx
index cb2a26d986..ba70468d21 100644
--- a/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsx
+++ b/apps/erp/app/modules/items/ui/Materials/MaterialsTable.tsx
@@ -429,7 +429,7 @@ const MaterialsTable = memo(({ data, tags, count }: MaterialsTableProps) => {
action: path.to.bulkUpdateItems
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[materialSubstanceId, materialFormId]
);
@@ -490,7 +490,6 @@ const MaterialsTable = memo(({ data, tags, count }: MaterialsTableProps) => {
);
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: Material) => {
const revisions =
(row.revisions as {
diff --git a/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx b/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx
index b6414e5c5a..25d8da9486 100644
--- a/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx
+++ b/apps/erp/app/modules/items/ui/Parts/PartProperties.tsx
@@ -3,18 +3,18 @@ import { InputControlled, ValidatedForm } from "@carbon/form";
import {
Badge,
Button,
+ cn,
DropdownMenu,
DropdownMenuContent,
DropdownMenuIcon,
DropdownMenuItem,
DropdownMenuTrigger,
HStack,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- cn,
- toast
+ VStack
} from "@carbon/react";
import { Await, Link, useFetcher, useParams } from "@remix-run/react";
import type { PostgrestResponse } from "@supabase/supabase-js";
@@ -112,7 +112,7 @@ const PartProperties = () => {
action: path.to.bulkUpdateItems
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[routeData?.partSummary?.id]
);
@@ -131,7 +131,7 @@ const PartProperties = () => {
action: path.to.tags
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[routeData?.partSummary?.readableId]
);
@@ -148,7 +148,7 @@ const PartProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[routeData?.partSummary?.readableId]
);
diff --git a/apps/erp/app/modules/items/ui/Parts/PartsTable.tsx b/apps/erp/app/modules/items/ui/Parts/PartsTable.tsx
index 84519c27b3..05e055c99b 100644
--- a/apps/erp/app/modules/items/ui/Parts/PartsTable.tsx
+++ b/apps/erp/app/modules/items/ui/Parts/PartsTable.tsx
@@ -302,7 +302,7 @@ const PartsTable = memo(({ data, tags, count }: PartsTableProps) => {
action: path.to.bulkUpdateItems
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
@@ -382,7 +382,6 @@ const PartsTable = memo(({ data, tags, count }: PartsTableProps) => {
);
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: Part) => {
const revisions =
(row.revisions as {
diff --git a/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsx b/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsx
index 878b691d3f..0fc776c959 100644
--- a/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsx
+++ b/apps/erp/app/modules/items/ui/Tools/ToolProperties.tsx
@@ -3,25 +3,25 @@ import { InputControlled, ValidatedForm } from "@carbon/form";
import {
Badge,
Button,
+ cn,
DropdownMenu,
DropdownMenuContent,
DropdownMenuIcon,
DropdownMenuItem,
DropdownMenuTrigger,
HStack,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- cn,
- toast
+ VStack
} from "@carbon/react";
import { Await, useFetcher, useParams } from "@remix-run/react";
import type { PostgrestResponse } from "@supabase/supabase-js";
import { Suspense, useCallback, useEffect } from "react";
import { LuCopy, LuKeySquare, LuLink } from "react-icons/lu";
-import { z } from "zod/v3";
import { zfd } from "zod-form-data";
+import { z } from "zod/v3";
import { MethodBadge, MethodIcon, TrackingTypeIcon } from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { Boolean, Tags } from "~/components/Form";
@@ -105,7 +105,7 @@ const ToolProperties = () => {
action: path.to.bulkUpdateItems
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[itemId]
);
@@ -124,7 +124,7 @@ const ToolProperties = () => {
action: path.to.tags
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[routeData?.toolSummary?.readableId]
);
@@ -141,7 +141,7 @@ const ToolProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[routeData?.toolSummary?.readableId]
);
diff --git a/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsx b/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsx
index 24076d89c4..2d7f27a171 100644
--- a/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsx
+++ b/apps/erp/app/modules/items/ui/Tools/ToolsTable.tsx
@@ -316,7 +316,7 @@ const ToolsTable = memo(({ data, tags, count }: ToolsTableProps) => {
action: path.to.bulkUpdateItems
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
@@ -377,7 +377,6 @@ const ToolsTable = memo(({ data, tags, count }: ToolsTableProps) => {
);
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: Tool) => {
const revisions =
(row.revisions as {
diff --git a/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsx b/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsx
index 21daaf79e7..007d7b20ad 100644
--- a/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsx
+++ b/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsx
@@ -11,7 +11,7 @@ import type { ColumnDef } from "@tanstack/react-table";
import { memo, useCallback, useMemo, useState } from "react";
import { BiAddToQueue } from "react-icons/bi";
import { BsListUl } from "react-icons/bs";
-import { LuPencil, LuTrash, LuListChecks } from "react-icons/lu";
+import { LuListChecks, LuPencil, LuTrash } from "react-icons/lu";
import { Hyperlink, New, Table } from "~/components";
import { ConfirmDelete } from "~/components/Modals";
import { usePermissions, useUrlParams } from "~/hooks";
@@ -158,7 +158,7 @@ const AttributeCategoriesTable = memo(
</>
);
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[navigate, params, permissions]
);
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx
index b4aa0df87c..0bf58929b5 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx
@@ -54,6 +54,7 @@ import {
formatRelativeTime
} from "@carbon/utils";
import { getLocalTimeZone, today } from "@internationalized/date";
+import { useNumberFormatter } from "@react-aria/i18n";
import { Link, useFetcher, useFetchers, useParams } from "@remix-run/react";
import { AnimatePresence, LayoutGroup, motion, Reorder } from "framer-motion";
import { nanoid } from "nanoid";
@@ -104,7 +105,13 @@ import {
UnitHint,
WorkCenter
} from "~/components/Form";
+import Procedure from "~/components/Form/Procedure";
+import { SupplierProcessPreview } from "~/components/Form/SupplierProcess";
import { getUnitHint } from "~/components/Form/UnitHint";
+import UnitOfMeasure, {
+ useUnitOfMeasure
+} from "~/components/Form/UnitOfMeasure";
+import { ProcedureStepTypeIcon } from "~/components/Icons";
import InfiniteScroll from "~/components/InfiniteScroll";
import { ConfirmDelete } from "~/components/Modals";
import type { Item, SortableItemRenderProps } from "~/components/SortableList";
@@ -123,20 +130,11 @@ import {
operationTypes,
procedureStepType
} from "~/modules/shared";
-
import type { action as editJobOperationParameterAction } from "~/routes/x+/job+/methods+/operation.parameter.$id";
import type { action as newJobOperationParameterAction } from "~/routes/x+/job+/methods+/operation.parameter.new";
import type { action as editJobOperationStepAction } from "~/routes/x+/job+/methods+/operation.step.$id";
import type { action as editJobOperationToolAction } from "~/routes/x+/job+/methods+/operation.tool.$id";
import type { action as newJobOperationToolAction } from "~/routes/x+/job+/methods+/operation.tool.new";
-
-import { useNumberFormatter } from "@react-aria/i18n";
-import Procedure from "~/components/Form/Procedure";
-import { SupplierProcessPreview } from "~/components/Form/SupplierProcess";
-import UnitOfMeasure, {
- useUnitOfMeasure
-} from "~/components/Form/UnitOfMeasure";
-import { ProcedureStepTypeIcon } from "~/components/Icons";
import { useItems, usePeople, useTools } from "~/stores";
import { getPrivateUrl, path } from "~/utils/path";
import {
@@ -1370,7 +1368,6 @@ function StepsListItem({
disclosure.onClose();
submitted.current = false;
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
const [type, setType] = useState<OperationStep["type"]>(attribute.type);
@@ -1880,7 +1877,6 @@ function ParametersListItem({
disclosure.onClose();
submitted.current = false;
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
const isUpdated = updatedBy !== null;
@@ -2906,7 +2902,6 @@ function ToolsListItem({
disclosure.onClose();
submitted.current = false;
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
const tools = useTools();
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBoMExplorer.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBoMExplorer.tsx
index 84b67d76ca..1a897289c0 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobBoMExplorer.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobBoMExplorer.tsx
@@ -1,22 +1,22 @@
import {
Badge,
+ cn,
Copy,
DropdownMenu,
DropdownMenuContent,
DropdownMenuIcon,
DropdownMenuItem,
DropdownMenuTrigger,
- HStack,
HoverCard,
HoverCardContent,
HoverCardTrigger,
+ HStack,
IconButton,
Input,
InputGroup,
InputLeftElement,
Spinner,
- VStack,
- cn
+ VStack
} from "@carbon/react";
import { Link, useFetchers, useNavigate, useParams } from "@remix-run/react";
import { useEffect, useRef, useState } from "react";
@@ -105,7 +105,6 @@ const JobBoMExplorer = ({ method }: JobBoMExplorerProps) => {
selectNode(node.id);
}
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedMaterialId, methodId]);
return (
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobDocuments.tsx b/apps/erp/app/modules/production/ui/Jobs/JobDocuments.tsx
index ec12efe044..1db2c74f03 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobDocuments.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobDocuments.tsx
@@ -1,3 +1,4 @@
+import { useCarbon } from "@carbon/auth";
import {
Card,
CardAction,
@@ -22,26 +23,24 @@ import {
Td,
Th,
Thead,
+ toast,
Tr,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { convertKbToString } from "@carbon/utils";
import { Link, useFetchers, useRevalidator, useSubmit } from "@remix-run/react";
import type { FileObject } from "@supabase/storage-js";
import type { ChangeEvent } from "react";
+import { useCallback } from "react";
import { LuEllipsisVertical, LuUpload } from "react-icons/lu";
import { DocumentPreview, FileDropzone, Hyperlink } from "~/components";
import DocumentIcon from "~/components/DocumentIcon";
-import { usePermissions, useUser } from "~/hooks";
-import { getDocumentType } from "~/modules/shared";
-import { path } from "~/utils/path";
-
-import { useCarbon } from "@carbon/auth";
-import { useCallback } from "react";
import { Enumerable } from "~/components/Enumerable";
+import { usePermissions, useUser } from "~/hooks";
import type { OptimisticFileObject } from "~/modules/shared";
+import { getDocumentType } from "~/modules/shared";
import type { ModelUpload } from "~/types";
+import { path } from "~/utils/path";
import { stripSpecialCharacters } from "~/utils/string";
const useJobDocuments = ({
@@ -129,7 +128,7 @@ const useJobDocuments = ({
console.error(error);
}
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
@@ -155,7 +154,7 @@ const useJobDocuments = ({
console.error(error);
}
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobEstimatesVsActuals.tsx b/apps/erp/app/modules/production/ui/Jobs/JobEstimatesVsActuals.tsx
index 481e62f090..e955799d5d 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobEstimatesVsActuals.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobEstimatesVsActuals.tsx
@@ -1,3 +1,4 @@
+import { useCarbon } from "@carbon/auth";
import type { Database } from "@carbon/database";
import {
Card,
@@ -31,11 +32,6 @@ import {
useDisclosure,
VStack
} from "@carbon/react";
-import { Link, useParams } from "@remix-run/react";
-import type { z } from "zod/v3";
-import { MethodIcon, TimeTypeIcon } from "~/components/Icons";
-
-import { useCarbon } from "@carbon/auth";
import { formatDurationMilliseconds, getItemReadableId } from "@carbon/utils";
import {
getLocalTimeZone,
@@ -43,9 +39,12 @@ import {
parseAbsolute,
toZoned
} from "@internationalized/date";
+import { Link, useParams } from "@remix-run/react";
import { useEffect, useState } from "react";
import { LuCircleChevronRight, LuNotebook } from "react-icons/lu";
+import type { z } from "zod/v3";
import { EmployeeAvatar, EmployeeAvatarGroup } from "~/components";
+import { MethodIcon, TimeTypeIcon } from "~/components/Icons";
import { useCurrencyFormatter, usePercentFormatter, useUser } from "~/hooks";
import { useItems } from "~/stores";
import { makeDurations } from "~/utils/duration";
@@ -132,7 +131,6 @@ const JobEstimatesVsActuals = ({
useEffect(() => {
getCurrentUnitCosts(materials.map((m) => m.itemId));
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [materials]);
const getEstimatedTime = (operation: Operation) => {
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx b/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx
index acee7ec21d..8d1b208a89 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobMaterialsTable.tsx
@@ -352,7 +352,6 @@ const JobMaterialsTable = memo(({ data, count }: JobMaterialsTableProps) => {
}
}
];
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
items,
jobId,
@@ -363,7 +362,6 @@ const JobMaterialsTable = memo(({ data, count }: JobMaterialsTableProps) => {
]);
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: JobMaterial) => {
// Skip non-inventory items and make items
if (
@@ -517,7 +515,6 @@ const StockTransferSessionWidget = ({ jobId }: { jobId: string }) => {
if (fetcher.data?.success) {
onClearAll();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data?.success]);
if (sessionItemsCount === 0) {
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobOperationsTable.tsx b/apps/erp/app/modules/production/ui/Jobs/JobOperationsTable.tsx
index 36c7a5d196..c25445f4cd 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobOperationsTable.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobOperationsTable.tsx
@@ -229,7 +229,6 @@ const JobOperationsTable = memo(({ data, count }: JobOperationsTableProps) => {
}
return item;
});
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [pendingItems.length]);
return (
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsx b/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsx
index da771bc526..b57b4b889d 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsx
@@ -1,31 +1,28 @@
+import type { Json } from "@carbon/database";
+import {
+ DatePicker,
+ InputControlled,
+ NumberControlled,
+ Select,
+ ValidatedForm
+} from "@carbon/form";
import {
Badge,
Button,
HStack,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { Await, useFetcher, useParams } from "@remix-run/react";
+import type { PostgrestResponse } from "@supabase/supabase-js";
import { Suspense, useCallback, useEffect, useState } from "react";
import { LuCopy, LuLink, LuUnlink2 } from "react-icons/lu";
-import { usePermissions, useRouteData } from "~/hooks";
-import type { action } from "~/routes/x+/items+/update";
-
-import type { Json } from "@carbon/database";
-import {
- DatePicker,
- InputControlled,
- NumberControlled,
- Select,
- ValidatedForm
-} from "@carbon/form";
-import type { PostgrestResponse } from "@supabase/supabase-js";
import { RiProgress8Line } from "react-icons/ri";
-import { z } from "zod/v3";
import { zfd } from "zod-form-data";
+import { z } from "zod/v3";
import { Assignee, Hyperlink, useOptimisticAssignment } from "~/components";
import {
Customer,
@@ -36,8 +33,10 @@ import {
UnitOfMeasure
} from "~/components/Form";
import CustomFormInlineFields from "~/components/Form/CustomFormInlineFields";
+import { usePermissions, useRouteData } from "~/hooks";
import type { TrackedEntity } from "~/modules/inventory/types";
import type { MethodItemType } from "~/modules/shared";
+import type { action } from "~/routes/x+/items+/update";
import { path } from "~/utils/path";
import { copyToClipboard } from "~/utils/string";
import { deadlineTypes } from "../../production.models";
@@ -80,7 +79,7 @@ const JobProperties = () => {
action: path.to.bulkUpdateJob
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[jobId, routeData?.job]
);
@@ -97,7 +96,7 @@ const JobProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[jobId]
);
@@ -116,7 +115,7 @@ const JobProperties = () => {
action: path.to.tags
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[jobId]
);
@@ -136,7 +135,7 @@ const JobProperties = () => {
action: path.to.jobBatchNumber(jobId)
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobsTable.tsx b/apps/erp/app/modules/production/ui/Jobs/JobsTable.tsx
index f04d9dc421..176a0702b6 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobsTable.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobsTable.tsx
@@ -131,7 +131,6 @@ function useReadableTrackedEntities(data: Job[], companyId: string) {
}, []),
companyId
);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [data]);
return trackedEntities;
@@ -568,7 +567,6 @@ const JobsTable = memo(({ data, count, tags }: JobsTableProps) => {
}
];
return [...defaultColumns, ...customColumns];
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [params, customColumns, trackedEntities]);
const fetcher = useFetcher<typeof action>();
@@ -591,7 +589,7 @@ const JobsTable = memo(({ data, count, tags }: JobsTableProps) => {
action: path.to.bulkUpdateJob
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
@@ -650,7 +648,7 @@ const JobsTable = memo(({ data, count, tags }: JobsTableProps) => {
</MenuItem>
</>
),
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[navigate, params, permissions]
);
diff --git a/apps/erp/app/modules/production/ui/Jobs/ProductionEventsTable.tsx b/apps/erp/app/modules/production/ui/Jobs/ProductionEventsTable.tsx
index 0267239c94..1bad73bfc0 100644
--- a/apps/erp/app/modules/production/ui/Jobs/ProductionEventsTable.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/ProductionEventsTable.tsx
@@ -210,7 +210,7 @@ const ProductionEventsTable = memo(
</MenuItem>
</>
),
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[permissions]
);
const [params] = useUrlParams();
diff --git a/apps/erp/app/modules/production/ui/Jobs/ProductionQuantitiesTable.tsx b/apps/erp/app/modules/production/ui/Jobs/ProductionQuantitiesTable.tsx
index a34660f56a..4448b81e71 100644
--- a/apps/erp/app/modules/production/ui/Jobs/ProductionQuantitiesTable.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/ProductionQuantitiesTable.tsx
@@ -188,7 +188,6 @@ const ProductionQuantitiesTable = memo(
</>
),
- // eslint-disable-next-line react-hooks/exhaustive-deps
[permissions]
);
diff --git a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningOrderDrawer.tsx b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningOrderDrawer.tsx
index e36654da0d..27ac4c12c6 100644
--- a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningOrderDrawer.tsx
+++ b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningOrderDrawer.tsx
@@ -247,7 +247,6 @@ export const ProductionPlanningOrderDrawer = memo(
setOrders(row, []);
onClose();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data?.success]);
// Memoize drawer content
diff --git a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
index 48d43787b0..5d136a0ef8 100644
--- a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
+++ b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
@@ -105,7 +105,6 @@ const ProductionPlanningTable = ({
if (bulkUpdateFetcher.data?.success === true) {
toast.success("Orders submitted");
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [bulkUpdateFetcher.data?.success]);
const isDisabled =
@@ -167,7 +166,7 @@ const ProductionPlanningTable = ({
encType: "application/json"
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[bulkUpdateFetcher, locationId, ordersMap]
);
@@ -202,7 +201,6 @@ const ProductionPlanningTable = ({
});
setOrdersByItemId(ordersByItemId);
});
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [data]);
const columns = useMemo<ColumnDef<ProductionPlanningItem>[]>(() => {
@@ -393,7 +391,6 @@ const ProductionPlanningTable = ({
}
}
];
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
dateFormatter,
numberFormatter,
diff --git a/apps/erp/app/modules/production/ui/Procedures/ProcedureHeader.tsx b/apps/erp/app/modules/production/ui/Procedures/ProcedureHeader.tsx
index 72758a03fd..02d6c796b9 100644
--- a/apps/erp/app/modules/production/ui/Procedures/ProcedureHeader.tsx
+++ b/apps/erp/app/modules/production/ui/Procedures/ProcedureHeader.tsx
@@ -9,11 +9,11 @@ import {
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
- HStack,
Heading,
+ HStack,
IconButton,
- VStack,
- useDisclosure
+ useDisclosure,
+ VStack
} from "@carbon/react";
import { Await, Link, useParams } from "@remix-run/react";
@@ -52,7 +52,6 @@ const ProcedureHeader = () => {
useEffect(() => {
newVersionDisclosure.onClose();
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [id]);
return (
diff --git a/apps/erp/app/modules/production/ui/Procedures/ProcedureProperties.tsx b/apps/erp/app/modules/production/ui/Procedures/ProcedureProperties.tsx
index 7dab543ed3..5c9b8d8613 100644
--- a/apps/erp/app/modules/production/ui/Procedures/ProcedureProperties.tsx
+++ b/apps/erp/app/modules/production/ui/Procedures/ProcedureProperties.tsx
@@ -2,26 +2,26 @@ import { Select, ValidatedForm } from "@carbon/form";
import {
Button,
HStack,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect } from "react";
import { LuCopy, LuKeySquare, LuLink } from "react-icons/lu";
import { z } from "zod/v3";
+import Assignee, { useOptimisticAssignment } from "~/components/Assignee";
import { Process, Tags } from "~/components/Form";
import { usePermissions, useRouteData } from "~/hooks";
+import { useTags } from "~/hooks/useTags";
import type { action } from "~/routes/x+/items+/update";
import { path } from "~/utils/path";
import { copyToClipboard } from "~/utils/string";
+import { procedureStatus } from "../../production.models";
import type { Procedure } from "../../types";
import ProcedureStatus from "./ProcedureStatus";
-import { procedureStatus } from "../../production.models";
-import Assignee, { useOptimisticAssignment } from "~/components/Assignee";
-import { useTags } from "~/hooks/useTags";
const ProcedureProperties = () => {
const { id } = useParams();
@@ -52,7 +52,7 @@ const ProcedureProperties = () => {
action: path.to.bulkUpdateProcedure
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[id]
);
diff --git a/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningOrderDrawer.tsx b/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningOrderDrawer.tsx
index 439d913104..5713864f5b 100644
--- a/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningOrderDrawer.tsx
+++ b/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningOrderDrawer.tsx
@@ -180,7 +180,6 @@ export const PurchasingPlanningOrderDrawer = memo(
if (selectedItem.id) {
getExistingOrders();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedSupplier]);
const onAddOrder = useCallback(() => {
@@ -293,7 +292,6 @@ export const PurchasingPlanningOrderDrawer = memo(
setOrders(selectedItem, []);
onClose();
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data?.success]);
const supplierDisclosure = useDisclosure();
diff --git a/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx b/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx
index e51fc76afd..93865854da 100644
--- a/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx
+++ b/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx
@@ -184,7 +184,7 @@ const PlanningTable = memo(
encType: "application/json"
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[bulkUpdateFetcher, locationId, ordersMap, suppliersMap]
);
@@ -224,7 +224,6 @@ const PlanningTable = memo(
});
setOrdersByItemId(ordersByItemId);
});
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [data]);
const columns = useMemo<ColumnDef<PurchasingPlanningItem>[]>(() => {
@@ -453,7 +452,6 @@ const PlanningTable = memo(
}
}
];
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
suppliers,
dateFormatter,
diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm.tsx
index 3db9a15c50..b490b5091f 100644
--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm.tsx
+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderLineForm.tsx
@@ -1,3 +1,5 @@
+import { useCarbon } from "@carbon/auth";
+import { Combobox, ValidatedForm } from "@carbon/form";
import {
Badge,
cn,
@@ -16,9 +18,6 @@ import {
useMount,
VStack
} from "@carbon/react";
-
-import { useCarbon } from "@carbon/auth";
-import { Combobox, ValidatedForm } from "@carbon/form";
import { getItemReadableId } from "@carbon/utils";
import { useFetcher, useParams } from "@remix-run/react";
import type { PostgrestResponse } from "@supabase/supabase-js";
@@ -596,7 +595,6 @@ function JobOperationSelect(initialValues: { jobId?: string }) {
if (jobId) {
jobOperationFetcher.load(path.to.api.outsideOperations(jobId));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [jobId]);
const jobOperationOptions = useMemo(() => {
@@ -606,7 +604,6 @@ function JobOperationSelect(initialValues: { jobId?: string }) {
label: c.description
})) ?? []
);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [jobOperationFetcher.data]);
return (
diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderProperties.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderProperties.tsx
index 24155fee47..79a649f5fb 100644
--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderProperties.tsx
+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderProperties.tsx
@@ -5,11 +5,11 @@ import {
Button,
HStack,
IconButton,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { useLocale } from "@react-aria/i18n";
import { Link, useFetcher, useParams } from "@remix-run/react";
@@ -22,8 +22,8 @@ import {
LuLink,
LuRefreshCcw
} from "react-icons/lu";
-import { z } from "zod/v3";
import { zfd } from "zod-form-data";
+import { z } from "zod/v3";
import { Assignee, Hyperlink, useOptimisticAssignment } from "~/components";
import {
Currency,
@@ -83,7 +83,7 @@ const PurchaseOrderProperties = () => {
action: path.to.bulkUpdatePurchaseOrder
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[orderId, routeData?.purchaseOrder]
);
@@ -100,7 +100,7 @@ const PurchaseOrderProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[orderId]
);
diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsx
index fffdcef7d4..46c744e0e1 100644
--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsx
+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsx
@@ -351,7 +351,7 @@ const PurchaseOrdersTable = memo(
action: path.to.bulkUpdatePurchaseOrder
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
diff --git a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierHeader.tsx b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierHeader.tsx
index df2a319f2c..21863544d4 100644
--- a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierHeader.tsx
+++ b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierHeader.tsx
@@ -4,8 +4,8 @@ import {
CardAction,
CardAttribute,
CardAttributeLabel,
- CardAttributeValue,
CardAttributes,
+ CardAttributeValue,
CardContent,
CardHeader,
CardTitle,
@@ -64,7 +64,7 @@ const SupplierHeader = () => {
action: path.to.tags
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[supplierId]
);
diff --git a/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsx b/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsx
index 11205c1800..dbe95b59f2 100644
--- a/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsx
+++ b/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsx
@@ -257,7 +257,6 @@ const SuppliersTable = memo(
}, [supplierStatuses, supplierTypes, people, tags, customColumns]);
const renderContextMenu = useMemo(
- // eslint-disable-next-line react/display-name
() => (row: Supplier) => (
<MenuItem onClick={() => navigate(path.to.supplier(row.id!))}>
<MenuIcon icon={<LuPencil />} />
diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteProperties.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteProperties.tsx
index 33ef711381..6552351fec 100644
--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteProperties.tsx
+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteProperties.tsx
@@ -4,18 +4,18 @@ import {
Button,
HStack,
IconButton,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { useLocale } from "@react-aria/i18n";
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect, useMemo } from "react";
import { LuCopy, LuInfo, LuLink, LuRefreshCcw } from "react-icons/lu";
-import { z } from "zod/v3";
import { zfd } from "zod-form-data";
+import { z } from "zod/v3";
import { Assignee, useOptimisticAssignment } from "~/components";
import {
Currency,
@@ -73,7 +73,7 @@ const SupplierQuoteProperties = () => {
action: path.to.bulkUpdateSupplierQuote
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[id, routeData?.quote]
);
@@ -90,7 +90,7 @@ const SupplierQuoteProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[id]
);
diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuotesTable.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuotesTable.tsx
index 70a09e5f05..7cc2e9a44a 100644
--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuotesTable.tsx
+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuotesTable.tsx
@@ -212,7 +212,6 @@ const SupplierQuotesTable = memo(
}, [suppliers, people, customColumns]);
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: SupplierQuote) => (
<>
<MenuItem
diff --git a/apps/erp/app/modules/quality/ui/Calibrations/GaugeCalibrationRecordForm.tsx b/apps/erp/app/modules/quality/ui/Calibrations/GaugeCalibrationRecordForm.tsx
index df5b16c826..aa15e78644 100644
--- a/apps/erp/app/modules/quality/ui/Calibrations/GaugeCalibrationRecordForm.tsx
+++ b/apps/erp/app/modules/quality/ui/Calibrations/GaugeCalibrationRecordForm.tsx
@@ -109,7 +109,6 @@ const GaugeCalibrationRecordForm = ({
if (initialValues.gaugeId) {
onGaugeSelected(initialValues.gaugeId);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [initialValues.gaugeId]);
const onGaugeSelected = async (gaugeId: string) => {
diff --git a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentHeader.tsx b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentHeader.tsx
index bb89265f48..fc14cf5290 100644
--- a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentHeader.tsx
+++ b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentHeader.tsx
@@ -9,11 +9,11 @@ import {
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
- HStack,
Heading,
+ HStack,
IconButton,
- VStack,
- useDisclosure
+ useDisclosure,
+ VStack
} from "@carbon/react";
import { Await, Link, useParams } from "@remix-run/react";
@@ -52,7 +52,6 @@ const QualityDocumentHeader = () => {
useEffect(() => {
newVersionDisclosure.onClose();
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [id]);
return (
diff --git a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentProperties.tsx b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentProperties.tsx
index f8fec5bfba..d9de7d4cc7 100644
--- a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentProperties.tsx
+++ b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentProperties.tsx
@@ -2,26 +2,26 @@ import { Select, ValidatedForm } from "@carbon/form";
import {
Button,
HStack,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect } from "react";
import { LuCopy, LuKeySquare, LuLink } from "react-icons/lu";
import { z } from "zod/v3";
import Assignee, { useOptimisticAssignment } from "~/components/Assignee";
+import { Tags } from "~/components/Form";
import { usePermissions, useRouteData } from "~/hooks";
+import { useTags } from "~/hooks/useTags";
import type { action } from "~/routes/x+/items+/update";
import { path } from "~/utils/path";
import { copyToClipboard } from "~/utils/string";
import { qualityDocumentStatus } from "../../quality.models";
import type { QualityDocument } from "../../types";
import QualityDocumentStatus from "./QualityDocumentStatus";
-import { Tags } from "~/components/Form";
-import { useTags } from "~/hooks/useTags";
const QualityDocumentProperties = () => {
const { id } = useParams();
@@ -52,7 +52,7 @@ const QualityDocumentProperties = () => {
action: path.to.bulkUpdateQualityDocument
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[id]
);
diff --git a/apps/erp/app/modules/quality/ui/Issue/IssueProperties.tsx b/apps/erp/app/modules/quality/ui/Issue/IssueProperties.tsx
index fc3ac70f08..a4bc49e24d 100644
--- a/apps/erp/app/modules/quality/ui/Issue/IssueProperties.tsx
+++ b/apps/erp/app/modules/quality/ui/Issue/IssueProperties.tsx
@@ -9,11 +9,11 @@ import {
import {
Button,
HStack,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect } from "react";
@@ -104,7 +104,7 @@ const IssueProperties = () => {
action: path.to.bulkUpdateIssue
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[id]
);
@@ -123,7 +123,7 @@ const IssueProperties = () => {
action: path.to.tags
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[id]
);
@@ -140,7 +140,7 @@ const IssueProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[id]
);
diff --git a/apps/erp/app/modules/quality/ui/Issue/Linear/CreateIssue.tsx b/apps/erp/app/modules/quality/ui/Issue/Linear/CreateIssue.tsx
index ebb066729f..51eb21a9f1 100644
--- a/apps/erp/app/modules/quality/ui/Issue/Linear/CreateIssue.tsx
+++ b/apps/erp/app/modules/quality/ui/Issue/Linear/CreateIssue.tsx
@@ -106,7 +106,6 @@ const useLinearTeams = (teamId?: string) => {
fetcher.load(
path.to.api.linearCreateIssue + (teamId ? `?teamId=${teamId}` : "")
);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [teamId]);
return {
diff --git a/apps/erp/app/modules/quality/ui/Issue/ReviewersList.tsx b/apps/erp/app/modules/quality/ui/Issue/ReviewersList.tsx
index 09f162117a..ed8ac2d4b9 100644
--- a/apps/erp/app/modules/quality/ui/Issue/ReviewersList.tsx
+++ b/apps/erp/app/modules/quality/ui/Issue/ReviewersList.tsx
@@ -44,7 +44,6 @@ export function ReviewersList({
disclosure.onClose();
submitted.current = false;
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data?.success]);
if (reviewers.length === 0) {
diff --git a/apps/erp/app/modules/resources/ui/Training/TrainingProperties.tsx b/apps/erp/app/modules/resources/ui/Training/TrainingProperties.tsx
index 76184eada7..ab75fb401f 100644
--- a/apps/erp/app/modules/resources/ui/Training/TrainingProperties.tsx
+++ b/apps/erp/app/modules/resources/ui/Training/TrainingProperties.tsx
@@ -3,11 +3,11 @@ import {
Badge,
Button,
HStack,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect } from "react";
@@ -18,10 +18,10 @@ import { InputControlled, Tags } from "~/components/Form";
import { usePermissions, useRouteData } from "~/hooks";
import { useTags } from "~/hooks/useTags";
import {
+ type Training,
trainingFrequency,
trainingStatus,
- trainingType,
- type Training
+ trainingType
} from "~/modules/resources";
import type { action } from "~/routes/x+/items+/update";
import { path } from "~/utils/path";
@@ -66,7 +66,7 @@ const TrainingProperties = () => {
action: path.to.bulkUpdateTraining
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[id]
);
diff --git a/apps/erp/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsx b/apps/erp/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsx
index 99fb9455c8..6409dfad81 100644
--- a/apps/erp/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsx
+++ b/apps/erp/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsx
@@ -263,7 +263,6 @@ const WorkCentersTable = memo(
}
];
return [...defaultColumns, ...customColumns];
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [params, customColumns]);
const renderContextMenu = useCallback<(row: WorkCenter) => JSX.Element>(
@@ -297,7 +296,7 @@ const WorkCentersTable = memo(
)}
</>
),
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[navigate, params, permissions]
);
diff --git a/apps/erp/app/modules/sales/ui/Customer/CustomerHeader.tsx b/apps/erp/app/modules/sales/ui/Customer/CustomerHeader.tsx
index c2d5cb28f6..3f2278ac16 100644
--- a/apps/erp/app/modules/sales/ui/Customer/CustomerHeader.tsx
+++ b/apps/erp/app/modules/sales/ui/Customer/CustomerHeader.tsx
@@ -4,8 +4,8 @@ import {
CardAction,
CardAttribute,
CardAttributeLabel,
- CardAttributeValue,
CardAttributes,
+ CardAttributeValue,
CardContent,
CardHeader,
CardTitle,
@@ -19,11 +19,11 @@ import { z } from "zod/v3";
import { EmployeeAvatar } from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { Tags } from "~/components/Form";
+import { useCustomerTypes } from "~/components/Form/CustomerType";
import { useRouteData } from "~/hooks";
import type { action } from "~/routes/x+/settings+/tags";
import { path } from "~/utils/path";
import type { CustomerDetail, CustomerStatus } from "../../types";
-import { useCustomerTypes } from "~/components/Form/CustomerType";
const CustomerHeader = () => {
const { customerId } = useParams();
@@ -63,7 +63,7 @@ const CustomerHeader = () => {
action: path.to.tags
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[customerId]
);
diff --git a/apps/erp/app/modules/sales/ui/Customers/CustomersTable.tsx b/apps/erp/app/modules/sales/ui/Customers/CustomersTable.tsx
index 85b7ac3e35..9e7d29dcbf 100644
--- a/apps/erp/app/modules/sales/ui/Customers/CustomersTable.tsx
+++ b/apps/erp/app/modules/sales/ui/Customers/CustomersTable.tsx
@@ -31,13 +31,13 @@ import {
Table
} from "~/components";
import { Enumerable } from "~/components/Enumerable";
+import { useCustomerTypes } from "~/components/Form/CustomerType";
import { ConfirmDelete } from "~/components/Modals";
import { usePermissions } from "~/hooks";
import { useCustomColumns } from "~/hooks/useCustomColumns";
import { usePeople } from "~/stores";
import { path } from "~/utils/path";
import type { Customer, CustomerStatus } from "../../types";
-import { useCustomerTypes } from "~/components/Form/CustomerType";
type CustomersTableProps = {
data: Customer[];
@@ -240,7 +240,6 @@ const CustomersTable = memo(
}, [customerStatuses, customerTypes, people, customColumns, tags]);
const renderContextMenu = useMemo(
- // eslint-disable-next-line react/display-name
() => (row: Customer) => (
<>
<MenuItem onClick={() => navigate(path.to.customer(row.id!))}>
diff --git a/apps/erp/app/modules/sales/ui/Opportunity/OpportunityLineDocuments.tsx b/apps/erp/app/modules/sales/ui/Opportunity/OpportunityLineDocuments.tsx
index a4e9401ea6..2b9ec2e9ce 100644
--- a/apps/erp/app/modules/sales/ui/Opportunity/OpportunityLineDocuments.tsx
+++ b/apps/erp/app/modules/sales/ui/Opportunity/OpportunityLineDocuments.tsx
@@ -1,3 +1,4 @@
+import { useCarbon } from "@carbon/auth";
import {
Card,
CardAction,
@@ -22,26 +23,24 @@ import {
Td,
Th,
Thead,
+ toast,
Tr,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { convertKbToString } from "@carbon/utils";
import { Link, useFetchers, useRevalidator, useSubmit } from "@remix-run/react";
import type { FileObject } from "@supabase/storage-js";
import type { ChangeEvent } from "react";
+import { useCallback } from "react";
import { LuEllipsisVertical, LuUpload } from "react-icons/lu";
import { DocumentPreview, FileDropzone, Hyperlink } from "~/components";
import DocumentIcon from "~/components/DocumentIcon";
-import { usePermissions, useUser } from "~/hooks";
-import { getDocumentType } from "~/modules/shared";
-import { path } from "~/utils/path";
-
-import { useCarbon } from "@carbon/auth";
-import { useCallback } from "react";
import { Enumerable } from "~/components/Enumerable";
+import { usePermissions, useUser } from "~/hooks";
import type { OptimisticFileObject } from "~/modules/shared";
+import { getDocumentType } from "~/modules/shared";
import type { ModelUpload } from "~/types";
+import { path } from "~/utils/path";
import { stripSpecialCharacters } from "~/utils/string";
const useOpportunityLineDocuments = ({
@@ -177,7 +176,7 @@ const useOpportunityLineDocuments = ({
console.error(error);
}
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
@@ -203,7 +202,7 @@ const useOpportunityLineDocuments = ({
console.error(error);
}
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[]
);
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx
index b39e2fe330..731d6c256c 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx
@@ -76,8 +76,13 @@ import {
UnitHint,
WorkCenter
} from "~/components/Form";
-
+import Procedure from "~/components/Form/Procedure";
+import { SupplierProcessPreview } from "~/components/Form/SupplierProcess";
import { getUnitHint } from "~/components/Form/UnitHint";
+import UnitOfMeasure, {
+ useUnitOfMeasure
+} from "~/components/Form/UnitOfMeasure";
+import { ProcedureStepTypeIcon } from "~/components/Icons";
import { ConfirmDelete } from "~/components/Modals";
import type { Item, SortableItemRenderProps } from "~/components/SortableList";
import { SortableList, SortableListItem } from "~/components/SortableList";
@@ -95,19 +100,11 @@ import {
operationTypes,
procedureStepType
} from "~/modules/shared";
-
import type { action as editQuoteOperationParameterAction } from "~/routes/x+/quote+/methods+/operation.parameter.$id";
import type { action as newQuoteOperationParameterAction } from "~/routes/x+/quote+/methods+/operation.parameter.new";
import type { action as editQuoteOperationStepAction } from "~/routes/x+/quote+/methods+/operation.step.$id";
import type { action as editQuoteOperationToolAction } from "~/routes/x+/quote+/methods+/operation.tool.$id";
import type { action as newQuoteOperationToolAction } from "~/routes/x+/quote+/methods+/operation.tool.new";
-
-import Procedure from "~/components/Form/Procedure";
-import { SupplierProcessPreview } from "~/components/Form/SupplierProcess";
-import UnitOfMeasure, {
- useUnitOfMeasure
-} from "~/components/Form/UnitOfMeasure";
-import { ProcedureStepTypeIcon } from "~/components/Icons";
import { useItems, useTools } from "~/stores";
import { getPrivateUrl, path } from "~/utils/path";
import { quoteOperationValidator } from "../../sales.models";
@@ -1171,7 +1168,6 @@ function AttributesListItem({
disclosure.onClose();
submitted.current = false;
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
const [type, setType] = useState<OperationStep["type"]>(attribute.type);
@@ -1565,7 +1561,6 @@ function ParametersListItem({
disclosure.onClose();
submitted.current = false;
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
const isUpdated = updatedBy !== null;
@@ -2438,7 +2433,6 @@ function ToolsListItem({
disclosure.onClose();
submitted.current = false;
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
const tools = useTools();
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBoMExplorer.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBoMExplorer.tsx
index c439550749..340b27c562 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBoMExplorer.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBoMExplorer.tsx
@@ -1,17 +1,17 @@
import {
Badge,
+ cn,
Copy,
- HStack,
HoverCard,
HoverCardContent,
HoverCardTrigger,
+ HStack,
IconButton,
Input,
InputGroup,
InputLeftElement,
Spinner,
- VStack,
- cn
+ VStack
} from "@carbon/react";
import { Link, useFetchers, useNavigate, useParams } from "@remix-run/react";
import { useEffect, useRef, useState } from "react";
@@ -105,7 +105,6 @@ const QuoteBoMExplorer = ({
);
if (node?.id) selectNode(node?.id);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedMaterialId, params.methodId]);
return (
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteHeader.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteHeader.tsx
index 69a4c9a643..1467ca2f35 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteHeader.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteHeader.tsx
@@ -6,8 +6,8 @@ import {
DropdownMenuIcon,
DropdownMenuItem,
DropdownMenuTrigger,
- HStack,
Heading,
+ HStack,
IconButton,
Input,
InputGroup,
@@ -19,14 +19,15 @@ import {
ModalFooter,
ModalHeader,
ModalTitle,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- toast,
useDisclosure
} from "@carbon/react";
import { Link, useFetcher, useParams } from "@remix-run/react";
+import { useEffect, useState } from "react";
import {
LuCheck,
LuCheckCheck,
@@ -48,8 +49,6 @@ import {
} from "react-icons/lu";
import { usePanels } from "~/components/Layout";
import ConfirmDelete from "~/components/Modals/ConfirmDelete";
-
-import { useEffect, useState } from "react";
import { usePermissions, useRouteData } from "~/hooks";
import { path } from "~/utils/path";
import type {
@@ -428,7 +427,6 @@ function CreateRevisionModal({
);
setNewQuoteId(fetcher.data?.data.newQuoteId ?? null);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data?.success]);
if (!quote) return null;
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteLineMethodForm.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteLineMethodForm.tsx
index 18f2a4b92a..c1ba49193d 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteLineMethodForm.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteLineMethodForm.tsx
@@ -27,7 +27,6 @@ export function QuoteLineMethodForm() {
if (quote) {
quoteLineFetcher.load(path.to.api.quoteLines(quote));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [quote]);
const quoteOptions = useMemo(
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteProperties.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteProperties.tsx
index a05cd61211..34cec12cbf 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteProperties.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteProperties.tsx
@@ -4,18 +4,18 @@ import {
Button,
HStack,
IconButton,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { useLocale } from "@react-aria/i18n";
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect, useMemo } from "react";
import { LuCopy, LuInfo, LuLink, LuRefreshCcw } from "react-icons/lu";
-import { z } from "zod/v3";
import { zfd } from "zod-form-data";
+import { z } from "zod/v3";
import { Assignee, useOptimisticAssignment } from "~/components";
import {
Currency,
@@ -75,7 +75,7 @@ const QuoteProperties = () => {
action: path.to.bulkUpdateQuote
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[quoteId, routeData?.quote]
);
@@ -92,7 +92,7 @@ const QuoteProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[quoteId]
);
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx
index bdee8dbbaf..cfc49bd92e 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx
@@ -5,8 +5,8 @@ import {
CardDescription,
CardHeader,
CardTitle,
- HStack,
Heading,
+ HStack,
RadioGroup,
RadioGroupItem,
Table,
@@ -96,7 +96,6 @@ const LineItems = ({
setOpenItems((prev) => prev.filter((item) => item !== lineId));
}
});
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedLines]);
const pricingByLine = useMemo(
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuotesTable.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuotesTable.tsx
index 7a5c9417ce..cad45453bf 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuotesTable.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuotesTable.tsx
@@ -276,7 +276,6 @@ const QuotesTable = memo(({ data, count }: QuotesTableProps) => {
}, [customers, people, customColumns]);
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: Quotation) => (
<>
<MenuItem onClick={() => navigate(path.to.quoteDetails(row.id!))}>
diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderHeader.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderHeader.tsx
index 03ecd72a9e..a67a8ecfcb 100644
--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderHeader.tsx
+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderHeader.tsx
@@ -1,3 +1,4 @@
+import { SelectControlled, ValidatedForm } from "@carbon/form";
import {
Button,
Copy,
@@ -7,8 +8,8 @@ import {
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
- HStack,
Heading,
+ HStack,
IconButton,
Modal,
ModalBody,
@@ -17,13 +18,14 @@ import {
ModalFooter,
ModalHeader,
ModalTitle,
- VStack,
toast,
- useDisclosure
+ useDisclosure,
+ VStack
} from "@carbon/react";
-
import type { FetcherWithComponents } from "@remix-run/react";
import { Await, Link, useFetcher, useParams } from "@remix-run/react";
+import { Suspense, useEffect, useMemo, useState } from "react";
+import { CSVLink } from "react-csv";
import {
LuCheckCheck,
LuChevronDown,
@@ -40,28 +42,23 @@ import {
LuTrash,
LuTruck
} from "react-icons/lu";
-
+import { CustomerContact } from "~/components/Form";
import { usePanels } from "~/components/Layout";
+import Confirm from "~/components/Modals/Confirm/Confirm";
import ConfirmDelete from "~/components/Modals/ConfirmDelete";
import { usePermissions, useRouteData } from "~/hooks";
-import type { action as confirmAction } from "~/routes/x+/sales-order+/$orderId.confirm";
-import type { action as statusAction } from "~/routes/x+/sales-order+/$orderId.status";
-import { path } from "~/utils/path";
-import type { Opportunity, SalesOrder, SalesOrderLine } from "../../types";
-
-import { SelectControlled, ValidatedForm } from "@carbon/form";
-import { Suspense, useEffect, useMemo, useState } from "react";
-import { CSVLink } from "react-csv";
-import { CustomerContact } from "~/components/Form";
-import Confirm from "~/components/Modals/Confirm/Confirm";
import { useIntegrations } from "~/hooks/useIntegrations";
import type { Shipment } from "~/modules/inventory/types";
import { ShipmentStatus } from "~/modules/inventory/ui/Shipments";
import type { SalesInvoice } from "~/modules/invoicing/types";
import SalesInvoiceStatus from "~/modules/invoicing/ui/SalesInvoice/SalesInvoiceStatus";
import type { Job } from "~/modules/production/types";
+import type { action as confirmAction } from "~/routes/x+/sales-order+/$orderId.confirm";
+import type { action as statusAction } from "~/routes/x+/sales-order+/$orderId.status";
import { useCustomers } from "~/stores/customers";
+import { path } from "~/utils/path";
import { salesConfirmValidator } from "../../sales.models";
+import type { Opportunity, SalesOrder, SalesOrderLine } from "../../types";
import SalesStatus from "./SalesStatus";
import { useSalesOrder } from "./useSalesOrder";
@@ -90,7 +87,6 @@ const SalesOrderConfirmModal = ({
} else if (fetcher.data?.success === false && fetcher.data?.message) {
toast.error(fetcher.data.message);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data?.success]);
return (
diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderProperties.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderProperties.tsx
index 977c5b37ac..d59474fa56 100644
--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderProperties.tsx
+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderProperties.tsx
@@ -4,18 +4,18 @@ import {
Button,
HStack,
IconButton,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { useLocale } from "@react-aria/i18n";
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect, useMemo } from "react";
import { LuCopy, LuInfo, LuLink, LuRefreshCcw } from "react-icons/lu";
-import { z } from "zod/v3";
import { zfd } from "zod-form-data";
+import { z } from "zod/v3";
import { Assignee, useOptimisticAssignment } from "~/components";
import {
Currency,
@@ -78,7 +78,7 @@ const SalesOrderProperties = () => {
action: path.to.bulkUpdateSalesOrder
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[orderId, routeData?.salesOrder]
);
@@ -95,7 +95,7 @@ const SalesOrderProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[orderId]
);
diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsx
index df4d0e4c05..ba1a712eb5 100644
--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsx
+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsx
@@ -14,6 +14,12 @@ import {
useDisclosure
} from "@carbon/react";
import { formatDate } from "@carbon/utils";
+import {
+ getLocalTimeZone,
+ isSameDay,
+ parseDate,
+ today
+} from "@internationalized/date";
import type { ColumnDef } from "@tanstack/react-table";
import { memo, useMemo, useState } from "react";
import {
@@ -44,19 +50,12 @@ import {
Table
} from "~/components";
import { Enumerable } from "~/components/Enumerable";
-import { ConfirmDelete } from "~/components/Modals";
-import { useCurrencyFormatter, usePermissions } from "~/hooks";
-import { useCustomColumns } from "~/hooks/useCustomColumns";
-
-import {
- getLocalTimeZone,
- isSameDay,
- parseDate,
- today
-} from "@internationalized/date";
import { useLocations } from "~/components/Form/Location";
import { usePaymentTerm } from "~/components/Form/PaymentTerm";
import { useShippingMethod } from "~/components/Form/ShippingMethod";
+import { ConfirmDelete } from "~/components/Modals";
+import { useCurrencyFormatter, usePermissions } from "~/hooks";
+import { useCustomColumns } from "~/hooks/useCustomColumns";
import type { jobStatus } from "~/modules/production/production.models";
import JobStatus from "~/modules/production/ui/Jobs/JobStatus";
import { useCustomers, usePeople } from "~/stores";
@@ -468,7 +467,6 @@ const SalesOrdersTable = memo(({ data, count }: SalesOrdersTableProps) => {
]);
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: SalesOrder) => (
<>
<MenuItem
diff --git a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQProperties.tsx b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQProperties.tsx
index e01d8e7915..d22fcce48a 100644
--- a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQProperties.tsx
+++ b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQProperties.tsx
@@ -3,17 +3,17 @@ import { DatePicker, InputControlled, ValidatedForm } from "@carbon/form";
import {
Button,
HStack,
+ toast,
Tooltip,
TooltipContent,
TooltipTrigger,
- VStack,
- toast
+ VStack
} from "@carbon/react";
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect } from "react";
import { LuCopy, LuLink } from "react-icons/lu";
-import { z } from "zod/v3";
import { zfd } from "zod-form-data";
+import { z } from "zod/v3";
import { Assignee, useOptimisticAssignment } from "~/components";
import {
Customer,
@@ -59,7 +59,7 @@ const SalesRFQProperties = () => {
action: path.to.bulkUpdateSalesRfq
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[rfqId, routeData?.rfqSummary]
);
@@ -76,7 +76,7 @@ const SalesRFQProperties = () => {
action: path.to.customFields
});
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[rfqId]
);
diff --git a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQsTable.tsx b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQsTable.tsx
index a86edfd9b7..fe58acca45 100644
--- a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQsTable.tsx
+++ b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQsTable.tsx
@@ -217,7 +217,6 @@ const SalesRFQsTable = memo(({ data, count }: SalesRFQsTableProps) => {
}, [customers, people, customColumns]);
const renderContextMenu = useMemo(() => {
- // eslint-disable-next-line react/display-name
return (row: SalesRFQ) => (
<>
<MenuItem onClick={() => navigate(path.to.salesRfqDetails(row.id!))}>
diff --git a/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsx b/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsx
index cf6a77048b..aa12e4020a 100644
--- a/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsx
+++ b/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsx
@@ -105,7 +105,7 @@ const ApiKeysTable = memo(({ data, count }: ApiKeysTableProps) => {
</>
);
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[navigate, params, permissions]
);
diff --git a/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTable.tsx b/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTable.tsx
index 74c07801a6..313b0c50e1 100644
--- a/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTable.tsx
+++ b/apps/erp/app/modules/settings/ui/CustomFields/CustomFieldsTable.tsx
@@ -8,7 +8,7 @@ import { LuDatabase, LuLayoutGrid, LuList, LuTags } from "react-icons/lu";
import { Hyperlink, Table } from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { usePermissions, useUrlParams } from "~/hooks";
-import { modulesType, type CustomFieldsTableType } from "~/modules/settings";
+import { type CustomFieldsTableType, modulesType } from "~/modules/settings";
import { tablesWithTags } from "~/modules/shared";
import { path } from "~/utils/path";
@@ -104,7 +104,7 @@ const CustomFieldsTable = memo(({ data, count }: CustomFieldsTableProps) => {
</>
);
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[navigate, params, permissions]
);
diff --git a/apps/erp/app/modules/settings/ui/Webhooks/WebhooksTable.tsx b/apps/erp/app/modules/settings/ui/Webhooks/WebhooksTable.tsx
index 484303e03c..c85f9efd8b 100644
--- a/apps/erp/app/modules/settings/ui/Webhooks/WebhooksTable.tsx
+++ b/apps/erp/app/modules/settings/ui/Webhooks/WebhooksTable.tsx
@@ -182,7 +182,7 @@ const WebhooksTable = memo(({ data, count }: WebhooksTableProps) => {
</>
);
},
- // eslint-disable-next-line react-hooks/exhaustive-deps
+
[navigate, params, permissions]
);
diff --git a/apps/erp/app/modules/users/ui/Customers/CreateCustomerModal.tsx b/apps/erp/app/modules/users/ui/Customers/CreateCustomerModal.tsx
index 4835072591..027f34ab98 100644
--- a/apps/erp/app/modules/users/ui/Customers/CreateCustomerModal.tsx
+++ b/apps/erp/app/modules/users/ui/Customers/CreateCustomerModal.tsx
@@ -1,4 +1,4 @@
-import { ValidatedForm, useControlField, useField } from "@carbon/form";
+import { useControlField, useField, ValidatedForm } from "@carbon/form";
import {
Combobox,
FormControl,
@@ -148,7 +148,6 @@ const CustomerContact = ({
onChange(null);
}
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [customer]);
const options = useMemo(
@@ -180,7 +179,6 @@ const CustomerContact = ({
if (value && value === defaultValue) {
handleChange(value);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [value, customerContactFetcher.data?.data]);
return (
diff --git a/apps/erp/app/modules/users/ui/Employees/EmployeesTable.tsx b/apps/erp/app/modules/users/ui/Employees/EmployeesTable.tsx
index 14a31cebae..61e3a6980d 100644
--- a/apps/erp/app/modules/users/ui/Employees/EmployeesTable.tsx
+++ b/apps/erp/app/modules/users/ui/Employees/EmployeesTable.tsx
@@ -155,7 +155,6 @@ const EmployeesTable = memo(
}
}
];
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [params]);
const renderActions = useCallback(
diff --git a/apps/erp/app/modules/users/ui/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx b/apps/erp/app/modules/users/ui/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx
index e709397c3d..e7edcb4649 100644
--- a/apps/erp/app/modules/users/ui/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx
+++ b/apps/erp/app/modules/users/ui/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx
@@ -1,4 +1,4 @@
-import { ValidatedForm, useControlField, useField } from "@carbon/form";
+import { useControlField, useField, ValidatedForm } from "@carbon/form";
import {
Combobox,
FormControl,
@@ -20,8 +20,8 @@ import { useEffect, useMemo, useRef, useState } from "react";
import { Submit, Supplier } from "~/components/Form";
import { useUrlParams } from "~/hooks";
import type {
- SupplierContact as SupplierContactType,
- getSupplierContacts
+ getSupplierContacts,
+ SupplierContact as SupplierContactType
} from "~/modules/purchasing";
import { createSupplierAccountValidator } from "~/modules/users";
import type { Result } from "~/types";
@@ -147,7 +147,6 @@ const SupplierContact = ({
onChange(null);
}
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [supplier]);
const options = useMemo(
@@ -178,7 +177,6 @@ const SupplierContact = ({
if (value && value === defaultValue) {
handleChange(value);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [value, supplierContactFetcher.data?.data]);
return (
diff --git a/apps/erp/app/routes/onboarding+/theme.tsx b/apps/erp/app/routes/onboarding+/theme.tsx
index 9ce2a674cb..5f85ac31ff 100644
--- a/apps/erp/app/routes/onboarding+/theme.tsx
+++ b/apps/erp/app/routes/onboarding+/theme.tsx
@@ -8,13 +8,13 @@ import {
CardFooter,
CardHeader,
CardTitle,
- HStack,
- VStack,
cn,
- useKeyboardShortcuts
+ HStack,
+ useKeyboardShortcuts,
+ VStack
} from "@carbon/react";
import { useMode } from "@carbon/remix";
-import { themes, type Theme } from "@carbon/utils";
+import { type Theme, themes } from "@carbon/utils";
import {
Link,
useFetcher,
@@ -28,7 +28,7 @@ import { useEffect, useRef, useState } from "react";
import { BiMoon, BiSun } from "react-icons/bi";
import { RxCheck } from "react-icons/rx";
import { useOnboarding } from "~/hooks";
-import { themeValidator, type Theme as ThemeValue } from "~/modules/settings";
+import { type Theme as ThemeValue, themeValidator } from "~/modules/settings";
import type { action as modeAction } from "~/root";
import { getTheme, setTheme } from "~/services/theme.server";
import type { Handle } from "~/utils/handle";
@@ -88,7 +88,6 @@ export default function OnboardingTheme() {
if (t) {
onThemeChange(t);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [mode]);
const { next, previous } = useOnboarding();
diff --git a/apps/erp/app/routes/share+/quote.$id.tsx b/apps/erp/app/routes/share+/quote.$id.tsx
index e1a146a1f1..41fbf86c09 100644
--- a/apps/erp/app/routes/share+/quote.$id.tsx
+++ b/apps/erp/app/routes/share+/quote.$id.tsx
@@ -473,7 +473,6 @@ const LineItems = ({
setOpenItems((prev) => prev.filter((item) => item !== lineId));
}
});
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedLines]);
const pricingByLine = useMemo(
@@ -1009,7 +1008,6 @@ const Quote = ({
rejectQuoteModal.onClose();
submitted.current = false;
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.state]);
useEffect(() => {
diff --git a/apps/erp/app/routes/x+/production+/_index.tsx b/apps/erp/app/routes/x+/production+/_index.tsx
index 9252a015d2..037167645d 100644
--- a/apps/erp/app/routes/x+/production+/_index.tsx
+++ b/apps/erp/app/routes/x+/production+/_index.tsx
@@ -1,3 +1,5 @@
+import { useCarbon } from "@carbon/auth";
+import { requirePermissions } from "@carbon/auth/auth.server";
import {
Badge,
Button,
@@ -27,12 +29,12 @@ import {
useRealtimeChannel
} from "@carbon/react";
import {
+ type ChartConfig,
ChartContainer,
ChartLegend,
ChartLegendContent,
ChartTooltip,
- ChartTooltipContent,
- type ChartConfig
+ ChartTooltipContent
} from "@carbon/react/Chart";
import {
convertDateStringToIsoString,
@@ -48,8 +50,10 @@ import {
useFetcher,
useLoaderData
} from "@remix-run/react";
+import type { LoaderFunctionArgs } from "@vercel/remix";
import { Suspense, useEffect, useMemo, useState } from "react";
import { CSVLink } from "react-csv";
+import { flushSync } from "react-dom";
import {
LuArrowUpRight,
LuChevronDown,
@@ -60,6 +64,7 @@ import {
LuSquareUser,
LuUserRoundCheck
} from "react-icons/lu";
+import { RiProgress8Line } from "react-icons/ri";
import { Bar, BarChart, LabelList, XAxis, YAxis } from "recharts";
import {
CustomerAvatar,
@@ -71,20 +76,14 @@ import {
import { useUser } from "~/hooks/useUser";
import type { ActiveProductionEvent } from "~/modules/production";
import { getActiveProductionEvents, KPIs } from "~/modules/production";
+import { getDeadlineIcon } from "~/modules/production/ui/Jobs";
+import type { WorkCenter } from "~/modules/resources";
+import { getWorkCentersList } from "~/modules/resources";
import { chartIntervals } from "~/modules/shared";
import type { loader as kpiLoader } from "~/routes/api+/production.kpi.$key";
import { path } from "~/utils/path";
import { capitalize } from "~/utils/string";
-import { useCarbon } from "@carbon/auth";
-import { requirePermissions } from "@carbon/auth/auth.server";
-import type { LoaderFunctionArgs } from "@vercel/remix";
-import { flushSync } from "react-dom";
-import { RiProgress8Line } from "react-icons/ri";
-import { getDeadlineIcon } from "~/modules/production/ui/Jobs";
-import type { WorkCenter } from "~/modules/resources";
-import { getWorkCentersList } from "~/modules/resources";
-
const OPEN_JOB_STATUSES = ["Ready", "In Progress", "Paused"] as const;
const chartConfig = {
@@ -161,7 +160,6 @@ export default function ProductionDashboard() {
selectedKpiData.key
)}?start=${dateRange?.start.toString()}&end=${dateRange?.end.toString()}&interval=${interval}`
);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedKpi, dateRange, interval, selectedKpiData.key]);
const onIntervalChange = (value: string) => {
diff --git a/apps/erp/app/routes/x+/purchasing+/_index.tsx b/apps/erp/app/routes/x+/purchasing+/_index.tsx
index ea1e11f376..956eb2df2b 100644
--- a/apps/erp/app/routes/x+/purchasing+/_index.tsx
+++ b/apps/erp/app/routes/x+/purchasing+/_index.tsx
@@ -29,10 +29,10 @@ import {
Tr
} from "@carbon/react";
import {
+ type ChartConfig,
ChartContainer,
ChartTooltip,
- ChartTooltipContent,
- type ChartConfig
+ ChartTooltipContent
} from "@carbon/react/Chart";
import {
getLocalTimeZone,
@@ -217,7 +217,6 @@ export default function PurchaseDashboard() {
supplierId === "all" ? "" : `&supplierId=${supplierId}`
}`
);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedKpi, dateRange, interval, selectedKpiData.key, supplierId]);
const onIntervalChange = (value: string) => {
diff --git a/apps/erp/app/routes/x+/sales+/_index.tsx b/apps/erp/app/routes/x+/sales+/_index.tsx
index a5b8f04c59..2d0479389a 100644
--- a/apps/erp/app/routes/x+/sales+/_index.tsx
+++ b/apps/erp/app/routes/x+/sales+/_index.tsx
@@ -30,10 +30,10 @@ import {
Tr
} from "@carbon/react";
import {
+ type ChartConfig,
ChartContainer,
ChartTooltip,
- ChartTooltipContent,
- type ChartConfig
+ ChartTooltipContent
} from "@carbon/react/Chart";
import { FunnelChart } from "@carbon/react/FunnelChart";
import { getLocalTimeZone, parseDate, today } from "@internationalized/date";
@@ -239,7 +239,6 @@ export default function SalesDashboard() {
customerId === "all" ? "" : `&customerId=${customerId}`
}`
);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedKpi, dateRange, interval, selectedKpiData.key, customerId]);
const onIntervalChange = (value: string) => {
diff --git a/apps/erp/app/routes/x+/schedule+/operations.tsx b/apps/erp/app/routes/x+/schedule+/operations.tsx
index 38b5d04968..cb40dcf622 100644
--- a/apps/erp/app/routes/x+/schedule+/operations.tsx
+++ b/apps/erp/app/routes/x+/schedule+/operations.tsx
@@ -1,6 +1,3 @@
-import type { Handle } from "~/utils/handle";
-import { path } from "~/utils/path";
-
import { error, useCarbon } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
@@ -30,7 +27,7 @@ import {
toZoned
} from "@internationalized/date";
import { Link, useLoaderData } from "@remix-run/react";
-import { json, redirect, type LoaderFunctionArgs } from "@vercel/remix";
+import { json, type LoaderFunctionArgs, redirect } from "@vercel/remix";
import { useCallback, useEffect, useMemo, useState } from "react";
import { LuCirclePlus, LuSettings2, LuTriangleAlert } from "react-icons/lu";
import { SearchFilter } from "~/components";
@@ -42,7 +39,6 @@ import { useFilters } from "~/components/Table/components/Filter/useFilters";
import { useUrlParams, useUser } from "~/hooks";
import { getActiveJobOperationsByLocation } from "~/modules/production";
import type { Column, OperationItem } from "~/modules/production/ui/Schedule";
-
import type {
DisplaySettings,
Event,
@@ -59,6 +55,8 @@ import { getTagsList } from "~/modules/shared";
import { getUserDefaults } from "~/modules/users/users.server";
import { usePeople } from "~/stores";
import { makeDurations } from "~/utils/duration";
+import type { Handle } from "~/utils/handle";
+import { path } from "~/utils/path";
export const handle: Handle = {
breadcrumb: "Schedule",
@@ -669,7 +667,6 @@ function useProgressByOperation(
const { progress } = getProgress();
setProgressByOperation(progress);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [productionEventsByOperation]);
useRealtimeChannel({
diff --git a/apps/erp/vite.config.ts b/apps/erp/vite.config.ts
index e565ca8b51..db260c87ca 100644
--- a/apps/erp/vite.config.ts
+++ b/apps/erp/vite.config.ts
@@ -49,7 +49,6 @@ export default defineConfig({
serverModuleFormat: "esm",
routes: async (defineRoutes) => {
return flatRoutes("routes", defineRoutes, {
- // eslint-disable-next-line no-undef
appDir: path.resolve(__dirname, "app"),
});
},
diff --git a/apps/mes/app/components/AdjustInventory.tsx b/apps/mes/app/components/AdjustInventory.tsx
index 4a94501f8b..8880c81af8 100644
--- a/apps/mes/app/components/AdjustInventory.tsx
+++ b/apps/mes/app/components/AdjustInventory.tsx
@@ -1,7 +1,5 @@
"use client";
-import { LuGitBranchPlus, LuGitPullRequestCreateArrow } from "react-icons/lu";
-
import { useCarbon } from "@carbon/auth";
import { Combobox, Hidden, Number, Submit, ValidatedForm } from "@carbon/form";
import {
@@ -23,6 +21,7 @@ import {
import { useRouteData } from "@carbon/remix";
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo, useState } from "react";
+import { LuGitBranchPlus, LuGitPullRequestCreateArrow } from "react-icons/lu";
import type { action as endShiftAction } from "~/routes/x+/end-shift";
import { inventoryAdjustmentValidator } from "~/services/inventory.service";
import { useItems } from "~/stores";
@@ -93,7 +92,6 @@ export function AdjustInventory({ add }: { add: boolean }) {
fetcher.data?.message ?? "Failed to complete inventory adjustment"
);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data?.success]);
const itemOptions = useMemo(() => {
diff --git a/apps/mes/app/components/EndShift.tsx b/apps/mes/app/components/EndShift.tsx
index 24a2b68c00..62d6cb721a 100644
--- a/apps/mes/app/components/EndShift.tsx
+++ b/apps/mes/app/components/EndShift.tsx
@@ -1,7 +1,5 @@
"use client";
-import { LuCircleStop } from "react-icons/lu";
-
import { useCarbon } from "@carbon/auth";
import {
Button,
@@ -21,6 +19,7 @@ import { getLocalTimeZone } from "@internationalized/date";
import { useFetcher } from "@remix-run/react";
import { useEffect, useState } from "react";
import { flushSync } from "react-dom";
+import { LuCircleStop } from "react-icons/lu";
import { useUser } from "~/hooks";
import type { action as endShiftAction } from "~/routes/x+/end-shift";
import { getActiveJobOperationsByEmployee } from "~/services/operations.service";
@@ -44,7 +43,6 @@ export function EndShift() {
if (fetcher.data?.success === false) {
toast.error(fetcher.data?.message ?? "Failed to end shift");
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data?.success]);
const openModal = async () => {
diff --git a/apps/mes/app/components/Filter/ActiveFilters.tsx b/apps/mes/app/components/Filter/ActiveFilters.tsx
index a8c0e74b92..e5f972385b 100644
--- a/apps/mes/app/components/Filter/ActiveFilters.tsx
+++ b/apps/mes/app/components/Filter/ActiveFilters.tsx
@@ -103,7 +103,6 @@ const ActiveFilter = ({ filter, operator, value }: ActiveFilterProps) => {
setLoading(false);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher.data, filter.filter.type]);
const makeLabel = (v: string) => {
diff --git a/apps/mes/app/components/JobOperation/JobOperation.tsx b/apps/mes/app/components/JobOperation/JobOperation.tsx
index a143ebb0fd..e6848d317d 100644
--- a/apps/mes/app/components/JobOperation/JobOperation.tsx
+++ b/apps/mes/app/components/JobOperation/JobOperation.tsx
@@ -1,3 +1,6 @@
+import type { Result } from "@carbon/auth";
+import { useCarbon } from "@carbon/auth";
+import type { Database } from "@carbon/database";
import {
Badge,
Button,
@@ -12,6 +15,7 @@ import {
Heading,
HStack,
IconButton,
+ type JSONContent,
ModelViewer,
Progress,
ScrollArea,
@@ -33,37 +37,8 @@ import {
TooltipTrigger,
Tr,
useDisclosure,
- VStack,
- type JSONContent
+ VStack
} from "@carbon/react";
-import { Await, useFetcher, useNavigate, useParams } from "@remix-run/react";
-import { Suspense, useEffect, useMemo, useState } from "react";
-import {
- DeadlineIcon,
- FileIcon,
- FilePreview,
- OperationStatusIcon
-} from "~/components";
-import { useUrlParams, useUser } from "~/hooks";
-import type { productionEventType } from "~/services/models";
-import type {
- Job,
- JobMakeMethod,
- JobMaterial,
- JobOperationParameter,
- JobOperationStep,
- Kanban,
- OperationWithDetails,
- ProductionEvent,
- StorageItem,
- TrackedEntity,
- TrackedInput
-} from "~/services/types";
-import { path } from "~/utils/path";
-
-import type { Result } from "@carbon/auth";
-import { useCarbon } from "@carbon/auth";
-import type { Database } from "@carbon/database";
import { useKeyboardWedge, useMode } from "@carbon/remix";
import type { TrackedEntityAttributes } from "@carbon/utils";
import {
@@ -75,7 +50,9 @@ import {
getItemReadableId,
labelSizes
} from "@carbon/utils";
+import { Await, useFetcher, useNavigate, useParams } from "@remix-run/react";
import type { PostgrestSingleResponse } from "@supabase/supabase-js";
+import { Suspense, useEffect, useMemo, useState } from "react";
import { flushSync } from "react-dom";
import { FaTasks } from "react-icons/fa";
import { FaCheck, FaPlus, FaTrash } from "react-icons/fa6";
@@ -100,9 +77,31 @@ import {
LuTimer,
LuTriangleAlert
} from "react-icons/lu";
+import {
+ DeadlineIcon,
+ FileIcon,
+ FilePreview,
+ OperationStatusIcon
+} from "~/components";
import { MethodIcon, TrackingTypeIcon } from "~/components/Icons";
+import { useUrlParams, useUser } from "~/hooks";
+import type { productionEventType } from "~/services/models";
import { getFileType } from "~/services/operations.service";
+import type {
+ Job,
+ JobMakeMethod,
+ JobMaterial,
+ JobOperationParameter,
+ JobOperationStep,
+ Kanban,
+ OperationWithDetails,
+ ProductionEvent,
+ StorageItem,
+ TrackedEntity,
+ TrackedInput
+} from "~/services/types";
import { useItems } from "~/stores";
+import { path } from "~/utils/path";
import ItemThumbnail from "../ItemThumbnail";
import { BatchIssueModal } from "./components/BatchIssueModal";
import { OperationChat } from "./components/Chat";
@@ -324,7 +323,6 @@ export const JobOperation = ({
}
createInspectionStepsForNonConformanceActions();
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
carbon,
operationId,
diff --git a/apps/mes/app/components/JobOperation/components/BatchIssueModal.tsx b/apps/mes/app/components/JobOperation/components/BatchIssueModal.tsx
index 6f7087e5bb..6e8e2d1a4e 100644
--- a/apps/mes/app/components/JobOperation/components/BatchIssueModal.tsx
+++ b/apps/mes/app/components/JobOperation/components/BatchIssueModal.tsx
@@ -1,3 +1,9 @@
+import {
+ Input as FormInput,
+ Number as FormNumberInput,
+ Hidden,
+ ValidatedForm
+} from "@carbon/form";
import {
Alert,
AlertDescription,
@@ -29,21 +35,11 @@ import {
toast,
useDisclosure
} from "@carbon/react";
-
-import { useFetcher } from "@remix-run/react";
-import { useCallback, useEffect, useMemo, useRef, useState } from "react";
-import type { JobMaterial, TrackedInput } from "~/services/types";
-import { path } from "~/utils/path";
-
-import {
- Input as FormInput,
- Number as FormNumberInput,
- Hidden,
- ValidatedForm
-} from "@carbon/form";
import type { TrackedEntityAttributes } from "@carbon/utils";
import { getItemReadableId } from "@carbon/utils";
import { useNumberFormatter } from "@react-aria/i18n";
+import { useFetcher } from "@remix-run/react";
+import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import {
LuArrowRightLeft,
LuCheck,
@@ -61,7 +57,9 @@ import {
} from "react-icons/lu";
import type { getBatchNumbersForItem } from "~/services/inventory.service";
import { convertEntityValidator } from "~/services/models";
+import type { JobMaterial, TrackedInput } from "~/services/types";
import { useItems } from "~/stores";
+import { path } from "~/utils/path";
export function BatchIssueModal({
parentId,
@@ -256,7 +254,6 @@ export function BatchIssueModal({
encType: "application/json"
});
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
selectedBatchNumbers,
validateBatchNumber,
@@ -399,7 +396,6 @@ export function BatchIssueModal({
encType: "application/json"
});
// fetcher is not needed to be in the dependency array
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [unconsumedBatch, material?.id, parentId, trackedInputs]);
const [items] = useItems();
@@ -946,7 +942,6 @@ function useBatchNumbers(itemId?: string) {
if (itemId) {
batchNumbersFetcher.load(path.to.api.batchNumbers(itemId));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [itemId]);
return { data: batchNumbersFetcher.data };
diff --git a/apps/mes/app/components/JobOperation/components/SerialIssueModal.tsx b/apps/mes/app/components/JobOperation/components/SerialIssueModal.tsx
index 1aa5195fac..76510cec0a 100644
--- a/apps/mes/app/components/JobOperation/components/SerialIssueModal.tsx
+++ b/apps/mes/app/components/JobOperation/components/SerialIssueModal.tsx
@@ -22,13 +22,10 @@ import {
TabsTrigger,
toast
} from "@carbon/react";
-import { useFetcher } from "@remix-run/react";
-import { useCallback, useEffect, useMemo, useState } from "react";
-import type { JobMaterial, TrackedInput } from "~/services/types";
-import { path } from "~/utils/path";
-
import type { TrackedEntityAttributes } from "@carbon/utils";
import { getItemReadableId } from "@carbon/utils";
+import { useFetcher } from "@remix-run/react";
+import { useCallback, useEffect, useMemo, useState } from "react";
import {
LuCheck,
LuCirclePlus,
@@ -38,7 +35,9 @@ import {
LuX
} from "react-icons/lu";
import type { getSerialNumbersForItem } from "~/services/inventory.service";
+import type { JobMaterial, TrackedInput } from "~/services/types";
import { useItems } from "~/stores";
+import { path } from "~/utils/path";
export function SerialIssueModal({
operationId,
@@ -201,7 +200,6 @@ export function SerialIssueModal({
encType: "application/json"
});
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
selectedSerialNumbers,
validateSerialNumber,
@@ -549,7 +547,6 @@ function useSerialNumbers(itemId?: string) {
if (itemId) {
serialNumbersFetcher.load(path.to.api.serialNumbers(itemId));
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [itemId]);
return { data: serialNumbersFetcher.data };
diff --git a/apps/mes/app/components/JobOperation/hooks/useOperation.tsx b/apps/mes/app/components/JobOperation/hooks/useOperation.tsx
index a376953ea0..7fddcadccb 100644
--- a/apps/mes/app/components/JobOperation/hooks/useOperation.tsx
+++ b/apps/mes/app/components/JobOperation/hooks/useOperation.tsx
@@ -1,10 +1,19 @@
+import { useCarbon } from "@carbon/auth";
import {
toast,
useDisclosure,
useInterval,
useRealtimeChannel
} from "@carbon/react";
+import type { TrackedEntityAttributes } from "@carbon/utils";
+import {
+ getLocalTimeZone,
+ now,
+ parseAbsolute,
+ toZoned
+} from "@internationalized/date";
import { useParams, useRevalidator } from "@remix-run/react";
+import type { RealtimeChannel } from "@supabase/supabase-js";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { useUrlParams, useUser } from "~/hooks";
import type {
@@ -17,16 +26,6 @@ import type {
} from "~/services/types";
import { path } from "~/utils/path";
-import { useCarbon } from "@carbon/auth";
-import type { TrackedEntityAttributes } from "@carbon/utils";
-import {
- getLocalTimeZone,
- now,
- parseAbsolute,
- toZoned
-} from "@internationalized/date";
-import type { RealtimeChannel } from "@supabase/supabase-js";
-
export function useOperation({
operation,
events,
@@ -265,7 +264,6 @@ export function useOperation({
if (uncompletedEntities.length > 0) serialModal.onOpen();
setAvailableEntities(uncompletedEntities);
// causes an infinite loop on navigation
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [trackedEntities, trackedEntityParam]);
return {
diff --git a/apps/mes/app/components/RealtimeDataProvider.tsx b/apps/mes/app/components/RealtimeDataProvider.tsx
index 227c36bd48..70ca18ca13 100644
--- a/apps/mes/app/components/RealtimeDataProvider.tsx
+++ b/apps/mes/app/components/RealtimeDataProvider.tsx
@@ -97,8 +97,6 @@ const RealtimeDataProvider = ({ children }: { children: React.ReactNode }) => {
useEffect(() => {
if (!companyId) return;
hydrate();
-
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [companyId, accessToken]);
useRealtimeChannel({
diff --git a/apps/mes/app/routes/x+/operations.tsx b/apps/mes/app/routes/x+/operations.tsx
index 63ec4b00fd..fe6a7127c5 100644
--- a/apps/mes/app/routes/x+/operations.tsx
+++ b/apps/mes/app/routes/x+/operations.tsx
@@ -604,7 +604,6 @@ function useProgressByOperation(
const { progress } = getProgress();
setProgressByOperation(progress);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [productionEventsByOperation]);
useRealtimeChannel({
diff --git a/apps/mes/vite.config.ts b/apps/mes/vite.config.ts
index 3ec6d0f19f..419c0dfc49 100644
--- a/apps/mes/vite.config.ts
+++ b/apps/mes/vite.config.ts
@@ -49,7 +49,6 @@ export default defineConfig({
serverModuleFormat: "esm",
routes: async (defineRoutes) => {
return flatRoutes("routes", defineRoutes, {
- // eslint-disable-next-line no-undef
appDir: path.resolve(__dirname, "app"),
});
},
diff --git a/apps/starter/app/routes/_public+/health.tsx b/apps/starter/app/routes/_public+/health.tsx
index 66971aee0d..0106517cf6 100644
--- a/apps/starter/app/routes/_public+/health.tsx
+++ b/apps/starter/app/routes/_public+/health.tsx
@@ -7,7 +7,6 @@ export async function loader() {
if (test.error !== null) throw test.error;
return new Response("OK");
} catch (error: unknown) {
- // eslint-disable-next-line no-console
console.log("health ❌", { error });
return new Response("ERROR", { status: 500 });
}
diff --git a/apps/starter/vite.config.ts b/apps/starter/vite.config.ts
index 5a9bc44140..6e23b3afb8 100644
--- a/apps/starter/vite.config.ts
+++ b/apps/starter/vite.config.ts
@@ -49,7 +49,6 @@ export default defineConfig({
serverModuleFormat: "esm",
routes: async (defineRoutes) => {
return flatRoutes("routes", defineRoutes, {
- // eslint-disable-next-line no-undef
appDir: path.resolve(__dirname, "app"),
});
},
diff --git a/examples/quote-configurator/vite.config.ts b/examples/quote-configurator/vite.config.ts
index 3708352289..e0e9845fa9 100644
--- a/examples/quote-configurator/vite.config.ts
+++ b/examples/quote-configurator/vite.config.ts
@@ -44,7 +44,6 @@ export default defineConfig({
serverModuleFormat: "esm",
routes: async (defineRoutes) => {
return flatRoutes("routes", defineRoutes, {
- // eslint-disable-next-line no-undef
appDir: path.resolve(__dirname, "app"),
});
},
diff --git a/examples/upload-3d-model/vite.config.ts b/examples/upload-3d-model/vite.config.ts
index 0e801d2b39..80d07afbc6 100644
--- a/examples/upload-3d-model/vite.config.ts
+++ b/examples/upload-3d-model/vite.config.ts
@@ -44,7 +44,6 @@ export default defineConfig({
serverModuleFormat: "esm",
routes: async (defineRoutes) => {
return flatRoutes("routes", defineRoutes, {
- // eslint-disable-next-line no-undef
appDir: path.resolve(__dirname, "app"),
});
},
diff --git a/packages/react/src/AutodeskViewer.tsx b/packages/react/src/AutodeskViewer.tsx
index 8f62c40eb9..618008989d 100644
--- a/packages/react/src/AutodeskViewer.tsx
+++ b/packages/react/src/AutodeskViewer.tsx
@@ -166,7 +166,6 @@ const AutodeskViewer: React.FC<AutodeskViewerProps> = ({
Autodesk.Viewing.shutdown();
}
};
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
token,
urn
diff --git a/packages/react/src/Date/components/RangeCalendar.tsx b/packages/react/src/Date/components/RangeCalendar.tsx
index 6d7559cbe6..4671740a29 100644
--- a/packages/react/src/Date/components/RangeCalendar.tsx
+++ b/packages/react/src/Date/components/RangeCalendar.tsx
@@ -4,9 +4,8 @@ import type { RangeCalendarProps } from "@react-aria/calendar";
import { useRangeCalendar } from "@react-aria/calendar";
import { useLocale } from "@react-aria/i18n";
import { useRangeCalendarState } from "@react-stately/calendar";
-import { useEffect, useMemo, useRef } from "react";
-
import clsx from "clsx";
+import { useEffect, useMemo, useRef } from "react";
import {
LuChevronLeft,
LuChevronRight,
@@ -35,7 +34,6 @@ export function RangeCalendar({
useEffect(() => {
if (!props.value?.start) return;
state.setFocusedDate(props.value.start as CalendarDate);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.value]);
const ref = useRef<HTMLDivElement>(null);
diff --git a/packages/react/src/Editor/Editor.tsx b/packages/react/src/Editor/Editor.tsx
index c098c531d7..5ce4a824f3 100644
--- a/packages/react/src/Editor/Editor.tsx
+++ b/packages/react/src/Editor/Editor.tsx
@@ -3,6 +3,7 @@
import type { JSONContent, MentionSuggestion } from "@carbon/tiptap";
import {
Command,
+ createImageUpload,
createMentionExtension,
EditorBubble,
EditorCommand,
@@ -11,11 +12,10 @@ import {
EditorCommandList,
EditorContent,
EditorRoot,
- ImageResizer,
- createImageUpload,
handleCommandNavigation,
handleImageDrop,
handleImagePaste,
+ ImageResizer,
renderItems
} from "@carbon/tiptap";
import TextStyle from "@tiptap/extension-text-style";
@@ -122,7 +122,6 @@ const Editor = ({
items: () => mentionItemsRef.current
});
// Only depend on mentions existence and char, not items content
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [mentions?.[0]?.char]);
const extensions = useMemo(
diff --git a/packages/react/src/Sidebar.tsx b/packages/react/src/Sidebar.tsx
index 542afb4563..a14e55c523 100644
--- a/packages/react/src/Sidebar.tsx
+++ b/packages/react/src/Sidebar.tsx
@@ -1,14 +1,12 @@
"use client";
-import * as React from "react";
-
-import type { Button } from "./Button";
-import { Drawer, DrawerContent } from "./Drawer";
-
import { Slot } from "@radix-ui/react-slot";
import type { VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";
+import * as React from "react";
import { LuPanelLeft } from "react-icons/lu";
+import type { Button } from "./Button";
+import { Drawer, DrawerContent } from "./Drawer";
import { useIsMobile } from "./hooks";
import { IconButton } from "./IconButton";
import { Input } from "./Input";
@@ -39,7 +37,6 @@ type SidebarContext = {
toggleSidebar: () => void;
};
-// eslint-disable-next-line @typescript-eslint/no-redeclare
const SidebarContext = React.createContext<SidebarContext | null>(null);
function useSidebar() {
diff --git a/packages/react/src/hooks/useCallbackRef.ts b/packages/react/src/hooks/useCallbackRef.ts
index c05bd17227..d0ec46bcf6 100644
--- a/packages/react/src/hooks/useCallbackRef.ts
+++ b/packages/react/src/hooks/useCallbackRef.ts
@@ -10,6 +10,5 @@ export default function useCallbackRef<T extends (...args: any[]) => any>(
callbackRef.current = callback;
});
- // eslint-disable-next-line react-hooks/exhaustive-deps
return useCallback(((...args) => callbackRef.current?.(...args)) as T, deps);
}
diff --git a/packages/react/src/hooks/useDebounce.ts b/packages/react/src/hooks/useDebounce.ts
index e2766c71e1..24e2b6049b 100644
--- a/packages/react/src/hooks/useDebounce.ts
+++ b/packages/react/src/hooks/useDebounce.ts
@@ -24,7 +24,6 @@ export default function useDebounce<T extends (...args: any[]) => any>(
clearTimeout(timeout.current);
}
};
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [executeOnUnmount]);
return (...args: Parameters<T>) => {
diff --git a/packages/react/src/hooks/useMount.ts b/packages/react/src/hooks/useMount.ts
index 340af64704..6789da68aa 100644
--- a/packages/react/src/hooks/useMount.ts
+++ b/packages/react/src/hooks/useMount.ts
@@ -3,6 +3,5 @@ import { useEffect } from "react";
export default function useMount(callback: () => void) {
useEffect(() => {
callback();
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}
diff --git a/packages/react/src/hooks/useRealtimeChannel.ts b/packages/react/src/hooks/useRealtimeChannel.ts
index 640f8d16fe..c6dfdd892f 100644
--- a/packages/react/src/hooks/useRealtimeChannel.ts
+++ b/packages/react/src/hooks/useRealtimeChannel.ts
@@ -22,7 +22,6 @@ export const useRealtimeChannel = <TDeps extends any[]>(
const channelRef = useRef<RealtimeChannel | null>(null);
const { carbon, isRealtimeAuthSet } = useCarbon();
- // eslint-disable-next-line react-hooks/exhaustive-deps
const memoSetup = useCallback(setup, [topic, ...dependencies]);
const teardown = useCallback(async () => {
@@ -89,15 +88,13 @@ export const useRealtimeChannel = <TDeps extends any[]>(
);
}
})();
-
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
carbon,
isRealtimeAuthSet,
enabled,
topic,
memoSetup,
- teardown
+ teardown,
// dependencies are already in memoSetup, so not needed here
]);
diff --git a/packages/react/src/hooks/useThrottle.ts b/packages/react/src/hooks/useThrottle.ts
index caa48e7fda..55a1b4f0ed 100644
--- a/packages/react/src/hooks/useThrottle.ts
+++ b/packages/react/src/hooks/useThrottle.ts
@@ -24,7 +24,6 @@ export default function useThrottle<T extends (...args: any[]) => any>(
clearTimeout(timeout.current);
}
};
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [executeOnUnmount]);
return (...args: Parameters<T>) => {
diff --git a/packages/tiptap/src/extensions/custom-keymap.ts b/packages/tiptap/src/extensions/custom-keymap.ts
index bcc4e265e2..b3a26df1b7 100644
--- a/packages/tiptap/src/extensions/custom-keymap.ts
+++ b/packages/tiptap/src/extensions/custom-keymap.ts
@@ -1,7 +1,6 @@
import { Extension } from "@tiptap/core";
declare module "@tiptap/core" {
- // eslint-disable-next-line no-unused-vars
interface Commands<ReturnType> {
customkeymap: {
/**
@@ -26,9 +25,9 @@ const CustomKeymap = Extension.create({
const endNodePos = tr.selection.$to.end();
return commands.setTextSelection({
from: startNodePos,
- to: endNodePos
+ to: endNodePos,
});
- }
+ },
};
},
@@ -48,9 +47,9 @@ const CustomKeymap = Extension.create({
return true;
}
return false;
- }
+ },
};
- }
+ },
});
export default CustomKeymap;