awf-test-lib 0.1.25 → 17.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. package/esm2022/awf-test-lib.mjs +5 -0
  2. package/esm2022/lib/core/core-routing.module.mjs +18 -0
  3. package/esm2022/lib/core/core.module.mjs +51 -0
  4. package/esm2022/lib/core/menu/menu.component.mjs +44 -0
  5. package/esm2022/lib/core/menu-consomer/menu-consomer.component.mjs +28 -0
  6. package/esm2022/lib/core/menu-ge-portal/menu-ge-portal.component.mjs +108 -0
  7. package/esm2022/lib/core/menu-warranty/menu-warranty.component.mjs +37 -0
  8. package/esm2022/lib/core/not-found/not-found.component.mjs +21 -0
  9. package/esm2022/lib/core/top-bar/top-bar.component.mjs +43 -0
  10. package/esm2022/lib/models/account.model.mjs +15 -0
  11. package/esm2022/lib/models/alternativeDate.model.mjs +7 -0
  12. package/esm2022/lib/models/applicationName.mjs +7 -0
  13. package/esm2022/lib/models/cancelPMMailRequest.model.mjs +6 -0
  14. package/esm2022/lib/models/customObject.model.mjs +4 -0
  15. package/esm2022/lib/models/detailedPmJob.model.mjs +23 -0
  16. package/esm2022/lib/models/emailStatus.mjs +6 -0
  17. package/esm2022/lib/models/emailType.mjs +17 -0
  18. package/esm2022/lib/models/eventStatus.mjs +9 -0
  19. package/esm2022/lib/models/field.mjs +9 -0
  20. package/esm2022/lib/models/language.mjs +6 -0
  21. package/esm2022/lib/models/mailRequest.model.mjs +17 -0
  22. package/esm2022/lib/models/pMGroupedJob.model.mjs +4 -0
  23. package/esm2022/lib/models/pmJob.model.mjs +23 -0
  24. package/esm2022/lib/models/pmJobRequest.model.mjs +5 -0
  25. package/esm2022/lib/models/pmJobStatus.mjs +17 -0
  26. package/esm2022/lib/models/reason.model.mjs +5 -0
  27. package/esm2022/lib/models/reasonCode.mjs +9 -0
  28. package/esm2022/lib/models/reasonContact.mjs +8 -0
  29. package/esm2022/lib/models/reportDateMailRequest.model.mjs +6 -0
  30. package/esm2022/lib/models/role.mjs +7 -0
  31. package/esm2022/lib/models/service.model.mjs +9 -0
  32. package/esm2022/lib/models/serviceName.mjs +12 -0
  33. package/esm2022/lib/models/socialLoginRequest.model.mjs +7 -0
  34. package/esm2022/lib/models/socialMadia.mjs +5 -0
  35. package/esm2022/lib/models/stingBoolean.mjs +6 -0
  36. package/esm2022/lib/models/system.mjs +14 -0
  37. package/esm2022/lib/models/theme.model.mjs +2 -0
  38. package/esm2022/lib/models/tokenStatus.mjs +7 -0
  39. package/esm2022/lib/models/warranty.mjs +18 -0
  40. package/esm2022/lib/pipes/pipes/pipes.module.mjs +21 -0
  41. package/esm2022/lib/pipes/subrtring-w.pipe.mjs +20 -0
  42. package/esm2022/lib/pipes/substring.pipe.mjs +16 -0
  43. package/esm2022/lib/shared/choose-another-date/choose-another-date.component.mjs +117 -0
  44. package/esm2022/lib/shared/confirm-dialog/confirm-dialog.component.mjs +53 -0
  45. package/esm2022/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.mjs +48 -0
  46. package/esm2022/lib/shared/confirmed-date-information/confirmed-date-information.component.mjs +45 -0
  47. package/esm2022/lib/shared/contact/contact.component.mjs +170 -0
  48. package/esm2022/lib/shared/contact-support/contact-support.component.mjs +186 -0
  49. package/esm2022/lib/shared/dashboard/dashboard.component.mjs +40 -0
  50. package/esm2022/lib/shared/maintenance-list/maintenance-list.component.mjs +373 -0
  51. package/esm2022/lib/shared/shared-routing.module.mjs +18 -0
  52. package/esm2022/lib/shared/shared.module.mjs +144 -0
  53. package/esm2022/lib/shared/show-links/show-links.component.mjs +87 -0
  54. package/esm2022/lib/shared/system-list/system-list.component.mjs +35 -0
  55. package/esm2022/public-api.mjs +48 -0
  56. package/fesm2022/awf-test-lib.mjs +1865 -0
  57. package/fesm2022/awf-test-lib.mjs.map +1 -0
  58. package/index.d.ts +5 -0
  59. package/lib/core/core-routing.module.d.ts +7 -0
  60. package/lib/core/core.module.d.ts +15 -0
  61. package/lib/core/menu/menu.component.d.ts +17 -0
  62. package/lib/core/menu-consomer/menu-consomer.component.d.ts +12 -0
  63. package/lib/core/menu-ge-portal/menu-ge-portal.component.d.ts +20 -0
  64. package/lib/core/menu-warranty/menu-warranty.component.d.ts +15 -0
  65. package/lib/core/not-found/not-found.component.d.ts +10 -0
  66. package/lib/core/top-bar/top-bar.component.d.ts +13 -0
  67. package/{src/lib/models/account.model.ts → lib/models/account.model.d.ts} +14 -17
  68. package/lib/models/alternativeDate.model.d.ts +6 -0
  69. package/lib/models/applicationName.d.ts +5 -0
  70. package/{src/lib/models/cancelPMMailRequest.model.ts → lib/models/cancelPMMailRequest.model.d.ts} +5 -7
  71. package/lib/models/customObject.model.d.ts +3 -0
  72. package/lib/models/detailedPmJob.model.d.ts +23 -0
  73. package/lib/models/emailStatus.d.ts +4 -0
  74. package/lib/models/emailType.d.ts +15 -0
  75. package/lib/models/eventStatus.d.ts +7 -0
  76. package/lib/models/field.d.ts +7 -0
  77. package/lib/models/language.d.ts +4 -0
  78. package/{src/lib/models/mailRequest.model.ts → lib/models/mailRequest.model.d.ts} +16 -18
  79. package/lib/models/pMGroupedJob.model.d.ts +3 -0
  80. package/{src/lib/models/pmJob.model.ts → lib/models/pmJob.model.d.ts} +25 -26
  81. package/lib/models/pmJobRequest.model.d.ts +5 -0
  82. package/{src/lib/models/pmJobStatus.ts → lib/models/pmJobStatus.d.ts} +14 -19
  83. package/lib/models/reason.model.d.ts +4 -0
  84. package/lib/models/reasonCode.d.ts +7 -0
  85. package/lib/models/reasonContact.d.ts +6 -0
  86. package/{src/lib/models/reportDateMailRequest.model.ts → lib/models/reportDateMailRequest.model.d.ts} +5 -7
  87. package/lib/models/role.d.ts +5 -0
  88. package/lib/models/service.model.d.ts +8 -0
  89. package/lib/models/serviceName.d.ts +10 -0
  90. package/{src/lib/models/socialLoginRequest.model.ts → lib/models/socialLoginRequest.model.d.ts} +6 -6
  91. package/lib/models/socialMadia.d.ts +3 -0
  92. package/lib/models/stingBoolean.d.ts +4 -0
  93. package/lib/models/system.d.ts +14 -0
  94. package/{src/lib/models/theme.model.ts → lib/models/theme.model.d.ts} +38 -45
  95. package/lib/models/tokenStatus.d.ts +5 -0
  96. package/lib/models/warranty.d.ts +17 -0
  97. package/lib/pipes/pipes/pipes.module.d.ts +9 -0
  98. package/lib/pipes/subrtring-w.pipe.d.ts +7 -0
  99. package/lib/pipes/substring.pipe.d.ts +7 -0
  100. package/lib/shared/choose-another-date/choose-another-date.component.d.ts +33 -0
  101. package/lib/shared/confirm-dialog/confirm-dialog.component.d.ts +22 -0
  102. package/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.d.ts +19 -0
  103. package/lib/shared/confirmed-date-information/confirmed-date-information.component.d.ts +18 -0
  104. package/lib/shared/contact/contact.component.d.ts +39 -0
  105. package/lib/shared/contact-support/contact-support.component.d.ts +50 -0
  106. package/lib/shared/dashboard/dashboard.component.d.ts +19 -0
  107. package/lib/shared/maintenance-list/maintenance-list.component.d.ts +82 -0
  108. package/lib/shared/shared-routing.module.d.ts +7 -0
  109. package/lib/shared/shared.module.d.ts +40 -0
  110. package/lib/shared/show-links/show-links.component.d.ts +25 -0
  111. package/lib/shared/system-list/system-list.component.d.ts +15 -0
  112. package/package.json +24 -10
  113. package/{src/public-api.ts → public-api.d.ts} +42 -57
  114. package/karma.conf.js +0 -44
  115. package/ng-package.json +0 -7
  116. package/src/lib/core/core-routing.module.ts +0 -10
  117. package/src/lib/core/core.module.ts +0 -35
  118. package/src/lib/core/menu/menu.component.css +0 -18
  119. package/src/lib/core/menu/menu.component.html +0 -8
  120. package/src/lib/core/menu/menu.component.spec.ts +0 -23
  121. package/src/lib/core/menu/menu.component.ts +0 -28
  122. package/src/lib/core/menu-consomer/menu-consomer.component.html +0 -20
  123. package/src/lib/core/menu-consomer/menu-consomer.component.scss +0 -20
  124. package/src/lib/core/menu-consomer/menu-consomer.component.spec.ts +0 -25
  125. package/src/lib/core/menu-consomer/menu-consomer.component.ts +0 -21
  126. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.html +0 -7
  127. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.scss +0 -17
  128. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.spec.ts +0 -25
  129. package/src/lib/core/menu-ge-portal/menu-ge-portal.component.ts +0 -83
  130. package/src/lib/core/menu-warranty/menu-warranty.component.html +0 -20
  131. package/src/lib/core/menu-warranty/menu-warranty.component.scss +0 -16
  132. package/src/lib/core/menu-warranty/menu-warranty.component.spec.ts +0 -25
  133. package/src/lib/core/menu-warranty/menu-warranty.component.ts +0 -31
  134. package/src/lib/core/not-found/not-found.component.css +0 -31
  135. package/src/lib/core/not-found/not-found.component.html +0 -6
  136. package/src/lib/core/not-found/not-found.component.spec.ts +0 -23
  137. package/src/lib/core/not-found/not-found.component.ts +0 -15
  138. package/src/lib/core/top-bar/top-bar.component.css +0 -116
  139. package/src/lib/core/top-bar/top-bar.component.html +0 -1
  140. package/src/lib/core/top-bar/top-bar.component.spec.ts +0 -23
  141. package/src/lib/core/top-bar/top-bar.component.ts +0 -39
  142. package/src/lib/models/alternativeDate.model.ts +0 -6
  143. package/src/lib/models/applicationName.ts +0 -6
  144. package/src/lib/models/customObject.model.ts +0 -4
  145. package/src/lib/models/detailedPmJob.model.ts +0 -25
  146. package/src/lib/models/emailStatus.ts +0 -4
  147. package/src/lib/models/emailType.ts +0 -19
  148. package/src/lib/models/eventStatus.ts +0 -8
  149. package/src/lib/models/field.ts +0 -7
  150. package/src/lib/models/language.ts +0 -4
  151. package/src/lib/models/pMGroupedJob.model.ts +0 -4
  152. package/src/lib/models/pmJobRequest.model.ts +0 -6
  153. package/src/lib/models/reason.model.ts +0 -7
  154. package/src/lib/models/reasonCode.ts +0 -9
  155. package/src/lib/models/reasonContact.ts +0 -7
  156. package/src/lib/models/role.ts +0 -5
  157. package/src/lib/models/service.model.ts +0 -8
  158. package/src/lib/models/serviceName.ts +0 -14
  159. package/src/lib/models/socialMadia.ts +0 -4
  160. package/src/lib/models/stingBoolean.ts +0 -7
  161. package/src/lib/models/system.ts +0 -15
  162. package/src/lib/models/tokenStatus.ts +0 -6
  163. package/src/lib/models/warranty.ts +0 -18
  164. package/src/lib/pipes/pipes/pipes.module.ts +0 -14
  165. package/src/lib/pipes/subrtring-w.pipe.spec.ts +0 -8
  166. package/src/lib/pipes/subrtring-w.pipe.ts +0 -16
  167. package/src/lib/pipes/substring.pipe.spec.ts +0 -8
  168. package/src/lib/pipes/substring.pipe.ts +0 -15
  169. package/src/lib/shared/choose-another-date/choose-another-date.component.html +0 -12
  170. package/src/lib/shared/choose-another-date/choose-another-date.component.scss +0 -12
  171. package/src/lib/shared/choose-another-date/choose-another-date.component.spec.ts +0 -25
  172. package/src/lib/shared/choose-another-date/choose-another-date.component.ts +0 -127
  173. package/src/lib/shared/confirm-dialog/confirm-dialog.component.html +0 -26
  174. package/src/lib/shared/confirm-dialog/confirm-dialog.component.scss +0 -0
  175. package/src/lib/shared/confirm-dialog/confirm-dialog.component.spec.ts +0 -25
  176. package/src/lib/shared/confirm-dialog/confirm-dialog.component.ts +0 -39
  177. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.css +0 -0
  178. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.html +0 -19
  179. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.spec.ts +0 -23
  180. package/src/lib/shared/confirm-dialog-contact/confirm-dialog-contact.component.ts +0 -36
  181. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.html +0 -25
  182. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.scss +0 -23
  183. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.spec.ts +0 -25
  184. package/src/lib/shared/confirmed-date-information/confirmed-date-information.component.ts +0 -30
  185. package/src/lib/shared/contact/contact.component.css +0 -144
  186. package/src/lib/shared/contact/contact.component.html +0 -136
  187. package/src/lib/shared/contact/contact.component.spec.ts +0 -23
  188. package/src/lib/shared/contact/contact.component.ts +0 -169
  189. package/src/lib/shared/contact-support/contact-support.component.html +0 -130
  190. package/src/lib/shared/contact-support/contact-support.component.scss +0 -10
  191. package/src/lib/shared/contact-support/contact-support.component.spec.ts +0 -25
  192. package/src/lib/shared/contact-support/contact-support.component.ts +0 -188
  193. package/src/lib/shared/dashboard/dashboard.component.html +0 -81
  194. package/src/lib/shared/dashboard/dashboard.component.scss +0 -5
  195. package/src/lib/shared/dashboard/dashboard.component.spec.ts +0 -23
  196. package/src/lib/shared/dashboard/dashboard.component.ts +0 -23
  197. package/src/lib/shared/maintenance-list/maintenance-list.component.html +0 -105
  198. package/src/lib/shared/maintenance-list/maintenance-list.component.scss +0 -26
  199. package/src/lib/shared/maintenance-list/maintenance-list.component.spec.ts +0 -25
  200. package/src/lib/shared/maintenance-list/maintenance-list.component.ts +0 -403
  201. package/src/lib/shared/shared-routing.module.ts +0 -10
  202. package/src/lib/shared/shared.module.ts +0 -80
  203. package/src/lib/shared/show-links/show-links.component.html +0 -49
  204. package/src/lib/shared/show-links/show-links.component.scss +0 -0
  205. package/src/lib/shared/show-links/show-links.component.spec.ts +0 -25
  206. package/src/lib/shared/show-links/show-links.component.ts +0 -78
  207. package/src/lib/shared/system-list/system-list.component.css +0 -0
  208. package/src/lib/shared/system-list/system-list.component.html +0 -40
  209. package/src/lib/shared/system-list/system-list.component.spec.ts +0 -23
  210. package/src/lib/shared/system-list/system-list.component.ts +0 -26
  211. package/src/test.ts +0 -27
  212. package/tsconfig.lib.dev.json +0 -10
  213. package/tsconfig.lib.json +0 -15
  214. package/tsconfig.lib.pp.json +0 -10
  215. package/tsconfig.lib.prod.json +0 -10
  216. package/tsconfig.spec.json +0 -17
@@ -1,403 +0,0 @@
1
- import {
2
- Component,
3
- EventEmitter,
4
- Input,
5
- OnDestroy,
6
- Output,
7
- ViewChild
8
- } from '@angular/core';
9
- import { Table } from 'primeng/table';
10
- import { ConfirmationService, MessageService } from 'primeng/api';
11
- import { Subscription } from 'rxjs';
12
- import { DetailedPmJob } from '../../models/detailedPmJob.model';
13
- import { AlternativeDate } from '../../models/alternativeDate.model';
14
- import { EmailType } from '../../models/emailType';
15
- import { EventStatus } from '../../models/eventStatus';
16
- import { PmJob } from '../../models/pmJob.model';
17
- import { PMGroupedJob } from '../../models/pMGroupedJob.model';
18
- import { PmJobStatus } from '../../models/pmJobStatus';
19
- import { ReasonContact } from '../../models/reasonContact';
20
- import { StingBoolean } from '../../models/stingBoolean';
21
-
22
-
23
- @Component({
24
- selector: 'awf-maintenance-list',
25
- templateUrl: './maintenance-list.component.html',
26
- styleUrls: ['./maintenance-list.component.scss'],
27
- providers: [MessageService, ConfirmationService],
28
- })
29
- export class MaintenanceListComponent implements OnDestroy {
30
- @ViewChild('dt') dt: Table | undefined;
31
- @ViewChild('op') op: any | undefined;
32
- @Input() translate: any;
33
- @Input() reasons: any;
34
- @Input() globaltranslate: any;
35
- @Input() maintenanceList: DetailedPmJob[] = [];
36
- @Input() maintenanceListNotDisplayed: DetailedPmJob[] = [];
37
- @Input() pmJobList: DetailedPmJob[] = [];
38
- @Input() isAlreadyScheduled!: Boolean;
39
- @Input() displayConfirmedDateInfo=false;
40
- @Input() alternativeDatesList!: any ;
41
- @Output() emitForUpdate = new EventEmitter<any>();
42
- @Output() emitForAlternativeDates = new EventEmitter<any>();
43
- @Output() sendContactMeEmail = new EventEmitter<any>();
44
- @Input() status: any;
45
-
46
- @Output() sendForm: EventEmitter<any> = new EventEmitter();
47
- moreDates!:boolean;
48
- detailedPmJobLinkedList : DetailedPmJob[] = [];
49
- updatePmSubscription!: Subscription;
50
- alternativeDatesSubscription!: Subscription;
51
- showDate!: boolean;
52
- maintenanceSelected!: DetailedPmJob;
53
- startDateTime!: any;
54
- endDateTime!: any;
55
- selectedWorkorderId!: any;
56
- alternativeDate!: AlternativeDate ;
57
- alternativeDatesSelected: AlternativeDate[] = [];
58
- displaycontactSupport = false;
59
- displayConfirmDialog = false;
60
- displayConfirmDateAlternativeDialog = false;
61
- displayConfirmDialogContact = false;
62
- displayShowLinks = false;
63
- displayAnotherDate = false;
64
- isWithLinks = false;
65
- isProposedDate = true;
66
- pmSelectedStatus!:string ;
67
- emailTypes!:string[];
68
- alreadyScheduledMsg !:boolean;
69
- reasonContact="";
70
- contactMeRequest!:DetailedPmJob ;
71
- first = 0;
72
- languageStored : string | null = localStorage.getItem("lang");
73
- language: string = this.languageStored ? this.languageStored : navigator.language.substr(0, 2).toLowerCase();
74
- constructor() {}
75
-
76
- ngOnDestroy(): void {
77
- if (this.updatePmSubscription) {
78
- this.updatePmSubscription.unsubscribe();
79
- }
80
- if (this.alternativeDatesSubscription) {
81
- this.alternativeDatesSubscription.unsubscribe();
82
- }
83
-
84
- }
85
- applyFilterGlobal($event: any, stringVal: any) {
86
- this.dt?.filterGlobal(
87
- ($event.target as HTMLInputElement).value,
88
- stringVal
89
- );
90
- }
91
- selectElement(element: DetailedPmJob) {
92
- this.alternativeDatesList = null;
93
- this.emailTypes =[];
94
- if(element)
95
- {
96
- this.pmSelectedStatus = element.status ;
97
- }
98
-
99
- if(element.pmJob.groupList)
100
- {
101
- this.isWithLinks = element.pmJob.groupList?.length > 0 ? true : false;
102
- }
103
-
104
- this.selectedWorkorderId = element.pmJob.workorderNumber;
105
- this.maintenanceSelected = element;
106
- this.maintenanceSelected.WorkorderNumberSelected = this.maintenanceSelected.pmJob.workorderId ;
107
-
108
- if (!this.isAlreadyScheduled) {
109
- this.getAlternativeDates(element.pmJob);
110
- }
111
- this.startDateTime = this.maintenanceSelected.pmJob.startDateTime;
112
- this.endDateTime = this.maintenanceSelected.pmJob.endDateTime;
113
- this.getLinkedPmJob();
114
- }
115
- getAlternativeDates(pmJob : PmJob ) {
116
- this.emitForAlternativeDates.emit(pmJob);
117
- }
118
- getLinkedPmJob()
119
- {
120
- this.detailedPmJobLinkedList =[];
121
- if(this.maintenanceSelected.pmJob.groupList)
122
- {
123
- this.maintenanceSelected.pmJob.groupList.forEach((linked : PMGroupedJob ) => {
124
-
125
- this.maintenanceList.forEach((item :DetailedPmJob ) => {
126
- if(linked.workorderId === item.pmJob.workorderId)
127
- {
128
- this.detailedPmJobLinkedList.push(item);
129
- }
130
- });
131
- });
132
-
133
- }
134
- // if the linked PM in the other maintenance list not selected
135
- if(this.maintenanceSelected.pmJob.groupList && (this.maintenanceSelected.pmJob.groupList.length !== this.detailedPmJobLinkedList.length))
136
- {
137
- this.maintenanceSelected.pmJob.groupList.forEach((linked : PMGroupedJob ) => {
138
-
139
- this.maintenanceListNotDisplayed.forEach((item :DetailedPmJob ) => {
140
- item.toUpdate = false ;
141
- if(linked.workorderId === item.pmJob.workorderId)
142
- {
143
- this.detailedPmJobLinkedList.push(item);
144
- }
145
- });
146
- });
147
-
148
- }
149
-
150
- }
151
- confirmDialog() {
152
- this.isProposedDate = true ;
153
- this.op.hide();
154
- this.displayConfirmDialog = true;
155
- }
156
- closeConfirmDialog(confirm: any) {
157
-
158
- console.log(this.isProposedDate)
159
- this.displayConfirmDialog = false;
160
- this.maintenanceSelected.futureStatus = PmJobStatus.ACCEPTED ;
161
- if (confirm) {
162
- if(!this.isProposedDate)
163
- {
164
- this.emailTypes.push(EmailType.Accepted_CSC_Alternate) ;
165
- this.emailTypes.push(EmailType.Accepted_Clients_Alternate) ;
166
- this.updateAlternativeDate();
167
- }
168
- else
169
- { this.emailTypes.push(EmailType.Accepted_CSC) ;
170
- this.emailTypes.push(EmailType.Accepted_Clients) ;
171
- this.updateProposedDate();
172
- }
173
-
174
- this.updatePmJob();
175
- }
176
- }
177
- closeConfirmDialogContact(confirm: any) {
178
- this.displayConfirmDialogContact = false;
179
- if (confirm) {
180
-
181
- this.emailTypes = [] as string[];
182
- if(this.reasonContact === ReasonContact.ContactFormPm )
183
- {
184
-
185
- this.emailTypes.push(EmailType.ContactMe_Clients);
186
- this.emailTypes.push(EmailType.ContactMe_CSC);
187
-
188
- }
189
- else if(this.reasonContact === ReasonContact.CancelFormPm )
190
- {
191
- this.maintenanceSelected.pmJob.customObject= {};
192
- this.maintenanceSelected.pmJob.customObject.customerWaiting =StingBoolean.YES ;
193
- this.maintenanceSelected.futureStatus = PmJobStatus.WAITING ;
194
- this.emailTypes.push(EmailType.CancelPM_CSC);
195
- this.emailTypes.push(EmailType.CancelPM_Clients);
196
-
197
- }
198
- else
199
- {
200
- this.maintenanceSelected.pmJob.customObject= {};
201
- this.maintenanceSelected.pmJob.customObject.customerWaiting =StingBoolean.YES;
202
- this.maintenanceSelected.futureStatus = PmJobStatus.WAITING ;
203
- this.emailTypes.push(EmailType.SendNewDates_CSC);
204
- this.emailTypes.push(EmailType.SendNewDates_Clients);
205
- }
206
-
207
- this.updateLinkedPMFormContact();
208
-
209
- this.closeContactSupport(true) ;
210
-
211
- }
212
-
213
- }
214
- updateLinkedPMFormContact()
215
- {
216
- this.pmJobList =[];
217
- this.pmJobList.push(this.maintenanceSelected);
218
- if(this.detailedPmJobLinkedList.length >0)
219
- {
220
- this.detailedPmJobLinkedList.forEach((item:DetailedPmJob) => {
221
- item.futureStatus = item.status ;
222
- item.selectedDate = item.pmJob.startDateTime;
223
- item.WorkorderNumberSelected = this.maintenanceSelected.pmJob.workorderId ;
224
- if(this.reasonContact === ReasonContact.MoreDatesFormPm ||this.reasonContact === ReasonContact.CancelFormPm )
225
- {
226
- item.reason = this.maintenanceSelected.reason;
227
- item.reasonContact = this.maintenanceSelected.reasonContact;
228
- item.pmJob.customObject= {};
229
- item.pmJob.customObject.customerWaiting =StingBoolean.YES ;
230
- item.futureStatus = PmJobStatus.WAITING ;
231
-
232
- }
233
-
234
- this.pmJobList.push(item);
235
- });
236
-
237
- }
238
-
239
- this.callApiToUpdate();
240
- }
241
- closeContactSupport(event :any)
242
- {
243
- this.displaycontactSupport = false;
244
- this.showDate = false;
245
- this.reasonContact ="";
246
-
247
- }
248
- proposeAnotherDate() {
249
- this.isProposedDate = false ;
250
- this.op.hide();
251
- this.displayAnotherDate = true;
252
- }
253
- contactSupport(fromOtherDate : boolean) {
254
-
255
-
256
- this.op.hide();
257
-
258
- this.reasonContact = fromOtherDate ? ReasonContact.MoreDatesFormPm : ReasonContact.ContactFormPm ;
259
- this.displaycontactSupport = true;
260
- }
261
- showLinks(element?:any)
262
- {
263
- if(element)
264
- {
265
- this.selectElement(element);
266
- }
267
-
268
- this.op.hide();
269
- this.displayShowLinks = true ;
270
- }
271
- closeShowLinks(){
272
- this.displayShowLinks = false ;
273
- }
274
- closeConfirmedDateInfo() {
275
- this.displayConfirmedDateInfo = false;
276
- }
277
- acceptDate(alternativeDates: AlternativeDate[]) {
278
-
279
- this.displayConfirmDialog = true;
280
- this.alternativeDatesSelected = alternativeDates;
281
- this.findDatesSelected();
282
- }
283
- findDatesSelected(){
284
- this.alternativeDatesSelected.forEach((alternativeDate: AlternativeDate) => {
285
- if(alternativeDate.selected==="Yes")
286
- {
287
- this.startDateTime = alternativeDate.startDateTime;
288
- this.endDateTime = alternativeDate.endDateTime;
289
- this.maintenanceSelected.selectedDate = alternativeDate.startDateTime;
290
- return;
291
- }
292
- });
293
- }
294
- closeAnotherDate(event: any) {
295
- this.displayAnotherDate = false;
296
- if(event===false)
297
- {
298
- this.alreadyScheduledMsg = false ;
299
- this.op.hide();
300
- this.contactSupport(true);
301
- }
302
- }
303
- updatePmJob() {
304
- this.pmJobList =[];
305
- this.pmJobList.push(this.maintenanceSelected);
306
- if(this.detailedPmJobLinkedList.length >0)
307
- {
308
- this.detailedPmJobLinkedList.forEach((pMJob:DetailedPmJob) => {
309
-
310
- this.pmJobList.push(pMJob);
311
- });
312
-
313
- }
314
- this.callApiToUpdate();
315
-
316
- }
317
- editPm(){
318
- this.alreadyScheduledMsg = true ;
319
- this.op.hide();
320
- this.reasonContact = ReasonContact.CancelFormPm ;
321
- this.prepareForPopup() ;
322
- this.displaycontactSupport = true;
323
- }
324
- prepareForPopup(){
325
- if(this.maintenanceSelected.pmJob.customerAccepted ==="Yes")
326
- {
327
- this.startDateTime = this.maintenanceSelected.pmJob.startDateTime;
328
- this.endDateTime = this.maintenanceSelected.pmJob.endDateTime;
329
- }
330
- else
331
- {
332
- this.alternativeDatesSelected = this.maintenanceSelected.pmJob.alternativeDates;
333
- this.findDatesSelected();
334
- }
335
-
336
- }
337
- updateProposedDate(){
338
- this.maintenanceSelected.pmJob.customerAccepted = StingBoolean.YES;
339
- this.maintenanceSelected.pmJob.eventStatus = EventStatus.ASSIGNEDANC;
340
- this.detailedPmJobLinkedList.forEach((item :DetailedPmJob ) => {
341
- item.pmJob.customerAccepted = StingBoolean.YES;
342
- item.pmJob.eventStatus = EventStatus.ASSIGNEDANC;
343
- item.futureStatus = PmJobStatus.ACCEPTED ;
344
- item.WorkorderNumberSelected = this.maintenanceSelected.pmJob.workorderId ;
345
- });
346
- }
347
- updateAlternativeDate(){
348
- this.findDatesSelected();
349
- this.maintenanceSelected.pmJob.alternativeDates = this.alternativeDatesSelected ;
350
- this.detailedPmJobLinkedList.forEach((item :DetailedPmJob ) => {
351
- item.pmJob.alternativeDates = this.alternativeDatesSelected ;
352
- item.pmJob.eventStatus = EventStatus.ASSIGNEDANC;
353
- item.futureStatus = PmJobStatus.ACCEPTED ;
354
- item.WorkorderNumberSelected = this.maintenanceSelected.pmJob.workorderId ;
355
- });
356
- this.displayAnotherDate = false;
357
- }
358
- sendContactMeForm(contactMeRequest:any){
359
- this.moreDates = false;
360
- if( contactMeRequest.reasonContact === ReasonContact.MoreDatesFormPm )
361
- {
362
- this.moreDates = true;
363
- }
364
- this.displayConfirmDialogContact = true;
365
- this.maintenanceSelected = contactMeRequest ;
366
- }
367
-
368
- callApiToUpdate(){
369
- let PmJobListForUpdate = {} as any;
370
- PmJobListForUpdate.pmJobList = this.pmJobList;
371
- PmJobListForUpdate.emailTypes = this.emailTypes;
372
- this.emitForUpdate.emit(PmJobListForUpdate);
373
- }
374
-
375
- transformStatus(status: string): string {
376
- switch (status) {
377
- case PmJobStatus.NEW : return this.status.new;
378
- case PmJobStatus.ACCEPTED : return this.status.accepted;
379
- case PmJobStatus.CLOSED : return this.status.closed;
380
- case PmJobStatus.Late : return this.status.late;
381
- case PmJobStatus.OPEN : return this.status.open;
382
- case PmJobStatus.WAITING : return this.status.waiting;
383
- case PmJobStatus.DONE : return this.status.done;
384
- case PmJobStatus.VALIDATED : return this.status.validated;
385
- default : return "Erreur";
386
- }
387
- }
388
-
389
- getStatusTooltip(status: string): string {
390
- switch (status) {
391
- case PmJobStatus.ACCEPTED : return this.status.acceptedTooltip;
392
- case PmJobStatus.NEW : return this.status.newTooltip;
393
- case PmJobStatus.CLOSED : return this.status.closedTooltip;
394
- case PmJobStatus.Late : return this.status.lateTooltip;
395
- case PmJobStatus.OPEN : return this.status.openTooltip;
396
- case PmJobStatus.WAITING : return this.status.waitingTooltip;
397
- case PmJobStatus.DONE : return this.status.doneTooltip;
398
- case PmJobStatus.VALIDATED : return this.status.validatedTooltip;
399
- default : return "Erreur";
400
- }
401
- }
402
-
403
- }
@@ -1,10 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { RouterModule, Routes } from '@angular/router';
3
-
4
- const routes: Routes = [];
5
-
6
- @NgModule({
7
- imports: [RouterModule.forChild(routes)],
8
- exports: [RouterModule]
9
- })
10
- export class SharedRoutingModule { }
@@ -1,80 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { SystemListComponent } from './system-list/system-list.component';
4
- import {TableModule} from 'primeng/table';
5
- import {InputTextModule} from 'primeng/inputtext';
6
- import { PipesModule } from '../pipes/pipes/pipes.module';
7
- import { ContactComponent } from './contact/contact.component';
8
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
9
- import {ToastModule} from 'primeng/toast';
10
- import {InputTextareaModule} from 'primeng/inputtextarea';
11
- import {MultiSelectModule} from 'primeng/multiselect';
12
- import { ChooseAnotherDateComponent } from './choose-another-date/choose-another-date.component';
13
- import { ConfirmDialogComponent } from './confirm-dialog/confirm-dialog.component';
14
- import { ConfirmedDateInformationComponent } from './confirmed-date-information/confirmed-date-information.component';
15
- import { ContactSupportComponent } from './contact-support/contact-support.component';
16
- import { MaintenanceListComponent } from './maintenance-list/maintenance-list.component';
17
- import { ShowLinksComponent } from './show-links/show-links.component';
18
- import {CalendarModule} from 'primeng/calendar';
19
- import {SliderModule} from 'primeng/slider';
20
- import {ContextMenuModule} from 'primeng/contextmenu';
21
- import {DialogModule} from 'primeng/dialog';
22
- import {ButtonModule} from 'primeng/button';
23
- import {DropdownModule} from 'primeng/dropdown';
24
- import { ToolbarModule } from 'primeng/toolbar';
25
- import {OverlayPanelModule} from 'primeng/overlaypanel';
26
- import {TooltipModule} from 'primeng/tooltip';
27
- import {ProgressSpinnerModule} from 'primeng/progressspinner';
28
- import { ConfirmDialogModule } from 'primeng/confirmdialog';
29
- import { ConfirmPopupModule } from 'primeng/confirmpopup';
30
- import {SelectButtonModule} from 'primeng/selectbutton';
31
- import {RadioButtonModule} from 'primeng/radiobutton';
32
- import {CheckboxModule} from 'primeng/checkbox';
33
- import { SharedRoutingModule } from './shared-routing.module';
34
- import { DashboardComponent } from './dashboard/dashboard.component';
35
- import { ConfirmDialogContactComponent } from './confirm-dialog-contact/confirm-dialog-contact.component';
36
-
37
-
38
- @NgModule({
39
- declarations: [
40
- SystemListComponent,
41
- ContactComponent,
42
- ChooseAnotherDateComponent,
43
- ConfirmDialogComponent,
44
- ConfirmedDateInformationComponent,
45
- ContactSupportComponent,
46
- MaintenanceListComponent,
47
- ShowLinksComponent,
48
- DashboardComponent,
49
- ConfirmDialogContactComponent
50
- ],
51
- imports: [
52
- CommonModule,
53
- SharedRoutingModule,
54
- TableModule,
55
- InputTextModule,
56
- PipesModule,
57
- ToastModule,
58
- InputTextareaModule,
59
- MultiSelectModule,
60
- FormsModule,
61
- ReactiveFormsModule,
62
- ProgressSpinnerModule,
63
- RadioButtonModule,
64
- CheckboxModule,
65
- SelectButtonModule,
66
- TooltipModule,
67
- OverlayPanelModule,
68
- CalendarModule,
69
- SliderModule,
70
- DialogModule,
71
- ConfirmPopupModule,
72
- ConfirmDialogModule,
73
- ContextMenuModule,
74
- DropdownModule,
75
- ButtonModule,
76
- ToolbarModule,
77
- ],
78
- exports:[SystemListComponent,ContactComponent,MaintenanceListComponent,DashboardComponent]
79
- })
80
- export class SharedModule { }
@@ -1,49 +0,0 @@
1
- <p-dialog [header]="translate.titleShowLinks+ selectedWorkorderId " [(visible)]="displayShowLinks" [modal]="true" [style]="{width: '50vw'}" (onHide)="close()" [maximizable]="true" [baseZIndex]="10000" [draggable]="false" [resizable]="false">
2
- <p-table #dt [value]="detailedPmJobLinkedList" responsiveLayout="stack" [rows]="5" [showCurrentPageReport]="false" [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']"
3
- [rowHover]="true" dataKey="id" [currentPageReportTemplate]="globaltranslate.countPages">
4
- <ng-template pTemplate="caption">
5
- <div>
6
- <span class="p-input-icon-left">
7
- <i class="pi pi-search"></i>
8
- <input pInputText type="text" (input)="applyFilterGlobal($event, 'contains')"
9
- [placeholder]="globaltranslate.search" />
10
- </span>
11
- </div>
12
- </ng-template>
13
- <ng-template pTemplate="header" let-columns>
14
- <tr>
15
- <th pSortableColumn="systemName">{{translate.maintenanceList.system}}
16
- <p-sortIcon field="systemId"></p-sortIcon>
17
- <th pSortableColumn="systemId">System Id
18
- <p-sortIcon field="systemName"></p-sortIcon>
19
- <th pSortableColumn="workorderNumber">{{translate.maintenanceList.workOrder}}
20
- <p-sortIcon field="workorderNumber"></p-sortIcon>
21
- <th pSortableColumn="startDateTime">{{translate.maintenanceList.startDate}}
22
- <p-sortIcon field="startDateTime"></p-sortIcon>
23
- <th pSortableColumn="case_type">{{translate.maintenanceList.type}}
24
- <p-sortIcon field="case_type"></p-sortIcon>
25
- <th pSortableColumn="status">{{translate.maintenanceList.status}}
26
- <p-sortIcon field="status"></p-sortIcon>
27
-
28
- </tr>
29
- </ng-template>
30
- <ng-template pTemplate="body" let-product let-columns="columns">
31
- <tr>
32
- <td>{{product.systemName }}</td>
33
- <td>{{product.systemId }}</td>
34
- <td>{{product.pmJob.workorderNumber }}</td>
35
- <td>{{product.pmJob.startDateTime | date: "EEE dd MMM yyyy":"":language}}</td>
36
- <td *ngIf="product.pmJob.caseType == 'Planned Maintenance'">{{translate.maintenanceList.typePlanned}}</td>
37
- <td *ngIf="product.pmJob.caseType == 'QARA'">{{translate.maintenanceList.typeQARA}}</td>
38
- <td><span [class]="'product-status status-' + product.status" [pTooltip]="getStatusTooltip(product.status)">{{transformStatus(product.status) }}</span>
39
- </td>
40
- </tr>
41
- </ng-template>
42
- <ng-template pTemplate="summary">
43
- <div class="p-d-flex p-ai-center p-jc-between">
44
- {{globaltranslate.count}} {{detailedPmJobLinkedList ? detailedPmJobLinkedList.length : 0 }} {{globaltranslate.elements}}.
45
- </div>
46
- </ng-template>
47
- </p-table>
48
-
49
- </p-dialog>
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { ShowLinksComponent } from './show-links.component';
4
-
5
- describe('ShowLinksComponent', () => {
6
- let component: ShowLinksComponent;
7
- let fixture: ComponentFixture<ShowLinksComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ ShowLinksComponent ]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(ShowLinksComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,78 +0,0 @@
1
- import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
2
- import { Table } from 'primeng/table';
3
- import { DetailedPmJob } from '../../models/detailedPmJob.model';
4
- import { PmJobStatus } from '../../models/pmJobStatus';
5
-
6
- @Component({
7
- selector: 'app-show-links',
8
- templateUrl: './show-links.component.html',
9
- styleUrls: ['./show-links.component.scss']
10
- })
11
- export class ShowLinksComponent {
12
- @ViewChild('dt') dt: Table | undefined;
13
- @Input() displayShowLinks!: boolean;
14
- @Output() closeShowLinks = new EventEmitter<boolean>();
15
- @Input() detailedPmJobLinkedList: DetailedPmJob[] = [];
16
- @Input() selectedWorkorderId!: any;
17
- @Input() globaltranslate: any;
18
- @Input() translate: any;
19
- @Input() status: any;
20
- header ="header";
21
- languageStored : string | null = localStorage.getItem("lang");
22
- language: string = this.languageStored ? this.languageStored : navigator.language.substr(0, 2).toLowerCase();
23
- constructor() {
24
- this.header = "PM : " + this.selectedWorkorderId ;
25
- }
26
-
27
-
28
- close()
29
- {
30
- this.closeShowLinks.emit(false);
31
-
32
- }
33
- applyFilterGlobal($event: any, stringVal: any) {
34
- this.dt?.filterGlobal(
35
- ($event.target as HTMLInputElement).value,
36
- stringVal
37
- );
38
- }
39
-
40
-
41
- transformStatus(status: string): string {
42
- switch (status) {
43
-
44
- case PmJobStatus.NEW : return this.status.new;
45
- case PmJobStatus.ACCEPTED : return this.status.accepted;
46
- case PmJobStatus.CLOSED : return this.status.closed;
47
- case PmJobStatus.Late : return this.status.late;
48
- case PmJobStatus.OPEN : return this.status.open;
49
- case PmJobStatus.WAITING : return this.status.waiting;
50
- case PmJobStatus.DONE : return this.status.done;
51
- case PmJobStatus.VALIDATED : return this.status.validated;
52
- default : return "Erreur";
53
- }
54
- }
55
-
56
- getStatusTooltip(status: string): string {
57
- switch (status) {
58
- case PmJobStatus.ACCEPTED : return this.status.acceptedTooltip;
59
- case PmJobStatus.NEW : return this.status.newTooltip;
60
- case PmJobStatus.CLOSED : return this.status.closedTooltip;
61
- case PmJobStatus.Late : return this.status.lateTooltip;
62
-
63
- case PmJobStatus.OPEN : return this.status.openTooltip;
64
- case PmJobStatus.WAITING : return this.status.waitingTooltip;
65
- case PmJobStatus.DONE : return this.status.doneTooltip;
66
- case PmJobStatus.VALIDATED : return this.status.validatedTooltip;
67
- default : return "Erreur";
68
- }
69
- }
70
- transformType(type : string) {
71
-
72
- if( type ==="Planned Maintenance"){
73
- return "Maintenance planifiée" ;
74
- }
75
- return type;
76
- }
77
-
78
- }