@optifye/dashboard-core 6.0.6 → 6.0.7
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 +89 -13
- package/dist/index.d.mts +27 -8
- package/dist/index.d.ts +27 -8
- package/dist/index.js +162 -197
- package/dist/index.mjs +163 -198
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import { noop, warning, invariant, progress, secondsToMilliseconds, milliseconds
|
|
|
12
12
|
import { getValueTransition, hover, press, isPrimaryPointer, GroupPlaybackControls, setDragLock, supportsLinearEasing, attachTimeline, isGenerator, calcGeneratorDuration, isWaapiSupportedEasing, mapEasingToNativeEasing, maxGeneratorDuration, generateLinearEasing, isBezierDefinition } from 'motion-dom';
|
|
13
13
|
import { BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Legend, Bar, LabelList, ResponsiveContainer, LineChart as LineChart$1, Line, PieChart, Pie, Cell, ReferenceLine, ComposedChart, Area, ScatterChart, Scatter } from 'recharts';
|
|
14
14
|
import { Slot } from '@radix-ui/react-slot';
|
|
15
|
-
import { Camera, ChevronDown, ChevronUp, Check, ShieldCheck, Star, Award, X, Coffee, Plus, Clock, Minus, ArrowDown, ArrowUp, Search, CheckCircle, AlertTriangle, Info, Share2, Download, User, XCircle, ChevronLeft, ChevronRight, AlertCircle, Sun, Moon, MessageSquare, Trash2, ArrowLeft, RefreshCw, Menu, Send, Copy, Edit2, UserCheck, Save, LogOut, Calendar, Package, Settings, LifeBuoy,
|
|
15
|
+
import { Camera, ChevronDown, ChevronUp, Check, ShieldCheck, Star, Award, X, Coffee, Plus, Clock, Minus, ArrowDown, ArrowUp, Search, CheckCircle, AlertTriangle, Info, Share2, Download, User, XCircle, ChevronLeft, ChevronRight, AlertCircle, Sun, Moon, MessageSquare, Trash2, ArrowLeft, RefreshCw, Menu, Send, Copy, Edit2, UserCheck, Save, LogOut, Calendar, Package, Settings, LifeBuoy, ArrowLeftIcon as ArrowLeftIcon$1, Settings2, CheckCircle2, EyeOff, Eye, Zap, UserCircle } from 'lucide-react';
|
|
16
16
|
import { DayPicker, useNavigation as useNavigation$1 } from 'react-day-picker';
|
|
17
17
|
import html2canvas from 'html2canvas';
|
|
18
18
|
import jsPDF, { jsPDF as jsPDF$1 } from 'jspdf';
|
|
@@ -349,24 +349,6 @@ function createMemoizedFunction(fn, getCacheKey) {
|
|
|
349
349
|
return result;
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
|
-
var memoizedEfficiencyFilter = createMemoizedFunction(
|
|
353
|
-
(data, minEfficiency, maxEfficiency) => {
|
|
354
|
-
return data.filter((item) => {
|
|
355
|
-
const eff = item.efficiency ?? 0;
|
|
356
|
-
return eff >= minEfficiency && (maxEfficiency === void 0 || eff < maxEfficiency);
|
|
357
|
-
});
|
|
358
|
-
},
|
|
359
|
-
(data, min, max = void 0) => `${data.length}-${min}-${max}`
|
|
360
|
-
);
|
|
361
|
-
var memoizedAverageEfficiency = createMemoizedFunction(
|
|
362
|
-
(data, minThreshold = 10) => {
|
|
363
|
-
const validItems = data.filter((item) => (item.efficiency ?? 0) >= minThreshold);
|
|
364
|
-
if (validItems.length === 0) return 0;
|
|
365
|
-
const sum = validItems.reduce((acc, item) => acc + (item.efficiency ?? 0), 0);
|
|
366
|
-
return sum / validItems.length;
|
|
367
|
-
},
|
|
368
|
-
(data, threshold) => `${data.length}-${threshold}`
|
|
369
|
-
);
|
|
370
352
|
var memoizedOutputArrayAggregation = createMemoizedFunction(
|
|
371
353
|
(arrays) => {
|
|
372
354
|
if (arrays.length === 0) return [];
|
|
@@ -577,7 +559,7 @@ var dashboardService = {
|
|
|
577
559
|
const lineMetricsTable = getTable2(dbConfig, "lineMetrics");
|
|
578
560
|
const companyId = entityConfig.companyId;
|
|
579
561
|
const metricsTablePrefixStr = getMetricsTablePrefix();
|
|
580
|
-
|
|
562
|
+
`${metricsTablePrefixStr}_${companyId ? companyId.replace(/-/g, "_") : "unknown_company"}`;
|
|
581
563
|
const configuredLineIds = getConfiguredLineIds(entityConfig);
|
|
582
564
|
const defaultLineId = configuredLineIds[0];
|
|
583
565
|
const factoryViewId = entityConfig.factoryViewId ?? "factory";
|
|
@@ -588,7 +570,7 @@ var dashboardService = {
|
|
|
588
570
|
if (!isValidFactoryViewConfiguration(entityConfig) || !companyId) {
|
|
589
571
|
throw new Error("Factory View requires at least one configured line and companyId to be configured.");
|
|
590
572
|
}
|
|
591
|
-
const [lineResult, metricsResult
|
|
573
|
+
const [lineResult, metricsResult] = await Promise.all([
|
|
592
574
|
// Get Line 1's info for general factory details
|
|
593
575
|
supabase.from(linesTable).select(`
|
|
594
576
|
id,
|
|
@@ -599,28 +581,29 @@ var dashboardService = {
|
|
|
599
581
|
companies!lines_company_id_fkey(company_name:name)
|
|
600
582
|
`).eq("id", defaultLineId).maybeSingle(),
|
|
601
583
|
// Get metrics from line_metrics table for all configured lines
|
|
602
|
-
supabase.from(lineMetricsTable).select("*").in("line_id", configuredLineIds).eq("shift_id", shiftId).eq("date", date)
|
|
603
|
-
// Get performance data from the dynamic metrics table for all configured lines
|
|
604
|
-
supabase.from(metricsTable).select("efficiency").in("line_id", configuredLineIds).eq("shift_id", shiftId).eq("date", date)
|
|
584
|
+
supabase.from(lineMetricsTable).select("*").in("line_id", configuredLineIds).eq("shift_id", shiftId).eq("date", date)
|
|
605
585
|
]);
|
|
606
586
|
if (lineResult.error) throw lineResult.error;
|
|
607
587
|
if (!lineResult.data) throw new Error(`Configured default line (${defaultLineId}) not found`);
|
|
608
588
|
if (metricsResult.error) throw metricsResult.error;
|
|
609
|
-
if (performanceResult.error) throw performanceResult.error;
|
|
610
589
|
const lineData2 = lineResult.data;
|
|
611
590
|
const metricsData = metricsResult.data;
|
|
612
|
-
const performanceData2 = performanceResult.data;
|
|
613
|
-
const underperformingWorkspaces2 = memoizedEfficiencyFilter(performanceData2 || [], 10, 70);
|
|
614
|
-
const validWorkspaces2 = memoizedEfficiencyFilter(performanceData2 || [], 10);
|
|
615
|
-
const underperformingCount2 = underperformingWorkspaces2.length;
|
|
616
|
-
validWorkspaces2.length;
|
|
617
591
|
const combinedMetrics = (metricsData || []).reduce((acc, m) => {
|
|
618
|
-
acc.avg_efficiency += m.efficiency ?? 0;
|
|
619
592
|
acc.current_output += m.current_output ?? 0;
|
|
620
593
|
acc.ideal_output += m.ideal_output ?? m.line_threshold ?? 0;
|
|
594
|
+
acc.total_workspaces += m.total_workspaces ?? 0;
|
|
595
|
+
acc.underperforming_workspaces += m.underperforming_workspaces ?? 0;
|
|
596
|
+
acc.weightedEfficiencySum += (m.avg_efficiency ?? 0) * (m.total_workspaces ?? 0);
|
|
621
597
|
return acc;
|
|
622
|
-
}, {
|
|
598
|
+
}, {
|
|
599
|
+
current_output: 0,
|
|
600
|
+
ideal_output: 0,
|
|
601
|
+
total_workspaces: 0,
|
|
602
|
+
underperforming_workspaces: 0,
|
|
603
|
+
weightedEfficiencySum: 0
|
|
604
|
+
});
|
|
623
605
|
metricsData?.length || 1;
|
|
606
|
+
const avgEfficiency = combinedMetrics.total_workspaces > 0 ? combinedMetrics.weightedEfficiencySum / combinedMetrics.total_workspaces : 0;
|
|
624
607
|
return {
|
|
625
608
|
line_id: factoryViewId,
|
|
626
609
|
// Use configured factory view ID
|
|
@@ -633,15 +616,13 @@ var dashboardService = {
|
|
|
633
616
|
shift_id: shiftId,
|
|
634
617
|
date,
|
|
635
618
|
metrics: {
|
|
636
|
-
avg_efficiency:
|
|
637
|
-
// Use memoized calculation for efficiency
|
|
619
|
+
avg_efficiency: avgEfficiency,
|
|
638
620
|
avg_cycle_time: 0,
|
|
639
621
|
// Needs calculation logic if required for factory view
|
|
640
622
|
current_output: combinedMetrics.current_output,
|
|
641
623
|
ideal_output: combinedMetrics.ideal_output,
|
|
642
|
-
total_workspaces: 0,
|
|
643
|
-
|
|
644
|
-
underperforming_workspaces: underperformingCount2,
|
|
624
|
+
total_workspaces: combinedMetrics.total_workspaces || 0,
|
|
625
|
+
underperforming_workspaces: combinedMetrics.underperforming_workspaces,
|
|
645
626
|
underperforming_workspace_names: [],
|
|
646
627
|
// Populate if needed
|
|
647
628
|
underperforming_workspace_uuids: [],
|
|
@@ -675,13 +656,6 @@ var dashboardService = {
|
|
|
675
656
|
} catch (err) {
|
|
676
657
|
console.error(`Error fetching line metrics for ${lineId}:`, err);
|
|
677
658
|
}
|
|
678
|
-
const { data: performanceData, error: performanceError } = await supabase.from(metricsTable).select("efficiency").eq("line_id", lineId).eq("shift_id", shiftId).eq("date", date);
|
|
679
|
-
if (performanceError) throw performanceError;
|
|
680
|
-
const underperformingWorkspaces = memoizedEfficiencyFilter(performanceData || [], 10, 70);
|
|
681
|
-
const validWorkspaces = memoizedEfficiencyFilter(performanceData || [], 10);
|
|
682
|
-
const underperformingCount = underperformingWorkspaces.length;
|
|
683
|
-
validWorkspaces.length;
|
|
684
|
-
const avgEfficiencyFromPerf = memoizedAverageEfficiency(performanceData || [], 10);
|
|
685
659
|
const useFallbackMetrics = !metricsFromDb;
|
|
686
660
|
let metricsForReturn;
|
|
687
661
|
if (useFallbackMetrics) {
|
|
@@ -691,7 +665,7 @@ var dashboardService = {
|
|
|
691
665
|
current_output: 0,
|
|
692
666
|
ideal_output: 0,
|
|
693
667
|
total_workspaces: 42,
|
|
694
|
-
underperforming_workspaces:
|
|
668
|
+
underperforming_workspaces: 0,
|
|
695
669
|
underperforming_workspace_names: [],
|
|
696
670
|
underperforming_workspace_uuids: [],
|
|
697
671
|
output_array: [],
|
|
@@ -704,12 +678,12 @@ var dashboardService = {
|
|
|
704
678
|
};
|
|
705
679
|
} else {
|
|
706
680
|
metricsForReturn = {
|
|
707
|
-
avg_efficiency: metricsFromDb.
|
|
681
|
+
avg_efficiency: metricsFromDb.avg_efficiency ?? 0,
|
|
708
682
|
avg_cycle_time: metricsFromDb.avg_cycle_time || 0,
|
|
709
683
|
current_output: metricsFromDb.current_output || 0,
|
|
710
684
|
ideal_output: metricsFromDb.ideal_output || metricsFromDb.line_threshold || 0,
|
|
711
685
|
total_workspaces: metricsFromDb.total_workspaces ?? workspaceConfig.totalWorkspaces ?? 42,
|
|
712
|
-
underperforming_workspaces:
|
|
686
|
+
underperforming_workspaces: metricsFromDb.underperforming_workspaces ?? 0,
|
|
713
687
|
underperforming_workspace_names: metricsFromDb.underperforming_workspace_names || [],
|
|
714
688
|
underperforming_workspace_uuids: metricsFromDb.underperforming_workspace_uuids || [],
|
|
715
689
|
output_array: metricsFromDb.output_array || [],
|
|
@@ -720,9 +694,6 @@ var dashboardService = {
|
|
|
720
694
|
last_updated: metricsFromDb.last_updated || (/* @__PURE__ */ new Date()).toISOString(),
|
|
721
695
|
poorest_performing_workspaces: metricsFromDb.poorest_performing_workspaces || []
|
|
722
696
|
};
|
|
723
|
-
if (metricsFromDb.efficiency === null || metricsFromDb.efficiency === void 0) {
|
|
724
|
-
metricsForReturn.avg_efficiency = avgEfficiencyFromPerf;
|
|
725
|
-
}
|
|
726
697
|
}
|
|
727
698
|
return {
|
|
728
699
|
line_id: lineData.id,
|
|
@@ -985,7 +956,7 @@ var dashboardService = {
|
|
|
985
956
|
const lineMetricsTable = getTable2(dbConfig, "lineMetrics");
|
|
986
957
|
const companyId = entityConfig.companyId;
|
|
987
958
|
const metricsTablePrefixStr = getMetricsTablePrefix();
|
|
988
|
-
|
|
959
|
+
`${metricsTablePrefixStr}_${companyId ? companyId.replace(/-/g, "_") : "unknown_company"}`;
|
|
989
960
|
const configuredLineIds = getConfiguredLineIds(entityConfig);
|
|
990
961
|
const defaultLineId = configuredLineIds[0];
|
|
991
962
|
const factoryViewId = entityConfig.factoryViewId ?? "factory";
|
|
@@ -1000,25 +971,17 @@ var dashboardService = {
|
|
|
1000
971
|
throw new Error("Factory View requires at least one configured line and companyId to be configured.");
|
|
1001
972
|
}
|
|
1002
973
|
const lineIdsToQuery = configuredLineIds;
|
|
1003
|
-
const [line1Result, metricsResult2
|
|
974
|
+
const [line1Result, metricsResult2] = await Promise.all([
|
|
1004
975
|
supabase.from(linesTable).select("id, line_name, factory_id, factories!lines_factory_id_fkey(factory_name), company_id, companies!lines_company_id_fkey(company_name:name)").eq("id", defaultLineId).single(),
|
|
1005
|
-
supabase.from(lineMetricsTable).select("*").in("line_id", lineIdsToQuery).eq("shift_id", queryShiftId).eq("date", queryDate)
|
|
1006
|
-
supabase.from(metricsTable).select("efficiency").in("line_id", lineIdsToQuery).eq("shift_id", queryShiftId).eq("date", queryDate)
|
|
976
|
+
supabase.from(lineMetricsTable).select("*").in("line_id", lineIdsToQuery).eq("shift_id", queryShiftId).eq("date", queryDate)
|
|
1007
977
|
]);
|
|
1008
978
|
if (line1Result.error) throw line1Result.error;
|
|
1009
979
|
if (!line1Result.data) {
|
|
1010
980
|
throw new Error(`Default line ${defaultLineId} for Factory View not found.`);
|
|
1011
981
|
}
|
|
1012
982
|
if (metricsResult2.error) throw metricsResult2.error;
|
|
1013
|
-
if (performanceResult2.error) throw performanceResult2.error;
|
|
1014
983
|
const line1Data = line1Result.data;
|
|
1015
984
|
const metricsData = metricsResult2.data;
|
|
1016
|
-
const performanceData2 = performanceResult2.data;
|
|
1017
|
-
const underperformingWorkspaces2 = memoizedEfficiencyFilter(performanceData2 || [], 10, 70);
|
|
1018
|
-
const validWorkspaces2 = memoizedEfficiencyFilter(performanceData2 || [], 10);
|
|
1019
|
-
const underperformingCount2 = underperformingWorkspaces2.length;
|
|
1020
|
-
const totalValidWorkspaces2 = validWorkspaces2.length;
|
|
1021
|
-
const avgEfficiencyFromPerf2 = memoizedAverageEfficiency(performanceData2 || [], 10);
|
|
1022
985
|
const initialAccumulator = {
|
|
1023
986
|
avg_cycle_time: 0,
|
|
1024
987
|
current_output: 0,
|
|
@@ -1026,6 +989,10 @@ var dashboardService = {
|
|
|
1026
989
|
line_threshold: 0,
|
|
1027
990
|
threshold_pph: 0,
|
|
1028
991
|
total_workspaces: 0,
|
|
992
|
+
underperforming_workspaces: 0,
|
|
993
|
+
weightedEfficiencySum: 0,
|
|
994
|
+
underperforming_workspace_names: [],
|
|
995
|
+
underperforming_workspace_uuids: [],
|
|
1029
996
|
output_array: [],
|
|
1030
997
|
outputArrays: []
|
|
1031
998
|
};
|
|
@@ -1036,13 +1003,21 @@ var dashboardService = {
|
|
|
1036
1003
|
acc.line_threshold += m.line_threshold ?? 0;
|
|
1037
1004
|
acc.threshold_pph += m.threshold_pph ?? 0;
|
|
1038
1005
|
acc.total_workspaces += m.total_workspaces ?? 0;
|
|
1006
|
+
acc.underperforming_workspaces += m.underperforming_workspaces ?? 0;
|
|
1007
|
+
acc.weightedEfficiencySum += (m.avg_efficiency ?? 0) * (m.total_workspaces ?? 0);
|
|
1008
|
+
if (m.underperforming_workspace_names) {
|
|
1009
|
+
acc.underperforming_workspace_names.push(...m.underperforming_workspace_names);
|
|
1010
|
+
}
|
|
1011
|
+
if (m.underperforming_workspace_uuids) {
|
|
1012
|
+
acc.underperforming_workspace_uuids.push(...m.underperforming_workspace_uuids);
|
|
1013
|
+
}
|
|
1039
1014
|
if (m.output_array && m.output_array.length > 0) {
|
|
1040
1015
|
acc.outputArrays.push(m.output_array);
|
|
1041
1016
|
}
|
|
1042
1017
|
return acc;
|
|
1043
1018
|
}, initialAccumulator);
|
|
1044
1019
|
const numLines = Math.max(metricsData?.length || 0, 1);
|
|
1045
|
-
const
|
|
1020
|
+
const avgEfficiency = combinedMetricsData.total_workspaces > 0 ? combinedMetricsData.weightedEfficiencySum / combinedMetricsData.total_workspaces : 0;
|
|
1046
1021
|
return {
|
|
1047
1022
|
line_id: factoryViewId,
|
|
1048
1023
|
line_name: "Factory View",
|
|
@@ -1053,22 +1028,20 @@ var dashboardService = {
|
|
|
1053
1028
|
date: queryDate,
|
|
1054
1029
|
shift_id: queryShiftId,
|
|
1055
1030
|
metrics: {
|
|
1056
|
-
avg_efficiency:
|
|
1057
|
-
// Use performance data first, fallback to line metrics
|
|
1031
|
+
avg_efficiency: avgEfficiency,
|
|
1058
1032
|
avg_cycle_time: combinedMetricsData.avg_cycle_time / numLines,
|
|
1059
1033
|
current_output: combinedMetricsData.current_output,
|
|
1060
1034
|
ideal_output: combinedMetricsData.ideal_output,
|
|
1061
1035
|
total_workspaces: combinedMetricsData.total_workspaces || 0,
|
|
1062
|
-
|
|
1063
|
-
underperforming_workspaces: underperformingCount2,
|
|
1036
|
+
underperforming_workspaces: combinedMetricsData.underperforming_workspaces,
|
|
1064
1037
|
line_threshold: combinedMetricsData.line_threshold,
|
|
1065
1038
|
threshold_pph: combinedMetricsData.threshold_pph / numLines,
|
|
1066
1039
|
shift_start: metricsData?.[0]?.shift_start || shiftConfig.dayShift?.startTime || "06:00",
|
|
1067
1040
|
shift_end: metricsData?.[0]?.shift_end || shiftConfig.dayShift?.endTime || "18:00",
|
|
1068
1041
|
last_updated: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1069
1042
|
output_array: combinedMetricsData.outputArrays.length > 0 ? memoizedOutputArrayAggregation(combinedMetricsData.outputArrays) : [],
|
|
1070
|
-
underperforming_workspace_names:
|
|
1071
|
-
underperforming_workspace_uuids:
|
|
1043
|
+
underperforming_workspace_names: combinedMetricsData.underperforming_workspace_names,
|
|
1044
|
+
underperforming_workspace_uuids: combinedMetricsData.underperforming_workspace_uuids,
|
|
1072
1045
|
poorest_performing_workspaces: []
|
|
1073
1046
|
}
|
|
1074
1047
|
};
|
|
@@ -1076,25 +1049,17 @@ var dashboardService = {
|
|
|
1076
1049
|
if (!companyId) {
|
|
1077
1050
|
throw new Error("Company ID must be configured for detailed line requests.");
|
|
1078
1051
|
}
|
|
1079
|
-
const [lineResult, metricsResult
|
|
1052
|
+
const [lineResult, metricsResult] = await Promise.all([
|
|
1080
1053
|
supabase.from(linesTable).select("id, line_name, factory_id, factories!lines_factory_id_fkey(factory_name), company_id, companies!lines_company_id_fkey(company_name:name)").eq("id", lineIdToQuery).single(),
|
|
1081
|
-
supabase.from(lineMetricsTable).select("*").eq("line_id", lineIdToQuery).eq("shift_id", queryShiftId).eq("date", queryDate).maybeSingle()
|
|
1082
|
-
supabase.from(metricsTable).select("efficiency").eq("line_id", lineIdToQuery).eq("shift_id", queryShiftId).eq("date", queryDate)
|
|
1054
|
+
supabase.from(lineMetricsTable).select("*").eq("line_id", lineIdToQuery).eq("shift_id", queryShiftId).eq("date", queryDate).maybeSingle()
|
|
1083
1055
|
]);
|
|
1084
1056
|
if (lineResult.error) throw lineResult.error;
|
|
1085
1057
|
if (!lineResult.data) {
|
|
1086
1058
|
throw new Error(`Line ${lineIdToQuery} not found.`);
|
|
1087
1059
|
}
|
|
1088
1060
|
if (metricsResult.error) throw metricsResult.error;
|
|
1089
|
-
if (performanceResult.error) throw performanceResult.error;
|
|
1090
1061
|
const lineData = lineResult.data;
|
|
1091
1062
|
const metrics2 = metricsResult.data;
|
|
1092
|
-
const performanceData = performanceResult.data;
|
|
1093
|
-
const underperformingWorkspaces = memoizedEfficiencyFilter(performanceData || [], 10, 70);
|
|
1094
|
-
const validWorkspaces = memoizedEfficiencyFilter(performanceData || [], 10);
|
|
1095
|
-
const underperformingCount = underperformingWorkspaces.length;
|
|
1096
|
-
const totalValidWorkspaces = validWorkspaces.length;
|
|
1097
|
-
const avgEfficiencyFromPerf = memoizedAverageEfficiency(performanceData || [], 10);
|
|
1098
1063
|
return {
|
|
1099
1064
|
line_id: lineData.id,
|
|
1100
1065
|
line_name: lineData.line_name,
|
|
@@ -1105,13 +1070,12 @@ var dashboardService = {
|
|
|
1105
1070
|
date: queryDate,
|
|
1106
1071
|
shift_id: queryShiftId,
|
|
1107
1072
|
metrics: {
|
|
1108
|
-
avg_efficiency:
|
|
1109
|
-
// Use performance data first, fallback to line metrics
|
|
1073
|
+
avg_efficiency: metrics2?.avg_efficiency ?? 0,
|
|
1110
1074
|
avg_cycle_time: metrics2?.avg_cycle_time || 0,
|
|
1111
1075
|
current_output: metrics2?.current_output || 0,
|
|
1112
1076
|
ideal_output: metrics2?.ideal_output || metrics2?.line_threshold || 0,
|
|
1113
1077
|
total_workspaces: metrics2?.total_workspaces ?? workspaceConfig.totalWorkspaces ?? 42,
|
|
1114
|
-
underperforming_workspaces:
|
|
1078
|
+
underperforming_workspaces: metrics2?.underperforming_workspaces ?? 0,
|
|
1115
1079
|
line_threshold: metrics2?.line_threshold || 0,
|
|
1116
1080
|
threshold_pph: metrics2?.threshold_pph || 0,
|
|
1117
1081
|
shift_start: metrics2?.shift_start || shiftConfig.dayShift?.startTime || "06:00",
|
|
@@ -1996,14 +1960,17 @@ var authOTPService = {
|
|
|
1996
1960
|
const { error } = await supabase.auth.signInWithOtp({
|
|
1997
1961
|
email,
|
|
1998
1962
|
options: {
|
|
1999
|
-
shouldCreateUser:
|
|
2000
|
-
//
|
|
1963
|
+
shouldCreateUser: false,
|
|
1964
|
+
// Only allow existing users to log in
|
|
2001
1965
|
emailRedirectTo: void 0
|
|
2002
1966
|
// Disable magic link redirect
|
|
2003
1967
|
}
|
|
2004
1968
|
});
|
|
2005
1969
|
if (error) {
|
|
2006
1970
|
console.error("Error sending OTP:", error);
|
|
1971
|
+
if (error.message.toLowerCase().includes("signups not allowed") || error.message.toLowerCase().includes("signup") || error.message.toLowerCase().includes("not allowed")) {
|
|
1972
|
+
error.message = "You don't have an account with us. Please contact the Optifye team for more details.";
|
|
1973
|
+
}
|
|
2007
1974
|
}
|
|
2008
1975
|
return { error };
|
|
2009
1976
|
},
|
|
@@ -16742,25 +16709,40 @@ var createMotionComponent = /* @__PURE__ */ createMotionComponentFactory({
|
|
|
16742
16709
|
|
|
16743
16710
|
// ../../node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs
|
|
16744
16711
|
var motion = /* @__PURE__ */ createDOMMotionComponentProxy(createMotionComponent);
|
|
16745
|
-
var
|
|
16712
|
+
var OptifyeLogoLoader = ({
|
|
16746
16713
|
size = "md",
|
|
16747
16714
|
message,
|
|
16748
16715
|
className
|
|
16749
16716
|
}) => {
|
|
16750
16717
|
const sizeClasses = {
|
|
16751
|
-
sm: "w-
|
|
16752
|
-
|
|
16753
|
-
|
|
16718
|
+
sm: "w-10",
|
|
16719
|
+
// 40px
|
|
16720
|
+
md: "w-16",
|
|
16721
|
+
// 64px
|
|
16722
|
+
lg: "w-24"
|
|
16723
|
+
// 96px
|
|
16754
16724
|
};
|
|
16755
|
-
return /* @__PURE__ */ jsxs(
|
|
16756
|
-
|
|
16757
|
-
|
|
16758
|
-
|
|
16759
|
-
|
|
16760
|
-
|
|
16761
|
-
|
|
16725
|
+
return /* @__PURE__ */ jsxs(
|
|
16726
|
+
"div",
|
|
16727
|
+
{
|
|
16728
|
+
role: "status",
|
|
16729
|
+
"aria-label": "Loading",
|
|
16730
|
+
className: `flex flex-col items-center justify-center p-4 ${className || ""}`.trim(),
|
|
16731
|
+
children: [
|
|
16732
|
+
/* @__PURE__ */ jsx(
|
|
16733
|
+
"img",
|
|
16734
|
+
{
|
|
16735
|
+
src: "/optifye-logo.png",
|
|
16736
|
+
alt: "Optifye Logo",
|
|
16737
|
+
className: `${sizeClasses[size]} h-auto animate-pulse select-none pointer-events-none`
|
|
16738
|
+
}
|
|
16739
|
+
),
|
|
16740
|
+
message && /* @__PURE__ */ jsx("div", { className: "mt-3 text-gray-600 text-sm font-medium text-center", children: message })
|
|
16741
|
+
]
|
|
16742
|
+
}
|
|
16743
|
+
);
|
|
16762
16744
|
};
|
|
16763
|
-
var
|
|
16745
|
+
var OptifyeLogoLoader_default = OptifyeLogoLoader;
|
|
16764
16746
|
var LoadingPage = ({
|
|
16765
16747
|
message = "Loading Dashboard...",
|
|
16766
16748
|
subMessage = "Please wait while we prepare your data",
|
|
@@ -16774,29 +16756,17 @@ var LoadingPage = ({
|
|
|
16774
16756
|
return () => clearTimeout(timeout);
|
|
16775
16757
|
}, [message]);
|
|
16776
16758
|
return /* @__PURE__ */ jsx("div", { className: `flex h-full w-full items-center justify-center bg-slate-50 ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center space-y-6 text-center", children: [
|
|
16777
|
-
/* @__PURE__ */ jsx(
|
|
16778
|
-
/* @__PURE__ */
|
|
16779
|
-
|
|
16780
|
-
|
|
16781
|
-
|
|
16782
|
-
|
|
16783
|
-
|
|
16784
|
-
|
|
16785
|
-
|
|
16786
|
-
|
|
16787
|
-
|
|
16788
|
-
),
|
|
16789
|
-
subMessage && /* @__PURE__ */ jsx(
|
|
16790
|
-
motion.p,
|
|
16791
|
-
{
|
|
16792
|
-
className: "mt-2 text-base text-gray-600",
|
|
16793
|
-
initial: { opacity: 0 },
|
|
16794
|
-
animate: { opacity: 1 },
|
|
16795
|
-
transition: { delay: 0.2, duration: 0.3 },
|
|
16796
|
-
children: subMessage
|
|
16797
|
-
}
|
|
16798
|
-
)
|
|
16799
|
-
] })
|
|
16759
|
+
/* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "lg", message }),
|
|
16760
|
+
subMessage && /* @__PURE__ */ jsx(
|
|
16761
|
+
motion.p,
|
|
16762
|
+
{
|
|
16763
|
+
className: "mt-2 text-base text-gray-600",
|
|
16764
|
+
initial: { opacity: 0 },
|
|
16765
|
+
animate: { opacity: 1 },
|
|
16766
|
+
transition: { delay: 0.2, duration: 0.3 },
|
|
16767
|
+
children: subMessage
|
|
16768
|
+
}
|
|
16769
|
+
)
|
|
16800
16770
|
] }) });
|
|
16801
16771
|
};
|
|
16802
16772
|
var LoadingPage_default = LoadingPage;
|
|
@@ -18641,7 +18611,7 @@ var VideoGridView = React19__default.memo(({
|
|
|
18641
18611
|
}, [cropping]);
|
|
18642
18612
|
const veryLowEfficiencyWorkspaces = useMemo(() => {
|
|
18643
18613
|
return new Set(
|
|
18644
|
-
workspaces.filter((w) => w.efficiency < 50 && w.efficiency >= 10).map((w) => w.workspace_name)
|
|
18614
|
+
workspaces.filter((w) => w.efficiency < 50 && w.efficiency >= 10).map((w) => `${w.line_id}_${w.workspace_name}`)
|
|
18645
18615
|
);
|
|
18646
18616
|
}, [workspaces]);
|
|
18647
18617
|
const filteredWorkspaces = useMemo(() => {
|
|
@@ -18777,7 +18747,7 @@ var VideoGridView = React19__default.memo(({
|
|
|
18777
18747
|
}).map((workspace) => {
|
|
18778
18748
|
const workspaceId = workspace.workspace_uuid || workspace.workspace_name;
|
|
18779
18749
|
const isVisible = visibleWorkspaces.has(workspaceId);
|
|
18780
|
-
const isVeryLowEfficiency = veryLowEfficiencyWorkspaces.has(workspace.workspace_name);
|
|
18750
|
+
const isVeryLowEfficiency = veryLowEfficiencyWorkspaces.has(`${workspace.line_id}_${workspace.workspace_name}`);
|
|
18781
18751
|
const workspaceCropping = getWorkspaceCropping(workspace.workspace_name);
|
|
18782
18752
|
return /* @__PURE__ */ jsx(
|
|
18783
18753
|
"div",
|
|
@@ -19947,20 +19917,23 @@ var LineHistoryCalendar = ({
|
|
|
19947
19917
|
} else {
|
|
19948
19918
|
calendar.push({
|
|
19949
19919
|
date: currentDate,
|
|
19950
|
-
dayShift: { avg_efficiency: 0, underperforming_workspaces: 0, total_workspaces: 0 },
|
|
19951
|
-
nightShift: { avg_efficiency: 0, underperforming_workspaces: 0, total_workspaces: 0 }
|
|
19920
|
+
dayShift: { avg_efficiency: 0, underperforming_workspaces: 0, total_workspaces: 0, hasData: false },
|
|
19921
|
+
nightShift: { avg_efficiency: 0, underperforming_workspaces: 0, total_workspaces: 0, hasData: false }
|
|
19952
19922
|
});
|
|
19953
19923
|
}
|
|
19954
19924
|
}
|
|
19955
19925
|
return calendar;
|
|
19956
19926
|
}, [data, month, year, configuredTimezone]);
|
|
19957
|
-
const
|
|
19927
|
+
const hasRealData = (shift) => {
|
|
19928
|
+
if (shift.hasData !== void 0) return shift.hasData;
|
|
19929
|
+
return shift.total_workspaces > 0 || shift.avg_efficiency > 0 || shift.underperforming_workspaces > 0;
|
|
19930
|
+
};
|
|
19931
|
+
const getPerformanceColor = (efficiency, date, hasData) => {
|
|
19958
19932
|
const istNow = todayInZone;
|
|
19959
19933
|
const nowString = `${istNow.getFullYear()}-${String(istNow.getMonth() + 1).padStart(2, "0")}-${String(istNow.getDate()).padStart(2, "0")}`;
|
|
19960
19934
|
const dateString = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
19961
|
-
if (date.getDay() === 0) return "bg-gray-300 dark:bg-gray-600";
|
|
19962
19935
|
if (dateString > nowString) return "bg-gray-200 dark:bg-gray-700";
|
|
19963
|
-
if (
|
|
19936
|
+
if (!hasData) return "bg-gray-300 dark:bg-gray-600";
|
|
19964
19937
|
return efficiency >= 75 ? "bg-green-500 dark:bg-green-600" : "bg-red-500 dark:bg-red-600";
|
|
19965
19938
|
};
|
|
19966
19939
|
const isCurrentDate = (date) => {
|
|
@@ -19979,7 +19952,7 @@ var LineHistoryCalendar = ({
|
|
|
19979
19952
|
const istNow = todayInZone;
|
|
19980
19953
|
const nowString = `${istNow.getFullYear()}-${String(istNow.getMonth() + 1).padStart(2, "0")}-${String(istNow.getDate()).padStart(2, "0")}`;
|
|
19981
19954
|
const dateString = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
19982
|
-
if (dateString > nowString
|
|
19955
|
+
if (dateString > nowString) return null;
|
|
19983
19956
|
return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/80 rounded-lg p-2 text-white opacity-0 group-hover:opacity-100 transition-opacity", children: /* @__PURE__ */ jsxs("div", { className: "text-xs space-y-1", children: [
|
|
19984
19957
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
19985
19958
|
"Efficiency: ",
|
|
@@ -20000,14 +19973,14 @@ var LineHistoryCalendar = ({
|
|
|
20000
19973
|
if (!shiftData) return /* @__PURE__ */ jsx("div", { className: "h-full border border-gray-100 dark:border-gray-700 rounded-lg bg-gray-50 dark:bg-gray-800" });
|
|
20001
19974
|
const isToday = isCurrentDate(day.date instanceof Date ? day.date : new Date(day.date));
|
|
20002
19975
|
const isFuture = isFutureDate(day.date instanceof Date ? day.date : new Date(day.date));
|
|
20003
|
-
const
|
|
19976
|
+
const hasData = hasRealData(shiftData);
|
|
20004
19977
|
const dateObj = day.date instanceof Date ? day.date : new Date(day.date);
|
|
20005
19978
|
return /* @__PURE__ */ jsx(
|
|
20006
19979
|
"div",
|
|
20007
19980
|
{
|
|
20008
|
-
className: `group h-full ${isFuture ||
|
|
19981
|
+
className: `group h-full ${isFuture || !hasData ? "cursor-not-allowed" : "cursor-pointer hover:opacity-90"}`,
|
|
20009
19982
|
onClick: () => {
|
|
20010
|
-
if (!isFuture &&
|
|
19983
|
+
if (!isFuture && hasData) {
|
|
20011
19984
|
const dateObj2 = day.date instanceof Date ? day.date : new Date(day.date);
|
|
20012
19985
|
const year2 = dateObj2.getFullYear();
|
|
20013
19986
|
const month2 = String(dateObj2.getMonth() + 1).padStart(2, "0");
|
|
@@ -20032,15 +20005,15 @@ var LineHistoryCalendar = ({
|
|
|
20032
20005
|
}
|
|
20033
20006
|
},
|
|
20034
20007
|
children: /* @__PURE__ */ jsxs("div", { className: `
|
|
20035
|
-
${getPerformanceColor(shiftData.avg_efficiency || 0, dateObj)}
|
|
20008
|
+
${getPerformanceColor(shiftData.avg_efficiency || 0, dateObj, hasData)}
|
|
20036
20009
|
rounded-lg h-full p-2 relative
|
|
20037
20010
|
${isToday ? "ring-2 ring-blue-500 dark:ring-blue-400 ring-offset-2 dark:ring-offset-gray-800 shadow-md" : ""}
|
|
20038
20011
|
`, children: [
|
|
20039
20012
|
/* @__PURE__ */ jsx("div", { className: `
|
|
20040
|
-
text-base font-medium text-white flex items-center
|
|
20013
|
+
text-base font-medium ${hasData ? "text-white" : "text-gray-500"} flex items-center
|
|
20041
20014
|
${isToday ? "bg-blue-500 dark:bg-blue-600 rounded-full w-7 h-7 justify-center" : ""}
|
|
20042
20015
|
`, children: dateObj.getDate() }),
|
|
20043
|
-
!isFuture &&
|
|
20016
|
+
!isFuture && hasData && renderStats(shiftData, dateObj)
|
|
20044
20017
|
] })
|
|
20045
20018
|
}
|
|
20046
20019
|
);
|
|
@@ -21138,6 +21111,10 @@ var WorkspaceHistoryCalendar = ({
|
|
|
21138
21111
|
const { dateTimeConfig } = useDashboardConfig();
|
|
21139
21112
|
const configuredTimezone = dateTimeConfig?.defaultTimezone || "Asia/Kolkata";
|
|
21140
21113
|
const [animationComplete, setAnimationComplete] = useState(false);
|
|
21114
|
+
const hasRealData = (shift) => {
|
|
21115
|
+
if (shift.hasData !== void 0) return shift.hasData;
|
|
21116
|
+
return shift.efficiency > 0 || shift.output > 0 || shift.cycleTime > 0 || shift.pph > 0 || shift.idealOutput > 0 || shift.idleTime > 0;
|
|
21117
|
+
};
|
|
21141
21118
|
useEffect(() => {
|
|
21142
21119
|
setAnimationComplete(false);
|
|
21143
21120
|
const timer = setTimeout(() => {
|
|
@@ -21190,10 +21167,14 @@ var WorkspaceHistoryCalendar = ({
|
|
|
21190
21167
|
istNow.setHours(0, 0, 0, 0);
|
|
21191
21168
|
const compareDate = new Date(date);
|
|
21192
21169
|
compareDate.setHours(0, 0, 0, 0);
|
|
21193
|
-
if (
|
|
21170
|
+
if (compareDate > istNow) {
|
|
21194
21171
|
return [];
|
|
21195
21172
|
}
|
|
21196
|
-
|
|
21173
|
+
const shiftData = selectedShift === "day" ? day.dayShift : day.nightShift;
|
|
21174
|
+
if (hasRealData(shiftData)) {
|
|
21175
|
+
return [shiftData];
|
|
21176
|
+
}
|
|
21177
|
+
return [];
|
|
21197
21178
|
});
|
|
21198
21179
|
if (validShifts.length === 0) return null;
|
|
21199
21180
|
const badShiftsCount = validShifts.filter((shift) => shift.efficiency < 75).length;
|
|
@@ -21206,7 +21187,7 @@ var WorkspaceHistoryCalendar = ({
|
|
|
21206
21187
|
badDaysCount: badShiftsCount,
|
|
21207
21188
|
totalDays: validShifts.length
|
|
21208
21189
|
};
|
|
21209
|
-
}, [data, month, year, configuredTimezone]);
|
|
21190
|
+
}, [data, month, year, configuredTimezone, selectedShift]);
|
|
21210
21191
|
const handleDayClick = useCallback((day, shift) => {
|
|
21211
21192
|
if (!day || isFutureDate(day.date)) return;
|
|
21212
21193
|
const year2 = day.date.getFullYear();
|
|
@@ -21245,13 +21226,13 @@ var WorkspaceHistoryCalendar = ({
|
|
|
21245
21226
|
compareDate.setHours(0, 0, 0, 0);
|
|
21246
21227
|
return compareDate > istNow;
|
|
21247
21228
|
}, [configuredTimezone]);
|
|
21248
|
-
const getPerformanceColor = useCallback((efficiency, date) => {
|
|
21229
|
+
const getPerformanceColor = useCallback((efficiency, date, hasData) => {
|
|
21249
21230
|
const istNow = getTimeInZoneAsDate(configuredTimezone);
|
|
21250
21231
|
istNow.setHours(0, 0, 0, 0);
|
|
21251
21232
|
const compareDate = toZonedTime(date, configuredTimezone);
|
|
21252
21233
|
compareDate.setHours(0, 0, 0, 0);
|
|
21253
|
-
if (compareDate.getDay() === 0) return "bg-gray-300";
|
|
21254
21234
|
if (compareDate > istNow) return "bg-gray-200";
|
|
21235
|
+
if (!hasData) return "bg-gray-300";
|
|
21255
21236
|
if (efficiency >= 80) return "bg-[#00AB45]/90";
|
|
21256
21237
|
if (efficiency >= 70) return "bg-[#FFB020]/90";
|
|
21257
21238
|
return "bg-[#E34329]/90";
|
|
@@ -21260,7 +21241,7 @@ var WorkspaceHistoryCalendar = ({
|
|
|
21260
21241
|
const istNow = getTimeInZoneAsDate(configuredTimezone);
|
|
21261
21242
|
const compareDate = toZonedTime(date, configuredTimezone);
|
|
21262
21243
|
compareDate.setHours(0, 0, 0, 0);
|
|
21263
|
-
if (compareDate > istNow ||
|
|
21244
|
+
if (compareDate > istNow || !hasRealData(shift)) return null;
|
|
21264
21245
|
return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/80 rounded-lg p-2 text-white opacity-0 group-hover:opacity-100 transition-all duration-200 ease-in-out", children: /* @__PURE__ */ jsxs("div", { className: "text-xs space-y-1", children: [
|
|
21265
21246
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
21266
21247
|
"Efficiency: ",
|
|
@@ -21312,25 +21293,26 @@ var WorkspaceHistoryCalendar = ({
|
|
|
21312
21293
|
return /* @__PURE__ */ jsx("div", { className: `h-full border border-gray-200 rounded-lg ${bgColor} ${animationComplete ? "transition-all duration-300 ease-in-out" : ""} cursor-not-allowed opacity-60`, children: /* @__PURE__ */ jsx("div", { className: "p-2", children: /* @__PURE__ */ jsx("div", { className: `text-base font-medium ${textColor} ${isToday ? "text-blue-500" : ""}`, children: dayNumber }) }) });
|
|
21313
21294
|
}
|
|
21314
21295
|
const shiftData = selectedShift === "day" ? day.dayShift : day.nightShift;
|
|
21296
|
+
const hasData = hasRealData(shiftData);
|
|
21315
21297
|
return /* @__PURE__ */ jsx(
|
|
21316
21298
|
"div",
|
|
21317
21299
|
{
|
|
21318
|
-
className: `group h-full ${animationComplete ? "transition-all duration-300 ease-in-out" : ""} ${!isFuture && animationComplete ? "cursor-pointer hover:opacity-90 hover:scale-105" : "cursor-not-allowed"}`,
|
|
21319
|
-
onClick: () => !isFuture && handleDayClick(day, selectedShift),
|
|
21300
|
+
className: `group h-full ${animationComplete ? "transition-all duration-300 ease-in-out" : ""} ${!isFuture && hasData && animationComplete ? "cursor-pointer hover:opacity-90 hover:scale-105" : "cursor-not-allowed"}`,
|
|
21301
|
+
onClick: () => !isFuture && hasData && handleDayClick(day, selectedShift),
|
|
21320
21302
|
children: /* @__PURE__ */ jsxs("div", { className: `
|
|
21321
|
-
${getPerformanceColor(shiftData.efficiency, day.date)}
|
|
21303
|
+
${getPerformanceColor(shiftData.efficiency, day.date, hasData)}
|
|
21322
21304
|
rounded-lg h-full p-2 relative ${animationComplete ? "transition-all duration-300 ease-in-out" : ""} shadow-sm
|
|
21323
21305
|
${isToday ? "ring-2 ring-blue-500 ring-offset-2 shadow-md" : ""}
|
|
21324
21306
|
`, children: [
|
|
21325
21307
|
/* @__PURE__ */ jsx("div", { className: `
|
|
21326
|
-
text-base font-medium text-white flex items-center ${animationComplete ? "transition-all duration-300 ease-in-out" : ""}
|
|
21308
|
+
text-base font-medium ${hasData ? "text-white" : "text-gray-500"} flex items-center ${animationComplete ? "transition-all duration-300 ease-in-out" : ""}
|
|
21327
21309
|
${isToday ? "bg-blue-500 rounded-full w-7 h-7 justify-center" : ""}
|
|
21328
21310
|
`, children: day.date.getDate() }),
|
|
21329
|
-
!isFuture && animationComplete && renderStats(shiftData, day.date)
|
|
21311
|
+
!isFuture && hasData && animationComplete && renderStats(shiftData, day.date)
|
|
21330
21312
|
] })
|
|
21331
21313
|
}
|
|
21332
21314
|
);
|
|
21333
|
-
}, [selectedShift, isCurrentDate, isFutureDate, getPerformanceColor, handleDayClick, year, month, configuredTimezone, animationComplete]);
|
|
21315
|
+
}, [selectedShift, isCurrentDate, isFutureDate, getPerformanceColor, handleDayClick, year, month, configuredTimezone, animationComplete, hasRealData]);
|
|
21334
21316
|
return /* @__PURE__ */ jsxs("div", { className: `calendar-wrapper space-y-6 ${className || ""} ${animationComplete ? "animation-complete" : ""}`, children: [
|
|
21335
21317
|
/* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: styles } }),
|
|
21336
21318
|
/* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-1 border border-gray-200 rounded-lg p-1 bg-gray-50", children: [
|
|
@@ -21368,7 +21350,10 @@ var WorkspaceHistoryCalendar = ({
|
|
|
21368
21350
|
] }),
|
|
21369
21351
|
/* @__PURE__ */ jsxs("div", { className: "calendar-container bg-white rounded-xl shadow-sm border border-gray-100 p-6 transition-all duration-200 ease-in-out", children: [
|
|
21370
21352
|
/* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
|
|
21371
|
-
/* @__PURE__ */
|
|
21353
|
+
/* @__PURE__ */ jsxs("h3", { className: "font-semibold text-gray-900 text-lg", children: [
|
|
21354
|
+
"Monthly Summary - ",
|
|
21355
|
+
selectedShift === "day" ? "Day Shift" : "Night Shift"
|
|
21356
|
+
] }),
|
|
21372
21357
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 mt-1", children: "Overview of monthly performance metrics" })
|
|
21373
21358
|
] }),
|
|
21374
21359
|
monthlyMetrics ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
@@ -22104,10 +22089,7 @@ var LoadingOverlay = ({
|
|
|
22104
22089
|
className: `fixed inset-0 z-[100] flex items-center justify-center bg-black/30 backdrop-blur-sm ${className || ""}`,
|
|
22105
22090
|
"aria-modal": "true",
|
|
22106
22091
|
role: "dialog",
|
|
22107
|
-
children: /* @__PURE__ */
|
|
22108
|
-
/* @__PURE__ */ jsx(LoadingSpinner_default, { size: "md" }),
|
|
22109
|
-
/* @__PURE__ */ jsx("p", { className: "text-base font-medium text-gray-700", children: message })
|
|
22110
|
-
] })
|
|
22092
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center space-y-3 rounded-lg bg-white p-8 shadow-xl", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md", message }) })
|
|
22111
22093
|
}
|
|
22112
22094
|
);
|
|
22113
22095
|
};
|
|
@@ -22932,20 +22914,6 @@ var S3ClipsService = class {
|
|
|
22932
22914
|
return videos;
|
|
22933
22915
|
}
|
|
22934
22916
|
};
|
|
22935
|
-
var LoadingSpinner2 = ({
|
|
22936
|
-
size = "md",
|
|
22937
|
-
message = "Loading..."
|
|
22938
|
-
}) => {
|
|
22939
|
-
const sizeClasses = {
|
|
22940
|
-
sm: "w-4 h-4",
|
|
22941
|
-
md: "w-6 h-6",
|
|
22942
|
-
lg: "w-8 h-8"
|
|
22943
|
-
};
|
|
22944
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center", children: [
|
|
22945
|
-
/* @__PURE__ */ jsx("div", { className: `${sizeClasses[size]} border-2 border-t-blue-500 border-r-blue-500 border-b-gray-200 border-l-gray-200 rounded-full animate-spin mb-2` }),
|
|
22946
|
-
message && /* @__PURE__ */ jsx("span", { className: "text-gray-600 text-sm", children: message })
|
|
22947
|
-
] });
|
|
22948
|
-
};
|
|
22949
22917
|
var BottlenecksContent = ({
|
|
22950
22918
|
workspaceId,
|
|
22951
22919
|
workspaceName,
|
|
@@ -23464,7 +23432,7 @@ var BottlenecksContent = ({
|
|
|
23464
23432
|
] });
|
|
23465
23433
|
}
|
|
23466
23434
|
if (isLoading && allVideos.length === 0) {
|
|
23467
|
-
return /* @__PURE__ */ jsx("div", { className: "flex-grow p-4 flex items-center justify-center h-[calc(100vh-12rem)]", children: /* @__PURE__ */ jsx(
|
|
23435
|
+
return /* @__PURE__ */ jsx("div", { className: "flex-grow p-4 flex items-center justify-center h-[calc(100vh-12rem)]", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "lg", message: "Loading clips..." }) });
|
|
23468
23436
|
}
|
|
23469
23437
|
if (error) {
|
|
23470
23438
|
return /* @__PURE__ */ jsxs("div", { className: "flex-grow p-4 flex flex-col items-center justify-center h-[calc(100vh-12rem)] text-center", children: [
|
|
@@ -23642,7 +23610,7 @@ var BottlenecksContent = ({
|
|
|
23642
23610
|
}
|
|
23643
23611
|
)
|
|
23644
23612
|
] }),
|
|
23645
|
-
isLoading && allVideos.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-[calc(100%-4rem)]", children: /* @__PURE__ */ jsx(
|
|
23613
|
+
isLoading && allVideos.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-[calc(100%-4rem)]", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading clips..." }) }) : allVideos.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-[calc(100%-4rem)]", children: /* @__PURE__ */ jsxs("div", { className: "text-center p-8", children: [
|
|
23646
23614
|
/* @__PURE__ */ jsx("svg", { className: "w-16 h-16 text-gray-300 mx-auto mb-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z" }) }),
|
|
23647
23615
|
/* @__PURE__ */ jsx("h3", { className: "text-xl font-medium text-gray-700 mb-2", children: "No Clips Found" }),
|
|
23648
23616
|
/* @__PURE__ */ jsx("p", { className: "text-gray-500", children: "There were no video clips found for this workspace today." })
|
|
@@ -25332,11 +25300,8 @@ var LoadingState = ({
|
|
|
25332
25300
|
className = ""
|
|
25333
25301
|
}) => {
|
|
25334
25302
|
return /* @__PURE__ */ jsx("div", { className: `flex h-full w-full items-center justify-center bg-gray-50/50 ${className}`, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center space-y-4 text-center", children: [
|
|
25335
|
-
/* @__PURE__ */ jsx(
|
|
25336
|
-
/* @__PURE__ */
|
|
25337
|
-
/* @__PURE__ */ jsx("h3", { className: "text-lg font-medium text-gray-900", children: message }),
|
|
25338
|
-
subMessage && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-600", children: subMessage })
|
|
25339
|
-
] })
|
|
25303
|
+
/* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size, message }),
|
|
25304
|
+
subMessage && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-600", children: subMessage })
|
|
25340
25305
|
] }) });
|
|
25341
25306
|
};
|
|
25342
25307
|
var LoadingSkeleton = ({
|
|
@@ -25363,10 +25328,7 @@ var LoadingSkeleton = ({
|
|
|
25363
25328
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-1/3" }),
|
|
25364
25329
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
25365
25330
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-64 w-full" }),
|
|
25366
|
-
showLoadingIndicator && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "bg-white/80 rounded-lg p-3 shadow-sm", children: /* @__PURE__ */
|
|
25367
|
-
/* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
25368
|
-
/* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
25369
|
-
] }) }) })
|
|
25331
|
+
showLoadingIndicator && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "bg-white/80 rounded-lg p-3 shadow-sm", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "sm" }) }) })
|
|
25370
25332
|
] })
|
|
25371
25333
|
] });
|
|
25372
25334
|
case "table":
|
|
@@ -25417,10 +25379,7 @@ var LoadingInline = ({
|
|
|
25417
25379
|
size = "sm",
|
|
25418
25380
|
className = ""
|
|
25419
25381
|
}) => {
|
|
25420
|
-
return /* @__PURE__ */
|
|
25421
|
-
/* @__PURE__ */ jsx(LoadingSpinner_default, { size }),
|
|
25422
|
-
message && /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-600", children: message })
|
|
25423
|
-
] });
|
|
25382
|
+
return /* @__PURE__ */ jsx("div", { className: `inline-flex items-center space-x-2 ${className}`, children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size, message }) });
|
|
25424
25383
|
};
|
|
25425
25384
|
var DEFAULT_HLS_CONFIG = {
|
|
25426
25385
|
maxBufferLength: 15,
|
|
@@ -25649,7 +25608,7 @@ var ThreadSidebar = ({
|
|
|
25649
25608
|
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold text-gray-900", children: "Chat History" }),
|
|
25650
25609
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 mt-1", children: "Your previous conversations" })
|
|
25651
25610
|
] }),
|
|
25652
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto min-h-0", children: isLoading ? /* @__PURE__ */ jsx("div", { className: "flex justify-center p-8", children: /* @__PURE__ */ jsx(
|
|
25611
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto min-h-0", children: isLoading ? /* @__PURE__ */ jsx("div", { className: "flex justify-center p-8", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "sm" }) }) : threads.length === 0 ? /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-gray-500 text-sm", children: "No conversations yet" }) : /* @__PURE__ */ jsx("div", { className: "py-2", children: threads.map((thread) => /* @__PURE__ */ jsxs(
|
|
25653
25612
|
"div",
|
|
25654
25613
|
{
|
|
25655
25614
|
onClick: () => onSelectThread(thread.id),
|
|
@@ -25660,7 +25619,7 @@ var ThreadSidebar = ({
|
|
|
25660
25619
|
/* @__PURE__ */ jsx("h3", { className: `text-sm font-medium truncate ${activeThreadId === thread.id ? "text-blue-900" : "text-gray-900"}`, children: thread.title || "Untitled Chat" }),
|
|
25661
25620
|
/* @__PURE__ */ jsx("p", { className: `text-xs mt-0.5 ${activeThreadId === thread.id ? "text-blue-700" : "text-gray-500"}`, children: formatDate(thread.created_at) })
|
|
25662
25621
|
] }),
|
|
25663
|
-
deletingId === thread.id ? /* @__PURE__ */ jsx(
|
|
25622
|
+
deletingId === thread.id ? /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsx(
|
|
25664
25623
|
"button",
|
|
25665
25624
|
{
|
|
25666
25625
|
onClick: (e) => handleDelete(e, thread.id),
|
|
@@ -27421,7 +27380,13 @@ var AIAgentView = () => {
|
|
|
27421
27380
|
{
|
|
27422
27381
|
className: `relative px-5 py-4 rounded-2xl shadow-sm ${message.role === "user" ? "bg-blue-600 text-white max-w-[85%] ml-auto" : "bg-white border border-gray-200/80 max-w-full"}`,
|
|
27423
27382
|
children: /* @__PURE__ */ jsxs("div", { className: `${message.role === "user" ? "text-white" : "text-gray-800"}`, children: [
|
|
27424
|
-
message.role === "assistant" ?
|
|
27383
|
+
message.role === "assistant" ? message.id === -1 ? /* @__PURE__ */ jsx(
|
|
27384
|
+
"div",
|
|
27385
|
+
{
|
|
27386
|
+
className: "formatted-content",
|
|
27387
|
+
dangerouslySetInnerHTML: { __html: formatMessage(message.content) }
|
|
27388
|
+
}
|
|
27389
|
+
) : renderAssistantContent(message.content) : /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap leading-relaxed", children: message.content }),
|
|
27425
27390
|
message.id === -1 && /* @__PURE__ */ jsx("span", { className: "inline-block w-0.5 h-4 bg-gray-400 animate-pulse ml-0.5" })
|
|
27426
27391
|
] })
|
|
27427
27392
|
}
|
|
@@ -27451,7 +27416,13 @@ var AIAgentView = () => {
|
|
|
27451
27416
|
className: `relative px-5 py-4 rounded-2xl shadow-sm ${message.role === "user" ? "bg-blue-600 text-white max-w-[85%] ml-auto" : "bg-white border border-gray-200/80 max-w-full"}`,
|
|
27452
27417
|
children: [
|
|
27453
27418
|
/* @__PURE__ */ jsxs("div", { className: `${message.role === "user" ? "text-white" : "text-gray-800"}`, children: [
|
|
27454
|
-
message.role === "assistant" ?
|
|
27419
|
+
message.role === "assistant" ? message.id === -1 ? /* @__PURE__ */ jsx(
|
|
27420
|
+
"div",
|
|
27421
|
+
{
|
|
27422
|
+
className: "formatted-content",
|
|
27423
|
+
dangerouslySetInnerHTML: { __html: formatMessage(message.content) }
|
|
27424
|
+
}
|
|
27425
|
+
) : renderAssistantContent(message.content) : /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap leading-relaxed", children: message.content }),
|
|
27455
27426
|
message.id === -1 && /* @__PURE__ */ jsx("span", { className: "inline-block w-0.5 h-4 bg-gray-400 animate-pulse ml-0.5" })
|
|
27456
27427
|
] }),
|
|
27457
27428
|
message.role === "assistant" && message.id !== -1 && /* @__PURE__ */ jsx(
|
|
@@ -28473,7 +28444,7 @@ var HelpView = ({
|
|
|
28473
28444
|
disabled: isSubmitting,
|
|
28474
28445
|
className: "px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2 shadow-sm text-sm",
|
|
28475
28446
|
children: isSubmitting ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28476
|
-
/* @__PURE__ */ jsx(
|
|
28447
|
+
/* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "sm" }),
|
|
28477
28448
|
"Submitting..."
|
|
28478
28449
|
] }) : "Submit Ticket"
|
|
28479
28450
|
}
|
|
@@ -28658,7 +28629,7 @@ function HomeView({
|
|
|
28658
28629
|
) }) }),
|
|
28659
28630
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto sm:overflow-hidden relative", children: [
|
|
28660
28631
|
lineSelectorComponent && /* @__PURE__ */ jsx("div", { className: "absolute right-3 top-2 sm:right-6 sm:top-3 z-30", children: lineSelectorComponent }),
|
|
28661
|
-
/* @__PURE__ */ jsx("div", { className: "h-full sm:h-full min-h-[calc(100vh-80px)] sm:min-h-0", children: isDataLoading
|
|
28632
|
+
/* @__PURE__ */ jsx("div", { className: "h-full sm:h-full min-h-[calc(100vh-80px)] sm:min-h-0", children: isDataLoading || !hasInitialDataLoaded ? /* @__PURE__ */ jsx("div", { className: "px-3 sm:px-6 lg:px-8 py-4", children: /* @__PURE__ */ jsx(LoadingSkeleton, { type: "workspace-card", count: 8, className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4" }) }) : memoizedWorkspaceMetrics.length > 0 ? /* @__PURE__ */ jsx(
|
|
28662
28633
|
motion.div,
|
|
28663
28634
|
{
|
|
28664
28635
|
initial: { opacity: 0, scale: 0.98 },
|
|
@@ -30285,7 +30256,7 @@ var ProfileView = () => {
|
|
|
30285
30256
|
}
|
|
30286
30257
|
};
|
|
30287
30258
|
if (authLoading || loading) {
|
|
30288
|
-
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx(
|
|
30259
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "lg" }) });
|
|
30289
30260
|
}
|
|
30290
30261
|
if (!user) {
|
|
30291
30262
|
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
@@ -30442,7 +30413,7 @@ var ProfileView = () => {
|
|
|
30442
30413
|
] })
|
|
30443
30414
|
] }),
|
|
30444
30415
|
isEditing && /* @__PURE__ */ jsx("div", { className: "mt-6 flex gap-3", children: /* @__PURE__ */ jsx(Button2, { variant: "outline", onClick: handleSaveProfile, disabled: loading, children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30445
|
-
/* @__PURE__ */ jsx(
|
|
30416
|
+
/* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "sm", className: "mr-2" }),
|
|
30446
30417
|
"Saving..."
|
|
30447
30418
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30448
30419
|
/* @__PURE__ */ jsx(Save, { className: "h-4 w-4 mr-2" }),
|
|
@@ -30506,7 +30477,7 @@ var ProfileView = () => {
|
|
|
30506
30477
|
disabled: loading,
|
|
30507
30478
|
className: "flex items-center gap-2 text-red-600 hover:text-red-700 border-red-200 hover:border-red-300",
|
|
30508
30479
|
children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30509
|
-
/* @__PURE__ */ jsx(
|
|
30480
|
+
/* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "sm", className: "mr-2" }),
|
|
30510
30481
|
"Signing out..."
|
|
30511
30482
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30512
30483
|
/* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
@@ -31953,7 +31924,7 @@ var SKUList = ({
|
|
|
31953
31924
|
}) => {
|
|
31954
31925
|
if (isLoading) {
|
|
31955
31926
|
return /* @__PURE__ */ jsx("div", { className: "bg-white rounded-xl shadow-sm border border-gray-200 p-8", children: /* @__PURE__ */ jsxs("div", { className: "flex justify-center items-center", children: [
|
|
31956
|
-
/* @__PURE__ */ jsx(
|
|
31927
|
+
/* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md" }),
|
|
31957
31928
|
/* @__PURE__ */ jsx("span", { className: "ml-3 text-gray-600", children: "Loading SKUs..." })
|
|
31958
31929
|
] }) });
|
|
31959
31930
|
}
|
|
@@ -32039,7 +32010,7 @@ var TargetsViewUI = ({
|
|
|
32039
32010
|
skuRequired = false
|
|
32040
32011
|
}) => {
|
|
32041
32012
|
if (isLoading) {
|
|
32042
|
-
return /* @__PURE__ */ jsx("div", { className: "flex h-screen bg-gray-50", children: /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
32013
|
+
return /* @__PURE__ */ jsx("div", { className: "flex h-screen bg-gray-50", children: /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "lg", message: "Loading targets..." }) }) });
|
|
32043
32014
|
}
|
|
32044
32015
|
return /* @__PURE__ */ jsxs("main", { className: "min-h-screen flex-1 bg-gray-50", children: [
|
|
32045
32016
|
/* @__PURE__ */ jsx("div", { className: "bg-white px-8 py-6 shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between relative", children: [
|
|
@@ -32141,7 +32112,7 @@ var TargetsViewUI = ({
|
|
|
32141
32112
|
className: `ml-6 inline-flex items-center px-4 py-2 text-sm font-medium rounded-lg transition-all duration-200
|
|
32142
32113
|
${savingLines[lineId] ? "bg-gray-100 text-gray-400 cursor-not-allowed" : "bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"}`,
|
|
32143
32114
|
children: savingLines[lineId] ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32144
|
-
/* @__PURE__ */ jsx(
|
|
32115
|
+
/* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "sm", className: "mr-2" }),
|
|
32145
32116
|
"Saving..."
|
|
32146
32117
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32147
32118
|
/* @__PURE__ */ jsx(Save, { className: "w-4 h-4 mr-2" }),
|
|
@@ -33279,13 +33250,7 @@ var WorkspaceDetailView = ({
|
|
|
33279
33250
|
] }) }, i)) }),
|
|
33280
33251
|
/* @__PURE__ */ jsx("div", { className: "bg-white rounded-lg p-6 shadow-sm", children: /* @__PURE__ */ jsxs("div", { className: "animate-pulse", children: [
|
|
33281
33252
|
/* @__PURE__ */ jsx("div", { className: "h-6 w-40 bg-gray-200 rounded mb-4" }),
|
|
33282
|
-
/* @__PURE__ */ jsx("div", { className: "h-64 bg-gray-100 rounded relative overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */
|
|
33283
|
-
/* @__PURE__ */ jsxs("svg", { className: "animate-spin h-8 w-8 text-blue-500", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
33284
|
-
/* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
33285
|
-
/* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
33286
|
-
] }),
|
|
33287
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-600 mt-2", children: "Loading chart data..." })
|
|
33288
|
-
] }) }) })
|
|
33253
|
+
/* @__PURE__ */ jsx("div", { className: "h-64 bg-gray-100 rounded relative overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "bg-white/80 rounded-lg p-4 shadow-sm", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "md", message: "Loading chart data..." }) }) }) })
|
|
33289
33254
|
] }) })
|
|
33290
33255
|
] })
|
|
33291
33256
|
] })
|
|
@@ -34106,4 +34071,4 @@ var S3Service = class {
|
|
|
34106
34071
|
}
|
|
34107
34072
|
};
|
|
34108
34073
|
|
|
34109
|
-
export { ACTION_NAMES, AIAgentView_default as AIAgentView, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedTargetsView, BarChart, BaseHistoryCalendar, BottlenecksContent, BreakNotificationPopup, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, CycleTimeChart, CycleTimeOverTimeChart, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, DashboardHeader, DashboardLayout, DashboardOverridesProvider, DashboardProvider, DateDisplay_default as DateDisplay, DateTimeDisplay, DebugAuth, DebugAuthView_default as DebugAuthView, EmptyStateMessage, FactoryView_default as FactoryView, GaugeChart, GridComponentsPlaceholder, Header, HelpView_default as HelpView, HomeView_default as HomeView, HourlyOutputChart2 as HourlyOutputChart, ISTTimer_default as ISTTimer, KPICard, KPIDetailView_default as KPIDetailView, KPIGrid, KPIHeader, KPISection, KPIsOverviewView_default as KPIsOverviewView, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, LeaderboardDetailView_default as LeaderboardDetailView, Legend6 as Legend, LineChart, LineHistoryCalendar, LineMonthlyHistory, LineMonthlyPdfGenerator, LinePdfExportButton, LinePdfGenerator, LineWhatsAppShareButton, LiveTimer, LoadingInline, LoadingOverlay_default as LoadingOverlay, LoadingPage_default as LoadingPage, LoadingSkeleton,
|
|
34074
|
+
export { ACTION_NAMES, AIAgentView_default as AIAgentView, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedTargetsView, BarChart, BaseHistoryCalendar, BottlenecksContent, BreakNotificationPopup, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, CycleTimeChart, CycleTimeOverTimeChart, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, DashboardHeader, DashboardLayout, DashboardOverridesProvider, DashboardProvider, DateDisplay_default as DateDisplay, DateTimeDisplay, DebugAuth, DebugAuthView_default as DebugAuthView, EmptyStateMessage, FactoryView_default as FactoryView, GaugeChart, GridComponentsPlaceholder, Header, HelpView_default as HelpView, HomeView_default as HomeView, HourlyOutputChart2 as HourlyOutputChart, ISTTimer_default as ISTTimer, KPICard, KPIDetailView_default as KPIDetailView, KPIGrid, KPIHeader, KPISection, KPIsOverviewView_default as KPIsOverviewView, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, LeaderboardDetailView_default as LeaderboardDetailView, Legend6 as Legend, LineChart, LineHistoryCalendar, LineMonthlyHistory, LineMonthlyPdfGenerator, LinePdfExportButton, LinePdfGenerator, LineWhatsAppShareButton, LiveTimer, LoadingInline, LoadingOverlay_default as LoadingOverlay, LoadingPage_default as LoadingPage, LoadingSkeleton, LoadingState, LoginPage, LoginView_default as LoginView, MainLayout, MetricCard_default as MetricCard, NoWorkspaceData, OptifyeAgentClient, OptifyeLogoLoader_default as OptifyeLogoLoader, OutputProgressChart, PageHeader, PieChart4 as PieChart, ProfileView_default as ProfileView, RegistryProvider, S3Service, SKUManagementView, SOPComplianceChart, SSEChatClient, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, ShiftDisplay_default as ShiftDisplay, ShiftsView_default as ShiftsView, SideNavBar, SingleVideoStream_default as SingleVideoStream, Skeleton, SlackAPI, SubscriptionManager, SubscriptionManagerProvider, SupabaseProvider, TargetWorkspaceGrid, TargetsView_default as TargetsView, ThreadSidebar, TimeDisplay_default as TimeDisplay, TimePickerDropdown, VideoCard, VideoGridView, VideoPreloader, WORKSPACE_POSITIONS, WhatsAppShareButton, WorkspaceCard, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, apiUtils, authCoreService, authOTPService, authRateLimitService, cacheService, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearWorkspaceDisplayNamesCache, cn, createStreamProxyHandler, createSupabaseClient, createThrottledReload, dashboardService, deleteThread, forceRefreshWorkspaceDisplayNames, formatDateInZone, formatDateTimeInZone, formatISTDate, formatIdleTime, formatTimeInZone, fromUrlFriendlyName, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAnonClient, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentTimeInZone, getDashboardHeaderTimeInZone, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getOperationalDate, getS3SignedUrl, getS3VideoSrc, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUserThreads, getUserThreadsPaginated, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, identifyCoreUser, initializeCoreMixpanel, isLegacyConfiguration, isTransitionPeriod, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, mergeWithDefaultConfig, migrateLegacyConfiguration, optifyeAgentClient, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetSubscriptionManager, s3VideoPreloader, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, updateThreadTitle, useActiveBreaks, useAllWorkspaceMetrics, useAnalyticsConfig, useAuth, useAuthConfig, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineWorkspaceMetrics, useMessages, useMetrics, useNavigation, useOverrides, usePageOverride, useRealtimeLineMetrics, useRegistry, useSKUs, useShiftConfig, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useTargets, useTheme, useThemeConfig, useThreads, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, videoPreloader, whatsappService, withAuth, withRegistry, workspaceService };
|