awf-test-lib 0.0.93 → 0.0.94

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.
Files changed (218) hide show
  1. package/esm2020/awf-test-lib.mjs +5 -0
  2. package/esm2020/lib/core/core-routing.module.mjs +18 -0
  3. package/esm2020/lib/core/core.module.mjs +51 -0
  4. package/esm2020/lib/core/menu/menu.component.mjs +40 -0
  5. package/esm2020/lib/core/menu-consomer/menu-consomer.component.mjs +27 -0
  6. package/esm2020/lib/core/menu-ge-portal/menu-ge-portal.component.mjs +31 -0
  7. package/esm2020/lib/core/menu-warranty/menu-warranty.component.mjs +35 -0
  8. package/esm2020/lib/core/not-found/not-found.component.mjs +19 -0
  9. package/esm2020/lib/core/top-bar/top-bar.component.mjs +41 -0
  10. package/esm2020/lib/models/account.model.mjs +3 -0
  11. package/esm2020/lib/models/alternativeDate.model.mjs +3 -0
  12. package/esm2020/lib/models/applicationName.mjs +7 -0
  13. package/esm2020/lib/models/cancelPMMailRequest.model.mjs +4 -0
  14. package/esm2020/lib/models/customObject.model.mjs +3 -0
  15. package/esm2020/lib/models/detailedPmJob.model.mjs +3 -0
  16. package/esm2020/lib/models/emailStatus.mjs +6 -0
  17. package/esm2020/lib/models/emailType.mjs +15 -0
  18. package/esm2020/lib/models/eventStatus.mjs +9 -0
  19. package/esm2020/lib/models/field.mjs +9 -0
  20. package/esm2020/lib/models/language.mjs +6 -0
  21. package/esm2020/lib/models/mailRequest.model.mjs +3 -0
  22. package/esm2020/lib/models/pMGroupedJob.model.mjs +3 -0
  23. package/esm2020/lib/models/pmJob.model.mjs +3 -0
  24. package/esm2020/lib/models/pmJobRequest.model.mjs +3 -0
  25. package/esm2020/lib/models/pmJobStatus.mjs +17 -0
  26. package/esm2020/lib/models/reason.model.mjs +3 -0
  27. package/esm2020/lib/models/reasonCode.mjs +9 -0
  28. package/esm2020/lib/models/reasonContact.mjs +8 -0
  29. package/esm2020/lib/models/reportDateMailRequest.model.mjs +4 -0
  30. package/esm2020/lib/models/role.mjs +7 -0
  31. package/esm2020/lib/models/service.model.mjs +3 -0
  32. package/esm2020/lib/models/serviceName.mjs +12 -0
  33. package/esm2020/lib/models/socialLoginRequest.model.mjs +3 -0
  34. package/esm2020/lib/models/socialMadia.mjs +5 -0
  35. package/esm2020/lib/models/stingBoolean.mjs +6 -0
  36. package/esm2020/lib/models/system.mjs +3 -0
  37. package/esm2020/lib/models/theme.model.mjs +2 -0
  38. package/esm2020/lib/models/tokenStatus.mjs +7 -0
  39. package/esm2020/lib/models/warranty.mjs +3 -0
  40. package/esm2020/lib/pipes/pipes/pipes.module.mjs +21 -0
  41. package/esm2020/lib/pipes/subrtring-w.pipe.mjs +20 -0
  42. package/esm2020/lib/pipes/substring.pipe.mjs +16 -0
  43. package/esm2020/lib/shared/choose-another-date/choose-another-date.component.mjs +110 -0
  44. package/esm2020/lib/shared/confirm-dialog/confirm-dialog.component.mjs +44 -0
  45. package/esm2020/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.mjs +42 -0
  46. package/esm2020/lib/shared/confirmed-date-information/confirmed-date-information.component.mjs +35 -0
  47. package/esm2020/lib/shared/contact/contact.component.mjs +136 -0
  48. package/esm2020/lib/shared/contact-support/contact-support.component.mjs +161 -0
  49. package/esm2020/lib/shared/dashboard/dashboard.component.mjs +34 -0
  50. package/esm2020/lib/shared/maintenance-list/maintenance-list.component.mjs +360 -0
  51. package/esm2020/lib/shared/shared-routing.module.mjs +18 -0
  52. package/esm2020/lib/shared/shared.module.mjs +144 -0
  53. package/esm2020/lib/shared/show-links/show-links.component.mjs +81 -0
  54. package/esm2020/lib/shared/system-list/system-list.component.mjs +32 -0
  55. package/esm2020/public-api.mjs +48 -0
  56. package/fesm2015/awf-test-lib.mjs +1546 -0
  57. package/fesm2015/awf-test-lib.mjs.map +1 -0
  58. package/fesm2020/awf-test-lib.mjs +1542 -0
  59. package/fesm2020/awf-test-lib.mjs.map +1 -0
  60. package/index.d.ts +5 -0
  61. package/lib/core/core-routing.module.d.ts +7 -0
  62. package/lib/core/core.module.d.ts +15 -0
  63. package/lib/core/menu/menu.component.d.ts +17 -0
  64. package/lib/core/menu-consomer/menu-consomer.component.d.ts +12 -0
  65. package/lib/core/menu-ge-portal/menu-ge-portal.component.d.ts +13 -0
  66. package/lib/core/menu-warranty/menu-warranty.component.d.ts +15 -0
  67. package/lib/core/not-found/not-found.component.d.ts +10 -0
  68. package/lib/core/top-bar/top-bar.component.d.ts +13 -0
  69. package/{src/lib/models/account.model.ts → lib/models/account.model.d.ts} +3 -6
  70. package/lib/models/alternativeDate.model.d.ts +6 -0
  71. package/lib/models/applicationName.d.ts +5 -0
  72. package/{src/lib/models/cancelPMMailRequest.model.ts → lib/models/cancelPMMailRequest.model.d.ts} +1 -3
  73. package/lib/models/customObject.model.d.ts +3 -0
  74. package/lib/models/detailedPmJob.model.d.ts +22 -0
  75. package/lib/models/emailStatus.d.ts +4 -0
  76. package/lib/models/emailType.d.ts +13 -0
  77. package/lib/models/eventStatus.d.ts +7 -0
  78. package/lib/models/field.d.ts +7 -0
  79. package/lib/models/language.d.ts +4 -0
  80. package/{src/lib/models/mailRequest.model.ts → lib/models/mailRequest.model.d.ts} +1 -3
  81. package/lib/models/pMGroupedJob.model.d.ts +3 -0
  82. package/{src/lib/models/pmJob.model.ts → lib/models/pmJob.model.d.ts} +6 -7
  83. package/lib/models/pmJobRequest.model.d.ts +5 -0
  84. package/{src/lib/models/pmJobStatus.ts → lib/models/pmJobStatus.d.ts} +3 -8
  85. package/lib/models/reason.model.d.ts +4 -0
  86. package/lib/models/reasonCode.d.ts +7 -0
  87. package/lib/models/reasonContact.d.ts +6 -0
  88. package/{src/lib/models/reportDateMailRequest.model.ts → lib/models/reportDateMailRequest.model.d.ts} +1 -3
  89. package/lib/models/role.d.ts +5 -0
  90. package/lib/models/service.model.d.ts +8 -0
  91. package/lib/models/serviceName.d.ts +10 -0
  92. package/{src/lib/models/socialLoginRequest.model.ts → lib/models/socialLoginRequest.model.d.ts} +1 -1
  93. package/lib/models/socialMadia.d.ts +3 -0
  94. package/lib/models/stingBoolean.d.ts +4 -0
  95. package/lib/models/system.d.ts +14 -0
  96. package/{src/lib/models/theme.model.ts → lib/models/theme.model.d.ts} +11 -18
  97. package/lib/models/tokenStatus.d.ts +5 -0
  98. package/lib/models/warranty.d.ts +17 -0
  99. package/lib/pipes/pipes/pipes.module.d.ts +9 -0
  100. package/lib/pipes/subrtring-w.pipe.d.ts +7 -0
  101. package/lib/pipes/substring.pipe.d.ts +7 -0
  102. package/lib/shared/choose-another-date/choose-another-date.component.d.ts +33 -0
  103. package/lib/shared/confirm-dialog/confirm-dialog.component.d.ts +20 -0
  104. package/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.d.ts +19 -0
  105. package/lib/shared/confirmed-date-information/confirmed-date-information.component.d.ts +15 -0
  106. package/lib/shared/contact/contact.component.d.ts +38 -0
  107. package/lib/shared/contact-support/contact-support.component.d.ts +49 -0
  108. package/lib/shared/dashboard/dashboard.component.d.ts +17 -0
  109. package/lib/shared/maintenance-list/maintenance-list.component.d.ts +83 -0
  110. package/lib/shared/shared-routing.module.d.ts +7 -0
  111. package/lib/shared/shared.module.d.ts +40 -0
  112. package/lib/shared/show-links/show-links.component.d.ts +23 -0
  113. package/lib/shared/system-list/system-list.component.d.ts +15 -0
  114. package/package.json +30 -10
  115. package/{src/public-api.ts → public-api.d.ts} +1 -16
  116. package/karma.conf.js +0 -44
  117. package/ng-package.json +0 -7
  118. package/src/lib/core/core-routing.module.ts +0 -10
  119. package/src/lib/core/core.module.ts +0 -35
  120. package/src/lib/core/menu/menu.component.css +0 -18
  121. package/src/lib/core/menu/menu.component.html +0 -8
  122. package/src/lib/core/menu/menu.component.spec.ts +0 -23
  123. package/src/lib/core/menu/menu.component.ts +0 -27
  124. package/src/lib/core/menu-consomer/menu-consomer.component.html +0 -20
  125. package/src/lib/core/menu-consomer/menu-consomer.component.scss +0 -20
  126. package/src/lib/core/menu-consomer/menu-consomer.component.spec.ts +0 -25
  127. package/src/lib/core/menu-consomer/menu-consomer.component.ts +0 -21
  128. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.html +0 -7
  129. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.scss +0 -17
  130. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.spec.ts +0 -25
  131. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.ts +0 -24
  132. package/src/lib/core/menu-warranty/menu-warranty.component.html +0 -20
  133. package/src/lib/core/menu-warranty/menu-warranty.component.scss +0 -16
  134. package/src/lib/core/menu-warranty/menu-warranty.component.spec.ts +0 -25
  135. package/src/lib/core/menu-warranty/menu-warranty.component.ts +0 -31
  136. package/src/lib/core/not-found/not-found.component.css +0 -31
  137. package/src/lib/core/not-found/not-found.component.html +0 -6
  138. package/src/lib/core/not-found/not-found.component.spec.ts +0 -23
  139. package/src/lib/core/not-found/not-found.component.ts +0 -15
  140. package/src/lib/core/top-bar/top-bar.component.css +0 -116
  141. package/src/lib/core/top-bar/top-bar.component.html +0 -1
  142. package/src/lib/core/top-bar/top-bar.component.spec.ts +0 -23
  143. package/src/lib/core/top-bar/top-bar.component.ts +0 -39
  144. package/src/lib/models/alternativeDate.model.ts +0 -6
  145. package/src/lib/models/applicationName.ts +0 -6
  146. package/src/lib/models/customObject.model.ts +0 -4
  147. package/src/lib/models/detailedPmJob.model.ts +0 -24
  148. package/src/lib/models/emailStatus.ts +0 -4
  149. package/src/lib/models/emailType.ts +0 -17
  150. package/src/lib/models/eventStatus.ts +0 -8
  151. package/src/lib/models/field.ts +0 -7
  152. package/src/lib/models/language.ts +0 -4
  153. package/src/lib/models/pMGroupedJob.model.ts +0 -4
  154. package/src/lib/models/pmJobRequest.model.ts +0 -6
  155. package/src/lib/models/reason.model.ts +0 -7
  156. package/src/lib/models/reasonCode.ts +0 -9
  157. package/src/lib/models/reasonContact.ts +0 -7
  158. package/src/lib/models/role.ts +0 -5
  159. package/src/lib/models/service.model.ts +0 -8
  160. package/src/lib/models/serviceName.ts +0 -14
  161. package/src/lib/models/socialMadia.ts +0 -4
  162. package/src/lib/models/stingBoolean.ts +0 -7
  163. package/src/lib/models/system.ts +0 -15
  164. package/src/lib/models/tokenStatus.ts +0 -6
  165. package/src/lib/models/warranty.ts +0 -18
  166. package/src/lib/pipes/pipes/pipes.module.ts +0 -14
  167. package/src/lib/pipes/subrtring-w.pipe.spec.ts +0 -8
  168. package/src/lib/pipes/subrtring-w.pipe.ts +0 -16
  169. package/src/lib/pipes/substring.pipe.spec.ts +0 -8
  170. package/src/lib/pipes/substring.pipe.ts +0 -15
  171. package/src/lib/shared/choose-another-date/choose-another-date.component.html +0 -9
  172. package/src/lib/shared/choose-another-date/choose-another-date.component.scss +0 -4
  173. package/src/lib/shared/choose-another-date/choose-another-date.component.spec.ts +0 -25
  174. package/src/lib/shared/choose-another-date/choose-another-date.component.ts +0 -126
  175. package/src/lib/shared/confirm-dialog/confirm-dialog.component.html +0 -27
  176. package/src/lib/shared/confirm-dialog/confirm-dialog.component.scss +0 -0
  177. package/src/lib/shared/confirm-dialog/confirm-dialog.component.spec.ts +0 -25
  178. package/src/lib/shared/confirm-dialog/confirm-dialog.component.ts +0 -35
  179. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.css +0 -0
  180. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.html +0 -19
  181. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.spec.ts +0 -23
  182. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.ts +0 -36
  183. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.html +0 -25
  184. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.scss +0 -23
  185. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.spec.ts +0 -25
  186. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.ts +0 -25
  187. package/src/lib/shared/contact/contact.component.css +0 -144
  188. package/src/lib/shared/contact/contact.component.html +0 -122
  189. package/src/lib/shared/contact/contact.component.spec.ts +0 -23
  190. package/src/lib/shared/contact/contact.component.ts +0 -157
  191. package/src/lib/shared/contact-support/contact-support.component.html +0 -126
  192. package/src/lib/shared/contact-support/contact-support.component.scss +0 -10
  193. package/src/lib/shared/contact-support/contact-support.component.spec.ts +0 -25
  194. package/src/lib/shared/contact-support/contact-support.component.ts +0 -191
  195. package/src/lib/shared/dashboard/dashboard.component.html +0 -81
  196. package/src/lib/shared/dashboard/dashboard.component.scss +0 -5
  197. package/src/lib/shared/dashboard/dashboard.component.spec.ts +0 -23
  198. package/src/lib/shared/dashboard/dashboard.component.ts +0 -21
  199. package/src/lib/shared/maintenance-list/maintenance-list.component.html +0 -100
  200. package/src/lib/shared/maintenance-list/maintenance-list.component.scss +0 -26
  201. package/src/lib/shared/maintenance-list/maintenance-list.component.spec.ts +0 -25
  202. package/src/lib/shared/maintenance-list/maintenance-list.component.ts +0 -466
  203. package/src/lib/shared/shared-routing.module.ts +0 -10
  204. package/src/lib/shared/shared.module.ts +0 -84
  205. package/src/lib/shared/show-links/show-links.component.html +0 -48
  206. package/src/lib/shared/show-links/show-links.component.scss +0 -0
  207. package/src/lib/shared/show-links/show-links.component.spec.ts +0 -25
  208. package/src/lib/shared/show-links/show-links.component.ts +0 -80
  209. package/src/lib/shared/system-list/system-list.component.css +0 -0
  210. package/src/lib/shared/system-list/system-list.component.html +0 -40
  211. package/src/lib/shared/system-list/system-list.component.spec.ts +0 -23
  212. package/src/lib/shared/system-list/system-list.component.ts +0 -26
  213. package/src/test.ts +0 -27
  214. package/tsconfig.lib.dev.json +0 -10
  215. package/tsconfig.lib.json +0 -15
  216. package/tsconfig.lib.pp.json +0 -10
  217. package/tsconfig.lib.prod.json +0 -10
  218. package/tsconfig.spec.json +0 -17
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { ContactComponent } from './contact.component';
4
-
5
- describe('ContactComponent', () => {
6
- let component: ContactComponent;
7
- let fixture: ComponentFixture<ContactComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ ContactComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(ContactComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,157 +0,0 @@
1
- import { Component, Output, OnChanges, Input, EventEmitter } from '@angular/core';
2
- import { FormBuilder, FormGroup, Validators } from '@angular/forms';
3
- import { MessageService } from 'primeng/api';
4
- import { DetailedPmJob } from '../../models/detailedPmJob.model';
5
- import { EventStatus } from '../../models/eventStatus';
6
- import { PmJob } from '../../models/pmJob.model';
7
- import { PmJobStatus } from '../../models/pmJobStatus';
8
- import { Reason } from '../../models/reason.model';
9
- import { ReasonCode } from '../../models/reasonCode';
10
- import { ReasonContact } from '../../models/reasonContact';
11
- import { System } from '../../models/system';
12
- @Component({
13
- selector: 'awf-contact',
14
- templateUrl: './contact.component.html',
15
- styleUrls: ['./contact.component.css'],
16
- providers: [MessageService],
17
- })
18
- export class ContactComponent implements OnChanges {
19
-
20
- @Input() loading = false;
21
- @Input() submitted = false;
22
- @Input() systems: System[] = [];
23
- @Input() selectedSystems: System[] = [];
24
- @Input() translate!:any;
25
- @Input() reasons!: Reason[];
26
- @Output() sendForm: EventEmitter<any> = new EventEmitter();
27
- form!: FormGroup;
28
- selectedReason!: any;
29
- selectedSystem!: System;
30
- selectedPm!: any;
31
- pmJobs!:PmJob[];
32
- systemContainPm = true ;
33
-
34
- showPm = false ;
35
- constructor(
36
- private formBuilder: FormBuilder,
37
- private messageService: MessageService,
38
- ) {}
39
-
40
- ngOnChanges(): void {
41
- this.reasons = this.reasons.filter(x=> (x.code== ReasonCode.SDI|| x.code== ReasonCode.OTH ));
42
- this.loadForm();
43
- }
44
-
45
- // convenience getter for easy access to form fields
46
- get f() {
47
- return this.form.controls;
48
- }
49
-
50
- preventStringKeypress(event: any): void {
51
- if (
52
- isNaN(Number(String.fromCharCode(event.charCode))) ||
53
- String.fromCharCode(event.charCode) === ' '
54
- ) {
55
- event.preventDefault();
56
- }
57
- }
58
-
59
- onSubmit() {
60
- this.submitted = true;
61
-
62
- if (this.form.invalid) {
63
- this.messageService.add({
64
- severity: 'error',
65
- summary: 'Error',
66
- detail: 'The form is invalid',
67
- });
68
- return;
69
- }
70
-
71
- console.log(this.form.value.pms)
72
- let detailedPmJob = { } as DetailedPmJob ;
73
- detailedPmJob.name = this.form.value.name;
74
- detailedPmJob.phone = this.form.value.phone;
75
- detailedPmJob.email = this.form.value.email;
76
- detailedPmJob.reason = this.form.value.reason.name;
77
- detailedPmJob.comment = this.form.value.message;
78
- if( this.form.value.pms !== undefined){
79
- detailedPmJob.pmJob = this.form.value.pms;
80
- }
81
- detailedPmJob.systemName = this.selectedSystem.name ;
82
- detailedPmJob.systemId = this.selectedSystem.systemId ;
83
- detailedPmJob.siteName = this.selectedSystem.siteName ;
84
- detailedPmJob.siteCity = this.selectedSystem.siteCity ;
85
- detailedPmJob.sitePostalCode =this.selectedSystem.sitePostalCode
86
- detailedPmJob.toUpdate = true ;
87
- if( this.form.value.pms !== undefined)
88
- {
89
- detailedPmJob.selectedDate = detailedPmJob.pmJob.startDateTime ;
90
-
91
- }
92
- detailedPmJob.reasonContact = ReasonContact.Contact ;
93
- detailedPmJob.futureStatus = this.slectsFutureStatus(this.form.value.reason.code)
94
- console.log()
95
- this.sendForm.emit(detailedPmJob);
96
- }
97
-
98
- slectsFutureStatus(status:any)
99
- {
100
- switch (status) {
101
- case ReasonCode.MPM : return PmJobStatus.WAITING;
102
- case ReasonCode.RPM : return PmJobStatus.REPORTED;
103
- case ReasonCode.CPM : return PmJobStatus.CANCELLED;
104
- case ReasonCode.SDI : return PmJobStatus.DESINSTALLED;
105
- case ReasonCode.OTH: return PmJobStatus.OTHER;
106
- default : return "Erreur";
107
- }
108
- }
109
-
110
-
111
- loadForm() {
112
- let name = sessionStorage.getItem('userName') as string ;
113
- let email = sessionStorage.getItem('email') as string;
114
- let phone = sessionStorage.getItem('mobilePhoneNumber') as string;
115
- this.form = this.formBuilder.group({
116
- name: [ name !== 'null' ? name : '' , [Validators.required, Validators.minLength(3)]],
117
- email: [ email!== 'null' ? email : '', [Validators.required, Validators.email]],
118
- phone: [ phone!== 'null' ? phone : '', [Validators.required]],
119
- reason: ['' , [Validators.required]],
120
- systems: [[], [Validators.required]],
121
- pms: [[], this.showPm ? [] :[]],
122
- message: ['', [Validators.required, Validators.minLength(15)]],
123
- });
124
- }
125
-
126
-
127
- selectPM(selectedSystem:any)
128
- {
129
- this.systemContainPm = true ;
130
- if(selectedSystem === undefined )
131
- {
132
- return;
133
- }
134
- else
135
- {
136
-
137
-
138
- if(selectedSystem.pmJobs.length === 0 )
139
- {
140
- this.systemContainPm = false ;
141
- }
142
- else
143
- {
144
- this.selectedSystem = selectedSystem;
145
- this.pmJobs = selectedSystem.pmJobs;
146
- this.showPm = true ;
147
-
148
- }
149
-
150
-
151
-
152
- }
153
- }
154
-
155
-
156
- }
157
-
@@ -1,126 +0,0 @@
1
- <p-dialog header="" [modal]="true" [(visible)]="displaycontactSupport" [maximizable]="true" [breakpoints]="{'960px': '75vw'}" [style]="{width: '900px',height:'1400px'}" [draggable]="false" [resizable]="true" (onHide)="cancelContactSupport()">
2
- <strong>
3
- <h3 class="text-center title"> {{translate.header}} </h3>
4
- </strong>
5
- <br>
6
- <div class="row" *ngIf="translate && form && reasons ">
7
-
8
- <div class="col-md-6 card-bg" >
9
- <div class="conteur contact-bloc" [style]="{height:'150px'}">
10
- <img class="d-block mx-auto" src="assets/img/GEPortal/phone-call-.png">
11
- <p class="counter contact-icon text-center mt-4">{{translate.contacted}}</p>
12
- </div>
13
- <br>
14
- <form [formGroup]="form" *ngIf="form" class="contact100-form validate-form">
15
- <span class="contact100-form-title">{{translate.title}}</span>
16
- <div class="p-grid p-fluid p-mt-2">
17
- <div class="p-col-12 p-md-12 ">
18
- <span class="titre">{{translate.placeholderName}}</span> <span class="requis">* </span>:
19
- <input [placeholder]="translate.placeholderName" type="text" pInputText formControlName="name" [ngClass]="{ 'is-invalid': submitted && f.name.invalid }">
20
- <div *ngIf="submitted && f.name.errors">
21
- <div class="requis" *ngIf="f.name.errors.required">{{translate.requiredName}}</div>
22
- <div class="requis" *ngIf="f.name.errors.minlength">{{translate.requiredNameMin}}</div>
23
- </div>
24
- </div>
25
- </div>
26
- <div class="p-grid p-fluid p-mt-2">
27
- <div class="p-col-12 p-md-12 ">
28
- <span class="titre">{{translate.placeholderEmail}}</span> <span class="requis">*</span>:
29
- <input [placeholder]="translate.placeholderEmail" type="text" pInputText formControlName="email" [ngClass]="{ 'is-invalid': submitted && f.email.invalid }">
30
- <div *ngIf="submitted && f.email.errors">
31
- <div class="requis" *ngIf="f.email.errors.required">{{translate.requiredEmail}}</div>
32
- <div class="requis" *ngIf="f.email.errors.email">{{translate.requiredEmailFormat}}</div>
33
- </div>
34
- </div>
35
- </div>
36
- <div class="p-grid p-fluid p-mt-2">
37
- <div class="p-col-12 p-md-12 ">
38
- <span class="titre">{{translate.placeholderPhone}}</span> <span class="requis">*</span>:
39
- <input [placeholder]="translate.placeholderPhone" type="text" pInputText formControlName="phone" [ngClass]="{ 'is-invalid': submitted && f.phone.invalid }" (keypress)="preventStringKeypress($event)">
40
- <div *ngIf="submitted && f.phone.errors">
41
- <div class="requis" *ngIf="f.phone.errors.required">{{translate.requiredPhone}}</div>
42
- </div>
43
- </div>
44
- </div>
45
-
46
- <div class="p-grid p-fluid p-mt-2">
47
- <div class="p-col-12 p-md-12 ">
48
- <span class="titre">{{translate.system}}</span> <span class="requis">*</span>:
49
- <input [placeholder]="translate.system" type="text" pInputText formControlName="system" [ngClass]="{ 'is-invalid': submitted && f.system.invalid }">
50
- <div *ngIf="submitted && f.system.errors">
51
- <div class="requis" *ngIf="f.system.errors?.required">{{translate.required}}</div>
52
- </div>
53
- </div>
54
- </div>
55
- <div class="p-grid p-fluid p-mt-2">
56
- <div class="p-col-12 p-md-12 ">
57
- <span class="titre">{{translate.workOrder}}</span> <span class="requis"></span>:
58
- <input [placeholder]="translate.workOrder" type="text" pInputText formControlName="workOrder" [ngClass]="{ 'is-invalid': submitted && f.workOrder.invalid }">
59
- <div *ngIf="submitted && f.workOrder.errors">
60
- <div class="requis" *ngIf="f.workOrder.errors?.required">{{translate.required}}</div>
61
- </div>
62
- </div>
63
- </div>
64
- <div class="p-grid p-fluid p-mt-2">
65
- <div class="p-col-12 p-md-12 ">
66
- <span class="titre">{{translate.reason}}</span> <span class="requis">*</span>:
67
- <p-dropdown [options]="reasons" [placeholder]="translate.selectReason" [(ngModel)]="selectedReason" optionLabel="name" formControlName="reason" optionDisabled="inactive" [ngClass]="{ 'is-invalid': submitted && f.reason.invalid }"></p-dropdown>
68
- <!-- <input [placeholder]="translate.reason" type="text" pInputText formControlName="reason" [ngClass]="{ 'is-invalid': submitted && f.reason.invalid }"> -->
69
- <div *ngIf="submitted && f.reason.errors">
70
- <div class="requis" *ngIf="f.reason.errors.required">{{translate.reasonRequired}}</div>
71
- </div>
72
- </div>
73
- </div>
74
- <div class="p-grid p-fluid p-mt-2">
75
- <div class="p-col-12 p-md-12 ">
76
- <span class="titre">{{translate.message}} </span> <span *ngIf=" reasonContact !=='MoreDatesFormPm'" class="requis">*</span>:
77
- <textarea pInputTextarea style=" min-height:100px;height:100%;width:100%;" [placeholder]="translate.message +'...'" formControlName="message" [ngClass]="{ 'is-invalid': submitted && f.message.errors }"></textarea>
78
- <div *ngIf="submitted && f.message.errors">
79
- <div class="requis" *ngIf="f.message.errors.required">{{translate.required}}</div>
80
- <div class="requis" *ngIf="f.message.errors.minlength">{{translate.requiredMessageMin}}</div>
81
- </div>
82
- </div>
83
- </div>
84
- <br>
85
- <br>
86
- <div class="container-contact100-form-btn">
87
- <div class="wrap-contact100-form-btn">
88
- <div class="contact100-form-bgbtn"></div>
89
- <button pButton pRipple class="d-block mx-auto" [label]="translate.accept" icon="pi pi-thumbs-up" [pTooltip]="translate.accept" tooltipPosition="bottom" (click)="onSubmit()"></button>
90
- </div>
91
- </div>
92
- </form>
93
- <!-- <button pButton pRipple class="d-block mx-auto" [label]="translate.accept" icon="pi pi-thumbs-up" [pTooltip]="translate.accept" tooltipPosition="bottom" (click)="contacted()"></button> -->
94
- </div>
95
- <div class="col-md-6 card-bg" >
96
- <div class="conteur contact-bloc" [style]="{height:'150px'}">
97
- <img class="d-block mx-auto" src="assets/img/GEPortal/phone-called.png">
98
- <p class="counter contact-icon text-center mt-4">{{translate.contact}}</p>
99
- </div>
100
- <br>
101
- <button pButton pRipple class="d-block mx-auto" [label]="translate.seeNumber" icon="pi pi-eye" [pTooltip]="translate.accept" tooltipPosition="bottom" (click)="contact()"></button>
102
- <br>
103
- <iframe src="https://maps.google.com/maps?q=283,%20Rue%20De%20la%20Miniere-BP34%20%2078533%20BUC%20%E2%80%93%20Cedex&amp;t=&amp;z=13&amp;ie=UTF8&amp;iwloc=&amp;output=embed" width="100%" height="250" style="border:0;" allowfullscreen="" loading="lazy"></iframe>
104
- <h6 class="fs-4 mt-3"> {{translate.information}}</h6>
105
- <section class="mb-4">
106
- <div class="">
107
- <i class="pi pi-envelope"></i><label> &nbsp; {{translate.emailText}}</label>
108
- <p class="">{{translate.email}} </p>
109
- </div>
110
- <div class=" mt-4">
111
- <i class="pi pi-map"></i><label> &nbsp; {{translate.addressText}}</label>
112
- <p class="">{{translate.adress}}</p>
113
- <p class="">{{translate.town}}</p>
114
- <p class="">{{translate.country}}</p>
115
- </div>
116
- </section>
117
- </div>
118
- </div>
119
- </p-dialog>
120
- <p-dialog *ngIf="translate"[header]="translate.serviceCenterPhoneText" [modal]="true" [(visible)]="displayNumber" [breakpoints]="{'960px': '75vw'}" [style]="{width: '400px',height:'200px'}" [draggable]="false" [resizable]="false" (onHide)="closeNumber()">
121
- <br>
122
- <h4 class="number"> <strong> <i class="pi pi-phone"></i> &nbsp;{{translate.contactNumber}}</strong></h4>
123
- </p-dialog>
124
-
125
-
126
- <p-toast position="top-center"></p-toast>
@@ -1,10 +0,0 @@
1
- .contact-icon {
2
- font-weight: inherit;
3
- font-size: 15px;
4
- }
5
- .number
6
- {
7
- text-align: center;
8
- color: #0084ff;
9
-
10
- }
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { ContactSupportComponent } from './contact-support.component';
4
-
5
- describe('ContactSupportComponent', () => {
6
- let component: ContactSupportComponent;
7
- let fixture: ComponentFixture<ContactSupportComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ ContactSupportComponent ]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(ContactSupportComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,191 +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
-
19
- export class ContactSupportComponent implements OnInit , OnChanges {
20
- @Input() displaycontactSupport!: boolean;
21
- @Input() globaltranslate!: any;
22
- @Input() translate!: any;
23
- @Input() showDate!:boolean;
24
- @Input() detailedPmJob!: DetailedPmJob;
25
- @Input() reasonContact!: string;
26
- @Input() reasons!: Reason[];
27
- @Output() sendDetailedPm = new EventEmitter<any>();
28
- @Output() sendForm: EventEmitter<any> = new EventEmitter();
29
- @Output() closeContactSupport = new EventEmitter<boolean>();
30
- form!: FormGroup;
31
- dates!: Date[];
32
- loading = false;
33
- submitted = false;
34
- minDate!: Date;
35
- maxDate!: Date;
36
- displayNumber = false;
37
-
38
- selectedReason!: Reason;
39
-
40
- constructor(private messageService :MessageService,private formBuilder: FormBuilder) { }
41
- ngOnChanges(changes: SimpleChanges): void {
42
- this.loadDatas();
43
- }
44
-
45
- ngOnInit(): void {
46
- this.loadDatas();
47
- }
48
-
49
- loadDatas()
50
- {
51
- this.filterReasons();
52
- this.setDateRules() ;
53
- this.loadForm();
54
- }
55
-
56
- filterReasons()
57
- {
58
- if(this.reasons && this.reasonContact === ReasonContact.MoreDatesFormPm)
59
- {
60
- this.selectedReason = this.reasons[0];
61
- this.reasons = this.reasons.filter(x=>x.code === ReasonCode.MPM)
62
- }
63
- if(this.reasons && this.reasonContact === ReasonContact.CancelFormPm)
64
- {
65
- this.selectedReason = this.reasons[2];
66
- this.reasons = this.reasons.filter(x=>x.code === ReasonCode.CPM)
67
- }
68
- if(this.detailedPmJob.status=== PmJobStatus.DONE)
69
- {
70
- this.reasons = this.reasons.filter(x=>x.code === ReasonCode.OTH)
71
- }
72
- if(this.detailedPmJob.status=== PmJobStatus.VALIDATED)
73
- {
74
- this.reasons = this.reasons.filter(x=>x.code !== ReasonCode.MPM)
75
- }
76
- }
77
-
78
-
79
- cancelContactSupport() {
80
-
81
- this.closeContactSupport.emit(true);
82
- this.messageService.add({ severity: 'error', summary: this.globaltranslate.summaryReject, detail: this.globaltranslate.detailReject });
83
-
84
-
85
-
86
- }
87
- get f() {
88
- return this.form.controls;
89
- }
90
-
91
-
92
-
93
- setDateRules() {
94
- let today = new Date();
95
- let month = today.getMonth();
96
- let year = today.getFullYear();
97
- let prevMonth = (month === 0) ? 11 : month - 1;
98
- let prevYear = (prevMonth === 11) ? year - 1 : year;
99
- this.minDate = new Date();
100
- this.minDate.setMonth(month);
101
- this.minDate.setFullYear(prevYear);
102
-
103
- }
104
-
105
- loadForm() {
106
- let name = sessionStorage.getItem('userName') as string ;
107
- let email = sessionStorage.getItem('email') as string;
108
- let phone = sessionStorage.getItem('mobilePhoneNumber') as string;
109
-
110
- this.form = this.formBuilder.group({
111
- name: [ name !== 'null' ? name : '' , [Validators.required, Validators.minLength(3)]],
112
- email: [ email!== 'null' ? email : '', [Validators.required, Validators.email]],
113
- phone: [ phone!== 'null' ? phone : '', [Validators.required]],
114
- reason: [{value: '' } , [Validators.required]],
115
- system: [ {value: this.detailedPmJob.systemName + ' ' + this.detailedPmJob.systemId, disabled: true} , [Validators.required]],
116
- workOrder: [ {value: this.detailedPmJob.pmJob.workorderNumber , disabled: true} , [Validators.required]],
117
- message: ['', (this.reasonContact === ReasonContact.MoreDatesFormPm) ? [] : [Validators.required, Validators.minLength(15)]],
118
- });
119
- }
120
-
121
- contacted()
122
- {
123
- this.sendContactMeEmailMethode();
124
-
125
- }
126
- contact()
127
- {
128
- this.displayNumber = true;
129
-
130
- }
131
-
132
- closeNumber()
133
- {
134
- this.displayNumber = false;
135
- }
136
-
137
- sendContactMeEmailMethode()
138
- {
139
- this.detailedPmJob.name = this.form.value.name;
140
- this.detailedPmJob.phone = this.form.value.phone;
141
- this.detailedPmJob.email = this.form.value.email;
142
- this.detailedPmJob.reason = (this.reasonContact === ReasonContact.MoreDatesFormPm) ? this.reasons[0].name : this.form.value.reason.name;
143
- this.detailedPmJob.comment = this.form.value.message;
144
- this.detailedPmJob.reasonContact = this.reasonContact ;
145
- this.detailedPmJob.futureStatus = this.slectsFutureStatus(this.form.value.reason.code) ;
146
-
147
- this.sendDetailedPm.emit( this.detailedPmJob);
148
- }
149
-
150
- slectsFutureStatus(status:any)
151
- {
152
- switch (status) {
153
- case ReasonCode.MPM : return PmJobStatus.WAITING;
154
- case ReasonCode.RPM : return PmJobStatus.REPORTED;
155
- case ReasonCode.CPM : return PmJobStatus.CANCELLED;
156
- case ReasonCode.SDI : return PmJobStatus.DESINSTALLED;
157
- case ReasonCode.OTH: return PmJobStatus.OTHER;
158
- default : return "Erreur";
159
- }
160
- }
161
-
162
-
163
-
164
- onSubmit() {
165
- this.submitted = true;
166
-
167
- if (this.form.invalid) {
168
- this.messageService.add({
169
- severity: 'error',
170
- summary: 'Error',
171
- detail: 'The form is invalid',
172
- });
173
- return;
174
- }
175
- this.contacted();
176
-
177
-
178
- }
179
- preventStringKeypress(event: any): void {
180
- if (
181
- isNaN(Number(String.fromCharCode(event.charCode))) ||
182
- String.fromCharCode(event.charCode) === ' '
183
- ) {
184
- event.preventDefault();
185
- }
186
- }
187
-
188
- }
189
-
190
-
191
-
@@ -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" 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}} &nbsp; {{translate.systems}}</h3>
11
- </div>
12
- </div>
13
- </div>
14
- <br>
15
-
16
- <div class="row">
17
- <div class="col-md-12 card-bg" 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}} &nbsp; {{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}} &nbsp; {{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">
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>&nbsp;{{name}}</p>
66
- </div>
67
- <div class="d-flex align-items-center mb-3"> <img src="assets/img/GEPortal/mail.png">
68
- <p>&nbsp;{{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>&nbsp;{{number}}</p>
75
- </div>
76
- </div>
77
- </div>
78
-
79
- </div>
80
- </div>
81
- </div>
@@ -1,5 +0,0 @@
1
- h3 {
2
- &.counter {
3
- font-size: 20px;
4
- }
5
- }
@@ -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
- });