awf-test-lib 0.1.12 → 0.1.13
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/esm2020/awf-test-lib.mjs +5 -0
- package/esm2020/lib/core/core-routing.module.mjs +18 -0
- package/esm2020/lib/core/core.module.mjs +51 -0
- package/esm2020/lib/core/menu/menu.component.mjs +40 -0
- package/esm2020/lib/core/menu-consomer/menu-consomer.component.mjs +27 -0
- package/esm2020/lib/core/menu-ge-portal/menu-ge-portal.component.mjs +31 -0
- package/esm2020/lib/core/menu-warranty/menu-warranty.component.mjs +35 -0
- package/esm2020/lib/core/not-found/not-found.component.mjs +19 -0
- package/esm2020/lib/core/top-bar/top-bar.component.mjs +41 -0
- package/esm2020/lib/models/account.model.mjs +3 -0
- package/esm2020/lib/models/alternativeDate.model.mjs +3 -0
- package/esm2020/lib/models/applicationName.mjs +7 -0
- package/esm2020/lib/models/cancelPMMailRequest.model.mjs +4 -0
- package/esm2020/lib/models/customObject.model.mjs +3 -0
- package/esm2020/lib/models/detailedPmJob.model.mjs +3 -0
- package/esm2020/lib/models/emailStatus.mjs +6 -0
- package/esm2020/lib/models/emailType.mjs +15 -0
- package/esm2020/lib/models/eventStatus.mjs +9 -0
- package/esm2020/lib/models/field.mjs +9 -0
- package/esm2020/lib/models/language.mjs +6 -0
- package/esm2020/lib/models/mailRequest.model.mjs +3 -0
- package/esm2020/lib/models/pMGroupedJob.model.mjs +3 -0
- package/esm2020/lib/models/pmJob.model.mjs +3 -0
- package/esm2020/lib/models/pmJobRequest.model.mjs +3 -0
- package/esm2020/lib/models/pmJobStatus.mjs +17 -0
- package/esm2020/lib/models/reason.model.mjs +3 -0
- package/esm2020/lib/models/reasonCode.mjs +9 -0
- package/esm2020/lib/models/reasonContact.mjs +8 -0
- package/esm2020/lib/models/reportDateMailRequest.model.mjs +4 -0
- package/esm2020/lib/models/role.mjs +7 -0
- package/esm2020/lib/models/service.model.mjs +3 -0
- package/esm2020/lib/models/serviceName.mjs +12 -0
- package/esm2020/lib/models/socialLoginRequest.model.mjs +3 -0
- package/esm2020/lib/models/socialMadia.mjs +5 -0
- package/esm2020/lib/models/stingBoolean.mjs +6 -0
- package/esm2020/lib/models/system.mjs +3 -0
- package/esm2020/lib/models/theme.model.mjs +2 -0
- package/esm2020/lib/models/tokenStatus.mjs +7 -0
- package/esm2020/lib/models/warranty.mjs +3 -0
- package/esm2020/lib/pipes/pipes/pipes.module.mjs +21 -0
- package/esm2020/lib/pipes/subrtring-w.pipe.mjs +20 -0
- package/esm2020/lib/pipes/substring.pipe.mjs +16 -0
- package/esm2020/lib/shared/choose-another-date/choose-another-date.component.mjs +110 -0
- package/esm2020/lib/shared/confirm-dialog/confirm-dialog.component.mjs +44 -0
- package/esm2020/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.mjs +42 -0
- package/esm2020/lib/shared/confirmed-date-information/confirmed-date-information.component.mjs +38 -0
- package/esm2020/lib/shared/contact/contact.component.mjs +162 -0
- package/esm2020/lib/shared/contact-support/contact-support.component.mjs +160 -0
- package/esm2020/lib/shared/dashboard/dashboard.component.mjs +34 -0
- package/esm2020/lib/shared/maintenance-list/maintenance-list.component.mjs +347 -0
- package/esm2020/lib/shared/shared-routing.module.mjs +18 -0
- package/esm2020/lib/shared/shared.module.mjs +144 -0
- package/esm2020/lib/shared/show-links/show-links.component.mjs +81 -0
- package/esm2020/lib/shared/system-list/system-list.component.mjs +32 -0
- package/esm2020/public-api.mjs +48 -0
- package/fesm2015/awf-test-lib.mjs +1560 -0
- package/fesm2015/awf-test-lib.mjs.map +1 -0
- package/fesm2020/awf-test-lib.mjs +1556 -0
- package/fesm2020/awf-test-lib.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/core/core-routing.module.d.ts +7 -0
- package/lib/core/core.module.d.ts +15 -0
- package/lib/core/menu/menu.component.d.ts +17 -0
- package/lib/core/menu-consomer/menu-consomer.component.d.ts +12 -0
- package/lib/core/menu-ge-portal/menu-ge-portal.component.d.ts +13 -0
- package/lib/core/menu-warranty/menu-warranty.component.d.ts +15 -0
- package/lib/core/not-found/not-found.component.d.ts +10 -0
- package/lib/core/top-bar/top-bar.component.d.ts +13 -0
- package/{src/lib/models/account.model.ts → lib/models/account.model.d.ts} +3 -6
- package/lib/models/alternativeDate.model.d.ts +6 -0
- package/lib/models/applicationName.d.ts +5 -0
- package/{src/lib/models/cancelPMMailRequest.model.ts → lib/models/cancelPMMailRequest.model.d.ts} +1 -3
- package/lib/models/customObject.model.d.ts +3 -0
- package/lib/models/detailedPmJob.model.d.ts +23 -0
- package/lib/models/emailStatus.d.ts +4 -0
- package/lib/models/emailType.d.ts +13 -0
- package/lib/models/eventStatus.d.ts +7 -0
- package/lib/models/field.d.ts +7 -0
- package/lib/models/language.d.ts +4 -0
- package/{src/lib/models/mailRequest.model.ts → lib/models/mailRequest.model.d.ts} +1 -3
- package/lib/models/pMGroupedJob.model.d.ts +3 -0
- package/{src/lib/models/pmJob.model.ts → lib/models/pmJob.model.d.ts} +6 -7
- package/lib/models/pmJobRequest.model.d.ts +5 -0
- package/{src/lib/models/pmJobStatus.ts → lib/models/pmJobStatus.d.ts} +3 -8
- package/lib/models/reason.model.d.ts +4 -0
- package/lib/models/reasonCode.d.ts +7 -0
- package/lib/models/reasonContact.d.ts +6 -0
- package/{src/lib/models/reportDateMailRequest.model.ts → lib/models/reportDateMailRequest.model.d.ts} +1 -3
- package/lib/models/role.d.ts +5 -0
- package/lib/models/service.model.d.ts +8 -0
- package/lib/models/serviceName.d.ts +10 -0
- package/{src/lib/models/socialLoginRequest.model.ts → lib/models/socialLoginRequest.model.d.ts} +1 -1
- package/lib/models/socialMadia.d.ts +3 -0
- package/lib/models/stingBoolean.d.ts +4 -0
- package/lib/models/system.d.ts +14 -0
- package/{src/lib/models/theme.model.ts → lib/models/theme.model.d.ts} +11 -18
- package/lib/models/tokenStatus.d.ts +5 -0
- package/lib/models/warranty.d.ts +17 -0
- package/lib/pipes/pipes/pipes.module.d.ts +9 -0
- package/lib/pipes/subrtring-w.pipe.d.ts +7 -0
- package/lib/pipes/substring.pipe.d.ts +7 -0
- package/lib/shared/choose-another-date/choose-another-date.component.d.ts +33 -0
- package/lib/shared/confirm-dialog/confirm-dialog.component.d.ts +20 -0
- package/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.d.ts +19 -0
- package/lib/shared/confirmed-date-information/confirmed-date-information.component.d.ts +16 -0
- package/lib/shared/contact/contact.component.d.ts +39 -0
- package/lib/shared/contact-support/contact-support.component.d.ts +49 -0
- package/lib/shared/dashboard/dashboard.component.d.ts +17 -0
- package/lib/shared/maintenance-list/maintenance-list.component.d.ts +79 -0
- package/lib/shared/shared-routing.module.d.ts +7 -0
- package/lib/shared/shared.module.d.ts +40 -0
- package/lib/shared/show-links/show-links.component.d.ts +23 -0
- package/lib/shared/system-list/system-list.component.d.ts +15 -0
- package/package.json +30 -10
- package/{src/public-api.ts → public-api.d.ts} +1 -16
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -7
- package/src/lib/core/core-routing.module.ts +0 -10
- package/src/lib/core/core.module.ts +0 -35
- package/src/lib/core/menu/menu.component.css +0 -18
- package/src/lib/core/menu/menu.component.html +0 -8
- package/src/lib/core/menu/menu.component.spec.ts +0 -23
- package/src/lib/core/menu/menu.component.ts +0 -28
- package/src/lib/core/menu-consomer/menu-consomer.component.html +0 -20
- package/src/lib/core/menu-consomer/menu-consomer.component.scss +0 -20
- package/src/lib/core/menu-consomer/menu-consomer.component.spec.ts +0 -25
- package/src/lib/core/menu-consomer/menu-consomer.component.ts +0 -21
- package/src/lib/core/menu-ge-portal/menu-ge-portal.component.html +0 -7
- package/src/lib/core/menu-ge-portal/menu-ge-portal.component.scss +0 -17
- package/src/lib/core/menu-ge-portal/menu-ge-portal.component.spec.ts +0 -25
- package/src/lib/core/menu-ge-portal/menu-ge-portal.component.ts +0 -24
- package/src/lib/core/menu-warranty/menu-warranty.component.html +0 -20
- package/src/lib/core/menu-warranty/menu-warranty.component.scss +0 -16
- package/src/lib/core/menu-warranty/menu-warranty.component.spec.ts +0 -25
- package/src/lib/core/menu-warranty/menu-warranty.component.ts +0 -31
- package/src/lib/core/not-found/not-found.component.css +0 -31
- package/src/lib/core/not-found/not-found.component.html +0 -6
- package/src/lib/core/not-found/not-found.component.spec.ts +0 -23
- package/src/lib/core/not-found/not-found.component.ts +0 -15
- package/src/lib/core/top-bar/top-bar.component.css +0 -116
- package/src/lib/core/top-bar/top-bar.component.html +0 -1
- package/src/lib/core/top-bar/top-bar.component.spec.ts +0 -23
- package/src/lib/core/top-bar/top-bar.component.ts +0 -39
- package/src/lib/models/alternativeDate.model.ts +0 -6
- package/src/lib/models/applicationName.ts +0 -6
- package/src/lib/models/customObject.model.ts +0 -4
- package/src/lib/models/detailedPmJob.model.ts +0 -25
- package/src/lib/models/emailStatus.ts +0 -4
- package/src/lib/models/emailType.ts +0 -17
- package/src/lib/models/eventStatus.ts +0 -8
- package/src/lib/models/field.ts +0 -7
- package/src/lib/models/language.ts +0 -4
- package/src/lib/models/pMGroupedJob.model.ts +0 -4
- package/src/lib/models/pmJobRequest.model.ts +0 -6
- package/src/lib/models/reason.model.ts +0 -7
- package/src/lib/models/reasonCode.ts +0 -9
- package/src/lib/models/reasonContact.ts +0 -7
- package/src/lib/models/role.ts +0 -5
- package/src/lib/models/service.model.ts +0 -8
- package/src/lib/models/serviceName.ts +0 -14
- package/src/lib/models/socialMadia.ts +0 -4
- package/src/lib/models/stingBoolean.ts +0 -7
- package/src/lib/models/system.ts +0 -15
- package/src/lib/models/tokenStatus.ts +0 -6
- package/src/lib/models/warranty.ts +0 -18
- package/src/lib/pipes/pipes/pipes.module.ts +0 -14
- package/src/lib/pipes/subrtring-w.pipe.spec.ts +0 -8
- package/src/lib/pipes/subrtring-w.pipe.ts +0 -16
- package/src/lib/pipes/substring.pipe.spec.ts +0 -8
- package/src/lib/pipes/substring.pipe.ts +0 -15
- package/src/lib/shared/choose-another-date/choose-another-date.component.html +0 -9
- package/src/lib/shared/choose-another-date/choose-another-date.component.scss +0 -4
- package/src/lib/shared/choose-another-date/choose-another-date.component.spec.ts +0 -25
- package/src/lib/shared/choose-another-date/choose-another-date.component.ts +0 -126
- package/src/lib/shared/confirm-dialog/confirm-dialog.component.html +0 -27
- package/src/lib/shared/confirm-dialog/confirm-dialog.component.scss +0 -0
- package/src/lib/shared/confirm-dialog/confirm-dialog.component.spec.ts +0 -25
- package/src/lib/shared/confirm-dialog/confirm-dialog.component.ts +0 -35
- package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.css +0 -0
- package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.html +0 -19
- package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.spec.ts +0 -23
- package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.ts +0 -36
- package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.html +0 -25
- package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.scss +0 -23
- package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.spec.ts +0 -25
- package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.ts +0 -28
- package/src/lib/shared/contact/contact.component.css +0 -144
- package/src/lib/shared/contact/contact.component.html +0 -136
- package/src/lib/shared/contact/contact.component.spec.ts +0 -23
- package/src/lib/shared/contact/contact.component.ts +0 -171
- package/src/lib/shared/contact-support/contact-support.component.html +0 -130
- package/src/lib/shared/contact-support/contact-support.component.scss +0 -10
- package/src/lib/shared/contact-support/contact-support.component.spec.ts +0 -25
- package/src/lib/shared/contact-support/contact-support.component.ts +0 -176
- package/src/lib/shared/dashboard/dashboard.component.html +0 -81
- package/src/lib/shared/dashboard/dashboard.component.scss +0 -5
- package/src/lib/shared/dashboard/dashboard.component.spec.ts +0 -23
- package/src/lib/shared/dashboard/dashboard.component.ts +0 -21
- package/src/lib/shared/maintenance-list/maintenance-list.component.html +0 -106
- package/src/lib/shared/maintenance-list/maintenance-list.component.scss +0 -26
- package/src/lib/shared/maintenance-list/maintenance-list.component.spec.ts +0 -25
- package/src/lib/shared/maintenance-list/maintenance-list.component.ts +0 -398
- package/src/lib/shared/shared-routing.module.ts +0 -10
- package/src/lib/shared/shared.module.ts +0 -84
- package/src/lib/shared/show-links/show-links.component.html +0 -49
- package/src/lib/shared/show-links/show-links.component.scss +0 -0
- package/src/lib/shared/show-links/show-links.component.spec.ts +0 -25
- package/src/lib/shared/show-links/show-links.component.ts +0 -80
- package/src/lib/shared/system-list/system-list.component.css +0 -0
- package/src/lib/shared/system-list/system-list.component.html +0 -40
- package/src/lib/shared/system-list/system-list.component.spec.ts +0 -23
- package/src/lib/shared/system-list/system-list.component.ts +0 -26
- package/src/test.ts +0 -27
- package/tsconfig.lib.dev.json +0 -10
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.pp.json +0 -10
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
@@ -1,176 +0,0 @@
|
|
1
|
-
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
2
|
-
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
3
|
-
|
4
|
-
import { MessageService } from 'primeng/api';
|
5
|
-
import { DetailedPmJob } from '../../models/detailedPmJob.model';
|
6
|
-
import { PmJobStatus } from '../../models/pmJobStatus';
|
7
|
-
import { Reason } from '../../models/reason.model';
|
8
|
-
import { ReasonCode } from '../../models/reasonCode';
|
9
|
-
import { ReasonContact } from '../../models/reasonContact';
|
10
|
-
|
11
|
-
@Component({
|
12
|
-
selector: 'app-contact-support',
|
13
|
-
templateUrl: './contact-support.component.html',
|
14
|
-
styleUrls: ['./contact-support.component.scss'],
|
15
|
-
providers: [MessageService]
|
16
|
-
})
|
17
|
-
|
18
|
-
export class ContactSupportComponent implements OnInit, OnChanges {
|
19
|
-
@Input() displaycontactSupport!: boolean;
|
20
|
-
@Input() globaltranslate!: any;
|
21
|
-
@Input() translate!: any;
|
22
|
-
@Input() showDate!: boolean;
|
23
|
-
@Input() detailedPmJob!: DetailedPmJob;
|
24
|
-
@Input() reasonContact!: string;
|
25
|
-
@Input() reasons!: Reason[];
|
26
|
-
@Output() sendDetailedPm = new EventEmitter<any>();
|
27
|
-
@Output() sendForm: EventEmitter<any> = new EventEmitter();
|
28
|
-
@Output() closeContactSupport = new EventEmitter<boolean>();
|
29
|
-
form!: FormGroup;
|
30
|
-
dates!: Date[];
|
31
|
-
loading = false;
|
32
|
-
submitted = false;
|
33
|
-
minDate!: Date;
|
34
|
-
maxDate!: Date;
|
35
|
-
displayNumber = false;
|
36
|
-
|
37
|
-
selectedReason!: Reason;
|
38
|
-
|
39
|
-
constructor(private messageService: MessageService, private formBuilder: FormBuilder) { }
|
40
|
-
ngOnChanges(changes: SimpleChanges): void {
|
41
|
-
this.loadDatas();
|
42
|
-
}
|
43
|
-
|
44
|
-
ngOnInit(): void {
|
45
|
-
this.loadDatas();
|
46
|
-
}
|
47
|
-
|
48
|
-
loadDatas() {
|
49
|
-
this.filterReasons();
|
50
|
-
this.setDateRules();
|
51
|
-
this.loadForm();
|
52
|
-
}
|
53
|
-
|
54
|
-
filterReasons() {
|
55
|
-
if (this.reasons && this.reasonContact === ReasonContact.MoreDatesFormPm) {
|
56
|
-
this.selectedReason = this.reasons[0];
|
57
|
-
this.reasons = this.reasons.filter(x => x.code === ReasonCode.MPM)
|
58
|
-
}
|
59
|
-
if (this.reasons && this.reasonContact === ReasonContact.CancelFormPm) {
|
60
|
-
this.selectedReason = this.reasons[2];
|
61
|
-
this.reasons = this.reasons.filter(x => x.code === ReasonCode.CPM)
|
62
|
-
}
|
63
|
-
if (this.detailedPmJob.status === PmJobStatus.DONE) {
|
64
|
-
this.reasons = this.reasons.filter(x => x.code === ReasonCode.OTH)
|
65
|
-
}
|
66
|
-
if (this.detailedPmJob.status === PmJobStatus.VALIDATED) {
|
67
|
-
this.reasons = this.reasons.filter(x => x.code !== ReasonCode.MPM)
|
68
|
-
}
|
69
|
-
}
|
70
|
-
|
71
|
-
|
72
|
-
cancelContactSupport() {
|
73
|
-
|
74
|
-
this.closeContactSupport.emit(true);
|
75
|
-
this.messageService.add({ severity: 'error', summary: this.globaltranslate.summaryReject, detail: this.globaltranslate.detailReject });
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
}
|
80
|
-
get f() {
|
81
|
-
return this.form.controls;
|
82
|
-
}
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
setDateRules() {
|
87
|
-
let today = new Date();
|
88
|
-
let month = today.getMonth();
|
89
|
-
let year = today.getFullYear();
|
90
|
-
let prevMonth = (month === 0) ? 11 : month - 1;
|
91
|
-
let prevYear = (prevMonth === 11) ? year - 1 : year;
|
92
|
-
this.minDate = new Date();
|
93
|
-
this.minDate.setMonth(month);
|
94
|
-
this.minDate.setFullYear(prevYear);
|
95
|
-
|
96
|
-
}
|
97
|
-
|
98
|
-
loadForm() {
|
99
|
-
let name = sessionStorage.getItem('userName') as string;
|
100
|
-
let email = sessionStorage.getItem('email') as string;
|
101
|
-
let phone = sessionStorage.getItem('mobilePhoneNumber') as string;
|
102
|
-
|
103
|
-
this.form = this.formBuilder.group({
|
104
|
-
name: [name !== 'null' ? name : '', [Validators.required, Validators.minLength(3)]],
|
105
|
-
email: [email !== 'null' ? email : '', [Validators.required, Validators.email]],
|
106
|
-
phone: [phone !== 'null' ? phone : '', [Validators.required]],
|
107
|
-
extentionOrComment: [''],
|
108
|
-
reason: [{ value: '' }, [Validators.required]],
|
109
|
-
system: [{ value: this.detailedPmJob.systemName + ' ' + this.detailedPmJob.systemId, disabled: true }, [Validators.required]],
|
110
|
-
workOrder: [{ value: this.detailedPmJob.pmJob.workorderNumber, disabled: true }, [Validators.required]],
|
111
|
-
message: ['', (this.reasonContact === ReasonContact.MoreDatesFormPm) ? [] : [Validators.required, Validators.minLength(15)]],
|
112
|
-
});
|
113
|
-
}
|
114
|
-
|
115
|
-
contacted() {
|
116
|
-
this.sendContactMeEmailMethode();
|
117
|
-
|
118
|
-
}
|
119
|
-
contact() {
|
120
|
-
this.displayNumber = true;
|
121
|
-
|
122
|
-
}
|
123
|
-
|
124
|
-
closeNumber() {
|
125
|
-
this.displayNumber = false;
|
126
|
-
}
|
127
|
-
|
128
|
-
sendContactMeEmailMethode() {
|
129
|
-
this.detailedPmJob.name = this.form.value.name;
|
130
|
-
this.detailedPmJob.phone = this.form.value.phone;
|
131
|
-
this.detailedPmJob.extentionOrComment = this.form.value.extentionOrComment;
|
132
|
-
this.detailedPmJob.email = this.form.value.email;
|
133
|
-
this.detailedPmJob.reason = (this.reasonContact === ReasonContact.MoreDatesFormPm) ? this.reasons[0].name : this.form.value.reason.name;
|
134
|
-
this.detailedPmJob.extentionOrComment = this.form.value.extentionOrComment;
|
135
|
-
this.detailedPmJob.comment = this.form.value.message;
|
136
|
-
this.detailedPmJob.reasonContact = this.reasonContact;
|
137
|
-
this.detailedPmJob.futureStatus = this.slectsFutureStatus(this.form.value.reason.code);
|
138
|
-
|
139
|
-
this.sendDetailedPm.emit(this.detailedPmJob);
|
140
|
-
}
|
141
|
-
|
142
|
-
slectsFutureStatus(status: any) {
|
143
|
-
switch (status) {
|
144
|
-
case ReasonCode.MPM: return PmJobStatus.WAITING;
|
145
|
-
case ReasonCode.RPM: return PmJobStatus.REPORTED;
|
146
|
-
case ReasonCode.CPM: return PmJobStatus.CANCELLED;
|
147
|
-
case ReasonCode.SDI: return PmJobStatus.DESINSTALLED;
|
148
|
-
case ReasonCode.OTH: return PmJobStatus.OTHER;
|
149
|
-
default: return "Erreur";
|
150
|
-
}
|
151
|
-
}
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
onSubmit() {
|
156
|
-
this.submitted = true;
|
157
|
-
if (this.form.invalid) {
|
158
|
-
this.messageService.add({ severity: 'error', summary: this.globaltranslate.summaryError, detail: this.globaltranslate.invalidForm });
|
159
|
-
return;
|
160
|
-
}
|
161
|
-
this.contacted();
|
162
|
-
}
|
163
|
-
|
164
|
-
preventStringKeypress(event: any): void {
|
165
|
-
if (
|
166
|
-
isNaN(Number(String.fromCharCode(event.charCode))) ||
|
167
|
-
String.fromCharCode(event.charCode) === ' '
|
168
|
-
) {
|
169
|
-
event.preventDefault();
|
170
|
-
}
|
171
|
-
}
|
172
|
-
|
173
|
-
}
|
174
|
-
|
175
|
-
|
176
|
-
|
@@ -1,81 +0,0 @@
|
|
1
|
-
<div class="GE">
|
2
|
-
<div class="home">
|
3
|
-
<h3 class="title">{{translate.title}}</h3>
|
4
|
-
<div class="row">
|
5
|
-
<div class="col-md-8">
|
6
|
-
<div class="row">
|
7
|
-
<div class="col-md-12 card-bg" style="cursor: pointer;" routerLink="./systems">
|
8
|
-
<div class="conteur">
|
9
|
-
<img class="d-block mx-auto" height="60px" src="assets/img/GEPortal/tools.png">
|
10
|
-
<h3 class="counter text-center mt-4">{{systems.length}} {{translate.systems}}</h3>
|
11
|
-
</div>
|
12
|
-
</div>
|
13
|
-
</div>
|
14
|
-
<br>
|
15
|
-
|
16
|
-
<div class="row">
|
17
|
-
<div class="col-md-12 card-bg" style="cursor: pointer;" routerLink="./maintenance">
|
18
|
-
<div class="conteur conteur bg--primary">
|
19
|
-
<img class="d-block mx-auto " height="60px" src="assets/img/GEPortal/calendar-check.png">
|
20
|
-
<h3 class="counter text-center mt-4">{{toBeScheduledMaintenanceList.length}} {{translate.upComing}}</h3>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
<!-- <div class="col-md-6 card-bg">
|
24
|
-
<div class="d-block mx-auto conteur bg--primary">
|
25
|
-
<img class="d-block mx-auto" height="60px" src="assets/img/GEPortal/calendar-check.png">
|
26
|
-
<h3 class="counter text-center mt-4"> {{alreadyScheduledMaintenanceList.length}} {{translate.toValidate}}</h3>
|
27
|
-
</div>
|
28
|
-
</div> -->
|
29
|
-
</div>
|
30
|
-
<div class="row mt-4">
|
31
|
-
<div class="col-md-12 card-bg">
|
32
|
-
<div class="conteur">
|
33
|
-
<h4> {{translate.upcoming}}</h4>
|
34
|
-
<p-table [value]="toBeScheduledMaintenanceList" responsiveLayout="scroll">
|
35
|
-
<ng-template pTemplate="header">
|
36
|
-
<tr>
|
37
|
-
<th>{{translate.name}}</th>
|
38
|
-
<th>{{translate.systemId}}</th>
|
39
|
-
<th>{{translate.workorderId}}</th>
|
40
|
-
<th>{{translate.endDateTime}}</th>
|
41
|
-
</tr>
|
42
|
-
</ng-template>
|
43
|
-
<ng-template pTemplate="body" let-product>
|
44
|
-
<tr>
|
45
|
-
<td>{{product.systemName }}</td>
|
46
|
-
<td>{{product.systemId }}</td>
|
47
|
-
<td>{{product.pmJob.workorderNumber}}</td>
|
48
|
-
<td>{{product.pmJob.endDateTime | date: 'dd MMM yyyy '}} </td>
|
49
|
-
</tr>
|
50
|
-
</ng-template>
|
51
|
-
</p-table>
|
52
|
-
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
</div>
|
56
|
-
</div>
|
57
|
-
<div class="col-md-4" >
|
58
|
-
<div routerLink="./contact" class="card- d-grid text-center justify-content-center align-items-center p-5" style="cursor: pointer;">
|
59
|
-
<img src="assets/img/GEPortal/phone.png" width="80px" class="img-fluid mx-auto">
|
60
|
-
<h5 class="mt-5"> {{ translate.contact}}</h5>
|
61
|
-
</div>
|
62
|
-
<div class="card- d-grid mt-4 p-4">
|
63
|
-
<h4>{{ translate.profil}}</h4>
|
64
|
-
<div class="d-flex align-items-center mb-3 mt-4"> <img src="assets/img/GEPortal/user.png">
|
65
|
-
<p> {{name}}</p>
|
66
|
-
</div>
|
67
|
-
<div class="d-flex align-items-center mb-3"> <img src="assets/img/GEPortal/mail.png">
|
68
|
-
<p> {{email}}</p>
|
69
|
-
</div>
|
70
|
-
<!-- <div class="d-flex align-items-center mb-3"> <img src="assets/img/GEPortal/map.png">
|
71
|
-
<p>31 rue marseille France</p>
|
72
|
-
</div> -->
|
73
|
-
<div class="d-flex align-items-center mb-3"> <img src="assets/img/GEPortal/phone-call.png">
|
74
|
-
<p> {{number}}</p>
|
75
|
-
</div>
|
76
|
-
</div>
|
77
|
-
</div>
|
78
|
-
|
79
|
-
</div>
|
80
|
-
</div>
|
81
|
-
</div>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
2
|
-
|
3
|
-
import { DashboardComponent } from './dashboard.component';
|
4
|
-
|
5
|
-
describe('DashboardComponent', () => {
|
6
|
-
let component: DashboardComponent;
|
7
|
-
let fixture: ComponentFixture<DashboardComponent>;
|
8
|
-
|
9
|
-
beforeEach(async () => {
|
10
|
-
await TestBed.configureTestingModule({
|
11
|
-
declarations: [ DashboardComponent ]
|
12
|
-
})
|
13
|
-
.compileComponents();
|
14
|
-
|
15
|
-
fixture = TestBed.createComponent(DashboardComponent);
|
16
|
-
component = fixture.componentInstance;
|
17
|
-
fixture.detectChanges();
|
18
|
-
});
|
19
|
-
|
20
|
-
it('should create', () => {
|
21
|
-
expect(component).toBeTruthy();
|
22
|
-
});
|
23
|
-
});
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { Component, OnChanges,Input, SimpleChanges } from '@angular/core';
|
2
|
-
import { DetailedPmJob } from '../../models/detailedPmJob.model';
|
3
|
-
import { System } from '../../models/system';
|
4
|
-
|
5
|
-
|
6
|
-
@Component({
|
7
|
-
selector: 'awf-dashboard',
|
8
|
-
templateUrl: './dashboard.component.html',
|
9
|
-
styleUrls: ['./dashboard.component.scss']
|
10
|
-
})
|
11
|
-
export class DashboardComponent implements OnChanges {
|
12
|
-
@Input() name!: string;
|
13
|
-
@Input() email!: string;
|
14
|
-
@Input() number!: string;
|
15
|
-
@Input() systems!: System[] ;
|
16
|
-
@Input() toBeScheduledMaintenanceList: DetailedPmJob[] = [];
|
17
|
-
@Input() alreadyScheduledMaintenanceList: DetailedPmJob[] = [];
|
18
|
-
@Input() translate!: any;
|
19
|
-
constructor() { }
|
20
|
-
ngOnChanges(changes: SimpleChanges): void {}
|
21
|
-
}
|
@@ -1,106 +0,0 @@
|
|
1
|
-
<p-table #dt [value]="maintenanceList" responsiveLayout="stack" [rows]="10" [showCurrentPageReport]="true" [rowsPerPageOptions]="[5,10,25,50]"
|
2
|
-
[globalFilterFields]="['systemId','pmJob.caseId','systemName','pmJob.workorderNumber','pmJob.startDateTime','pmJob.endDateTime','pmJob.case_type','pmJob.case_category','status']"
|
3
|
-
[rowHover]="true" dataKey="id" [currentPageReportTemplate]="globaltranslate.countPages" [first]="first">
|
4
|
-
<ng-template pTemplate="caption">
|
5
|
-
<div>
|
6
|
-
<span class="p-input-icon-left">
|
7
|
-
<i class="pi pi-search"></i>
|
8
|
-
<input pInputText type="text" (input)="applyFilterGlobal($event, 'contains')"
|
9
|
-
[placeholder]="globaltranslate.search" />
|
10
|
-
</span>
|
11
|
-
</div>
|
12
|
-
</ng-template>
|
13
|
-
<ng-template pTemplate="header" let-columns>
|
14
|
-
<tr>
|
15
|
-
<!-- <th pSortableColumn="caseId">Case Id <p-sortIcon field="caseId"></p-sortIcon> -->
|
16
|
-
<th pSortableColumn="systemName">{{translate.maintenanceList.system}}
|
17
|
-
<p-sortIcon field="systemName"></p-sortIcon>
|
18
|
-
<th pSortableColumn="room">{{translate.maintenanceList.room}}
|
19
|
-
<p-sortIcon field="room"></p-sortIcon>
|
20
|
-
<th pSortableColumn="systemId">System Id
|
21
|
-
<p-sortIcon field="systemId"></p-sortIcon>
|
22
|
-
<th pSortableColumn="workorderNumber">{{translate.maintenanceList.workOrder}}
|
23
|
-
<p-sortIcon field="workorderNumber"></p-sortIcon>
|
24
|
-
<th pSortableColumn="startDateTime">{{translate.maintenanceList.startDate}}
|
25
|
-
<p-sortIcon field="startDateTime"></p-sortIcon>
|
26
|
-
<th pSortableColumn="case_type">{{translate.maintenanceList.type}}
|
27
|
-
<p-sortIcon field="case_type"></p-sortIcon>
|
28
|
-
<th pSortableColumn="status">{{translate.maintenanceList.status}}
|
29
|
-
<p-sortIcon field="status"></p-sortIcon>
|
30
|
-
<th pSortableColumn="status" >{{translate.maintenanceList.NbrLinks}}
|
31
|
-
<p-sortIcon field="status"></p-sortIcon>
|
32
|
-
<th> Action</th>
|
33
|
-
</tr>
|
34
|
-
</ng-template>
|
35
|
-
<ng-template pTemplate="body" let-product let-columns="columns">
|
36
|
-
<tr>
|
37
|
-
<td>{{product.systemName }} </td>
|
38
|
-
<td>{{product.room }}</td>
|
39
|
-
<td>{{product.systemId }}</td>
|
40
|
-
<td>{{product.pmJob.workorderNumber }}</td>
|
41
|
-
<td>{{product.pmJob.startDateTime | date: 'dd MMM yyyy ' }}</td>
|
42
|
-
<td *ngIf="product.pmJob.caseType === 'Planned Maintenance'">{{translate.maintenanceList.typePlanned}}</td>
|
43
|
-
<td *ngIf="product.pmJob.caseType === 'QARA'">{{translate.maintenanceList.typeQARA}}</td>
|
44
|
-
<td>
|
45
|
-
<span [class]="'product-status status-' + product.status"
|
46
|
-
[pTooltip]="getStatusTooltip(product.status)">
|
47
|
-
{{transformStatus(product.status)}}
|
48
|
-
</span>
|
49
|
-
</td>
|
50
|
-
<td *ngIf="product.pmJob.groupList !== null " (click)="showLinks(product)"> <span class="circle">{{product.pmJob.groupList.length }}</span> <i class="pi pi-link" style="font-size: 1rem"></i> </td>
|
51
|
-
<td *ngIf="product.pmJob.groupList === null" (click)="showLinks(product)"> <span class="circlelinked">{{product.pmJob.groupList.length }}</span> <i class="pi pi-link" style="font-size: 1rem"></i> </td>
|
52
|
-
<td>
|
53
|
-
<button pButton pRipple type="button" label="" icon="pi pi-calendar" class="p-button-rounded" #actualTarget (click)="selectElement(product)" (click)="op.toggle($event)" [disabled]="((product.status ==='late' || product.status ==='accepted') && !isAlreadyScheduled) || product.status ==='waiting'"></button>
|
54
|
-
</td>
|
55
|
-
</tr>
|
56
|
-
</ng-template>
|
57
|
-
<ng-template pTemplate="summary">
|
58
|
-
<div class="p-d-flex p-ai-center p-jc-between">
|
59
|
-
{{globaltranslate.count}} {{maintenanceList ? maintenanceList.length : 0 }} {{globaltranslate.elements}}.
|
60
|
-
</div>
|
61
|
-
</ng-template>
|
62
|
-
</p-table>
|
63
|
-
|
64
|
-
<p-toast position="top-center"></p-toast>
|
65
|
-
<p-overlayPanel #op [dismissable]="true" [showCloseIcon]="false" [showTransitionOptions]="'0ms'" [hideTransitionOptions]="'0ms'">
|
66
|
-
<ng-template pTemplate>
|
67
|
-
|
68
|
-
<button style="width: 100%;" *ngIf="!isAlreadyScheduled" icon="pi pi-thumbs-up" (click)="confirmDialog()" [label]="translate.maintenanceList.confirmDate" class="p-button-text p-button-raised" pButton pRipple type="button">
|
69
|
-
</button>
|
70
|
-
<hr *ngIf="!isAlreadyScheduled">
|
71
|
-
<button style="width: 100%;" *ngIf="!isAlreadyScheduled && (alternativeDatesList !== null) " icon="pi pi-calendar-plus" (click)="proposeAnotherDate()" [label]="translate.maintenanceList.chooseAnotherDate" class="p-button-text p-button-raised" pButton pRipple type="button"></button>
|
72
|
-
<hr *ngIf="!isAlreadyScheduled && (alternativeDatesList!==null) ">
|
73
|
-
<button style="width: 100%;" icon="pi pi-phone" (click)="contactSupport(false)" [label]="translate.maintenanceList.contactSuppor" class="p-button-text p-button-raised" pButton pRipple type="button"></button>
|
74
|
-
<hr *ngIf="isWithLinks">
|
75
|
-
<button style="width: 100%;" icon="pi pi-link" *ngIf="isWithLinks" (click)="showLinks()" [label]="translate.maintenanceList.showLinks" class="p-button-text p-button-raised" pButton pRipple type="button"></button>
|
76
|
-
<hr *ngIf="isAlreadyScheduled && pmSelectedStatus ==='validated'">
|
77
|
-
<button style="width: 100%;" *ngIf="isAlreadyScheduled && pmSelectedStatus ==='validated'" icon="pi pi-pencil" (click)="editPm()" [label]="translate.maintenanceList.cancel" class="p-button-text p-button-raised" pButton pRipple type="button">
|
78
|
-
</button>
|
79
|
-
</ng-template>
|
80
|
-
</p-overlayPanel>
|
81
|
-
|
82
|
-
<div *ngIf="displaycontactSupport " >
|
83
|
-
<app-contact-support [reasonContact]="reasonContact" (closeContactSupport)="closeContactSupport($event)" (sendDetailedPm)="sendContactMeForm($event)" [detailedPmJob] ="maintenanceSelected" [globaltranslate]="globaltranslate" [reasons]="reasons" [translate]="translate.contactSupport" [displaycontactSupport]="displaycontactSupport" [showDate]="showDate" ></app-contact-support>
|
84
|
-
</div>
|
85
|
-
<div *ngIf="displayConfirmDialog">
|
86
|
-
<app-confirm-dialog [detailedPmJobLinkedList]="detailedPmJobLinkedList" [isProposedDate]="isProposedDate" [globaltranslate]="globaltranslate" [translate]="translate.confirmDialog"
|
87
|
-
[startDateTime]="startDateTime" [endDateTime]="endDateTime" [displayConfirmDialog]="displayConfirmDialog" (closeConfirmDialog)="closeConfirmDialog($event)">
|
88
|
-
</app-confirm-dialog>
|
89
|
-
</div>
|
90
|
-
<div *ngIf="displayConfirmDialogContact">
|
91
|
-
<app-confirm-dialog-contact [detailedPmJobLinkedList]="detailedPmJobLinkedList" [globaltranslate]="globaltranslate" [translate]="translate.confirmDialogContact"
|
92
|
-
[startDateTime]="startDateTime" [endDateTime]="endDateTime" [displayConfirmDialogContact]="displayConfirmDialogContact" (closeConfirmDialogContact)="closeConfirmDialogContact($event)">
|
93
|
-
</app-confirm-dialog-contact >
|
94
|
-
</div>
|
95
|
-
<div *ngIf="displayConfirmedDateInfo">
|
96
|
-
<app-confirmed-date-information [moreDates]="moreDates" [globaltranslate]="globaltranslate" [translate]="translate.confirmDateInformation" [startDateTime]="startDateTime" [endDateTime]="endDateTime" [displayConfirmedDateInfos]="displayConfirmedDateInfo" (closeConfirmedDateInfo)="closeConfirmedDateInfo()"></app-confirmed-date-information>
|
97
|
-
</div>
|
98
|
-
<div *ngIf="displayAnotherDate && alternativeDatesList">
|
99
|
-
<app-choose-another-date [globaltranslate]="globaltranslate" [translate]="translate.chooseAnotherDate" [alternativeDatesList]="alternativeDatesList" [displayAnotherDate]="displayAnotherDate" (closeAnotherDate)="closeAnotherDate($event)" (acceptDate)="acceptDate($event)">
|
100
|
-
</app-choose-another-date>
|
101
|
-
</div>
|
102
|
-
<div *ngIf="displayShowLinks && selectedWorkorderId">
|
103
|
-
<app-show-links [status]="status" [selectedWorkorderId]="selectedWorkorderId" [translate]="translate" [globaltranslate]="globaltranslate" [displayShowLinks]="displayShowLinks" (closeShowLinks)="closeShowLinks()" [detailedPmJobLinkedList]="detailedPmJobLinkedList"></app-show-links>
|
104
|
-
</div>
|
105
|
-
|
106
|
-
|
@@ -1,26 +0,0 @@
|
|
1
|
-
span.circle {
|
2
|
-
background: #f86359;
|
3
|
-
border-radius: 50%;
|
4
|
-
-moz-border-radius: 50%;
|
5
|
-
-webkit-border-radius: 50%;
|
6
|
-
color: #f8f8f8;
|
7
|
-
display: inline-block;
|
8
|
-
font-weight: bold;
|
9
|
-
line-height: 20px;
|
10
|
-
margin-right: 5px;
|
11
|
-
text-align: center;
|
12
|
-
width: 20px;
|
13
|
-
&linked {
|
14
|
-
background: #80a161;
|
15
|
-
border-radius: 50%;
|
16
|
-
-moz-border-radius: 50%;
|
17
|
-
-webkit-border-radius: 50%;
|
18
|
-
color: #ffffff;
|
19
|
-
display: inline-block;
|
20
|
-
font-weight: bold;
|
21
|
-
line-height: 20px;
|
22
|
-
margin-right: 5px;
|
23
|
-
text-align: center;
|
24
|
-
width: 20px;
|
25
|
-
}
|
26
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
2
|
-
|
3
|
-
import { MaintenanceListComponent } from './maintenance-list.component';
|
4
|
-
|
5
|
-
describe('MaintenanceListComponent', () => {
|
6
|
-
let component: MaintenanceListComponent;
|
7
|
-
let fixture: ComponentFixture<MaintenanceListComponent>;
|
8
|
-
|
9
|
-
beforeEach(async () => {
|
10
|
-
await TestBed.configureTestingModule({
|
11
|
-
declarations: [ MaintenanceListComponent ]
|
12
|
-
})
|
13
|
-
.compileComponents();
|
14
|
-
});
|
15
|
-
|
16
|
-
beforeEach(() => {
|
17
|
-
fixture = TestBed.createComponent(MaintenanceListComponent);
|
18
|
-
component = fixture.componentInstance;
|
19
|
-
fixture.detectChanges();
|
20
|
-
});
|
21
|
-
|
22
|
-
it('should create', () => {
|
23
|
-
expect(component).toBeTruthy();
|
24
|
-
});
|
25
|
-
});
|