andoncloud-station-assignment-widget 1.0.2 → 1.0.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.
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { GqlClients } from 'andoncloud-dashboard-toolkit';
3
+ import { ViewState, WidgetData } from '@/types';
4
+ interface MainContentProps {
5
+ userId: string;
6
+ data: WidgetData;
7
+ gqlClients: GqlClients;
8
+ viewState: ViewState;
9
+ onAssignToWorkplace?: (userId: string, workplaceId: string) => void;
10
+ }
11
+ declare const MainContent: React.FC<MainContentProps>;
12
+ export default MainContent;
@@ -0,0 +1,5 @@
1
+ import { SxProps, Theme } from '@mui/material/styles';
2
+ import { PresenceStatusEnum } from 'andoncloud-dashboard-toolkit';
3
+ export declare const makePresenceIndicatorStyles: (status: PresenceStatusEnum) => SxProps<Theme>;
4
+ declare const styles: Record<string, SxProps<Theme>>;
5
+ export default styles;
@@ -8,6 +8,8 @@ interface OperatorCardProps {
8
8
  draggableId: string;
9
9
  showPresence?: boolean;
10
10
  presenceStatus?: PresenceStatusEnum;
11
+ isUnplanned?: boolean;
12
+ onClick?: () => void;
11
13
  onRemove?: () => void;
12
14
  }
13
15
  interface DraggingOperatorCardProps {
@@ -1,6 +1,7 @@
1
1
  import { SxProps, Theme } from '@mui/material';
2
2
  import { PresenceStatusEnum } from 'andoncloud-dashboard-toolkit';
3
- export declare const makeCardStyles: (dragging?: boolean) => SxProps<Theme>;
3
+ export declare const makeCardStyles: (dragging?: boolean, clickable?: boolean) => SxProps<Theme>;
4
4
  export declare const makePresenceDotStyles: (status: PresenceStatusEnum) => SxProps<Theme>;
5
+ export declare const unplannedDotStyles: SxProps<Theme>;
5
6
  declare const styles: Record<string, SxProps<Theme>>;
6
7
  export default styles;
@@ -2,6 +2,8 @@ import React from 'react';
2
2
  import { OperatorUser } from '@/types';
3
3
  interface PoolColumnProps {
4
4
  operators: OperatorUser[];
5
+ unplannedUserIds?: Set<string>;
6
+ onOperatorClick?: (userId: string, userName: string) => void;
5
7
  }
6
8
  declare const PoolColumn: React.FC<PoolColumnProps>;
7
9
  export default PoolColumn;
@@ -1,9 +1,12 @@
1
1
  import React from 'react';
2
2
  import { ListWorkplaceAssignments_WorkplaceWithAssignment } from 'andoncloud-dashboard-toolkit';
3
+ import { ViewState } from '@/types';
3
4
  interface WorkplaceColumnProps {
4
5
  assignment: ListWorkplaceAssignments_WorkplaceWithAssignment;
6
+ viewState: ViewState;
5
7
  registerRef?: (el: HTMLDivElement | null) => void;
6
8
  frozenHeight?: number;
9
+ onOperatorClick?: (userId: string, userName: string) => void;
7
10
  onRemoveOperator?: (userId: string) => void;
8
11
  }
9
12
  declare const WorkplaceColumn: React.FC<WorkplaceColumnProps>;
@@ -1,5 +1,6 @@
1
1
  import { SxProps, Theme } from '@mui/material';
2
- export declare const makeRootStyles: (isOvercapacity: boolean, frozenHeight?: number) => SxProps<Theme>;
2
+ type BorderStatus = 'normal' | 'overcapacity' | 'unplanned';
3
+ export declare const makeRootStyles: (borderStatus: BorderStatus, frozenHeight?: number, borderLabel?: string) => SxProps<Theme>;
3
4
  declare const styles: Record<string, SxProps<Theme>>;
4
- export declare const makeStatusBadgeStyles: (status: "missing" | "overcapacity" | "ok") => SxProps<Theme>;
5
+ export declare const makeStatusBadgeStyles: (status: "missing" | "overcapacity" | "ok" | "warning") => SxProps<Theme>;
5
6
  export default styles;
@@ -1,3 +1,17 @@
1
1
  import { DropResult } from '@hello-pangea/dnd';
2
+ import { ListWorkplaceAssignments_WorkplaceWithAssignment, PresenceStatusEnum } from 'andoncloud-dashboard-toolkit';
2
3
  import { WidgetData } from '@/types';
4
+ export declare const presenceLabelKeys: Record<PresenceStatusEnum, string>;
5
+ type QueryWorkplace = ListWorkplaceAssignments_WorkplaceWithAssignment['workplace'];
6
+ export interface OperatorContext {
7
+ presenceStatus?: PresenceStatusEnum;
8
+ assignedWorkplaceName?: string;
9
+ isUnplanned?: boolean;
10
+ checkedInWorkplace?: QueryWorkplace;
11
+ }
12
+ export declare const findOperatorContext: (data: WidgetData, userId: string) => OperatorContext;
13
+ export declare const isUnplannedDraggableId: (draggableId: string) => boolean;
14
+ export declare const extractUserId: (draggableId: string) => string;
15
+ export declare const makeUnplannedDraggableId: (userId: string) => string;
3
16
  export declare const getUpdatedData: (data: WidgetData, result: DropResult) => Pick<WidgetData, "workplaces" | "unassignedOperators"> | null;
17
+ export {};
@@ -1,12 +1,14 @@
1
1
  import React from 'react';
2
2
  import { GqlClients } from 'andoncloud-dashboard-toolkit';
3
+ import { SidePanelProps } from 'andoncloud-sdk';
3
4
  import { ViewState, WidgetData } from '@/types';
4
5
  interface AssignmentBoardProps {
5
6
  data: WidgetData;
6
7
  viewState: ViewState;
7
8
  gqlClients: GqlClients;
8
9
  updateData: (data: Partial<WidgetData>) => void;
9
- onMutationComplete: () => void;
10
+ updateSidePanelProps: (props: Partial<SidePanelProps>) => void;
11
+ refetchAssignments: () => void;
10
12
  }
11
13
  declare const AssignmentBoard: React.FC<AssignmentBoardProps>;
12
14
  export default AssignmentBoard;