fix: Enhance grouping logic in production result pages for multiple companies
- Updated the grouping logic in the ProductionResultPage component to include category resolution for 'work_team' and 'status' fields. - This change ensures that the grouping functionality correctly categorizes work instructions based on the specified criteria, improving data organization and clarity across COMPANY_10, COMPANY_16, COMPANY_29, COMPANY_30, COMPANY_7, COMPANY_8, and COMPANY_9. These enhancements aim to provide a more accurate representation of production results and facilitate better management of work instructions.
This commit is contained in:
@@ -217,6 +217,7 @@ export default function ProductionResultPage() {
|
||||
for (const wi of wiList) {
|
||||
let key = wi[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") key = PROGRESS_LABEL[key] || key;
|
||||
else if (groupBy === "work_team" || groupBy === "status") key = resolveCategory(groupBy, key) || key;
|
||||
if (!groups.has(key)) groups.set(key, []);
|
||||
groups.get(key)!.push(wi);
|
||||
}
|
||||
@@ -355,6 +356,7 @@ export default function ProductionResultPage() {
|
||||
if (groupBy !== "none") {
|
||||
let gk = row[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") gk = PROGRESS_LABEL[gk] || gk;
|
||||
else if (groupBy === "work_team" || groupBy === "status") gk = resolveCategory(groupBy, gk) || gk;
|
||||
if (!expandedGroups.has(gk)) return null;
|
||||
}
|
||||
const id = wiKey(row);
|
||||
|
||||
@@ -217,6 +217,7 @@ export default function ProductionResultPage() {
|
||||
for (const wi of wiList) {
|
||||
let key = wi[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") key = PROGRESS_LABEL[key] || key;
|
||||
else if (groupBy === "work_team" || groupBy === "status") key = resolveCategory(groupBy, key) || key;
|
||||
if (!groups.has(key)) groups.set(key, []);
|
||||
groups.get(key)!.push(wi);
|
||||
}
|
||||
@@ -355,6 +356,7 @@ export default function ProductionResultPage() {
|
||||
if (groupBy !== "none") {
|
||||
let gk = row[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") gk = PROGRESS_LABEL[gk] || gk;
|
||||
else if (groupBy === "work_team" || groupBy === "status") gk = resolveCategory(groupBy, gk) || gk;
|
||||
if (!expandedGroups.has(gk)) return null;
|
||||
}
|
||||
const id = wiKey(row);
|
||||
|
||||
@@ -217,6 +217,7 @@ export default function ProductionResultPage() {
|
||||
for (const wi of wiList) {
|
||||
let key = wi[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") key = PROGRESS_LABEL[key] || key;
|
||||
else if (groupBy === "work_team" || groupBy === "status") key = resolveCategory(groupBy, key) || key;
|
||||
if (!groups.has(key)) groups.set(key, []);
|
||||
groups.get(key)!.push(wi);
|
||||
}
|
||||
@@ -355,6 +356,7 @@ export default function ProductionResultPage() {
|
||||
if (groupBy !== "none") {
|
||||
let gk = row[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") gk = PROGRESS_LABEL[gk] || gk;
|
||||
else if (groupBy === "work_team" || groupBy === "status") gk = resolveCategory(groupBy, gk) || gk;
|
||||
if (!expandedGroups.has(gk)) return null;
|
||||
}
|
||||
const id = wiKey(row);
|
||||
|
||||
@@ -217,6 +217,7 @@ export default function ProductionResultPage() {
|
||||
for (const wi of wiList) {
|
||||
let key = wi[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") key = PROGRESS_LABEL[key] || key;
|
||||
else if (groupBy === "work_team" || groupBy === "status") key = resolveCategory(groupBy, key) || key;
|
||||
if (!groups.has(key)) groups.set(key, []);
|
||||
groups.get(key)!.push(wi);
|
||||
}
|
||||
@@ -355,6 +356,7 @@ export default function ProductionResultPage() {
|
||||
if (groupBy !== "none") {
|
||||
let gk = row[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") gk = PROGRESS_LABEL[gk] || gk;
|
||||
else if (groupBy === "work_team" || groupBy === "status") gk = resolveCategory(groupBy, gk) || gk;
|
||||
if (!expandedGroups.has(gk)) return null;
|
||||
}
|
||||
const id = wiKey(row);
|
||||
|
||||
@@ -217,6 +217,7 @@ export default function ProductionResultPage() {
|
||||
for (const wi of wiList) {
|
||||
let key = wi[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") key = PROGRESS_LABEL[key] || key;
|
||||
else if (groupBy === "work_team" || groupBy === "status") key = resolveCategory(groupBy, key) || key;
|
||||
if (!groups.has(key)) groups.set(key, []);
|
||||
groups.get(key)!.push(wi);
|
||||
}
|
||||
@@ -355,6 +356,7 @@ export default function ProductionResultPage() {
|
||||
if (groupBy !== "none") {
|
||||
let gk = row[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") gk = PROGRESS_LABEL[gk] || gk;
|
||||
else if (groupBy === "work_team" || groupBy === "status") gk = resolveCategory(groupBy, gk) || gk;
|
||||
if (!expandedGroups.has(gk)) return null;
|
||||
}
|
||||
const id = wiKey(row);
|
||||
|
||||
@@ -217,6 +217,7 @@ export default function ProductionResultPage() {
|
||||
for (const wi of wiList) {
|
||||
let key = wi[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") key = PROGRESS_LABEL[key] || key;
|
||||
else if (groupBy === "work_team" || groupBy === "status") key = resolveCategory(groupBy, key) || key;
|
||||
if (!groups.has(key)) groups.set(key, []);
|
||||
groups.get(key)!.push(wi);
|
||||
}
|
||||
@@ -355,6 +356,7 @@ export default function ProductionResultPage() {
|
||||
if (groupBy !== "none") {
|
||||
let gk = row[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") gk = PROGRESS_LABEL[gk] || gk;
|
||||
else if (groupBy === "work_team" || groupBy === "status") gk = resolveCategory(groupBy, gk) || gk;
|
||||
if (!expandedGroups.has(gk)) return null;
|
||||
}
|
||||
const id = wiKey(row);
|
||||
|
||||
@@ -217,6 +217,7 @@ export default function ProductionResultPage() {
|
||||
for (const wi of wiList) {
|
||||
let key = wi[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") key = PROGRESS_LABEL[key] || key;
|
||||
else if (groupBy === "work_team" || groupBy === "status") key = resolveCategory(groupBy, key) || key;
|
||||
if (!groups.has(key)) groups.set(key, []);
|
||||
groups.get(key)!.push(wi);
|
||||
}
|
||||
@@ -355,6 +356,7 @@ export default function ProductionResultPage() {
|
||||
if (groupBy !== "none") {
|
||||
let gk = row[groupBy] || "미지정";
|
||||
if (groupBy === "progress_status") gk = PROGRESS_LABEL[gk] || gk;
|
||||
else if (groupBy === "work_team" || groupBy === "status") gk = resolveCategory(groupBy, gk) || gk;
|
||||
if (!expandedGroups.has(gk)) return null;
|
||||
}
|
||||
const id = wiKey(row);
|
||||
|
||||
Reference in New Issue
Block a user