@topconsultnpm/sdkui-react 6.22.0-dev3.8 → 6.22.0-dev4.10
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/NewComponents/ContextMenu/styles.d.ts +43 -45
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +60 -67
- package/lib/components/base/Styled.d.ts +77 -93
- package/lib/components/base/TMAlert.js +6 -8
- package/lib/components/base/TMAreaManager.js +53 -55
- package/lib/components/base/TMButton.js +4 -2
- package/lib/components/base/TMCounterBar.d.ts +2 -2
- package/lib/components/base/TMCounterContainer.d.ts +4 -3
- package/lib/components/base/TMCounterContainer.js +16 -1
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMCustomButton.js +40 -48
- package/lib/components/base/TMDataGrid.js +243 -223
- package/lib/components/base/TMDataGridExportForm.d.ts +1 -2
- package/lib/components/base/TMFileManager.d.ts +1 -2
- package/lib/components/base/TMFileManagerDataGridView.d.ts +1 -2
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
- package/lib/components/base/TMFileManagerUtils.d.ts +6 -4
- package/lib/components/base/TMLayout.d.ts +4 -4
- package/lib/components/base/TMList.d.ts +1 -2
- package/lib/components/base/TMListView.d.ts +1 -1
- package/lib/components/base/TMPanel.js +173 -170
- package/lib/components/base/TMSpinner.d.ts +3 -3
- package/lib/components/base/TMSpinner.js +9 -7
- package/lib/components/base/TMTab.d.ts +3 -4
- package/lib/components/base/TMTabControl.d.ts +7 -0
- package/lib/components/base/TMTabControl.js +225 -213
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTreeView.d.ts +8 -14
- package/lib/components/base/TMTreeView.js +20 -0
- package/lib/components/base/TMUserAvatar.d.ts +1 -2
- package/lib/components/base/TMVilViewer.d.ts +1 -2
- package/lib/components/base/TMWaitPanel.d.ts +2 -3
- package/lib/components/base/TMWaitPanel.js +1 -1
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +179 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.js +373 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +57 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.js +346 -0
- package/lib/components/base/waitPanel/index.d.ts +1 -0
- package/lib/components/base/waitPanel/index.js +1 -0
- package/lib/components/choosers/TMDistinctValues.js +3 -3
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
- package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +1 -2
- package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +1 -2
- package/lib/components/choosers/TMPathChooser.js +17 -34
- package/lib/components/choosers/TMQuickSearchInfo.d.ts +1 -2
- package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
- package/lib/components/choosers/TMUserChooser.d.ts +2 -2
- package/lib/components/editors/TMEditorStyled.d.ts +42 -20
- package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +1 -2
- package/lib/components/editors/TMHtmlEditor.d.ts +1 -2
- package/lib/components/editors/TMTextBox.d.ts +4 -0
- package/lib/components/editors/TMTextBox.js +99 -11
- package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
- package/lib/components/features/archive/TMArchive.js +7 -2
- package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +28 -0
- package/lib/components/features/assistant/TMHelpOnLineChat.js +1231 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +1 -2
- package/lib/components/features/documents/TMBatchUpdateForm.js +3 -4
- package/lib/components/features/documents/TMCopyToFolderForm.js +50 -42
- package/lib/components/features/documents/TMDcmtForm.js +50 -61
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -4
- package/lib/components/features/documents/TMDcmtIcon.js +3 -5
- package/lib/components/features/documents/TMDcmtPreview.d.ts +6 -8
- package/lib/components/features/documents/TMDcmtPreview.js +5 -3
- package/lib/components/features/documents/TMDcmtTasks.d.ts +1 -2
- package/lib/components/features/documents/TMDcmtTasks.js +2 -9
- package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
- package/lib/components/features/documents/TMFileUploader.js +5 -5
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +53 -141
- package/lib/components/features/documents/TMMasterInfoFields.d.ts +1 -2
- package/lib/components/features/documents/TMMasterInfoFields.js +3 -2
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +59 -56
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +1 -2
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +14 -15
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +5 -5
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +3 -3
- package/lib/components/features/documents/TMRelationViewer.d.ts +13 -14
- package/lib/components/features/documents/TMRelationViewer.js +206 -143
- package/lib/components/features/documents/relationTreeState.d.ts +32 -0
- package/lib/components/features/documents/relationTreeState.js +89 -0
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +1 -2
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +1 -2
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +1 -2
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
- package/lib/components/features/search/TMSearch.d.ts +1 -2
- package/lib/components/features/search/TMSearch.js +3 -4
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +3 -9
- package/lib/components/features/search/TMSearchQueryPanel.js +0 -4
- package/lib/components/features/search/TMSearchResult.d.ts +5 -0
- package/lib/components/features/search/TMSearchResult.js +129 -102
- package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
- package/lib/components/features/search/TMSignatureInfoContent.d.ts +1 -2
- package/lib/components/features/search/TMTreeSelector.js +23 -27
- package/lib/components/features/search/TMViewHistoryDcmt.d.ts +1 -2
- package/lib/components/features/search/TMViewHistoryDcmt.js +15 -26
- package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
- package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
- package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksView.js +97 -90
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +2 -3
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +95 -91
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +7 -8
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +1 -3
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +1 -3
- package/lib/components/forms/Login/Chooser.d.ts +2 -2
- package/lib/components/forms/TMChooserForm.d.ts +1 -2
- package/lib/components/forms/TMResultDialog.js +1 -1
- package/lib/components/forms/TMSaveForm.d.ts +4 -4
- package/lib/components/grids/TMBlogAttachments.d.ts +1 -2
- package/lib/components/grids/TMBlogHeader.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.js +93 -97
- package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
- package/lib/components/grids/TMValidationItemsList.d.ts +1 -2
- package/lib/components/index.d.ts +5 -1
- package/lib/components/index.js +4 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -2
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +4 -3
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +3 -2
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +5 -1
- package/lib/components/layout/panelManager/TMPanelManagerLoader.d.ts +5 -0
- package/lib/components/layout/panelManager/TMPanelManagerLoader.js +18 -0
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +6 -5
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +4 -8
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.js +2 -1
- package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
- package/lib/components/pages/TMPage.d.ts +1 -1
- package/lib/components/pages/TMPage.js +32 -31
- package/lib/components/query/TMQueryEditor.d.ts +13 -14
- package/lib/components/query/TMQueryEditor.js +2 -1
- package/lib/components/settings/SettingsAppearance.d.ts +1 -2
- package/lib/components/sidebar/TMAboutApp.d.ts +1 -2
- package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
- package/lib/components/sidebar/TMHeader.d.ts +4 -3
- package/lib/components/sidebar/TMHeader.js +2 -2
- package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -3
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +2 -3
- package/lib/components/viewers/TMMidViewer.d.ts +2 -2
- package/lib/components/viewers/TMTidViewer.d.ts +2 -2
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/SDKUI_Globals.d.ts +7 -2
- package/lib/helper/SDKUI_Globals.js +7 -2
- package/lib/helper/SDKUI_Localizator.d.ts +31 -6
- package/lib/helper/SDKUI_Localizator.js +301 -51
- package/lib/helper/TMAppUpdatedModal.d.ts +1 -2
- package/lib/helper/TMAppUpdatedModal.js +93 -93
- package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
- package/lib/helper/TMIcons.d.ts +280 -280
- package/lib/helper/TMPdfViewer.d.ts +1 -2
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +4 -10
- package/lib/helper/ZipManager.d.ts +1 -1
- package/lib/helper/ZipManager.js +2 -1
- package/lib/helper/dcmtsHelper.d.ts +2 -0
- package/lib/helper/dcmtsHelper.js +3 -1
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
- package/lib/hooks/useCheckInOutOperations.js +14 -34
- package/lib/hooks/useDcmtOperations.d.ts +3 -12
- package/lib/hooks/useDcmtOperations.js +201 -184
- package/lib/hooks/useDocumentOperations.d.ts +1 -0
- package/lib/hooks/useDocumentOperations.js +14 -25
- package/lib/hooks/useInputDialog.d.ts +1 -2
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +0 -15
- package/lib/hooks/useMultiMasterDetailDcmts.js +70 -68
- package/lib/hooks/usePreventFileDrop.js +9 -0
- package/lib/hooks/useWorkflowApprove.js +33 -17
- package/lib/services/caseflow/CaseFlowService.d.ts +69 -9
- package/lib/services/caseflow/CaseFlowService.js +126 -58
- package/lib/services/platform_services.d.ts +2 -3
- package/package.json +2 -2
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
import { SDK_Globals, BlogPost, CaseFlowDcmt, CaseFlowInstanceDescriptor, CaseFlowParticipant, CaseFlowWIOperationDescriptor, MetadataValueDescriptor, CF_ParticipantRoles, CF_States, CF_WIOperations, CF_WorkItemCategories, CF_WorkItemStates, UserListCacheService, DcmtTypeListCacheService, } from '@topconsultnpm/sdk-ts';
|
|
1
|
+
import { SDK_Globals, BlogPost, CaseFlowDcmt, CaseFlowInstanceDescriptor, CaseFlowInstanceSearchDescriptor, CaseFlowParticipant, CaseFlowWIOperationDescriptor, MetadataValueDescriptor, CF_ParticipantRoles, CF_States, CF_WIOperations, CF_WorkItemCategories, CF_WorkItemStates, UserListCacheService, DcmtTypeListCacheService, } from '@topconsultnpm/sdk-ts';
|
|
2
2
|
import { CaseFlowTemplateCacheService } from './CaseFlowTemplateCacheService';
|
|
3
|
-
import {
|
|
3
|
+
import { primeTemplateName, primeTemplateNames, primeActionNames } from './caseFlowNameCache';
|
|
4
|
+
/** Numero massimo di pratiche restituite da una ricerca, se non indicato. */
|
|
5
|
+
export const CASEFLOW_SEARCH_DEFAULT_MAX_RESULTS = 500;
|
|
6
|
+
/**
|
|
7
|
+
* Tetto di `maxResults`. Il server non restituisce mai più di 5000 pratiche e
|
|
8
|
+
* se ne chiede una in più per sapere se il risultato è troncato: oltre 4999
|
|
9
|
+
* il troncamento non sarebbe più riconoscibile.
|
|
10
|
+
*/
|
|
11
|
+
export const CASEFLOW_SEARCH_MAX_RESULTS = 4999;
|
|
12
|
+
/**
|
|
13
|
+
* Giorno `YYYY-MM-DD` come mezzanotte UTC. Il client lo invia con
|
|
14
|
+
* `toISOString()` e il server ne usa solo la data: una mezzanotte locale
|
|
15
|
+
* (`new Date(2026, 8, 30)` in Italia = `2026-09-29T22:00Z`) finirebbe sul
|
|
16
|
+
* giorno precedente.
|
|
17
|
+
*/
|
|
18
|
+
function toUtcDay(day) {
|
|
19
|
+
const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(day ?? '');
|
|
20
|
+
return m ? new Date(Date.UTC(Number(m[1]), Number(m[2]) - 1, Number(m[3]))) : undefined;
|
|
21
|
+
}
|
|
4
22
|
export class CaseFlowService {
|
|
5
23
|
// ----- Template / tipi documento (invariati: cache condivise) ------------
|
|
6
24
|
/** Elenco dei template reali (via CaseFlowTemplateCacheService). */
|
|
@@ -105,50 +123,59 @@ export class CaseFlowService {
|
|
|
105
123
|
const all = await this.loadAllInstances();
|
|
106
124
|
return all.filter(cf => cf.ownerID === userId);
|
|
107
125
|
}
|
|
108
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* Ricerca avanzata sulle istanze, eseguita dal server (`usp_Cfi_Search`):
|
|
128
|
+
* restituisce solo le pratiche visibili all'utente che soddisfano i
|
|
129
|
+
* criteri, già con la copertina. Tutti i confronti di testo sono
|
|
130
|
+
* "contiene", senza distinzione fra maiuscole e minuscole.
|
|
131
|
+
*
|
|
132
|
+
* Per riconoscere un risultato troncato si chiede al server una pratica
|
|
133
|
+
* in più di `maxResults`: se arriva, la si scarta e `truncated` vale true.
|
|
134
|
+
*/
|
|
109
135
|
static async searchCaseflows(criteria) {
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
if (!
|
|
148
|
-
|
|
136
|
+
const engine = SDK_Globals.tmSession?.NewCaseFlowInstanceEngine();
|
|
137
|
+
if (!engine)
|
|
138
|
+
return { items: [], truncated: false };
|
|
139
|
+
const max = Math.min(Math.max(Math.trunc(criteria.maxResults ?? CASEFLOW_SEARCH_DEFAULT_MAX_RESULTS), 1), CASEFLOW_SEARCH_MAX_RESULTS);
|
|
140
|
+
const text = (s) => s?.trim() || undefined;
|
|
141
|
+
const filter = new CaseFlowInstanceSearchDescriptor();
|
|
142
|
+
filter.cftid = criteria.templateId ?? 0;
|
|
143
|
+
filter.name = text(criteria.name);
|
|
144
|
+
filter.description = text(criteria.description);
|
|
145
|
+
filter.state = criteria.state;
|
|
146
|
+
filter.dateFrom = toUtcDay(criteria.dateFrom);
|
|
147
|
+
filter.dateTo = toUtcDay(criteria.dateTo);
|
|
148
|
+
filter.freeText = text(criteria.freeTextMetadata);
|
|
149
|
+
const metadataFilters = (criteria.metadataFilters ?? [])
|
|
150
|
+
.filter(mf => mf.value.trim())
|
|
151
|
+
.map(mf => MetadataValueDescriptor.fromJS({ mid: mf.mid, value: mf.value.trim() }));
|
|
152
|
+
filter.metadataFilters = metadataFilters.length > 0 ? metadataFilters : undefined;
|
|
153
|
+
filter.top = max + 1;
|
|
154
|
+
const list = (await engine.SearchAsync(filter)) ?? [];
|
|
155
|
+
const truncated = list.length > max;
|
|
156
|
+
const items = truncated ? list.slice(0, max) : list;
|
|
157
|
+
// Il server restituisce la copertina con i soli MID e valori: i nomi
|
|
158
|
+
// dei metadati vengono dalla copertina del modello. Lo stesso giro
|
|
159
|
+
// popola le cache dei nomi di modello e azioni usate in rendering.
|
|
160
|
+
const cftids = [...new Set(items.map(i => i.cftid).filter((c) => c != null))];
|
|
161
|
+
const templates = new Map();
|
|
162
|
+
await Promise.all(cftids.map(async (cftid) => {
|
|
163
|
+
const tpl = await CaseFlowTemplateCacheService.GetAsync(cftid);
|
|
164
|
+
if (!tpl)
|
|
165
|
+
return;
|
|
166
|
+
templates.set(cftid, tpl);
|
|
167
|
+
primeTemplateName(tpl.id, tpl.name);
|
|
168
|
+
primeActionNames(tpl);
|
|
169
|
+
}));
|
|
170
|
+
for (const inst of items) {
|
|
171
|
+
const tplCover = inst.cftid != null ? templates.get(inst.cftid)?.cover : undefined;
|
|
172
|
+
for (const m of inst.cover ?? []) {
|
|
173
|
+
if (!m.metadataName)
|
|
174
|
+
m.metadataName = tplCover?.find(md => md.id === m.mid)?.name;
|
|
149
175
|
}
|
|
150
|
-
|
|
151
|
-
|
|
176
|
+
}
|
|
177
|
+
await this.resolveUserNames(items);
|
|
178
|
+
return { items, truncated };
|
|
152
179
|
}
|
|
153
180
|
/** WorkItem pendenti assegnati all'utente, raggruppati per istanza. */
|
|
154
181
|
static async getMyPendingWorkItems(userId) {
|
|
@@ -221,6 +248,25 @@ export class CaseFlowService {
|
|
|
221
248
|
const id = await engine.CreateAsync(d);
|
|
222
249
|
return id ?? 0;
|
|
223
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* Avvia un'istanza tramite StartAsync(cftid, id): il backend porta la pratica
|
|
253
|
+
* da `New` a `InProgress` e materializza i workitem della prima azione.
|
|
254
|
+
*
|
|
255
|
+
* NON va chiamata dopo `CreateCaseFlowInstance`: la Create dell'API REST
|
|
256
|
+
* esegue già lo start internamente, quindi un'istanza appena creata è
|
|
257
|
+
* ancora `New` solo nel descrittore inviato, non lato server. Questa resta
|
|
258
|
+
* per le istanze che si trovano davvero in `New` (avvio differito); sulle
|
|
259
|
+
* altre il backend rifiuta.
|
|
260
|
+
*/
|
|
261
|
+
static async startCaseflow(caseFlowId, cftid) {
|
|
262
|
+
const engine = SDK_Globals.tmSession?.NewCaseFlowInstanceEngine();
|
|
263
|
+
if (!engine)
|
|
264
|
+
throw new Error('Motore delle istanze CaseFlow non disponibile.');
|
|
265
|
+
const resolvedCftid = cftid ?? (await this.getCaseflow(caseFlowId))?.cftid;
|
|
266
|
+
if (resolvedCftid == null)
|
|
267
|
+
throw new Error(`Impossibile risolvere il template (cftid) per l'istanza id=${caseFlowId}.`);
|
|
268
|
+
await engine.StartAsync(resolvedCftid, caseFlowId);
|
|
269
|
+
}
|
|
224
270
|
/**
|
|
225
271
|
* Elimina un'istanza tramite DeleteAsync(cftid, id). Il cftid è preso dal
|
|
226
272
|
* template fornito (se disponibile) oppure risolto dall'istanza.
|
|
@@ -490,11 +536,10 @@ export class CaseFlowService {
|
|
|
490
536
|
/**
|
|
491
537
|
* Stato "l'utente corrente segue questa pratica" letto dal descrittore.
|
|
492
538
|
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
* `
|
|
496
|
-
*
|
|
497
|
-
* arrivare come booleano, come 0/1 o come stringa.
|
|
539
|
+
* `isFollow` fa ormai parte del contratto (`CaseFlowInstanceDescriptor`):
|
|
540
|
+
* arriva valorizzato da `usp_Cfi_RetrieveAll`/`usp_Cfi_Retrieve`. Resta
|
|
541
|
+
* `undefined` solo quando il descrittore proviene da una sorgente che non
|
|
542
|
+
* popola il campo.
|
|
498
543
|
*
|
|
499
544
|
* Da NON dedurre dalla bacheca Home come fanno pratiche-dossier e gruppi di
|
|
500
545
|
* lavoro (filtro su `HomeBlogPost.classID`): quella query prende `TOP 30`
|
|
@@ -503,14 +548,7 @@ export class CaseFlowService {
|
|
|
503
548
|
* poi, non esiste nemmeno un ramo nella UNION.
|
|
504
549
|
*/
|
|
505
550
|
static readFollowFlag(cf) {
|
|
506
|
-
|
|
507
|
-
if (typeof raw === 'boolean')
|
|
508
|
-
return raw;
|
|
509
|
-
if (typeof raw === 'number')
|
|
510
|
-
return raw !== 0;
|
|
511
|
-
if (raw === '0' || raw === '1')
|
|
512
|
-
return raw === '1';
|
|
513
|
-
return undefined;
|
|
551
|
+
return cf.isFollow;
|
|
514
552
|
}
|
|
515
553
|
// ----- Workitem: movimentazione del flusso -------------------------------
|
|
516
554
|
//
|
|
@@ -551,7 +589,37 @@ export class CaseFlowService {
|
|
|
551
589
|
comment: response,
|
|
552
590
|
}), cftid);
|
|
553
591
|
}
|
|
554
|
-
/**
|
|
592
|
+
/**
|
|
593
|
+
* Prende in carico un'azione per se stessi (operazione Claim): il backend
|
|
594
|
+
* crea il workitem intestato al chiamante e porta l'azione in lavorazione.
|
|
595
|
+
*
|
|
596
|
+
* Non e' un caso particolare di `createWorkItemForAction`: assegnare e'
|
|
597
|
+
* riservato a Owner e Supervisore, prendere in carico e' di chiunque lavori
|
|
598
|
+
* alla pratica. Passando dall'operazione Assign, un Partecipante si vedeva
|
|
599
|
+
* rifiutare la presa in carico (TMC-2789).
|
|
600
|
+
*/
|
|
601
|
+
static async claimAction(caseFlowId, actionID, cftid) {
|
|
602
|
+
await this.executeWorkItemOperation(caseFlowId, CaseFlowWIOperationDescriptor.fromJS({
|
|
603
|
+
operation: CF_WIOperations.Claim,
|
|
604
|
+
actionID,
|
|
605
|
+
}), cftid);
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Rilascia un workitem preso in carico (operazione ReleaseClaim): il backend
|
|
609
|
+
* lo cancella e, se per quell'azione non restano altri destinatari, la riporta
|
|
610
|
+
* disponibile per la presa in carico.
|
|
611
|
+
*
|
|
612
|
+
* Stessa chiamata per due gesti diversi, e' la guardia della SP a distinguerli:
|
|
613
|
+
* il detentore rilascia il proprio workitem, un Owner/Supervisore annulla
|
|
614
|
+
* l'assegnazione di un altro. Chi chiama non deve dire quale dei due sta facendo.
|
|
615
|
+
*/
|
|
616
|
+
static async releaseClaim(caseFlowId, workItemId, cftid) {
|
|
617
|
+
await this.executeWorkItemOperation(caseFlowId, CaseFlowWIOperationDescriptor.fromJS({
|
|
618
|
+
operation: CF_WIOperations.ReleaseClaim,
|
|
619
|
+
wiid: workItemId,
|
|
620
|
+
}), cftid);
|
|
621
|
+
}
|
|
622
|
+
/** Assegna un'azione a un ALTRO utente creando il relativo workitem (operazione Assign). */
|
|
555
623
|
static async createWorkItemForAction(caseFlowId, actionID, toUserID, description, cftid) {
|
|
556
624
|
await this.executeWorkItemOperation(caseFlowId, CaseFlowWIOperationDescriptor.fromJS({
|
|
557
625
|
operation: CF_WIOperations.Assign,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { JobTypes, ObjectClasses, ProcessDescriptor, DcmtTypeDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
2
|
export declare class PlatformObjectService {
|
|
4
3
|
static readonly retrieveAllAsync: (objClass: ObjectClasses, refreshCache?: boolean) => Promise<import("@topconsultnpm/sdk-ts").AreaDescriptor[] | import("@topconsultnpm/sdk-ts").NotificationDescriptor[] | import("@topconsultnpm/sdk-ts").RelationDescriptor[] | import("@topconsultnpm/sdk-ts").TaskDescriptor[] | import("@topconsultnpm/sdk-ts").WorkingGroupDescriptor[] | undefined>;
|
|
@@ -14,6 +13,6 @@ export declare class PlatformObjectService {
|
|
|
14
13
|
static readonly createAsync: (objClass: ObjectClasses, jobType: JobTypes, d: any) => Promise<number | undefined>;
|
|
15
14
|
static readonly deleteAsync: (objClass: ObjectClasses, id: number) => Promise<number | undefined>;
|
|
16
15
|
static readonly getName: (objClass: ObjectClasses, jobType?: JobTypes, isPlural?: boolean) => string;
|
|
17
|
-
static readonly getIcon: (objClass: ObjectClasses, d: any) =>
|
|
18
|
-
static readonly getTooltip: (objClass: ObjectClasses, d: any) =>
|
|
16
|
+
static readonly getIcon: (objClass: ObjectClasses, d: any) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
static readonly getTooltip: (objClass: ObjectClasses, d: any) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
-
"version": "6.22.0-
|
|
3
|
+
"version": "6.22.0-dev4.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"lib"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@topconsultnpm/sdk-ts": "6.22.0-
|
|
45
|
+
"@topconsultnpm/sdk-ts": "6.22.0-dev4.3",
|
|
46
46
|
"@zip.js/zip.js": "2.8.26",
|
|
47
47
|
"buffer": "^6.0.3",
|
|
48
48
|
"devextreme": "^26.1.4",
|