@optifye/dashboard-core 6.4.1 → 6.4.2
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 +4 -12
- package/dist/index.d.mts +72 -3
- package/dist/index.d.ts +72 -3
- package/dist/index.js +381 -268
- package/dist/index.mjs +382 -271
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -14,9 +14,10 @@ import { noop, warning, invariant, progress, secondsToMilliseconds, milliseconds
|
|
|
14
14
|
import { getValueTransition, hover, press, isPrimaryPointer, GroupPlaybackControls, setDragLock, supportsLinearEasing, attachTimeline, isGenerator, calcGeneratorDuration, isWaapiSupportedEasing, mapEasingToNativeEasing, maxGeneratorDuration, generateLinearEasing, isBezierDefinition } from 'motion-dom';
|
|
15
15
|
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';
|
|
16
16
|
import { Slot } from '@radix-ui/react-slot';
|
|
17
|
-
import { Camera, ChevronDown, ChevronUp, Check, ShieldCheck, Star, Award, X, Coffee, Plus,
|
|
17
|
+
import { Camera, ChevronDown, ChevronUp, Check, ShieldCheck, Star, Award, X, Coffee, Plus, ArrowLeft, Clock, Calendar, Save, Minus, ArrowDown, ArrowUp, Settings2, CheckCircle2, Search, CheckCircle, AlertTriangle, Info, Share2, Trophy, Target, Download, User, XCircle, ChevronLeft, ChevronRight, AlertCircle, Sun, Moon, MessageSquare, Trash2, RefreshCw, Menu, Send, Copy, Edit2, UserCheck, LogOut, Package, Settings, LifeBuoy, EyeOff, Eye, Zap, UserCircle } from 'lucide-react';
|
|
18
18
|
import { DayPicker, useNavigation as useNavigation$1 } from 'react-day-picker';
|
|
19
|
-
import { XMarkIcon, ArrowRightIcon, HomeIcon, TrophyIcon, ChartBarIcon, AdjustmentsHorizontalIcon, ClockIcon, CubeIcon, SparklesIcon, QuestionMarkCircleIcon, UserCircleIcon, ExclamationCircleIcon, EnvelopeIcon, DocumentTextIcon,
|
|
19
|
+
import { XMarkIcon, ArrowRightIcon, HomeIcon, TrophyIcon, ChartBarIcon, AdjustmentsHorizontalIcon, ClockIcon, CubeIcon, SparklesIcon, QuestionMarkCircleIcon, UserCircleIcon, ExclamationCircleIcon, EnvelopeIcon, DocumentTextIcon, ChevronUpIcon, ChevronDownIcon, Bars3Icon, CheckCircleIcon, ChatBubbleLeftRightIcon, XCircleIcon, InformationCircleIcon, ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/24/outline';
|
|
20
|
+
import { CheckIcon } from '@heroicons/react/24/solid';
|
|
20
21
|
import html2canvas from 'html2canvas';
|
|
21
22
|
import jsPDF, { jsPDF as jsPDF$1 } from 'jspdf';
|
|
22
23
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
@@ -2645,6 +2646,17 @@ var TicketHistoryService = class {
|
|
|
2645
2646
|
}
|
|
2646
2647
|
return data;
|
|
2647
2648
|
}
|
|
2649
|
+
/**
|
|
2650
|
+
* Update ticket serviced status
|
|
2651
|
+
*/
|
|
2652
|
+
static async updateTicketServicedStatus(ticketId, serviced) {
|
|
2653
|
+
const supabase = _getSupabaseInstance();
|
|
2654
|
+
const { data, error } = await supabase.from("support_ticket_history").update({ serviced, updated_at: (/* @__PURE__ */ new Date()).toISOString() }).eq("id", ticketId).select().single();
|
|
2655
|
+
if (error) {
|
|
2656
|
+
throw new Error(`Failed to update ticket serviced status: ${error.message}`);
|
|
2657
|
+
}
|
|
2658
|
+
return data;
|
|
2659
|
+
}
|
|
2648
2660
|
};
|
|
2649
2661
|
|
|
2650
2662
|
// src/lib/services/audioService.ts
|
|
@@ -4030,10 +4042,7 @@ var S3ClipsService = class {
|
|
|
4030
4042
|
* Internal implementation of clip counts fetching
|
|
4031
4043
|
*/
|
|
4032
4044
|
async executeGetClipCounts(workspaceId, date, shiftId, buildIndex) {
|
|
4033
|
-
|
|
4034
|
-
this.isIndexBuilding = true;
|
|
4035
|
-
console.log(`[S3ClipsService] Starting index building - metadata fetching disabled`);
|
|
4036
|
-
}
|
|
4045
|
+
const effectiveBuildIndex = false;
|
|
4037
4046
|
try {
|
|
4038
4047
|
const basePrefix = `sop_violations/${workspaceId}/${date}/${shiftId}/`;
|
|
4039
4048
|
const counts = { total: 0 };
|
|
@@ -4049,9 +4058,9 @@ var S3ClipsService = class {
|
|
|
4049
4058
|
"bottleneck"
|
|
4050
4059
|
];
|
|
4051
4060
|
const shiftName = shiftId === 0 || shiftId === "0" ? "Day" : "Night";
|
|
4052
|
-
console.log(`[S3ClipsService]
|
|
4061
|
+
console.log(`[S3ClipsService] Fast counting clips for ${workspaceId} on ${date}, shift ${shiftId} (${shiftName} Shift)`);
|
|
4053
4062
|
const startTime = performance.now();
|
|
4054
|
-
const videoIndex =
|
|
4063
|
+
const videoIndex = effectiveBuildIndex ? {
|
|
4055
4064
|
byCategory: /* @__PURE__ */ new Map(),
|
|
4056
4065
|
allVideos: [],
|
|
4057
4066
|
counts: {},
|
|
@@ -4065,53 +4074,7 @@ var S3ClipsService = class {
|
|
|
4065
4074
|
const categoryPrefix = `${basePrefix}${category}/videos/`;
|
|
4066
4075
|
const categoryVideos = [];
|
|
4067
4076
|
try {
|
|
4068
|
-
if (
|
|
4069
|
-
const command = new ListObjectsV2Command({
|
|
4070
|
-
Bucket: this.config.s3Config.bucketName,
|
|
4071
|
-
Prefix: categoryPrefix,
|
|
4072
|
-
MaxKeys: 1e3
|
|
4073
|
-
});
|
|
4074
|
-
let continuationToken;
|
|
4075
|
-
do {
|
|
4076
|
-
if (continuationToken) {
|
|
4077
|
-
command.input.ContinuationToken = continuationToken;
|
|
4078
|
-
}
|
|
4079
|
-
const response = await this.s3Client.send(command);
|
|
4080
|
-
if (response.Contents) {
|
|
4081
|
-
for (const obj of response.Contents) {
|
|
4082
|
-
if (obj.Key && obj.Key.endsWith("playlist.m3u8")) {
|
|
4083
|
-
if (obj.Key.includes("missed_qchecks")) {
|
|
4084
|
-
continue;
|
|
4085
|
-
}
|
|
4086
|
-
const s3Uri = `s3://${this.config.s3Config.bucketName}/${obj.Key}`;
|
|
4087
|
-
const sopCategories = this.getSOPCategories(workspaceId);
|
|
4088
|
-
const parsedInfo = parseS3Uri(s3Uri, sopCategories);
|
|
4089
|
-
const belongsToCategory = parsedInfo && (parsedInfo.type === category || // Handle specific mismatches between folder names and parsed types
|
|
4090
|
-
category === "cycle_completion" && parsedInfo.type === "cycle_completion" || category === "sop_deviation" && parsedInfo.type === "missing_quality_check" || category === "missing_quality_check" && parsedInfo.type === "missing_quality_check" || category === "idle_time" && parsedInfo.type === "low_value" || category === "low_value" && parsedInfo.type === "low_value");
|
|
4091
|
-
if (belongsToCategory) {
|
|
4092
|
-
const videoEntry = {
|
|
4093
|
-
uri: s3Uri,
|
|
4094
|
-
category: parsedInfo.type,
|
|
4095
|
-
// Use the parsed type, not the folder name
|
|
4096
|
-
timestamp: parsedInfo.timestamp,
|
|
4097
|
-
videoId: `${workspaceId}-${parsedInfo.timestamp}`,
|
|
4098
|
-
workspaceId,
|
|
4099
|
-
date,
|
|
4100
|
-
shiftId: shiftId.toString()
|
|
4101
|
-
};
|
|
4102
|
-
categoryVideos.push(videoEntry);
|
|
4103
|
-
}
|
|
4104
|
-
}
|
|
4105
|
-
}
|
|
4106
|
-
}
|
|
4107
|
-
continuationToken = response.NextContinuationToken;
|
|
4108
|
-
} while (continuationToken);
|
|
4109
|
-
categoryVideos.sort((a, b) => b.timestamp.localeCompare(a.timestamp));
|
|
4110
|
-
if (categoryVideos.length > 0) {
|
|
4111
|
-
console.log(`[S3ClipsService] Found ${categoryVideos.length} videos for category '${category}' (parsed types: ${[...new Set(categoryVideos.map((v) => v.category))].join(", ")})`);
|
|
4112
|
-
}
|
|
4113
|
-
return { category, count: categoryVideos.length, videos: categoryVideos };
|
|
4114
|
-
} else {
|
|
4077
|
+
if (effectiveBuildIndex) ; else {
|
|
4115
4078
|
const command = new ListObjectsV2Command({
|
|
4116
4079
|
Bucket: this.config.s3Config.bucketName,
|
|
4117
4080
|
Prefix: categoryPrefix,
|
|
@@ -4141,41 +4104,14 @@ var S3ClipsService = class {
|
|
|
4141
4104
|
for (const { category, count, videos } of results) {
|
|
4142
4105
|
counts[category] = count;
|
|
4143
4106
|
counts.total += count;
|
|
4144
|
-
if (
|
|
4145
|
-
if (videos.length > 0) {
|
|
4146
|
-
const parsedType = videos[0].category;
|
|
4147
|
-
videoIndex.byCategory.set(parsedType, videos);
|
|
4148
|
-
console.log(`[S3ClipsService] Indexed ${videos.length} videos under parsed type '${parsedType}'`);
|
|
4149
|
-
if (category !== parsedType) {
|
|
4150
|
-
videoIndex.byCategory.set(category, videos);
|
|
4151
|
-
console.log(`[S3ClipsService] Created alias: S3 folder '${category}' -> parsed type '${parsedType}' (${videos.length} videos)`);
|
|
4152
|
-
}
|
|
4153
|
-
}
|
|
4154
|
-
videoIndex.allVideos.push(...videos);
|
|
4155
|
-
}
|
|
4156
|
-
}
|
|
4157
|
-
if (buildIndex && videoIndex) {
|
|
4158
|
-
videoIndex.allVideos.sort((a, b) => b.timestamp.localeCompare(a.timestamp));
|
|
4159
|
-
videoIndex.counts = { ...counts };
|
|
4107
|
+
if (effectiveBuildIndex && videoIndex && videos) ;
|
|
4160
4108
|
}
|
|
4109
|
+
if (effectiveBuildIndex && videoIndex) ;
|
|
4161
4110
|
const elapsed = performance.now() - startTime;
|
|
4162
|
-
console.log(`[S3ClipsService]
|
|
4163
|
-
if (
|
|
4164
|
-
console.log(`[S3ClipsService] Final video index summary:`);
|
|
4165
|
-
console.log(` - VideoIndex ID: ${videoIndex._debugId}`);
|
|
4166
|
-
console.log(` - Total videos in allVideos: ${videoIndex.allVideos.length}`);
|
|
4167
|
-
console.log(` - Categories in byCategory Map: ${Array.from(videoIndex.byCategory.keys()).join(", ")}`);
|
|
4168
|
-
for (const [cat, vids] of videoIndex.byCategory.entries()) {
|
|
4169
|
-
console.log(` - '${cat}': ${vids.length} videos`);
|
|
4170
|
-
}
|
|
4171
|
-
return { counts, videoIndex };
|
|
4172
|
-
}
|
|
4111
|
+
console.log(`[S3ClipsService] Clip counts completed in ${elapsed.toFixed(2)}ms - Total: ${counts.total}`);
|
|
4112
|
+
if (effectiveBuildIndex && videoIndex) ;
|
|
4173
4113
|
return counts;
|
|
4174
4114
|
} finally {
|
|
4175
|
-
if (buildIndex) {
|
|
4176
|
-
this.isIndexBuilding = false;
|
|
4177
|
-
console.log(`[S3ClipsService] Index building complete - metadata fetching re-enabled`);
|
|
4178
|
-
}
|
|
4179
4115
|
}
|
|
4180
4116
|
}
|
|
4181
4117
|
async getClipCountsCacheFirst(workspaceId, date, shiftId, buildIndex) {
|
|
@@ -4507,6 +4443,75 @@ var S3ClipsService = class {
|
|
|
4507
4443
|
}
|
|
4508
4444
|
return videos;
|
|
4509
4445
|
}
|
|
4446
|
+
/**
|
|
4447
|
+
* Get a page of videos for a specific category using efficient pagination
|
|
4448
|
+
* This method replaces the need for full video indexing
|
|
4449
|
+
* @param workspaceId - Workspace ID
|
|
4450
|
+
* @param date - Date in YYYY-MM-DD format
|
|
4451
|
+
* @param shiftId - Shift ID (0 for day, 1 for night)
|
|
4452
|
+
* @param category - Category to fetch videos from
|
|
4453
|
+
* @param pageSize - Number of videos to fetch per page (default 5)
|
|
4454
|
+
* @param startAfter - Optional key to start after for pagination
|
|
4455
|
+
* @returns Page of videos with continuation token
|
|
4456
|
+
*/
|
|
4457
|
+
async getVideosPage(workspaceId, date, shiftId, category, pageSize = 5, startAfter) {
|
|
4458
|
+
if (!isValidShiftId(shiftId)) {
|
|
4459
|
+
console.error(`[S3ClipsService] getVideosPage - Invalid shift ID: ${shiftId}`);
|
|
4460
|
+
return { videos: [], hasMore: false };
|
|
4461
|
+
}
|
|
4462
|
+
const categoryPrefix = `sop_violations/${workspaceId}/${date}/${shiftId}/${category}/videos/`;
|
|
4463
|
+
const deduplicationKey = `videos-page:${categoryPrefix}:${pageSize}:${startAfter || "first"}`;
|
|
4464
|
+
return this.requestCache.deduplicate(
|
|
4465
|
+
deduplicationKey,
|
|
4466
|
+
async () => {
|
|
4467
|
+
try {
|
|
4468
|
+
console.log(`[S3ClipsService] Fetching page of ${pageSize} videos for category '${category}'`);
|
|
4469
|
+
const command = new ListObjectsV2Command({
|
|
4470
|
+
Bucket: this.config.s3Config.bucketName,
|
|
4471
|
+
Prefix: categoryPrefix,
|
|
4472
|
+
MaxKeys: pageSize * 10,
|
|
4473
|
+
// Fetch extra to account for non-playlist files
|
|
4474
|
+
StartAfter: startAfter
|
|
4475
|
+
});
|
|
4476
|
+
const response = await this.s3Client.send(command);
|
|
4477
|
+
const videos = [];
|
|
4478
|
+
if (response.Contents) {
|
|
4479
|
+
const sopCategories = this.getSOPCategories(workspaceId);
|
|
4480
|
+
for (const obj of response.Contents) {
|
|
4481
|
+
if (videos.length >= pageSize) break;
|
|
4482
|
+
if (obj.Key && obj.Key.endsWith("playlist.m3u8")) {
|
|
4483
|
+
if (obj.Key.includes("missed_qchecks")) continue;
|
|
4484
|
+
const s3Uri = `s3://${this.config.s3Config.bucketName}/${obj.Key}`;
|
|
4485
|
+
const parsedInfo = parseS3Uri(s3Uri, sopCategories);
|
|
4486
|
+
if (parsedInfo) {
|
|
4487
|
+
const cloudfrontUrl = this.s3UriToCloudfront(s3Uri);
|
|
4488
|
+
videos.push({
|
|
4489
|
+
id: `${workspaceId}-${date}-${shiftId}-${category}-${videos.length}`,
|
|
4490
|
+
src: cloudfrontUrl,
|
|
4491
|
+
...parsedInfo,
|
|
4492
|
+
originalUri: s3Uri
|
|
4493
|
+
});
|
|
4494
|
+
}
|
|
4495
|
+
}
|
|
4496
|
+
}
|
|
4497
|
+
const lastKey = response.Contents[response.Contents.length - 1]?.Key;
|
|
4498
|
+
const hasMore = !!response.IsTruncated || response.Contents.length === pageSize * 10;
|
|
4499
|
+
console.log(`[S3ClipsService] Fetched ${videos.length} videos, hasMore: ${hasMore}`);
|
|
4500
|
+
return {
|
|
4501
|
+
videos,
|
|
4502
|
+
nextToken: hasMore ? lastKey : void 0,
|
|
4503
|
+
hasMore
|
|
4504
|
+
};
|
|
4505
|
+
}
|
|
4506
|
+
return { videos: [], hasMore: false };
|
|
4507
|
+
} catch (error) {
|
|
4508
|
+
console.error(`[S3ClipsService] Error fetching videos page:`, error);
|
|
4509
|
+
return { videos: [], hasMore: false };
|
|
4510
|
+
}
|
|
4511
|
+
},
|
|
4512
|
+
"VideosPage"
|
|
4513
|
+
);
|
|
4514
|
+
}
|
|
4510
4515
|
/**
|
|
4511
4516
|
* Cleanup method for proper resource management
|
|
4512
4517
|
*/
|
|
@@ -8435,6 +8440,16 @@ function useTicketHistory(companyId) {
|
|
|
8435
8440
|
throw err;
|
|
8436
8441
|
}
|
|
8437
8442
|
}, [refreshTickets]);
|
|
8443
|
+
const updateTicketServicedStatus = useCallback(async (ticketId, serviced) => {
|
|
8444
|
+
setError(null);
|
|
8445
|
+
try {
|
|
8446
|
+
await TicketHistoryService.updateTicketServicedStatus(ticketId, serviced);
|
|
8447
|
+
await refreshTickets();
|
|
8448
|
+
} catch (err) {
|
|
8449
|
+
setError(err instanceof Error ? err.message : "Failed to update ticket serviced status");
|
|
8450
|
+
throw err;
|
|
8451
|
+
}
|
|
8452
|
+
}, [refreshTickets]);
|
|
8438
8453
|
useEffect(() => {
|
|
8439
8454
|
if (companyId) {
|
|
8440
8455
|
refreshTickets();
|
|
@@ -8446,7 +8461,8 @@ function useTicketHistory(companyId) {
|
|
|
8446
8461
|
error,
|
|
8447
8462
|
createTicket,
|
|
8448
8463
|
refreshTickets,
|
|
8449
|
-
updateTicketStatus
|
|
8464
|
+
updateTicketStatus,
|
|
8465
|
+
updateTicketServicedStatus
|
|
8450
8466
|
};
|
|
8451
8467
|
}
|
|
8452
8468
|
|
|
@@ -11598,7 +11614,8 @@ var usePrefetchClipCounts = ({
|
|
|
11598
11614
|
date,
|
|
11599
11615
|
shift,
|
|
11600
11616
|
enabled = true,
|
|
11601
|
-
buildIndex =
|
|
11617
|
+
buildIndex = false,
|
|
11618
|
+
// Default to false for cost efficiency
|
|
11602
11619
|
subscriberId
|
|
11603
11620
|
}) => {
|
|
11604
11621
|
const dashboardConfig = useDashboardConfig();
|
|
@@ -11686,12 +11703,12 @@ var usePrefetchClipCounts = ({
|
|
|
11686
11703
|
}
|
|
11687
11704
|
},
|
|
11688
11705
|
onRenderReady: (key, newData) => {
|
|
11689
|
-
console.log(`[usePrefetchClipCounts] Render ready with ${Object.values(newData.counts).reduce((sum, count) => sum + count, 0)} total clips`);
|
|
11706
|
+
console.log(`[usePrefetchClipCounts] Render ready with ${Object.values(newData.counts || {}).reduce((sum, count) => sum + count, 0)} total clips`);
|
|
11690
11707
|
setData(newData);
|
|
11691
11708
|
setError(null);
|
|
11692
11709
|
},
|
|
11693
11710
|
onFullyIndexed: (key, newData) => {
|
|
11694
|
-
console.log(`[usePrefetchClipCounts] Fully indexed with ${newData.videoIndex
|
|
11711
|
+
console.log(`[usePrefetchClipCounts] Fully indexed with ${newData.videoIndex?.allVideos?.length || 0} videos`);
|
|
11695
11712
|
setData(newData);
|
|
11696
11713
|
setError(null);
|
|
11697
11714
|
},
|
|
@@ -23284,8 +23301,7 @@ var ISTTimer = memo(() => {
|
|
|
23284
23301
|
return /* @__PURE__ */ jsx(
|
|
23285
23302
|
TimeDisplay2,
|
|
23286
23303
|
{
|
|
23287
|
-
variant: "minimal"
|
|
23288
|
-
className: "text-sm font-medium text-gray-700"
|
|
23304
|
+
variant: "minimal"
|
|
23289
23305
|
}
|
|
23290
23306
|
);
|
|
23291
23307
|
});
|
|
@@ -23317,6 +23333,7 @@ var CardFooter2 = (props) => {
|
|
|
23317
23333
|
};
|
|
23318
23334
|
var TicketHistory = ({ companyId }) => {
|
|
23319
23335
|
const { tickets, loading, error } = useTicketHistory(companyId);
|
|
23336
|
+
const [expandedTickets, setExpandedTickets] = useState(/* @__PURE__ */ new Set());
|
|
23320
23337
|
const getCategoryIcon = (category) => {
|
|
23321
23338
|
switch (category) {
|
|
23322
23339
|
case "general":
|
|
@@ -23373,6 +23390,23 @@ var TicketHistory = ({ companyId }) => {
|
|
|
23373
23390
|
return "text-gray-600 bg-gray-50";
|
|
23374
23391
|
}
|
|
23375
23392
|
};
|
|
23393
|
+
const toggleTicketExpansion = (ticketId) => {
|
|
23394
|
+
setExpandedTickets((prev) => {
|
|
23395
|
+
const newSet = new Set(prev);
|
|
23396
|
+
if (newSet.has(ticketId)) {
|
|
23397
|
+
newSet.delete(ticketId);
|
|
23398
|
+
} else {
|
|
23399
|
+
newSet.add(ticketId);
|
|
23400
|
+
}
|
|
23401
|
+
return newSet;
|
|
23402
|
+
});
|
|
23403
|
+
};
|
|
23404
|
+
const isTicketExpanded = (ticketId) => {
|
|
23405
|
+
return expandedTickets.has(ticketId);
|
|
23406
|
+
};
|
|
23407
|
+
const shouldShowExpandButton = (description) => {
|
|
23408
|
+
return description.length > 100 || description.includes("\n");
|
|
23409
|
+
};
|
|
23376
23410
|
if (loading) {
|
|
23377
23411
|
return /* @__PURE__ */ jsxs(Card2, { className: "h-full", children: [
|
|
23378
23412
|
/* @__PURE__ */ jsx(CardHeader2, { children: /* @__PURE__ */ jsx(CardTitle2, { className: "text-lg font-semibold text-gray-800", children: "History of Tickets" }) }),
|
|
@@ -23413,12 +23447,14 @@ var TicketHistory = ({ companyId }) => {
|
|
|
23413
23447
|
tickets.map((ticket, index) => {
|
|
23414
23448
|
const CategoryIcon = getCategoryIcon(ticket.category);
|
|
23415
23449
|
const StatusIcon = getStatusIcon(ticket.status);
|
|
23450
|
+
const isExpanded = isTicketExpanded(ticket.id);
|
|
23451
|
+
const showExpandButton = shouldShowExpandButton(ticket.description);
|
|
23416
23452
|
return /* @__PURE__ */ jsxs(
|
|
23417
23453
|
motion.div,
|
|
23418
23454
|
{
|
|
23419
23455
|
initial: { opacity: 0, y: 10 },
|
|
23420
23456
|
animate: { opacity: 1, y: 0 },
|
|
23421
|
-
className: `border-b border-gray-100 p-4 hover:bg-gray-50 transition-colors
|
|
23457
|
+
className: `border-b border-gray-100 p-4 hover:bg-gray-50 transition-colors ${index === 0 ? "border-t-0" : ""}`,
|
|
23422
23458
|
children: [
|
|
23423
23459
|
/* @__PURE__ */ jsx("div", { className: "flex items-start justify-between mb-2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
23424
23460
|
/* @__PURE__ */ jsx("div", { className: "p-1 bg-gray-100 rounded", children: /* @__PURE__ */ jsx(CategoryIcon, { className: "h-3 w-3 text-gray-600" }) }),
|
|
@@ -23429,9 +23465,42 @@ var TicketHistory = ({ companyId }) => {
|
|
|
23429
23465
|
/* @__PURE__ */ jsx(StatusIcon, { className: "h-2.5 w-2.5 mr-1" }),
|
|
23430
23466
|
ticket.status === "submitted" ? "New" : ticket.status.replace("_", " ")
|
|
23431
23467
|
] }),
|
|
23432
|
-
/* @__PURE__ */ jsx("span", { className: `inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${getPriorityColor(ticket.priority)}`, children: ticket.priority === "normal" ? "Standard" : ticket.priority })
|
|
23468
|
+
/* @__PURE__ */ jsx("span", { className: `inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${getPriorityColor(ticket.priority)}`, children: ticket.priority === "normal" ? "Standard" : ticket.priority }),
|
|
23469
|
+
ticket.serviced && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center px-2 py-1 rounded-full text-xs font-medium text-green-700 bg-green-100 border border-green-200", children: [
|
|
23470
|
+
/* @__PURE__ */ jsx(CheckIcon, { className: "h-2.5 w-2.5 mr-1" }),
|
|
23471
|
+
"Serviced"
|
|
23472
|
+
] })
|
|
23473
|
+
] }),
|
|
23474
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
23475
|
+
/* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
|
|
23476
|
+
motion.div,
|
|
23477
|
+
{
|
|
23478
|
+
initial: { opacity: 0 },
|
|
23479
|
+
animate: { opacity: 1 },
|
|
23480
|
+
exit: { opacity: 0 },
|
|
23481
|
+
transition: { duration: 0.2 },
|
|
23482
|
+
children: /* @__PURE__ */ jsx("p", { className: `text-xs text-gray-600 leading-relaxed whitespace-pre-wrap ${!isExpanded && showExpandButton ? "line-clamp-2" : ""}`, children: ticket.description })
|
|
23483
|
+
},
|
|
23484
|
+
isExpanded ? "expanded" : "collapsed"
|
|
23485
|
+
) }),
|
|
23486
|
+
showExpandButton && /* @__PURE__ */ jsx(
|
|
23487
|
+
"button",
|
|
23488
|
+
{
|
|
23489
|
+
onClick: (e) => {
|
|
23490
|
+
e.stopPropagation();
|
|
23491
|
+
toggleTicketExpansion(ticket.id);
|
|
23492
|
+
},
|
|
23493
|
+
className: "mt-2 flex items-center gap-1 text-xs text-blue-600 hover:text-blue-700 font-medium transition-colors",
|
|
23494
|
+
children: isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23495
|
+
/* @__PURE__ */ jsx(ChevronUpIcon, { className: "h-3 w-3" }),
|
|
23496
|
+
"Show less"
|
|
23497
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23498
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-3 w-3" }),
|
|
23499
|
+
"Show more"
|
|
23500
|
+
] })
|
|
23501
|
+
}
|
|
23502
|
+
)
|
|
23433
23503
|
] }),
|
|
23434
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-gray-600 mb-3 line-clamp-2 leading-relaxed", children: ticket.description }),
|
|
23435
23504
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-xs", children: [
|
|
23436
23505
|
/* @__PURE__ */ jsx("span", { className: "text-gray-500 capitalize font-medium", children: ticket.category }),
|
|
23437
23506
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-gray-500", children: [
|
|
@@ -26204,6 +26273,127 @@ var VideoPlayer = React19__default.forwardRef(({
|
|
|
26204
26273
|
] });
|
|
26205
26274
|
});
|
|
26206
26275
|
VideoPlayer.displayName = "VideoPlayer";
|
|
26276
|
+
var BackButton = ({
|
|
26277
|
+
onClick,
|
|
26278
|
+
text = "Back",
|
|
26279
|
+
className,
|
|
26280
|
+
size = "default",
|
|
26281
|
+
disabled = false,
|
|
26282
|
+
"aria-label": ariaLabel
|
|
26283
|
+
}) => {
|
|
26284
|
+
const sizeClasses = {
|
|
26285
|
+
sm: {
|
|
26286
|
+
container: "gap-1 px-2 py-1.5",
|
|
26287
|
+
icon: "w-3.5 h-3.5",
|
|
26288
|
+
text: "text-xs"
|
|
26289
|
+
},
|
|
26290
|
+
default: {
|
|
26291
|
+
container: "gap-2 px-3 py-2",
|
|
26292
|
+
icon: "w-4 h-4",
|
|
26293
|
+
text: "text-sm"
|
|
26294
|
+
},
|
|
26295
|
+
lg: {
|
|
26296
|
+
container: "gap-2 px-4 py-2.5",
|
|
26297
|
+
icon: "w-5 h-5",
|
|
26298
|
+
text: "text-base"
|
|
26299
|
+
}
|
|
26300
|
+
};
|
|
26301
|
+
const currentSize = sizeClasses[size];
|
|
26302
|
+
return /* @__PURE__ */ jsxs(
|
|
26303
|
+
"button",
|
|
26304
|
+
{
|
|
26305
|
+
onClick,
|
|
26306
|
+
disabled,
|
|
26307
|
+
"aria-label": ariaLabel || `${text} button`,
|
|
26308
|
+
className: cn(
|
|
26309
|
+
// Base styles
|
|
26310
|
+
"flex items-center font-medium rounded-lg transition-all duration-200",
|
|
26311
|
+
// Size-specific styles
|
|
26312
|
+
currentSize.container,
|
|
26313
|
+
// Color and interaction styles
|
|
26314
|
+
disabled ? "text-gray-400 cursor-not-allowed" : "text-gray-600 hover:text-gray-900 hover:bg-gray-50 active:bg-gray-100",
|
|
26315
|
+
// Focus styles for accessibility
|
|
26316
|
+
"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
|
|
26317
|
+
className
|
|
26318
|
+
),
|
|
26319
|
+
children: [
|
|
26320
|
+
/* @__PURE__ */ jsx(
|
|
26321
|
+
ArrowLeft,
|
|
26322
|
+
{
|
|
26323
|
+
className: cn(
|
|
26324
|
+
"flex-shrink-0",
|
|
26325
|
+
currentSize.icon,
|
|
26326
|
+
disabled && "opacity-50"
|
|
26327
|
+
)
|
|
26328
|
+
}
|
|
26329
|
+
),
|
|
26330
|
+
/* @__PURE__ */ jsx("span", { className: cn(
|
|
26331
|
+
"font-medium select-none",
|
|
26332
|
+
currentSize.text,
|
|
26333
|
+
disabled && "opacity-50"
|
|
26334
|
+
), children: text })
|
|
26335
|
+
]
|
|
26336
|
+
}
|
|
26337
|
+
);
|
|
26338
|
+
};
|
|
26339
|
+
var BackButtonMinimal = ({
|
|
26340
|
+
onClick,
|
|
26341
|
+
text = "Back",
|
|
26342
|
+
className,
|
|
26343
|
+
size = "default",
|
|
26344
|
+
disabled = false,
|
|
26345
|
+
"aria-label": ariaLabel
|
|
26346
|
+
}) => {
|
|
26347
|
+
const sizeClasses = {
|
|
26348
|
+
sm: {
|
|
26349
|
+
icon: "w-3.5 h-3.5",
|
|
26350
|
+
text: "text-xs ml-1"
|
|
26351
|
+
},
|
|
26352
|
+
default: {
|
|
26353
|
+
icon: "w-4 h-4",
|
|
26354
|
+
text: "text-sm ml-2"
|
|
26355
|
+
},
|
|
26356
|
+
lg: {
|
|
26357
|
+
icon: "w-5 h-5",
|
|
26358
|
+
text: "text-base ml-2"
|
|
26359
|
+
}
|
|
26360
|
+
};
|
|
26361
|
+
const currentSize = sizeClasses[size];
|
|
26362
|
+
return /* @__PURE__ */ jsxs(
|
|
26363
|
+
"button",
|
|
26364
|
+
{
|
|
26365
|
+
onClick,
|
|
26366
|
+
disabled,
|
|
26367
|
+
"aria-label": ariaLabel || `${text} button`,
|
|
26368
|
+
className: cn(
|
|
26369
|
+
// Base styles - minimal padding for tight spaces
|
|
26370
|
+
"flex items-center transition-colors duration-200",
|
|
26371
|
+
// Color and interaction styles
|
|
26372
|
+
disabled ? "text-gray-400 cursor-not-allowed" : "text-gray-600 hover:text-gray-900",
|
|
26373
|
+
// Focus styles for accessibility
|
|
26374
|
+
"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded",
|
|
26375
|
+
className
|
|
26376
|
+
),
|
|
26377
|
+
children: [
|
|
26378
|
+
/* @__PURE__ */ jsx(
|
|
26379
|
+
ArrowLeft,
|
|
26380
|
+
{
|
|
26381
|
+
className: cn(
|
|
26382
|
+
"flex-shrink-0",
|
|
26383
|
+
currentSize.icon,
|
|
26384
|
+
disabled && "opacity-50"
|
|
26385
|
+
)
|
|
26386
|
+
}
|
|
26387
|
+
),
|
|
26388
|
+
/* @__PURE__ */ jsx("span", { className: cn(
|
|
26389
|
+
"font-medium select-none",
|
|
26390
|
+
currentSize.text,
|
|
26391
|
+
disabled && "opacity-50"
|
|
26392
|
+
), children: text })
|
|
26393
|
+
]
|
|
26394
|
+
}
|
|
26395
|
+
);
|
|
26396
|
+
};
|
|
26207
26397
|
var BottlenecksContent = ({
|
|
26208
26398
|
workspaceId,
|
|
26209
26399
|
workspaceName,
|
|
@@ -26223,7 +26413,6 @@ var BottlenecksContent = ({
|
|
|
26223
26413
|
const videoRef = useRef(null);
|
|
26224
26414
|
const timestampFilterRef = useRef(null);
|
|
26225
26415
|
const initialFilter = sopCategories && sopCategories.length > 0 ? sopCategories[0].id : "low_value";
|
|
26226
|
-
const videoIndexRef = useRef(null);
|
|
26227
26416
|
const currentIndexRef = useRef(0);
|
|
26228
26417
|
const activeFilterRef = useRef(initialFilter);
|
|
26229
26418
|
const isMountedRef = useRef(true);
|
|
@@ -26241,15 +26430,6 @@ var BottlenecksContent = ({
|
|
|
26241
26430
|
const [isNavigating, setIsNavigating] = useState(false);
|
|
26242
26431
|
const [error, setError] = useState(null);
|
|
26243
26432
|
const [clipCounts, setClipCounts] = useState({});
|
|
26244
|
-
const [videoIndex, setVideoIndex] = useState(null);
|
|
26245
|
-
const updateVideoIndex = useCallback((newIndex) => {
|
|
26246
|
-
console.log(`[BottlenecksContent] Updating video index - ID: ${newIndex?._debugId || "NO_ID"}, total videos: ${newIndex?.allVideos.length || 0}, categories: ${newIndex?.byCategory.size || 0}`);
|
|
26247
|
-
if (newIndex) {
|
|
26248
|
-
console.log(`[BottlenecksContent] VideoIndex categories: [${Array.from(newIndex.byCategory.keys()).join(", ")}]`);
|
|
26249
|
-
}
|
|
26250
|
-
setVideoIndex(newIndex);
|
|
26251
|
-
videoIndexRef.current = newIndex;
|
|
26252
|
-
}, []);
|
|
26253
26433
|
const updateActiveFilter = useCallback((newFilter) => {
|
|
26254
26434
|
console.log(`[BottlenecksContent] Updating active filter: ${activeFilterRef.current} -> ${newFilter}`);
|
|
26255
26435
|
setActiveFilter(newFilter);
|
|
@@ -26310,7 +26490,8 @@ var BottlenecksContent = ({
|
|
|
26310
26490
|
date: date || getOperationalDate(),
|
|
26311
26491
|
shift: effectiveShift,
|
|
26312
26492
|
enabled: !!workspaceId && !!s3ClipsService,
|
|
26313
|
-
buildIndex:
|
|
26493
|
+
buildIndex: false
|
|
26494
|
+
// Disabled to reduce S3 costs - use pagination instead
|
|
26314
26495
|
});
|
|
26315
26496
|
const fetchClipCounts = useCallback(async () => {
|
|
26316
26497
|
if (!workspaceId || !s3ClipsService || !dashboardConfig?.s3Config || !isMountedRef.current) return;
|
|
@@ -26329,7 +26510,6 @@ var BottlenecksContent = ({
|
|
|
26329
26510
|
if (cachedResult) {
|
|
26330
26511
|
console.log(`[BottlenecksContent] Using cached clip counts`);
|
|
26331
26512
|
updateClipCounts(cachedResult.counts);
|
|
26332
|
-
updateVideoIndex(cachedResult.videoIndex);
|
|
26333
26513
|
setIsLoading(false);
|
|
26334
26514
|
setHasInitialLoad(true);
|
|
26335
26515
|
return;
|
|
@@ -26338,19 +26518,13 @@ var BottlenecksContent = ({
|
|
|
26338
26518
|
const fullResult = await s3ClipsService.getClipCounts(
|
|
26339
26519
|
workspaceId,
|
|
26340
26520
|
operationalDate,
|
|
26341
|
-
shiftStr
|
|
26342
|
-
|
|
26343
|
-
// Build index
|
|
26521
|
+
shiftStr
|
|
26522
|
+
// Don't build index - use pagination for cost efficiency
|
|
26344
26523
|
);
|
|
26345
|
-
if (fullResult
|
|
26346
|
-
updateClipCounts(fullResult.counts);
|
|
26347
|
-
updateVideoIndex(fullResult.videoIndex);
|
|
26348
|
-
await smartVideoCache.setClipCounts(cacheKey, fullResult, 5);
|
|
26349
|
-
console.log(`[BottlenecksContent] Fetched and cached clip counts with ${fullResult.videoIndex.allVideos.length} videos`);
|
|
26350
|
-
} else if (fullResult) {
|
|
26524
|
+
if (fullResult) {
|
|
26351
26525
|
const counts = fullResult;
|
|
26352
26526
|
updateClipCounts(counts);
|
|
26353
|
-
console.log(`[BottlenecksContent] Fetched clip counts
|
|
26527
|
+
console.log(`[BottlenecksContent] Fetched and cached clip counts`);
|
|
26354
26528
|
}
|
|
26355
26529
|
setIsLoading(false);
|
|
26356
26530
|
setHasInitialLoad(true);
|
|
@@ -26363,7 +26537,7 @@ var BottlenecksContent = ({
|
|
|
26363
26537
|
} finally {
|
|
26364
26538
|
fetchInProgressRef.current.delete(operationKey);
|
|
26365
26539
|
}
|
|
26366
|
-
}, [workspaceId, date, s3ClipsService, effectiveShift, dashboardConfig, updateClipCounts
|
|
26540
|
+
}, [workspaceId, date, s3ClipsService, effectiveShift, dashboardConfig, updateClipCounts]);
|
|
26367
26541
|
const loadingCategoryRef = useRef(null);
|
|
26368
26542
|
const videoRetryCountRef = useRef(0);
|
|
26369
26543
|
const loadingVideosRef = useRef(/* @__PURE__ */ new Set());
|
|
@@ -26371,7 +26545,6 @@ var BottlenecksContent = ({
|
|
|
26371
26545
|
const ensureVideosLoaded = useCallback(async (centerIndex) => {
|
|
26372
26546
|
if (!s3ClipsService || !workspaceId || !isMountedRef.current) return;
|
|
26373
26547
|
const currentFilter = activeFilterRef.current;
|
|
26374
|
-
const currentVideoIndex = videoIndexRef.current;
|
|
26375
26548
|
let effectiveFilter = currentFilter;
|
|
26376
26549
|
if (sopCategories && sopCategories.length > 0) {
|
|
26377
26550
|
const category = sopCategories.find((cat) => cat.id === currentFilter);
|
|
@@ -26398,17 +26571,6 @@ var BottlenecksContent = ({
|
|
|
26398
26571
|
const loadPromises = indicesToLoad.map(async (index) => {
|
|
26399
26572
|
try {
|
|
26400
26573
|
let video = null;
|
|
26401
|
-
if (currentVideoIndex && currentVideoIndex.byCategory && currentVideoIndex.allVideos.length > 0) {
|
|
26402
|
-
video = await s3ClipsService.getVideoFromIndex(
|
|
26403
|
-
currentVideoIndex,
|
|
26404
|
-
effectiveFilter,
|
|
26405
|
-
index,
|
|
26406
|
-
true,
|
|
26407
|
-
// includeCycleTime - OK for preloading
|
|
26408
|
-
false
|
|
26409
|
-
// includeMetadata - NO metadata during bulk preloading to prevent flooding
|
|
26410
|
-
);
|
|
26411
|
-
}
|
|
26412
26574
|
if (!video) {
|
|
26413
26575
|
const operationalDate = date || getOperationalDate();
|
|
26414
26576
|
const shiftStr = effectiveShift;
|
|
@@ -26461,12 +26623,11 @@ var BottlenecksContent = ({
|
|
|
26461
26623
|
try {
|
|
26462
26624
|
const operationalDate = date || getOperationalDate();
|
|
26463
26625
|
const shiftStr = effectiveShift;
|
|
26464
|
-
if (!clipCounts[targetCategory]
|
|
26626
|
+
if (!clipCounts[targetCategory]) {
|
|
26465
26627
|
const cacheKey = `clip-counts:${workspaceId}:${operationalDate}:${shiftStr}`;
|
|
26466
26628
|
const cachedResult = await smartVideoCache.getClipCounts(cacheKey);
|
|
26467
26629
|
if (cachedResult && cachedResult.counts[targetCategory] > 0) {
|
|
26468
26630
|
updateClipCounts(cachedResult.counts);
|
|
26469
|
-
updateVideoIndex(cachedResult.videoIndex);
|
|
26470
26631
|
setHasInitialLoad(true);
|
|
26471
26632
|
console.log(`[BottlenecksContent] Used cached data for loadFirstVideoForCategory - ${targetCategory}`);
|
|
26472
26633
|
}
|
|
@@ -26498,11 +26659,14 @@ var BottlenecksContent = ({
|
|
|
26498
26659
|
} catch (directError) {
|
|
26499
26660
|
console.warn(`[BottlenecksContent] Direct S3 loading failed, trying video index:`, directError);
|
|
26500
26661
|
}
|
|
26501
|
-
|
|
26502
|
-
if (clipCounts[targetCategory] > 0 && currentVideoIndex && currentVideoIndex.allVideos.length > 0) {
|
|
26662
|
+
if (clipCounts[targetCategory] > 0) {
|
|
26503
26663
|
try {
|
|
26504
|
-
const
|
|
26505
|
-
|
|
26664
|
+
const operationalDate2 = date || getOperationalDate();
|
|
26665
|
+
const shiftStr2 = effectiveShift;
|
|
26666
|
+
const firstVideo = await s3ClipsService.getClipByIndex(
|
|
26667
|
+
workspaceId,
|
|
26668
|
+
operationalDate2,
|
|
26669
|
+
shiftStr2,
|
|
26506
26670
|
targetCategory,
|
|
26507
26671
|
0,
|
|
26508
26672
|
// First video (index 0)
|
|
@@ -26542,25 +26706,22 @@ var BottlenecksContent = ({
|
|
|
26542
26706
|
loadingCategoryRef.current = null;
|
|
26543
26707
|
fetchInProgressRef.current.delete(operationKey);
|
|
26544
26708
|
}
|
|
26545
|
-
}, [workspaceId, date, s3ClipsService, clipCounts,
|
|
26709
|
+
}, [workspaceId, date, s3ClipsService, clipCounts, effectiveShift, updateClipCounts]);
|
|
26546
26710
|
useEffect(() => {
|
|
26547
26711
|
if (s3ClipsService && !prefetchData) {
|
|
26548
26712
|
fetchClipCounts();
|
|
26549
26713
|
}
|
|
26550
|
-
}, [workspaceId, date, effectiveShift, s3ClipsService, fetchClipCounts, updateClipCounts,
|
|
26714
|
+
}, [workspaceId, date, effectiveShift, s3ClipsService, fetchClipCounts, updateClipCounts, prefetchData]);
|
|
26551
26715
|
useEffect(() => {
|
|
26552
|
-
if (prefetchData) {
|
|
26553
|
-
console.log(`[BottlenecksContent] Received prefetch update - status: ${prefetchStatus}
|
|
26716
|
+
if (prefetchData && prefetchData.counts) {
|
|
26717
|
+
console.log(`[BottlenecksContent] Received prefetch update - status: ${prefetchStatus}`);
|
|
26554
26718
|
updateClipCounts(prefetchData.counts);
|
|
26555
|
-
if (
|
|
26556
|
-
updateVideoIndex(prefetchData.videoIndex);
|
|
26557
|
-
}
|
|
26558
|
-
if (!hasInitialLoad && prefetchData.videoIndex.allVideos.length > 0) {
|
|
26719
|
+
if (!hasInitialLoad) {
|
|
26559
26720
|
setIsLoading(false);
|
|
26560
26721
|
setHasInitialLoad(true);
|
|
26561
26722
|
}
|
|
26562
26723
|
}
|
|
26563
|
-
}, [prefetchData, prefetchStatus, updateClipCounts,
|
|
26724
|
+
}, [prefetchData, prefetchStatus, updateClipCounts, hasInitialLoad]);
|
|
26564
26725
|
useEffect(() => {
|
|
26565
26726
|
if (s3ClipsService && clipCounts[activeFilter] > 0) {
|
|
26566
26727
|
const hasVideosForCurrentFilter = allVideos.some((video) => {
|
|
@@ -26600,7 +26761,7 @@ var BottlenecksContent = ({
|
|
|
26600
26761
|
setIsCategoryLoading(false);
|
|
26601
26762
|
}
|
|
26602
26763
|
}
|
|
26603
|
-
}, [activeFilter, s3ClipsService,
|
|
26764
|
+
}, [activeFilter, s3ClipsService, clipCounts, loadFirstVideoForCategory, allVideos, sopCategories]);
|
|
26604
26765
|
useEffect(() => {
|
|
26605
26766
|
if (previousFilterRef.current !== activeFilter) {
|
|
26606
26767
|
console.log(`Filter changed from ${previousFilterRef.current} to ${activeFilter} - resetting to first video`);
|
|
@@ -26716,23 +26877,7 @@ var BottlenecksContent = ({
|
|
|
26716
26877
|
}
|
|
26717
26878
|
try {
|
|
26718
26879
|
let video = null;
|
|
26719
|
-
|
|
26720
|
-
if (currentVideoIndex && currentVideoIndex.byCategory && currentVideoIndex.allVideos.length > 0 && s3ClipsService) {
|
|
26721
|
-
console.log(`[BottlenecksContent] Using video index for navigation - ID: ${currentVideoIndex._debugId || "NO_ID"}, total categories: ${currentVideoIndex.byCategory.size}, total videos: ${currentVideoIndex.allVideos.length}, filter: ${currentFilter}`);
|
|
26722
|
-
console.log(`[BottlenecksContent] VideoIndex categories in handleNext: [${Array.from(currentVideoIndex.byCategory.keys()).join(", ")}]`);
|
|
26723
|
-
video = await s3ClipsService.getVideoFromIndex(
|
|
26724
|
-
currentVideoIndex,
|
|
26725
|
-
effectiveFilter,
|
|
26726
|
-
nextIndex,
|
|
26727
|
-
true,
|
|
26728
|
-
// includeCycleTime
|
|
26729
|
-
false
|
|
26730
|
-
// includeMetadata - DON'T fetch metadata during navigation to prevent flooding!
|
|
26731
|
-
);
|
|
26732
|
-
} else {
|
|
26733
|
-
console.warn(`[BottlenecksContent] Video index not ready for navigation: ID: ${currentVideoIndex?._debugId || "NO_ID"}, byCategory exists = ${!!currentVideoIndex?.byCategory}, allVideos = ${currentVideoIndex?.allVideos?.length || 0}`);
|
|
26734
|
-
}
|
|
26735
|
-
if (!video && s3ClipsService) {
|
|
26880
|
+
if (s3ClipsService) {
|
|
26736
26881
|
const operationalDate = date || getOperationalDate();
|
|
26737
26882
|
const shiftStr = effectiveShift;
|
|
26738
26883
|
video = await s3ClipsService.getClipByIndex(
|
|
@@ -30790,16 +30935,13 @@ var AIAgentView = () => {
|
|
|
30790
30935
|
} }),
|
|
30791
30936
|
/* @__PURE__ */ jsxs("div", { className: `flex-1 flex flex-col h-screen transition-all duration-300 ${isSidebarOpen ? "mr-80" : "mr-0"}`, children: [
|
|
30792
30937
|
/* @__PURE__ */ jsx("header", { className: "flex-shrink-0 bg-white px-8 py-6 shadow-sm border-b border-gray-200/80 sticky top-0 z-10", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between relative", children: [
|
|
30793
|
-
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */
|
|
30794
|
-
|
|
30938
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
|
|
30939
|
+
BackButtonMinimal,
|
|
30795
30940
|
{
|
|
30796
30941
|
onClick: () => navigate("/"),
|
|
30797
|
-
|
|
30798
|
-
|
|
30799
|
-
|
|
30800
|
-
/* @__PURE__ */ jsx(ArrowLeft, { className: "h-5 w-5" }),
|
|
30801
|
-
/* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
|
|
30802
|
-
]
|
|
30942
|
+
text: "Back",
|
|
30943
|
+
size: "default",
|
|
30944
|
+
"aria-label": "Navigate back to dashboard"
|
|
30803
30945
|
}
|
|
30804
30946
|
) }),
|
|
30805
30947
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto", children: [
|
|
@@ -31468,15 +31610,13 @@ var HelpView = ({
|
|
|
31468
31610
|
transition: { duration: 0.3 },
|
|
31469
31611
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
31470
31612
|
/* @__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: [
|
|
31471
|
-
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */
|
|
31472
|
-
|
|
31613
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
|
|
31614
|
+
BackButtonMinimal,
|
|
31473
31615
|
{
|
|
31474
31616
|
onClick: handleBackClick,
|
|
31475
|
-
|
|
31476
|
-
|
|
31477
|
-
|
|
31478
|
-
/* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
|
|
31479
|
-
]
|
|
31617
|
+
text: "Back",
|
|
31618
|
+
size: "default",
|
|
31619
|
+
"aria-label": "Navigate back to dashboard"
|
|
31480
31620
|
}
|
|
31481
31621
|
) }),
|
|
31482
31622
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto", children: [
|
|
@@ -31506,10 +31646,7 @@ var HelpView = ({
|
|
|
31506
31646
|
/* @__PURE__ */ jsx("div", { className: "xl:col-span-3 order-1", children: /* @__PURE__ */ jsxs(Card2, { className: "shadow-lg border-gray-200 bg-white", children: [
|
|
31507
31647
|
/* @__PURE__ */ jsx(CardHeader2, { className: "bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-100 p-4 sm:p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
|
|
31508
31648
|
/* @__PURE__ */ jsx("div", { className: "p-1.5 sm:p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ jsx(DocumentTextIcon, { className: "h-4 w-4 sm:h-5 sm:w-5 text-blue-600" }) }),
|
|
31509
|
-
/* @__PURE__ */
|
|
31510
|
-
/* @__PURE__ */ jsx(CardTitle2, { className: "text-lg sm:text-xl font-bold text-gray-900", children: "Submit Support Request" }),
|
|
31511
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs sm:text-sm text-gray-600 mt-1", children: "Direct line to our engineering team \u2022 Avg. response time: <30 minutes" })
|
|
31512
|
-
] })
|
|
31649
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CardTitle2, { className: "text-lg sm:text-xl font-bold text-gray-900", children: "Submit Support Request" }) })
|
|
31513
31650
|
] }) }),
|
|
31514
31651
|
/* @__PURE__ */ jsx(CardContent2, { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "space-y-4 sm:space-y-5", children: [
|
|
31515
31652
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4 sm:space-y-5", children: [
|
|
@@ -32603,17 +32740,15 @@ var KPIDetailView = ({
|
|
|
32603
32740
|
return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
|
|
32604
32741
|
/* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "px-4 py-3", children: [
|
|
32605
32742
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
|
|
32606
|
-
/* @__PURE__ */
|
|
32607
|
-
|
|
32743
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
|
|
32744
|
+
BackButtonMinimal,
|
|
32608
32745
|
{
|
|
32609
32746
|
onClick: handleBackClick,
|
|
32610
|
-
|
|
32611
|
-
|
|
32612
|
-
|
|
32613
|
-
/* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
|
|
32614
|
-
]
|
|
32747
|
+
text: "Back",
|
|
32748
|
+
size: "default",
|
|
32749
|
+
"aria-label": "Navigate back to previous page"
|
|
32615
32750
|
}
|
|
32616
|
-
),
|
|
32751
|
+
) }),
|
|
32617
32752
|
/* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
32618
32753
|
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: lineInfo?.line_name || "Line" }),
|
|
32619
32754
|
/* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
|
|
@@ -32975,17 +33110,15 @@ var KPIsOverviewView = ({
|
|
|
32975
33110
|
if (error) {
|
|
32976
33111
|
return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
|
|
32977
33112
|
/* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
|
|
32978
|
-
/* @__PURE__ */
|
|
32979
|
-
|
|
33113
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
|
|
33114
|
+
BackButtonMinimal,
|
|
32980
33115
|
{
|
|
32981
33116
|
onClick: handleBackClick,
|
|
32982
|
-
|
|
32983
|
-
|
|
32984
|
-
|
|
32985
|
-
/* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
|
|
32986
|
-
]
|
|
33117
|
+
text: "Back",
|
|
33118
|
+
size: "default",
|
|
33119
|
+
"aria-label": "Navigate back to previous page"
|
|
32987
33120
|
}
|
|
32988
|
-
),
|
|
33121
|
+
) }),
|
|
32989
33122
|
/* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
32990
33123
|
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
|
|
32991
33124
|
/* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
|
|
@@ -32997,17 +33130,15 @@ var KPIsOverviewView = ({
|
|
|
32997
33130
|
if (lines.length === 0) {
|
|
32998
33131
|
return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
|
|
32999
33132
|
/* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
|
|
33000
|
-
/* @__PURE__ */
|
|
33001
|
-
|
|
33133
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
|
|
33134
|
+
BackButtonMinimal,
|
|
33002
33135
|
{
|
|
33003
33136
|
onClick: handleBackClick,
|
|
33004
|
-
|
|
33005
|
-
|
|
33006
|
-
|
|
33007
|
-
/* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
|
|
33008
|
-
]
|
|
33137
|
+
text: "Back",
|
|
33138
|
+
size: "default",
|
|
33139
|
+
"aria-label": "Navigate back to previous page"
|
|
33009
33140
|
}
|
|
33010
|
-
),
|
|
33141
|
+
) }),
|
|
33011
33142
|
/* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
33012
33143
|
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
|
|
33013
33144
|
/* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
|
|
@@ -33022,17 +33153,15 @@ var KPIsOverviewView = ({
|
|
|
33022
33153
|
return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
|
|
33023
33154
|
/* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "px-4 py-3", children: [
|
|
33024
33155
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
|
|
33025
|
-
/* @__PURE__ */
|
|
33026
|
-
|
|
33156
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
|
|
33157
|
+
BackButtonMinimal,
|
|
33027
33158
|
{
|
|
33028
33159
|
onClick: handleBackClick,
|
|
33029
|
-
|
|
33030
|
-
|
|
33031
|
-
|
|
33032
|
-
/* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
|
|
33033
|
-
]
|
|
33160
|
+
text: "Back",
|
|
33161
|
+
size: "default",
|
|
33162
|
+
"aria-label": "Navigate back to previous page"
|
|
33034
33163
|
}
|
|
33035
|
-
),
|
|
33164
|
+
) }),
|
|
33036
33165
|
/* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
33037
33166
|
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
|
|
33038
33167
|
/* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
|
|
@@ -33316,18 +33445,13 @@ var LeaderboardDetailView = memo(({
|
|
|
33316
33445
|
return /* @__PURE__ */ jsxs("div", { className: `min-h-screen bg-slate-50 flex flex-col ${className}`, children: [
|
|
33317
33446
|
/* @__PURE__ */ jsx("div", { className: "sticky top-0 z-20 bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxs("div", { className: "px-3 sm:px-8 py-2 sm:py-2.5", children: [
|
|
33318
33447
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
33319
|
-
/* @__PURE__ */ jsx("div", { className: "w-auto sm:w-32", children: /* @__PURE__ */
|
|
33320
|
-
|
|
33448
|
+
/* @__PURE__ */ jsx("div", { className: "w-auto sm:w-32", children: /* @__PURE__ */ jsx(
|
|
33449
|
+
BackButtonMinimal,
|
|
33321
33450
|
{
|
|
33322
33451
|
onClick: handleBackClick,
|
|
33323
|
-
|
|
33324
|
-
|
|
33325
|
-
|
|
33326
|
-
/* @__PURE__ */ jsx("path", { d: "M19 12H5" }),
|
|
33327
|
-
/* @__PURE__ */ jsx("polyline", { points: "12 19 5 12 12 5" })
|
|
33328
|
-
] }),
|
|
33329
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm font-medium", children: "Back" })
|
|
33330
|
-
]
|
|
33452
|
+
text: "Back",
|
|
33453
|
+
size: "default",
|
|
33454
|
+
"aria-label": "Navigate back to previous page"
|
|
33331
33455
|
}
|
|
33332
33456
|
) }),
|
|
33333
33457
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
|
|
@@ -34388,18 +34512,15 @@ var ShiftsView = ({
|
|
|
34388
34512
|
}, [lineConfigs, supabase, showToast]);
|
|
34389
34513
|
return /* @__PURE__ */ jsxs("div", { className: `min-h-screen bg-slate-50 ${className}`, children: [
|
|
34390
34514
|
/* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsx("div", { className: "px-4 sm:px-8 py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
|
|
34391
|
-
/* @__PURE__ */
|
|
34392
|
-
|
|
34515
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
|
|
34516
|
+
BackButtonMinimal,
|
|
34393
34517
|
{
|
|
34394
34518
|
onClick: () => onBackClick ? onBackClick() : window.history.back(),
|
|
34395
|
-
|
|
34396
|
-
|
|
34397
|
-
|
|
34398
|
-
/* @__PURE__ */ jsx(ArrowLeft, { className: "w-5 h-5" }),
|
|
34399
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: "Back" })
|
|
34400
|
-
]
|
|
34519
|
+
text: "Back",
|
|
34520
|
+
size: "default",
|
|
34521
|
+
"aria-label": "Navigate back to previous page"
|
|
34401
34522
|
}
|
|
34402
|
-
),
|
|
34523
|
+
) }),
|
|
34403
34524
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col items-center", children: [
|
|
34404
34525
|
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shift Management" }),
|
|
34405
34526
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 mt-1", children: "Configure day and night shift timings and breaks for each production line" })
|
|
@@ -35308,15 +35429,13 @@ var TargetsViewUI = ({
|
|
|
35308
35429
|
}
|
|
35309
35430
|
return /* @__PURE__ */ jsxs("main", { className: "min-h-screen flex-1 bg-gray-50", children: [
|
|
35310
35431
|
/* @__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: [
|
|
35311
|
-
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */
|
|
35312
|
-
|
|
35432
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
|
|
35433
|
+
BackButtonMinimal,
|
|
35313
35434
|
{
|
|
35314
35435
|
onClick: onBack,
|
|
35315
|
-
|
|
35316
|
-
|
|
35317
|
-
|
|
35318
|
-
/* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
|
|
35319
|
-
]
|
|
35436
|
+
text: "Back",
|
|
35437
|
+
size: "default",
|
|
35438
|
+
"aria-label": "Navigate back to previous page"
|
|
35320
35439
|
}
|
|
35321
35440
|
) }),
|
|
35322
35441
|
/* @__PURE__ */ jsx("div", { className: "absolute right-0", children: /* @__PURE__ */ jsxs(
|
|
@@ -36633,15 +36752,13 @@ var WorkspaceDetailView = ({
|
|
|
36633
36752
|
"Error: ",
|
|
36634
36753
|
error.message
|
|
36635
36754
|
] }),
|
|
36636
|
-
/* @__PURE__ */
|
|
36637
|
-
|
|
36755
|
+
/* @__PURE__ */ jsx(
|
|
36756
|
+
BackButton,
|
|
36638
36757
|
{
|
|
36639
36758
|
onClick: () => onNavigate && onNavigate("/"),
|
|
36640
|
-
|
|
36641
|
-
|
|
36642
|
-
|
|
36643
|
-
"Return to Dashboard"
|
|
36644
|
-
]
|
|
36759
|
+
text: "Return to Dashboard",
|
|
36760
|
+
size: "default",
|
|
36761
|
+
"aria-label": "Return to dashboard"
|
|
36645
36762
|
}
|
|
36646
36763
|
)
|
|
36647
36764
|
] });
|
|
@@ -36649,15 +36766,13 @@ var WorkspaceDetailView = ({
|
|
|
36649
36766
|
if (!workspace) {
|
|
36650
36767
|
return /* @__PURE__ */ jsxs("div", { className: "min-h-screen p-8 bg-slate-50", children: [
|
|
36651
36768
|
/* @__PURE__ */ jsx("div", { className: "mb-4 text-xl text-gray-600", children: "Workspace not found" }),
|
|
36652
|
-
/* @__PURE__ */
|
|
36653
|
-
|
|
36769
|
+
/* @__PURE__ */ jsx(
|
|
36770
|
+
BackButton,
|
|
36654
36771
|
{
|
|
36655
36772
|
onClick: () => onNavigate && onNavigate("/"),
|
|
36656
|
-
|
|
36657
|
-
|
|
36658
|
-
|
|
36659
|
-
"Return to Dashboard"
|
|
36660
|
-
]
|
|
36773
|
+
text: "Return to Dashboard",
|
|
36774
|
+
size: "default",
|
|
36775
|
+
"aria-label": "Return to dashboard"
|
|
36661
36776
|
}
|
|
36662
36777
|
)
|
|
36663
36778
|
] });
|
|
@@ -36672,17 +36787,15 @@ var WorkspaceDetailView = ({
|
|
|
36672
36787
|
/* @__PURE__ */ jsxs("div", { className: "min-h-screen w-full flex flex-col bg-slate-50", children: [
|
|
36673
36788
|
/* @__PURE__ */ jsxs("header", { className: "sticky top-0 z-10 px-2 sm:px-2.5 lg:px-3 py-1.5 sm:py-2 lg:py-3 flex flex-col shadow-sm bg-white", children: [
|
|
36674
36789
|
/* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
|
|
36675
|
-
/* @__PURE__ */
|
|
36676
|
-
|
|
36790
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-0 z-10", children: /* @__PURE__ */ jsx(
|
|
36791
|
+
BackButtonMinimal,
|
|
36677
36792
|
{
|
|
36678
36793
|
onClick: handleBackNavigation,
|
|
36679
|
-
|
|
36680
|
-
|
|
36681
|
-
|
|
36682
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm sm:text-sm lg:text-base", children: previousView === "line_monthly_history" ? "Back to Line History" : returnUrl && returnUrl.includes("monthly_history") ? "Back to Line History" : returnUrl && returnUrl.includes("/kpis/") ? "Back to KPIs" : returnUrl && returnUrl.includes("/leaderboard/") ? "Back to Leaderboard" : date || shift ? "Back to Monthly History" : "Back" })
|
|
36683
|
-
]
|
|
36794
|
+
text: previousView === "line_monthly_history" ? "Back to Line History" : returnUrl && returnUrl.includes("monthly_history") ? "Back to Line History" : returnUrl && returnUrl.includes("/kpis/") ? "Back to KPIs" : returnUrl && returnUrl.includes("/leaderboard/") ? "Back to Leaderboard" : date || shift ? "Back to Monthly History" : "Back",
|
|
36795
|
+
size: "default",
|
|
36796
|
+
"aria-label": "Navigate back to previous page"
|
|
36684
36797
|
}
|
|
36685
|
-
),
|
|
36798
|
+
) }),
|
|
36686
36799
|
/* @__PURE__ */ jsxs("div", { className: "absolute left-1/2 transform -translate-x-1/2 flex items-center gap-3", children: [
|
|
36687
36800
|
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: formattedWorkspaceName }),
|
|
36688
36801
|
/* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
|
|
@@ -37190,17 +37303,15 @@ var SKUManagementView = () => {
|
|
|
37190
37303
|
}
|
|
37191
37304
|
return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-slate-50", children: [
|
|
37192
37305
|
/* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsx("div", { className: "px-4 sm:px-8 py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
|
|
37193
|
-
/* @__PURE__ */
|
|
37194
|
-
|
|
37306
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
|
|
37307
|
+
BackButtonMinimal,
|
|
37195
37308
|
{
|
|
37196
37309
|
onClick: handleBack,
|
|
37197
|
-
|
|
37198
|
-
|
|
37199
|
-
|
|
37200
|
-
/* @__PURE__ */ jsx("span", { children: "Back" })
|
|
37201
|
-
]
|
|
37310
|
+
text: "Back",
|
|
37311
|
+
size: "default",
|
|
37312
|
+
"aria-label": "Navigate back to previous page"
|
|
37202
37313
|
}
|
|
37203
|
-
),
|
|
37314
|
+
) }),
|
|
37204
37315
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto", children: [
|
|
37205
37316
|
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "SKU Management" }),
|
|
37206
37317
|
/* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Manage Stock Keeping Units (SKUs) for production planning" })
|
|
@@ -37707,4 +37818,4 @@ var streamProxyConfig = {
|
|
|
37707
37818
|
}
|
|
37708
37819
|
};
|
|
37709
37820
|
|
|
37710
|
-
export { ACTION_NAMES, AIAgentView_default as AIAgentView, AudioService, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, BarChart, BaseHistoryCalendar, BottlenecksContent, BreakNotificationPopup, CachePrefetchStatus, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, CongratulationsOverlay, 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, EncouragementOverlay, FactoryView_default as FactoryView, GaugeChart, GridComponentsPlaceholder, HamburgerButton, 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, PrefetchConfigurationError, PrefetchError, PrefetchEvents, PrefetchStatus, PrefetchTimeoutError, 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, SubscriptionManager, SubscriptionManagerProvider, SupabaseProvider, TargetWorkspaceGrid, TargetsView_default as TargetsView, ThreadSidebar, TicketHistory_default as TicketHistory, TicketHistoryService, TimeDisplay_default as TimeDisplay, TimePickerDropdown, VideoCard, VideoGridView, VideoPlayer, VideoPreloader, WORKSPACE_POSITIONS, WhatsAppShareButton, WorkspaceCard, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, apiUtils, authCoreService, authOTPService, authRateLimitService, 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, isPrefetchError, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, mergeWithDefaultConfig, migrateLegacyConfiguration, optifyeAgentClient, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, updateThreadTitle, useActiveBreaks, useAllWorkspaceMetrics, useAnalyticsConfig, useAudioService, useAuth, useAuthConfig, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineWorkspaceMetrics, useMessages, useMetrics, useNavigation, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useShiftConfig, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useTargets, useTheme, useThemeConfig, useThreads, useTicketHistory, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, videoPrefetchManager, videoPreloader, whatsappService, withAuth, withRegistry, workspaceService };
|
|
37821
|
+
export { ACTION_NAMES, AIAgentView_default as AIAgentView, AudioService, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, BackButton, BackButtonMinimal, BarChart, BaseHistoryCalendar, BottlenecksContent, BreakNotificationPopup, CachePrefetchStatus, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, CongratulationsOverlay, 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, EncouragementOverlay, FactoryView_default as FactoryView, GaugeChart, GridComponentsPlaceholder, HamburgerButton, 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, PrefetchConfigurationError, PrefetchError, PrefetchEvents, PrefetchStatus, PrefetchTimeoutError, 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, SubscriptionManager, SubscriptionManagerProvider, SupabaseProvider, TargetWorkspaceGrid, TargetsView_default as TargetsView, ThreadSidebar, TicketHistory_default as TicketHistory, TicketHistoryService, TimeDisplay_default as TimeDisplay, TimePickerDropdown, VideoCard, VideoGridView, VideoPlayer, VideoPreloader, WORKSPACE_POSITIONS, WhatsAppShareButton, WorkspaceCard, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, apiUtils, authCoreService, authOTPService, authRateLimitService, 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, isPrefetchError, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, mergeWithDefaultConfig, migrateLegacyConfiguration, optifyeAgentClient, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, updateThreadTitle, useActiveBreaks, useAllWorkspaceMetrics, useAnalyticsConfig, useAudioService, useAuth, useAuthConfig, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineWorkspaceMetrics, useMessages, useMetrics, useNavigation, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useShiftConfig, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useTargets, useTheme, useThemeConfig, useThreads, useTicketHistory, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, videoPrefetchManager, videoPreloader, whatsappService, withAuth, withRegistry, workspaceService };
|