Skip to content

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

Hide Incomplete (#81)

Brad Barbind336388495f3
diff --git a/apps/carbon/app/components/Form/Supplier.tsx b/apps/carbon/app/components/Form/Supplier.tsx
index ed5b737bea..0a5ae9dbef 100644
--- a/apps/carbon/app/components/Form/Supplier.tsx
+++ b/apps/carbon/app/components/Form/Supplier.tsx
@@ -2,6 +2,7 @@ import type { ComboboxProps } from "@carbon/form";
import { Combobox, CreatableCombobox } from "@carbon/form";
import { useDisclosure } from "@carbon/react";
import { useMemo, useRef, useState } from "react";
+import { useUser } from "~/hooks";
import { SupplierForm } from "~/modules/purchasing";
import { useSuppliers } from "~/stores";
@@ -27,6 +28,8 @@ const Supplier = ({ allowedSuppliers, ...props }: SupplierSelectProps) => {
return result;
}, [suppliers, allowedSuppliers]);
+ const { company } = useUser();
+
return allowedSuppliers ? (
<Combobox options={options} {...props} label={props?.label ?? "Supplier"} />
) : (
@@ -51,6 +54,7 @@ const Supplier = ({ allowedSuppliers, ...props }: SupplierSelectProps) => {
}}
initialValues={{
name: created,
+ currencyCode: company.baseCurrencyCode,
}}
/>
)}
diff --git a/apps/carbon/app/components/ItemThumnailUpload.tsx b/apps/carbon/app/components/ItemThumnailUpload.tsx
index 745c2154bf..46b3e345be 100644
--- a/apps/carbon/app/components/ItemThumnailUpload.tsx
+++ b/apps/carbon/app/components/ItemThumnailUpload.tsx
@@ -58,7 +58,7 @@ export function ItemThumbnailUpload({
}
toast.success("Thumbnail removed");
- }, [carbon, itemId]);
+ }, [carbon, itemId, modelId]);
const onFileChange = useCallback(
async (e: ChangeEvent<HTMLInputElement>) => {
diff --git a/apps/carbon/app/components/Layout/Navigation/useModules.tsx b/apps/carbon/app/components/Layout/Navigation/useModules.tsx
index 9ff5f03cf9..49779b47b1 100644
--- a/apps/carbon/app/components/Layout/Navigation/useModules.tsx
+++ b/apps/carbon/app/components/Layout/Navigation/useModules.tsx
@@ -1,6 +1,5 @@
import {
LuBox,
- LuCreditCard,
LuCrown,
LuFactory,
LuFiles,
@@ -47,7 +46,7 @@ export function useModules() {
{
permission: "purchasing",
name: "Purchasing",
- to: path.to.purchaseOrders,
+ to: path.to.suppliers,
icon: LuShoppingCart,
},
@@ -63,12 +62,12 @@ export function useModules() {
to: path.to.currencies,
icon: LuLandmark,
},
- {
- permission: "invoicing",
- name: "Invoicing",
- to: path.to.purchaseInvoices,
- icon: LuCreditCard,
- },
+ // {
+ // permission: "invoicing",
+ // name: "Invoicing",
+ // to: path.to.purchaseInvoices,
+ // icon: LuCreditCard,
+ // },
{
permission: "people",
name: "People",
diff --git a/apps/carbon/app/components/Layout/Topbar/Breadcrumbs.tsx b/apps/carbon/app/components/Layout/Topbar/Breadcrumbs.tsx
index 880c030f25..055f4a35ab 100644
--- a/apps/carbon/app/components/Layout/Topbar/Breadcrumbs.tsx
+++ b/apps/carbon/app/components/Layout/Topbar/Breadcrumbs.tsx
@@ -15,7 +15,6 @@ import {
Modal,
ModalBody,
ModalContent,
- ModalDescription,
ModalFooter,
ModalHeader,
ModalTitle,
@@ -185,9 +184,6 @@ function CompanyBreadcrumb() {
>
<ModalHeader>
<ModalTitle>Let's set up your new company</ModalTitle>
- <ModalDescription>
- You can always change this later
- </ModalDescription>
</ModalHeader>
<ModalBody>
<VStack spacing={4}>
diff --git a/apps/carbon/app/modules/items/items.models.ts b/apps/carbon/app/modules/items/items.models.ts
index 2805155f86..a739688b5f 100644
--- a/apps/carbon/app/modules/items/items.models.ts
+++ b/apps/carbon/app/modules/items/items.models.ts
@@ -332,15 +332,15 @@ export const methodOperationValidator = z
export const itemCostValidator = z.object({
itemId: z.string().min(1, { message: "Item ID is required" }),
- itemPostingGroupId: zfd.text(z.string().optional()),
- costingMethod: z.enum(itemCostingMethods, {
- errorMap: (issue, ctx) => ({
- message: "Costing method is required",
- }),
- }),
- standardCost: zfd.numeric(z.number().min(0)),
+ // itemPostingGroupId: zfd.text(z.string().optional()),
+ // costingMethod: z.enum(itemCostingMethods, {
+ // errorMap: (issue, ctx) => ({
+ // message: "Costing method is required",
+ // }),
+ // }),
+ // standardCost: zfd.numeric(z.number().min(0)),
unitCost: zfd.numeric(z.number().min(0)),
- costIsAdjusted: zfd.checkbox(),
+ // costIsAdjusted: zfd.checkbox(),
});
export const itemPostingGroupValidator = z.object({
diff --git a/apps/carbon/app/modules/items/ui/Consumables/ConsumableProperties.tsx b/apps/carbon/app/modules/items/ui/Consumables/ConsumableProperties.tsx
index bda2a943a0..61839ae4ad 100644
--- a/apps/carbon/app/modules/items/ui/Consumables/ConsumableProperties.tsx
+++ b/apps/carbon/app/modules/items/ui/Consumables/ConsumableProperties.tsx
@@ -17,16 +17,10 @@ import {
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect } from "react";
import { LuCopy, LuLink } from "react-icons/lu";
-import {
- Assignee,
- MethodBadge,
- MethodIcon,
- TrackingTypeIcon,
- useOptimisticAssignment,
-} from "~/components";
+import { MethodBadge, MethodIcon, TrackingTypeIcon } from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { ItemThumbnailUpload } from "~/components/ItemThumnailUpload";
-import { usePermissions, useRouteData } from "~/hooks";
+import { useRouteData } from "~/hooks";
import { methodType } from "~/modules/shared";
import type { action } from "~/routes/x+/items+/update";
import type { ListItem } from "~/types";
@@ -37,7 +31,6 @@ import type { BuyMethod, Consumable, ItemFile, PickMethod } from "../../types";
import { FileBadge } from "../Item";
const ConsumableProperties = () => {
- const permissions = usePermissions();
const { itemId } = useParams();
if (!itemId) throw new Error("itemId not found");
@@ -55,14 +48,14 @@ const ConsumableProperties = () => {
const buyMethods = routeData?.buyMethods ?? [];
const pickMethods = routeData?.pickMethods ?? [];
- const optimisticAssignment = useOptimisticAssignment({
- id: itemId,
- table: "item",
- });
- const assignee =
- optimisticAssignment !== undefined
- ? optimisticAssignment
- : routeData?.consumableSummary?.assignee;
+ // const optimisticAssignment = useOptimisticAssignment({
+ // id: itemId,
+ // table: "item",
+ // });
+ // const assignee =
+ // optimisticAssignment !== undefined
+ // ? optimisticAssignment
+ // : routeData?.consumableSummary?.assignee;
const fetcher = useFetcher<typeof action>();
useEffect(() => {
@@ -143,7 +136,7 @@ const ConsumableProperties = () => {
itemId={itemId}
/>
</VStack>
- <VStack spacing={2}>
+ {/* <VStack spacing={2}>
<h3 className="text-xs text-muted-foreground">Assignee</h3>
<Assignee
id={itemId}
@@ -151,7 +144,7 @@ const ConsumableProperties = () => {
value={assignee ?? ""}
isReadOnly={!permissions.can("update", "parts")}
/>
- </VStack>
+ </VStack> */}
<VStack spacing={2}>
<h3 className="text-xs text-muted-foreground">Tracking Type</h3>
diff --git a/apps/carbon/app/modules/items/ui/Consumables/ConsumablesTable.tsx b/apps/carbon/app/modules/items/ui/Consumables/ConsumablesTable.tsx
index b155d51a7f..854974aaee 100644
--- a/apps/carbon/app/modules/items/ui/Consumables/ConsumablesTable.tsx
+++ b/apps/carbon/app/modules/items/ui/Consumables/ConsumablesTable.tsx
@@ -161,22 +161,22 @@ const ConsumablesTable = memo(
pluralHeader: "Active Statuses",
},
},
- {
- id: "assignee",
- header: "Assignee",
- cell: ({ row }) => (
- <EmployeeAvatar employeeId={row.original.assignee} />
- ),
- meta: {
- filter: {
- type: "static",
- options: people.map((employee) => ({
- value: employee.id,
- label: employee.name,
- })),
- },
- },
- },
+ // {
+ // id: "assignee",
+ // header: "Assignee",
+ // cell: ({ row }) => (
+ // <EmployeeAvatar employeeId={row.original.assignee} />
+ // ),
+ // meta: {
+ // filter: {
+ // type: "static",
+ // options: people.map((employee) => ({
+ // value: employee.id,
+ // label: employee.name,
+ // })),
+ // },
+ // },
+ // },
{
id: "createdBy",
header: "Created By",
diff --git a/apps/carbon/app/modules/items/ui/Fixtures/FixtureProperties.tsx b/apps/carbon/app/modules/items/ui/Fixtures/FixtureProperties.tsx
index 847f061436..8bb1c9abca 100644
--- a/apps/carbon/app/modules/items/ui/Fixtures/FixtureProperties.tsx
+++ b/apps/carbon/app/modules/items/ui/Fixtures/FixtureProperties.tsx
@@ -18,16 +18,14 @@ import { Link, useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect } from "react";
import { LuCopy, LuExternalLink, LuLink, LuMove3D } from "react-icons/lu";
import {
- Assignee,
CustomerAvatar,
MethodBadge,
MethodIcon,
TrackingTypeIcon,
- useOptimisticAssignment,
} from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { ItemThumbnailUpload } from "~/components/ItemThumnailUpload";
-import { usePermissions, useRouteData } from "~/hooks";
+import { useRouteData } from "~/hooks";
import { methodType } from "~/modules/shared";
import type { action } from "~/routes/x+/items+/update";
import type { ListItem } from "~/types";
@@ -41,7 +39,6 @@ import type { BuyMethod, Fixture, ItemFile, PickMethod } from "../../types";
import { FileBadge } from "../Item";
const FixtureProperties = () => {
- const permissions = usePermissions();
const { itemId } = useParams();
if (!itemId) throw new Error("itemId not found");
@@ -59,14 +56,14 @@ const FixtureProperties = () => {
const buyMethods = routeData?.buyMethods ?? [];
const pickMethods = routeData?.pickMethods ?? [];
- const optimisticAssignment = useOptimisticAssignment({
- id: itemId,
- table: "item",
- });
- const assignee =
- optimisticAssignment !== undefined
- ? optimisticAssignment
- : routeData?.fixtureSummary?.assignee;
+ // const optimisticAssignment = useOptimisticAssignment({
+ // id: itemId,
+ // table: "item",
+ // });
+ // const assignee =
+ // optimisticAssignment !== undefined
+ // ? optimisticAssignment
+ // : routeData?.fixtureSummary?.assignee;
const fetcher = useFetcher<typeof action>();
useEffect(() => {
@@ -148,7 +145,7 @@ const FixtureProperties = () => {
modelId={routeData?.fixtureSummary?.modelId}
/>
</VStack>
- <VStack spacing={2}>
+ {/* <VStack spacing={2}>
<h3 className="text-xs text-muted-foreground">Assignee</h3>
<Assignee
id={itemId}
@@ -156,7 +153,7 @@ const FixtureProperties = () => {
value={assignee ?? ""}
isReadOnly={!permissions.can("update", "parts")}
/>
- </VStack>
+ </VStack> */}
<VStack spacing={2}>
<h3 className="text-xs text-muted-foreground">Tracking Type</h3>
diff --git a/apps/carbon/app/modules/items/ui/Fixtures/FixturesTable.tsx b/apps/carbon/app/modules/items/ui/Fixtures/FixturesTable.tsx
index f77c88bc36..343c9a6bd8 100644
--- a/apps/carbon/app/modules/items/ui/Fixtures/FixturesTable.tsx
+++ b/apps/carbon/app/modules/items/ui/Fixtures/FixturesTable.tsx
@@ -195,22 +195,22 @@ const FixturesTable = memo(
pluralHeader: "Active Statuses",
},
},
- {
- id: "assignee",
- header: "Assignee",
- cell: ({ row }) => (
- <EmployeeAvatar employeeId={row.original.assignee} />
- ),
- meta: {
- filter: {
- type: "static",
- options: people.map((employee) => ({
- value: employee.id,
- label: employee.name,
- })),
- },
- },
- },
+ // {
+ // id: "assignee",
+ // header: "Assignee",
+ // cell: ({ row }) => (
+ // <EmployeeAvatar employeeId={row.original.assignee} />
+ // ),
+ // meta: {
+ // filter: {
+ // type: "static",
+ // options: people.map((employee) => ({
+ // value: employee.id,
+ // label: employee.name,
+ // })),
+ // },
+ // },
+ // },
{
id: "createdBy",
header: "Created By",
diff --git a/apps/carbon/app/modules/items/ui/Item/ItemCostingForm.tsx b/apps/carbon/app/modules/items/ui/Item/ItemCostingForm.tsx
index e8449b056f..32ccd2175d 100644
--- a/apps/carbon/app/modules/items/ui/Item/ItemCostingForm.tsx
+++ b/apps/carbon/app/modules/items/ui/Item/ItemCostingForm.tsx
@@ -6,19 +6,10 @@ import {
CardHeader,
CardTitle,
} from "@carbon/react";
-import { useState } from "react";
import type { z } from "zod";
-import {
- Boolean,
- CustomFormFields,
- Hidden,
- ItemPostingGroup,
- Number,
- Select,
- Submit,
-} from "~/components/Form";
+import { CustomFormFields, Hidden, Number, Submit } from "~/components/Form";
import { usePermissions, useUser } from "~/hooks";
-import { itemCostValidator, itemCostingMethods } from "~/modules/items";
+import { itemCostValidator } from "~/modules/items";
type ItemCostingFormProps = {
initialValues: z.infer<typeof itemCostValidator>;
@@ -29,16 +20,16 @@ const ItemCostingForm = ({ initialValues }: ItemCostingFormProps) => {
const { company } = useUser();
const baseCurrency = company?.baseCurrencyCode ?? "USD";
- const [partCostingMethod, setItemCostingMethod] = useState<string>(
- initialValues.costingMethod
- );
+ // const [partCostingMethod, setItemCostingMethod] = useState<string>(
+ // initialValues.costingMethod
+ // );
- const partCostingMethodOptions = itemCostingMethods.map(
- (partCostingMethod) => ({
- label: partCostingMethod,
- value: partCostingMethod,
- })
- );
+ // const partCostingMethodOptions = itemCostingMethods.map(
+ // (partCostingMethod) => ({
+ // label: partCostingMethod,
+ // value: partCostingMethod,
+ // })
+ // );
return (
<Card>
@@ -48,12 +39,12 @@ const ItemCostingForm = ({ initialValues }: ItemCostingFormProps) => {
defaultValues={initialValues}
>
<CardHeader>
- <CardTitle>Costing & Posting</CardTitle>
+ <CardTitle>Costing</CardTitle>
</CardHeader>
<CardContent>
<Hidden name="itemId" />
<div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
- <Select
+ {/* <Select
name="costingMethod"
label="Part Costing Method"
options={partCostingMethodOptions}
@@ -71,7 +62,7 @@ const ItemCostingForm = ({ initialValues }: ItemCostingFormProps) => {
maximumFractionDigits: 4,
}}
isReadOnly={partCostingMethod !== "Standard"}
- />
+ /> */}
<Number
name="unitCost"
@@ -83,7 +74,7 @@ const ItemCostingForm = ({ initialValues }: ItemCostingFormProps) => {
}}
/>
- <Number
+ {/* <Number
name="salesHistory"
label="Sales History"
formatOptions={{
@@ -101,7 +92,7 @@ const ItemCostingForm = ({ initialValues }: ItemCostingFormProps) => {
}}
isReadOnly
/>
- <Boolean name="costIsAdjusted" label="Cost Is Adjusted" />
+ <Boolean name="costIsAdjusted" label="Cost Is Adjusted" /> */}
<CustomFormFields table="partCost" />
</div>
</CardContent>
diff --git a/apps/carbon/app/modules/items/ui/Materials/MaterialProperties.tsx b/apps/carbon/app/modules/items/ui/Materials/MaterialProperties.tsx
index 6aa07c386c..06971718a6 100644
--- a/apps/carbon/app/modules/items/ui/Materials/MaterialProperties.tsx
+++ b/apps/carbon/app/modules/items/ui/Materials/MaterialProperties.tsx
@@ -17,16 +17,10 @@ import {
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect } from "react";
import { LuCopy, LuLink } from "react-icons/lu";
-import {
- Assignee,
- MethodBadge,
- MethodIcon,
- TrackingTypeIcon,
- useOptimisticAssignment,
-} from "~/components";
+import { MethodBadge, MethodIcon, TrackingTypeIcon } from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { ItemThumbnailUpload } from "~/components/ItemThumnailUpload";
-import { usePermissions, useRouteData } from "~/hooks";
+import { useRouteData } from "~/hooks";
import { methodType } from "~/modules/shared";
import type { action } from "~/routes/x+/items+/update";
import type { ListItem } from "~/types";
@@ -37,7 +31,6 @@ import type { BuyMethod, ItemFile, Material, PickMethod } from "../../types";
import { FileBadge } from "../Item";
const MaterialProperties = () => {
- const permissions = usePermissions();
const { itemId } = useParams();
if (!itemId) throw new Error("itemId not found");
@@ -55,14 +48,14 @@ const MaterialProperties = () => {
const buyMethods = routeData?.buyMethods ?? [];
const pickMethods = routeData?.pickMethods ?? [];
- const optimisticAssignment = useOptimisticAssignment({
- id: itemId,
- table: "item",
- });
- const assignee =
- optimisticAssignment !== undefined
- ? optimisticAssignment
- : routeData?.materialSummary?.assignee;
+ // const optimisticAssignment = useOptimisticAssignment({
+ // id: itemId,
+ // table: "item",
+ // });
+ // const assignee =
+ // optimisticAssignment !== undefined
+ // ? optimisticAssignment
+ // : routeData?.materialSummary?.assignee;
const fetcher = useFetcher<typeof action>();
useEffect(() => {
@@ -143,7 +136,7 @@ const MaterialProperties = () => {
itemId={itemId}
/>
</VStack>
- <VStack spacing={2}>
+ {/* <VStack spacing={2}>
<h3 className="text-xs text-muted-foreground">Assignee</h3>
<Assignee
id={itemId}
@@ -151,7 +144,7 @@ const MaterialProperties = () => {
value={assignee ?? ""}
isReadOnly={!permissions.can("update", "parts")}
/>
- </VStack>
+ </VStack> */}
<VStack spacing={2}>
<h3 className="text-xs text-muted-foreground">Tracking Type</h3>
diff --git a/apps/carbon/app/modules/items/ui/Materials/MaterialsTable.tsx b/apps/carbon/app/modules/items/ui/Materials/MaterialsTable.tsx
index 0a818cdbc2..499e1cef20 100644
--- a/apps/carbon/app/modules/items/ui/Materials/MaterialsTable.tsx
+++ b/apps/carbon/app/modules/items/ui/Materials/MaterialsTable.tsx
@@ -205,22 +205,22 @@ const MaterialsTable = memo(({ data, count }: MaterialsTableProps) => {
pluralHeader: "Active Statuses",
},
},
- {
- id: "assignee",
- header: "Assignee",
- cell: ({ row }) => (
- <EmployeeAvatar employeeId={row.original.assignee} />
- ),
- meta: {
- filter: {
- type: "static",
- options: people.map((employee) => ({
- value: employee.id,
- label: employee.name,
- })),
- },
- },
- },
+ // {
+ // id: "assignee",
+ // header: "Assignee",
+ // cell: ({ row }) => (
+ // <EmployeeAvatar employeeId={row.original.assignee} />
+ // ),
+ // meta: {
+ // filter: {
+ // type: "static",
+ // options: people.map((employee) => ({
+ // value: employee.id,
+ // label: employee.name,
+ // })),
+ // },
+ // },
+ // },
{
id: "createdBy",
header: "Created By",
diff --git a/apps/carbon/app/modules/items/ui/Parts/PartProperties.tsx b/apps/carbon/app/modules/items/ui/Parts/PartProperties.tsx
index 0e68db9d20..7eec44f866 100644
--- a/apps/carbon/app/modules/items/ui/Parts/PartProperties.tsx
+++ b/apps/carbon/app/modules/items/ui/Parts/PartProperties.tsx
@@ -17,16 +17,10 @@ import {
import { Link, useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect } from "react";
import { LuCopy, LuExternalLink, LuLink, LuMove3D } from "react-icons/lu";
-import {
- MethodBadge,
- MethodIcon,
- TrackingTypeIcon,
- useOptimisticAssignment,
-} from "~/components";
-import Assignee from "~/components/Assignee";
+import { MethodBadge, MethodIcon, TrackingTypeIcon } from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { ItemThumbnailUpload } from "~/components/ItemThumnailUpload";
-import { usePermissions, useRouteData } from "~/hooks";
+import { useRouteData } from "~/hooks";
import { methodType } from "~/modules/shared";
import type { action } from "~/routes/x+/items+/update";
import type { ListItem } from "~/types";
@@ -40,7 +34,6 @@ import type { BuyMethod, ItemFile, PartSummary, PickMethod } from "../../types";
import { FileBadge } from "../Item";
const PartProperties = () => {
- const permissions = usePermissions();
const { itemId } = useParams();
if (!itemId) throw new Error("itemId not found");
@@ -58,14 +51,14 @@ const PartProperties = () => {
const buyMethods = routeData?.buyMethods ?? [];
const pickMethods = routeData?.pickMethods ?? [];
- const optimisticAssignment = useOptimisticAssignment({
- id: itemId,
- table: "item",
- });
- const assignee =
- optimisticAssignment !== undefined
- ? optimisticAssignment
- : routeData?.partSummary?.assignee;
+ // const optimisticAssignment = useOptimisticAssignment({
+ // id: itemId,
+ // table: "item",
+ // });
+ // const assignee =
+ // optimisticAssignment !== undefined
+ // ? optimisticAssignment
+ // : routeData?.partSummary?.assignee;
const fetcher = useFetcher<typeof action>();
useEffect(() => {
@@ -148,7 +141,7 @@ const PartProperties = () => {
/>
</VStack>
- <VStack spacing={2}>
+ {/* <VStack spacing={2}>
<h3 className="text-xs text-muted-foreground">Assignee</h3>
<Assignee
id={itemId}
@@ -156,7 +149,7 @@ const PartProperties = () => {
value={assignee ?? ""}
isReadOnly={!permissions.can("update", "parts")}
/>
- </VStack>
+ </VStack> */}
<VStack spacing={2}>
<h3 className="text-xs text-muted-foreground">Tracking Type</h3>
diff --git a/apps/carbon/app/modules/items/ui/Parts/PartsTable.tsx b/apps/carbon/app/modules/items/ui/Parts/PartsTable.tsx
index 76f1982a07..833487b685 100644
--- a/apps/carbon/app/modules/items/ui/Parts/PartsTable.tsx
+++ b/apps/carbon/app/modules/items/ui/Parts/PartsTable.tsx
@@ -173,22 +173,22 @@ const PartsTable = memo(({ data, count }: PartsTableProps) => {
pluralHeader: "Active Statuses",
},
},
- {
- id: "assignee",
- header: "Assignee",
- cell: ({ row }) => (
- <EmployeeAvatar employeeId={row.original.assignee} />
- ),
- meta: {
- filter: {
- type: "static",
- options: people.map((employee) => ({
- value: employee.id,
- label: employee.name,
- })),
- },
- },
- },
+ // {
+ // id: "assignee",
+ // header: "Assignee",
+ // cell: ({ row }) => (
+ // <EmployeeAvatar employeeId={row.original.assignee} />
+ // ),
+ // meta: {
+ // filter: {
+ // type: "static",
+ // options: people.map((employee) => ({
+ // value: employee.id,
+ // label: employee.name,
+ // })),
+ // },
+ // },
+ // },
{
id: "createdBy",
header: "Created By",
diff --git a/apps/carbon/app/modules/items/ui/Tools/ToolProperties.tsx b/apps/carbon/app/modules/items/ui/Tools/ToolProperties.tsx
index d4de49ec8e..f41e15c4c1 100644
--- a/apps/carbon/app/modules/items/ui/Tools/ToolProperties.tsx
+++ b/apps/carbon/app/modules/items/ui/Tools/ToolProperties.tsx
@@ -17,16 +17,10 @@ import {
import { useFetcher, useParams } from "@remix-run/react";
import { useCallback, useEffect } from "react";
import { LuCopy, LuLink } from "react-icons/lu";
-import {
- Assignee,
- MethodBadge,
- MethodIcon,
- TrackingTypeIcon,
- useOptimisticAssignment,
-} from "~/components";
+import { MethodBadge, MethodIcon, TrackingTypeIcon } from "~/components";
import { Enumerable } from "~/components/Enumerable";
import { ItemThumbnailUpload } from "~/components/ItemThumnailUpload";
-import { usePermissions, useRouteData } from "~/hooks";
+import { useRouteData } from "~/hooks";
import { methodType } from "~/modules/shared";
import type { action } from "~/routes/x+/items+/update";
import type { ListItem } from "~/types";
@@ -37,7 +31,6 @@ import type { BuyMethod, ItemFile, PickMethod, Tool } from "../../types";
import { FileBadge } from "../Item";
const ToolProperties = () => {
- const permissions = usePermissions();
const { itemId } = useParams();
if (!itemId) throw new Error("itemId not found");
@@ -55,14 +48,14 @@ const ToolProperties = () => {
const buyMethods = routeData?.buyMethods ?? [];
const pickMethods = routeData?.pickMethods ?? [];
- const optimisticAssignment = useOptimisticAssignment({
- id: itemId,
- table: "item",
- });
- const assignee =
- optimisticAssignment !== undefined
- ? optimisticAssignment
- : routeData?.toolSummary?.assignee;
+ // const optimisticAssignment = useOptimisticAssignment({
+ // id: itemId,
+ // table: "item",
+ // });
+ // const assignee =
+ // optimisticAssignment !== undefined
+ // ? optimisticAssignment
+ // : routeData?.toolSummary?.assignee;
const fetcher = useFetcher<typeof action>();
useEffect(() => {
@@ -143,7 +136,7 @@ const ToolProperties = () => {
itemId={itemId}
/>
</VStack>
- <VStack spacing={2}>
+ {/* <VStack spacing={2}>
<h3 className="text-xs text-muted-foreground">Assignee</h3>
<Assignee
id={itemId}
@@ -151,7 +144,7 @@ const ToolProperties = () => {
value={assignee ?? ""}
isReadOnly={!permissions.can("update", "parts")}
/>
- </VStack>
+ </VStack> */}
<VStack spacing={2}>
<h3 className="text-xs text-muted-foreground">Tracking Type</h3>
diff --git a/apps/carbon/app/modules/items/ui/Tools/ToolsTable.tsx b/apps/carbon/app/modules/items/ui/Tools/ToolsTable.tsx
index 60ad1e44c2..4ea1405f8c 100644
--- a/apps/carbon/app/modules/items/ui/Tools/ToolsTable.tsx
+++ b/apps/carbon/app/modules/items/ui/Tools/ToolsTable.tsx
@@ -157,22 +157,22 @@ const ToolsTable = memo(({ data, count }: ToolsTableProps) => {
pluralHeader: "Active Statuses",
},
},
- {
- id: "assignee",
- header: "Assignee",
- cell: ({ row }) => (
- <EmployeeAvatar employeeId={row.original.assignee} />
- ),
- meta: {
- filter: {
- type: "static",
- options: people.map((employee) => ({
- value: employee.id,
- label: employee.name,
- })),
- },
- },
- },
+ // {
+ // id: "assignee",
+ // header: "Assignee",
+ // cell: ({ row }) => (
+ // <EmployeeAvatar employeeId={row.original.assignee} />
+ // ),
+ // meta: {
+ // filter: {
+ // type: "static",
+ // options: people.map((employee) => ({
+ // value: employee.id,
+ // label: employee.name,
+ // })),
+ // },
+ // },
+ // },
{
id: "createdBy",
header: "Created By",
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierHeader.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierHeader.tsx
index 55f1e069a9..3f464fcd62 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierHeader.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierHeader.tsx
@@ -13,18 +13,13 @@ import {
} from "@carbon/react";
import { useParams } from "@remix-run/react";
-import {
- Assignee,
- EmployeeAvatar,
- useOptimisticAssignment,
-} from "~/components";
+import { EmployeeAvatar } from "~/components";
import { Enumerable } from "~/components/Enumerable";
-import { usePermissions, useRouteData } from "~/hooks";
+import { useRouteData } from "~/hooks";
import type { SupplierDetail, SupplierStatus } from "~/modules/purchasing";
import { path } from "~/utils/path";
const SupplierHeader = () => {
- const permissions = usePermissions();
const { supplierId } = useParams();
if (!supplierId) throw new Error("Could not find supplierId");
@@ -40,14 +35,14 @@ const SupplierHeader = () => {
(status) => status.id === routeData?.supplier?.supplierStatusId
)?.name;
- const optimisticAssignment = useOptimisticAssignment({
- id: supplierId,
- table: "supplier",
- });
- const assignee =
- optimisticAssignment !== undefined
- ? optimisticAssignment
- : routeData?.supplier?.assignee;
+ // const optimisticAssignment = useOptimisticAssignment({
+ // id: supplierId,
+ // table: "supplier",
+ // });
+ // const assignee =
+ // optimisticAssignment !== undefined
+ // ? optimisticAssignment
+ // : routeData?.supplier?.assignee;
return (
<VStack>
@@ -83,7 +78,7 @@ const SupplierHeader = () => {
</CardAttributeValue>
</CardAttribute>
- {permissions.is("employee") && (
+ {/* {permissions.is("employee") && (
<CardAttribute>
<CardAttributeLabel>Assignee</CardAttributeLabel>
<CardAttributeValue>
@@ -95,7 +90,7 @@ const SupplierHeader = () => {
/>
</CardAttributeValue>
</CardAttribute>
- )}
+ )} */}
</CardAttributes>
</CardContent>
</Card>
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsx
index 8c5e451945..8e424868a2 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsx
@@ -41,7 +41,7 @@ const SupplierPaymentForm = ({ initialValues }: SupplierPaymentFormProps) => {
>
<Card>
<CardHeader>
- <CardTitle>Supplier Payment</CardTitle>
+ <CardTitle>Supplier Payment Terms</CardTitle>
</CardHeader>
<CardContent>
<Hidden name="supplierId" />
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierSidebar/useSupplierSidebar.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierSidebar/useSupplierSidebar.tsx
index 2f2ed8e98b..ebcce1e4f9 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierSidebar/useSupplierSidebar.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierSidebar/useSupplierSidebar.tsx
@@ -1,12 +1,5 @@
import { useParams } from "@remix-run/react";
-import {
- LuBuilding,
- LuContact,
- LuCreditCard,
- LuLandmark,
- LuMapPin,
- LuTruck,
-} from "react-icons/lu";
+import { LuBuilding, LuContact, LuCreditCard, LuMapPin } from "react-icons/lu";
import { TbRoute } from "react-icons/tb";
import { usePermissions } from "~/hooks";
import type { Role } from "~/types";
@@ -46,7 +39,7 @@ export function useSupplierSidebar({ contacts, locations }: Props) {
shortcut: "Command+Shift+l",
},
{
- name: "Payments",
+ name: "Payment Terms",
to: path.to.supplierPayment(supplierId),
role: ["employee"],
icon: <LuCreditCard />,
@@ -59,20 +52,20 @@ export function useSupplierSidebar({ contacts, locations }: Props) {
icon: <TbRoute />,
shortcut: "Command+Shift+r",
},
- {
- name: "Shipping",
- to: path.to.supplierShipping(supplierId),
- role: ["employee"],
- icon: <LuTruck />,
- shortcut: "Command+Shift+s",
- },
- {
- name: "Accounting",
- to: path.to.supplierAccounting(supplierId),
- role: ["employee"],
- icon: <LuLandmark />,
- shortcut: "Command+Shift+a",
- },
+ // {
+ // name: "Shipping",
+ // to: path.to.supplierShipping(supplierId),
+ // role: ["employee"],
+ // icon: <LuTruck />,
+ // shortcut: "Command+Shift+s",
+ // },
+ // {
+ // name: "Accounting",
+ // to: path.to.supplierAccounting(supplierId),
+ // role: ["employee"],
+ // icon: <LuLandmark />,
+ // shortcut: "Command+Shift+a",
+ // },
].filter(
(item) =>
item.role === undefined ||
diff --git a/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable.tsx b/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable.tsx
index 8c0be5afe7..66b35e886d 100644
--- a/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Suppliers/SuppliersTable.tsx
@@ -74,35 +74,35 @@ const SuppliersTable = memo(
},
},
},
- {
- id: "assignee",
- header: "Assignee",
- cell: ({ row }) => (
- <EmployeeAvatar employeeId={row.original.assignee} />
- ),
- meta: {
- filter: {
- type: "static",
- options: people.map((employee) => ({
- value: employee.id,
- label: employee.name,
- })),
- },
- },
- },
- {
- id: "orders",
- header: "Orders",
- cell: ({ row }) => (
- <Button variant="secondary" asChild>
- <Link
- to={`${path.to.purchaseOrders}?filter=supplierId:eq:${row.original.id}`}
- >
- {row.original.orderCount ?? 0} Orders
- </Link>
- </Button>
- ),
- },
+ // {
+ // id: "assignee",
+ // header: "Assignee",
+ // cell: ({ row }) => (
+ // <EmployeeAvatar employeeId={row.original.assignee} />
+ // ),
+ // meta: {
+ // filter: {
+ // type: "static",
+ // options: people.map((employee) => ({
+ // value: employee.id,
+ // label: employee.name,
+ // })),
+ // },
+ // },
+ // },
+ // {
+ // id: "orders",
+ // header: "Orders",
+ // cell: ({ row }) => (
+ // <Button variant="secondary" asChild>
+ // <Link
+ // to={`${path.to.purchaseOrders}?filter=supplierId:eq:${row.original.id}`}
+ // >
+ // {row.original.orderCount ?? 0} Orders
+ // </Link>
+ // </Button>
+ // ),
+ // },
{
id: "parts",
header: "Parts",
diff --git a/apps/carbon/app/modules/purchasing/ui/usePurchasingSubmodules.tsx b/apps/carbon/app/modules/purchasing/ui/usePurchasingSubmodules.tsx
index cc72871e68..5e59398385 100644
--- a/apps/carbon/app/modules/purchasing/ui/usePurchasingSubmodules.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/usePurchasingSubmodules.tsx
@@ -1,4 +1,4 @@
-import { LuContainer, LuLayoutList, LuShapes } from "react-icons/lu";
+import { LuContainer, LuShapes } from "react-icons/lu";
import { usePermissions } from "~/hooks";
import type { AuthenticatedRouteGroup } from "~/types";
import { path } from "~/utils/path";
@@ -12,11 +12,11 @@ const purchasingRoutes: AuthenticatedRouteGroup[] = [
to: path.to.suppliers,
icon: <LuContainer />,
},
- {
- name: "Purchase Orders",
- to: path.to.purchaseOrders,
- icon: <LuLayoutList />,
- },
+ // {
+ // name: "Purchase Orders",
+ // to: path.to.purchaseOrders,
+ // icon: <LuLayoutList />,
+ // },
],
},
{
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerHeader.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerHeader.tsx
index 2651b226df..200be75015 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerHeader.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerHeader.tsx
@@ -13,18 +13,13 @@ import {
} from "@carbon/react";
import { useParams } from "@remix-run/react";
-import {
- Assignee,
- EmployeeAvatar,
- useOptimisticAssignment,
-} from "~/components";
+import { EmployeeAvatar } from "~/components";
import { Enumerable } from "~/components/Enumerable";
-import { usePermissions, useRouteData } from "~/hooks";
+import { useRouteData } from "~/hooks";
import type { CustomerDetail, CustomerStatus } from "~/modules/sales";
import { path } from "~/utils/path";
const CustomerHeader = () => {
- const permissions = usePermissions();
const { customerId } = useParams();
if (!customerId) throw new Error("Could not find customerId");
@@ -40,14 +35,14 @@ const CustomerHeader = () => {
(status) => status.id === routeData?.customer?.customerStatusId
)?.name;
- const optimisticAssignment = useOptimisticAssignment({
- id: customerId,
- table: "customer",
- });
- const assignee =
- optimisticAssignment !== undefined
- ? optimisticAssignment
- : routeData?.customer?.assignee;
+ // const optimisticAssignment = useOptimisticAssignment({
+ // id: customerId,
+ // table: "customer",
+ // });
+ // const assignee =
+ // optimisticAssignment !== undefined
+ // ? optimisticAssignment
+ // : routeData?.customer?.assignee;
return (
<VStack>
@@ -82,7 +77,7 @@ const CustomerHeader = () => {
)}
</CardAttributeValue>
</CardAttribute>
- {permissions.is("employee") && (
+ {/* {permissions.is("employee") && (
<CardAttribute>
<CardAttributeLabel>Assignee</CardAttributeLabel>
<CardAttributeValue>
@@ -94,7 +89,7 @@ const CustomerHeader = () => {
/>
</CardAttributeValue>
</CardAttribute>
- )}
+ )} */}
</CardAttributes>
</CardContent>
</Card>
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx
index 4b3b604dd5..f01c1c939d 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx
@@ -41,7 +41,7 @@ const CustomerPaymentForm = ({ initialValues }: CustomerPaymentFormProps) => {
>
<Card>
<CardHeader>
- <CardTitle>Customer Payment</CardTitle>
+ <CardTitle>Customer Payment Terms</CardTitle>
</CardHeader>
<CardContent>
<Hidden name="customerId" />
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerSidebar/useCustomerSidebar.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerSidebar/useCustomerSidebar.tsx
index 79ae9519d0..6854ff21aa 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerSidebar/useCustomerSidebar.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerSidebar/useCustomerSidebar.tsx
@@ -1,12 +1,5 @@
import { useParams } from "@remix-run/react";
-import {
- LuBuilding,
- LuContact,
- LuCreditCard,
- LuLandmark,
- LuMapPin,
- LuTruck,
-} from "react-icons/lu";
+import { LuBuilding, LuContact, LuCreditCard, LuMapPin } from "react-icons/lu";
import { usePermissions } from "~/hooks";
import type { Role } from "~/types";
import { path } from "~/utils/path";
@@ -44,26 +37,26 @@ export function useCustomerSidebar({ contacts, locations }: Props) {
shortcut: "Command+Shift+l",
},
{
- name: "Payments",
+ name: "Payment Terms",
to: path.to.customerPayment(customerId),
role: ["employee"],
icon: <LuCreditCard />,
shortcut: "Command+Shift+p",
},
- {
- name: "Shipping",
- to: path.to.customerShipping(customerId),
- role: ["employee"],
- icon: <LuTruck />,
- shortcut: "Command+Shift+s",
- },
- {
- name: "Accounting",
- to: path.to.customerAccounting(customerId),
- role: ["employee"],
- icon: <LuLandmark />,
- shortcut: "Command+Shift+a",
- },
+ // {
+ // name: "Shipping",
+ // to: path.to.customerShipping(customerId),
+ // role: ["employee"],
+ // icon: <LuTruck />,
+ // shortcut: "Command+Shift+s",
+ // },
+ // {
+ // name: "Accounting",
+ // to: path.to.customerAccounting(customerId),
+ // role: ["employee"],
+ // icon: <LuLandmark />,
+ // shortcut: "Command+Shift+a",
+ // },
].filter(
(item) =>
item.role === undefined ||
diff --git a/apps/carbon/app/modules/sales/ui/Customers/CustomersTable.tsx b/apps/carbon/app/modules/sales/ui/Customers/CustomersTable.tsx
index 381d4ebf5b..99cf3d666a 100644
--- a/apps/carbon/app/modules/sales/ui/Customers/CustomersTable.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customers/CustomersTable.tsx
@@ -74,22 +74,22 @@ const CustomersTable = memo(
},
},
},
- {
- id: "assignee",
- header: "Assignee",
- cell: ({ row }) => (
- <EmployeeAvatar employeeId={row.original.assignee} />
- ),
- meta: {
- filter: {
- type: "static",
- options: people.map((employee) => ({
- value: employee.id,
- label: employee.name,
- })),
- },
- },
- },
+ // {
+ // id: "assignee",
+ // header: "Assignee",
+ // cell: ({ row }) => (
+ // <EmployeeAvatar employeeId={row.original.assignee} />
+ // ),
+ // meta: {
+ // filter: {
+ // type: "static",
+ // options: people.map((employee) => ({
+ // value: employee.id,
+ // label: employee.name,
+ // })),
+ // },
+ // },
+ // },
{
accessorKey: "currencyCode",
header: "Currency",
diff --git a/apps/carbon/app/routes/onboarding+/company.tsx b/apps/carbon/app/routes/onboarding+/company.tsx
index 6ebd230c94..9191d37dde 100644
--- a/apps/carbon/app/routes/onboarding+/company.tsx
+++ b/apps/carbon/app/routes/onboarding+/company.tsx
@@ -6,7 +6,6 @@ import {
Button,
Card,
CardContent,
- CardDescription,
CardFooter,
CardHeader,
CardTitle,
@@ -180,7 +179,6 @@ export default function OnboardingCompany() {
>
<CardHeader>
<CardTitle>Now let's set up your company</CardTitle>
- <CardDescription>You can always change this later</CardDescription>
</CardHeader>
<CardContent>
<Hidden name="next" value={next} />
diff --git a/apps/carbon/app/routes/x+/customer+/$customerId.payments.tsx b/apps/carbon/app/routes/x+/customer+/$customerId.payments.tsx
index f5c7d94513..85b45d24d3 100644
--- a/apps/carbon/app/routes/x+/customer+/$customerId.payments.tsx
+++ b/apps/carbon/app/routes/x+/customer+/$customerId.payments.tsx
@@ -28,7 +28,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
path.to.customer(customerId),
await flash(
request,
- error(customerPayment.error, "Failed to load customer payment")
+ error(customerPayment.error, "Failed to load customer payment terms")
)
);
}
@@ -66,14 +66,14 @@ export async function action({ request, params }: ActionFunctionArgs) {
path.to.customer(customerId),
await flash(
request,
- error(update.error, "Failed to update customer payment")
+ error(update.error, "Failed to update customer payment terms")
)
);
}
throw redirect(
path.to.customerPayment(customerId),
- await flash(request, success("Updated customer payment"))
+ await flash(request, success("Updated customer payment terms"))
);
}
diff --git a/apps/carbon/app/routes/x+/purchasing+/_index.tsx b/apps/carbon/app/routes/x+/purchasing+/_index.tsx
index cae8dd1d8a..e530409e72 100644
--- a/apps/carbon/app/routes/x+/purchasing+/_index.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/_index.tsx
@@ -2,5 +2,5 @@ import { redirect } from "@vercel/remix";
import { path } from "~/utils/path";
export async function loader() {
- throw redirect(path.to.purchaseOrders);
+ throw redirect(path.to.suppliers);
}
diff --git a/apps/carbon/app/routes/x+/purchasing+/_layout.tsx b/apps/carbon/app/routes/x+/purchasing+/_layout.tsx
index c81f1bae0d..d65b9bfc2f 100644
--- a/apps/carbon/app/routes/x+/purchasing+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/_layout.tsx
@@ -12,7 +12,7 @@ export const meta: MetaFunction = () => {
export const handle: Handle = {
breadcrumb: "Purchasing",
- to: path.to.purchaseOrders,
+ to: path.to.suppliers,
module: "purchasing",
};
diff --git a/apps/carbon/app/routes/x+/supplier+/$supplierId.payments.tsx b/apps/carbon/app/routes/x+/supplier+/$supplierId.payments.tsx
index a4b9f3cba3..9543541af7 100644
--- a/apps/carbon/app/routes/x+/supplier+/$supplierId.payments.tsx
+++ b/apps/carbon/app/routes/x+/supplier+/$supplierId.payments.tsx
@@ -29,7 +29,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
path.to.supplier(supplierId),
await flash(
request,
- error(supplierPayment.error, "Failed to load supplier payment")
+ error(supplierPayment.error, "Failed to load supplier payment terms")
)
);
}
@@ -68,14 +68,14 @@ export async function action({ request, params }: ActionFunctionArgs) {
path.to.supplier(supplierId),
await flash(
request,
- error(update.error, "Failed to update supplier payment")
+ error(update.error, "Failed to update supplier payment terms")
)
);
}
throw redirect(
path.to.supplierPayment(supplierId),
- await flash(request, success("Updated supplier payment"))
+ await flash(request, success("Updated supplier payment terms"))
);
}
diff --git a/apps/carbon/app/routes/x+/supplier+/_layout.tsx b/apps/carbon/app/routes/x+/supplier+/_layout.tsx
index bc08625df5..a916336371 100644
--- a/apps/carbon/app/routes/x+/supplier+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/supplier+/_layout.tsx
@@ -14,7 +14,7 @@ export const meta: MetaFunction = () => {
export const handle: Handle = {
breadcrumb: "Purchasing",
- to: path.to.purchaseOrders,
+ to: path.to.suppliers,
module: "purchasing",
};