awf-test-lib 0.1.0 → 0.1.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.
Files changed (218) hide show
  1. package/karma.conf.js +44 -0
  2. package/ng-package.json +7 -0
  3. package/package.json +10 -30
  4. package/src/lib/core/core-routing.module.ts +10 -0
  5. package/src/lib/core/core.module.ts +35 -0
  6. package/src/lib/core/menu/menu.component.css +18 -0
  7. package/src/lib/core/menu/menu.component.html +8 -0
  8. package/src/lib/core/menu/menu.component.spec.ts +23 -0
  9. package/src/lib/core/menu/menu.component.ts +27 -0
  10. package/src/lib/core/menu-consomer/menu-consomer.component.html +20 -0
  11. package/src/lib/core/menu-consomer/menu-consomer.component.scss +20 -0
  12. package/src/lib/core/menu-consomer/menu-consomer.component.spec.ts +25 -0
  13. package/src/lib/core/menu-consomer/menu-consomer.component.ts +21 -0
  14. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.html +7 -0
  15. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.scss +17 -0
  16. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.spec.ts +25 -0
  17. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.ts +24 -0
  18. package/src/lib/core/menu-warranty/menu-warranty.component.html +20 -0
  19. package/src/lib/core/menu-warranty/menu-warranty.component.scss +16 -0
  20. package/src/lib/core/menu-warranty/menu-warranty.component.spec.ts +25 -0
  21. package/src/lib/core/menu-warranty/menu-warranty.component.ts +31 -0
  22. package/src/lib/core/not-found/not-found.component.css +31 -0
  23. package/src/lib/core/not-found/not-found.component.html +6 -0
  24. package/src/lib/core/not-found/not-found.component.spec.ts +23 -0
  25. package/src/lib/core/not-found/not-found.component.ts +15 -0
  26. package/src/lib/core/top-bar/top-bar.component.css +116 -0
  27. package/src/lib/core/top-bar/top-bar.component.html +1 -0
  28. package/src/lib/core/top-bar/top-bar.component.spec.ts +23 -0
  29. package/src/lib/core/top-bar/top-bar.component.ts +39 -0
  30. package/{lib/models/account.model.d.ts → src/lib/models/account.model.ts} +6 -3
  31. package/src/lib/models/alternativeDate.model.ts +6 -0
  32. package/src/lib/models/applicationName.ts +6 -0
  33. package/{lib/models/cancelPMMailRequest.model.d.ts → src/lib/models/cancelPMMailRequest.model.ts} +3 -1
  34. package/src/lib/models/customObject.model.ts +4 -0
  35. package/src/lib/models/detailedPmJob.model.ts +24 -0
  36. package/src/lib/models/emailStatus.ts +4 -0
  37. package/src/lib/models/emailType.ts +17 -0
  38. package/src/lib/models/eventStatus.ts +8 -0
  39. package/src/lib/models/field.ts +7 -0
  40. package/src/lib/models/language.ts +4 -0
  41. package/{lib/models/mailRequest.model.d.ts → src/lib/models/mailRequest.model.ts} +3 -1
  42. package/src/lib/models/pMGroupedJob.model.ts +4 -0
  43. package/{lib/models/pmJob.model.d.ts → src/lib/models/pmJob.model.ts} +7 -6
  44. package/src/lib/models/pmJobRequest.model.ts +6 -0
  45. package/{lib/models/pmJobStatus.d.ts → src/lib/models/pmJobStatus.ts} +8 -3
  46. package/src/lib/models/reason.model.ts +7 -0
  47. package/src/lib/models/reasonCode.ts +9 -0
  48. package/src/lib/models/reasonContact.ts +7 -0
  49. package/{lib/models/reportDateMailRequest.model.d.ts → src/lib/models/reportDateMailRequest.model.ts} +3 -1
  50. package/src/lib/models/role.ts +5 -0
  51. package/src/lib/models/service.model.ts +8 -0
  52. package/src/lib/models/serviceName.ts +14 -0
  53. package/{lib/models/socialLoginRequest.model.d.ts → src/lib/models/socialLoginRequest.model.ts} +1 -1
  54. package/src/lib/models/socialMadia.ts +4 -0
  55. package/src/lib/models/stingBoolean.ts +7 -0
  56. package/src/lib/models/system.ts +15 -0
  57. package/{lib/models/theme.model.d.ts → src/lib/models/theme.model.ts} +18 -11
  58. package/src/lib/models/tokenStatus.ts +6 -0
  59. package/src/lib/models/warranty.ts +18 -0
  60. package/src/lib/pipes/pipes/pipes.module.ts +14 -0
  61. package/src/lib/pipes/subrtring-w.pipe.spec.ts +8 -0
  62. package/src/lib/pipes/subrtring-w.pipe.ts +16 -0
  63. package/src/lib/pipes/substring.pipe.spec.ts +8 -0
  64. package/src/lib/pipes/substring.pipe.ts +15 -0
  65. package/src/lib/shared/choose-another-date/choose-another-date.component.html +9 -0
  66. package/src/lib/shared/choose-another-date/choose-another-date.component.scss +4 -0
  67. package/src/lib/shared/choose-another-date/choose-another-date.component.spec.ts +25 -0
  68. package/src/lib/shared/choose-another-date/choose-another-date.component.ts +126 -0
  69. package/src/lib/shared/confirm-dialog/confirm-dialog.component.html +27 -0
  70. package/src/lib/shared/confirm-dialog/confirm-dialog.component.scss +0 -0
  71. package/src/lib/shared/confirm-dialog/confirm-dialog.component.spec.ts +25 -0
  72. package/src/lib/shared/confirm-dialog/confirm-dialog.component.ts +35 -0
  73. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.css +0 -0
  74. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.html +19 -0
  75. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.spec.ts +23 -0
  76. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.ts +36 -0
  77. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.html +25 -0
  78. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.scss +23 -0
  79. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.spec.ts +25 -0
  80. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.ts +25 -0
  81. package/src/lib/shared/contact/contact.component.css +144 -0
  82. package/src/lib/shared/contact/contact.component.html +124 -0
  83. package/src/lib/shared/contact/contact.component.spec.ts +23 -0
  84. package/src/lib/shared/contact/contact.component.ts +161 -0
  85. package/src/lib/shared/contact-support/contact-support.component.html +126 -0
  86. package/src/lib/shared/contact-support/contact-support.component.scss +10 -0
  87. package/src/lib/shared/contact-support/contact-support.component.spec.ts +25 -0
  88. package/src/lib/shared/contact-support/contact-support.component.ts +191 -0
  89. package/src/lib/shared/dashboard/dashboard.component.html +81 -0
  90. package/src/lib/shared/dashboard/dashboard.component.scss +5 -0
  91. package/src/lib/shared/dashboard/dashboard.component.spec.ts +23 -0
  92. package/src/lib/shared/dashboard/dashboard.component.ts +21 -0
  93. package/src/lib/shared/maintenance-list/maintenance-list.component.html +100 -0
  94. package/src/lib/shared/maintenance-list/maintenance-list.component.scss +26 -0
  95. package/src/lib/shared/maintenance-list/maintenance-list.component.spec.ts +25 -0
  96. package/src/lib/shared/maintenance-list/maintenance-list.component.ts +466 -0
  97. package/src/lib/shared/shared-routing.module.ts +10 -0
  98. package/src/lib/shared/shared.module.ts +84 -0
  99. package/src/lib/shared/show-links/show-links.component.html +48 -0
  100. package/src/lib/shared/show-links/show-links.component.scss +0 -0
  101. package/src/lib/shared/show-links/show-links.component.spec.ts +25 -0
  102. package/src/lib/shared/show-links/show-links.component.ts +80 -0
  103. package/src/lib/shared/system-list/system-list.component.css +0 -0
  104. package/src/lib/shared/system-list/system-list.component.html +40 -0
  105. package/src/lib/shared/system-list/system-list.component.spec.ts +23 -0
  106. package/src/lib/shared/system-list/system-list.component.ts +26 -0
  107. package/{public-api.d.ts → src/public-api.ts} +16 -1
  108. package/src/test.ts +27 -0
  109. package/tsconfig.lib.dev.json +10 -0
  110. package/tsconfig.lib.json +15 -0
  111. package/tsconfig.lib.pp.json +10 -0
  112. package/tsconfig.lib.prod.json +10 -0
  113. package/tsconfig.spec.json +17 -0
  114. package/esm2020/awf-test-lib.mjs +0 -5
  115. package/esm2020/lib/core/core-routing.module.mjs +0 -18
  116. package/esm2020/lib/core/core.module.mjs +0 -51
  117. package/esm2020/lib/core/menu/menu.component.mjs +0 -40
  118. package/esm2020/lib/core/menu-consomer/menu-consomer.component.mjs +0 -27
  119. package/esm2020/lib/core/menu-ge-portal/menu-ge-portal.component.mjs +0 -31
  120. package/esm2020/lib/core/menu-warranty/menu-warranty.component.mjs +0 -35
  121. package/esm2020/lib/core/not-found/not-found.component.mjs +0 -19
  122. package/esm2020/lib/core/top-bar/top-bar.component.mjs +0 -41
  123. package/esm2020/lib/models/account.model.mjs +0 -3
  124. package/esm2020/lib/models/alternativeDate.model.mjs +0 -3
  125. package/esm2020/lib/models/applicationName.mjs +0 -7
  126. package/esm2020/lib/models/cancelPMMailRequest.model.mjs +0 -4
  127. package/esm2020/lib/models/customObject.model.mjs +0 -3
  128. package/esm2020/lib/models/detailedPmJob.model.mjs +0 -3
  129. package/esm2020/lib/models/emailStatus.mjs +0 -6
  130. package/esm2020/lib/models/emailType.mjs +0 -15
  131. package/esm2020/lib/models/eventStatus.mjs +0 -9
  132. package/esm2020/lib/models/field.mjs +0 -9
  133. package/esm2020/lib/models/language.mjs +0 -6
  134. package/esm2020/lib/models/mailRequest.model.mjs +0 -3
  135. package/esm2020/lib/models/pMGroupedJob.model.mjs +0 -3
  136. package/esm2020/lib/models/pmJob.model.mjs +0 -3
  137. package/esm2020/lib/models/pmJobRequest.model.mjs +0 -3
  138. package/esm2020/lib/models/pmJobStatus.mjs +0 -17
  139. package/esm2020/lib/models/reason.model.mjs +0 -3
  140. package/esm2020/lib/models/reasonCode.mjs +0 -9
  141. package/esm2020/lib/models/reasonContact.mjs +0 -8
  142. package/esm2020/lib/models/reportDateMailRequest.model.mjs +0 -4
  143. package/esm2020/lib/models/role.mjs +0 -7
  144. package/esm2020/lib/models/service.model.mjs +0 -3
  145. package/esm2020/lib/models/serviceName.mjs +0 -12
  146. package/esm2020/lib/models/socialLoginRequest.model.mjs +0 -3
  147. package/esm2020/lib/models/socialMadia.mjs +0 -5
  148. package/esm2020/lib/models/stingBoolean.mjs +0 -6
  149. package/esm2020/lib/models/system.mjs +0 -3
  150. package/esm2020/lib/models/theme.model.mjs +0 -2
  151. package/esm2020/lib/models/tokenStatus.mjs +0 -7
  152. package/esm2020/lib/models/warranty.mjs +0 -3
  153. package/esm2020/lib/pipes/pipes/pipes.module.mjs +0 -21
  154. package/esm2020/lib/pipes/subrtring-w.pipe.mjs +0 -20
  155. package/esm2020/lib/pipes/substring.pipe.mjs +0 -16
  156. package/esm2020/lib/shared/choose-another-date/choose-another-date.component.mjs +0 -110
  157. package/esm2020/lib/shared/confirm-dialog/confirm-dialog.component.mjs +0 -44
  158. package/esm2020/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.mjs +0 -42
  159. package/esm2020/lib/shared/confirmed-date-information/confirmed-date-information.component.mjs +0 -35
  160. package/esm2020/lib/shared/contact/contact.component.mjs +0 -145
  161. package/esm2020/lib/shared/contact-support/contact-support.component.mjs +0 -161
  162. package/esm2020/lib/shared/dashboard/dashboard.component.mjs +0 -34
  163. package/esm2020/lib/shared/maintenance-list/maintenance-list.component.mjs +0 -360
  164. package/esm2020/lib/shared/shared-routing.module.mjs +0 -18
  165. package/esm2020/lib/shared/shared.module.mjs +0 -144
  166. package/esm2020/lib/shared/show-links/show-links.component.mjs +0 -81
  167. package/esm2020/lib/shared/system-list/system-list.component.mjs +0 -32
  168. package/esm2020/public-api.mjs +0 -48
  169. package/fesm2015/awf-test-lib.mjs +0 -1552
  170. package/fesm2015/awf-test-lib.mjs.map +0 -1
  171. package/fesm2020/awf-test-lib.mjs +0 -1551
  172. package/fesm2020/awf-test-lib.mjs.map +0 -1
  173. package/index.d.ts +0 -5
  174. package/lib/core/core-routing.module.d.ts +0 -7
  175. package/lib/core/core.module.d.ts +0 -15
  176. package/lib/core/menu/menu.component.d.ts +0 -17
  177. package/lib/core/menu-consomer/menu-consomer.component.d.ts +0 -12
  178. package/lib/core/menu-ge-portal/menu-ge-portal.component.d.ts +0 -13
  179. package/lib/core/menu-warranty/menu-warranty.component.d.ts +0 -15
  180. package/lib/core/not-found/not-found.component.d.ts +0 -10
  181. package/lib/core/top-bar/top-bar.component.d.ts +0 -13
  182. package/lib/models/alternativeDate.model.d.ts +0 -6
  183. package/lib/models/applicationName.d.ts +0 -5
  184. package/lib/models/customObject.model.d.ts +0 -3
  185. package/lib/models/detailedPmJob.model.d.ts +0 -22
  186. package/lib/models/emailStatus.d.ts +0 -4
  187. package/lib/models/emailType.d.ts +0 -13
  188. package/lib/models/eventStatus.d.ts +0 -7
  189. package/lib/models/field.d.ts +0 -7
  190. package/lib/models/language.d.ts +0 -4
  191. package/lib/models/pMGroupedJob.model.d.ts +0 -3
  192. package/lib/models/pmJobRequest.model.d.ts +0 -5
  193. package/lib/models/reason.model.d.ts +0 -4
  194. package/lib/models/reasonCode.d.ts +0 -7
  195. package/lib/models/reasonContact.d.ts +0 -6
  196. package/lib/models/role.d.ts +0 -5
  197. package/lib/models/service.model.d.ts +0 -8
  198. package/lib/models/serviceName.d.ts +0 -10
  199. package/lib/models/socialMadia.d.ts +0 -3
  200. package/lib/models/stingBoolean.d.ts +0 -4
  201. package/lib/models/system.d.ts +0 -14
  202. package/lib/models/tokenStatus.d.ts +0 -5
  203. package/lib/models/warranty.d.ts +0 -17
  204. package/lib/pipes/pipes/pipes.module.d.ts +0 -9
  205. package/lib/pipes/subrtring-w.pipe.d.ts +0 -7
  206. package/lib/pipes/substring.pipe.d.ts +0 -7
  207. package/lib/shared/choose-another-date/choose-another-date.component.d.ts +0 -33
  208. package/lib/shared/confirm-dialog/confirm-dialog.component.d.ts +0 -20
  209. package/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.d.ts +0 -19
  210. package/lib/shared/confirmed-date-information/confirmed-date-information.component.d.ts +0 -15
  211. package/lib/shared/contact/contact.component.d.ts +0 -38
  212. package/lib/shared/contact-support/contact-support.component.d.ts +0 -49
  213. package/lib/shared/dashboard/dashboard.component.d.ts +0 -17
  214. package/lib/shared/maintenance-list/maintenance-list.component.d.ts +0 -83
  215. package/lib/shared/shared-routing.module.d.ts +0 -7
  216. package/lib/shared/shared.module.d.ts +0 -40
  217. package/lib/shared/show-links/show-links.component.d.ts +0 -23
  218. package/lib/shared/system-list/system-list.component.d.ts +0 -15
@@ -0,0 +1,124 @@
1
+ <div *ngIf="translate && reasons ">
2
+ <section class="pt-0">
3
+ <div class="app-section-header-img">
4
+ <div class="container pt-4">
5
+ <div class="">
6
+ <h2>{{translate.title}} </h2>
7
+ </div>
8
+ </div>
9
+ </div>
10
+ </section>
11
+ <section class="py-5 background-light">
12
+ <div class="container px-lg-5">
13
+ <div class="row align-items-center">
14
+ <div class="col-md-6">
15
+ <div class="container-contact100">
16
+ <div class="wrap-contact100">
17
+ <form [formGroup]="form" *ngIf="form && systems && reasons" class="contact100-form validate-form">
18
+ <span class="contact100-form-title">{{translate.title}} </span>
19
+ <div class="p-grid p-fluid p-mt-2">
20
+ <div class="p-col-12 p-md-12 ">
21
+ <span class="titre">{{translate.placeholderName}}</span> <span class="requis">* </span>:
22
+ <input [placeholder]="translate.placeholderName" type="text" pInputText formControlName="name" [ngClass]="{ 'is-invalid': submitted && f.name.invalid }">
23
+ <div *ngIf="submitted && f.name.errors">
24
+ <div class="requis" *ngIf="f.name.errors.required">{{translate.requiredName}}</div>
25
+ <div class="requis" *ngIf="f.name.errors.minlength">{{translate.requiredNameMin}}</div>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ <div class="p-grid p-fluid p-mt-2">
30
+ <div class="p-col-12 p-md-12 ">
31
+ <span class="titre">{{translate.placeholderEmail}}</span> <span class="requis">*</span>:
32
+ <input [placeholder]="translate.placeholderEmail" type="text" pInputText formControlName="email" [ngClass]="{ 'is-invalid': submitted && f.email.invalid }">
33
+ <div *ngIf="submitted && f.email.errors">
34
+ <div class="requis" *ngIf="f.email.errors.required">{{translate.requiredEmail}}</div>
35
+ <div class="requis" *ngIf="f.email.errors.email">{{translate.requiredEmailFormat}}</div>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <div class="p-grid p-fluid p-mt-2">
40
+ <div class="p-col-12 p-md-12 ">
41
+ <span class="titre">{{translate.placeholderPhone}}</span> <span class="requis">*</span>:
42
+ <input [placeholder]="translate.placeholderPhone" type="text" pInputText formControlName="phone" [ngClass]="{ 'is-invalid': submitted && f.phone.invalid }" (keypress)="preventStringKeypress($event)">
43
+ <div *ngIf="submitted && f.phone.errors">
44
+ <div class="requis" *ngIf="f.phone.errors.required">{{translate.requiredPhone}}</div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ <div class="p-grid p-fluid p-mt-2">
49
+ <div class="p-col-12 p-md-12 ">
50
+ <span class="titre">{{translate.RelatedSystems}}</span> <span class="requis">*</span>:
51
+ <p-dropdown (click)="selectPM(selectedSystem)" [options]="systems" [placeholder]="translate.selectSystem" [(ngModel)]="selectedSystem" [optionLabel]="'systemId - name'" formControlName="systems" optionDisabled="inactive" [ngClass]="{ 'is-invalid': submitted && f.systems.invalid }"></p-dropdown>
52
+
53
+ <div *ngIf="submitted && f.systems.errors">
54
+ <div class="requis" *ngIf="f.systems.errors.required">{{translate.requiredSystem}}</div>
55
+ </div>
56
+ </div>
57
+
58
+ </div>
59
+ <div class="p-grid p-fluid p-mt-2" *ngIf="showPm">
60
+ <div class="p-col-12 p-md-12 ">
61
+ <span class="titre">{{translate.RelatedPMs}}</span>:
62
+ <p-dropdown [options]="pmJobs" [placeholder]="translate.selectPM" [(ngModel)]="selectedPm" [optionLabel]="'workorderNumber'" formControlName="pms" optionDisabled="inactive" [ngClass]="{ 'is-invalid': submitted && f.pms.invalid }"></p-dropdown>
63
+ <!-- <div *ngIf="submitted && f.pms.errors">
64
+ <div class="requis" *ngIf="f.pms.errors.required">{{translate.requiredPM }}</div>
65
+ </div>-->
66
+ </div>
67
+ </div>
68
+ <div class="p-grid p-fluid p-mt-2">
69
+ <div class="p-col-12 p-md-12 ">
70
+ <span class="titre">{{translate.reason}}</span> <span class="requis">*</span>:
71
+ <p-dropdown [options]="reasons" [placeholder]="translate.selectReason" [(ngModel)]="selectedReason" optionLabel="name" formControlName="reason" optionDisabled="inactive" [ngClass]="{ 'is-invalid': submitted && f.reason.invalid }"></p-dropdown>
72
+ <!-- <input [placeholder]="translate.reason" type="text" pInputText formControlName="reason" [ngClass]="{ 'is-invalid': submitted && f.reason.invalid }"> -->
73
+ <div *ngIf="submitted && f.reason.errors">
74
+ <div class="requis" *ngIf="f.reason.errors.required">{{translate.reasonRequired}}</div>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ <div class="p-grid p-fluid p-mt-2">
79
+ <div class="p-col-12 p-md-12 ">
80
+ <span class="titre">{{translate.placeholderMessage}} </span> <span class="requis">*</span>:
81
+ <textarea pInputTextarea style=" min-height:100px;height:100%;width:100%;" [placeholder]="translate.placeholderMessage +'...'" formControlName="message" [ngClass]="{ 'is-invalid': submitted && f.message.errors }"></textarea>
82
+ <div *ngIf="submitted && f.message.errors">
83
+ <div class="requis" *ngIf="f.message.errors.required">{{translate.requiredMessage}}</div>
84
+ <div class="requis" *ngIf="f.message.errors.minlength">{{translate.requiredMessageMin}}</div>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ <br>
89
+ <br>
90
+ <div class="container-contact100-form-btn">
91
+ <div class="wrap-contact100-form-btn">
92
+ <div class="contact100-form-bgbtn"></div>
93
+ <button class="btn-warranty mt-3" (click)="onSubmit()">
94
+ {{translate.send}}
95
+ </button>
96
+ </div>
97
+ </div>
98
+ </form>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ <div class="col-md-6 contact">
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
+
119
+ </div>
120
+ </div>
121
+ </section>
122
+ </div>
123
+
124
+ <p-toast position="top-center"></p-toast>
@@ -0,0 +1,23 @@
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
+ });
@@ -0,0 +1,161 @@
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.selectPM(this.selectedSystem)
43
+ this.loadForm();
44
+ console.log('changed')
45
+
46
+ }
47
+
48
+ // convenience getter for easy access to form fields
49
+ get f() {
50
+ return this.form.controls;
51
+ }
52
+
53
+ preventStringKeypress(event: any): void {
54
+ if (
55
+ isNaN(Number(String.fromCharCode(event.charCode))) ||
56
+ String.fromCharCode(event.charCode) === ' '
57
+ ) {
58
+ event.preventDefault();
59
+ }
60
+ }
61
+
62
+ onSubmit() {
63
+ this.submitted = true;
64
+
65
+ if (this.form.invalid) {
66
+ this.messageService.add({
67
+ severity: 'error',
68
+ summary: 'Error',
69
+ detail: 'The form is invalid',
70
+ });
71
+ return;
72
+ }
73
+
74
+ console.log(this.form.value.pms)
75
+ let detailedPmJob = { } as DetailedPmJob ;
76
+ detailedPmJob.name = this.form.value.name;
77
+ detailedPmJob.phone = this.form.value.phone;
78
+ detailedPmJob.email = this.form.value.email;
79
+ detailedPmJob.reason = this.form.value.reason.name;
80
+ detailedPmJob.comment = this.form.value.message;
81
+ if( this.form.value.pms !== undefined){
82
+ detailedPmJob.pmJob = this.form.value.pms;
83
+ }
84
+ detailedPmJob.systemName = this.selectedSystem.name ;
85
+ detailedPmJob.systemId = this.selectedSystem.systemId ;
86
+ detailedPmJob.siteName = this.selectedSystem.siteName ;
87
+ detailedPmJob.siteCity = this.selectedSystem.siteCity ;
88
+ detailedPmJob.sitePostalCode =this.selectedSystem.sitePostalCode
89
+ detailedPmJob.toUpdate = true ;
90
+ if( this.form.value.pms !== undefined)
91
+ {
92
+ detailedPmJob.selectedDate = detailedPmJob.pmJob.startDateTime ;
93
+
94
+ }
95
+ detailedPmJob.reasonContact = ReasonContact.Contact ;
96
+ detailedPmJob.futureStatus = this.slectsFutureStatus(this.form.value.reason.code)
97
+ console.log()
98
+ this.sendForm.emit(detailedPmJob);
99
+ }
100
+
101
+ slectsFutureStatus(status:any)
102
+ {
103
+ switch (status) {
104
+ case ReasonCode.MPM : return PmJobStatus.WAITING;
105
+ case ReasonCode.RPM : return PmJobStatus.REPORTED;
106
+ case ReasonCode.CPM : return PmJobStatus.CANCELLED;
107
+ case ReasonCode.SDI : return PmJobStatus.DESINSTALLED;
108
+ case ReasonCode.OTH: return PmJobStatus.OTHER;
109
+ default : return "Erreur";
110
+ }
111
+ }
112
+
113
+
114
+ loadForm() {
115
+ let name = sessionStorage.getItem('userName') as string ;
116
+ let email = sessionStorage.getItem('email') as string;
117
+ let phone = sessionStorage.getItem('mobilePhoneNumber') as string;
118
+ this.form = this.formBuilder.group({
119
+ name: [ name !== 'null' ? name : '' , [Validators.required, Validators.minLength(3)]],
120
+ email: [ email!== 'null' ? email : '', [Validators.required, Validators.email]],
121
+ phone: [ phone!== 'null' ? phone : '', [Validators.required]],
122
+ reason: ['' , [Validators.required]],
123
+ systems: [[], [Validators.required]],
124
+ pms: [[], this.showPm ? [] :[]],
125
+ message: ['', [Validators.required, Validators.minLength(15)]],
126
+ });
127
+ }
128
+
129
+
130
+ selectPM(selectedSystem:any)
131
+ {
132
+ console.log(selectedSystem)
133
+ this.systemContainPm = true ;
134
+ if(selectedSystem === undefined )
135
+ {
136
+ return;
137
+ }
138
+ else
139
+ {
140
+
141
+
142
+ if(selectedSystem.pmJobs.length === 0 )
143
+ {
144
+ this.showPm = false ;
145
+ }
146
+ else
147
+ {
148
+ this.selectedSystem = selectedSystem;
149
+ this.pmJobs = selectedSystem.pmJobs;
150
+ this.showPm = true ;
151
+
152
+ }
153
+
154
+
155
+
156
+ }
157
+ }
158
+
159
+
160
+ }
161
+
@@ -0,0 +1,126 @@
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>
@@ -0,0 +1,10 @@
1
+ .contact-icon {
2
+ font-weight: inherit;
3
+ font-size: 15px;
4
+ }
5
+ .number
6
+ {
7
+ text-align: center;
8
+ color: #0084ff;
9
+
10
+ }
@@ -0,0 +1,25 @@
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
+ });