@provoly/hypervisor 0.0.61 → 0.0.62
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 +18 -73
- package/esm2022/src/lib/event/filters/choice/choice-filter.component.mjs +2 -1
- package/esm2022/src/lib/event/filters/date/date-filter.component.mjs +2 -1
- package/esm2022/src/lib/event/filters/hvy-unit-filter.class.mjs +6 -3
- package/esm2022/src/lib/event/filters/on/click/event-filters.component.mjs +35 -0
- package/esm2022/src/lib/event/filters/on/immediate/immediate-filters.component.mjs +40 -0
- package/esm2022/src/lib/event/filters/text/text-filter.component.mjs +4 -3
- package/esm2022/src/lib/event/public-api.mjs +3 -2
- package/esm2022/src/lib/general/i18n/en.translations.mjs +22 -5
- package/esm2022/src/lib/general/i18n/fr.translations.mjs +17 -4
- package/esm2022/src/lib/general/procedure-actions/procedure-actions.component.mjs +90 -0
- package/esm2022/src/lib/hypervisor.module.mjs +14 -9
- package/esm2022/src/lib/model/procedure/hyp-procedure-model.interface.mjs +1 -1
- package/esm2022/src/lib/procedure/model-detail/procedure-model-detail.component.mjs +87 -0
- package/esm2022/src/lib/procedure/model-list/procedure-column-order.component.mjs +23 -0
- package/esm2022/src/lib/procedure/model-list/procedure-list.component.mjs +56 -0
- package/esm2022/src/lib/procedure/public-api.mjs +4 -4
- package/esm2022/src/lib/store/procedure/procedure.actions.mjs +3 -3
- package/esm2022/src/lib/store/procedure/procedure.effects.mjs +2 -1
- package/esm2022/src/lib/store/procedure/procedure.service.mjs +6 -1
- package/fesm2022/provoly-hypervisor.mjs +285 -113
- package/fesm2022/provoly-hypervisor.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/event/detail/event-detail.component.d.ts +1 -14
- package/src/lib/event/filters/hvy-unit-filter.class.d.ts +3 -1
- package/src/lib/event/filters/{event-filters.component.d.ts → on/click/event-filters.component.d.ts} +1 -1
- package/src/lib/event/filters/on/immediate/immediate-filters.component.d.ts +15 -0
- package/src/lib/event/public-api.d.ts +2 -1
- package/src/lib/general/i18n/en.translations.d.ts +18 -1
- package/src/lib/general/i18n/fr.translations.d.ts +14 -1
- package/src/lib/general/procedure-actions/procedure-actions.component.d.ts +31 -0
- package/src/lib/hypervisor.module.d.ts +14 -12
- package/src/lib/model/procedure/hyp-procedure-model.interface.d.ts +2 -1
- package/src/lib/procedure/model-detail/procedure-model-detail.component.d.ts +35 -0
- package/src/lib/procedure/{list → model-list}/procedure-list.component.d.ts +3 -3
- package/src/lib/procedure/public-api.d.ts +3 -3
- package/src/lib/store/procedure/procedure.actions.d.ts +6 -6
- package/src/lib/store/procedure/procedure.effects.d.ts +5 -0
- package/src/lib/store/procedure/procedure.service.d.ts +1 -0
- package/styles/components/_index.scss +1 -0
- package/styles/components/_o-hvy-procedure-detail.scss +43 -0
- package/esm2022/src/lib/event/filters/event-filters.component.mjs +0 -35
- package/esm2022/src/lib/procedure/detail/procedure-detail.component.mjs +0 -14
- package/esm2022/src/lib/procedure/list/procedure-column-order.component.mjs +0 -24
- package/esm2022/src/lib/procedure/list/procedure-list.component.mjs +0 -56
- package/src/lib/procedure/detail/procedure-detail.component.d.ts +0 -8
- /package/src/lib/procedure/{list → model-list}/procedure-column-order.component.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Pipe, Component, Input, EventEmitter, Output, TemplateRef, ViewChild, ContentChildren, Directive, forwardRef, signal, computed, InjectionToken, NgModule, Inject } from '@angular/core';
|
|
2
|
+
import { Injectable, Pipe, Component, Input, EventEmitter, Output, model as model$1, TemplateRef, ViewChild, ContentChildren, Directive, forwardRef, signal, computed, InjectionToken, NgModule, Inject } from '@angular/core';
|
|
3
3
|
import * as i3 from '@provoly/dashboard';
|
|
4
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';
|
|
@@ -7,19 +7,20 @@ import { createAction, props, createReducer, on, createFeatureSelector, createSe
|
|
|
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 } from 'rxjs';
|
|
10
|
+
import { mergeMap, of, fromEvent, catchError, withLatestFrom, filter, auditTime, combineLatest, map as map$1, distinctUntilChanged, BehaviorSubject, Subject, debounceTime as debounceTime$1, 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
|
-
import * as i4 from '@provoly/dashboard/components/checkbox';
|
|
15
|
-
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
16
14
|
import * as i5 from '@angular/forms';
|
|
17
15
|
import { FormsModule } from '@angular/forms';
|
|
18
16
|
import * as i1$2 from '@angular/common';
|
|
19
17
|
import { NgForOf, AsyncPipe, NgStyle, DatePipe, KeyValuePipe, JsonPipe } from '@angular/common';
|
|
18
|
+
import { v4 } from 'uuid';
|
|
19
|
+
import * as i4 from '@provoly/dashboard/components/checkbox';
|
|
20
|
+
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
20
21
|
import * as i2 from '@angular/router';
|
|
21
22
|
import { RouterLink } from '@angular/router';
|
|
22
|
-
import { map, startWith, catchError as catchError$1,
|
|
23
|
+
import { map, startWith, debounceTime, catchError as catchError$1, mergeMap as mergeMap$1 } from 'rxjs/operators';
|
|
23
24
|
import * as i1$3 from '@ngrx/effects';
|
|
24
25
|
import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
25
26
|
|
|
@@ -217,6 +218,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
217
218
|
type: Input
|
|
218
219
|
}] } });
|
|
219
220
|
|
|
221
|
+
const ACTIONS_TYPES = {
|
|
222
|
+
values: ['CSU', 'DOUTE', 'SMS', 'AUTRE', 'SERVICE', 'EMAIL']
|
|
223
|
+
};
|
|
224
|
+
class ProcedureActionsComponent extends SubscriptionnerDirective {
|
|
225
|
+
constructor() {
|
|
226
|
+
super(...arguments);
|
|
227
|
+
this.moveStart = 0;
|
|
228
|
+
this.moveInitialIndex = 0;
|
|
229
|
+
this.initialActionList = [];
|
|
230
|
+
this.previousOffset = 0;
|
|
231
|
+
this.actions = [];
|
|
232
|
+
this.tmpActions = [];
|
|
233
|
+
this.modified = new EventEmitter();
|
|
234
|
+
this.ACTIONS_TYPES = ACTIONS_TYPES.values;
|
|
235
|
+
this.model = model$1;
|
|
236
|
+
}
|
|
237
|
+
static { this.CARD_HEIGHT = 75; }
|
|
238
|
+
onMouseDown($event) {
|
|
239
|
+
this.dragTarget = $event.target;
|
|
240
|
+
}
|
|
241
|
+
dragStart($event, action, index) {
|
|
242
|
+
if (this.dragTarget && this.dragTarget.style.maskImage.indexOf('six_dot') > -1) {
|
|
243
|
+
this.movingAction = action;
|
|
244
|
+
this.moveStart = $event.clientY;
|
|
245
|
+
this.moveInitialIndex = index;
|
|
246
|
+
this.initialActionList = [...this.actions];
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
$event.preventDefault();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
move($event) {
|
|
253
|
+
$event.preventDefault();
|
|
254
|
+
if (this.movingAction) {
|
|
255
|
+
const offsetInCards = Math.round(($event.clientY - this.moveStart) / ProcedureActionsComponent.CARD_HEIGHT);
|
|
256
|
+
if (this.previousOffset !== offsetInCards) {
|
|
257
|
+
this.previousOffset = offsetInCards;
|
|
258
|
+
const newIndex = Math.min(Math.max(this.moveInitialIndex + offsetInCards, 0), this.initialActionList.length - 1);
|
|
259
|
+
const newActions = [...this.initialActionList];
|
|
260
|
+
const element = newActions.splice(this.moveInitialIndex, 1)[0];
|
|
261
|
+
newActions.splice(newIndex, 0, element);
|
|
262
|
+
this.modified.next(newActions);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
drop($event) {
|
|
267
|
+
$event.preventDefault();
|
|
268
|
+
this.move($event);
|
|
269
|
+
this.movingAction = undefined;
|
|
270
|
+
}
|
|
271
|
+
allowDrop($event) {
|
|
272
|
+
$event.preventDefault();
|
|
273
|
+
}
|
|
274
|
+
toggleActionStatus(index, $event) {
|
|
275
|
+
$event.preventDefault();
|
|
276
|
+
const newActions = [...this.actions];
|
|
277
|
+
if (newActions[index].status !== 'DONE') {
|
|
278
|
+
newActions[index] = {
|
|
279
|
+
...newActions[index],
|
|
280
|
+
status: newActions[index].status === 'NEW' ? 'IN_PREGRESS' : 'NEW'
|
|
281
|
+
};
|
|
282
|
+
this.modified.next(newActions);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
add() {
|
|
286
|
+
this.tmpActions.push({ type: '', status: 'NEW', id: v4() });
|
|
287
|
+
}
|
|
288
|
+
updateNew(idx, prop, $event) {
|
|
289
|
+
// @ts-ignore
|
|
290
|
+
this.tmpActions[idx][prop] = $event;
|
|
291
|
+
}
|
|
292
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureActionsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
293
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: { actions: "actions" }, outputs: { modified: "modified" }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"o-hvy-events-detail__procedure__actions\"\n (drag)=\"move($event)\"\n (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\"\n>\n @for (action of actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"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 @for (action of tmpActions; track action.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__procedure__actions__action-tmp\">\n <pry-select\n [ngModel]=\"action.type\"\n [items]=\"ACTIONS_TYPES\"\n (ngModelChange)=\"updateNew(idx, 'type', $event)\"\n i18nPrefix=\"@hvy.procedure.action.\"\n ></pry-select>\n </div>\n }\n <div class=\"o-hvy-events-detail__procedure__button\">\n <button class=\"a-btn a-btn--primary\" (click)=\"add()\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.procedure.action.add' | i18n }}\n </button>\n </div>\n</div>\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: "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: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
294
|
+
}
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureActionsComponent, decorators: [{
|
|
296
|
+
type: Component,
|
|
297
|
+
args: [{ selector: 'hvy-procedure-actions', template: "<div\n class=\"o-hvy-events-detail__procedure__actions\"\n (drag)=\"move($event)\"\n (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\"\n>\n @for (action of actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"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 @for (action of tmpActions; track action.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__procedure__actions__action-tmp\">\n <pry-select\n [ngModel]=\"action.type\"\n [items]=\"ACTIONS_TYPES\"\n (ngModelChange)=\"updateNew(idx, 'type', $event)\"\n i18nPrefix=\"@hvy.procedure.action.\"\n ></pry-select>\n </div>\n }\n <div class=\"o-hvy-events-detail__procedure__button\">\n <button class=\"a-btn a-btn--primary\" (click)=\"add()\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.procedure.action.add' | i18n }}\n </button>\n </div>\n</div>\n" }]
|
|
298
|
+
}], propDecorators: { actions: [{
|
|
299
|
+
type: Input
|
|
300
|
+
}], modified: [{
|
|
301
|
+
type: Output
|
|
302
|
+
}] } });
|
|
303
|
+
|
|
220
304
|
class ForDatetimeLocalPipe {
|
|
221
305
|
constructor(store) {
|
|
222
306
|
this.store = store;
|
|
@@ -235,7 +319,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
235
319
|
}], ctorParameters: () => [{ type: i1$1.Store }] });
|
|
236
320
|
|
|
237
321
|
class EventDetailComponent extends SubscriptionnerDirective {
|
|
238
|
-
static { this.CARD_HEIGHT = 75; }
|
|
239
322
|
set events(events) {
|
|
240
323
|
this._events = events.filter((ev) => !!ev);
|
|
241
324
|
this.eventModifications = new Array(this._events.length);
|
|
@@ -276,10 +359,6 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
276
359
|
this.errors = [];
|
|
277
360
|
this.canCloseSome = false;
|
|
278
361
|
this.newComentContent = '';
|
|
279
|
-
this.moveStart = 0;
|
|
280
|
-
this.moveInitialIndex = 0;
|
|
281
|
-
this.initialActionList = [];
|
|
282
|
-
this.previousOffset = 0;
|
|
283
362
|
this.changeStatusContext = {
|
|
284
363
|
comment: '',
|
|
285
364
|
events: [],
|
|
@@ -540,78 +619,28 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
540
619
|
}
|
|
541
620
|
this.changeStatusContext.comment = '';
|
|
542
621
|
}
|
|
543
|
-
onMouseDown($event) {
|
|
544
|
-
this.dragTarget = $event.target;
|
|
545
|
-
}
|
|
546
|
-
dragStart($event, action, index) {
|
|
547
|
-
if (this.dragTarget && this.dragTarget.style.maskImage.indexOf('six_dot') > -1) {
|
|
548
|
-
this.movingAction = action;
|
|
549
|
-
this.moveStart = $event.clientY;
|
|
550
|
-
this.moveInitialIndex = index;
|
|
551
|
-
this.initialActionList = [...this.procedure.actions];
|
|
552
|
-
}
|
|
553
|
-
else {
|
|
554
|
-
$event.preventDefault();
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
move($event) {
|
|
558
|
-
$event.preventDefault();
|
|
559
|
-
if (this.movingAction) {
|
|
560
|
-
const offsetInCards = Math.round(($event.clientY - this.moveStart) / EventDetailComponent.CARD_HEIGHT);
|
|
561
|
-
if (this.previousOffset !== offsetInCards) {
|
|
562
|
-
this.previousOffset = offsetInCards;
|
|
563
|
-
const newIndex = Math.min(Math.max(this.moveInitialIndex + offsetInCards, 0), this.initialActionList.length - 1);
|
|
564
|
-
const newActions = [...this.initialActionList];
|
|
565
|
-
const element = newActions.splice(this.moveInitialIndex, 1)[0];
|
|
566
|
-
newActions.splice(newIndex, 0, element);
|
|
567
|
-
if (equal(newActions, this._procedure.actions)) {
|
|
568
|
-
delete this.procedureModifications.actions;
|
|
569
|
-
}
|
|
570
|
-
else {
|
|
571
|
-
this.procedureModifications.actions = newActions;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
drop($event) {
|
|
577
|
-
$event.preventDefault();
|
|
578
|
-
this.move($event);
|
|
579
|
-
this.movingAction = undefined;
|
|
580
|
-
this._outputModifications();
|
|
581
|
-
}
|
|
582
|
-
allowDrop($event) {
|
|
583
|
-
$event.preventDefault();
|
|
584
|
-
}
|
|
585
622
|
confirmDisabled() {
|
|
586
623
|
return this.changeStatusContext.comment.length === 0;
|
|
587
624
|
}
|
|
588
|
-
toggleActionStatus(index, $event) {
|
|
589
|
-
$event.preventDefault();
|
|
590
|
-
const newActions = [...this.procedure.actions];
|
|
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();
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
625
|
get calculatedProgress() {
|
|
606
626
|
return Math.round((this.procedure.actions.filter((action) => action.status === 'DONE').length / this.procedure.actions.length) *
|
|
607
627
|
100);
|
|
608
628
|
}
|
|
629
|
+
modifiedActions($event) {
|
|
630
|
+
if (equal($event, this._procedure.actions)) {
|
|
631
|
+
delete this.procedureModifications.actions;
|
|
632
|
+
}
|
|
633
|
+
else {
|
|
634
|
+
this.procedureModifications.actions = $event;
|
|
635
|
+
}
|
|
636
|
+
this._outputModifications();
|
|
637
|
+
}
|
|
609
638
|
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 }); }
|
|
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" }] }); }
|
|
639
|
+
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 <hvy-procedure-actions\n [actions]=\"procedure.actions\"\n (modified)=\"modifiedActions($event)\"\n ></hvy-procedure-actions>\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: "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: "component", type: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: ["actions"], outputs: ["modified"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: ForDatetimeLocalPipe, name: "forDateTimeLocal" }] }); }
|
|
611
640
|
}
|
|
612
641
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventDetailComponent, decorators: [{
|
|
613
642
|
type: Component,
|
|
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" }]
|
|
643
|
+
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 <hvy-procedure-actions\n [actions]=\"procedure.actions\"\n (modified)=\"modifiedActions($event)\"\n ></hvy-procedure-actions>\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" }]
|
|
615
644
|
}], ctorParameters: () => [{ type: EquipmentService }, { type: i1$1.Store }, { type: i3$1.Overlay }, { type: i0.ViewContainerRef }, { type: i3.PrySnackbarService }, { type: i3.PryI18nService }], propDecorators: { modifiedEvents: [{
|
|
616
645
|
type: Output
|
|
617
646
|
}], modifiedProcedure: [{
|
|
@@ -850,6 +879,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
850
879
|
args: ['filter', { descendants: true }]
|
|
851
880
|
}] } });
|
|
852
881
|
|
|
882
|
+
class ImmediateFiltersComponent extends SubscriptionnerDirective {
|
|
883
|
+
constructor(store) {
|
|
884
|
+
super();
|
|
885
|
+
this.store = store;
|
|
886
|
+
this.filterSet = 'global';
|
|
887
|
+
this.delay = 400;
|
|
888
|
+
}
|
|
889
|
+
ngAfterViewInit() {
|
|
890
|
+
this.filters.forEach((filter) => {
|
|
891
|
+
filter.filterSet = this.filterSet;
|
|
892
|
+
});
|
|
893
|
+
combineLatest(this.filters.map((filter) => filter.changed.pipe(startWith(undefined))))
|
|
894
|
+
.pipe(debounceTime(this.delay), map(() => this.filters.map((filter) => filter.getParams()).reduce((p, c) => ({ ...p, ...c }), {})), distinctUntilChanged((b, a) => equal(b, a)))
|
|
895
|
+
.subscribe((filters) => {
|
|
896
|
+
this.store.dispatch(EventActions.filter({ filters, filterSet: this.filterSet }));
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ImmediateFiltersComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
900
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: ImmediateFiltersComponent, selector: "hvy-immediate-filters", inputs: { filterSet: "filterSet", delay: "delay" }, queries: [{ propertyName: "filters", predicate: ["filter"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-event-filters\">\n <ng-content></ng-content>\n</div>\n" }); }
|
|
901
|
+
}
|
|
902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ImmediateFiltersComponent, decorators: [{
|
|
903
|
+
type: Component,
|
|
904
|
+
args: [{ selector: 'hvy-immediate-filters', template: "<div class=\"o-hvy-event-filters\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
905
|
+
}], ctorParameters: () => [{ type: i1$1.Store }], propDecorators: { filterSet: [{
|
|
906
|
+
type: Input
|
|
907
|
+
}], delay: [{
|
|
908
|
+
type: Input
|
|
909
|
+
}], filters: [{
|
|
910
|
+
type: ContentChildren,
|
|
911
|
+
args: ['filter', { descendants: true }]
|
|
912
|
+
}] } });
|
|
913
|
+
|
|
853
914
|
class HvyUnitFilterComponent extends SubscriptionnerDirective {
|
|
854
915
|
set filterSet(filterSet) {
|
|
855
916
|
this._filterSet$.next(filterSet);
|
|
@@ -861,17 +922,20 @@ class HvyUnitFilterComponent extends SubscriptionnerDirective {
|
|
|
861
922
|
super();
|
|
862
923
|
this.prop = 'no-prop-defined';
|
|
863
924
|
this._filterSet$ = new BehaviorSubject('global');
|
|
925
|
+
this.changed = new EventEmitter();
|
|
864
926
|
}
|
|
865
927
|
getParams() {
|
|
866
928
|
throw new Error('Must use sub implementation');
|
|
867
929
|
}
|
|
868
930
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: HvyUnitFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
869
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: HvyUnitFilterComponent, inputs: { prop: "prop", filterSet: "filterSet" }, usesInheritance: true, ngImport: i0 }); }
|
|
931
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: HvyUnitFilterComponent, inputs: { prop: "prop", filterSet: "filterSet" }, outputs: { changed: "changed" }, usesInheritance: true, ngImport: i0 }); }
|
|
870
932
|
}
|
|
871
933
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: HvyUnitFilterComponent, decorators: [{
|
|
872
934
|
type: Directive
|
|
873
935
|
}], ctorParameters: () => [], propDecorators: { prop: [{
|
|
874
936
|
type: Input
|
|
937
|
+
}], changed: [{
|
|
938
|
+
type: Output
|
|
875
939
|
}], filterSet: [{
|
|
876
940
|
type: Input
|
|
877
941
|
}] } });
|
|
@@ -894,6 +958,7 @@ class DateFilterComponent extends HvyUnitFilterComponent {
|
|
|
894
958
|
triggerChange($event) {
|
|
895
959
|
// @ts-ignore
|
|
896
960
|
this.value = $event instanceof Event ? $event.target?.value : $event;
|
|
961
|
+
this.changed.next();
|
|
897
962
|
}
|
|
898
963
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DateFilterComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
899
964
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: DateFilterComponent, selector: "hvy-date-filter", providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => DateFilterComponent) }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-date-filters\">\n <input type=\"date\" class=\"a-form-field\"\n [value]=\"value\"\n (change)=\"triggerChange($event)\">\n</div>\n" }); }
|
|
@@ -1007,6 +1072,7 @@ class ChoiceFilterComponent extends HvyUnitFilterComponent {
|
|
|
1007
1072
|
if (!this.inhibate || this.inhibate !== this.filterSet) {
|
|
1008
1073
|
this.triggerInhibate();
|
|
1009
1074
|
this.value.set(value);
|
|
1075
|
+
this.changed.next();
|
|
1010
1076
|
}
|
|
1011
1077
|
}
|
|
1012
1078
|
triggerInhibate() {
|
|
@@ -1048,13 +1114,14 @@ class TextFilterComponent extends HvyUnitFilterComponent {
|
|
|
1048
1114
|
triggerChange($event) {
|
|
1049
1115
|
// @ts-ignore
|
|
1050
1116
|
this.value = $event instanceof Event ? $event.target?.value : $event;
|
|
1117
|
+
this.changed.next();
|
|
1051
1118
|
}
|
|
1052
1119
|
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 (
|
|
1120
|
+
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 (input)=\"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
1121
|
}
|
|
1055
1122
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: TextFilterComponent, decorators: [{
|
|
1056
1123
|
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 (
|
|
1124
|
+
args: [{ selector: 'hvy-text-filter', providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => TextFilterComponent) }], template: "<div class=\"o-hvy-text-filters\">\n <input\n class=\"a-form-field o-hvy-text-filters__search-input\"\n type=\"text\"\n [value]=\"value\"\n (input)=\"triggerChange($event)\"\n placeholder=\"{{ '@hvy.action.search' | i18n }}...\"\n />\n <pry-icon iconSvg=\"search\" class=\"o-hvy-text-filters__search-icon\"></pry-icon>\n</div>\n" }]
|
|
1058
1125
|
}], ctorParameters: () => [{ type: i1$1.Store }] });
|
|
1059
1126
|
|
|
1060
1127
|
const ProcedureActions = {
|
|
@@ -1064,8 +1131,8 @@ const ProcedureActions = {
|
|
|
1064
1131
|
sort: createAction('[Procedure] Set Procedure List Sorting', props()),
|
|
1065
1132
|
setCategory: createAction('[Procedure] Set Category Value', props()),
|
|
1066
1133
|
model: createAction('[Procedure] Get Procedure Model', props()),
|
|
1067
|
-
modelSuccess: createAction('[Procedure] Get Procedure Model', props()),
|
|
1068
|
-
modelFailure: createAction('[Procedure] Get Procedure Model', props())
|
|
1134
|
+
modelSuccess: createAction('[Procedure] Get Procedure Model Success', props()),
|
|
1135
|
+
modelFailure: createAction('[Procedure] Get Procedure Model Failure', props())
|
|
1069
1136
|
};
|
|
1070
1137
|
|
|
1071
1138
|
const procedureFeatureKey = '@hvy/procedure';
|
|
@@ -1162,6 +1229,11 @@ class ProcedureService {
|
|
|
1162
1229
|
return this.httpClient.get(encodeURI(`${url}/procedures/model`), { params });
|
|
1163
1230
|
}));
|
|
1164
1231
|
}
|
|
1232
|
+
get(id) {
|
|
1233
|
+
return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
|
|
1234
|
+
return this.httpClient.get(encodeURI(`${url}/procedures/model/id/${id}`));
|
|
1235
|
+
}));
|
|
1236
|
+
}
|
|
1165
1237
|
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 }); }
|
|
1166
1238
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureService, providedIn: 'root' }); }
|
|
1167
1239
|
}
|
|
@@ -1184,7 +1256,7 @@ class ProcedureAssociationModalComponent extends SubscriptionnerDirective {
|
|
|
1184
1256
|
this.selectedEvents$ = this.store.select(EventSelectors.selectedEvents);
|
|
1185
1257
|
this.procedures$ = combineLatest([
|
|
1186
1258
|
this.onDomainSelect$.pipe(startWith()),
|
|
1187
|
-
this.onProcedureSearch$.pipe(startWith(), debounceTime(500)),
|
|
1259
|
+
this.onProcedureSearch$.pipe(startWith(), debounceTime$1(500)),
|
|
1188
1260
|
]).pipe(switchMap(([_, __]) => {
|
|
1189
1261
|
const search = typeof this.procedureSelectValue === 'string' && this.procedureSelectValue.length > 2 ? this.procedureSelectValue : undefined;
|
|
1190
1262
|
return this.procedureService.getTop10ByUsage(this.selectedDomain, search);
|
|
@@ -1456,10 +1528,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
1456
1528
|
class ProcedureColumnOrderComponent extends ColumnOrderComponent {
|
|
1457
1529
|
constructor(store) {
|
|
1458
1530
|
super(store);
|
|
1459
|
-
this.subscriptions.add(this.store.select(ProcedureSelectors.sort).subscribe(sort => this.sortValue = sort));
|
|
1531
|
+
this.subscriptions.add(this.store.select(ProcedureSelectors.sort).subscribe((sort) => (this.sortValue = sort)));
|
|
1460
1532
|
}
|
|
1461
1533
|
sort(order) {
|
|
1462
|
-
throw Error('Sort not implemented.');
|
|
1463
1534
|
this.store.dispatch(ProcedureActions.sort({ field: this.field, order }));
|
|
1464
1535
|
}
|
|
1465
1536
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureColumnOrderComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -1471,7 +1542,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
1471
1542
|
}], ctorParameters: () => [{ type: i1$1.Store }] });
|
|
1472
1543
|
|
|
1473
1544
|
const PROCEDURE_LINK = {
|
|
1474
|
-
fn: (procedure, store) => ['./', procedure.id]
|
|
1545
|
+
fn: (procedure, store) => ['./', padId.fn(procedure.id)]
|
|
1475
1546
|
};
|
|
1476
1547
|
class ProcedureListComponent extends SubscriptionnerDirective {
|
|
1477
1548
|
constructor(store, router, scroll) {
|
|
@@ -1499,25 +1570,92 @@ class ProcedureListComponent extends SubscriptionnerDirective {
|
|
|
1499
1570
|
return this.router.navigate(this.PROCEDURE_LINK.fn(procedure, this.store));
|
|
1500
1571
|
}
|
|
1501
1572
|
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-
|
|
1573
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProcedureListComponent, selector: "hvy-procedure-model-list", viewQueries: [{ propertyName: "scrollable", first: true, predicate: ["scrollable"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-procedure-list\">\n <div class=\"m-form-label-field o-procedure-list__action\">\n <hvy-immediate-filters [filterSet]=\"'procedure'\">\n <hvy-text-filter prop=\"search\" #filter></hvy-text-filter>\n <hvy-choice-filter\n i18nPrefix=\"@hvy.event.domain.\"\n label=\"@hvy.event.domain.name\"\n [choices]=\"DOMAINS\"\n prop=\"domain\"\n #filter\n ></hvy-choice-filter>\n </hvy-immediate-filters>\n </div>\n <div class=\"o-procedure-list__table\" #scrollable>\n <table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th>\n <hvy-procedure-column-order field=\"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.title }}</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: 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: "component", type: ImmediateFiltersComponent, selector: "hvy-immediate-filters", inputs: ["filterSet", "delay"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }] }); }
|
|
1503
1574
|
}
|
|
1504
1575
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureListComponent, decorators: [{
|
|
1505
1576
|
type: Component,
|
|
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-
|
|
1577
|
+
args: [{ selector: 'hvy-procedure-model-list', template: "<div class=\"o-procedure-list\">\n <div class=\"m-form-label-field o-procedure-list__action\">\n <hvy-immediate-filters [filterSet]=\"'procedure'\">\n <hvy-text-filter prop=\"search\" #filter></hvy-text-filter>\n <hvy-choice-filter\n i18nPrefix=\"@hvy.event.domain.\"\n label=\"@hvy.event.domain.name\"\n [choices]=\"DOMAINS\"\n prop=\"domain\"\n #filter\n ></hvy-choice-filter>\n </hvy-immediate-filters>\n </div>\n <div class=\"o-procedure-list__table\" #scrollable>\n <table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th>\n <hvy-procedure-column-order field=\"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.title }}</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
1578
|
}], ctorParameters: () => [{ type: i1$1.Store }, { type: i2.Router }, { type: InfiniteScrollService }], propDecorators: { scrollable: [{
|
|
1508
1579
|
type: ViewChild,
|
|
1509
1580
|
args: ['scrollable']
|
|
1510
1581
|
}] } });
|
|
1511
1582
|
|
|
1512
|
-
class
|
|
1513
|
-
|
|
1514
|
-
|
|
1583
|
+
class ProcedureModelDetailComponent extends SubscriptionnerDirective {
|
|
1584
|
+
constructor(store) {
|
|
1585
|
+
super();
|
|
1586
|
+
this.store = store;
|
|
1587
|
+
this.username = 'xxx';
|
|
1588
|
+
this.modifications = {};
|
|
1589
|
+
this.errors = [];
|
|
1590
|
+
this.eventErrors = new EventEmitter();
|
|
1591
|
+
this.modified = new EventEmitter();
|
|
1592
|
+
this.DOMAINS = DOMAINS.values;
|
|
1593
|
+
}
|
|
1594
|
+
hasError(prop) {
|
|
1595
|
+
return this.errors.find((err) => err.field === prop) ?? false;
|
|
1596
|
+
}
|
|
1597
|
+
validate(model) {
|
|
1598
|
+
if (!!model) {
|
|
1599
|
+
this.errors = [];
|
|
1600
|
+
if (!model.title || model.title.length === 0) {
|
|
1601
|
+
this.errors.push({ field: 'title', code: 'required' });
|
|
1602
|
+
}
|
|
1603
|
+
if (!model.domain || model.domain.length === 0) {
|
|
1604
|
+
this.errors.push({ field: 'domain', code: 'required' });
|
|
1605
|
+
}
|
|
1606
|
+
if (!model.description || model.description.length === 0) {
|
|
1607
|
+
this.errors.push({ field: 'description', code: 'required' });
|
|
1608
|
+
}
|
|
1609
|
+
this.eventErrors.next(this.errors);
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
modify(prop, $event) {
|
|
1613
|
+
// @ts-ignore
|
|
1614
|
+
const newValue = $event instanceof Event ? $event.target?.value : $event;
|
|
1615
|
+
// @ts-ignore
|
|
1616
|
+
if (this.model[prop] !== newValue) {
|
|
1617
|
+
// @ts-ignore
|
|
1618
|
+
this.modifications[prop] = newValue;
|
|
1619
|
+
this._outputModifications();
|
|
1620
|
+
}
|
|
1621
|
+
else {
|
|
1622
|
+
// @ts-ignore
|
|
1623
|
+
delete this.modifications[prop];
|
|
1624
|
+
this._outputModifications();
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
_outputModifications() {
|
|
1628
|
+
this.validate(this.model);
|
|
1629
|
+
this.modified.next([this.modifications, this.modifiedModel]);
|
|
1630
|
+
}
|
|
1631
|
+
get modifiedModel() {
|
|
1632
|
+
return { ...this.model, ...(this.modifications ?? {}) };
|
|
1633
|
+
}
|
|
1634
|
+
updateActions($event) {
|
|
1635
|
+
if (equal($event, this.model?.actions)) {
|
|
1636
|
+
delete this.modifications.actions;
|
|
1637
|
+
}
|
|
1638
|
+
else {
|
|
1639
|
+
this.modifications.actions = $event;
|
|
1640
|
+
}
|
|
1641
|
+
this._outputModifications();
|
|
1642
|
+
}
|
|
1643
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureModelDetailComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1644
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProcedureModelDetailComponent, selector: "hvy-procedure-model-detail", inputs: { model: "model", username: "username", title: "title" }, outputs: { eventErrors: "eventErrors", modified: "modified" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-procedure-detail\">\n <h1>{{ title ?? '@hvy.procedure.detail' | i18n }}</h1>\n <div class=\"o-hvy-procedure-detail__container\">\n <div class=\"o-hvy-procedure-detail__container__scrollable\">\n @if (model) {\n <div class=\"o-hvy-procedure-detail__form\">\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.procedure.title' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('title')\"\n [value]=\"model.title\"\n (change)=\"modify('title', $event)\"\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"model.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description')\"\n (ngModelChange)=\"modify('description', $event)\"\n ></textarea>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"model.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain')\"\n (ngModelChange)=\"modify('domain', $event)\"\n ></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.creator' | i18n }} :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"model.creator\" readonly />\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div class=\"o-hvy-procedure-detail__actions\">\n <h3>{{ '@hvy.procedure.actions' | i18n }}</h3>\n <hvy-procedure-actions [actions]=\"model.actions\" (modified)=\"updateActions($event)\"></hvy-procedure-actions>\n </div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ 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.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: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: ["actions"], outputs: ["modified"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
1515
1645
|
}
|
|
1516
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type:
|
|
1646
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureModelDetailComponent, decorators: [{
|
|
1517
1647
|
type: Component,
|
|
1518
|
-
args: [{ selector: 'hvy-procedure-detail', template: "<div class=\"o-hvy-procedure-detail\"></div>\n" }]
|
|
1519
|
-
}], propDecorators: { model: [{
|
|
1648
|
+
args: [{ selector: 'hvy-procedure-model-detail', template: "<div class=\"o-hvy-procedure-detail\">\n <h1>{{ title ?? '@hvy.procedure.detail' | i18n }}</h1>\n <div class=\"o-hvy-procedure-detail__container\">\n <div class=\"o-hvy-procedure-detail__container__scrollable\">\n @if (model) {\n <div class=\"o-hvy-procedure-detail__form\">\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.procedure.title' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('title')\"\n [value]=\"model.title\"\n (change)=\"modify('title', $event)\"\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"model.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description')\"\n (ngModelChange)=\"modify('description', $event)\"\n ></textarea>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"model.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain')\"\n (ngModelChange)=\"modify('domain', $event)\"\n ></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.creator' | i18n }} :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"model.creator\" readonly />\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div class=\"o-hvy-procedure-detail__actions\">\n <h3>{{ '@hvy.procedure.actions' | i18n }}</h3>\n <hvy-procedure-actions [actions]=\"model.actions\" (modified)=\"updateActions($event)\"></hvy-procedure-actions>\n </div>\n }\n </div>\n </div>\n</div>\n" }]
|
|
1649
|
+
}], ctorParameters: () => [{ type: i1$1.Store }], propDecorators: { model: [{
|
|
1650
|
+
type: Input
|
|
1651
|
+
}], username: [{
|
|
1652
|
+
type: Input
|
|
1653
|
+
}], title: [{
|
|
1520
1654
|
type: Input
|
|
1655
|
+
}], eventErrors: [{
|
|
1656
|
+
type: Output
|
|
1657
|
+
}], modified: [{
|
|
1658
|
+
type: Output
|
|
1521
1659
|
}] } });
|
|
1522
1660
|
|
|
1523
1661
|
const HYP_BASE_CONFIG = new InjectionToken('base config');
|
|
@@ -1536,7 +1674,8 @@ const enTranslations = {
|
|
|
1536
1674
|
name: 'Status',
|
|
1537
1675
|
NEW: 'Open',
|
|
1538
1676
|
IN_PROGRESS: 'In progress',
|
|
1539
|
-
DONE: 'Done'
|
|
1677
|
+
DONE: 'Done',
|
|
1678
|
+
ASKED: 'Asked'
|
|
1540
1679
|
},
|
|
1541
1680
|
address: 'Address',
|
|
1542
1681
|
source: 'External reference',
|
|
@@ -1561,6 +1700,7 @@ const enTranslations = {
|
|
|
1561
1700
|
detail: 'Information',
|
|
1562
1701
|
mandatory: '* Mandatory fields',
|
|
1563
1702
|
name: 'Name',
|
|
1703
|
+
id: 'Identifier',
|
|
1564
1704
|
category: 'Category',
|
|
1565
1705
|
close: 'Close all events',
|
|
1566
1706
|
closed: 'All closed',
|
|
@@ -1574,8 +1714,7 @@ const enTranslations = {
|
|
|
1574
1714
|
progress: 'Progress',
|
|
1575
1715
|
noAction: 'No actions',
|
|
1576
1716
|
name: 'Common procedure',
|
|
1577
|
-
name1: 'Procedure'
|
|
1578
|
-
addAction: 'Add action'
|
|
1717
|
+
name1: 'Procedure'
|
|
1579
1718
|
}
|
|
1580
1719
|
},
|
|
1581
1720
|
category: {
|
|
@@ -1606,6 +1745,11 @@ const enTranslations = {
|
|
|
1606
1745
|
multi: 'Close events',
|
|
1607
1746
|
comment: 'Close comment'
|
|
1608
1747
|
},
|
|
1748
|
+
installDate: 'Installation date',
|
|
1749
|
+
managed: 'Managed equipment',
|
|
1750
|
+
prm: 'PRM contract number',
|
|
1751
|
+
presenceSensor: 'Presence sensor',
|
|
1752
|
+
parent: 'Parent',
|
|
1609
1753
|
consult: 'Consult {{howMany}} event{{plural}}'
|
|
1610
1754
|
},
|
|
1611
1755
|
eventSummary: {
|
|
@@ -1639,7 +1783,18 @@ const enTranslations = {
|
|
|
1639
1783
|
missingProperty: 'Missing property',
|
|
1640
1784
|
noContent: 'No existing procedures found',
|
|
1641
1785
|
domain: 'Domain',
|
|
1642
|
-
catalog: 'Procedure catalog'
|
|
1786
|
+
catalog: 'Procedure catalog',
|
|
1787
|
+
description: 'Description',
|
|
1788
|
+
creator: 'Creator',
|
|
1789
|
+
action: {
|
|
1790
|
+
add: 'Add new Action',
|
|
1791
|
+
CSU: 'Call CSU',
|
|
1792
|
+
DOUTE: 'Ask for doubt removal',
|
|
1793
|
+
SMS: 'Send a SMS',
|
|
1794
|
+
AUTRE: 'Other',
|
|
1795
|
+
SERVICE: 'Ask service',
|
|
1796
|
+
EMAIL: 'Send an email'
|
|
1797
|
+
}
|
|
1643
1798
|
},
|
|
1644
1799
|
associationModal: {
|
|
1645
1800
|
title: 'Link a procedure',
|
|
@@ -1703,6 +1858,7 @@ const frTranslations = {
|
|
|
1703
1858
|
detail: 'Informations',
|
|
1704
1859
|
mandatory: '* Champs obligatoires',
|
|
1705
1860
|
name: 'Nom',
|
|
1861
|
+
id: 'Identifiant',
|
|
1706
1862
|
category: 'Catégorie',
|
|
1707
1863
|
close: 'Clôturer tous ces événements',
|
|
1708
1864
|
closed: 'Tous clôturés',
|
|
@@ -1716,8 +1872,7 @@ const frTranslations = {
|
|
|
1716
1872
|
progress: 'Progression',
|
|
1717
1873
|
noAction: "Pas d'action",
|
|
1718
1874
|
name: 'Procédure commune',
|
|
1719
|
-
name1: 'Procédure'
|
|
1720
|
-
addAction: 'Ajouter une action'
|
|
1875
|
+
name1: 'Procédure'
|
|
1721
1876
|
}
|
|
1722
1877
|
},
|
|
1723
1878
|
category: {
|
|
@@ -1786,7 +1941,20 @@ const frTranslations = {
|
|
|
1786
1941
|
missingProperty: 'Propriété manquante',
|
|
1787
1942
|
noContent: "Aucune procédure n'a été créée.",
|
|
1788
1943
|
domain: 'Métier',
|
|
1789
|
-
catalog: 'Bibliothèque des procédures'
|
|
1944
|
+
catalog: 'Bibliothèque des procédures',
|
|
1945
|
+
detail: "Détail d'une procédure",
|
|
1946
|
+
actions: 'Actions associées',
|
|
1947
|
+
description: 'Description',
|
|
1948
|
+
creator: 'Créateur',
|
|
1949
|
+
action: {
|
|
1950
|
+
add: 'Ajouter une Action',
|
|
1951
|
+
CSU: 'Appeler le CSU',
|
|
1952
|
+
DOUTE: 'Demander une levée de doute',
|
|
1953
|
+
SMS: 'Envoyer un SMS',
|
|
1954
|
+
AUTRE: 'Autre',
|
|
1955
|
+
SERVICE: 'Demander une intervention',
|
|
1956
|
+
EMAIL: 'Envoyer un email'
|
|
1957
|
+
}
|
|
1790
1958
|
},
|
|
1791
1959
|
associationModal: {
|
|
1792
1960
|
title: 'Associer à une procédure',
|
|
@@ -1821,16 +1989,16 @@ class EventEffects {
|
|
|
1821
1989
|
this.actions$ = actions$;
|
|
1822
1990
|
this.eventService = eventService;
|
|
1823
1991
|
this.store = store;
|
|
1824
|
-
this.loadEvents$ = createEffect(() => this.actions$.pipe(ofType(EventActions.load), debounceTime
|
|
1825
|
-
this.getEvent$ = createEffect(() => this.actions$.pipe(ofType(EventActions.get), debounceTime
|
|
1826
|
-
this.getEventByName$ = createEffect(() => this.actions$.pipe(ofType(EventActions.getTooltipInfo), debounceTime
|
|
1827
|
-
this.getForProcedureEvent$ = createEffect(() => this.actions$.pipe(ofType(EventActions.getForProcedure), debounceTime
|
|
1828
|
-
this.saveEvent$ = createEffect(() => this.actions$.pipe(ofType(EventActions.save), debounceTime
|
|
1829
|
-
this.saveProcedure$ = createEffect(() => this.actions$.pipe(ofType(EventActions.saveProcedure), debounceTime
|
|
1830
|
-
this.refreshAfterSave$ = createEffect(() => this.actions$.pipe(ofType(EventActions.saveSuccess, EventActions.statusSuccess), debounceTime
|
|
1992
|
+
this.loadEvents$ = createEffect(() => this.actions$.pipe(ofType(EventActions.load), debounceTime(200), withLatestFrom(this.store.select(EventSelectors.events), this.store.select(EventSelectors.noMoreEvents)), filter(([action, events, noMore]) => !action.next || (action.next && !noMore)), mergeMap$1(([action, stateEvents]) => this.eventService.list(action.next ? stateEvents.length : 0).pipe(map((events) => EventActions.loadSuccess({ events, startingFrom: action.next ? stateEvents.length : 0 })), catchError$1((error) => [EventActions.loadFailure({ error: error })])))));
|
|
1993
|
+
this.getEvent$ = createEffect(() => this.actions$.pipe(ofType(EventActions.get), debounceTime(200), mergeMap$1((action) => this.eventService.get(action.id).pipe(map((event) => EventActions.getSuccess({ event })), catchError$1((error) => [EventActions.getFailure({ error: error })])))));
|
|
1994
|
+
this.getEventByName$ = createEffect(() => this.actions$.pipe(ofType(EventActions.getTooltipInfo), debounceTime(200), mergeMap$1((action) => this.eventService.getTooltipInfo(action.name).pipe(map((event) => EventActions.getTooltipInfoSuccess({ event })), catchError$1((error) => [EventActions.getTooltipInfoFailure({ error: error })])))));
|
|
1995
|
+
this.getForProcedureEvent$ = createEffect(() => this.actions$.pipe(ofType(EventActions.getForProcedure), debounceTime(200), mergeMap$1((action) => this.eventService.getProcedure(action.id).pipe(map((procedure) => EventActions.getSuccess({ procedure })), catchError$1((error) => [EventActions.getFailure({ error: error })])))));
|
|
1996
|
+
this.saveEvent$ = createEffect(() => this.actions$.pipe(ofType(EventActions.save), debounceTime(200), mergeMap$1((action) => this.eventService.save(action.event).pipe(map((event) => EventActions.saveSuccess({ event })), catchError$1((error) => [EventActions.saveFailure({ error: error })])))));
|
|
1997
|
+
this.saveProcedure$ = createEffect(() => this.actions$.pipe(ofType(EventActions.saveProcedure), debounceTime(200), mergeMap$1((action) => this.eventService.saveProcedure(action.procedure).pipe(map((procedure) => EventActions.saveSuccess({ procedure })), catchError$1((error) => [EventActions.saveFailure({ error: error })])))));
|
|
1998
|
+
this.refreshAfterSave$ = createEffect(() => this.actions$.pipe(ofType(EventActions.saveSuccess, EventActions.statusSuccess), debounceTime(200), map((action) => !!action.procedure
|
|
1831
1999
|
? EventActions.getForProcedure({ id: action.procedure.id })
|
|
1832
2000
|
: EventActions.get({ id: action.event.id }))));
|
|
1833
|
-
this.close$ = createEffect(() => this.actions$.pipe(ofType(EventActions.status), debounceTime
|
|
2001
|
+
this.close$ = createEffect(() => this.actions$.pipe(ofType(EventActions.status), debounceTime(200), mergeMap$1((action) => {
|
|
1834
2002
|
if (!!action.event) {
|
|
1835
2003
|
return this.eventService.status(action.event, action.targetStatus, action.comment).pipe(mergeMap$1((event) => [
|
|
1836
2004
|
EventActions.statusSuccess({ event: action.event, procedure: action.procedure }),
|
|
@@ -1841,8 +2009,8 @@ class EventEffects {
|
|
|
1841
2009
|
return this.eventService.statusProcedure(action.procedure, action.targetStatus, action.comment).pipe(mergeMap$1((event) => [EventActions.statusSuccess({ procedure: action.procedure }), EventActions.load({})]), catchError$1((error) => [EventActions.statusFailure({ error: error })]));
|
|
1842
2010
|
}
|
|
1843
2011
|
})));
|
|
1844
|
-
this.sort$ = createEffect(() => this.actions$.pipe(ofType(EventActions.sort), debounceTime
|
|
1845
|
-
this.filter$ = createEffect(() => this.actions$.pipe(ofType(EventActions.filter), filter((action) => action.filterSet === KNOWN_FILTER_SETS.EVENTS), debounceTime
|
|
2012
|
+
this.sort$ = createEffect(() => this.actions$.pipe(ofType(EventActions.sort), debounceTime(200), map(() => EventActions.load({}))));
|
|
2013
|
+
this.filter$ = createEffect(() => this.actions$.pipe(ofType(EventActions.filter), filter((action) => action.filterSet === KNOWN_FILTER_SETS.EVENTS), debounceTime(200), map(() => EventActions.load({}))));
|
|
1846
2014
|
this.associateProcedure$ = createEffect(() => this.actions$.pipe(ofType(EventActions.associateProcedure), mergeMap$1((action) => this.eventService.associateProcedure(action.procedureId).pipe(map(() => EventActions.load({})), catchError$1((error) => [EventActions.associateProcedureFailure({ error: error })])))));
|
|
1847
2015
|
}
|
|
1848
2016
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventEffects, deps: [{ token: i1$3.Actions }, { token: EventService }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -1910,7 +2078,7 @@ class EventSummaryEffects {
|
|
|
1910
2078
|
constructor(actions$, eventSummaryService) {
|
|
1911
2079
|
this.actions$ = actions$;
|
|
1912
2080
|
this.eventSummaryService = eventSummaryService;
|
|
1913
|
-
this.loadSummaries$ = createEffect(() => this.actions$.pipe(ofType(EventSummaryActions.load), debounceTime
|
|
2081
|
+
this.loadSummaries$ = createEffect(() => this.actions$.pipe(ofType(EventSummaryActions.load), debounceTime(200), mergeMap$1((action) => this.eventSummaryService.list().pipe(map((summaries) => EventSummaryActions.loadSuccess({ summaries })), catchError$1((error) => [EventSummaryActions.loadFailure({ error: error })])))));
|
|
1914
2082
|
}
|
|
1915
2083
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventSummaryEffects, deps: [{ token: i1$3.Actions }, { token: EventSummaryService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1916
2084
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EventSummaryEffects }); }
|
|
@@ -1924,8 +2092,9 @@ class ProcedureEffects {
|
|
|
1924
2092
|
this.actions$ = actions$;
|
|
1925
2093
|
this.procedureService = procedureService;
|
|
1926
2094
|
this.store = store;
|
|
1927
|
-
this.loadProcedures$ = createEffect(() => this.actions$.pipe(ofType(ProcedureActions.load), debounceTime
|
|
1928
|
-
this.sort$ = createEffect(() => this.actions$.pipe(ofType(ProcedureActions.sort), debounceTime
|
|
2095
|
+
this.loadProcedures$ = createEffect(() => this.actions$.pipe(ofType(ProcedureActions.load), debounceTime(200), withLatestFrom(this.store.select(ProcedureSelectors.procedures), this.store.select(ProcedureSelectors.noMoreProcedures)), filter(([action, stateProcedures, noMore]) => !noMore), mergeMap$1(([action, stateProcedures]) => this.procedureService.list(action.next ? stateProcedures.length : 0).pipe(map((procedures) => ProcedureActions.loadSuccess({ procedures, startingFrom: action.next ? stateProcedures.length : 0 })), catchError$1((error) => [ProcedureActions.loadFailure({ error: error })])))));
|
|
2096
|
+
this.sort$ = createEffect(() => this.actions$.pipe(ofType(ProcedureActions.sort), debounceTime(200), map(() => ProcedureActions.load({}))));
|
|
2097
|
+
this.model$ = createEffect(() => this.actions$.pipe(ofType(ProcedureActions.model), debounceTime(200), mergeMap$1((action) => this.procedureService.get(action.id).pipe(map((model) => ProcedureActions.modelSuccess({ model })), catchError$1((error) => [ProcedureActions.modelFailure({ error: error })])))));
|
|
1929
2098
|
}
|
|
1930
2099
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureEffects, deps: [{ token: i1$3.Actions }, { token: ProcedureService }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1931
2100
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureEffects }); }
|
|
@@ -1954,7 +2123,8 @@ const components = [
|
|
|
1954
2123
|
ProcedureListComponent,
|
|
1955
2124
|
ProcedureColumnOrderComponent,
|
|
1956
2125
|
ProcedureAssociationModalComponent,
|
|
1957
|
-
|
|
2126
|
+
ProcedureModelDetailComponent,
|
|
2127
|
+
ImmediateFiltersComponent
|
|
1958
2128
|
];
|
|
1959
2129
|
class PvyHypervisorModule {
|
|
1960
2130
|
static forRoot(options) {
|
|
@@ -1991,7 +2161,8 @@ class PvyHypervisorModule {
|
|
|
1991
2161
|
ProcedureListComponent,
|
|
1992
2162
|
ProcedureColumnOrderComponent,
|
|
1993
2163
|
ProcedureAssociationModalComponent,
|
|
1994
|
-
|
|
2164
|
+
ProcedureModelDetailComponent,
|
|
2165
|
+
ImmediateFiltersComponent, ProcedureActionsComponent], imports: [i1$1.StoreFeatureModule, i1$1.StoreFeatureModule, i1$1.StoreFeatureModule, i1$1.StoreFeatureModule, i1$3.EffectsFeatureModule, NgForOf,
|
|
1995
2166
|
AsyncPipe,
|
|
1996
2167
|
PryI18nModule,
|
|
1997
2168
|
PryCoreModule,
|
|
@@ -2024,7 +2195,8 @@ class PvyHypervisorModule {
|
|
|
2024
2195
|
ProcedureListComponent,
|
|
2025
2196
|
ProcedureColumnOrderComponent,
|
|
2026
2197
|
ProcedureAssociationModalComponent,
|
|
2027
|
-
|
|
2198
|
+
ProcedureModelDetailComponent,
|
|
2199
|
+
ImmediateFiltersComponent] }); }
|
|
2028
2200
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: PvyHypervisorModule, imports: [StoreModule.forFeature(hypFeatureKey, hypervisorReducer),
|
|
2029
2201
|
StoreModule.forFeature(eventFeatureKey, eventReducer),
|
|
2030
2202
|
StoreModule.forFeature(eventSummaryFeatureKey, eventSummaryReducer),
|
|
@@ -2042,7 +2214,7 @@ class PvyHypervisorModule {
|
|
|
2042
2214
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: PvyHypervisorModule, decorators: [{
|
|
2043
2215
|
type: NgModule,
|
|
2044
2216
|
args: [{
|
|
2045
|
-
declarations: [...components],
|
|
2217
|
+
declarations: [...components, ProcedureActionsComponent],
|
|
2046
2218
|
imports: [
|
|
2047
2219
|
StoreModule.forFeature(hypFeatureKey, hypervisorReducer),
|
|
2048
2220
|
StoreModule.forFeature(eventFeatureKey, eventReducer),
|
|
@@ -2080,5 +2252,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
2080
2252
|
* Generated bundle index. Do not edit.
|
|
2081
2253
|
*/
|
|
2082
2254
|
|
|
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,
|
|
2255
|
+
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, ImmediateFiltersComponent, KNOWN_FILTER_SETS, PAGE_SIZE_FETCH, PROCEDURE_LINK, PROCEDURE_PAGE_SIZE_FETCH, ProcedureActions, ProcedureAssociationModalComponent, ProcedureColumnOrderComponent, ProcedureEffects, ProcedureListComponent, ProcedureModelDetailComponent, ProcedureSelectors, ProcedureService, ProgressDisplayComponent, PvyHypervisorModule, StatusDisplayComponent, TextFilterComponent, enTranslations, eventFeatureKey, eventForWriteAPI, eventInitialState, eventReducer, eventSummaryFeatureKey, eventSummaryInitialState, eventSummaryReducer, frTranslations, hypFeatureKey, hypInitialState, hypervisorReducer, padId, procedureFeatureKey, procedureForWriteAPI, procedureInitialState, procedureReducer };
|
|
2084
2256
|
//# sourceMappingURL=provoly-hypervisor.mjs.map
|