@optifye/dashboard-core 6.9.2 → 6.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +0 -4
- package/dist/index.d.mts +43 -15
- package/dist/index.d.ts +43 -15
- package/dist/index.js +375 -609
- package/dist/index.mjs +375 -609
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -3380,10 +3380,6 @@ body {
|
|
|
3380
3380
|
--tw-text-opacity: 1;
|
|
3381
3381
|
color: rgb(146 64 14 / var(--tw-text-opacity, 1));
|
|
3382
3382
|
}
|
|
3383
|
-
.text-amber-900 {
|
|
3384
|
-
--tw-text-opacity: 1;
|
|
3385
|
-
color: rgb(120 53 15 / var(--tw-text-opacity, 1));
|
|
3386
|
-
}
|
|
3387
3383
|
.text-blue-500 {
|
|
3388
3384
|
--tw-text-opacity: 1;
|
|
3389
3385
|
color: rgb(59 130 246 / var(--tw-text-opacity, 1));
|
package/dist/index.d.mts
CHANGED
|
@@ -933,6 +933,11 @@ interface LeaderboardDetailViewProps {
|
|
|
933
933
|
* Optional className for custom styling
|
|
934
934
|
*/
|
|
935
935
|
className?: string;
|
|
936
|
+
/**
|
|
937
|
+
* Optional array of line IDs that the user has access to
|
|
938
|
+
* Used to filter leaderboard for supervisors
|
|
939
|
+
*/
|
|
940
|
+
userAccessibleLineIds?: string[];
|
|
936
941
|
}
|
|
937
942
|
|
|
938
943
|
/**
|
|
@@ -2422,6 +2427,12 @@ interface UseDashboardMetricsProps {
|
|
|
2422
2427
|
* suggesting that related components (like a Line KPI display) might need to refresh.
|
|
2423
2428
|
*/
|
|
2424
2429
|
onLineMetricsUpdate?: () => void;
|
|
2430
|
+
/**
|
|
2431
|
+
* Optional array of line IDs that the user has access to.
|
|
2432
|
+
* Used to filter factory view to only show accessible lines for supervisors.
|
|
2433
|
+
* If not provided, defaults to all configured lines.
|
|
2434
|
+
*/
|
|
2435
|
+
userAccessibleLineIds?: string[];
|
|
2425
2436
|
}
|
|
2426
2437
|
/**
|
|
2427
2438
|
* Custom hook to fetch and subscribe to real-time dashboard metrics.
|
|
@@ -2463,7 +2474,7 @@ interface UseDashboardMetricsProps {
|
|
|
2463
2474
|
* }
|
|
2464
2475
|
* ```
|
|
2465
2476
|
*/
|
|
2466
|
-
declare const useDashboardMetrics: ({ onLineMetricsUpdate, lineId }: UseDashboardMetricsProps) => {
|
|
2477
|
+
declare const useDashboardMetrics: ({ onLineMetricsUpdate, lineId, userAccessibleLineIds }: UseDashboardMetricsProps) => {
|
|
2467
2478
|
workspaceMetrics: WorkspaceMetrics[];
|
|
2468
2479
|
lineMetrics: OverviewLineMetric[];
|
|
2469
2480
|
isLoading: boolean;
|
|
@@ -3007,6 +3018,8 @@ interface UseAllWorkspaceMetricsOptions {
|
|
|
3007
3018
|
initialDate?: string;
|
|
3008
3019
|
/** Specific shift ID to fetch metrics for, overriding the current shift. */
|
|
3009
3020
|
initialShiftId?: number;
|
|
3021
|
+
/** Optional array of line IDs that the user has access to. If not provided, uses all configured lines. */
|
|
3022
|
+
allowedLineIds?: string[];
|
|
3010
3023
|
}
|
|
3011
3024
|
/**
|
|
3012
3025
|
* @hook useAllWorkspaceMetrics
|
|
@@ -3843,21 +3856,17 @@ declare class UserManagementService {
|
|
|
3843
3856
|
optifye: number;
|
|
3844
3857
|
}>;
|
|
3845
3858
|
/**
|
|
3846
|
-
*
|
|
3847
|
-
* @param
|
|
3859
|
+
* Permanently delete a user
|
|
3860
|
+
* @param userId - The ID of the user to delete
|
|
3861
|
+
* @returns Promise with deletion response
|
|
3848
3862
|
*/
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
*/
|
|
3857
|
-
reactivateUser(input: {
|
|
3858
|
-
user_id: string;
|
|
3859
|
-
reactivated_by: string;
|
|
3860
|
-
}): Promise<void>;
|
|
3863
|
+
deleteUser(userId: string): Promise<{
|
|
3864
|
+
success: boolean;
|
|
3865
|
+
message: string;
|
|
3866
|
+
deleted_user_id: string;
|
|
3867
|
+
deleted_user_email: string;
|
|
3868
|
+
deleted_by: string;
|
|
3869
|
+
}>;
|
|
3861
3870
|
}
|
|
3862
3871
|
/**
|
|
3863
3872
|
* Factory function to create UserManagementService
|
|
@@ -4015,6 +4024,21 @@ declare const workspaceService: {
|
|
|
4015
4024
|
updateLineThresholds(lineId: string, productId: string, workspaces: Workspace[], shiftId: number): Promise<void>;
|
|
4016
4025
|
getShiftConfigurations(lineId: string): Promise<ShiftConfiguration[]>;
|
|
4017
4026
|
updateShiftConfigurations(shiftConfig: ShiftConfiguration): Promise<void>;
|
|
4027
|
+
/**
|
|
4028
|
+
* Fetch bulk targets data for multiple lines and shifts in a single API call
|
|
4029
|
+
* This replaces 120+ individual API calls with 1 optimized call
|
|
4030
|
+
*
|
|
4031
|
+
* @param params - Parameters for the bulk fetch
|
|
4032
|
+
* @returns Promise with complete targets data for all lines and shifts
|
|
4033
|
+
*/
|
|
4034
|
+
fetchBulkTargets(params: {
|
|
4035
|
+
companyId: string;
|
|
4036
|
+
lineIds: string[];
|
|
4037
|
+
date: string;
|
|
4038
|
+
shifts?: number[];
|
|
4039
|
+
includeSkus?: boolean;
|
|
4040
|
+
includeActions?: boolean;
|
|
4041
|
+
}): Promise<any>;
|
|
4018
4042
|
};
|
|
4019
4043
|
|
|
4020
4044
|
declare class WorkspaceHealthService {
|
|
@@ -6221,6 +6245,7 @@ interface WorkspaceGridProps {
|
|
|
6221
6245
|
workspaceHlsUrls?: Record<string, string>;
|
|
6222
6246
|
mp4VideoMapping?: Record<string, string>;
|
|
6223
6247
|
};
|
|
6248
|
+
displayNames?: Record<string, string>;
|
|
6224
6249
|
onWorkspaceHover?: (workspaceId: string) => void;
|
|
6225
6250
|
onWorkspaceHoverEnd?: (workspaceId: string) => void;
|
|
6226
6251
|
}
|
|
@@ -6278,6 +6303,7 @@ interface VideoGridViewProps {
|
|
|
6278
6303
|
defaultHlsUrl?: string;
|
|
6279
6304
|
workspaceHlsUrls?: Record<string, string>;
|
|
6280
6305
|
};
|
|
6306
|
+
displayNames?: Record<string, string>;
|
|
6281
6307
|
onWorkspaceHover?: (workspaceId: string) => void;
|
|
6282
6308
|
onWorkspaceHoverEnd?: (workspaceId: string) => void;
|
|
6283
6309
|
}
|
|
@@ -6289,6 +6315,7 @@ declare const VideoGridView: React__default.FC<VideoGridViewProps>;
|
|
|
6289
6315
|
interface MapGridViewProps {
|
|
6290
6316
|
workspaces: WorkspaceMetrics[];
|
|
6291
6317
|
className?: string;
|
|
6318
|
+
displayNames?: Record<string, string>;
|
|
6292
6319
|
onWorkspaceHover?: (workspaceId: string) => void;
|
|
6293
6320
|
onWorkspaceHoverEnd?: (workspaceId: string) => void;
|
|
6294
6321
|
}
|
|
@@ -6310,6 +6337,7 @@ interface VideoCardProps {
|
|
|
6310
6337
|
useRAF?: boolean;
|
|
6311
6338
|
className?: string;
|
|
6312
6339
|
compact?: boolean;
|
|
6340
|
+
displayName?: string;
|
|
6313
6341
|
onMouseEnter?: () => void;
|
|
6314
6342
|
onMouseLeave?: () => void;
|
|
6315
6343
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -933,6 +933,11 @@ interface LeaderboardDetailViewProps {
|
|
|
933
933
|
* Optional className for custom styling
|
|
934
934
|
*/
|
|
935
935
|
className?: string;
|
|
936
|
+
/**
|
|
937
|
+
* Optional array of line IDs that the user has access to
|
|
938
|
+
* Used to filter leaderboard for supervisors
|
|
939
|
+
*/
|
|
940
|
+
userAccessibleLineIds?: string[];
|
|
936
941
|
}
|
|
937
942
|
|
|
938
943
|
/**
|
|
@@ -2422,6 +2427,12 @@ interface UseDashboardMetricsProps {
|
|
|
2422
2427
|
* suggesting that related components (like a Line KPI display) might need to refresh.
|
|
2423
2428
|
*/
|
|
2424
2429
|
onLineMetricsUpdate?: () => void;
|
|
2430
|
+
/**
|
|
2431
|
+
* Optional array of line IDs that the user has access to.
|
|
2432
|
+
* Used to filter factory view to only show accessible lines for supervisors.
|
|
2433
|
+
* If not provided, defaults to all configured lines.
|
|
2434
|
+
*/
|
|
2435
|
+
userAccessibleLineIds?: string[];
|
|
2425
2436
|
}
|
|
2426
2437
|
/**
|
|
2427
2438
|
* Custom hook to fetch and subscribe to real-time dashboard metrics.
|
|
@@ -2463,7 +2474,7 @@ interface UseDashboardMetricsProps {
|
|
|
2463
2474
|
* }
|
|
2464
2475
|
* ```
|
|
2465
2476
|
*/
|
|
2466
|
-
declare const useDashboardMetrics: ({ onLineMetricsUpdate, lineId }: UseDashboardMetricsProps) => {
|
|
2477
|
+
declare const useDashboardMetrics: ({ onLineMetricsUpdate, lineId, userAccessibleLineIds }: UseDashboardMetricsProps) => {
|
|
2467
2478
|
workspaceMetrics: WorkspaceMetrics[];
|
|
2468
2479
|
lineMetrics: OverviewLineMetric[];
|
|
2469
2480
|
isLoading: boolean;
|
|
@@ -3007,6 +3018,8 @@ interface UseAllWorkspaceMetricsOptions {
|
|
|
3007
3018
|
initialDate?: string;
|
|
3008
3019
|
/** Specific shift ID to fetch metrics for, overriding the current shift. */
|
|
3009
3020
|
initialShiftId?: number;
|
|
3021
|
+
/** Optional array of line IDs that the user has access to. If not provided, uses all configured lines. */
|
|
3022
|
+
allowedLineIds?: string[];
|
|
3010
3023
|
}
|
|
3011
3024
|
/**
|
|
3012
3025
|
* @hook useAllWorkspaceMetrics
|
|
@@ -3843,21 +3856,17 @@ declare class UserManagementService {
|
|
|
3843
3856
|
optifye: number;
|
|
3844
3857
|
}>;
|
|
3845
3858
|
/**
|
|
3846
|
-
*
|
|
3847
|
-
* @param
|
|
3859
|
+
* Permanently delete a user
|
|
3860
|
+
* @param userId - The ID of the user to delete
|
|
3861
|
+
* @returns Promise with deletion response
|
|
3848
3862
|
*/
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
*/
|
|
3857
|
-
reactivateUser(input: {
|
|
3858
|
-
user_id: string;
|
|
3859
|
-
reactivated_by: string;
|
|
3860
|
-
}): Promise<void>;
|
|
3863
|
+
deleteUser(userId: string): Promise<{
|
|
3864
|
+
success: boolean;
|
|
3865
|
+
message: string;
|
|
3866
|
+
deleted_user_id: string;
|
|
3867
|
+
deleted_user_email: string;
|
|
3868
|
+
deleted_by: string;
|
|
3869
|
+
}>;
|
|
3861
3870
|
}
|
|
3862
3871
|
/**
|
|
3863
3872
|
* Factory function to create UserManagementService
|
|
@@ -4015,6 +4024,21 @@ declare const workspaceService: {
|
|
|
4015
4024
|
updateLineThresholds(lineId: string, productId: string, workspaces: Workspace[], shiftId: number): Promise<void>;
|
|
4016
4025
|
getShiftConfigurations(lineId: string): Promise<ShiftConfiguration[]>;
|
|
4017
4026
|
updateShiftConfigurations(shiftConfig: ShiftConfiguration): Promise<void>;
|
|
4027
|
+
/**
|
|
4028
|
+
* Fetch bulk targets data for multiple lines and shifts in a single API call
|
|
4029
|
+
* This replaces 120+ individual API calls with 1 optimized call
|
|
4030
|
+
*
|
|
4031
|
+
* @param params - Parameters for the bulk fetch
|
|
4032
|
+
* @returns Promise with complete targets data for all lines and shifts
|
|
4033
|
+
*/
|
|
4034
|
+
fetchBulkTargets(params: {
|
|
4035
|
+
companyId: string;
|
|
4036
|
+
lineIds: string[];
|
|
4037
|
+
date: string;
|
|
4038
|
+
shifts?: number[];
|
|
4039
|
+
includeSkus?: boolean;
|
|
4040
|
+
includeActions?: boolean;
|
|
4041
|
+
}): Promise<any>;
|
|
4018
4042
|
};
|
|
4019
4043
|
|
|
4020
4044
|
declare class WorkspaceHealthService {
|
|
@@ -6221,6 +6245,7 @@ interface WorkspaceGridProps {
|
|
|
6221
6245
|
workspaceHlsUrls?: Record<string, string>;
|
|
6222
6246
|
mp4VideoMapping?: Record<string, string>;
|
|
6223
6247
|
};
|
|
6248
|
+
displayNames?: Record<string, string>;
|
|
6224
6249
|
onWorkspaceHover?: (workspaceId: string) => void;
|
|
6225
6250
|
onWorkspaceHoverEnd?: (workspaceId: string) => void;
|
|
6226
6251
|
}
|
|
@@ -6278,6 +6303,7 @@ interface VideoGridViewProps {
|
|
|
6278
6303
|
defaultHlsUrl?: string;
|
|
6279
6304
|
workspaceHlsUrls?: Record<string, string>;
|
|
6280
6305
|
};
|
|
6306
|
+
displayNames?: Record<string, string>;
|
|
6281
6307
|
onWorkspaceHover?: (workspaceId: string) => void;
|
|
6282
6308
|
onWorkspaceHoverEnd?: (workspaceId: string) => void;
|
|
6283
6309
|
}
|
|
@@ -6289,6 +6315,7 @@ declare const VideoGridView: React__default.FC<VideoGridViewProps>;
|
|
|
6289
6315
|
interface MapGridViewProps {
|
|
6290
6316
|
workspaces: WorkspaceMetrics[];
|
|
6291
6317
|
className?: string;
|
|
6318
|
+
displayNames?: Record<string, string>;
|
|
6292
6319
|
onWorkspaceHover?: (workspaceId: string) => void;
|
|
6293
6320
|
onWorkspaceHoverEnd?: (workspaceId: string) => void;
|
|
6294
6321
|
}
|
|
@@ -6310,6 +6337,7 @@ interface VideoCardProps {
|
|
|
6310
6337
|
useRAF?: boolean;
|
|
6311
6338
|
className?: string;
|
|
6312
6339
|
compact?: boolean;
|
|
6340
|
+
displayName?: string;
|
|
6313
6341
|
onMouseEnter?: () => void;
|
|
6314
6342
|
onMouseLeave?: () => void;
|
|
6315
6343
|
}
|