@topconsultnpm/sdkui-react-beta 6.11.26 → 6.11.27

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.
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
- import { OwnershipLevels, SDK_Localizator, UserLevels, UserListCacheService } from '@topconsultnpm/sdk-ts-beta';
3
+ import { OwnershipLevels, SDK_Localizator, UserLevels, UserListCacheService, UserTypes } from '@topconsultnpm/sdk-ts-beta';
4
4
  import { Column } from 'devextreme-react/cjs/data-grid';
5
- import { SDKUI_Localizator, IconSearch, IconUserLevelMember, IconUserLevelAdministrator, IconUserLevelSystemAdministrator, IconUserLevelAutonomousAdministrator, IconWarning, LocalizeOwnershipLevels, LocalizeUserLevels } from '../../helper';
5
+ import { SDKUI_Localizator, IconSearch, IconUserLevelMember, IconUserLevelAdministrator, IconUserLevelSystemAdministrator, IconUserLevelAutonomousAdministrator, IconWarning, LocalizeOwnershipLevels, LocalizeUserLevels, IconFactory, IconWorkspace } from '../../helper';
6
6
  import { StyledDivHorizontal, StyledTooltipContainer, StyledTooltipSeparatorItem } from '../base/Styled';
7
7
  import TMSpinner from '../base/TMSpinner';
8
8
  import TMTooltip from '../base/TMTooltip';
@@ -83,7 +83,7 @@ export const TMUserIcon = ({ ud }) => {
83
83
  if (!ud)
84
84
  return null;
85
85
  let isExpired = User_IsExpired(ud);
86
- let icon = getUserIcon(ud.level, ud.ownershipLevel, isExpired);
86
+ let icon = getUserIconWithType(ud.level, ud.ownershipLevel, ud.type, isExpired);
87
87
  return (_jsx(TMUserTooltip, { ud: ud, children: icon }));
88
88
  };
89
89
  export const TMUserTooltip = ({ ud, children }) => {
@@ -108,6 +108,13 @@ function User_IsExpired(d) {
108
108
  const today = new Date();
109
109
  return (ud.validFrom && today < ud.validFrom) || (ud.validTo && today > ud.validTo) || ud.disabled;
110
110
  }
111
+ const getUserIconWithType = (userLevel, level, type, isExpired) => {
112
+ if (!type || type == UserTypes.TopMedia)
113
+ return (_jsxs(StyledDivHorizontal, { children: [getUserIcon(userLevel, level, isExpired), " ", _jsx(IconFactory, { fontSize: 16 })] }));
114
+ if (type && type == UserTypes.Windows)
115
+ return (_jsxs(StyledDivHorizontal, { children: [getUserIcon(userLevel, level, isExpired), " ", _jsx(IconWorkspace, { fontSize: 16 })] }));
116
+ return _jsx(_Fragment, {});
117
+ };
111
118
  const getUserIcon = (userLevel, level, isExpired) => {
112
119
  let ownershipColor = "";
113
120
  if (isExpired)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.11.26",
3
+ "version": "6.11.27",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",