andoncloud-dashboard-toolkit 1.5.71 → 1.5.73
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.ts +1 -1
- package/dist/index.js +245 -234
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -8460,7 +8460,7 @@ declare const useGqlClients: ({
|
|
|
8460
8460
|
}: ClientsProps) => GqlClients;
|
|
8461
8461
|
//#endregion
|
|
8462
8462
|
//#region src/version.d.ts
|
|
8463
|
-
declare const LIBRARY_VERSION = "1.5.
|
|
8463
|
+
declare const LIBRARY_VERSION = "1.5.73";
|
|
8464
8464
|
//#endregion
|
|
8465
8465
|
export { AccessRequestTypeEnum, ActualStaffingCount, ActualStaffingCountFilter, ActualStaffingCountsDocument, ActualStaffingCountsQuery, ActualStaffingCountsQueryVariables, AndonLightColor, ApplicationInfo, ApplicationInfoDocument, ApplicationInfoQuery, ApplicationInfoQueryVariables, AssignOperatorDocument, AssignOperatorInput, AssignOperatorMutation, AssignOperatorMutationVariables, AssignOperatorToWorkplaceDocument, AssignOperatorToWorkplaceMutation, AssignOperatorToWorkplaceMutationVariables, AssignOperatorToWorkplacePayload, AssignOperator_Assignment, AssignedOperator, AssignmentSummary, AvailabilityInsightsDocument, AvailabilityInsightsEntry, AvailabilityInsightsInput, AvailabilityInsightsQuery, AvailabilityInsightsQueryVariables, AvailabilityInsightsResult, AvailabilityStatus, BaseWidgetData, BaseWidgetSettings, BulkStaffingPlanInput, BulkUpsertStaffingPlansDocument, BulkUpsertStaffingPlansMutation, BulkUpsertStaffingPlansMutationVariables, BulkUpsertStaffingPlansPayload, type CalculateContext, type CalendarPeriodId, CompanyConfig, CompanyConfigDocument, CompanyConfigQuery, CompanyConfigQueryVariables, ConfirmTooltip, Counter, CounterDirectoriesDocument, CounterDirectoriesQuery, CounterDirectoriesQueryVariables, CounterDirectory, CounterDirectoryFilter, CounterFilter, CounterKindEnum, CountersDocument, CountersQuery, CountersQueryVariables, CreateDashboardDocument, CreateDashboardMutation, CreateDashboardMutationVariables, CreateDashboardPayload, CreateOrderDocument, CreateOrderMutation, CreateOrderMutationVariables, CreateOrderPayload, CreateProductDocument, CreateProductMutation, CreateProductMutationVariables, CreateProductPayload, CreateStaffingPlanDocument, CreateStaffingPlanMutation, CreateStaffingPlanMutationVariables, CreateStaffingPlanPayload, CreateStatusChangeDocument, CreateStatusChangeMutation, CreateStatusChangeMutationVariables, CreateStatusChangePayload, CreateUserPresenceDocument, CreateUserPresenceMutation, CreateUserPresenceMutationVariables, CreateUserPresencePayload, CreateWidgetDocument, CreateWidgetMutation, CreateWidgetMutationVariables, CreateWidgetPayload, CurrentUserDocument, CurrentUserQuery, CurrentUserQueryVariables, Dashboard, DashboardFilter, DashboardFilters, type DashboardFiltersProps, DashboardsDocument, DashboardsQuery, DashboardsQueryVariables, type DateRange, DayType, Department, DepartmentFilter, DepartmentsDocument, DepartmentsQuery, DepartmentsQueryVariables, DeviceConfig, EditWorkOrderDocument, EditWorkOrderMutation, EditWorkOrderMutationVariables, EditWorkOrder_Result, Exact, type FilterValues, FloorPlan, FloorPlanFilter, FloorPlansDocument, FloorPlansQuery, FloorPlansQueryVariables, GetAvailabilityInsightsDocument, GetAvailabilityInsightsQuery, GetAvailabilityInsightsQueryVariables, GetAvailabilityInsights_Entry, GetAvailabilityInsights_Result, GetCompanyConfigDocument, GetCompanyConfigQuery, GetCompanyConfigQueryVariables, GetCompanyConfig_Config, GetProductionInsightsDocument, GetProductionInsightsQuery, GetProductionInsightsQueryVariables, GetProductionInsights_Entry, GetProductionInsights_Result, GetStatusInsightsDocument, GetStatusInsightsQuery, GetStatusInsightsQueryVariables, GetStatusInsights_Entry, GetStatusInsights_Result, GetWorkOrdersInsightsDocument, GetWorkOrdersInsightsQuery, GetWorkOrdersInsightsQueryVariables, GetWorkOrdersInsights_Category, GetWorkOrdersInsights_Result, GetWorkplacePerformanceInsightsDocument, GetWorkplacePerformanceInsightsQuery, GetWorkplacePerformanceInsightsQueryVariables, GetWorkplacePerformanceInsights_Reason, GetWorkplacePerformanceInsights_Result, GqlClients, GraphqlWsClient, Incremental, InputMaybe, InsightsAggregation, Item, ListActualStaffingCountsDocument, ListActualStaffingCountsQuery, ListActualStaffingCountsQueryVariables, ListActualStaffingCounts_ActualStaffingCount, ListFloorPlansDocument, ListFloorPlansQuery, ListFloorPlansQueryVariables, ListFloorPlans_FloorPlan, ListMetricValuesDocument, ListMetricValuesQuery, ListMetricValuesQueryVariables, ListMetricValues_MetricValue, ListMetricsDocument, ListMetricsQuery, ListMetricsQueryVariables, ListMetrics_Metric, ListReasonsDocument, ListReasonsQuery, ListReasonsQueryVariables, ListReasons_Reason, ListShiftsDocument, ListShiftsQuery, ListShiftsQueryVariables, ListShifts_Shift, ListStaffingPlansDocument, ListStaffingPlansQuery, ListStaffingPlansQueryVariables, ListStaffingPlans_StaffingPlan, ListStatusChangesDocument, ListStatusChangesQuery, ListStatusChangesQueryVariables, ListStatusChanges_StatusChange, ListWorkOrdersDocument, ListWorkOrdersQuery, ListWorkOrdersQueryVariables, ListWorkOrders_WorkOrder, ListWorkplaceAssignmentsDocument, ListWorkplaceAssignmentsQuery, ListWorkplaceAssignmentsQueryVariables, ListWorkplaceAssignments_AssignmentSummary, ListWorkplaceAssignments_UnassignedOperator, ListWorkplaceAssignments_WorkplaceWithAssignment, ListWorkplacesDocument, ListWorkplacesQuery, ListWorkplacesQueryVariables, ListWorkplaces_Workplace, MakeEmpty, MakeMaybe, MakeOptional, Maybe, Metric, MetricCard, MetricTypeEnum, MetricUnitEnum, MetricValue, MetricValuesDocument, MetricValuesQuery, MetricValuesQueryVariables, MetricsDocument, MetricsQuery, MetricsQueryVariables, Mutation, MutationAssignOperatorToWorkplaceArgs, MutationBulkUpsertStaffingPlansArgs, MutationCreateDashboardArgs, MutationCreateOrderArgs, MutationCreateProductArgs, MutationCreateStaffingPlanArgs, MutationCreateStatusChangeArgs, MutationCreateUserPresenceArgs, MutationCreateWidgetArgs, MutationError, MutationPauseOrderExecutionArgs, MutationRemoveDashboardArgs, MutationRemoveStaffingPlanArgs, MutationRemoveUserPresenceArgs, MutationRemoveWidgetArgs, MutationRemoveWorkplaceUsersPresencesArgs, MutationRequestFeatureAccessArgs, MutationSetCounterArgs, MutationStartOrderExecutionArgs, MutationStartTrialArgs, MutationStopOrderExecutionArgs, MutationUnassignOperatorFromWorkplaceArgs, MutationUpdateDashboardArgs, MutationUpdateNotificationArgs, MutationUpdateOrderArgs, MutationUpdateOrderExecutionArgs, MutationUpdateStaffingPlanArgs, MutationUpdateStatusChangeArgs, MutationUpdateWidgetArgs, MutationUpdateWorkOrderArgs, NormalizedShift, Notification, NotificationFilter, NotificationsDocument, NotificationsQuery, NotificationsQueryVariables, Order, OrderConfig, OrderExecution, OrderExecutionConfig, OrderExecutionFilter, OrderFilter, OrderInput, OrdersDocument, OrdersExecutionsDocument, OrdersExecutionsQuery, OrdersExecutionsQueryVariables, OrdersQuery, OrdersQueryVariables, PauseOrderExecutionDocument, PauseOrderExecutionMutation, PauseOrderExecutionMutationVariables, PauseOrderExecutionPayload, Period, type PeriodCategory, type PeriodDefinition, type PeriodId, PresenceStatusEnum, Product, ProductConfig, ProductFilter, ProductInput, ProductionInsightsDocument, ProductionInsightsEntry, ProductionInsightsInput, ProductionInsightsQuery, ProductionInsightsQueryVariables, ProductionInsightsResult, ProductionMode, ProductsDocument, ProductsQuery, ProductsQueryVariables, Query, QueryActualStaffingCountsArgs, QueryAvailabilityInsightsArgs, QueryCounterDirectoriesArgs, QueryCountersArgs, QueryDashboardsArgs, QueryDepartmentsArgs, QueryFloorPlansArgs, QueryMetricValuesArgs, QueryNotificationsArgs, QueryOrdersArgs, QueryOrdersExecutionsArgs, QueryProductionInsightsArgs, QueryProductsArgs, QueryReasonsArgs, QueryReasonsRecommendationArgs, QueryStaffingPlansArgs, QueryStandardRatesArgs, QueryStatusChangeTransitionPermissionsArgs, QueryStatusChangesArgs, QueryStatusInsightsArgs, QueryUsersArgs, QueryUsersPresencesArgs, QueryWidgetArgs, QueryWidgetsArgs, QueryWorkOrdersArgs, QueryWorkOrdersInsightsArgs, QueryWorkplaceAssignmentsArgs, QueryWorkplacePerformanceInsightsArgs, QueryWorkplacesArgs, Reason, ReasonFilter, ReasonsDocument, ReasonsQuery, ReasonsQueryVariables, ReasonsRecommendation, ReasonsRecommendationDocument, ReasonsRecommendationQuery, ReasonsRecommendationQueryVariables, RemoveDashboardDocument, RemoveDashboardMutation, RemoveDashboardMutationVariables, RemoveDashboardPayload, RemoveStaffingPlanDocument, RemoveStaffingPlanMutation, RemoveStaffingPlanMutationVariables, RemoveStaffingPlanPayload, RemoveUserPresenceDocument, RemoveUserPresenceMutation, RemoveUserPresenceMutationVariables, RemoveUserPresencePayload, RemoveWidgetDocument, RemoveWidgetMutation, RemoveWidgetMutationVariables, RemoveWidgetPayload, RemoveWorkplaceUsersPresencesDocument, RemoveWorkplaceUsersPresencesMutation, RemoveWorkplaceUsersPresencesMutationVariables, RemoveWorkplaceUsersPresencesPayload, RequestFeatureAccessDocument, RequestFeatureAccessInput, RequestFeatureAccessMutation, RequestFeatureAccessMutationPayload, RequestFeatureAccessMutationVariables, RoleConfig, Scalars, ScreenEnum, ScreenSaverConfig, Sdk, SdkFunctionWrapper, SetCounterDocument, SetCounterMutation, SetCounterMutationVariables, SetCounterPayload, Shift, type ShiftPeriodId, ShiftsDocument, ShiftsQuery, ShiftsQueryVariables, SortableSelect, StaffingPlan, StaffingPlanFilter, StaffingPlanInput, StaffingPlanUpdateInput, StaffingPlansDocument, StaffingPlansQuery, StaffingPlansQueryVariables, StandardRate, StandardRatesDocument, StandardRatesQuery, StandardRatesQueryVariables, StartOrderExecutionDocument, StartOrderExecutionMutation, StartOrderExecutionMutationVariables, StartOrderExecutionPayload, StartTrialDocument, StartTrialInput, StartTrialMutation, StartTrialMutationPayload, StartTrialMutationVariables, StatusChange, StatusChangeFilter, StatusChangeTransitionPermission, StatusChangeTransitionPermissionFilter, StatusChangeTransitionPermissionsDocument, StatusChangeTransitionPermissionsQuery, StatusChangeTransitionPermissionsQueryVariables, StatusChangesDocument, StatusChangesQuery, StatusChangesQueryVariables, StatusInsightsDocument, StatusInsightsEntry, StatusInsightsInput, StatusInsightsQuery, StatusInsightsQueryVariables, StatusInsightsResult, StatusScreenDisplayBlocksEnum, StopOrderExecutionDocument, StopOrderExecutionMutation, StopOrderExecutionMutationVariables, StopOrderExecutionPayload, Subscription, SubscriptionWorkplaceEventArgs, TrainingStatus, UnassignOperatorDocument, UnassignOperatorFromWorkplaceDocument, UnassignOperatorFromWorkplaceMutation, UnassignOperatorFromWorkplaceMutationVariables, UnassignOperatorFromWorkplacePayload, UnassignOperatorInput, UnassignOperatorMutation, UnassignOperatorMutationVariables, UnassignOperator_Assignment, UnplannedOperator, UpdateDashboardDocument, UpdateDashboardMutation, UpdateDashboardMutationVariables, UpdateDashboardPayload, UpdateNotificationDocument, UpdateNotificationMutation, UpdateNotificationMutationVariables, UpdateNotificationPayload, UpdateOrderDocument, UpdateOrderExecutionDocument, UpdateOrderExecutionMutation, UpdateOrderExecutionMutationVariables, UpdateOrderExecutionPayload, UpdateOrderInput, UpdateOrderMutation, UpdateOrderMutationVariables, UpdateOrderPayload, UpdateStaffingPlanDocument, UpdateStaffingPlanMutation, UpdateStaffingPlanMutationVariables, UpdateStaffingPlanPayload, UpdateStatusChangeDocument, UpdateStatusChangeInput, UpdateStatusChangeMutation, UpdateStatusChangeMutationVariables, UpdateStatusChangePayload, UpdateWidgetDocument, UpdateWidgetMutation, UpdateWidgetMutationVariables, UpdateWidgetPayload, UpdateWorkOrderDocument, UpdateWorkOrderInput, UpdateWorkOrderMutation, UpdateWorkOrderMutationVariables, UpdateWorkOrderPayload, User, UserFilter, UserPresence, UserPresenceFilter, UsersDocument, UsersPresencesDocument, UsersPresencesQuery, UsersPresencesQueryVariables, UsersQuery, UsersQueryVariables, type WeekPeriodId, Widget, WidgetCard, WidgetCardProps, WidgetDocument, WidgetErrorBoundary, WidgetFilter, WidgetProps, WidgetQuery, WidgetQueryVariables, WidgetsDocument, WidgetsQuery, WidgetsQueryVariables, WorkOrder, WorkOrderCategory, WorkOrderCreationMethodEnum, WorkOrderFilter, WorkOrderPriorityEnum, WorkOrderStatusEnum, WorkOrdersDocument, WorkOrdersInsightsCategoryEntry, WorkOrdersInsightsDocument, WorkOrdersInsightsDurationEntry, WorkOrdersInsightsInput, WorkOrdersInsightsQuery, WorkOrdersInsightsQueryVariables, WorkOrdersInsightsResult, WorkOrdersQuery, WorkOrdersQueryVariables, Workplace, WorkplaceAssignment, WorkplaceAssignmentsDocument, WorkplaceAssignmentsInput, WorkplaceAssignmentsQuery, WorkplaceAssignmentsQueryVariables, WorkplaceAssignmentsView, WorkplaceConfig, WorkplaceEvent, WorkplaceEventDocument, WorkplaceEventSubjectUnion, WorkplaceEventSubscription, WorkplaceEventSubscriptionPayload, WorkplaceEventSubscriptionVariables, WorkplaceFilter, WorkplacePerformanceInsightsDocument, WorkplacePerformanceInsightsInput, WorkplacePerformanceInsightsQuery, WorkplacePerformanceInsightsQueryVariables, WorkplacePerformanceInsightsReason, WorkplacePerformanceInsightsResult, WorkplacePerformanceInsightsStatusChange, WorkplaceWithAssignment, WorkplacesDocument, WorkplacesQuery, WorkplacesQueryVariables, findPeriodById, generateTimeRange, getCurrentShift, getGqlWsClient, getGraphqlSdk, getNextBoundary, getRecentShift, getSdk, getShiftTimeRange, getTimeRangeLabel, getValidAggregations, normalizeShifts, periods, resolveAggregation, resolveShiftIdForPeriod, useGqlClients, LIBRARY_VERSION as version };
|
|
8466
8466
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -6,17 +6,17 @@ import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
|
|
|
6
6
|
import { AccessBlocker, AccessGuard, Checkbox, fetch, refreshUserData, registerTranslations, useAccess, useStore } from "andoncloud-sdk";
|
|
7
7
|
import dayjs from "dayjs";
|
|
8
8
|
import gql from "graphql-tag";
|
|
9
|
+
import isoWeek from "dayjs/plugin/isoWeek.js";
|
|
10
|
+
import quarterOfYear from "dayjs/plugin/quarterOfYear.js";
|
|
9
11
|
import "dayjs/locale/pl.js";
|
|
10
12
|
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
|
11
13
|
import { DateCalendar } from "@mui/x-date-pickers/DateCalendar";
|
|
12
14
|
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
|
|
13
|
-
import {
|
|
15
|
+
import { PickerDay } from "@mui/x-date-pickers/PickerDay";
|
|
14
16
|
import isBetween from "dayjs/plugin/isBetween.js";
|
|
15
17
|
import { mergeSx } from "merge-sx";
|
|
16
18
|
import LockIcon from "@mui/icons-material/Lock";
|
|
17
19
|
import SearchIcon from "@mui/icons-material/Search";
|
|
18
|
-
import isoWeek from "dayjs/plugin/isoWeek.js";
|
|
19
|
-
import quarterOfYear from "dayjs/plugin/quarterOfYear.js";
|
|
20
20
|
import TextTruncate from "react-text-truncate";
|
|
21
21
|
import durationPlugin from "dayjs/plugin/duration.js";
|
|
22
22
|
import { keyframes } from "@mui/system";
|
|
@@ -5004,230 +5004,6 @@ const resolveInitialValues = (values) => {
|
|
|
5004
5004
|
};
|
|
5005
5005
|
};
|
|
5006
5006
|
//#endregion
|
|
5007
|
-
//#region src/locales/index.ts
|
|
5008
|
-
const resources = {
|
|
5009
|
-
en: { translation: {
|
|
5010
|
-
"Are you sure you want to delete this widget?": "Are you sure you want to delete this widget?",
|
|
5011
|
-
Cancel: "Cancel",
|
|
5012
|
-
Delete: "Delete",
|
|
5013
|
-
widgetCard: {
|
|
5014
|
-
"error": "Widget encountered an error",
|
|
5015
|
-
"retry": "Retry"
|
|
5016
|
-
},
|
|
5017
|
-
dashboardFilters: {
|
|
5018
|
-
"dayType": {
|
|
5019
|
-
"label": "Day type",
|
|
5020
|
-
"calendar": "Calendar",
|
|
5021
|
-
"production": "Production"
|
|
5022
|
-
},
|
|
5023
|
-
"shifts": {
|
|
5024
|
-
"label": "Shifts",
|
|
5025
|
-
"allShifts": "All shifts"
|
|
5026
|
-
},
|
|
5027
|
-
"dateRange": {
|
|
5028
|
-
"label": "Date range",
|
|
5029
|
-
"from": "From",
|
|
5030
|
-
"to": "To"
|
|
5031
|
-
},
|
|
5032
|
-
"search": {
|
|
5033
|
-
"placeholder": "Search periods...",
|
|
5034
|
-
"noResults": "No periods found"
|
|
5035
|
-
},
|
|
5036
|
-
"premium": { "indicator": "Premium" },
|
|
5037
|
-
"periods": {
|
|
5038
|
-
"currentShift": "Current shift",
|
|
5039
|
-
"lastShift": "Previous shift",
|
|
5040
|
-
"today": "Today",
|
|
5041
|
-
"yesterday": "Yesterday",
|
|
5042
|
-
"last7Days": "Last 7 days",
|
|
5043
|
-
"last14Days": "Last 14 days",
|
|
5044
|
-
"last30Days": "Last 30 days",
|
|
5045
|
-
"last90Days": "Last 90 days",
|
|
5046
|
-
"last180Days": "Last 180 days",
|
|
5047
|
-
"last365Days": "Last 365 days",
|
|
5048
|
-
"currentWeek": "Current week",
|
|
5049
|
-
"currentMonth": "Current month",
|
|
5050
|
-
"currentQuarter": "Current quarter",
|
|
5051
|
-
"currentYear": "Current year",
|
|
5052
|
-
"previousWeek": "Previous week",
|
|
5053
|
-
"previousMonth": "Previous month",
|
|
5054
|
-
"previousQuarter": "Previous quarter",
|
|
5055
|
-
"previousYear": "Previous year",
|
|
5056
|
-
"last2Weeks": "Last 2 weeks",
|
|
5057
|
-
"last4Weeks": "Last 4 weeks",
|
|
5058
|
-
"last8Weeks": "Last 8 weeks",
|
|
5059
|
-
"last12Weeks": "Last 12 weeks",
|
|
5060
|
-
"last3Months": "Last 3 months",
|
|
5061
|
-
"last6Months": "Last 6 months",
|
|
5062
|
-
"last12Months": "Last 12 months",
|
|
5063
|
-
"week": "Week {{week}}"
|
|
5064
|
-
},
|
|
5065
|
-
"accessDenied": {
|
|
5066
|
-
"title": "Premium feature",
|
|
5067
|
-
"close": "Close"
|
|
5068
|
-
}
|
|
5069
|
-
}
|
|
5070
|
-
} },
|
|
5071
|
-
pl: { translation: {
|
|
5072
|
-
"Are you sure you want to delete this widget?": "Czy na pewno usunąć ten widżet?",
|
|
5073
|
-
Cancel: "Anuluj",
|
|
5074
|
-
Delete: "Usuń",
|
|
5075
|
-
widgetCard: {
|
|
5076
|
-
"error": "Widżet napotkał błąd",
|
|
5077
|
-
"retry": "Ponów"
|
|
5078
|
-
},
|
|
5079
|
-
dashboardFilters: {
|
|
5080
|
-
"dayType": {
|
|
5081
|
-
"label": "Typ dnia",
|
|
5082
|
-
"calendar": "Kalendarzowy",
|
|
5083
|
-
"production": "Produkcyjny"
|
|
5084
|
-
},
|
|
5085
|
-
"shifts": {
|
|
5086
|
-
"label": "Zmiany",
|
|
5087
|
-
"allShifts": "Wszystkie zmiany"
|
|
5088
|
-
},
|
|
5089
|
-
"dateRange": {
|
|
5090
|
-
"label": "Zakres dat",
|
|
5091
|
-
"from": "Od",
|
|
5092
|
-
"to": "Do"
|
|
5093
|
-
},
|
|
5094
|
-
"search": {
|
|
5095
|
-
"placeholder": "Szukaj okresów...",
|
|
5096
|
-
"noResults": "Nie znaleziono okresów"
|
|
5097
|
-
},
|
|
5098
|
-
"premium": { "indicator": "Premium" },
|
|
5099
|
-
"periods": {
|
|
5100
|
-
"currentShift": "Aktualna zmiana",
|
|
5101
|
-
"lastShift": "Poprzednia zmiana",
|
|
5102
|
-
"today": "Dzisiaj",
|
|
5103
|
-
"yesterday": "Wczoraj",
|
|
5104
|
-
"last7Days": "Ostatnie 7 dni",
|
|
5105
|
-
"last14Days": "Ostatnie 14 dni",
|
|
5106
|
-
"last30Days": "Ostatnie 30 dni",
|
|
5107
|
-
"last90Days": "Ostatnie 90 dni",
|
|
5108
|
-
"last180Days": "Ostatnie 180 dni",
|
|
5109
|
-
"last365Days": "Ostatnie 365 dni",
|
|
5110
|
-
"currentWeek": "Bieżący tydzień",
|
|
5111
|
-
"currentMonth": "Bieżący miesiąc",
|
|
5112
|
-
"currentQuarter": "Bieżący kwartał",
|
|
5113
|
-
"currentYear": "Bieżący rok",
|
|
5114
|
-
"previousWeek": "Poprzedni tydzień",
|
|
5115
|
-
"previousMonth": "Poprzedni miesiąc",
|
|
5116
|
-
"previousQuarter": "Poprzedni kwartał",
|
|
5117
|
-
"previousYear": "Poprzedni rok",
|
|
5118
|
-
"last2Weeks": "Ostatnie 2 tygodnie",
|
|
5119
|
-
"last4Weeks": "Ostatnie 4 tygodnie",
|
|
5120
|
-
"last8Weeks": "Ostatnie 8 tygodni",
|
|
5121
|
-
"last12Weeks": "Ostatnie 12 tygodni",
|
|
5122
|
-
"last3Months": "Ostatnie 3 miesiące",
|
|
5123
|
-
"last6Months": "Ostatnie 6 miesięcy",
|
|
5124
|
-
"last12Months": "Ostatnie 12 miesięcy",
|
|
5125
|
-
"week": "Tydzień {{week}}"
|
|
5126
|
-
},
|
|
5127
|
-
"accessDenied": {
|
|
5128
|
-
"title": "Funkcja Premium",
|
|
5129
|
-
"close": "Zamknij"
|
|
5130
|
-
}
|
|
5131
|
-
}
|
|
5132
|
-
} }
|
|
5133
|
-
};
|
|
5134
|
-
//#endregion
|
|
5135
|
-
//#region src/components/DashboardFilters/AccessDeniedModal/styles.ts
|
|
5136
|
-
const styles$6 = { dialog: {
|
|
5137
|
-
"& .MuiDialog-paper": { borderRadius: "6px" },
|
|
5138
|
-
"& .MuiDialogContent-root": { padding: 0 }
|
|
5139
|
-
} };
|
|
5140
|
-
//#endregion
|
|
5141
|
-
//#region src/components/DashboardFilters/AccessDeniedModal/index.tsx
|
|
5142
|
-
const FEATURE_KEY$1 = "feature.dashboard_extended_date_ranges";
|
|
5143
|
-
const AccessDeniedModal = ({ open, onClose, accessState, buttons, daysSinceExpiry, cooldownInfo, workplaceId, onFeatureRequest }) => {
|
|
5144
|
-
const handleTrialRequest = useCallback(() => Promise.resolve(false), []);
|
|
5145
|
-
const handleFeatureRequest = useCallback(async (payload) => {
|
|
5146
|
-
const success = onFeatureRequest ? await onFeatureRequest(payload) : false;
|
|
5147
|
-
if (success) onClose();
|
|
5148
|
-
return success;
|
|
5149
|
-
}, [onFeatureRequest, onClose]);
|
|
5150
|
-
const { t } = useTranslation();
|
|
5151
|
-
return /* @__PURE__ */ jsxs(Dialog, {
|
|
5152
|
-
open,
|
|
5153
|
-
onClose,
|
|
5154
|
-
sx: styles$6.dialog,
|
|
5155
|
-
"data-testid": "dashboard-filters.access-denied-dialog",
|
|
5156
|
-
children: [/* @__PURE__ */ jsx(DialogTitle, { children: t("dashboardFilters.accessDenied.title") }), /* @__PURE__ */ jsxs(DialogContent, { children: [/* @__PURE__ */ jsx(AccessBlocker, {
|
|
5157
|
-
accessState,
|
|
5158
|
-
buttons,
|
|
5159
|
-
daysSinceExpiry: daysSinceExpiry ?? void 0,
|
|
5160
|
-
featureKey: FEATURE_KEY$1,
|
|
5161
|
-
workplaceId,
|
|
5162
|
-
cooldownInfo,
|
|
5163
|
-
onTrialRequest: handleTrialRequest,
|
|
5164
|
-
onFeatureRequest: handleFeatureRequest
|
|
5165
|
-
}), /* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(Button, {
|
|
5166
|
-
onClick: onClose,
|
|
5167
|
-
children: t("dashboardFilters.accessDenied.close")
|
|
5168
|
-
}) })] })]
|
|
5169
|
-
});
|
|
5170
|
-
};
|
|
5171
|
-
//#endregion
|
|
5172
|
-
//#region src/components/DashboardFilters/DayTypeSelector/styles.ts
|
|
5173
|
-
const styles$5 = {
|
|
5174
|
-
container: {
|
|
5175
|
-
display: "flex",
|
|
5176
|
-
alignItems: "center",
|
|
5177
|
-
gap: (theme) => theme.spacing(1)
|
|
5178
|
-
},
|
|
5179
|
-
label: {
|
|
5180
|
-
fontSize: "0.875rem",
|
|
5181
|
-
whiteSpace: "nowrap",
|
|
5182
|
-
color: (theme) => theme.palette.common.white
|
|
5183
|
-
},
|
|
5184
|
-
toggleGroup: { "& .MuiToggleButton-root": {
|
|
5185
|
-
padding: (theme) => theme.spacing(.5, 1.5),
|
|
5186
|
-
fontSize: "0.875rem",
|
|
5187
|
-
opacity: .7,
|
|
5188
|
-
color: (theme) => theme.palette.text.primary,
|
|
5189
|
-
textTransform: "none",
|
|
5190
|
-
borderRadius: "6px",
|
|
5191
|
-
"&.Mui-selected": {
|
|
5192
|
-
opacity: 1,
|
|
5193
|
-
color: (theme) => theme.palette.common.white,
|
|
5194
|
-
backgroundColor: (theme) => theme.palette.primary.main,
|
|
5195
|
-
"&:hover": { backgroundColor: (theme) => theme.palette.primary.dark }
|
|
5196
|
-
}
|
|
5197
|
-
} }
|
|
5198
|
-
};
|
|
5199
|
-
//#endregion
|
|
5200
|
-
//#region src/components/DashboardFilters/DayTypeSelector/index.tsx
|
|
5201
|
-
const DayTypeSelector = ({ value, onChange }) => {
|
|
5202
|
-
const { t } = useTranslation();
|
|
5203
|
-
const handleChange = useCallback((_event, newValue) => {
|
|
5204
|
-
if (newValue !== null) onChange(newValue);
|
|
5205
|
-
}, [onChange]);
|
|
5206
|
-
return /* @__PURE__ */ jsxs(Box, {
|
|
5207
|
-
sx: styles$5.container,
|
|
5208
|
-
children: [/* @__PURE__ */ jsx(Typography, {
|
|
5209
|
-
sx: styles$5.label,
|
|
5210
|
-
children: t("dashboardFilters.dayType.label")
|
|
5211
|
-
}), /* @__PURE__ */ jsxs(ToggleButtonGroup, {
|
|
5212
|
-
value,
|
|
5213
|
-
exclusive: true,
|
|
5214
|
-
onChange: handleChange,
|
|
5215
|
-
size: "small",
|
|
5216
|
-
sx: styles$5.toggleGroup,
|
|
5217
|
-
"data-testid": "dashboard-filters.day-type-selector",
|
|
5218
|
-
children: [/* @__PURE__ */ jsx(ToggleButton, {
|
|
5219
|
-
value: DayType.Calendar,
|
|
5220
|
-
"data-testid": "dashboard-filters.day-type-calendar",
|
|
5221
|
-
children: t("dashboardFilters.dayType.calendar")
|
|
5222
|
-
}), /* @__PURE__ */ jsx(ToggleButton, {
|
|
5223
|
-
value: DayType.Production,
|
|
5224
|
-
"data-testid": "dashboard-filters.day-type-production",
|
|
5225
|
-
children: t("dashboardFilters.dayType.production")
|
|
5226
|
-
})]
|
|
5227
|
-
})]
|
|
5228
|
-
});
|
|
5229
|
-
};
|
|
5230
|
-
//#endregion
|
|
5231
5007
|
//#region src/helpers/shifts.ts
|
|
5232
5008
|
const setDate = (date, shiftDate) => {
|
|
5233
5009
|
return shiftDate.year(date.year()).month(date.month()).date(date.date());
|
|
@@ -5685,6 +5461,230 @@ const getNextBoundary = (periodId, ctx) => {
|
|
|
5685
5461
|
}
|
|
5686
5462
|
};
|
|
5687
5463
|
//#endregion
|
|
5464
|
+
//#region src/locales/index.ts
|
|
5465
|
+
const resources = {
|
|
5466
|
+
en: { translation: {
|
|
5467
|
+
"Are you sure you want to delete this widget?": "Are you sure you want to delete this widget?",
|
|
5468
|
+
Cancel: "Cancel",
|
|
5469
|
+
Delete: "Delete",
|
|
5470
|
+
widgetCard: {
|
|
5471
|
+
"error": "Widget encountered an error",
|
|
5472
|
+
"retry": "Retry"
|
|
5473
|
+
},
|
|
5474
|
+
dashboardFilters: {
|
|
5475
|
+
"dayType": {
|
|
5476
|
+
"label": "Day type",
|
|
5477
|
+
"calendar": "Calendar",
|
|
5478
|
+
"production": "Production"
|
|
5479
|
+
},
|
|
5480
|
+
"shifts": {
|
|
5481
|
+
"label": "Shifts",
|
|
5482
|
+
"allShifts": "All shifts"
|
|
5483
|
+
},
|
|
5484
|
+
"dateRange": {
|
|
5485
|
+
"label": "Date range",
|
|
5486
|
+
"from": "From",
|
|
5487
|
+
"to": "To"
|
|
5488
|
+
},
|
|
5489
|
+
"search": {
|
|
5490
|
+
"placeholder": "Search periods...",
|
|
5491
|
+
"noResults": "No periods found"
|
|
5492
|
+
},
|
|
5493
|
+
"premium": { "indicator": "Premium" },
|
|
5494
|
+
"periods": {
|
|
5495
|
+
"currentShift": "Current shift",
|
|
5496
|
+
"lastShift": "Previous shift",
|
|
5497
|
+
"today": "Today",
|
|
5498
|
+
"yesterday": "Yesterday",
|
|
5499
|
+
"last7Days": "Last 7 days",
|
|
5500
|
+
"last14Days": "Last 14 days",
|
|
5501
|
+
"last30Days": "Last 30 days",
|
|
5502
|
+
"last90Days": "Last 90 days",
|
|
5503
|
+
"last180Days": "Last 180 days",
|
|
5504
|
+
"last365Days": "Last 365 days",
|
|
5505
|
+
"currentWeek": "Current week",
|
|
5506
|
+
"currentMonth": "Current month",
|
|
5507
|
+
"currentQuarter": "Current quarter",
|
|
5508
|
+
"currentYear": "Current year",
|
|
5509
|
+
"previousWeek": "Previous week",
|
|
5510
|
+
"previousMonth": "Previous month",
|
|
5511
|
+
"previousQuarter": "Previous quarter",
|
|
5512
|
+
"previousYear": "Previous year",
|
|
5513
|
+
"last2Weeks": "Last 2 weeks",
|
|
5514
|
+
"last4Weeks": "Last 4 weeks",
|
|
5515
|
+
"last8Weeks": "Last 8 weeks",
|
|
5516
|
+
"last12Weeks": "Last 12 weeks",
|
|
5517
|
+
"last3Months": "Last 3 months",
|
|
5518
|
+
"last6Months": "Last 6 months",
|
|
5519
|
+
"last12Months": "Last 12 months",
|
|
5520
|
+
"week": "Week {{week}}"
|
|
5521
|
+
},
|
|
5522
|
+
"accessDenied": {
|
|
5523
|
+
"title": "Premium feature",
|
|
5524
|
+
"close": "Close"
|
|
5525
|
+
}
|
|
5526
|
+
}
|
|
5527
|
+
} },
|
|
5528
|
+
pl: { translation: {
|
|
5529
|
+
"Are you sure you want to delete this widget?": "Czy na pewno usunąć ten widżet?",
|
|
5530
|
+
Cancel: "Anuluj",
|
|
5531
|
+
Delete: "Usuń",
|
|
5532
|
+
widgetCard: {
|
|
5533
|
+
"error": "Widżet napotkał błąd",
|
|
5534
|
+
"retry": "Ponów"
|
|
5535
|
+
},
|
|
5536
|
+
dashboardFilters: {
|
|
5537
|
+
"dayType": {
|
|
5538
|
+
"label": "Typ dnia",
|
|
5539
|
+
"calendar": "Kalendarzowy",
|
|
5540
|
+
"production": "Produkcyjny"
|
|
5541
|
+
},
|
|
5542
|
+
"shifts": {
|
|
5543
|
+
"label": "Zmiany",
|
|
5544
|
+
"allShifts": "Wszystkie zmiany"
|
|
5545
|
+
},
|
|
5546
|
+
"dateRange": {
|
|
5547
|
+
"label": "Zakres dat",
|
|
5548
|
+
"from": "Od",
|
|
5549
|
+
"to": "Do"
|
|
5550
|
+
},
|
|
5551
|
+
"search": {
|
|
5552
|
+
"placeholder": "Szukaj okresów...",
|
|
5553
|
+
"noResults": "Nie znaleziono okresów"
|
|
5554
|
+
},
|
|
5555
|
+
"premium": { "indicator": "Premium" },
|
|
5556
|
+
"periods": {
|
|
5557
|
+
"currentShift": "Aktualna zmiana",
|
|
5558
|
+
"lastShift": "Poprzednia zmiana",
|
|
5559
|
+
"today": "Dzisiaj",
|
|
5560
|
+
"yesterday": "Wczoraj",
|
|
5561
|
+
"last7Days": "Ostatnie 7 dni",
|
|
5562
|
+
"last14Days": "Ostatnie 14 dni",
|
|
5563
|
+
"last30Days": "Ostatnie 30 dni",
|
|
5564
|
+
"last90Days": "Ostatnie 90 dni",
|
|
5565
|
+
"last180Days": "Ostatnie 180 dni",
|
|
5566
|
+
"last365Days": "Ostatnie 365 dni",
|
|
5567
|
+
"currentWeek": "Bieżący tydzień",
|
|
5568
|
+
"currentMonth": "Bieżący miesiąc",
|
|
5569
|
+
"currentQuarter": "Bieżący kwartał",
|
|
5570
|
+
"currentYear": "Bieżący rok",
|
|
5571
|
+
"previousWeek": "Poprzedni tydzień",
|
|
5572
|
+
"previousMonth": "Poprzedni miesiąc",
|
|
5573
|
+
"previousQuarter": "Poprzedni kwartał",
|
|
5574
|
+
"previousYear": "Poprzedni rok",
|
|
5575
|
+
"last2Weeks": "Ostatnie 2 tygodnie",
|
|
5576
|
+
"last4Weeks": "Ostatnie 4 tygodnie",
|
|
5577
|
+
"last8Weeks": "Ostatnie 8 tygodni",
|
|
5578
|
+
"last12Weeks": "Ostatnie 12 tygodni",
|
|
5579
|
+
"last3Months": "Ostatnie 3 miesiące",
|
|
5580
|
+
"last6Months": "Ostatnie 6 miesięcy",
|
|
5581
|
+
"last12Months": "Ostatnie 12 miesięcy",
|
|
5582
|
+
"week": "Tydzień {{week}}"
|
|
5583
|
+
},
|
|
5584
|
+
"accessDenied": {
|
|
5585
|
+
"title": "Funkcja Premium",
|
|
5586
|
+
"close": "Zamknij"
|
|
5587
|
+
}
|
|
5588
|
+
}
|
|
5589
|
+
} }
|
|
5590
|
+
};
|
|
5591
|
+
//#endregion
|
|
5592
|
+
//#region src/components/DashboardFilters/AccessDeniedModal/styles.ts
|
|
5593
|
+
const styles$6 = { dialog: {
|
|
5594
|
+
"& .MuiDialog-paper": { borderRadius: "6px" },
|
|
5595
|
+
"& .MuiDialogContent-root": { padding: 0 }
|
|
5596
|
+
} };
|
|
5597
|
+
//#endregion
|
|
5598
|
+
//#region src/components/DashboardFilters/AccessDeniedModal/index.tsx
|
|
5599
|
+
const FEATURE_KEY$1 = "feature.dashboard_extended_date_ranges";
|
|
5600
|
+
const AccessDeniedModal = ({ open, onClose, accessState, buttons, daysSinceExpiry, cooldownInfo, workplaceId, onFeatureRequest }) => {
|
|
5601
|
+
const handleTrialRequest = useCallback(() => Promise.resolve(false), []);
|
|
5602
|
+
const handleFeatureRequest = useCallback(async (payload) => {
|
|
5603
|
+
const success = onFeatureRequest ? await onFeatureRequest(payload) : false;
|
|
5604
|
+
if (success) onClose();
|
|
5605
|
+
return success;
|
|
5606
|
+
}, [onFeatureRequest, onClose]);
|
|
5607
|
+
const { t } = useTranslation();
|
|
5608
|
+
return /* @__PURE__ */ jsxs(Dialog, {
|
|
5609
|
+
open,
|
|
5610
|
+
onClose,
|
|
5611
|
+
sx: styles$6.dialog,
|
|
5612
|
+
"data-testid": "dashboard-filters.access-denied-dialog",
|
|
5613
|
+
children: [/* @__PURE__ */ jsx(DialogTitle, { children: t("dashboardFilters.accessDenied.title") }), /* @__PURE__ */ jsxs(DialogContent, { children: [/* @__PURE__ */ jsx(AccessBlocker, {
|
|
5614
|
+
accessState,
|
|
5615
|
+
buttons,
|
|
5616
|
+
daysSinceExpiry: daysSinceExpiry ?? void 0,
|
|
5617
|
+
featureKey: FEATURE_KEY$1,
|
|
5618
|
+
workplaceId,
|
|
5619
|
+
cooldownInfo,
|
|
5620
|
+
onTrialRequest: handleTrialRequest,
|
|
5621
|
+
onFeatureRequest: handleFeatureRequest
|
|
5622
|
+
}), /* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(Button, {
|
|
5623
|
+
onClick: onClose,
|
|
5624
|
+
children: t("dashboardFilters.accessDenied.close")
|
|
5625
|
+
}) })] })]
|
|
5626
|
+
});
|
|
5627
|
+
};
|
|
5628
|
+
//#endregion
|
|
5629
|
+
//#region src/components/DashboardFilters/DayTypeSelector/styles.ts
|
|
5630
|
+
const styles$5 = {
|
|
5631
|
+
container: {
|
|
5632
|
+
display: "flex",
|
|
5633
|
+
alignItems: "center",
|
|
5634
|
+
gap: (theme) => theme.spacing(1)
|
|
5635
|
+
},
|
|
5636
|
+
label: {
|
|
5637
|
+
fontSize: "0.875rem",
|
|
5638
|
+
whiteSpace: "nowrap",
|
|
5639
|
+
color: (theme) => theme.palette.common.white
|
|
5640
|
+
},
|
|
5641
|
+
toggleGroup: { "& .MuiToggleButton-root": {
|
|
5642
|
+
padding: (theme) => theme.spacing(.5, 1.5),
|
|
5643
|
+
fontSize: "0.875rem",
|
|
5644
|
+
opacity: .7,
|
|
5645
|
+
color: (theme) => theme.palette.text.primary,
|
|
5646
|
+
textTransform: "none",
|
|
5647
|
+
borderRadius: "6px",
|
|
5648
|
+
"&.Mui-selected": {
|
|
5649
|
+
opacity: 1,
|
|
5650
|
+
color: (theme) => theme.palette.common.white,
|
|
5651
|
+
backgroundColor: (theme) => theme.palette.primary.main,
|
|
5652
|
+
"&:hover": { backgroundColor: (theme) => theme.palette.primary.dark }
|
|
5653
|
+
}
|
|
5654
|
+
} }
|
|
5655
|
+
};
|
|
5656
|
+
//#endregion
|
|
5657
|
+
//#region src/components/DashboardFilters/DayTypeSelector/index.tsx
|
|
5658
|
+
const DayTypeSelector = ({ value, onChange }) => {
|
|
5659
|
+
const { t } = useTranslation();
|
|
5660
|
+
const handleChange = useCallback((_event, newValue) => {
|
|
5661
|
+
if (newValue !== null) onChange(newValue);
|
|
5662
|
+
}, [onChange]);
|
|
5663
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
5664
|
+
sx: styles$5.container,
|
|
5665
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
5666
|
+
sx: styles$5.label,
|
|
5667
|
+
children: t("dashboardFilters.dayType.label")
|
|
5668
|
+
}), /* @__PURE__ */ jsxs(ToggleButtonGroup, {
|
|
5669
|
+
value,
|
|
5670
|
+
exclusive: true,
|
|
5671
|
+
onChange: handleChange,
|
|
5672
|
+
size: "small",
|
|
5673
|
+
sx: styles$5.toggleGroup,
|
|
5674
|
+
"data-testid": "dashboard-filters.day-type-selector",
|
|
5675
|
+
children: [/* @__PURE__ */ jsx(ToggleButton, {
|
|
5676
|
+
value: DayType.Calendar,
|
|
5677
|
+
"data-testid": "dashboard-filters.day-type-calendar",
|
|
5678
|
+
children: t("dashboardFilters.dayType.calendar")
|
|
5679
|
+
}), /* @__PURE__ */ jsx(ToggleButton, {
|
|
5680
|
+
value: DayType.Production,
|
|
5681
|
+
"data-testid": "dashboard-filters.day-type-production",
|
|
5682
|
+
children: t("dashboardFilters.dayType.production")
|
|
5683
|
+
})]
|
|
5684
|
+
})]
|
|
5685
|
+
});
|
|
5686
|
+
};
|
|
5687
|
+
//#endregion
|
|
5688
5688
|
//#region src/components/DashboardFilters/PeriodList/styles.ts
|
|
5689
5689
|
const styles$4 = {
|
|
5690
5690
|
container: {
|
|
@@ -5909,7 +5909,7 @@ const RangeDay = ({ fromDate, toDate, day, ...other }) => {
|
|
|
5909
5909
|
const isSingleDay = isStart && isEnd;
|
|
5910
5910
|
return /* @__PURE__ */ jsx(Box, {
|
|
5911
5911
|
sx: mergeSx(styles$3.rangeDay, isInRange && !isSingleDay && styles$3.rangeDayInRange, isStart && !isSingleDay && styles$3.rangeDayStart, isEnd && !isSingleDay && styles$3.rangeDayEnd),
|
|
5912
|
-
children: /* @__PURE__ */ jsx(
|
|
5912
|
+
children: /* @__PURE__ */ jsx(PickerDay, {
|
|
5913
5913
|
day,
|
|
5914
5914
|
...other
|
|
5915
5915
|
})
|
|
@@ -6023,7 +6023,10 @@ const styles$2 = {
|
|
|
6023
6023
|
fontSize: "0.875rem",
|
|
6024
6024
|
opacity: .8
|
|
6025
6025
|
},
|
|
6026
|
-
select: {
|
|
6026
|
+
select: {
|
|
6027
|
+
minWidth: 200,
|
|
6028
|
+
maxWidth: 350
|
|
6029
|
+
},
|
|
6027
6030
|
menuItem: { padding: (theme) => theme.spacing(.5, 1) },
|
|
6028
6031
|
listItemText: {
|
|
6029
6032
|
"& .MuiListItemText-primary": { fontSize: "0.875rem" },
|
|
@@ -6036,7 +6039,7 @@ const styles$2 = {
|
|
|
6036
6039
|
};
|
|
6037
6040
|
//#endregion
|
|
6038
6041
|
//#region src/components/DashboardFilters/ShiftSelector/index.tsx
|
|
6039
|
-
const ShiftSelector = ({ shifts, selectedShiftIds, onChange }) => {
|
|
6042
|
+
const ShiftSelector = ({ shifts, selectedShiftIds, onChange, disabled = false }) => {
|
|
6040
6043
|
const { t } = useTranslation();
|
|
6041
6044
|
const handleChange = useCallback((event) => {
|
|
6042
6045
|
const value = event.target.value;
|
|
@@ -6044,12 +6047,15 @@ const ShiftSelector = ({ shifts, selectedShiftIds, onChange }) => {
|
|
|
6044
6047
|
}, [onChange]);
|
|
6045
6048
|
const renderValue = useCallback((selected) => {
|
|
6046
6049
|
if (selected.length === 0) return t("dashboardFilters.shifts.allShifts");
|
|
6047
|
-
|
|
6050
|
+
const selectedNames = shifts.filter((s) => selected.includes(s.id)).map((s) => s.name);
|
|
6051
|
+
if (selectedNames.length === 1) return selectedNames[0];
|
|
6052
|
+
return `${selectedNames[0]} (+${selectedNames.length - 1})`;
|
|
6048
6053
|
}, [shifts, t]);
|
|
6049
6054
|
return /* @__PURE__ */ jsx(Box, {
|
|
6050
6055
|
sx: styles$2.container,
|
|
6051
6056
|
children: /* @__PURE__ */ jsxs(FormControl, {
|
|
6052
6057
|
size: "small",
|
|
6058
|
+
disabled,
|
|
6053
6059
|
sx: styles$2.select,
|
|
6054
6060
|
"data-testid": "dashboard-filters.shift-selector",
|
|
6055
6061
|
children: [/* @__PURE__ */ jsx(InputLabel, {
|
|
@@ -6261,6 +6267,10 @@ const DashboardFilters = ({ initialValues, onChange, shifts = [], onFeatureReque
|
|
|
6261
6267
|
return features.find((f) => f.featureKey === FEATURE_KEY)?.daysSinceExpiry ?? null;
|
|
6262
6268
|
}, [features]);
|
|
6263
6269
|
const filteredButtons = useMemo(() => buttons.filter((b) => b.action !== "start_trial"), [buttons]);
|
|
6270
|
+
const isShiftLocked = useMemo(() => {
|
|
6271
|
+
if (!selectedPeriodId) return false;
|
|
6272
|
+
return periods.find((p) => p.id === selectedPeriodId)?.category === "shift_based";
|
|
6273
|
+
}, [selectedPeriodId]);
|
|
6264
6274
|
const handlePeriodSelect = useCallback((period, dateRange) => {
|
|
6265
6275
|
if (period.needAccess && !hasAccess) {
|
|
6266
6276
|
setAccessModalOpen(true);
|
|
@@ -6302,7 +6312,8 @@ const DashboardFilters = ({ initialValues, onChange, shifts = [], onFeatureReque
|
|
|
6302
6312
|
}), /* @__PURE__ */ jsx(ShiftSelector, {
|
|
6303
6313
|
shifts,
|
|
6304
6314
|
selectedShiftIds: filterValues.shiftIds,
|
|
6305
|
-
onChange: handlers.handleShiftChange
|
|
6315
|
+
onChange: handlers.handleShiftChange,
|
|
6316
|
+
disabled: isShiftLocked
|
|
6306
6317
|
})]
|
|
6307
6318
|
}),
|
|
6308
6319
|
/* @__PURE__ */ jsx(Popover, {
|
|
@@ -7070,6 +7081,7 @@ const styles = {
|
|
|
7070
7081
|
},
|
|
7071
7082
|
content: {
|
|
7072
7083
|
position: "relative",
|
|
7084
|
+
overflow: "hidden",
|
|
7073
7085
|
height: "calc(100% - 40px)",
|
|
7074
7086
|
padding: 0,
|
|
7075
7087
|
background: "transparent",
|
|
@@ -7085,7 +7097,6 @@ const styles = {
|
|
|
7085
7097
|
display: "block",
|
|
7086
7098
|
width: "100%",
|
|
7087
7099
|
height: "1px",
|
|
7088
|
-
borderRadius: "inherit",
|
|
7089
7100
|
transform: "scaleX(0)",
|
|
7090
7101
|
transformOrigin: "left",
|
|
7091
7102
|
transition: "transform 150ms ease",
|
|
@@ -7332,7 +7343,7 @@ const generateTimeRange = (start, end, unit, step) => {
|
|
|
7332
7343
|
};
|
|
7333
7344
|
//#endregion
|
|
7334
7345
|
//#region src/version.ts
|
|
7335
|
-
const LIBRARY_VERSION = "1.5.
|
|
7346
|
+
const LIBRARY_VERSION = "1.5.73";
|
|
7336
7347
|
//#endregion
|
|
7337
7348
|
export { AccessRequestTypeEnum, ActualStaffingCountsDocument, AndonLightColor, ApplicationInfoDocument, AssignOperatorDocument, AssignOperatorToWorkplaceDocument, AvailabilityInsightsDocument, AvailabilityStatus, BulkUpsertStaffingPlansDocument, CompanyConfigDocument, ConfirmTooltip, CounterDirectoriesDocument, CounterKindEnum, CountersDocument, CreateDashboardDocument, CreateOrderDocument, CreateProductDocument, CreateStaffingPlanDocument, CreateStatusChangeDocument, CreateUserPresenceDocument, CreateWidgetDocument, CurrentUserDocument, DashboardFilters, DashboardsDocument, DayType, DepartmentsDocument, EditWorkOrderDocument, FloorPlansDocument, GetAvailabilityInsightsDocument, GetCompanyConfigDocument, GetProductionInsightsDocument, GetStatusInsightsDocument, GetWorkOrdersInsightsDocument, GetWorkplacePerformanceInsightsDocument, GraphqlWsClient, InsightsAggregation, ListActualStaffingCountsDocument, ListFloorPlansDocument, ListMetricValuesDocument, ListMetricsDocument, ListReasonsDocument, ListShiftsDocument, ListStaffingPlansDocument, ListStatusChangesDocument, ListWorkOrdersDocument, ListWorkplaceAssignmentsDocument, ListWorkplacesDocument, MetricCard, MetricTypeEnum, MetricUnitEnum, MetricValuesDocument, MetricsDocument, NotificationsDocument, OrdersDocument, OrdersExecutionsDocument, PauseOrderExecutionDocument, Period, PresenceStatusEnum, ProductionInsightsDocument, ProductionMode, ProductsDocument, ReasonsDocument, ReasonsRecommendationDocument, RemoveDashboardDocument, RemoveStaffingPlanDocument, RemoveUserPresenceDocument, RemoveWidgetDocument, RemoveWorkplaceUsersPresencesDocument, RequestFeatureAccessDocument, ScreenEnum, SetCounterDocument, ShiftsDocument, SortableSelect, StaffingPlansDocument, StandardRatesDocument, StartOrderExecutionDocument, StartTrialDocument, StatusChangeTransitionPermissionsDocument, StatusChangesDocument, StatusInsightsDocument, StatusScreenDisplayBlocksEnum, StopOrderExecutionDocument, TrainingStatus, UnassignOperatorDocument, UnassignOperatorFromWorkplaceDocument, UpdateDashboardDocument, UpdateNotificationDocument, UpdateOrderDocument, UpdateOrderExecutionDocument, UpdateStaffingPlanDocument, UpdateStatusChangeDocument, UpdateWidgetDocument, UpdateWorkOrderDocument, UsersDocument, UsersPresencesDocument, WidgetCard, WidgetDocument, WidgetErrorBoundary, WidgetsDocument, WorkOrderCreationMethodEnum, WorkOrderPriorityEnum, WorkOrderStatusEnum, WorkOrdersDocument, WorkOrdersInsightsDocument, WorkplaceAssignmentsDocument, WorkplaceEvent, WorkplaceEventDocument, WorkplacePerformanceInsightsDocument, WorkplacesDocument, findPeriodById, generateTimeRange, getCurrentShift, getGqlWsClient, getGraphqlSdk, getNextBoundary, getRecentShift, getSdk, getShiftTimeRange, getTimeRangeLabel, getValidAggregations, normalizeShifts, periods, resolveAggregation, resolveShiftIdForPeriod, useGqlClients, LIBRARY_VERSION as version };
|
|
7338
7349
|
|