@optifye/dashboard-core 6.12.9 → 6.12.10
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.css +0 -21
- package/dist/index.js +11 -77
- package/dist/index.mjs +12 -78
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -899,9 +899,6 @@ body {
|
|
|
899
899
|
.mt-2 {
|
|
900
900
|
margin-top: 0.5rem;
|
|
901
901
|
}
|
|
902
|
-
.mt-2\.5 {
|
|
903
|
-
margin-top: 0.625rem;
|
|
904
|
-
}
|
|
905
902
|
.mt-3 {
|
|
906
903
|
margin-top: 0.75rem;
|
|
907
904
|
}
|
|
@@ -1406,9 +1403,6 @@ body {
|
|
|
1406
1403
|
.w-\[22vw\] {
|
|
1407
1404
|
width: 22vw;
|
|
1408
1405
|
}
|
|
1409
|
-
.w-\[260px\] {
|
|
1410
|
-
width: 260px;
|
|
1411
|
-
}
|
|
1412
1406
|
.w-\[27vw\] {
|
|
1413
1407
|
width: 27vw;
|
|
1414
1408
|
}
|
|
@@ -1737,10 +1731,6 @@ body {
|
|
|
1737
1731
|
--tw-rotate: 180deg;
|
|
1738
1732
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1739
1733
|
}
|
|
1740
|
-
.rotate-45 {
|
|
1741
|
-
--tw-rotate: 45deg;
|
|
1742
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1743
|
-
}
|
|
1744
1734
|
.scale-0 {
|
|
1745
1735
|
--tw-scale-x: 0;
|
|
1746
1736
|
--tw-scale-y: 0;
|
|
@@ -2256,9 +2246,6 @@ body {
|
|
|
2256
2246
|
.border-b-\[6px\] {
|
|
2257
2247
|
border-bottom-width: 6px;
|
|
2258
2248
|
}
|
|
2259
|
-
.border-l {
|
|
2260
|
-
border-left-width: 1px;
|
|
2261
|
-
}
|
|
2262
2249
|
.border-l-2 {
|
|
2263
2250
|
border-left-width: 2px;
|
|
2264
2251
|
}
|
|
@@ -7567,10 +7554,6 @@ input[type=range]:active::-moz-range-thumb {
|
|
|
7567
7554
|
font-size: 1.875rem;
|
|
7568
7555
|
line-height: 2.25rem;
|
|
7569
7556
|
}
|
|
7570
|
-
.xl\:text-4xl {
|
|
7571
|
-
font-size: 2.25rem;
|
|
7572
|
-
line-height: 2.5rem;
|
|
7573
|
-
}
|
|
7574
7557
|
.xl\:text-5xl {
|
|
7575
7558
|
font-size: 3rem;
|
|
7576
7559
|
line-height: 1;
|
|
@@ -7604,10 +7587,6 @@ input[type=range]:active::-moz-range-thumb {
|
|
|
7604
7587
|
font-size: 1.875rem;
|
|
7605
7588
|
line-height: 2.25rem;
|
|
7606
7589
|
}
|
|
7607
|
-
.\32xl\:text-5xl {
|
|
7608
|
-
font-size: 3rem;
|
|
7609
|
-
line-height: 1;
|
|
7610
|
-
}
|
|
7611
7590
|
.\32xl\:text-6xl {
|
|
7612
7591
|
font-size: 3.75rem;
|
|
7613
7592
|
line-height: 1;
|
package/dist/index.js
CHANGED
|
@@ -51379,19 +51379,12 @@ var fitTextWithEllipsis = (doc, text, maxWidth) => {
|
|
|
51379
51379
|
var LinePdfGenerator = ({
|
|
51380
51380
|
lineInfo,
|
|
51381
51381
|
workspaceData,
|
|
51382
|
-
issueResolutionSummary,
|
|
51383
51382
|
shiftName,
|
|
51384
51383
|
className,
|
|
51385
51384
|
shiftBreaks = [],
|
|
51386
51385
|
reportTimezone = "Asia/Kolkata"
|
|
51387
51386
|
}) => {
|
|
51388
51387
|
const [isGenerating, setIsGenerating] = React144.useState(false);
|
|
51389
|
-
const formatResolutionDuration2 = (seconds) => {
|
|
51390
|
-
if (seconds === null || seconds === void 0 || seconds <= 0) {
|
|
51391
|
-
return "-";
|
|
51392
|
-
}
|
|
51393
|
-
return formatIdleTime(Math.max(0, Math.floor(seconds)));
|
|
51394
|
-
};
|
|
51395
51388
|
const generatePDF = async () => {
|
|
51396
51389
|
setIsGenerating(true);
|
|
51397
51390
|
try {
|
|
@@ -51714,7 +51707,7 @@ var LinePdfGenerator = ({
|
|
|
51714
51707
|
doc.line(20, 53, 190, 53);
|
|
51715
51708
|
const perfOverviewStartY = 58;
|
|
51716
51709
|
doc.setFillColor(245, 245, 245);
|
|
51717
|
-
doc.roundedRect(15, perfOverviewStartY, 180,
|
|
51710
|
+
doc.roundedRect(15, perfOverviewStartY, 180, 40, 3, 3, "F");
|
|
51718
51711
|
doc.setFontSize(18);
|
|
51719
51712
|
doc.setFont("helvetica", "bold");
|
|
51720
51713
|
doc.setTextColor(40, 40, 40);
|
|
@@ -51730,20 +51723,13 @@ var LinePdfGenerator = ({
|
|
|
51730
51723
|
doc.text(`${lineInfo.metrics.current_output} / ${lineInfo.metrics.line_threshold}`, 120, kpiStartY);
|
|
51731
51724
|
createKPIBox(kpiStartY + kpiSpacing);
|
|
51732
51725
|
doc.setFont("helvetica", "normal");
|
|
51733
|
-
doc.text("
|
|
51734
|
-
doc.setFont("helvetica", "bold");
|
|
51735
|
-
const resolutionSeconds = issueResolutionSummary ? issueResolutionSummary.mean_resolution_seconds ?? issueResolutionSummary.median_resolution_seconds : null;
|
|
51736
|
-
const displayValue = resolutionSeconds !== null ? formatResolutionDuration2(resolutionSeconds) : "-";
|
|
51737
|
-
doc.text(displayValue, 120, kpiStartY + kpiSpacing);
|
|
51738
|
-
createKPIBox(kpiStartY + kpiSpacing * 2);
|
|
51739
|
-
doc.setFont("helvetica", "normal");
|
|
51740
|
-
doc.text("Average Efficiency:", 25, kpiStartY + kpiSpacing * 2);
|
|
51726
|
+
doc.text("Average Efficiency:", 25, kpiStartY + kpiSpacing);
|
|
51741
51727
|
doc.setFont("helvetica", "bold");
|
|
51742
|
-
doc.text(`${lineInfo.metrics.avg_efficiency.toFixed(1)}%`, 120, kpiStartY + kpiSpacing
|
|
51728
|
+
doc.text(`${lineInfo.metrics.avg_efficiency.toFixed(1)}%`, 120, kpiStartY + kpiSpacing);
|
|
51743
51729
|
doc.setDrawColor(180, 180, 180);
|
|
51744
51730
|
doc.setLineWidth(0.8);
|
|
51745
|
-
doc.line(20,
|
|
51746
|
-
const hourlyOverviewStartY =
|
|
51731
|
+
doc.line(20, 113, 190, 113);
|
|
51732
|
+
const hourlyOverviewStartY = 118;
|
|
51747
51733
|
const formatMinutesLabel = (totalMinutes) => {
|
|
51748
51734
|
const normalized = (totalMinutes % (24 * 60) + 24 * 60) % (24 * 60);
|
|
51749
51735
|
const hour = Math.floor(normalized / 60);
|
|
@@ -51933,8 +51919,8 @@ var LinePdfGenerator = ({
|
|
|
51933
51919
|
return Math.round(lineInfo.metrics.current_output / shiftDuration);
|
|
51934
51920
|
});
|
|
51935
51921
|
}
|
|
51936
|
-
const tableHeaderY =
|
|
51937
|
-
const tableStartY =
|
|
51922
|
+
const tableHeaderY = 141;
|
|
51923
|
+
const tableStartY = 148;
|
|
51938
51924
|
const rowSpacing = 8;
|
|
51939
51925
|
const bottomPadding = 8;
|
|
51940
51926
|
const hourlyTableHeight = hourlyTimeRanges.length * rowSpacing;
|
|
@@ -51944,10 +51930,10 @@ var LinePdfGenerator = ({
|
|
|
51944
51930
|
doc.setFontSize(18);
|
|
51945
51931
|
doc.setFont("helvetica", "bold");
|
|
51946
51932
|
doc.setTextColor(40, 40, 40);
|
|
51947
|
-
doc.text("Hourly Performance", 20,
|
|
51933
|
+
doc.text("Hourly Performance", 20, 128);
|
|
51948
51934
|
doc.setTextColor(0, 0, 0);
|
|
51949
|
-
const gridTopY =
|
|
51950
|
-
const headerBottomY =
|
|
51935
|
+
const gridTopY = 134;
|
|
51936
|
+
const headerBottomY = 143;
|
|
51951
51937
|
const colBoundaries = [20, 70, 100, 130, 155, 190];
|
|
51952
51938
|
const totalRows = hourlyTimeRanges.length;
|
|
51953
51939
|
const gridBottomY = headerBottomY + totalRows * rowSpacing;
|
|
@@ -66422,25 +66408,8 @@ var formatLocalDate = (date) => {
|
|
|
66422
66408
|
};
|
|
66423
66409
|
return date.toLocaleDateString("en-US", options);
|
|
66424
66410
|
};
|
|
66425
|
-
var formatResolutionDuration = (seconds) => {
|
|
66426
|
-
if (seconds === null || seconds === void 0 || seconds <= 0) {
|
|
66427
|
-
return "-";
|
|
66428
|
-
}
|
|
66429
|
-
return formatIdleTime(Math.max(0, Math.floor(seconds)));
|
|
66430
|
-
};
|
|
66431
|
-
var getIssueResolutionSecondaryText = (summary) => {
|
|
66432
|
-
if (!summary) {
|
|
66433
|
-
return "No issue data";
|
|
66434
|
-
}
|
|
66435
|
-
const parts = [`${summary.resolved_issue_count} resolved`];
|
|
66436
|
-
if ((summary.open_issue_count || 0) > 0) {
|
|
66437
|
-
parts.push(`oldest open ${formatResolutionDuration(summary.oldest_open_issue_age_seconds)}`);
|
|
66438
|
-
}
|
|
66439
|
-
return parts.join(" \u2022 ");
|
|
66440
|
-
};
|
|
66441
66411
|
var MetricCards = React144.memo(({
|
|
66442
66412
|
lineInfo,
|
|
66443
|
-
issueResolutionSummary,
|
|
66444
66413
|
idleTimeData,
|
|
66445
66414
|
showIdleTime,
|
|
66446
66415
|
efficiencyLegend,
|
|
@@ -66452,13 +66421,7 @@ var MetricCards = React144.memo(({
|
|
|
66452
66421
|
}) => {
|
|
66453
66422
|
const efficiency = lineInfo?.metrics.avg_efficiency || 0;
|
|
66454
66423
|
const efficiencyColorClass = getEfficiencyTextColorClasses(efficiency, efficiencyLegend);
|
|
66455
|
-
const
|
|
66456
|
-
const largeGridColumns = showIdleTime ? showIssueResolutionCard ? "lg:grid-cols-5" : "lg:grid-cols-4" : showIssueResolutionCard ? "lg:grid-cols-4" : "lg:grid-cols-3";
|
|
66457
|
-
const shouldMaskIssueResolution = efficiency < 5;
|
|
66458
|
-
const issueResolutionValue = shouldMaskIssueResolution ? "-" : formatResolutionDuration(
|
|
66459
|
-
issueResolutionSummary?.mean_resolution_seconds ?? issueResolutionSummary?.median_resolution_seconds
|
|
66460
|
-
);
|
|
66461
|
-
getIssueResolutionSecondaryText(issueResolutionSummary);
|
|
66424
|
+
const largeGridColumns = showIdleTime ? "lg:grid-cols-4" : "lg:grid-cols-3";
|
|
66462
66425
|
const outputTarget = lineInfo?.metrics.output_target_recalculated ?? lineInfo?.metrics.line_threshold ?? 0;
|
|
66463
66426
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
66464
66427
|
motion.div,
|
|
@@ -66499,28 +66462,6 @@ var MetricCards = React144.memo(({
|
|
|
66499
66462
|
"%"
|
|
66500
66463
|
] }) })
|
|
66501
66464
|
] }),
|
|
66502
|
-
showIssueResolutionCard && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
66503
|
-
motion.div,
|
|
66504
|
-
{
|
|
66505
|
-
variants: itemVariants,
|
|
66506
|
-
className: "bg-white rounded-xl shadow-sm p-3 sm:p-4 flex flex-col overflow-hidden h-[240px] sm:h-[260px] md:h-auto",
|
|
66507
|
-
children: [
|
|
66508
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-10 sm:h-12 flex items-start justify-center gap-1.5 mb-2 mt-1 relative group z-10", children: [
|
|
66509
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm sm:text-base font-bold text-gray-700 text-center", children: "Issue Resolution Time" }),
|
|
66510
|
-
/* @__PURE__ */ jsxRuntime.jsx(outline.InformationCircleIcon, { className: "w-4 h-4 text-gray-400 cursor-help flex-shrink-0" }),
|
|
66511
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-full left-1/2 transform -translate-x-1/2 mt-2.5 w-[260px] p-3 bg-white rounded-lg shadow-xl border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 pointer-events-none z-50", children: [
|
|
66512
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-center text-xs text-gray-600 leading-relaxed mb-2.5 px-1", children: "The average time a supervisor takes to resolve a workstation in red." }),
|
|
66513
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-gray-50 rounded-md py-1.5 border border-gray-100/80", children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-center font-medium text-[11px] text-gray-500", children: [
|
|
66514
|
-
((issueResolutionSummary?.resolved_issue_count || 0) + (issueResolutionSummary?.open_issue_count || 0)).toLocaleString(),
|
|
66515
|
-
" recorded issues"
|
|
66516
|
-
] }) }),
|
|
66517
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -top-1.5 left-1/2 transform -translate-x-1/2 w-3 h-3 bg-white border-l border-t border-gray-200 rotate-45" })
|
|
66518
|
-
] })
|
|
66519
|
-
] }),
|
|
66520
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: `whitespace-nowrap tracking-tight text-3xl sm:text-4xl md:text-4xl lg:text-3xl xl:text-4xl 2xl:text-5xl font-bold ${shouldMaskIssueResolution ? "text-gray-400" : "text-gray-900"}`, children: issueResolutionValue }) })
|
|
66521
|
-
]
|
|
66522
|
-
}
|
|
66523
|
-
),
|
|
66524
66465
|
showIdleTime && /* @__PURE__ */ jsxRuntime.jsxs(motion.div, { variants: itemVariants, className: "bg-white rounded-xl shadow-sm p-3 sm:p-4 flex flex-col overflow-hidden h-[240px] sm:h-[260px] md:h-auto", children: [
|
|
66525
66466
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-10 sm:h-12 flex items-start justify-center mb-2 mt-1", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm sm:text-base font-bold text-gray-700 text-center", children: "Idle Time Breakdown" }) }),
|
|
66526
66467
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -66577,8 +66518,6 @@ var MetricCards = React144.memo(({
|
|
|
66577
66518
|
if (prevSkuSignature !== nextSkuSignature) return false;
|
|
66578
66519
|
const prevMetrics = prevProps.lineInfo.metrics;
|
|
66579
66520
|
const nextMetrics = nextProps.lineInfo.metrics;
|
|
66580
|
-
const prevIssueSummary = prevProps.issueResolutionSummary;
|
|
66581
|
-
const nextIssueSummary = nextProps.issueResolutionSummary;
|
|
66582
66521
|
const prevIdleChartSignature = JSON.stringify(
|
|
66583
66522
|
(prevProps.idleTimeData?.chartData || []).map((entry) => ({
|
|
66584
66523
|
name: entry.name,
|
|
@@ -66597,9 +66536,6 @@ var MetricCards = React144.memo(({
|
|
|
66597
66536
|
);
|
|
66598
66537
|
const idleTimeChanged = prevProps.idleTimeData?.isLoading !== nextProps.idleTimeData?.isLoading || prevProps.idleTimeData?.error !== nextProps.idleTimeData?.error || prevIdleChartSignature !== nextIdleChartSignature || prevProps.idleTimeData?.data?.total_idle_time_seconds !== nextProps.idleTimeData?.data?.total_idle_time_seconds || prevProps.idleTimeData?.data?.scope_work_seconds !== nextProps.idleTimeData?.data?.scope_work_seconds;
|
|
66599
66538
|
if (idleTimeChanged) return false;
|
|
66600
|
-
if (prevIssueSummary?.mean_resolution_seconds !== nextIssueSummary?.mean_resolution_seconds || prevIssueSummary?.median_resolution_seconds !== nextIssueSummary?.median_resolution_seconds || prevIssueSummary?.resolved_issue_count !== nextIssueSummary?.resolved_issue_count || prevIssueSummary?.open_issue_count !== nextIssueSummary?.open_issue_count || prevIssueSummary?.oldest_open_issue_age_seconds !== nextIssueSummary?.oldest_open_issue_age_seconds || prevIssueSummary?.total_issue_seconds !== nextIssueSummary?.total_issue_seconds) {
|
|
66601
|
-
return false;
|
|
66602
|
-
}
|
|
66603
66539
|
return prevMetrics.current_output === nextMetrics.current_output && prevMetrics.line_threshold === nextMetrics.line_threshold && prevMetrics.output_target_recalculated === nextMetrics.output_target_recalculated && prevMetrics.underperforming_workspaces === nextMetrics.underperforming_workspaces && prevMetrics.total_workspaces === nextMetrics.total_workspaces && prevMetrics.avg_efficiency === nextMetrics.avg_efficiency;
|
|
66604
66540
|
});
|
|
66605
66541
|
MetricCards.displayName = "MetricCards";
|
|
@@ -68410,7 +68346,6 @@ var KPIDetailView = ({
|
|
|
68410
68346
|
MetricCards,
|
|
68411
68347
|
{
|
|
68412
68348
|
lineInfo: displayLineInfo ?? resolvedLineInfo,
|
|
68413
|
-
issueResolutionSummary,
|
|
68414
68349
|
idleTimeData,
|
|
68415
68350
|
showIdleTime: idleTimeVlmEnabled,
|
|
68416
68351
|
efficiencyLegend,
|
|
@@ -68525,7 +68460,6 @@ var KPIDetailView = ({
|
|
|
68525
68460
|
MetricCards,
|
|
68526
68461
|
{
|
|
68527
68462
|
lineInfo: displayLineInfo ?? resolvedLineInfo,
|
|
68528
|
-
issueResolutionSummary,
|
|
68529
68463
|
idleTimeData,
|
|
68530
68464
|
showIdleTime: idleTimeVlmEnabled,
|
|
68531
68465
|
efficiencyLegend,
|
package/dist/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import { BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, ReferenceLine, Too
|
|
|
16
16
|
import { Slot } from '@radix-ui/react-slot';
|
|
17
17
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
18
18
|
import { DayPicker, useNavigation as useNavigation$1 } from 'react-day-picker';
|
|
19
|
-
import { AdjustmentsHorizontalIcon, ClockIcon, UsersIcon, UserCircleIcon, TicketIcon, CurrencyDollarIcon, QuestionMarkCircleIcon, XMarkIcon,
|
|
19
|
+
import { AdjustmentsHorizontalIcon, ClockIcon, UsersIcon, UserCircleIcon, TicketIcon, CurrencyDollarIcon, QuestionMarkCircleIcon, XMarkIcon, ArrowRightIcon, Bars3Icon, HomeIcon, VideoCameraIcon, TrophyIcon, ChartBarIcon, LightBulbIcon, CubeIcon, HeartIcon, Cog6ToothIcon, ChevronRightIcon, ArrowRightStartOnRectangleIcon, ExclamationCircleIcon, ExclamationTriangleIcon, CalendarIcon, ChevronDownIcon, ChevronLeftIcon, EnvelopeIcon, DocumentTextIcon, ChevronUpIcon, ArrowDownTrayIcon, CheckCircleIcon, ChatBubbleLeftRightIcon, XCircleIcon, FunnelIcon, EyeIcon, InformationCircleIcon, ArrowLeftIcon, PlayCircleIcon } from '@heroicons/react/24/outline';
|
|
20
20
|
import { CheckIcon } from '@heroicons/react/24/solid';
|
|
21
21
|
import html2canvas from 'html2canvas';
|
|
22
22
|
import jsPDF, { jsPDF as jsPDF$1 } from 'jspdf';
|
|
@@ -51350,19 +51350,12 @@ var fitTextWithEllipsis = (doc, text, maxWidth) => {
|
|
|
51350
51350
|
var LinePdfGenerator = ({
|
|
51351
51351
|
lineInfo,
|
|
51352
51352
|
workspaceData,
|
|
51353
|
-
issueResolutionSummary,
|
|
51354
51353
|
shiftName,
|
|
51355
51354
|
className,
|
|
51356
51355
|
shiftBreaks = [],
|
|
51357
51356
|
reportTimezone = "Asia/Kolkata"
|
|
51358
51357
|
}) => {
|
|
51359
51358
|
const [isGenerating, setIsGenerating] = useState(false);
|
|
51360
|
-
const formatResolutionDuration2 = (seconds) => {
|
|
51361
|
-
if (seconds === null || seconds === void 0 || seconds <= 0) {
|
|
51362
|
-
return "-";
|
|
51363
|
-
}
|
|
51364
|
-
return formatIdleTime(Math.max(0, Math.floor(seconds)));
|
|
51365
|
-
};
|
|
51366
51359
|
const generatePDF = async () => {
|
|
51367
51360
|
setIsGenerating(true);
|
|
51368
51361
|
try {
|
|
@@ -51685,7 +51678,7 @@ var LinePdfGenerator = ({
|
|
|
51685
51678
|
doc.line(20, 53, 190, 53);
|
|
51686
51679
|
const perfOverviewStartY = 58;
|
|
51687
51680
|
doc.setFillColor(245, 245, 245);
|
|
51688
|
-
doc.roundedRect(15, perfOverviewStartY, 180,
|
|
51681
|
+
doc.roundedRect(15, perfOverviewStartY, 180, 40, 3, 3, "F");
|
|
51689
51682
|
doc.setFontSize(18);
|
|
51690
51683
|
doc.setFont("helvetica", "bold");
|
|
51691
51684
|
doc.setTextColor(40, 40, 40);
|
|
@@ -51701,20 +51694,13 @@ var LinePdfGenerator = ({
|
|
|
51701
51694
|
doc.text(`${lineInfo.metrics.current_output} / ${lineInfo.metrics.line_threshold}`, 120, kpiStartY);
|
|
51702
51695
|
createKPIBox(kpiStartY + kpiSpacing);
|
|
51703
51696
|
doc.setFont("helvetica", "normal");
|
|
51704
|
-
doc.text("
|
|
51705
|
-
doc.setFont("helvetica", "bold");
|
|
51706
|
-
const resolutionSeconds = issueResolutionSummary ? issueResolutionSummary.mean_resolution_seconds ?? issueResolutionSummary.median_resolution_seconds : null;
|
|
51707
|
-
const displayValue = resolutionSeconds !== null ? formatResolutionDuration2(resolutionSeconds) : "-";
|
|
51708
|
-
doc.text(displayValue, 120, kpiStartY + kpiSpacing);
|
|
51709
|
-
createKPIBox(kpiStartY + kpiSpacing * 2);
|
|
51710
|
-
doc.setFont("helvetica", "normal");
|
|
51711
|
-
doc.text("Average Efficiency:", 25, kpiStartY + kpiSpacing * 2);
|
|
51697
|
+
doc.text("Average Efficiency:", 25, kpiStartY + kpiSpacing);
|
|
51712
51698
|
doc.setFont("helvetica", "bold");
|
|
51713
|
-
doc.text(`${lineInfo.metrics.avg_efficiency.toFixed(1)}%`, 120, kpiStartY + kpiSpacing
|
|
51699
|
+
doc.text(`${lineInfo.metrics.avg_efficiency.toFixed(1)}%`, 120, kpiStartY + kpiSpacing);
|
|
51714
51700
|
doc.setDrawColor(180, 180, 180);
|
|
51715
51701
|
doc.setLineWidth(0.8);
|
|
51716
|
-
doc.line(20,
|
|
51717
|
-
const hourlyOverviewStartY =
|
|
51702
|
+
doc.line(20, 113, 190, 113);
|
|
51703
|
+
const hourlyOverviewStartY = 118;
|
|
51718
51704
|
const formatMinutesLabel = (totalMinutes) => {
|
|
51719
51705
|
const normalized = (totalMinutes % (24 * 60) + 24 * 60) % (24 * 60);
|
|
51720
51706
|
const hour = Math.floor(normalized / 60);
|
|
@@ -51904,8 +51890,8 @@ var LinePdfGenerator = ({
|
|
|
51904
51890
|
return Math.round(lineInfo.metrics.current_output / shiftDuration);
|
|
51905
51891
|
});
|
|
51906
51892
|
}
|
|
51907
|
-
const tableHeaderY =
|
|
51908
|
-
const tableStartY =
|
|
51893
|
+
const tableHeaderY = 141;
|
|
51894
|
+
const tableStartY = 148;
|
|
51909
51895
|
const rowSpacing = 8;
|
|
51910
51896
|
const bottomPadding = 8;
|
|
51911
51897
|
const hourlyTableHeight = hourlyTimeRanges.length * rowSpacing;
|
|
@@ -51915,10 +51901,10 @@ var LinePdfGenerator = ({
|
|
|
51915
51901
|
doc.setFontSize(18);
|
|
51916
51902
|
doc.setFont("helvetica", "bold");
|
|
51917
51903
|
doc.setTextColor(40, 40, 40);
|
|
51918
|
-
doc.text("Hourly Performance", 20,
|
|
51904
|
+
doc.text("Hourly Performance", 20, 128);
|
|
51919
51905
|
doc.setTextColor(0, 0, 0);
|
|
51920
|
-
const gridTopY =
|
|
51921
|
-
const headerBottomY =
|
|
51906
|
+
const gridTopY = 134;
|
|
51907
|
+
const headerBottomY = 143;
|
|
51922
51908
|
const colBoundaries = [20, 70, 100, 130, 155, 190];
|
|
51923
51909
|
const totalRows = hourlyTimeRanges.length;
|
|
51924
51910
|
const gridBottomY = headerBottomY + totalRows * rowSpacing;
|
|
@@ -66393,25 +66379,8 @@ var formatLocalDate = (date) => {
|
|
|
66393
66379
|
};
|
|
66394
66380
|
return date.toLocaleDateString("en-US", options);
|
|
66395
66381
|
};
|
|
66396
|
-
var formatResolutionDuration = (seconds) => {
|
|
66397
|
-
if (seconds === null || seconds === void 0 || seconds <= 0) {
|
|
66398
|
-
return "-";
|
|
66399
|
-
}
|
|
66400
|
-
return formatIdleTime(Math.max(0, Math.floor(seconds)));
|
|
66401
|
-
};
|
|
66402
|
-
var getIssueResolutionSecondaryText = (summary) => {
|
|
66403
|
-
if (!summary) {
|
|
66404
|
-
return "No issue data";
|
|
66405
|
-
}
|
|
66406
|
-
const parts = [`${summary.resolved_issue_count} resolved`];
|
|
66407
|
-
if ((summary.open_issue_count || 0) > 0) {
|
|
66408
|
-
parts.push(`oldest open ${formatResolutionDuration(summary.oldest_open_issue_age_seconds)}`);
|
|
66409
|
-
}
|
|
66410
|
-
return parts.join(" \u2022 ");
|
|
66411
|
-
};
|
|
66412
66382
|
var MetricCards = memo$1(({
|
|
66413
66383
|
lineInfo,
|
|
66414
|
-
issueResolutionSummary,
|
|
66415
66384
|
idleTimeData,
|
|
66416
66385
|
showIdleTime,
|
|
66417
66386
|
efficiencyLegend,
|
|
@@ -66423,13 +66392,7 @@ var MetricCards = memo$1(({
|
|
|
66423
66392
|
}) => {
|
|
66424
66393
|
const efficiency = lineInfo?.metrics.avg_efficiency || 0;
|
|
66425
66394
|
const efficiencyColorClass = getEfficiencyTextColorClasses(efficiency, efficiencyLegend);
|
|
66426
|
-
const
|
|
66427
|
-
const largeGridColumns = showIdleTime ? showIssueResolutionCard ? "lg:grid-cols-5" : "lg:grid-cols-4" : showIssueResolutionCard ? "lg:grid-cols-4" : "lg:grid-cols-3";
|
|
66428
|
-
const shouldMaskIssueResolution = efficiency < 5;
|
|
66429
|
-
const issueResolutionValue = shouldMaskIssueResolution ? "-" : formatResolutionDuration(
|
|
66430
|
-
issueResolutionSummary?.mean_resolution_seconds ?? issueResolutionSummary?.median_resolution_seconds
|
|
66431
|
-
);
|
|
66432
|
-
getIssueResolutionSecondaryText(issueResolutionSummary);
|
|
66395
|
+
const largeGridColumns = showIdleTime ? "lg:grid-cols-4" : "lg:grid-cols-3";
|
|
66433
66396
|
const outputTarget = lineInfo?.metrics.output_target_recalculated ?? lineInfo?.metrics.line_threshold ?? 0;
|
|
66434
66397
|
return /* @__PURE__ */ jsxs(
|
|
66435
66398
|
motion.div,
|
|
@@ -66470,28 +66433,6 @@ var MetricCards = memo$1(({
|
|
|
66470
66433
|
"%"
|
|
66471
66434
|
] }) })
|
|
66472
66435
|
] }),
|
|
66473
|
-
showIssueResolutionCard && /* @__PURE__ */ jsxs(
|
|
66474
|
-
motion.div,
|
|
66475
|
-
{
|
|
66476
|
-
variants: itemVariants,
|
|
66477
|
-
className: "bg-white rounded-xl shadow-sm p-3 sm:p-4 flex flex-col overflow-hidden h-[240px] sm:h-[260px] md:h-auto",
|
|
66478
|
-
children: [
|
|
66479
|
-
/* @__PURE__ */ jsxs("div", { className: "h-10 sm:h-12 flex items-start justify-center gap-1.5 mb-2 mt-1 relative group z-10", children: [
|
|
66480
|
-
/* @__PURE__ */ jsx("h2", { className: "text-sm sm:text-base font-bold text-gray-700 text-center", children: "Issue Resolution Time" }),
|
|
66481
|
-
/* @__PURE__ */ jsx(InformationCircleIcon, { className: "w-4 h-4 text-gray-400 cursor-help flex-shrink-0" }),
|
|
66482
|
-
/* @__PURE__ */ jsxs("div", { className: "absolute top-full left-1/2 transform -translate-x-1/2 mt-2.5 w-[260px] p-3 bg-white rounded-lg shadow-xl border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 pointer-events-none z-50", children: [
|
|
66483
|
-
/* @__PURE__ */ jsx("p", { className: "text-center text-xs text-gray-600 leading-relaxed mb-2.5 px-1", children: "The average time a supervisor takes to resolve a workstation in red." }),
|
|
66484
|
-
/* @__PURE__ */ jsx("div", { className: "bg-gray-50 rounded-md py-1.5 border border-gray-100/80", children: /* @__PURE__ */ jsxs("p", { className: "text-center font-medium text-[11px] text-gray-500", children: [
|
|
66485
|
-
((issueResolutionSummary?.resolved_issue_count || 0) + (issueResolutionSummary?.open_issue_count || 0)).toLocaleString(),
|
|
66486
|
-
" recorded issues"
|
|
66487
|
-
] }) }),
|
|
66488
|
-
/* @__PURE__ */ jsx("div", { className: "absolute -top-1.5 left-1/2 transform -translate-x-1/2 w-3 h-3 bg-white border-l border-t border-gray-200 rotate-45" })
|
|
66489
|
-
] })
|
|
66490
|
-
] }),
|
|
66491
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center flex-1 min-h-0", children: /* @__PURE__ */ jsx("span", { className: `whitespace-nowrap tracking-tight text-3xl sm:text-4xl md:text-4xl lg:text-3xl xl:text-4xl 2xl:text-5xl font-bold ${shouldMaskIssueResolution ? "text-gray-400" : "text-gray-900"}`, children: issueResolutionValue }) })
|
|
66492
|
-
]
|
|
66493
|
-
}
|
|
66494
|
-
),
|
|
66495
66436
|
showIdleTime && /* @__PURE__ */ jsxs(motion.div, { variants: itemVariants, className: "bg-white rounded-xl shadow-sm p-3 sm:p-4 flex flex-col overflow-hidden h-[240px] sm:h-[260px] md:h-auto", children: [
|
|
66496
66437
|
/* @__PURE__ */ jsx("div", { className: "h-10 sm:h-12 flex items-start justify-center mb-2 mt-1", children: /* @__PURE__ */ jsx("h2", { className: "text-sm sm:text-base font-bold text-gray-700 text-center", children: "Idle Time Breakdown" }) }),
|
|
66497
66438
|
/* @__PURE__ */ jsx("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ jsx(
|
|
@@ -66548,8 +66489,6 @@ var MetricCards = memo$1(({
|
|
|
66548
66489
|
if (prevSkuSignature !== nextSkuSignature) return false;
|
|
66549
66490
|
const prevMetrics = prevProps.lineInfo.metrics;
|
|
66550
66491
|
const nextMetrics = nextProps.lineInfo.metrics;
|
|
66551
|
-
const prevIssueSummary = prevProps.issueResolutionSummary;
|
|
66552
|
-
const nextIssueSummary = nextProps.issueResolutionSummary;
|
|
66553
66492
|
const prevIdleChartSignature = JSON.stringify(
|
|
66554
66493
|
(prevProps.idleTimeData?.chartData || []).map((entry) => ({
|
|
66555
66494
|
name: entry.name,
|
|
@@ -66568,9 +66507,6 @@ var MetricCards = memo$1(({
|
|
|
66568
66507
|
);
|
|
66569
66508
|
const idleTimeChanged = prevProps.idleTimeData?.isLoading !== nextProps.idleTimeData?.isLoading || prevProps.idleTimeData?.error !== nextProps.idleTimeData?.error || prevIdleChartSignature !== nextIdleChartSignature || prevProps.idleTimeData?.data?.total_idle_time_seconds !== nextProps.idleTimeData?.data?.total_idle_time_seconds || prevProps.idleTimeData?.data?.scope_work_seconds !== nextProps.idleTimeData?.data?.scope_work_seconds;
|
|
66570
66509
|
if (idleTimeChanged) return false;
|
|
66571
|
-
if (prevIssueSummary?.mean_resolution_seconds !== nextIssueSummary?.mean_resolution_seconds || prevIssueSummary?.median_resolution_seconds !== nextIssueSummary?.median_resolution_seconds || prevIssueSummary?.resolved_issue_count !== nextIssueSummary?.resolved_issue_count || prevIssueSummary?.open_issue_count !== nextIssueSummary?.open_issue_count || prevIssueSummary?.oldest_open_issue_age_seconds !== nextIssueSummary?.oldest_open_issue_age_seconds || prevIssueSummary?.total_issue_seconds !== nextIssueSummary?.total_issue_seconds) {
|
|
66572
|
-
return false;
|
|
66573
|
-
}
|
|
66574
66510
|
return prevMetrics.current_output === nextMetrics.current_output && prevMetrics.line_threshold === nextMetrics.line_threshold && prevMetrics.output_target_recalculated === nextMetrics.output_target_recalculated && prevMetrics.underperforming_workspaces === nextMetrics.underperforming_workspaces && prevMetrics.total_workspaces === nextMetrics.total_workspaces && prevMetrics.avg_efficiency === nextMetrics.avg_efficiency;
|
|
66575
66511
|
});
|
|
66576
66512
|
MetricCards.displayName = "MetricCards";
|
|
@@ -68381,7 +68317,6 @@ var KPIDetailView = ({
|
|
|
68381
68317
|
MetricCards,
|
|
68382
68318
|
{
|
|
68383
68319
|
lineInfo: displayLineInfo ?? resolvedLineInfo,
|
|
68384
|
-
issueResolutionSummary,
|
|
68385
68320
|
idleTimeData,
|
|
68386
68321
|
showIdleTime: idleTimeVlmEnabled,
|
|
68387
68322
|
efficiencyLegend,
|
|
@@ -68496,7 +68431,6 @@ var KPIDetailView = ({
|
|
|
68496
68431
|
MetricCards,
|
|
68497
68432
|
{
|
|
68498
68433
|
lineInfo: displayLineInfo ?? resolvedLineInfo,
|
|
68499
|
-
issueResolutionSummary,
|
|
68500
68434
|
idleTimeData,
|
|
68501
68435
|
showIdleTime: idleTimeVlmEnabled,
|
|
68502
68436
|
efficiencyLegend,
|