awf-test-lib 0.1.1 → 0.1.2

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 +138 -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 +1548 -0
  57. package/fesm2015/awf-test-lib.mjs.map +1 -0
  58. package/fesm2020/awf-test-lib.mjs +1544 -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,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
- });
@@ -1,21 +0,0 @@
1
- import { Component, OnChanges,Input, SimpleChanges } from '@angular/core';
2
- import { DetailedPmJob } from '../../models/detailedPmJob.model';
3
- import { System } from '../../models/system';
4
-
5
-
6
- @Component({
7
- selector: 'awf-dashboard',
8
- templateUrl: './dashboard.component.html',
9
- styleUrls: ['./dashboard.component.scss']
10
- })
11
- export class DashboardComponent implements OnChanges {
12
- @Input() name!: string;
13
- @Input() email!: string;
14
- @Input() number!: string;
15
- @Input() systems!: System[] ;
16
- @Input() toBeScheduledMaintenanceList: DetailedPmJob[] = [];
17
- @Input() alreadyScheduledMaintenanceList: DetailedPmJob[] = [];
18
- @Input() translate!: any;
19
- constructor() { }
20
- ngOnChanges(changes: SimpleChanges): void {}
21
- }
@@ -1,100 +0,0 @@
1
- <p-table #dt [value]="maintenanceList" responsiveLayout="stack" [rows]="10" [showCurrentPageReport]="true" [rowsPerPageOptions]="[5,10,25,50]" [paginator]="true" [globalFilterFields]="['systemId','pmJob.caseId','systemName','pmJob.workorderNumber','pmJob.startDateTime','pmJob.endDateTime','pmJob.case_type','pmJob.case_category','status']"
2
- [rowHover]="true" dataKey="id" [currentPageReportTemplate]="globaltranslate.countPages" [first]="first">
3
- <ng-template pTemplate="caption">
4
- <div>
5
- <span class="p-input-icon-left">
6
- <i class="pi pi-search"></i>
7
- <input pInputText type="text" (input)="applyFilterGlobal($event, 'contains')"
8
- [placeholder]="globaltranslate.search" />
9
- </span>
10
- </div>
11
- </ng-template>
12
- <ng-template pTemplate="header" let-columns>
13
- <tr>
14
- <!-- <th pSortableColumn="caseId">Case Id <p-sortIcon field="caseId"></p-sortIcon> -->
15
- <th pSortableColumn="systemName">{{translate.maintenanceList.system}}
16
- <p-sortIcon field="systemName"></p-sortIcon>
17
- <th pSortableColumn="room">{{translate.maintenanceList.room}}
18
- <p-sortIcon field="room"></p-sortIcon>
19
- <th pSortableColumn="systemId">System Id
20
- <p-sortIcon field="systemId"></p-sortIcon>
21
- <th pSortableColumn="workorderNumber">{{translate.maintenanceList.workOrder}}
22
- <p-sortIcon field="workorderNumber"></p-sortIcon>
23
- <th pSortableColumn="startDateTime">{{translate.maintenanceList.startDate}}
24
- <p-sortIcon field="startDateTime"></p-sortIcon>
25
- <th pSortableColumn="case_type">{{translate.maintenanceList.type}}
26
- <p-sortIcon field="case_type"></p-sortIcon>
27
- <th pSortableColumn="status">{{translate.maintenanceList.status}}
28
- <p-sortIcon field="status"></p-sortIcon>
29
- <th pSortableColumn="status" >{{translate.maintenanceList.NbrLinks}}
30
- <p-sortIcon field="status"></p-sortIcon>
31
- <th> Action</th>
32
- </tr>
33
- </ng-template>
34
- <ng-template pTemplate="body" let-product let-columns="columns">
35
- <tr>
36
- <td>{{product.systemName }}</td>
37
- <td>{{product.room }}</td>
38
- <td>{{product.systemId }}</td>
39
- <td>{{product.pmJob.workorderNumber }}</td>
40
- <td>{{product.pmJob.startDateTime | date: 'dd MMM yyyy ' }}</td>
41
- <td>{{transformType(product.pmJob.caseType) }}</td>
42
- <td><span [class]="'product-status status-' + product.status" [pTooltip]="getStatusTooltip(product.status)">{{transformStatus(product.status) }}</span>
43
- </td>
44
- <td *ngIf="product.pmJob.groupList !== null " (click)="showLinks(product)"> <span class="circle">{{product.pmJob.groupList.length }}</span> <i class="pi pi-link" style="font-size: 1rem"></i> </td>
45
- <td *ngIf="product.pmJob.groupList ===null" (click)="showLinks(product)"> <span class="circlelinked">{{product.pmJob.groupList.length }}</span> <i class="pi pi-link" style="font-size: 1rem"></i> </td>
46
- <td>
47
- <button pButton pRipple type="button" label="" icon="pi pi-calendar" class="p-button-rounded" #actualTarget (click)="selectElement(product)" (click)="op.toggle($event)" [disabled]="((product.status ==='late' || product.status ==='accepted') && !isAlreadyScheduled) || product.status ==='waiting'"></button>
48
- </td>
49
- </tr>
50
- </ng-template>
51
- <ng-template pTemplate="summary">
52
- <div class="p-d-flex p-ai-center p-jc-between">
53
- {{globaltranslate.count}} {{maintenanceList ? maintenanceList.length : 0 }} {{globaltranslate.elements}}.
54
- </div>
55
- </ng-template>
56
- </p-table>
57
-
58
- <p-toast position="top-center"></p-toast>
59
- <p-overlayPanel #op [dismissable]="true" [showCloseIcon]="false" [showTransitionOptions]="'0ms'" [hideTransitionOptions]="'0ms'">
60
- <ng-template pTemplate>
61
-
62
- <button style="width: 100%;" *ngIf="!isAlreadyScheduled" icon="pi pi-thumbs-up" (click)="confirmDialog()" [label]="translate.maintenanceList.confirmDate" class="p-button-text p-button-raised" pButton pRipple type="button">
63
- </button>
64
- <hr *ngIf="!isAlreadyScheduled">
65
- <button style="width: 100%;" *ngIf="!isAlreadyScheduled && (alternativeDatesList !== null) " icon="pi pi-calendar-plus" (click)="proposeAnotherDate()" [label]="translate.maintenanceList.chooseAnotherDate" class="p-button-text p-button-raised" pButton pRipple type="button"></button>
66
- <hr *ngIf="!isAlreadyScheduled && (alternativeDatesList!==null) ">
67
- <button style="width: 100%;" icon="pi pi-phone" (click)="contactSupport(false)" [label]="translate.maintenanceList.contactSuppor" class="p-button-text p-button-raised" pButton pRipple type="button"></button>
68
- <hr *ngIf="isWithLinks">
69
- <button style="width: 100%;" icon="pi pi-link" *ngIf="isWithLinks" (click)="showLinks()" [label]="translate.maintenanceList.showLinks" class="p-button-text p-button-raised" pButton pRipple type="button"></button>
70
- <hr *ngIf="isAlreadyScheduled && pmSelectedStatus ==='validated'">
71
- <button style="width: 100%;" *ngIf="isAlreadyScheduled && pmSelectedStatus ==='validated'" icon="pi pi-pencil" (click)="editPm()" [label]="translate.maintenanceList.cancel" class="p-button-text p-button-raised" pButton pRipple type="button">
72
- </button>
73
- </ng-template>
74
- </p-overlayPanel>
75
-
76
- <div *ngIf="displaycontactSupport " >
77
- <app-contact-support [reasonContact]="reasonContact" (closeContactSupport)="closeContactSupport($event)" (sendDetailedPm)="sendContactMeForm($event)" [detailedPmJob] ="maintenanceSelected" [globaltranslate]="globaltranslate" [reasons]="reasons" [translate]="translate.contactSupport" [displaycontactSupport]="displaycontactSupport" [showDate]="showDate" ></app-contact-support>
78
- </div>
79
- <div *ngIf="displayConfirmDialog">
80
- <app-confirm-dialog [detailedPmJobLinkedList]="detailedPmJobLinkedList" [isProposedDate]="isProposedDate" [globaltranslate]="globaltranslate" [translate]="translate.confirmDialog"
81
- [startDateTime]="startDateTime" [endDateTime]="endDateTime" [displayConfirmDialog]="displayConfirmDialog" (closeConfirmDialog)="closeConfirmDialog($event)">
82
- </app-confirm-dialog>
83
- </div>
84
- <div *ngIf="displayConfirmDialogContact">
85
- <app-confirm-dialog-contact [detailedPmJobLinkedList]="detailedPmJobLinkedList" [globaltranslate]="globaltranslate" [translate]="translate.confirmDialogContact"
86
- [startDateTime]="startDateTime" [endDateTime]="endDateTime" [displayConfirmDialogContact]="displayConfirmDialogContact" (closeConfirmDialogContact)="closeConfirmDialogContact($event)">
87
- </app-confirm-dialog-contact >
88
- </div>
89
- <div *ngIf="displayConfirmedDateInfo">
90
- <app-confirmed-date-information [moreDates]="moreDates" [globaltranslate]="globaltranslate" [translate]="translate.confirmDateInformation" [startDateTime]="startDateTime" [endDateTime]="endDateTime" [displayConfirmedDateInfo]="displayConfirmedDateInfo" (closeConfirmedDateInfo)="closeConfirmedDateInfo()"></app-confirmed-date-information>
91
- </div>
92
- <div *ngIf="displayAnotherDate && alternativeDatesList">
93
- <app-choose-another-date [globaltranslate]="globaltranslate" [translate]="translate.chooseAnotherDate" [alternativeDatesList]="alternativeDatesList" [displayAnotherDate]="displayAnotherDate" (closeAnotherDate)="closeAnotherDate($event)" (acceptDate)="acceptDate($event)">
94
- </app-choose-another-date>
95
- </div>
96
- <div *ngIf="displayShowLinks && selectedWorkorderId">
97
- <app-show-links [status]="status" [selectedWorkorderId]="selectedWorkorderId" [translate]="translate" [globaltranslate]="globaltranslate" [displayShowLinks]="displayShowLinks" (closeShowLinks)="closeShowLinks()" [detailedPmJobLinkedList]="detailedPmJobLinkedList"></app-show-links>
98
- </div>
99
-
100
-
@@ -1,26 +0,0 @@
1
- span.circle {
2
- background: #f86359;
3
- border-radius: 50%;
4
- -moz-border-radius: 50%;
5
- -webkit-border-radius: 50%;
6
- color: #f8f8f8;
7
- display: inline-block;
8
- font-weight: bold;
9
- line-height: 20px;
10
- margin-right: 5px;
11
- text-align: center;
12
- width: 20px;
13
- &linked {
14
- background: #80a161;
15
- border-radius: 50%;
16
- -moz-border-radius: 50%;
17
- -webkit-border-radius: 50%;
18
- color: #ffffff;
19
- display: inline-block;
20
- font-weight: bold;
21
- line-height: 20px;
22
- margin-right: 5px;
23
- text-align: center;
24
- width: 20px;
25
- }
26
- }
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { MaintenanceListComponent } from './maintenance-list.component';
4
-
5
- describe('MaintenanceListComponent', () => {
6
- let component: MaintenanceListComponent;
7
- let fixture: ComponentFixture<MaintenanceListComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ MaintenanceListComponent ]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(MaintenanceListComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });