@topconsultnpm/sdkui-react-beta 6.10.30 → 6.10.32
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.
|
@@ -188,8 +188,18 @@ const TMPage = ({ id, objClass = ObjectClasses.None, objType, listInsteadOfConte
|
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
190
|
};
|
|
191
|
+
function User_IsExpired(d) {
|
|
192
|
+
if (d == undefined)
|
|
193
|
+
return false;
|
|
194
|
+
let ud = d;
|
|
195
|
+
const today = new Date();
|
|
196
|
+
return (ud.validFrom && today < ud.validFrom) || (ud.validTo && today > ud.validTo);
|
|
197
|
+
}
|
|
191
198
|
const cellRenderObjectIcon = (data) => { return PlatformObjectService.getIcon(objClass, data.row.data); };
|
|
192
|
-
const cellRenderNameExpired = (data) => {
|
|
199
|
+
const cellRenderNameExpired = (data) => {
|
|
200
|
+
let isExpired = objClass == ObjectClasses.User && User_IsExpired(data.row.data);
|
|
201
|
+
return _jsx("div", { style: { color: isExpired ? 'gray' : 'black' }, children: _jsx("p", { children: data.row.data }) });
|
|
202
|
+
};
|
|
193
203
|
return (_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, isCancelable: true, abortController: abortController, children: _jsxs(TMSplitterLayout, { direction: "horizontal", showSeparator: showList && deviceType !== DeviceType.MOBILE, separatorSize: 10, separatorColor: 'transparent', separatorActiveColor: 'transparent', start: showList ? deviceType !== DeviceType.MOBILE ? ['30%', '70%'] : ['100%', '0%'] : ['0', '100%'], min: ['0px', '0px'], children: [listInsteadOfContent ??
|
|
194
204
|
_jsxs(TMToolbarCard, { title: objNames, children: [_jsx(ToolbarPage, {}), _jsxs(DataGrid, { disabled: selectionListDisabled, ref: (grid) => (gridInstance = grid), height: "calc(100% - 35px)", width: 'calc(100% - 5px)', dataSource: items, keyExpr: "id", allowColumnResizing: true, columnResizingMode: "widget", allowColumnReordering: true, showBorders: false, onContentReady: (e) => {
|
|
195
205
|
setVisibleItems(e.component.getVisibleRows().map((row) => { return row.data; }));
|