@topconsultnpm/sdkui-react 6.21.0-dev2.31 → 6.21.0-dev2.33
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.
- package/lib/components/features/archive/TMArchive.js +1 -1
- package/lib/components/features/documents/TMDcmtForm.js +2 -2
- package/lib/components/features/documents/TMFileUploader.js +1 -1
- package/lib/components/forms/Login/TMLoginForm.d.ts +9 -0
- package/lib/components/forms/Login/TMLoginForm.js +44 -0
- package/lib/components/query/TMQueryEditor.js +1 -1
- package/lib/helper/SDKUI_Localizator.d.ts +3 -0
- package/lib/helper/SDKUI_Localizator.js +30 -0
- package/lib/hooks/useDocumentOperations.js +7 -7
- package/package.json +1 -1
|
@@ -79,7 +79,7 @@ const TMArchive = ({ onDcmtTypeSelect = undefined, inputTID, inputFile = null, c
|
|
|
79
79
|
passToSearch(tidToUse, outputMids);
|
|
80
80
|
} : undefined, showBackButton: false, isSharedDcmt: isSharedArchive, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, currentTID, currentTID === inputTID ? inputDID : undefined), openFileUploaderPdfEditor: openFileUploaderPdfEditor, onScanRequest: onScanRequest }, currentTID)
|
|
81
81
|
:
|
|
82
|
-
_jsx(TMPanel, { title:
|
|
82
|
+
_jsx(TMPanel, { title: SDKUI_Localizator.Archiving, allowMaximize: false, children: _jsxs(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: [_jsx(StyledToppyTextContainer, { children: _jsx(StyledToppyText, { children: SDKUI_Localizator.DcmtTypeSelect }) }), _jsx(StyledToppyImage, { src: Logo, alt: 'Toppy' })] }) }), [currentTID, deviceType, mruTIDs, inputFile, currentInputMids, enableDragDropOverlay, isSharedArchive, allTasks]);
|
|
83
83
|
const allInitialPanelVisibility = {
|
|
84
84
|
'tmTreeSelector': true,
|
|
85
85
|
'tmRecentsManager': true,
|
|
@@ -871,7 +871,7 @@ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMo
|
|
|
871
871
|
const handleArchiveCompleted = useCallback(async () => {
|
|
872
872
|
let firstBlock = true;
|
|
873
873
|
let maxFileSize = 0;
|
|
874
|
-
let operationTitle =
|
|
874
|
+
let operationTitle = SDKUI_Localizator.Archiving;
|
|
875
875
|
setUseWaitPanelLocalState(true);
|
|
876
876
|
setShowWaitPanelLocal(true);
|
|
877
877
|
setShowPrimaryLocal(false);
|
|
@@ -920,7 +920,7 @@ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMo
|
|
|
920
920
|
firstBlock = false;
|
|
921
921
|
}
|
|
922
922
|
setWaitPanelValueSecondaryLocal(pd.ProgressBarValue);
|
|
923
|
-
setWaitPanelTextSecondaryLocal(
|
|
923
|
+
setWaitPanelTextSecondaryLocal(`${SDKUI_Localizator.Archiving}... ${Globalization.getNumberDisplayValue(pd.ProgressBarValue, true)} / ${Globalization.getNumberDisplayValue(maxFileSize, true)}`);
|
|
924
924
|
if (pd.ProgressBarValue === pd.ProgressBarMaximum) {
|
|
925
925
|
setWaitPanelMaxValueSecondaryLocal(0);
|
|
926
926
|
setWaitPanelValueSecondaryLocal(0);
|
|
@@ -97,7 +97,7 @@ const TMFileUploader = ({ fromDTD, deviceType = DeviceType.DESKTOP, onClose, onF
|
|
|
97
97
|
document.getElementById('fileInput')?.click();
|
|
98
98
|
}, []);
|
|
99
99
|
let content = !uploadedFile ?
|
|
100
|
-
_jsxs("div", { style: { display: 'flex', gap: 10, width: '100%', height: '100%' }, children: [_jsx(HiddenInput, { id: "fileInput", type: "file", onChange: handleInputChange }), _jsxs(UploadContainer, { ref: uploaderRef, tabIndex: 0, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, style: { backgroundColor: dragOver ? '#76b1e6' : 'white' }, onDoubleClick: browseHandler, "$isRequired": isRequired, children: [_jsxs("div", { style: { display: 'flex', gap: '10px', flexDirection: 'column', position: 'absolute', right: 5, top: 5 }, children: [_jsx(TMButton, { btnStyle: 'icon', caption: 'Sfoglia', color: isRequired && !uploadedFile ? 'error' : 'primary', onClick: browseHandler, icon: _jsx(IconFolderOpen, { fontSize: 22 }) }), showScannerIcon && isScannerLicenseConfigured() && onScanRequest && _jsx(TMButton, { btnStyle: 'icon', caption: 'Scanner', color: 'primary', onClick: () => { onScanRequest((file) => { onFileUpload?.(file); }); }, icon: _jsx(IconScanner, { fontSize: 22 }) }), showScannerIcon && isScannerLicenseConfigured() && !onScanRequest && _jsx(TMButton, { btnStyle: 'icon', caption: 'Scanner', color: 'primary', onClick: () => { ShowAlert({ message: SDKUI_Localizator.ScanFeatureUnavailableInThisContext, mode: 'info', duration: 3000, title: 'Scanner' }); }, icon: _jsx(IconScanner, { fontSize: 22 }) })] }), _jsx("p", { style: { fontSize: '1.2rem', fontWeight: 'bold' }, children: deviceType === DeviceType.MOBILE ?
|
|
100
|
+
_jsxs("div", { style: { display: 'flex', gap: 10, width: '100%', height: '100%' }, children: [_jsx(HiddenInput, { id: "fileInput", type: "file", onChange: handleInputChange }), _jsxs(UploadContainer, { ref: uploaderRef, tabIndex: 0, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, style: { backgroundColor: dragOver ? '#76b1e6' : 'white' }, onDoubleClick: browseHandler, "$isRequired": isRequired, children: [_jsxs("div", { style: { display: 'flex', gap: '10px', flexDirection: 'column', position: 'absolute', right: 5, top: 5 }, children: [_jsx(TMButton, { btnStyle: 'icon', caption: 'Sfoglia', color: isRequired && !uploadedFile ? 'error' : 'primary', onClick: browseHandler, icon: _jsx(IconFolderOpen, { fontSize: 22 }) }), showScannerIcon && isScannerLicenseConfigured() && onScanRequest && _jsx(TMButton, { btnStyle: 'icon', caption: 'Scanner', color: 'primary', onClick: () => { onScanRequest((file) => { onFileUpload?.(file); }); }, icon: _jsx(IconScanner, { fontSize: 22 }) }), showScannerIcon && isScannerLicenseConfigured() && !onScanRequest && _jsx(TMButton, { btnStyle: 'icon', caption: 'Scanner', color: 'primary', onClick: () => { ShowAlert({ message: SDKUI_Localizator.ScanFeatureUnavailableInThisContext, mode: 'info', duration: 3000, title: 'Scanner' }); }, icon: _jsx(IconScanner, { fontSize: 22 }) })] }), _jsx("p", { style: { fontSize: '1.2rem', fontWeight: 'bold' }, children: deviceType === DeviceType.MOBILE ? SDKUI_Localizator.ClickToBrowseFile : SDKUI_Localizator.DragOrDoubleClickToBrowseFile }), isRequired && _jsxs("p", { style: { fontWeight: 'bold' }, children: [" ", SDKUI_Localizator.RequiredField, " "] })] })] }) :
|
|
101
101
|
_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 10, width: '100%', height: '100%' }, children: [_jsxs("div", { style: { backgroundColor: 'white', padding: '5px 10px', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'space-between', color: TMColors.primaryColor }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 5 }, children: [_jsx("p", { children: "File name:" }), _jsxs("div", { style: { fontWeight: 'bold' }, children: [fileName, " ", _jsxs("span", { children: [" ", ` (${formatBytes(fileSize)})`, " "] })] })] }), uploadedFile && _jsx(TMButton, { btnStyle: 'icon', color: 'error', caption: 'Pulisci', onClick: () => clearFile(true), icon: _jsx(IconClear, { fontSize: 22 }) })] }), extensionHandler(fileExt) === FileExtensionHandler.READY_TO_SHOW ? _jsx(TMFileViewer, { fileBlob: uploadedFile, isResizingActive: isResizingActive }) :
|
|
102
102
|
_jsx("div", { style: { backgroundColor: '#f6dbdb', padding: '5px 10px', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'space-between', color: TMColors.error }, children: _jsxs("div", { children: [" ", 'Anteprima non disponibile.', fileExt && _jsx("b", { children: ` (*.${fileExt})` })] }) })] });
|
|
103
103
|
const innerContent = (_jsxs("div", { style: { width: '100%', height: '100%', padding: '2px', display: 'flex', flexDirection: 'column', gap: 10 }, children: [enableDragDropOverlay && _jsx(TMDragDropOverlay, { handleFile: handleFile, refocusAfterFileInput: refocusAfterFileInput }), content] }));
|
|
@@ -31,6 +31,14 @@ export declare const cultureIDsDataSource: {
|
|
|
31
31
|
value: CultureIDs;
|
|
32
32
|
display: string;
|
|
33
33
|
}[];
|
|
34
|
+
export interface ITMLoginDefaultValues {
|
|
35
|
+
endpoint: string;
|
|
36
|
+
archiveId?: string;
|
|
37
|
+
authenticationMode?: AuthenticationModes;
|
|
38
|
+
username?: string;
|
|
39
|
+
behalfUsername?: string;
|
|
40
|
+
domain?: string;
|
|
41
|
+
}
|
|
34
42
|
interface ITMLoginFormProps {
|
|
35
43
|
isConnector?: boolean;
|
|
36
44
|
sdInput?: SessionDescriptor;
|
|
@@ -39,6 +47,7 @@ interface ITMLoginFormProps {
|
|
|
39
47
|
onLogged: (tmSession: ITopMediaSession) => void;
|
|
40
48
|
onChangeLanguage?: (e: CultureIDs) => void;
|
|
41
49
|
cultureID?: CultureIDs;
|
|
50
|
+
defaultLoginValues?: ITMLoginDefaultValues;
|
|
42
51
|
}
|
|
43
52
|
declare const TMLoginForm: React.FunctionComponent<ITMLoginFormProps>;
|
|
44
53
|
export default TMLoginForm;
|
|
@@ -106,6 +106,7 @@ const TMLoginForm = (props) => {
|
|
|
106
106
|
const passwordRef = useRef(null);
|
|
107
107
|
const usernameOnBehalfOfRef = useRef(null);
|
|
108
108
|
const passwordOnBehalfOfRRef = useRef(null);
|
|
109
|
+
const defaultLoginAppliedRef = useRef(false);
|
|
109
110
|
const [loginStep, setLoginStep] = useState(1);
|
|
110
111
|
const [tmServer, setTmServer] = useState();
|
|
111
112
|
const [tmSession, setTmSession] = useState();
|
|
@@ -201,6 +202,23 @@ const TMLoginForm = (props) => {
|
|
|
201
202
|
setUsername(props.sdInput.userName);
|
|
202
203
|
}
|
|
203
204
|
}, []);
|
|
205
|
+
useEffect(() => {
|
|
206
|
+
if (!props.defaultLoginValues)
|
|
207
|
+
return;
|
|
208
|
+
const matchingEndpoint = props.endpoints.find(ep => ep.URL === props.defaultLoginValues.endpoint);
|
|
209
|
+
if (!matchingEndpoint)
|
|
210
|
+
return;
|
|
211
|
+
setEndpoint(matchingEndpoint);
|
|
212
|
+
if (props.defaultLoginValues.archiveId)
|
|
213
|
+
setManualArchiveID(props.defaultLoginValues.archiveId);
|
|
214
|
+
setAuthMode(props.defaultLoginValues.authenticationMode ?? AuthenticationModes.TopMedia);
|
|
215
|
+
if (props.defaultLoginValues.username)
|
|
216
|
+
setUsername(props.defaultLoginValues.username);
|
|
217
|
+
if (props.defaultLoginValues.domain)
|
|
218
|
+
setAuthDomain(props.defaultLoginValues.domain);
|
|
219
|
+
if (props.defaultLoginValues.behalfUsername)
|
|
220
|
+
setUsernameOnBehalf(props.defaultLoginValues.behalfUsername);
|
|
221
|
+
}, [props.defaultLoginValues, props.endpoints]);
|
|
204
222
|
useEffect(() => {
|
|
205
223
|
if (!hasSingleOption)
|
|
206
224
|
return;
|
|
@@ -216,6 +234,9 @@ const TMLoginForm = (props) => {
|
|
|
216
234
|
setDcmtArchive(undefined);
|
|
217
235
|
}, [isSuccess]);
|
|
218
236
|
useEffect(() => {
|
|
237
|
+
// Skip default endpoint
|
|
238
|
+
if (props.defaultLoginValues && props.endpoints.some(ep => ep.URL === props.defaultLoginValues.endpoint))
|
|
239
|
+
return;
|
|
219
240
|
let preferredRapidAccess = localRa?.find(ar => ar.preferred === true);
|
|
220
241
|
if (preferredRapidAccess) {
|
|
221
242
|
handleRapidAccessSelection(preferredRapidAccess);
|
|
@@ -240,6 +261,29 @@ const TMLoginForm = (props) => {
|
|
|
240
261
|
useEffect(() => {
|
|
241
262
|
getArchivesAsync();
|
|
242
263
|
}, [tmSession]);
|
|
264
|
+
// Default values and step management
|
|
265
|
+
useEffect(() => {
|
|
266
|
+
if (!props.defaultLoginValues || !props.defaultLoginValues.archiveId || defaultLoginAppliedRef.current || !tmSession || !tmSession.TopMediaServer?.BaseAddress)
|
|
267
|
+
return;
|
|
268
|
+
defaultLoginAppliedRef.current = true;
|
|
269
|
+
const archiveId = props.defaultLoginValues.archiveId;
|
|
270
|
+
const validateAndAdvance = async () => {
|
|
271
|
+
try {
|
|
272
|
+
TMSpinner.show({ description: '' });
|
|
273
|
+
const archiveEngine = tmSession.NewArchiveEngine();
|
|
274
|
+
const result = await archiveEngine.RetrieveAsync(archiveId);
|
|
275
|
+
setDcmtArchive(result);
|
|
276
|
+
setLoginStep(2);
|
|
277
|
+
}
|
|
278
|
+
catch (e) {
|
|
279
|
+
TMExceptionBoxManager.show({ exception: e });
|
|
280
|
+
}
|
|
281
|
+
finally {
|
|
282
|
+
TMSpinner.hide();
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
validateAndAdvance();
|
|
286
|
+
}, [tmSession, props.defaultLoginValues]);
|
|
243
287
|
useEffect(() => {
|
|
244
288
|
if (!saveLoginEnable || !dcmtArchive)
|
|
245
289
|
return;
|
|
@@ -733,7 +733,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
|
|
|
733
733
|
}
|
|
734
734
|
};
|
|
735
735
|
// #endregion
|
|
736
|
-
return (_jsxs(_Fragment, { children: [_jsxs(TMApplyForm, { isModal: false, formMode: formMode, isModified: calcIsModified(formData, formDataOrig), exception: exception, validationItems: validationItems, hasNavigation: false, customToolbarElements: _jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Search, color: 'tertiary', icon: _jsx(IconSearch, {}), disabled: errorsCount > 0, onClick: async () => await onSearchAsync(formData) }), _jsx(TMQueryCountButton, { qd: { ...formData }, lastparams: lastQdParams, onLastQueryParamsChanged: (params) => { setLastQdParams(params); }, disabled: errorsCount > 0, showSpinner: true }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption:
|
|
736
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TMApplyForm, { isModal: false, formMode: formMode, isModified: calcIsModified(formData, formDataOrig), exception: exception, validationItems: validationItems, hasNavigation: false, customToolbarElements: _jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Search, color: 'tertiary', icon: _jsx(IconSearch, {}), disabled: errorsCount > 0, onClick: async () => await onSearchAsync(formData) }), _jsx(TMQueryCountButton, { qd: { ...formData }, lastparams: lastQdParams, onLastQueryParamsChanged: (params) => { setLastQdParams(params); }, disabled: errorsCount > 0, showSpinner: true }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption: SDKUI_Localizator.PassToArchive, icon: _jsx(IconArchiveDoc, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Passa ad archiviazione", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption: "Vai a risultato", icon: _jsx(IconArrowRight, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Vai a risultato", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } })] }), showToolbar: showToolbar, showApply: showApply, showUndo: showUndo, showBack: showBack, onApply: () => applyData(), onClose: () => onClose?.(), onUndo: () => setFormData(formDataOrig), children: [_jsxs(Accordion, { elementAttr: { class: 'tm-query-dx-accordion' }, height: height, multiple: true, collapsible: true, repaintChangesOnly: true, deferRendering: false, animationDuration: 0, onContentReady: (e) => {
|
|
737
737
|
let items = e.component.option("items");
|
|
738
738
|
if (items && items.length > 0) {
|
|
739
739
|
for (let i = 0; i < items.length; i++) {
|
|
@@ -53,6 +53,7 @@ export declare class SDKUI_Localizator {
|
|
|
53
53
|
static get ArchiveID(): "Armazena" | "Dokumentarisches Archiv" | "Documental archive" | "Archivo de documentos" | "Archivage des documents" | "Archivio documentale";
|
|
54
54
|
static get ArchiveDetailDocument(): "Detaildokument archivieren" | "Archive detail document" | "Archivar documento de detalle" | "Archiver le document détail" | "Arquivar documento de detalhe" | "Archivia documento dettaglio";
|
|
55
55
|
static get ArchiveMasterDocument(): "Master-Dokument archivieren" | "Archive master document" | "Archivar documento maestro" | "Archiver le document maître" | "Arquivar documento mestre" | "Archivia documento master";
|
|
56
|
+
static get Archiving(): string;
|
|
56
57
|
static get Arguments(): "Themen" | "Arguments" | "Argumentos" | "Sujets" | "Tópicos" | "Argomenti";
|
|
57
58
|
static get AssignTo(): "Zuweisen an" | "Assign to" | "Asignar a" | "Assigner à" | "Atribuir a" | "Assegna a";
|
|
58
59
|
static get AssignedBy(): "Zugewiesen von" | "Assigned by" | "Asignado por" | "Assigné par" | "Atribuído por" | "Assegnata da";
|
|
@@ -102,6 +103,7 @@ export declare class SDKUI_Localizator {
|
|
|
102
103
|
static get Clear(): "Bereinigen" | "Clear" | "Limpiar" | "Efface" | "Limpar" | "Pulisci";
|
|
103
104
|
static get ClearCache(): string;
|
|
104
105
|
static get ClearOTP(): "OTP löschen" | "Clear OTP" | "Borrar OTP" | "Effacer l'OTP" | "Limpar OTP" | "Cancella OTP";
|
|
106
|
+
static get ClickToBrowseFile(): string;
|
|
105
107
|
static get Close(): "Ausgang" | "Close" | "Salida" | "Sortie" | "Saída" | "Chiudi";
|
|
106
108
|
static get Closed(): "Geschlossen" | "Closed" | "Cerrada" | "Fermée" | "Fechada" | "Chiusa";
|
|
107
109
|
static get CloseTask(): string;
|
|
@@ -209,6 +211,7 @@ export declare class SDKUI_Localizator {
|
|
|
209
211
|
static get DownloadXMLAttachments(): string;
|
|
210
212
|
static get Draft(): string;
|
|
211
213
|
static get Drafts(): string;
|
|
214
|
+
static get DragOrDoubleClickToBrowseFile(): string;
|
|
212
215
|
static get DropFileHere(): "Ziehen Sie Ihre Datei hierher" | "Drop your file here" | "Suelta tu archivo aquí" | "Déposez votre fichier ici" | "Solte seu arquivo aqui" | "Trascina qui il tuo file";
|
|
213
216
|
static get DropFileToShare(): string;
|
|
214
217
|
static get Duplicate(): "Duplikat" | "Duplicate" | "Duplicar" | "Dupliquer" | "Duplicado" | "Duplica";
|
|
@@ -484,6 +484,16 @@ export class SDKUI_Localizator {
|
|
|
484
484
|
default: return "Archivia documento master";
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
+
static get Archiving() {
|
|
488
|
+
switch (this._cultureID) {
|
|
489
|
+
case CultureIDs.De_DE: return "Archivierung";
|
|
490
|
+
case CultureIDs.En_US: return "Archiving";
|
|
491
|
+
case CultureIDs.Es_ES: return "Archivación";
|
|
492
|
+
case CultureIDs.Fr_FR: return "Archivage";
|
|
493
|
+
case CultureIDs.Pt_PT: return "Arquivamento";
|
|
494
|
+
default: return "Archiviazione";
|
|
495
|
+
}
|
|
496
|
+
}
|
|
487
497
|
static get Arguments() {
|
|
488
498
|
switch (this._cultureID) {
|
|
489
499
|
case CultureIDs.De_DE: return "Themen";
|
|
@@ -1000,6 +1010,16 @@ export class SDKUI_Localizator {
|
|
|
1000
1010
|
default: return "Cancella OTP";
|
|
1001
1011
|
}
|
|
1002
1012
|
}
|
|
1013
|
+
static get ClickToBrowseFile() {
|
|
1014
|
+
switch (this._cultureID) {
|
|
1015
|
+
case CultureIDs.De_DE: return "Klicken Sie, um Ihre Datei zu durchsuchen";
|
|
1016
|
+
case CultureIDs.En_US: return "Click to browse your file";
|
|
1017
|
+
case CultureIDs.Es_ES: return "Haz clic para explorar tu archivo";
|
|
1018
|
+
case CultureIDs.Fr_FR: return "Cliquez pour parcourir votre fichier";
|
|
1019
|
+
case CultureIDs.Pt_PT: return "Clique para navegar no seu arquivo";
|
|
1020
|
+
default: return "Clicca per sfogliare il tuo file";
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1003
1023
|
static get Close() {
|
|
1004
1024
|
switch (this._cultureID) {
|
|
1005
1025
|
case CultureIDs.De_DE: return "Ausgang";
|
|
@@ -2039,6 +2059,16 @@ export class SDKUI_Localizator {
|
|
|
2039
2059
|
default: return "Bozze";
|
|
2040
2060
|
}
|
|
2041
2061
|
}
|
|
2062
|
+
static get DragOrDoubleClickToBrowseFile() {
|
|
2063
|
+
switch (this._cultureID) {
|
|
2064
|
+
case CultureIDs.De_DE: return "Ziehen Sie Ihre Datei hierher oder doppelklicken Sie, um sie zu durchsuchen";
|
|
2065
|
+
case CultureIDs.En_US: return "Drag your file or double click to browse";
|
|
2066
|
+
case CultureIDs.Es_ES: return "Arrastra tu archivo o haz doble clic para explorarlo";
|
|
2067
|
+
case CultureIDs.Fr_FR: return "Glissez votre fichier ou double-cliquez pour le parcourir";
|
|
2068
|
+
case CultureIDs.Pt_PT: return "Arraste seu arquivo ou clique duas vezes para navegar";
|
|
2069
|
+
default: return "Trascina il tuo file o fai doppio click per sfogliarlo";
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2042
2072
|
static get DropFileHere() {
|
|
2043
2073
|
switch (this._cultureID) {
|
|
2044
2074
|
case CultureIDs.De_DE: return "Ziehen Sie Ihre Datei hierher";
|
|
@@ -259,14 +259,14 @@ export const useDocumentOperations = (props) => {
|
|
|
259
259
|
};
|
|
260
260
|
const openSharedArchiveHandler = async () => {
|
|
261
261
|
if (selectedDcmtInfos.length === 0) {
|
|
262
|
-
ShowAlert({ message:
|
|
262
|
+
ShowAlert({ message: SDKUI_Localizator.NoDcmtSelected, mode: "warning", title: SDKUI_Localizator.SharedArchiving, duration: 3000 });
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
265
|
if (dtd?.perm?.canArchive !== AccessLevelsEx.Yes && dtd?.perm?.canArchive !== AccessLevelsEx.Mixed) {
|
|
266
266
|
ShowAlert({
|
|
267
267
|
message: "Non hai i permessi per archiviare documenti di questo tipo.",
|
|
268
268
|
mode: 'warning',
|
|
269
|
-
title:
|
|
269
|
+
title: SDKUI_Localizator.SharedArchiving,
|
|
270
270
|
duration: 5000
|
|
271
271
|
});
|
|
272
272
|
return;
|
|
@@ -276,7 +276,7 @@ export const useDocumentOperations = (props) => {
|
|
|
276
276
|
rfo.retrieveReason = DcmtOpers.None;
|
|
277
277
|
rfo.generalRetrieveFormat = GeneralRetrieveFormats.OriginalUnsigned;
|
|
278
278
|
const dcmt = selectedDcmtInfos[0];
|
|
279
|
-
let dcmtFile = await getDcmtFileAsync({ TID: dcmt?.TID, DID: dcmt?.DID }, rfo,
|
|
279
|
+
let dcmtFile = await getDcmtFileAsync({ TID: dcmt?.TID, DID: dcmt?.DID }, rfo, SDKUI_Localizator.SharedArchiving, false, true);
|
|
280
280
|
if (dcmtFile) {
|
|
281
281
|
setSharedDcmtFile(dcmtFile?.file);
|
|
282
282
|
}
|
|
@@ -289,7 +289,7 @@ export const useDocumentOperations = (props) => {
|
|
|
289
289
|
const showSharedDcmtsHandler = async () => {
|
|
290
290
|
try {
|
|
291
291
|
if (selectedDcmtInfos.length === 0) {
|
|
292
|
-
ShowAlert({ message:
|
|
292
|
+
ShowAlert({ message: SDKUI_Localizator.NoDcmtSelected, mode: "warning", title: SDKUI_Localizator.SharedArchiving, duration: 3000 });
|
|
293
293
|
return;
|
|
294
294
|
}
|
|
295
295
|
const dcmt = selectedDcmtInfos[0];
|
|
@@ -767,10 +767,10 @@ export const useDocumentOperations = (props) => {
|
|
|
767
767
|
submenu: [
|
|
768
768
|
{
|
|
769
769
|
icon: <IconShare />,
|
|
770
|
-
name:
|
|
770
|
+
name: SDKUI_Localizator.SharedArchiving,
|
|
771
771
|
operationType: 'multiRow',
|
|
772
772
|
disabled: fromDatagrid ? false : isDisabledForMultiRow(),
|
|
773
|
-
onClick: () => ShowAlert({ message: "TODO Archiviazione condivisa", mode: 'info', title: `${
|
|
773
|
+
onClick: () => ShowAlert({ message: "TODO Archiviazione condivisa", mode: 'info', title: `${SDKUI_Localizator.SharedArchiving}`, duration: 3000 })
|
|
774
774
|
},
|
|
775
775
|
{
|
|
776
776
|
icon: <IconSharedDcmt />,
|
|
@@ -1183,7 +1183,7 @@ export const useDocumentOperations = (props) => {
|
|
|
1183
1183
|
}
|
|
1184
1184
|
}, onClose: () => setShowManyToManyChooser(false), manageUseLocalizedName: false }), showPairDcmtsModal &&
|
|
1185
1185
|
_jsx(TMModal, { title: (isPairingManyToMany ? "Abbina" : "Disabbina") + " documenti", onClose: () => setShowPairDcmtsModal(false), width: isMobile ? '90%' : '50%', height: isMobile ? '90%' : '70%', children: _jsx(TMSearchResult, { searchResults: pairedSearchResults, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, onRefreshSearchAsyncDatagrid: onRefreshSearchAsyncDatagrid, onFileOpened: onFileOpened, onTaskCreateRequest: onTaskCreateRequest, openWGsCopyMoveForm: openWGsCopyMoveForm, editPdfForm: editPdfForm, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onOpenPdfEditorRequest: onOpenPdfEditorRequest, passToArchiveCallback: passToArchiveCallback, showTodoDcmtForm: showTodoDcmtForm, allowFloatingBar: false, floatingActionConfig: pairFloatingActionConfig, showBackButton: false, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter }) }), showPairSearchModal &&
|
|
1186
|
-
_jsx(TMModal, { title: "Ricerca documenti", onClose: () => setShowPairSearchModal(false), width: isMobile ? '90%' : '50%', height: isMobile ? '90%' : '70%', children: _jsx(TMSearch, { onlyShowSearchQueryPanel: true, inputTID: pairSearchModalTargetTID, inputMids: pairSearchModalInputMids, floatingActionConfig: pairSearchModalFloatingActionConfig, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), isOpenSharedArchive && _jsx(TMModal, { title:
|
|
1186
|
+
_jsx(TMModal, { title: "Ricerca documenti", onClose: () => setShowPairSearchModal(false), width: isMobile ? '90%' : '50%', height: isMobile ? '90%' : '70%', children: _jsx(TMSearch, { onlyShowSearchQueryPanel: true, inputTID: pairSearchModalTargetTID, inputMids: pairSearchModalInputMids, floatingActionConfig: pairSearchModalFloatingActionConfig, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), isOpenSharedArchive && _jsx(TMModal, { title: SDKUI_Localizator.SharedArchiving, onClose: () => {
|
|
1187
1187
|
setIsOpenSharedArchive(false);
|
|
1188
1188
|
}, width: isMobile ? '90%' : '60%', height: isMobile ? '90%' : '80%', children: _jsx(TMArchive, { inputDID: selectedDcmtInfos?.[0].DID, inputTID: selectedDcmtInfos?.[0].TID, inputMids: currentMetadataValues.filter(md => md.mid && md.mid > 100).map(md => ({ mid: md.mid, value: md.value ?? '' })), isSharedArchive: true, inputFile: sharedDcmtFile, onSavedAsyncCallback: async (tid, did) => {
|
|
1189
1189
|
setIsOpenSharedArchive(false);
|