@topconsultnpm/sdkui-react 6.21.0-dev3.22 → 6.21.0-dev3.24

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.
@@ -237,11 +237,7 @@ export const useDcmtOperations = () => {
237
237
  let nameZip = tid ? tid.toString() + ".zip" : operation.toString() + ".zip";
238
238
  switch (operation) {
239
239
  case DcmtOperationTypes.CopyCompliant:
240
- nameZip = "DuplicatoInformatico";
241
- let dtd = await DcmtTypeListCacheService.GetAsync(tid);
242
- if (dtd) {
243
- nameZip = `${dtd.name ?? "DuplicatoInformatico"}_${dtd.id ?? '1'}`;
244
- }
240
+ nameZip = `Duplicato_Informatico_${tid ?? '1'}`;
245
241
  break;
246
242
  }
247
243
  return nameZip.trim().toLowerCase().endsWith('.zip')
@@ -210,6 +210,14 @@ export const useDocumentOperations = (props) => {
210
210
  const isDisabledForMultiRow = () => {
211
211
  return selectedDcmtInfos.length === 0 || selectedDcmtInfos.every(d => d.TID === undefined || d.DID === undefined);
212
212
  };
213
+ const isDisabledForMultiRowCopyCompliant = () => {
214
+ let isNotSeletced = selectedDcmtInfos.length === 0 || selectedDcmtInfos.every(d => d.TID === undefined || d.DID === undefined);
215
+ if (isNotSeletced)
216
+ return true;
217
+ let isOnlyMetadata = selectedDcmtInfos.filter(d => d.FILEEXT === undefined).length === selectedDcmtInfos.length;
218
+ let isAllNotIsLex = selectedItemsFull.filter(d => d.ISLEX === undefined).length === selectedDcmtInfos.length;
219
+ return isOnlyMetadata || isAllNotIsLex;
220
+ };
213
221
  const onRefreshBlog = async () => {
214
222
  await onRefreshBlogForm?.();
215
223
  await onRefreshBlogDatagrid?.();
@@ -813,7 +821,7 @@ export const useDocumentOperations = (props) => {
813
821
  icon: _jsx(IconCopy, {}),
814
822
  name: SDKUI_Localizator.CopyCompliant,
815
823
  operationType: 'multiRow',
816
- disabled: isDisabledForMultiRow(),
824
+ disabled: isDisabledForMultiRowCopyCompliant(),
817
825
  onClick: async () => { await runOperationAsync(selectedDcmtInfos, DcmtOperationTypes.CopyCompliant); }
818
826
  };
819
827
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.21.0-dev3.22",
3
+ "version": "6.21.0-dev3.24",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -40,7 +40,7 @@
40
40
  "lib"
41
41
  ],
42
42
  "dependencies": {
43
- "@topconsultnpm/sdk-ts": "6.21.0-dev3.2",
43
+ "@topconsultnpm/sdk-ts": "6.21.0-dev3.3",
44
44
  "@zip.js/zip.js": "2.8.26",
45
45
  "buffer": "^6.0.3",
46
46
  "devextreme": "^25.2.6",