@topconsultnpm/sdkui-react 6.22.0-dev2.40 → 6.22.0-dev2.41

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.
@@ -17,8 +17,7 @@ interface ITMMergeToPdfFormProps {
17
17
  }
18
18
  /**
19
19
  * Form per l'unione di più documenti PDF in un singolo file.
20
- * Condivide TMDownloadRelationViewerSection e gli helper in copyAndMergeDcmtsShared
21
- * con TMCopyToFolderForm.
20
+ * Condivide TMDownloadRelationViewerSection e gli helper in copyAndMergeDcmtsShared con TMCopyToFolderForm.
22
21
  */
23
22
  declare const TMMergeToPdfForm: (props: ITMMergeToPdfFormProps) => import("react/jsx-runtime").JSX.Element;
24
23
  export default TMMergeToPdfForm;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef, useState } from 'react';
3
3
  import { DownloadTypes } from '../../../ts';
4
4
  import { calcResponsiveSizes, getExceptionMessage, IconFolderOpen, IconPlay, IconUndo, SDKUI_Globals, SDKUI_Localizator, } from '../../../helper';
5
- import { DcmtOpers, FileFormats, GeneralRetrieveFormats, ResultTypes, RetrieveFileOptions, ValidationItem, } from '@topconsultnpm/sdk-ts';
5
+ import { DcmtOpers, FileFormats, GeneralRetrieveFormats, InvoiceRetrieveFormats, OrderRetrieveFormats, ResultTypes, RetrieveFileOptions, ValidationItem, } from '@topconsultnpm/sdk-ts';
6
6
  import TMModal from '../../base/TMModal';
7
7
  import { useDeviceType } from '../../base/TMDeviceProvider';
8
8
  import TMTextBox from '../../editors/TMTextBox';
@@ -18,10 +18,35 @@ import ShowAlert from '../../base/TMAlert';
18
18
  import TMTooltip from '../../base/TMTooltip';
19
19
  import MergePdfManager from '../../../helper/MergePdfManager';
20
20
  import { TMResultManager } from '../../forms/TMResultDialog';
21
+ /**
22
+ * Converte il formato di visualizzazione fatture impostato dall'utente nel corrispondente formato PDF:
23
+ * il foglio di stile SDI resta SDI, in tutti gli altri casi si usa ASW.
24
+ */
25
+ const toPdfInvoiceRetrieveFormat = (format) => {
26
+ switch (format) {
27
+ case InvoiceRetrieveFormats.SDI_HTML:
28
+ case InvoiceRetrieveFormats.SDI_PDF:
29
+ return InvoiceRetrieveFormats.SDI_PDF;
30
+ default:
31
+ return InvoiceRetrieveFormats.ASW_PDF;
32
+ }
33
+ };
34
+ /**
35
+ * Converte il formato di visualizzazione ordini impostato dall'utente nel corrispondente formato PDF:
36
+ * il foglio di stile NSO resta NSO, in tutti gli altri casi si usa ER.
37
+ */
38
+ const toPdfOrderRetrieveFormat = (format) => {
39
+ switch (format) {
40
+ case OrderRetrieveFormats.NSO_HTML:
41
+ case OrderRetrieveFormats.NSO_PDF:
42
+ return OrderRetrieveFormats.NSO_PDF;
43
+ default:
44
+ return OrderRetrieveFormats.ER_PDF;
45
+ }
46
+ };
21
47
  /**
22
48
  * Form per l'unione di più documenti PDF in un singolo file.
23
- * Condivide TMDownloadRelationViewerSection e gli helper in copyAndMergeDcmtsShared
24
- * con TMCopyToFolderForm.
49
+ * Condivide TMDownloadRelationViewerSection e gli helper in copyAndMergeDcmtsShared con TMCopyToFolderForm.
25
50
  */
26
51
  const TMMergeToPdfForm = (props) => {
27
52
  const { mode, selectedDcmtInfos, selectedItemsFull, onClose, showTMRelationViewer, allTasks, getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers } = props;
@@ -169,8 +194,8 @@ const TMMergeToPdfForm = (props) => {
169
194
  rfo.retrieveReason = DcmtOpers.None;
170
195
  rfo.generalRetrieveFormat = GeneralRetrieveFormats.OriginalUnsigned;
171
196
  rfo.cvtFormat = FileFormats.PDF;
172
- rfo.invoiceRetrieveFormat = SDKUI_Globals.userSettings?.searchSettings.invoiceRetrieveFormat;
173
- rfo.orderRetrieveFormat = SDKUI_Globals.userSettings?.searchSettings.orderRetrieveFormat;
197
+ rfo.invoiceRetrieveFormat = toPdfInvoiceRetrieveFormat(SDKUI_Globals.userSettings?.searchSettings.invoiceRetrieveFormat);
198
+ rfo.orderRetrieveFormat = toPdfOrderRetrieveFormat(SDKUI_Globals.userSettings?.searchSettings.orderRetrieveFormat);
174
199
  const collectFileForMerge = async (file, dcmtInfo) => {
175
200
  pdfFilesMap.set(`${dcmtInfo.TID}_${dcmtInfo.DID}`, file);
176
201
  };
@@ -1 +1 @@
1
- export declare const licenseKey = "LCPv1>7eY(j4LeYSi9_V6!J4He7,1:JfoSYV:%QDL7+aJZee3%oR>!N,(7<,!cyaX>Qta3%e7(nrB7+a42R-8pJ@(>Qm<IJ+(Sn,e3J+:VN-;(y,$Zj4yZ74[S<FZ:ee49ntV(%Xn3Lr19Y9[7iR3:74X7RV(6ye(Iea1cNSS3gFf!N91%R-ppQQmk79-6%)<SQf-I_@F6_y6SjzB6_!Q2bREIgF:aQdE!KF6>%X<2p@62%!F2bR62<-$2i-)2i-FI%d@G<-@!jy$2iRQ6b-v!jyvIg!:ajzvaj@Fpg!$2b-FIp9;9K-:>Q4:G_@@9Qdv6<!F6<dFI7yFI7yFI7Ll";
1
+ export declare const licenseKey = "LCPv1(%@j2<F<eQy:2N+f,7R@!i)BcQ,N374Qe%m;9etySj@gGntp77@@:<VJ77@j!_t<%yd-Siei,7FYV%!G>7a(cj%z3Ltv!ot1SeaicLr[3o,6>H:1(e,jSQt$3bREp%tv%H+4InRJ3J88Gn+aIidEee--SQVb,yVH7QRgSpm:2be9I%,;Z+Qmk%!<9jyG6%!6pLdQ6Lt<!N-Q%iR)6%fBIR+:2<)<!Qr->%X<2p@62%!F2bR62<-$2i-)2i-FI%d@G<-@!jy$2iRQ6b-v!jyvIg!:ajzvaj@Fpg!$2b-FIp9;9K-:>Q4:G_@@9Qdv6<!F6<dFI7yFI7yFI7Ll";
@@ -1,3 +1,3 @@
1
1
  // Auto-generated by devextreme-license.
2
2
  // Do not commit this file to source control.
3
- export const licenseKey = 'LCPv1>7eY(j4LeYSi9_V6!J4He7,1:JfoSYV:%QDL7+aJZee3%oR>!N,(7<,!cyaX>Qta3%e7(nrB7+a42R-8pJ@(>Qm<IJ+(Sn,e3J+:VN-;(y,$Zj4yZ74[S<FZ:ee49ntV(%Xn3Lr19Y9[7iR3:74X7RV(6ye(Iea1cNSS3gFf!N91%R-ppQQmk79-6%)<SQf-I_@F6_y6SjzB6_!Q2bREIgF:aQdE!KF6>%X<2p@62%!F2bR62<-$2i-)2i-FI%d@G<-@!jy$2iRQ6b-v!jyvIg!:ajzvaj@Fpg!$2b-FIp9;9K-:>Q4:G_@@9Qdv6<!F6<dFI7yFI7yFI7Ll';
3
+ export const licenseKey = 'LCPv1(%@j2<F<eQy:2N+f,7R@!i)BcQ,N374Qe%m;9etySj@gGntp77@@:<VJ77@j!_t<%yd-Siei,7FYV%!G>7a(cj%z3Ltv!ot1SeaicLr[3o,6>H:1(e,jSQt$3bREp%tv%H+4InRJ3J88Gn+aIidEee--SQVb,yVH7QRgSpm:2be9I%,;Z+Qmk%!<9jyG6%!6pLdQ6Lt<!N-Q%iR)6%fBIR+:2<)<!Qr->%X<2p@62%!F2bR62<-$2i-)2i-FI%d@G<-@!jy$2iRQ6b-v!jyvIg!:ajzvaj@Fpg!$2b-FIp9;9K-:>Q4:G_@@9Qdv6<!F6<dFI7yFI7yFI7Ll';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.22.0-dev2.40",
3
+ "version": "6.22.0-dev2.41",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",