andoncloud-dashboard-toolkit 1.5.4 → 1.5.6
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/components/DashboardFilters/AccessDeniedModal/index.d.ts +14 -0
- package/dist/components/DashboardFilters/AccessDeniedModal/styles.d.ts +3 -0
- package/dist/components/DashboardFilters/DateRangePicker/index.d.ts +18 -0
- package/dist/components/DashboardFilters/DateRangePicker/styles.d.ts +3 -0
- package/dist/components/DashboardFilters/DayTypeSelector/index.d.ts +8 -0
- package/dist/components/DashboardFilters/DayTypeSelector/styles.d.ts +3 -0
- package/dist/components/DashboardFilters/PeriodList/index.d.ts +13 -0
- package/dist/components/DashboardFilters/PeriodList/styles.d.ts +3 -0
- package/dist/components/DashboardFilters/ShiftSelector/index.d.ts +9 -0
- package/dist/components/DashboardFilters/ShiftSelector/styles.d.ts +3 -0
- package/dist/components/DashboardFilters/index.d.ts +4 -0
- package/dist/components/DashboardFilters/periods.d.ts +5 -0
- package/dist/components/DashboardFilters/periods.test.d.ts +1 -0
- package/dist/components/DashboardFilters/styles.d.ts +3 -0
- package/dist/components/DashboardFilters/types.d.ts +30 -0
- package/dist/components/MetricCard/index.d.ts +0 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/graphql-request.d.ts +165 -0
- package/dist/helpers/sdk.d.ts +2 -0
- package/dist/helpers/shifts.d.ts +6 -6
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/locales/index.d.ts +66 -0
- package/dist/operations/generated/queries/index.d.ts +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +19 -16
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AccessButton, AccessState, CooldownInfo, FeatureRequestPayload } from 'andoncloud-sdk';
|
|
3
|
+
export type AccessDeniedModalProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
accessState: AccessState;
|
|
7
|
+
buttons: AccessButton[];
|
|
8
|
+
daysSinceExpiry: number | null;
|
|
9
|
+
cooldownInfo: CooldownInfo;
|
|
10
|
+
workplaceId?: string;
|
|
11
|
+
onFeatureRequest?: (payload: FeatureRequestPayload) => Promise<boolean>;
|
|
12
|
+
};
|
|
13
|
+
declare const AccessDeniedModal: React.FC<AccessDeniedModalProps>;
|
|
14
|
+
export default AccessDeniedModal;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import 'dayjs/locale/pl';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { DayType, Shift } from '../../../graphql-request';
|
|
4
|
+
import type { DateRange, PeriodDefinition } from '../types';
|
|
5
|
+
export type DateRangePickerProps = {
|
|
6
|
+
dateRange: DateRange;
|
|
7
|
+
dayType: DayType;
|
|
8
|
+
shifts: Shift[];
|
|
9
|
+
selectedShiftIds: string[];
|
|
10
|
+
hasAccess: boolean;
|
|
11
|
+
selectedPeriodId?: string;
|
|
12
|
+
onDayTypeChange: (dayType: DayType) => void;
|
|
13
|
+
onDateRangeChange: (dateRange: DateRange) => void;
|
|
14
|
+
onPeriodSelect: (period: PeriodDefinition, dateRange: DateRange) => void;
|
|
15
|
+
onAccessDenied: () => void;
|
|
16
|
+
};
|
|
17
|
+
declare const DateRangePicker: React.FC<DateRangePickerProps>;
|
|
18
|
+
export default DateRangePicker;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DayType } from '../../../graphql-request';
|
|
3
|
+
export type DayTypeSelectorProps = {
|
|
4
|
+
value: DayType;
|
|
5
|
+
onChange: (value: DayType) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const DayTypeSelector: React.FC<DayTypeSelectorProps>;
|
|
8
|
+
export default DayTypeSelector;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DayType, Shift } from '../../../graphql-request';
|
|
3
|
+
import type { DateRange, PeriodDefinition } from '../types';
|
|
4
|
+
export type PeriodListProps = {
|
|
5
|
+
dayType: DayType;
|
|
6
|
+
shifts: Shift[];
|
|
7
|
+
selectedShiftIds: string[];
|
|
8
|
+
selectedPeriodId?: string;
|
|
9
|
+
hasAccess: boolean;
|
|
10
|
+
onPeriodSelect: (period: PeriodDefinition, dateRange: DateRange) => void;
|
|
11
|
+
};
|
|
12
|
+
declare const PeriodList: React.FC<PeriodListProps>;
|
|
13
|
+
export default PeriodList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Shift } from '../../../graphql-request';
|
|
3
|
+
export type ShiftSelectorProps = {
|
|
4
|
+
shifts: Shift[];
|
|
5
|
+
selectedShiftIds: string[];
|
|
6
|
+
onChange: (shiftIds: string[]) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const ShiftSelector: React.FC<ShiftSelectorProps>;
|
|
9
|
+
export default ShiftSelector;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Shift } from '../../graphql-request';
|
|
2
|
+
import type { PeriodDefinition } from './types';
|
|
3
|
+
export declare const periods: PeriodDefinition[];
|
|
4
|
+
export declare const findPeriodById: (id: string) => PeriodDefinition | undefined;
|
|
5
|
+
export declare const getTimeRangeLabel: (shifts: Shift[], selectedShiftIds: string[]) => string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { FeatureRequestPayload } from 'andoncloud-sdk';
|
|
2
|
+
import type { DayType, Shift } from '../../graphql-request';
|
|
3
|
+
export type DateRange = {
|
|
4
|
+
from: string;
|
|
5
|
+
to: string;
|
|
6
|
+
};
|
|
7
|
+
export type FilterValues = {
|
|
8
|
+
dayType: DayType;
|
|
9
|
+
dateRange: DateRange;
|
|
10
|
+
shiftIds: string[];
|
|
11
|
+
};
|
|
12
|
+
export type DashboardFiltersProps = {
|
|
13
|
+
initialValues?: FilterValues;
|
|
14
|
+
onChange: (values: FilterValues) => void;
|
|
15
|
+
shifts: Shift[];
|
|
16
|
+
onFeatureRequest?: (payload: FeatureRequestPayload) => Promise<boolean>;
|
|
17
|
+
};
|
|
18
|
+
export type PeriodCategory = 'shift_based' | 'rolling' | 'relative_days' | 'previous' | 'current' | 'calendar_weeks' | 'fiscal';
|
|
19
|
+
export type CalculateContext = {
|
|
20
|
+
dayType: DayType;
|
|
21
|
+
shifts: Shift[];
|
|
22
|
+
selectedShiftIds: string[];
|
|
23
|
+
};
|
|
24
|
+
export type PeriodDefinition = {
|
|
25
|
+
id: string;
|
|
26
|
+
labelKey: string;
|
|
27
|
+
needAccess: boolean;
|
|
28
|
+
category: PeriodCategory;
|
|
29
|
+
calculate: (ctx: CalculateContext) => DateRange;
|
|
30
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { default as ConfirmTooltip } from './ConfirmTooltip';
|
|
2
|
+
export { default as DashboardFilters } from './DashboardFilters';
|
|
2
3
|
export { default as MetricCard } from './MetricCard';
|
|
3
4
|
export { default as SortableSelect } from './SortableSelect';
|
|
4
5
|
export { default as WidgetCard } from './WidgetCard';
|
|
6
|
+
export type { DateRange, FilterValues, DashboardFiltersProps, PeriodDefinition, PeriodCategory, CalculateContext, } from './DashboardFilters/types';
|
|
@@ -112,6 +112,11 @@ export type AssignmentSummary = {
|
|
|
112
112
|
totalCheckedIn: Scalars['Int']['output'];
|
|
113
113
|
totalMissing: Scalars['Int']['output'];
|
|
114
114
|
};
|
|
115
|
+
export declare enum AvailabilityStatus {
|
|
116
|
+
PlannedStop = "PLANNED_STOP",
|
|
117
|
+
Stopped = "STOPPED",
|
|
118
|
+
Working = "WORKING"
|
|
119
|
+
}
|
|
115
120
|
export type BulkStaffingPlanInput = {
|
|
116
121
|
plans: Array<StaffingPlanInput>;
|
|
117
122
|
};
|
|
@@ -567,6 +572,10 @@ export type DashboardFilter = {
|
|
|
567
572
|
uuid_not_null?: InputMaybe<Scalars['String']['input']>;
|
|
568
573
|
uuid_null?: InputMaybe<Scalars['String']['input']>;
|
|
569
574
|
};
|
|
575
|
+
export declare enum DayType {
|
|
576
|
+
Calendar = "CALENDAR",
|
|
577
|
+
Production = "PRODUCTION"
|
|
578
|
+
}
|
|
570
579
|
export type Department = {
|
|
571
580
|
__typename?: 'Department';
|
|
572
581
|
id: Scalars['ID']['output'];
|
|
@@ -1758,6 +1767,8 @@ export type Query = {
|
|
|
1758
1767
|
* unassigned operators pool, and global summary.
|
|
1759
1768
|
*/
|
|
1760
1769
|
workplaceAssignments: WorkplaceAssignmentsView;
|
|
1770
|
+
/** Returns performance analysis for workplaces within a specified time period. */
|
|
1771
|
+
workplacePerformanceInsights: WorkplacePerformanceInsightsResult;
|
|
1761
1772
|
/**
|
|
1762
1773
|
* Returns all workplaces available in the current organization.
|
|
1763
1774
|
* A workplace represents a production station in the factory,
|
|
@@ -1835,6 +1846,9 @@ export type QueryWorkOrdersArgs = {
|
|
|
1835
1846
|
export type QueryWorkplaceAssignmentsArgs = {
|
|
1836
1847
|
input: WorkplaceAssignmentsInput;
|
|
1837
1848
|
};
|
|
1849
|
+
export type QueryWorkplacePerformanceInsightsArgs = {
|
|
1850
|
+
input: WorkplacePerformanceInsightsInput;
|
|
1851
|
+
};
|
|
1838
1852
|
export type QueryWorkplacesArgs = {
|
|
1839
1853
|
filter?: InputMaybe<WorkplaceFilter>;
|
|
1840
1854
|
};
|
|
@@ -2096,6 +2110,7 @@ export type StaffingPlan = {
|
|
|
2096
2110
|
export type StaffingPlanFilter = {
|
|
2097
2111
|
date_from?: InputMaybe<Scalars['ISO8601Date']['input']>;
|
|
2098
2112
|
date_to?: InputMaybe<Scalars['ISO8601Date']['input']>;
|
|
2113
|
+
period?: InputMaybe<Period>;
|
|
2099
2114
|
shift_id_in?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
2100
2115
|
workplace_id_in?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
2101
2116
|
};
|
|
@@ -3304,6 +3319,65 @@ export type WorkplaceFilter = {
|
|
|
3304
3319
|
verify_existence_of_standard_rate_for_order_eq?: InputMaybe<Scalars['String']['input']>;
|
|
3305
3320
|
verify_existence_of_standard_rate_for_order_equals?: InputMaybe<Scalars['String']['input']>;
|
|
3306
3321
|
};
|
|
3322
|
+
export type WorkplacePerformanceInsightsInput = {
|
|
3323
|
+
availabilityStatuses?: InputMaybe<Array<AvailabilityStatus>>;
|
|
3324
|
+
dayType?: InputMaybe<DayType>;
|
|
3325
|
+
endDate: Scalars['ISO8601DateTime']['input'];
|
|
3326
|
+
shiftIds?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
3327
|
+
sortOrder?: InputMaybe<Scalars['String']['input']>;
|
|
3328
|
+
startDate: Scalars['ISO8601DateTime']['input'];
|
|
3329
|
+
userIds?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
3330
|
+
workplaceId: Scalars['ID']['input'];
|
|
3331
|
+
};
|
|
3332
|
+
export type WorkplacePerformanceInsightsReason = {
|
|
3333
|
+
__typename?: 'WorkplacePerformanceInsightsReason';
|
|
3334
|
+
availabilityStatus: AvailabilityStatus;
|
|
3335
|
+
averageDuration: Scalars['String']['output'];
|
|
3336
|
+
averageDurationSeconds: Scalars['Float']['output'];
|
|
3337
|
+
maxDuration: Scalars['String']['output'];
|
|
3338
|
+
maxDurationSeconds: Scalars['Float']['output'];
|
|
3339
|
+
occurrences: Scalars['Int']['output'];
|
|
3340
|
+
percentage: Scalars['Float']['output'];
|
|
3341
|
+
reasonColor: Scalars['String']['output'];
|
|
3342
|
+
reasonId: Scalars['ID']['output'];
|
|
3343
|
+
reasonName: Scalars['String']['output'];
|
|
3344
|
+
statusChanges: Array<WorkplacePerformanceInsightsStatusChange>;
|
|
3345
|
+
totalDuration: Scalars['String']['output'];
|
|
3346
|
+
totalSeconds: Scalars['Float']['output'];
|
|
3347
|
+
};
|
|
3348
|
+
export type WorkplacePerformanceInsightsResult = {
|
|
3349
|
+
__typename?: 'WorkplacePerformanceInsightsResult';
|
|
3350
|
+
endDate: Scalars['ISO8601DateTime']['output'];
|
|
3351
|
+
mtbf: Scalars['String']['output'];
|
|
3352
|
+
mtbfSeconds?: Maybe<Scalars['Float']['output']>;
|
|
3353
|
+
mttr: Scalars['String']['output'];
|
|
3354
|
+
mttrSeconds?: Maybe<Scalars['Float']['output']>;
|
|
3355
|
+
reasons: Array<WorkplacePerformanceInsightsReason>;
|
|
3356
|
+
startDate: Scalars['ISO8601DateTime']['output'];
|
|
3357
|
+
totalDowntime: Scalars['String']['output'];
|
|
3358
|
+
totalDowntimePercentage: Scalars['Float']['output'];
|
|
3359
|
+
totalDowntimeSeconds: Scalars['Float']['output'];
|
|
3360
|
+
totalDuration: Scalars['String']['output'];
|
|
3361
|
+
totalSeconds: Scalars['Float']['output'];
|
|
3362
|
+
totalUptime: Scalars['String']['output'];
|
|
3363
|
+
totalUptimePercentage: Scalars['Float']['output'];
|
|
3364
|
+
totalUptimeSeconds: Scalars['Float']['output'];
|
|
3365
|
+
workplaceId: Scalars['ID']['output'];
|
|
3366
|
+
workplaceName: Scalars['String']['output'];
|
|
3367
|
+
};
|
|
3368
|
+
export type WorkplacePerformanceInsightsStatusChange = {
|
|
3369
|
+
__typename?: 'WorkplacePerformanceInsightsStatusChange';
|
|
3370
|
+
firstSegmentStart: Scalars['ISO8601DateTime']['output'];
|
|
3371
|
+
id: Scalars['ID']['output'];
|
|
3372
|
+
lastSegmentEnd: Scalars['ISO8601DateTime']['output'];
|
|
3373
|
+
note?: Maybe<Scalars['String']['output']>;
|
|
3374
|
+
originalEnd?: Maybe<Scalars['ISO8601DateTime']['output']>;
|
|
3375
|
+
originalStart: Scalars['ISO8601DateTime']['output'];
|
|
3376
|
+
segments?: Maybe<Scalars['JSON']['output']>;
|
|
3377
|
+
totalSegmentDuration: Scalars['String']['output'];
|
|
3378
|
+
totalSegmentSeconds: Scalars['Float']['output'];
|
|
3379
|
+
uuid: Scalars['String']['output'];
|
|
3380
|
+
};
|
|
3307
3381
|
export type WorkplaceWithAssignment = {
|
|
3308
3382
|
__typename?: 'WorkplaceWithAssignment';
|
|
3309
3383
|
assignedCount: Scalars['Int']['output'];
|
|
@@ -6868,6 +6942,59 @@ export type WorkplaceAssignmentsQuery = {
|
|
|
6868
6942
|
}>;
|
|
6869
6943
|
};
|
|
6870
6944
|
};
|
|
6945
|
+
export type WorkplacePerformanceInsightsQueryVariables = Exact<{
|
|
6946
|
+
input: WorkplacePerformanceInsightsInput;
|
|
6947
|
+
}>;
|
|
6948
|
+
export type WorkplacePerformanceInsightsQuery = {
|
|
6949
|
+
__typename?: 'Query';
|
|
6950
|
+
workplacePerformanceInsights: {
|
|
6951
|
+
__typename?: 'WorkplacePerformanceInsightsResult';
|
|
6952
|
+
endDate: any;
|
|
6953
|
+
mtbf: string;
|
|
6954
|
+
mtbfSeconds?: number | null;
|
|
6955
|
+
mttr: string;
|
|
6956
|
+
mttrSeconds?: number | null;
|
|
6957
|
+
startDate: any;
|
|
6958
|
+
totalDowntime: string;
|
|
6959
|
+
totalDowntimePercentage: number;
|
|
6960
|
+
totalDowntimeSeconds: number;
|
|
6961
|
+
totalDuration: string;
|
|
6962
|
+
totalSeconds: number;
|
|
6963
|
+
totalUptime: string;
|
|
6964
|
+
totalUptimePercentage: number;
|
|
6965
|
+
totalUptimeSeconds: number;
|
|
6966
|
+
workplaceId: string;
|
|
6967
|
+
workplaceName: string;
|
|
6968
|
+
reasons: Array<{
|
|
6969
|
+
__typename?: 'WorkplacePerformanceInsightsReason';
|
|
6970
|
+
availabilityStatus: AvailabilityStatus;
|
|
6971
|
+
averageDuration: string;
|
|
6972
|
+
averageDurationSeconds: number;
|
|
6973
|
+
maxDuration: string;
|
|
6974
|
+
maxDurationSeconds: number;
|
|
6975
|
+
occurrences: number;
|
|
6976
|
+
percentage: number;
|
|
6977
|
+
reasonColor: string;
|
|
6978
|
+
reasonId: string;
|
|
6979
|
+
reasonName: string;
|
|
6980
|
+
totalDuration: string;
|
|
6981
|
+
totalSeconds: number;
|
|
6982
|
+
statusChanges: Array<{
|
|
6983
|
+
__typename?: 'WorkplacePerformanceInsightsStatusChange';
|
|
6984
|
+
firstSegmentStart: any;
|
|
6985
|
+
id: string;
|
|
6986
|
+
lastSegmentEnd: any;
|
|
6987
|
+
note?: string | null;
|
|
6988
|
+
originalEnd?: any | null;
|
|
6989
|
+
originalStart: any;
|
|
6990
|
+
segments?: any | null;
|
|
6991
|
+
totalSegmentDuration: string;
|
|
6992
|
+
totalSegmentSeconds: number;
|
|
6993
|
+
uuid: string;
|
|
6994
|
+
}>;
|
|
6995
|
+
}>;
|
|
6996
|
+
};
|
|
6997
|
+
};
|
|
6871
6998
|
export type WorkplacesQueryVariables = Exact<{
|
|
6872
6999
|
filter?: InputMaybe<WorkplaceFilter>;
|
|
6873
7000
|
}>;
|
|
@@ -7027,6 +7154,40 @@ export type UnassignOperatorMutation = {
|
|
|
7027
7154
|
} | null;
|
|
7028
7155
|
};
|
|
7029
7156
|
};
|
|
7157
|
+
export type GetWorkplacePerformanceInsightsQueryVariables = Exact<{
|
|
7158
|
+
input: WorkplacePerformanceInsightsInput;
|
|
7159
|
+
}>;
|
|
7160
|
+
export type GetWorkplacePerformanceInsightsQuery = {
|
|
7161
|
+
__typename?: 'Query';
|
|
7162
|
+
workplacePerformanceInsights: {
|
|
7163
|
+
__typename?: 'WorkplacePerformanceInsightsResult';
|
|
7164
|
+
workplaceId: string;
|
|
7165
|
+
workplaceName: string;
|
|
7166
|
+
startDate: any;
|
|
7167
|
+
endDate: any;
|
|
7168
|
+
totalDuration: string;
|
|
7169
|
+
totalSeconds: number;
|
|
7170
|
+
totalUptime: string;
|
|
7171
|
+
totalUptimePercentage: number;
|
|
7172
|
+
totalDowntime: string;
|
|
7173
|
+
totalDowntimePercentage: number;
|
|
7174
|
+
mtbf: string;
|
|
7175
|
+
mttr: string;
|
|
7176
|
+
reasons: Array<{
|
|
7177
|
+
__typename?: 'WorkplacePerformanceInsightsReason';
|
|
7178
|
+
reasonId: string;
|
|
7179
|
+
reasonName: string;
|
|
7180
|
+
reasonColor: string;
|
|
7181
|
+
availabilityStatus: AvailabilityStatus;
|
|
7182
|
+
totalDuration: string;
|
|
7183
|
+
totalSeconds: number;
|
|
7184
|
+
percentage: number;
|
|
7185
|
+
occurrences: number;
|
|
7186
|
+
averageDuration: string;
|
|
7187
|
+
maxDuration: string;
|
|
7188
|
+
}>;
|
|
7189
|
+
};
|
|
7190
|
+
};
|
|
7030
7191
|
export type ListActualStaffingCountsQueryVariables = Exact<{
|
|
7031
7192
|
filter?: InputMaybe<ActualStaffingCountFilter>;
|
|
7032
7193
|
}>;
|
|
@@ -7469,9 +7630,11 @@ export declare const WidgetDocument: import("graphql/language/ast").DocumentNode
|
|
|
7469
7630
|
export declare const WidgetsDocument: import("graphql/language/ast").DocumentNode;
|
|
7470
7631
|
export declare const WorkOrdersDocument: import("graphql/language/ast").DocumentNode;
|
|
7471
7632
|
export declare const WorkplaceAssignmentsDocument: import("graphql/language/ast").DocumentNode;
|
|
7633
|
+
export declare const WorkplacePerformanceInsightsDocument: import("graphql/language/ast").DocumentNode;
|
|
7472
7634
|
export declare const WorkplacesDocument: import("graphql/language/ast").DocumentNode;
|
|
7473
7635
|
export declare const AssignOperatorDocument: import("graphql/language/ast").DocumentNode;
|
|
7474
7636
|
export declare const UnassignOperatorDocument: import("graphql/language/ast").DocumentNode;
|
|
7637
|
+
export declare const GetWorkplacePerformanceInsightsDocument: import("graphql/language/ast").DocumentNode;
|
|
7475
7638
|
export declare const ListActualStaffingCountsDocument: import("graphql/language/ast").DocumentNode;
|
|
7476
7639
|
export declare const ListStaffingPlansDocument: import("graphql/language/ast").DocumentNode;
|
|
7477
7640
|
export declare const ListStatusChangesDocument: import("graphql/language/ast").DocumentNode;
|
|
@@ -7537,9 +7700,11 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
|
|
|
7537
7700
|
widgets(variables?: WidgetsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<WidgetsQuery>;
|
|
7538
7701
|
workOrders(variables?: WorkOrdersQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<WorkOrdersQuery>;
|
|
7539
7702
|
workplaceAssignments(variables: WorkplaceAssignmentsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<WorkplaceAssignmentsQuery>;
|
|
7703
|
+
workplacePerformanceInsights(variables: WorkplacePerformanceInsightsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<WorkplacePerformanceInsightsQuery>;
|
|
7540
7704
|
workplaces(variables?: WorkplacesQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<WorkplacesQuery>;
|
|
7541
7705
|
assignOperator(variables: AssignOperatorMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<AssignOperatorMutation>;
|
|
7542
7706
|
unassignOperator(variables: UnassignOperatorMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<UnassignOperatorMutation>;
|
|
7707
|
+
getWorkplacePerformanceInsights(variables: GetWorkplacePerformanceInsightsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetWorkplacePerformanceInsightsQuery>;
|
|
7543
7708
|
listActualStaffingCounts(variables?: ListActualStaffingCountsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<ListActualStaffingCountsQuery>;
|
|
7544
7709
|
listStaffingPlans(variables?: ListStaffingPlansQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<ListStaffingPlansQuery>;
|
|
7545
7710
|
listStatusChanges(variables?: ListStatusChangesQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<ListStatusChangesQuery>;
|
package/dist/helpers/sdk.d.ts
CHANGED
|
@@ -55,9 +55,11 @@ export declare const getGraphqlSdk: (url: string, fetch: typeof global.fetch) =>
|
|
|
55
55
|
widgets(variables?: import("../graphql-request").WidgetsQueryVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").WidgetsQuery>;
|
|
56
56
|
workOrders(variables?: import("../graphql-request").WorkOrdersQueryVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").WorkOrdersQuery>;
|
|
57
57
|
workplaceAssignments(variables: import("../graphql-request").WorkplaceAssignmentsQueryVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").WorkplaceAssignmentsQuery>;
|
|
58
|
+
workplacePerformanceInsights(variables: import("../graphql-request").WorkplacePerformanceInsightsQueryVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").WorkplacePerformanceInsightsQuery>;
|
|
58
59
|
workplaces(variables?: import("../graphql-request").WorkplacesQueryVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").WorkplacesQuery>;
|
|
59
60
|
assignOperator(variables: import("../graphql-request").AssignOperatorMutationVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").AssignOperatorMutation>;
|
|
60
61
|
unassignOperator(variables: import("../graphql-request").UnassignOperatorMutationVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").UnassignOperatorMutation>;
|
|
62
|
+
getWorkplacePerformanceInsights(variables: import("../graphql-request").GetWorkplacePerformanceInsightsQueryVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").GetWorkplacePerformanceInsightsQuery>;
|
|
61
63
|
listActualStaffingCounts(variables?: import("../graphql-request").ListActualStaffingCountsQueryVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").ListActualStaffingCountsQuery>;
|
|
62
64
|
listStaffingPlans(variables?: import("../graphql-request").ListStaffingPlansQueryVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").ListStaffingPlansQuery>;
|
|
63
65
|
listStatusChanges(variables?: import("../graphql-request").ListStatusChangesQueryVariables, requestHeaders?: (import("graphql-request/dist/types.dom").Headers | string[][] | Record<string, string>) | undefined, signal?: RequestInit["signal"]): Promise<import("../graphql-request").ListStatusChangesQuery>;
|
package/dist/helpers/shifts.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
2
|
import { Shift } from '../graphql-request';
|
|
3
3
|
export interface NormalizedShift {
|
|
4
4
|
name: string;
|
|
5
|
-
startedAt:
|
|
6
|
-
finishedAt:
|
|
5
|
+
startedAt: Dayjs;
|
|
6
|
+
finishedAt: Dayjs;
|
|
7
7
|
}
|
|
8
|
-
export declare const normalizeShifts: (shifts: Shift[], date:
|
|
9
|
-
export declare const getCurrentShift: (date:
|
|
10
|
-
export declare const getRecentShift: (date:
|
|
8
|
+
export declare const normalizeShifts: (shifts: Shift[], date: Dayjs) => NormalizedShift[];
|
|
9
|
+
export declare const getCurrentShift: (date: Dayjs, shifts: NormalizedShift[]) => NormalizedShift | null;
|
|
10
|
+
export declare const getRecentShift: (date: Dayjs, shifts: NormalizedShift[]) => NormalizedShift | null;
|