@gloww/gloww 20.0.0-beta.44 → 20.0.0-beta.45

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.
@@ -129,6 +129,11 @@ class GlowwService {
129
129
  async noRestSecurity() {
130
130
  return await firstValueFrom(this.http.get(`/admin/ORMS/${this.InternalBasePath.replace(/_mgmt/, "")}/noRestSecurity`));
131
131
  }
132
+ commitUserTask(userTaskId, args) {
133
+ return this.http.post(`/FlowMgmt/UserTask/Commit/${userTaskId}`, args ?? {}, {
134
+ responseType: 'text'
135
+ });
136
+ }
132
137
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
133
138
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwService, providedIn: 'root' }); }
134
139
  }
@@ -4349,7 +4354,7 @@ class AssignedUserTasksComponent {
4349
4354
  }), finalize(() => {
4350
4355
  this.loading = false;
4351
4356
  })).subscribe((items) => {
4352
- this.dataSource.data = items ?? [];
4357
+ this.dataSource.data = (items ?? []).filter(item => this.isPendingTask(item));
4353
4358
  if (this.paginator) {
4354
4359
  this.dataSource.paginator = this.paginator;
4355
4360
  }
@@ -4383,13 +4388,7 @@ class AssignedUserTasksComponent {
4383
4388
  __Username: currentUser?.username ?? '',
4384
4389
  __UserTaskId: userTaskId
4385
4390
  };
4386
- const updatedTask = {
4387
- ...task,
4388
- Statut: 'RESPONDED',
4389
- RepliedBY: currentUser?.username ?? '',
4390
- VARIABLES: JSON.stringify(payload)
4391
- };
4392
- await firstValueFrom(this.glowwService.putBPMN2_UserTask(userTaskId, updatedTask));
4391
+ await firstValueFrom(this.glowwService.commitUserTask(userTaskId, payload));
4393
4392
  this.loadAssignments();
4394
4393
  }
4395
4394
  catch (error) {
@@ -4425,9 +4424,8 @@ class AssignedUserTasksComponent {
4425
4424
  return `${taskAssignment.Domain ? `${taskAssignment.Domain}\\` : ''}${taskAssignment.Username ?? ''} (${type})`;
4426
4425
  }
4427
4426
  canRespond(taskAssignment) {
4428
- const status = this.getStatusLabel(taskAssignment).toUpperCase();
4429
4427
  return !!(taskAssignment.UserTaskId ?? taskAssignment.IsCandidate?.USERTASKID)
4430
- && (status === '' || status === 'RUNNING');
4428
+ && this.isPendingTask(taskAssignment);
4431
4429
  }
4432
4430
  buildQuery() {
4433
4431
  const currentUser = this.authenticationService.currentUserValue;
@@ -4438,8 +4436,13 @@ class AssignedUserTasksComponent {
4438
4436
  if (currentUser?.domain) {
4439
4437
  query.Domain = currentUser.domain;
4440
4438
  }
4439
+ query.STATUT = 'WAITING';
4441
4440
  return query;
4442
4441
  }
4442
+ isPendingTask(taskAssignment) {
4443
+ const status = this.getStatusLabel(taskAssignment).toUpperCase();
4444
+ return status === '' || status === 'RUNNING';
4445
+ }
4443
4446
  getSortValue(item, property) {
4444
4447
  switch (property) {
4445
4448
  case 'task':