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.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
fix: don't use ...data to spread payloads because it clases with the new data function
Brad Barbinbadaecce8f19
diff --git a/apps/erp/app/components/AnimatedSizeContainer.tsx b/apps/erp/app/components/AnimatedSizeContainer.tsxindex febf3ddab6..7a682f7a48 100644--- a/apps/erp/app/components/AnimatedSizeContainer.tsx+++ b/apps/erp/app/components/AnimatedSizeContainer.tsx@@ -2,8 +2,8 @@ import { cn } from "@carbon/react";import { motion } from "framer-motion";import {type ComponentPropsWithoutRef,- type PropsWithChildren,- forwardRef+ forwardRef,+ type PropsWithChildren} from "react";import useMeasure from "react-use-measure";diff --git a/apps/erp/app/components/Chat/AnimatedSizeContainer.tsx b/apps/erp/app/components/Chat/AnimatedSizeContainer.tsxindex b8b4e702a0..2f2fee8cf9 100644--- a/apps/erp/app/components/Chat/AnimatedSizeContainer.tsx+++ b/apps/erp/app/components/Chat/AnimatedSizeContainer.tsx@@ -2,8 +2,8 @@ import { cn } from "@carbon/react";import { motion } from "framer-motion";import {type ComponentPropsWithoutRef,- type PropsWithChildren,forwardRef,+ type PropsWithChildren,useRef} from "react";import { useResizeObserver } from "~/hooks/useResizeObserver";diff --git a/apps/erp/app/components/Chat/ChatStatusIndicators.tsx b/apps/erp/app/components/Chat/ChatStatusIndicators.tsxindex d6e800fa7b..34ee7755a9 100644--- a/apps/erp/app/components/Chat/ChatStatusIndicators.tsx+++ b/apps/erp/app/components/Chat/ChatStatusIndicators.tsx@@ -1,8 +1,7 @@import { AnimatedStatus } from "./AnimatedStatus";+import { Loader } from "./Loader";import { getStatusMessage } from "./lib/agent";-import type { AgentStatus } from "./lib/types";-import { Loader } from "./Loader";import { getToolIcon, getToolMessage } from "./ToolCallIndicator";interface ChatStatusIndicatorsProps {diff --git a/apps/erp/app/components/Chat/WebSearch.tsx b/apps/erp/app/components/Chat/WebSearch.tsxindex 21b2eba05b..a675c5e455 100644--- a/apps/erp/app/components/Chat/WebSearch.tsx+++ b/apps/erp/app/components/Chat/WebSearch.tsx@@ -7,12 +7,11 @@ import {TooltipProvider,TooltipTrigger} from "@carbon/react";-import { LuGlobe } from "react-icons/lu";-import { useChatStore } from "./lib/store";-import { AnimatePresence, motion } from "framer-motion";import type { ComponentProps } from "react";import { useEffect, useState } from "react";+import { LuGlobe } from "react-icons/lu";+import { useChatStore } from "./lib/store";interface WebSearchSource {title?: string;diff --git a/apps/erp/app/components/Configurator/ConfiguratorForm/ConfiguratorForm.ee.tsx b/apps/erp/app/components/Configurator/ConfiguratorForm/ConfiguratorForm.ee.tsxindex defcb1e514..0fa56c4a40 100644--- a/apps/erp/app/components/Configurator/ConfiguratorForm/ConfiguratorForm.ee.tsx+++ b/apps/erp/app/components/Configurator/ConfiguratorForm/ConfiguratorForm.ee.tsx@@ -27,8 +27,8 @@ import {} from "@carbon/react";import { createContext, useContext, useEffect, useMemo, useState } from "react";import { LuChevronDown, LuChevronUp, LuTriangleAlert } from "react-icons/lu";-import { zfd } from "zod-form-data";import { z } from "zod/v3";+import { zfd } from "zod-form-data";import type {ConfigurationParameter,ConfigurationParameterGroup,diff --git a/apps/erp/app/components/DocumentPreview.tsx b/apps/erp/app/components/DocumentPreview.tsxindex aef942eacf..d1a0a47f5e 100644--- a/apps/erp/app/components/DocumentPreview.tsx+++ b/apps/erp/app/components/DocumentPreview.tsx@@ -1,8 +1,8 @@import {+ cn,HoverCard,HoverCardContent,- HoverCardTrigger,- cn+ HoverCardTrigger} from "@carbon/react";import type { ComponentPropsWithoutRef, ElementRef } from "react";import { forwardRef } from "react";diff --git a/apps/erp/app/components/Enumerable.tsx b/apps/erp/app/components/Enumerable.tsxindex 0ac680b3a2..5e607e45aa 100644--- a/apps/erp/app/components/Enumerable.tsx+++ b/apps/erp/app/components/Enumerable.tsx@@ -1,9 +1,8 @@-import type { Color } from "@carbon/utils";-import { getColor, getColorByValue } from "@carbon/utils";-import type { BadgeProps } from "@carbon/react";import { Badge } from "@carbon/react";import { useMode } from "@carbon/remix";+import type { Color } from "@carbon/utils";+import { getColor, getColorByValue } from "@carbon/utils";type EnumerableProps = BadgeProps & {value: string | null;diff --git a/apps/erp/app/components/Form/ConversionFactor.tsx b/apps/erp/app/components/Form/ConversionFactor.tsxindex f099b49362..543739d636 100644--- a/apps/erp/app/components/Form/ConversionFactor.tsx+++ b/apps/erp/app/components/Form/ConversionFactor.tsx@@ -1,8 +1,8 @@import { useControlField, useField } from "@carbon/form";import {Button,- cn,CommandTrigger,+ cn,FormControl,FormErrorMessage,FormHelperText,diff --git a/apps/erp/app/components/Form/RichText.tsx b/apps/erp/app/components/Form/RichText.tsxindex aba2c08c0d..dedc970213 100644--- a/apps/erp/app/components/Form/RichText.tsx+++ b/apps/erp/app/components/Form/RichText.tsx@@ -3,6 +3,7 @@ import { FormControl, FormErrorMessage } from "@carbon/react";import { RichText as RichTextBase, useRichText } from "@carbon/react/RichText";import type { ComponentProps } from "react";import { useEffect } from "react";+type RichTextProps = Omit<ComponentProps<typeof RichTextBase>, "editor"> & {name: string;output?: "html" | "json" | "text";diff --git a/apps/erp/app/components/Form/SequenceOrCustomId.tsx b/apps/erp/app/components/Form/SequenceOrCustomId.tsxindex 7f7ed54066..2407ced63b 100644--- a/apps/erp/app/components/Form/SequenceOrCustomId.tsx+++ b/apps/erp/app/components/Form/SequenceOrCustomId.tsx@@ -2,13 +2,13 @@ import { useField } from "@carbon/form";import type { InputProps } from "@carbon/react";import {Button,+ cn,FormControl,FormErrorMessage,FormHelperText,FormLabel,IconButton,- Input,- cn+ Input} from "@carbon/react";import { forwardRef, useState } from "react";import { LuToggleLeft, LuToggleRight } from "react-icons/lu";diff --git a/apps/erp/app/components/Gantt/components/GanttTaskStatus.tsx b/apps/erp/app/components/Gantt/components/GanttTaskStatus.tsxindex b7bf0762a9..9e5d2a597c 100644--- a/apps/erp/app/components/Gantt/components/GanttTaskStatus.tsx+++ b/apps/erp/app/components/Gantt/components/GanttTaskStatus.tsx@@ -1,4 +1,4 @@-import { Spinner, cn } from "@carbon/react";+import { cn, Spinner } from "@carbon/react";import assertNever from "assert-never";import {LuBan,diff --git a/apps/erp/app/components/Grid/components/Cell.tsx b/apps/erp/app/components/Grid/components/Cell.tsxindex 956b1e681f..4d433fe7ca 100644--- a/apps/erp/app/components/Grid/components/Cell.tsx+++ b/apps/erp/app/components/Grid/components/Cell.tsx@@ -1,4 +1,4 @@-import { Td, cn } from "@carbon/react";+import { cn, Td } from "@carbon/react";import type { Cell as CellType } from "@tanstack/react-table";import { flexRender } from "@tanstack/react-table";import { memo, useState } from "react";diff --git a/apps/erp/app/components/Grid/components/Row.tsx b/apps/erp/app/components/Grid/components/Row.tsxindex 40f81d7118..4f917472e3 100644--- a/apps/erp/app/components/Grid/components/Row.tsx+++ b/apps/erp/app/components/Grid/components/Row.tsx@@ -1,4 +1,4 @@-import { Tr, cn } from "@carbon/react";+import { cn, Tr } from "@carbon/react";import type { Row as RowType } from "@tanstack/react-table";import type { MutableRefObject } from "react";import { memo } from "react";diff --git a/apps/erp/app/components/ImportCSVModal/UploadCSV.tsx b/apps/erp/app/components/ImportCSVModal/UploadCSV.tsxindex 4e580abae6..6820c5d79e 100644--- a/apps/erp/app/components/ImportCSVModal/UploadCSV.tsx+++ b/apps/erp/app/components/ImportCSVModal/UploadCSV.tsx@@ -1,10 +1,10 @@import { useCarbon } from "@carbon/auth";import {+ cn,ModalDescription,ModalHeader,ModalTitle,Spinner,- cn,toast} from "@carbon/react";import { nanoid } from "nanoid";diff --git a/apps/erp/app/components/Table/components/Cell.tsx b/apps/erp/app/components/Table/components/Cell.tsxindex f0b5eb2cc7..9cb4979674 100644--- a/apps/erp/app/components/Table/components/Cell.tsx+++ b/apps/erp/app/components/Table/components/Cell.tsx@@ -1,4 +1,4 @@-import { Td, cn } from "@carbon/react";+import { cn, Td } from "@carbon/react";import type { Cell as CellType, Column } from "@tanstack/react-table";import { flexRender } from "@tanstack/react-table";import type { CSSProperties } from "react";diff --git a/apps/erp/app/components/Table/components/Download.tsx b/apps/erp/app/components/Table/components/Download.tsxindex c614c7c5ce..4ec9736134 100644--- a/apps/erp/app/components/Table/components/Download.tsx+++ b/apps/erp/app/components/Table/components/Download.tsx@@ -4,9 +4,9 @@ import {TooltipContent,TooltipTrigger} from "@carbon/react";-import { LuDownload } from "react-icons/lu";import { json2csv } from "json-2-csv";import { useCallback } from "react";+import { LuDownload } from "react-icons/lu";type DownloadProps = {data: object[];diff --git a/apps/erp/app/components/Table/components/Pagination/index.ts b/apps/erp/app/components/Table/components/Pagination/index.tsindex 6b12b9ba4d..f9892dec87 100644--- a/apps/erp/app/components/Table/components/Pagination/index.ts+++ b/apps/erp/app/components/Table/components/Pagination/index.ts@@ -1,5 +1,5 @@-import Pagination, { PaginationButtons } from "./Pagination";import type { PaginationProps } from "./Pagination";+import Pagination, { PaginationButtons } from "./Pagination";import { usePagination } from "./usePagination";export { Pagination, PaginationButtons, usePagination };diff --git a/apps/erp/app/components/Table/components/Row.tsx b/apps/erp/app/components/Table/components/Row.tsxindex 6426731fa6..7d0a3672c8 100644--- a/apps/erp/app/components/Table/components/Row.tsx+++ b/apps/erp/app/components/Table/components/Row.tsx@@ -1,6 +1,6 @@-import { Tr, cn } from "@carbon/react";+import { cn, Tr } from "@carbon/react";import type { Column, Row as RowType } from "@tanstack/react-table";-import type { CSSProperties, ComponentProps } from "react";+import type { ComponentProps, CSSProperties } from "react";import { memo } from "react";import type {EditableTableCellComponent,diff --git a/apps/erp/app/components/Table/components/Sort/Sort.tsx b/apps/erp/app/components/Table/components/Sort/Sort.tsxindex 62a33d0cf4..2a5fc8a879 100644--- a/apps/erp/app/components/Table/components/Sort/Sort.tsx+++ b/apps/erp/app/components/Table/components/Sort/Sort.tsx@@ -1,5 +1,6 @@import {Button,+ cn,DropdownMenu,DropdownMenuContent,DropdownMenuIcon,@@ -15,8 +16,7 @@ import {Switch,Tooltip,TooltipContent,- TooltipTrigger,- cn+ TooltipTrigger} from "@carbon/react";import { Reorder } from "framer-motion";import { BsChevronDown, BsSortUp } from "react-icons/bs";diff --git a/apps/erp/app/components/TreeView/index.ts b/apps/erp/app/components/TreeView/index.tsindex 7125d7b9cf..a609cf2c10 100644--- a/apps/erp/app/components/TreeView/index.ts+++ b/apps/erp/app/components/TreeView/index.ts@@ -1,4 +1,4 @@-import type { NodesState, NodeState } from "./reducer";+import type { NodeState, NodesState } from "./reducer";import type {FlatTree,FlatTreeItem,diff --git a/apps/erp/app/hooks/index.ts b/apps/erp/app/hooks/index.tsindex f953c2398e..930ac44d3d 100644--- a/apps/erp/app/hooks/index.ts+++ b/apps/erp/app/hooks/index.ts@@ -6,10 +6,9 @@ import {} from "@carbon/remix";import { useCurrencyFormatter } from "./useCurrencyFormatter";+import { useGooglePlaces } from "./useGooglePlaces";import { useModules } from "./useModules";import { useMovingCellRef } from "./useMovingCellRef";--import { useGooglePlaces } from "./useGooglePlaces";import { useNextItemId } from "./useNextItemId";import { useNotifications } from "./useNotifications";import { useOnboarding } from "./useOnboarding";diff --git a/apps/erp/app/hooks/useSavedViews.tsx b/apps/erp/app/hooks/useSavedViews.tsxindex d28454c69b..4d3d1aad17 100644--- a/apps/erp/app/hooks/useSavedViews.tsx+++ b/apps/erp/app/hooks/useSavedViews.tsx@@ -1,7 +1,7 @@import { useRouteData, useUrlParams } from "@carbon/remix";-import { path } from "~/utils/path";import type { SavedView } from "~/modules/shared/types";import type { Route } from "~/types";+import { path } from "~/utils/path";type SavedViews = SavedView[];diff --git a/apps/erp/app/modules/accounting/accounting.models.ts b/apps/erp/app/modules/accounting/accounting.models.tsindex 909744a649..b0df00e2d4 100644--- a/apps/erp/app/modules/accounting/accounting.models.ts+++ b/apps/erp/app/modules/accounting/accounting.models.ts@@ -1,5 +1,5 @@-import { zfd } from "zod-form-data";import { z } from "zod/v3";+import { zfd } from "zod-form-data";import { months } from "~/modules/shared";import {itemLedgerDocumentTypes,diff --git a/apps/erp/app/modules/accounting/types.ts b/apps/erp/app/modules/accounting/types.tsindex 5baeb0c9ae..5e98cb0fbf 100644--- a/apps/erp/app/modules/accounting/types.ts+++ b/apps/erp/app/modules/accounting/types.ts@@ -2,8 +2,8 @@ import type { Database } from "@carbon/database";import type {getAccount,getAccountCategories,- getAccountsList,getAccountSubcategories,+ getAccountsList,getCurrencies,getInventoryPostingGroups,getPaymentTerms,diff --git a/apps/erp/app/modules/accounting/ui/AccountCategories/AccountCategoryForm.tsx b/apps/erp/app/modules/accounting/ui/AccountCategories/AccountCategoryForm.tsxindex 26f06746f6..cadaf34c92 100644--- a/apps/erp/app/modules/accounting/ui/AccountCategories/AccountCategoryForm.tsx+++ b/apps/erp/app/modules/accounting/ui/AccountCategories/AccountCategoryForm.tsx@@ -25,6 +25,7 @@ import {accountClassTypes,incomeBalanceTypes} from "../../accounting.models";+type AccountCategoryFormProps = {initialValues: z.infer<typeof accountCategoryValidator>;onClose: () => void;diff --git a/apps/erp/app/modules/inventory/inventory.service.ts b/apps/erp/app/modules/inventory/inventory.service.tsindex 54accc30f2..1bdccb67c5 100644--- a/apps/erp/app/modules/inventory/inventory.service.ts+++ b/apps/erp/app/modules/inventory/inventory.service.ts@@ -1,4 +1,4 @@-import { fetchAllFromTable, type Database, type Json } from "@carbon/database";+import { type Database, fetchAllFromTable, type Json } from "@carbon/database";import { getLocalTimeZone, today } from "@internationalized/date";import type { SupabaseClient } from "@supabase/supabase-js";import { nanoid } from "nanoid";diff --git a/apps/erp/app/modules/inventory/types.ts b/apps/erp/app/modules/inventory/types.tsindex ea60936d56..94b80d0bf3 100644--- a/apps/erp/app/modules/inventory/types.ts+++ b/apps/erp/app/modules/inventory/types.ts@@ -5,11 +5,11 @@ import type {getItemLedgerPage,getKanbans,getReceiptLines,- getReceiptTracking,getReceipts,+ getReceiptTracking,getShipmentLines,- getShipmentTracking,getShipments,+ getShipmentTracking,getShippingMethods,getStockTransferLines,getStockTransfers,diff --git a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentNotes.tsx b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentNotes.tsxindex ac0495e0b7..f494a97838 100644--- a/apps/erp/app/modules/inventory/ui/Shipments/ShipmentNotes.tsx+++ b/apps/erp/app/modules/inventory/ui/Shipments/ShipmentNotes.tsx@@ -7,12 +7,12 @@ import {CardDescription,CardHeader,CardTitle,+ generateHTML,HStack,Tabs,TabsContent,TabsList,TabsTrigger,- generateHTML,toast,useDebounce} from "@carbon/react";diff --git a/apps/erp/app/modules/inventory/ui/WarehouseTransfers/index.ts b/apps/erp/app/modules/inventory/ui/WarehouseTransfers/index.tsindex 32842b073c..e7d95ee335 100644--- a/apps/erp/app/modules/inventory/ui/WarehouseTransfers/index.ts+++ b/apps/erp/app/modules/inventory/ui/WarehouseTransfers/index.ts@@ -1,6 +1,6 @@-export { default as WarehouseTransfersTable } from "./WarehouseTransfersTable";+export { default as WarehouseTransferForm } from "./WarehouseTransferForm";export { default as WarehouseTransferHeader } from "./WarehouseTransferHeader";-export { default as WarehouseTransferLines } from "./WarehouseTransferLines";export { default as WarehouseTransferLineForm } from "./WarehouseTransferLineForm";+export { default as WarehouseTransferLines } from "./WarehouseTransferLines";export { default as WarehouseTransferStatus } from "./WarehouseTransferStatus";-export { default as WarehouseTransferForm } from "./WarehouseTransferForm";+export { default as WarehouseTransfersTable } from "./WarehouseTransfersTable";diff --git a/apps/erp/app/modules/inventory/ui/index.ts b/apps/erp/app/modules/inventory/ui/index.tsindex 9615c279aa..cf0f9acb9c 100644--- a/apps/erp/app/modules/inventory/ui/index.ts+++ b/apps/erp/app/modules/inventory/ui/index.ts@@ -1,4 +1,5 @@import useInventorySubmodules from "./useInventorySubmodules";+export * from "./Inventory";export * from "./Kanbans";export * from "./Receipts";diff --git a/apps/erp/app/modules/invoicing/types.ts b/apps/erp/app/modules/invoicing/types.tsindex 55b9192637..61d8e88576 100644--- a/apps/erp/app/modules/invoicing/types.ts+++ b/apps/erp/app/modules/invoicing/types.ts@@ -8,8 +8,8 @@ import type {getPurchaseInvoiceLines,getPurchaseInvoices,getSalesInvoiceLines,- getSalesInvoices,- getSalesInvoiceShipment+ getSalesInvoiceShipment,+ getSalesInvoices} from "./invoicing.service";export type PurchaseInvoice = NonNullable<diff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm.tsx b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm.tsxindex d6295325a1..c716ee5b1f 100644--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm.tsx+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceForm.tsx@@ -7,9 +7,9 @@ import {CardFooter,CardHeader,CardTitle,- VStack,cn,- toast+ toast,+ VStack} from "@carbon/react";import { useState } from "react";import { flushSync } from "react-dom";diff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/index.ts b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/index.tsindex 6adc3a325e..950295718e 100644--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/index.ts+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/index.ts@@ -2,8 +2,8 @@ import PurchaseInvoiceDeliveryForm from "./PurchaseInvoiceDeliveryForm";import PurchaseInvoiceForm from "./PurchaseInvoiceForm";import PurchaseInvoiceHeader from "./PurchaseInvoiceHeader";import PurchaseInvoiceLineForm from "./PurchaseInvoiceLineForm";-import PurchaseInvoicesTable from "./PurchaseInvoicesTable";import PurchaseInvoiceSummary from "./PurchaseInvoiceSummary";+import PurchaseInvoicesTable from "./PurchaseInvoicesTable";import PurchaseInvoicingStatus from "./PurchaseInvoicingStatus";export {PurchaseInvoiceDeliveryForm,diff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceForm.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceForm.tsxindex c0b0784cac..89a1392297 100644--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceForm.tsx+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceForm.tsx@@ -7,19 +7,19 @@ import {CardFooter,CardHeader,CardTitle,- VStack,cn,- toast+ toast,+ VStack} from "@carbon/react";import { useState } from "react";import { flushSync } from "react-dom";import type { z } from "zod/v3";import {Currency,- CustomFormFields,Customer,CustomerContact,CustomerLocation,+ CustomFormFields,DatePicker,Hidden,Input,diff --git a/apps/erp/app/modules/items/types.ts b/apps/erp/app/modules/items/types.tsindex 3b6861e1a2..3f9ad28dd8 100644--- a/apps/erp/app/modules/items/types.ts+++ b/apps/erp/app/modules/items/types.ts@@ -19,8 +19,8 @@ import type {getMaterialForms,getMaterialGrades,getMaterialSubstances,- getMaterialTypes,getMaterials,+ getMaterialTypes,getMethodMaterials,getMethodOperations,getMethodTreeArray,diff --git a/apps/erp/app/modules/items/ui/Item/FileBadge.tsx b/apps/erp/app/modules/items/ui/Item/FileBadge.tsxindex 9c37a9eb10..e14e7a27be 100644--- a/apps/erp/app/modules/items/ui/Item/FileBadge.tsx+++ b/apps/erp/app/modules/items/ui/Item/FileBadge.tsx@@ -1,4 +1,4 @@-import { Badge, HStack, cn } from "@carbon/react";+import { Badge, cn, HStack } from "@carbon/react";import { LuDownload } from "react-icons/lu";import { DocumentPreview } from "~/components";import DocumentIcon from "~/components/DocumentIcon";diff --git a/apps/erp/app/modules/items/ui/Item/index.ts b/apps/erp/app/modules/items/ui/Item/index.tsindex 242eb2bb8c..51849446c4 100644--- a/apps/erp/app/modules/items/ui/Item/index.ts+++ b/apps/erp/app/modules/items/ui/Item/index.ts@@ -1,9 +1,6 @@import BillOfMaterial from "./BillOfMaterial";import BillOfProcess from "./BillOfProcess";import BoMExplorer from "./BoMExplorer";-import SupplierPartForm from "./SupplierPartForm";-import SupplierParts from "./SupplierParts";-import { FileBadge } from "./FileBadge";import ItemCostingForm from "./ItemCostingForm";import ItemDocuments from "./ItemDocuments";@@ -14,6 +11,8 @@ import ItemPurchasingForm from "./ItemPurchasingForm";import ItemSalePriceForm from "./ItemSalePriceForm";import MakeMethodTools from "./MakeMethodTools";import PickMethodForm from "./PickMethodForm";+import SupplierPartForm from "./SupplierPartForm";+import SupplierParts from "./SupplierParts";export {BillOfMaterial,diff --git a/apps/erp/app/modules/people/ui/Person/PersonSidebar/PersonSidebar.tsx b/apps/erp/app/modules/people/ui/Person/PersonSidebar/PersonSidebar.tsxindex a6e7ad982a..c28fce134f 100644--- a/apps/erp/app/modules/people/ui/Person/PersonSidebar/PersonSidebar.tsx+++ b/apps/erp/app/modules/people/ui/Person/PersonSidebar/PersonSidebar.tsx@@ -1,5 +1,5 @@-import type { PublicAttributes } from "~/modules/account";import { DetailSidebar } from "~/components/Layout";+import type { PublicAttributes } from "~/modules/account";import { usePersonSidebar } from "./usePersonSidebar";type PersonSidebarProps = {diff --git a/apps/erp/app/modules/production/types.ts b/apps/erp/app/modules/production/types.tsindex c7b31e2a57..2f5945a2c9 100644--- a/apps/erp/app/modules/production/types.ts+++ b/apps/erp/app/modules/production/types.ts@@ -8,8 +8,8 @@ import type {getJobPurchaseOrderLines,getProcedure,getProcedureParameters,- getProcedures,getProcedureSteps,+ getProcedures,getProductionEvents,getProductionPlanning,getProductionProjections,diff --git a/apps/erp/app/modules/production/ui/Jobs/JobForm.tsx b/apps/erp/app/modules/production/ui/Jobs/JobForm.tsxindex 235ca4549d..4af49d66bf 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobForm.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobForm.tsx@@ -8,22 +8,22 @@ import {CardFooter,CardHeader,CardTitle,+ cn,Tabs,TabsContent,TabsList,TabsTrigger,- VStack,- cn,toast,- useDisclosure+ useDisclosure,+ VStack} from "@carbon/react";import { useState } from "react";import { LuDiamond, LuLayers } from "react-icons/lu";import type { z } from "zod/v3";import { ConfiguratorModal } from "~/components/Configurator/ConfiguratorForm";import {- CustomFormFields,Customer,+ CustomFormFields,DatePicker,Hidden,Input,diff --git a/apps/erp/app/modules/production/ui/Jobs/index.ts b/apps/erp/app/modules/production/ui/Jobs/index.tsindex c889eb6d1b..cb0245c413 100644--- a/apps/erp/app/modules/production/ui/Jobs/index.ts+++ b/apps/erp/app/modules/production/ui/Jobs/index.ts@@ -9,11 +9,11 @@ import JobHeader from "./JobHeader";import JobMaterialForm from "./JobMaterialForm";import JobMaterialsTable from "./JobMaterialsTable";import JobNotes from "./JobNotes";-import JobOperationsTable from "./JobOperationsTable";import JobOperationStepRecordsTable from "./JobOperationStepRecordsTable";+import JobOperationsTable from "./JobOperationsTable";import JobProperties from "./JobProperties";-import JobsTable from "./JobsTable";import JobStatus from "./JobStatus";+import JobsTable from "./JobsTable";import ProductionEventForm from "./ProductionEventForm";import ProductionEventsTable from "./ProductionEventsTable";import ProductionQuantitiesTable from "./ProductionQuantitiesTable";diff --git a/apps/erp/app/modules/production/ui/Procedures/ProcedureStatus.tsx b/apps/erp/app/modules/production/ui/Procedures/ProcedureStatus.tsxindex 5e94899b51..67748ccf5b 100644--- a/apps/erp/app/modules/production/ui/Procedures/ProcedureStatus.tsx+++ b/apps/erp/app/modules/production/ui/Procedures/ProcedureStatus.tsx@@ -1,6 +1,6 @@import { Status } from "@carbon/react";-import type { procedureStatus } from "../../production.models";import { LuLock } from "react-icons/lu";+import type { procedureStatus } from "../../production.models";type ProcedureStatusProps = {status?: (typeof procedureStatus)[number] | null;diff --git a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsx b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsxindex bea03c9679..932148633d 100644--- a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsx@@ -45,7 +45,6 @@ import {LuUsers} from "react-icons/lu";import { RiProgress8Line } from "react-icons/ri";-import { Link } from "react-router";import { z } from "zod/v3";import { Assignee, CustomerAvatar, EmployeeAvatarGroup } from "~/components";import { Tags } from "~/components/Form";diff --git a/apps/erp/app/modules/production/ui/Schedule/Kanban/context/KanbanContext.tsx b/apps/erp/app/modules/production/ui/Schedule/Kanban/context/KanbanContext.tsxindex d1f48a7cbb..d4e27dc99c 100644--- a/apps/erp/app/modules/production/ui/Schedule/Kanban/context/KanbanContext.tsx+++ b/apps/erp/app/modules/production/ui/Schedule/Kanban/context/KanbanContext.tsx@@ -1,4 +1,4 @@-import { createContext, useContext, type ReactNode } from "react";+import { createContext, type ReactNode, useContext } from "react";import type { DisplaySettings } from "../types";interface KanbanContextType {diff --git a/apps/erp/app/modules/production/ui/Schedule/Kanban/utils.ts b/apps/erp/app/modules/production/ui/Schedule/Kanban/utils.tsindex b45f01daba..060e23a532 100644--- a/apps/erp/app/modules/production/ui/Schedule/Kanban/utils.ts+++ b/apps/erp/app/modules/production/ui/Schedule/Kanban/utils.ts@@ -5,7 +5,7 @@ import type {KeyboardCoordinateGetter,Over} from "@dnd-kit/core";-import { KeyboardCode, closestCorners, getFirstCollision } from "@dnd-kit/core";+import { closestCorners, getFirstCollision, KeyboardCode } from "@dnd-kit/core";import type { DraggableData } from "./types";const directions: string[] = [diff --git a/apps/erp/app/modules/production/ui/Schedule/index.ts b/apps/erp/app/modules/production/ui/Schedule/index.tsindex 32d5239e8b..0ba55ea333 100644--- a/apps/erp/app/modules/production/ui/Schedule/index.ts+++ b/apps/erp/app/modules/production/ui/Schedule/index.ts@@ -1,2 +1,2 @@-export { Kanban } from "./Kanban";export type { Column, Item, JobItem, OperationItem } from "./Kanban";+export { Kanban } from "./Kanban";diff --git a/apps/erp/app/modules/purchasing/purchasing.service.ts b/apps/erp/app/modules/purchasing/purchasing.service.tsindex 80918a75c8..bd4b19dda1 100644--- a/apps/erp/app/modules/purchasing/purchasing.service.ts+++ b/apps/erp/app/modules/purchasing/purchasing.service.ts@@ -1,4 +1,4 @@-import { fetchAllFromTable, type Database, type Json } from "@carbon/database";+import { type Database, fetchAllFromTable, type Json } from "@carbon/database";import { getPurchaseOrderStatus } from "@carbon/utils";import { getLocalTimeZone, today } from "@internationalized/date";import {@@ -12,8 +12,8 @@ import type { GenericQueryFilters } from "~/utils/query";import { setGenericQueryFilters } from "~/utils/query";import { sanitize } from "~/utils/supabase";import { getCurrencyByCode } from "../accounting/accounting.service";-import { upsertExternalLink } from "../shared/shared.service";import type { PurchaseInvoice } from "../invoicing/types";+import { upsertExternalLink } from "../shared/shared.service";import type {purchaseOrderDeliveryValidator,purchaseOrderLineValidator,diff --git a/apps/erp/app/modules/purchasing/types.ts b/apps/erp/app/modules/purchasing/types.tsindex a3de56e6b4..811cc5c242 100644--- a/apps/erp/app/modules/purchasing/types.ts+++ b/apps/erp/app/modules/purchasing/types.ts@@ -13,8 +13,8 @@ import type {getSupplierQuoteLinePricesByQuoteId,getSupplierQuoteLines,getSupplierQuotes,- getSuppliers,getSupplierStatuses,+ getSuppliers,getSupplierTypes} from "./purchasing.service";diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm.tsxindex 2a1eb8e0e5..61c00dab05 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderForm.tsx@@ -7,9 +7,9 @@ import {CardFooter,CardHeader,CardTitle,- VStack,cn,- toast+ toast,+ VStack} from "@carbon/react";import { useState } from "react";import { flushSync } from "react-dom";diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/index.ts b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/index.tsindex d94f4746fc..3e9f4ece9e 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/index.ts+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/index.ts@@ -5,8 +5,8 @@ import PurchaseOrderHeader from "./PurchaseOrderHeader";import PurchaseOrderLineForm from "./PurchaseOrderLineForm";import PurchaseOrderPaymentForm from "./PurchaseOrderPaymentForm";import PurchaseOrderProperties from "./PurchaseOrderProperties";-import PurchaseOrdersTable from "./PurchaseOrdersTable";import PurchaseOrderSummary from "./PurchaseOrderSummary";+import PurchaseOrdersTable from "./PurchaseOrdersTable";import PurchasingStatus from "./PurchasingStatus";import { usePurchaseOrder } from "./usePurchaseOrder";import { usePurchaseOrderTotals } from "./usePurchaseOrderTotals";diff --git a/apps/erp/app/modules/purchasing/ui/Supplier/index.ts b/apps/erp/app/modules/purchasing/ui/Supplier/index.tsindex 3a0477f3b6..aa51643a0c 100644--- a/apps/erp/app/modules/purchasing/ui/Supplier/index.ts+++ b/apps/erp/app/modules/purchasing/ui/Supplier/index.ts@@ -5,8 +5,8 @@ import SupplierHeader from "./SupplierHeader";import SupplierLocationForm from "./SupplierLocationForm";import SupplierLocations from "./SupplierLocations";import SupplierPaymentForm from "./SupplierPaymentForm";-import SupplierProcessForm from "./SupplierProcessForm";import SupplierProcesses from "./SupplierProcesses";+import SupplierProcessForm from "./SupplierProcessForm";import SupplierShippingForm from "./SupplierShippingForm";import SupplierSidebar from "./SupplierSidebar";import SuppliersTable from "./SuppliersTable";diff --git a/apps/erp/app/modules/purchasing/ui/SupplierStatuses/index.ts b/apps/erp/app/modules/purchasing/ui/SupplierStatuses/index.tsindex 3b81b7a644..568766c31f 100644--- a/apps/erp/app/modules/purchasing/ui/SupplierStatuses/index.ts+++ b/apps/erp/app/modules/purchasing/ui/SupplierStatuses/index.ts@@ -1,4 +1,4 @@-import SupplierStatusForm from "./SupplierStatusForm";import SupplierStatusesTable from "./SupplierStatusesTable";+import SupplierStatusForm from "./SupplierStatusForm";export { SupplierStatusForm, SupplierStatusesTable };diff --git a/apps/erp/app/modules/quality/types.ts b/apps/erp/app/modules/quality/types.tsindex e1736efa98..2b7933cd90 100644--- a/apps/erp/app/modules/quality/types.ts+++ b/apps/erp/app/modules/quality/types.ts@@ -17,8 +17,8 @@ import type {getIssueWorkflow,getQualityActions,getQualityDocument,- getQualityDocuments,getQualityDocumentSteps,+ getQualityDocuments,getRequiredActions} from "./quality.service";diff --git a/apps/erp/app/modules/quality/ui/Issue/IssueContent.tsx b/apps/erp/app/modules/quality/ui/Issue/IssueContent.tsxindex 1bfc4899e5..ed5839857c 100644--- a/apps/erp/app/modules/quality/ui/Issue/IssueContent.tsx+++ b/apps/erp/app/modules/quality/ui/Issue/IssueContent.tsx@@ -6,9 +6,9 @@ import {CardHeader,CardTitle,generateHTML,+ type JSONContent,toast,- useDebounce,- type JSONContent+ useDebounce} from "@carbon/react";import { Editor } from "@carbon/react/Editor";import { nanoid } from "nanoid";diff --git a/apps/erp/app/modules/quality/ui/Issue/index.ts b/apps/erp/app/modules/quality/ui/Issue/index.tsindex 1d23146ceb..79f2e2f13c 100644--- a/apps/erp/app/modules/quality/ui/Issue/index.ts+++ b/apps/erp/app/modules/quality/ui/Issue/index.ts@@ -6,7 +6,7 @@ export * from "./IssueForm";export * from "./IssueHeader";export * from "./IssueIcons";export * from "./IssueProperties";-export * from "./IssuesTable";export * from "./IssueStatus";+export * from "./IssuesTable";export * from "./IssueTask";export * from "./ReviewersList";diff --git a/apps/erp/app/modules/resources/types.ts b/apps/erp/app/modules/resources/types.tsindex 321ae901c5..af21c867dd 100644--- a/apps/erp/app/modules/resources/types.ts+++ b/apps/erp/app/modules/resources/types.ts@@ -1,3 +1,7 @@+import type {+ trainingAssignmentStatusOptions,+ trainingFrequency+} from "./resources.models";import type {getAbilities,getAbility,@@ -12,10 +16,6 @@ import type {getTrainings,getWorkCenters} from "./resources.service";-import type {- trainingAssignmentStatusOptions,- trainingFrequency-} from "./resources.models";export type Ability = NonNullable<Awaited<ReturnType<typeof getAbility>>["data"]diff --git a/apps/erp/app/modules/resources/ui/Processes/index.ts b/apps/erp/app/modules/resources/ui/Processes/index.tsindex d740bcdade..a375947a62 100644--- a/apps/erp/app/modules/resources/ui/Processes/index.ts+++ b/apps/erp/app/modules/resources/ui/Processes/index.ts@@ -1,4 +1,4 @@-import ProcessForm from "./ProcessForm";import ProcessesTable from "./ProcessesTable";+import ProcessForm from "./ProcessForm";export { ProcessForm, ProcessesTable };diff --git a/apps/erp/app/modules/sales/types.ts b/apps/erp/app/modules/sales/types.tsindex 5597a7ba5f..b764296be0 100644--- a/apps/erp/app/modules/sales/types.ts+++ b/apps/erp/app/modules/sales/types.ts@@ -5,8 +5,8 @@ import type {getCustomer,getCustomerContacts,getCustomerLocations,- getCustomers,getCustomerStatuses,+ getCustomers,getCustomerTypes,getNoQuoteReasons,getOpportunity,@@ -17,11 +17,11 @@ import type {getQuoteMethodTrees,getQuoteOperation,getQuotePayment,- getQuotes,getQuoteShipment,+ getQuotes,getRelatedPricesForQuoteLine,- getSalesOrderLines,getSalesOrderLineShipments,+ getSalesOrderLines,getSalesOrderRelatedItems,getSalesOrders,getSalesRFQLines,diff --git a/apps/erp/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx b/apps/erp/app/modules/sales/ui/Customer/CustomerPaymentForm.tsxindex fc18d48dbd..90c2fa5fe8 100644--- a/apps/erp/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx+++ b/apps/erp/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx@@ -10,10 +10,10 @@ import {import { useState } from "react";import type { z } from "zod/v3";import {- CustomFormFields,Customer,CustomerContact,CustomerLocation,+ CustomFormFields,Hidden,Submit} from "~/components/Form";diff --git a/apps/erp/app/modules/sales/ui/CustomerStatuses/index.ts b/apps/erp/app/modules/sales/ui/CustomerStatuses/index.tsindex f9f84becc1..ea8d7ca1a7 100644--- a/apps/erp/app/modules/sales/ui/CustomerStatuses/index.ts+++ b/apps/erp/app/modules/sales/ui/CustomerStatuses/index.ts@@ -1,4 +1,4 @@-import CustomerStatusForm from "./CustomerStatusForm";import CustomerStatusesTable from "./CustomerStatusesTable";+import CustomerStatusForm from "./CustomerStatusForm";export { CustomerStatusForm, CustomerStatusesTable };diff --git a/apps/erp/app/modules/sales/ui/Opportunity/OpportunityLineNotes.tsx b/apps/erp/app/modules/sales/ui/Opportunity/OpportunityLineNotes.tsxindex 01b5483ae7..0a40f3bf70 100644--- a/apps/erp/app/modules/sales/ui/Opportunity/OpportunityLineNotes.tsx+++ b/apps/erp/app/modules/sales/ui/Opportunity/OpportunityLineNotes.tsx@@ -7,12 +7,12 @@ import {CardDescription,CardHeader,CardTitle,+ generateHTML,HStack,Tabs,TabsContent,TabsList,TabsTrigger,- generateHTML,toast,useDebounce} from "@carbon/react";diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesStatus.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesStatus.tsxindex 8e930d5a8f..c9916280de 100644--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesStatus.tsx+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesStatus.tsx@@ -1,5 +1,5 @@-import { Status } from "@carbon/react";import type { Database } from "@carbon/database";+import { Status } from "@carbon/react";type SalesOrderStatusProps = {status?: Database["public"]["Enums"]["salesOrderStatus"] | null;diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/index.ts b/apps/erp/app/modules/sales/ui/SalesOrder/index.tsindex 694f4f07ab..bcb24d9e48 100644--- a/apps/erp/app/modules/sales/ui/SalesOrder/index.ts+++ b/apps/erp/app/modules/sales/ui/SalesOrder/index.ts@@ -6,8 +6,8 @@ import { SalesOrderLineJobs } from "./SalesOrderLineJobs";import SalesOrderPaymentForm from "./SalesOrderPaymentForm";import SalesOrderProperties from "./SalesOrderProperties";import SalesOrderShipmentForm from "./SalesOrderShipmentForm";-import SalesOrdersTable from "./SalesOrdersTable";import SalesOrderSummary from "./SalesOrderSummary";+import SalesOrdersTable from "./SalesOrdersTable";import SalesStatus from "./SalesStatus";import { useSalesOrderTotals } from "./useSalesOrderTotals";diff --git a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQForm.tsx b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQForm.tsxindex 127f8e92be..34e113e9f0 100644--- a/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQForm.tsx+++ b/apps/erp/app/modules/sales/ui/SalesRFQ/SalesRFQForm.tsx@@ -6,16 +6,16 @@ import {CardFooter,CardHeader,CardTitle,- VStack,- cn+ cn,+ VStack} from "@carbon/react";import { useState } from "react";import type { z } from "zod/v3";import {- CustomFormFields,Customer,CustomerContact,CustomerLocation,+ CustomFormFields,DatePicker,Employee,Hidden,diff --git a/apps/erp/app/modules/settings/settings.models.ts b/apps/erp/app/modules/settings/settings.models.tsindex d8fe12e1eb..7eeb787ae8 100644--- a/apps/erp/app/modules/settings/settings.models.ts+++ b/apps/erp/app/modules/settings/settings.models.ts@@ -1,6 +1,6 @@import { labelSizes } from "@carbon/utils";-import { zfd } from "zod-form-data";import { z } from "zod/v3";+import { zfd } from "zod-form-data";import { DataType } from "~/modules/shared";export const modulesType = [diff --git a/apps/erp/app/modules/shared/imports.models.ts b/apps/erp/app/modules/shared/imports.models.tsindex a9f0c6ecb4..792c1436e6 100644--- a/apps/erp/app/modules/shared/imports.models.ts+++ b/apps/erp/app/modules/shared/imports.models.ts@@ -1,6 +1,7 @@import type { Database } from "@carbon/database";import type { SupabaseClient } from "@supabase/supabase-js";import { z } from "zod/v3";+// to avoid a circular dependencyconst methodType = ["Buy", "Make", "Pick"] as const;const itemReplenishmentSystems = ["Buy", "Make", "Buy and Make"] as const;diff --git a/apps/erp/app/modules/users/ui/index.ts b/apps/erp/app/modules/users/ui/index.tsindex 08251fc188..a0e8ac2cbe 100644--- a/apps/erp/app/modules/users/ui/index.ts+++ b/apps/erp/app/modules/users/ui/index.ts@@ -1,9 +1,9 @@import useUsersSubmodules from "./useUsersSubmodules";export * from "./Customers";-export * from "./EmployeeTypes";+export * from "./components";export * from "./Employees";+export * from "./EmployeeTypes";export * from "./Groups";export * from "./Suppliers";-export * from "./components";export { useUsersSubmodules };diff --git a/apps/erp/app/routes/api+/ai+/chat+/agents/shared/agent.ts b/apps/erp/app/routes/api+/ai+/chat+/agents/shared/agent.tsindex 65df4b3c5d..b843a00804 100644--- a/apps/erp/app/routes/api+/ai+/chat+/agents/shared/agent.ts+++ b/apps/erp/app/routes/api+/ai+/chat+/agents/shared/agent.ts@@ -1,6 +1,6 @@+import { openai } from "@ai-sdk/openai";import { Agent, type AgentConfig } from "@ai-sdk-tools/agents";import { UpstashProvider } from "@ai-sdk-tools/memory/upstash";-import { openai } from "@ai-sdk/openai";import { UPSTASH_REDIS_REST_TOKEN, UPSTASH_REDIS_REST_URL } from "@carbon/auth";import { Redis } from "@upstash/redis";import type { ChatContext } from "./context";diff --git a/apps/erp/app/routes/api+/ai+/chat+/tools/create-purchase-order.ts b/apps/erp/app/routes/api+/ai+/chat+/tools/create-purchase-order.tsindex 6d17581ac3..195ad051e6 100644--- a/apps/erp/app/routes/api+/ai+/chat+/tools/create-purchase-order.ts+++ b/apps/erp/app/routes/api+/ai+/chat+/tools/create-purchase-order.ts@@ -1,6 +1,9 @@+import { getAppUrl, getCarbonServiceRole } from "@carbon/auth";import { tool } from "ai";+import { LuShoppingCart } from "react-icons/lu";import { z } from "zod/v3";import { getCurrencyByCode } from "~/modules/accounting/accounting.service";+import { getEmployeeJob } from "~/modules/people/people.service";import {deletePurchaseOrder,getSupplier as getSupplierById,@@ -8,10 +11,6 @@ import {getSupplierShipping,insertSupplierInteraction} from "~/modules/purchasing/purchasing.service";--import { getAppUrl, getCarbonServiceRole } from "@carbon/auth";-import { LuShoppingCart } from "react-icons/lu";-import { getEmployeeJob } from "~/modules/people/people.service";import { getNextSequence } from "~/modules/settings";import { path } from "~/utils/path";import type { ChatContext } from "../agents/shared/context";diff --git a/apps/erp/app/routes/onboarding+/company.tsx b/apps/erp/app/routes/onboarding+/company.tsxindex 48fb6365c4..c223c100ff 100644--- a/apps/erp/app/routes/onboarding+/company.tsx+++ b/apps/erp/app/routes/onboarding+/company.tsx@@ -76,7 +76,7 @@ export async function action({ request }: ActionFunctionArgs) {const serviceRole = getCarbonServiceRole();- const { next, ...data } = validation.data;+ const { next, ...d } = validation.data;let companyId: string | undefined;@@ -89,12 +89,12 @@ export async function action({ request }: ActionFunctionArgs) {if (company && location) {const [companyUpdate, locationUpdate] = await Promise.all([updateCompany(serviceRole, company.id!, {- ...data,+ ...d,updatedBy: userId}),upsertLocation(serviceRole, {...location,- ...data,+ ...d,timezone: getLocalTimeZone(),updatedBy: userId})@@ -110,7 +110,7 @@ export async function action({ request }: ActionFunctionArgs) {} else {if (!companyId) {const [companyInsert] = await Promise.all([- insertCompany(serviceRole, data, userId)+ insertCompany(serviceRole, d, userId)]);if (companyInsert.error) {console.error(companyInsert.error);@@ -139,7 +139,7 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { baseCurrencyCode, website, ...locationData } = data;+ const { baseCurrencyCode, website, ...locationData } = d;// TODO: move all of this to transactionconst [locationInsert] = await Promise.all([diff --git a/apps/erp/app/routes/x+/accounting+/categories.$categoryId.tsx b/apps/erp/app/routes/x+/accounting+/categories.$categoryId.tsxindex 3065c95ec2..774f173b18 100644--- a/apps/erp/app/routes/x+/accounting+/categories.$categoryId.tsx+++ b/apps/erp/app/routes/x+/accounting+/categories.$categoryId.tsx@@ -55,12 +55,12 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("ID is was not found");const updateCategory = await upsertAccountCategory(client, {id,- ...data,+ ...d,customFields: setCustomFields(formData),updatedBy: userId});diff --git a/apps/erp/app/routes/x+/accounting+/categories.list.$categoryId.new.tsx b/apps/erp/app/routes/x+/accounting+/categories.list.$categoryId.new.tsxindex f803de17e4..3cd37401d7 100644--- a/apps/erp/app/routes/x+/accounting+/categories.list.$categoryId.new.tsx+++ b/apps/erp/app/routes/x+/accounting+/categories.list.$categoryId.new.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";-import { redirect, useNavigate, useParams } from "react-router";+import { data, redirect, useNavigate, useParams } from "react-router";import {accountSubcategoryValidator,upsertAccountSubcategory@@ -29,10 +29,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createSubcategory = await upsertAccountSubcategory(client, {- ...data,+ ...d,customFields: setCustomFields(formData),createdBy: userId});diff --git a/apps/erp/app/routes/x+/accounting+/categories.new.tsx b/apps/erp/app/routes/x+/accounting+/categories.new.tsxindex 377b356f11..cfdba4a4e6 100644--- a/apps/erp/app/routes/x+/accounting+/categories.new.tsx+++ b/apps/erp/app/routes/x+/accounting+/categories.new.tsx@@ -30,10 +30,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createAccountCategory = await upsertAccountCategory(client, {- ...data,+ ...d,companyId,customFields: setCustomFields(formData),createdBy: userIddiff --git a/apps/erp/app/routes/x+/accounting+/charts.$accountId.tsx b/apps/erp/app/routes/x+/accounting+/charts.$accountId.tsxindex 60d3149fb1..dd9333c9b8 100644--- a/apps/erp/app/routes/x+/accounting+/charts.$accountId.tsx+++ b/apps/erp/app/routes/x+/accounting+/charts.$accountId.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData } from "react-router";+import { data, redirect, useLoaderData } from "react-router";import {accountValidator,getAccount,@@ -42,12 +42,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateAccount = await upsertAccount(client, {id,- ...data,+ ...d,customFields: setCustomFields(formData),updatedBy: userId});diff --git a/apps/erp/app/routes/x+/accounting+/charts.new.tsx b/apps/erp/app/routes/x+/accounting+/charts.new.tsxindex 3879a42ac1..850332e947 100644--- a/apps/erp/app/routes/x+/accounting+/charts.new.tsx+++ b/apps/erp/app/routes/x+/accounting+/charts.new.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect } from "react-router";+import { data, redirect } from "react-router";import type {AccountClass,AccountConsolidatedRate,@@ -37,10 +37,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertAccount = await upsertAccount(client, {- ...data,+ ...d,companyId,customFields: setCustomFields(formData),createdBy: userIddiff --git a/apps/erp/app/routes/x+/accounting+/currencies.$currencyId.tsx b/apps/erp/app/routes/x+/accounting+/currencies.$currencyId.tsxindex c3861c6b40..fa44c5e814 100644--- a/apps/erp/app/routes/x+/accounting+/currencies.$currencyId.tsx+++ b/apps/erp/app/routes/x+/accounting+/currencies.$currencyId.tsx@@ -7,7 +7,7 @@ import type {ClientActionFunctionArgs,LoaderFunctionArgs} from "react-router";-import { redirect, useLoaderData } from "react-router";+import { data, redirect, useLoaderData } from "react-router";import {currencyValidator,getCurrency,@@ -47,12 +47,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateCurrency = await upsertCurrency(client, {id,- ...data,+ ...d,companyId,customFields: setCustomFields(formData),updatedBy: userIddiff --git a/apps/erp/app/routes/x+/accounting+/payment-terms.$paymentTermId.tsx b/apps/erp/app/routes/x+/accounting+/payment-terms.$paymentTermId.tsxindex 5da311c64b..0e9fa514bb 100644--- a/apps/erp/app/routes/x+/accounting+/payment-terms.$paymentTermId.tsx+++ b/apps/erp/app/routes/x+/accounting+/payment-terms.$paymentTermId.tsx@@ -7,7 +7,7 @@ import type {ClientActionFunctionArgs,LoaderFunctionArgs} from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import type { PaymentTermCalculationMethod } from "~/modules/accounting";import {getPaymentTerm,@@ -48,12 +48,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updatePaymentTerm = await upsertPaymentTerm(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/accounting+/subcategory.$subcategoryId.tsx b/apps/erp/app/routes/x+/accounting+/subcategory.$subcategoryId.tsxindex 9eeb24ece2..60b89f2176 100644--- a/apps/erp/app/routes/x+/accounting+/subcategory.$subcategoryId.tsx+++ b/apps/erp/app/routes/x+/accounting+/subcategory.$subcategoryId.tsx@@ -30,11 +30,11 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const update = await upsertAccountSubcategory(client, {id: subcategoryId,- ...data,+ ...d,customFields: setCustomFields(formData),updatedBy: userId});diff --git a/apps/erp/app/routes/x+/consumable+/$itemId.view.purchasing.new.tsx b/apps/erp/app/routes/x+/consumable+/$itemId.view.purchasing.new.tsxindex 3672d51194..ad0e6361b4 100644--- a/apps/erp/app/routes/x+/consumable+/$itemId.view.purchasing.new.tsx+++ b/apps/erp/app/routes/x+/consumable+/$itemId.view.purchasing.new.tsx@@ -27,10 +27,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createConsumableSupplier = await upsertSupplierPart(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/customer+/$customerId.accounting.tsx b/apps/erp/app/routes/x+/customer+/$customerId.accounting.tsxindex 11e8ccf6e0..710ca1c6b2 100644--- a/apps/erp/app/routes/x+/customer+/$customerId.accounting.tsx+++ b/apps/erp/app/routes/x+/customer+/$customerId.accounting.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";-import { redirect, useParams } from "react-router";+import { data, redirect, useParams } from "react-router";import { useRouteData } from "~/hooks";import type { CustomerDetail } from "~/modules/sales";import {@@ -27,7 +27,7 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) {throw redirect(@@ -38,7 +38,7 @@ export async function action({ request }: ActionFunctionArgs) {const update = await updateCustomerAccounting(client, {id,- ...data,+ ...d,updatedBy: userId});diff --git a/apps/erp/app/routes/x+/customer+/$customerId.details.tsx b/apps/erp/app/routes/x+/customer+/$customerId.details.tsxindex ff79e98808..d4bf58b0e6 100644--- a/apps/erp/app/routes/x+/customer+/$customerId.details.tsx+++ b/apps/erp/app/routes/x+/customer+/$customerId.details.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";-import { redirect, useParams } from "react-router";+import { data, redirect, useParams } from "react-router";import { useRouteData } from "~/hooks";import type { CustomerDetail } from "~/modules/sales";import { customerValidator, upsertCustomer } from "~/modules/sales";@@ -24,7 +24,7 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) {throw redirect(@@ -35,7 +35,7 @@ export async function action({ request }: ActionFunctionArgs) {const update = await upsertCustomer(client, {id,- ...data,+ ...d,customFields: setCustomFields(formData),updatedBy: userId});diff --git a/apps/erp/app/routes/x+/inventory+/batch-property+/$itemId.property.tsx b/apps/erp/app/routes/x+/inventory+/batch-property+/$itemId.property.tsxindex 8a5a7e014d..80551b7210 100644--- a/apps/erp/app/routes/x+/inventory+/batch-property+/$itemId.property.tsx+++ b/apps/erp/app/routes/x+/inventory+/batch-property+/$itemId.property.tsx@@ -26,11 +26,11 @@ export async function action({ request, params }: ActionFunctionArgs) {};}- const { listOptions, ...data } = validation.data;+ const { listOptions, ...d } = validation.data;const upsert = await upsertBatchProperty(client, {- ...data,- listOptions: data.dataType === "list" ? listOptions : undefined,+ ...d,+ listOptions: d.dataType === "list" ? listOptions : undefined,companyId,userId});diff --git a/apps/erp/app/routes/x+/inventory+/kanbans.$id.tsx b/apps/erp/app/routes/x+/inventory+/kanbans.$id.tsxindex 20b9d7c702..50ea9a6c47 100644--- a/apps/erp/app/routes/x+/inventory+/kanbans.$id.tsx+++ b/apps/erp/app/routes/x+/inventory+/kanbans.$id.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import {getKanban,KanbanForm,@@ -41,12 +41,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateKanban = await upsertKanban(client, {id,- ...data,+ ...d,updatedBy: userId});diff --git a/apps/erp/app/routes/x+/inventory+/kanbans.new.tsx b/apps/erp/app/routes/x+/inventory+/kanbans.new.tsxindex 54fddd0bda..eda0106731 100644--- a/apps/erp/app/routes/x+/inventory+/kanbans.new.tsx+++ b/apps/erp/app/routes/x+/inventory+/kanbans.new.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useNavigate, useSearchParams } from "react-router";+import { data, redirect, useNavigate, useSearchParams } from "react-router";import { useUser } from "~/hooks";import { KanbanForm, kanbanValidator, upsertKanban } from "~/modules/inventory";import { getParams, path } from "~/utils/path";@@ -31,10 +31,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createKanban = await upsertKanban(client, {- ...data,+ ...d,companyId,createdBy: userId});diff --git a/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.adjustment.tsx b/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.adjustment.tsxindex 59690b1f9a..5a3c2c6f83 100644--- a/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.adjustment.tsx+++ b/apps/erp/app/routes/x+/inventory+/quantities+/$itemId.adjustment.tsx@@ -27,10 +27,10 @@ export async function action({ request, params }: ActionFunctionArgs) {if (validation.error) {return validationError(validation.error);}- const { ...data } = validation.data;+ const { ...d } = validation.data;const itemLedger = await insertManualInventoryAdjustment(client, {- ...data,+ ...d,companyId,createdBy: userId});diff --git a/apps/erp/app/routes/x+/inventory+/shelves.$shelfId.tsx b/apps/erp/app/routes/x+/inventory+/shelves.$shelfId.tsxindex 20275f4e6c..2dd3a78b54 100644--- a/apps/erp/app/routes/x+/inventory+/shelves.$shelfId.tsx+++ b/apps/erp/app/routes/x+/inventory+/shelves.$shelfId.tsx@@ -7,7 +7,7 @@ import type {ClientActionFunctionArgs,LoaderFunctionArgs} from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import {getShelf,ShelfForm,@@ -47,12 +47,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateShelf = await upsertShelf(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/inventory+/shipping-methods.$shippingMethodId.tsx b/apps/erp/app/routes/x+/inventory+/shipping-methods.$shippingMethodId.tsxindex eb76c35f1e..ffb7303e2a 100644--- a/apps/erp/app/routes/x+/inventory+/shipping-methods.$shippingMethodId.tsx+++ b/apps/erp/app/routes/x+/inventory+/shipping-methods.$shippingMethodId.tsx@@ -7,7 +7,7 @@ import type {ClientActionFunctionArgs,LoaderFunctionArgs} from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import type { ShippingCarrier } from "~/modules/inventory";import {getShippingMethod,@@ -50,12 +50,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateShippingMethod = await upsertShippingMethod(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/issue-workflow+/$id.tsx b/apps/erp/app/routes/x+/issue-workflow+/$id.tsxindex e772ef173b..bab5ba027a 100644--- a/apps/erp/app/routes/x+/issue-workflow+/$id.tsx+++ b/apps/erp/app/routes/x+/issue-workflow+/$id.tsx@@ -5,7 +5,13 @@ import { validationError, validator } from "@carbon/form";import { ScrollArea } from "@carbon/react";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData, useNavigate, useParams } from "react-router";+import {+ data,+ redirect,+ useLoaderData,+ useNavigate,+ useParams+} from "react-router";import {getIssueWorkflow,getRequiredActionsList,@@ -65,12 +71,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("Could not find id");const updateIssueWorkflow = await upsertIssueWorkflow(client, {id,- ...data,+ ...d,companyId,updatedBy: userId});diff --git a/apps/erp/app/routes/x+/issue-workflow+/new.tsx b/apps/erp/app/routes/x+/issue-workflow+/new.tsxindex 942d60aa37..4e3c199357 100644--- a/apps/erp/app/routes/x+/issue-workflow+/new.tsx+++ b/apps/erp/app/routes/x+/issue-workflow+/new.tsx@@ -4,7 +4,7 @@ import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import { ScrollArea } from "@carbon/react";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import { issueWorkflowValidator } from "~/modules/quality/quality.models";import {getRequiredActionsList,@@ -38,10 +38,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertIssueWorkflow = await upsertIssueWorkflow(client, {- ...data,+ ...d,companyId,createdBy: userId});diff --git a/apps/erp/app/routes/x+/items+/methods+/operation.parameter.$id.tsx b/apps/erp/app/routes/x+/items+/methods+/operation.parameter.$id.tsxindex fd49bd6f8e..33768990df 100644--- a/apps/erp/app/routes/x+/items+/methods+/operation.parameter.$id.tsx+++ b/apps/erp/app/routes/x+/items+/methods+/operation.parameter.$id.tsx@@ -2,7 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validator } from "@carbon/form";-import { type ActionFunctionArgs } from "react-router";+import { type ActionFunctionArgs, data } from "react-router";import { upsertMethodOperationParameter } from "~/modules/items";import { operationParameterValidator } from "~/modules/shared";@@ -26,11 +26,11 @@ export async function action({ request, params }: ActionFunctionArgs) {return { success: false, message: "Invalid form data" };}- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const update = await upsertMethodOperationParameter(client, {id,- ...data,+ ...d,companyId,updatedBy: userId,updatedAt: new Date().toISOString()diff --git a/apps/erp/app/routes/x+/items+/methods+/operation.step.$id.tsx b/apps/erp/app/routes/x+/items+/methods+/operation.step.$id.tsxindex 013d64c600..ee23f13ed4 100644--- a/apps/erp/app/routes/x+/items+/methods+/operation.step.$id.tsx+++ b/apps/erp/app/routes/x+/items+/methods+/operation.step.$id.tsx@@ -2,7 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validator } from "@carbon/form";-import { type ActionFunctionArgs } from "react-router";+import { type ActionFunctionArgs, data } from "react-router";import { upsertMethodOperationStep } from "~/modules/items";import { operationStepValidator } from "~/modules/shared";@@ -24,13 +24,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return { success: false, message: "Invalid form data" };}- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const update = await upsertMethodOperationStep(client, {id,- ...data,- minValue: data.minValue ?? null,- maxValue: data.maxValue ?? null,+ ...d,+ minValue: d.minValue ?? null,+ maxValue: d.maxValue ?? null,updatedBy: userId,updatedAt: new Date().toISOString()});diff --git a/apps/erp/app/routes/x+/items+/methods+/operation.tool.$id.tsx b/apps/erp/app/routes/x+/items+/methods+/operation.tool.$id.tsxindex d2f51f46ab..297bfc372b 100644--- a/apps/erp/app/routes/x+/items+/methods+/operation.tool.$id.tsx+++ b/apps/erp/app/routes/x+/items+/methods+/operation.tool.$id.tsx@@ -2,7 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validator } from "@carbon/form";-import { type ActionFunctionArgs } from "react-router";+import { type ActionFunctionArgs, data } from "react-router";import { upsertMethodOperationTool } from "~/modules/items";import { operationToolValidator } from "~/modules/shared";@@ -24,11 +24,11 @@ export async function action({ request, params }: ActionFunctionArgs) {return { success: false, message: "Invalid form data" };}- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const update = await upsertMethodOperationTool(client, {id,- ...data,+ ...d,companyId,updatedBy: userId,updatedAt: new Date().toISOString()diff --git a/apps/erp/app/routes/x+/items+/substances.new.tsx b/apps/erp/app/routes/x+/items+/substances.new.tsxindex 6a2a03ff7d..28f58602df 100644--- a/apps/erp/app/routes/x+/items+/substances.new.tsx+++ b/apps/erp/app/routes/x+/items+/substances.new.tsx@@ -38,10 +38,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertMaterialSubstance = await upsertMaterialSubstance(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/items+/types.new.tsx b/apps/erp/app/routes/x+/items+/types.new.tsxindex e211a88e2d..40dee85211 100644--- a/apps/erp/app/routes/x+/items+/types.new.tsx+++ b/apps/erp/app/routes/x+/items+/types.new.tsx@@ -38,10 +38,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertMaterialType = await upsertMaterialType(client, {- ...data,+ ...d,companyId});if (insertMaterialType.error) {diff --git a/apps/erp/app/routes/x+/items+/uom.$uomId.tsx b/apps/erp/app/routes/x+/items+/uom.$uomId.tsxindex f40a8be0f3..3b601f5934 100644--- a/apps/erp/app/routes/x+/items+/uom.$uomId.tsx+++ b/apps/erp/app/routes/x+/items+/uom.$uomId.tsx@@ -7,7 +7,7 @@ import type {ClientActionFunctionArgs,LoaderFunctionArgs} from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import {getUnitOfMeasure,unitOfMeasureValidator,@@ -47,12 +47,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw notFound("id not found");const updateUnitOfMeasure = await upsertUnitOfMeasure(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/items+/uom.new.tsx b/apps/erp/app/routes/x+/items+/uom.new.tsxindex 7e08ea4894..5b56ddea9d 100644--- a/apps/erp/app/routes/x+/items+/uom.new.tsx+++ b/apps/erp/app/routes/x+/items+/uom.new.tsx@@ -38,10 +38,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertUnitOfMeasure = await upsertUnitOfMeasure(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/job+/$jobId.details.tsx b/apps/erp/app/routes/x+/job+/$jobId.details.tsxindex a958d59f71..9736a050e9 100644--- a/apps/erp/app/routes/x+/job+/$jobId.details.tsx+++ b/apps/erp/app/routes/x+/job+/$jobId.details.tsx@@ -80,11 +80,11 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { jobId, ...data } = validation.data;+ const { jobId, ...d } = validation.data;if (!jobId) throw new Error("Could not find jobId in payload");const updateJob = await upsertJob(client, {- ...data,+ ...d,id: id,jobId,customFields: setCustomFields(formData),diff --git a/apps/erp/app/routes/x+/job+/$jobId.events.$id.tsx b/apps/erp/app/routes/x+/job+/$jobId.events.$id.tsxindex fb6e06014d..7f2f2d4211 100644--- a/apps/erp/app/routes/x+/job+/$jobId.events.$id.tsx+++ b/apps/erp/app/routes/x+/job+/$jobId.events.$id.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData } from "react-router";+import { data, redirect, useLoaderData } from "react-router";import {getJobOperations,getProductionEvent,@@ -62,12 +62,12 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const update = await upsertProductionEvent(client, {id,- ...data,+ ...d,companyId,updatedBy: userId});diff --git a/apps/erp/app/routes/x+/job+/$jobId.events.new.tsx b/apps/erp/app/routes/x+/job+/$jobId.events.new.tsxindex c62f7f15b0..5b4f60a8f7 100644--- a/apps/erp/app/routes/x+/job+/$jobId.events.new.tsx+++ b/apps/erp/app/routes/x+/job+/$jobId.events.new.tsx@@ -54,10 +54,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insert = await upsertProductionEvent(client, {- ...data,+ ...d,companyId,createdBy: userId});diff --git a/apps/erp/app/routes/x+/job+/$jobId.quantities.$id.tsx b/apps/erp/app/routes/x+/job+/$jobId.quantities.$id.tsxindex 6bd0d7c800..b8692ab4d7 100644--- a/apps/erp/app/routes/x+/job+/$jobId.quantities.$id.tsx+++ b/apps/erp/app/routes/x+/job+/$jobId.quantities.$id.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData } from "react-router";+import { data, redirect, useLoaderData } from "react-router";import {getProductionQuantity,productionQuantityValidator,@@ -45,17 +45,17 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");// If the type is not Scrap, set the scrapReasonId and notes to null- if (data.type !== "Scrap") {- data.scrapReasonId = undefined;+ if (d.type !== "Scrap") {+ d.scrapReasonId = undefined;}const update = await updateProductionQuantity(client, {id,- ...data,+ ...d,companyId,updatedBy: userId});diff --git a/apps/erp/app/routes/x+/job+/methods+/operation.parameter.$id.tsx b/apps/erp/app/routes/x+/job+/methods+/operation.parameter.$id.tsxindex 924acb72df..e24c7ade51 100644--- a/apps/erp/app/routes/x+/job+/methods+/operation.parameter.$id.tsx+++ b/apps/erp/app/routes/x+/job+/methods+/operation.parameter.$id.tsx@@ -2,7 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validator } from "@carbon/form";-import { type ActionFunctionArgs } from "react-router";+import { type ActionFunctionArgs, data } from "react-router";import { upsertJobOperationParameter } from "~/modules/production";import { operationParameterValidator } from "~/modules/shared";@@ -26,11 +26,11 @@ export async function action({ request, params }: ActionFunctionArgs) {return { success: false, message: "Invalid form data" };}- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const update = await upsertJobOperationParameter(client, {id,- ...data,+ ...d,companyId,updatedBy: userId,updatedAt: new Date().toISOString()diff --git a/apps/erp/app/routes/x+/job+/methods+/operation.step.$id.tsx b/apps/erp/app/routes/x+/job+/methods+/operation.step.$id.tsxindex 3b86b2bb29..00d37212cc 100644--- a/apps/erp/app/routes/x+/job+/methods+/operation.step.$id.tsx+++ b/apps/erp/app/routes/x+/job+/methods+/operation.step.$id.tsx@@ -2,7 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validator } from "@carbon/form";-import { type ActionFunctionArgs } from "react-router";+import { type ActionFunctionArgs, data } from "react-router";import { upsertJobOperationStep } from "~/modules/production";import { operationStepValidator } from "~/modules/shared";@@ -24,13 +24,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return { success: false, message: "Invalid form data" };}- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const update = await upsertJobOperationStep(client, {id,- ...data,- minValue: data.minValue ?? null,- maxValue: data.maxValue ?? null,+ ...d,+ minValue: d.minValue ?? null,+ maxValue: d.maxValue ?? null,companyId,updatedBy: userId,updatedAt: new Date().toISOString()diff --git a/apps/erp/app/routes/x+/job+/methods+/operation.tool.$id.tsx b/apps/erp/app/routes/x+/job+/methods+/operation.tool.$id.tsxindex 2c3cb9ab51..909c298b90 100644--- a/apps/erp/app/routes/x+/job+/methods+/operation.tool.$id.tsx+++ b/apps/erp/app/routes/x+/job+/methods+/operation.tool.$id.tsx@@ -2,7 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validator } from "@carbon/form";-import { type ActionFunctionArgs } from "react-router";+import { type ActionFunctionArgs, data } from "react-router";import { upsertJobOperationTool } from "~/modules/production";import { operationToolValidator } from "~/modules/shared";@@ -24,11 +24,11 @@ export async function action({ request, params }: ActionFunctionArgs) {return { success: false, message: "Invalid form data" };}- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const update = await upsertJobOperationTool(client, {id,- ...data,+ ...d,companyId,updatedBy: userId,updatedAt: new Date().toISOString()diff --git a/apps/erp/app/routes/x+/job+/new.tsx b/apps/erp/app/routes/x+/job+/new.tsxindex 90e0dd93b6..ec8bdddb07 100644--- a/apps/erp/app/routes/x+/job+/new.tsx+++ b/apps/erp/app/routes/x+/job+/new.tsx@@ -73,12 +73,12 @@ export async function action({ request }: ActionFunctionArgs) {}if (!jobId) throw new Error("jobId is not defined");- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;let configuration = undefined;- if (data.configuration) {+ if (d.configuration) {try {- configuration = JSON.parse(data.configuration);+ configuration = JSON.parse(d.configuration);} catch (error) {console.error(error);}@@ -93,20 +93,20 @@ export async function action({ request }: ActionFunctionArgs) {// Calculate priority based on due date and deadline typeconst priority = await calculateJobPriority(client, {- dueDate: data.dueDate ?? null,- deadlineType: data.deadlineType,+ dueDate: d.dueDate ?? null,+ deadlineType: d.deadlineType,companyId,locationId: validation.data.locationId});const createJob = await upsertJob(client, {- ...data,+ ...d,jobId,configuration,priority,shelfId: shelfId ?? undefined,- startDate: data.dueDate- ? parseDate(data.dueDate).subtract({ days: leadTime }).toString()+ startDate: d.dueDate+ ? parseDate(d.dueDate).subtract({ days: leadTime }).toString(): undefined,companyId,createdBy: userId,@@ -125,7 +125,7 @@ export async function action({ request }: ActionFunctionArgs) {getCarbonServiceRole(),"itemToJob",{- sourceId: data.itemId,+ sourceId: d.itemId,targetId: id,companyId,userId,diff --git a/apps/erp/app/routes/x+/material+/$itemId.view.purchasing.new.tsx b/apps/erp/app/routes/x+/material+/$itemId.view.purchasing.new.tsxindex 3fa076434d..ae11e7a8e3 100644--- a/apps/erp/app/routes/x+/material+/$itemId.view.purchasing.new.tsx+++ b/apps/erp/app/routes/x+/material+/$itemId.view.purchasing.new.tsx@@ -27,10 +27,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createMaterialSupplier = await upsertSupplierPart(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/part+/$itemId.parameter.tsx b/apps/erp/app/routes/x+/part+/$itemId.parameter.tsxindex 4359868f0d..8bb903c1d8 100644--- a/apps/erp/app/routes/x+/part+/$itemId.parameter.tsx+++ b/apps/erp/app/routes/x+/part+/$itemId.parameter.tsx@@ -28,11 +28,11 @@ export async function action({ request, params }: ActionFunctionArgs) {};}- const { listOptions, ...data } = validation.data;+ const { listOptions, ...d } = validation.data;const upsert = await upsertConfigurationParameter(client, {- ...data,- listOptions: data.dataType === "list" ? listOptions : undefined,+ ...d,+ listOptions: d.dataType === "list" ? listOptions : undefined,companyId,userId});diff --git a/apps/erp/app/routes/x+/part+/$itemId.view.purchasing.new.tsx b/apps/erp/app/routes/x+/part+/$itemId.view.purchasing.new.tsxindex 210c1d1a1c..157ba06725 100644--- a/apps/erp/app/routes/x+/part+/$itemId.view.purchasing.new.tsx+++ b/apps/erp/app/routes/x+/part+/$itemId.view.purchasing.new.tsx@@ -30,10 +30,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createPartSupplier = await upsertSupplierPart(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/part+/$itemId.view.sales.customer-parts.$customerPartToItemId.tsx b/apps/erp/app/routes/x+/part+/$itemId.view.sales.customer-parts.$customerPartToItemId.tsxindex fd295b8b6e..512cb058fd 100644--- a/apps/erp/app/routes/x+/part+/$itemId.view.sales.customer-parts.$customerPartToItemId.tsx+++ b/apps/erp/app/routes/x+/part+/$itemId.view.sales.customer-parts.$customerPartToItemId.tsx@@ -60,11 +60,11 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const updatedCustomerPart = await upsertItemCustomerPart(client, {id: customerPartToItemId,- ...data+ ...d});if (updatedCustomerPart.error) {diff --git a/apps/erp/app/routes/x+/part+/$itemId.view.sales.customer-parts.new.tsx b/apps/erp/app/routes/x+/part+/$itemId.view.sales.customer-parts.new.tsxindex e1f3521ece..20248034dd 100644--- a/apps/erp/app/routes/x+/part+/$itemId.view.sales.customer-parts.new.tsx+++ b/apps/erp/app/routes/x+/part+/$itemId.view.sales.customer-parts.new.tsx@@ -46,10 +46,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createCustomerPart = await upsertItemCustomerPart(client, {- ...data,+ ...d,companyId});diff --git a/apps/erp/app/routes/x+/people+/departments.$departmentId.tsx b/apps/erp/app/routes/x+/people+/departments.$departmentId.tsxindex 7122b4b91c..31b0b9092f 100644--- a/apps/erp/app/routes/x+/people+/departments.$departmentId.tsx+++ b/apps/erp/app/routes/x+/people+/departments.$departmentId.tsx@@ -48,12 +48,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw notFound("Department ID was not found");const updateDepartment = await upsertDepartment(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/people+/departments.new.tsx b/apps/erp/app/routes/x+/people+/departments.new.tsxindex ac0886a668..ad9fb23d46 100644--- a/apps/erp/app/routes/x+/people+/departments.new.tsx+++ b/apps/erp/app/routes/x+/people+/departments.new.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";-import { data, json, redirect, useNavigate } from "react-router";+import { data, redirect, useNavigate } from "react-router";import { departmentValidator, upsertDepartment } from "~/modules/people";import { DepartmentForm } from "~/modules/people/ui/Departments";import { setCustomFields } from "~/utils/form";@@ -25,10 +25,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createDepartment = await upsertDepartment(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/people+/holidays.new.tsx b/apps/erp/app/routes/x+/people+/holidays.new.tsxindex 3b19510e19..e590aba6de 100644--- a/apps/erp/app/routes/x+/people+/holidays.new.tsx+++ b/apps/erp/app/routes/x+/people+/holidays.new.tsx@@ -23,10 +23,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createHoliday = await upsertHoliday(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/people+/shifts.$shiftId.tsx b/apps/erp/app/routes/x+/people+/shifts.$shiftId.tsxindex f147ee0abe..3e695e89f2 100644--- a/apps/erp/app/routes/x+/people+/shifts.$shiftId.tsx+++ b/apps/erp/app/routes/x+/people+/shifts.$shiftId.tsx@@ -44,12 +44,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("Shift ID is required");const createShift = await upsertShift(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/people+/shifts.new.tsx b/apps/erp/app/routes/x+/people+/shifts.new.tsxindex 965d639bba..61f7dc05ec 100644--- a/apps/erp/app/routes/x+/people+/shifts.new.tsx+++ b/apps/erp/app/routes/x+/people+/shifts.new.tsx@@ -23,10 +23,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createShift = await upsertShift(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/production+/procedures.new.tsx b/apps/erp/app/routes/x+/production+/procedures.new.tsxindex 84ebdf9ac5..a9e2d993fe 100644--- a/apps/erp/app/routes/x+/production+/procedures.new.tsx+++ b/apps/erp/app/routes/x+/production+/procedures.new.tsx@@ -7,7 +7,7 @@ import type {ClientActionFunctionArgs,LoaderFunctionArgs} from "react-router";-import { redirect, useNavigate } from "react-router";+import { data, redirect, useNavigate } from "react-router";import { procedureValidator } from "~/modules/production/production.models";import { upsertProcedure } from "~/modules/production/production.service";import ProcedureForm from "~/modules/production/ui/Procedures/ProcedureForm";@@ -35,7 +35,7 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, content, ...data } = validation.data;+ const { id, content, ...d } = validation.data;let contentJSON;try {@@ -55,7 +55,7 @@ export async function action({ request }: ActionFunctionArgs) {}const insertProcedure = await upsertProcedure(client, {- ...data,+ ...d,content: contentJSON,companyId,createdBy: userIddiff --git a/apps/erp/app/routes/x+/production+/scrap-reasons.$scrapReasonId.tsx b/apps/erp/app/routes/x+/production+/scrap-reasons.$scrapReasonId.tsxindex 80d4cc96bf..aca9658dfc 100644--- a/apps/erp/app/routes/x+/production+/scrap-reasons.$scrapReasonId.tsx+++ b/apps/erp/app/routes/x+/production+/scrap-reasons.$scrapReasonId.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import {getScrapReason,scrapReasonValidator,@@ -52,12 +52,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateScrapReason = await upsertScrapReason(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/production+/scrap-reasons.new.tsx b/apps/erp/app/routes/x+/production+/scrap-reasons.new.tsxindex 10817b6225..3116996a81 100644--- a/apps/erp/app/routes/x+/production+/scrap-reasons.new.tsx+++ b/apps/erp/app/routes/x+/production+/scrap-reasons.new.tsx@@ -33,10 +33,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertScrapReason = await upsertScrapReason(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.$lineId.details.tsx b/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.$lineId.details.tsxindex e9d1ab9773..c45824cdd1 100644--- a/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.$lineId.details.tsx+++ b/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.$lineId.details.tsx@@ -67,27 +67,27 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;-- // if (data.invoiceLineType === "G/L Account") {- // data.assetId = undefined;- // data.itemId = undefined;- // } else if (data.invoiceLineType === "Fixed Asset") {- // data.accountNumber = undefined;- // data.itemId = undefined;+ const { id, ...d } = validation.data;++ // if (d.invoiceLineType === "G/L Account") {+ // d.assetId = undefined;+ // d.itemId = undefined;+ // } else if (d.invoiceLineType === "Fixed Asset") {+ // d.accountNumber = undefined;+ // d.itemId = undefined;// } else- // if (data.invoiceLineType === "Comment") {- // data.accountNumber = undefined;- // data.assetId = undefined;- // data.itemId = undefined;+ // if (d.invoiceLineType === "Comment") {+ // d.accountNumber = undefined;+ // d.assetId = undefined;+ // d.itemId = undefined;// } else {- // data.accountNumber = undefined;- // data.assetId = undefined;+ // d.accountNumber = undefined;+ // d.assetId = undefined;// }const updatePurchaseInvoiceLine = await upsertPurchaseInvoiceLine(client, {id: lineId,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.details.tsx b/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.details.tsxindex 92d5025b52..332c69c367 100644--- a/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.details.tsx+++ b/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.details.tsx@@ -73,13 +73,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { invoiceId, ...data } = validation.data;+ const { invoiceId, ...d } = validation.data;if (!invoiceId) throw new Error("Could not find invoiceId");const updatePurchaseInvoice = await upsertPurchaseInvoice(client, {id,invoiceId,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.new.tsx b/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.new.tsxindex 1f6a868f5f..bee141ef58 100644--- a/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.new.tsx+++ b/apps/erp/app/routes/x+/purchase-invoice+/$invoiceId.new.tsx@@ -35,10 +35,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createPurchaseInvoiceLine = await upsertPurchaseInvoiceLine(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/purchase-invoice+/new.tsx b/apps/erp/app/routes/x+/purchase-invoice+/new.tsxindex e6b9199b94..facbfb9afc 100644--- a/apps/erp/app/routes/x+/purchase-invoice+/new.tsx+++ b/apps/erp/app/routes/x+/purchase-invoice+/new.tsx@@ -79,8 +79,8 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;- let invoiceId = data.invoiceId;+ const { id, ...d } = validation.data;+ let invoiceId = d.invoiceId;const useNextSequence = !invoiceId;if (useNextSequence) {@@ -104,7 +104,7 @@ export async function action({ request }: ActionFunctionArgs) {if (!invoiceId) throw new Error("invoiceId is not defined");const createPurchaseInvoice = await upsertPurchaseInvoice(client, {- ...data,+ ...d,invoiceId,companyId,createdBy: userId,diff --git a/apps/erp/app/routes/x+/purchase-order+/$orderId.$lineId.details.tsx b/apps/erp/app/routes/x+/purchase-order+/$orderId.$lineId.details.tsxindex 4775ed1a2c..c8e9799ec9 100644--- a/apps/erp/app/routes/x+/purchase-order+/$orderId.$lineId.details.tsx+++ b/apps/erp/app/routes/x+/purchase-order+/$orderId.$lineId.details.tsx@@ -75,27 +75,27 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;-- // if (data.purchaseOrderLineType === "G/L Account") {- // data.assetId = undefined;- // data.itemId = undefined;- // } else if (data.purchaseOrderLineType === "Fixed Asset") {- // data.accountNumber = undefined;- // data.itemId = undefined;+ const { id, ...d } = validation.data;++ // if (d.purchaseOrderLineType === "G/L Account") {+ // d.assetId = undefined;+ // d.itemId = undefined;+ // } else if (d.purchaseOrderLineType === "Fixed Asset") {+ // d.accountNumber = undefined;+ // d.itemId = undefined;// } else- // if (data.purchaseOrderLineType === "Comment") {- // data.accountNumber = undefined;- // data.assetId = undefined;- // data.itemId = undefined;+ // if (d.purchaseOrderLineType === "Comment") {+ // d.accountNumber = undefined;+ // d.assetId = undefined;+ // d.itemId = undefined;// } else {- // data.accountNumber = undefined;- // data.assetId = undefined;+ // d.accountNumber = undefined;+ // d.assetId = undefined;// }const updatePurchaseOrderLine = await upsertPurchaseOrderLine(client, {id: lineId,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/purchase-order+/$orderId.details.tsx b/apps/erp/app/routes/x+/purchase-order+/$orderId.details.tsxindex 8d4c82e2ce..f4f14d2c9b 100644--- a/apps/erp/app/routes/x+/purchase-order+/$orderId.details.tsx+++ b/apps/erp/app/routes/x+/purchase-order+/$orderId.details.tsx@@ -84,13 +84,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { purchaseOrderId, ...data } = validation.data;+ const { purchaseOrderId, ...d } = validation.data;if (!purchaseOrderId) throw new Error("Could not find purchaseOrderId");const updatePurchaseOrder = await upsertPurchaseOrder(client, {id: orderId,purchaseOrderId,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/purchase-order+/$orderId.new.tsx b/apps/erp/app/routes/x+/purchase-order+/$orderId.new.tsxindex e0b123144c..d054c66775 100644--- a/apps/erp/app/routes/x+/purchase-order+/$orderId.new.tsx+++ b/apps/erp/app/routes/x+/purchase-order+/$orderId.new.tsx@@ -32,10 +32,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createPurchaseOrderLine = await upsertPurchaseOrderLine(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/purchasing+/supplier-statuses.$supplierStatusId.tsx b/apps/erp/app/routes/x+/purchasing+/supplier-statuses.$supplierStatusId.tsxindex 8f6c9de5d3..886b5168d8 100644--- a/apps/erp/app/routes/x+/purchasing+/supplier-statuses.$supplierStatusId.tsx+++ b/apps/erp/app/routes/x+/purchasing+/supplier-statuses.$supplierStatusId.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import {getSupplierStatus,supplierStatusValidator,@@ -54,12 +54,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateSupplierStatus = await upsertSupplierStatus(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/purchasing+/supplier-statuses.new.tsx b/apps/erp/app/routes/x+/purchasing+/supplier-statuses.new.tsxindex 93e142384b..a971310e5b 100644--- a/apps/erp/app/routes/x+/purchasing+/supplier-statuses.new.tsx+++ b/apps/erp/app/routes/x+/purchasing+/supplier-statuses.new.tsx@@ -38,10 +38,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertSupplierStatus = await upsertSupplierStatus(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/purchasing+/supplier-types.$supplierTypeId.tsx b/apps/erp/app/routes/x+/purchasing+/supplier-types.$supplierTypeId.tsxindex 090b75bf7b..b711f6b002 100644--- a/apps/erp/app/routes/x+/purchasing+/supplier-types.$supplierTypeId.tsx+++ b/apps/erp/app/routes/x+/purchasing+/supplier-types.$supplierTypeId.tsx@@ -7,7 +7,7 @@ import type {ClientActionFunctionArgs,LoaderFunctionArgs} from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import {getSupplierType,supplierTypeValidator,@@ -71,12 +71,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateSupplierType = await upsertSupplierType(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/purchasing+/supplier-types.new.tsx b/apps/erp/app/routes/x+/purchasing+/supplier-types.new.tsxindex 288b18a336..4be8942880 100644--- a/apps/erp/app/routes/x+/purchasing+/supplier-types.new.tsx+++ b/apps/erp/app/routes/x+/purchasing+/supplier-types.new.tsx@@ -41,10 +41,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertSupplierType = await upsertSupplierType(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/quality+/calibrations.$id.tsx b/apps/erp/app/routes/x+/quality+/calibrations.$id.tsxindex 43d0775f5f..a6f53a851d 100644--- a/apps/erp/app/routes/x+/quality+/calibrations.$id.tsx+++ b/apps/erp/app/routes/x+/quality+/calibrations.$id.tsx@@ -66,17 +66,17 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("Could not find id");const inspectionStatus =- data.requiresAction || data.requiresAdjustment || data.requiresRepair+ d.requiresAction || d.requiresAdjustment || d.requiresRepair? "Fail": "Pass";const updateGauge = await upsertGaugeCalibrationRecord(client, {id,- ...data,+ ...d,inspectionStatus,companyId,updatedBy: userId,diff --git a/apps/erp/app/routes/x+/quality+/documents.new.tsx b/apps/erp/app/routes/x+/quality+/documents.new.tsxindex 647fa21b6e..cc4cfaee54 100644--- a/apps/erp/app/routes/x+/quality+/documents.new.tsx+++ b/apps/erp/app/routes/x+/quality+/documents.new.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useNavigate } from "react-router";+import { data, redirect, useNavigate } from "react-router";import { qualityDocumentValidator } from "~/modules/quality/quality.models";import { upsertQualityDocument } from "~/modules/quality/quality.service";import QualityDocumentForm from "~/modules/quality/ui/Documents/QualityDocumentForm";@@ -32,7 +32,7 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, content, ...data } = validation.data;+ const { id, content, ...d } = validation.data;let contentJSON;try {@@ -52,7 +52,7 @@ export async function action({ request }: ActionFunctionArgs) {}const insertQualityDocument = await upsertQualityDocument(client, {- ...data,+ ...d,content: contentJSON,companyId,createdBy: userIddiff --git a/apps/erp/app/routes/x+/quality+/gauge-types.$id.tsx b/apps/erp/app/routes/x+/quality+/gauge-types.$id.tsxindex 593bfced36..c96bd86a23 100644--- a/apps/erp/app/routes/x+/quality+/gauge-types.$id.tsx+++ b/apps/erp/app/routes/x+/quality+/gauge-types.$id.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import {gaugeTypeValidator,getGaugeType,@@ -49,12 +49,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateGaugeType = await upsertGaugeType(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/quality+/gauge-types.new.tsx b/apps/erp/app/routes/x+/quality+/gauge-types.new.tsxindex 924251045f..08c576e596 100644--- a/apps/erp/app/routes/x+/quality+/gauge-types.new.tsx+++ b/apps/erp/app/routes/x+/quality+/gauge-types.new.tsx@@ -33,10 +33,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertGaugeType = await upsertGaugeType(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/quality+/gauges.$id.tsx b/apps/erp/app/routes/x+/quality+/gauges.$id.tsxindex 0065e18156..8d73a00e90 100644--- a/apps/erp/app/routes/x+/quality+/gauges.$id.tsx+++ b/apps/erp/app/routes/x+/quality+/gauges.$id.tsx@@ -72,13 +72,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { gaugeId, ...data } = validation.data;+ const { gaugeId, ...d } = validation.data;if (!gaugeId) throw new Error("Could not find gaugeId");- const gaugeCalibrationStatus = data.nextCalibrationDate- ? parseDate(data.nextCalibrationDate) < today(getLocalTimeZone())+ const gaugeCalibrationStatus = d.nextCalibrationDate+ ? parseDate(d.nextCalibrationDate) < today(getLocalTimeZone())? "Out-of-Calibration"- : data.lastCalibrationDate+ : d.lastCalibrationDate? "In-Calibration": "Pending": "Pending";@@ -87,7 +87,7 @@ export async function action({ request, params }: ActionFunctionArgs) {id,gaugeId,gaugeCalibrationStatus,- ...data,+ ...d,customFields: setCustomFields(formData),updatedBy: userId});diff --git a/apps/erp/app/routes/x+/quality+/gauges.new.tsx b/apps/erp/app/routes/x+/quality+/gauges.new.tsxindex 9f11625648..e747027594 100644--- a/apps/erp/app/routes/x+/quality+/gauges.new.tsx+++ b/apps/erp/app/routes/x+/quality+/gauges.new.tsx@@ -61,18 +61,18 @@ export async function action({ request }: ActionFunctionArgs) {}if (!gaugeId) throw new Error("gaugeId is not defined");- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;- const gaugeCalibrationStatus = data.nextCalibrationDate- ? parseDate(data.nextCalibrationDate) < today(getLocalTimeZone())+ const gaugeCalibrationStatus = d.nextCalibrationDate+ ? parseDate(d.nextCalibrationDate) < today(getLocalTimeZone())? "Out-of-Calibration"- : data.lastCalibrationDate+ : d.lastCalibrationDate? "In-Calibration": "Pending": "Pending";const createGauge = await upsertGauge(client, {- ...data,+ ...d,gaugeId,gaugeCalibrationStatus,companyId,diff --git a/apps/erp/app/routes/x+/quality+/issue-types.$id.tsx b/apps/erp/app/routes/x+/quality+/issue-types.$id.tsxindex 93d6e63205..70cb1e4c0e 100644--- a/apps/erp/app/routes/x+/quality+/issue-types.$id.tsx+++ b/apps/erp/app/routes/x+/quality+/issue-types.$id.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import {getIssueType,issueTypeValidator,@@ -52,12 +52,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateIssueType = await upsertIssueType(client, {id,- ...data,+ ...d,customFields: setCustomFields(formData),updatedBy: userId});diff --git a/apps/erp/app/routes/x+/quality+/issue-types.new.tsx b/apps/erp/app/routes/x+/quality+/issue-types.new.tsxindex f94a4248d7..e5ec2e6ea1 100644--- a/apps/erp/app/routes/x+/quality+/issue-types.new.tsx+++ b/apps/erp/app/routes/x+/quality+/issue-types.new.tsx@@ -33,10 +33,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertIssueType = await upsertIssueType(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/quote+/$quoteId.$lineId.details.tsx b/apps/erp/app/routes/x+/quote+/$quoteId.$lineId.details.tsxindex 349100a43e..d648cdcc18 100644--- a/apps/erp/app/routes/x+/quote+/$quoteId.$lineId.details.tsx+++ b/apps/erp/app/routes/x+/quote+/$quoteId.$lineId.details.tsx@@ -104,11 +104,11 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const updateQuotationLine = await upsertQuoteLine(client, {id: lineId,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/quote+/$quoteId.details.tsx b/apps/erp/app/routes/x+/quote+/$quoteId.details.tsxindex 21c9ee9e1d..c5bcb85cf8 100644--- a/apps/erp/app/routes/x+/quote+/$quoteId.details.tsx+++ b/apps/erp/app/routes/x+/quote+/$quoteId.details.tsx@@ -68,13 +68,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { quoteId, ...data } = validation.data;+ const { quoteId, ...d } = validation.data;if (!quoteId) throw new Error("Could not find quoteId");const update = await upsertQuote(client, {id,quoteId,- ...data,+ ...d,customFields: setCustomFields(formData),updatedBy: userId});diff --git a/apps/erp/app/routes/x+/quote+/$quoteId.new.tsx b/apps/erp/app/routes/x+/quote+/$quoteId.new.tsxindex 2533eb7e1a..2cd4590af5 100644--- a/apps/erp/app/routes/x+/quote+/$quoteId.new.tsx+++ b/apps/erp/app/routes/x+/quote+/$quoteId.new.tsx@@ -29,11 +29,11 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;let configuration = undefined;- if (data.configuration) {+ if (d.configuration) {try {- configuration = JSON.parse(data.configuration);+ configuration = JSON.parse(d.configuration);} catch (error) {console.error(error);}@@ -41,7 +41,7 @@ export async function action({ request, params }: ActionFunctionArgs) {const serviceRole = getCarbonServiceRole();const createQuotationLine = await upsertQuoteLine(serviceRole, {- ...data,+ ...d,companyId,configuration,createdBy: userId,@@ -59,11 +59,11 @@ export async function action({ request, params }: ActionFunctionArgs) {}const quoteLineId = createQuotationLine.data.id;- if (data.methodType === "Make") {+ if (d.methodType === "Make") {const upsertMethod = await upsertQuoteLineMethod(serviceRole, {quoteId,quoteLineId,- itemId: data.itemId,+ itemId: d.itemId,configuration,companyId,userIddiff --git a/apps/erp/app/routes/x+/quote+/methods+/operation.parameter.$id.tsx b/apps/erp/app/routes/x+/quote+/methods+/operation.parameter.$id.tsxindex b7222778e4..c34b896dc3 100644--- a/apps/erp/app/routes/x+/quote+/methods+/operation.parameter.$id.tsx+++ b/apps/erp/app/routes/x+/quote+/methods+/operation.parameter.$id.tsx@@ -2,7 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validator } from "@carbon/form";-import { type ActionFunctionArgs } from "react-router";+import { type ActionFunctionArgs, data } from "react-router";import { upsertQuoteOperationParameter } from "~/modules/sales";import { operationParameterValidator } from "~/modules/shared";@@ -26,11 +26,11 @@ export async function action({ request, params }: ActionFunctionArgs) {return { success: false, message: "Invalid form data" };}- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const update = await upsertQuoteOperationParameter(client, {id,- ...data,+ ...d,companyId,updatedBy: userId,updatedAt: new Date().toISOString()diff --git a/apps/erp/app/routes/x+/quote+/methods+/operation.step.$id.tsx b/apps/erp/app/routes/x+/quote+/methods+/operation.step.$id.tsxindex 1e2a2e40f7..fae0a71ee2 100644--- a/apps/erp/app/routes/x+/quote+/methods+/operation.step.$id.tsx+++ b/apps/erp/app/routes/x+/quote+/methods+/operation.step.$id.tsx@@ -2,7 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validator } from "@carbon/form";-import { type ActionFunctionArgs } from "react-router";+import { type ActionFunctionArgs, data } from "react-router";import { upsertQuoteOperationStep } from "~/modules/sales";import { operationStepValidator } from "~/modules/shared";@@ -24,13 +24,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return { success: false, message: "Invalid form data" };}- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const update = await upsertQuoteOperationStep(client, {id,- ...data,- minValue: data.minValue ?? null,- maxValue: data.maxValue ?? null,+ ...d,+ minValue: d.minValue ?? null,+ maxValue: d.maxValue ?? null,companyId,updatedBy: userId,updatedAt: new Date().toISOString()diff --git a/apps/erp/app/routes/x+/quote+/methods+/operation.tool.$id.tsx b/apps/erp/app/routes/x+/quote+/methods+/operation.tool.$id.tsxindex 199789594d..b2fd35afbc 100644--- a/apps/erp/app/routes/x+/quote+/methods+/operation.tool.$id.tsx+++ b/apps/erp/app/routes/x+/quote+/methods+/operation.tool.$id.tsx@@ -2,7 +2,7 @@ import { assertIsPost, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validator } from "@carbon/form";-import { type ActionFunctionArgs } from "react-router";+import { type ActionFunctionArgs, data } from "react-router";import { upsertQuoteOperationTool } from "~/modules/sales";import { operationToolValidator } from "~/modules/shared";@@ -24,11 +24,11 @@ export async function action({ request, params }: ActionFunctionArgs) {return { success: false, message: "Invalid form data" };}- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const update = await upsertQuoteOperationTool(client, {id,- ...data,+ ...d,companyId,updatedBy: userId,updatedAt: new Date().toISOString()diff --git a/apps/erp/app/routes/x+/receipt+/$receiptId.details.tsx b/apps/erp/app/routes/x+/receipt+/$receiptId.details.tsxindex 3fbc148ad2..7b9e44549b 100644--- a/apps/erp/app/routes/x+/receipt+/$receiptId.details.tsx+++ b/apps/erp/app/routes/x+/receipt+/$receiptId.details.tsx@@ -9,7 +9,7 @@ import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { JSONContent } from "@carbon/react";import type { ActionFunctionArgs } from "react-router";-import { redirect, useParams } from "react-router";+import { data, redirect, useParams } from "react-router";import { useRouteData } from "~/hooks";import type { Receipt, ReceiptLine } from "~/modules/inventory";import {@@ -37,7 +37,7 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const currentReceipt = await getReceipt(client, id);@@ -52,13 +52,13 @@ export async function action({ request }: ActionFunctionArgs) {}const receiptDataHasChanged =- currentReceipt.data.sourceDocument !== data.sourceDocument ||- currentReceipt.data.sourceDocumentId !== data.sourceDocumentId ||- currentReceipt.data.locationId !== data.locationId;+ currentReceipt.data.sourceDocument !== d.sourceDocument ||+ currentReceipt.data.sourceDocumentId !== d.sourceDocumentId ||+ currentReceipt.data.locationId !== d.locationId;if (receiptDataHasChanged) {const serviceRole = getCarbonServiceRole();- switch (data.sourceDocument) {+ switch (d.sourceDocument) {case "Purchase Order":const purchaseOrderReceipt = await serviceRole.functions.invoke<{id: string;@@ -66,8 +66,8 @@ export async function action({ request }: ActionFunctionArgs) {body: {type: "receiptFromPurchaseOrder",companyId,- locationId: data.locationId,- purchaseOrderId: data.sourceDocumentId,+ locationId: d.locationId,+ purchaseOrderId: d.sourceDocumentId,receiptId: id,userId: userId}@@ -90,7 +90,7 @@ export async function action({ request }: ActionFunctionArgs) {body: {type: "receiptFromInboundTransfer",companyId,- warehouseTransferId: data.sourceDocumentId,+ warehouseTransferId: d.sourceDocumentId,receiptId: id,userId: userId}@@ -112,7 +112,7 @@ export async function action({ request }: ActionFunctionArgs) {} else {const updateReceipt = await upsertReceipt(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/resources+/contractors.$supplierContactId.tsx b/apps/erp/app/routes/x+/resources+/contractors.$supplierContactId.tsxindex bf0aa6bc7c..d36c2c6038 100644--- a/apps/erp/app/routes/x+/resources+/contractors.$supplierContactId.tsx+++ b/apps/erp/app/routes/x+/resources+/contractors.$supplierContactId.tsx@@ -49,13 +49,13 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, supplierId, ...data } = validation.data;+ const { id, supplierId, ...d } = validation.data;if (!id) throw notFound("Contractor ID was not found");const updateContractor = await upsertContractor(client, {id,- ...data,- abilities: data.abilities ?? [],+ ...d,+ abilities: d.abilities ?? [],customFields: setCustomFields(formData),updatedBy: userId});diff --git a/apps/erp/app/routes/x+/resources+/locations.$locationId.tsx b/apps/erp/app/routes/x+/resources+/locations.$locationId.tsxindex 5ce1f89fa6..8903004a54 100644--- a/apps/erp/app/routes/x+/resources+/locations.$locationId.tsx+++ b/apps/erp/app/routes/x+/resources+/locations.$locationId.tsx@@ -54,12 +54,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw notFound("Location ID was not found");const createLocation = await upsertLocation(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/resources+/locations.new.tsx b/apps/erp/app/routes/x+/resources+/locations.new.tsxindex 6137765772..f83a0f56d5 100644--- a/apps/erp/app/routes/x+/resources+/locations.new.tsx+++ b/apps/erp/app/routes/x+/resources+/locations.new.tsx@@ -34,10 +34,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createLocation = await upsertLocation(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/resources+/partners.$supplierLocationId.$abilityId.tsx b/apps/erp/app/routes/x+/resources+/partners.$supplierLocationId.$abilityId.tsxindex 57e68fec24..cc6429c129 100644--- a/apps/erp/app/routes/x+/resources+/partners.$supplierLocationId.$abilityId.tsx+++ b/apps/erp/app/routes/x+/resources+/partners.$supplierLocationId.$abilityId.tsx@@ -50,10 +50,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { supplierId, ...data } = validation.data;+ const { supplierId, ...d } = validation.data;const updatePartner = await upsertPartner(client, {- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/resources+/partners.new.tsx b/apps/erp/app/routes/x+/resources+/partners.new.tsxindex 01b25076d4..612c8336eb 100644--- a/apps/erp/app/routes/x+/resources+/partners.new.tsx+++ b/apps/erp/app/routes/x+/resources+/partners.new.tsx@@ -27,10 +27,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { supplierId, ...data } = validation.data;+ const { supplierId, ...d } = validation.data;const createPartner = await upsertPartner(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/resources+/processes.$processId.tsx b/apps/erp/app/routes/x+/resources+/processes.$processId.tsxindex d79937d6ba..7b976ebc73 100644--- a/apps/erp/app/routes/x+/resources+/processes.$processId.tsx+++ b/apps/erp/app/routes/x+/resources+/processes.$processId.tsx@@ -54,12 +54,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw notFound("Process ID was not found");const createProcess = await upsertProcess(client, {id,- ...data,+ ...d,companyId,updatedBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/resources+/processes.new.tsx b/apps/erp/app/routes/x+/resources+/processes.new.tsxindex 49e8fc8674..54f6c70aec 100644--- a/apps/erp/app/routes/x+/resources+/processes.new.tsx+++ b/apps/erp/app/routes/x+/resources+/processes.new.tsx@@ -32,10 +32,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createProcess = await upsertProcess(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/resources+/training.new.tsx b/apps/erp/app/routes/x+/resources+/training.new.tsxindex 84d06bfa92..98b5b91dc8 100644--- a/apps/erp/app/routes/x+/resources+/training.new.tsx+++ b/apps/erp/app/routes/x+/resources+/training.new.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useNavigate } from "react-router";+import { data, redirect, useNavigate } from "react-router";import {TrainingForm,trainingValidator,@@ -32,7 +32,7 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, content, ...data } = validation.data;+ const { id, content, ...d } = validation.data;let contentJSON;try {@@ -52,7 +52,7 @@ export async function action({ request }: ActionFunctionArgs) {}const insertTraining = await upsertTraining(client, {- ...data,+ ...d,content: contentJSON,companyId,createdBy: userIddiff --git a/apps/erp/app/routes/x+/resources+/work-centers.$id.tsx b/apps/erp/app/routes/x+/resources+/work-centers.$id.tsxindex d6f47e6a96..59f03cec81 100644--- a/apps/erp/app/routes/x+/resources+/work-centers.$id.tsx+++ b/apps/erp/app/routes/x+/resources+/work-centers.$id.tsx@@ -54,12 +54,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("ID is was not found");const updateWorkCenter = await upsertWorkCenter(client, {id,- ...data,+ ...d,companyId,updatedBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/resources+/work-centers.new.tsx b/apps/erp/app/routes/x+/resources+/work-centers.new.tsxindex e64784007f..b885078e9c 100644--- a/apps/erp/app/routes/x+/resources+/work-centers.new.tsx+++ b/apps/erp/app/routes/x+/resources+/work-centers.new.tsx@@ -33,10 +33,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createWorkCenter = await upsertWorkCenter(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/sales+/customer-statuses.$customerStatusId.tsx b/apps/erp/app/routes/x+/sales+/customer-statuses.$customerStatusId.tsxindex 0c951d62da..d8980db041 100644--- a/apps/erp/app/routes/x+/sales+/customer-statuses.$customerStatusId.tsx+++ b/apps/erp/app/routes/x+/sales+/customer-statuses.$customerStatusId.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import {customerStatusValidator,getCustomerStatus,@@ -54,12 +54,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateCustomerStatus = await upsertCustomerStatus(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/sales+/customer-statuses.new.tsx b/apps/erp/app/routes/x+/sales+/customer-statuses.new.tsxindex 5165fc059c..d2aa30b9c6 100644--- a/apps/erp/app/routes/x+/sales+/customer-statuses.new.tsx+++ b/apps/erp/app/routes/x+/sales+/customer-statuses.new.tsx@@ -35,10 +35,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertCustomerStatus = await upsertCustomerStatus(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/sales+/customer-types.$customerTypeId.tsx b/apps/erp/app/routes/x+/sales+/customer-types.$customerTypeId.tsxindex ae68ac5e0c..6ba4fc2963 100644--- a/apps/erp/app/routes/x+/sales+/customer-types.$customerTypeId.tsx+++ b/apps/erp/app/routes/x+/sales+/customer-types.$customerTypeId.tsx@@ -7,7 +7,7 @@ import type {ClientActionFunctionArgs,LoaderFunctionArgs} from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import {customerTypeValidator,getCustomerType,@@ -54,12 +54,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateCustomerType = await upsertCustomerType(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/sales+/customer-types.new.tsx b/apps/erp/app/routes/x+/sales+/customer-types.new.tsxindex 369a7c2b31..cf0090350b 100644--- a/apps/erp/app/routes/x+/sales+/customer-types.new.tsx+++ b/apps/erp/app/routes/x+/sales+/customer-types.new.tsx@@ -38,10 +38,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertCustomerType = await upsertCustomerType(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/sales+/no-quote-reasons.$id.tsx b/apps/erp/app/routes/x+/sales+/no-quote-reasons.$id.tsxindex 90f3c50bdd..ebc3ee8e31 100644--- a/apps/erp/app/routes/x+/sales+/no-quote-reasons.$id.tsx+++ b/apps/erp/app/routes/x+/sales+/no-quote-reasons.$id.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData, useNavigate } from "react-router";+import { data, redirect, useLoaderData, useNavigate } from "react-router";import {getNoQuoteReason,noQuoteReasonValidator,@@ -53,12 +53,12 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const updateNoQuoteReason = await upsertNoQuoteReason(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/sales+/no-quote-reasons.new.tsx b/apps/erp/app/routes/x+/sales+/no-quote-reasons.new.tsxindex 61094af401..12d0be518e 100644--- a/apps/erp/app/routes/x+/sales+/no-quote-reasons.new.tsx+++ b/apps/erp/app/routes/x+/sales+/no-quote-reasons.new.tsx@@ -34,10 +34,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertNoQuoteReason = await upsertNoQuoteReason(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.$lineId.details.tsx b/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.$lineId.details.tsxindex 809cdd10ec..a756b6ac7f 100644--- a/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.$lineId.details.tsx+++ b/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.$lineId.details.tsx@@ -69,27 +69,27 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;-- // if (data.invoiceLineType === "G/L Account") {- // data.assetId = undefined;- // data.itemId = undefined;- // } else if (data.invoiceLineType === "Fixed Asset") {- // data.accountNumber = undefined;- // data.itemId = undefined;+ const { id, ...d } = validation.data;++ // if (d.invoiceLineType === "G/L Account") {+ // d.assetId = undefined;+ // d.itemId = undefined;+ // } else if (d.invoiceLineType === "Fixed Asset") {+ // d.accountNumber = undefined;+ // d.itemId = undefined;// } else- // if (data.invoiceLineType === "Comment") {- // data.accountNumber = undefined;- // data.assetId = undefined;- // data.itemId = undefined;+ // if (d.invoiceLineType === "Comment") {+ // d.accountNumber = undefined;+ // d.assetId = undefined;+ // d.itemId = undefined;// } else {- // data.accountNumber = undefined;- // data.assetId = undefined;+ // d.accountNumber = undefined;+ // d.assetId = undefined;// }const updateSalesInvoiceLine = await upsertSalesInvoiceLine(client, {id: lineId,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.details.tsx b/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.details.tsxindex 37769f8da6..5f276084e5 100644--- a/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.details.tsx+++ b/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.details.tsx@@ -68,13 +68,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { invoiceId, ...data } = validation.data;+ const { invoiceId, ...d } = validation.data;if (!invoiceId) throw new Error("Could not find invoiceId");const updateSalesInvoice = await upsertSalesInvoice(client, {id,invoiceId,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.new.tsx b/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.new.tsxindex c681b5214c..d74fca3d62 100644--- a/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.new.tsx+++ b/apps/erp/app/routes/x+/sales-invoice+/$invoiceId.new.tsx@@ -35,10 +35,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createSalesInvoiceLine = await upsertSalesInvoiceLine(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/sales-invoice+/new.tsx b/apps/erp/app/routes/x+/sales-invoice+/new.tsxindex 1afb513246..02fe7bf435 100644--- a/apps/erp/app/routes/x+/sales-invoice+/new.tsx+++ b/apps/erp/app/routes/x+/sales-invoice+/new.tsx@@ -100,8 +100,8 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;- let invoiceId = data.invoiceId;+ const { id, ...d } = validation.data;+ let invoiceId = d.invoiceId;const useNextSequence = !invoiceId;if (useNextSequence) {@@ -125,7 +125,7 @@ export async function action({ request }: ActionFunctionArgs) {if (!invoiceId) throw new Error("invoiceId is not defined");const createSalesInvoice = await upsertSalesInvoice(client, {- ...data,+ ...d,invoiceId,companyId,createdBy: userId,diff --git a/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.details.tsx b/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.details.tsxindex 523a2972b5..f43e84f3be 100644--- a/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.details.tsx+++ b/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.details.tsx@@ -105,23 +105,23 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;- if (data.salesOrderLineType === "Comment") {- data.accountNumber = undefined;- data.assetId = undefined;- data.itemId = undefined;- } else if (data.salesOrderLineType === "Fixed Asset") {- data.accountNumber = undefined;- data.itemId = undefined;+ if (d.salesOrderLineType === "Comment") {+ d.accountNumber = undefined;+ d.assetId = undefined;+ d.itemId = undefined;+ } else if (d.salesOrderLineType === "Fixed Asset") {+ d.accountNumber = undefined;+ d.itemId = undefined;} else {- data.accountNumber = undefined;- data.assetId = undefined;+ d.accountNumber = undefined;+ d.assetId = undefined;}const updateSalesOrderLine = await upsertSalesOrderLine(client, {id: lineId,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.job.tsx b/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.job.tsxindex 1bf73467eb..bf4aa76ff1 100644--- a/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.job.tsx+++ b/apps/erp/app/routes/x+/sales-order+/$orderId.$lineId.job.tsx@@ -69,7 +69,7 @@ export async function action({ request, params }: ActionFunctionArgs) {}if (!jobId) throw new Error("jobId is not defined");- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const shelfId = await getDefaultShelfForJob(serviceRole,@@ -79,11 +79,11 @@ export async function action({ request, params }: ActionFunctionArgs) {);const createJob = await upsertJob(serviceRole, {- ...data,+ ...d,jobId,shelfId: shelfId ?? undefined,- startDate: data.dueDate- ? parseDate(data.dueDate).subtract({ days: leadTime }).toString()+ startDate: d.dueDate+ ? parseDate(d.dueDate).subtract({ days: leadTime }).toString(): undefined,companyId,createdBy: userId,@@ -101,7 +101,7 @@ export async function action({ request, params }: ActionFunctionArgs) {if (validation.data.quoteId && validation.data.quoteLineId) {const upsertMethod = await upsertJobMethod(serviceRole, "quoteLineToJob", {- sourceId: `${data.quoteId}:${data.quoteLineId}`,+ sourceId: `${d.quoteId}:${d.quoteLineId}`,targetId: id,companyId,userId@@ -119,7 +119,7 @@ export async function action({ request, params }: ActionFunctionArgs) {}} else {const upsertMethod = await upsertJobMethod(serviceRole, "itemToJob", {- sourceId: data.itemId,+ sourceId: d.itemId,targetId: id,companyId,userIddiff --git a/apps/erp/app/routes/x+/sales-order+/$orderId.details.tsx b/apps/erp/app/routes/x+/sales-order+/$orderId.details.tsxindex 77c94741f2..5bf0bcb819 100644--- a/apps/erp/app/routes/x+/sales-order+/$orderId.details.tsx+++ b/apps/erp/app/routes/x+/sales-order+/$orderId.details.tsx@@ -93,13 +93,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { salesOrderId, ...data } = validation.data;+ const { salesOrderId, ...d } = validation.data;if (!salesOrderId) throw new Error("Could not find salesOrderId");const update = await upsertSalesOrder(client, {id,salesOrderId,- ...data,+ ...d,customFields: setCustomFields(formData),updatedBy: userId});diff --git a/apps/erp/app/routes/x+/sales-order+/$orderId.new.tsx b/apps/erp/app/routes/x+/sales-order+/$orderId.new.tsxindex a11fc346ca..b3f0ba5802 100644--- a/apps/erp/app/routes/x+/sales-order+/$orderId.new.tsx+++ b/apps/erp/app/routes/x+/sales-order+/$orderId.new.tsx@@ -30,10 +30,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createSalesOrderLine = await upsertSalesOrderLine(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/sales-order+/new.tsx b/apps/erp/app/routes/x+/sales-order+/new.tsxindex 99ef1d88af..6a852bf234 100644--- a/apps/erp/app/routes/x+/sales-order+/new.tsx+++ b/apps/erp/app/routes/x+/sales-order+/new.tsx@@ -32,8 +32,8 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;- let salesOrderId = data.salesOrderId;+ const { id, ...d } = validation.data;+ let salesOrderId = d.salesOrderId;const useNextSequence = !salesOrderId;if (useNextSequence) {@@ -53,7 +53,7 @@ export async function action({ request }: ActionFunctionArgs) {if (!salesOrderId) throw new Error("salesOrderId is not defined");const createSalesOrder = await upsertSalesOrder(client, {- ...data,+ ...d,salesOrderId,companyId,createdBy: userId,diff --git a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.$lineId.details.tsx b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.$lineId.details.tsxindex 361a2e6292..3476b14198 100644--- a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.$lineId.details.tsx+++ b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.$lineId.details.tsx@@ -76,11 +76,11 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const updateLine = await upsertSalesRFQLine(client, {id: lineId,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.details.tsx b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.details.tsxindex 5acecb5734..85c0ef1350 100644--- a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.details.tsx+++ b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.details.tsx@@ -61,13 +61,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { rfqId, ...data } = validation.data;+ const { rfqId, ...d } = validation.data;if (!rfqId) throw new Error("Could not find rfqId");const update = await upsertSalesRFQ(client, {id,rfqId,- ...data,+ ...d,customFields: setCustomFields(formData),updatedBy: userId});diff --git a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.new.tsx b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.new.tsxindex e0c4f85e97..fc53ca8572 100644--- a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.new.tsx+++ b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.new.tsx@@ -26,10 +26,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertLine = await upsertSalesRFQLine(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/settings+/api-keys.new.tsx b/apps/erp/app/routes/x+/settings+/api-keys.new.tsxindex 00d39a7f50..484b1d192e 100644--- a/apps/erp/app/routes/x+/settings+/api-keys.new.tsx+++ b/apps/erp/app/routes/x+/settings+/api-keys.new.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { useNavigate } from "react-router";+import { data, useNavigate } from "react-router";import { ApiKeyForm, apiKeyValidator, upsertApiKey } from "~/modules/settings";export async function loader({ request }: LoaderFunctionArgs) {@@ -28,10 +28,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const insertApiKey = await upsertApiKey(client, {- ...data,+ ...d,companyId,createdBy: userId});diff --git a/apps/erp/app/routes/x+/settings+/custom-fields.$table.$id.tsx b/apps/erp/app/routes/x+/settings+/custom-fields.$table.$id.tsxindex a87798b282..9738978937 100644--- a/apps/erp/app/routes/x+/settings+/custom-fields.$table.$id.tsx+++ b/apps/erp/app/routes/x+/settings+/custom-fields.$table.$id.tsx@@ -3,7 +3,13 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData, useNavigate, useParams } from "react-router";+import {+ data,+ redirect,+ useLoaderData,+ useNavigate,+ useParams+} from "react-router";import { useRouteData } from "~/hooks";import type { AttributeDataType } from "~/modules/people";import {@@ -56,12 +62,12 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id is not found");const update = await upsertCustomField(client, {id,- ...data,+ ...d,updatedBy: userId});if (update.error) {diff --git a/apps/erp/app/routes/x+/settings+/custom-fields.$table.new.tsx b/apps/erp/app/routes/x+/settings+/custom-fields.$table.new.tsxindex 68121686a6..8b87075bda 100644--- a/apps/erp/app/routes/x+/settings+/custom-fields.$table.new.tsx+++ b/apps/erp/app/routes/x+/settings+/custom-fields.$table.new.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";-import { redirect, useNavigate, useParams } from "react-router";+import { data, redirect, useNavigate, useParams } from "react-router";import { useRouteData } from "~/hooks";import type { AttributeDataType } from "~/modules/people";import { CustomFieldForm, customFieldValidator } from "~/modules/settings";@@ -29,10 +29,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const create = await upsertCustomField(client, {- ...data,+ ...d,companyId,createdBy: userId});diff --git a/apps/erp/app/routes/x+/settings+/integrations.$id.tsx b/apps/erp/app/routes/x+/settings+/integrations.$id.tsxindex b6b5b725b9..7ed0378d05 100644--- a/apps/erp/app/routes/x+/settings+/integrations.$id.tsx+++ b/apps/erp/app/routes/x+/settings+/integrations.$id.tsx@@ -61,13 +61,13 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { active, ...data } = validation.data;+ const { active, ...d } = validation.data;const update = await upsertCompanyIntegration(client, {id: integrationId,active: true,metadata: {- ...data+ ...d},companyId,updatedBy: userIddiff --git a/apps/erp/app/routes/x+/settings+/sequences.$tableId.tsx b/apps/erp/app/routes/x+/settings+/sequences.$tableId.tsxindex f00de4cb41..5d98abdc22 100644--- a/apps/erp/app/routes/x+/settings+/sequences.$tableId.tsx+++ b/apps/erp/app/routes/x+/settings+/sequences.$tableId.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData } from "react-router";+import { data, redirect, useLoaderData } from "react-router";import {getSequence,SequenceForm,@@ -48,10 +48,10 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { table, ...data } = validation.data;+ const { table, ...d } = validation.data;const update = await updateSequence(client, table, companyId, {- ...data,+ ...d,updatedBy: userId});diff --git a/apps/erp/app/routes/x+/shared+/views.tsx b/apps/erp/app/routes/x+/shared+/views.tsxindex 44904ad74a..0ead45525e 100644--- a/apps/erp/app/routes/x+/shared+/views.tsx+++ b/apps/erp/app/routes/x+/shared+/views.tsx@@ -24,14 +24,14 @@ export async function action({ request }: ActionFunctionArgs) {};}- const { state, ...data } = validation.data;+ const { state, ...d } = validation.data;try {const parsedState = JSON.parse(state);const validatedState = savedViewStateValidator.parse(parsedState);const result = await upsertSavedView(client, {- ...data,+ ...d,...validatedState,userId,companyId@@ -46,10 +46,10 @@ export async function action({ request }: ActionFunctionArgs) {};}- if (data.id) {+ if (d.id) {return {success: true,- id: data.id,+ id: d.id,message: "View updated"};}diff --git a/apps/erp/app/routes/x+/shipment+/$shipmentId.details.tsx b/apps/erp/app/routes/x+/shipment+/$shipmentId.details.tsxindex 097794b54a..f55cc76a41 100644--- a/apps/erp/app/routes/x+/shipment+/$shipmentId.details.tsx+++ b/apps/erp/app/routes/x+/shipment+/$shipmentId.details.tsx@@ -10,7 +10,7 @@ import { validationError, validator } from "@carbon/form";import type { JSONContent } from "@carbon/react";import { FunctionRegion } from "@supabase/supabase-js";import type { ActionFunctionArgs } from "react-router";-import { redirect, useParams } from "react-router";+import { data, redirect, useParams } from "react-router";import { useRouteData } from "~/hooks";import type { Shipment, ShipmentLine } from "~/modules/inventory";import {@@ -40,7 +40,7 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("id not found");const currentShipment = await getShipment(client, id);@@ -55,13 +55,13 @@ export async function action({ request }: ActionFunctionArgs) {}const shipmentDataHasChanged =- currentShipment.data.sourceDocument !== data.sourceDocument ||- currentShipment.data.sourceDocumentId !== data.sourceDocumentId ||- currentShipment.data.locationId !== data.locationId;+ currentShipment.data.sourceDocument !== d.sourceDocument ||+ currentShipment.data.sourceDocumentId !== d.sourceDocumentId ||+ currentShipment.data.locationId !== d.locationId;if (shipmentDataHasChanged) {const serviceRole = getCarbonServiceRole();- switch (data.sourceDocument) {+ switch (d.sourceDocument) {case "Sales Order":const salesOrderShipment = await serviceRole.functions.invoke<{id: string;@@ -69,8 +69,8 @@ export async function action({ request }: ActionFunctionArgs) {body: {type: "shipmentFromSalesOrder",companyId,- locationId: data.locationId,- salesOrderId: data.sourceDocumentId,+ locationId: d.locationId,+ salesOrderId: d.sourceDocumentId,shipmentId: id,userId: userId},@@ -94,8 +94,8 @@ export async function action({ request }: ActionFunctionArgs) {body: {type: "shipmentFromPurchaseOrder",companyId,- locationId: data.locationId,- purchaseOrderId: data.sourceDocumentId,+ locationId: d.locationId,+ purchaseOrderId: d.sourceDocumentId,shipmentId: id,userId: userId},@@ -119,7 +119,7 @@ export async function action({ request }: ActionFunctionArgs) {body: {type: "shipmentFromWarehouseTransfer",companyId,- warehouseTransferId: data.sourceDocumentId,+ warehouseTransferId: d.sourceDocumentId,shipmentId: id,userId: userId},@@ -143,12 +143,12 @@ export async function action({ request }: ActionFunctionArgs) {}break;default:- throw new Error(`Unsupported source document: ${data.sourceDocument}`);+ throw new Error(`Unsupported source document: ${d.sourceDocument}`);}} else {const updateShipment = await upsertShipment(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/stock-transfer+/$id.line.$lineId.tsx b/apps/erp/app/routes/x+/stock-transfer+/$id.line.$lineId.tsxindex 55cc33026f..24a825d4ef 100644--- a/apps/erp/app/routes/x+/stock-transfer+/$id.line.$lineId.tsx+++ b/apps/erp/app/routes/x+/stock-transfer+/$id.line.$lineId.tsx@@ -4,7 +4,7 @@ import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import { useRouteData } from "@carbon/remix";import type { ActionFunctionArgs } from "react-router";-import { redirect, useNavigate, useParams } from "react-router";+import { data, redirect, useNavigate, useParams } from "react-router";import {stockTransferLineValidator,upsertStockTransferLine@@ -37,11 +37,11 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const updateStockTransferLine = await upsertStockTransferLine(client, {id: lineId,- ...data,+ ...d,updatedBy: userId});if (updateStockTransferLine.error) {diff --git a/apps/erp/app/routes/x+/stock-transfer+/$id.line.new.tsx b/apps/erp/app/routes/x+/stock-transfer+/$id.line.new.tsxindex 51c8298a48..59d4d5f32c 100644--- a/apps/erp/app/routes/x+/stock-transfer+/$id.line.new.tsx+++ b/apps/erp/app/routes/x+/stock-transfer+/$id.line.new.tsx@@ -4,7 +4,7 @@ import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import { useRouteData } from "@carbon/remix";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useNavigate, useParams } from "react-router";+import { data, redirect, useNavigate, useParams } from "react-router";import {stockTransferLineValidator,upsertStockTransferLine@@ -42,10 +42,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id: lineId, ...data } = validation.data;+ const { id: lineId, ...d } = validation.data;const insertStockTransferLine = await upsertStockTransferLine(client, {- ...data,+ ...d,companyId,createdBy: userId});diff --git a/apps/erp/app/routes/x+/supplier+/$supplierId.accounting.tsx b/apps/erp/app/routes/x+/supplier+/$supplierId.accounting.tsxindex bad3091f5b..f7635250dc 100644--- a/apps/erp/app/routes/x+/supplier+/$supplierId.accounting.tsx+++ b/apps/erp/app/routes/x+/supplier+/$supplierId.accounting.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";-import { redirect, useParams } from "react-router";+import { data, redirect, useParams } from "react-router";import { useRouteData } from "~/hooks";import type { SupplierDetail } from "~/modules/purchasing";import {@@ -27,7 +27,7 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) {throw redirect(@@ -38,7 +38,7 @@ export async function action({ request }: ActionFunctionArgs) {const update = await updateSupplierAccounting(client, {id,- ...data,+ ...d,updatedBy: userId});diff --git a/apps/erp/app/routes/x+/supplier+/$supplierId.details.tsx b/apps/erp/app/routes/x+/supplier+/$supplierId.details.tsxindex 881ce85557..f1adf9c2d9 100644--- a/apps/erp/app/routes/x+/supplier+/$supplierId.details.tsx+++ b/apps/erp/app/routes/x+/supplier+/$supplierId.details.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";-import { redirect, useParams } from "react-router";+import { data, redirect, useParams } from "react-router";import { useRouteData } from "~/hooks";import type { SupplierDetail } from "~/modules/purchasing";import { supplierValidator, upsertSupplier } from "~/modules/purchasing";@@ -24,7 +24,7 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) {throw redirect(@@ -35,7 +35,7 @@ export async function action({ request }: ActionFunctionArgs) {const update = await upsertSupplier(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/supplier+/$supplierId.processes.$id.tsx b/apps/erp/app/routes/x+/supplier+/$supplierId.processes.$id.tsxindex a9cf86a017..262e880847 100644--- a/apps/erp/app/routes/x+/supplier+/$supplierId.processes.$id.tsx+++ b/apps/erp/app/routes/x+/supplier+/$supplierId.processes.$id.tsx@@ -37,12 +37,12 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;if (!id) throw new Error("Could not find id");const createSupplierProcess = await upsertSupplierProcess(client, {id,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/supplier+/$supplierId.processes.new.tsx b/apps/erp/app/routes/x+/supplier+/$supplierId.processes.new.tsxindex a370cc2ea3..851682efe5 100644--- a/apps/erp/app/routes/x+/supplier+/$supplierId.processes.new.tsx+++ b/apps/erp/app/routes/x+/supplier+/$supplierId.processes.new.tsx@@ -37,10 +37,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createSupplierProcess = await upsertSupplierProcess(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/supplier+/new.tsx b/apps/erp/app/routes/x+/supplier+/new.tsxindex 8fa7d99a1c..fb452deb46 100644--- a/apps/erp/app/routes/x+/supplier+/new.tsx+++ b/apps/erp/app/routes/x+/supplier+/new.tsx@@ -33,10 +33,10 @@ export async function action({ request }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createSupplier = await upsertSupplier(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/supplier-quote+/$id.$lineId.details.tsx b/apps/erp/app/routes/x+/supplier-quote+/$id.$lineId.details.tsxindex a27c831201..4ff13521c6 100644--- a/apps/erp/app/routes/x+/supplier-quote+/$id.$lineId.details.tsx+++ b/apps/erp/app/routes/x+/supplier-quote+/$id.$lineId.details.tsx@@ -92,11 +92,11 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { id: _id, ...data } = validation.data;+ const { id: _id, ...d } = validation.data;const updateSupplierQuoteLine = await upsertSupplierQuoteLine(client, {id: lineId,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/supplier-quote+/$id.details.tsx b/apps/erp/app/routes/x+/supplier-quote+/$id.details.tsxindex bb626a6537..52d3bc2305 100644--- a/apps/erp/app/routes/x+/supplier-quote+/$id.details.tsx+++ b/apps/erp/app/routes/x+/supplier-quote+/$id.details.tsx@@ -65,13 +65,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { supplierQuoteId, ...data } = validation.data;+ const { supplierQuoteId, ...d } = validation.data;if (!supplierQuoteId) throw new Error("Could not find supplierQuoteId");const update = await upsertSupplierQuote(client, {id,supplierQuoteId,- ...data,+ ...d,customFields: setCustomFields(formData),updatedBy: userId});diff --git a/apps/erp/app/routes/x+/supplier-quote+/$id.new.tsx b/apps/erp/app/routes/x+/supplier-quote+/$id.new.tsxindex a25f3e33ab..a87e887752 100644--- a/apps/erp/app/routes/x+/supplier-quote+/$id.new.tsx+++ b/apps/erp/app/routes/x+/supplier-quote+/$id.new.tsx@@ -30,11 +30,11 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const serviceRole = getCarbonServiceRole();const createQuotationLine = await upsertSupplierQuoteLine(serviceRole, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/tool+/$itemId.view.purchasing.new.tsx b/apps/erp/app/routes/x+/tool+/$itemId.view.purchasing.new.tsxindex ab05794c17..90c34b938c 100644--- a/apps/erp/app/routes/x+/tool+/$itemId.view.purchasing.new.tsx+++ b/apps/erp/app/routes/x+/tool+/$itemId.view.purchasing.new.tsx@@ -30,10 +30,10 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createToolSupplier = await upsertSupplierPart(client, {- ...data,+ ...d,companyId,createdBy: userId,customFields: setCustomFields(formData)diff --git a/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.$id.tsx b/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.$id.tsxindex 83a3ffe02f..c1bb2f4ccd 100644--- a/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.$id.tsx+++ b/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.$id.tsx@@ -3,7 +3,13 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";-import { redirect, useLoaderData, useNavigate, useParams } from "react-router";+import {+ data,+ redirect,+ useLoaderData,+ useNavigate,+ useParams+} from "react-router";import { z } from "zod/v3";import { zfd } from "zod-form-data";import {@@ -87,13 +93,13 @@ export async function action({ request, params }: ActionFunctionArgs) {return validationError(validation.error);}- const { type, ...data } = validation.data;+ const { type, ...d } = validation.data;switch (type) {case "update": {const result = await upsertWarehouseTransferLine(client, {id,- ...data,+ ...d,transferId,companyId,updatedBy: userIddiff --git a/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.new.tsx b/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.new.tsxindex 314416243a..43f9387001 100644--- a/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.new.tsx+++ b/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.new.tsx@@ -37,12 +37,12 @@ export async function action({ request, params }: ActionFunctionArgs) {}// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createWarehouseTransferLine = await upsertWarehouseTransferLine(client,{- ...data,+ ...d,companyId: companyId,createdBy: userIddiff --git a/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.tsx b/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.tsxindex dc273566d0..2de0ee4a14 100644--- a/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.tsx+++ b/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.details.tsx@@ -3,7 +3,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";import { flash } from "@carbon/auth/session.server";import { validationError, validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";-import { redirect, useParams } from "react-router";+import { data, redirect, useParams } from "react-router";import { useRouteData } from "~/hooks";import type {WarehouseTransfer,@@ -35,14 +35,14 @@ export async function action({ request }: ActionFunctionArgs) {return validationError(validation.error);}- const { id, transferId, ...data } = validation.data;+ const { id, transferId, ...d } = validation.data;if (!id) throw new Error("id not found");if (!transferId) throw new Error("transferId not found");const updateTransfer = await upsertWarehouseTransfer(client, {id,transferId,- ...data,+ ...d,updatedBy: userId,customFields: setCustomFields(formData)});diff --git a/apps/erp/app/routes/x+/warehouse-transfer+/new.tsx b/apps/erp/app/routes/x+/warehouse-transfer+/new.tsxindex dfe5a1368f..077554fc9b 100644--- a/apps/erp/app/routes/x+/warehouse-transfer+/new.tsx+++ b/apps/erp/app/routes/x+/warehouse-transfer+/new.tsx@@ -66,10 +66,10 @@ export async function action({ request }: ActionFunctionArgs) {if (!transferId) throw new Error("transferId is not defined");// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- const { id, ...data } = validation.data;+ const { id, ...d } = validation.data;const createTransfer = await upsertWarehouseTransfer(client, {- ...data,+ ...d,transferId,companyId,createdBy: userId,diff --git a/apps/mes/app/components/FilePreview.tsx b/apps/mes/app/components/FilePreview.tsxindex c21527a9e5..7dc2e8d092 100644--- a/apps/mes/app/components/FilePreview.tsx+++ b/apps/mes/app/components/FilePreview.tsx@@ -1,8 +1,8 @@import {+ cn,HoverCard,HoverCardContent,- HoverCardTrigger,- cn+ HoverCardTrigger} from "@carbon/react";import type { ComponentPropsWithoutRef, ElementRef } from "react";import { forwardRef } from "react";diff --git a/apps/mes/app/components/Icons.tsx b/apps/mes/app/components/Icons.tsxindex b89ed98568..5c35c9ee42 100644--- a/apps/mes/app/components/Icons.tsx+++ b/apps/mes/app/components/Icons.tsx@@ -1,6 +1,18 @@import type { Database } from "@carbon/database";import { cn } from "@carbon/react";import { AiOutlinePartition } from "react-icons/ai";+import {+ BsExclamationSquareFill,+ BsFileEarmarkFill,+ BsFileEarmarkPlayFill,+ BsFileExcelFill,+ BsFileImageFill,+ BsFilePdfFill,+ BsFilePptFill,+ BsFileTextFill,+ BsFileWordFill,+ BsFileZipFill+} from "react-icons/bs";import { FaCodePullRequest } from "react-icons/fa6";import {LuAtom,@@ -25,19 +37,6 @@ import {LuToggleLeft,LuUser} from "react-icons/lu";--import {- BsExclamationSquareFill,- BsFileEarmarkFill,- BsFileEarmarkPlayFill,- BsFileExcelFill,- BsFileImageFill,- BsFilePdfFill,- BsFilePptFill,- BsFileTextFill,- BsFileWordFill,- BsFileZipFill-} from "react-icons/bs";import { RxCodesandboxLogo } from "react-icons/rx";import { TbTargetOff } from "react-icons/tb";import { AlmostDoneIcon } from "~/assets/icons/AlmostDoneIcon";diff --git a/apps/mes/app/components/ItemThumbnail.tsx b/apps/mes/app/components/ItemThumbnail.tsxindex 45ab69221a..708b91980d 100644--- a/apps/mes/app/components/ItemThumbnail.tsx+++ b/apps/mes/app/components/ItemThumbnail.tsx@@ -1,8 +1,8 @@+import { cn } from "@carbon/react";import { cva } from "class-variance-authority";+import { LuSquareStack } from "react-icons/lu";import { getPrivateUrl } from "~/utils/path";-import { cn } from "@carbon/react";import { MethodItemTypeIcon } from "./Icons";-import { LuSquareStack } from "react-icons/lu";interface ItemThumbnailProps {thumbnailPath?: string | null;diff --git a/apps/mes/app/components/JobOperation/components/Parameter.tsx b/apps/mes/app/components/JobOperation/components/Parameter.tsxindex bd4f4167f5..ef5d799a96 100644--- a/apps/mes/app/components/JobOperation/components/Parameter.tsx+++ b/apps/mes/app/components/JobOperation/components/Parameter.tsx@@ -1,7 +1,6 @@import { cn, HStack } from "@carbon/react";-import type { JobOperationParameter } from "~/services/types";-import { LuActivity } from "react-icons/lu";+import type { JobOperationParameter } from "~/services/types";export function ParametersListItem({parameter,diff --git a/apps/mes/app/components/JobOperation/components/SerialSelectorModal.tsx b/apps/mes/app/components/JobOperation/components/SerialSelectorModal.tsxindex bf149a2e4d..2c84aca8b4 100644--- a/apps/mes/app/components/JobOperation/components/SerialSelectorModal.tsx+++ b/apps/mes/app/components/JobOperation/components/SerialSelectorModal.tsx@@ -19,9 +19,8 @@ import {VStack} from "@carbon/react";import { useState } from "react";-import type { TrackedEntity } from "~/services/types";-import { LuCheck, LuList, LuQrCode, LuX } from "react-icons/lu";+import type { TrackedEntity } from "~/services/types";export function SerialSelectorModal({availableEntities,diff --git a/apps/mes/app/components/Kanban/Kanban.tsx b/apps/mes/app/components/Kanban/Kanban.tsxindex 5de7d99e7d..9dea5c8f3e 100644--- a/apps/mes/app/components/Kanban/Kanban.tsx+++ b/apps/mes/app/components/Kanban/Kanban.tsx@@ -13,7 +13,7 @@ import {useSensor,useSensors} from "@dnd-kit/core";-import { SortableContext, arrayMove } from "@dnd-kit/sortable";+import { arrayMove, SortableContext } from "@dnd-kit/sortable";import { useEffect, useState } from "react";import { createPortal } from "react-dom";import { BoardContainer, ColumnCard } from "./components/ColumnCard";diff --git a/apps/mes/app/components/Kanban/components/ItemCard.tsx b/apps/mes/app/components/Kanban/components/ItemCard.tsxindex 00ccf09b25..0a777097c3 100644--- a/apps/mes/app/components/Kanban/components/ItemCard.tsx+++ b/apps/mes/app/components/Kanban/components/ItemCard.tsx@@ -33,7 +33,6 @@ import {LuTrash} from "react-icons/lu";import { RiProgress8Line } from "react-icons/ri";-import { Link } from "react-router";import { AlmostDoneIcon } from "~/assets/icons/AlmostDoneIcon";import { InProgressStatusIcon } from "~/assets/icons/InProgressStatusIcon";import { TodoStatusIcon } from "~/assets/icons/TodoStatusIcon";diff --git a/apps/mes/app/components/Kanban/utils.ts b/apps/mes/app/components/Kanban/utils.tsindex b45f01daba..060e23a532 100644--- a/apps/mes/app/components/Kanban/utils.ts+++ b/apps/mes/app/components/Kanban/utils.ts@@ -5,7 +5,7 @@ import type {KeyboardCoordinateGetter,Over} from "@dnd-kit/core";-import { KeyboardCode, closestCorners, getFirstCollision } from "@dnd-kit/core";+import { closestCorners, getFirstCollision, KeyboardCode } from "@dnd-kit/core";import type { DraggableData } from "./types";const directions: string[] = [diff --git a/apps/starter/app/routes/x+/_index.tsx b/apps/starter/app/routes/x+/_index.tsxindex 916f1da232..45250f8df0 100644--- a/apps/starter/app/routes/x+/_index.tsx+++ b/apps/starter/app/routes/x+/_index.tsx@@ -1,7 +1,7 @@-import { Heading, cn } from "@carbon/react";+import { cn, Heading } from "@carbon/react";import { getLocalTimeZone } from "@internationalized/date";import { useLocale } from "@react-aria/i18n";-import { useMemo, type ComponentProps } from "react";+import { type ComponentProps, useMemo } from "react";import { useUser } from "~/hooks";export default function AppIndexRoute() {diff --git a/examples/quote-configurator/app/routes/_index.tsx b/examples/quote-configurator/app/routes/_index.tsxindex 436c6332f0..f90c6d45e5 100644--- a/examples/quote-configurator/app/routes/_index.tsx+++ b/examples/quote-configurator/app/routes/_index.tsx@@ -9,8 +9,8 @@ import { Button, Heading, TooltipProvider, toast } from "@carbon/react";import { useEffect } from "react";import type { ActionFunctionArgs } from "react-router";import { data, useFetcher } from "react-router";-import { zfd } from "zod-form-data";import { z } from "zod/v3";+import { zfd } from "zod-form-data";import { CONFIGURED_ITEM_ID } from "~/config";import { carbon } from "~/lib/carbon.server";diff --git a/examples/upload-3d-model/app/entry.client.tsx b/examples/upload-3d-model/app/entry.client.tsxindex c9c94bfb1c..7c3945fbf2 100644--- a/examples/upload-3d-model/app/entry.client.tsx+++ b/examples/upload-3d-model/app/entry.client.tsx@@ -1,6 +1,6 @@-import { HydratedRouter } from "react-router/dom";import { startTransition } from "react";import { hydrateRoot } from "react-dom/client";+import { HydratedRouter } from "react-router/dom";startTransition(() => {hydrateRoot(diff --git a/examples/upload-3d-model/app/routes/_index.tsx b/examples/upload-3d-model/app/routes/_index.tsxindex e19d1703aa..fa9b8962ee 100644--- a/examples/upload-3d-model/app/routes/_index.tsx+++ b/examples/upload-3d-model/app/routes/_index.tsx@@ -4,15 +4,13 @@ import {Input,InputGroup,InputLeftAddon,- toast,- TooltipProvider+ TooltipProvider,+ toast} from "@carbon/react";import { useEffect, useState } from "react";+import type { ActionFunctionArgs } from "react-router";import { data, useFetcher } from "react-router";-import { ModelUpload } from "~/components/ModelUpload";--import type { ActionFunctionArgs } from "react-router";import { carbon } from "~/lib/carbon.server";export async function action({ request }: ActionFunctionArgs) {diff --git a/packages/auth/src/lib/supabase/client.ts b/packages/auth/src/lib/supabase/client.tsindex 660e7bc490..f1eb8656b1 100644--- a/packages/auth/src/lib/supabase/client.ts+++ b/packages/auth/src/lib/supabase/client.ts@@ -2,9 +2,8 @@ import type { Database } from "@carbon/database";import { isBrowser } from "@carbon/utils";import type { SupabaseClient } from "@supabase/supabase-js";import { createClient } from "@supabase/supabase-js";-import type { StoreApi } from "zustand";-import type { MutableRefObject } from "react";+import type { StoreApi } from "zustand";import {SUPABASE_ANON_KEY,SUPABASE_SERVICE_ROLE_KEY,diff --git a/packages/auth/src/services/users.server.ts b/packages/auth/src/services/users.server.tsindex 67f186c4f3..1ee28f235a 100644--- a/packages/auth/src/services/users.server.ts+++ b/packages/auth/src/services/users.server.ts@@ -1,11 +1,10 @@import type { Database, Json } from "@carbon/database";import { redis } from "@carbon/kv";import { updateSubscriptionQuantityForCompany } from "@carbon/stripe/stripe.server";-import type { SupabaseClient } from "@supabase/supabase-js";-import { getCarbonServiceRole } from "../lib/supabase";-import { Edition } from "@carbon/utils";+import type { SupabaseClient } from "@supabase/supabase-js";import { CarbonEdition } from "../config/env";+import { getCarbonServiceRole } from "../lib/supabase";import type { Permission, Result } from "../types";import { error, success } from "../utils/result";import {diff --git a/packages/auth/src/validators.ts b/packages/auth/src/validators.tsindex bbc31d0d90..e7f7b3e00c 100644--- a/packages/auth/src/validators.ts+++ b/packages/auth/src/validators.ts@@ -1,5 +1,5 @@-import { zfd } from "zod-form-data";import { z } from "zod/v3";+import { zfd } from "zod-form-data";export const loginValidator = z.object({email: zdiff --git a/packages/documents/src/pdf/IssuePDF.tsx b/packages/documents/src/pdf/IssuePDF.tsxindex 1c9870c7ad..5519171812 100644--- a/packages/documents/src/pdf/IssuePDF.tsx+++ b/packages/documents/src/pdf/IssuePDF.tsx@@ -1,8 +1,7 @@import type { Database } from "@carbon/database";+import type { JSONContent } from "@carbon/react";import { Text, View } from "@react-pdf/renderer";import { createTw } from "react-pdf-tailwind";--import type { JSONContent } from "@carbon/react";import type { PDF } from "../types";import { Footer, Header, Note, Summary, Template } from "./components";diff --git a/packages/documents/src/pdf/PurchaseOrderPDF.tsx b/packages/documents/src/pdf/PurchaseOrderPDF.tsxindex a875c49e9a..002bb46ded 100644--- a/packages/documents/src/pdf/PurchaseOrderPDF.tsx+++ b/packages/documents/src/pdf/PurchaseOrderPDF.tsx@@ -1,9 +1,8 @@import type { Database } from "@carbon/database";-import { Text, View } from "@react-pdf/renderer";-import { createTw } from "react-pdf-tailwind";-import type { JSONContent } from "@carbon/react";import { formatCityStatePostalCode } from "@carbon/utils";+import { Text, View } from "@react-pdf/renderer";+import { createTw } from "react-pdf-tailwind";import type { PDF } from "../types";import {getLineDescription,diff --git a/packages/documents/src/pdf/QuotePDF.tsx b/packages/documents/src/pdf/QuotePDF.tsxindex c7d76e199f..482ffe92ba 100644--- a/packages/documents/src/pdf/QuotePDF.tsx+++ b/packages/documents/src/pdf/QuotePDF.tsx@@ -1,10 +1,9 @@import type { Database } from "@carbon/database";+import type { JSONContent } from "@carbon/react";+import { formatCityStatePostalCode } from "@carbon/utils";import { getLocalTimeZone, today } from "@internationalized/date";import { Image, Text, View } from "@react-pdf/renderer";import { createTw } from "react-pdf-tailwind";--import type { JSONContent } from "@carbon/react";-import { formatCityStatePostalCode } from "@carbon/utils";import type { PDF } from "../types";import { getLineDescription, getLineDescriptionDetails } from "../utils/quote";import { getCurrencyFormatter } from "../utils/shared";diff --git a/packages/documents/src/pdf/SalesInvoicePDF.tsx b/packages/documents/src/pdf/SalesInvoicePDF.tsxindex 25630d84c7..a45c02d89c 100644--- a/packages/documents/src/pdf/SalesInvoicePDF.tsx+++ b/packages/documents/src/pdf/SalesInvoicePDF.tsx@@ -1,9 +1,8 @@import type { Database } from "@carbon/database";-import { Image, Text, View } from "@react-pdf/renderer";-import { createTw } from "react-pdf-tailwind";-import type { JSONContent } from "@carbon/react";import { formatCityStatePostalCode } from "@carbon/utils";+import { Image, Text, View } from "@react-pdf/renderer";+import { createTw } from "react-pdf-tailwind";import type { PDF } from "../types";import {getLineDescription,diff --git a/packages/documents/src/pdf/SalesOrderPDF.tsx b/packages/documents/src/pdf/SalesOrderPDF.tsxindex c491816e8f..a2a2c11445 100644--- a/packages/documents/src/pdf/SalesOrderPDF.tsx+++ b/packages/documents/src/pdf/SalesOrderPDF.tsx@@ -1,9 +1,8 @@import type { Database } from "@carbon/database";-import { Image, Text, View } from "@react-pdf/renderer";-import { createTw } from "react-pdf-tailwind";-import type { JSONContent } from "@carbon/react";import { formatCityStatePostalCode } from "@carbon/utils";+import { Image, Text, View } from "@react-pdf/renderer";+import { createTw } from "react-pdf-tailwind";import type { PDF } from "../types";import {getLineDescription,diff --git a/packages/ee/src/index.ts b/packages/ee/src/index.tsindex 6a428b35bc..81c0e79813 100644--- a/packages/ee/src/index.ts+++ b/packages/ee/src/index.ts@@ -27,9 +27,8 @@ export const integrations = [Zapier];-export { Onshape, Logo as OnshapeLogo } from "./onshape/config";-export { Slack } from "./slack/config";-export * from "./slack/lib/messages";-+export { Logo as OnshapeLogo, Onshape } from "./onshape/config";// TODO: export as @carbon/ee/paperlessexport { PaperlessPartsClient } from "./paperless-parts/lib/client";+export { Slack } from "./slack/config";+export * from "./slack/lib/messages";diff --git a/packages/ee/src/linear/lib/client.ts b/packages/ee/src/linear/lib/client.tsindex 0e43085c09..13ee842161 100644--- a/packages/ee/src/linear/lib/client.ts+++ b/packages/ee/src/linear/lib/client.ts@@ -1,5 +1,5 @@import { getCarbonServiceRole } from "@carbon/auth";-import axios, { isAxiosError, type AxiosInstance } from "axios";+import axios, { type AxiosInstance, isAxiosError } from "axios";import type z from "zod";import type { LinearIssueSchema } from "./service";import { getLinearIntegration } from "./service";diff --git a/packages/ee/src/notifications/services/linear.ts b/packages/ee/src/notifications/services/linear.tsindex 10b7ea5f44..04c81ddad9 100644--- a/packages/ee/src/notifications/services/linear.ts+++ b/packages/ee/src/notifications/services/linear.ts@@ -5,8 +5,8 @@ import {getLinearIssueFromExternalId,LinearClient,mapCarbonStatusToLinearStatus,- tiptapToMarkdown,- type TiptapDocument+ type TiptapDocument,+ tiptapToMarkdown} from "../../linear/lib";import type { NotificationEvent, NotificationService } from "../types";diff --git a/packages/ee/src/paperless-parts/config.tsx b/packages/ee/src/paperless-parts/config.tsxindex a2f790cf08..677d727681 100644--- a/packages/ee/src/paperless-parts/config.tsx+++ b/packages/ee/src/paperless-parts/config.tsx@@ -1,8 +1,8 @@-import { cn, Copy, Input, InputGroup, InputRightElement } from "@carbon/react";+import { Copy, cn, Input, InputGroup, InputRightElement } from "@carbon/react";import { isBrowser } from "@carbon/utils";import type { SVGProps } from "react";-import { zfd } from "zod-form-data";import { z } from "zod/v3";+import { zfd } from "zod-form-data";import type { IntegrationConfig } from "../types";export const PaperlessParts: IntegrationConfig = {diff --git a/packages/ee/src/slack.server.ts b/packages/ee/src/slack.server.tsindex e0e506a278..510f460f8f 100644--- a/packages/ee/src/slack.server.ts+++ b/packages/ee/src/slack.server.ts@@ -1,5 +1,4 @@export * from "./slack/lib/client";export * from "./slack/lib/messages";-export * from "./slack/lib/service";-export type { DocumentType } from "./slack/lib/service";+export * from "./slack/lib/service";diff --git a/packages/ee/src/slack/lib/client.ts b/packages/ee/src/slack/lib/client.tsindex be0ec32344..9c6f640e81 100644--- a/packages/ee/src/slack/lib/client.ts+++ b/packages/ee/src/slack/lib/client.ts@@ -1,9 +1,4 @@-import Bolt from "@slack/bolt";-import { InstallProvider } from "@slack/oauth";-import { WebClient } from "@slack/web-api";import { createHmac } from "node:crypto";-import { z } from "zod/v3";-import {SLACK_CLIENT_ID,SLACK_CLIENT_SECRET,@@ -11,6 +6,10 @@ import {SLACK_SIGNING_SECRET,SLACK_STATE_SECRET} from "@carbon/auth";+import Bolt from "@slack/bolt";+import { InstallProvider } from "@slack/oauth";+import { WebClient } from "@slack/web-api";+import { z } from "zod/v3";const { App } = Bolt;diff --git a/packages/form/src/components/PhoneInput.tsx b/packages/form/src/components/PhoneInput.tsxindex 028e6f3c9a..6d1e2d07d9 100644--- a/packages/form/src/components/PhoneInput.tsx+++ b/packages/form/src/components/PhoneInput.tsx@@ -7,14 +7,14 @@ import {CommandInput,CommandItem,CommandList,+ cn,FormControl,FormErrorMessage,FormLabel,Input,Popover,PopoverContent,- PopoverTrigger,- cn+ PopoverTrigger} from "@carbon/react";import type {ElementRef,diff --git a/packages/form/src/index.tsx b/packages/form/src/index.tsxindex 8da6fbfa2b..40666a0757 100644--- a/packages/form/src/index.tsx+++ b/packages/form/src/index.tsx@@ -2,9 +2,9 @@ export * from "./components";export * from "./hooks";export {FieldArray,- useFieldArray,type FieldArrayHelpers,- type FieldArrayProps+ type FieldArrayProps,+ useFieldArray} from "./internal/state/fieldArray";export * from "./server";export * from "./state/formStateHooks";diff --git a/packages/form/src/internal/getInputProps.test.ts b/packages/form/src/internal/getInputProps.test.tsindex ed188c27de..7cd1a5c7c1 100644--- a/packages/form/src/internal/getInputProps.test.ts+++ b/packages/form/src/internal/getInputProps.test.ts@@ -1,4 +1,4 @@-import { describe, it, expect, vi } from "vitest";+import { describe, expect, it, vi } from "vitest";import type { CreateGetInputPropsOptions } from "./getInputProps";import { createGetInputProps } from "./getInputProps";diff --git a/packages/react/src/Date/DateTimePicker.tsx b/packages/react/src/Date/DateTimePicker.tsxindex 075c79d3a3..fe13312d2f 100644--- a/packages/react/src/Date/DateTimePicker.tsx+++ b/packages/react/src/Date/DateTimePicker.tsx@@ -6,13 +6,13 @@ import { useRef } from "react";import { LuBan } from "react-icons/lu";import { cn } from "..";import { HStack } from "../HStack";-import { InputGroup } from "../Input";import { useOutsideClick } from "../hooks";-import TimeField from "./TimePicker";+import { InputGroup } from "../Input";import { FieldButton } from "./components/Button";import { Calendar } from "./components/Calendar";import DateField from "./components/DateField";import { Popover } from "./components/Popover";+import TimeField from "./TimePicker";const DateTimePicker = (props: DatePickerProps<DateValue> & {diff --git a/packages/react/src/Date/index.ts b/packages/react/src/Date/index.tsindex cf2a947339..153b1805fb 100644--- a/packages/react/src/Date/index.ts+++ b/packages/react/src/Date/index.ts@@ -1,6 +1,6 @@-import TimePicker from "./TimePicker";import DatePicker from "./DatePicker";-import DateTimePicker from "./DateTimePicker";import DateRangePicker from "./DateRangePicker";+import DateTimePicker from "./DateTimePicker";+import TimePicker from "./TimePicker";export { DatePicker, DateTimePicker, DateRangePicker, TimePicker };diff --git a/packages/react/src/Editor/components/NodeSelector.tsx b/packages/react/src/Editor/components/NodeSelector.tsxindex c57a85b94f..bdb42262eb 100644--- a/packages/react/src/Editor/components/NodeSelector.tsx+++ b/packages/react/src/Editor/components/NodeSelector.tsx@@ -1,5 +1,6 @@import type { EditorInstance } from "@carbon/tiptap";import { EditorBubbleItem, useEditor } from "@carbon/tiptap";+import { Popover } from "@radix-ui/react-popover";import type { IconType } from "react-icons";import {LuCheck,@@ -11,8 +12,6 @@ import {LuSquareCheck,LuText} from "react-icons/lu";--import { Popover } from "@radix-ui/react-popover";import { Button } from "../../Button";import { PopoverContent, PopoverTrigger } from "../../Popover";diff --git a/packages/react/src/Form/FormLabel.tsx b/packages/react/src/Form/FormLabel.tsxindex 58e9e338c5..f309213c8d 100644--- a/packages/react/src/Form/FormLabel.tsx+++ b/packages/react/src/Form/FormLabel.tsx@@ -1,9 +1,8 @@import type { ComponentPropsWithoutRef, ElementRef } from "react";import { forwardRef } from "react";-import { useFormControlContext } from "./FormControl";-import { LuSquareFunction } from "react-icons/lu";import { cn } from "../utils/cn";+import { useFormControlContext } from "./FormControl";export const FormLabel = forwardRef<ElementRef<"label">,diff --git a/packages/react/src/FunnelChart.tsx b/packages/react/src/FunnelChart.tsxindex 884974e888..8ce38a7a01 100644--- a/packages/react/src/FunnelChart.tsx+++ b/packages/react/src/FunnelChart.tsx@@ -1,10 +1,10 @@-import { Fragment, useMemo, useRef, useState } from "react";+import { curveBasis } from "@visx/curve";import { ParentSize } from "@visx/responsive";import { scaleLinear } from "@visx/scale";import { Area } from "@visx/shape";import { Text } from "@visx/text";-import { curveBasis } from "@visx/curve";import { motion } from "framer-motion";+import { Fragment, useMemo, useRef, useState } from "react";import { useIsMobile } from "./hooks";import { cn } from "./utils/cn";diff --git a/packages/react/src/Number.tsx b/packages/react/src/Number.tsxindex 8968bf5f39..6e435dd3f0 100644--- a/packages/react/src/Number.tsx+++ b/packages/react/src/Number.tsx@@ -1,7 +1,6 @@+import { forwardRef } from "react";import * as ReactAria from "react-aria-components";import { Input, type InputProps } from "./Input";--import { forwardRef } from "react";import { cn } from "./utils/cn";export type NumberFieldProps = ReactAria.NumberFieldProps;diff --git a/packages/react/src/Resizable.tsx b/packages/react/src/Resizable.tsxindex 9492cc0268..fc91bd9c10 100644--- a/packages/react/src/Resizable.tsx+++ b/packages/react/src/Resizable.tsx@@ -2,9 +2,8 @@import { LuGripVertical } from "react-icons/lu";import * as ResizablePrimitive from "react-resizable-panels";--import { cn } from "./utils/cn";import { ClientOnly } from "./ClientOnly";+import { cn } from "./utils/cn";const ResizablePanelGroup = ({className,diff --git a/packages/react/src/RichText/RichText.tsx b/packages/react/src/RichText/RichText.tsxindex e4a23e3982..e02cb64840 100644--- a/packages/react/src/RichText/RichText.tsx+++ b/packages/react/src/RichText/RichText.tsx@@ -4,8 +4,8 @@ import TextStyle from "@tiptap/extension-text-style";import { EditorContent, useEditor } from "@tiptap/react";import StarterKit from "@tiptap/starter-kit";import type { ComponentProps } from "react";-import { VStack } from "../VStack";import { cn } from "../utils/cn";+import { VStack } from "../VStack";import { Toolbar } from "./Toolbar";export const useRichText = (content: string) => {diff --git a/packages/react/src/ShortcutKey.tsx b/packages/react/src/ShortcutKey.tsxindex dffeb12e60..700f2a4450 100644--- a/packages/react/src/ShortcutKey.tsx+++ b/packages/react/src/ShortcutKey.tsx@@ -5,10 +5,10 @@ import {LuChevronRight,LuChevronUp} from "react-icons/lu";-import { cn } from "./utils/cn";+import type { Modifier, ShortcutDefinition } from "./hooks/useShortcutKeys";import { useOperatingSystem } from "./OperatingSystem";-import type { Modifier, ShortcutDefinition } from "./hooks/useShortcutKeys";+import { cn } from "./utils/cn";export const shortcutKeyVariants = {small:diff --git a/packages/react/src/Status.tsx b/packages/react/src/Status.tsxindex 7df91e12ed..421eb1201c 100644--- a/packages/react/src/Status.tsx+++ b/packages/react/src/Status.tsx@@ -1,15 +1,16 @@import type { ComponentProps } from "react";-import { Badge } from "./Badge";-import { cn } from "./utils/cn";import {- LuCircleCheck,LuCircleAlert,+ LuCircleCheck,+ LuCircleDashed,LuCircleSlash,LuClock,LuLoaderCircle,- LuStar,- LuCircleDashed+ LuStar} from "react-icons/lu";+import { Badge } from "./Badge";+import { cn } from "./utils/cn";+type StatusProps = ComponentProps<"div"> & {color?: "green" | "orange" | "red" | "yellow" | "blue" | "gray" | "purple";};diff --git a/packages/react/src/TextShimmer.tsx b/packages/react/src/TextShimmer.tsxindex bdf37f73da..2c4eff1a17 100644--- a/packages/react/src/TextShimmer.tsx+++ b/packages/react/src/TextShimmer.tsx@@ -1,6 +1,6 @@"use client";import { motion } from "framer-motion";-import { memo, useMemo, type JSX } from "react";+import { type JSX, memo, useMemo } from "react";import { cn } from "./utils/cn";export type TextShimmerProps = {diff --git a/packages/react/src/index.tsx b/packages/react/src/index.tsxindex daab8b4c15..90a626aa10 100644--- a/packages/react/src/index.tsx+++ b/packages/react/src/index.tsx@@ -26,8 +26,8 @@ import {CardAction,CardAttribute,CardAttributeLabel,- CardAttributeValue,CardAttributes,+ CardAttributeValue,CardContent,CardDescription,CardFooter,@@ -123,10 +123,15 @@ import {FormHelperText,FormLabel} from "./Form";-import { HStack } from "./HStack";-import { HTML, generateHTML } from "./HTML";import { Heading } from "./Heading";import { HoverCard, HoverCardContent, HoverCardTrigger } from "./HoverCard";+import { HStack } from "./HStack";+import { generateHTML, HTML } from "./HTML";+import type {+ Modifier,+ Shortcut,+ ShortcutDefinition+} from "./hooks/useShortcutKeys";import { IconButton } from "./IconButton";import type { InputProps } from "./Input";import {@@ -284,9 +289,9 @@ import { Status } from "./Status";import { Switch } from "./Switch";import { Table, TableCaption, Tbody, Td, Tfoot, Th, Thead, Tr } from "./Table";import { Tabs, TabsContent, TabsList, TabsTrigger } from "./Tabs";-import { TextShimmer } from "./TextShimmer";import type { TextareaProps } from "./Textarea";import { Textarea } from "./Textarea";+import { TextShimmer } from "./TextShimmer";import { Toaster, toast } from "./Toast";import { Toggle } from "./Toggle";import { ToggleGroup, ToggleGroupItem } from "./ToggleGroup";@@ -296,15 +301,10 @@ import {TooltipProvider,TooltipTrigger} from "./Tooltip";-import { VStack } from "./VStack";-import type {- Modifier,- Shortcut,- ShortcutDefinition-} from "./hooks/useShortcutKeys";import { cn } from "./utils/cn";import { copyToClipboard } from "./utils/dom";import { getValidChildren, reactNodeToString } from "./utils/react";+import { VStack } from "./VStack";export * from "./hooks";export {diff --git a/packages/react/src/utils/cn.ts b/packages/react/src/utils/cn.tsindex 5c58dd7b02..137908a85c 100644--- a/packages/react/src/utils/cn.ts+++ b/packages/react/src/utils/cn.ts@@ -1,4 +1,4 @@-import { clsx, type ClassValue } from "clsx";+import { type ClassValue, clsx } from "clsx";import { extendTailwindMerge } from "tailwind-merge";const customTwMerge = extendTailwindMerge({});diff --git a/packages/tiptap/src/components/editor-bubble-item.tsx b/packages/tiptap/src/components/editor-bubble-item.tsxindex b9dd34e018..c3e8c92067 100644--- a/packages/tiptap/src/components/editor-bubble-item.tsx+++ b/packages/tiptap/src/components/editor-bubble-item.tsx@@ -1,8 +1,8 @@-import { forwardRef } from "react";import { Slot } from "@radix-ui/react-slot";-import { useCurrentEditor } from "@tiptap/react";import type { Editor } from "@tiptap/react";+import { useCurrentEditor } from "@tiptap/react";import type { ComponentPropsWithoutRef, ReactNode } from "react";+import { forwardRef } from "react";interface EditorBubbleItemProps {readonly children: ReactNode;diff --git a/packages/tiptap/src/components/editor-command-item.tsx b/packages/tiptap/src/components/editor-command-item.tsxindex 8c8df93efa..fb9883d276 100644--- a/packages/tiptap/src/components/editor-command-item.tsx+++ b/packages/tiptap/src/components/editor-command-item.tsx@@ -1,10 +1,10 @@-import { forwardRef } from "react";-import { CommandEmpty, CommandItem } from "cmdk";+import type { Editor, Range } from "@tiptap/core";import { useCurrentEditor } from "@tiptap/react";+import { CommandEmpty, CommandItem } from "cmdk";import { useAtomValue } from "jotai";-import { rangeAtom } from "../utils/atoms";import type { ComponentPropsWithoutRef } from "react";-import type { Editor, Range } from "@tiptap/core";+import { forwardRef } from "react";+import { rangeAtom } from "../utils/atoms";interface EditorCommandItemProps {readonly onCommand: ({diff --git a/packages/tiptap/src/components/editor-command.tsx b/packages/tiptap/src/components/editor-command.tsxindex 9ecfc70293..481dc6ebd2 100644--- a/packages/tiptap/src/components/editor-command.tsx+++ b/packages/tiptap/src/components/editor-command.tsx@@ -1,11 +1,11 @@-import { useAtom, useSetAtom } from "jotai";-import { useEffect, forwardRef, createContext } from "react";+import type { Range } from "@tiptap/core";import { Command } from "cmdk";+import { useAtom, useSetAtom } from "jotai";+import type { ComponentPropsWithoutRef, FC } from "react";+import { createContext, forwardRef, useEffect } from "react";+import type tunnel from "tunnel-rat";import { queryAtom, rangeAtom } from "../utils/atoms";import { novelStore } from "../utils/store";-import type tunnel from "tunnel-rat";-import type { ComponentPropsWithoutRef, FC } from "react";-import type { Range } from "@tiptap/core";export const EditorCommandTunnelContext = createContext({} as ReturnType<typeof tunnel>diff --git a/packages/tiptap/src/components/editor.tsx b/packages/tiptap/src/components/editor.tsxindex a25e987d00..2cd2d637f2 100644--- a/packages/tiptap/src/components/editor.tsx+++ b/packages/tiptap/src/components/editor.tsx@@ -1,8 +1,8 @@-import { EditorProvider } from "@tiptap/react";import type { EditorProviderProps, JSONContent } from "@tiptap/react";+import { EditorProvider } from "@tiptap/react";import { Provider } from "jotai";-import { forwardRef, useRef } from "react";import type { FC, ReactNode } from "react";+import { forwardRef, useRef } from "react";import tunnel from "tunnel-rat";import { novelStore } from "../utils/store";import { EditorCommandTunnelContext } from "./editor-command";diff --git a/packages/tiptap/src/components/index.ts b/packages/tiptap/src/components/index.tsindex 80b53ae2ba..f774d755c5 100644--- a/packages/tiptap/src/components/index.ts+++ b/packages/tiptap/src/components/index.ts@@ -1,14 +1,14 @@-export { useCurrentEditor as useEditor } from "@tiptap/react";export { type Editor as EditorInstance } from "@tiptap/core";export type { JSONContent } from "@tiptap/react";+export { useCurrentEditor as useEditor } from "@tiptap/react";-export { EditorRoot, EditorContent, type EditorContentProps } from "./editor";+export { EditorContent, type EditorContentProps, EditorRoot } from "./editor";export { EditorBubble } from "./editor-bubble";export { EditorBubbleItem } from "./editor-bubble-item";export { EditorCommand, EditorCommandList } from "./editor-command";-export { EditorCommandItem, EditorCommandEmpty } from "./editor-command-item";+export { EditorCommandEmpty, EditorCommandItem } from "./editor-command-item";export {MentionList,- type MentionListRef,- type MentionListProps+ type MentionListProps,+ type MentionListRef} from "./mention-list";diff --git a/packages/tiptap/src/extensions/index.ts b/packages/tiptap/src/extensions/index.tsindex ea265b3b13..0d5c1fddd4 100644--- a/packages/tiptap/src/extensions/index.ts+++ b/packages/tiptap/src/extensions/index.ts@@ -1,4 +1,6 @@import { InputRule } from "@tiptap/core";+import CharacterCount from "@tiptap/extension-character-count";+import CodeBlockLowlight from "@tiptap/extension-code-block-lowlight";import { Color } from "@tiptap/extension-color";import Highlight from "@tiptap/extension-highlight";import HorizontalRule from "@tiptap/extension-horizontal-rule";@@ -9,17 +11,14 @@ import { TaskItem } from "@tiptap/extension-task-item";import { TaskList } from "@tiptap/extension-task-list";import TextStyle from "@tiptap/extension-text-style";import TiptapUnderline from "@tiptap/extension-underline";+import Youtube from "@tiptap/extension-youtube";import StarterKit from "@tiptap/starter-kit";+import GlobalDragHandle from "tiptap-extension-global-drag-handle";import { Markdown } from "tiptap-markdown";import CustomKeymap from "./custom-keymap";import { ImageResizer } from "./image-resizer";import UpdatedImage from "./updated-image";-import CharacterCount from "@tiptap/extension-character-count";-import CodeBlockLowlight from "@tiptap/extension-code-block-lowlight";-import Youtube from "@tiptap/extension-youtube";-import GlobalDragHandle from "tiptap-extension-global-drag-handle";-const PlaceholderExtension = Placeholder.configure({placeholder: ({ node }) => {if (node.type.name === "heading") {diff --git a/packages/tiptap/src/extensions/mention.tsx b/packages/tiptap/src/extensions/mention.tsxindex ea1039ed2e..d528d6595a 100644--- a/packages/tiptap/src/extensions/mention.tsx+++ b/packages/tiptap/src/extensions/mention.tsx@@ -1,9 +1,9 @@-import Mention from "@tiptap/extension-mention";import type { MentionOptions } from "@tiptap/extension-mention";+import Mention from "@tiptap/extension-mention";import { ReactRenderer } from "@tiptap/react";import type {- SuggestionProps,- SuggestionKeyDownProps+ SuggestionKeyDownProps,+ SuggestionProps} from "@tiptap/suggestion";import type { RefObject } from "react";import tippy, { type Instance, type Props } from "tippy.js";diff --git a/packages/tiptap/src/extensions/slash-command.tsx b/packages/tiptap/src/extensions/slash-command.tsxindex 41b650ae8c..c4c5e9356c 100644--- a/packages/tiptap/src/extensions/slash-command.tsx+++ b/packages/tiptap/src/extensions/slash-command.tsx@@ -1,9 +1,8 @@-import { Extension } from "@tiptap/core";import type { Editor, Range } from "@tiptap/core";+import { Extension } from "@tiptap/core";import { ReactRenderer } from "@tiptap/react";import Suggestion, { type SuggestionOptions } from "@tiptap/suggestion";-import type { RefObject } from "react";-import type { ReactNode } from "react";+import type { ReactNode, RefObject } from "react";import tippy, {type GetReferenceClientRect,type Instance,diff --git a/packages/tiptap/src/index.ts b/packages/tiptap/src/index.tsindex f30298bf20..e18995e0e6 100644--- a/packages/tiptap/src/index.ts+++ b/packages/tiptap/src/index.ts@@ -7,40 +7,44 @@ export {EditorCommandItem,EditorCommandList,EditorContent,- EditorRoot,- MentionList,- useEditor,type EditorContentProps,type EditorInstance,+ EditorRoot,type JSONContent,+ MentionList,type MentionListProps,- type MentionListRef+ type MentionListRef,+ useEditor} from "./components";// Extensionsexport {- addAIHighlight,AIHighlight,+ addAIHighlight,CharacterCount,CodeBlockLowlight,Color,Command,+ type CreateMentionExtensionOptions,+ type CreateMentionSuggestionOptions,+ CustomKeymap,createMentionExtension,createMentionSuggestion,createSuggestionItems,- CustomKeymap,GlobalDragHandle,- handleCommandNavigation,HighlightExtension,HorizontalRule,+ handleCommandNavigation,ImageResizer,InputRule,MarkdownExtension,Mention,+ type MentionSuggestion,Placeholder,removeAIHighlight,renderItems,StarterKit,+ type SuggestionItem,TaskItem,TaskList,TextStyle,@@ -48,11 +52,7 @@ export {TiptapLink,TiptapUnderline,UpdatedImage,- Youtube,- type CreateMentionExtensionOptions,- type CreateMentionSuggestionOptions,- type MentionSuggestion,- type SuggestionItem+ Youtube} from "./extensions";// Plugins@@ -60,9 +60,9 @@ export {createImageUpload,handleImageDrop,handleImagePaste,- UploadImagesPlugin,type ImageUploadOptions,- type UploadFn+ type UploadFn,+ UploadImagesPlugin} from "./plugins";// Utilsdiff --git a/packages/tiptap/src/plugins/index.ts b/packages/tiptap/src/plugins/index.tsindex 9100a1890a..439bd08b2c 100644--- a/packages/tiptap/src/plugins/index.ts+++ b/packages/tiptap/src/plugins/index.ts@@ -1,8 +1,8 @@export {- UploadImagesPlugin,- type UploadFn,- type ImageUploadOptions,createImageUpload,handleImageDrop,- handleImagePaste+ handleImagePaste,+ type ImageUploadOptions,+ type UploadFn,+ UploadImagesPlugin} from "./upload-images";diff --git a/packages/tiptap/src/utils/atoms.ts b/packages/tiptap/src/utils/atoms.tsindex 0743ec025f..eccf3773a2 100644--- a/packages/tiptap/src/utils/atoms.ts+++ b/packages/tiptap/src/utils/atoms.ts@@ -1,5 +1,5 @@-import { atom } from "jotai";import type { Range } from "@tiptap/core";+import { atom } from "jotai";export const queryAtom = atom("");export const rangeAtom = atom<Range | null>(null);diff --git a/packages/utils/src/date.ts b/packages/utils/src/date.tsindex d6d176f14f..4113923114 100644--- a/packages/utils/src/date.ts+++ b/packages/utils/src/date.ts@@ -4,6 +4,7 @@ import {parseDate,toZoned} from "@internationalized/date";+const relativeFormatter = new Intl.RelativeTimeFormat(undefined, {numeric: "auto"});