@provoly/hypervisor 0.0.73 → 0.0.74

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.
@@ -65,6 +65,7 @@ const EventActions = {
65
65
  statusFailure: createAction('[Event] Close failure', props()),
66
66
  sort: createAction('[Event] set log event sorting', props()),
67
67
  associateProcedure: createAction('[Event] Associate Procedure to Event', props()),
68
+ associateProcedureSuccess: createAction('[Event] Associate Procedure to Event Success', props()),
68
69
  associateProcedureFailure: createAction('[Event] Associate Procedure to Event Failure', props())
69
70
  };
70
71
 
@@ -490,7 +491,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
490
491
 
491
492
  class ProgressDisplayComponent {
492
493
  constructor() {
493
- this.progress = 50;
494
+ this._progress = 50;
495
+ }
496
+ set progress(progress) {
497
+ this._progress = isNaN(progress) ? 0 : progress;
498
+ }
499
+ get progress() {
500
+ return this._progress ?? 0;
494
501
  }
495
502
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProgressDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
496
503
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProgressDisplayComponent, selector: "hvy-progress-display", inputs: { progress: "progress" }, ngImport: i0, template: "<div class=\"o-progressbar\">\n <div class=\"o-progressbar__header\">\n <div>0%</div>\n @if (progress > 0 && progress < 100) {\n <div [style.flex-grow]=\"progress\" class=\"-value\">{{ progress }}%</div>\n }\n <div [style.flex-grow]=\"progress === 100 ? 100 : 100 - progress\">100%</div>\n </div>\n <div class=\"o-progressbar__value\">\n <div [style.flex-grow]=\"progress\" class=\"-filled\"></div>\n <div [style.flex-grow]=\"100 - progress\" class=\"-empty\"></div>\n </div>\n</div>\n" }); }
@@ -1210,6 +1217,9 @@ class EventDetailComponent extends SubscriptionnerDirective {
1210
1217
  return this.changeStatusContext.comment.length === 0;
1211
1218
  }
1212
1219
  get calculatedProgress() {
1220
+ if (this.procedure.actions.length === 0) {
1221
+ return 0;
1222
+ }
1213
1223
  return Math.round((this.procedure.actions.filter((action) => action.status === 'DONE').length / this.procedure.actions.length) *
1214
1224
  100);
1215
1225
  }
@@ -2244,7 +2254,7 @@ const frTranslations = {
2244
2254
  name: "Catégorie d'événement",
2245
2255
  MALFUNCTION: 'Alerte Dysfonctionnement',
2246
2256
  REPORT: 'Signalement GRC',
2247
- OPERATOR: 'Evènement Opérateur',
2257
+ OPERATOR: 'Événement Opérateur',
2248
2258
  LIMIT: 'Alerte Seuil',
2249
2259
  MANIFESTATION: 'Manifestation'
2250
2260
  },
@@ -2399,7 +2409,7 @@ class EventEffects {
2399
2409
  })));
2400
2410
  this.sort$ = createEffect(() => this.actions$.pipe(ofType(EventActions.sort), debounceTime$1(200), map$1(() => EventActions.load({}))));
2401
2411
  this.filter$ = createEffect(() => this.actions$.pipe(ofType(EventActions.filter), filter((action) => action.filterSet === KNOWN_FILTER_SETS.EVENTS), debounceTime$1(200), map$1(() => EventActions.load({}))));
2402
- this.associateProcedure$ = createEffect(() => this.actions$.pipe(ofType(EventActions.associateProcedure), mergeMap$1((action) => this.eventService.associateProcedure(action.procedureId, action.eventIds).pipe(map$1(() => EventActions.load({})), catchError((error) => [EventActions.associateProcedureFailure({ error: error })])))));
2412
+ this.associateProcedure$ = createEffect(() => this.actions$.pipe(ofType(EventActions.associateProcedure), mergeMap$1((action) => this.eventService.associateProcedure(action.procedureId, action.eventIds).pipe(mergeMap$1((procedure) => [EventActions.load({}), EventActions.associateProcedureSuccess({ procedure })]), catchError((error) => [EventActions.associateProcedureFailure({ error: error })])))));
2403
2413
  }
2404
2414
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventEffects, deps: [{ token: i1$5.Actions }, { token: EventService }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
2405
2415
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventEffects }); }