@topconsultnpm/sdkui-react 6.22.0-dev2.13 → 6.22.0-dev2.14

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.
@@ -3,7 +3,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
3
  import { DcmtTypeListCacheService, LayoutModes, ObjectClasses, SDK_Globals, SDK_Localizator } from '@topconsultnpm/sdk-ts';
4
4
  import TMRelationViewer from './TMRelationViewer';
5
5
  import TMContextMenu from '../../NewComponents/ContextMenu/TMContextMenu';
6
- import { IconMultipleSelection, IconCheckFile, IconDetailDcmts, SDKUI_Localizator, IconMenuVertical, IconDataList, IconPreview, IconSearchCheck, IconBoard, IconDcmtTypeSys, IconShow, getMoreInfoTasksForDocument, isApprovalWorkflowView, searchResultToMetadataValues, IconRefresh } from '../../../helper';
6
+ import { IconMultipleSelection, IconCheckFile, IconDetailDcmts, SDKUI_Localizator, IconMenuVertical, IconDataList, IconPreview, IconSearchCheck, IconBoard, IconDcmtTypeSys, IconShow, getMoreInfoTasksForDocument, isApprovalWorkflowView, searchResultToMetadataValues, IconRefresh, SDKUI_Globals } from '../../../helper';
7
7
  import { FormModes, SearchResultContext } from '../../../ts';
8
8
  import { TMColors } from '../../../utils/theme';
9
9
  import ShowAlert from '../../base/TMAlert';
@@ -23,7 +23,7 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
23
23
  const floatingBarContainerRef = useRef(null);
24
24
  const [focusedItem, setFocusedItem] = useState();
25
25
  const [selectedItems, setSelectedItems] = useState([]);
26
- const [showZeroDcmts, setShowZeroDcmts] = useState(false);
26
+ const [showZeroDcmts, setShowZeroDcmts] = useState(() => SDKUI_Globals.userSettings?.searchSettings?.relationShowZeroDcmts ?? false);
27
27
  const [allowMultipleSelection, setAllowMultipleSelection] = useState(false);
28
28
  const [dtdMaster, setDtdMaster] = useState();
29
29
  const [noRelationsOnFirstLoad, setNoRelationsOnFirstLoad] = useState(false);
@@ -300,7 +300,11 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
300
300
  icon: _jsx(IconCheckFile, { color: showZeroDcmts ? TMColors.tertiary : TMColors.text_normal }),
301
301
  name: showZeroDcmts ? SDKUI_Localizator.HideDetailsWithZeroDocs : SDKUI_Localizator.ShowDetailsWithZeroDocs,
302
302
  onClick: () => {
303
- setShowZeroDcmts(prev => !prev);
303
+ setShowZeroDcmts(prev => {
304
+ const newValue = !prev;
305
+ SDKUI_Globals.userSettings.searchSettings.relationShowZeroDcmts = newValue;
306
+ return newValue;
307
+ });
304
308
  }
305
309
  },
306
310
  {
@@ -85,6 +85,7 @@ export declare class SearchSettings {
85
85
  };
86
86
  };
87
87
  relationExpandLevel: number;
88
+ relationShowZeroDcmts: boolean;
88
89
  }
89
90
  export declare class FloatingMenuBarSettings {
90
91
  orientation?: 'horizontal' | 'vertical';
@@ -143,6 +143,7 @@ export class SearchSettings {
143
143
  this.floatingMenuBar = new FloatingMenuBarSettings();
144
144
  this.panelLayout = {};
145
145
  this.relationExpandLevel = 4; // Livello di espansione predefinito per le correlazioni
146
+ this.relationShowZeroDcmts = false;
146
147
  }
147
148
  }
148
149
  export class FloatingMenuBarSettings {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.22.0-dev2.13",
3
+ "version": "6.22.0-dev2.14",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",