@tsi-developpement/tsi-shared-ui 1.11.13 → 1.11.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.
- package/esm2022/lib/end-points/endpoints.mjs +5 -1
- package/esm2022/lib/models/workflow/workflow.mjs +6 -1
- package/esm2022/lib/services/workflow/workflow-configuration.service.mjs +7 -1
- package/esm2022/lib/tsi-components/tsi-kanban-workflow-etat/tsi-kanban-workflow-etat.component.mjs +237 -25
- package/fesm2022/tsi-developpement-tsi-shared-ui.mjs +233 -10
- package/fesm2022/tsi-developpement-tsi-shared-ui.mjs.map +1 -1
- package/lib/consts/app-providers.d.ts +1 -1
- package/lib/end-points/endpoints.d.ts +4 -0
- package/lib/models/workflow/workflow.d.ts +20 -0
- package/lib/providers/shared-ui-tsi.provider.d.ts +1 -1
- package/lib/services/workflow/workflow-configuration.service.d.ts +3 -1
- package/lib/tsi-components/manage-reporting/add-report-popup/add-report-popup.component.d.ts +2 -0
- package/lib/tsi-components/tsi-action-erp-create-or-edit/tsi-action-erp-create-or-edit.component.d.ts +2 -0
- package/lib/tsi-components/tsi-kanban-workflow-etat/tsi-kanban-workflow-etat.component.d.ts +35 -5
- package/lib/tsi-components/tsi-upload-fiche/tsi-upload-fiche.component.d.ts +2 -0
- package/package.json +1 -1
|
@@ -290,6 +290,7 @@ const AdministrationSegments = {
|
|
|
290
290
|
getStatusColorDetailsByBusinessClassName: 'getStatusColorDetailsByBusinessClassName',
|
|
291
291
|
getNombreFichierJointById: 'GetNombreFichierJointById',
|
|
292
292
|
getWorkflowEtatByClassNameAndDescriminator: 'GetWorkflowEtatByClassNameAndDescriminator',
|
|
293
|
+
getWorkflowEtatSuivantsByClassNameAndDescriminator: 'GetWorkflowEtatSuivantsByClassNameAndDescriminator',
|
|
293
294
|
getWorkflowByClasseAndDescriminator: 'GetWorkflowByClasseAndDescriminator',
|
|
294
295
|
formulaire: 'Formulaire',
|
|
295
296
|
formulaireData: 'FormulaireData',
|
|
@@ -303,6 +304,7 @@ const AdministrationSegments = {
|
|
|
303
304
|
getParametreApplicationParamBase: 'GetParametreApplicationParamBase',
|
|
304
305
|
getAllWorkflowEtatSuivantByWorkflowEtatId: 'getAllWorkflowEtatSuivantByWorkflowEtatId',
|
|
305
306
|
updateWorkflowEtatFromKanbanView: 'UpdateWorkflowEtatFromKanbanView',
|
|
307
|
+
updateMultipleWorkflowEtatFromKanbanView: 'UpdateMultipleWorkflowEtatFromKanbanView',
|
|
306
308
|
mailing: "Mailing",
|
|
307
309
|
sendMailMessage: 'SendMail',
|
|
308
310
|
actionCRM: 'actionCRM',
|
|
@@ -416,11 +418,13 @@ const AdministrationEndpoints = {
|
|
|
416
418
|
getAllTypeFichierMinimalByClasse: (classe) => `${Segment.base}/${AdministrationSegments.typeFichier}/${AdministrationSegments.allMinimalByClasse}/${classe}`,
|
|
417
419
|
getTypeFichierMinimal: () => `${Segment.base}/${AdministrationSegments.typeFichier}/${AdministrationSegments.minimal}`,
|
|
418
420
|
getWorkflowEtatByClassNameAndDescriminator: (className, descriminatorValue, filterByUserRights) => `${Segment.base}/${AdministrationSegments.workflowEtat}/${AdministrationSegments.getWorkflowEtatByClassNameAndDescriminator}/${className}${descriminatorValue !== undefined && descriminatorValue != null ? `/${descriminatorValue}` : ""}${filterByUserRights ? '?filterByUserRights=true' : ''}`,
|
|
421
|
+
getWorkflowEtatSuivantsByClassNameAndDescriminator: (className, descriminatorValue) => `${Segment.base}/${AdministrationSegments.workflowEtat}/${AdministrationSegments.getWorkflowEtatSuivantsByClassNameAndDescriminator}/${className}${descriminatorValue !== undefined && descriminatorValue != null ? `/${descriminatorValue}` : ""}`,
|
|
419
422
|
getWorkflowByClasseAndDescriminator: (classe, descriminatorValue) => `${Segment.base}/${AdministrationSegments.workflow}/${AdministrationSegments.getWorkflowByClasseAndDescriminator}/${classe}${descriminatorValue !== undefined && descriminatorValue != null ? `/${descriminatorValue}` : ""}`,
|
|
420
423
|
getcolonnesPersonnalisee: (businessClass, occurence) => `${Segment.base}/${AdministrationSegments.colonnePersonnalisee}/${AdministrationSegments.getColonnePersonnalisee}/${businessClass}${occurence != null && occurence != undefined ? '/' + occurence : ''}`,
|
|
421
424
|
createOrUpdateFormulaireData: () => `${Segment.base}/${AdministrationSegments.colonnePersonnaliseeData}`,
|
|
422
425
|
getAllWorkflowEtatSuivantByWorkflowEtatId: (id) => `${Segment.base}/${AdministrationSegments.workflowEtatSuivant}/${AdministrationSegments.getAllWorkflowEtatSuivantByWorkflowEtatId}/${id}`,
|
|
423
426
|
updateWorkflowEtatFromKanbanView: () => `${Segment.base}/${AdministrationSegments.workflowInstance}/${AdministrationSegments.updateWorkflowEtatFromKanbanView}`,
|
|
427
|
+
updateMultipleWorkflowEtatFromKanbanView: () => `${Segment.base}/${AdministrationSegments.workflowInstance}/${AdministrationSegments.updateMultipleWorkflowEtatFromKanbanView}`,
|
|
424
428
|
sendMailMessage: () => `${Segment.base}/${AdministrationSegments.mailing}/${AdministrationSegments.sendMailMessage}`,
|
|
425
429
|
// FormulaireData
|
|
426
430
|
getFormulaireDataColumnsDefinition: (id) => `${Segment.base}/${AdministrationSegments.formulaireData}/${AdministrationSegments.columnsDefinition}/${id}`,
|
|
@@ -2176,6 +2180,11 @@ class WorkflowResponse {
|
|
|
2176
2180
|
}
|
|
2177
2181
|
class WorkflowEtatKanbanRequest {
|
|
2178
2182
|
}
|
|
2183
|
+
class WorkflowEtatKanbanMultipleRequest {
|
|
2184
|
+
constructor() {
|
|
2185
|
+
this.uidObjets = [];
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2179
2188
|
|
|
2180
2189
|
class EntityInfo {
|
|
2181
2190
|
constructor() {
|
|
@@ -2438,6 +2447,9 @@ class WorkflowConfigurationService {
|
|
|
2438
2447
|
getWorkflowEtatByClassNameAndDescriminator(className, descriminatorValue, filterByUserRights) {
|
|
2439
2448
|
return this._httpClient.get(AdministrationEndpoints.getWorkflowEtatByClassNameAndDescriminator(className, descriminatorValue, filterByUserRights));
|
|
2440
2449
|
}
|
|
2450
|
+
getWorkflowEtatSuivantsByClassNameAndDescriminator(className, descriminatorValue) {
|
|
2451
|
+
return this._httpClient.get(AdministrationEndpoints.getWorkflowEtatSuivantsByClassNameAndDescriminator(className, descriminatorValue));
|
|
2452
|
+
}
|
|
2441
2453
|
getWorkflowByClasseAndDescriminator(classe, descriminatorValue) {
|
|
2442
2454
|
return this._httpClient.get(AdministrationEndpoints.getWorkflowByClasseAndDescriminator(classe, descriminatorValue));
|
|
2443
2455
|
}
|
|
@@ -2461,6 +2473,9 @@ class WorkflowConfigurationService {
|
|
|
2461
2473
|
updateWorkflowEtatFromKanbanView(request) {
|
|
2462
2474
|
return this._httpClient.post(AdministrationEndpoints.updateWorkflowEtatFromKanbanView(), request);
|
|
2463
2475
|
}
|
|
2476
|
+
updateMultipleWorkflowEtatFromKanbanView(request) {
|
|
2477
|
+
return this._httpClient.post(AdministrationEndpoints.updateMultipleWorkflowEtatFromKanbanView(), request);
|
|
2478
|
+
}
|
|
2464
2479
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: WorkflowConfigurationService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2465
2480
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: WorkflowConfigurationService, providedIn: 'root' }); }
|
|
2466
2481
|
}
|
|
@@ -11053,18 +11068,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
11053
11068
|
* Description: Displays a Kanban board view for TSI entities using the workflow etat value.
|
|
11054
11069
|
*/
|
|
11055
11070
|
class TsiKanbanWorkflowEtatComponent extends AppBaseComponent {
|
|
11071
|
+
set cardBusinessClass(value) {
|
|
11072
|
+
this._cardBusinessClass = value;
|
|
11073
|
+
this.loadEntityInfoAndWorkflowEtats();
|
|
11074
|
+
}
|
|
11075
|
+
get cardBusinessClass() { return this._cardBusinessClass; }
|
|
11076
|
+
set descriminatorValue(value) {
|
|
11077
|
+
this._descriminatorValue = value;
|
|
11078
|
+
if (this.entityInfo && this.hasDiscriminator) {
|
|
11079
|
+
this.loadWorkflowEtatsAndSuivants(value);
|
|
11080
|
+
}
|
|
11081
|
+
}
|
|
11082
|
+
get descriminatorValue() { return this._descriminatorValue; }
|
|
11056
11083
|
set page(value) {
|
|
11057
11084
|
this._page = value;
|
|
11058
11085
|
this.handlePageChange(value);
|
|
11059
11086
|
}
|
|
11060
11087
|
get page() { return this._page; }
|
|
11061
|
-
constructor(cdr, _workflowConfigurationService, _entityConfig, _localize, _notificationService) {
|
|
11088
|
+
constructor(cdr, _workflowConfigurationService, _entityConfig, _localize, _notificationService, _confirmationService, _messageService) {
|
|
11062
11089
|
super();
|
|
11063
11090
|
this.cdr = cdr;
|
|
11064
11091
|
this._workflowConfigurationService = _workflowConfigurationService;
|
|
11065
11092
|
this._entityConfig = _entityConfig;
|
|
11066
11093
|
this._localize = _localize;
|
|
11067
11094
|
this._notificationService = _notificationService;
|
|
11095
|
+
this._confirmationService = _confirmationService;
|
|
11096
|
+
this._messageService = _messageService;
|
|
11068
11097
|
this.buttonClicked = new EventEmitter();
|
|
11069
11098
|
this.callSearch = new EventEmitter();
|
|
11070
11099
|
// Columns whose per-column summary should be displayed in the Kanban header, formatted
|
|
@@ -11086,6 +11115,13 @@ class TsiKanbanWorkflowEtatComponent extends AppBaseComponent {
|
|
|
11086
11115
|
this.rows = 10;
|
|
11087
11116
|
this.totalCount = 0;
|
|
11088
11117
|
this.isLoading = false;
|
|
11118
|
+
// Bulk selection: restricted to a single workflow-etat column (current page only).
|
|
11119
|
+
// Dragging any selected card onto another column moves the whole selection.
|
|
11120
|
+
this.selectedCardUids = new Set();
|
|
11121
|
+
this.selectionColumnKey = null;
|
|
11122
|
+
// Allowed next workflow etats per workflow etat, loaded once at init; null if unavailable (the backend still checks every move).
|
|
11123
|
+
this.allowedTargetsByWorkflowEtat = null;
|
|
11124
|
+
this.isBulkDragging = false;
|
|
11089
11125
|
this.workFlowEtatNomLabels = [];
|
|
11090
11126
|
this.workFlowEtatNomLabels = [
|
|
11091
11127
|
{
|
|
@@ -11095,8 +11131,6 @@ class TsiKanbanWorkflowEtatComponent extends AppBaseComponent {
|
|
|
11095
11131
|
];
|
|
11096
11132
|
}
|
|
11097
11133
|
async ngOnInit() {
|
|
11098
|
-
await this.getWorkflowEtat(this.descriminatorValue);
|
|
11099
|
-
await this.getEntityInfo();
|
|
11100
11134
|
this.page$.subscribe(async (page) => {
|
|
11101
11135
|
if (page) {
|
|
11102
11136
|
this.isLoading = !!page.loading;
|
|
@@ -11104,10 +11138,19 @@ class TsiKanbanWorkflowEtatComponent extends AppBaseComponent {
|
|
|
11104
11138
|
}
|
|
11105
11139
|
});
|
|
11106
11140
|
}
|
|
11107
|
-
dragStart(
|
|
11141
|
+
dragStart(event, card) {
|
|
11108
11142
|
this.draggedCard = card;
|
|
11143
|
+
// Dragging a selected card while several are selected drags the whole selection;
|
|
11144
|
+
// dragging an unselected card (or a single selection) keeps the existing single move.
|
|
11145
|
+
this.isBulkDragging = this.selectedCount > 1 && this.isCardSelected(card);
|
|
11146
|
+
if (this.isBulkDragging && this.bulkDragPreview && event.dataTransfer) {
|
|
11147
|
+
event.dataTransfer.setDragImage(this.bulkDragPreview.nativeElement, 24, 24);
|
|
11148
|
+
}
|
|
11149
|
+
}
|
|
11150
|
+
dragEnd() {
|
|
11151
|
+
this.draggedCard = null;
|
|
11152
|
+
this.isBulkDragging = false;
|
|
11109
11153
|
}
|
|
11110
|
-
dragEnd() { this.draggedCard = null; }
|
|
11111
11154
|
allowDrop(event) { event.preventDefault(); }
|
|
11112
11155
|
trackByWorkflowEtat(index, status) { return status.key; }
|
|
11113
11156
|
trackByCard(index, card) { return card.uid; }
|
|
@@ -11119,12 +11162,23 @@ class TsiKanbanWorkflowEtatComponent extends AppBaseComponent {
|
|
|
11119
11162
|
this._notificationService.error("shared_tsi_component_grid_kanban_workflowEtat_view_sans_workflow_forbidden");
|
|
11120
11163
|
return;
|
|
11121
11164
|
}
|
|
11165
|
+
if (this.isBulkDragging) {
|
|
11166
|
+
this.dropSelection(newKey);
|
|
11167
|
+
this.draggedCard = null;
|
|
11168
|
+
this.isBulkDragging = false;
|
|
11169
|
+
return;
|
|
11170
|
+
}
|
|
11122
11171
|
const card = this.draggedCard;
|
|
11123
11172
|
const previousWorkflowEtat = this.draggedCard.status;
|
|
11124
11173
|
if (previousWorkflowEtat == null) {
|
|
11125
11174
|
this._notificationService.error("shared_tsi_component_grid_kanban_workflowEtat_view_no_workflow");
|
|
11126
11175
|
return;
|
|
11127
11176
|
}
|
|
11177
|
+
if (previousWorkflowEtat !== newKey && !this.isAllowedDropTarget(newKey)) {
|
|
11178
|
+
this._notificationService.error('shared_tsi_component_grid_kanban_workflowEtat_view_workflow_etat_suivant_error');
|
|
11179
|
+
this.draggedCard = null;
|
|
11180
|
+
return;
|
|
11181
|
+
}
|
|
11128
11182
|
if (this.draggedCard.status !== newKey && this.cardBusinessClass) {
|
|
11129
11183
|
this.isLoading = true;
|
|
11130
11184
|
let request = new WorkflowEtatKanbanRequest();
|
|
@@ -11138,6 +11192,7 @@ class TsiKanbanWorkflowEtatComponent extends AppBaseComponent {
|
|
|
11138
11192
|
this._workflowConfigurationService.updateWorkflowEtatFromKanbanView(request).subscribe({
|
|
11139
11193
|
next: (data) => {
|
|
11140
11194
|
card.status = newKey;
|
|
11195
|
+
this.removeFromSelection(card.uid);
|
|
11141
11196
|
this.updateCardMap();
|
|
11142
11197
|
this.isLoading = false;
|
|
11143
11198
|
},
|
|
@@ -11153,10 +11208,70 @@ class TsiKanbanWorkflowEtatComponent extends AppBaseComponent {
|
|
|
11153
11208
|
this.draggedCard = null;
|
|
11154
11209
|
}
|
|
11155
11210
|
onPageChange(event) {
|
|
11211
|
+
this.clearSelection();
|
|
11156
11212
|
this.first = event.first ?? 0;
|
|
11157
11213
|
this.rows = event.rows ?? 10;
|
|
11158
11214
|
this.callSearch.emit({ skipCount: this.first, maxResultCount: this.rows });
|
|
11159
11215
|
}
|
|
11216
|
+
get selectedCount() {
|
|
11217
|
+
return this.selectedCardUids.size;
|
|
11218
|
+
}
|
|
11219
|
+
// First selected cards, shown as a stack in the bulk drag image.
|
|
11220
|
+
get selectedCardsPreview() {
|
|
11221
|
+
return this.cards.filter(c => this.isCardSelected(c)).slice(0, 3);
|
|
11222
|
+
}
|
|
11223
|
+
isCardSelected(card) {
|
|
11224
|
+
return !!card.uid && this.selectedCardUids.has(card.uid);
|
|
11225
|
+
}
|
|
11226
|
+
// Selecting a card in another column restarts the selection in that column.
|
|
11227
|
+
toggleCardSelection(columnKey, card) {
|
|
11228
|
+
if (!card.uid) {
|
|
11229
|
+
return;
|
|
11230
|
+
}
|
|
11231
|
+
if (this.selectionColumnKey !== columnKey) {
|
|
11232
|
+
this.startSelection(columnKey);
|
|
11233
|
+
}
|
|
11234
|
+
if (this.selectedCardUids.has(card.uid)) {
|
|
11235
|
+
this.removeFromSelection(card.uid);
|
|
11236
|
+
return;
|
|
11237
|
+
}
|
|
11238
|
+
this.selectedCardUids.add(card.uid);
|
|
11239
|
+
}
|
|
11240
|
+
isColumnPageFullySelected(columnKey) {
|
|
11241
|
+
const columnCards = this.cardMapByWorkflowEtat.get(columnKey) ?? [];
|
|
11242
|
+
return this.selectionColumnKey === columnKey
|
|
11243
|
+
&& columnCards.length > 0
|
|
11244
|
+
&& columnCards.every(c => this.isCardSelected(c));
|
|
11245
|
+
}
|
|
11246
|
+
toggleSelectAllColumnPage(columnKey) {
|
|
11247
|
+
if (this.isColumnPageFullySelected(columnKey)) {
|
|
11248
|
+
this.clearSelection();
|
|
11249
|
+
return;
|
|
11250
|
+
}
|
|
11251
|
+
if (this.selectionColumnKey !== columnKey) {
|
|
11252
|
+
this.startSelection(columnKey);
|
|
11253
|
+
}
|
|
11254
|
+
(this.cardMapByWorkflowEtat.get(columnKey) ?? []).forEach(c => {
|
|
11255
|
+
if (c.uid) {
|
|
11256
|
+
this.selectedCardUids.add(c.uid);
|
|
11257
|
+
}
|
|
11258
|
+
});
|
|
11259
|
+
}
|
|
11260
|
+
clearSelection() {
|
|
11261
|
+
this.selectedCardUids.clear();
|
|
11262
|
+
this.selectionColumnKey = null;
|
|
11263
|
+
}
|
|
11264
|
+
// Used while dragging (one card or a selection), to highlight allowed / forbidden drop columns.
|
|
11265
|
+
isAllowedDropTarget(columnKey) {
|
|
11266
|
+
const sourceKey = this.draggedCard?.status ?? null;
|
|
11267
|
+
if (columnKey === null || sourceKey === null || columnKey === sourceKey) {
|
|
11268
|
+
return false;
|
|
11269
|
+
}
|
|
11270
|
+
if (this.allowedTargetsByWorkflowEtat === null) {
|
|
11271
|
+
return true;
|
|
11272
|
+
}
|
|
11273
|
+
return this.allowedTargetsByWorkflowEtat.get(sourceKey)?.has(columnKey) ?? false;
|
|
11274
|
+
}
|
|
11160
11275
|
getWorkflowEtatClass(card) {
|
|
11161
11276
|
const index = this.workFlowEtatNomLabels.findIndex(l => l.key === card.status);
|
|
11162
11277
|
return `workflowEtatColor-${index >= 0 ? index : 'default'}`;
|
|
@@ -11220,6 +11335,8 @@ class TsiKanbanWorkflowEtatComponent extends AppBaseComponent {
|
|
|
11220
11335
|
this.buttonClicked.emit({ field: mode, key: uid, selectKeyOnly: true });
|
|
11221
11336
|
}
|
|
11222
11337
|
async handlePageChange(page) {
|
|
11338
|
+
// A reload replaces the cards: previously selected uids are no longer reliable.
|
|
11339
|
+
this.clearSelection();
|
|
11223
11340
|
if (page?.groups) {
|
|
11224
11341
|
await this.handleGroupedPage(page);
|
|
11225
11342
|
return;
|
|
@@ -11274,9 +11391,99 @@ class TsiKanbanWorkflowEtatComponent extends AppBaseComponent {
|
|
|
11274
11391
|
this.cards = await this.mapItemsToCards(groups.flatMap(g => g.items ?? []));
|
|
11275
11392
|
this.updateCardMap();
|
|
11276
11393
|
}
|
|
11394
|
+
startSelection(columnKey) {
|
|
11395
|
+
this.clearSelection();
|
|
11396
|
+
this.selectionColumnKey = columnKey;
|
|
11397
|
+
}
|
|
11398
|
+
removeFromSelection(uid) {
|
|
11399
|
+
if (uid) {
|
|
11400
|
+
this.selectedCardUids.delete(uid);
|
|
11401
|
+
}
|
|
11402
|
+
if (this.selectedCardUids.size === 0) {
|
|
11403
|
+
this.clearSelection();
|
|
11404
|
+
}
|
|
11405
|
+
}
|
|
11406
|
+
// Drop of a dragged selection: same guards as the single move, then one confirmation for the batch.
|
|
11407
|
+
dropSelection(targetKey) {
|
|
11408
|
+
if (targetKey === this.selectionColumnKey || !this.cardBusinessClass) {
|
|
11409
|
+
return;
|
|
11410
|
+
}
|
|
11411
|
+
if (!this.isAllowedDropTarget(targetKey)) {
|
|
11412
|
+
this._notificationService.error('shared_tsi_component_grid_kanban_workflowEtat_view_workflow_etat_suivant_error');
|
|
11413
|
+
return;
|
|
11414
|
+
}
|
|
11415
|
+
const confirmMessage = this._localize.transform('shared_tsi_component_grid_kanban_workflowEtat_view_bulk_confirm')
|
|
11416
|
+
.replace('{0}', `${this.selectedCount}`)
|
|
11417
|
+
.replace('{1}', this.getLocalizedWorkflowEtat(this.selectionColumnKey))
|
|
11418
|
+
.replace('{2}', this.getLocalizedWorkflowEtat(targetKey));
|
|
11419
|
+
this._confirmationService.confirm(confirmMessage, undefined, (confirmed) => {
|
|
11420
|
+
if (confirmed) {
|
|
11421
|
+
this.executeBulkMove(targetKey);
|
|
11422
|
+
}
|
|
11423
|
+
});
|
|
11424
|
+
}
|
|
11425
|
+
executeBulkMove(targetKey) {
|
|
11426
|
+
const request = new WorkflowEtatKanbanMultipleRequest();
|
|
11427
|
+
request.businessClass = this.cardBusinessClass;
|
|
11428
|
+
request.workFlowEtat = this.selectionColumnKey ?? undefined;
|
|
11429
|
+
request.workFlowEtatSuivant = targetKey;
|
|
11430
|
+
request.uidObjets = [...this.selectedCardUids];
|
|
11431
|
+
request.discriminatorClassName = this.entityInfo?.discriminatorClassName;
|
|
11432
|
+
request.discriminatorPropertyName = this.entityInfo?.discriminatorPropertyName;
|
|
11433
|
+
request.discriminatorValue = this.descriminatorValue;
|
|
11434
|
+
this.isLoading = true;
|
|
11435
|
+
this._workflowConfigurationService.updateMultipleWorkflowEtatFromKanbanView(request).subscribe({
|
|
11436
|
+
next: (response) => {
|
|
11437
|
+
this.showBulkMoveFailures(response);
|
|
11438
|
+
this.clearSelection();
|
|
11439
|
+
this.isLoading = false;
|
|
11440
|
+
this.callSearch.emit({ skipCount: this.first, maxResultCount: this.rows });
|
|
11441
|
+
},
|
|
11442
|
+
error: (error) => {
|
|
11443
|
+
this._notificationService.error(error?.error);
|
|
11444
|
+
this.isLoading = false;
|
|
11445
|
+
}
|
|
11446
|
+
});
|
|
11447
|
+
}
|
|
11448
|
+
// Only failures are reported; successfully moved cards need no feedback.
|
|
11449
|
+
showBulkMoveFailures(response) {
|
|
11450
|
+
if (!response?.failed?.length) {
|
|
11451
|
+
return;
|
|
11452
|
+
}
|
|
11453
|
+
const titleByUid = new Map(this.cards.map(c => [c.uid, c.headerTitle]));
|
|
11454
|
+
const failureLines = response.failed.map(f => `${titleByUid.get(f.uidObjet) || f.uidObjet} : ${this._localize.transform(f.errorMessage)}`);
|
|
11455
|
+
this._messageService.error(`${response.failedCount} / ${response.total} ${this._localize.transform('shared_tsi_component_grid_kanban_workflowEtat_view_bulk_failed')}`, failureLines);
|
|
11456
|
+
}
|
|
11277
11457
|
async getEntityInfo() {
|
|
11278
11458
|
this.entityInfo = await this._entityConfig.getEntityInfoFromCache(this.cardBusinessClass);
|
|
11279
11459
|
}
|
|
11460
|
+
get hasDiscriminator() {
|
|
11461
|
+
return !!(this.entityInfo?.discriminatorClassName || this.entityInfo?.discriminatorPropertyName);
|
|
11462
|
+
}
|
|
11463
|
+
// Entity info first: it tells whether the workflow etats depend on a discriminator value.
|
|
11464
|
+
async loadEntityInfoAndWorkflowEtats() {
|
|
11465
|
+
if (!this._cardBusinessClass) {
|
|
11466
|
+
return;
|
|
11467
|
+
}
|
|
11468
|
+
await this.getEntityInfo();
|
|
11469
|
+
if (!this.hasDiscriminator) {
|
|
11470
|
+
await this.loadWorkflowEtatsAndSuivants();
|
|
11471
|
+
}
|
|
11472
|
+
else if (this._descriminatorValue) {
|
|
11473
|
+
await this.loadWorkflowEtatsAndSuivants(this._descriminatorValue);
|
|
11474
|
+
}
|
|
11475
|
+
}
|
|
11476
|
+
async loadWorkflowEtatsAndSuivants(descriminatorValue) {
|
|
11477
|
+
await Promise.all([
|
|
11478
|
+
this.getWorkflowEtat(descriminatorValue),
|
|
11479
|
+
this.getWorkflowEtatSuivants(descriminatorValue),
|
|
11480
|
+
]);
|
|
11481
|
+
// A page may have arrived before the columns were known: re-bucket its cards into them.
|
|
11482
|
+
const page = this.page$?.value ?? this._page;
|
|
11483
|
+
if (page) {
|
|
11484
|
+
await this.handlePageChange(page);
|
|
11485
|
+
}
|
|
11486
|
+
}
|
|
11280
11487
|
getColKeys() {
|
|
11281
11488
|
return {
|
|
11282
11489
|
photo: this.entityInfo?.cardHeaderPhotoColumn?.toLowerCase() ?? '',
|
|
@@ -11345,13 +11552,26 @@ class TsiKanbanWorkflowEtatComponent extends AppBaseComponent {
|
|
|
11345
11552
|
console.error('erreur getWorkflowEtatByClassNameAndDescriminator : ', error);
|
|
11346
11553
|
}
|
|
11347
11554
|
}
|
|
11348
|
-
|
|
11349
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TsiKanbanWorkflowEtatComponent, selector: "Tsi-kanban-workflow-etat", inputs: { cardBusinessClass: "cardBusinessClass", header: "header", id: "id", page$: "page$", descriminatorValue: "descriminatorValue", summaryColumns: "summaryColumns", overflowActionsMenu: "overflowActionsMenu", selectKeyOnly: "selectKeyOnly", key: "key", page: "page" }, outputs: { buttonClicked: "buttonClicked", callSearch: "callSearch" }, usesInheritance: true, ngImport: i0, template: "<div class=\"card flex justify-content-center\">\r\n <p-paginator\r\n [first]=\"first\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalCount\"\r\n [rowsPerPageOptions]=\"[1, 10, 25, 50]\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{{ 'Showing' | localize }} {first} {{'to' | localize}} {last} {{ 'of' | localize }} {totalRecords}\">\r\n </p-paginator>\r\n</div>\r\n\r\n<div class=\"kanban-board flex gap-4 overflow-auto\">\r\n <div *ngFor=\"let workflowEtat of displayedWorkFlowEtatLabels; trackBy: trackByWorkflowEtat\"\r\n class=\"kanban-column flex flex-column border-round surface-0 shadow-2\"\r\n (dragover)=\"allowDrop($event)\"\r\n (drop)=\"drop($event, workflowEtat.key)\">\r\n \r\n <div class=\"column-header p-3 border-bottom-1 surface-border font-semibold\">\r\n {{ workflowEtat.localized }}\r\n <span class=\"text-sm font-normal text-gray-500\">\r\n ({{ getColumnCount(workflowEtat.key) }})\r\n </span>\r\n <div class=\"text-xs font-normal text-gray-500\" *ngIf=\"hasColumnSummaries\">\r\n <div *ngFor=\"let sumCol of summaryColumns\" class=\"flex align-items-center gap-1\">\r\n <span>{{ (sumCol.header ?? sumCol.field) | localize }}:</span>\r\n <ng-container [ngSwitch]=\"sumCol.type\">\r\n <Tsi-Currency-Societe-Display *ngSwitchCase=\"displayTypes.CURRENCY_SOCIETE_DISPLAY\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Currency-Societe-Display>\r\n <Tsi-Integer-Display *ngSwitchCase=\"displayTypes.INTEGER_DISPLAY\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Integer-Display>\r\n <Tsi-Rate-Display *ngSwitchCase=\"displayTypes.RATE_DISPLAY\"\r\n [isFraction]=\"sumCol.isFraction ?? false\" [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Rate-Display>\r\n <Tsi-Decimal-Display *ngSwitchCase=\"displayTypes.DECIMAL_DISPLAY\"\r\n [formatDecimal]=\"sumCol.formatDecimal\" [numOfDecimal]=\"sumCol.numOfDecimal\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Decimal-Display>\r\n <Tsi-Currency-Other-Display *ngSwitchCase=\"displayTypes.CURRENCY_OTHER_DISPLAY\"\r\n [currency]=\"sumCol.currencyOtherCode\" [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Currency-Other-Display>\r\n <span *ngSwitchDefault>{{ getColumnSummaryValue(workflowEtat.key, sumCol.field) }}</span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"column-cards flex-1 overflow-auto p-3\">\r\n <div *ngFor=\"let card of cardMapByWorkflowEtat.get(workflowEtat.key); trackBy: trackByCard\"\r\n class=\"kanban-card p-3 border-round bg-white mb-3 shadow-1\"\r\n [ngClass]=\"getWorkflowEtatClass(card)\"\r\n draggable=\"true\"\r\n (dragstart)=\"dragStart($event, card)\"\r\n (dragend)=\"dragEnd()\">\r\n \r\n <div class=\"font-bold mb-2\">{{ card.headerTitle }}</div>\r\n <div class=\"text-sm text-gray-600 mb-3\">{{ card.description }}</div>\r\n <div class=\"text-sm text-gray-600 mb-3\">\r\n <span class=\"font-semibold\">{{ 'shared_tsi_component_grid_kanban_workflowEtat_view_workflow_etat' | localize }}:</span>\r\n <span>{{ getLocalizedWorkflowEtat(card.status) }}</span>\r\n </div>\r\n\r\n <p-menu appendTo=\"body\" #menuMoreActions\r\n [model]=\"overflowActionsMenu\"\r\n [popup]=\"true\" styleClass=\"overflow-menu\"\r\n [style]=\"{ 'width': 'auto', 'min-width': '0px' }\">\r\n <ng-template pTemplate=\"item\" let-menuItem>\r\n <a pRipple class=\"flex align-items-center p-menuitem-link\"\r\n [ngClass]=\"menuItem.styleClass\"\r\n (click)=\"onOverflowActionClicked(card, menuItem)\">\r\n <i *ngIf=\"menuItem.id === 'notes'\" class=\"{{ menuItem.iconClass }} p-menuitem-icon badge-icon has-badge\"\r\n [ngClass]=\"menuItem.iconStyleClass\" pBadge severity=\"danger\"\r\n [value]=\"card.fullRecord.notesCount\"\r\n [badgeDisabled]=\"card.fullRecord.notesCount == null\" badgePosition=\"top-right\">\r\n </i>\r\n\r\n <i *ngIf=\"menuItem.id !== 'notes'\" class=\"{{menuItem.iconClass}} p-menuitem-icon\"\r\n [ngClass]=\"menuItem.iconStyleClass\">\r\n </i>\r\n\r\n <span class=\"menu-label\">\r\n {{ menuItem.label | localize }}\r\n </span>\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n\r\n <div class=\"flex justify-content-end align-items-center mt-1 gap-2 p-0\">\r\n <Tsi-Button [styleClass]=\"'p-button-rounded p-button-text p-0-5'\" type=\"button\" icon=\"pi pi-pencil\"\r\n (click)=\"edit(card.uid)\">\r\n </Tsi-Button>\r\n <p-button type=\"button\" icon=\"pi pi-ellipsis-v\" styleClass=\"overflow-btn\"\r\n (onClick)=\"overflowColumnClicked(menuMoreActions, $event, card)\">\r\n </p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div class=\"overlay\" *ngIf=\"isLoading\">\r\n <div class=\"spinner-wrapper\">\r\n <app-spinner></app-spinner>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;padding:1rem}[draggable=true]{-webkit-user-select:none;user-select:none}.kanban-board{height:calc(100vh - 100px);padding:1rem}.kanban-column{width:300px;max-height:100%;display:flex;flex-direction:column;background-color:#f8f9fa}.column-header{font-size:1rem;font-weight:700;background-color:#fff;border-radius:6px 6px 0 0}.column-cards{overflow-y:auto;flex:1}.kanban-card{border-left:4px solid;cursor:move;transition:border-color .3s ease}.workflowEtatColor-0{border-left-color:#7269ef}.workflowEtatColor-1{border-left-color:#00c853}.workflowEtatColor-2{border-left-color:#ffab00}.workflowEtatColor-3{border-left-color:#d50000}.workflowEtatColor-4{border-left-color:#ff33a8}.workflowEtatColor-5{border-left-color:#3357ff}.workflowEtatColor-6{border-left-color:#ff8c00}.workflowEtatColor-7{border-left-color:indigo}.workflowEtatColor-8{border-left-color:#33ff57}.workflowEtatColor-9{border-left-color:#ff5733}.workflowEtatColor-10{border-left-color:khaki}[class*=workflowEtatColor-]{border-left-style:solid;border-left-width:4px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2$2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i2$5.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }, { kind: "directive", type: i11$2.BadgeDirective, selector: "[pBadge]", inputs: ["badgeDisabled", "badgeSize", "size", "severity", "value", "badgeStyle", "badgeStyleClass"] }, { kind: "component", type: TsiCurrencyOtherDisplayComponent, selector: "Tsi-Currency-Other-Display", inputs: ["currency", "inputData"] }, { kind: "component", type: TsiCurrencySocieteDisplayComponent, selector: "Tsi-Currency-Societe-Display", inputs: ["inputData"] }, { kind: "component", type: TsiDecimalDisplayComponent, selector: "Tsi-Decimal-Display", inputs: ["inputData", "formatDecimal", "numOfDecimal"] }, { kind: "component", type: TsiIntegerDisplayComponent, selector: "Tsi-Integer-Display", inputs: ["inputData"] }, { kind: "component", type: TsiRateDisplayComponent, selector: "Tsi-Rate-Display", inputs: ["isFraction", "inputData", "numOfDecimal"] }, { kind: "component", type: TsiButtonComponent, selector: "Tsi-Button", inputs: ["disabled", "text", "style", "tooltipText", "tooltipPosition", "buttonType", "icon", "styleClass", "iconSrc", "id", "iconWidth", "iconClass"], outputs: ["onClick", "rightClick"] }, { kind: "component", type: SpinnerComponent, selector: "app-spinner" }, { kind: "pipe", type: LocalizePipe, name: "localize" }] }); }
|
|
11555
|
+
async getWorkflowEtatSuivants(descriminatorValue) {
|
|
11556
|
+
if (!this.cardBusinessClass) {
|
|
11557
|
+
return;
|
|
11558
|
+
}
|
|
11559
|
+
try {
|
|
11560
|
+
const response = await firstValueFrom(this._workflowConfigurationService.getWorkflowEtatSuivantsByClassNameAndDescriminator(this.cardBusinessClass, descriminatorValue));
|
|
11561
|
+
this.allowedTargetsByWorkflowEtat = new Map(Object.entries(response ?? {})
|
|
11562
|
+
.map(([workflowEtat, suivants]) => [workflowEtat, new Set(suivants)]));
|
|
11563
|
+
}
|
|
11564
|
+
catch (error) {
|
|
11565
|
+
console.error('erreur getWorkflowEtatSuivantsByClassNameAndDescriminator : ', error);
|
|
11566
|
+
}
|
|
11567
|
+
}
|
|
11568
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TsiKanbanWorkflowEtatComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: WorkflowConfigurationService }, { token: EntityConfigurationService }, { token: LocalizePipe }, { token: TsiNotificationService }, { token: TsiConfirmationService }, { token: TsiMessageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11569
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TsiKanbanWorkflowEtatComponent, selector: "Tsi-kanban-workflow-etat", inputs: { cardBusinessClass: "cardBusinessClass", header: "header", id: "id", page$: "page$", descriminatorValue: "descriminatorValue", summaryColumns: "summaryColumns", overflowActionsMenu: "overflowActionsMenu", selectKeyOnly: "selectKeyOnly", key: "key", page: "page" }, outputs: { buttonClicked: "buttonClicked", callSearch: "callSearch" }, viewQueries: [{ propertyName: "bulkDragPreview", first: true, predicate: ["bulkDragPreview"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"card flex justify-content-center\">\r\n <p-paginator [first]=\"first\" [rows]=\"rows\" [totalRecords]=\"totalCount\" [rowsPerPageOptions]=\"[1, 10, 25, 50]\"\r\n (onPageChange)=\"onPageChange($event)\" [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{{ 'Showing' | localize }} {first} {{'to' | localize}} {last} {{ 'of' | localize }} {totalRecords}\">\r\n </p-paginator>\r\n</div>\r\n\r\n<div *ngIf=\"selectedCount > 0\" class=\"kanban-bulk-bar flex flex-wrap align-items-center gap-3 p-2 mx-3 border-round\">\r\n <span class=\"font-semibold\">\r\n {{ selectedCount }} {{ 'shared_tsi_component_grid_kanban_workflowEtat_view_bulk_selected' | localize }}\r\n </span>\r\n <span class=\"text-sm text-gray-600\">\r\n <i class=\"pi pi-arrows-h mr-1\"></i>{{ 'shared_tsi_component_grid_kanban_workflowEtat_view_bulk_drag_hint' | localize\r\n }}\r\n </span>\r\n <p-button icon=\"pi pi-times\" styleClass=\"p-button-text\"\r\n [label]=\"'shared_tsi_component_grid_kanban_workflowEtat_view_bulk_clear_selection' | localize\"\r\n [disabled]=\"isLoading\" (onClick)=\"clearSelection()\">\r\n </p-button>\r\n</div>\r\n\r\n<div class=\"kanban-board flex gap-4 overflow-auto\">\r\n <div *ngFor=\"let workflowEtat of displayedWorkFlowEtatLabels; trackBy: trackByWorkflowEtat\"\r\n class=\"kanban-column flex flex-column border-round surface-0 shadow-2\"\r\n [class.kanban-column-drop-allowed]=\"draggedCard && isAllowedDropTarget(workflowEtat.key)\"\r\n [class.kanban-column-drop-forbidden]=\"draggedCard && workflowEtat.key !== draggedCard.status && !isAllowedDropTarget(workflowEtat.key)\"\r\n (dragover)=\"allowDrop($event)\" (drop)=\"drop($event, workflowEtat.key)\">\r\n\r\n <div class=\"column-header p-3 border-bottom-1 surface-border font-semibold\">\r\n {{ workflowEtat.localized }}\r\n <span class=\"text-sm font-normal text-gray-500\">\r\n ({{ getColumnCount(workflowEtat.key) }})\r\n </span>\r\n <div *ngIf=\"workflowEtat.key !== null && selectionColumnKey === workflowEtat.key\"\r\n class=\"flex align-items-center gap-2 mt-2 text-sm font-normal\">\r\n <p-checkbox [binary]=\"true\" [ngModel]=\"isColumnPageFullySelected(workflowEtat.key)\"\r\n (onChange)=\"toggleSelectAllColumnPage(workflowEtat.key)\" [disabled]=\"isLoading\">\r\n </p-checkbox>\r\n <span>{{ 'shared_tsi_component_grid_kanban_workflowEtat_view_bulk_select_all_page' | localize }}</span>\r\n </div>\r\n <div class=\"text-xs font-normal text-gray-500\" *ngIf=\"hasColumnSummaries\">\r\n <div *ngFor=\"let sumCol of summaryColumns\" class=\"flex align-items-center gap-1\">\r\n <span>{{ (sumCol.header ?? sumCol.field) | localize }}:</span>\r\n <ng-container [ngSwitch]=\"sumCol.type\">\r\n <Tsi-Currency-Societe-Display *ngSwitchCase=\"displayTypes.CURRENCY_SOCIETE_DISPLAY\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Currency-Societe-Display>\r\n <Tsi-Integer-Display *ngSwitchCase=\"displayTypes.INTEGER_DISPLAY\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Integer-Display>\r\n <Tsi-Rate-Display *ngSwitchCase=\"displayTypes.RATE_DISPLAY\" [isFraction]=\"sumCol.isFraction ?? false\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Rate-Display>\r\n <Tsi-Decimal-Display *ngSwitchCase=\"displayTypes.DECIMAL_DISPLAY\" [formatDecimal]=\"sumCol.formatDecimal\"\r\n [numOfDecimal]=\"sumCol.numOfDecimal\" [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Decimal-Display>\r\n <Tsi-Currency-Other-Display *ngSwitchCase=\"displayTypes.CURRENCY_OTHER_DISPLAY\"\r\n [currency]=\"sumCol.currencyOtherCode\" [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Currency-Other-Display>\r\n <span *ngSwitchDefault>{{ getColumnSummaryValue(workflowEtat.key, sumCol.field) }}</span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"column-cards flex-1 overflow-auto p-3\">\r\n <div *ngFor=\"let card of cardMapByWorkflowEtat.get(workflowEtat.key); trackBy: trackByCard\"\r\n class=\"kanban-card p-3 border-round bg-white mb-3 shadow-1\" [ngClass]=\"getWorkflowEtatClass(card)\"\r\n [class.kanban-card-selected]=\"isCardSelected(card)\"\r\n [class.kanban-card-drag-source]=\"isBulkDragging && isCardSelected(card)\" draggable=\"true\"\r\n (dragstart)=\"dragStart($event, card)\" (dragend)=\"dragEnd()\">\r\n\r\n <div class=\"flex align-items-center gap-2 mb-2\">\r\n <p-checkbox *ngIf=\"workflowEtat.key !== null\" [binary]=\"true\" [ngModel]=\"isCardSelected(card)\"\r\n (onChange)=\"toggleCardSelection(workflowEtat.key, card)\" [disabled]=\"isLoading\">\r\n </p-checkbox>\r\n <div class=\"font-bold\">{{ card.headerTitle }}</div>\r\n </div>\r\n <div class=\"text-sm text-gray-600 mb-3\">{{ card.description }}</div>\r\n <div class=\"text-sm text-gray-600 mb-3\">\r\n <span class=\"font-semibold\">{{ 'shared_tsi_component_grid_kanban_workflowEtat_view_workflow_etat' | localize\r\n }}:</span>\r\n <span>{{ getLocalizedWorkflowEtat(card.status) }}</span>\r\n </div>\r\n\r\n <p-menu appendTo=\"body\" #menuMoreActions [model]=\"overflowActionsMenu\" [popup]=\"true\" styleClass=\"overflow-menu\"\r\n [style]=\"{ 'width': 'auto', 'min-width': '0px' }\">\r\n <ng-template pTemplate=\"item\" let-menuItem>\r\n <a pRipple class=\"flex align-items-center p-menuitem-link\" [ngClass]=\"menuItem.styleClass\"\r\n (click)=\"onOverflowActionClicked(card, menuItem)\">\r\n <i *ngIf=\"menuItem.id === 'notes'\" class=\"{{ menuItem.iconClass }} p-menuitem-icon badge-icon has-badge\"\r\n [ngClass]=\"menuItem.iconStyleClass\" pBadge severity=\"danger\" [value]=\"card.fullRecord.notesCount\"\r\n [badgeDisabled]=\"card.fullRecord.notesCount == null\" badgePosition=\"top-right\">\r\n </i>\r\n\r\n <i *ngIf=\"menuItem.id !== 'notes'\" class=\"{{menuItem.iconClass}} p-menuitem-icon\"\r\n [ngClass]=\"menuItem.iconStyleClass\">\r\n </i>\r\n\r\n <span class=\"menu-label\">\r\n {{ menuItem.label | localize }}\r\n </span>\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n\r\n <div class=\"flex justify-content-end align-items-center mt-1 gap-2 p-0\">\r\n <Tsi-Button [styleClass]=\"'p-button-rounded p-button-text p-0-5'\" type=\"button\" icon=\"pi pi-pencil\"\r\n (click)=\"edit(card.uid)\">\r\n </Tsi-Button>\r\n <p-button type=\"button\" icon=\"pi pi-ellipsis-v\" styleClass=\"overflow-btn\"\r\n (onClick)=\"overflowColumnClicked(menuMoreActions, $event, card)\">\r\n </p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div #bulkDragPreview *ngIf=\"selectedCount > 1\" class=\"kanban-bulk-drag-preview\" aria-hidden=\"true\">\r\n <div class=\"kanban-bulk-drag-preview-badge\">\r\n {{ selectedCount }} {{ 'shared_tsi_component_grid_kanban_workflowEtat_view_bulk_selected' | localize }}\r\n </div>\r\n <div *ngFor=\"let previewCard of selectedCardsPreview\" class=\"kanban-bulk-drag-preview-card\"\r\n [ngClass]=\"getWorkflowEtatClass(previewCard)\">\r\n {{ previewCard.headerTitle }}\r\n </div>\r\n <div *ngIf=\"selectedCount > selectedCardsPreview.length\" class=\"kanban-bulk-drag-preview-more\">\r\n + {{ selectedCount - selectedCardsPreview.length }}\r\n </div>\r\n</div>\r\n\r\n<div class=\"overlay\" *ngIf=\"isLoading\">\r\n <div class=\"spinner-wrapper\">\r\n <app-spinner></app-spinner>\r\n </div>\r\n</div>", styles: [":host{display:block;padding:1rem}[draggable=true]{-webkit-user-select:none;user-select:none}.kanban-board{height:calc(100vh - 100px);padding:1rem}.kanban-column{width:300px;max-height:100%;display:flex;flex-direction:column;background-color:#f8f9fa}.column-header{font-size:1rem;font-weight:700;background-color:#fff;border-radius:6px 6px 0 0}.column-cards{overflow-y:auto;flex:1}.kanban-card{border-left:4px solid;cursor:move;transition:border-color .3s ease}.kanban-card-selected{outline:2px solid var(--primary-color);outline-offset:-2px}.kanban-card-drag-source{opacity:.4}.kanban-bulk-drag-preview{position:fixed;top:-1000px;left:-1000px;width:260px;padding:.5rem;pointer-events:none}.kanban-bulk-drag-preview-badge{display:inline-block;margin-bottom:.5rem;padding:.25rem .75rem;border-radius:1rem;background-color:var(--primary-color);color:var(--primary-color-text);font-weight:600;font-size:.85rem}.kanban-bulk-drag-preview-card{position:relative;padding:.75rem;border-radius:6px;background-color:#fff;box-shadow:0 2px 6px #0003;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kanban-bulk-drag-preview-card+.kanban-bulk-drag-preview-card{margin-top:-.75rem}.kanban-bulk-drag-preview-more{margin-top:.5rem;font-size:.85rem;color:var(--text-color-secondary)}.kanban-bulk-bar{background-color:var(--surface-100)}.kanban-column-drop-allowed{outline:2px dashed var(--green-500);outline-offset:-2px}.kanban-column-drop-forbidden{opacity:.5}.workflowEtatColor-0{border-left-color:#7269ef}.workflowEtatColor-1{border-left-color:#00c853}.workflowEtatColor-2{border-left-color:#ffab00}.workflowEtatColor-3{border-left-color:#d50000}.workflowEtatColor-4{border-left-color:#ff33a8}.workflowEtatColor-5{border-left-color:#3357ff}.workflowEtatColor-6{border-left-color:#ff8c00}.workflowEtatColor-7{border-left-color:indigo}.workflowEtatColor-8{border-left-color:#33ff57}.workflowEtatColor-9{border-left-color:#ff5733}.workflowEtatColor-10{border-left-color:khaki}[class*=workflowEtatColor-]{border-left-style:solid;border-left-width:4px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i4.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i2$5.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }, { kind: "directive", type: i11$2.BadgeDirective, selector: "[pBadge]", inputs: ["badgeDisabled", "badgeSize", "size", "severity", "value", "badgeStyle", "badgeStyleClass"] }, { kind: "component", type: TsiCurrencyOtherDisplayComponent, selector: "Tsi-Currency-Other-Display", inputs: ["currency", "inputData"] }, { kind: "component", type: TsiCurrencySocieteDisplayComponent, selector: "Tsi-Currency-Societe-Display", inputs: ["inputData"] }, { kind: "component", type: TsiDecimalDisplayComponent, selector: "Tsi-Decimal-Display", inputs: ["inputData", "formatDecimal", "numOfDecimal"] }, { kind: "component", type: TsiIntegerDisplayComponent, selector: "Tsi-Integer-Display", inputs: ["inputData"] }, { kind: "component", type: TsiRateDisplayComponent, selector: "Tsi-Rate-Display", inputs: ["isFraction", "inputData", "numOfDecimal"] }, { kind: "component", type: TsiButtonComponent, selector: "Tsi-Button", inputs: ["disabled", "text", "style", "tooltipText", "tooltipPosition", "buttonType", "icon", "styleClass", "iconSrc", "id", "iconWidth", "iconClass"], outputs: ["onClick", "rightClick"] }, { kind: "component", type: SpinnerComponent, selector: "app-spinner" }, { kind: "pipe", type: LocalizePipe, name: "localize" }] }); }
|
|
11350
11570
|
}
|
|
11351
11571
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TsiKanbanWorkflowEtatComponent, decorators: [{
|
|
11352
11572
|
type: Component,
|
|
11353
|
-
args: [{ selector: 'Tsi-kanban-workflow-etat', template: "<div class=\"card flex justify-content-center\">\r\n <p-paginator\r\n [first]=\"first\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalCount\"\r\n [rowsPerPageOptions]=\"[1, 10, 25, 50]\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{{ 'Showing' | localize }} {first} {{'to' | localize}} {last} {{ 'of' | localize }} {totalRecords}\">\r\n </p-paginator>\r\n</div>\r\n\r\n<div class=\"kanban-board flex gap-4 overflow-auto\">\r\n <div *ngFor=\"let workflowEtat of displayedWorkFlowEtatLabels; trackBy: trackByWorkflowEtat\"\r\n class=\"kanban-column flex flex-column border-round surface-0 shadow-2\"\r\n (dragover)=\"allowDrop($event)\"\r\n (drop)=\"drop($event, workflowEtat.key)\">\r\n \r\n <div class=\"column-header p-3 border-bottom-1 surface-border font-semibold\">\r\n {{ workflowEtat.localized }}\r\n <span class=\"text-sm font-normal text-gray-500\">\r\n ({{ getColumnCount(workflowEtat.key) }})\r\n </span>\r\n <div class=\"text-xs font-normal text-gray-500\" *ngIf=\"hasColumnSummaries\">\r\n <div *ngFor=\"let sumCol of summaryColumns\" class=\"flex align-items-center gap-1\">\r\n <span>{{ (sumCol.header ?? sumCol.field) | localize }}:</span>\r\n <ng-container [ngSwitch]=\"sumCol.type\">\r\n <Tsi-Currency-Societe-Display *ngSwitchCase=\"displayTypes.CURRENCY_SOCIETE_DISPLAY\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Currency-Societe-Display>\r\n <Tsi-Integer-Display *ngSwitchCase=\"displayTypes.INTEGER_DISPLAY\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Integer-Display>\r\n <Tsi-Rate-Display *ngSwitchCase=\"displayTypes.RATE_DISPLAY\"\r\n [isFraction]=\"sumCol.isFraction ?? false\" [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Rate-Display>\r\n <Tsi-Decimal-Display *ngSwitchCase=\"displayTypes.DECIMAL_DISPLAY\"\r\n [formatDecimal]=\"sumCol.formatDecimal\" [numOfDecimal]=\"sumCol.numOfDecimal\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Decimal-Display>\r\n <Tsi-Currency-Other-Display *ngSwitchCase=\"displayTypes.CURRENCY_OTHER_DISPLAY\"\r\n [currency]=\"sumCol.currencyOtherCode\" [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Currency-Other-Display>\r\n <span *ngSwitchDefault>{{ getColumnSummaryValue(workflowEtat.key, sumCol.field) }}</span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"column-cards flex-1 overflow-auto p-3\">\r\n <div *ngFor=\"let card of cardMapByWorkflowEtat.get(workflowEtat.key); trackBy: trackByCard\"\r\n class=\"kanban-card p-3 border-round bg-white mb-3 shadow-1\"\r\n [ngClass]=\"getWorkflowEtatClass(card)\"\r\n draggable=\"true\"\r\n (dragstart)=\"dragStart($event, card)\"\r\n (dragend)=\"dragEnd()\">\r\n \r\n <div class=\"font-bold mb-2\">{{ card.headerTitle }}</div>\r\n <div class=\"text-sm text-gray-600 mb-3\">{{ card.description }}</div>\r\n <div class=\"text-sm text-gray-600 mb-3\">\r\n <span class=\"font-semibold\">{{ 'shared_tsi_component_grid_kanban_workflowEtat_view_workflow_etat' | localize }}:</span>\r\n <span>{{ getLocalizedWorkflowEtat(card.status) }}</span>\r\n </div>\r\n\r\n <p-menu appendTo=\"body\" #menuMoreActions\r\n [model]=\"overflowActionsMenu\"\r\n [popup]=\"true\" styleClass=\"overflow-menu\"\r\n [style]=\"{ 'width': 'auto', 'min-width': '0px' }\">\r\n <ng-template pTemplate=\"item\" let-menuItem>\r\n <a pRipple class=\"flex align-items-center p-menuitem-link\"\r\n [ngClass]=\"menuItem.styleClass\"\r\n (click)=\"onOverflowActionClicked(card, menuItem)\">\r\n <i *ngIf=\"menuItem.id === 'notes'\" class=\"{{ menuItem.iconClass }} p-menuitem-icon badge-icon has-badge\"\r\n [ngClass]=\"menuItem.iconStyleClass\" pBadge severity=\"danger\"\r\n [value]=\"card.fullRecord.notesCount\"\r\n [badgeDisabled]=\"card.fullRecord.notesCount == null\" badgePosition=\"top-right\">\r\n </i>\r\n\r\n <i *ngIf=\"menuItem.id !== 'notes'\" class=\"{{menuItem.iconClass}} p-menuitem-icon\"\r\n [ngClass]=\"menuItem.iconStyleClass\">\r\n </i>\r\n\r\n <span class=\"menu-label\">\r\n {{ menuItem.label | localize }}\r\n </span>\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n\r\n <div class=\"flex justify-content-end align-items-center mt-1 gap-2 p-0\">\r\n <Tsi-Button [styleClass]=\"'p-button-rounded p-button-text p-0-5'\" type=\"button\" icon=\"pi pi-pencil\"\r\n (click)=\"edit(card.uid)\">\r\n </Tsi-Button>\r\n <p-button type=\"button\" icon=\"pi pi-ellipsis-v\" styleClass=\"overflow-btn\"\r\n (onClick)=\"overflowColumnClicked(menuMoreActions, $event, card)\">\r\n </p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div class=\"overlay\" *ngIf=\"isLoading\">\r\n <div class=\"spinner-wrapper\">\r\n <app-spinner></app-spinner>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;padding:1rem}[draggable=true]{-webkit-user-select:none;user-select:none}.kanban-board{height:calc(100vh - 100px);padding:1rem}.kanban-column{width:300px;max-height:100%;display:flex;flex-direction:column;background-color:#f8f9fa}.column-header{font-size:1rem;font-weight:700;background-color:#fff;border-radius:6px 6px 0 0}.column-cards{overflow-y:auto;flex:1}.kanban-card{border-left:4px solid;cursor:move;transition:border-color .3s ease}.workflowEtatColor-0{border-left-color:#7269ef}.workflowEtatColor-1{border-left-color:#00c853}.workflowEtatColor-2{border-left-color:#ffab00}.workflowEtatColor-3{border-left-color:#d50000}.workflowEtatColor-4{border-left-color:#ff33a8}.workflowEtatColor-5{border-left-color:#3357ff}.workflowEtatColor-6{border-left-color:#ff8c00}.workflowEtatColor-7{border-left-color:indigo}.workflowEtatColor-8{border-left-color:#33ff57}.workflowEtatColor-9{border-left-color:#ff5733}.workflowEtatColor-10{border-left-color:khaki}[class*=workflowEtatColor-]{border-left-style:solid;border-left-width:4px}\n"] }]
|
|
11354
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: WorkflowConfigurationService }, { type: EntityConfigurationService }, { type: LocalizePipe }, { type: TsiNotificationService }], propDecorators: { buttonClicked: [{
|
|
11573
|
+
args: [{ selector: 'Tsi-kanban-workflow-etat', template: "<div class=\"card flex justify-content-center\">\r\n <p-paginator [first]=\"first\" [rows]=\"rows\" [totalRecords]=\"totalCount\" [rowsPerPageOptions]=\"[1, 10, 25, 50]\"\r\n (onPageChange)=\"onPageChange($event)\" [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{{ 'Showing' | localize }} {first} {{'to' | localize}} {last} {{ 'of' | localize }} {totalRecords}\">\r\n </p-paginator>\r\n</div>\r\n\r\n<div *ngIf=\"selectedCount > 0\" class=\"kanban-bulk-bar flex flex-wrap align-items-center gap-3 p-2 mx-3 border-round\">\r\n <span class=\"font-semibold\">\r\n {{ selectedCount }} {{ 'shared_tsi_component_grid_kanban_workflowEtat_view_bulk_selected' | localize }}\r\n </span>\r\n <span class=\"text-sm text-gray-600\">\r\n <i class=\"pi pi-arrows-h mr-1\"></i>{{ 'shared_tsi_component_grid_kanban_workflowEtat_view_bulk_drag_hint' | localize\r\n }}\r\n </span>\r\n <p-button icon=\"pi pi-times\" styleClass=\"p-button-text\"\r\n [label]=\"'shared_tsi_component_grid_kanban_workflowEtat_view_bulk_clear_selection' | localize\"\r\n [disabled]=\"isLoading\" (onClick)=\"clearSelection()\">\r\n </p-button>\r\n</div>\r\n\r\n<div class=\"kanban-board flex gap-4 overflow-auto\">\r\n <div *ngFor=\"let workflowEtat of displayedWorkFlowEtatLabels; trackBy: trackByWorkflowEtat\"\r\n class=\"kanban-column flex flex-column border-round surface-0 shadow-2\"\r\n [class.kanban-column-drop-allowed]=\"draggedCard && isAllowedDropTarget(workflowEtat.key)\"\r\n [class.kanban-column-drop-forbidden]=\"draggedCard && workflowEtat.key !== draggedCard.status && !isAllowedDropTarget(workflowEtat.key)\"\r\n (dragover)=\"allowDrop($event)\" (drop)=\"drop($event, workflowEtat.key)\">\r\n\r\n <div class=\"column-header p-3 border-bottom-1 surface-border font-semibold\">\r\n {{ workflowEtat.localized }}\r\n <span class=\"text-sm font-normal text-gray-500\">\r\n ({{ getColumnCount(workflowEtat.key) }})\r\n </span>\r\n <div *ngIf=\"workflowEtat.key !== null && selectionColumnKey === workflowEtat.key\"\r\n class=\"flex align-items-center gap-2 mt-2 text-sm font-normal\">\r\n <p-checkbox [binary]=\"true\" [ngModel]=\"isColumnPageFullySelected(workflowEtat.key)\"\r\n (onChange)=\"toggleSelectAllColumnPage(workflowEtat.key)\" [disabled]=\"isLoading\">\r\n </p-checkbox>\r\n <span>{{ 'shared_tsi_component_grid_kanban_workflowEtat_view_bulk_select_all_page' | localize }}</span>\r\n </div>\r\n <div class=\"text-xs font-normal text-gray-500\" *ngIf=\"hasColumnSummaries\">\r\n <div *ngFor=\"let sumCol of summaryColumns\" class=\"flex align-items-center gap-1\">\r\n <span>{{ (sumCol.header ?? sumCol.field) | localize }}:</span>\r\n <ng-container [ngSwitch]=\"sumCol.type\">\r\n <Tsi-Currency-Societe-Display *ngSwitchCase=\"displayTypes.CURRENCY_SOCIETE_DISPLAY\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Currency-Societe-Display>\r\n <Tsi-Integer-Display *ngSwitchCase=\"displayTypes.INTEGER_DISPLAY\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Integer-Display>\r\n <Tsi-Rate-Display *ngSwitchCase=\"displayTypes.RATE_DISPLAY\" [isFraction]=\"sumCol.isFraction ?? false\"\r\n [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Rate-Display>\r\n <Tsi-Decimal-Display *ngSwitchCase=\"displayTypes.DECIMAL_DISPLAY\" [formatDecimal]=\"sumCol.formatDecimal\"\r\n [numOfDecimal]=\"sumCol.numOfDecimal\" [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Decimal-Display>\r\n <Tsi-Currency-Other-Display *ngSwitchCase=\"displayTypes.CURRENCY_OTHER_DISPLAY\"\r\n [currency]=\"sumCol.currencyOtherCode\" [inputData]=\"getColumnSummaryValue(workflowEtat.key, sumCol.field)\">\r\n </Tsi-Currency-Other-Display>\r\n <span *ngSwitchDefault>{{ getColumnSummaryValue(workflowEtat.key, sumCol.field) }}</span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"column-cards flex-1 overflow-auto p-3\">\r\n <div *ngFor=\"let card of cardMapByWorkflowEtat.get(workflowEtat.key); trackBy: trackByCard\"\r\n class=\"kanban-card p-3 border-round bg-white mb-3 shadow-1\" [ngClass]=\"getWorkflowEtatClass(card)\"\r\n [class.kanban-card-selected]=\"isCardSelected(card)\"\r\n [class.kanban-card-drag-source]=\"isBulkDragging && isCardSelected(card)\" draggable=\"true\"\r\n (dragstart)=\"dragStart($event, card)\" (dragend)=\"dragEnd()\">\r\n\r\n <div class=\"flex align-items-center gap-2 mb-2\">\r\n <p-checkbox *ngIf=\"workflowEtat.key !== null\" [binary]=\"true\" [ngModel]=\"isCardSelected(card)\"\r\n (onChange)=\"toggleCardSelection(workflowEtat.key, card)\" [disabled]=\"isLoading\">\r\n </p-checkbox>\r\n <div class=\"font-bold\">{{ card.headerTitle }}</div>\r\n </div>\r\n <div class=\"text-sm text-gray-600 mb-3\">{{ card.description }}</div>\r\n <div class=\"text-sm text-gray-600 mb-3\">\r\n <span class=\"font-semibold\">{{ 'shared_tsi_component_grid_kanban_workflowEtat_view_workflow_etat' | localize\r\n }}:</span>\r\n <span>{{ getLocalizedWorkflowEtat(card.status) }}</span>\r\n </div>\r\n\r\n <p-menu appendTo=\"body\" #menuMoreActions [model]=\"overflowActionsMenu\" [popup]=\"true\" styleClass=\"overflow-menu\"\r\n [style]=\"{ 'width': 'auto', 'min-width': '0px' }\">\r\n <ng-template pTemplate=\"item\" let-menuItem>\r\n <a pRipple class=\"flex align-items-center p-menuitem-link\" [ngClass]=\"menuItem.styleClass\"\r\n (click)=\"onOverflowActionClicked(card, menuItem)\">\r\n <i *ngIf=\"menuItem.id === 'notes'\" class=\"{{ menuItem.iconClass }} p-menuitem-icon badge-icon has-badge\"\r\n [ngClass]=\"menuItem.iconStyleClass\" pBadge severity=\"danger\" [value]=\"card.fullRecord.notesCount\"\r\n [badgeDisabled]=\"card.fullRecord.notesCount == null\" badgePosition=\"top-right\">\r\n </i>\r\n\r\n <i *ngIf=\"menuItem.id !== 'notes'\" class=\"{{menuItem.iconClass}} p-menuitem-icon\"\r\n [ngClass]=\"menuItem.iconStyleClass\">\r\n </i>\r\n\r\n <span class=\"menu-label\">\r\n {{ menuItem.label | localize }}\r\n </span>\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n\r\n <div class=\"flex justify-content-end align-items-center mt-1 gap-2 p-0\">\r\n <Tsi-Button [styleClass]=\"'p-button-rounded p-button-text p-0-5'\" type=\"button\" icon=\"pi pi-pencil\"\r\n (click)=\"edit(card.uid)\">\r\n </Tsi-Button>\r\n <p-button type=\"button\" icon=\"pi pi-ellipsis-v\" styleClass=\"overflow-btn\"\r\n (onClick)=\"overflowColumnClicked(menuMoreActions, $event, card)\">\r\n </p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div #bulkDragPreview *ngIf=\"selectedCount > 1\" class=\"kanban-bulk-drag-preview\" aria-hidden=\"true\">\r\n <div class=\"kanban-bulk-drag-preview-badge\">\r\n {{ selectedCount }} {{ 'shared_tsi_component_grid_kanban_workflowEtat_view_bulk_selected' | localize }}\r\n </div>\r\n <div *ngFor=\"let previewCard of selectedCardsPreview\" class=\"kanban-bulk-drag-preview-card\"\r\n [ngClass]=\"getWorkflowEtatClass(previewCard)\">\r\n {{ previewCard.headerTitle }}\r\n </div>\r\n <div *ngIf=\"selectedCount > selectedCardsPreview.length\" class=\"kanban-bulk-drag-preview-more\">\r\n + {{ selectedCount - selectedCardsPreview.length }}\r\n </div>\r\n</div>\r\n\r\n<div class=\"overlay\" *ngIf=\"isLoading\">\r\n <div class=\"spinner-wrapper\">\r\n <app-spinner></app-spinner>\r\n </div>\r\n</div>", styles: [":host{display:block;padding:1rem}[draggable=true]{-webkit-user-select:none;user-select:none}.kanban-board{height:calc(100vh - 100px);padding:1rem}.kanban-column{width:300px;max-height:100%;display:flex;flex-direction:column;background-color:#f8f9fa}.column-header{font-size:1rem;font-weight:700;background-color:#fff;border-radius:6px 6px 0 0}.column-cards{overflow-y:auto;flex:1}.kanban-card{border-left:4px solid;cursor:move;transition:border-color .3s ease}.kanban-card-selected{outline:2px solid var(--primary-color);outline-offset:-2px}.kanban-card-drag-source{opacity:.4}.kanban-bulk-drag-preview{position:fixed;top:-1000px;left:-1000px;width:260px;padding:.5rem;pointer-events:none}.kanban-bulk-drag-preview-badge{display:inline-block;margin-bottom:.5rem;padding:.25rem .75rem;border-radius:1rem;background-color:var(--primary-color);color:var(--primary-color-text);font-weight:600;font-size:.85rem}.kanban-bulk-drag-preview-card{position:relative;padding:.75rem;border-radius:6px;background-color:#fff;box-shadow:0 2px 6px #0003;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kanban-bulk-drag-preview-card+.kanban-bulk-drag-preview-card{margin-top:-.75rem}.kanban-bulk-drag-preview-more{margin-top:.5rem;font-size:.85rem;color:var(--text-color-secondary)}.kanban-bulk-bar{background-color:var(--surface-100)}.kanban-column-drop-allowed{outline:2px dashed var(--green-500);outline-offset:-2px}.kanban-column-drop-forbidden{opacity:.5}.workflowEtatColor-0{border-left-color:#7269ef}.workflowEtatColor-1{border-left-color:#00c853}.workflowEtatColor-2{border-left-color:#ffab00}.workflowEtatColor-3{border-left-color:#d50000}.workflowEtatColor-4{border-left-color:#ff33a8}.workflowEtatColor-5{border-left-color:#3357ff}.workflowEtatColor-6{border-left-color:#ff8c00}.workflowEtatColor-7{border-left-color:indigo}.workflowEtatColor-8{border-left-color:#33ff57}.workflowEtatColor-9{border-left-color:#ff5733}.workflowEtatColor-10{border-left-color:khaki}[class*=workflowEtatColor-]{border-left-style:solid;border-left-width:4px}\n"] }]
|
|
11574
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: WorkflowConfigurationService }, { type: EntityConfigurationService }, { type: LocalizePipe }, { type: TsiNotificationService }, { type: TsiConfirmationService }, { type: TsiMessageService }], propDecorators: { buttonClicked: [{
|
|
11355
11575
|
type: Output
|
|
11356
11576
|
}], callSearch: [{
|
|
11357
11577
|
type: Output
|
|
@@ -11375,6 +11595,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
11375
11595
|
type: Input
|
|
11376
11596
|
}], page: [{
|
|
11377
11597
|
type: Input
|
|
11598
|
+
}], bulkDragPreview: [{
|
|
11599
|
+
type: ViewChild,
|
|
11600
|
+
args: ['bulkDragPreview']
|
|
11378
11601
|
}] } });
|
|
11379
11602
|
|
|
11380
11603
|
class DisplayNestedPropComponent {
|
|
@@ -25185,5 +25408,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
25185
25408
|
* Generated bundle index. Do not edit.
|
|
25186
25409
|
*/
|
|
25187
25410
|
|
|
25188
|
-
export { ActionErpService, ActionPlacement, AdDirective, AdItem, AddReportPopupComponent, AdminRoutes, AdministrationEndpoints, AdministrationSegments, AdvancedSearchComponentService, AlertImportMessageComponent, ApiDateTimeFormat, ApiExplorerService, AppBaseComponent, AppRoutes, AppSettingsService, AuthenticationGuard, AuthorizationEndpoints, AuthorizationSegments, AuthorizationService, AuthorizationTokenMapper, AutoComplete, AutoSelectDirective, BsModalRef, BusyDirective, ButtonType, ChooseChoiceMfaMethodComponent, ClaimTypes, CodeFormat, CollectionChangeAction, ComboStatusModel, Component_Modes, ContextMenuComponent, CreateOrEditDynamicFormComponent, CreateOrEditEntityInformationsComponent, CreateOrEditModeleImportComponent, CrudBaseService, CurrentUser, CurrentUserService, CutLabelPipe, DateFormat, DateFormatDisplay, DateHelper, DateHelperService, DatePickerDateFormat, DatePickerDateTimeFormat, DatePickerTimeFormat, DateTimeFormat, DateTimeFormatDisplay, DecimalFormat, DefaultSocieteDevise, Devise, DeviseDetail, DialogDataService, DisplayNestedPropComponent, DisplayTypeColors, DisplayTypes, DynamicFormListComponent, EditableGridComponent, EndpointInfos, EntityColumnDetailResponse, EntityConfigurationService, EntityInfo, EntityInfoWithRelations, EntityRelation, EntityStatusService, EntityValidationsService, ErrorResponseManagerService, ExecuteImportRequest, ExportExcelHelper, Fichier, FilterByExistingValues, FilterByProprety, FilterHelper, FilterOperatorType, FilterOperatorTypeDescriptions, FormValidationError, FormulaService, GenericFormHelper, GenericValidationStateService, GetWorkflowInstanceInformationRequest, GridSelectionMode, GridSizingMode, GridSortMode, Guid, Helpers, HtmlTemplateGeneratorService, HtmlTemplates, HttpMethodType, IdentityManagerService, IdentityPlatformAuthenticationService, IdentityPlatformEndpoints, IdentityPlatformSegments, IdentityRoutes, ImportExportEndPoints, ImportExportSegments, ImportResult, InputRegistryService, InputTypes, JournalisationApplication, JournalisationApplicationService, KeyboardShortcutService, LanguageInformations, LanguageLocale, LanguagesCodes, LayoutHelperService, LayoutOrientation, LocaleCode, LocalePocComponent, LocalizationKeys, LocalizePipe, LogoutPopupComponent, MFAEnum, MailingService, ManageImportExportComponent, ManageReportingComponent, ManageReportingRoutes, MappingHelper, ModalComponent, ModalLabelPipe, ModalLoaderComponent, ModalSizeEnum, ModeleImportCreateRequest, ModeleImportDetail, ModeleImportService, Modes, ModuleCodeService, ModuleMainParameterDirective, ModuleMainParameterService, NoteService, NotificationChannel, NotificationEndpoints, NotificationSegments, NotificationType, NumericDisplayTypes, ObjectHelper, ObservableCollection, PagedResultRequestBase, PermissionGuard, PresentationDesignerDirective, PresentationDesignerDirectiveBase, PresentationDesignerService, PresentationDesignerTabPanelDirective, PresentationSetting, PresentationSettingDetail, PresentationSettingService, ProceedLoginRequest, ProgressBarHelperService, ProgressBarResponse, ProgressBarService, ProgressBarUpdateRequest, RecordInfoPopupService, ReportingComponent, ReportingEndpoints, ReportingSegments, ReportingService, RequestTrackerInterceptor, RequestTrackerService, Segment, Segments, SeparateurDecimal, SeparateurMillier, SharedComponentReferenceHelper, SharedModule, SharedUiTsiProviders, ShortenPipe, SpinnerComponent, Status, StatusHistory, StatusHistoryService, StatusTransitionInfoResponse, StatusTransitionsInfoResponse, StorageManager, SubscriptionResult, TS_ValidDateFormat, TS_ValidDateTimeFormat, TS_ValidTimeFormat, TextBoxType, Themes, TimeFormat, TimeOnly, TimeZoneLocale, ToNumberPipe, TooltipPosition, TranslationService, TsiActionErpCreateOrEditComponent, TsiActionErpListComponent, TsiBaseComponent, TsiBsModalService, TsiBubbleInfoComponent, TsiButtonComponent, TsiCalenderComponent, TsiCard, TsiCardComponent, TsiCardListComponent, TsiChangePasswordComponent, TsiCheckboxComponent, TsiCheckboxDisplayComponent, TsiCodeGeneratorComponent, TsiComponentEnum, TsiComponentFinderService, TsiConfirmationService, TsiCurrencyOtherDisplayComponent, TsiCurrencyOtherInputComponent, TsiCurrencyPipe, TsiCurrencySocieteDisplayComponent, TsiCurrencySocieteInputComponent, TsiDateDisplayComponent, TsiDatePickerComponent, TsiDecimalDisplayComponent, TsiDecimalInputComponent, TsiDecimalPipe, TsiDisplayGridComponent, TsiDividerComponent, TsiErrorMessageComponent, TsiFileManagerComponent, TsiFilePreviewComponent, TsiFormComponent, TsiFormComponentBaseComponent, TsiFormModalFooterComponent, TsiFormulaBoxComponent, TsiGenericCrudComponent, TsiGenericFormComponent, TsiGenericGridComponent, TsiImageDisplayComponent, TsiInfoMessageComponent, TsiInputBase, TsiIntegerComponent, TsiIntegerDisplayComponent, TsiKanbanComponent, TsiKanbanWorkflowEtatComponent, TsiLabelComponent, TsiLabelLegendComponent, TsiLegendComponent, TsiListBaseComponent, TsiLogEventHistoryComponent, TsiMessageService, TsiModalComponent, TsiModalFooterComponent, TsiModalHeaderComponent, TsiModalService, TsiNotesAvertirComponent, TsiNotesComponent, TsiNotesGridComponent, TsiNotificationCenterService, TsiNotificationHubService, TsiNotificationPanelComponent, TsiNotificationService, TsiParagraphComponent, TsiPopupTextViewerComponent, TsiProgressBarComponent, TsiRadioButtonComponent, TsiRateDisplayComponent, TsiRateInputComponent, TsiRedirectionMessageComponent, TsiReportType, TsiSearchBoxComponent, TsiSearchComboComponent, TsiSendMailComponent, TsiSubmitButtonComponent, TsiSuccessMessageComponent, TsiTabPanelComponent, TsiTabViewComponent, TsiTemplate, TsiTenantsComponent, TsiTextAreaComponent, TsiTextBoxComponent, TsiTimeDisplayComponent, TsiTimePickerComponent, TsiTooltipComponent, TsiUploadFicheComponent, TsiUploadGridComponent, TsiViewGridComponent, TypeFichier, TypeImportEnum, TypeRegistryHelper, UpdateEntityInfoWithRelationsRequest, UploadAllowedExtensionsLabelKey, UploadErrorCodeTranslationKeys, UploadErrorUnknownKey, UserIdentityService, ValidationDirective, VerificationCodeComponent, VerificationCodeInscriptionComponent, VerificationCodeSmsComponent, WorkflowConfigurationService, WorkflowEtatForm, WorkflowEtatKanbanRequest, WorkflowEtatSuivantResponse, WorkflowResponse, appProviders, authorization, dashboardConst, defaultCardHeader, distinct, executeImportResult, initSharedComponents, isNullOrEmpty, isPinnableCssSize, lengthValidator, locals, logoutReasonEnum, lowerFirst, menuItems, menuPreferences, preciseAdd, preciseSum, primengDateLocalAr, primengLocaleAr, queryParamNamesConst, rangeValidator, registerLibraryLocales, requestHeaderNames, resolveCssSize, rtlModeKeys, splitArrayIntoChunks, toDotNetCamelCase, tokenQueryParamName, updateEntityWorkflowInformation, updateEntityWorkflowInstanceResponse, userLanguage, workflowEtatDetailledResponse, workflowInstanceInformationResponse };
|
|
25411
|
+
export { ActionErpService, ActionPlacement, AdDirective, AdItem, AddReportPopupComponent, AdminRoutes, AdministrationEndpoints, AdministrationSegments, AdvancedSearchComponentService, AlertImportMessageComponent, ApiDateTimeFormat, ApiExplorerService, AppBaseComponent, AppRoutes, AppSettingsService, AuthenticationGuard, AuthorizationEndpoints, AuthorizationSegments, AuthorizationService, AuthorizationTokenMapper, AutoComplete, AutoSelectDirective, BsModalRef, BusyDirective, ButtonType, ChooseChoiceMfaMethodComponent, ClaimTypes, CodeFormat, CollectionChangeAction, ComboStatusModel, Component_Modes, ContextMenuComponent, CreateOrEditDynamicFormComponent, CreateOrEditEntityInformationsComponent, CreateOrEditModeleImportComponent, CrudBaseService, CurrentUser, CurrentUserService, CutLabelPipe, DateFormat, DateFormatDisplay, DateHelper, DateHelperService, DatePickerDateFormat, DatePickerDateTimeFormat, DatePickerTimeFormat, DateTimeFormat, DateTimeFormatDisplay, DecimalFormat, DefaultSocieteDevise, Devise, DeviseDetail, DialogDataService, DisplayNestedPropComponent, DisplayTypeColors, DisplayTypes, DynamicFormListComponent, EditableGridComponent, EndpointInfos, EntityColumnDetailResponse, EntityConfigurationService, EntityInfo, EntityInfoWithRelations, EntityRelation, EntityStatusService, EntityValidationsService, ErrorResponseManagerService, ExecuteImportRequest, ExportExcelHelper, Fichier, FilterByExistingValues, FilterByProprety, FilterHelper, FilterOperatorType, FilterOperatorTypeDescriptions, FormValidationError, FormulaService, GenericFormHelper, GenericValidationStateService, GetWorkflowInstanceInformationRequest, GridSelectionMode, GridSizingMode, GridSortMode, Guid, Helpers, HtmlTemplateGeneratorService, HtmlTemplates, HttpMethodType, IdentityManagerService, IdentityPlatformAuthenticationService, IdentityPlatformEndpoints, IdentityPlatformSegments, IdentityRoutes, ImportExportEndPoints, ImportExportSegments, ImportResult, InputRegistryService, InputTypes, JournalisationApplication, JournalisationApplicationService, KeyboardShortcutService, LanguageInformations, LanguageLocale, LanguagesCodes, LayoutHelperService, LayoutOrientation, LocaleCode, LocalePocComponent, LocalizationKeys, LocalizePipe, LogoutPopupComponent, MFAEnum, MailingService, ManageImportExportComponent, ManageReportingComponent, ManageReportingRoutes, MappingHelper, ModalComponent, ModalLabelPipe, ModalLoaderComponent, ModalSizeEnum, ModeleImportCreateRequest, ModeleImportDetail, ModeleImportService, Modes, ModuleCodeService, ModuleMainParameterDirective, ModuleMainParameterService, NoteService, NotificationChannel, NotificationEndpoints, NotificationSegments, NotificationType, NumericDisplayTypes, ObjectHelper, ObservableCollection, PagedResultRequestBase, PermissionGuard, PresentationDesignerDirective, PresentationDesignerDirectiveBase, PresentationDesignerService, PresentationDesignerTabPanelDirective, PresentationSetting, PresentationSettingDetail, PresentationSettingService, ProceedLoginRequest, ProgressBarHelperService, ProgressBarResponse, ProgressBarService, ProgressBarUpdateRequest, RecordInfoPopupService, ReportingComponent, ReportingEndpoints, ReportingSegments, ReportingService, RequestTrackerInterceptor, RequestTrackerService, Segment, Segments, SeparateurDecimal, SeparateurMillier, SharedComponentReferenceHelper, SharedModule, SharedUiTsiProviders, ShortenPipe, SpinnerComponent, Status, StatusHistory, StatusHistoryService, StatusTransitionInfoResponse, StatusTransitionsInfoResponse, StorageManager, SubscriptionResult, TS_ValidDateFormat, TS_ValidDateTimeFormat, TS_ValidTimeFormat, TextBoxType, Themes, TimeFormat, TimeOnly, TimeZoneLocale, ToNumberPipe, TooltipPosition, TranslationService, TsiActionErpCreateOrEditComponent, TsiActionErpListComponent, TsiBaseComponent, TsiBsModalService, TsiBubbleInfoComponent, TsiButtonComponent, TsiCalenderComponent, TsiCard, TsiCardComponent, TsiCardListComponent, TsiChangePasswordComponent, TsiCheckboxComponent, TsiCheckboxDisplayComponent, TsiCodeGeneratorComponent, TsiComponentEnum, TsiComponentFinderService, TsiConfirmationService, TsiCurrencyOtherDisplayComponent, TsiCurrencyOtherInputComponent, TsiCurrencyPipe, TsiCurrencySocieteDisplayComponent, TsiCurrencySocieteInputComponent, TsiDateDisplayComponent, TsiDatePickerComponent, TsiDecimalDisplayComponent, TsiDecimalInputComponent, TsiDecimalPipe, TsiDisplayGridComponent, TsiDividerComponent, TsiErrorMessageComponent, TsiFileManagerComponent, TsiFilePreviewComponent, TsiFormComponent, TsiFormComponentBaseComponent, TsiFormModalFooterComponent, TsiFormulaBoxComponent, TsiGenericCrudComponent, TsiGenericFormComponent, TsiGenericGridComponent, TsiImageDisplayComponent, TsiInfoMessageComponent, TsiInputBase, TsiIntegerComponent, TsiIntegerDisplayComponent, TsiKanbanComponent, TsiKanbanWorkflowEtatComponent, TsiLabelComponent, TsiLabelLegendComponent, TsiLegendComponent, TsiListBaseComponent, TsiLogEventHistoryComponent, TsiMessageService, TsiModalComponent, TsiModalFooterComponent, TsiModalHeaderComponent, TsiModalService, TsiNotesAvertirComponent, TsiNotesComponent, TsiNotesGridComponent, TsiNotificationCenterService, TsiNotificationHubService, TsiNotificationPanelComponent, TsiNotificationService, TsiParagraphComponent, TsiPopupTextViewerComponent, TsiProgressBarComponent, TsiRadioButtonComponent, TsiRateDisplayComponent, TsiRateInputComponent, TsiRedirectionMessageComponent, TsiReportType, TsiSearchBoxComponent, TsiSearchComboComponent, TsiSendMailComponent, TsiSubmitButtonComponent, TsiSuccessMessageComponent, TsiTabPanelComponent, TsiTabViewComponent, TsiTemplate, TsiTenantsComponent, TsiTextAreaComponent, TsiTextBoxComponent, TsiTimeDisplayComponent, TsiTimePickerComponent, TsiTooltipComponent, TsiUploadFicheComponent, TsiUploadGridComponent, TsiViewGridComponent, TypeFichier, TypeImportEnum, TypeRegistryHelper, UpdateEntityInfoWithRelationsRequest, UploadAllowedExtensionsLabelKey, UploadErrorCodeTranslationKeys, UploadErrorUnknownKey, UserIdentityService, ValidationDirective, VerificationCodeComponent, VerificationCodeInscriptionComponent, VerificationCodeSmsComponent, WorkflowConfigurationService, WorkflowEtatForm, WorkflowEtatKanbanMultipleRequest, WorkflowEtatKanbanRequest, WorkflowEtatSuivantResponse, WorkflowResponse, appProviders, authorization, dashboardConst, defaultCardHeader, distinct, executeImportResult, initSharedComponents, isNullOrEmpty, isPinnableCssSize, lengthValidator, locals, logoutReasonEnum, lowerFirst, menuItems, menuPreferences, preciseAdd, preciseSum, primengDateLocalAr, primengLocaleAr, queryParamNamesConst, rangeValidator, registerLibraryLocales, requestHeaderNames, resolveCssSize, rtlModeKeys, splitArrayIntoChunks, toDotNetCamelCase, tokenQueryParamName, updateEntityWorkflowInformation, updateEntityWorkflowInstanceResponse, userLanguage, workflowEtatDetailledResponse, workflowInstanceInformationResponse };
|
|
25189
25412
|
//# sourceMappingURL=tsi-developpement-tsi-shared-ui.mjs.map
|