@provoly/hypervisor 2.3.9 → 2.4.1
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 +16 -6
- package/esm2022/src/lib/general/di-ref-pipe/di-ref-pipe.mjs +19 -0
- package/esm2022/src/lib/general/last-events/last-events.component.mjs +10 -4
- package/esm2022/src/lib/general/procedure-actions/action-parameters/service/service-action-display.component.mjs +8 -3
- package/esm2022/src/lib/hypervisor.module.mjs +4 -1
- package/esm2022/src/lib/store/equipment/equipment.service.mjs +2 -2
- package/fesm2022/provoly-hypervisor.mjs +49 -12
- package/fesm2022/provoly-hypervisor.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/event/detail/event-detail.component.d.ts +1 -0
- package/src/lib/general/di-ref-pipe/di-ref-pipe.d.ts +7 -0
- package/src/lib/general/last-events/last-events.component.d.ts +3 -1
- package/src/lib/general/procedure-actions/action-parameters/service/service-action-display.component.d.ts +2 -0
- package/src/lib/hypervisor.module.d.ts +4 -3
|
@@ -16,6 +16,7 @@ import * as i1$3 from '@angular/forms';
|
|
|
16
16
|
import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
17
17
|
import * as i5 from '@angular/common';
|
|
18
18
|
import { NgForOf, AsyncPipe, NgStyle, DatePipe, KeyValuePipe, JsonPipe, NgIf, NgClass, SlicePipe } from '@angular/common';
|
|
19
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
19
20
|
import * as i2 from '@angular/router';
|
|
20
21
|
import { RouterLink } from '@angular/router';
|
|
21
22
|
import * as i5$1 from '@provoly/dashboard/components/checkbox';
|
|
@@ -25,7 +26,6 @@ import * as i1$4 from '@ngrx/effects';
|
|
|
25
26
|
import { act, ofType, createEffect, EffectsModule } from '@ngrx/effects';
|
|
26
27
|
import * as i10 from '@angular/material/autocomplete';
|
|
27
28
|
import { MatAutocompleteTrigger, MatAutocomplete, MatOption } from '@angular/material/autocomplete';
|
|
28
|
-
import { toSignal } from '@angular/core/rxjs-interop';
|
|
29
29
|
|
|
30
30
|
const HypEventCriticality = {
|
|
31
31
|
values: ['HIGH', 'MEDIUM', 'LOW']
|
|
@@ -833,7 +833,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
833
833
|
}]
|
|
834
834
|
}] });
|
|
835
835
|
|
|
836
|
+
class DiRefPipe {
|
|
837
|
+
transform(value) {
|
|
838
|
+
const indexOfAt = value.indexOf('@');
|
|
839
|
+
const indexOfD = value.indexOf('D');
|
|
840
|
+
return (indexOfAt !== -1 && indexOfD !== -1) ? value.substring(indexOfAt + 1, value.length) : value;
|
|
841
|
+
}
|
|
842
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: DiRefPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
843
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: DiRefPipe, isStandalone: true, name: "diRef" }); }
|
|
844
|
+
}
|
|
845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: DiRefPipe, decorators: [{
|
|
846
|
+
type: Pipe,
|
|
847
|
+
args: [{
|
|
848
|
+
standalone: true,
|
|
849
|
+
name: 'diRef'
|
|
850
|
+
}]
|
|
851
|
+
}] });
|
|
852
|
+
|
|
836
853
|
class LastEventsComponent extends SubscriptionnerDirective {
|
|
854
|
+
urlFor(ref) {
|
|
855
|
+
return (ref.includes('D') && !ref.includes('@')) ? this.diUrl() : this.otUrl();
|
|
856
|
+
}
|
|
837
857
|
constructor(router, store) {
|
|
838
858
|
super();
|
|
839
859
|
this.router = router;
|
|
@@ -845,7 +865,8 @@ class LastEventsComponent extends SubscriptionnerDirective {
|
|
|
845
865
|
this.closeDialogEmit = new EventEmitter();
|
|
846
866
|
this.closeButton = false;
|
|
847
867
|
this.references = [];
|
|
848
|
-
this.diUrl
|
|
868
|
+
this.diUrl = toSignal(this.store.select(HypSelectors.diUrl));
|
|
869
|
+
this.otUrl = toSignal(this.store.select(HypSelectors.otUrl));
|
|
849
870
|
this.padId = padId;
|
|
850
871
|
}
|
|
851
872
|
ngOnInit() {
|
|
@@ -874,11 +895,11 @@ class LastEventsComponent extends SubscriptionnerDirective {
|
|
|
874
895
|
window.open(url, '_blank');
|
|
875
896
|
}
|
|
876
897
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: LastEventsComponent, deps: [{ token: i2.Router }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
877
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: LastEventsComponent, selector: "hvy-last-events", inputs: { services: "services", tooltip: "tooltip", events: "events", closeButton: "closeButton" }, outputs: { closeDialogEmit: "closeDialogEmit" }, usesInheritance: true, ngImport: i0, template: "@if (events.length > 0) {\n <div class=\"o-hvy-last-events__events\">\n <div>\n <h3>{{ '@chh.event.lastEvents' | i18n }} ({{ events.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n @for (event of events; track event.id) {\n <div class=\"o-hvy-last-events__events__item\">\n <div class=\"o-hvy-last-events__events__item__icon\">\n <hvy-icon-display class=\"last-events-icon-tooltip\" [event]=\"event\"></hvy-icon-display>\n </div>\n <div class=\"o-hvy-event-tooltip-container\">\n <div class=\"o-hvy-last-events__events__item__title\" (click)=\"goTo(event)\">\n <span class=\"goto-link-eve\">{{ padId.fn(event.id) }} - {{ event.name }}</span>\n </div>\n <div class=\"o-hvy-last-events__events__item__descr\">\n <span>{{event.externalSourceRef}} - {{event.creationDate | date : 'dd/MM/yyyy'}}</span>\n </div>\n </div>\n <div class=\"o-hvy-last-events__events__item__status\">\n <hvy-status-display [item]=\"event\"></hvy-status-display>\n </div>\n </div>\n }\n </div>\n}\n@if (services.length > 0) {\n <div class=\"o-hvy-last-events__services\">\n @if ( !events || events.length === 0) {\n <div>\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n } @else {\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n }\n @for (service of services; track service.id) {\n <div class=\"o-hvy-last-events__services__item\">\n <div class=\"o-hvy-last-events__services__item__icon\">\n <pry-icon iconSvg=\"service\"></pry-icon>\n </div>\n <div class=\"o-hvy-last-events__services__item__title\">\n @if ((
|
|
898
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: LastEventsComponent, selector: "hvy-last-events", inputs: { services: "services", tooltip: "tooltip", events: "events", closeButton: "closeButton" }, outputs: { closeDialogEmit: "closeDialogEmit" }, usesInheritance: true, ngImport: i0, template: "@if (events.length > 0) {\n <div class=\"o-hvy-last-events__events\">\n <div>\n <h3>{{ '@chh.event.lastEvents' | i18n }} ({{ events.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n @for (event of events; track event.id) {\n <div class=\"o-hvy-last-events__events__item\">\n <div class=\"o-hvy-last-events__events__item__icon\">\n <hvy-icon-display class=\"last-events-icon-tooltip\" [event]=\"event\"></hvy-icon-display>\n </div>\n <div class=\"o-hvy-event-tooltip-container\">\n <div class=\"o-hvy-last-events__events__item__title\" (click)=\"goTo(event)\">\n <span class=\"goto-link-eve\">{{ padId.fn(event.id) }} - {{ event.name }}</span>\n </div>\n <div class=\"o-hvy-last-events__events__item__descr\">\n <span>{{event.externalSourceRef}} - {{event.creationDate | date : 'dd/MM/yyyy'}}</span>\n </div>\n </div>\n <div class=\"o-hvy-last-events__events__item__status\">\n <hvy-status-display [item]=\"event\"></hvy-status-display>\n </div>\n </div>\n }\n </div>\n}\n@if (services.length > 0) {\n <div class=\"o-hvy-last-events__services\">\n @if ( !events || events.length === 0) {\n <div>\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n } @else {\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n }\n @for (service of services; track service.id) {\n <div class=\"o-hvy-last-events__services__item\">\n <div class=\"o-hvy-last-events__services__item__icon\">\n <pry-icon iconSvg=\"service\"></pry-icon>\n </div>\n <div class=\"o-hvy-last-events__services__item__title\">\n @if (urlFor(references[$index]) && references[$index]) {\n <a class=\"a-di-link\" [href]=\"urlFor(references[$index])! + (references[$index] | diRef)\" target=\"_blank\" rel=\"noopener noreferrer\">{{ references[$index] }}</a>\n } @else {\n {{ references[$index] }}\n }\n - {{ '@chh.intervention.' + service.category | i18n }}\n </div>\n <div class=\"o-hvy-last-events__services__item__descr\">\n <span>{{ service.description | truncate: [50, '...'] }}</span>\n </div>\n <div class=\"o-hvy-last-events__services__item__date\">\n @if (service.status === 'ASKED') {\n <span>{{ '@chh.event.startDate' | i18n }} : {{ displayDate(service.startDate) }}</span>\n }\n @if (service.status === 'IN_PROGRESS') {\n <span>{{ '@chh.event.endPlannedDate' | i18n }} : {{ displayDate(service.inProgressDate) }}</span>\n }\n @if (service.status === 'DONE' || service.status === 'OT_CLOSED') {\n <span>{{ '@chh.event.endDate' | i18n }} : {{ displayDate(service.endDate) }}</span>\n }\n @if (service.status === 'NEW') {\n <span>{{ '@chh.event.newDate' | i18n }} : {{ displayDate(service.creationDate) }}</span>\n }\n @if (service.status === 'CANCELLED') {\n <span>{{ '@chh.event.cancelledDate' | i18n }} : {{ displayDate(service.lastModificationDate) }}</span>\n }\n </div>\n <div class=\"o-hvy-last-events__services__item__status\">\n <hvy-status-display [item]=\"service\" type=\"service\"></hvy-status-display>\n </div>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: i1$2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: IconDisplayComponent, selector: "hvy-icon-display", inputs: ["event"] }, { kind: "component", type: StatusDisplayComponent, selector: "hvy-status-display", inputs: ["type", "readonly", "item", "modifiable"], outputs: ["modified"] }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }, { kind: "pipe", type: i5.DatePipe, name: "date" }, { kind: "pipe", type: TruncatePipe, name: "truncate" }, { kind: "pipe", type: DiRefPipe, name: "diRef" }] }); }
|
|
878
899
|
}
|
|
879
900
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: LastEventsComponent, decorators: [{
|
|
880
901
|
type: Component,
|
|
881
|
-
args: [{ selector: 'hvy-last-events', template: "@if (events.length > 0) {\n <div class=\"o-hvy-last-events__events\">\n <div>\n <h3>{{ '@chh.event.lastEvents' | i18n }} ({{ events.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n @for (event of events; track event.id) {\n <div class=\"o-hvy-last-events__events__item\">\n <div class=\"o-hvy-last-events__events__item__icon\">\n <hvy-icon-display class=\"last-events-icon-tooltip\" [event]=\"event\"></hvy-icon-display>\n </div>\n <div class=\"o-hvy-event-tooltip-container\">\n <div class=\"o-hvy-last-events__events__item__title\" (click)=\"goTo(event)\">\n <span class=\"goto-link-eve\">{{ padId.fn(event.id) }} - {{ event.name }}</span>\n </div>\n <div class=\"o-hvy-last-events__events__item__descr\">\n <span>{{event.externalSourceRef}} - {{event.creationDate | date : 'dd/MM/yyyy'}}</span>\n </div>\n </div>\n <div class=\"o-hvy-last-events__events__item__status\">\n <hvy-status-display [item]=\"event\"></hvy-status-display>\n </div>\n </div>\n }\n </div>\n}\n@if (services.length > 0) {\n <div class=\"o-hvy-last-events__services\">\n @if ( !events || events.length === 0) {\n <div>\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n } @else {\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n }\n @for (service of services; track service.id) {\n <div class=\"o-hvy-last-events__services__item\">\n <div class=\"o-hvy-last-events__services__item__icon\">\n <pry-icon iconSvg=\"service\"></pry-icon>\n </div>\n <div class=\"o-hvy-last-events__services__item__title\">\n @if ((
|
|
902
|
+
args: [{ selector: 'hvy-last-events', template: "@if (events.length > 0) {\n <div class=\"o-hvy-last-events__events\">\n <div>\n <h3>{{ '@chh.event.lastEvents' | i18n }} ({{ events.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n @for (event of events; track event.id) {\n <div class=\"o-hvy-last-events__events__item\">\n <div class=\"o-hvy-last-events__events__item__icon\">\n <hvy-icon-display class=\"last-events-icon-tooltip\" [event]=\"event\"></hvy-icon-display>\n </div>\n <div class=\"o-hvy-event-tooltip-container\">\n <div class=\"o-hvy-last-events__events__item__title\" (click)=\"goTo(event)\">\n <span class=\"goto-link-eve\">{{ padId.fn(event.id) }} - {{ event.name }}</span>\n </div>\n <div class=\"o-hvy-last-events__events__item__descr\">\n <span>{{event.externalSourceRef}} - {{event.creationDate | date : 'dd/MM/yyyy'}}</span>\n </div>\n </div>\n <div class=\"o-hvy-last-events__events__item__status\">\n <hvy-status-display [item]=\"event\"></hvy-status-display>\n </div>\n </div>\n }\n </div>\n}\n@if (services.length > 0) {\n <div class=\"o-hvy-last-events__services\">\n @if ( !events || events.length === 0) {\n <div>\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n <div class=\"o-modal__equipment__close\" [hidden]=\"!closeButton\">\n <button class=\"\" (click)=\"closeDialog()\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n </div>\n } @else {\n <h3>{{ '@chh.event.services' | i18n }} ({{ services.length }})</h3>\n }\n @for (service of services; track service.id) {\n <div class=\"o-hvy-last-events__services__item\">\n <div class=\"o-hvy-last-events__services__item__icon\">\n <pry-icon iconSvg=\"service\"></pry-icon>\n </div>\n <div class=\"o-hvy-last-events__services__item__title\">\n @if (urlFor(references[$index]) && references[$index]) {\n <a class=\"a-di-link\" [href]=\"urlFor(references[$index])! + (references[$index] | diRef)\" target=\"_blank\" rel=\"noopener noreferrer\">{{ references[$index] }}</a>\n } @else {\n {{ references[$index] }}\n }\n - {{ '@chh.intervention.' + service.category | i18n }}\n </div>\n <div class=\"o-hvy-last-events__services__item__descr\">\n <span>{{ service.description | truncate: [50, '...'] }}</span>\n </div>\n <div class=\"o-hvy-last-events__services__item__date\">\n @if (service.status === 'ASKED') {\n <span>{{ '@chh.event.startDate' | i18n }} : {{ displayDate(service.startDate) }}</span>\n }\n @if (service.status === 'IN_PROGRESS') {\n <span>{{ '@chh.event.endPlannedDate' | i18n }} : {{ displayDate(service.inProgressDate) }}</span>\n }\n @if (service.status === 'DONE' || service.status === 'OT_CLOSED') {\n <span>{{ '@chh.event.endDate' | i18n }} : {{ displayDate(service.endDate) }}</span>\n }\n @if (service.status === 'NEW') {\n <span>{{ '@chh.event.newDate' | i18n }} : {{ displayDate(service.creationDate) }}</span>\n }\n @if (service.status === 'CANCELLED') {\n <span>{{ '@chh.event.cancelledDate' | i18n }} : {{ displayDate(service.lastModificationDate) }}</span>\n }\n </div>\n <div class=\"o-hvy-last-events__services__item__status\">\n <hvy-status-display [item]=\"service\" type=\"service\"></hvy-status-display>\n </div>\n </div>\n }\n </div>\n}\n" }]
|
|
882
903
|
}], ctorParameters: () => [{ type: i2.Router }, { type: i1$1.Store }], propDecorators: { services: [{
|
|
883
904
|
type: Input
|
|
884
905
|
}], tooltip: [{
|
|
@@ -1162,7 +1183,7 @@ class EquipmentService {
|
|
|
1162
1183
|
if (domain) {
|
|
1163
1184
|
if (domain === 'STA') {
|
|
1164
1185
|
params = params.append('family', 'STA_CAPTEUR');
|
|
1165
|
-
params = params.append('family', '
|
|
1186
|
+
params = params.append('family', 'STA_CAPTEUR_VIDEO');
|
|
1166
1187
|
}
|
|
1167
1188
|
else {
|
|
1168
1189
|
params = params.set('domain', domain);
|
|
@@ -1620,6 +1641,7 @@ class HvyServiceActionDisplayComponent extends HvyBaseParameterActionComponent {
|
|
|
1620
1641
|
this.i18n = i18n;
|
|
1621
1642
|
this.store = store;
|
|
1622
1643
|
this.diUrl = toSignal(this.store.select(HypSelectors.diUrl));
|
|
1644
|
+
this.otUrl = toSignal(this.store.select(HypSelectors.otUrl));
|
|
1623
1645
|
this.toto = this.store.select(HypSelectors.diUrl);
|
|
1624
1646
|
this.act = act;
|
|
1625
1647
|
}
|
|
@@ -1628,6 +1650,9 @@ class HvyServiceActionDisplayComponent extends HvyBaseParameterActionComponent {
|
|
|
1628
1650
|
'(' + this.i18n.transform(`@hvy.procedure.status.${this.action.serviceStatus}`) + ')' : '';
|
|
1629
1651
|
this.initActionReference();
|
|
1630
1652
|
}
|
|
1653
|
+
urlFor(ref) {
|
|
1654
|
+
return (ref.includes('D') && !ref.includes('@')) ? this.diUrl() : this.otUrl();
|
|
1655
|
+
}
|
|
1631
1656
|
initActionReference() {
|
|
1632
1657
|
if (this.action.serviceExternalId) {
|
|
1633
1658
|
if (this.action.serviceAdditionalInfo) {
|
|
@@ -1674,11 +1699,11 @@ class HvyServiceActionDisplayComponent extends HvyBaseParameterActionComponent {
|
|
|
1674
1699
|
});
|
|
1675
1700
|
}
|
|
1676
1701
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyServiceActionDisplayComponent, deps: [{ token: i1$2.PryDialogService }, { token: i4.Overlay }, { token: ServiceService }, { token: i1$2.I18nPipe }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1677
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: HvyServiceActionDisplayComponent, selector: "hvy-service-action-display", viewQueries: [{ propertyName: "menuButton", first: true, predicate: ["menuButton"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"param-line -vertical\">\n <p>\n {{ '@hvy.procedure.action.service' | i18n }} :\n @if (
|
|
1702
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: HvyServiceActionDisplayComponent, selector: "hvy-service-action-display", viewQueries: [{ propertyName: "menuButton", first: true, predicate: ["menuButton"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"param-line -vertical\">\n <p>\n {{ '@hvy.procedure.action.service' | i18n }} :\n @if (urlFor(reference) && action.serviceExternalId) {\n <a class=\"a-di-link\" [href]=\"urlFor(reference)! + (reference | diRef)\" target=\"_blank\" rel=\"noopener noreferrer\"><b>{{ reference }}</b></a>\n } @else {\n <b>{{ reference }}</b>\n }\n {{ status }}\n </p>\n @if (!action.serviceExternalId && this.mode !== 'model') {\n <button\n class=\"a-link\"\n [disabled]=\"readonly ||\n (action.type === 'ASKED_SERVICE' &&\n (action.status === 'DONE' || action.status === 'OT_CLOSED' || !action.lastModificationDate)\n ) || disableSaveDIButton\"\n (click)=\"toggleModal()\"\n #menuButton\n >\n > {{ '@hvy.action.create' | i18n }}\n </button>\n }\n</div>\n", dependencies: [{ kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }, { kind: "pipe", type: DiRefPipe, name: "diRef" }] }); }
|
|
1678
1703
|
}
|
|
1679
1704
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: HvyServiceActionDisplayComponent, decorators: [{
|
|
1680
1705
|
type: Component,
|
|
1681
|
-
args: [{ selector: 'hvy-service-action-display', template: "<div class=\"param-line -vertical\">\n <p>\n {{ '@hvy.procedure.action.service' | i18n }} :\n @if (
|
|
1706
|
+
args: [{ selector: 'hvy-service-action-display', template: "<div class=\"param-line -vertical\">\n <p>\n {{ '@hvy.procedure.action.service' | i18n }} :\n @if (urlFor(reference) && action.serviceExternalId) {\n <a class=\"a-di-link\" [href]=\"urlFor(reference)! + (reference | diRef)\" target=\"_blank\" rel=\"noopener noreferrer\"><b>{{ reference }}</b></a>\n } @else {\n <b>{{ reference }}</b>\n }\n {{ status }}\n </p>\n @if (!action.serviceExternalId && this.mode !== 'model') {\n <button\n class=\"a-link\"\n [disabled]=\"readonly ||\n (action.type === 'ASKED_SERVICE' &&\n (action.status === 'DONE' || action.status === 'OT_CLOSED' || !action.lastModificationDate)\n ) || disableSaveDIButton\"\n (click)=\"toggleModal()\"\n #menuButton\n >\n > {{ '@hvy.action.create' | i18n }}\n </button>\n }\n</div>\n" }]
|
|
1682
1707
|
}], ctorParameters: () => [{ type: i1$2.PryDialogService }, { type: i4.Overlay }, { type: ServiceService }, { type: i1$2.I18nPipe }, { type: i1$1.Store }], propDecorators: { menuButton: [{
|
|
1683
1708
|
type: ViewChild,
|
|
1684
1709
|
args: ['menuButton', { read: ElementRef }]
|
|
@@ -2326,14 +2351,24 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
2326
2351
|
this._events = this._events.map((eve) => {
|
|
2327
2352
|
return {
|
|
2328
2353
|
...eve,
|
|
2329
|
-
creator: eve
|
|
2330
|
-
? eve.creator
|
|
2331
|
-
: eve.externalSourceRef === 'Hyperviseur'
|
|
2332
|
-
? this.profile?.userName
|
|
2333
|
-
: '--'
|
|
2354
|
+
creator: this.getCreator(eve)
|
|
2334
2355
|
};
|
|
2335
2356
|
});
|
|
2336
2357
|
}
|
|
2358
|
+
getCreator(eve) {
|
|
2359
|
+
if (eve.creator) {
|
|
2360
|
+
return eve.creator;
|
|
2361
|
+
}
|
|
2362
|
+
else if (eve.id < 0 || !eve.id) {
|
|
2363
|
+
return this.profile?.userName;
|
|
2364
|
+
}
|
|
2365
|
+
else if (eve.externalSourceRef !== 'Hyperviseur') {
|
|
2366
|
+
return '--';
|
|
2367
|
+
}
|
|
2368
|
+
else {
|
|
2369
|
+
return '';
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2337
2372
|
getComboBoxRegExp(search) {
|
|
2338
2373
|
return RegExp(`(${search})` ?? '(/-/-/)', 'gid');
|
|
2339
2374
|
}
|
|
@@ -4335,6 +4370,7 @@ class PvyHypervisorModule {
|
|
|
4335
4370
|
FormsModule,
|
|
4336
4371
|
AsyncPipe,
|
|
4337
4372
|
TruncatePipe,
|
|
4373
|
+
DiRefPipe,
|
|
4338
4374
|
DatePipe,
|
|
4339
4375
|
AsyncPipe,
|
|
4340
4376
|
MatAutocompleteTrigger,
|
|
@@ -4442,6 +4478,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
4442
4478
|
FormsModule,
|
|
4443
4479
|
AsyncPipe,
|
|
4444
4480
|
TruncatePipe,
|
|
4481
|
+
DiRefPipe,
|
|
4445
4482
|
DatePipe,
|
|
4446
4483
|
AsyncPipe,
|
|
4447
4484
|
MatAutocompleteTrigger,
|