@provoly/hypervisor 0.0.59 → 0.0.61
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/event/detail/event-detail.component.mjs +23 -14
- package/esm2022/src/lib/event/filters/text/text-filter.component.mjs +34 -0
- package/esm2022/src/lib/event/list/event-list.component.mjs +3 -2
- package/esm2022/src/lib/event/public-api.mjs +2 -1
- package/esm2022/src/lib/general/pad-id.function.mjs +6 -0
- package/esm2022/src/lib/general/public-api.mjs +2 -1
- package/esm2022/src/lib/hypervisor.module.mjs +12 -4
- package/esm2022/src/lib/model/event/hyp-event.interface.mjs +1 -1
- package/esm2022/src/lib/model/procedure/hyp-procedure-model.interface.mjs +1 -1
- package/esm2022/src/lib/model/procedure/hyp-procedure.interface.mjs +1 -1
- package/esm2022/src/lib/procedure/detail/procedure-detail.component.mjs +14 -0
- package/esm2022/src/lib/procedure/list/procedure-list.component.mjs +23 -24
- package/esm2022/src/lib/procedure/public-api.mjs +2 -1
- package/esm2022/src/lib/store/event/event.actions.mjs +1 -1
- package/esm2022/src/lib/store/event/event.effects.mjs +3 -3
- package/esm2022/src/lib/store/event/event.reducer.mjs +1 -1
- package/esm2022/src/lib/store/event/event.service.mjs +6 -2
- package/esm2022/src/lib/store/procedure/procedure.actions.mjs +5 -3
- package/esm2022/src/lib/store/procedure/procedure.reducer.mjs +14 -6
- package/esm2022/src/lib/store/procedure/procedure.selectors.mjs +4 -4
- package/esm2022/src/lib/store/procedure/procedure.service.mjs +18 -12
- package/fesm2022/provoly-hypervisor.mjs +136 -64
- package/fesm2022/provoly-hypervisor.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/event/detail/event-detail.component.d.ts +4 -0
- package/src/lib/event/filters/text/text-filter.component.d.ts +14 -0
- package/src/lib/event/list/event-list.component.d.ts +1 -1
- package/src/lib/event/public-api.d.ts +1 -0
- package/src/lib/general/pad-id.function.d.ts +3 -0
- package/src/lib/general/public-api.d.ts +1 -0
- package/src/lib/hypervisor.module.d.ts +14 -12
- package/src/lib/model/event/hyp-event-detail.interface.d.ts +1 -1
- package/src/lib/model/event/hyp-event.interface.d.ts +1 -1
- package/src/lib/model/procedure/hyp-procedure-model.interface.d.ts +1 -1
- package/src/lib/model/procedure/hyp-procedure.interface.d.ts +3 -3
- package/src/lib/procedure/detail/procedure-detail.component.d.ts +8 -0
- package/src/lib/procedure/list/procedure-list.component.d.ts +10 -5
- package/src/lib/procedure/public-api.d.ts +1 -0
- package/src/lib/store/event/event.actions.d.ts +8 -8
- package/src/lib/store/event/event.effects.d.ts +2 -2
- package/src/lib/store/event/event.reducer.d.ts +1 -1
- package/src/lib/store/event/event.selectors.d.ts +1 -1
- package/src/lib/store/event/event.service.d.ts +5 -5
- package/src/lib/store/procedure/procedure.actions.d.ts +15 -5
- package/src/lib/store/procedure/procedure.reducer.d.ts +1 -1
- package/src/lib/store/procedure/procedure.selectors.d.ts +1 -1
- package/styles/components/_o-hvy-event-detail.scss +4 -0
- package/styles/components/_o-hvy-event-filters.scss +17 -0
- package/styles/components/_o-hvy-procedure-list.scss +6 -11
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Pipe, Component, Input, EventEmitter, Output, TemplateRef, ViewChild, ContentChildren, Directive, forwardRef, signal, computed, InjectionToken, NgModule, Inject } from '@angular/core';
|
|
3
3
|
import * as i3 from '@provoly/dashboard';
|
|
4
|
-
import { DEFAULT_ICON_URL, SubscriptionnerDirective, PryI18nModule, PryCoreModule, PrySinceDateModule, PryIconModule, PrySelectModule, PryDatePickerModule } from '@provoly/dashboard';
|
|
4
|
+
import { DEFAULT_ICON_URL, SubscriptionnerDirective, FilterParamEncoder, PryI18nModule, PryCoreModule, PrySinceDateModule, PryIconModule, PrySelectModule, PryDatePickerModule } 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 i3$1 from '@angular/cdk/overlay';
|
|
8
8
|
import { OverlayConfig } from '@angular/cdk/overlay';
|
|
9
9
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
10
|
-
import { mergeMap, of, fromEvent, catchError, withLatestFrom, filter, auditTime, combineLatest, map as map$1, BehaviorSubject, Subject, debounceTime, switchMap
|
|
10
|
+
import { mergeMap, of, fromEvent, catchError, withLatestFrom, filter, auditTime, combineLatest, map as map$1, BehaviorSubject, Subject, debounceTime, switchMap } from 'rxjs';
|
|
11
11
|
import equal from 'fast-deep-equal/es6';
|
|
12
12
|
import * as i1 from '@angular/common/http';
|
|
13
13
|
import { HttpParams } from '@angular/common/http';
|
|
14
14
|
import * as i4 from '@provoly/dashboard/components/checkbox';
|
|
15
15
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i5 from '@angular/forms';
|
|
17
17
|
import { FormsModule } from '@angular/forms';
|
|
18
18
|
import * as i1$2 from '@angular/common';
|
|
19
19
|
import { NgForOf, AsyncPipe, NgStyle, DatePipe, KeyValuePipe, JsonPipe } from '@angular/common';
|
|
@@ -67,6 +67,12 @@ const EventActions = {
|
|
|
67
67
|
associateProcedureFailure: createAction('[Event] Associate Procedure to Event Failure', props())
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
+
const padId = {
|
|
71
|
+
fn: (id) => {
|
|
72
|
+
return `${id}`.padStart(6, '0');
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
70
76
|
const HypervisorActions = {
|
|
71
77
|
setUrl: createAction('[Event] Set Backend Url', props())
|
|
72
78
|
};
|
|
@@ -280,6 +286,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
280
286
|
status: 'DONE',
|
|
281
287
|
all: false
|
|
282
288
|
};
|
|
289
|
+
this.padId = padId;
|
|
283
290
|
}
|
|
284
291
|
get events() {
|
|
285
292
|
return this._events.map((evt, idx) => ({ ...evt, ...(this.eventModifications[idx] ?? {}) }));
|
|
@@ -303,7 +310,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
303
310
|
const isDate = prop.indexOf('Date') > -1;
|
|
304
311
|
// @ts-ignore
|
|
305
312
|
const newValue = $event instanceof Event ? $event.target?.value : $event;
|
|
306
|
-
const correctedValue = !isDate ? newValue : `${newValue}
|
|
313
|
+
const correctedValue = !isDate ? newValue : `${newValue}.000000Z`;
|
|
307
314
|
// @ts-ignore
|
|
308
315
|
if (this._events[index][prop] !== correctedValue) {
|
|
309
316
|
if (!this.eventModifications[index]) {
|
|
@@ -531,6 +538,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
531
538
|
this.overlayRef.dispose();
|
|
532
539
|
this.overlayRef = undefined;
|
|
533
540
|
}
|
|
541
|
+
this.changeStatusContext.comment = '';
|
|
534
542
|
}
|
|
535
543
|
onMouseDown($event) {
|
|
536
544
|
this.dragTarget = $event.target;
|
|
@@ -580,24 +588,30 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
580
588
|
toggleActionStatus(index, $event) {
|
|
581
589
|
$event.preventDefault();
|
|
582
590
|
const newActions = [...this.procedure.actions];
|
|
583
|
-
newActions[index]
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
591
|
+
if (newActions[index].status !== 'DONE') {
|
|
592
|
+
newActions[index] = {
|
|
593
|
+
...newActions[index],
|
|
594
|
+
status: newActions[index].status === 'NEW' ? 'IN_PREGRESS' : 'NEW'
|
|
595
|
+
};
|
|
596
|
+
if (equal(newActions, this._procedure.actions)) {
|
|
597
|
+
delete this.procedureModifications.actions;
|
|
598
|
+
}
|
|
599
|
+
else {
|
|
600
|
+
this.procedureModifications.actions = newActions;
|
|
601
|
+
}
|
|
602
|
+
this._outputModifications();
|
|
592
603
|
}
|
|
593
|
-
|
|
604
|
+
}
|
|
605
|
+
get calculatedProgress() {
|
|
606
|
+
return Math.round((this.procedure.actions.filter((action) => action.status === 'DONE').length / this.procedure.actions.length) *
|
|
607
|
+
100);
|
|
594
608
|
}
|
|
595
609
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventDetailComponent, deps: [{ token: EquipmentService }, { token: i1$1.Store }, { token: i3$1.Overlay }, { token: i0.ViewContainerRef }, { token: i3.PrySnackbarService }, { token: i3.PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
596
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: EventDetailComponent, selector: "hvy-event-detail", inputs: { title: "title", events: "events", procedure: "procedure", cancelModifications: "cancelModifications", equipmentName: "equipmentName" }, outputs: { modifiedEvents: "modifiedEvents", modifiedProcedure: "modifiedProcedure", eventErrors: "eventErrors" }, viewQueries: [{ propertyName: "confirmDialog", first: true, predicate: ["confirmDialog"], descendants: true, read: TemplateRef }], 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 (events.length > 1) {\n @if (canCloseSome) {\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) {\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'... TODO: get closing comment ...'\"\n data-tooltip-position=\"bottom\"\n >\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 (canCloseSome) {\n <button class=\"a-btn a-btn--secondary\">{{ '@hvy.event.log.procedure.delete' | i18n }}</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 (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 <hvy-status-display\n [item]=\"event\"\n [modifiable]=\"event.status !== 'DONE'\"\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 />\n </td>\n </tr>\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 </tr>\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 </tr>\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 ></textarea>\n </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 ></textarea>\n </td>\n </tr>\n @if (['ALERT', 'REPORT'].includes(event.type)) {\n <tr>\n <td>{{ '@hvy.event.source' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.externalSourceRef ?? ''\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\"\n (change)=\"modifyEvent(idx, 'source', $event)\"\n />\n </td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.equipment?.name ?? ''\"\n [class.-error]=\"hasError('equipment', idx)\"\n [readonly]=\"accessValue.eqName\"\n (change)=\"changeEquipment(idx, $event)\"\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]=\"event.equipment?.entity ?? ''\"\n readonly\n />\n </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 </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 step=\"1\"\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 </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 step=\"1\"\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 </tr>\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.closeDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n </tbody>\n </table>\n <div class=\"o-hvy-events-detail__events__event__content__comments\">\n <h3>{{ '@hvy.event.log.event.comments.name' | i18n }} :</h3>\n <textarea\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComentContent\"\n ></textarea>\n <div class=\"o-hvy-events-detail__events__event__content__comments__button\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"newComentContent.length === 0\">\n {{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n </div>\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]=\"procedure.progress\"></hvy-progress-display>\n </div>\n <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 procedure.actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"true\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox\n [ngModel]=\"action.status === 'DONE'\"\n (click)=\"toggleActionStatus(idx, $event)\"\n ></pry-checkbox>\n <div>{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n } @empty {\n <div>\n {{ '@hvy.event.log.procedure.noAction' | i18n }}\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure__button\">\n <button class=\"a-btn a-btn--primary\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.event.log.procedure.addAction' | i18n }}\n </button>\n </div>\n } @else {\n <button class=\"a-btn a-btn--secondary\" [disabled]=\"!canAssociateProcedure\">\n {{ '@hvy.action.associate' | i18n }}\n </button>\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: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i4$1.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: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "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: ["item", "modifiable"], outputs: ["modified"] }, { kind: "component", type: ProgressDisplayComponent, selector: "hvy-progress-display", inputs: ["progress"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: ForDatetimeLocalPipe, name: "forDateTimeLocal" }] }); }
|
|
610
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: EventDetailComponent, selector: "hvy-event-detail", inputs: { title: "title", events: "events", procedure: "procedure", cancelModifications: "cancelModifications", equipmentName: "equipmentName" }, outputs: { modifiedEvents: "modifiedEvents", modifiedProcedure: "modifiedProcedure", eventErrors: "eventErrors" }, viewQueries: [{ propertyName: "confirmDialog", first: true, predicate: ["confirmDialog"], descendants: true, read: TemplateRef }], 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 (events.length > 1) {\n @if (canCloseSome) {\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) {\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'... TODO: get closing comment ...'\"\n data-tooltip-position=\"bottom\"\n >\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 (canCloseSome) {\n <button class=\"a-btn a-btn--secondary\">{{ '@hvy.event.log.procedure.delete' | i18n }}</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 (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 <hvy-status-display\n [item]=\"event\"\n [modifiable]=\"event.status !== 'DONE'\"\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 />\n </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 </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 </tr>\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 </tr>\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 ></textarea>\n </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 ></textarea>\n </td>\n </tr>\n @if (['ALERT', 'REPORT'].includes(event.type)) {\n <tr>\n <td>{{ '@hvy.event.source' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.externalSourceRef ?? ''\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\"\n (change)=\"modifyEvent(idx, 'source', $event)\"\n />\n </td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.equipment?.name ?? ''\"\n [class.-error]=\"hasError('equipment', idx)\"\n [readonly]=\"accessValue.eqName\"\n (change)=\"changeEquipment(idx, $event)\"\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]=\"event.equipment?.entity ?? ''\"\n readonly\n />\n </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 </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 step=\"1\"\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 </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 step=\"1\"\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 </tr>\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.closeDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n </tbody>\n </table>\n <div class=\"o-hvy-events-detail__events__event__content__comments\">\n <h3>{{ '@hvy.event.log.event.comments.name' | i18n }} :</h3>\n <textarea\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComentContent\"\n ></textarea>\n <div class=\"o-hvy-events-detail__events__event__content__comments__button\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"newComentContent.length === 0\">\n {{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n </div>\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 <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 procedure.actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"true\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox\n [ngModel]=\"action.status !== 'NEW'\"\n (click)=\"toggleActionStatus(idx, $event)\"\n [disabled]=\"action.status === 'DONE'\"\n ></pry-checkbox>\n <div [class.-done]=\"action.status === 'DONE'\">{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n } @empty {\n <div>\n {{ '@hvy.event.log.procedure.noAction' | i18n }}\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure__button\">\n <button class=\"a-btn a-btn--primary\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.event.log.procedure.addAction' | i18n }}\n </button>\n </div>\n } @else {\n <button class=\"a-btn a-btn--secondary\" [disabled]=\"!canAssociateProcedure\">\n {{ '@hvy.action.associate' | i18n }}\n </button>\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: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "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: ["item", "modifiable"], outputs: ["modified"] }, { kind: "component", type: ProgressDisplayComponent, selector: "hvy-progress-display", inputs: ["progress"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: ForDatetimeLocalPipe, name: "forDateTimeLocal" }] }); }
|
|
597
611
|
}
|
|
598
612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventDetailComponent, decorators: [{
|
|
599
613
|
type: Component,
|
|
600
|
-
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 (events.length > 1) {\n @if (canCloseSome) {\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) {\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'... TODO: get closing comment ...'\"\n data-tooltip-position=\"bottom\"\n >\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 (canCloseSome) {\n <button class=\"a-btn a-btn--secondary\">{{ '@hvy.event.log.procedure.delete' | i18n }}</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 (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 <hvy-status-display\n [item]=\"event\"\n [modifiable]=\"event.status !== 'DONE'\"\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 />\n </td>\n </tr>\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 </tr>\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 </tr>\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 ></textarea>\n </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 ></textarea>\n </td>\n </tr>\n @if (['ALERT', 'REPORT'].includes(event.type)) {\n <tr>\n <td>{{ '@hvy.event.source' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.externalSourceRef ?? ''\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\"\n (change)=\"modifyEvent(idx, 'source', $event)\"\n />\n </td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.equipment?.name ?? ''\"\n [class.-error]=\"hasError('equipment', idx)\"\n [readonly]=\"accessValue.eqName\"\n (change)=\"changeEquipment(idx, $event)\"\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]=\"event.equipment?.entity ?? ''\"\n readonly\n />\n </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 </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 step=\"1\"\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 </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 step=\"1\"\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 </tr>\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.closeDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n </tbody>\n </table>\n <div class=\"o-hvy-events-detail__events__event__content__comments\">\n <h3>{{ '@hvy.event.log.event.comments.name' | i18n }} :</h3>\n <textarea\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComentContent\"\n ></textarea>\n <div class=\"o-hvy-events-detail__events__event__content__comments__button\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"newComentContent.length === 0\">\n {{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n </div>\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]=\"procedure.progress\"></hvy-progress-display>\n </div>\n <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 procedure.actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"true\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox\n [ngModel]=\"action.status === 'DONE'\"\n (click)=\"toggleActionStatus(idx, $event)\"\n ></pry-checkbox>\n <div>{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n } @empty {\n <div>\n {{ '@hvy.event.log.procedure.noAction' | i18n }}\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure__button\">\n <button class=\"a-btn a-btn--primary\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.event.log.procedure.addAction' | i18n }}\n </button>\n </div>\n } @else {\n <button class=\"a-btn a-btn--secondary\" [disabled]=\"!canAssociateProcedure\">\n {{ '@hvy.action.associate' | i18n }}\n </button>\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" }]
|
|
614
|
+
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 (events.length > 1) {\n @if (canCloseSome) {\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) {\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'... TODO: get closing comment ...'\"\n data-tooltip-position=\"bottom\"\n >\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 (canCloseSome) {\n <button class=\"a-btn a-btn--secondary\">{{ '@hvy.event.log.procedure.delete' | i18n }}</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 (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 <hvy-status-display\n [item]=\"event\"\n [modifiable]=\"event.status !== 'DONE'\"\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 />\n </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 </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 </tr>\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 </tr>\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 ></textarea>\n </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 ></textarea>\n </td>\n </tr>\n @if (['ALERT', 'REPORT'].includes(event.type)) {\n <tr>\n <td>{{ '@hvy.event.source' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.externalSourceRef ?? ''\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\"\n (change)=\"modifyEvent(idx, 'source', $event)\"\n />\n </td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }} :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [value]=\"event.equipment?.name ?? ''\"\n [class.-error]=\"hasError('equipment', idx)\"\n [readonly]=\"accessValue.eqName\"\n (change)=\"changeEquipment(idx, $event)\"\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]=\"event.equipment?.entity ?? ''\"\n readonly\n />\n </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 </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 step=\"1\"\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 </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 step=\"1\"\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 </tr>\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }} :</td>\n <td>\n <input\n type=\"datetime-local\"\n step=\"1\"\n class=\"a-form-field\"\n [value]=\"event.closeDate | forDateTimeLocal\"\n readonly\n />\n </td>\n </tr>\n </tbody>\n </table>\n <div class=\"o-hvy-events-detail__events__event__content__comments\">\n <h3>{{ '@hvy.event.log.event.comments.name' | i18n }} :</h3>\n <textarea\n [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComentContent\"\n ></textarea>\n <div class=\"o-hvy-events-detail__events__event__content__comments__button\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"newComentContent.length === 0\">\n {{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n </div>\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 <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 procedure.actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"true\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox\n [ngModel]=\"action.status !== 'NEW'\"\n (click)=\"toggleActionStatus(idx, $event)\"\n [disabled]=\"action.status === 'DONE'\"\n ></pry-checkbox>\n <div [class.-done]=\"action.status === 'DONE'\">{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n } @empty {\n <div>\n {{ '@hvy.event.log.procedure.noAction' | i18n }}\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure__button\">\n <button class=\"a-btn a-btn--primary\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.event.log.procedure.addAction' | i18n }}\n </button>\n </div>\n } @else {\n <button class=\"a-btn a-btn--secondary\" [disabled]=\"!canAssociateProcedure\">\n {{ '@hvy.action.associate' | i18n }}\n </button>\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" }]
|
|
601
615
|
}], ctorParameters: () => [{ type: EquipmentService }, { type: i1$1.Store }, { type: i3$1.Overlay }, { type: i0.ViewContainerRef }, { type: i3.PrySnackbarService }, { type: i3.PryI18nService }], propDecorators: { modifiedEvents: [{
|
|
602
616
|
type: Output
|
|
603
617
|
}], modifiedProcedure: [{
|
|
@@ -755,7 +769,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
755
769
|
}], ctorParameters: () => [{ type: i1$1.Store }] });
|
|
756
770
|
|
|
757
771
|
const EVENT_LINK = {
|
|
758
|
-
fn: (event, store) => ['./', event.id]
|
|
772
|
+
fn: (event, store) => ['./', padId.fn(event.id)]
|
|
759
773
|
};
|
|
760
774
|
class EventListComponent extends SubscriptionnerDirective {
|
|
761
775
|
constructor(store, el, router, scroll) {
|
|
@@ -800,7 +814,7 @@ class EventListComponent extends SubscriptionnerDirective {
|
|
|
800
814
|
return this.router.navigate(this.EVENT_LINK.fn(event, this.store));
|
|
801
815
|
}
|
|
802
816
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventListComponent, deps: [{ token: i1$1.Store }, { token: i0.ElementRef }, { token: i2.Router }, { token: InfiniteScrollService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
803
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: EventListComponent, selector: "hvy-event-list", 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>{{ '@hvy.event.criticality.name' | i18n }}</th>\n <th>{{ '@hvy.event.name' | i18n }}</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=\"procedureProgress\"\n >{{ '@hvy.procedure.progress' | i18n }}\n </hvy-event-column-order>\n </th>\n <th>{{ '@hvy.event.category.name' | i18n }}</th>\n <th>\n <hvy-event-column-order field=\"lastModificationDate\"\n >{{ '@hvy.event.lastModificationDate' | 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\" (click)=\"goTo(event)\">\n <td class=\"o-hvy-events-table__line__cell\">\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\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\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 {{ event.equipment?.name ? event.equipment?.name : '' }}\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\">\n <hvy-status-display [item]=\"event\"></hvy-status-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">{{ event.procedureProgress }} %</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ '@hvy.event.category.' + event.category | i18n }}</td>\n <td class=\"o-hvy-events-table__line__cell\">\n {{ event.lastModificationDate | sinceDate: { onlyLocale: true } }}\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\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 </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"] }, { kind: "directive", type:
|
|
817
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: EventListComponent, selector: "hvy-event-list", 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>{{ '@hvy.event.criticality.name' | i18n }}</th>\n <th>{{ '@hvy.event.name' | i18n }}</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=\"procedureProgress\"\n >{{ '@hvy.procedure.progress' | i18n }}\n </hvy-event-column-order>\n </th>\n <th>{{ '@hvy.event.category.name' | i18n }}</th>\n <th>\n <hvy-event-column-order field=\"lastModificationDate\"\n >{{ '@hvy.event.lastModificationDate' | 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\" (click)=\"goTo(event)\">\n <td class=\"o-hvy-events-table__line__cell\">\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\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\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 {{ event.equipment?.name ? event.equipment?.name : '' }}\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\">\n <hvy-status-display [item]=\"event\"></hvy-status-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">{{ event.procedureProgress }} %</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ '@hvy.event.category.' + event.category | i18n }}</td>\n <td class=\"o-hvy-events-table__line__cell\">\n {{ event.lastModificationDate | sinceDate: { onlyLocale: true } }}\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\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 </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"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.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: ["item", "modifiable"], outputs: ["modified"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i3.SinceDatePipe, name: "sinceDate" }] }); }
|
|
804
818
|
}
|
|
805
819
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventListComponent, decorators: [{
|
|
806
820
|
type: Component,
|
|
@@ -1000,7 +1014,7 @@ class ChoiceFilterComponent extends HvyUnitFilterComponent {
|
|
|
1000
1014
|
setTimeout(() => (this.inhibate = undefined), 50);
|
|
1001
1015
|
}
|
|
1002
1016
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ChoiceFilterComponent, deps: [{ token: i1$1.Store }, { token: i3$1.Overlay }, { token: i0.ViewContainerRef }, { token: i3.PryI18nService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1003
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ChoiceFilterComponent, selector: "hvy-choice-filter", inputs: { label: "label", i18nPrefix: "i18nPrefix", choices: "choices" }, providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => ChoiceFilterComponent) }], viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<button (click)=\"toggleModal()\" #button class=\"o-hvy-choice-filter -horizontal\"\n [class.-highlight]=\"displayValue() !== ('@hvy.event.filter.choice.all' | i18n)\" [class.-focus]=\"overlayRef\">\n <div class=\"o-hvy-choice-filter__choice-value\">\n <span class=\"o-hvy-choice-filter__label\">{{ label | i18n }} :</span>\n <span class=\"o-hvy-choice-filter__value\" type=\"text\" id=\"select_{{id}}\">{{ displayValue() }}</span>\n </div>\n <pry-icon [iconSvg]=\"!!overlayRef ? 'chevron_top' : 'chevron_bottom'\" [width]=\"10\" [height]=\"10\"></pry-icon>\n</button>\n\n<ng-template #template>\n <div\n class=\"m-context-menu o-hvy-choice-filter\"\n aria-labelledby=\"choice\"\n tabindex=\"-1\"\n id=\"choice\"\n role=\"menu\"\n aria-modal=\"true\"\n >\n <div class=\"o-hvy-choice-filter__all\">\n <pry-checkbox [ngModel]=\"allSelected()\" (ngModelChange)=\"clickAll()\">\n <span>{{ '@hvy.event.filter.choice.all' | i18n }}</span>\n </pry-checkbox>\n </div>\n @for (elt of choices; track elt.key) {\n @if (!elt.children) {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n } @else {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n @for (child of elt.children; track child.key) {\n <pry-checkbox [ngModel]=\"isSelected(child)\" (ngModelChange)=\"toggle(child)\"\n class=\"o-hvy-choice-filter__child\">\n <span>{{ i18nPrefix + child.key | i18n }}</span>\n </pry-checkbox>\n }\n }\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type:
|
|
1017
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ChoiceFilterComponent, selector: "hvy-choice-filter", inputs: { label: "label", i18nPrefix: "i18nPrefix", choices: "choices" }, providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => ChoiceFilterComponent) }], viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<button (click)=\"toggleModal()\" #button class=\"o-hvy-choice-filter -horizontal\"\n [class.-highlight]=\"displayValue() !== ('@hvy.event.filter.choice.all' | i18n)\" [class.-focus]=\"overlayRef\">\n <div class=\"o-hvy-choice-filter__choice-value\">\n <span class=\"o-hvy-choice-filter__label\">{{ label | i18n }} :</span>\n <span class=\"o-hvy-choice-filter__value\" type=\"text\" id=\"select_{{id}}\">{{ displayValue() }}</span>\n </div>\n <pry-icon [iconSvg]=\"!!overlayRef ? 'chevron_top' : 'chevron_bottom'\" [width]=\"10\" [height]=\"10\"></pry-icon>\n</button>\n\n<ng-template #template>\n <div\n class=\"m-context-menu o-hvy-choice-filter\"\n aria-labelledby=\"choice\"\n tabindex=\"-1\"\n id=\"choice\"\n role=\"menu\"\n aria-modal=\"true\"\n >\n <div class=\"o-hvy-choice-filter__all\">\n <pry-checkbox [ngModel]=\"allSelected()\" (ngModelChange)=\"clickAll()\">\n <span>{{ '@hvy.event.filter.choice.all' | i18n }}</span>\n </pry-checkbox>\n </div>\n @for (elt of choices; track elt.key) {\n @if (!elt.children) {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n } @else {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n @for (child of elt.children; track child.key) {\n <pry-checkbox [ngModel]=\"isSelected(child)\" (ngModelChange)=\"toggle(child)\"\n class=\"o-hvy-choice-filter__child\">\n <span>{{ i18nPrefix + child.key | i18n }}</span>\n </pry-checkbox>\n }\n }\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
1004
1018
|
}
|
|
1005
1019
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ChoiceFilterComponent, decorators: [{
|
|
1006
1020
|
type: Component,
|
|
@@ -1016,13 +1030,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
1016
1030
|
args: ['template', { read: TemplateRef }]
|
|
1017
1031
|
}] } });
|
|
1018
1032
|
|
|
1033
|
+
class TextFilterComponent extends HvyUnitFilterComponent {
|
|
1034
|
+
constructor(store) {
|
|
1035
|
+
super();
|
|
1036
|
+
this.store = store;
|
|
1037
|
+
this.value = '';
|
|
1038
|
+
this.subscriptions.add(combineLatest([this.store.select(EventSelectors.filters), this._filterSet$]).subscribe(([filters, filterSet]) => {
|
|
1039
|
+
this.value = (filters[filterSet] ?? {})[this.prop] ? (filters[filterSet] ?? {})[this.prop][0] ?? '' : '';
|
|
1040
|
+
}));
|
|
1041
|
+
}
|
|
1042
|
+
getParams() {
|
|
1043
|
+
if (this.value === '') {
|
|
1044
|
+
return {};
|
|
1045
|
+
}
|
|
1046
|
+
return { [this.prop]: [this.value] };
|
|
1047
|
+
}
|
|
1048
|
+
triggerChange($event) {
|
|
1049
|
+
// @ts-ignore
|
|
1050
|
+
this.value = $event instanceof Event ? $event.target?.value : $event;
|
|
1051
|
+
}
|
|
1052
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: TextFilterComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1053
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: TextFilterComponent, selector: "hvy-text-filter", 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 (change)=\"triggerChange($event)\"\n placeholder=\"{{ '@hvy.action.search' | i18n }}...\"\n />\n <pry-icon iconSvg=\"search\" class=\"o-hvy-text-filters__search-icon\"></pry-icon>\n</div>\n", dependencies: [{ kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
1054
|
+
}
|
|
1055
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: TextFilterComponent, decorators: [{
|
|
1056
|
+
type: Component,
|
|
1057
|
+
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 (change)=\"triggerChange($event)\"\n placeholder=\"{{ '@hvy.action.search' | i18n }}...\"\n />\n <pry-icon iconSvg=\"search\" class=\"o-hvy-text-filters__search-icon\"></pry-icon>\n</div>\n" }]
|
|
1058
|
+
}], ctorParameters: () => [{ type: i1$1.Store }] });
|
|
1059
|
+
|
|
1019
1060
|
const ProcedureActions = {
|
|
1020
1061
|
load: createAction('[Procedure] Load Procedures', props()),
|
|
1021
1062
|
loadSuccess: createAction('[Procedure] (bus) Load Procedure Success', props()),
|
|
1022
1063
|
loadFailure: createAction('[Procedure] Load Procedures Failure', props()),
|
|
1023
1064
|
sort: createAction('[Procedure] Set Procedure List Sorting', props()),
|
|
1024
|
-
|
|
1025
|
-
|
|
1065
|
+
setCategory: createAction('[Procedure] Set Category Value', props()),
|
|
1066
|
+
model: createAction('[Procedure] Get Procedure Model', props()),
|
|
1067
|
+
modelSuccess: createAction('[Procedure] Get Procedure Model', props()),
|
|
1068
|
+
modelFailure: createAction('[Procedure] Get Procedure Model', props())
|
|
1026
1069
|
};
|
|
1027
1070
|
|
|
1028
1071
|
const procedureFeatureKey = '@hvy/procedure';
|
|
@@ -1046,16 +1089,24 @@ const internalReducer$1 = createReducer(procedureInitialState, on(ProcedureActio
|
|
|
1046
1089
|
loading: false,
|
|
1047
1090
|
procedures: [],
|
|
1048
1091
|
noMoreProcedures: false
|
|
1049
|
-
})), on(ProcedureActions.search, (state, { search }) => ({
|
|
1050
|
-
...state,
|
|
1051
|
-
procedures: [],
|
|
1052
|
-
noMoreProcedures: false,
|
|
1053
|
-
search
|
|
1054
1092
|
})), on(ProcedureActions.sort, (state, { field, order }) => ({
|
|
1055
1093
|
...state,
|
|
1056
1094
|
procedures: [],
|
|
1057
1095
|
noMoreProcedures: false,
|
|
1058
1096
|
sort: { field, order }
|
|
1097
|
+
})), on(ProcedureActions.model, (state) => ({
|
|
1098
|
+
...state,
|
|
1099
|
+
model: undefined,
|
|
1100
|
+
loading: true
|
|
1101
|
+
})), on(ProcedureActions.modelSuccess, (state, action) => ({
|
|
1102
|
+
...state,
|
|
1103
|
+
model: action.model,
|
|
1104
|
+
loading: false
|
|
1105
|
+
})), on(ProcedureActions.modelFailure, (state, action) => ({
|
|
1106
|
+
...state,
|
|
1107
|
+
model: undefined,
|
|
1108
|
+
loading: false,
|
|
1109
|
+
error: action.error
|
|
1059
1110
|
})));
|
|
1060
1111
|
function procedureReducer(state, action) {
|
|
1061
1112
|
return internalReducer$1(state, action);
|
|
@@ -1065,15 +1116,15 @@ const feature$1 = createFeatureSelector(procedureFeatureKey);
|
|
|
1065
1116
|
const procedures = createSelector(feature$1, (state) => state.procedures);
|
|
1066
1117
|
const noMoreProcedures = createSelector(feature$1, (state) => state.noMoreProcedures);
|
|
1067
1118
|
const loading$1 = createSelector(feature$1, (state) => state.loading);
|
|
1068
|
-
const search = createSelector(feature$1, (state) => state.search);
|
|
1069
1119
|
const sort = createSelector(feature$1, (state) => state.sort);
|
|
1120
|
+
const model = createSelector(feature$1, (state) => state.model);
|
|
1070
1121
|
const ProcedureSelectors = {
|
|
1071
1122
|
feature: feature$1,
|
|
1072
1123
|
procedures,
|
|
1073
1124
|
loading: loading$1,
|
|
1074
1125
|
noMoreProcedures,
|
|
1075
|
-
|
|
1076
|
-
|
|
1126
|
+
sort,
|
|
1127
|
+
model
|
|
1077
1128
|
};
|
|
1078
1129
|
|
|
1079
1130
|
const PROCEDURE_PAGE_SIZE_FETCH = { value: 20 };
|
|
@@ -1083,28 +1134,32 @@ class ProcedureService {
|
|
|
1083
1134
|
this.store = store;
|
|
1084
1135
|
}
|
|
1085
1136
|
list(startWith = 0, pageSize = PROCEDURE_PAGE_SIZE_FETCH.value) {
|
|
1086
|
-
return
|
|
1087
|
-
|
|
1137
|
+
return combineLatest([
|
|
1138
|
+
this.store.select(HypSelectors.url),
|
|
1139
|
+
this.store.select(ProcedureSelectors.sort),
|
|
1140
|
+
this.store.select(EventSelectors.filters).pipe(map$1((filters) => filters['procedure'] ?? {}))
|
|
1141
|
+
]).pipe(mergeMap(([url, sort, filters]) => {
|
|
1142
|
+
let params = new HttpParams({ encoder: new FilterParamEncoder() });
|
|
1143
|
+
Object.keys(filters).forEach((filter) => {
|
|
1144
|
+
filters[filter].forEach((filterValue) => {
|
|
1145
|
+
params = params.append(filter, filterValue);
|
|
1146
|
+
});
|
|
1147
|
+
});
|
|
1088
1148
|
params = params.set('page', startWith / pageSize + 1);
|
|
1089
|
-
if (search)
|
|
1090
|
-
params = params.set('search', search);
|
|
1091
1149
|
if (sort)
|
|
1092
1150
|
params = params.set('sort', sort.field).set('order', sort.order);
|
|
1093
|
-
return this.httpClient.get(encodeURI(`${url}/procedures/
|
|
1151
|
+
return this.httpClient.get(encodeURI(`${url}/procedures/model`), { params });
|
|
1094
1152
|
}));
|
|
1095
1153
|
}
|
|
1096
1154
|
getTop10ByUsage(domain, nameSearch) {
|
|
1097
1155
|
return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
|
|
1098
1156
|
let params = new HttpParams();
|
|
1099
|
-
params = params
|
|
1100
|
-
.set('sort', 'useCount')
|
|
1101
|
-
.set('order', 'desc')
|
|
1102
|
-
.set('pageSize', '10');
|
|
1157
|
+
params = params.set('sort', 'useCount').set('order', 'desc').set('pageSize', '10');
|
|
1103
1158
|
if (nameSearch)
|
|
1104
1159
|
params = params.set('name', nameSearch);
|
|
1105
1160
|
if (domain)
|
|
1106
1161
|
params = params.set('domain', domain);
|
|
1107
|
-
return this.httpClient.get(encodeURI(`${url}/procedures/
|
|
1162
|
+
return this.httpClient.get(encodeURI(`${url}/procedures/model`), { params });
|
|
1108
1163
|
}));
|
|
1109
1164
|
}
|
|
1110
1165
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureService, deps: [{ token: i1.HttpClient }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -1156,7 +1211,7 @@ class ProcedureAssociationModalComponent extends SubscriptionnerDirective {
|
|
|
1156
1211
|
this.dialog.close();
|
|
1157
1212
|
}
|
|
1158
1213
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureAssociationModalComponent, deps: [{ token: i1$1.Store }, { token: ProcedureService }, { token: i3.PryDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1159
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProcedureAssociationModalComponent, selector: "hvy-procedure-association-modal", 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\"></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"procedure-filter\">{{ '@hvy.associationModal.searchProcedure' | i18n }}<span class=\"text-error\">*</span> : </label>\n <pry-select\n [items]=\"procedures$ | async\"\n bindLabel=\"name\"\n [(ngModel)]=\"procedureSelectValue\"\n (ngModelChange)=\"selectedProcedureChange($event)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.associationModal.procedurePlaceholder' | i18n\"\n id=\"procedure-filter\"></pry-select>\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]=\"!isProcedureSelected()\" (click)=\"associateProcedure()\">{{ '@hvy.action.validate' | i18n }}</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:
|
|
1214
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProcedureAssociationModalComponent, selector: "hvy-procedure-association-modal", 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\"></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"procedure-filter\">{{ '@hvy.associationModal.searchProcedure' | i18n }}<span class=\"text-error\">*</span> : </label>\n <pry-select\n [items]=\"procedures$ | async\"\n bindLabel=\"name\"\n [(ngModel)]=\"procedureSelectValue\"\n (ngModelChange)=\"selectedProcedureChange($event)\"\n [autocomplete]=\"true\"\n [externalAutocompleteService]=\"true\"\n [placeholder]=\"'@hvy.associationModal.procedurePlaceholder' | i18n\"\n id=\"procedure-filter\"></pry-select>\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]=\"!isProcedureSelected()\" (click)=\"associateProcedure()\">{{ '@hvy.action.validate' | i18n }}</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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "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: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
1160
1215
|
}
|
|
1161
1216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureAssociationModalComponent, decorators: [{
|
|
1162
1217
|
type: Component,
|
|
@@ -1256,6 +1311,10 @@ class EventService {
|
|
|
1256
1311
|
}));
|
|
1257
1312
|
}
|
|
1258
1313
|
save(event) {
|
|
1314
|
+
const toSend = { ...event };
|
|
1315
|
+
if (event.id < 0) {
|
|
1316
|
+
delete toSend.id;
|
|
1317
|
+
}
|
|
1259
1318
|
return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
|
|
1260
1319
|
return this.httpClient.post(encodeURI(`${url}/events/${event.type.toLowerCase()}`), eventForWriteAPI(event));
|
|
1261
1320
|
}));
|
|
@@ -1277,7 +1336,7 @@ class EventService {
|
|
|
1277
1336
|
}
|
|
1278
1337
|
associateProcedure(procedureId) {
|
|
1279
1338
|
return this.store.select(HypSelectors.url).pipe(withLatestFrom(this.store.select(EventSelectors.selectedIds)), mergeMap(([url, selectedIds]) => {
|
|
1280
|
-
return this.httpClient.put(encodeURI(`${url}/procedures/
|
|
1339
|
+
return this.httpClient.put(encodeURI(`${url}/procedures/model/id/${procedureId}`), {
|
|
1281
1340
|
id: procedureId,
|
|
1282
1341
|
events: selectedIds
|
|
1283
1342
|
});
|
|
@@ -1383,7 +1442,7 @@ class EventSummaryPageComponent extends SubscriptionnerDirective {
|
|
|
1383
1442
|
this.store.dispatch(EventSummaryActions.load());
|
|
1384
1443
|
}
|
|
1385
1444
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventSummaryPageComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1386
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: EventSummaryPageComponent, selector: "hvy-event-summary-page", inputs: { pageTitle: "pageTitle", consultLink: "consultLink" }, 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 <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 >\n </hvy-event-summary-list>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type:
|
|
1445
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: EventSummaryPageComponent, selector: "hvy-event-summary-page", inputs: { pageTitle: "pageTitle", consultLink: "consultLink" }, 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 <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 >\n </hvy-event-summary-list>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "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"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
1387
1446
|
}
|
|
1388
1447
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventSummaryPageComponent, decorators: [{
|
|
1389
1448
|
type: Component,
|
|
@@ -1415,25 +1474,21 @@ const PROCEDURE_LINK = {
|
|
|
1415
1474
|
fn: (procedure, store) => ['./', procedure.id]
|
|
1416
1475
|
};
|
|
1417
1476
|
class ProcedureListComponent extends SubscriptionnerDirective {
|
|
1418
|
-
constructor(store,
|
|
1477
|
+
constructor(store, router, scroll) {
|
|
1419
1478
|
super();
|
|
1420
1479
|
this.store = store;
|
|
1421
|
-
this.el = el;
|
|
1422
1480
|
this.router = router;
|
|
1423
1481
|
this.scroll = scroll;
|
|
1424
1482
|
this.PROCEDURE_LINK = PROCEDURE_LINK;
|
|
1425
1483
|
this.search = '';
|
|
1426
|
-
this.search$ = new Subject;
|
|
1484
|
+
this.search$ = new Subject();
|
|
1485
|
+
this.DOMAINS = DOMAINS.values.map((d) => ({ key: d }));
|
|
1486
|
+
this.padId = padId;
|
|
1427
1487
|
this.store.dispatch(ProcedureActions.load({}));
|
|
1428
1488
|
this.procedures$ = this.store.select(ProcedureSelectors.procedures);
|
|
1429
|
-
this.subscriptions.add(this.search$.pipe(debounceTime$1(300), distinctUntilChanged()).subscribe((search) => {
|
|
1430
|
-
throw Error('Search not implemented.');
|
|
1431
|
-
this.store.dispatch(ProcedureActions.search({ search }));
|
|
1432
|
-
}));
|
|
1433
1489
|
}
|
|
1434
1490
|
ngAfterViewInit() {
|
|
1435
|
-
this.subscriptions.add(this.scroll.isEndOfPage(this.
|
|
1436
|
-
.subscribe(() => {
|
|
1491
|
+
this.subscriptions.add(this.scroll.isEndOfPage(this.scrollable.nativeElement, ProcedureSelectors.noMoreProcedures).subscribe(() => {
|
|
1437
1492
|
this.store.dispatch(ProcedureActions.load({ next: true }));
|
|
1438
1493
|
}));
|
|
1439
1494
|
}
|
|
@@ -1443,16 +1498,27 @@ class ProcedureListComponent extends SubscriptionnerDirective {
|
|
|
1443
1498
|
goTo(procedure) {
|
|
1444
1499
|
return this.router.navigate(this.PROCEDURE_LINK.fn(procedure, this.store));
|
|
1445
1500
|
}
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
}
|
|
1449
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureListComponent, deps: [{ token: i1$1.Store }, { token: i0.ElementRef }, { token: i2.Router }, { token: InfiniteScrollService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1450
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProcedureListComponent, selector: "hvy-procedure-list", usesInheritance: true, ngImport: i0, template: "<div class=\"o-procedure-list\">\n <div class=\"m-form-label-field o-procedure-list__search\">\n <input class=\"a-form-field o-procedure-list__search-input\" type=\"text\" [(ngModel)]=\"search\" (ngModelChange)=\"emitSearch()\" placeholder=\"{{ '@hvy.action.search' | i18n }}...\">\n <pry-icon iconSvg=\"search\" class=\"o-procedure-list__search-icon\"></pry-icon>\n </div>\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=\"useCount\">{{ '@hvy.procedure.useCount' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"title\">{{ '@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=\"creator\">{{ '@hvy.procedure.author' | i18n }}</hvy-procedure-column-order>\n </th>\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=\"creationDate\">{{ '@hvy.event.creationDate' | i18n }}</hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"lastModificationDate\"><span>{{ '@hvy.event.lastModificationDate' | i18n }}</span></hvy-procedure-column-order>\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\">{{ procedure.useCount }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.name }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.domain }}</td>\n <td class=\"o-hvy-events-table__line__cell -centered\">{{ procedure.creator }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.id }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.creationDate| date : 'dd/mm/YYYY HH:MM' }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.lastModificationDate | date : 'dd/mm/YYYY HH:MM' }}\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\n <a [routerLink]=\"PROCEDURE_LINK.fn(procedure, store)\">> {{ '@hvy.action.consult' | i18n }}</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", dependencies: [{ kind: "directive", type: i4$1.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: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: ProcedureColumnOrderComponent, selector: "hvy-procedure-column-order" }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }] }); }
|
|
1501
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureListComponent, deps: [{ token: i1$1.Store }, { token: i2.Router }, { token: InfiniteScrollService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1502
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProcedureListComponent, selector: "hvy-procedure-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-event-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-event-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=\"useCount\"\n >{{ '@hvy.procedure.useCount' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"title\">{{ '@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=\"creator\">{{\n '@hvy.procedure.author' | i18n\n }}</hvy-procedure-column-order>\n </th>\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=\"creationDate\"\n >{{ '@hvy.event.creationDate' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"lastModificationDate\">\n <span>{{ '@hvy.event.lastModificationDate' | 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\">{{ procedure.useCount }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.name }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.domain }}</td>\n <td class=\"o-hvy-events-table__line__cell -centered\">{{ procedure.creator }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ padId.fn(procedure.id) }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.creationDate | date: 'dd/mm/YYYY HH:MM' }}</td>\n <td class=\"o-hvy-events-table__line__cell\">\n {{ procedure.lastModificationDate | date: 'dd/mm/YYYY HH:MM' }}\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\n <a [routerLink]=\"PROCEDURE_LINK.fn(procedure, store)\">\n <div class=\"consult-link\">\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.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: EventFiltersComponent, selector: "hvy-event-filters", inputs: ["filterSet"] }, { kind: "component", type: TextFilterComponent, selector: "hvy-text-filter" }, { kind: "component", type: ChoiceFilterComponent, selector: "hvy-choice-filter", inputs: ["label", "i18nPrefix", "choices"] }, { kind: "component", type: ProcedureColumnOrderComponent, selector: "hvy-procedure-column-order" }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }] }); }
|
|
1451
1503
|
}
|
|
1452
1504
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureListComponent, decorators: [{
|
|
1453
1505
|
type: Component,
|
|
1454
|
-
args: [{ selector: 'hvy-procedure-list', template: "<div class=\"o-procedure-list\">\n <div class=\"m-form-label-field o-procedure-
|
|
1455
|
-
}], ctorParameters: () => [{ type: i1$1.Store }, { type:
|
|
1506
|
+
args: [{ selector: 'hvy-procedure-list', template: "<div class=\"o-procedure-list\">\n <div class=\"m-form-label-field o-procedure-list__action\">\n <hvy-event-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-event-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=\"useCount\"\n >{{ '@hvy.procedure.useCount' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"title\">{{ '@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=\"creator\">{{\n '@hvy.procedure.author' | i18n\n }}</hvy-procedure-column-order>\n </th>\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=\"creationDate\"\n >{{ '@hvy.event.creationDate' | i18n }}\n </hvy-procedure-column-order>\n </th>\n <th>\n <hvy-procedure-column-order field=\"lastModificationDate\">\n <span>{{ '@hvy.event.lastModificationDate' | 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\">{{ procedure.useCount }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.name }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.domain }}</td>\n <td class=\"o-hvy-events-table__line__cell -centered\">{{ procedure.creator }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ padId.fn(procedure.id) }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ procedure.creationDate | date: 'dd/mm/YYYY HH:MM' }}</td>\n <td class=\"o-hvy-events-table__line__cell\">\n {{ procedure.lastModificationDate | date: 'dd/mm/YYYY HH:MM' }}\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\n <a [routerLink]=\"PROCEDURE_LINK.fn(procedure, store)\">\n <div class=\"consult-link\">\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" }]
|
|
1507
|
+
}], ctorParameters: () => [{ type: i1$1.Store }, { type: i2.Router }, { type: InfiniteScrollService }], propDecorators: { scrollable: [{
|
|
1508
|
+
type: ViewChild,
|
|
1509
|
+
args: ['scrollable']
|
|
1510
|
+
}] } });
|
|
1511
|
+
|
|
1512
|
+
class ProcedureDetailComponent extends SubscriptionnerDirective {
|
|
1513
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1514
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: ProcedureDetailComponent, selector: "hvy-procedure-detail", inputs: { model: "model" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-procedure-detail\"></div>\n" }); }
|
|
1515
|
+
}
|
|
1516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureDetailComponent, decorators: [{
|
|
1517
|
+
type: Component,
|
|
1518
|
+
args: [{ selector: 'hvy-procedure-detail', template: "<div class=\"o-hvy-procedure-detail\"></div>\n" }]
|
|
1519
|
+
}], propDecorators: { model: [{
|
|
1520
|
+
type: Input
|
|
1521
|
+
}] } });
|
|
1456
1522
|
|
|
1457
1523
|
const HYP_BASE_CONFIG = new InjectionToken('base config');
|
|
1458
1524
|
|
|
@@ -1759,8 +1825,8 @@ class EventEffects {
|
|
|
1759
1825
|
this.getEvent$ = createEffect(() => this.actions$.pipe(ofType(EventActions.get), debounceTime$1(200), mergeMap$1((action) => this.eventService.get(action.id).pipe(map((event) => EventActions.getSuccess({ event })), catchError$1((error) => [EventActions.getFailure({ error: error })])))));
|
|
1760
1826
|
this.getEventByName$ = createEffect(() => this.actions$.pipe(ofType(EventActions.getTooltipInfo), debounceTime$1(200), mergeMap$1((action) => this.eventService.getTooltipInfo(action.name).pipe(map((event) => EventActions.getTooltipInfoSuccess({ event })), catchError$1((error) => [EventActions.getTooltipInfoFailure({ error: error })])))));
|
|
1761
1827
|
this.getForProcedureEvent$ = createEffect(() => this.actions$.pipe(ofType(EventActions.getForProcedure), debounceTime$1(200), mergeMap$1((action) => this.eventService.getProcedure(action.id).pipe(map((procedure) => EventActions.getSuccess({ procedure })), catchError$1((error) => [EventActions.getFailure({ error: error })])))));
|
|
1762
|
-
this.saveEvent$ = createEffect(() => this.actions$.pipe(ofType(EventActions.save), debounceTime$1(200), mergeMap$1((action) => this.eventService.save(action.event).pipe(map((event) => EventActions.saveSuccess({ event
|
|
1763
|
-
this.saveProcedure$ = createEffect(() => this.actions$.pipe(ofType(EventActions.saveProcedure), debounceTime$1(200), mergeMap$1((action) => this.eventService.saveProcedure(action.procedure).pipe(map((procedure) => EventActions.saveSuccess({ procedure
|
|
1828
|
+
this.saveEvent$ = createEffect(() => this.actions$.pipe(ofType(EventActions.save), debounceTime$1(200), mergeMap$1((action) => this.eventService.save(action.event).pipe(map((event) => EventActions.saveSuccess({ event })), catchError$1((error) => [EventActions.saveFailure({ error: error })])))));
|
|
1829
|
+
this.saveProcedure$ = createEffect(() => this.actions$.pipe(ofType(EventActions.saveProcedure), debounceTime$1(200), mergeMap$1((action) => this.eventService.saveProcedure(action.procedure).pipe(map((procedure) => EventActions.saveSuccess({ procedure })), catchError$1((error) => [EventActions.saveFailure({ error: error })])))));
|
|
1764
1830
|
this.refreshAfterSave$ = createEffect(() => this.actions$.pipe(ofType(EventActions.saveSuccess, EventActions.statusSuccess), debounceTime$1(200), map((action) => !!action.procedure
|
|
1765
1831
|
? EventActions.getForProcedure({ id: action.procedure.id })
|
|
1766
1832
|
: EventActions.get({ id: action.event.id }))));
|
|
@@ -1883,10 +1949,12 @@ const components = [
|
|
|
1883
1949
|
ColumnOrderComponent,
|
|
1884
1950
|
EventFiltersComponent,
|
|
1885
1951
|
DateFilterComponent,
|
|
1952
|
+
TextFilterComponent,
|
|
1886
1953
|
ChoiceFilterComponent,
|
|
1887
1954
|
ProcedureListComponent,
|
|
1888
1955
|
ProcedureColumnOrderComponent,
|
|
1889
|
-
ProcedureAssociationModalComponent
|
|
1956
|
+
ProcedureAssociationModalComponent,
|
|
1957
|
+
ProcedureDetailComponent
|
|
1890
1958
|
];
|
|
1891
1959
|
class PvyHypervisorModule {
|
|
1892
1960
|
static forRoot(options) {
|
|
@@ -1918,10 +1986,12 @@ class PvyHypervisorModule {
|
|
|
1918
1986
|
ColumnOrderComponent,
|
|
1919
1987
|
EventFiltersComponent,
|
|
1920
1988
|
DateFilterComponent,
|
|
1989
|
+
TextFilterComponent,
|
|
1921
1990
|
ChoiceFilterComponent,
|
|
1922
1991
|
ProcedureListComponent,
|
|
1923
1992
|
ProcedureColumnOrderComponent,
|
|
1924
|
-
ProcedureAssociationModalComponent
|
|
1993
|
+
ProcedureAssociationModalComponent,
|
|
1994
|
+
ProcedureDetailComponent], imports: [i1$1.StoreFeatureModule, i1$1.StoreFeatureModule, i1$1.StoreFeatureModule, i1$1.StoreFeatureModule, i1$3.EffectsFeatureModule, NgForOf,
|
|
1925
1995
|
AsyncPipe,
|
|
1926
1996
|
PryI18nModule,
|
|
1927
1997
|
PryCoreModule,
|
|
@@ -1949,10 +2019,12 @@ class PvyHypervisorModule {
|
|
|
1949
2019
|
ColumnOrderComponent,
|
|
1950
2020
|
EventFiltersComponent,
|
|
1951
2021
|
DateFilterComponent,
|
|
2022
|
+
TextFilterComponent,
|
|
1952
2023
|
ChoiceFilterComponent,
|
|
1953
2024
|
ProcedureListComponent,
|
|
1954
2025
|
ProcedureColumnOrderComponent,
|
|
1955
|
-
ProcedureAssociationModalComponent
|
|
2026
|
+
ProcedureAssociationModalComponent,
|
|
2027
|
+
ProcedureDetailComponent] }); }
|
|
1956
2028
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: PvyHypervisorModule, imports: [StoreModule.forFeature(hypFeatureKey, hypervisorReducer),
|
|
1957
2029
|
StoreModule.forFeature(eventFeatureKey, eventReducer),
|
|
1958
2030
|
StoreModule.forFeature(eventSummaryFeatureKey, eventSummaryReducer),
|
|
@@ -2008,5 +2080,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
2008
2080
|
* Generated bundle index. Do not edit.
|
|
2009
2081
|
*/
|
|
2010
2082
|
|
|
2011
|
-
export { CATEGORIES_BY_TYPE, ChoiceFilterComponent, ColumnOrderComponent, DOMAINS, DateFilterComponent, 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, HypEventCategory, HypEventCriticality, HypEventStatus, HypEventType, HypSelectors, HypervisorActions, HypervisorEffects, HypervisorService, IconDisplayComponent, KNOWN_FILTER_SETS, PAGE_SIZE_FETCH, PROCEDURE_LINK, PROCEDURE_PAGE_SIZE_FETCH, ProcedureActions, ProcedureAssociationModalComponent, ProcedureColumnOrderComponent, ProcedureEffects, ProcedureListComponent, ProcedureSelectors, ProcedureService, ProgressDisplayComponent, PvyHypervisorModule, StatusDisplayComponent, enTranslations, eventFeatureKey, eventForWriteAPI, eventInitialState, eventReducer, eventSummaryFeatureKey, eventSummaryInitialState, eventSummaryReducer, frTranslations, hypFeatureKey, hypInitialState, hypervisorReducer, procedureFeatureKey, procedureForWriteAPI, procedureInitialState, procedureReducer };
|
|
2083
|
+
export { CATEGORIES_BY_TYPE, ChoiceFilterComponent, ColumnOrderComponent, DOMAINS, DateFilterComponent, 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, HypEventCategory, HypEventCriticality, HypEventStatus, HypEventType, HypSelectors, HypervisorActions, HypervisorEffects, HypervisorService, IconDisplayComponent, KNOWN_FILTER_SETS, PAGE_SIZE_FETCH, PROCEDURE_LINK, PROCEDURE_PAGE_SIZE_FETCH, ProcedureActions, ProcedureAssociationModalComponent, ProcedureColumnOrderComponent, ProcedureDetailComponent, ProcedureEffects, ProcedureListComponent, ProcedureSelectors, ProcedureService, ProgressDisplayComponent, PvyHypervisorModule, StatusDisplayComponent, TextFilterComponent, enTranslations, eventFeatureKey, eventForWriteAPI, eventInitialState, eventReducer, eventSummaryFeatureKey, eventSummaryInitialState, eventSummaryReducer, frTranslations, hypFeatureKey, hypInitialState, hypervisorReducer, padId, procedureFeatureKey, procedureForWriteAPI, procedureInitialState, procedureReducer };
|
|
2012
2084
|
//# sourceMappingURL=provoly-hypervisor.mjs.map
|