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.

feat(approvals): improve approval rule form and table UI

Ayush Soni7251fcabe822
diff --git a/apps/erp/app/modules/approvals/ui/ApprovalRuleForm.tsx b/apps/erp/app/modules/approvals/ui/ApprovalRuleForm.tsx
index 5cd167baa9..aaf4598a08 100644
--- a/apps/erp/app/modules/approvals/ui/ApprovalRuleForm.tsx
+++ b/apps/erp/app/modules/approvals/ui/ApprovalRuleForm.tsx
@@ -97,16 +97,14 @@ const ApprovalRuleForm = ({
approvalDocumentTypesWithAmounts.includes(
effectiveDocumentType
) && (
- <>
- <FormNumber
- name="lowerBoundAmount"
- label="Minimum Amount"
- formatOptions={{
- style: "currency",
- currency: baseCurrencyCode
- }}
- />
- </>
+ <FormNumber
+ name="lowerBoundAmount"
+ label="Minimum Amount"
+ formatOptions={{
+ style: "currency",
+ currency: baseCurrencyCode
+ }}
+ />
)}
<Users
diff --git a/apps/erp/app/modules/approvals/ui/ApprovalsTable.tsx b/apps/erp/app/modules/approvals/ui/ApprovalsTable.tsx
index 90805113bb..26c52eaefe 100644
--- a/apps/erp/app/modules/approvals/ui/ApprovalsTable.tsx
+++ b/apps/erp/app/modules/approvals/ui/ApprovalsTable.tsx
@@ -163,22 +163,6 @@ const ApprovalsTable = memo(({ data, count }: ApprovalsTableProps) => {
id: "approverName",
header: "Approver",
cell: ({ row }) => {
- const groupNames = row.original.approverGroupNames;
- if (
- groupNames &&
- Array.isArray(groupNames) &&
- groupNames.length > 0
- ) {
- return (
- <HStack spacing={1}>
- {groupNames.map((name, idx) => (
- <Badge key={idx} variant="outline">
- {name}
- </Badge>
- ))}
- </HStack>
- );
- }
if (row.original.approverId) {
return <EmployeeAvatar employeeId={row.original.approverId} />;
}