@optifye/dashboard-core 6.10.38 → 6.10.39
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 +63 -57
- package/dist/index.mjs +63 -57
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58422,7 +58422,7 @@ var LineCard = ({
|
|
|
58422
58422
|
supervisors
|
|
58423
58423
|
}) => {
|
|
58424
58424
|
const isUptimeLine = (line.monitoring_mode ?? "output") === "uptime";
|
|
58425
|
-
React26__namespace.default.useMemo(() => {
|
|
58425
|
+
const isOnTrack = React26__namespace.default.useMemo(() => {
|
|
58426
58426
|
if (!kpis) return null;
|
|
58427
58427
|
return kpis.efficiency.value > 90;
|
|
58428
58428
|
}, [kpis]);
|
|
@@ -58435,67 +58435,73 @@ var LineCard = ({
|
|
|
58435
58435
|
onClick: () => onClick(kpis),
|
|
58436
58436
|
className: "relative bg-white border border-gray-200/80 shadow-sm hover:shadow-lg \n rounded-xl p-4 sm:p-5 md:p-6 transition-all duration-200 cursor-pointer \n hover:scale-[1.01] active:scale-[0.99] group",
|
|
58437
58437
|
children: [
|
|
58438
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 sm:mb-5 md:mb-6", children: /* @__PURE__ */ jsxRuntime.
|
|
58439
|
-
/* @__PURE__ */ jsxRuntime.
|
|
58440
|
-
|
|
58441
|
-
|
|
58442
|
-
|
|
58443
|
-
|
|
58444
|
-
|
|
58445
|
-
|
|
58446
|
-
|
|
58447
|
-
/* @__PURE__ */ jsxRuntime.
|
|
58448
|
-
|
|
58449
|
-
|
|
58450
|
-
|
|
58451
|
-
|
|
58452
|
-
|
|
58453
|
-
|
|
58454
|
-
|
|
58455
|
-
|
|
58456
|
-
|
|
58457
|
-
|
|
58458
|
-
|
|
58459
|
-
|
|
58460
|
-
|
|
58461
|
-
|
|
58438
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 sm:mb-5 md:mb-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-start gap-2 sm:gap-3", children: [
|
|
58439
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
58440
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
58441
|
+
FittingTitle,
|
|
58442
|
+
{
|
|
58443
|
+
title: line.line_name,
|
|
58444
|
+
className: "text-[10px] sm:text-xs md:text-sm"
|
|
58445
|
+
}
|
|
58446
|
+
),
|
|
58447
|
+
supervisorEnabled && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4", children: [
|
|
58448
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-semibold text-gray-400 uppercase tracking-wider mb-1.5", children: "Assigned To" }),
|
|
58449
|
+
supervisors && supervisors.length > 0 ? supervisors.length === 1 ? (
|
|
58450
|
+
// Single supervisor - just avatar with tooltip
|
|
58451
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-12 h-12 rounded-full bg-white border border-gray-100 shadow-sm flex-shrink-0 group/avatar hover:scale-110 transition-transform", children: [
|
|
58452
|
+
supervisors[0].profilePhotoUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
58453
|
+
"img",
|
|
58454
|
+
{
|
|
58455
|
+
src: supervisors[0].profilePhotoUrl,
|
|
58456
|
+
alt: supervisors[0].displayName,
|
|
58457
|
+
className: "w-full h-full object-cover rounded-full"
|
|
58458
|
+
}
|
|
58459
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center bg-gray-50 text-base font-bold text-gray-500 uppercase rounded-full", children: getInitials(supervisors[0].displayName) }),
|
|
58460
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-[10px] font-medium rounded shadow-lg opacity-0 group-hover/avatar:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-20", children: [
|
|
58461
|
+
supervisors[0].displayName,
|
|
58462
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-full left-1/2 -translate-x-1/2 -mt-[1px] border-4 border-transparent border-t-gray-900" })
|
|
58463
|
+
] })
|
|
58462
58464
|
] })
|
|
58463
|
-
|
|
58464
|
-
|
|
58465
|
-
|
|
58466
|
-
|
|
58467
|
-
|
|
58468
|
-
|
|
58469
|
-
|
|
58470
|
-
|
|
58471
|
-
|
|
58472
|
-
|
|
58473
|
-
|
|
58474
|
-
|
|
58475
|
-
|
|
58476
|
-
|
|
58477
|
-
|
|
58478
|
-
}
|
|
58479
|
-
|
|
58480
|
-
|
|
58481
|
-
|
|
58482
|
-
|
|
58483
|
-
]
|
|
58484
|
-
|
|
58485
|
-
|
|
58486
|
-
|
|
58487
|
-
|
|
58488
|
-
|
|
58489
|
-
|
|
58490
|
-
|
|
58465
|
+
) : (
|
|
58466
|
+
// Multiple supervisors - overlapping avatars
|
|
58467
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex -space-x-4 py-1", children: [
|
|
58468
|
+
supervisors.slice(0, 3).map((supervisor) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
58469
|
+
"div",
|
|
58470
|
+
{
|
|
58471
|
+
className: "relative inline-block w-12 h-12 rounded-full ring-2 ring-white bg-white shadow-sm z-0 hover:z-10 transition-all hover:scale-110 group/avatar",
|
|
58472
|
+
children: [
|
|
58473
|
+
supervisor.profilePhotoUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
58474
|
+
"img",
|
|
58475
|
+
{
|
|
58476
|
+
src: supervisor.profilePhotoUrl,
|
|
58477
|
+
alt: supervisor.displayName,
|
|
58478
|
+
className: "w-full h-full object-cover rounded-full"
|
|
58479
|
+
}
|
|
58480
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center bg-gray-100 text-sm font-bold text-gray-600 uppercase rounded-full", children: getInitials(supervisor.displayName) }),
|
|
58481
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-[10px] font-medium rounded shadow-lg opacity-0 group-hover/avatar:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-20", children: [
|
|
58482
|
+
supervisor.displayName,
|
|
58483
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-full left-1/2 -translate-x-1/2 -mt-[1px] border-4 border-transparent border-t-gray-900" })
|
|
58484
|
+
] })
|
|
58485
|
+
]
|
|
58486
|
+
},
|
|
58487
|
+
supervisor.userId
|
|
58488
|
+
)),
|
|
58489
|
+
supervisors.length > 3 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex w-12 h-12 rounded-full ring-2 ring-white bg-gray-100 items-center justify-center text-sm font-medium text-gray-600 z-0", children: [
|
|
58490
|
+
"+",
|
|
58491
|
+
supervisors.length - 3
|
|
58492
|
+
] })
|
|
58491
58493
|
] })
|
|
58494
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-gray-600", children: [
|
|
58495
|
+
"Supervisor: ",
|
|
58496
|
+
supervisorName || "Unassigned"
|
|
58492
58497
|
] })
|
|
58493
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-gray-600", children: [
|
|
58494
|
-
"Supervisor: ",
|
|
58495
|
-
supervisorName || "Unassigned"
|
|
58496
58498
|
] })
|
|
58499
|
+
] }),
|
|
58500
|
+
!isUptimeLine && kpis && isOnTrack !== null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-1.5 px-2.5 sm:px-3 py-1 sm:py-1.5 rounded-full text-xs font-medium flex-shrink-0 ${isOnTrack ? "bg-emerald-100 text-emerald-700 border border-emerald-200" : "bg-red-100 text-red-700 border border-red-200"}`, style: { minWidth: "fit-content" }, children: [
|
|
58501
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-2 h-2 rounded-full ${isOnTrack ? "bg-emerald-500" : "bg-red-500"} animate-pulse` }),
|
|
58502
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: isOnTrack ? "On Track" : "Behind" })
|
|
58497
58503
|
] })
|
|
58498
|
-
] }) })
|
|
58504
|
+
] }) }),
|
|
58499
58505
|
isLoading && !kpis && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
58500
58506
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "animate-pulse", children: [
|
|
58501
58507
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-gray-200 rounded w-1/3 mb-2" }),
|
package/dist/index.mjs
CHANGED
|
@@ -58393,7 +58393,7 @@ var LineCard = ({
|
|
|
58393
58393
|
supervisors
|
|
58394
58394
|
}) => {
|
|
58395
58395
|
const isUptimeLine = (line.monitoring_mode ?? "output") === "uptime";
|
|
58396
|
-
React26__default.useMemo(() => {
|
|
58396
|
+
const isOnTrack = React26__default.useMemo(() => {
|
|
58397
58397
|
if (!kpis) return null;
|
|
58398
58398
|
return kpis.efficiency.value > 90;
|
|
58399
58399
|
}, [kpis]);
|
|
@@ -58406,67 +58406,73 @@ var LineCard = ({
|
|
|
58406
58406
|
onClick: () => onClick(kpis),
|
|
58407
58407
|
className: "relative bg-white border border-gray-200/80 shadow-sm hover:shadow-lg \n rounded-xl p-4 sm:p-5 md:p-6 transition-all duration-200 cursor-pointer \n hover:scale-[1.01] active:scale-[0.99] group",
|
|
58408
58408
|
children: [
|
|
58409
|
-
/* @__PURE__ */ jsx("div", { className: "mb-4 sm:mb-5 md:mb-6", children: /* @__PURE__ */
|
|
58410
|
-
/* @__PURE__ */
|
|
58411
|
-
|
|
58412
|
-
|
|
58413
|
-
|
|
58414
|
-
|
|
58415
|
-
|
|
58416
|
-
|
|
58417
|
-
|
|
58418
|
-
/* @__PURE__ */
|
|
58419
|
-
|
|
58420
|
-
|
|
58421
|
-
|
|
58422
|
-
|
|
58423
|
-
|
|
58424
|
-
|
|
58425
|
-
|
|
58426
|
-
|
|
58427
|
-
|
|
58428
|
-
|
|
58429
|
-
|
|
58430
|
-
|
|
58431
|
-
|
|
58432
|
-
|
|
58409
|
+
/* @__PURE__ */ jsx("div", { className: "mb-4 sm:mb-5 md:mb-6", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-start gap-2 sm:gap-3", children: [
|
|
58410
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
58411
|
+
/* @__PURE__ */ jsx(
|
|
58412
|
+
FittingTitle,
|
|
58413
|
+
{
|
|
58414
|
+
title: line.line_name,
|
|
58415
|
+
className: "text-[10px] sm:text-xs md:text-sm"
|
|
58416
|
+
}
|
|
58417
|
+
),
|
|
58418
|
+
supervisorEnabled && /* @__PURE__ */ jsxs("div", { className: "mt-4", children: [
|
|
58419
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] font-semibold text-gray-400 uppercase tracking-wider mb-1.5", children: "Assigned To" }),
|
|
58420
|
+
supervisors && supervisors.length > 0 ? supervisors.length === 1 ? (
|
|
58421
|
+
// Single supervisor - just avatar with tooltip
|
|
58422
|
+
/* @__PURE__ */ jsxs("div", { className: "relative w-12 h-12 rounded-full bg-white border border-gray-100 shadow-sm flex-shrink-0 group/avatar hover:scale-110 transition-transform", children: [
|
|
58423
|
+
supervisors[0].profilePhotoUrl ? /* @__PURE__ */ jsx(
|
|
58424
|
+
"img",
|
|
58425
|
+
{
|
|
58426
|
+
src: supervisors[0].profilePhotoUrl,
|
|
58427
|
+
alt: supervisors[0].displayName,
|
|
58428
|
+
className: "w-full h-full object-cover rounded-full"
|
|
58429
|
+
}
|
|
58430
|
+
) : /* @__PURE__ */ jsx("div", { className: "w-full h-full flex items-center justify-center bg-gray-50 text-base font-bold text-gray-500 uppercase rounded-full", children: getInitials(supervisors[0].displayName) }),
|
|
58431
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-[10px] font-medium rounded shadow-lg opacity-0 group-hover/avatar:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-20", children: [
|
|
58432
|
+
supervisors[0].displayName,
|
|
58433
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-full left-1/2 -translate-x-1/2 -mt-[1px] border-4 border-transparent border-t-gray-900" })
|
|
58434
|
+
] })
|
|
58433
58435
|
] })
|
|
58434
|
-
|
|
58435
|
-
|
|
58436
|
-
|
|
58437
|
-
|
|
58438
|
-
|
|
58439
|
-
|
|
58440
|
-
|
|
58441
|
-
|
|
58442
|
-
|
|
58443
|
-
|
|
58444
|
-
|
|
58445
|
-
|
|
58446
|
-
|
|
58447
|
-
|
|
58448
|
-
|
|
58449
|
-
}
|
|
58450
|
-
|
|
58451
|
-
|
|
58452
|
-
|
|
58453
|
-
|
|
58454
|
-
]
|
|
58455
|
-
|
|
58456
|
-
|
|
58457
|
-
|
|
58458
|
-
|
|
58459
|
-
|
|
58460
|
-
|
|
58461
|
-
|
|
58436
|
+
) : (
|
|
58437
|
+
// Multiple supervisors - overlapping avatars
|
|
58438
|
+
/* @__PURE__ */ jsxs("div", { className: "flex -space-x-4 py-1", children: [
|
|
58439
|
+
supervisors.slice(0, 3).map((supervisor) => /* @__PURE__ */ jsxs(
|
|
58440
|
+
"div",
|
|
58441
|
+
{
|
|
58442
|
+
className: "relative inline-block w-12 h-12 rounded-full ring-2 ring-white bg-white shadow-sm z-0 hover:z-10 transition-all hover:scale-110 group/avatar",
|
|
58443
|
+
children: [
|
|
58444
|
+
supervisor.profilePhotoUrl ? /* @__PURE__ */ jsx(
|
|
58445
|
+
"img",
|
|
58446
|
+
{
|
|
58447
|
+
src: supervisor.profilePhotoUrl,
|
|
58448
|
+
alt: supervisor.displayName,
|
|
58449
|
+
className: "w-full h-full object-cover rounded-full"
|
|
58450
|
+
}
|
|
58451
|
+
) : /* @__PURE__ */ jsx("div", { className: "w-full h-full flex items-center justify-center bg-gray-100 text-sm font-bold text-gray-600 uppercase rounded-full", children: getInitials(supervisor.displayName) }),
|
|
58452
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-[10px] font-medium rounded shadow-lg opacity-0 group-hover/avatar:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-20", children: [
|
|
58453
|
+
supervisor.displayName,
|
|
58454
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-full left-1/2 -translate-x-1/2 -mt-[1px] border-4 border-transparent border-t-gray-900" })
|
|
58455
|
+
] })
|
|
58456
|
+
]
|
|
58457
|
+
},
|
|
58458
|
+
supervisor.userId
|
|
58459
|
+
)),
|
|
58460
|
+
supervisors.length > 3 && /* @__PURE__ */ jsxs("div", { className: "inline-flex w-12 h-12 rounded-full ring-2 ring-white bg-gray-100 items-center justify-center text-sm font-medium text-gray-600 z-0", children: [
|
|
58461
|
+
"+",
|
|
58462
|
+
supervisors.length - 3
|
|
58463
|
+
] })
|
|
58462
58464
|
] })
|
|
58465
|
+
) : /* @__PURE__ */ jsxs("p", { className: "text-sm text-gray-600", children: [
|
|
58466
|
+
"Supervisor: ",
|
|
58467
|
+
supervisorName || "Unassigned"
|
|
58463
58468
|
] })
|
|
58464
|
-
) : /* @__PURE__ */ jsxs("p", { className: "text-sm text-gray-600", children: [
|
|
58465
|
-
"Supervisor: ",
|
|
58466
|
-
supervisorName || "Unassigned"
|
|
58467
58469
|
] })
|
|
58470
|
+
] }),
|
|
58471
|
+
!isUptimeLine && kpis && isOnTrack !== null && /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-1.5 px-2.5 sm:px-3 py-1 sm:py-1.5 rounded-full text-xs font-medium flex-shrink-0 ${isOnTrack ? "bg-emerald-100 text-emerald-700 border border-emerald-200" : "bg-red-100 text-red-700 border border-red-200"}`, style: { minWidth: "fit-content" }, children: [
|
|
58472
|
+
/* @__PURE__ */ jsx("div", { className: `w-2 h-2 rounded-full ${isOnTrack ? "bg-emerald-500" : "bg-red-500"} animate-pulse` }),
|
|
58473
|
+
/* @__PURE__ */ jsx("span", { children: isOnTrack ? "On Track" : "Behind" })
|
|
58468
58474
|
] })
|
|
58469
|
-
] }) })
|
|
58475
|
+
] }) }),
|
|
58470
58476
|
isLoading && !kpis && /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
58471
58477
|
/* @__PURE__ */ jsxs("div", { className: "animate-pulse", children: [
|
|
58472
58478
|
/* @__PURE__ */ jsx("div", { className: "h-4 bg-gray-200 rounded w-1/3 mb-2" }),
|