@optifye/dashboard-core 6.10.16 → 6.10.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -28068,7 +28068,7 @@ var WorkspaceMetricCardsImpl = ({
28068
28068
  ] }) })
28069
28069
  ] }),
28070
28070
  /* @__PURE__ */ jsxRuntime.jsxs(Card2, { className: "flex flex-col bg-white shadow-sm h-full min-h-[150px] sm:min-h-0", children: [
28071
- /* @__PURE__ */ jsxRuntime.jsx(CardHeader2, { className: "pb-2 flex-none", children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle2, { className: "text-lg text-center", children: "Cycle Time (s)" }) }),
28071
+ /* @__PURE__ */ jsxRuntime.jsx(CardHeader2, { className: "pb-2 flex-none", children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle2, { className: "text-lg text-center", children: "Avg. Cycle Time" }) }),
28072
28072
  /* @__PURE__ */ jsxRuntime.jsx(CardContent2, { className: "flex-1 flex items-center justify-center py-6 sm:py-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
28073
28073
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-5xl font-bold ${workspace.avg_cycle_time > (workspace.ideal_cycle_time || 0) ? "text-red-500" : "text-green-500"}`, children: workspace.avg_cycle_time.toFixed(1) }),
28074
28074
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-gray-500 mt-2", children: [
@@ -52880,8 +52880,13 @@ var TargetsView = ({
52880
52880
  dbLines.forEach((line) => {
52881
52881
  merged[line.id] = line.line_name;
52882
52882
  });
52883
+ lineIds.forEach((lineId) => {
52884
+ if (!merged[lineId]) {
52885
+ merged[lineId] = `Line ${lineId.substring(0, 4)}`;
52886
+ }
52887
+ });
52883
52888
  return merged;
52884
- }, [lineNames, dbLines]);
52889
+ }, [lineNames, dbLines, lineIds]);
52885
52890
  const { legend, updateLegend } = useEfficiencyLegend(companyId);
52886
52891
  const { skus, isLoading: skusLoading } = useSKUs(companyId);
52887
52892
  const skuEnabled = dashboardConfig?.skuConfig?.enabled || false;
@@ -53034,6 +53039,15 @@ var TargetsView = ({
53034
53039
  }
53035
53040
  });
53036
53041
  });
53042
+ effectiveShiftOptions.forEach(({ id: shiftId }) => {
53043
+ const orderedLineWorkspaces = {};
53044
+ lineIds.forEach((lineId) => {
53045
+ if (newAllShiftsData[shiftId][lineId]) {
53046
+ orderedLineWorkspaces[lineId] = newAllShiftsData[shiftId][lineId];
53047
+ }
53048
+ });
53049
+ newAllShiftsData[shiftId] = orderedLineWorkspaces;
53050
+ });
53037
53051
  setAllShiftsData(newAllShiftsData);
53038
53052
  setDbValues(newDbValues);
53039
53053
  console.log("[TargetsView] Successfully loaded all data with bulk endpoint:", {
package/dist/index.mjs CHANGED
@@ -28039,7 +28039,7 @@ var WorkspaceMetricCardsImpl = ({
28039
28039
  ] }) })
28040
28040
  ] }),
28041
28041
  /* @__PURE__ */ jsxs(Card2, { className: "flex flex-col bg-white shadow-sm h-full min-h-[150px] sm:min-h-0", children: [
28042
- /* @__PURE__ */ jsx(CardHeader2, { className: "pb-2 flex-none", children: /* @__PURE__ */ jsx(CardTitle2, { className: "text-lg text-center", children: "Cycle Time (s)" }) }),
28042
+ /* @__PURE__ */ jsx(CardHeader2, { className: "pb-2 flex-none", children: /* @__PURE__ */ jsx(CardTitle2, { className: "text-lg text-center", children: "Avg. Cycle Time" }) }),
28043
28043
  /* @__PURE__ */ jsx(CardContent2, { className: "flex-1 flex items-center justify-center py-6 sm:py-3", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
28044
28044
  /* @__PURE__ */ jsx("p", { className: `text-5xl font-bold ${workspace.avg_cycle_time > (workspace.ideal_cycle_time || 0) ? "text-red-500" : "text-green-500"}`, children: workspace.avg_cycle_time.toFixed(1) }),
28045
28045
  /* @__PURE__ */ jsxs("p", { className: "text-sm text-gray-500 mt-2", children: [
@@ -52851,8 +52851,13 @@ var TargetsView = ({
52851
52851
  dbLines.forEach((line) => {
52852
52852
  merged[line.id] = line.line_name;
52853
52853
  });
52854
+ lineIds.forEach((lineId) => {
52855
+ if (!merged[lineId]) {
52856
+ merged[lineId] = `Line ${lineId.substring(0, 4)}`;
52857
+ }
52858
+ });
52854
52859
  return merged;
52855
- }, [lineNames, dbLines]);
52860
+ }, [lineNames, dbLines, lineIds]);
52856
52861
  const { legend, updateLegend } = useEfficiencyLegend(companyId);
52857
52862
  const { skus, isLoading: skusLoading } = useSKUs(companyId);
52858
52863
  const skuEnabled = dashboardConfig?.skuConfig?.enabled || false;
@@ -53005,6 +53010,15 @@ var TargetsView = ({
53005
53010
  }
53006
53011
  });
53007
53012
  });
53013
+ effectiveShiftOptions.forEach(({ id: shiftId }) => {
53014
+ const orderedLineWorkspaces = {};
53015
+ lineIds.forEach((lineId) => {
53016
+ if (newAllShiftsData[shiftId][lineId]) {
53017
+ orderedLineWorkspaces[lineId] = newAllShiftsData[shiftId][lineId];
53018
+ }
53019
+ });
53020
+ newAllShiftsData[shiftId] = orderedLineWorkspaces;
53021
+ });
53008
53022
  setAllShiftsData(newAllShiftsData);
53009
53023
  setDbValues(newDbValues);
53010
53024
  console.log("[TargetsView] Successfully loaded all data with bulk endpoint:", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optifye/dashboard-core",
3
- "version": "6.10.16",
3
+ "version": "6.10.17",
4
4
  "description": "Reusable UI & logic for Optifye dashboard",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",