@optifye/dashboard-core 6.6.9 → 6.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +17 -11
- package/dist/index.mjs +17 -11
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1299,11 +1299,11 @@ declare class S3ClipsSupabaseService {
|
|
|
1299
1299
|
/**
|
|
1300
1300
|
* Get clip counts with optional video index
|
|
1301
1301
|
*/
|
|
1302
|
-
getClipCountsCacheFirst(workspaceId: string, date: string, shiftId: string | number, buildIndex?: boolean): Promise<ClipCountsWithIndex | Record<string, number>>;
|
|
1302
|
+
getClipCountsCacheFirst(workspaceId: string, date: string, shiftId: string | number, buildIndex?: boolean, totalOutput?: number): Promise<ClipCountsWithIndex | Record<string, number>>;
|
|
1303
1303
|
/**
|
|
1304
1304
|
* Get clip counts (simplified version)
|
|
1305
1305
|
*/
|
|
1306
|
-
getClipCounts(workspaceId: string, date: string, shiftId: string | number): Promise<Record<string, number>>;
|
|
1306
|
+
getClipCounts(workspaceId: string, date: string, shiftId: string | number, totalOutput?: number): Promise<Record<string, number>>;
|
|
1307
1307
|
/**
|
|
1308
1308
|
* Get clip by ID - stable navigation method
|
|
1309
1309
|
* This ensures navigation works even when new clips are added
|
|
@@ -3257,7 +3257,7 @@ declare function useClipTypes(): UseClipTypesResult;
|
|
|
3257
3257
|
/**
|
|
3258
3258
|
* Hook to get clip types with counts for a specific workspace/date/shift
|
|
3259
3259
|
*/
|
|
3260
|
-
declare function useClipTypesWithCounts(workspaceId: string, date: string, shiftId: string | number): UseClipTypesResult & {
|
|
3260
|
+
declare function useClipTypesWithCounts(workspaceId: string, date: string, shiftId: string | number, totalOutput?: number): UseClipTypesResult & {
|
|
3261
3261
|
counts: Record<string, number>;
|
|
3262
3262
|
};
|
|
3263
3263
|
|
|
@@ -5334,6 +5334,10 @@ interface BottlenecksContentProps {
|
|
|
5334
5334
|
* Optional className for styling
|
|
5335
5335
|
*/
|
|
5336
5336
|
className?: string;
|
|
5337
|
+
/**
|
|
5338
|
+
* Total output from workspace metrics for cycle completion adjustment
|
|
5339
|
+
*/
|
|
5340
|
+
totalOutput?: number;
|
|
5337
5341
|
}
|
|
5338
5342
|
/**
|
|
5339
5343
|
* Filter type for bottleneck clips - expanded for new video types
|
package/dist/index.d.ts
CHANGED
|
@@ -1299,11 +1299,11 @@ declare class S3ClipsSupabaseService {
|
|
|
1299
1299
|
/**
|
|
1300
1300
|
* Get clip counts with optional video index
|
|
1301
1301
|
*/
|
|
1302
|
-
getClipCountsCacheFirst(workspaceId: string, date: string, shiftId: string | number, buildIndex?: boolean): Promise<ClipCountsWithIndex | Record<string, number>>;
|
|
1302
|
+
getClipCountsCacheFirst(workspaceId: string, date: string, shiftId: string | number, buildIndex?: boolean, totalOutput?: number): Promise<ClipCountsWithIndex | Record<string, number>>;
|
|
1303
1303
|
/**
|
|
1304
1304
|
* Get clip counts (simplified version)
|
|
1305
1305
|
*/
|
|
1306
|
-
getClipCounts(workspaceId: string, date: string, shiftId: string | number): Promise<Record<string, number>>;
|
|
1306
|
+
getClipCounts(workspaceId: string, date: string, shiftId: string | number, totalOutput?: number): Promise<Record<string, number>>;
|
|
1307
1307
|
/**
|
|
1308
1308
|
* Get clip by ID - stable navigation method
|
|
1309
1309
|
* This ensures navigation works even when new clips are added
|
|
@@ -3257,7 +3257,7 @@ declare function useClipTypes(): UseClipTypesResult;
|
|
|
3257
3257
|
/**
|
|
3258
3258
|
* Hook to get clip types with counts for a specific workspace/date/shift
|
|
3259
3259
|
*/
|
|
3260
|
-
declare function useClipTypesWithCounts(workspaceId: string, date: string, shiftId: string | number): UseClipTypesResult & {
|
|
3260
|
+
declare function useClipTypesWithCounts(workspaceId: string, date: string, shiftId: string | number, totalOutput?: number): UseClipTypesResult & {
|
|
3261
3261
|
counts: Record<string, number>;
|
|
3262
3262
|
};
|
|
3263
3263
|
|
|
@@ -5334,6 +5334,10 @@ interface BottlenecksContentProps {
|
|
|
5334
5334
|
* Optional className for styling
|
|
5335
5335
|
*/
|
|
5336
5336
|
className?: string;
|
|
5337
|
+
/**
|
|
5338
|
+
* Total output from workspace metrics for cycle completion adjustment
|
|
5339
|
+
*/
|
|
5340
|
+
totalOutput?: number;
|
|
5337
5341
|
}
|
|
5338
5342
|
/**
|
|
5339
5343
|
* Filter type for bottleneck clips - expanded for new video types
|
package/dist/index.js
CHANGED
|
@@ -3765,7 +3765,7 @@ var S3ClipsSupabaseService = class {
|
|
|
3765
3765
|
/**
|
|
3766
3766
|
* Get clip counts with optional video index
|
|
3767
3767
|
*/
|
|
3768
|
-
async getClipCountsCacheFirst(workspaceId, date, shiftId, buildIndex = false) {
|
|
3768
|
+
async getClipCountsCacheFirst(workspaceId, date, shiftId, buildIndex = false, totalOutput) {
|
|
3769
3769
|
const cacheKey = `clip-counts:${workspaceId}:${date}:${shiftId}`;
|
|
3770
3770
|
return this.deduplicate(cacheKey, async () => {
|
|
3771
3771
|
console.log(`[S3ClipsSupabase] Fetching clip counts from Supabase for:`, {
|
|
@@ -3776,7 +3776,8 @@ var S3ClipsSupabaseService = class {
|
|
|
3776
3776
|
const response = await this.fetchWithAuth("count", {
|
|
3777
3777
|
workspaceId,
|
|
3778
3778
|
date,
|
|
3779
|
-
shift: shiftId.toString()
|
|
3779
|
+
shift: shiftId.toString(),
|
|
3780
|
+
totalOutput
|
|
3780
3781
|
});
|
|
3781
3782
|
console.log(`[S3ClipsSupabase] Count API response:`, response);
|
|
3782
3783
|
const counts = response.counts || {};
|
|
@@ -3828,8 +3829,8 @@ var S3ClipsSupabaseService = class {
|
|
|
3828
3829
|
/**
|
|
3829
3830
|
* Get clip counts (simplified version)
|
|
3830
3831
|
*/
|
|
3831
|
-
async getClipCounts(workspaceId, date, shiftId) {
|
|
3832
|
-
const result = await this.getClipCountsCacheFirst(workspaceId, date, shiftId, false);
|
|
3832
|
+
async getClipCounts(workspaceId, date, shiftId, totalOutput) {
|
|
3833
|
+
const result = await this.getClipCountsCacheFirst(workspaceId, date, shiftId, false, totalOutput);
|
|
3833
3834
|
if (typeof result === "object" && "counts" in result) {
|
|
3834
3835
|
return result.counts;
|
|
3835
3836
|
}
|
|
@@ -9020,7 +9021,7 @@ function useClipTypes() {
|
|
|
9020
9021
|
refresh: fetchClipTypes
|
|
9021
9022
|
};
|
|
9022
9023
|
}
|
|
9023
|
-
function useClipTypesWithCounts(workspaceId, date, shiftId) {
|
|
9024
|
+
function useClipTypesWithCounts(workspaceId, date, shiftId, totalOutput) {
|
|
9024
9025
|
const { clipTypes, isLoading: typesLoading, error: typesError, refresh } = useClipTypes();
|
|
9025
9026
|
const [counts, setCounts] = React21.useState({});
|
|
9026
9027
|
const [countsLoading, setCountsLoading] = React21.useState(false);
|
|
@@ -9045,7 +9046,8 @@ function useClipTypesWithCounts(workspaceId, date, shiftId) {
|
|
|
9045
9046
|
const clipCounts = await s3Service.getClipCounts(
|
|
9046
9047
|
workspaceId,
|
|
9047
9048
|
date,
|
|
9048
|
-
shiftId.toString()
|
|
9049
|
+
shiftId.toString(),
|
|
9050
|
+
totalOutput
|
|
9049
9051
|
);
|
|
9050
9052
|
console.log("[useClipTypesWithCounts] Received counts:", clipCounts);
|
|
9051
9053
|
setCounts(clipCounts);
|
|
@@ -9056,7 +9058,7 @@ function useClipTypesWithCounts(workspaceId, date, shiftId) {
|
|
|
9056
9058
|
}
|
|
9057
9059
|
};
|
|
9058
9060
|
fetchCounts();
|
|
9059
|
-
}, [s3Service, workspaceId, date, shiftId]);
|
|
9061
|
+
}, [s3Service, workspaceId, date, shiftId, totalOutput]);
|
|
9060
9062
|
return {
|
|
9061
9063
|
clipTypes: clipTypes.map((type) => ({
|
|
9062
9064
|
...type,
|
|
@@ -29223,7 +29225,8 @@ var BottlenecksContent = ({
|
|
|
29223
29225
|
workspaceName,
|
|
29224
29226
|
date,
|
|
29225
29227
|
shift,
|
|
29226
|
-
className
|
|
29228
|
+
className,
|
|
29229
|
+
totalOutput
|
|
29227
29230
|
}) => {
|
|
29228
29231
|
const dashboardConfig = useDashboardConfig();
|
|
29229
29232
|
const timezone = useAppTimezone();
|
|
@@ -29322,8 +29325,9 @@ var BottlenecksContent = ({
|
|
|
29322
29325
|
} = useClipTypesWithCounts(
|
|
29323
29326
|
workspaceId,
|
|
29324
29327
|
date || getOperationalDate(timezone),
|
|
29325
|
-
effectiveShift
|
|
29328
|
+
effectiveShift,
|
|
29326
29329
|
// Use same shift as video loading for consistency
|
|
29330
|
+
totalOutput
|
|
29327
29331
|
);
|
|
29328
29332
|
console.log("[BottlenecksContent] Clip types data:", {
|
|
29329
29333
|
clipTypes,
|
|
@@ -29368,8 +29372,9 @@ var BottlenecksContent = ({
|
|
|
29368
29372
|
const fullResult = await s3ClipsService.getClipCounts(
|
|
29369
29373
|
workspaceId,
|
|
29370
29374
|
operationalDate,
|
|
29371
|
-
shiftStr
|
|
29372
|
-
|
|
29375
|
+
shiftStr,
|
|
29376
|
+
totalOutput
|
|
29377
|
+
// Pass totalOutput for cycle completion adjustment
|
|
29373
29378
|
);
|
|
29374
29379
|
console.log(`[BottlenecksContent] Direct fetch result:`, fullResult);
|
|
29375
29380
|
if (fullResult) {
|
|
@@ -42854,6 +42859,7 @@ var WorkspaceDetailView = ({
|
|
|
42854
42859
|
workspaceName: formattedWorkspaceName,
|
|
42855
42860
|
date,
|
|
42856
42861
|
shift,
|
|
42862
|
+
totalOutput: workspace?.total_actions,
|
|
42857
42863
|
className: "h-[calc(100vh-10rem)]"
|
|
42858
42864
|
}
|
|
42859
42865
|
) })
|
package/dist/index.mjs
CHANGED
|
@@ -3735,7 +3735,7 @@ var S3ClipsSupabaseService = class {
|
|
|
3735
3735
|
/**
|
|
3736
3736
|
* Get clip counts with optional video index
|
|
3737
3737
|
*/
|
|
3738
|
-
async getClipCountsCacheFirst(workspaceId, date, shiftId, buildIndex = false) {
|
|
3738
|
+
async getClipCountsCacheFirst(workspaceId, date, shiftId, buildIndex = false, totalOutput) {
|
|
3739
3739
|
const cacheKey = `clip-counts:${workspaceId}:${date}:${shiftId}`;
|
|
3740
3740
|
return this.deduplicate(cacheKey, async () => {
|
|
3741
3741
|
console.log(`[S3ClipsSupabase] Fetching clip counts from Supabase for:`, {
|
|
@@ -3746,7 +3746,8 @@ var S3ClipsSupabaseService = class {
|
|
|
3746
3746
|
const response = await this.fetchWithAuth("count", {
|
|
3747
3747
|
workspaceId,
|
|
3748
3748
|
date,
|
|
3749
|
-
shift: shiftId.toString()
|
|
3749
|
+
shift: shiftId.toString(),
|
|
3750
|
+
totalOutput
|
|
3750
3751
|
});
|
|
3751
3752
|
console.log(`[S3ClipsSupabase] Count API response:`, response);
|
|
3752
3753
|
const counts = response.counts || {};
|
|
@@ -3798,8 +3799,8 @@ var S3ClipsSupabaseService = class {
|
|
|
3798
3799
|
/**
|
|
3799
3800
|
* Get clip counts (simplified version)
|
|
3800
3801
|
*/
|
|
3801
|
-
async getClipCounts(workspaceId, date, shiftId) {
|
|
3802
|
-
const result = await this.getClipCountsCacheFirst(workspaceId, date, shiftId, false);
|
|
3802
|
+
async getClipCounts(workspaceId, date, shiftId, totalOutput) {
|
|
3803
|
+
const result = await this.getClipCountsCacheFirst(workspaceId, date, shiftId, false, totalOutput);
|
|
3803
3804
|
if (typeof result === "object" && "counts" in result) {
|
|
3804
3805
|
return result.counts;
|
|
3805
3806
|
}
|
|
@@ -8990,7 +8991,7 @@ function useClipTypes() {
|
|
|
8990
8991
|
refresh: fetchClipTypes
|
|
8991
8992
|
};
|
|
8992
8993
|
}
|
|
8993
|
-
function useClipTypesWithCounts(workspaceId, date, shiftId) {
|
|
8994
|
+
function useClipTypesWithCounts(workspaceId, date, shiftId, totalOutput) {
|
|
8994
8995
|
const { clipTypes, isLoading: typesLoading, error: typesError, refresh } = useClipTypes();
|
|
8995
8996
|
const [counts, setCounts] = useState({});
|
|
8996
8997
|
const [countsLoading, setCountsLoading] = useState(false);
|
|
@@ -9015,7 +9016,8 @@ function useClipTypesWithCounts(workspaceId, date, shiftId) {
|
|
|
9015
9016
|
const clipCounts = await s3Service.getClipCounts(
|
|
9016
9017
|
workspaceId,
|
|
9017
9018
|
date,
|
|
9018
|
-
shiftId.toString()
|
|
9019
|
+
shiftId.toString(),
|
|
9020
|
+
totalOutput
|
|
9019
9021
|
);
|
|
9020
9022
|
console.log("[useClipTypesWithCounts] Received counts:", clipCounts);
|
|
9021
9023
|
setCounts(clipCounts);
|
|
@@ -9026,7 +9028,7 @@ function useClipTypesWithCounts(workspaceId, date, shiftId) {
|
|
|
9026
9028
|
}
|
|
9027
9029
|
};
|
|
9028
9030
|
fetchCounts();
|
|
9029
|
-
}, [s3Service, workspaceId, date, shiftId]);
|
|
9031
|
+
}, [s3Service, workspaceId, date, shiftId, totalOutput]);
|
|
9030
9032
|
return {
|
|
9031
9033
|
clipTypes: clipTypes.map((type) => ({
|
|
9032
9034
|
...type,
|
|
@@ -29193,7 +29195,8 @@ var BottlenecksContent = ({
|
|
|
29193
29195
|
workspaceName,
|
|
29194
29196
|
date,
|
|
29195
29197
|
shift,
|
|
29196
|
-
className
|
|
29198
|
+
className,
|
|
29199
|
+
totalOutput
|
|
29197
29200
|
}) => {
|
|
29198
29201
|
const dashboardConfig = useDashboardConfig();
|
|
29199
29202
|
const timezone = useAppTimezone();
|
|
@@ -29292,8 +29295,9 @@ var BottlenecksContent = ({
|
|
|
29292
29295
|
} = useClipTypesWithCounts(
|
|
29293
29296
|
workspaceId,
|
|
29294
29297
|
date || getOperationalDate(timezone),
|
|
29295
|
-
effectiveShift
|
|
29298
|
+
effectiveShift,
|
|
29296
29299
|
// Use same shift as video loading for consistency
|
|
29300
|
+
totalOutput
|
|
29297
29301
|
);
|
|
29298
29302
|
console.log("[BottlenecksContent] Clip types data:", {
|
|
29299
29303
|
clipTypes,
|
|
@@ -29338,8 +29342,9 @@ var BottlenecksContent = ({
|
|
|
29338
29342
|
const fullResult = await s3ClipsService.getClipCounts(
|
|
29339
29343
|
workspaceId,
|
|
29340
29344
|
operationalDate,
|
|
29341
|
-
shiftStr
|
|
29342
|
-
|
|
29345
|
+
shiftStr,
|
|
29346
|
+
totalOutput
|
|
29347
|
+
// Pass totalOutput for cycle completion adjustment
|
|
29343
29348
|
);
|
|
29344
29349
|
console.log(`[BottlenecksContent] Direct fetch result:`, fullResult);
|
|
29345
29350
|
if (fullResult) {
|
|
@@ -42824,6 +42829,7 @@ var WorkspaceDetailView = ({
|
|
|
42824
42829
|
workspaceName: formattedWorkspaceName,
|
|
42825
42830
|
date,
|
|
42826
42831
|
shift,
|
|
42832
|
+
totalOutput: workspace?.total_actions,
|
|
42827
42833
|
className: "h-[calc(100vh-10rem)]"
|
|
42828
42834
|
}
|
|
42829
42835
|
) })
|