@provoly/hypervisor 1.4.6 → 1.4.7-7.2
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/src/lib/auth/hypervisor-roles.contant.mjs +1 -1
- package/esm2022/src/lib/event/detail/add-event/add-event.component.mjs +1 -1
- package/esm2022/src/lib/event/detail/event-detail.component.mjs +297 -63
- package/esm2022/src/lib/event/detail/event-details-tooltip.component.mjs +12 -7
- package/esm2022/src/lib/event/filters/date/date-filter.component.mjs +7 -3
- package/esm2022/src/lib/event/filters/on/click/event-filters.component.mjs +10 -3
- package/esm2022/src/lib/event/filters/text/text-filter.component.mjs +3 -3
- package/esm2022/src/lib/event/list/event-list.component.mjs +8 -5
- package/esm2022/src/lib/event/procedure-association-modal/procedure-association-modal.component.mjs +37 -10
- package/esm2022/src/lib/event-summary/item/event-summary-item.component.mjs +3 -3
- package/esm2022/src/lib/event-summary/page/event-summary-page.component.mjs +7 -4
- package/esm2022/src/lib/general/comments/comments.component.mjs +10 -4
- package/esm2022/src/lib/general/display-date.function.mjs +3 -2
- package/esm2022/src/lib/general/i18n/en.translations.mjs +22 -6
- package/esm2022/src/lib/general/i18n/fr.translations.mjs +28 -8
- package/esm2022/src/lib/general/icon-display/icon-display.component.mjs +3 -3
- package/esm2022/src/lib/general/last-events/last-events.component.mjs +34 -4
- package/esm2022/src/lib/general/procedure-actions/action-menu.component.mjs +3 -3
- package/esm2022/src/lib/general/procedure-actions/action-parameters/action-parameter.component.mjs +5 -2
- package/esm2022/src/lib/general/procedure-actions/action-parameters/base-parameter-action.component.mjs +4 -2
- package/esm2022/src/lib/general/procedure-actions/action-parameters/email/email-action-parameter.component.mjs +2 -2
- package/esm2022/src/lib/general/procedure-actions/action-parameters/phone/phone-action-parameter.component.mjs +3 -2
- package/esm2022/src/lib/general/procedure-actions/action-parameters/service/create-service.component.mjs +19 -20
- package/esm2022/src/lib/general/procedure-actions/action-parameters/service/service-action-display.component.mjs +30 -7
- package/esm2022/src/lib/general/procedure-actions/actions-types.constant.mjs +3 -3
- package/esm2022/src/lib/general/procedure-actions/procedure-actions.component.mjs +33 -10
- package/esm2022/src/lib/general/public-api.mjs +2 -1
- package/esm2022/src/lib/general/truncate-pipe/truncate.pipe.mjs +19 -0
- package/esm2022/src/lib/hypervisor.module.mjs +12 -6
- package/esm2022/src/lib/model/event/hyp-event-category.type.mjs +3 -3
- package/esm2022/src/lib/model/event/hyp-event-detail.interface.mjs +3 -2
- package/esm2022/src/lib/model/event/hyp-event-tooltip.interface.mjs +1 -1
- package/esm2022/src/lib/model/hyp-service-status.type.mjs +2 -2
- package/esm2022/src/lib/procedure/model-detail/procedure-model-detail.component.mjs +60 -23
- package/esm2022/src/lib/procedure/model-list/procedure-list.component.mjs +7 -4
- package/esm2022/src/lib/store/service/service.service.mjs +3 -2
- package/fesm2022/provoly-hypervisor.mjs +630 -169
- package/fesm2022/provoly-hypervisor.mjs.map +1 -1
- package/package.json +2 -2
- package/src/lib/auth/hypervisor-roles.contant.d.ts +2 -1
- package/src/lib/event/detail/event-detail.component.d.ts +44 -8
- package/src/lib/event/detail/event-details-tooltip.component.d.ts +4 -1
- package/src/lib/event/filters/text/text-filter.component.d.ts +1 -1
- package/src/lib/event/procedure-association-modal/procedure-association-modal.component.d.ts +4 -1
- package/src/lib/general/comments/comments.component.d.ts +2 -1
- package/src/lib/general/display-date.function.d.ts +1 -1
- package/src/lib/general/i18n/en.translations.d.ts +17 -1
- package/src/lib/general/i18n/fr.translations.d.ts +21 -1
- package/src/lib/general/last-events/last-events.component.d.ts +10 -3
- package/src/lib/general/procedure-actions/action-parameters/action-parameter.component.d.ts +2 -1
- package/src/lib/general/procedure-actions/action-parameters/base-parameter-action.component.d.ts +2 -1
- package/src/lib/general/procedure-actions/action-parameters/phone/phone-action-parameter.component.d.ts +2 -1
- package/src/lib/general/procedure-actions/action-parameters/service/create-service.component.d.ts +4 -9
- package/src/lib/general/procedure-actions/action-parameters/service/service-action-display.component.d.ts +11 -4
- package/src/lib/general/procedure-actions/procedure-actions.component.d.ts +8 -2
- package/src/lib/general/public-api.d.ts +1 -0
- package/src/lib/general/truncate-pipe/truncate.pipe.d.ts +7 -0
- package/src/lib/hypervisor.module.d.ts +2 -1
- package/src/lib/model/event/hyp-event-detail.interface.d.ts +7 -3
- package/src/lib/model/event/hyp-event-tooltip.interface.d.ts +1 -0
- package/src/lib/model/procedure/hyp-procedure.interface.d.ts +4 -2
- package/src/lib/procedure/model-detail/procedure-model-detail.component.d.ts +11 -5
- package/src/lib/procedure/model-list/procedure-list.component.d.ts +2 -1
- package/src/lib/store/service/service.service.d.ts +2 -1
- package/styles/components/_a-chip-status.scss +3 -0
- package/styles/components/_m-hvy-event-summary-item.scss +7 -18
- package/styles/components/_o-hvy-comments.scss +21 -0
- package/styles/components/_o-hvy-event-detail.scss +26 -1
- package/styles/components/_o-hvy-events-table.scss +4 -0
- package/styles/components/_o-hvy-last-events.scss +19 -0
- package/styles/components/_o-hvy-procedure-actions.scss +2 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Pipe, Component, Input, EventEmitter, Output, Inject,
|
|
2
|
+
import { Injectable, Pipe, Component, Input, EventEmitter, Output, Inject, ViewChild, ElementRef, ViewContainerRef, model as model$1, ViewChildren, TemplateRef, ContentChildren, Directive, forwardRef, signal, computed, InjectionToken, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1$3 from '@provoly/dashboard';
|
|
4
|
-
import { FilterParamEncoder, DEFAULT_ICON_URL, SubscriptionnerDirective, PRY_DIALOG_DATA, PryDialogConfirmComponent, PryI18nModule, PryCoreModule, PrySinceDateModule, PryIconModule, PrySelectModule, PryDatePickerModule } from '@provoly/dashboard';
|
|
4
|
+
import { FilterParamEncoder, DEFAULT_ICON_URL, SubscriptionnerDirective, PRY_DIALOG_DATA, PryDialogConfirmComponent, PryI18nModule, PryCoreModule, PrySinceDateModule, PryIconModule, PrySelectModule, PryDatePickerModule, I18nPipe } from '@provoly/dashboard';
|
|
5
5
|
import * as i1$1 from '@ngrx/store';
|
|
6
6
|
import { createAction, props, createReducer, on, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
|
|
7
7
|
import * as i2 from '@angular/cdk/overlay';
|
|
8
8
|
import { OverlayConfig } from '@angular/cdk/overlay';
|
|
9
9
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
10
|
-
import { combineLatest, map, mergeMap, of, BehaviorSubject, Subject, debounceTime, switchMap, shareReplay, fromEvent, withLatestFrom, throwError, filter, auditTime, distinctUntilChanged } from 'rxjs';
|
|
10
|
+
import { combineLatest, map, mergeMap, of, BehaviorSubject, Subject, debounceTime, switchMap, shareReplay, fromEvent, withLatestFrom, delay, take, throwError, zip, filter, auditTime, distinctUntilChanged } from 'rxjs';
|
|
11
11
|
import equal from 'fast-deep-equal/es6';
|
|
12
12
|
import { map as map$1, startWith, catchError, debounceTime as debounceTime$1, mergeMap as mergeMap$1 } from 'rxjs/operators';
|
|
13
13
|
import * as i1 from '@angular/common/http';
|
|
@@ -18,7 +18,7 @@ import * as i1$2 from '@angular/common';
|
|
|
18
18
|
import { NgForOf, AsyncPipe, NgStyle, DatePipe, KeyValuePipe, JsonPipe, NgIf } from '@angular/common';
|
|
19
19
|
import { v4 } from 'uuid';
|
|
20
20
|
import * as i1$5 from '@ngrx/effects';
|
|
21
|
-
import { act,
|
|
21
|
+
import { act, ofType, createEffect, EffectsModule } from '@ngrx/effects';
|
|
22
22
|
import * as i4 from '@provoly/dashboard/components/checkbox';
|
|
23
23
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
24
24
|
import * as i2$1 from '@angular/router';
|
|
@@ -320,14 +320,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
320
320
|
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i1$1.Store }] });
|
|
321
321
|
|
|
322
322
|
const HypEventCategory = {
|
|
323
|
-
values: ['
|
|
323
|
+
values: ['ANOMALY', 'OUTOFORDER', 'MANIFESTATION', 'LIMIT']
|
|
324
324
|
};
|
|
325
325
|
const HypEventSubCategory = {
|
|
326
326
|
values: {
|
|
327
327
|
LIMIT: [],
|
|
328
328
|
MANIFESTATION: [],
|
|
329
329
|
OUTOFORDER: [],
|
|
330
|
-
ANOMALY: ['UNUSUAL_FLOW', 'TRAFFIC_CONGESTION', 'WILD_STORAGE']
|
|
330
|
+
ANOMALY: ['NONE', 'UNUSUAL_FLOW', 'TRAFFIC_CONGESTION', 'WILD_STORAGE']
|
|
331
331
|
}
|
|
332
332
|
};
|
|
333
333
|
const CategoryBackground = {
|
|
@@ -364,11 +364,11 @@ class IconDisplayComponent {
|
|
|
364
364
|
this.CategoryBackground = CategoryBackground;
|
|
365
365
|
}
|
|
366
366
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: IconDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
367
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: IconDisplayComponent, selector: "hvy-icon-display", inputs: { event: "event" }, ngImport: i0, template: "<div\n class=\"\n m-hvy-event-summary-item__event-icon-container\n -hvy-{{ event.criticality.toString().toLowerCase() }}\n -hvy-{{ CategoryBackground.values[event.category] }}\n \"\n>\n <span\n class=\"m-hvy-event-summary-item__event-icon a-icon\"\n [ngStyle]=\"{\n 'mask-image': 'url(' + (event | eventIcon | async | getSecuredImage | async) + ')',\n '-webkit-mask-image': 'url(' + (event | eventIcon | async | getSecuredImage | async) + ')'\n }\"\n aria-hidden=\"true\"\n focusable=\"false\"\n ></span>\n</div>\n", dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: EventIconPipe, name: "eventIcon" }] }); }
|
|
367
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: IconDisplayComponent, selector: "hvy-icon-display", inputs: { event: "event" }, ngImport: i0, template: "<div\n class=\"\n m-hvy-event-summary-item__event-icon-container\n -hvy-{{ event.criticality.toString().toLowerCase() }}\n -hvy-{{ CategoryBackground.values[event.category] }}\n \"\n [title]=\"'@hvy.event.category.' + event.category | i18n\"\n>\n <span\n class=\"m-hvy-event-summary-item__event-icon a-icon\"\n [ngStyle]=\"{\n 'mask-image': 'url(' + (event | eventIcon | async | getSecuredImage | async) + ')',\n '-webkit-mask-image': 'url(' + (event | eventIcon | async | getSecuredImage | async) + ')'\n }\"\n aria-hidden=\"true\"\n focusable=\"false\"\n ></span>\n</div>\n", dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i1$3.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: EventIconPipe, name: "eventIcon" }] }); }
|
|
368
368
|
}
|
|
369
369
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: IconDisplayComponent, decorators: [{
|
|
370
370
|
type: Component,
|
|
371
|
-
args: [{ selector: 'hvy-icon-display', template: "<div\n class=\"\n m-hvy-event-summary-item__event-icon-container\n -hvy-{{ event.criticality.toString().toLowerCase() }}\n -hvy-{{ CategoryBackground.values[event.category] }}\n \"\n>\n <span\n class=\"m-hvy-event-summary-item__event-icon a-icon\"\n [ngStyle]=\"{\n 'mask-image': 'url(' + (event | eventIcon | async | getSecuredImage | async) + ')',\n '-webkit-mask-image': 'url(' + (event | eventIcon | async | getSecuredImage | async) + ')'\n }\"\n aria-hidden=\"true\"\n focusable=\"false\"\n ></span>\n</div>\n" }]
|
|
371
|
+
args: [{ selector: 'hvy-icon-display', template: "<div\n class=\"\n m-hvy-event-summary-item__event-icon-container\n -hvy-{{ event.criticality.toString().toLowerCase() }}\n -hvy-{{ CategoryBackground.values[event.category] }}\n \"\n [title]=\"'@hvy.event.category.' + event.category | i18n\"\n>\n <span\n class=\"m-hvy-event-summary-item__event-icon a-icon\"\n [ngStyle]=\"{\n 'mask-image': 'url(' + (event | eventIcon | async | getSecuredImage | async) + ')',\n '-webkit-mask-image': 'url(' + (event | eventIcon | async | getSecuredImage | async) + ')'\n }\"\n aria-hidden=\"true\"\n focusable=\"false\"\n ></span>\n</div>\n" }]
|
|
372
372
|
}], propDecorators: { event: [{
|
|
373
373
|
type: Input
|
|
374
374
|
}] } });
|
|
@@ -386,6 +386,7 @@ class ProcedureAssociationModalComponent extends SubscriptionnerDirective {
|
|
|
386
386
|
this.onProcedureSearch$ = new Subject();
|
|
387
387
|
this.eventsFromInput$ = new BehaviorSubject(null);
|
|
388
388
|
this.eventsForAction = [];
|
|
389
|
+
this.disableValidButton = true;
|
|
389
390
|
this.DOMAINS = DOMAINS.values;
|
|
390
391
|
this.selectedEvents$ = combineLatest([
|
|
391
392
|
this.eventsFromInput$,
|
|
@@ -402,14 +403,17 @@ class ProcedureAssociationModalComponent extends SubscriptionnerDirective {
|
|
|
402
403
|
this.onDomainSelect$.pipe(startWith()),
|
|
403
404
|
this.onProcedureSearch$.pipe(startWith(), debounceTime(500))
|
|
404
405
|
]).pipe(switchMap(([_, __]) => {
|
|
405
|
-
const search = typeof this.procedureSelectValue === 'string' && this.procedureSelectValue.length > 2
|
|
406
|
-
|
|
407
|
-
|
|
406
|
+
const search = typeof this.procedureSelectValue === 'string' && this.procedureSelectValue.length > 2 ?
|
|
407
|
+
this.cleanProcedureNameForComboBoxSearch(this.procedureSelectValue) :
|
|
408
|
+
typeof this.procedureSelectValue === 'object' ?
|
|
409
|
+
this.procedureSelectValue.name :
|
|
410
|
+
undefined;
|
|
408
411
|
return this.procedureService.getTop10ByUsage(this.selectedDomain, search).pipe(map$1((procedures) => procedures.map((proc) => {
|
|
409
412
|
const regex = RegExp(`(${search})` ?? '(/-/-/)', 'gid');
|
|
410
413
|
const html = `${padId.fn(proc.id)} - ${proc.name} (${proc.creator})`;
|
|
411
414
|
return {
|
|
412
415
|
...proc,
|
|
416
|
+
initial: html,
|
|
413
417
|
html: html.replaceAll(regex, (matched, capture1) => `<b>${capture1}</b>`)
|
|
414
418
|
};
|
|
415
419
|
})));
|
|
@@ -421,8 +425,34 @@ class ProcedureAssociationModalComponent extends SubscriptionnerDirective {
|
|
|
421
425
|
this.onDomainSelect$.next();
|
|
422
426
|
this.procedureSelectValue = undefined;
|
|
423
427
|
}
|
|
428
|
+
cleanProcedureNameForComboBoxSearch(procedure) {
|
|
429
|
+
const indexOfTiret = procedure.indexOf('-');
|
|
430
|
+
const indexOfCreator = procedure.lastIndexOf('(');
|
|
431
|
+
if (indexOfTiret !== -1 && indexOfCreator !== -1) {
|
|
432
|
+
procedure = procedure.substring(indexOfTiret + 2, indexOfCreator - 1);
|
|
433
|
+
}
|
|
434
|
+
else if (indexOfTiret !== -1) {
|
|
435
|
+
procedure = procedure.substring(indexOfTiret + 2);
|
|
436
|
+
}
|
|
437
|
+
else if (indexOfCreator !== -1) {
|
|
438
|
+
procedure = procedure.substring(0, indexOfCreator - 1);
|
|
439
|
+
}
|
|
440
|
+
return procedure;
|
|
441
|
+
}
|
|
424
442
|
selectedProcedureChange($event) {
|
|
425
|
-
|
|
443
|
+
// when choose a procedure
|
|
444
|
+
if (typeof $event === 'object') {
|
|
445
|
+
this.selectedProcedureInComboBox = $event;
|
|
446
|
+
this.procedureSelectValue = $event;
|
|
447
|
+
// when click on choosen procedure
|
|
448
|
+
}
|
|
449
|
+
else if (this.selectedProcedureInComboBox?.html === $event) {
|
|
450
|
+
this.procedureSelectValue = this.selectedProcedureInComboBox;
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
this.procedureSelectValue = $event;
|
|
454
|
+
}
|
|
455
|
+
this.disableValidButton = typeof this.procedureSelectValue !== 'object';
|
|
426
456
|
this.onProcedureSearch$.next();
|
|
427
457
|
}
|
|
428
458
|
associateProcedure() {
|
|
@@ -432,24 +462,22 @@ class ProcedureAssociationModalComponent extends SubscriptionnerDirective {
|
|
|
432
462
|
}));
|
|
433
463
|
this.closeModal();
|
|
434
464
|
}
|
|
435
|
-
isProcedureSelected() {
|
|
436
|
-
return typeof this.procedureSelectValue === 'object';
|
|
437
|
-
}
|
|
438
465
|
closeModal() {
|
|
439
466
|
this.dialog.close();
|
|
440
467
|
}
|
|
441
468
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ProcedureAssociationModalComponent, deps: [{ token: i1$1.Store }, { token: ProcedureService }, { token: i1$3.PryDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
442
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: ProcedureAssociationModalComponent, selector: "hvy-procedure-association-modal", inputs: { events: "events" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-association-modal u-display-flex -column -align-center\">\n <h3>{{ '@hvy.associationModal.title' | i18n }}</h3>\n <span class=\"o-hvy-association-modal__description\">{{ '@hvy.associationModal.description' | i18n }}</span>\n <div class=\"o-hvy-association-modal__content u-display-flex -justify-space-between\">\n @if (selectedEvents$ | async; as selectedEvents) {\n <div>\n <label>\u00C9v\u00E9nements li\u00E9s ({{ selectedEvents.length }}) :</label>\n <ul class=\"o-hvy-association-modal__events\">\n @for (event of selectedEvents; track event.id) {\n <li class=\"o-hvy-association-modal__event u-display-flex -align-center\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <div class=\"o-hvy-association-modal__event-detail u-display-flex -column\">\n <span class=\"o-hvy-association-modal__event-name\">{{ event.name }}</span>\n @if (event.equipment) {\n <span class=\"o-hvy-association-modal__equipment-name\">{{ event.equipment.name }}</span>\n }\n </div>\n </li>\n }\n </ul>\n </div>\n }\n <div class=\"o-hvy-association-modal__form\">\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.associationModal.categoryFilter' | i18n }} :</label>\n <pry-select\n [items]=\"DOMAINS\"\n [(ngModel)]=\"selectedDomain\"\n (ngModelChange)=\"onDomainChange()\"\n [placeholder]=\"'@hvy.associationModal.domainPlaceholder' | i18n\"\n i18nPrefix=\"@hvy.event.domain.\"\n id=\"category-filter\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"procedure-filter\"\n >{{ '@hvy.associationModal.searchProcedure' | i18n }}<span class=\"text-error\">*</span> :\n </label>\n <pry-select\n [items]=\"procedures$ | async\"\n bindLabel=\"
|
|
469
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: ProcedureAssociationModalComponent, selector: "hvy-procedure-association-modal", inputs: { events: "events" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-association-modal u-display-flex -column -align-center\">\n <h3>{{ '@hvy.associationModal.title' | i18n }}</h3>\n <span class=\"o-hvy-association-modal__description\">{{ '@hvy.associationModal.description' | i18n }}</span>\n <div class=\"o-hvy-association-modal__content u-display-flex -justify-space-between\">\n @if (selectedEvents$ | async; as selectedEvents) {\n <div>\n <label>\u00C9v\u00E9nements li\u00E9s ({{ selectedEvents.length }}) :</label>\n <ul class=\"o-hvy-association-modal__events\">\n @for (event of selectedEvents; track event.id) {\n <li class=\"o-hvy-association-modal__event u-display-flex -align-center\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <div class=\"o-hvy-association-modal__event-detail u-display-flex -column\">\n <span class=\"o-hvy-association-modal__event-name\">{{ event.name }}</span>\n @if (event.equipment) {\n <span class=\"o-hvy-association-modal__equipment-name\">{{ event.equipment.name }}</span>\n }\n </div>\n </li>\n }\n </ul>\n </div>\n }\n <div class=\"o-hvy-association-modal__form\">\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.associationModal.categoryFilter' | i18n }} :</label>\n <pry-select\n [items]=\"DOMAINS\"\n [(ngModel)]=\"selectedDomain\"\n (ngModelChange)=\"onDomainChange()\"\n [placeholder]=\"'@hvy.associationModal.domainPlaceholder' | i18n\"\n i18nPrefix=\"@hvy.event.domain.\"\n id=\"category-filter\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"procedure-filter\"\n >{{ '@hvy.associationModal.searchProcedure' | i18n }}<span class=\"text-error\">*</span> :\n </label>\n <pry-select\n [items]=\"procedures$ | async\"\n bindLabel=\"initial\"\n [(ngModel)]=\"procedureSelectValue\"\n (ngModelChange)=\"selectedProcedureChange($event)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.associationModal.procedurePlaceholder' | i18n\"\n id=\"procedure-filter\"\n [template]=\"templateOption\"\n ></pry-select>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </div>\n </div>\n </div>\n <div class=\"o-hvy-association-modal__buttons u-display-flex -justify-center\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"disableValidButton\" (click)=\"associateProcedure()\">\n {{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"closeModal()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked", "pressedEnter"] }, { kind: "component", type: IconDisplayComponent, selector: "hvy-icon-display", inputs: ["event"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
443
470
|
}
|
|
444
471
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ProcedureAssociationModalComponent, decorators: [{
|
|
445
472
|
type: Component,
|
|
446
|
-
args: [{ selector: 'hvy-procedure-association-modal', template: "<div class=\"o-hvy-association-modal u-display-flex -column -align-center\">\n <h3>{{ '@hvy.associationModal.title' | i18n }}</h3>\n <span class=\"o-hvy-association-modal__description\">{{ '@hvy.associationModal.description' | i18n }}</span>\n <div class=\"o-hvy-association-modal__content u-display-flex -justify-space-between\">\n @if (selectedEvents$ | async; as selectedEvents) {\n <div>\n <label>\u00C9v\u00E9nements li\u00E9s ({{ selectedEvents.length }}) :</label>\n <ul class=\"o-hvy-association-modal__events\">\n @for (event of selectedEvents; track event.id) {\n <li class=\"o-hvy-association-modal__event u-display-flex -align-center\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <div class=\"o-hvy-association-modal__event-detail u-display-flex -column\">\n <span class=\"o-hvy-association-modal__event-name\">{{ event.name }}</span>\n @if (event.equipment) {\n <span class=\"o-hvy-association-modal__equipment-name\">{{ event.equipment.name }}</span>\n }\n </div>\n </li>\n }\n </ul>\n </div>\n }\n <div class=\"o-hvy-association-modal__form\">\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.associationModal.categoryFilter' | i18n }} :</label>\n <pry-select\n [items]=\"DOMAINS\"\n [(ngModel)]=\"selectedDomain\"\n (ngModelChange)=\"onDomainChange()\"\n [placeholder]=\"'@hvy.associationModal.domainPlaceholder' | i18n\"\n i18nPrefix=\"@hvy.event.domain.\"\n id=\"category-filter\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"procedure-filter\"\n >{{ '@hvy.associationModal.searchProcedure' | i18n }}<span class=\"text-error\">*</span> :\n </label>\n <pry-select\n [items]=\"procedures$ | async\"\n bindLabel=\"
|
|
473
|
+
args: [{ selector: 'hvy-procedure-association-modal', template: "<div class=\"o-hvy-association-modal u-display-flex -column -align-center\">\n <h3>{{ '@hvy.associationModal.title' | i18n }}</h3>\n <span class=\"o-hvy-association-modal__description\">{{ '@hvy.associationModal.description' | i18n }}</span>\n <div class=\"o-hvy-association-modal__content u-display-flex -justify-space-between\">\n @if (selectedEvents$ | async; as selectedEvents) {\n <div>\n <label>\u00C9v\u00E9nements li\u00E9s ({{ selectedEvents.length }}) :</label>\n <ul class=\"o-hvy-association-modal__events\">\n @for (event of selectedEvents; track event.id) {\n <li class=\"o-hvy-association-modal__event u-display-flex -align-center\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <div class=\"o-hvy-association-modal__event-detail u-display-flex -column\">\n <span class=\"o-hvy-association-modal__event-name\">{{ event.name }}</span>\n @if (event.equipment) {\n <span class=\"o-hvy-association-modal__equipment-name\">{{ event.equipment.name }}</span>\n }\n </div>\n </li>\n }\n </ul>\n </div>\n }\n <div class=\"o-hvy-association-modal__form\">\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.associationModal.categoryFilter' | i18n }} :</label>\n <pry-select\n [items]=\"DOMAINS\"\n [(ngModel)]=\"selectedDomain\"\n (ngModelChange)=\"onDomainChange()\"\n [placeholder]=\"'@hvy.associationModal.domainPlaceholder' | i18n\"\n i18nPrefix=\"@hvy.event.domain.\"\n id=\"category-filter\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"procedure-filter\"\n >{{ '@hvy.associationModal.searchProcedure' | i18n }}<span class=\"text-error\">*</span> :\n </label>\n <pry-select\n [items]=\"procedures$ | async\"\n bindLabel=\"initial\"\n [(ngModel)]=\"procedureSelectValue\"\n (ngModelChange)=\"selectedProcedureChange($event)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.associationModal.procedurePlaceholder' | i18n\"\n id=\"procedure-filter\"\n [template]=\"templateOption\"\n ></pry-select>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </div>\n </div>\n </div>\n <div class=\"o-hvy-association-modal__buttons u-display-flex -justify-center\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"disableValidButton\" (click)=\"associateProcedure()\">\n {{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"closeModal()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n</div>\n" }]
|
|
447
474
|
}], ctorParameters: () => [{ type: i1$1.Store }, { type: ProcedureService }, { type: i1$3.PryDialogRef }], propDecorators: { events: [{
|
|
448
475
|
type: Input
|
|
449
476
|
}] } });
|
|
450
477
|
|
|
451
478
|
const displayDate = (endDate) => {
|
|
452
|
-
|
|
479
|
+
const date = new Date(endDate).toLocaleDateString();
|
|
480
|
+
return date === 'Invalid Date' ? undefined : date;
|
|
453
481
|
};
|
|
454
482
|
|
|
455
483
|
class StatusDisplayComponent extends SubscriptionnerDirective {
|
|
@@ -512,36 +540,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
512
540
|
type: Input
|
|
513
541
|
}] } });
|
|
514
542
|
|
|
543
|
+
class TruncatePipe {
|
|
544
|
+
transform(value, args) {
|
|
545
|
+
const limit = args.length > 0 ? parseInt(args[0], 10) : 20;
|
|
546
|
+
const trail = args.length > 1 ? args[1] : '...';
|
|
547
|
+
return (value ?? '').length > limit ? value.substring(0, limit) + trail : value;
|
|
548
|
+
}
|
|
549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
550
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: TruncatePipe, isStandalone: true, name: "truncate" }); }
|
|
551
|
+
}
|
|
552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: TruncatePipe, decorators: [{
|
|
553
|
+
type: Pipe,
|
|
554
|
+
args: [{
|
|
555
|
+
standalone: true,
|
|
556
|
+
name: 'truncate'
|
|
557
|
+
}]
|
|
558
|
+
}] });
|
|
559
|
+
|
|
515
560
|
class LastEventsComponent extends SubscriptionnerDirective {
|
|
516
561
|
constructor() {
|
|
517
562
|
super(...arguments);
|
|
518
563
|
this.displayDate = displayDate;
|
|
519
564
|
this.services = [];
|
|
520
565
|
this.events = [];
|
|
566
|
+
this.closeDialogEmit = new EventEmitter();
|
|
567
|
+
this.closeButton = false;
|
|
568
|
+
this.references = [];
|
|
569
|
+
}
|
|
570
|
+
ngOnInit() {
|
|
571
|
+
this.initActionReference(this.services);
|
|
572
|
+
}
|
|
573
|
+
closeDialog() {
|
|
574
|
+
this.closeDialogEmit.next(true);
|
|
575
|
+
}
|
|
576
|
+
initActionReference(services) {
|
|
577
|
+
services.forEach((service, index) => {
|
|
578
|
+
if (service.externalId) {
|
|
579
|
+
if (service.additionalInfo) {
|
|
580
|
+
this.references[index] = `${service.externalId}@${service.additionalInfo}`;
|
|
581
|
+
}
|
|
582
|
+
else {
|
|
583
|
+
this.references[index] = service.externalId;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
else {
|
|
587
|
+
this.references[index] = '';
|
|
588
|
+
}
|
|
589
|
+
});
|
|
521
590
|
}
|
|
522
591
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: LastEventsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
523
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: LastEventsComponent, selector: "hvy-last-events", inputs: { services: "services", events: "events" }, usesInheritance: true, ngImport: i0, template: "@if (events.length > 0) {\n <div class=\"o-hvy-last-events__events\">\n <h3>{{ '@chh.event.lastEvents' | i18n }} ({{ events.length }})</h3>\n @for (event of events; track event.id) {\n <div class=\"o-hvy-last-events__events__item\">\n <div class=\"o-hvy-last-events__events__item__icon\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </div>\n <div class=\"o-hvy-last-events__events__item__title\">\n
|
|
592
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: LastEventsComponent, selector: "hvy-last-events", inputs: { services: "services", events: "events", closeButton: "closeButton" }, outputs: { closeDialogEmit: "closeDialogEmit" }, usesInheritance: true, ngImport: i0, template: "@if (events.length > 0) {\n <div class=\"o-hvy-last-events__events\">\n <div>\n <h3>{{ '@chh.event.lastEvents' | i18n }} ({{ events.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n @for (event of events; track event.id) {\n <div class=\"o-hvy-last-events__events__item\">\n <div class=\"o-hvy-last-events__events__item__icon\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </div>\n <div class=\"o-hvy-event-tooltip-container\">\n <div class=\"o-hvy-last-events__events__item__title\">\n <span>{{ event.name }}</span>\n </div>\n <div class=\"o-hvy-last-events__events__item__descr\">\n <span>{{event.externalSourceRef}} - {{event.creationDate | date : 'dd/MM/yyyy'}}</span>\n </div>\n </div>\n <div class=\"o-hvy-last-events__events__item__status\">\n <hvy-status-display [item]=\"event\"></hvy-status-display>\n </div>\n </div>\n }\n </div>\n}\n@if (services.length > 0) {\n <div class=\"o-hvy-last-events__services\">\n @if ( !events || events.length === 0) {\n <div>\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n } @else {\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n }\n @for (service of services; track service.id) {\n <div class=\"o-hvy-last-events__services__item\">\n <div class=\"o-hvy-last-events__services__item__icon\">\n <pry-icon iconSvg=\"service\"></pry-icon>\n </div>\n <div class=\"o-hvy-last-events__services__item__title\">\n <span>{{ references[$index] }} - {{ '@chh.intervention.' + service.category | i18n }}</span>\n </div>\n <div class=\"o-hvy-last-events__services__item__descr\">\n <span>{{ '@chh.event.description' | i18n }} : {{ service.description | truncate: [50, '...'] }}</span>\n </div>\n <div class=\"o-hvy-last-events__services__item__date\">\n @if (service.status === 'ASKED') {\n <span>{{ '@chh.event.startDate' | i18n }} : {{ displayDate(service.startDate) }}</span>\n }\n @if (service.status === 'IN_PROGRESS') {\n <span>{{ '@chh.event.endPlannedDate' | i18n }} : {{ displayDate(service.endDate) }}</span>\n }\n @if (service.status === 'DONE') {\n <span>{{ '@chh.event.endDate' | i18n }} : {{ displayDate(service.endDate) }}</span>\n }\n </div>\n <div class=\"o-hvy-last-events__services__item__status\">\n <hvy-status-display [item]=\"service\" type=\"service\"></hvy-status-display>\n </div>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: i1$3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: IconDisplayComponent, selector: "hvy-icon-display", inputs: ["event"] }, { kind: "component", type: StatusDisplayComponent, selector: "hvy-status-display", inputs: ["type", "readonly", "item", "modifiable"], outputs: ["modified"] }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }, { kind: "pipe", type: TruncatePipe, name: "truncate" }] }); }
|
|
524
593
|
}
|
|
525
594
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: LastEventsComponent, decorators: [{
|
|
526
595
|
type: Component,
|
|
527
|
-
args: [{ selector: 'hvy-last-events', template: "@if (events.length > 0) {\n <div class=\"o-hvy-last-events__events\">\n <h3>{{ '@chh.event.lastEvents' | i18n }} ({{ events.length }})</h3>\n @for (event of events; track event.id) {\n <div class=\"o-hvy-last-events__events__item\">\n <div class=\"o-hvy-last-events__events__item__icon\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </div>\n <div class=\"o-hvy-last-events__events__item__title\">\n
|
|
596
|
+
args: [{ selector: 'hvy-last-events', template: "@if (events.length > 0) {\n <div class=\"o-hvy-last-events__events\">\n <div>\n <h3>{{ '@chh.event.lastEvents' | i18n }} ({{ events.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n @for (event of events; track event.id) {\n <div class=\"o-hvy-last-events__events__item\">\n <div class=\"o-hvy-last-events__events__item__icon\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </div>\n <div class=\"o-hvy-event-tooltip-container\">\n <div class=\"o-hvy-last-events__events__item__title\">\n <span>{{ event.name }}</span>\n </div>\n <div class=\"o-hvy-last-events__events__item__descr\">\n <span>{{event.externalSourceRef}} - {{event.creationDate | date : 'dd/MM/yyyy'}}</span>\n </div>\n </div>\n <div class=\"o-hvy-last-events__events__item__status\">\n <hvy-status-display [item]=\"event\"></hvy-status-display>\n </div>\n </div>\n }\n </div>\n}\n@if (services.length > 0) {\n <div class=\"o-hvy-last-events__services\">\n @if ( !events || events.length === 0) {\n <div>\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n } @else {\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n }\n @for (service of services; track service.id) {\n <div class=\"o-hvy-last-events__services__item\">\n <div class=\"o-hvy-last-events__services__item__icon\">\n <pry-icon iconSvg=\"service\"></pry-icon>\n </div>\n <div class=\"o-hvy-last-events__services__item__title\">\n <span>{{ references[$index] }} - {{ '@chh.intervention.' + service.category | i18n }}</span>\n </div>\n <div class=\"o-hvy-last-events__services__item__descr\">\n <span>{{ '@chh.event.description' | i18n }} : {{ service.description | truncate: [50, '...'] }}</span>\n </div>\n <div class=\"o-hvy-last-events__services__item__date\">\n @if (service.status === 'ASKED') {\n <span>{{ '@chh.event.startDate' | i18n }} : {{ displayDate(service.startDate) }}</span>\n }\n @if (service.status === 'IN_PROGRESS') {\n <span>{{ '@chh.event.endPlannedDate' | i18n }} : {{ displayDate(service.endDate) }}</span>\n }\n @if (service.status === 'DONE') {\n <span>{{ '@chh.event.endDate' | i18n }} : {{ displayDate(service.endDate) }}</span>\n }\n </div>\n <div class=\"o-hvy-last-events__services__item__status\">\n <hvy-status-display [item]=\"service\" type=\"service\"></hvy-status-display>\n </div>\n </div>\n }\n </div>\n}\n" }]
|
|
528
597
|
}], propDecorators: { services: [{
|
|
529
598
|
type: Input
|
|
530
599
|
}], events: [{
|
|
531
600
|
type: Input
|
|
601
|
+
}], closeDialogEmit: [{
|
|
602
|
+
type: Output
|
|
603
|
+
}], closeButton: [{
|
|
604
|
+
type: Input
|
|
532
605
|
}] } });
|
|
533
606
|
|
|
534
607
|
class HvyEventDetailsTooltipComponent {
|
|
535
|
-
constructor(data) {
|
|
608
|
+
constructor(dialog, data) {
|
|
609
|
+
this.dialog = dialog;
|
|
536
610
|
this.data = data;
|
|
537
611
|
}
|
|
538
|
-
|
|
539
|
-
|
|
612
|
+
closeDialog($event) {
|
|
613
|
+
this.dialog.close($event);
|
|
614
|
+
}
|
|
615
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyEventDetailsTooltipComponent, deps: [{ token: i1$3.PryDialogRef }, { token: PRY_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
616
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: HvyEventDetailsTooltipComponent, selector: "hvy-event-detail-tooltip", ngImport: i0, template: "@if ((data.events && data.events.length > 0) || (data.services && data.services.length > 0)){\n <div class=\"o-hvy-event-detail-tooltip\">\n <hvy-last-events\n [events]=\"data.events ?? []\"\n [services]=\"data.services ?? []\"\n (closeDialogEmit)=\"closeDialog($event)\"\n [closeButton]=\"true\"\n >\n </hvy-last-events>\n </div>\n} @else {\n <div class=\"o-hvy-event-detail-tooltip o-hvy-event-detail-tooltip__no-data\">\n {{ '@chh.event.noEvents' | i18n }}\n <div class=\"o-modal__equipment__close\">\n <button class=\"\" (click)=\"closeDialog(true)\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: i1$3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: LastEventsComponent, selector: "hvy-last-events", inputs: ["services", "events", "closeButton"], outputs: ["closeDialogEmit"] }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
540
617
|
}
|
|
541
618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyEventDetailsTooltipComponent, decorators: [{
|
|
542
619
|
type: Component,
|
|
543
|
-
args: [{ selector: 'hvy-event-detail-tooltip', template: "<div class=\"o-hvy-event-detail-tooltip\">\n
|
|
544
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
620
|
+
args: [{ selector: 'hvy-event-detail-tooltip', template: "@if ((data.events && data.events.length > 0) || (data.services && data.services.length > 0)){\n <div class=\"o-hvy-event-detail-tooltip\">\n <hvy-last-events\n [events]=\"data.events ?? []\"\n [services]=\"data.services ?? []\"\n (closeDialogEmit)=\"closeDialog($event)\"\n [closeButton]=\"true\"\n >\n </hvy-last-events>\n </div>\n} @else {\n <div class=\"o-hvy-event-detail-tooltip o-hvy-event-detail-tooltip__no-data\">\n {{ '@chh.event.noEvents' | i18n }}\n <div class=\"o-modal__equipment__close\">\n <button class=\"\" (click)=\"closeDialog(true)\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n}\n" }]
|
|
621
|
+
}], ctorParameters: () => [{ type: i1$3.PryDialogRef }, { type: undefined, decorators: [{
|
|
545
622
|
type: Inject,
|
|
546
623
|
args: [PRY_DIALOG_DATA]
|
|
547
624
|
}] }] });
|
|
@@ -549,7 +626,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
549
626
|
const eventForWriteAPI = (event) => ({
|
|
550
627
|
...event,
|
|
551
628
|
equipmentId: event.equipment?.id,
|
|
552
|
-
parent: event.parent && typeof event.parent === 'object' ? event.parent.id : event.parent
|
|
629
|
+
parent: event.parent && typeof event.parent === 'object' ? event.parent.id : event.parent,
|
|
630
|
+
subCategory: event.category === 'ANOMALY' ? event.subCategory : undefined
|
|
553
631
|
});
|
|
554
632
|
|
|
555
633
|
const procedureForWriteAPI = (procedure) => ({
|
|
@@ -717,7 +795,7 @@ class HvyEventAddEventComponent {
|
|
|
717
795
|
this.dialog.close({ value: 'add', event: this.eventToAdd });
|
|
718
796
|
}
|
|
719
797
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyEventAddEventComponent, deps: [{ token: i1$3.PryDialogRef }, { token: PRY_DIALOG_DATA }, { token: EventService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
720
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: HvyEventAddEventComponent, selector: "hvy-add-event", ngImport: i0, template: "<div class=\"o-hvy-event-detail-add\">\n <h3>{{ '@hvy.event.add.title' | i18n }}</h3>\n <p>{{ '@hvy.event.add.description' | i18n }}</p>\n\n <div class=\"o-hvy-event-detail-add__container\">\n <label for=\"event\">{{ '@hvy.event.add.search' | i18n }}<span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"events$ | async\"\n bindLabel=\"displayName\"\n [ngModel]=\"eventToAdd\"\n (ngModelChange)=\"selectedEventChange($event)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.event.parentEvent.placeholder' | i18n\"\n id=\"event\"\n [template]=\"templateOption\"\n class=\"o-hvy-event-detail-add__event\"\n ></pry-select>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </div>\n\n <div class=\"o-hvy-event-detail-add__buttons\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"!eventToAdd\" (click)=\"add()\">\n {{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"closeModal()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
798
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: HvyEventAddEventComponent, selector: "hvy-add-event", ngImport: i0, template: "<div class=\"o-hvy-event-detail-add\">\n <h3>{{ '@hvy.event.add.title' | i18n }}</h3>\n <p>{{ '@hvy.event.add.description' | i18n }}</p>\n\n <div class=\"o-hvy-event-detail-add__container\">\n <label for=\"event\">{{ '@hvy.event.add.search' | i18n }}<span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"events$ | async\"\n bindLabel=\"displayName\"\n [ngModel]=\"eventToAdd\"\n (ngModelChange)=\"selectedEventChange($event)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.event.parentEvent.placeholder' | i18n\"\n id=\"event\"\n [template]=\"templateOption\"\n class=\"o-hvy-event-detail-add__event\"\n ></pry-select>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </div>\n\n <div class=\"o-hvy-event-detail-add__buttons\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"!eventToAdd\" (click)=\"add()\">\n {{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"closeModal()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked", "pressedEnter"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
721
799
|
}
|
|
722
800
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyEventAddEventComponent, decorators: [{
|
|
723
801
|
type: Component,
|
|
@@ -852,6 +930,9 @@ class HvyCommentsComponent {
|
|
|
852
930
|
}
|
|
853
931
|
editComment(comment) {
|
|
854
932
|
comment.edit = true;
|
|
933
|
+
setTimeout(() => {
|
|
934
|
+
this.message.nativeElement.focus();
|
|
935
|
+
}, 200);
|
|
855
936
|
}
|
|
856
937
|
saveComment(comment) {
|
|
857
938
|
this.commented.next({ id: comment.id, message: comment.message });
|
|
@@ -887,11 +968,11 @@ class HvyCommentsComponent {
|
|
|
887
968
|
this.opened = !this.opened;
|
|
888
969
|
}
|
|
889
970
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyCommentsComponent, deps: [{ token: HypCommentsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
890
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: HvyCommentsComponent, selector: "hvy-comments", inputs: { readonly: "readonly", me: "me", type: "type", objectId: "objectId", displayEmpty: "displayEmpty", commentCount: "commentCount", lastComment: "lastComment", trigger: "trigger" }, outputs: { commented: "commented" }, ngImport: i0, template: "<div class=\"o-hvy-comments\">\n @if (displayEmpty || commentCount > 0 || opened) {\n <div class=\"o-hvy-comments__header\">\n @if (type === 'actions') {\n <pry-icon\n iconSvg=\"arrow_down_rounded\"\n [class.-rotated]=\"opened\"\n class=\"-hand\"\n (click)=\"toggle()\"\n [width]=\"10\"\n [height]=\"10\"\n ></pry-icon>\n }\n <h3>\n {{\n (type === 'events' ? '@hvy.event.log.event.comments.name' : '@hvy.event.log.event.comments.actions')\n | i18n: { nb: commentCount }\n }}\n </h3>\n </div>\n\n @if (!readonly && (displayEmpty || opened)) {\n <textarea\n class=\"a-form-field\"\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComment\"\n maxlength=\"255\"\n ></textarea>\n <div class=\"o-hvy-comments__button\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"newComment.length === 0\" (click)=\"addComment()\">\n {{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n }\n\n @if (displayEmpty || opened) {\n @for (comment of comments; track comment.id) {\n @if ($first || more) {\n <div class=\"o-hvy-comments__previous\">\n <span class=\"o-hvy-comments__previous__title\">{{\n ($first && commentCount > 1 ? '@hvy.event.comment.lastDetail' : '@hvy.event.comment.detail')\n | i18n\n : {\n day: comment.day,\n hour: comment.hour,\n creator: comment.creatorName ?? '-'\n }\n }}</span>\n <div class=\"o-hvy-comments__previous__message\">\n <textarea\n class=\"a-form-field\"\n [(ngModel)]=\"comment.message\"\n [readonly]=\"!comment.edit\"\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n maxlength=\"255\"\n ></textarea>\n @if (!readonly && (!me || comment.creator === me)) {\n <button (click)=\"editComment(comment)\" [disabled]=\"comment.edit\">\n <pry-icon iconSvg=\"edit\" [height]=\"18\" [width]=\"18\"></pry-icon>\n </button>\n }\n </div>\n @if (comment.edit) {\n <div class=\"o-hvy-comments__previous__actions\">\n <button\n class=\"a-btn a-btn--primary\"\n [disabled]=\"comment.message.length === 0\"\n (click)=\"saveComment(comment)\"\n >\n {{ '@hvy.action.update' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"cancel(comment)\">\n {{ '@hvy.action.cancel' | i18n }}\n </button>\n </div>\n }\n </div>\n }\n }\n @if (commentCount > 1) {\n <div class=\"o-hvy-comments__more\">\n <button (click)=\"toggleMore()\">\n {{ (more ? '@hvy.event.comment.less' : '@hvy.event.comment.more') | i18n }}\n </button>\n </div>\n }\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
971
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: HvyCommentsComponent, selector: "hvy-comments", inputs: { readonly: "readonly", me: "me", type: "type", objectId: "objectId", displayEmpty: "displayEmpty", commentCount: "commentCount", lastComment: "lastComment", trigger: "trigger" }, outputs: { commented: "commented" }, viewQueries: [{ propertyName: "message", first: true, predicate: ["message"], descendants: true }], ngImport: i0, template: "<div class=\"o-hvy-comments\">\n @if (displayEmpty || commentCount > 0 || opened) {\n <div class=\"o-hvy-comments__header\">\n @if (type === 'actions') {\n <pry-icon\n iconSvg=\"arrow_down_rounded\"\n [class.-rotated]=\"opened\"\n class=\"-hand\"\n (click)=\"toggle()\"\n [width]=\"10\"\n [height]=\"10\"\n ></pry-icon>\n }\n <h3>\n {{\n (type === 'events' ? '@hvy.event.log.event.comments.name' : '@hvy.event.log.event.comments.actions')\n | i18n: { nb: commentCount }\n }}\n </h3>\n </div>\n\n @if (!readonly && (displayEmpty || opened)) {\n <textarea\n class=\"a-form-field\"\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComment\"\n maxlength=\"255\"\n ></textarea>\n <div class=\"o-hvy-comments__button\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"newComment.length === 0\" (click)=\"addComment()\">\n {{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n }\n\n @if (displayEmpty || opened) {\n @for (comment of comments; track comment.id) {\n @if ($first || more) {\n <div class=\"o-hvy-comments__previous\">\n <span class=\"o-hvy-comments__previous__title\">{{\n ($first && commentCount > 1 ? '@hvy.event.comment.lastDetail' : '@hvy.event.comment.detail')\n | i18n\n : {\n day: comment.day,\n hour: comment.hour,\n creator: comment.creatorName ?? '-'\n }\n }}</span>\n <div class=\"o-hvy-comments__previous__message\">\n <textarea\n class=\"a-form-field\"\n [(ngModel)]=\"comment.message\"\n [readonly]=\"!comment.edit\"\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n maxlength=\"255\"\n #message\n ></textarea>\n @if (!readonly && (!me || comment.creator === me)) {\n <button (click)=\"editComment(comment)\" [disabled]=\"comment.edit\">\n <pry-icon iconSvg=\"edit\" [height]=\"18\" [width]=\"18\"></pry-icon>\n </button>\n }\n </div>\n @if (comment.edit) {\n <div class=\"o-hvy-comments__previous__actions\">\n <button\n class=\"a-btn a-btn--primary\"\n [disabled]=\"comment.message.length === 0\"\n (click)=\"saveComment(comment)\"\n >\n {{ '@hvy.action.update' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"cancel(comment)\">\n {{ '@hvy.action.cancel' | i18n }}\n </button>\n </div>\n }\n </div>\n }\n }\n @if (commentCount > 1) {\n <div class=\"o-hvy-comments__more\">\n <button (click)=\"toggleMore()\">\n {{ (more ? '@hvy.event.comment.less' : '@hvy.event.comment.more') | i18n }}\n </button>\n </div>\n }\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
891
972
|
}
|
|
892
973
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyCommentsComponent, decorators: [{
|
|
893
974
|
type: Component,
|
|
894
|
-
args: [{ selector: 'hvy-comments', template: "<div class=\"o-hvy-comments\">\n @if (displayEmpty || commentCount > 0 || opened) {\n <div class=\"o-hvy-comments__header\">\n @if (type === 'actions') {\n <pry-icon\n iconSvg=\"arrow_down_rounded\"\n [class.-rotated]=\"opened\"\n class=\"-hand\"\n (click)=\"toggle()\"\n [width]=\"10\"\n [height]=\"10\"\n ></pry-icon>\n }\n <h3>\n {{\n (type === 'events' ? '@hvy.event.log.event.comments.name' : '@hvy.event.log.event.comments.actions')\n | i18n: { nb: commentCount }\n }}\n </h3>\n </div>\n\n @if (!readonly && (displayEmpty || opened)) {\n <textarea\n class=\"a-form-field\"\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComment\"\n maxlength=\"255\"\n ></textarea>\n <div class=\"o-hvy-comments__button\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"newComment.length === 0\" (click)=\"addComment()\">\n {{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n }\n\n @if (displayEmpty || opened) {\n @for (comment of comments; track comment.id) {\n @if ($first || more) {\n <div class=\"o-hvy-comments__previous\">\n <span class=\"o-hvy-comments__previous__title\">{{\n ($first && commentCount > 1 ? '@hvy.event.comment.lastDetail' : '@hvy.event.comment.detail')\n | i18n\n : {\n day: comment.day,\n hour: comment.hour,\n creator: comment.creatorName ?? '-'\n }\n }}</span>\n <div class=\"o-hvy-comments__previous__message\">\n <textarea\n class=\"a-form-field\"\n [(ngModel)]=\"comment.message\"\n [readonly]=\"!comment.edit\"\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n maxlength=\"255\"\n ></textarea>\n @if (!readonly && (!me || comment.creator === me)) {\n <button (click)=\"editComment(comment)\" [disabled]=\"comment.edit\">\n <pry-icon iconSvg=\"edit\" [height]=\"18\" [width]=\"18\"></pry-icon>\n </button>\n }\n </div>\n @if (comment.edit) {\n <div class=\"o-hvy-comments__previous__actions\">\n <button\n class=\"a-btn a-btn--primary\"\n [disabled]=\"comment.message.length === 0\"\n (click)=\"saveComment(comment)\"\n >\n {{ '@hvy.action.update' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"cancel(comment)\">\n {{ '@hvy.action.cancel' | i18n }}\n </button>\n </div>\n }\n </div>\n }\n }\n @if (commentCount > 1) {\n <div class=\"o-hvy-comments__more\">\n <button (click)=\"toggleMore()\">\n {{ (more ? '@hvy.event.comment.less' : '@hvy.event.comment.more') | i18n }}\n </button>\n </div>\n }\n }\n }\n</div>\n" }]
|
|
975
|
+
args: [{ selector: 'hvy-comments', template: "<div class=\"o-hvy-comments\">\n @if (displayEmpty || commentCount > 0 || opened) {\n <div class=\"o-hvy-comments__header\">\n @if (type === 'actions') {\n <pry-icon\n iconSvg=\"arrow_down_rounded\"\n [class.-rotated]=\"opened\"\n class=\"-hand\"\n (click)=\"toggle()\"\n [width]=\"10\"\n [height]=\"10\"\n ></pry-icon>\n }\n <h3>\n {{\n (type === 'events' ? '@hvy.event.log.event.comments.name' : '@hvy.event.log.event.comments.actions')\n | i18n: { nb: commentCount }\n }}\n </h3>\n </div>\n\n @if (!readonly && (displayEmpty || opened)) {\n <textarea\n class=\"a-form-field\"\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComment\"\n maxlength=\"255\"\n ></textarea>\n <div class=\"o-hvy-comments__button\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"newComment.length === 0\" (click)=\"addComment()\">\n {{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n }\n\n @if (displayEmpty || opened) {\n @for (comment of comments; track comment.id) {\n @if ($first || more) {\n <div class=\"o-hvy-comments__previous\">\n <span class=\"o-hvy-comments__previous__title\">{{\n ($first && commentCount > 1 ? '@hvy.event.comment.lastDetail' : '@hvy.event.comment.detail')\n | i18n\n : {\n day: comment.day,\n hour: comment.hour,\n creator: comment.creatorName ?? '-'\n }\n }}</span>\n <div class=\"o-hvy-comments__previous__message\">\n <textarea\n class=\"a-form-field\"\n [(ngModel)]=\"comment.message\"\n [readonly]=\"!comment.edit\"\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n maxlength=\"255\"\n #message\n ></textarea>\n @if (!readonly && (!me || comment.creator === me)) {\n <button (click)=\"editComment(comment)\" [disabled]=\"comment.edit\">\n <pry-icon iconSvg=\"edit\" [height]=\"18\" [width]=\"18\"></pry-icon>\n </button>\n }\n </div>\n @if (comment.edit) {\n <div class=\"o-hvy-comments__previous__actions\">\n <button\n class=\"a-btn a-btn--primary\"\n [disabled]=\"comment.message.length === 0\"\n (click)=\"saveComment(comment)\"\n >\n {{ '@hvy.action.update' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"cancel(comment)\">\n {{ '@hvy.action.cancel' | i18n }}\n </button>\n </div>\n }\n </div>\n }\n }\n @if (commentCount > 1) {\n <div class=\"o-hvy-comments__more\">\n <button (click)=\"toggleMore()\">\n {{ (more ? '@hvy.event.comment.less' : '@hvy.event.comment.more') | i18n }}\n </button>\n </div>\n }\n }\n }\n</div>\n" }]
|
|
895
976
|
}], ctorParameters: () => [{ type: HypCommentsService }], propDecorators: { readonly: [{
|
|
896
977
|
type: Input
|
|
897
978
|
}], commented: [{
|
|
@@ -906,6 +987,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
906
987
|
type: Input
|
|
907
988
|
}], commentCount: [{
|
|
908
989
|
type: Input
|
|
990
|
+
}], message: [{
|
|
991
|
+
type: ViewChild,
|
|
992
|
+
args: ['message']
|
|
909
993
|
}], lastComment: [{
|
|
910
994
|
type: Input
|
|
911
995
|
}], trigger: [{
|
|
@@ -922,11 +1006,11 @@ class HvyActionMenuComponent {
|
|
|
922
1006
|
this.dialog.close(value);
|
|
923
1007
|
}
|
|
924
1008
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyActionMenuComponent, deps: [{ token: i1$3.PryDialogRef }, { token: PRY_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
925
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: HvyActionMenuComponent, selector: "pry-action-menu", outputs: { choice: "choice" }, ngImport: i0, template: "<div class=\"o-hvy-action-menu\">\n @if (data.mode === 'procedure') {\n <button
|
|
1009
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: HvyActionMenuComponent, selector: "pry-action-menu", outputs: { choice: "choice" }, ngImport: i0, template: "<div class=\"o-hvy-action-menu\">\n @if (data.mode === 'procedure') {\n <button\n (click)=\"action('comment')\"\n [disabled]=\"!data.action.commentsCount && data.action.commentsCount !== 0\"\n >\n {{ '@hvy.procedure.action.comment' | i18n }}\n </button>\n }\n @if (data.action.status === 'NEW' && data.enableEditActions) {\n <button (click)=\"action('update')\">{{ '@hvy.procedure.action.update' | i18n }}</button>\n }\n @if (data.action.status !== 'DONE' && data.action.status !== 'IN_PROGRESS' && data.enableEditActions) {\n <button (click)=\"action('delete')\">{{ '@hvy.procedure.action.delete' | i18n }}</button>\n }\n @if (data.action.status !== 'DONE' && data.mode === 'procedure') {\n <button (click)=\"action('done')\">{{ '@hvy.procedure.action.done' | i18n }}</button>\n }\n</div>\n", dependencies: [{ kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
926
1010
|
}
|
|
927
1011
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyActionMenuComponent, decorators: [{
|
|
928
1012
|
type: Component,
|
|
929
|
-
args: [{ selector: 'pry-action-menu', template: "<div class=\"o-hvy-action-menu\">\n @if (data.mode === 'procedure') {\n <button
|
|
1013
|
+
args: [{ selector: 'pry-action-menu', template: "<div class=\"o-hvy-action-menu\">\n @if (data.mode === 'procedure') {\n <button\n (click)=\"action('comment')\"\n [disabled]=\"!data.action.commentsCount && data.action.commentsCount !== 0\"\n >\n {{ '@hvy.procedure.action.comment' | i18n }}\n </button>\n }\n @if (data.action.status === 'NEW' && data.enableEditActions) {\n <button (click)=\"action('update')\">{{ '@hvy.procedure.action.update' | i18n }}</button>\n }\n @if (data.action.status !== 'DONE' && data.action.status !== 'IN_PROGRESS' && data.enableEditActions) {\n <button (click)=\"action('delete')\">{{ '@hvy.procedure.action.delete' | i18n }}</button>\n }\n @if (data.action.status !== 'DONE' && data.mode === 'procedure') {\n <button (click)=\"action('done')\">{{ '@hvy.procedure.action.done' | i18n }}</button>\n }\n</div>\n" }]
|
|
930
1014
|
}], ctorParameters: () => [{ type: i1$3.PryDialogRef }, { type: undefined, decorators: [{
|
|
931
1015
|
type: Inject,
|
|
932
1016
|
args: [PRY_DIALOG_DATA]
|
|
@@ -952,7 +1036,7 @@ class HvyBaseParameterActionComponent {
|
|
|
952
1036
|
this.mode = 'procedure';
|
|
953
1037
|
}
|
|
954
1038
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyBaseParameterActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
955
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: HvyBaseParameterActionComponent, selector: "hvy-base-action-parameter", inputs: { mode: "mode", events: "events", action: "action" }, ngImport: i0, template: ' <p>not used</p>', isInline: true }); }
|
|
1039
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: HvyBaseParameterActionComponent, selector: "hvy-base-action-parameter", inputs: { mode: "mode", readonly: "readonly", events: "events", action: "action" }, ngImport: i0, template: ' <p>not used</p>', isInline: true }); }
|
|
956
1040
|
}
|
|
957
1041
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyBaseParameterActionComponent, decorators: [{
|
|
958
1042
|
type: Component,
|
|
@@ -962,6 +1046,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
962
1046
|
}]
|
|
963
1047
|
}], ctorParameters: () => [], propDecorators: { mode: [{
|
|
964
1048
|
type: Input
|
|
1049
|
+
}], readonly: [{
|
|
1050
|
+
type: Input
|
|
965
1051
|
}], events: [{
|
|
966
1052
|
type: Input
|
|
967
1053
|
}], action: [{
|
|
@@ -993,7 +1079,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
993
1079
|
}], ctorParameters: () => [] });
|
|
994
1080
|
|
|
995
1081
|
class HvyEmailActionParameterComponent extends HvyBaseParameterActionComponent {
|
|
996
|
-
static { this.PATTERN = new RegExp(/^\w+([
|
|
1082
|
+
static { this.PATTERN = new RegExp(/^\w+([.-]\w+)*@\w+([.-]\w+)*(\.\w{2,3})+/); }
|
|
997
1083
|
constructor() {
|
|
998
1084
|
super();
|
|
999
1085
|
}
|
|
@@ -1021,6 +1107,7 @@ class ServiceService {
|
|
|
1021
1107
|
constructor(httpClient, store) {
|
|
1022
1108
|
this.httpClient = httpClient;
|
|
1023
1109
|
this.store = store;
|
|
1110
|
+
this.refreshDiAction = new Subject();
|
|
1024
1111
|
}
|
|
1025
1112
|
types() {
|
|
1026
1113
|
return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
|
|
@@ -1043,11 +1130,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
1043
1130
|
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i1$1.Store }] });
|
|
1044
1131
|
|
|
1045
1132
|
class HvyCreateServiceComponent extends SubscriptionnerDirective {
|
|
1046
|
-
constructor(dialog, data,
|
|
1133
|
+
constructor(dialog, data, serviceService, i18nService) {
|
|
1047
1134
|
super();
|
|
1048
1135
|
this.dialog = dialog;
|
|
1049
1136
|
this.data = data;
|
|
1050
|
-
this.equipmentService = equipmentService;
|
|
1051
1137
|
this.serviceService = serviceService;
|
|
1052
1138
|
this.i18nService = i18nService;
|
|
1053
1139
|
this.result = {
|
|
@@ -1067,19 +1153,22 @@ class HvyCreateServiceComponent extends SubscriptionnerDirective {
|
|
|
1067
1153
|
this.allowedTypes = [];
|
|
1068
1154
|
this.result.name =
|
|
1069
1155
|
this.data.events && this.data.events.length > 0 ? this.data.events[0].name : this.data.action.name;
|
|
1070
|
-
this.
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1156
|
+
this.equipments = [
|
|
1157
|
+
{
|
|
1158
|
+
displayName: this.i18nService.instant('@hvy.service.noEquip'),
|
|
1159
|
+
id: '__NO_EQUIPMENT__'
|
|
1160
|
+
},
|
|
1161
|
+
...this.data.events
|
|
1162
|
+
.filter((ev) => !!ev.equipment)
|
|
1163
|
+
.map((ev) => ({
|
|
1164
|
+
...ev.equipment,
|
|
1165
|
+
displayName: `${ev.equipment?.name} - ${this.i18nService.instant('@hvy.event.family.' + ev.equipment?.family)}`
|
|
1076
1166
|
}))
|
|
1077
|
-
]
|
|
1167
|
+
];
|
|
1078
1168
|
this.serviceService.types().subscribe((types) => {
|
|
1079
1169
|
this.types = types;
|
|
1080
1170
|
this.updateAllowedTypes();
|
|
1081
1171
|
});
|
|
1082
|
-
this.subscriptions.add(this.equipments$.subscribe((equipments) => (this.equipments = equipments)));
|
|
1083
1172
|
}
|
|
1084
1173
|
action(value) {
|
|
1085
1174
|
this.result.value = value;
|
|
@@ -1155,25 +1244,44 @@ class HvyCreateServiceComponent extends SubscriptionnerDirective {
|
|
|
1155
1244
|
updateAllowedTypes() {
|
|
1156
1245
|
this.allowedTypes = this.types.filter((type) => !this.result.domain || this.result.domain.length === 0 || type.domain === this.result.domain);
|
|
1157
1246
|
}
|
|
1158
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyCreateServiceComponent, deps: [{ token: i1$3.PryDialogRef }, { token: PRY_DIALOG_DATA }, { token:
|
|
1159
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: HvyCreateServiceComponent, selector: "pry-create-service", usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-create-service\">\n <h3>{{ '@hvy.service.title' | i18n }}</h3>\n <span>{{ '@hvy.service.subtitle' | i18n }}</span>\n <div class=\"o-hvy-create-service__reason m-form-label-field\">\n <label>{{ '@hvy.service.reason' | i18n }} <span class=\"required\">*</span> :</label>\n <input class=\"a-form-field\" type=\"text\" [(ngModel)]=\"result.name\" [class.-error]=\"hasError('name')\" />\n </div>\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.service.target' | i18n }} <span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"equipments
|
|
1247
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyCreateServiceComponent, deps: [{ token: i1$3.PryDialogRef }, { token: PRY_DIALOG_DATA }, { token: ServiceService }, { token: i1$3.PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1248
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: HvyCreateServiceComponent, selector: "pry-create-service", usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-create-service\">\n <h3>{{ '@hvy.service.title' | i18n }}</h3>\n <span>{{ '@hvy.service.subtitle' | i18n }}</span>\n <div class=\"o-hvy-create-service__reason m-form-label-field\">\n <label>{{ '@hvy.service.reason' | i18n }} <span class=\"required\">*</span> :</label>\n <input class=\"a-form-field\" type=\"text\" [(ngModel)]=\"result.name\" [class.-error]=\"hasError('name')\" />\n </div>\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.service.target' | i18n }} <span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"equipments\"\n [ngModel]=\"result.equipment\"\n (ngModelChange)=\"onEquipmentChange($event)\"\n [placeholder]=\"'' | i18n\"\n [class.-error]=\"hasError('target')\"\n bindValue=\"id\"\n bindLabel=\"displayName\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field o-hvy-create-service__priority-nature\">\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.service.domain' | i18n }} <span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"domains\"\n [ngModel]=\"result.domain\"\n (ngModelChange)=\"onDomainChange($event)\"\n [placeholder]=\"'' | i18n\"\n [class.-error]=\"hasError('domain')\"\n i18nPrefix=\"@hvy.event.domain.\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.service.priority' | i18n }} <span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"priorities\"\n [ngModel]=\"result.priority\"\n (ngModelChange)=\"onPriorityChange($event)\"\n [placeholder]=\"'' | i18n\"\n [class.-error]=\"hasError('priority')\"\n i18nPrefix=\"@hvy.service.priorities.\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.service.type' | i18n }} <span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"allowedTypes\"\n [ngModel]=\"result.type\"\n (ngModelChange)=\"onTypeChange($event)\"\n [placeholder]=\"'' | i18n\"\n [class.-error]=\"hasError('type')\"\n bindLabel=\"name\"\n bindValue=\"name\"\n ></pry-select>\n </div>\n </div>\n <div class=\"o-hvy-create-service__hours m-form-label-field\">\n <div class=\"o-hvy-create-service__hours__element\">\n <label for=\"gti\">{{ '@hvy.service.gti' | i18n }} :</label>\n <input id=\"gti\" class=\"a-form-field\" type=\"text\" [ngModel]=\"result.gti ?? '-'\" readonly [disabled]=\"true\" />\n </div>\n <div class=\"o-hvy-create-service__hours__element\">\n <label for=\"gtr\">{{ '@hvy.service.gtr' | i18n }} :</label>\n <input id=\"gtr\" class=\"a-form-field\" type=\"text\" [ngModel]=\"result.gtr ?? '-'\" readonly [disabled]=\"true\" />\n </div>\n <div class=\"o-hvy-create-service__hours__element\">\n <label for=\"gtrp\">{{ '@hvy.service.gtrp' | i18n }} :</label>\n <input id=\"gtrp\" type=\"text\" class=\"a-form-field\" [ngModel]=\"result.gtrp ?? '-'\" readonly [disabled]=\"true\" />\n </div>\n </div>\n <div class=\"o-hvy-create-service__description m-form-label-field\">\n <label for=\"description\">{{ '@hvy.service.description' | i18n }} <span class=\"required\">*</span> :</label>\n <textarea\n [ngModel]=\"result.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description')\"\n (ngModelChange)=\"onDescriptionChange($event)\"\n [maxLength]=\"256\"\n id=\"description\"\n ></textarea>\n </div>\n <div class=\"o-hvy-association-modal__buttons u-display-flex -justify-center\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"this.errors.length !== 0\" (click)=\"createDI()\">\n {{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"closeModal()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked", "pressedEnter"] }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
1160
1249
|
}
|
|
1161
1250
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyCreateServiceComponent, decorators: [{
|
|
1162
1251
|
type: Component,
|
|
1163
|
-
args: [{ selector: 'pry-create-service', template: "<div class=\"o-hvy-create-service\">\n <h3>{{ '@hvy.service.title' | i18n }}</h3>\n <span>{{ '@hvy.service.subtitle' | i18n }}</span>\n <div class=\"o-hvy-create-service__reason m-form-label-field\">\n <label>{{ '@hvy.service.reason' | i18n }} <span class=\"required\">*</span> :</label>\n <input class=\"a-form-field\" type=\"text\" [(ngModel)]=\"result.name\" [class.-error]=\"hasError('name')\" />\n </div>\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.service.target' | i18n }} <span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"equipments
|
|
1252
|
+
args: [{ selector: 'pry-create-service', template: "<div class=\"o-hvy-create-service\">\n <h3>{{ '@hvy.service.title' | i18n }}</h3>\n <span>{{ '@hvy.service.subtitle' | i18n }}</span>\n <div class=\"o-hvy-create-service__reason m-form-label-field\">\n <label>{{ '@hvy.service.reason' | i18n }} <span class=\"required\">*</span> :</label>\n <input class=\"a-form-field\" type=\"text\" [(ngModel)]=\"result.name\" [class.-error]=\"hasError('name')\" />\n </div>\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.service.target' | i18n }} <span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"equipments\"\n [ngModel]=\"result.equipment\"\n (ngModelChange)=\"onEquipmentChange($event)\"\n [placeholder]=\"'' | i18n\"\n [class.-error]=\"hasError('target')\"\n bindValue=\"id\"\n bindLabel=\"displayName\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field o-hvy-create-service__priority-nature\">\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.service.domain' | i18n }} <span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"domains\"\n [ngModel]=\"result.domain\"\n (ngModelChange)=\"onDomainChange($event)\"\n [placeholder]=\"'' | i18n\"\n [class.-error]=\"hasError('domain')\"\n i18nPrefix=\"@hvy.event.domain.\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.service.priority' | i18n }} <span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"priorities\"\n [ngModel]=\"result.priority\"\n (ngModelChange)=\"onPriorityChange($event)\"\n [placeholder]=\"'' | i18n\"\n [class.-error]=\"hasError('priority')\"\n i18nPrefix=\"@hvy.service.priorities.\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label>{{ '@hvy.service.type' | i18n }} <span class=\"required\">*</span> :</label>\n <pry-select\n [items]=\"allowedTypes\"\n [ngModel]=\"result.type\"\n (ngModelChange)=\"onTypeChange($event)\"\n [placeholder]=\"'' | i18n\"\n [class.-error]=\"hasError('type')\"\n bindLabel=\"name\"\n bindValue=\"name\"\n ></pry-select>\n </div>\n </div>\n <div class=\"o-hvy-create-service__hours m-form-label-field\">\n <div class=\"o-hvy-create-service__hours__element\">\n <label for=\"gti\">{{ '@hvy.service.gti' | i18n }} :</label>\n <input id=\"gti\" class=\"a-form-field\" type=\"text\" [ngModel]=\"result.gti ?? '-'\" readonly [disabled]=\"true\" />\n </div>\n <div class=\"o-hvy-create-service__hours__element\">\n <label for=\"gtr\">{{ '@hvy.service.gtr' | i18n }} :</label>\n <input id=\"gtr\" class=\"a-form-field\" type=\"text\" [ngModel]=\"result.gtr ?? '-'\" readonly [disabled]=\"true\" />\n </div>\n <div class=\"o-hvy-create-service__hours__element\">\n <label for=\"gtrp\">{{ '@hvy.service.gtrp' | i18n }} :</label>\n <input id=\"gtrp\" type=\"text\" class=\"a-form-field\" [ngModel]=\"result.gtrp ?? '-'\" readonly [disabled]=\"true\" />\n </div>\n </div>\n <div class=\"o-hvy-create-service__description m-form-label-field\">\n <label for=\"description\">{{ '@hvy.service.description' | i18n }} <span class=\"required\">*</span> :</label>\n <textarea\n [ngModel]=\"result.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description')\"\n (ngModelChange)=\"onDescriptionChange($event)\"\n [maxLength]=\"256\"\n id=\"description\"\n ></textarea>\n </div>\n <div class=\"o-hvy-association-modal__buttons u-display-flex -justify-center\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"this.errors.length !== 0\" (click)=\"createDI()\">\n {{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"closeModal()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n</div>\n" }]
|
|
1164
1253
|
}], ctorParameters: () => [{ type: i1$3.PryDialogRef }, { type: undefined, decorators: [{
|
|
1165
1254
|
type: Inject,
|
|
1166
1255
|
args: [PRY_DIALOG_DATA]
|
|
1167
|
-
}] }, { type:
|
|
1256
|
+
}] }, { type: ServiceService }, { type: i1$3.PryI18nService }] });
|
|
1168
1257
|
|
|
1169
1258
|
class HvyServiceActionDisplayComponent extends HvyBaseParameterActionComponent {
|
|
1170
|
-
constructor(pryDialog, overlay, serviceService) {
|
|
1259
|
+
constructor(pryDialog, overlay, serviceService, i18n) {
|
|
1171
1260
|
super();
|
|
1172
1261
|
this.pryDialog = pryDialog;
|
|
1173
1262
|
this.overlay = overlay;
|
|
1174
1263
|
this.serviceService = serviceService;
|
|
1264
|
+
this.i18n = i18n;
|
|
1175
1265
|
this.act = act;
|
|
1176
1266
|
}
|
|
1267
|
+
ngOnInit() {
|
|
1268
|
+
this.status = this.action.serviceStatus ?
|
|
1269
|
+
'(' + this.i18n.transform(`@hvy.procedure.status.${this.action.serviceStatus}`) + ')' : '';
|
|
1270
|
+
this.initActionReference();
|
|
1271
|
+
}
|
|
1272
|
+
initActionReference() {
|
|
1273
|
+
if (this.action.serviceExternalId) {
|
|
1274
|
+
if (this.action.serviceAdditionalInfo) {
|
|
1275
|
+
this.reference = `${this.action.serviceExternalId}@${this.action.serviceAdditionalInfo}`;
|
|
1276
|
+
}
|
|
1277
|
+
else {
|
|
1278
|
+
this.reference = this.action.serviceExternalId;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
else {
|
|
1282
|
+
this.reference = this.action.name;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1177
1285
|
toggleModal() {
|
|
1178
1286
|
const dialogRef = this.pryDialog.open(HvyCreateServiceComponent, {
|
|
1179
1287
|
overlayConfig: {
|
|
@@ -1192,7 +1300,11 @@ class HvyServiceActionDisplayComponent extends HvyBaseParameterActionComponent {
|
|
|
1192
1300
|
case 'ok':
|
|
1193
1301
|
this.serviceService
|
|
1194
1302
|
.create(type, this.action.id)
|
|
1195
|
-
.subscribe((name) =>
|
|
1303
|
+
.subscribe((name) => {
|
|
1304
|
+
this.action.serviceExternalId = name.id;
|
|
1305
|
+
this.initActionReference();
|
|
1306
|
+
this.serviceService.refreshDiAction.next(true);
|
|
1307
|
+
});
|
|
1196
1308
|
break;
|
|
1197
1309
|
case 'cancel':
|
|
1198
1310
|
break;
|
|
@@ -1202,13 +1314,13 @@ class HvyServiceActionDisplayComponent extends HvyBaseParameterActionComponent {
|
|
|
1202
1314
|
}, 100);
|
|
1203
1315
|
});
|
|
1204
1316
|
}
|
|
1205
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyServiceActionDisplayComponent, deps: [{ token: i1$3.PryDialogService }, { token: i2.Overlay }, { token: ServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1206
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: HvyServiceActionDisplayComponent, selector: "hvy-service-action-display", viewQueries: [{ propertyName: "menuButton", first: true, predicate: ["menuButton"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"param-line -vertical\">\n <p>\n {{ '@hvy.procedure.action.service' | i18n }} : <b>{{
|
|
1317
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyServiceActionDisplayComponent, deps: [{ token: i1$3.PryDialogService }, { token: i2.Overlay }, { token: ServiceService }, { token: i1$3.I18nPipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1318
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: HvyServiceActionDisplayComponent, selector: "hvy-service-action-display", viewQueries: [{ propertyName: "menuButton", first: true, predicate: ["menuButton"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"param-line -vertical\">\n <p>\n {{ '@hvy.procedure.action.service' | i18n }} : <b>{{ reference }}</b> {{ status }}\n </p>\n @if (!action.serviceExternalId && this.mode !== 'model') {\n <button\n class=\"a-link\"\n [disabled]=\"readonly || (action.type === 'ASKED_SERVICE' && action.status === 'DONE')\"\n (click)=\"toggleModal()\"\n #menuButton\n >\n > {{ '@hvy.action.create' | i18n }}\n </button>\n }\n</div>\n", dependencies: [{ kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
1207
1319
|
}
|
|
1208
1320
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyServiceActionDisplayComponent, decorators: [{
|
|
1209
1321
|
type: Component,
|
|
1210
|
-
args: [{ selector: 'hvy-service-action-display', template: "<div class=\"param-line -vertical\">\n <p>\n {{ '@hvy.procedure.action.service' | i18n }} : <b>{{
|
|
1211
|
-
}], ctorParameters: () => [{ type: i1$3.PryDialogService }, { type: i2.Overlay }, { type: ServiceService }], propDecorators: { menuButton: [{
|
|
1322
|
+
args: [{ selector: 'hvy-service-action-display', template: "<div class=\"param-line -vertical\">\n <p>\n {{ '@hvy.procedure.action.service' | i18n }} : <b>{{ reference }}</b> {{ status }}\n </p>\n @if (!action.serviceExternalId && this.mode !== 'model') {\n <button\n class=\"a-link\"\n [disabled]=\"readonly || (action.type === 'ASKED_SERVICE' && action.status === 'DONE')\"\n (click)=\"toggleModal()\"\n #menuButton\n >\n > {{ '@hvy.action.create' | i18n }}\n </button>\n }\n</div>\n" }]
|
|
1323
|
+
}], ctorParameters: () => [{ type: i1$3.PryDialogService }, { type: i2.Overlay }, { type: ServiceService }, { type: i1$3.I18nPipe }], propDecorators: { menuButton: [{
|
|
1212
1324
|
type: ViewChild,
|
|
1213
1325
|
args: ['menuButton', { read: ElementRef }]
|
|
1214
1326
|
}] } });
|
|
@@ -1238,7 +1350,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
1238
1350
|
}], ctorParameters: () => [] });
|
|
1239
1351
|
|
|
1240
1352
|
class HvyPhoneActionParameterComponent extends HvyBaseParameterActionComponent {
|
|
1241
|
-
static { this.
|
|
1353
|
+
static { this.PATTERN_PHONE = new RegExp('^(?:(?:\\+|00)33|0)[1-9][0-9]{8}$'); }
|
|
1354
|
+
static { this.PATTERN_SMS = new RegExp('^(?:(?:\\+|00)33|0)[6-7][0-9]{8}$'); }
|
|
1242
1355
|
constructor() {
|
|
1243
1356
|
super();
|
|
1244
1357
|
}
|
|
@@ -1255,13 +1368,13 @@ const ACTIONS_TYPES = {
|
|
|
1255
1368
|
PHONE: {
|
|
1256
1369
|
display: HvyPhoneActionDisplayComponent,
|
|
1257
1370
|
parameter: HvyPhoneActionParameterComponent,
|
|
1258
|
-
validator: (action) => !!action.name && !!action.number && action.number.match(HvyPhoneActionParameterComponent.
|
|
1371
|
+
validator: (action) => !!action.name && !!action.number && action.number.match(HvyPhoneActionParameterComponent.PATTERN_PHONE),
|
|
1259
1372
|
order: 100
|
|
1260
1373
|
},
|
|
1261
1374
|
SMS: {
|
|
1262
1375
|
display: HvyPhoneActionDisplayComponent,
|
|
1263
1376
|
parameter: HvyPhoneActionParameterComponent,
|
|
1264
|
-
validator: (action) => !!action.name && !!action.number && action.number.match(HvyPhoneActionParameterComponent.
|
|
1377
|
+
validator: (action) => !!action.name && !!action.number && action.number.match(HvyPhoneActionParameterComponent.PATTERN_SMS),
|
|
1265
1378
|
order: 200
|
|
1266
1379
|
},
|
|
1267
1380
|
OTHER: {
|
|
@@ -1320,12 +1433,13 @@ class HvyActionParameterComponent {
|
|
|
1320
1433
|
this.componentRef.instance.action = this._action;
|
|
1321
1434
|
this.componentRef.instance.events = this._events;
|
|
1322
1435
|
this.componentRef.instance.mode = this.mode;
|
|
1436
|
+
this.componentRef.instance.readonly = this.readonly;
|
|
1323
1437
|
}
|
|
1324
1438
|
});
|
|
1325
1439
|
}
|
|
1326
1440
|
}
|
|
1327
1441
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyActionParameterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1328
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: HvyActionParameterComponent, selector: "hvy-action-parameter", inputs: { mode: "mode", events: "events", isParam: "isParam", type: "type", action: "action" }, viewQueries: [{ propertyName: "ref", first: true, predicate: ["ref"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div #ref></div>\n" }); }
|
|
1442
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: HvyActionParameterComponent, selector: "hvy-action-parameter", inputs: { mode: "mode", readonly: "readonly", events: "events", isParam: "isParam", type: "type", action: "action" }, viewQueries: [{ propertyName: "ref", first: true, predicate: ["ref"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div #ref></div>\n" }); }
|
|
1329
1443
|
}
|
|
1330
1444
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyActionParameterComponent, decorators: [{
|
|
1331
1445
|
type: Component,
|
|
@@ -1335,6 +1449,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
1335
1449
|
args: ['ref', { read: ViewContainerRef }]
|
|
1336
1450
|
}], mode: [{
|
|
1337
1451
|
type: Input
|
|
1452
|
+
}], readonly: [{
|
|
1453
|
+
type: Input
|
|
1338
1454
|
}], events: [{
|
|
1339
1455
|
type: Input
|
|
1340
1456
|
}], isParam: [{
|
|
@@ -1347,11 +1463,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
1347
1463
|
|
|
1348
1464
|
class ProcedureActionsComponent extends SubscriptionnerDirective {
|
|
1349
1465
|
static { this.CARD_HEIGHT = 75; }
|
|
1350
|
-
constructor(pryDialog, overlay, commentsService) {
|
|
1466
|
+
constructor(pryDialog, overlay, commentsService, serviceService) {
|
|
1351
1467
|
super();
|
|
1352
1468
|
this.pryDialog = pryDialog;
|
|
1353
1469
|
this.overlay = overlay;
|
|
1354
1470
|
this.commentsService = commentsService;
|
|
1471
|
+
this.serviceService = serviceService;
|
|
1355
1472
|
this.moveStart = 0;
|
|
1356
1473
|
this.moveInitialIndex = 0;
|
|
1357
1474
|
this.initialActionList = [];
|
|
@@ -1360,13 +1477,21 @@ class ProcedureActionsComponent extends SubscriptionnerDirective {
|
|
|
1360
1477
|
this.commented = new EventEmitter();
|
|
1361
1478
|
this.mode = 'procedure';
|
|
1362
1479
|
this.readonly = false;
|
|
1480
|
+
this.readOnlyComment = false;
|
|
1363
1481
|
this.enableEditActions = false;
|
|
1364
1482
|
this.events = [];
|
|
1365
1483
|
this._actions = [];
|
|
1366
1484
|
this.triggers = {};
|
|
1485
|
+
this.ignoreFirstEvent = true;
|
|
1486
|
+
this.refreshActions = new EventEmitter();
|
|
1367
1487
|
this.model = model$1;
|
|
1368
1488
|
this.ACTIONS_TYPES = Object.keys(ACTIONS_TYPES.values);
|
|
1369
1489
|
this.ACTIONS_TYPES.sort((a, b) => ACTIONS_TYPES.values[a].order - ACTIONS_TYPES.values[b].order);
|
|
1490
|
+
this.subscriptions.add(this.serviceService.refreshDiAction.subscribe((result) => {
|
|
1491
|
+
if (result) {
|
|
1492
|
+
this.refreshActions.next(this.actions);
|
|
1493
|
+
}
|
|
1494
|
+
}));
|
|
1370
1495
|
}
|
|
1371
1496
|
set actions(actions) {
|
|
1372
1497
|
this._actions = JSON.parse(JSON.stringify(actions ?? []));
|
|
@@ -1436,6 +1561,14 @@ class ProcedureActionsComponent extends SubscriptionnerDirective {
|
|
|
1436
1561
|
update(idx, prop, $event) {
|
|
1437
1562
|
// @ts-ignore
|
|
1438
1563
|
this.actions[idx][prop] = $event;
|
|
1564
|
+
if (!this.ignoreFirstEvent) {
|
|
1565
|
+
this.clearAction(idx);
|
|
1566
|
+
}
|
|
1567
|
+
this.ignoreFirstEvent = false;
|
|
1568
|
+
}
|
|
1569
|
+
clearAction(idx) {
|
|
1570
|
+
const { type, status, id, _status, _initial } = this.actions[idx];
|
|
1571
|
+
this.actions[idx] = { type, status, id, _status, _initial };
|
|
1439
1572
|
}
|
|
1440
1573
|
openModal(action, idx) {
|
|
1441
1574
|
const dialogRef = this.pryDialog.open(HvyActionMenuComponent, {
|
|
@@ -1481,6 +1614,7 @@ class ProcedureActionsComponent extends SubscriptionnerDirective {
|
|
|
1481
1614
|
sub.unsubscribe();
|
|
1482
1615
|
}, 100);
|
|
1483
1616
|
});
|
|
1617
|
+
this.ignoreFirstEvent = true;
|
|
1484
1618
|
}
|
|
1485
1619
|
saveAction(action, idx) {
|
|
1486
1620
|
delete action._initial;
|
|
@@ -1516,13 +1650,13 @@ class ProcedureActionsComponent extends SubscriptionnerDirective {
|
|
|
1516
1650
|
});
|
|
1517
1651
|
});
|
|
1518
1652
|
}
|
|
1519
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ProcedureActionsComponent, deps: [{ token: i1$3.PryDialogService }, { token: i2.Overlay }, { token: HypCommentsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1520
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: { mode: "mode", me: "me", readonly: "readonly", enableEditActions: "enableEditActions", events: "events", actions: "actions" }, outputs: { modified: "modified", commented: "commented" }, viewQueries: [{ propertyName: "menuButtons", predicate: ["menuButton"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"o-hvy-events-detail__procedure__actions\"\n (drag)=\"move($event)\"\n (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\"\n>\n @for (action of actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"isDraggable(action) && !readonly\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n [class.-updating]=\"!!action._status\"\n [class.-other-updating]=\"editing\"\n >\n <div class=\"o-hvy-events-detail__procedure__actions__action__header\">\n @if (this.enableEditActions) {\n <pry-icon\n iconSvg=\"six_dot\"\n #handle\n [class.-disabled]=\"!isDraggable(action)\"\n [class.-hidden]=\"action._status || readonly\"\n class=\"grabbable\"\n ></pry-icon>\n }\n <div class=\"number-badge\">{{ idx + 1 }}</div>\n @if (!action._status || readonly) {\n @if (mode === 'procedure') {\n <pry-checkbox\n [ngModel]=\"action.status !== 'NEW'\"\n (click)=\"toggleActionStatus(idx, $event, action.status === 'DONE' || (readonly ?? false))\"\n [disabled]=\"action.status === 'DONE' || (readonly ?? false)\"\n [class.-disabled]=\"action.status === 'DONE' || (readonly ?? false)\"\n ></pry-checkbox>\n }\n <div [class.-done]=\"action.status === 'DONE'\" [class.-disabled]=\"editing\">\n <hvy-action-parameter\n [action]=\"action\"\n [type]=\"action.type\"\n [isParam]=\"false\"\n [events]=\"this.events\"\n [mode]=\"this.mode\"\n ></hvy-action-parameter>\n </div>\n @if (!readonly) {\n <button class=\"a-btn a-btn--icon-only\" (click)=\"openModal(action, idx)\" [disabled]=\"editing\">\n <pry-icon iconSvg=\"more_horiz\" #menuButton></pry-icon>\n </button>\n }\n } @else {\n <div class=\"o-hvy-events-detail__procedure__actions__action__create\">\n <div class=\"o-hvy-events-detail__procedure__actions__action__create__header\">\n <p>{{ '@hvy.procedure.action.' + action._status | i18n }}</p>\n <button class=\"a-btn a-btn--icon-only\" (click)=\"saveAction(action, idx)\" [disabled]=\"!isValid(action)\">\n <pry-icon iconSvg=\"check\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelAction(action, idx)\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div>\n <pry-select\n [ngModel]=\"action.type\"\n [items]=\"ACTIONS_TYPES\"\n (ngModelChange)=\"update(idx, 'type', $event)\"\n i18nPrefix=\"@hvy.procedure.action.\"\n [placeholder]=\"'@hvy.procedure.action.placeholder.action' | i18n\"\n ></pry-select>\n </div>\n <hvy-action-parameter\n [action]=\"action\"\n [type]=\"action.type\"\n [isParam]=\"true\"\n [events]=\"this.events\"\n [mode]=\"this.mode\"\n ></hvy-action-parameter>\n </div>\n }\n </div>\n <hvy-comments\n [lastComment]=\"action.lastComment\"\n [commentCount]=\"action.commentsCount\"\n [objectId]=\"action.id\"\n [readonly]=\"
|
|
1653
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ProcedureActionsComponent, deps: [{ token: i1$3.PryDialogService }, { token: i2.Overlay }, { token: HypCommentsService }, { token: ServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1654
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: { mode: "mode", me: "me", readonly: "readonly", readOnlyComment: "readOnlyComment", enableEditActions: "enableEditActions", events: "events", actions: "actions" }, outputs: { modified: "modified", commented: "commented", refreshActions: "refreshActions" }, viewQueries: [{ propertyName: "menuButtons", predicate: ["menuButton"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"o-hvy-events-detail__procedure__actions\"\n (drag)=\"move($event)\"\n (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\"\n>\n @for (action of actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"isDraggable(action) && !readonly\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n [class.-updating]=\"!!action._status\"\n [class.-other-updating]=\"editing\"\n >\n <div class=\"o-hvy-events-detail__procedure__actions__action__header\">\n @if (this.enableEditActions) {\n <pry-icon\n iconSvg=\"six_dot\"\n #handle\n [class.-disabled]=\"!isDraggable(action)\"\n [class.-hidden]=\"action._status || readonly\"\n class=\"grabbable\"\n ></pry-icon>\n }\n <div class=\"number-badge\">{{ idx + 1 }}</div>\n @if (!action._status || readonly) {\n @if (mode === 'procedure') {\n <pry-checkbox\n [ngModel]=\"action.status !== 'NEW'\"\n (click)=\"toggleActionStatus(idx, $event, action.status === 'DONE' || (readonly ?? false))\"\n [disabled]=\"action.status === 'DONE' || (readonly ?? false)\"\n [class.-disabled]=\"action.status === 'DONE' || (readonly ?? false)\"\n [title]=\"'@hvy.procedure.checkbox.' + action.status | i18n\"\n ></pry-checkbox>\n }\n <div [class.-done]=\"action.status === 'DONE'\" [class.-disabled]=\"editing\">\n <hvy-action-parameter\n [action]=\"action\"\n [type]=\"action.type\"\n [isParam]=\"false\"\n [events]=\"this.events\"\n [mode]=\"this.mode\"\n [readonly]=\"readonly\"\n ></hvy-action-parameter>\n </div>\n @if (!readonly) {\n <button class=\"a-btn a-btn--icon-only\" (click)=\"openModal(action, idx)\" [disabled]=\"editing\">\n <pry-icon iconSvg=\"more_horiz\" #menuButton></pry-icon>\n </button>\n }\n } @else {\n <div class=\"o-hvy-events-detail__procedure__actions__action__create\">\n <div class=\"o-hvy-events-detail__procedure__actions__action__create__header\">\n <p>{{ '@hvy.procedure.action.' + action._status | i18n }}</p>\n <button class=\"a-btn a-btn--icon-only\" (click)=\"saveAction(action, idx)\" [disabled]=\"!isValid(action)\">\n <pry-icon iconSvg=\"check\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelAction(action, idx)\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div>\n <pry-select\n [ngModel]=\"action.type\"\n [items]=\"ACTIONS_TYPES\"\n (ngModelChange)=\"update(idx, 'type', $event)\"\n i18nPrefix=\"@hvy.procedure.action.\"\n [placeholder]=\"'@hvy.procedure.action.placeholder.action' | i18n\"\n ></pry-select>\n </div>\n <hvy-action-parameter\n [action]=\"action\"\n [type]=\"action.type\"\n [isParam]=\"true\"\n [events]=\"this.events\"\n [mode]=\"this.mode\"\n ></hvy-action-parameter>\n </div>\n }\n </div>\n <hvy-comments\n [lastComment]=\"action.lastComment\"\n [commentCount]=\"action.commentsCount\"\n [objectId]=\"action.id\"\n [readonly]=\"readOnlyComment\"\n (commented)=\"updateComment(action, $event)\"\n [type]=\"'actions'\"\n [trigger]=\"triggers[action.id]\"\n [displayEmpty]=\"false\"\n [me]=\"me\"\n ></hvy-comments>\n </div>\n } @empty {\n @if (actions.length === 0) {\n <div>{{ '@hvy.event.log.procedure.noAction' | i18n }}</div>\n }\n }\n @if (!readonly && enableEditActions) {\n <div class=\"o-hvy-events-detail__procedure__button\">\n <button class=\"a-btn a-btn--primary\" (click)=\"add()\" [disabled]=\"editing\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.procedure.action.add' | i18n }}\n </button>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle", "name", "inputId", "inhibit"] }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i1$3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked", "pressedEnter"] }, { kind: "component", type: HvyActionParameterComponent, selector: "hvy-action-parameter", inputs: ["mode", "readonly", "events", "isParam", "type", "action"] }, { kind: "component", type: HvyCommentsComponent, selector: "hvy-comments", inputs: ["readonly", "me", "type", "objectId", "displayEmpty", "commentCount", "lastComment", "trigger"], outputs: ["commented"] }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
1521
1655
|
}
|
|
1522
1656
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ProcedureActionsComponent, decorators: [{
|
|
1523
1657
|
type: Component,
|
|
1524
|
-
args: [{ selector: 'hvy-procedure-actions', template: "<div\n class=\"o-hvy-events-detail__procedure__actions\"\n (drag)=\"move($event)\"\n (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\"\n>\n @for (action of actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"isDraggable(action) && !readonly\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n [class.-updating]=\"!!action._status\"\n [class.-other-updating]=\"editing\"\n >\n <div class=\"o-hvy-events-detail__procedure__actions__action__header\">\n @if (this.enableEditActions) {\n <pry-icon\n iconSvg=\"six_dot\"\n #handle\n [class.-disabled]=\"!isDraggable(action)\"\n [class.-hidden]=\"action._status || readonly\"\n class=\"grabbable\"\n ></pry-icon>\n }\n <div class=\"number-badge\">{{ idx + 1 }}</div>\n @if (!action._status || readonly) {\n @if (mode === 'procedure') {\n <pry-checkbox\n [ngModel]=\"action.status !== 'NEW'\"\n (click)=\"toggleActionStatus(idx, $event, action.status === 'DONE' || (readonly ?? false))\"\n [disabled]=\"action.status === 'DONE' || (readonly ?? false)\"\n [class.-disabled]=\"action.status === 'DONE' || (readonly ?? false)\"\n ></pry-checkbox>\n }\n <div [class.-done]=\"action.status === 'DONE'\" [class.-disabled]=\"editing\">\n <hvy-action-parameter\n [action]=\"action\"\n [type]=\"action.type\"\n [isParam]=\"false\"\n [events]=\"this.events\"\n [mode]=\"this.mode\"\n ></hvy-action-parameter>\n </div>\n @if (!readonly) {\n <button class=\"a-btn a-btn--icon-only\" (click)=\"openModal(action, idx)\" [disabled]=\"editing\">\n <pry-icon iconSvg=\"more_horiz\" #menuButton></pry-icon>\n </button>\n }\n } @else {\n <div class=\"o-hvy-events-detail__procedure__actions__action__create\">\n <div class=\"o-hvy-events-detail__procedure__actions__action__create__header\">\n <p>{{ '@hvy.procedure.action.' + action._status | i18n }}</p>\n <button class=\"a-btn a-btn--icon-only\" (click)=\"saveAction(action, idx)\" [disabled]=\"!isValid(action)\">\n <pry-icon iconSvg=\"check\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelAction(action, idx)\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div>\n <pry-select\n [ngModel]=\"action.type\"\n [items]=\"ACTIONS_TYPES\"\n (ngModelChange)=\"update(idx, 'type', $event)\"\n i18nPrefix=\"@hvy.procedure.action.\"\n [placeholder]=\"'@hvy.procedure.action.placeholder.action' | i18n\"\n ></pry-select>\n </div>\n <hvy-action-parameter\n [action]=\"action\"\n [type]=\"action.type\"\n [isParam]=\"true\"\n [events]=\"this.events\"\n [mode]=\"this.mode\"\n ></hvy-action-parameter>\n </div>\n }\n </div>\n <hvy-comments\n [lastComment]=\"action.lastComment\"\n [commentCount]=\"action.commentsCount\"\n [objectId]=\"action.id\"\n [readonly]=\"
|
|
1525
|
-
}], ctorParameters: () => [{ type: i1$3.PryDialogService }, { type: i2.Overlay }, { type: HypCommentsService }], propDecorators: { modified: [{
|
|
1658
|
+
args: [{ selector: 'hvy-procedure-actions', template: "<div\n class=\"o-hvy-events-detail__procedure__actions\"\n (drag)=\"move($event)\"\n (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\"\n>\n @for (action of actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"isDraggable(action) && !readonly\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n [class.-updating]=\"!!action._status\"\n [class.-other-updating]=\"editing\"\n >\n <div class=\"o-hvy-events-detail__procedure__actions__action__header\">\n @if (this.enableEditActions) {\n <pry-icon\n iconSvg=\"six_dot\"\n #handle\n [class.-disabled]=\"!isDraggable(action)\"\n [class.-hidden]=\"action._status || readonly\"\n class=\"grabbable\"\n ></pry-icon>\n }\n <div class=\"number-badge\">{{ idx + 1 }}</div>\n @if (!action._status || readonly) {\n @if (mode === 'procedure') {\n <pry-checkbox\n [ngModel]=\"action.status !== 'NEW'\"\n (click)=\"toggleActionStatus(idx, $event, action.status === 'DONE' || (readonly ?? false))\"\n [disabled]=\"action.status === 'DONE' || (readonly ?? false)\"\n [class.-disabled]=\"action.status === 'DONE' || (readonly ?? false)\"\n [title]=\"'@hvy.procedure.checkbox.' + action.status | i18n\"\n ></pry-checkbox>\n }\n <div [class.-done]=\"action.status === 'DONE'\" [class.-disabled]=\"editing\">\n <hvy-action-parameter\n [action]=\"action\"\n [type]=\"action.type\"\n [isParam]=\"false\"\n [events]=\"this.events\"\n [mode]=\"this.mode\"\n [readonly]=\"readonly\"\n ></hvy-action-parameter>\n </div>\n @if (!readonly) {\n <button class=\"a-btn a-btn--icon-only\" (click)=\"openModal(action, idx)\" [disabled]=\"editing\">\n <pry-icon iconSvg=\"more_horiz\" #menuButton></pry-icon>\n </button>\n }\n } @else {\n <div class=\"o-hvy-events-detail__procedure__actions__action__create\">\n <div class=\"o-hvy-events-detail__procedure__actions__action__create__header\">\n <p>{{ '@hvy.procedure.action.' + action._status | i18n }}</p>\n <button class=\"a-btn a-btn--icon-only\" (click)=\"saveAction(action, idx)\" [disabled]=\"!isValid(action)\">\n <pry-icon iconSvg=\"check\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelAction(action, idx)\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n <div>\n <pry-select\n [ngModel]=\"action.type\"\n [items]=\"ACTIONS_TYPES\"\n (ngModelChange)=\"update(idx, 'type', $event)\"\n i18nPrefix=\"@hvy.procedure.action.\"\n [placeholder]=\"'@hvy.procedure.action.placeholder.action' | i18n\"\n ></pry-select>\n </div>\n <hvy-action-parameter\n [action]=\"action\"\n [type]=\"action.type\"\n [isParam]=\"true\"\n [events]=\"this.events\"\n [mode]=\"this.mode\"\n ></hvy-action-parameter>\n </div>\n }\n </div>\n <hvy-comments\n [lastComment]=\"action.lastComment\"\n [commentCount]=\"action.commentsCount\"\n [objectId]=\"action.id\"\n [readonly]=\"readOnlyComment\"\n (commented)=\"updateComment(action, $event)\"\n [type]=\"'actions'\"\n [trigger]=\"triggers[action.id]\"\n [displayEmpty]=\"false\"\n [me]=\"me\"\n ></hvy-comments>\n </div>\n } @empty {\n @if (actions.length === 0) {\n <div>{{ '@hvy.event.log.procedure.noAction' | i18n }}</div>\n }\n }\n @if (!readonly && enableEditActions) {\n <div class=\"o-hvy-events-detail__procedure__button\">\n <button class=\"a-btn a-btn--primary\" (click)=\"add()\" [disabled]=\"editing\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.procedure.action.add' | i18n }}\n </button>\n </div>\n }\n</div>\n" }]
|
|
1659
|
+
}], ctorParameters: () => [{ type: i1$3.PryDialogService }, { type: i2.Overlay }, { type: HypCommentsService }, { type: ServiceService }], propDecorators: { modified: [{
|
|
1526
1660
|
type: Output
|
|
1527
1661
|
}], commented: [{
|
|
1528
1662
|
type: Output
|
|
@@ -1532,6 +1666,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
1532
1666
|
type: Input
|
|
1533
1667
|
}], readonly: [{
|
|
1534
1668
|
type: Input
|
|
1669
|
+
}], readOnlyComment: [{
|
|
1670
|
+
type: Input
|
|
1535
1671
|
}], enableEditActions: [{
|
|
1536
1672
|
type: Input
|
|
1537
1673
|
}], events: [{
|
|
@@ -1541,6 +1677,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
1541
1677
|
args: ['menuButton', { read: ElementRef }]
|
|
1542
1678
|
}], actions: [{
|
|
1543
1679
|
type: Input
|
|
1680
|
+
}], refreshActions: [{
|
|
1681
|
+
type: Output
|
|
1544
1682
|
}] } });
|
|
1545
1683
|
|
|
1546
1684
|
class ForDatetimeLocalPipe {
|
|
@@ -1564,11 +1702,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
1564
1702
|
}]
|
|
1565
1703
|
}], ctorParameters: () => [] });
|
|
1566
1704
|
|
|
1705
|
+
const EVENT_DETAIL_ACCESS_FN = {
|
|
1706
|
+
value: (event, component) => {
|
|
1707
|
+
const readonly = component.readonly ||
|
|
1708
|
+
event.status === 'DONE' ||
|
|
1709
|
+
(['LIMIT', 'OUTOFORDER', 'ANOMALY'].includes(event.category) && event.externalSourceRef !== 'Hyperviseur');
|
|
1710
|
+
return {
|
|
1711
|
+
name: readonly,
|
|
1712
|
+
category: readonly,
|
|
1713
|
+
subCategory: readonly,
|
|
1714
|
+
criticality: readonly,
|
|
1715
|
+
description: readonly,
|
|
1716
|
+
address: readonly,
|
|
1717
|
+
source: true,
|
|
1718
|
+
domain: readonly,
|
|
1719
|
+
eqName: readonly,
|
|
1720
|
+
eqEntity: readonly,
|
|
1721
|
+
startDate: readonly,
|
|
1722
|
+
endDate: readonly,
|
|
1723
|
+
parent: component.readonly || event.status === 'DONE'
|
|
1724
|
+
};
|
|
1725
|
+
}
|
|
1726
|
+
};
|
|
1567
1727
|
class EventDetailComponent extends SubscriptionnerDirective {
|
|
1728
|
+
set me(me) {
|
|
1729
|
+
this.profile = me;
|
|
1730
|
+
this.setCreatorForEvents();
|
|
1731
|
+
}
|
|
1568
1732
|
set events(events) {
|
|
1569
1733
|
this._events = events.filter((ev) => !!ev);
|
|
1570
1734
|
this.eventModifications = new Array(this._events.length);
|
|
1571
|
-
|
|
1735
|
+
if (this._events.length === 1) {
|
|
1736
|
+
this.opened = [true];
|
|
1737
|
+
}
|
|
1572
1738
|
this.canCloseSome = this._events.filter((ev) => ev.status !== 'DONE').length > 0;
|
|
1573
1739
|
this._events.forEach((ev, idx) => {
|
|
1574
1740
|
this.onEquipmentSearch$.next(idx);
|
|
@@ -1585,22 +1751,65 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1585
1751
|
}, idx);
|
|
1586
1752
|
}
|
|
1587
1753
|
});
|
|
1754
|
+
this.setCreatorForEvents();
|
|
1588
1755
|
}
|
|
1589
1756
|
set procedure(procedure) {
|
|
1590
1757
|
this._procedure = procedure;
|
|
1591
1758
|
this.procedureModifications = {};
|
|
1592
1759
|
}
|
|
1593
1760
|
set cancelModifications(evt) {
|
|
1761
|
+
this.equipmentSelectValue = this.equipmentSelectValue.map((equipment, index) => {
|
|
1762
|
+
const initialEquipment = this._events[index].equipment;
|
|
1763
|
+
if (initialEquipment) {
|
|
1764
|
+
const regex = this.getComboBoxRegExp(initialEquipment.name);
|
|
1765
|
+
const html = `${initialEquipment.name} - ${this.i18nService.instant('@hvy.event.family.' + initialEquipment.family)}`;
|
|
1766
|
+
return {
|
|
1767
|
+
...initialEquipment,
|
|
1768
|
+
html: html.replaceAll(regex, (matched, capture1) => `<b>${capture1}</b>`),
|
|
1769
|
+
displayName: html
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
else {
|
|
1773
|
+
return undefined;
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1776
|
+
this.eventSelectValue = this.eventSelectValue.map((eventParent, index) => {
|
|
1777
|
+
const initialParent = this._events[index].parent;
|
|
1778
|
+
if (initialParent) {
|
|
1779
|
+
const regex = this.getComboBoxRegExp(initialParent.name);
|
|
1780
|
+
const html = `${padId.fn(initialParent.id)} - ${initialParent.name}`;
|
|
1781
|
+
return {
|
|
1782
|
+
...initialParent,
|
|
1783
|
+
html: html.replaceAll(regex, (matched, capture1) => `<b>${capture1}</b>`),
|
|
1784
|
+
displayName: html
|
|
1785
|
+
};
|
|
1786
|
+
}
|
|
1787
|
+
else {
|
|
1788
|
+
return undefined;
|
|
1789
|
+
}
|
|
1790
|
+
});
|
|
1594
1791
|
this.eventModifications = new Array(this._events.length);
|
|
1595
1792
|
this.procedureModifications = {};
|
|
1596
1793
|
this._outputModifications();
|
|
1597
1794
|
}
|
|
1598
1795
|
set equipmentName(request) {
|
|
1599
1796
|
if (request.equipmentName) {
|
|
1600
|
-
|
|
1797
|
+
const ind = request.equipmentName.lastIndexOf('-');
|
|
1798
|
+
const equipName = request.equipmentName.slice(0, ind - 1).toUpperCase();
|
|
1799
|
+
this.equipmentService.findByName(equipName).subscribe((result) => {
|
|
1800
|
+
const equip = {
|
|
1801
|
+
id: result.id,
|
|
1802
|
+
name: result.name,
|
|
1803
|
+
entity: result.entity,
|
|
1804
|
+
family: result.family,
|
|
1805
|
+
domain: result.domain,
|
|
1806
|
+
displayName: request.equipmentName
|
|
1807
|
+
};
|
|
1808
|
+
this.selectedEquipmentChange(equip, request.index);
|
|
1809
|
+
});
|
|
1601
1810
|
}
|
|
1602
1811
|
}
|
|
1603
|
-
constructor(equipmentService, store, overlay, viewContainerRef, i18nService, pryDialog, commentsService, eventService) {
|
|
1812
|
+
constructor(equipmentService, store, overlay, viewContainerRef, i18nService, pryDialog, commentsService, eventService, actions$) {
|
|
1604
1813
|
super();
|
|
1605
1814
|
this.equipmentService = equipmentService;
|
|
1606
1815
|
this.store = store;
|
|
@@ -1610,6 +1819,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1610
1819
|
this.pryDialog = pryDialog;
|
|
1611
1820
|
this.commentsService = commentsService;
|
|
1612
1821
|
this.eventService = eventService;
|
|
1822
|
+
this.actions$ = actions$;
|
|
1613
1823
|
this.opened = [];
|
|
1614
1824
|
this.criticalities = HypEventCriticality.values;
|
|
1615
1825
|
this._events = [];
|
|
@@ -1631,32 +1841,77 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1631
1841
|
this.readonly = false;
|
|
1632
1842
|
this.readonlyProcedure = false;
|
|
1633
1843
|
this.enableEditActions = false;
|
|
1844
|
+
this.readOnlyComment = false;
|
|
1634
1845
|
this.comfirmDialogOpened = new EventEmitter();
|
|
1635
|
-
this.triggerComment$ = new BehaviorSubject(undefined);
|
|
1636
1846
|
this.onEquipmentSearch$ = new Subject();
|
|
1637
1847
|
this.equipmentSelectValue = [];
|
|
1638
1848
|
this.onEventSearch$ = new Subject();
|
|
1639
1849
|
this.eventSelectValue = [];
|
|
1640
1850
|
this.commented = new EventEmitter();
|
|
1851
|
+
this.profile = null;
|
|
1852
|
+
this.selectedEquipment = false;
|
|
1641
1853
|
this.padId = padId;
|
|
1642
1854
|
this.subCategories = [undefined, ...HypEventSubCategory.values['ANOMALY']];
|
|
1643
1855
|
this.equipmentsEvents = [];
|
|
1856
|
+
this.subscriptions.add(this.actions$.pipe(ofType(EventActions.status), delay(1000)).subscribe({
|
|
1857
|
+
next: (result) => {
|
|
1858
|
+
if (result.event && result.event.id) {
|
|
1859
|
+
this.eventService.get(result.event.id).subscribe((event) => {
|
|
1860
|
+
this.commentsService.get(result.event.id, 'events').subscribe((comments) => {
|
|
1861
|
+
this.commented.next([{ event, comments }]);
|
|
1862
|
+
});
|
|
1863
|
+
});
|
|
1864
|
+
}
|
|
1865
|
+
else if (result.procedure && result.targetStatus === 'DONE') {
|
|
1866
|
+
this.store
|
|
1867
|
+
.select(EventSelectors.details)
|
|
1868
|
+
.pipe(take(1))
|
|
1869
|
+
.subscribe((details) => {
|
|
1870
|
+
if (details.procedure && details.procedure.events) {
|
|
1871
|
+
this.canCloseSome = !!details.procedure.events.find((event) => event.status !== 'DONE');
|
|
1872
|
+
if (!this.canCloseSome) {
|
|
1873
|
+
this._events.forEach((event) => {
|
|
1874
|
+
event.status = 'DONE';
|
|
1875
|
+
});
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
}));
|
|
1644
1882
|
this.store.dispatch(EventActions.select({ ids: [], cumulative: false }));
|
|
1645
1883
|
this.equipments$ = this.onEquipmentSearch$.pipe(switchMap((index) => {
|
|
1646
|
-
|
|
1647
|
-
this.equipmentSelectValue[index]
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
const
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1884
|
+
if (this.equipmentSelectValue[index] === undefined) {
|
|
1885
|
+
this.equipmentSelectValue[index] = '';
|
|
1886
|
+
}
|
|
1887
|
+
let search;
|
|
1888
|
+
if (typeof this.equipmentSelectValue[index] === 'string' &&
|
|
1889
|
+
this.equipmentSelectValue[index].length > 2) {
|
|
1890
|
+
const equipValue = this.equipmentSelectValue[index];
|
|
1891
|
+
const firstIndex = equipValue.indexOf('-');
|
|
1892
|
+
const lastIndex = equipValue.lastIndexOf('-');
|
|
1893
|
+
if (firstIndex !== -1 && lastIndex !== firstIndex) {
|
|
1894
|
+
search = equipValue.substring(0, lastIndex - 1);
|
|
1895
|
+
}
|
|
1896
|
+
else {
|
|
1897
|
+
search = equipValue;
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
else {
|
|
1901
|
+
search = this.equipmentSelectValue[index].name;
|
|
1902
|
+
}
|
|
1903
|
+
return this.equipmentService.search(search).pipe(map$1((equipments) => {
|
|
1904
|
+
equipments = this.filterEquipmentsIfSelected(index, search, equipments);
|
|
1905
|
+
return equipments.map((equipment) => {
|
|
1906
|
+
const regex = this.getComboBoxRegExp(search);
|
|
1907
|
+
const html = `${equipment.name} - ${this.i18nService.instant('@hvy.event.family.' + equipment.family)}`;
|
|
1908
|
+
return {
|
|
1909
|
+
...equipment,
|
|
1910
|
+
html: html.replaceAll(regex, (matched, capture1) => `<b>${capture1}</b>`),
|
|
1911
|
+
displayName: html
|
|
1912
|
+
};
|
|
1913
|
+
});
|
|
1914
|
+
}));
|
|
1660
1915
|
}), catchError(() => throwError(() => new Error('Search Equipment problem'))), shareReplay());
|
|
1661
1916
|
this.events$ = this.onEventSearch$.pipe(startWith(), debounceTime(500)).pipe(switchMap((index) => {
|
|
1662
1917
|
const search = typeof this.eventSelectValue[index] === 'string' && this.eventSelectValue[index].length > 2
|
|
@@ -1666,7 +1921,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1666
1921
|
? padId.fn(this.eventSelectValue[index].id)
|
|
1667
1922
|
: undefined;
|
|
1668
1923
|
return this.eventService.search(search, ['name', 'id']).pipe(map$1((events) => events.map((event) => {
|
|
1669
|
-
const regex =
|
|
1924
|
+
const regex = this.getComboBoxRegExp(search);
|
|
1670
1925
|
const html = `${padId.fn(event.id)} - ${event.name}`;
|
|
1671
1926
|
return {
|
|
1672
1927
|
...event,
|
|
@@ -1678,11 +1933,81 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1678
1933
|
return throwError(() => new Error('Search Equipment problem'));
|
|
1679
1934
|
}), shareReplay());
|
|
1680
1935
|
}
|
|
1936
|
+
setCreatorForEvents() {
|
|
1937
|
+
this._events = this._events.map((eve) => {
|
|
1938
|
+
return {
|
|
1939
|
+
...eve,
|
|
1940
|
+
creator: eve.creator
|
|
1941
|
+
? eve.creator
|
|
1942
|
+
: eve.externalSourceRef === 'Hyperviseur'
|
|
1943
|
+
? this.profile?.userName
|
|
1944
|
+
: '--'
|
|
1945
|
+
};
|
|
1946
|
+
});
|
|
1947
|
+
}
|
|
1948
|
+
getComboBoxRegExp(search) {
|
|
1949
|
+
return RegExp(`(${search})` ?? '(/-/-/)', 'gid');
|
|
1950
|
+
}
|
|
1951
|
+
filterEquipmentsIfSelected(index, search, equipments) {
|
|
1952
|
+
let name;
|
|
1953
|
+
let family;
|
|
1954
|
+
let selectedName;
|
|
1955
|
+
let selectedFamily;
|
|
1956
|
+
// create
|
|
1957
|
+
if (this.eventModifications[index] && this.eventModifications[index].equipment) {
|
|
1958
|
+
const equipment = this.eventModifications[index].equipment;
|
|
1959
|
+
name = equipment?.name;
|
|
1960
|
+
const displayName = equipment?.displayName;
|
|
1961
|
+
const ind = displayName?.lastIndexOf('-');
|
|
1962
|
+
family = displayName?.slice(ind + 2).toUpperCase();
|
|
1963
|
+
// update
|
|
1964
|
+
}
|
|
1965
|
+
else if (this._events && this._events[index] && this._events[index].equipment) {
|
|
1966
|
+
name = this._events[index].equipment.name;
|
|
1967
|
+
family = this._events[index].equipment.family;
|
|
1968
|
+
// le format family est de style EP_OUVRAGE ou EP_FOYER_LUMINEUX ou VP_CAM
|
|
1969
|
+
// pour pouvoir faire la comparaison, il faut enlever le préfixe
|
|
1970
|
+
const ind = family.indexOf('_');
|
|
1971
|
+
family = family.slice(ind + 1);
|
|
1972
|
+
family = family.replaceAll('_', ' ');
|
|
1973
|
+
// ici on remplace CAM par CAMÉRA car en cas de combo box ouverte puis fermée avec
|
|
1974
|
+
// un équipement sélectionné, la famille sera caméra et pas cam
|
|
1975
|
+
if (family === 'CAM') {
|
|
1976
|
+
family = 'CAMÉRA';
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
// équipement sélectionné 1 fois dans la combo box
|
|
1980
|
+
if (typeof this.equipmentSelectValue[index] === 'object') {
|
|
1981
|
+
const selectedEquipment = this.equipmentSelectValue[index];
|
|
1982
|
+
selectedName = selectedEquipment.name;
|
|
1983
|
+
const displayName = selectedEquipment.displayName;
|
|
1984
|
+
const ind = displayName.lastIndexOf('-');
|
|
1985
|
+
selectedFamily = displayName?.slice(ind + 2).toUpperCase();
|
|
1986
|
+
// combo box ouverte puis fermée avec un équipement sélectionné
|
|
1987
|
+
}
|
|
1988
|
+
else if (typeof this.equipmentSelectValue[index] === 'string') {
|
|
1989
|
+
let fullName = this.equipmentSelectValue[index];
|
|
1990
|
+
const ind = fullName.lastIndexOf('-');
|
|
1991
|
+
selectedFamily = fullName.slice(ind + 2).toUpperCase();
|
|
1992
|
+
selectedName = fullName.slice(0, ind - 1).toUpperCase();
|
|
1993
|
+
}
|
|
1994
|
+
if (selectedName === name && selectedFamily === family) {
|
|
1995
|
+
equipments = equipments.filter((equip) => equip.name === search);
|
|
1996
|
+
this.selectedEquipment = true;
|
|
1997
|
+
}
|
|
1998
|
+
else {
|
|
1999
|
+
this.selectedEquipment = false;
|
|
2000
|
+
}
|
|
2001
|
+
return equipments;
|
|
2002
|
+
}
|
|
2003
|
+
get me() {
|
|
2004
|
+
return this.profile;
|
|
2005
|
+
}
|
|
1681
2006
|
get events() {
|
|
1682
2007
|
return this._events.map((evt, idx) => ({ ...evt, ...(this.eventModifications[idx] ?? {}) }));
|
|
1683
2008
|
}
|
|
1684
2009
|
get canAssociateProcedure() {
|
|
1685
|
-
return this._events.every((evt) => evt.status === 'NEW');
|
|
2010
|
+
return this._events.every((evt) => evt.status === 'NEW' && evt.id !== -1);
|
|
1686
2011
|
}
|
|
1687
2012
|
get procedure() {
|
|
1688
2013
|
return this._procedure
|
|
@@ -1700,6 +2025,13 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1700
2025
|
this.opened[i] = !this.opened[i];
|
|
1701
2026
|
}
|
|
1702
2027
|
modifyEvent(index, prop, $event) {
|
|
2028
|
+
this.eventModifications[index] = this.eventModifications[index] ?? {};
|
|
2029
|
+
if (prop === 'category') {
|
|
2030
|
+
delete this.eventModifications[index].subCategory;
|
|
2031
|
+
if ($event === 'ANOMALY') {
|
|
2032
|
+
this.eventModifications[index].subCategory = 'NONE';
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
1703
2035
|
const isDate = prop.indexOf('Date') > -1;
|
|
1704
2036
|
// @ts-ignore
|
|
1705
2037
|
const newValue = $event instanceof Event ? $event.target?.value : $event;
|
|
@@ -1725,24 +2057,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1725
2057
|
}
|
|
1726
2058
|
}
|
|
1727
2059
|
access(event) {
|
|
1728
|
-
|
|
1729
|
-
event.status === 'DONE' ||
|
|
1730
|
-
(['LIMIT', 'OUTOFORDER', 'ANOMALY'].includes(event.category) && event.externalSourceRef !== 'Hyperviseur');
|
|
1731
|
-
return {
|
|
1732
|
-
name: readonly,
|
|
1733
|
-
category: readonly,
|
|
1734
|
-
subCategory: readonly,
|
|
1735
|
-
criticality: readonly,
|
|
1736
|
-
description: readonly,
|
|
1737
|
-
address: readonly,
|
|
1738
|
-
source: true,
|
|
1739
|
-
domain: readonly,
|
|
1740
|
-
eqName: readonly,
|
|
1741
|
-
eqEntity: readonly,
|
|
1742
|
-
startDate: readonly,
|
|
1743
|
-
endDate: readonly,
|
|
1744
|
-
parent: this.readonly || event.status === 'DONE'
|
|
1745
|
-
};
|
|
2060
|
+
return EVENT_DETAIL_ACCESS_FN.value(event, this);
|
|
1746
2061
|
}
|
|
1747
2062
|
_outputModifications() {
|
|
1748
2063
|
this.validateEvents(this.events);
|
|
@@ -1753,7 +2068,8 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1753
2068
|
this.errors = [];
|
|
1754
2069
|
events.forEach((event, idx) => {
|
|
1755
2070
|
const eventErrors = [];
|
|
1756
|
-
|
|
2071
|
+
const regex = new RegExp(/^\s+$/);
|
|
2072
|
+
if (!event.name || event.name.length === 0 || regex.test(event.name)) {
|
|
1757
2073
|
eventErrors.push({ field: 'name', code: 'required' });
|
|
1758
2074
|
}
|
|
1759
2075
|
if (!event.category || event.category.length === 0) {
|
|
@@ -1762,24 +2078,30 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1762
2078
|
if (!event.criticality || event.criticality.length === 0) {
|
|
1763
2079
|
eventErrors.push({ field: 'criticality', code: 'required' });
|
|
1764
2080
|
}
|
|
1765
|
-
if (!event.description || event.description.length === 0) {
|
|
2081
|
+
if (!event.description || event.description.length === 0 || regex.test(event.description)) {
|
|
1766
2082
|
eventErrors.push({ field: 'description', code: 'required' });
|
|
1767
2083
|
}
|
|
1768
2084
|
const equipment = event.equipment;
|
|
1769
2085
|
if (!!equipment) {
|
|
1770
2086
|
const equipmentName = `${equipment.name} - ${this.i18nService.instant('@hvy.event.family.' + equipment.family)}`;
|
|
2087
|
+
const selectedEquipmentName = this.equipmentSelectValue[idx]?.displayName
|
|
2088
|
+
? this.equipmentSelectValue[idx].displayName
|
|
2089
|
+
: this.equipmentSelectValue[idx];
|
|
1771
2090
|
if (!!this.equipmentSelectValue[idx] &&
|
|
1772
2091
|
// @ts-ignore
|
|
1773
|
-
equipmentName !==
|
|
2092
|
+
equipmentName !== selectedEquipmentName) {
|
|
1774
2093
|
eventErrors.push({ field: 'equipment', code: 'not-found' });
|
|
1775
2094
|
}
|
|
1776
2095
|
}
|
|
1777
2096
|
const parent = event.parent;
|
|
1778
2097
|
if (parent) {
|
|
1779
2098
|
const parentName = `${padId.fn(event.parent?.id ?? '')} - ${event.parent?.name}`;
|
|
2099
|
+
const selectedParentName = this.eventSelectValue[idx]?.displayName
|
|
2100
|
+
? this.eventSelectValue[idx].displayName
|
|
2101
|
+
: this.eventSelectValue[idx];
|
|
1780
2102
|
if (!!this.eventSelectValue[idx] &&
|
|
1781
2103
|
// @ts-ignore
|
|
1782
|
-
parentName !==
|
|
2104
|
+
parentName !== selectedParentName) {
|
|
1783
2105
|
eventErrors.push({ field: 'parent', code: 'not-found' });
|
|
1784
2106
|
}
|
|
1785
2107
|
}
|
|
@@ -1795,6 +2117,12 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1795
2117
|
eventErrors.push({ field: 'endDate', code: 'after' });
|
|
1796
2118
|
}
|
|
1797
2119
|
}
|
|
2120
|
+
else {
|
|
2121
|
+
if (event.startDate && event.endDate && event.startDate.localeCompare(event.endDate) > 0) {
|
|
2122
|
+
eventErrors.push({ field: 'startDate', code: 'before' });
|
|
2123
|
+
eventErrors.push({ field: 'endDate', code: 'after' });
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
1798
2126
|
this.errors.push(eventErrors);
|
|
1799
2127
|
});
|
|
1800
2128
|
this.eventErrors.next(this.errors);
|
|
@@ -1881,6 +2209,14 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1881
2209
|
}
|
|
1882
2210
|
this._outputModifications();
|
|
1883
2211
|
}
|
|
2212
|
+
refreshActions($event) {
|
|
2213
|
+
if (this.procedure && this.procedure.actions) {
|
|
2214
|
+
this.procedure = {
|
|
2215
|
+
...this.procedure,
|
|
2216
|
+
actions: $event
|
|
2217
|
+
};
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
1884
2220
|
openAssociationModal() {
|
|
1885
2221
|
const ref = this.pryDialog.open(ProcedureAssociationModalComponent, {
|
|
1886
2222
|
backdropClass: 'o-hvy-association-modal__backdrop'
|
|
@@ -1916,14 +2252,15 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1916
2252
|
});
|
|
1917
2253
|
}
|
|
1918
2254
|
convertDate(newValue) {
|
|
1919
|
-
return new Date(newValue).toISOString();
|
|
2255
|
+
return newValue ? new Date(newValue).toISOString() : undefined;
|
|
1920
2256
|
}
|
|
1921
2257
|
selectedEquipmentChange($event, index) {
|
|
1922
2258
|
this.equipmentSelectValue[index] = $event;
|
|
1923
2259
|
this.onEquipmentSearch$.next(index);
|
|
1924
2260
|
if (typeof $event === 'object' || $event === '') {
|
|
1925
2261
|
const equipmentForEvent = $event !== '' ? $event : undefined;
|
|
1926
|
-
if (
|
|
2262
|
+
if ((!!this._events[index].equipment && !equipmentForEvent) ||
|
|
2263
|
+
this._events[index].equipment?.name !== equipmentForEvent?.name) {
|
|
1927
2264
|
if (!this.eventModifications[index]) {
|
|
1928
2265
|
this.eventModifications[index] = {};
|
|
1929
2266
|
}
|
|
@@ -1943,7 +2280,15 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1943
2280
|
}
|
|
1944
2281
|
this.populateEquipment(equipmentForEvent, index);
|
|
1945
2282
|
}
|
|
1946
|
-
else {
|
|
2283
|
+
else if (!!$event && !this.equipmentsEvents[index]?.events) {
|
|
2284
|
+
const firstIndex = $event.indexOf('-');
|
|
2285
|
+
const lastIndex = $event.lastIndexOf('-');
|
|
2286
|
+
if (firstIndex !== -1 && lastIndex !== firstIndex) {
|
|
2287
|
+
const name = $event.substring(0, lastIndex - 1);
|
|
2288
|
+
this.populateEquipment({ name }, index);
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
else if (!$event) {
|
|
1947
2292
|
this.populateEquipment(undefined, index);
|
|
1948
2293
|
this._outputModifications();
|
|
1949
2294
|
}
|
|
@@ -1981,6 +2326,9 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1981
2326
|
])
|
|
1982
2327
|
}
|
|
1983
2328
|
});
|
|
2329
|
+
this.tooltipRef.closeValue.pipe(take(1)).subscribe((value) => {
|
|
2330
|
+
this.tooltipRef = undefined;
|
|
2331
|
+
});
|
|
1984
2332
|
}
|
|
1985
2333
|
else {
|
|
1986
2334
|
this.tooltipRef.close();
|
|
@@ -2033,18 +2381,37 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
2033
2381
|
}
|
|
2034
2382
|
updateComment(event, comment) {
|
|
2035
2383
|
this.commentsService.save(event.id, 'events', comment).subscribe(() => {
|
|
2036
|
-
|
|
2037
|
-
|
|
2384
|
+
let eventsAndComments = [];
|
|
2385
|
+
let comments$ = [];
|
|
2386
|
+
for (let index = 0; index < this._events.length; index++) {
|
|
2387
|
+
comments$.push(this.commentsService.get(this._events[index].id, 'events'));
|
|
2388
|
+
}
|
|
2389
|
+
zip(comments$)
|
|
2390
|
+
.pipe(take(1))
|
|
2391
|
+
.subscribe({
|
|
2392
|
+
next: (commentsArray) => {
|
|
2393
|
+
commentsArray.forEach((comments, index) => {
|
|
2394
|
+
eventsAndComments.push({ event: this._events[index], comments: comments });
|
|
2395
|
+
});
|
|
2396
|
+
},
|
|
2397
|
+
complete: () => {
|
|
2398
|
+
this.commented.next(eventsAndComments);
|
|
2399
|
+
}
|
|
2038
2400
|
});
|
|
2039
2401
|
});
|
|
2040
2402
|
}
|
|
2041
|
-
|
|
2042
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: EventDetailComponent, selector: "hvy-event-detail", inputs: { title: "title", me: "me", readonly: "readonly", readonlyProcedure: "readonlyProcedure", enableEditActions: "enableEditActions", events: "events", procedure: "procedure", cancelModifications: "cancelModifications", equipmentName: "equipmentName" }, outputs: { modifiedEvents: "modifiedEvents", modifiedProcedure: "modifiedProcedure", eventErrors: "eventErrors", addedEvent: "addedEvent", comfirmDialogOpened: "comfirmDialogOpened", commented: "commented" }, viewQueries: [{ propertyName: "confirmDialog", first: true, predicate: ["confirmDialog"], descendants: true, read: TemplateRef }, { propertyName: "detailHoverIcon", predicate: ["detailHoverIcon"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-events-detail\">\n <div class=\"o-hvy-events-detail__header\">\n <div class=\"o-hvy-events-detail__header__split\">\n <h1>{{ title ?? '@hvy.event.detail' | i18n }}</h1>\n @if (procedure && canCloseSome) {\n <button class=\"add-button\" [disabled]=\"readonly\" (click)=\"addOneEvent()\">\n <pry-icon iconSvg=\"add\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n }\n @if (events.length > 1) {\n @if (canCloseSome && !readonly) {\n <button class=\"a-btn a-btn--secondary -fix-right\" [disabled]=\"!canCloseSome\" (click)=\"closeAll()\">\n {{ (canCloseSome ? '@hvy.event.log.event.close' : '@hvy.event.log.event.closed') | i18n }}\n </button>\n }\n @if (!canCloseSome && closeComment && closeComment.length > 0) {\n <div class=\"a-tooltip\" [attr.data-tooltip]=\"closeComment\" data-tooltip-position=\"right\">\n <pry-icon iconSvg=\"i\" [height]=\"18\" [width]=\"18\">i</pry-icon>\n </div>\n }\n }\n </div>\n <div class=\"o-hvy-events-detail__header__split\">\n @if (procedure && !readonly) {\n <button class=\"a-btn a-btn--secondary\" (click)=\"openDeleteModal()\" [disabled]=\"readonlyProcedure\">\n {{ '@hvy.event.log.procedure.delete' | i18n }}\n </button>\n }\n </div>\n </div>\n <div class=\"o-hvy-events-detail__container\">\n <div class=\"o-hvy-events-detail__container__scrollable\">\n <div class=\"o-hvy-events-detail__events\">\n @for (event of events; track event.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__events__event\">\n <div class=\"o-hvy-events-detail__events__event__header\">\n <pry-icon\n iconSvg=\"arrow_down_rounded\"\n [class.-rotated]=\"opened[idx]\"\n class=\"-hand\"\n (click)=\"toggle(idx)\"\n [width]=\"10\"\n [height]=\"10\"\n ></pry-icon>\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <h2>{{ event.name }}</h2>\n <div class=\"o-hvy-events-detail__events__event__header__comment\">\n @if (event.commentCount > 0) {\n <span>{{\n (event.commentCount > 1 ? '@hvy.event.comment.heads' : '@hvy.event.comment.head')\n | i18n: { nb: event.commentCount }\n }}</span>\n }\n </div>\n <hvy-status-display\n [item]=\"event\"\n [modifiable]=\"event.status !== 'DONE'\"\n [readonly]=\"readonly\"\n (modified)=\"changeStatus($event, event)\"\n ></hvy-status-display>\n </div>\n <div class=\"o-hvy-events-detail__events__event__content\">\n @if (!opened[idx]) {\n <div>{{ '@hvy.event.log.event.description' | i18n }} : {{ event.description }}</div>\n <div>{{ '@hvy.event.log.event.address' | i18n }} : {{ event.address }}</div>\n } @else {\n @if (access(event); as accessValue) {\n <div class=\"o-hvy-events-detail__events__event__content__header\">\n <h3>{{ '@hvy.event.log.event.detail' | i18n }}</h3>\n <span class=\"required\">{{ '@hvy.event.log.event.mandatory' | i18n }}</span>\n </div>\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.event.log.event.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('name', idx)\"\n [value]=\"event.name\"\n (change)=\"modifyEvent(idx, 'name', $event)\"\n [readonly]=\"accessValue.name\"\n [maxLength]=\"50\"\n />\n </td>\n <td></td>\n </tr>\n @if (event.id > 0) {\n <tr>\n <td>{{ '@hvy.event.log.event.id' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"padId.fn(event.id)\" [readonly]=\"true\" />\n </td>\n <td></td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.log.event.category' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [ngModel]=\"event.category\"\n [items]=\"categories(event)\"\n [class.-error]=\"hasError('category', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'category', $event)\"\n i18nPrefix=\"@hvy.event.category.\"\n [disabled]=\"accessValue.category\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n @if (event.category === 'ANOMALY') {\n <tr>\n <td>{{ '@hvy.event.subCategory.name' | i18n }} :</td>\n <td>\n <pry-select\n [ngModel]=\"event.subCategory\"\n [items]=\"subCategories\"\n [class.-error]=\"hasError('subCategory', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'subCategory', $event)\"\n i18nPrefix=\"@hvy.event.subCategory.\"\n [disabled]=\"accessValue.subCategory\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.criticality.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [ngModel]=\"event.criticality\"\n [items]=\"criticalities\"\n [class.-error]=\"hasError('criticality', idx)\"\n i18nPrefix=\"@hvy.event.criticality.\"\n [disabled]=\"accessValue.criticality\"\n (ngModelChange)=\"modifyEvent(idx, 'criticality', $event)\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n\n <tr>\n <td>{{ '@hvy.event.log.event.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"event.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description', idx)\"\n [readonly]=\"accessValue.description\"\n (ngModelChange)=\"modifyEvent(idx, 'description', $event)\"\n [maxLength]=\"256\"\n ></textarea>\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.address' | i18n }} :</td>\n <td>\n <textarea\n [ngModel]=\"event.address\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('address', idx)\"\n [readonly]=\"accessValue.address\"\n (ngModelChange)=\"modifyEvent(idx, 'address', $event)\"\n [maxLength]=\"256\"\n ></textarea>\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.source' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.externalSourceRef ?? ('@hvy.event.hypervisor' | i18n)\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\"\n (change)=\"modifyEvent(idx, 'source', $event)\"\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"equipments$ | async\"\n bindLabel=\"displayName\"\n [ngModel]=\"equipmentSelectValue[idx]\"\n (ngModelChange)=\"selectedEquipmentChange($event, idx)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.event.equipmentPlaceholder' | i18n\"\n id=\"procedure-filter\"\n [template]=\"templateOption\"\n [class.-error]=\"hasError('equipment', idx)\"\n [disabled]=\"accessValue.eqName\"\n class=\"o-hvy-events-detail__events__event__content__equipment\"\n ></pry-select>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </td>\n <td>\n @if (\n equipmentsEvents[idx] && (equipmentsEvents[idx].events || equipmentsEvents[idx].services)\n ) {\n <pry-icon\n iconSvg=\"i\"\n class=\"-hand\"\n #detailHoverIcon\n (mouseenter)=\"toggleDetailsTooltip(idx)\"\n (mouseleave)=\"toggleDetailsTooltip(idx)\"\n [width]=\"18\"\n [height]=\"18\"\n ></pry-icon>\n }\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.equipmentEntity' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('equipment', idx)\"\n [value]=\"\n (event.equipment?.entity ? '@hvy.event.entity.' + event.equipment?.entity : '') | i18n\n \"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"event.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'domain', $event)\"\n [disabled]=\"accessValue.domain\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.parentEvent.name' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"events$ | async\"\n bindLabel=\"displayName\"\n [ngModel]=\"eventSelectValue[idx]\"\n (ngModelChange)=\"selectedParentChange($event, idx)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.event.parentEvent.placeholder' | i18n\"\n id=\"parent\"\n [template]=\"templateParent\"\n [disabled]=\"accessValue.parent\"\n [class.-error]=\"hasError('parent', idx)\"\n class=\"o-hvy-events-detail__events__event__content__equipment\"\n ></pry-select>\n <ng-template #templateParent let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </td>\n <td></td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.startDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n :\n </td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.startDate | forDateTimeLocal\"\n [class.-error]=\"hasError('startDate', idx)\"\n [readonly]=\"accessValue.startDate\"\n (change)=\"modifyEvent(idx, 'startDate', $event)\"\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.endDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n :\n </td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.endDate | forDateTimeLocal\"\n [class.-error]=\"hasError('endDate', idx)\"\n [readonly]=\"accessValue.endDate\"\n (change)=\"modifyEvent(idx, 'endDate', $event)\"\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.closeDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n </tbody>\n </table>\n <hvy-comments\n [lastComment]=\"event.lastComment\"\n [commentCount]=\"event.commentCount\"\n (commented)=\"updateComment(event, $event)\"\n [readonly]=\"readonly\"\n [type]=\"'events'\"\n [me]=\"me\"\n [objectId]=\"event.id\"\n ></hvy-comments>\n }\n }\n </div>\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure\">\n <div class=\"o-hvy-events-detail__procedure__header\">\n <h2>\n {{ (events.length === 1 ? '@hvy.event.log.procedure.name1' : '@hvy.event.log.procedure.name') | i18n }}\n </h2>\n </div>\n @if (procedure) {\n <div class=\"o-hvy-events-detail__procedure__description\">\n <p>{{ procedure.description }}</p>\n </div>\n <div class=\"o-hvy-events-detail__procedure__progress\">\n <p>{{ '@hvy.event.log.procedure.progress' | i18n }}</p>\n <hvy-progress-display [progress]=\"calculatedProgress\"></hvy-progress-display>\n </div>\n <hvy-procedure-actions\n [readonly]=\"readonlyProcedure || readonly\"\n [enableEditActions]=\"enableEditActions\"\n [actions]=\"procedure.actions\"\n (modified)=\"modifiedActions($event)\"\n [me]=\"me\"\n [events]=\"this.events\"\n (commented)=\"actionCommented($event)\"\n ></hvy-procedure-actions>\n } @else {\n @if (!readonly) {\n <button class=\"a-btn a-btn--secondary\" [disabled]=\"!canAssociateProcedure\" (click)=\"openAssociationModal()\">\n {{ '@hvy.action.associate' | i18n }}\n </button>\n } @else {\n <span class=\"o-hvy-events-detail__procedure__empty\">{{ '@hvy.event.log.procedure.none' | i18n }}</span>\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #confirmDialog>\n <div\n class=\"o-hvy-close-confirm__dialog\"\n aria-labelledby=\"confirm\"\n tabindex=\"-1\"\n id=\"choice\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <h2>\n {{\n (changeStatusContext.events.length === 1 ? '@hvy.event.close.oneTitle' : '@hvy.event.close.multiTitle') | i18n\n }}\n </h2>\n <p>{{ (changeStatusContext.events.length === 1 ? '@hvy.event.close.one' : '@hvy.event.close.multi') | i18n }}</p>\n <ul>\n @for (event of changeStatusContext.events; track event.id) {\n <li>{{ event.name }}</li>\n }\n </ul>\n <p class=\"o-hvy-close-confirm__dialog__comment-title\">\n {{ '@hvy.event.close.comment' | i18n }}<span class=\"required\">*</span> :\n </p>\n <div class=\"o-hvy-close-confirm__dialog__comment\">\n <textarea [(ngModel)]=\"changeStatusContext.comment\" class=\"a-form-field\" [maxLength]=\"255\"></textarea>\n </div>\n <div class=\"o-hvy-close-confirm__dialog__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"confirmedClose()\" [disabled]=\"confirmDisabled()\">\n {{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"toggleConfirm()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i1$3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: IconDisplayComponent, selector: "hvy-icon-display", inputs: ["event"] }, { kind: "component", type: StatusDisplayComponent, selector: "hvy-status-display", inputs: ["type", "readonly", "item", "modifiable"], outputs: ["modified"] }, { kind: "component", type: ProgressDisplayComponent, selector: "hvy-progress-display", inputs: ["progress"] }, { kind: "component", type: HvyCommentsComponent, selector: "hvy-comments", inputs: ["readonly", "me", "type", "objectId", "displayEmpty", "commentCount", "lastComment", "trigger"], outputs: ["commented"] }, { kind: "component", type: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: ["mode", "me", "readonly", "enableEditActions", "events", "actions"], outputs: ["modified", "commented"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }, { kind: "pipe", type: ForDatetimeLocalPipe, name: "forDateTimeLocal" }] }); }
|
|
2403
|
+
ngOnDestroy() {
|
|
2404
|
+
super.ngOnDestroy();
|
|
2405
|
+
this.tooltipRef?.close();
|
|
2406
|
+
this.tooltipRef = undefined;
|
|
2407
|
+
}
|
|
2408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: EventDetailComponent, deps: [{ token: EquipmentService }, { token: i1$1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }, { token: i1$3.PryI18nService }, { token: i1$3.PryDialogService }, { token: HypCommentsService }, { token: EventService }, { token: i1$5.Actions }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2409
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: EventDetailComponent, selector: "hvy-event-detail", inputs: { title: "title", readonly: "readonly", readonlyProcedure: "readonlyProcedure", enableEditActions: "enableEditActions", readOnlyComment: "readOnlyComment", me: "me", events: "events", procedure: "procedure", cancelModifications: "cancelModifications", equipmentName: "equipmentName" }, outputs: { modifiedEvents: "modifiedEvents", modifiedProcedure: "modifiedProcedure", eventErrors: "eventErrors", addedEvent: "addedEvent", comfirmDialogOpened: "comfirmDialogOpened", commented: "commented" }, viewQueries: [{ propertyName: "confirmDialog", first: true, predicate: ["confirmDialog"], descendants: true, read: TemplateRef }, { propertyName: "detailHoverIcon", predicate: ["detailHoverIcon"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-events-detail\">\n <div class=\"o-hvy-events-detail__header\">\n <div class=\"o-hvy-events-detail__header__split\">\n <h1>{{ title ?? '@hvy.event.detail' | i18n }}</h1>\n @if (procedure && canCloseSome) {\n <button class=\"add-button\" [disabled]=\"readonly\" (click)=\"addOneEvent()\">\n <pry-icon iconSvg=\"add\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n }\n @if (events.length > 1) {\n @if (canCloseSome && !readonly) {\n <button class=\"a-btn a-btn--secondary -fix-right\" [disabled]=\"!canCloseSome\" (click)=\"closeAll()\">\n {{ (canCloseSome ? '@hvy.event.log.event.close' : '@hvy.event.log.event.closed') | i18n }}\n </button>\n }\n @if (!canCloseSome && closeComment && closeComment.length > 0) {\n <div class=\"a-tooltip\" [attr.data-tooltip]=\"closeComment\" data-tooltip-position=\"right\">\n <pry-icon iconSvg=\"i\" [height]=\"18\" [width]=\"18\">i</pry-icon>\n </div>\n }\n }\n </div>\n <div class=\"o-hvy-events-detail__header__split\">\n @if (procedure && !readonly) {\n <button class=\"a-btn a-btn--secondary\" (click)=\"openDeleteModal()\" [disabled]=\"readonlyProcedure\">\n {{ '@hvy.event.log.procedure.delete' | i18n }}\n </button>\n }\n </div>\n </div>\n <div class=\"o-hvy-events-detail__container\">\n <div class=\"o-hvy-events-detail__container__scrollable\">\n <div class=\"o-hvy-events-detail__events\">\n @for (event of events; track event.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__events__event\">\n <div class=\"o-hvy-events-detail__events__event__header\">\n <pry-icon\n iconSvg=\"arrow_down_rounded\"\n [class.-rotated]=\"opened[idx]\"\n class=\"-hand\"\n (click)=\"toggle(idx)\"\n [width]=\"10\"\n [height]=\"10\"\n ></pry-icon>\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <h2>{{ event.name }}</h2>\n <div class=\"o-hvy-events-detail__events__event__header__comment\">\n @if (event.commentCount > 0) {\n <span>{{\n (event.commentCount > 1 ? '@hvy.event.comment.heads' : '@hvy.event.comment.head')\n | i18n: { nb: event.commentCount }\n }}</span>\n }\n </div>\n <hvy-status-display\n [item]=\"event\"\n [modifiable]=\"event.status !== 'DONE'\"\n [readonly]=\"readonly\"\n (modified)=\"changeStatus($event, event)\"\n ></hvy-status-display>\n </div>\n <div class=\"o-hvy-events-detail__events__event__content\">\n @if (!opened[idx]) {\n <div>\n {{ '@hvy.event.log.event.category' | i18n }} : {{ '@hvy.event.category.' + event.category | i18n }}\n </div>\n <div>{{ '@hvy.event.log.event.description' | i18n }} : {{ event.description }}</div>\n } @else {\n @if (access(event); as accessValue) {\n <div class=\"o-hvy-events-detail__events__event__content__header\">\n <h3>{{ '@hvy.event.log.event.detail' | i18n }}</h3>\n <span class=\"required\">{{ '@hvy.event.log.event.mandatory' | i18n }}</span>\n </div>\n <table>\n <tbody>\n <!--identifiant-->\n @if (event.id > 0) {\n <tr>\n <td>{{ '@hvy.event.log.event.id' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"padId.fn(event.id)\" [readonly]=\"true\" />\n </td>\n <td></td>\n </tr>\n }\n <!--nom-->\n <tr>\n <td>{{ '@hvy.event.log.event.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('name', idx)\"\n [value]=\"event.name\"\n (change)=\"modifyEvent(idx, 'name', $event)\"\n [readonly]=\"accessValue.name\"\n [maxLength]=\"50\"\n />\n </td>\n <td></td>\n </tr>\n <!--categorie-->\n <tr>\n <td>{{ '@hvy.event.log.event.category' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [ngModel]=\"event.category\"\n [items]=\"categories(event)\"\n [class.-error]=\"hasError('category', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'category', $event)\"\n i18nPrefix=\"@hvy.event.category.\"\n [disabled]=\"accessValue.category\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n <!--sous categorie-->\n @if (event.category === 'ANOMALY') {\n <tr>\n <td>{{ '@hvy.event.subCategory.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [ngModel]=\"event.subCategory\"\n [items]=\"subCategories\"\n [class.-error]=\"hasError('subCategory', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'subCategory', $event)\"\n i18nPrefix=\"@hvy.event.subCategory.\"\n [disabled]=\"accessValue.subCategory\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n }\n <!--criticite-->\n <tr>\n <td>{{ '@hvy.event.criticality.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [ngModel]=\"event.criticality\"\n [items]=\"criticalities\"\n [class.-error]=\"hasError('criticality', idx)\"\n i18nPrefix=\"@hvy.event.criticality.\"\n [disabled]=\"accessValue.criticality\"\n (ngModelChange)=\"modifyEvent(idx, 'criticality', $event)\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n <!--metier-->\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"event.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'domain', $event)\"\n [disabled]=\"accessValue.domain\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n <!--equipement-->\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"equipments$ | async\"\n bindLabel=\"displayName\"\n [ngModel]=\"equipmentSelectValue[idx]\"\n (ngModelChange)=\"selectedEquipmentChange($event, idx)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.event.equipmentPlaceholder' | i18n\"\n id=\"procedure-filter\"\n [template]=\"templateOption\"\n [class.-error]=\"hasError('equipment', idx)\"\n [disabled]=\"accessValue.eqName\"\n class=\"o-hvy-events-detail__events__event__content__equipment\"\n ></pry-select>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </td>\n <td>\n @if (selectedEquipment) {\n <pry-icon\n iconSvg=\"i\"\n class=\"-hand\"\n #detailHoverIcon\n (click)=\"toggleDetailsTooltip(idx)\"\n [width]=\"18\"\n [height]=\"18\"\n ></pry-icon>\n }\n </td>\n </tr>\n <!--entite-->\n <tr>\n <td>{{ '@hvy.event.equipmentEntity' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('equipment', idx)\"\n [value]=\"\n (event.equipment?.entity ? '@hvy.event.entity.' + event.equipment?.entity : '') | i18n\n \"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <!--adresse-->\n <tr>\n <td>{{ '@hvy.event.log.event.address' | i18n }} :</td>\n <td>\n <textarea\n [ngModel]=\"event.address\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('address', idx)\"\n [readonly]=\"accessValue.address\"\n (ngModelChange)=\"modifyEvent(idx, 'address', $event)\"\n [maxLength]=\"256\"\n ></textarea>\n </td>\n <td></td>\n </tr>\n <!--evenement parent-->\n <tr>\n <td>{{ '@hvy.event.parentEvent.name' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"events$ | async\"\n bindLabel=\"displayName\"\n [ngModel]=\"eventSelectValue[idx]\"\n (ngModelChange)=\"selectedParentChange($event, idx)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.event.parentEvent.placeholder' | i18n\"\n id=\"parent\"\n [template]=\"templateParent\"\n [disabled]=\"accessValue.parent\"\n [class.-error]=\"hasError('parent', idx)\"\n class=\"o-hvy-events-detail__events__event__content__equipment\"\n ></pry-select>\n <ng-template #templateParent let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </td>\n <td></td>\n </tr>\n <!--description-->\n <tr>\n <td>{{ '@hvy.event.log.event.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"event.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description', idx)\"\n [readonly]=\"accessValue.description\"\n (ngModelChange)=\"modifyEvent(idx, 'description', $event)\"\n [maxLength]=\"256\"\n ></textarea>\n </td>\n <td></td>\n </tr>\n <!--date debut-->\n <tr>\n <td>\n {{ '@hvy.event.startDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n :\n </td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.startDate | forDateTimeLocal\"\n [class.-error]=\"hasError('startDate', idx)\"\n [readonly]=\"accessValue.startDate\"\n (change)=\"modifyEvent(idx, 'startDate', $event)\"\n />\n </td>\n <td></td>\n </tr>\n <!--date fin-->\n <tr>\n <td>\n {{ '@hvy.event.endDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n :\n </td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.endDate | forDateTimeLocal\"\n [class.-error]=\"hasError('endDate', idx)\"\n [readonly]=\"accessValue.endDate\"\n (change)=\"modifyEvent(idx, 'endDate', $event)\"\n />\n @if (hasError('endDate', idx) && event.endDate && event.startDate) {\n <span class=\"a-form-field -error\">{{ '@hvy.event.errorDate' | i18n }}</span>\n }\n </td>\n <td></td>\n </tr>\n <!--source-->\n <tr>\n <td>{{ '@hvy.event.source' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.externalSourceRef ?? ('@hvy.event.hypervisor' | i18n)\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\"\n (change)=\"modifyEvent(idx, 'source', $event)\"\n />\n </td>\n <td></td>\n </tr>\n <!--ref\u00E9rence externe-->\n @if (event.externalSourceRef !== 'Hyperviseur') {\n <tr>\n <td>{{ '@hvy.event.externalId' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.externalId ?? '-'\"\n [readonly]=\"true\"\n />\n </td>\n <td></td>\n </tr>\n }\n <!--createur-->\n <tr>\n <td>{{ '@hvy.event.creator' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"event.creator\" [readonly]=\"true\" />\n </td>\n <td></td>\n </tr>\n <!--date creation-->\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <!--date modification-->\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <!--date cloture-->\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.closeDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n </tbody>\n </table>\n @if (event.id !== -1) {\n <hvy-comments\n [lastComment]=\"event.lastComment\"\n [commentCount]=\"event.commentCount\"\n (commented)=\"updateComment(event, $event)\"\n [readonly]=\"readonly\"\n [type]=\"'events'\"\n [me]=\"me?.sub\"\n [objectId]=\"event.id\"\n ></hvy-comments>\n }\n }\n }\n </div>\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure\">\n <div class=\"o-hvy-events-detail__procedure__header\">\n <h2>\n {{ (events.length === 1 ? '@hvy.event.log.procedure.name1' : '@hvy.event.log.procedure.name') | i18n }}\n </h2>\n </div>\n @if (procedure) {\n <div class=\"o-hvy-events-detail__procedure__description\">\n <p>{{ procedure.description }}</p>\n </div>\n <div class=\"o-hvy-events-detail__procedure__progress\">\n <p>{{ '@hvy.event.log.procedure.progress' | i18n }}</p>\n <hvy-progress-display [progress]=\"calculatedProgress\"></hvy-progress-display>\n </div>\n <hvy-procedure-actions\n [readonly]=\"readonlyProcedure || readonly\"\n [readOnlyComment]=\"readOnlyComment\"\n [enableEditActions]=\"enableEditActions\"\n [actions]=\"procedure.actions\"\n (modified)=\"modifiedActions($event)\"\n (refreshActions)=\"refreshActions($event)\"\n [me]=\"me?.sub\"\n [events]=\"this.events\"\n (commented)=\"actionCommented($event)\"\n ></hvy-procedure-actions>\n } @else {\n @if (!readonly) {\n <button class=\"a-btn a-btn--secondary\" [disabled]=\"!canAssociateProcedure\" (click)=\"openAssociationModal()\">\n {{ '@hvy.action.associate' | i18n }}\n </button>\n } @else {\n <span class=\"o-hvy-events-detail__procedure__empty\">{{ '@hvy.event.log.procedure.none' | i18n }}</span>\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #confirmDialog>\n <div\n class=\"o-hvy-close-confirm__dialog\"\n aria-labelledby=\"confirm\"\n tabindex=\"-1\"\n id=\"choice\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <h2>\n {{\n (changeStatusContext.events.length === 1 ? '@hvy.event.close.oneTitle' : '@hvy.event.close.multiTitle') | i18n\n }}\n </h2>\n <p>{{ (changeStatusContext.events.length === 1 ? '@hvy.event.close.one' : '@hvy.event.close.multi') | i18n }}</p>\n <ul>\n @for (event of changeStatusContext.events; track event.id) {\n <li>{{ event.name }}</li>\n }\n </ul>\n <p class=\"o-hvy-close-confirm__dialog__comment-title\">\n {{ '@hvy.event.close.comment' | i18n }}<span class=\"required\">*</span> :\n </p>\n <div class=\"o-hvy-close-confirm__dialog__comment\">\n <textarea [(ngModel)]=\"changeStatusContext.comment\" class=\"a-form-field\" [maxLength]=\"255\"></textarea>\n </div>\n <div class=\"o-hvy-close-confirm__dialog__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"confirmedClose()\" [disabled]=\"confirmDisabled()\">\n {{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"toggleConfirm()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i1$3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked", "pressedEnter"] }, { kind: "component", type: IconDisplayComponent, selector: "hvy-icon-display", inputs: ["event"] }, { kind: "component", type: StatusDisplayComponent, selector: "hvy-status-display", inputs: ["type", "readonly", "item", "modifiable"], outputs: ["modified"] }, { kind: "component", type: ProgressDisplayComponent, selector: "hvy-progress-display", inputs: ["progress"] }, { kind: "component", type: HvyCommentsComponent, selector: "hvy-comments", inputs: ["readonly", "me", "type", "objectId", "displayEmpty", "commentCount", "lastComment", "trigger"], outputs: ["commented"] }, { kind: "component", type: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: ["mode", "me", "readonly", "readOnlyComment", "enableEditActions", "events", "actions"], outputs: ["modified", "commented", "refreshActions"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }, { kind: "pipe", type: ForDatetimeLocalPipe, name: "forDateTimeLocal" }] }); }
|
|
2043
2410
|
}
|
|
2044
2411
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: EventDetailComponent, decorators: [{
|
|
2045
2412
|
type: Component,
|
|
2046
|
-
args: [{ selector: 'hvy-event-detail', template: "<div class=\"o-hvy-events-detail\">\n <div class=\"o-hvy-events-detail__header\">\n <div class=\"o-hvy-events-detail__header__split\">\n <h1>{{ title ?? '@hvy.event.detail' | i18n }}</h1>\n @if (procedure && canCloseSome) {\n <button class=\"add-button\" [disabled]=\"readonly\" (click)=\"addOneEvent()\">\n <pry-icon iconSvg=\"add\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n }\n @if (events.length > 1) {\n @if (canCloseSome && !readonly) {\n <button class=\"a-btn a-btn--secondary -fix-right\" [disabled]=\"!canCloseSome\" (click)=\"closeAll()\">\n {{ (canCloseSome ? '@hvy.event.log.event.close' : '@hvy.event.log.event.closed') | i18n }}\n </button>\n }\n @if (!canCloseSome && closeComment && closeComment.length > 0) {\n <div class=\"a-tooltip\" [attr.data-tooltip]=\"closeComment\" data-tooltip-position=\"right\">\n <pry-icon iconSvg=\"i\" [height]=\"18\" [width]=\"18\">i</pry-icon>\n </div>\n }\n }\n </div>\n <div class=\"o-hvy-events-detail__header__split\">\n @if (procedure && !readonly) {\n <button class=\"a-btn a-btn--secondary\" (click)=\"openDeleteModal()\" [disabled]=\"readonlyProcedure\">\n {{ '@hvy.event.log.procedure.delete' | i18n }}\n </button>\n }\n </div>\n </div>\n <div class=\"o-hvy-events-detail__container\">\n <div class=\"o-hvy-events-detail__container__scrollable\">\n <div class=\"o-hvy-events-detail__events\">\n @for (event of events; track event.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__events__event\">\n <div class=\"o-hvy-events-detail__events__event__header\">\n <pry-icon\n iconSvg=\"arrow_down_rounded\"\n [class.-rotated]=\"opened[idx]\"\n class=\"-hand\"\n (click)=\"toggle(idx)\"\n [width]=\"10\"\n [height]=\"10\"\n ></pry-icon>\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <h2>{{ event.name }}</h2>\n <div class=\"o-hvy-events-detail__events__event__header__comment\">\n @if (event.commentCount > 0) {\n <span>{{\n (event.commentCount > 1 ? '@hvy.event.comment.heads' : '@hvy.event.comment.head')\n | i18n: { nb: event.commentCount }\n }}</span>\n }\n </div>\n <hvy-status-display\n [item]=\"event\"\n [modifiable]=\"event.status !== 'DONE'\"\n [readonly]=\"readonly\"\n (modified)=\"changeStatus($event, event)\"\n ></hvy-status-display>\n </div>\n <div class=\"o-hvy-events-detail__events__event__content\">\n @if (!opened[idx]) {\n <div>{{ '@hvy.event.log.event.description' | i18n }} : {{ event.description }}</div>\n <div>{{ '@hvy.event.log.event.address' | i18n }} : {{ event.address }}</div>\n } @else {\n @if (access(event); as accessValue) {\n <div class=\"o-hvy-events-detail__events__event__content__header\">\n <h3>{{ '@hvy.event.log.event.detail' | i18n }}</h3>\n <span class=\"required\">{{ '@hvy.event.log.event.mandatory' | i18n }}</span>\n </div>\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.event.log.event.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('name', idx)\"\n [value]=\"event.name\"\n (change)=\"modifyEvent(idx, 'name', $event)\"\n [readonly]=\"accessValue.name\"\n [maxLength]=\"50\"\n />\n </td>\n <td></td>\n </tr>\n @if (event.id > 0) {\n <tr>\n <td>{{ '@hvy.event.log.event.id' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"padId.fn(event.id)\" [readonly]=\"true\" />\n </td>\n <td></td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.log.event.category' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [ngModel]=\"event.category\"\n [items]=\"categories(event)\"\n [class.-error]=\"hasError('category', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'category', $event)\"\n i18nPrefix=\"@hvy.event.category.\"\n [disabled]=\"accessValue.category\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n @if (event.category === 'ANOMALY') {\n <tr>\n <td>{{ '@hvy.event.subCategory.name' | i18n }} :</td>\n <td>\n <pry-select\n [ngModel]=\"event.subCategory\"\n [items]=\"subCategories\"\n [class.-error]=\"hasError('subCategory', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'subCategory', $event)\"\n i18nPrefix=\"@hvy.event.subCategory.\"\n [disabled]=\"accessValue.subCategory\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.criticality.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [ngModel]=\"event.criticality\"\n [items]=\"criticalities\"\n [class.-error]=\"hasError('criticality', idx)\"\n i18nPrefix=\"@hvy.event.criticality.\"\n [disabled]=\"accessValue.criticality\"\n (ngModelChange)=\"modifyEvent(idx, 'criticality', $event)\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n\n <tr>\n <td>{{ '@hvy.event.log.event.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"event.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description', idx)\"\n [readonly]=\"accessValue.description\"\n (ngModelChange)=\"modifyEvent(idx, 'description', $event)\"\n [maxLength]=\"256\"\n ></textarea>\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.address' | i18n }} :</td>\n <td>\n <textarea\n [ngModel]=\"event.address\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('address', idx)\"\n [readonly]=\"accessValue.address\"\n (ngModelChange)=\"modifyEvent(idx, 'address', $event)\"\n [maxLength]=\"256\"\n ></textarea>\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.source' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.externalSourceRef ?? ('@hvy.event.hypervisor' | i18n)\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\"\n (change)=\"modifyEvent(idx, 'source', $event)\"\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"equipments$ | async\"\n bindLabel=\"displayName\"\n [ngModel]=\"equipmentSelectValue[idx]\"\n (ngModelChange)=\"selectedEquipmentChange($event, idx)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.event.equipmentPlaceholder' | i18n\"\n id=\"procedure-filter\"\n [template]=\"templateOption\"\n [class.-error]=\"hasError('equipment', idx)\"\n [disabled]=\"accessValue.eqName\"\n class=\"o-hvy-events-detail__events__event__content__equipment\"\n ></pry-select>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </td>\n <td>\n @if (\n equipmentsEvents[idx] && (equipmentsEvents[idx].events || equipmentsEvents[idx].services)\n ) {\n <pry-icon\n iconSvg=\"i\"\n class=\"-hand\"\n #detailHoverIcon\n (mouseenter)=\"toggleDetailsTooltip(idx)\"\n (mouseleave)=\"toggleDetailsTooltip(idx)\"\n [width]=\"18\"\n [height]=\"18\"\n ></pry-icon>\n }\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.equipmentEntity' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('equipment', idx)\"\n [value]=\"\n (event.equipment?.entity ? '@hvy.event.entity.' + event.equipment?.entity : '') | i18n\n \"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"event.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'domain', $event)\"\n [disabled]=\"accessValue.domain\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.parentEvent.name' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"events$ | async\"\n bindLabel=\"displayName\"\n [ngModel]=\"eventSelectValue[idx]\"\n (ngModelChange)=\"selectedParentChange($event, idx)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.event.parentEvent.placeholder' | i18n\"\n id=\"parent\"\n [template]=\"templateParent\"\n [disabled]=\"accessValue.parent\"\n [class.-error]=\"hasError('parent', idx)\"\n class=\"o-hvy-events-detail__events__event__content__equipment\"\n ></pry-select>\n <ng-template #templateParent let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </td>\n <td></td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.startDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n :\n </td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.startDate | forDateTimeLocal\"\n [class.-error]=\"hasError('startDate', idx)\"\n [readonly]=\"accessValue.startDate\"\n (change)=\"modifyEvent(idx, 'startDate', $event)\"\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.endDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n :\n </td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.endDate | forDateTimeLocal\"\n [class.-error]=\"hasError('endDate', idx)\"\n [readonly]=\"accessValue.endDate\"\n (change)=\"modifyEvent(idx, 'endDate', $event)\"\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.closeDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n </tbody>\n </table>\n <hvy-comments\n [lastComment]=\"event.lastComment\"\n [commentCount]=\"event.commentCount\"\n (commented)=\"updateComment(event, $event)\"\n [readonly]=\"readonly\"\n [type]=\"'events'\"\n [me]=\"me\"\n [objectId]=\"event.id\"\n ></hvy-comments>\n }\n }\n </div>\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure\">\n <div class=\"o-hvy-events-detail__procedure__header\">\n <h2>\n {{ (events.length === 1 ? '@hvy.event.log.procedure.name1' : '@hvy.event.log.procedure.name') | i18n }}\n </h2>\n </div>\n @if (procedure) {\n <div class=\"o-hvy-events-detail__procedure__description\">\n <p>{{ procedure.description }}</p>\n </div>\n <div class=\"o-hvy-events-detail__procedure__progress\">\n <p>{{ '@hvy.event.log.procedure.progress' | i18n }}</p>\n <hvy-progress-display [progress]=\"calculatedProgress\"></hvy-progress-display>\n </div>\n <hvy-procedure-actions\n [readonly]=\"readonlyProcedure || readonly\"\n [enableEditActions]=\"enableEditActions\"\n [actions]=\"procedure.actions\"\n (modified)=\"modifiedActions($event)\"\n [me]=\"me\"\n [events]=\"this.events\"\n (commented)=\"actionCommented($event)\"\n ></hvy-procedure-actions>\n } @else {\n @if (!readonly) {\n <button class=\"a-btn a-btn--secondary\" [disabled]=\"!canAssociateProcedure\" (click)=\"openAssociationModal()\">\n {{ '@hvy.action.associate' | i18n }}\n </button>\n } @else {\n <span class=\"o-hvy-events-detail__procedure__empty\">{{ '@hvy.event.log.procedure.none' | i18n }}</span>\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #confirmDialog>\n <div\n class=\"o-hvy-close-confirm__dialog\"\n aria-labelledby=\"confirm\"\n tabindex=\"-1\"\n id=\"choice\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <h2>\n {{\n (changeStatusContext.events.length === 1 ? '@hvy.event.close.oneTitle' : '@hvy.event.close.multiTitle') | i18n\n }}\n </h2>\n <p>{{ (changeStatusContext.events.length === 1 ? '@hvy.event.close.one' : '@hvy.event.close.multi') | i18n }}</p>\n <ul>\n @for (event of changeStatusContext.events; track event.id) {\n <li>{{ event.name }}</li>\n }\n </ul>\n <p class=\"o-hvy-close-confirm__dialog__comment-title\">\n {{ '@hvy.event.close.comment' | i18n }}<span class=\"required\">*</span> :\n </p>\n <div class=\"o-hvy-close-confirm__dialog__comment\">\n <textarea [(ngModel)]=\"changeStatusContext.comment\" class=\"a-form-field\" [maxLength]=\"255\"></textarea>\n </div>\n <div class=\"o-hvy-close-confirm__dialog__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"confirmedClose()\" [disabled]=\"confirmDisabled()\">\n {{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"toggleConfirm()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n </div>\n</ng-template>\n" }]
|
|
2047
|
-
}], ctorParameters: () => [{ type: EquipmentService }, { type: i1$1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: i1$3.PryI18nService }, { type: i1$3.PryDialogService }, { type: HypCommentsService }, { type: EventService }], propDecorators: { modifiedEvents: [{
|
|
2413
|
+
args: [{ selector: 'hvy-event-detail', template: "<div class=\"o-hvy-events-detail\">\n <div class=\"o-hvy-events-detail__header\">\n <div class=\"o-hvy-events-detail__header__split\">\n <h1>{{ title ?? '@hvy.event.detail' | i18n }}</h1>\n @if (procedure && canCloseSome) {\n <button class=\"add-button\" [disabled]=\"readonly\" (click)=\"addOneEvent()\">\n <pry-icon iconSvg=\"add\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n }\n @if (events.length > 1) {\n @if (canCloseSome && !readonly) {\n <button class=\"a-btn a-btn--secondary -fix-right\" [disabled]=\"!canCloseSome\" (click)=\"closeAll()\">\n {{ (canCloseSome ? '@hvy.event.log.event.close' : '@hvy.event.log.event.closed') | i18n }}\n </button>\n }\n @if (!canCloseSome && closeComment && closeComment.length > 0) {\n <div class=\"a-tooltip\" [attr.data-tooltip]=\"closeComment\" data-tooltip-position=\"right\">\n <pry-icon iconSvg=\"i\" [height]=\"18\" [width]=\"18\">i</pry-icon>\n </div>\n }\n }\n </div>\n <div class=\"o-hvy-events-detail__header__split\">\n @if (procedure && !readonly) {\n <button class=\"a-btn a-btn--secondary\" (click)=\"openDeleteModal()\" [disabled]=\"readonlyProcedure\">\n {{ '@hvy.event.log.procedure.delete' | i18n }}\n </button>\n }\n </div>\n </div>\n <div class=\"o-hvy-events-detail__container\">\n <div class=\"o-hvy-events-detail__container__scrollable\">\n <div class=\"o-hvy-events-detail__events\">\n @for (event of events; track event.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__events__event\">\n <div class=\"o-hvy-events-detail__events__event__header\">\n <pry-icon\n iconSvg=\"arrow_down_rounded\"\n [class.-rotated]=\"opened[idx]\"\n class=\"-hand\"\n (click)=\"toggle(idx)\"\n [width]=\"10\"\n [height]=\"10\"\n ></pry-icon>\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <h2>{{ event.name }}</h2>\n <div class=\"o-hvy-events-detail__events__event__header__comment\">\n @if (event.commentCount > 0) {\n <span>{{\n (event.commentCount > 1 ? '@hvy.event.comment.heads' : '@hvy.event.comment.head')\n | i18n: { nb: event.commentCount }\n }}</span>\n }\n </div>\n <hvy-status-display\n [item]=\"event\"\n [modifiable]=\"event.status !== 'DONE'\"\n [readonly]=\"readonly\"\n (modified)=\"changeStatus($event, event)\"\n ></hvy-status-display>\n </div>\n <div class=\"o-hvy-events-detail__events__event__content\">\n @if (!opened[idx]) {\n <div>\n {{ '@hvy.event.log.event.category' | i18n }} : {{ '@hvy.event.category.' + event.category | i18n }}\n </div>\n <div>{{ '@hvy.event.log.event.description' | i18n }} : {{ event.description }}</div>\n } @else {\n @if (access(event); as accessValue) {\n <div class=\"o-hvy-events-detail__events__event__content__header\">\n <h3>{{ '@hvy.event.log.event.detail' | i18n }}</h3>\n <span class=\"required\">{{ '@hvy.event.log.event.mandatory' | i18n }}</span>\n </div>\n <table>\n <tbody>\n <!--identifiant-->\n @if (event.id > 0) {\n <tr>\n <td>{{ '@hvy.event.log.event.id' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"padId.fn(event.id)\" [readonly]=\"true\" />\n </td>\n <td></td>\n </tr>\n }\n <!--nom-->\n <tr>\n <td>{{ '@hvy.event.log.event.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('name', idx)\"\n [value]=\"event.name\"\n (change)=\"modifyEvent(idx, 'name', $event)\"\n [readonly]=\"accessValue.name\"\n [maxLength]=\"50\"\n />\n </td>\n <td></td>\n </tr>\n <!--categorie-->\n <tr>\n <td>{{ '@hvy.event.log.event.category' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [ngModel]=\"event.category\"\n [items]=\"categories(event)\"\n [class.-error]=\"hasError('category', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'category', $event)\"\n i18nPrefix=\"@hvy.event.category.\"\n [disabled]=\"accessValue.category\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n <!--sous categorie-->\n @if (event.category === 'ANOMALY') {\n <tr>\n <td>{{ '@hvy.event.subCategory.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [ngModel]=\"event.subCategory\"\n [items]=\"subCategories\"\n [class.-error]=\"hasError('subCategory', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'subCategory', $event)\"\n i18nPrefix=\"@hvy.event.subCategory.\"\n [disabled]=\"accessValue.subCategory\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n }\n <!--criticite-->\n <tr>\n <td>{{ '@hvy.event.criticality.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [ngModel]=\"event.criticality\"\n [items]=\"criticalities\"\n [class.-error]=\"hasError('criticality', idx)\"\n i18nPrefix=\"@hvy.event.criticality.\"\n [disabled]=\"accessValue.criticality\"\n (ngModelChange)=\"modifyEvent(idx, 'criticality', $event)\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n <!--metier-->\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"event.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'domain', $event)\"\n [disabled]=\"accessValue.domain\"\n ></pry-select>\n </td>\n <td></td>\n </tr>\n <!--equipement-->\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"equipments$ | async\"\n bindLabel=\"displayName\"\n [ngModel]=\"equipmentSelectValue[idx]\"\n (ngModelChange)=\"selectedEquipmentChange($event, idx)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.event.equipmentPlaceholder' | i18n\"\n id=\"procedure-filter\"\n [template]=\"templateOption\"\n [class.-error]=\"hasError('equipment', idx)\"\n [disabled]=\"accessValue.eqName\"\n class=\"o-hvy-events-detail__events__event__content__equipment\"\n ></pry-select>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </td>\n <td>\n @if (selectedEquipment) {\n <pry-icon\n iconSvg=\"i\"\n class=\"-hand\"\n #detailHoverIcon\n (click)=\"toggleDetailsTooltip(idx)\"\n [width]=\"18\"\n [height]=\"18\"\n ></pry-icon>\n }\n </td>\n </tr>\n <!--entite-->\n <tr>\n <td>{{ '@hvy.event.equipmentEntity' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('equipment', idx)\"\n [value]=\"\n (event.equipment?.entity ? '@hvy.event.entity.' + event.equipment?.entity : '') | i18n\n \"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <!--adresse-->\n <tr>\n <td>{{ '@hvy.event.log.event.address' | i18n }} :</td>\n <td>\n <textarea\n [ngModel]=\"event.address\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('address', idx)\"\n [readonly]=\"accessValue.address\"\n (ngModelChange)=\"modifyEvent(idx, 'address', $event)\"\n [maxLength]=\"256\"\n ></textarea>\n </td>\n <td></td>\n </tr>\n <!--evenement parent-->\n <tr>\n <td>{{ '@hvy.event.parentEvent.name' | i18n }} :</td>\n <td>\n <pry-select\n [items]=\"events$ | async\"\n bindLabel=\"displayName\"\n [ngModel]=\"eventSelectValue[idx]\"\n (ngModelChange)=\"selectedParentChange($event, idx)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.event.parentEvent.placeholder' | i18n\"\n id=\"parent\"\n [template]=\"templateParent\"\n [disabled]=\"accessValue.parent\"\n [class.-error]=\"hasError('parent', idx)\"\n class=\"o-hvy-events-detail__events__event__content__equipment\"\n ></pry-select>\n <ng-template #templateParent let-item=\"item\">\n <div class=\"u-display-flex -column\">\n <span [innerHTML]=\"item.html\"></span>\n </div>\n </ng-template>\n </td>\n <td></td>\n </tr>\n <!--description-->\n <tr>\n <td>{{ '@hvy.event.log.event.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"event.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description', idx)\"\n [readonly]=\"accessValue.description\"\n (ngModelChange)=\"modifyEvent(idx, 'description', $event)\"\n [maxLength]=\"256\"\n ></textarea>\n </td>\n <td></td>\n </tr>\n <!--date debut-->\n <tr>\n <td>\n {{ '@hvy.event.startDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n :\n </td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.startDate | forDateTimeLocal\"\n [class.-error]=\"hasError('startDate', idx)\"\n [readonly]=\"accessValue.startDate\"\n (change)=\"modifyEvent(idx, 'startDate', $event)\"\n />\n </td>\n <td></td>\n </tr>\n <!--date fin-->\n <tr>\n <td>\n {{ '@hvy.event.endDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n :\n </td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.endDate | forDateTimeLocal\"\n [class.-error]=\"hasError('endDate', idx)\"\n [readonly]=\"accessValue.endDate\"\n (change)=\"modifyEvent(idx, 'endDate', $event)\"\n />\n @if (hasError('endDate', idx) && event.endDate && event.startDate) {\n <span class=\"a-form-field -error\">{{ '@hvy.event.errorDate' | i18n }}</span>\n }\n </td>\n <td></td>\n </tr>\n <!--source-->\n <tr>\n <td>{{ '@hvy.event.source' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.externalSourceRef ?? ('@hvy.event.hypervisor' | i18n)\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\"\n (change)=\"modifyEvent(idx, 'source', $event)\"\n />\n </td>\n <td></td>\n </tr>\n <!--ref\u00E9rence externe-->\n @if (event.externalSourceRef !== 'Hyperviseur') {\n <tr>\n <td>{{ '@hvy.event.externalId' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.externalId ?? '-'\"\n [readonly]=\"true\"\n />\n </td>\n <td></td>\n </tr>\n }\n <!--createur-->\n <tr>\n <td>{{ '@hvy.event.creator' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"event.creator\" [readonly]=\"true\" />\n </td>\n <td></td>\n </tr>\n <!--date creation-->\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <!--date modification-->\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n <!--date cloture-->\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"event.closeDate | forDateTimeLocal\"\n readonly\n />\n </td>\n <td></td>\n </tr>\n </tbody>\n </table>\n @if (event.id !== -1) {\n <hvy-comments\n [lastComment]=\"event.lastComment\"\n [commentCount]=\"event.commentCount\"\n (commented)=\"updateComment(event, $event)\"\n [readonly]=\"readonly\"\n [type]=\"'events'\"\n [me]=\"me?.sub\"\n [objectId]=\"event.id\"\n ></hvy-comments>\n }\n }\n }\n </div>\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure\">\n <div class=\"o-hvy-events-detail__procedure__header\">\n <h2>\n {{ (events.length === 1 ? '@hvy.event.log.procedure.name1' : '@hvy.event.log.procedure.name') | i18n }}\n </h2>\n </div>\n @if (procedure) {\n <div class=\"o-hvy-events-detail__procedure__description\">\n <p>{{ procedure.description }}</p>\n </div>\n <div class=\"o-hvy-events-detail__procedure__progress\">\n <p>{{ '@hvy.event.log.procedure.progress' | i18n }}</p>\n <hvy-progress-display [progress]=\"calculatedProgress\"></hvy-progress-display>\n </div>\n <hvy-procedure-actions\n [readonly]=\"readonlyProcedure || readonly\"\n [readOnlyComment]=\"readOnlyComment\"\n [enableEditActions]=\"enableEditActions\"\n [actions]=\"procedure.actions\"\n (modified)=\"modifiedActions($event)\"\n (refreshActions)=\"refreshActions($event)\"\n [me]=\"me?.sub\"\n [events]=\"this.events\"\n (commented)=\"actionCommented($event)\"\n ></hvy-procedure-actions>\n } @else {\n @if (!readonly) {\n <button class=\"a-btn a-btn--secondary\" [disabled]=\"!canAssociateProcedure\" (click)=\"openAssociationModal()\">\n {{ '@hvy.action.associate' | i18n }}\n </button>\n } @else {\n <span class=\"o-hvy-events-detail__procedure__empty\">{{ '@hvy.event.log.procedure.none' | i18n }}</span>\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #confirmDialog>\n <div\n class=\"o-hvy-close-confirm__dialog\"\n aria-labelledby=\"confirm\"\n tabindex=\"-1\"\n id=\"choice\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <h2>\n {{\n (changeStatusContext.events.length === 1 ? '@hvy.event.close.oneTitle' : '@hvy.event.close.multiTitle') | i18n\n }}\n </h2>\n <p>{{ (changeStatusContext.events.length === 1 ? '@hvy.event.close.one' : '@hvy.event.close.multi') | i18n }}</p>\n <ul>\n @for (event of changeStatusContext.events; track event.id) {\n <li>{{ event.name }}</li>\n }\n </ul>\n <p class=\"o-hvy-close-confirm__dialog__comment-title\">\n {{ '@hvy.event.close.comment' | i18n }}<span class=\"required\">*</span> :\n </p>\n <div class=\"o-hvy-close-confirm__dialog__comment\">\n <textarea [(ngModel)]=\"changeStatusContext.comment\" class=\"a-form-field\" [maxLength]=\"255\"></textarea>\n </div>\n <div class=\"o-hvy-close-confirm__dialog__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"confirmedClose()\" [disabled]=\"confirmDisabled()\">\n {{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"toggleConfirm()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n </div>\n</ng-template>\n" }]
|
|
2414
|
+
}], ctorParameters: () => [{ type: EquipmentService }, { type: i1$1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: i1$3.PryI18nService }, { type: i1$3.PryDialogService }, { type: HypCommentsService }, { type: EventService }, { type: i1$5.Actions }], propDecorators: { modifiedEvents: [{
|
|
2048
2415
|
type: Output
|
|
2049
2416
|
}], modifiedProcedure: [{
|
|
2050
2417
|
type: Output
|
|
@@ -2054,14 +2421,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
2054
2421
|
type: Output
|
|
2055
2422
|
}], title: [{
|
|
2056
2423
|
type: Input
|
|
2057
|
-
}], me: [{
|
|
2058
|
-
type: Input
|
|
2059
2424
|
}], readonly: [{
|
|
2060
2425
|
type: Input
|
|
2061
2426
|
}], readonlyProcedure: [{
|
|
2062
2427
|
type: Input
|
|
2063
2428
|
}], enableEditActions: [{
|
|
2064
2429
|
type: Input
|
|
2430
|
+
}], readOnlyComment: [{
|
|
2431
|
+
type: Input
|
|
2065
2432
|
}], confirmDialog: [{
|
|
2066
2433
|
type: ViewChild,
|
|
2067
2434
|
args: ['confirmDialog', { read: TemplateRef }]
|
|
@@ -2072,6 +2439,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
2072
2439
|
args: ['detailHoverIcon', { read: ElementRef }]
|
|
2073
2440
|
}], commented: [{
|
|
2074
2441
|
type: Output
|
|
2442
|
+
}], me: [{
|
|
2443
|
+
type: Input
|
|
2075
2444
|
}], events: [{
|
|
2076
2445
|
type: Input
|
|
2077
2446
|
}], procedure: [{
|
|
@@ -2194,7 +2563,9 @@ class EventListComponent extends SubscriptionnerDirective {
|
|
|
2194
2563
|
this.disableGotoDetail = false;
|
|
2195
2564
|
this.Math = Math;
|
|
2196
2565
|
this.padId = padId;
|
|
2197
|
-
this.
|
|
2566
|
+
this.subscriptions.add(fromEvent(window, 'journal-refresh').pipe(startWith(new CustomEvent(`journal-refresh`, { detail: true }))).subscribe(() => {
|
|
2567
|
+
this.store.dispatch(EventActions.load({}));
|
|
2568
|
+
}));
|
|
2198
2569
|
this.events$ = this.store.select(EventSelectors.events);
|
|
2199
2570
|
this.selectedIds$ = this.store.select(EventSelectors.selectedIds);
|
|
2200
2571
|
this.allSelected$ = combineLatest([this.events$, this.selectedIds$]).pipe(map(([events, selectedIds]) => events.length > 0 && events.filter((ev) => !selectedIds.includes(ev.id)).length === 0));
|
|
@@ -2229,11 +2600,11 @@ class EventListComponent extends SubscriptionnerDirective {
|
|
|
2229
2600
|
return;
|
|
2230
2601
|
}
|
|
2231
2602
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: EventListComponent, deps: [{ token: i1$1.Store }, { token: i0.ElementRef }, { token: i2$1.Router }, { token: InfiniteScrollService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2232
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: EventListComponent, selector: "hvy-event-list", inputs: { disableGotoDetail: "disableGotoDetail" }, usesInheritance: true, ngImport: i0, template: "<table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th class=\"-checkbox\">\n <pry-checkbox [ngModel]=\"allSelected$ | async\" (ngModelChange)=\"selectAll($event)\"></pry-checkbox>\n </th>\n <th>\n <hvy-event-column-order field=\"criticality\">{{ '@hvy.event.criticality.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"id\">{{ '@hvy.event.id' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"name\">{{ '@hvy.event.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"status\">{{ '@hvy.event.status.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"source\">{{ '@hvy.event.source' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"procedureProgress\"\n >{{ '@hvy.procedure.progress' | i18n }}\n </hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"category\">{{ '@hvy.event.category.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"creationDate\">{{ '@hvy.event.
|
|
2603
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: EventListComponent, selector: "hvy-event-list", inputs: { disableGotoDetail: "disableGotoDetail" }, usesInheritance: true, ngImport: i0, template: "<table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th class=\"-checkbox\">\n <pry-checkbox [ngModel]=\"allSelected$ | async\" (ngModelChange)=\"selectAll($event)\"></pry-checkbox>\n </th>\n <th>\n <hvy-event-column-order field=\"criticality\">{{ '@hvy.event.criticality.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"id\">{{ '@hvy.event.id' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"name\">{{ '@hvy.event.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"status\">{{ '@hvy.event.status.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"source\">{{ '@hvy.event.source' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"procedureProgress\"\n >{{ '@hvy.procedure.progress' | i18n }}\n </hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"category\">{{ '@hvy.event.category.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"creationDate\">{{ '@hvy.event.creationDateTable' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"lastModificationDate\"\n >{{ '@hvy.event.lastModificationDateTable' | i18n }}\n </hvy-event-column-order>\n </th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (event of events$ | async; track event.id) {\n <tr class=\"o-hvy-events-table__line\" [class.-nogo]=\"disableGotoDetail\" (click)=\"goTo(event)\">\n <td class=\"o-hvy-events-table__line__cell checkbox\">\n <pry-checkbox\n [ngModel]=\"(selectedIds$ | async)!.includes(event.id)\"\n (click)=\"select(event, $event)\"\n ></pry-checkbox>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered icon\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell id\">\n {{ padId.fn(event.id) }}\n </td>\n <td class=\"o-hvy-events-table__line__cell name\">\n <div class=\"o-hvy-events-table__line__cell__name__main\">{{ event.name }}</div>\n <div class=\"o-hvy-events-table__line__cell__name__sub\">\n @if (event.equipment) {\n {{ event.equipment.name ? event.equipment.name : '' }} -\n {{ event.equipment ? ('@hvy.event.family.' + event.equipment.family | i18n) : '' }}\n }\n </div>\n <div class=\"o-hvy-events-table__line__cell__name__subsub\">\n {{ event.address }}\n </div>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered status\">\n <hvy-status-display [item]=\"event\"></hvy-status-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell source\">\n {{ event.externalSourceRef ?? ('@hvy.event.hypervisor' | i18n) }}\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered progress\">{{ event.procedureProgress }} %</td>\n <td class=\"o-hvy-events-table__line__cell category\">\n <div class=\"o-hvy-events-table__line__cell__name__main\">\n {{ '@hvy.event.category.' + event.category | i18n }}\n </div>\n @if (event.subCategory && event.subCategory !== 'NONE') {\n <div class=\"o-hvy-events-table__line__cell__name__sub\">\n {{ '@hvy.event.subCategory.' + event.subCategory | i18n }}\n </div>\n }\n </td>\n <td class=\"o-hvy-events-table__line__cell creation-date\">\n {{ event.creationDate | displayLocaleDatetime }}\n </td>\n <td class=\"o-hvy-events-table__line__cell modification-date\">\n {{ event.lastModificationDate | displayLocaleDatetime }}\n </td>\n <td class=\"o-hvy-events-table__line__cell link\">\n @if (!disableGotoDetail) {\n <a\n [routerLink]=\"EVENT_LINK.fn(event, _store)\"\n [title]=\"\n '@hvy.event.consult'\n | i18n: { howMany: Math.max(1, event.linkedEvents), plural: event.linkedEvents > 1 ? 's' : '' }\n \"\n >\n <div class=\"consult-link\">\n <pry-icon iconSvg=\"eye\" [height]=\"30\" [width]=\"40\"></pry-icon>\n @if (event.linkedEvents > 1) {\n <div class=\"indicator-badge\">{{ event.linkedEvents }}</div>\n }\n </div>\n </a>\n }\n </td>\n </tr>\n } @empty {\n <tr>\n <td class=\"o-hvy-events-table__empty\" colspan=\"50\">\n <div>{{ '@hvy.event.log.empty' | i18n }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n </td>\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle", "name", "inputId", "inhibit"] }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1$3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: EventColumnOrderComponent, selector: "hvy-event-column-order" }, { kind: "component", type: IconDisplayComponent, selector: "hvy-icon-display", inputs: ["event"] }, { kind: "component", type: StatusDisplayComponent, selector: "hvy-status-display", inputs: ["type", "readonly", "item", "modifiable"], outputs: ["modified"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }, { kind: "pipe", type: DisplayLocaleDateTime, name: "displayLocaleDatetime" }] }); }
|
|
2233
2604
|
}
|
|
2234
2605
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: EventListComponent, decorators: [{
|
|
2235
2606
|
type: Component,
|
|
2236
|
-
args: [{ selector: 'hvy-event-list', template: "<table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th class=\"-checkbox\">\n <pry-checkbox [ngModel]=\"allSelected$ | async\" (ngModelChange)=\"selectAll($event)\"></pry-checkbox>\n </th>\n <th>\n <hvy-event-column-order field=\"criticality\">{{ '@hvy.event.criticality.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"id\">{{ '@hvy.event.id' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"name\">{{ '@hvy.event.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"status\">{{ '@hvy.event.status.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"source\">{{ '@hvy.event.source' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"procedureProgress\"\n >{{ '@hvy.procedure.progress' | i18n }}\n </hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"category\">{{ '@hvy.event.category.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"creationDate\">{{ '@hvy.event.
|
|
2607
|
+
args: [{ selector: 'hvy-event-list', template: "<table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th class=\"-checkbox\">\n <pry-checkbox [ngModel]=\"allSelected$ | async\" (ngModelChange)=\"selectAll($event)\"></pry-checkbox>\n </th>\n <th>\n <hvy-event-column-order field=\"criticality\">{{ '@hvy.event.criticality.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"id\">{{ '@hvy.event.id' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"name\">{{ '@hvy.event.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"status\">{{ '@hvy.event.status.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"source\">{{ '@hvy.event.source' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"procedureProgress\"\n >{{ '@hvy.procedure.progress' | i18n }}\n </hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"category\">{{ '@hvy.event.category.name' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"creationDate\">{{ '@hvy.event.creationDateTable' | i18n }}</hvy-event-column-order>\n </th>\n <th>\n <hvy-event-column-order field=\"lastModificationDate\"\n >{{ '@hvy.event.lastModificationDateTable' | i18n }}\n </hvy-event-column-order>\n </th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (event of events$ | async; track event.id) {\n <tr class=\"o-hvy-events-table__line\" [class.-nogo]=\"disableGotoDetail\" (click)=\"goTo(event)\">\n <td class=\"o-hvy-events-table__line__cell checkbox\">\n <pry-checkbox\n [ngModel]=\"(selectedIds$ | async)!.includes(event.id)\"\n (click)=\"select(event, $event)\"\n ></pry-checkbox>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered icon\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell id\">\n {{ padId.fn(event.id) }}\n </td>\n <td class=\"o-hvy-events-table__line__cell name\">\n <div class=\"o-hvy-events-table__line__cell__name__main\">{{ event.name }}</div>\n <div class=\"o-hvy-events-table__line__cell__name__sub\">\n @if (event.equipment) {\n {{ event.equipment.name ? event.equipment.name : '' }} -\n {{ event.equipment ? ('@hvy.event.family.' + event.equipment.family | i18n) : '' }}\n }\n </div>\n <div class=\"o-hvy-events-table__line__cell__name__subsub\">\n {{ event.address }}\n </div>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered status\">\n <hvy-status-display [item]=\"event\"></hvy-status-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell source\">\n {{ event.externalSourceRef ?? ('@hvy.event.hypervisor' | i18n) }}\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered progress\">{{ event.procedureProgress }} %</td>\n <td class=\"o-hvy-events-table__line__cell category\">\n <div class=\"o-hvy-events-table__line__cell__name__main\">\n {{ '@hvy.event.category.' + event.category | i18n }}\n </div>\n @if (event.subCategory && event.subCategory !== 'NONE') {\n <div class=\"o-hvy-events-table__line__cell__name__sub\">\n {{ '@hvy.event.subCategory.' + event.subCategory | i18n }}\n </div>\n }\n </td>\n <td class=\"o-hvy-events-table__line__cell creation-date\">\n {{ event.creationDate | displayLocaleDatetime }}\n </td>\n <td class=\"o-hvy-events-table__line__cell modification-date\">\n {{ event.lastModificationDate | displayLocaleDatetime }}\n </td>\n <td class=\"o-hvy-events-table__line__cell link\">\n @if (!disableGotoDetail) {\n <a\n [routerLink]=\"EVENT_LINK.fn(event, _store)\"\n [title]=\"\n '@hvy.event.consult'\n | i18n: { howMany: Math.max(1, event.linkedEvents), plural: event.linkedEvents > 1 ? 's' : '' }\n \"\n >\n <div class=\"consult-link\">\n <pry-icon iconSvg=\"eye\" [height]=\"30\" [width]=\"40\"></pry-icon>\n @if (event.linkedEvents > 1) {\n <div class=\"indicator-badge\">{{ event.linkedEvents }}</div>\n }\n </div>\n </a>\n }\n </td>\n </tr>\n } @empty {\n <tr>\n <td class=\"o-hvy-events-table__empty\" colspan=\"50\">\n <div>{{ '@hvy.event.log.empty' | i18n }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n </td>\n </tr>\n }\n </tbody>\n</table>\n" }]
|
|
2237
2608
|
}], ctorParameters: () => [{ type: i1$1.Store }, { type: i0.ElementRef }, { type: i2$1.Router }, { type: InfiniteScrollService }], propDecorators: { disableGotoDetail: [{
|
|
2238
2609
|
type: Input
|
|
2239
2610
|
}] } });
|
|
@@ -2249,12 +2620,19 @@ class EventFiltersComponent extends SubscriptionnerDirective {
|
|
|
2249
2620
|
this.filters.forEach((filter) => (filter.filterSet = this.filterSet));
|
|
2250
2621
|
}
|
|
2251
2622
|
filter() {
|
|
2252
|
-
|
|
2623
|
+
let filters = this.filters.map((filter) => filter.getParams()).reduce((p, c) => ({ ...p, ...c }), {});
|
|
2624
|
+
if (this.filterSet !== 'events') {
|
|
2625
|
+
filters = { ...filters, ['deleted']: ['false'] };
|
|
2626
|
+
}
|
|
2253
2627
|
this.store.dispatch(EventActions.filter({ filters, filterSet: this.filterSet }));
|
|
2254
2628
|
this.filtered.next();
|
|
2255
2629
|
}
|
|
2256
2630
|
reset() {
|
|
2257
|
-
|
|
2631
|
+
let filters = {};
|
|
2632
|
+
if (this.filterSet !== 'events') {
|
|
2633
|
+
filters = { ...filters, ['deleted']: ['false'] };
|
|
2634
|
+
}
|
|
2635
|
+
this.store.dispatch(EventActions.filter({ filters, filterSet: this.filterSet }));
|
|
2258
2636
|
this.filtered.next();
|
|
2259
2637
|
}
|
|
2260
2638
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: EventFiltersComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -2340,6 +2718,9 @@ class DateFilterComponent extends HvyUnitFilterComponent {
|
|
|
2340
2718
|
this.value = '';
|
|
2341
2719
|
this.subscriptions.add(combineLatest([this.store.select(EventSelectors.filters), this._filterSet$]).subscribe(([filters, filterSet]) => {
|
|
2342
2720
|
this.value = (filters[filterSet] ?? {})[this.prop] ? (filters[filterSet] ?? {})[this.prop][0] ?? '' : '';
|
|
2721
|
+
if (!!this.value) {
|
|
2722
|
+
this.value = new Date(this.value).toISOString().substring(0, 10);
|
|
2723
|
+
}
|
|
2343
2724
|
}));
|
|
2344
2725
|
}
|
|
2345
2726
|
getParams() {
|
|
@@ -2354,11 +2735,11 @@ class DateFilterComponent extends HvyUnitFilterComponent {
|
|
|
2354
2735
|
this.changed.next();
|
|
2355
2736
|
}
|
|
2356
2737
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: DateFilterComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2357
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: DateFilterComponent, selector: "hvy-date-filter", providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => DateFilterComponent) }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-date-filters\">\n <input type=\"date\" class=\"a-form-field\"\n [value]=\"value\"\n (change)=\"triggerChange($event)\">\n</div>\n" }); }
|
|
2738
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: DateFilterComponent, selector: "hvy-date-filter", providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => DateFilterComponent) }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-date-filters\">\n <label> {{ \"@chh.event.date\" | i18n }} :\n <input type=\"date\" class=\"a-form-field\"\n [value]=\"value\"\n (change)=\"triggerChange($event)\">\n </label>\n</div>\n", dependencies: [{ kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
2358
2739
|
}
|
|
2359
2740
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: DateFilterComponent, decorators: [{
|
|
2360
2741
|
type: Component,
|
|
2361
|
-
args: [{ selector: 'hvy-date-filter', providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => DateFilterComponent) }], template: "<div class=\"o-hvy-date-filters\">\n <input type=\"date\" class=\"a-form-field\"\n [value]=\"value\"\n (change)=\"triggerChange($event)\">\n</div>\n" }]
|
|
2742
|
+
args: [{ selector: 'hvy-date-filter', providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => DateFilterComponent) }], template: "<div class=\"o-hvy-date-filters\">\n <label> {{ \"@chh.event.date\" | i18n }} :\n <input type=\"date\" class=\"a-form-field\"\n [value]=\"value\"\n (change)=\"triggerChange($event)\">\n </label>\n</div>\n" }]
|
|
2362
2743
|
}], ctorParameters: () => [{ type: i1$1.Store }] });
|
|
2363
2744
|
|
|
2364
2745
|
class ChoiceFilterComponent extends HvyUnitFilterComponent {
|
|
@@ -2526,11 +2907,11 @@ class TextFilterComponent extends HvyUnitFilterComponent {
|
|
|
2526
2907
|
this.changed.next();
|
|
2527
2908
|
}
|
|
2528
2909
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: TextFilterComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2529
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2910
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: TextFilterComponent, selector: "hvy-text-filter", inputs: { placeholder: "placeholder" }, providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => TextFilterComponent) }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-text-filters\">\n <input\n class=\"a-form-field o-hvy-text-filters__search-input\"\n type=\"text\"\n [value]=\"value\"\n (input)=\"triggerChange($event)\"\n placeholder=\"{{ placeholder | i18n }}...\"\n />\n <pry-icon\n iconSvg=\"search\"\n class=\"o-hvy-text-filters__search-icon\">\n </pry-icon>\n @if (value) {\n <pry-icon\n (click)=\"triggerChange('')\"\n class=\"filters-search-erase\"\n iconSvg=\"close\"\n [width]=\"18\"\n [height]=\"18\"\n ></pry-icon>\n }\n</div>\n", dependencies: [{ kind: "component", type: i1$3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
2530
2911
|
}
|
|
2531
2912
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: TextFilterComponent, decorators: [{
|
|
2532
2913
|
type: Component,
|
|
2533
|
-
args: [{ selector: 'hvy-text-filter', providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => TextFilterComponent) }], template: "<div class=\"o-hvy-text-filters\">\n <input\n class=\"a-form-field o-hvy-text-filters__search-input\"\n type=\"text\"\n [value]=\"value\"\n (input)=\"triggerChange($event)\"\n placeholder=\"{{ placeholder | i18n }}...\"\n />\n <pry-icon
|
|
2914
|
+
args: [{ selector: 'hvy-text-filter', providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => TextFilterComponent) }], template: "<div class=\"o-hvy-text-filters\">\n <input\n class=\"a-form-field o-hvy-text-filters__search-input\"\n type=\"text\"\n [value]=\"value\"\n (input)=\"triggerChange($event)\"\n placeholder=\"{{ placeholder | i18n }}...\"\n />\n <pry-icon\n iconSvg=\"search\"\n class=\"o-hvy-text-filters__search-icon\">\n </pry-icon>\n @if (value) {\n <pry-icon\n (click)=\"triggerChange('')\"\n class=\"filters-search-erase\"\n iconSvg=\"close\"\n [width]=\"18\"\n [height]=\"18\"\n ></pry-icon>\n }\n</div>\n" }]
|
|
2534
2915
|
}], ctorParameters: () => [{ type: i1$1.Store }], propDecorators: { placeholder: [{
|
|
2535
2916
|
type: Input
|
|
2536
2917
|
}] } });
|
|
@@ -2588,11 +2969,11 @@ class EventSummaryItemComponent {
|
|
|
2588
2969
|
this.EVENT_LINK = EVENT_LINK;
|
|
2589
2970
|
}
|
|
2590
2971
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: EventSummaryItemComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2591
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2972
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: EventSummaryItemComponent, selector: "hvy-event-summary-item", inputs: { event: "event", linkBase: "linkBase", doNotRedirectToDetail: "doNotRedirectToDetail" }, ngImport: i0, template: "<div class=\"m-hvy-event-summary-item\" [class.-no-pointer]=\"doNotRedirectToDetail\">\n <a [routerLink]=\"doNotRedirectToDetail ? null : EVENT_LINK.fn(event, store)\">\n <div class=\"m-hvy-event-summary-item__title\">\n <h4>\n {{ event.name }}\n </h4>\n </div>\n <div class=\"m-hvy-event-summary-item__content\">\n <div>\n {{ event.serviceTitle }}\n </div>\n <div>\n {{\n !event.startDate || !event.endDate || event.category !== 'MANIFESTATION'\n ? ''\n : ('@hvy.eventSummary.from' | i18n) +\n ' ' +\n (event.startDate | displayLocaleDatetime: 'short') +\n ' ' +\n ('@hvy.eventSummary.to' | i18n) +\n ' ' +\n (event.endDate | displayLocaleDatetime: 'short')\n }}\n </div>\n </div>\n <div class=\"m-hvy-event-summary-item__footer\">\n <div class=\"m-hvy-event-summary-item__icons\">\n @if (event.serviceCount !== 0) {\n <pry-icon iconSvg=\"service\"></pry-icon>\n <span class=\"m-hvy-event-summary-item__intervention-counter\">{{ event.serviceCount }}</span>\n }\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </div>\n <div class=\"m-hvy-event-summary-item__date\">\n <span>\n {{ event.lastModificationDate | displayLocaleDatetime: 'medium' }}\n </span>\n </div>\n </div>\n </a>\n</div>\n", dependencies: [{ kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1$3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: IconDisplayComponent, selector: "hvy-icon-display", inputs: ["event"] }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }, { kind: "pipe", type: DisplayLocaleDateTime, name: "displayLocaleDatetime" }] }); }
|
|
2592
2973
|
}
|
|
2593
2974
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: EventSummaryItemComponent, decorators: [{
|
|
2594
2975
|
type: Component,
|
|
2595
|
-
args: [{ selector: 'hvy-event-summary-item', template: "<div class=\"m-hvy-event-summary-item\" [class.-no-pointer]=\"doNotRedirectToDetail\">\n <a [routerLink]=\"doNotRedirectToDetail ? null : EVENT_LINK.fn(event, store)\">\n <div class=\"m-hvy-event-summary-item__title\">\n <h4>\n {{ event.name }}\n </h4>\n </div>\n <div class=\"m-hvy-event-summary-item__content\">\n <div>\n {{ event.serviceTitle }}\n </div>\n <div>\n {{\n !event.startDate || !event.endDate\n ? ''\n : ('@hvy.eventSummary.from' | i18n) +\n ' ' +\n (event.startDate | displayLocaleDatetime: 'short') +\n ' ' +\n ('@hvy.eventSummary.to' | i18n) +\n ' ' +\n (event.endDate | displayLocaleDatetime: 'short')\n }}\n </div>\n </div>\n <div class=\"m-hvy-event-summary-item__footer\">\n <div class=\"m-hvy-event-summary-item__icons\">\n <pry-icon
|
|
2976
|
+
args: [{ selector: 'hvy-event-summary-item', template: "<div class=\"m-hvy-event-summary-item\" [class.-no-pointer]=\"doNotRedirectToDetail\">\n <a [routerLink]=\"doNotRedirectToDetail ? null : EVENT_LINK.fn(event, store)\">\n <div class=\"m-hvy-event-summary-item__title\">\n <h4>\n {{ event.name }}\n </h4>\n </div>\n <div class=\"m-hvy-event-summary-item__content\">\n <div>\n {{ event.serviceTitle }}\n </div>\n <div>\n {{\n !event.startDate || !event.endDate || event.category !== 'MANIFESTATION'\n ? ''\n : ('@hvy.eventSummary.from' | i18n) +\n ' ' +\n (event.startDate | displayLocaleDatetime: 'short') +\n ' ' +\n ('@hvy.eventSummary.to' | i18n) +\n ' ' +\n (event.endDate | displayLocaleDatetime: 'short')\n }}\n </div>\n </div>\n <div class=\"m-hvy-event-summary-item__footer\">\n <div class=\"m-hvy-event-summary-item__icons\">\n @if (event.serviceCount !== 0) {\n <pry-icon iconSvg=\"service\"></pry-icon>\n <span class=\"m-hvy-event-summary-item__intervention-counter\">{{ event.serviceCount }}</span>\n }\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </div>\n <div class=\"m-hvy-event-summary-item__date\">\n <span>\n {{ event.lastModificationDate | displayLocaleDatetime: 'medium' }}\n </span>\n </div>\n </div>\n </a>\n</div>\n" }]
|
|
2596
2977
|
}], ctorParameters: () => [{ type: i1$1.Store }], propDecorators: { event: [{
|
|
2597
2978
|
type: Input,
|
|
2598
2979
|
args: [{ required: true }]
|
|
@@ -2655,7 +3036,9 @@ class EventSummaryPageComponent extends SubscriptionnerDirective {
|
|
|
2655
3036
|
this.criticalityList = ['ALL', ...HypEventCriticality.values];
|
|
2656
3037
|
this.statusList = HypEventStatus.values;
|
|
2657
3038
|
this.doNotRedirectToDetail = false;
|
|
2658
|
-
this.
|
|
3039
|
+
this.subscriptions.add(fromEvent(window, 'accueil-refresh').pipe(startWith(new CustomEvent(`accueil-refresh`, { detail: true }))).subscribe(() => {
|
|
3040
|
+
this.store.dispatch(EventSummaryActions.load());
|
|
3041
|
+
}));
|
|
2659
3042
|
this.selectedCriticality$ = this.store
|
|
2660
3043
|
.select(EventSelectors.filters)
|
|
2661
3044
|
.pipe(map$1((filters) => (filters[KNOWN_FILTER_SETS.EVENTS] ?? {})['criticality']?.[0] ?? 'ALL'));
|
|
@@ -2673,7 +3056,7 @@ class EventSummaryPageComponent extends SubscriptionnerDirective {
|
|
|
2673
3056
|
this.store.dispatch(EventSummaryActions.load());
|
|
2674
3057
|
}
|
|
2675
3058
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: EventSummaryPageComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2676
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: EventSummaryPageComponent, selector: "hvy-event-summary-page", inputs: { pageTitle: "pageTitle", consultLink: "consultLink", doNotRedirectToDetail: "doNotRedirectToDetail" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-event-summary-page\">\n <div class=\"o-hvy-event-summary-page__header u-display-flex -justify-space-between\">\n @if (pageTitle) {\n <h3 class=\"o-hvy-event-summary-page__title\">{{ pageTitle }}</h3>\n }\n <div class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown\">\n <label class=\"a-label m-filter__label\" for=\"criticality-filter\"\n >{{ '@hvy.event.criticality.name' | i18n }} : </label\n >\n <pry-select\n id=\"criticality-filter\"\n class=\"o-hvy-event-summary-page__filter\"\n [items]=\"criticalityList\"\n [ngModel]=\"selectedCriticality$ | async\"\n (ngModelChange)=\"filterByCriticality($event)\"\n [translate]=\"true\"\n i18nPrefix=\"@hvy.eventSummary.criticalityLabels.\"\n >\n </pry-select>\n </div>\n </div>\n <div class=\"o-hvy-event-summary-page__content\">\n <div class=\"o-hvy-event-summary-page__content__sub\">\n @for (summaryKey of statusList; track summaryKey) {\n @if (summaries[summaryKey]) {\n <hvy-event-summary-list\n class=\"o-hvy-event-summary-page__summary-list\"\n [status]=\"summaryKey\"\n [totalEventCount]=\"summaries[summaryKey].count ?? 0\"\n [events]=\"summaries[summaryKey].events\"\n [consultLink]=\"consultLink\"\n [doNotRedirectToDetail]=\"doNotRedirectToDetail\"\n >\n </hvy-event-summary-list>\n }\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: EventSummaryListComponent, selector: "hvy-event-summary-list", inputs: ["events", "totalEventCount", "status", "consultLink", "itemLinkBase", "doNotRedirectToDetail"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
3059
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: EventSummaryPageComponent, selector: "hvy-event-summary-page", inputs: { pageTitle: "pageTitle", consultLink: "consultLink", doNotRedirectToDetail: "doNotRedirectToDetail" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-event-summary-page\">\n <div class=\"o-hvy-event-summary-page__header u-display-flex -justify-space-between\">\n @if (pageTitle) {\n <h3 class=\"o-hvy-event-summary-page__title\">{{ pageTitle }}</h3>\n }\n <div class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown\">\n <label class=\"a-label m-filter__label\" for=\"criticality-filter\"\n >{{ '@hvy.event.criticality.name' | i18n }} : </label\n >\n <pry-select\n id=\"criticality-filter\"\n class=\"o-hvy-event-summary-page__filter\"\n [items]=\"criticalityList\"\n [ngModel]=\"selectedCriticality$ | async\"\n (ngModelChange)=\"filterByCriticality($event)\"\n [translate]=\"true\"\n i18nPrefix=\"@hvy.eventSummary.criticalityLabels.\"\n >\n </pry-select>\n </div>\n </div>\n <div class=\"o-hvy-event-summary-page__content\">\n <div class=\"o-hvy-event-summary-page__content__sub\">\n @for (summaryKey of statusList; track summaryKey) {\n @if (summaries[summaryKey]) {\n <hvy-event-summary-list\n class=\"o-hvy-event-summary-page__summary-list\"\n [status]=\"summaryKey\"\n [totalEventCount]=\"summaries[summaryKey].count ?? 0\"\n [events]=\"summaries[summaryKey].events\"\n [consultLink]=\"consultLink\"\n [doNotRedirectToDetail]=\"doNotRedirectToDetail\"\n >\n </hvy-event-summary-list>\n }\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked", "pressedEnter"] }, { kind: "component", type: EventSummaryListComponent, selector: "hvy-event-summary-list", inputs: ["events", "totalEventCount", "status", "consultLink", "itemLinkBase", "doNotRedirectToDetail"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }] }); }
|
|
2677
3060
|
}
|
|
2678
3061
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: EventSummaryPageComponent, decorators: [{
|
|
2679
3062
|
type: Component,
|
|
@@ -2714,6 +3097,7 @@ class ProcedureListComponent extends SubscriptionnerDirective {
|
|
|
2714
3097
|
this.PROCEDURE_LINK = PROCEDURE_LINK;
|
|
2715
3098
|
this.search = '';
|
|
2716
3099
|
this.DOMAINS = DOMAINS.values.map((d) => ({ key: d }));
|
|
3100
|
+
this.placeholder = '@hvy.action.search';
|
|
2717
3101
|
this.padId = padId;
|
|
2718
3102
|
this.store.dispatch(ProcedureActions.load({}));
|
|
2719
3103
|
this.procedures$ = this.store.select(ProcedureSelectors.procedures);
|
|
@@ -2727,14 +3111,16 @@ class ProcedureListComponent extends SubscriptionnerDirective {
|
|
|
2727
3111
|
return this.router.navigate(this.PROCEDURE_LINK.fn(procedure, this.store));
|
|
2728
3112
|
}
|
|
2729
3113
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ProcedureListComponent, deps: [{ token: i1$1.Store }, { token: i2$1.Router }, { token: InfiniteScrollService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2730
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: ProcedureListComponent, selector: "hvy-procedure-model-list", viewQueries: [{ propertyName: "scrollable", first: true, predicate: ["scrollable"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-procedure-list\">\n <div class=\"m-form-label-field o-procedure-list__action\">\n <hvy-immediate-filters [filterSet]=\"'procedure'\">\n <hvy-text-filter prop=\"search\" #filter></hvy-text-filter>\n <hvy-choice-filter\n i18nPrefix=\"@hvy.event.domain.\"\n label=\"@hvy.event.domain.name\"\n [choices]=\"DOMAINS\"\n prop=\"domain\"\n #filter\n ></hvy-choice-filter>\n </hvy-immediate-filters>\n </div>\n <div class=\"o-procedure-list__table\" #scrollable>\n <table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th>\n <hvy-procedure-column-order field=\"id\">{{ '@hvy.procedure.id' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"name\">{{ '@hvy.procedure.title' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"domain\">{{ '@hvy.procedure.domain' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"useCount\"\n >{{ '@hvy.procedure.useCount' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"creator\"\n >{{ '@hvy.procedure.author' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"creationDate\"\n >{{ '@hvy.event.
|
|
3114
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: ProcedureListComponent, selector: "hvy-procedure-model-list", inputs: { placeholder: "placeholder" }, viewQueries: [{ propertyName: "scrollable", first: true, predicate: ["scrollable"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-procedure-list\">\n <div class=\"m-form-label-field o-procedure-list__action\">\n <hvy-immediate-filters [filterSet]=\"'procedure'\">\n <hvy-text-filter prop=\"search\" #filter [placeholder]=\"placeholder\"></hvy-text-filter>\n <hvy-choice-filter\n i18nPrefix=\"@hvy.event.domain.\"\n label=\"@hvy.event.domain.name\"\n [choices]=\"DOMAINS\"\n prop=\"domain\"\n #filter\n ></hvy-choice-filter>\n </hvy-immediate-filters>\n </div>\n <div class=\"o-procedure-list__table\" #scrollable>\n <table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th>\n <hvy-procedure-column-order field=\"id\">{{ '@hvy.procedure.id' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"name\">{{ '@hvy.procedure.title' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"domain\">{{ '@hvy.procedure.domain' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"useCount\"\n >{{ '@hvy.procedure.useCount' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"creator\"\n >{{ '@hvy.procedure.author' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"creationDate\"\n >{{ '@hvy.event.creationDateTable' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"lastModificationDate\">\n <span>{{ '@hvy.event.lastModificationDateTable' | i18n }}</span></hvy-procedure-column-order\n >\n </th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (procedure of procedures$ | async; track procedure.id) {\n <tr class=\"o-hvy-events-table__line\" (click)=\"goTo(procedure)\">\n <td class=\"o-hvy-events-table__line__cell\">{{ padId.fn(procedure.id) }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.name }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ '@hvy.event.domain.' + procedure.domain | i18n }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.useCount }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.creator }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.creationDate | displayLocaleDatetime }}</td>\n <td class=\"o-hvy-events-table__line__cell\">\n {{ procedure.lastModificationDate | displayLocaleDatetime }}\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\n <a [routerLink]=\"PROCEDURE_LINK.fn(procedure, store)\">\n <div class=\"consult-link\" [title]=\"'@hvy.action.consult' | i18n\">\n <pry-icon iconSvg=\"eye\" [height]=\"30\" [width]=\"40\"></pry-icon>\n </div>\n </a>\n </td>\n </tr>\n } @empty {\n <tr>\n <td class=\"o-hvy-events-table__empty\" colspan=\"50\">\n <div>{{ '@hvy.procedure.noContent' | i18n }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1$3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: TextFilterComponent, selector: "hvy-text-filter", inputs: ["placeholder"] }, { kind: "component", type: ChoiceFilterComponent, selector: "hvy-choice-filter", inputs: ["allLabel", "label", "i18nPrefix", "addNonLeaves", "choices"] }, { kind: "component", type: ProcedureColumnOrderComponent, selector: "hvy-procedure-column-order" }, { kind: "component", type: ImmediateFiltersComponent, selector: "hvy-immediate-filters", inputs: ["filterSet", "delay"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }, { kind: "pipe", type: DisplayLocaleDateTime, name: "displayLocaleDatetime" }] }); }
|
|
2731
3115
|
}
|
|
2732
3116
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ProcedureListComponent, decorators: [{
|
|
2733
3117
|
type: Component,
|
|
2734
|
-
args: [{ selector: 'hvy-procedure-model-list', template: "<div class=\"o-procedure-list\">\n <div class=\"m-form-label-field o-procedure-list__action\">\n <hvy-immediate-filters [filterSet]=\"'procedure'\">\n <hvy-text-filter prop=\"search\" #filter></hvy-text-filter>\n <hvy-choice-filter\n i18nPrefix=\"@hvy.event.domain.\"\n label=\"@hvy.event.domain.name\"\n [choices]=\"DOMAINS\"\n prop=\"domain\"\n #filter\n ></hvy-choice-filter>\n </hvy-immediate-filters>\n </div>\n <div class=\"o-procedure-list__table\" #scrollable>\n <table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th>\n <hvy-procedure-column-order field=\"id\">{{ '@hvy.procedure.id' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"name\">{{ '@hvy.procedure.title' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"domain\">{{ '@hvy.procedure.domain' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"useCount\"\n >{{ '@hvy.procedure.useCount' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"creator\"\n >{{ '@hvy.procedure.author' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"creationDate\"\n >{{ '@hvy.event.
|
|
3118
|
+
args: [{ selector: 'hvy-procedure-model-list', template: "<div class=\"o-procedure-list\">\n <div class=\"m-form-label-field o-procedure-list__action\">\n <hvy-immediate-filters [filterSet]=\"'procedure'\">\n <hvy-text-filter prop=\"search\" #filter [placeholder]=\"placeholder\"></hvy-text-filter>\n <hvy-choice-filter\n i18nPrefix=\"@hvy.event.domain.\"\n label=\"@hvy.event.domain.name\"\n [choices]=\"DOMAINS\"\n prop=\"domain\"\n #filter\n ></hvy-choice-filter>\n </hvy-immediate-filters>\n </div>\n <div class=\"o-procedure-list__table\" #scrollable>\n <table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th>\n <hvy-procedure-column-order field=\"id\">{{ '@hvy.procedure.id' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"name\">{{ '@hvy.procedure.title' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"domain\">{{ '@hvy.procedure.domain' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"useCount\"\n >{{ '@hvy.procedure.useCount' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"creator\"\n >{{ '@hvy.procedure.author' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"creationDate\"\n >{{ '@hvy.event.creationDateTable' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"lastModificationDate\">\n <span>{{ '@hvy.event.lastModificationDateTable' | i18n }}</span></hvy-procedure-column-order\n >\n </th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (procedure of procedures$ | async; track procedure.id) {\n <tr class=\"o-hvy-events-table__line\" (click)=\"goTo(procedure)\">\n <td class=\"o-hvy-events-table__line__cell\">{{ padId.fn(procedure.id) }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.name }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ '@hvy.event.domain.' + procedure.domain | i18n }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.useCount }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.creator }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.creationDate | displayLocaleDatetime }}</td>\n <td class=\"o-hvy-events-table__line__cell\">\n {{ procedure.lastModificationDate | displayLocaleDatetime }}\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\n <a [routerLink]=\"PROCEDURE_LINK.fn(procedure, store)\">\n <div class=\"consult-link\" [title]=\"'@hvy.action.consult' | i18n\">\n <pry-icon iconSvg=\"eye\" [height]=\"30\" [width]=\"40\"></pry-icon>\n </div>\n </a>\n </td>\n </tr>\n } @empty {\n <tr>\n <td class=\"o-hvy-events-table__empty\" colspan=\"50\">\n <div>{{ '@hvy.procedure.noContent' | i18n }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n</div>\n" }]
|
|
2735
3119
|
}], ctorParameters: () => [{ type: i1$1.Store }, { type: i2$1.Router }, { type: InfiniteScrollService }], propDecorators: { scrollable: [{
|
|
2736
3120
|
type: ViewChild,
|
|
2737
3121
|
args: ['scrollable']
|
|
3122
|
+
}], placeholder: [{
|
|
3123
|
+
type: Input
|
|
2738
3124
|
}] } });
|
|
2739
3125
|
|
|
2740
3126
|
class ProcedureModelDetailComponent extends SubscriptionnerDirective {
|
|
@@ -2745,17 +3131,38 @@ class ProcedureModelDetailComponent extends SubscriptionnerDirective {
|
|
|
2745
3131
|
get modifiedModel() {
|
|
2746
3132
|
return { ...this.model, ...(this.modifications ?? {}) };
|
|
2747
3133
|
}
|
|
2748
|
-
constructor(
|
|
3134
|
+
constructor(actions$) {
|
|
2749
3135
|
super();
|
|
2750
|
-
this.
|
|
3136
|
+
this.actions$ = actions$;
|
|
2751
3137
|
this.username = 'xxx';
|
|
2752
3138
|
this.modifications = {};
|
|
3139
|
+
this.saved = false;
|
|
2753
3140
|
this.errors = [];
|
|
2754
|
-
this.eventErrors =
|
|
3141
|
+
this.eventErrors = [];
|
|
3142
|
+
this.eventErrorsChange = new EventEmitter();
|
|
2755
3143
|
this.modified = new EventEmitter();
|
|
2756
3144
|
this.DOMAINS = DOMAINS.values;
|
|
2757
3145
|
this.readonly = false;
|
|
3146
|
+
this.readOnlyComment = false;
|
|
2758
3147
|
this.padId = padId;
|
|
3148
|
+
this.subscriptions.add(this.actions$.pipe(ofType(ProcedureActions.save))
|
|
3149
|
+
.subscribe({
|
|
3150
|
+
next: result => {
|
|
3151
|
+
this.saved = true;
|
|
3152
|
+
}
|
|
3153
|
+
}));
|
|
3154
|
+
this.subscriptions.add(this.actions$.pipe(ofType(ProcedureActions.saveSuccess), delay(1000))
|
|
3155
|
+
.subscribe({
|
|
3156
|
+
next: result => {
|
|
3157
|
+
this.saved = false;
|
|
3158
|
+
}
|
|
3159
|
+
}));
|
|
3160
|
+
this.subscriptions.add(this.actions$.pipe(ofType(ProcedureActions.saveFailure), delay(1000))
|
|
3161
|
+
.subscribe({
|
|
3162
|
+
next: result => {
|
|
3163
|
+
this.saved = false;
|
|
3164
|
+
}
|
|
3165
|
+
}));
|
|
2759
3166
|
}
|
|
2760
3167
|
hasError(prop) {
|
|
2761
3168
|
return this.errors.find((err) => err.field === prop) ?? false;
|
|
@@ -2763,32 +3170,41 @@ class ProcedureModelDetailComponent extends SubscriptionnerDirective {
|
|
|
2763
3170
|
validate(model) {
|
|
2764
3171
|
if (!!model) {
|
|
2765
3172
|
this.errors = [];
|
|
2766
|
-
|
|
3173
|
+
const regex = new RegExp(/^\s+$/);
|
|
3174
|
+
if (!model.name || model.name.length === 0 || regex.test(model.name)) {
|
|
2767
3175
|
this.errors.push({ field: 'name', code: 'required' });
|
|
2768
3176
|
}
|
|
2769
3177
|
if (!model.domain || model.domain.length === 0) {
|
|
2770
3178
|
this.errors.push({ field: 'domain', code: 'required' });
|
|
2771
3179
|
}
|
|
2772
|
-
if (!model.description || model.description.length === 0) {
|
|
3180
|
+
if (!model.description || model.description.length === 0 || regex.test(model.description)) {
|
|
2773
3181
|
this.errors.push({ field: 'description', code: 'required' });
|
|
2774
3182
|
}
|
|
2775
|
-
this.
|
|
3183
|
+
this.eventErrorsChange.next(this.errors);
|
|
2776
3184
|
}
|
|
2777
3185
|
}
|
|
2778
3186
|
modify(prop, $event) {
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
this.modifications[prop] = newValue;
|
|
2786
|
-
this._outputModifications();
|
|
3187
|
+
if (!this.saved) {
|
|
3188
|
+
if (prop === 'name') {
|
|
3189
|
+
const index = this.errors.findIndex(error => error.field == 'title');
|
|
3190
|
+
if (index !== -1) {
|
|
3191
|
+
this.errors.splice(index, 1);
|
|
3192
|
+
}
|
|
2787
3193
|
}
|
|
2788
|
-
|
|
3194
|
+
// @ts-ignore
|
|
3195
|
+
const newValue = $event instanceof Event ? $event.target?.value : $event;
|
|
3196
|
+
if (this.model) {
|
|
2789
3197
|
// @ts-ignore
|
|
2790
|
-
|
|
2791
|
-
|
|
3198
|
+
if (this.model[prop] !== newValue) {
|
|
3199
|
+
// @ts-ignore
|
|
3200
|
+
this.modifications[prop] = newValue;
|
|
3201
|
+
this._outputModifications();
|
|
3202
|
+
}
|
|
3203
|
+
else {
|
|
3204
|
+
// @ts-ignore
|
|
3205
|
+
delete this.modifications[prop];
|
|
3206
|
+
this._outputModifications();
|
|
3207
|
+
}
|
|
2792
3208
|
}
|
|
2793
3209
|
}
|
|
2794
3210
|
}
|
|
@@ -2805,24 +3221,28 @@ class ProcedureModelDetailComponent extends SubscriptionnerDirective {
|
|
|
2805
3221
|
}
|
|
2806
3222
|
this._outputModifications();
|
|
2807
3223
|
}
|
|
2808
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ProcedureModelDetailComponent, deps: [{ token: i1$
|
|
2809
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: ProcedureModelDetailComponent, selector: "hvy-procedure-model-detail", inputs: { model: "model", username: "username", title: "title", readonly: "readonly", cancelModifications: "cancelModifications" }, outputs: {
|
|
3224
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ProcedureModelDetailComponent, deps: [{ token: i1$5.Actions }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3225
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: ProcedureModelDetailComponent, selector: "hvy-procedure-model-detail", inputs: { model: "model", username: "username", title: "title", eventErrors: "eventErrors", readonly: "readonly", readOnlyComment: "readOnlyComment", cancelModifications: "cancelModifications" }, outputs: { eventErrorsChange: "eventErrorsChange", modified: "modified" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-procedure-detail\">\n <h1>{{ title ?? '@hvy.procedure.detail' | i18n }}</h1>\n <div class=\"o-hvy-procedure-detail__container\">\n <div class=\"o-hvy-procedure-detail__container__scrollable\">\n @if (modifiedModel; as model) {\n <div class=\"o-hvy-procedure-detail__form\">\n <h3>{{ '@hvy.procedure.formTitle' | i18n }}</h3>\n <table>\n <tbody>\n <!--identifiant-->\n @if (model.id > 0) {\n <tr>\n <td>{{ '@hvy.event.log.event.id' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"padId.fn(model.id)\" readonly />\n </td>\n </tr>\n }\n <!--titre-->\n <tr>\n <td>{{ '@hvy.procedure.title' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('name')\"\n [value]=\"model.name\"\n (change)=\"modify('name', $event)\"\n [maxLength]=\"50\"\n [readonly]=\"readonly\"\n />\n @if (hasError('title')) {\n <span class=\"a-form-field -error\">{{ '@hvy.procedure.alreadyExists' | i18n }}</span>\n }\n </td>\n </tr>\n <!--metier-->\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"model.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain')\"\n (ngModelChange)=\"modify('domain', $event)\"\n [disabled]=\"readonly\"\n ></pry-select>\n </td>\n </tr>\n <!--description-->\n <tr>\n <td>{{ '@hvy.procedure.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"model.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description')\"\n (ngModelChange)=\"modify('description', $event)\"\n [maxLength]=\"256\"\n [readonly]=\"readonly\"\n ></textarea>\n </td>\n </tr>\n <!--createur-->\n <tr>\n <td>{{ '@hvy.procedure.creator' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"model.creator\" readonly />\n </td>\n </tr>\n <!--date de cr\u00E9ation-->\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"model.creationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n <!--date de derni\u00E8re modification-->\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"model.lastModificationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div class=\"o-hvy-procedure-detail__actions\">\n <h3>{{ '@hvy.procedure.actions' | i18n }} ({{ model.actions?.length }})</h3>\n <hvy-procedure-actions\n [actions]=\"model.actions\"\n (modified)=\"updateActions($event)\"\n [readonly]=\"readonly\"\n [readOnlyComment]=\"readOnlyComment\"\n mode=\"model\"\n [enableEditActions]=\"true\"\n ></hvy-procedure-actions>\n </div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked", "pressedEnter"] }, { kind: "component", type: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: ["mode", "me", "readonly", "readOnlyComment", "enableEditActions", "events", "actions"], outputs: ["modified", "commented", "refreshActions"] }, { kind: "pipe", type: i1$3.I18nPipe, name: "i18n" }, { kind: "pipe", type: ForDatetimeLocalPipe, name: "forDateTimeLocal" }] }); }
|
|
2810
3226
|
}
|
|
2811
3227
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ProcedureModelDetailComponent, decorators: [{
|
|
2812
3228
|
type: Component,
|
|
2813
|
-
args: [{ selector: 'hvy-procedure-model-detail', template: "<div class=\"o-hvy-procedure-detail\">\n <h1>{{ title ?? '@hvy.procedure.detail' | i18n }}</h1>\n <div class=\"o-hvy-procedure-detail__container\">\n <div class=\"o-hvy-procedure-detail__container__scrollable\">\n @if (modifiedModel; as model) {\n <div class=\"o-hvy-procedure-detail__form\">\n <h3>{{ '@hvy.procedure.formTitle' | i18n }}</h3>\n <table>\n <tbody>\n <tr>\n
|
|
2814
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3229
|
+
args: [{ selector: 'hvy-procedure-model-detail', template: "<div class=\"o-hvy-procedure-detail\">\n <h1>{{ title ?? '@hvy.procedure.detail' | i18n }}</h1>\n <div class=\"o-hvy-procedure-detail__container\">\n <div class=\"o-hvy-procedure-detail__container__scrollable\">\n @if (modifiedModel; as model) {\n <div class=\"o-hvy-procedure-detail__form\">\n <h3>{{ '@hvy.procedure.formTitle' | i18n }}</h3>\n <table>\n <tbody>\n <!--identifiant-->\n @if (model.id > 0) {\n <tr>\n <td>{{ '@hvy.event.log.event.id' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"padId.fn(model.id)\" readonly />\n </td>\n </tr>\n }\n <!--titre-->\n <tr>\n <td>{{ '@hvy.procedure.title' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('name')\"\n [value]=\"model.name\"\n (change)=\"modify('name', $event)\"\n [maxLength]=\"50\"\n [readonly]=\"readonly\"\n />\n @if (hasError('title')) {\n <span class=\"a-form-field -error\">{{ '@hvy.procedure.alreadyExists' | i18n }}</span>\n }\n </td>\n </tr>\n <!--metier-->\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"model.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain')\"\n (ngModelChange)=\"modify('domain', $event)\"\n [disabled]=\"readonly\"\n ></pry-select>\n </td>\n </tr>\n <!--description-->\n <tr>\n <td>{{ '@hvy.procedure.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"model.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description')\"\n (ngModelChange)=\"modify('description', $event)\"\n [maxLength]=\"256\"\n [readonly]=\"readonly\"\n ></textarea>\n </td>\n </tr>\n <!--createur-->\n <tr>\n <td>{{ '@hvy.procedure.creator' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"model.creator\" readonly />\n </td>\n </tr>\n <!--date de cr\u00E9ation-->\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"model.creationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n <!--date de derni\u00E8re modification-->\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"datetime-local\"\n class=\"a-form-field\"\n [value]=\"model.lastModificationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div class=\"o-hvy-procedure-detail__actions\">\n <h3>{{ '@hvy.procedure.actions' | i18n }} ({{ model.actions?.length }})</h3>\n <hvy-procedure-actions\n [actions]=\"model.actions\"\n (modified)=\"updateActions($event)\"\n [readonly]=\"readonly\"\n [readOnlyComment]=\"readOnlyComment\"\n mode=\"model\"\n [enableEditActions]=\"true\"\n ></hvy-procedure-actions>\n </div>\n }\n </div>\n </div>\n</div>\n" }]
|
|
3230
|
+
}], ctorParameters: () => [{ type: i1$5.Actions }], propDecorators: { model: [{
|
|
2815
3231
|
type: Input
|
|
2816
3232
|
}], username: [{
|
|
2817
3233
|
type: Input
|
|
2818
3234
|
}], title: [{
|
|
2819
3235
|
type: Input
|
|
2820
3236
|
}], eventErrors: [{
|
|
3237
|
+
type: Input
|
|
3238
|
+
}], eventErrorsChange: [{
|
|
2821
3239
|
type: Output
|
|
2822
3240
|
}], modified: [{
|
|
2823
3241
|
type: Output
|
|
2824
3242
|
}], readonly: [{
|
|
2825
3243
|
type: Input
|
|
3244
|
+
}], readOnlyComment: [{
|
|
3245
|
+
type: Input
|
|
2826
3246
|
}], cancelModifications: [{
|
|
2827
3247
|
type: Input
|
|
2828
3248
|
}] } });
|
|
@@ -2849,6 +3269,7 @@ const enTranslations = {
|
|
|
2849
3269
|
},
|
|
2850
3270
|
address: 'Address',
|
|
2851
3271
|
source: 'Source',
|
|
3272
|
+
externalId: 'External reference',
|
|
2852
3273
|
hypervisor: 'Hypervisor',
|
|
2853
3274
|
equipment: 'Equipment reference',
|
|
2854
3275
|
equipmentEntity: 'Equipment entity',
|
|
@@ -2859,6 +3280,8 @@ const enTranslations = {
|
|
|
2859
3280
|
startDate: 'Start date',
|
|
2860
3281
|
endDate: 'End date',
|
|
2861
3282
|
creationDate: 'Creation date',
|
|
3283
|
+
creator: 'Creator',
|
|
3284
|
+
errorDate: 'Please choose an end date after the start date.',
|
|
2862
3285
|
lastModificationDate: 'Modification date',
|
|
2863
3286
|
closeDate: 'Close date',
|
|
2864
3287
|
detail: 'Events description',
|
|
@@ -2957,6 +3380,12 @@ const enTranslations = {
|
|
|
2957
3380
|
}
|
|
2958
3381
|
},
|
|
2959
3382
|
procedure: {
|
|
3383
|
+
checkbox: {
|
|
3384
|
+
NEW: 'To do',
|
|
3385
|
+
IN_PROGRESS: 'In progress',
|
|
3386
|
+
DONE: 'Done',
|
|
3387
|
+
},
|
|
3388
|
+
alreadyExists: 'This title already exists, please choose another',
|
|
2960
3389
|
name: 'Procedure',
|
|
2961
3390
|
progress: 'Procedure progress %',
|
|
2962
3391
|
useCount: 'Usage',
|
|
@@ -3003,6 +3432,13 @@ const enTranslations = {
|
|
|
3003
3432
|
ASKED_SERVICE: 'Create service',
|
|
3004
3433
|
OTHER: 'Other'
|
|
3005
3434
|
}
|
|
3435
|
+
},
|
|
3436
|
+
status: {
|
|
3437
|
+
NEW: 'Créé',
|
|
3438
|
+
ASKED: 'Demandé',
|
|
3439
|
+
IN_PROGRESS: 'En cours',
|
|
3440
|
+
DONE: 'Terminé',
|
|
3441
|
+
CANCELLED: 'Annulé',
|
|
3006
3442
|
}
|
|
3007
3443
|
},
|
|
3008
3444
|
associationModal: {
|
|
@@ -3028,11 +3464,11 @@ const enTranslations = {
|
|
|
3028
3464
|
},
|
|
3029
3465
|
service: {
|
|
3030
3466
|
status: {
|
|
3031
|
-
|
|
3032
|
-
ASKED: '
|
|
3033
|
-
IN_PROGRESS: '
|
|
3034
|
-
DONE: '
|
|
3035
|
-
CANCELLED: '
|
|
3467
|
+
NEW: 'Created',
|
|
3468
|
+
ASKED: 'Asked',
|
|
3469
|
+
IN_PROGRESS: 'In progress',
|
|
3470
|
+
DONE: 'Done',
|
|
3471
|
+
CANCELLED: 'Cancelled'
|
|
3036
3472
|
},
|
|
3037
3473
|
title: 'Create service',
|
|
3038
3474
|
subtitle: 'Create service to process these events',
|
|
@@ -3063,6 +3499,7 @@ const frTranslations = {
|
|
|
3063
3499
|
name: 'Événement',
|
|
3064
3500
|
subCategory: {
|
|
3065
3501
|
name: 'Sous-catégorie',
|
|
3502
|
+
NONE: 'Aucune',
|
|
3066
3503
|
UNUSUAL_FLOW: 'Affluence anormale de personnes',
|
|
3067
3504
|
TRAFFIC_CONGESTION: 'Congestion de véhicules',
|
|
3068
3505
|
WILD_STORAGE: 'Dépôts sauvages'
|
|
@@ -3076,6 +3513,7 @@ const frTranslations = {
|
|
|
3076
3513
|
},
|
|
3077
3514
|
address: 'Adresse',
|
|
3078
3515
|
source: 'Source',
|
|
3516
|
+
externalId: 'Référence externe',
|
|
3079
3517
|
hypervisor: 'Hyperviseur',
|
|
3080
3518
|
equipment: "Référence de l'équipement",
|
|
3081
3519
|
equipmentEntity: "Entité de l'équipement",
|
|
@@ -3086,9 +3524,14 @@ const frTranslations = {
|
|
|
3086
3524
|
startDate: 'Date de début',
|
|
3087
3525
|
endDate: 'Date de fin',
|
|
3088
3526
|
creationDate: 'Date de création',
|
|
3527
|
+
creationDateTable: 'Création',
|
|
3528
|
+
creator: 'Créateur',
|
|
3529
|
+
errorDate: 'Veuillez saisir une date de fin postérieure à la date de début.',
|
|
3089
3530
|
lastModificationDate: 'Date de dernière modification',
|
|
3090
|
-
|
|
3091
|
-
|
|
3531
|
+
lastModificationDateTable: 'Modification',
|
|
3532
|
+
closeDate: 'Date de clôture',
|
|
3533
|
+
detail: `Description de l'événement`,
|
|
3534
|
+
details: 'Description des événements',
|
|
3092
3535
|
log: {
|
|
3093
3536
|
name: 'Journal des événements',
|
|
3094
3537
|
empty: 'Aucun événement.',
|
|
@@ -3111,7 +3554,7 @@ const frTranslations = {
|
|
|
3111
3554
|
procedure: {
|
|
3112
3555
|
delete: 'Supprimer la procédure',
|
|
3113
3556
|
progress: 'Progression',
|
|
3114
|
-
noAction: "Une procédure est une succession d'actions à réaliser selon l'ordre d'intervention",
|
|
3557
|
+
noAction: "Une procédure est une succession d'actions à réaliser selon l'ordre d'intervention.",
|
|
3115
3558
|
name: 'Procédure commune',
|
|
3116
3559
|
name1: 'Procédure',
|
|
3117
3560
|
none: 'Aucune procédure n’a été associée à cet événement.'
|
|
@@ -3179,7 +3622,7 @@ const frTranslations = {
|
|
|
3179
3622
|
from: 'Du',
|
|
3180
3623
|
to: 'au',
|
|
3181
3624
|
noContent: {
|
|
3182
|
-
NEW:
|
|
3625
|
+
NEW: 'Aucun nouvel événement.',
|
|
3183
3626
|
IN_PROGRESS: "Aucun événement n'est en cours.",
|
|
3184
3627
|
DONE: "Aucun événement n'est clôturé."
|
|
3185
3628
|
},
|
|
@@ -3196,6 +3639,12 @@ const frTranslations = {
|
|
|
3196
3639
|
}
|
|
3197
3640
|
},
|
|
3198
3641
|
procedure: {
|
|
3642
|
+
checkbox: {
|
|
3643
|
+
NEW: 'À faire',
|
|
3644
|
+
IN_PROGRESS: 'En cours',
|
|
3645
|
+
DONE: 'Terminé'
|
|
3646
|
+
},
|
|
3647
|
+
alreadyExists: 'Ce titre existe déjà. Veuillez en saisir un autre.',
|
|
3199
3648
|
name: 'Procédure',
|
|
3200
3649
|
progress: '% avancement procédure',
|
|
3201
3650
|
useCount: 'Usage',
|
|
@@ -3243,11 +3692,18 @@ const frTranslations = {
|
|
|
3243
3692
|
ASKED_SERVICE: "Créer une demande d'intervention",
|
|
3244
3693
|
OTHER: 'Autre'
|
|
3245
3694
|
}
|
|
3695
|
+
},
|
|
3696
|
+
status: {
|
|
3697
|
+
NEW: 'Créé',
|
|
3698
|
+
ASKED: 'Demandé',
|
|
3699
|
+
IN_PROGRESS: 'En cours',
|
|
3700
|
+
DONE: 'Terminé',
|
|
3701
|
+
CANCELLED: 'Annulé'
|
|
3246
3702
|
}
|
|
3247
3703
|
},
|
|
3248
3704
|
associationModal: {
|
|
3249
3705
|
title: 'Associer à une procédure',
|
|
3250
|
-
description: '
|
|
3706
|
+
description: 'Associer une procédure à des événements permet de sélectionner la liste des actions à réaliser pour traiter ces événements.',
|
|
3251
3707
|
linkedEvents: 'Événements liés',
|
|
3252
3708
|
categoryFilter: 'Filtrer par métier',
|
|
3253
3709
|
searchProcedure: 'Rechercher une procédure',
|
|
@@ -3256,7 +3712,7 @@ const frTranslations = {
|
|
|
3256
3712
|
},
|
|
3257
3713
|
action: {
|
|
3258
3714
|
consult: 'Consulter',
|
|
3259
|
-
close: '
|
|
3715
|
+
close: 'Clôturer',
|
|
3260
3716
|
send: 'Envoyer',
|
|
3261
3717
|
comment: 'Commenter',
|
|
3262
3718
|
associate: 'Associer à une procédure',
|
|
@@ -3268,7 +3724,7 @@ const frTranslations = {
|
|
|
3268
3724
|
},
|
|
3269
3725
|
service: {
|
|
3270
3726
|
status: {
|
|
3271
|
-
|
|
3727
|
+
NEW: 'Créé',
|
|
3272
3728
|
ASKED: 'Demandé',
|
|
3273
3729
|
IN_PROGRESS: 'En cours',
|
|
3274
3730
|
DONE: 'Terminé',
|
|
@@ -3311,7 +3767,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
3311
3767
|
const HypEventType = { values: ['ALERT', 'REPORT', 'OPERATOR'] };
|
|
3312
3768
|
|
|
3313
3769
|
const HypServiceStatus = {
|
|
3314
|
-
values: ['
|
|
3770
|
+
values: ['NEW', 'ASKED', 'IN_PROGRESS', 'DONE', 'CANCELLED']
|
|
3315
3771
|
};
|
|
3316
3772
|
|
|
3317
3773
|
const ENTITIES = {
|
|
@@ -3559,7 +4015,9 @@ class PvyHypervisorModule {
|
|
|
3559
4015
|
PryCoreModule,
|
|
3560
4016
|
PryI18nModule,
|
|
3561
4017
|
FormsModule,
|
|
3562
|
-
AsyncPipe
|
|
4018
|
+
AsyncPipe,
|
|
4019
|
+
TruncatePipe,
|
|
4020
|
+
DatePipe], exports: [EventDetailComponent,
|
|
3563
4021
|
EventListComponent,
|
|
3564
4022
|
EventColumnOrderComponent,
|
|
3565
4023
|
IconDisplayComponent,
|
|
@@ -3598,7 +4056,7 @@ class PvyHypervisorModule {
|
|
|
3598
4056
|
LastEventsComponent,
|
|
3599
4057
|
HvyEventDetailsTooltipComponent,
|
|
3600
4058
|
HvyEventAddEventComponent] }); }
|
|
3601
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PvyHypervisorModule, imports: [StoreModule.forFeature(hypFeatureKey, hypervisorReducer),
|
|
4059
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PvyHypervisorModule, providers: [I18nPipe], imports: [StoreModule.forFeature(hypFeatureKey, hypervisorReducer),
|
|
3602
4060
|
StoreModule.forFeature(eventFeatureKey, eventReducer),
|
|
3603
4061
|
StoreModule.forFeature(eventSummaryFeatureKey, eventSummaryReducer),
|
|
3604
4062
|
StoreModule.forFeature(procedureFeatureKey, procedureReducer),
|
|
@@ -3644,9 +4102,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
3644
4102
|
PryCoreModule,
|
|
3645
4103
|
PryI18nModule,
|
|
3646
4104
|
FormsModule,
|
|
3647
|
-
AsyncPipe
|
|
4105
|
+
AsyncPipe,
|
|
4106
|
+
TruncatePipe,
|
|
4107
|
+
DatePipe
|
|
3648
4108
|
],
|
|
3649
|
-
exports: [...components]
|
|
4109
|
+
exports: [...components],
|
|
4110
|
+
providers: [I18nPipe]
|
|
3650
4111
|
}]
|
|
3651
4112
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3652
4113
|
type: Inject,
|
|
@@ -3661,5 +4122,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
3661
4122
|
* Generated bundle index. Do not edit.
|
|
3662
4123
|
*/
|
|
3663
4124
|
|
|
3664
|
-
export { ACTIONS_TYPES, CategoryBackground, ChoiceFilterComponent, ColumnOrderComponent, DOMAINS, DateFilterComponent, DisplayLocaleDateTime, ENTITIES, EVENT_LINK, EVENT_TO_ICON, EquipmentService, EventActions, EventColumnOrderComponent, EventDetailComponent, EventEffects, EventFiltersComponent, EventIconPipe, EventListComponent, EventSelectors, EventService, EventSummaryActions, EventSummaryEffects, EventSummaryItemComponent, EventSummaryListComponent, EventSummaryPageComponent, EventSummarySelectors, ForDatetimeLocalPipe, HYP_BASE_CONFIG, HvyActionMenuComponent, HvyActionParameterComponent, HvyBaseParameterActionComponent, HvyCommentsComponent, HvyCreateServiceComponent, HvyEmailActionDisplayComponent, HvyEmailActionParameterComponent, HvyEventAddEventComponent, HvyEventDetailsTooltipComponent, HvyNoParamsActionDisplayComponent, HvyOtherActionDisplayComponent, HvyOtherActionParameterComponent, HvyPhoneActionDisplayComponent, HvyPhoneActionParameterComponent, HvyServiceActionDisplayComponent, HvyServiceActionParameterComponent, HypCommentsService, HypEventCategory, HypEventCriticality, HypEventStatus, HypEventSubCategory, HypEventType, HypSelectors, HypServiceStatus, HypervisorActions, HypervisorEffects, HypervisorService, IconDisplayComponent, ImmediateFiltersComponent, KNOWN_FILTER_SETS, LastEventsComponent, PAGE_SIZE_FETCH, PROCEDURE_LINK, PROCEDURE_PAGE_SIZE_FETCH, ProcedureActions, ProcedureActionsComponent, ProcedureAssociationModalComponent, ProcedureColumnOrderComponent, ProcedureEffects, ProcedureListComponent, ProcedureModelDetailComponent, ProcedureSelectors, ProcedureService, ProgressDisplayComponent, PvyHypervisorModule, StatusDisplayComponent, TextFilterComponent, displayDate, enTranslations, eventFeatureKey, eventForWriteAPI, eventInitialState, eventReducer, eventSummaryFeatureKey, eventSummaryInitialState, eventSummaryReducer, frTranslations, hypFeatureKey, hypInitialState, hypervisorReducer, padId, procedureFeatureKey, procedureForWriteAPI, procedureInitialState, procedureReducer };
|
|
4125
|
+
export { ACTIONS_TYPES, CategoryBackground, ChoiceFilterComponent, ColumnOrderComponent, DOMAINS, DateFilterComponent, DisplayLocaleDateTime, ENTITIES, EVENT_DETAIL_ACCESS_FN, EVENT_LINK, EVENT_TO_ICON, EquipmentService, EventActions, EventColumnOrderComponent, EventDetailComponent, EventEffects, EventFiltersComponent, EventIconPipe, EventListComponent, EventSelectors, EventService, EventSummaryActions, EventSummaryEffects, EventSummaryItemComponent, EventSummaryListComponent, EventSummaryPageComponent, EventSummarySelectors, ForDatetimeLocalPipe, HYP_BASE_CONFIG, HvyActionMenuComponent, HvyActionParameterComponent, HvyBaseParameterActionComponent, HvyCommentsComponent, HvyCreateServiceComponent, HvyEmailActionDisplayComponent, HvyEmailActionParameterComponent, HvyEventAddEventComponent, HvyEventDetailsTooltipComponent, HvyNoParamsActionDisplayComponent, HvyOtherActionDisplayComponent, HvyOtherActionParameterComponent, HvyPhoneActionDisplayComponent, HvyPhoneActionParameterComponent, HvyServiceActionDisplayComponent, HvyServiceActionParameterComponent, HypCommentsService, HypEventCategory, HypEventCriticality, HypEventStatus, HypEventSubCategory, HypEventType, HypSelectors, HypServiceStatus, HypervisorActions, HypervisorEffects, HypervisorService, IconDisplayComponent, ImmediateFiltersComponent, KNOWN_FILTER_SETS, LastEventsComponent, PAGE_SIZE_FETCH, PROCEDURE_LINK, PROCEDURE_PAGE_SIZE_FETCH, ProcedureActions, ProcedureActionsComponent, ProcedureAssociationModalComponent, ProcedureColumnOrderComponent, ProcedureEffects, ProcedureListComponent, ProcedureModelDetailComponent, ProcedureSelectors, ProcedureService, ProgressDisplayComponent, PvyHypervisorModule, StatusDisplayComponent, TextFilterComponent, TruncatePipe, displayDate, enTranslations, eventFeatureKey, eventForWriteAPI, eventInitialState, eventReducer, eventSummaryFeatureKey, eventSummaryInitialState, eventSummaryReducer, frTranslations, hypFeatureKey, hypInitialState, hypervisorReducer, padId, procedureFeatureKey, procedureForWriteAPI, procedureInitialState, procedureReducer };
|
|
3665
4126
|
//# sourceMappingURL=provoly-hypervisor.mjs.map
|