@optifye/dashboard-core 6.9.2 → 6.9.4
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 +39 -15
- package/dist/index.d.ts +39 -15
- package/dist/index.js +358 -601
- package/dist/index.mjs +358 -601
- 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
|
|
3848
|
-
|
|
3849
|
-
deactivateUser(input: {
|
|
3850
|
-
user_id: string;
|
|
3851
|
-
deactivated_by: string;
|
|
3852
|
-
}): Promise<void>;
|
|
3853
|
-
/**
|
|
3854
|
-
* Reactivate a user
|
|
3855
|
-
* @param input - Reactivation input
|
|
3859
|
+
* Permanently delete a user
|
|
3860
|
+
* @param userId - The ID of the user to delete
|
|
3861
|
+
* @returns Promise with deletion response
|
|
3856
3862
|
*/
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
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 {
|
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
|
|
3848
|
-
|
|
3849
|
-
deactivateUser(input: {
|
|
3850
|
-
user_id: string;
|
|
3851
|
-
deactivated_by: string;
|
|
3852
|
-
}): Promise<void>;
|
|
3853
|
-
/**
|
|
3854
|
-
* Reactivate a user
|
|
3855
|
-
* @param input - Reactivation input
|
|
3859
|
+
* Permanently delete a user
|
|
3860
|
+
* @param userId - The ID of the user to delete
|
|
3861
|
+
* @returns Promise with deletion response
|
|
3856
3862
|
*/
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
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 {
|