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: add completed date to job card

Brad Barbine4a5f5ebcdb5
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.tsx
index 225b6ead91..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
@@ -1,3 +1,4 @@
+import { ValidatedForm } from "@carbon/form";
import {
Card,
CardContent,
@@ -24,9 +25,12 @@ import {
} from "@carbon/utils";
import { useSortable } from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities";
+import { Link } from "@remix-run/react";
import { cva } from "class-variance-authority";
+import { FaTasks } from "react-icons/fa";
import {
LuCalendarDays,
+ LuCircleCheck,
LuClipboardCheck,
LuEllipsisVertical,
LuFlashlight,
@@ -40,14 +44,9 @@ import {
LuTrash,
LuUsers
} from "react-icons/lu";
-
-import { Link } from "@remix-run/react";
import { RiProgress8Line } from "react-icons/ri";
-import { Assignee, CustomerAvatar, EmployeeAvatarGroup } from "~/components";
-
-import { ValidatedForm } from "@carbon/form";
-import { FaTasks } from "react-icons/fa";
import { z } from "zod/v3";
+import { Assignee, CustomerAvatar, EmployeeAvatarGroup } from "~/components";
import { Tags } from "~/components/Form";
import { useTags } from "~/hooks/useTags";
import { getDeadlineIcon } from "~/modules/production/ui/Jobs/Deadline";
@@ -285,7 +284,7 @@ export function ItemCard({ item, isOverlay, progressByItemId }: ItemCardProps) {
: 0
}
/>
- <FaTasks className="text-muted-foreground w-4 h-4" />
+ <LuCircleCheck className="text-muted-foreground w-4 h-4" />
</HStack>
)}
</CardHeader>
diff --git a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/JobCard.tsx b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/JobCard.tsx
index f4c30bca99..94e16ff1b4 100644
--- a/apps/erp/app/modules/production/ui/Schedule/Kanban/components/JobCard.tsx
+++ b/apps/erp/app/modules/production/ui/Schedule/Kanban/components/JobCard.tsx
@@ -25,6 +25,7 @@ import { AiOutlinePartition } from "react-icons/ai";
import { FaTasks } from "react-icons/fa";
import {
LuCalendarDays,
+ LuCircleCheck,
LuEllipsisVertical,
LuFlashlight,
LuFlashlightOff,
@@ -313,14 +314,22 @@ export function JobCard({ item, isOverlay, progressByItemId }: JobCardProps) {
<span className="text-sm">{formatDate(item.dueDate)}</span>
</HStack>
)}
+ {displaySettings.showDueDate && item.completedDate && (
+ <HStack className="justify-start space-x-2">
+ <LuCircleCheck className="text-emerald-500" />
+ <span className="text-sm">
+ Completed {formatDate(item.completedDate)}
+ </span>
+ </HStack>
+ )}
{displaySettings.showQuantity &&
Number.isFinite(item.quantity) &&
Number(item.quantity) > 0 && (
<HStack className="justify-start space-x-2">
- <FaTasks className="text-muted-foreground" />
+ <LuCircleCheck className="text-muted-foreground" />
<span className="text-sm">
- {item.quantityCompleted ?? 0} / {item.quantity} completed
+ {item.quantityCompleted ?? 0}/{item.quantity} completed
</span>
</HStack>
)}
diff --git a/apps/mes/app/components/Kanban/components/ItemCard.tsx b/apps/mes/app/components/Kanban/components/ItemCard.tsx
index f763c055bb..0a777097c3 100644
--- a/apps/mes/app/components/Kanban/components/ItemCard.tsx
+++ b/apps/mes/app/components/Kanban/components/ItemCard.tsx
@@ -12,13 +12,16 @@ import {
TooltipContent,
TooltipTrigger
} from "@carbon/react";
+import { useRouteData } from "@carbon/remix";
import {
convertDateStringToIsoString,
formatDate,
formatDurationMilliseconds,
formatRelativeTime
} from "@carbon/utils";
+import { Link } from "@remix-run/react";
import { cva } from "class-variance-authority";
+import { FaTasks } from "react-icons/fa";
import {
LuCalendarDays,
LuCircleCheck,
@@ -29,15 +32,10 @@ import {
LuTimer,
LuTrash
} from "react-icons/lu";
-
-import { Link } from "@remix-run/react";
-import { FaTasks } from "react-icons/fa";
import { RiProgress8Line } from "react-icons/ri";
import { AlmostDoneIcon } from "~/assets/icons/AlmostDoneIcon";
import { InProgressStatusIcon } from "~/assets/icons/InProgressStatusIcon";
import { TodoStatusIcon } from "~/assets/icons/TodoStatusIcon";
-
-import { useRouteData } from "@carbon/remix";
import Avatar from "~/components/Avatar";
import EmployeeAvatar from "~/components/EmployeeAvatar";
import { DeadlineIcon } from "~/components/Icons";
@@ -181,7 +179,7 @@ export function ItemCard({
: 0
}
/>
- <FaTasks className="text-muted-foreground w-4 h-4" />
+ <LuCircleCheck className="text-muted-foreground w-4 h-4" />
</HStack>
)}
</CardHeader>