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
feat: expose attributes ui
Brad Barbin614b69f70a52
diff --git a/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsx b/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsxindex c65a1d248d..28de222b49 100644--- a/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsx+++ b/apps/erp/app/modules/people/ui/Attributes/AttributeCategoriesTable.tsx@@ -131,7 +131,7 @@ const AttributeCategoriesTable = memo(}}><MenuIcon icon={<LuPencil />} />- Edit Attribute Category+ Edit Category</MenuItem><MenuItemdestructive@@ -156,11 +156,11 @@ const AttributeCategoriesTable = memo(count={count ?? 0}primaryAction={permissions.can("update", "people") && (- <New label="Attribute Category" to={`new?${params.toString()}`} />+ <New label="Category" to={`new?${params.toString()}`} />)}renderContextMenu={renderContextMenu}- title="Attribute Categories"+ title="Attributes"/>{selectedCategory && selectedCategory.id && (<ConfirmDeletediff --git a/apps/erp/app/modules/people/ui/Attributes/AttributeForm.tsx b/apps/erp/app/modules/people/ui/Attributes/AttributeForm.tsxindex 04dcc9cc1f..60340443cc 100644--- a/apps/erp/app/modules/people/ui/Attributes/AttributeForm.tsx+++ b/apps/erp/app/modules/people/ui/Attributes/AttributeForm.tsx@@ -12,7 +12,7 @@ import {import { ValidatedForm } from "@carbon/form";import { useState } from "react";-import type { z } from 'zod/v3';+import type { z } from "zod/v3";import {Array,Boolean,@@ -65,7 +65,7 @@ const AttributeForm = ({const onChangeCheckForListType = (selected: {value: string;- label: string;+ label: string | JSX.Element;} | null) => {setIsList(@@ -121,10 +121,12 @@ const AttributeForm = ({</DrawerBody><DrawerFooter><HStack>- <Submit isDisabled={isDisabled}>Save</Submit><Button size="md" variant="solid" onClick={onClose}>Cancel</Button>+ <Submit withBlocker={false} isDisabled={isDisabled}>+ Save+ </Submit></HStack></DrawerFooter></ValidatedForm>diff --git a/apps/erp/app/modules/people/ui/Person/PersonJob.tsx b/apps/erp/app/modules/people/ui/Person/PersonJob.tsxindex 25991e5228..7bbc082581 100644--- a/apps/erp/app/modules/people/ui/Person/PersonJob.tsx+++ b/apps/erp/app/modules/people/ui/Person/PersonJob.tsx@@ -5,10 +5,9 @@ import {CardFooter,CardHeader,CardTitle,- VStack,} from "@carbon/react";import { useState } from "react";-import type { z } from 'zod/v3';+import type { z } from "zod/v3";import {CustomFormFields,DatePicker,@@ -40,7 +39,7 @@ const PersonJob = ({ initialValues }: PersonJobProps) => {<CardTitle>Job</CardTitle></CardHeader><CardContent>- <VStack spacing={4}>+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4"><Input name="title" label="Title" /><DatePicker name="startDate" label="Start Date" /><Location@@ -56,7 +55,7 @@ const PersonJob = ({ initialValues }: PersonJobProps) => {<Employee name="managerId" label="Manager" /><Hidden name="intent" value="job" /><CustomFormFields table="employeeJob" />- </VStack>+ </div></CardContent><CardFooter><Submit>Save</Submit>diff --git a/apps/erp/app/modules/people/ui/usePeopleSubmodules.tsx b/apps/erp/app/modules/people/ui/usePeopleSubmodules.tsxindex feea2e9431..c4b8d9abb7 100644--- a/apps/erp/app/modules/people/ui/usePeopleSubmodules.tsx+++ b/apps/erp/app/modules/people/ui/usePeopleSubmodules.tsx@@ -3,6 +3,7 @@ import {LuCalendarHeart,LuNetwork,LuUsers,+ LuListChecks,} from "react-icons/lu";import { useSavedViews } from "~/hooks/useSavedViews";import type { RouteGroup } from "~/types";@@ -23,11 +24,11 @@ const peopleRoutes: RouteGroup[] = [{name: "Configure",routes: [- // {- // name: "Attributes",- // to: path.to.attributes,- // icon: <LuListChecks />,- // },+ {+ name: "Attributes",+ to: path.to.attributes,+ icon: <LuListChecks />,+ },{name: "Departments",to: path.to.departments,diff --git a/apps/erp/app/routes/x+/people+/attributes.list.$categoryId.$attributeId.tsx b/apps/erp/app/routes/x+/people+/attributes.list.$categoryId.$attributeId.tsxindex 096d79c8d5..39d843fad6 100644--- a/apps/erp/app/routes/x+/people+/attributes.list.$categoryId.$attributeId.tsx+++ b/apps/erp/app/routes/x+/people+/attributes.list.$categoryId.$attributeId.tsx@@ -40,7 +40,7 @@ export default function EditAttributeRoute() {if (Number.isNaN(categoryId)) throw new Error("categoryId is not a number");const navigate = useNavigate();- const onClose = () => navigate(path.to.attributeCategoryList(categoryId));+ const onClose = () => navigate(-1);const attributesRouteData = useRouteData<{dataTypes: AttributeDataType[];}>(path.to.attributes);diff --git a/apps/erp/app/routes/x+/people+/attributes.list.$categoryId.new.tsx b/apps/erp/app/routes/x+/people+/attributes.list.$categoryId.new.tsxindex 1c1c702392..ee518f6957 100644--- a/apps/erp/app/routes/x+/people+/attributes.list.$categoryId.new.tsx+++ b/apps/erp/app/routes/x+/people+/attributes.list.$categoryId.new.tsx@@ -23,7 +23,7 @@ export default function NewAttributeRoute() {// @ts-ignoreattributeDataTypeId: DataType.Text.toString(),userAttributeCategoryId: categoryId,- canSelfManage: true,+ canSelfManage: false,}}dataTypes={attributesRouteData?.dataTypes ?? []}onClose={onClose}