diff --git a/src/components/Breadcrumb/Breadcrumb.tsx b/src/components/Breadcrumb/Breadcrumb.tsx
index 23fbf64..04d6d8a 100644
--- a/src/components/Breadcrumb/Breadcrumb.tsx
+++ b/src/components/Breadcrumb/Breadcrumb.tsx
@@ -37,6 +37,9 @@ const pathToLabelMap: { [path: string]: string } = {
"/inventory": "Inventory",
"/settings/importTesting": "Import Testing",
"/do": "Delivery Order",
+ //"/doworkbench": "DO Workbench",
+ // "/doworkbench/pick": "DO Workbench pick",
+ // "/doworkbench/edit": "DO Workbench detail",
"/pickOrder": "Pick Order",
"/po": "Purchase Order",
"/po/workbench": "PO Workbench",
diff --git a/src/components/NavigationContent/NavigationContent.tsx b/src/components/NavigationContent/NavigationContent.tsx
index 2404ee8..86e9bb2 100644
--- a/src/components/NavigationContent/NavigationContent.tsx
+++ b/src/components/NavigationContent/NavigationContent.tsx
@@ -129,6 +129,14 @@ const NavigationContent: React.FC = () => {
requiredAbility: [AUTH.STOCK, AUTH.STOCK_TAKE, AUTH.STOCK_IN_BIND, AUTH.STOCK_FG, AUTH.ADMIN],
path: "/stockRecord",
},
+ /*
+ {
+ icon: ,
+ label: "Do Workbench",
+ requiredAbility: [AUTH.STOCK, AUTH.STOCK_TAKE, AUTH.STOCK_IN_BIND, AUTH.STOCK_FG, AUTH.ADMIN],
+ path: "/doworkbench",
+ },
+ */
],
},
{
diff --git a/src/components/StockTakeManagement/ApproverStockTakeAll.tsx b/src/components/StockTakeManagement/ApproverStockTakeAll.tsx
index 2c6b57a..f34d270 100644
--- a/src/components/StockTakeManagement/ApproverStockTakeAll.tsx
+++ b/src/components/StockTakeManagement/ApproverStockTakeAll.tsx
@@ -65,13 +65,14 @@ type ApprovedSortKey =
| "stockTakerName"
| "variance";
-type ApproverSearchKey = "sectionDescription" | "stockTakeSession" | "itemKeyword" | "warehouseKeyword";
+type ApproverSearchKey = "sectionDescription" | "stockTakeSession" | "itemKeyword" | "warehouseKeyword"|"status";
type ApproverSearchFilters = {
sectionDescription: string;
stockTakeSession: string;
itemKeyword: string;
warehouseKeyword: string;
+ status: string;
};
function buildApproverInventoryQuery(filters: ApproverSearchFilters): ApproverInventoryLotDetailsQuery {
@@ -232,6 +233,7 @@ const ApproverStockTakeAll: React.FC = ({
stockTakeSession: inputs.stockTakeSession || "",
itemKeyword: inputs.itemKeyword || "",
warehouseKeyword: inputs.warehouseKeyword || "",
+ status: inputs.status || "All",
};
/*
if (!hasAnyApproverSearchCriterion(next)) {
@@ -280,6 +282,17 @@ const ApproverStockTakeAll: React.FC = ({
paramName: "warehouseKeyword",
placeholder: "",
},
+ {
+ type: "select-labelled",
+ label: t("Record Status"),
+ paramName: "status",
+ options: [
+ { label: t("All"), value: "All" },
+ { label: t("Pending"), value: "pending" },
+ { label: t("Not Match"), value: "notMatch" },
+ { label: t("Pass"), value: "pass" }, // UI=Pass,值=completed
+ ],
+ }
],
[t, sectionDescriptionAutocompleteOptions]
);
@@ -468,12 +481,22 @@ const ApproverStockTakeAll: React.FC = ({
},
[approverQty, approverBadQty]
);
-
+ const normalizeStatus = (v: unknown) =>
+ String(v ?? "")
+ .trim()
+ .toLowerCase()
+ .replaceAll("_", "");
const filteredDetails = useMemo(() => {
const percent = parseFloat(variancePercentTolerance || "0");
const thresholdPercent = isNaN(percent) || percent < 0 ? 0 : percent;
- return inventoryLotDetails.filter((detail) => {
+ const statusFilter = appliedFilters?.status ?? "All";
+ return inventoryLotDetails.filter((detail) => {
+ if (statusFilter !== "All") {
+ const rowStatus = normalizeStatus(detail.stockTakeRecordStatus);
+ const wanted = normalizeStatus(statusFilter);
+ if (rowStatus !== wanted) return false;
+ }
/*
if (detail.finalQty != null || detail.stockTakeRecordStatus === "completed") {
return true;
@@ -1110,20 +1133,26 @@ const ApproverStockTakeAll: React.FC = ({
minWidth: 130,
flex: 0.6,
sortable: false,
- renderCell: (params) => (
-
- ),
+ renderCell: (params) => {
+ const raw = params.row.stockTakeRecordStatus;
+ const status = String(raw ?? "").trim().toLowerCase();
+
+ const colorMap: Record = {
+ completed: "success",
+ notmatch: "warning",
+ pending: "info",
+ "not_match": "warning",
+ };
+
+ return (
+
+ );
+ }
},
{
field: "stockTakerName",
@@ -1306,6 +1335,8 @@ const ApproverStockTakeAll: React.FC = ({
pageSizeOptions={[50, 100, 200, 500]}
getRowHeight={() => "auto"}
sx={{
+ backgroundColor: "transparent",
+ "& .MuiDataGrid-columnHeaders": { backgroundColor: "#fff" },
"& .MuiDataGrid-cell": { py: 1, alignItems: "flex-start" },
"& .MuiDataGrid-row": { minHeight: 80 },
}}