awf-test-lib 0.1.1 → 0.1.3

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 +139 -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 +1549 -0
  57. package/fesm2015/awf-test-lib.mjs.map +1 -0
  58. package/fesm2020/awf-test-lib.mjs +1545 -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 -124
  189. package/src/lib/shared/contact/contact.component.spec.ts +0 -23
  190. package/src/lib/shared/contact/contact.component.ts +0 -161
  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,124 +0,0 @@
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>
@@ -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,161 +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.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
-
@@ -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
- });