tango-app-ui-manage-tickets 3.7.0-beta.61 → 3.7.0-beta.63

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 (177) hide show
  1. package/esm2022/lib/components/add-csm-modal/add-csm-modal.component.mjs +98 -0
  2. package/esm2022/lib/components/audit-log/audit-log.component.mjs +11 -0
  3. package/esm2022/lib/components/audit-mapping-list/audit-mapping-list.component.mjs +496 -0
  4. package/esm2022/lib/components/audit-metrics/audit-metrics.component.mjs +298 -0
  5. package/esm2022/lib/components/audit-report-popup/audit-report-popup.component.mjs +389 -0
  6. package/esm2022/lib/components/audit-retag/audit-retag.component.mjs +480 -0
  7. package/esm2022/lib/components/comment-model/comment-model.component.mjs +58 -0
  8. package/esm2022/lib/components/count/count.component.mjs +89 -0
  9. package/esm2022/lib/components/custom-select/custom-select.component.mjs +187 -0
  10. package/esm2022/lib/components/filter-options/filter-options.component.mjs +41 -0
  11. package/esm2022/lib/components/footfall-dic/footfall-dic.component.mjs +1061 -0
  12. package/esm2022/lib/components/footfall-dicview/footfall-dicview.component.mjs +1014 -0
  13. package/esm2022/lib/components/footfall-popup/footfall-popup.component.mjs +15 -0
  14. package/esm2022/lib/components/group-select/group-select.component.mjs +155 -0
  15. package/esm2022/lib/components/re-trigger/re-trigger.component.mjs +96 -0
  16. package/esm2022/lib/components/reactive-select/reactive-select.component.mjs +108 -0
  17. package/esm2022/lib/components/remove-audit/remove-audit.component.mjs +81 -0
  18. package/esm2022/lib/components/start-audit/start-audit.component.mjs +769 -0
  19. package/esm2022/lib/components/tango-manage-tickets/tango-manage-tickets.component.mjs +131 -0
  20. package/esm2022/lib/components/ticket-filter-panel/ticket-filter-panel.component.mjs +435 -0
  21. package/esm2022/lib/components/ticket-footfall-new/ticket-footfall-new.component.mjs +2749 -0
  22. package/esm2022/lib/components/ticketclosepopup/ticketclosepopup.component.mjs +43 -0
  23. package/esm2022/lib/components/tickets/tickets.component.mjs +847 -0
  24. package/esm2022/lib/components/viewcategory/viewcategory.component.mjs +89 -0
  25. package/esm2022/lib/services/audit.service.mjs +88 -0
  26. package/esm2022/lib/services/excel.service.mjs +45 -0
  27. package/esm2022/lib/services/ticket.service.mjs +319 -0
  28. package/esm2022/lib/services/timer.service.mjs +84 -0
  29. package/esm2022/lib/tango-manage-tickets-routing.module.mjs +44 -0
  30. package/esm2022/lib/tango-manage-tickets.module.mjs +109 -0
  31. package/esm2022/public-api.mjs +6 -0
  32. package/esm2022/tango-app-ui-manage-tickets.mjs +5 -0
  33. package/fesm2022/tango-app-ui-manage-tickets.mjs +10192 -0
  34. package/fesm2022/tango-app-ui-manage-tickets.mjs.map +1 -0
  35. package/index.d.ts +5 -0
  36. package/lib/components/add-csm-modal/add-csm-modal.component.d.ts +30 -0
  37. package/lib/components/audit-log/audit-log.component.d.ts +5 -0
  38. package/lib/components/audit-mapping-list/audit-mapping-list.component.d.ts +73 -0
  39. package/lib/components/audit-metrics/audit-metrics.component.d.ts +59 -0
  40. package/lib/components/audit-report-popup/audit-report-popup.component.d.ts +52 -0
  41. package/lib/components/audit-retag/audit-retag.component.d.ts +59 -0
  42. package/lib/components/comment-model/comment-model.component.d.ts +17 -0
  43. package/lib/components/count/count.component.d.ts +23 -0
  44. package/lib/components/custom-select/custom-select.component.d.ts +35 -0
  45. package/lib/components/filter-options/filter-options.component.d.ts +15 -0
  46. package/lib/components/footfall-dic/footfall-dic.component.d.ts +143 -0
  47. package/lib/components/footfall-dicview/footfall-dicview.component.d.ts +132 -0
  48. package/lib/components/footfall-popup/footfall-popup.component.d.ts +8 -0
  49. package/lib/components/group-select/group-select.component.d.ts +33 -0
  50. package/lib/components/re-trigger/re-trigger.component.d.ts +32 -0
  51. package/lib/components/reactive-select/reactive-select.component.d.ts +32 -0
  52. package/lib/components/remove-audit/remove-audit.component.d.ts +16 -0
  53. package/lib/components/start-audit/start-audit.component.d.ts +86 -0
  54. package/lib/components/tango-manage-tickets/tango-manage-tickets.component.d.ts +28 -0
  55. package/lib/components/ticket-filter-panel/ticket-filter-panel.component.d.ts +79 -0
  56. package/lib/components/ticket-footfall-new/ticket-footfall-new.component.d.ts +287 -0
  57. package/lib/components/ticketclosepopup/ticketclosepopup.component.d.ts +15 -0
  58. package/lib/components/tickets/tickets.component.d.ts +88 -0
  59. package/lib/components/viewcategory/viewcategory.component.d.ts +16 -0
  60. package/lib/services/audit.service.d.ts +36 -0
  61. package/lib/services/excel.service.d.ts +10 -0
  62. package/lib/services/ticket.service.d.ts +87 -0
  63. package/lib/services/timer.service.d.ts +22 -0
  64. package/lib/tango-manage-tickets-routing.module.d.ts +7 -0
  65. package/lib/tango-manage-tickets.module.d.ts +38 -0
  66. package/package.json +25 -12
  67. package/{src/public-api.ts → public-api.d.ts} +2 -8
  68. package/.eslintrc.json +0 -37
  69. package/ng-package.json +0 -7
  70. package/src/lib/components/add-csm-modal/add-csm-modal.component.html +0 -32
  71. package/src/lib/components/add-csm-modal/add-csm-modal.component.scss +0 -14
  72. package/src/lib/components/add-csm-modal/add-csm-modal.component.spec.ts +0 -23
  73. package/src/lib/components/add-csm-modal/add-csm-modal.component.ts +0 -94
  74. package/src/lib/components/audit-log/audit-log.component.html +0 -1
  75. package/src/lib/components/audit-log/audit-log.component.scss +0 -0
  76. package/src/lib/components/audit-log/audit-log.component.spec.ts +0 -23
  77. package/src/lib/components/audit-log/audit-log.component.ts +0 -10
  78. package/src/lib/components/audit-mapping-list/audit-mapping-list.component.html +0 -234
  79. package/src/lib/components/audit-mapping-list/audit-mapping-list.component.scss +0 -186
  80. package/src/lib/components/audit-mapping-list/audit-mapping-list.component.spec.ts +0 -23
  81. package/src/lib/components/audit-mapping-list/audit-mapping-list.component.ts +0 -520
  82. package/src/lib/components/audit-metrics/audit-metrics.component.html +0 -345
  83. package/src/lib/components/audit-metrics/audit-metrics.component.scss +0 -34
  84. package/src/lib/components/audit-metrics/audit-metrics.component.spec.ts +0 -23
  85. package/src/lib/components/audit-metrics/audit-metrics.component.ts +0 -292
  86. package/src/lib/components/audit-report-popup/audit-report-popup.component.html +0 -111
  87. package/src/lib/components/audit-report-popup/audit-report-popup.component.scss +0 -101
  88. package/src/lib/components/audit-report-popup/audit-report-popup.component.spec.ts +0 -23
  89. package/src/lib/components/audit-report-popup/audit-report-popup.component.ts +0 -397
  90. package/src/lib/components/audit-retag/audit-retag.component.html +0 -129
  91. package/src/lib/components/audit-retag/audit-retag.component.scss +0 -146
  92. package/src/lib/components/audit-retag/audit-retag.component.spec.ts +0 -23
  93. package/src/lib/components/audit-retag/audit-retag.component.ts +0 -489
  94. package/src/lib/components/comment-model/comment-model.component.html +0 -24
  95. package/src/lib/components/comment-model/comment-model.component.scss +0 -20
  96. package/src/lib/components/comment-model/comment-model.component.spec.ts +0 -23
  97. package/src/lib/components/comment-model/comment-model.component.ts +0 -53
  98. package/src/lib/components/count/count.component.html +0 -54
  99. package/src/lib/components/count/count.component.scss +0 -14
  100. package/src/lib/components/count/count.component.spec.ts +0 -23
  101. package/src/lib/components/count/count.component.ts +0 -82
  102. package/src/lib/components/custom-select/custom-select.component.html +0 -134
  103. package/src/lib/components/custom-select/custom-select.component.scss +0 -204
  104. package/src/lib/components/custom-select/custom-select.component.spec.ts +0 -23
  105. package/src/lib/components/custom-select/custom-select.component.ts +0 -189
  106. package/src/lib/components/filter-options/filter-options.component.html +0 -51
  107. package/src/lib/components/filter-options/filter-options.component.scss +0 -102
  108. package/src/lib/components/filter-options/filter-options.component.spec.ts +0 -23
  109. package/src/lib/components/filter-options/filter-options.component.ts +0 -38
  110. package/src/lib/components/footfall-dic/footfall-dic.component.html +0 -1275
  111. package/src/lib/components/footfall-dic/footfall-dic.component.scss +0 -273
  112. package/src/lib/components/footfall-dic/footfall-dic.component.spec.ts +0 -23
  113. package/src/lib/components/footfall-dic/footfall-dic.component.ts +0 -1206
  114. package/src/lib/components/footfall-dicview/footfall-dicview.component.html +0 -1136
  115. package/src/lib/components/footfall-dicview/footfall-dicview.component.scss +0 -416
  116. package/src/lib/components/footfall-dicview/footfall-dicview.component.spec.ts +0 -23
  117. package/src/lib/components/footfall-dicview/footfall-dicview.component.ts +0 -1168
  118. package/src/lib/components/footfall-popup/footfall-popup.component.html +0 -61
  119. package/src/lib/components/footfall-popup/footfall-popup.component.scss +0 -20
  120. package/src/lib/components/footfall-popup/footfall-popup.component.spec.ts +0 -23
  121. package/src/lib/components/footfall-popup/footfall-popup.component.ts +0 -12
  122. package/src/lib/components/group-select/group-select.component.html +0 -44
  123. package/src/lib/components/group-select/group-select.component.scss +0 -144
  124. package/src/lib/components/group-select/group-select.component.spec.ts +0 -23
  125. package/src/lib/components/group-select/group-select.component.ts +0 -145
  126. package/src/lib/components/re-trigger/re-trigger.component.html +0 -53
  127. package/src/lib/components/re-trigger/re-trigger.component.scss +0 -16
  128. package/src/lib/components/re-trigger/re-trigger.component.spec.ts +0 -23
  129. package/src/lib/components/re-trigger/re-trigger.component.ts +0 -96
  130. package/src/lib/components/reactive-select/reactive-select.component.html +0 -18
  131. package/src/lib/components/reactive-select/reactive-select.component.scss +0 -52
  132. package/src/lib/components/reactive-select/reactive-select.component.spec.ts +0 -23
  133. package/src/lib/components/reactive-select/reactive-select.component.ts +0 -104
  134. package/src/lib/components/remove-audit/remove-audit.component.html +0 -38
  135. package/src/lib/components/remove-audit/remove-audit.component.scss +0 -27
  136. package/src/lib/components/remove-audit/remove-audit.component.spec.ts +0 -23
  137. package/src/lib/components/remove-audit/remove-audit.component.ts +0 -81
  138. package/src/lib/components/start-audit/start-audit.component.html +0 -174
  139. package/src/lib/components/start-audit/start-audit.component.scss +0 -185
  140. package/src/lib/components/start-audit/start-audit.component.spec.ts +0 -23
  141. package/src/lib/components/start-audit/start-audit.component.ts +0 -761
  142. package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.html +0 -43
  143. package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.scss +0 -35
  144. package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.spec.ts +0 -23
  145. package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.ts +0 -118
  146. package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.html +0 -386
  147. package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.scss +0 -87
  148. package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.spec.ts +0 -23
  149. package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.ts +0 -494
  150. package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.html +0 -4743
  151. package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.scss +0 -1208
  152. package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.spec.ts +0 -23
  153. package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.ts +0 -3344
  154. package/src/lib/components/ticketclosepopup/ticketclosepopup.component.html +0 -100
  155. package/src/lib/components/ticketclosepopup/ticketclosepopup.component.scss +0 -34
  156. package/src/lib/components/ticketclosepopup/ticketclosepopup.component.spec.ts +0 -23
  157. package/src/lib/components/ticketclosepopup/ticketclosepopup.component.ts +0 -48
  158. package/src/lib/components/tickets/tickets.component.html +0 -451
  159. package/src/lib/components/tickets/tickets.component.scss +0 -131
  160. package/src/lib/components/tickets/tickets.component.spec.ts +0 -23
  161. package/src/lib/components/tickets/tickets.component.ts +0 -809
  162. package/src/lib/components/viewcategory/viewcategory.component.html +0 -38
  163. package/src/lib/components/viewcategory/viewcategory.component.scss +0 -29
  164. package/src/lib/components/viewcategory/viewcategory.component.spec.ts +0 -23
  165. package/src/lib/components/viewcategory/viewcategory.component.ts +0 -79
  166. package/src/lib/services/audit.service.spec.ts +0 -16
  167. package/src/lib/services/audit.service.ts +0 -98
  168. package/src/lib/services/excel.service.ts +0 -48
  169. package/src/lib/services/ticket.service.spec.ts +0 -16
  170. package/src/lib/services/ticket.service.ts +0 -501
  171. package/src/lib/services/timer.service.spec.ts +0 -16
  172. package/src/lib/services/timer.service.ts +0 -92
  173. package/src/lib/tango-manage-tickets-routing.module.ts +0 -37
  174. package/src/lib/tango-manage-tickets.module.ts +0 -68
  175. package/tsconfig.lib.json +0 -14
  176. package/tsconfig.lib.prod.json +0 -10
  177. package/tsconfig.spec.json +0 -14
@@ -1,501 +0,0 @@
1
- import { HttpClient } from "@angular/common/http";
2
- import { Injectable, Optional } from "@angular/core";
3
- import { GlobalStateService } from "tango-app-ui-global";
4
- import {
5
- BehaviorSubject,
6
- Observable,
7
- catchError,
8
- map,
9
- of,
10
- throwError,
11
- } from "rxjs";
12
- import { HttpParams } from "@angular/common/http";
13
- @Injectable({
14
- providedIn: "root",
15
- })
16
- export class TicketService {
17
- userApiUrl: any;
18
- ticketsApiUrl: any;
19
- auditApiUrl: any;
20
- auditmetricApiUrl: any;
21
- zoneauditApiUrl: any;
22
- footfallDirapiUrl: any;
23
- footfallCDN: any;
24
- trafficApiUrl: any;
25
- revopApiUrl: any;
26
- clientApiUrl:any;
27
- vmsAuditUrl:any;
28
- dropDownTrigger = new BehaviorSubject<any>(null);
29
- constructor(private http: HttpClient, private gs: GlobalStateService) {
30
- this.gs.environment.subscribe((env) => {
31
- if (env) {
32
- this.userApiUrl = env.userApiUrl;
33
- this.ticketsApiUrl = env.ticketsApiUrl;
34
- this.auditmetricApiUrl = env.auditmetricApiUrl;
35
- this.auditApiUrl = env.auditApiUrl;
36
- this.zoneauditApiUrl = env.zoneauditApiUrl;
37
- this.clientApiUrl = env.clientApiUrl;
38
- this.footfallDirapiUrl = env.footfallDirapiUrl;
39
- this.footfallCDN = env.footfallCDN;
40
- this.trafficApiUrl = env.trafficApiUrl;
41
- this.revopApiUrl = env.revopApiUrl;
42
- this.vmsAuditUrl = env.vmsAuditUrl;
43
- }
44
- });
45
- }
46
-
47
- getUserList(params: any): Observable<any> {
48
- return this.http.post<any>(`${this.userApiUrl}/get-list`, params);
49
- }
50
-
51
- exportInstallationList(data: any) {
52
- return this.http.post(
53
- `${this.ticketsApiUrl}/infra/installationTable`,
54
- data,
55
- { responseType: "arraybuffer" }
56
- );
57
- }
58
-
59
- exportInfraList(data: any) {
60
- return this.http.post(`${this.ticketsApiUrl}/infra/infraTable`, data, {
61
- responseType: "arraybuffer",
62
- });
63
- }
64
-
65
- exportMatList(data: any) {
66
- return this.http.post(`${this.ticketsApiUrl}/infra/matTable`, data, {
67
- responseType: "arraybuffer",
68
- });
69
- }
70
-
71
- getSotresList(data: any) {
72
- return this.http.post<any>(`${this.ticketsApiUrl}/infra/storeFilter`, data);
73
- }
74
-
75
- getInstallationList(data: any) {
76
- return this.http.post<any>(
77
- `${this.ticketsApiUrl}/infra/installationTable`,
78
- data
79
- );
80
- }
81
-
82
- getInfraList(data: any) {
83
- return this.http.post<any>(`${this.ticketsApiUrl}/infra/infraTable`, data);
84
- }
85
-
86
- getAssignTicket(data: any) {
87
- return this.http.post<any>(
88
- `${this.ticketsApiUrl}/infra/assignTicket`,
89
- data
90
- );
91
- }
92
-
93
- getMatList(data: any) {
94
- return this.http.post<any>(`${this.ticketsApiUrl}/infra/matTable`, data);
95
- }
96
-
97
- updateTicketIssue(data: any) {
98
- return this.http.post<any>(
99
- `${this.ticketsApiUrl}/employeeTraning/updatecomment`,
100
- data
101
- );
102
- }
103
-
104
- getUserActiveList(params: any): Observable<any> {
105
- return this.http.post<any>(`${this.userApiUrl}/list`, params);
106
- }
107
-
108
- getAllCounts(data:any){
109
- return this.http.post<any>(`${this.ticketsApiUrl}/infra/allCounts`, data)
110
- }
111
- getstoreMetrics(data:any){
112
- return this.http.post(`${this.auditApiUrl}/metrics/store-metrics`,data)
113
- }
114
- getstoreMetricsExport(data:any){
115
- return this.http.post(`${this.auditApiUrl}/metrics/store-metrics`,data,{responseType: 'arraybuffer'})
116
- }
117
- getclientList(){
118
- return this.http.get(`${this.auditApiUrl}/clients`)
119
- }
120
- getuserList(){
121
- return this.http.get(`${this.auditApiUrl}/tango-users`)
122
- }
123
- auditretrigger(data:any){
124
- return this.http.post(`${this.auditApiUrl}/metrics/re-trigger`,data)
125
- }
126
- getfootfallcount(data:any){
127
- return this.http.get(`${this.revopApiUrl}/store-processed-data?storeId=${data.storeId}&fromDate=${data.Date}&toDate=${data.Date}`)
128
-
129
- }
130
- getstoreList(data:any){
131
- return this.http.post(`${this.auditApiUrl}/audit-stores`,data)
132
- }
133
- checkTicketExists(data:any){
134
- return this.http.post(`${this.footfallDirapiUrl}/checkTicketExists`,data)
135
- }
136
- mergeticket(data:any){
137
- return this.http.post(`${this.footfallDirapiUrl}/mergeticket`,data)
138
- }
139
- getDataMismathList(data: any) {
140
- return this.http.post<any>(
141
- `${this.ticketsApiUrl}/infra/dataMismatchTable`,
142
- data
143
- );
144
- }
145
- accuracyReasonsupdate(data: any) {
146
- return this.http.post<any>(
147
- `${this.footfallDirapiUrl}/tango-review-accuracy-ticket`,
148
- data
149
- );
150
- }
151
-
152
- exportDataMismatchList(data: any) {
153
- return this.http.post(
154
- `${this.ticketsApiUrl}/infra/dataMismatchTable`,
155
- data,
156
- { responseType: "arraybuffer" }
157
- );
158
- }
159
-
160
-
161
- getAuditImages(data: any) {
162
- return this.http.get(
163
- `${this.auditApiUrl}/audit-images?fileDate=${data?.fileDate}&storeId=${data?.storeId}&imageType=${data?.imageType}&export=${data?.export}&zoneName=${data?.zoneName}&moduleType=${data?.moduleType}`
164
- );
165
- }
166
- ExportAuditImagesasxlsx(data: any) {
167
- return this.http.get(
168
- `${this.auditApiUrl}/audit-images?fileDate=${data?.fileDate}&storeId=${data?.storeId}&imageType=${data?.imageType}&export=${data?.export}&zoneName=${data?.zoneName}&moduleType=${data?.moduleType}`,
169
- { responseType: "arraybuffer" }
170
- );
171
- }
172
-
173
- getTicketSummaryApi(
174
- client: any,
175
- fromDate: any,
176
- toDate: any,
177
- tangoType:any,
178
- permissionType?: string | null,
179
- ): Observable<any> {
180
- let url =
181
- `${this.footfallDirapiUrl}/ticket-summary?` +
182
- `clientId=${client}` +
183
- `&fromDate=${fromDate}` +
184
- `&toDate=${toDate}` +
185
- `&tangoType=${tangoType}`;
186
- if (permissionType) {
187
- url += `&permissionType=${permissionType}`;
188
- }
189
-
190
- return this.http.get(url);
191
- }
192
- accuracyReasons(
193
- client: any,
194
- ): Observable<any> {
195
- return this.http.get(
196
- `${this.footfallDirapiUrl}/get-accuarcy-issues?clientId=${client}`
197
- );
198
- }
199
-
200
- getTicketListOldApi(
201
- client: any,
202
- fromDate: any,
203
- toDate: any,
204
- searchvalue: any,
205
- limit: any,
206
- offset: any,
207
- isExport: any,
208
- sortBy: any,
209
- sortOrder: any
210
- ): Observable<any> {
211
- return this.http.get(
212
- `${this.footfallDirapiUrl}/ticket-list?clientId=${client}&fromDate=${fromDate}&toDate=${toDate}&searchValue=${searchvalue}&limit=${limit}&offset=${offset}&isExport=${isExport}&sortBy=${sortBy}&sortOrder=${sortOrder}`
213
- );
214
- }
215
-
216
- getTicketListApi(
217
- client: any,
218
- fromDate: any,
219
- toDate: any,
220
- searchvalue: any,
221
- limit: any,
222
- offset: any,
223
- isExport: any,
224
- sortBy: any,
225
- sortOrder: any,
226
- tangoType: any,
227
- permissionType?: string | null,
228
- filters?: {
229
- filterByStatus: any[];
230
- filterByReviewer: any | null;
231
- filterByApprover: any | null;
232
- filterByTango: any | null;
233
- filterByReviewedBy: any[];
234
- fileterByApprovedBy: any[];
235
- }
236
- ): Observable<any> {
237
- let url =
238
- `${this.footfallDirapiUrl}/ticket-list?` +
239
- `clientId=${client}` +
240
- `&fromDate=${fromDate}` +
241
- `&toDate=${toDate}` +
242
- `&searchValue=${searchvalue}` +
243
- `&limit=${limit}` +
244
- `&offset=${offset}` +
245
- `&isExport=${isExport}` +
246
- `&sortBy=${sortBy}` +
247
- `&sortOrder=${sortOrder}` +
248
- `&tangoType=${tangoType}`;
249
-
250
- if (permissionType) {
251
- url += `&permissionType=${permissionType}`;
252
- }
253
-
254
- if (filters) {
255
- // array params – send as comma-separated
256
- if (filters.filterByStatus?.length) {
257
- url += `&filterByStatus=${encodeURIComponent(filters.filterByStatus.join(','))}`;
258
- }
259
-
260
- if (filters.filterByReviewedBy?.length) {
261
- url += `&filterByReviewedBy=${encodeURIComponent(filters.filterByReviewedBy.join(','))}`;
262
- }
263
-
264
- if (filters.fileterByApprovedBy?.length) {
265
- url += `&fileterByApprovedBy=${encodeURIComponent(filters.fileterByApprovedBy.join(','))}`;
266
- }
267
-
268
- // string params – JSON stringified accuracy
269
- if (filters.filterByReviewer) {
270
- url += `&filterByReviewer=${encodeURIComponent(filters.filterByReviewer)}`;
271
- }
272
-
273
- if (filters.filterByApprover) {
274
- url += `&filterByApprover=${encodeURIComponent(filters.filterByApprover)}`;
275
- }
276
-
277
- if (filters.filterByTango) {
278
- url += `&filterByTango=${encodeURIComponent(filters.filterByTango)}`;
279
- }
280
- }
281
-
282
- return this.http.get(url);
283
- }
284
-
285
-
286
- getTicketListExportOldApi(
287
- client: any,
288
- fromDate: any,
289
- toDate: any,
290
- searchvalue: any,
291
- limit: any,
292
- offset: any,
293
- isExport: any,
294
- sortBy: any,
295
- sortOrder: any
296
- ): Observable<any> {
297
- return this.http.get(
298
- `${this.footfallDirapiUrl}/ticket-list?clientId=${client}&fromDate=${fromDate}&toDate=${toDate}&searchValue=${searchvalue}&limit=${limit}&offset=${offset}&isExport=${isExport}&sortBy=${sortBy}&sortOrder=${sortOrder}`,
299
- { responseType: "arraybuffer" }
300
- );
301
- }
302
-
303
- getTicketListExportApi(
304
- client: any,
305
- fromDate: any,
306
- toDate: any,
307
- searchvalue: any,
308
- limit: any,
309
- offset: any,
310
- isExport: any,
311
- sortBy: any,
312
- sortOrder: any,
313
- tangoType: any,
314
- permissionType?: string | null,
315
- filters?: {
316
- filterByStatus?: string[];
317
- filterByReviewer?: string | null;
318
- filterByApprover?: string | null;
319
- filterByTango?: string | null;
320
- filterByReviewedBy?: string[];
321
- fileterByApprovedBy?: string[];
322
- }
323
- ): Observable<any> {
324
- let url =
325
- `${this.footfallDirapiUrl}/ticket-list?` +
326
- `clientId=${client}` +
327
- `&fromDate=${fromDate}` +
328
- `&toDate=${toDate}` +
329
- `&searchValue=${searchvalue}` +
330
- `&limit=${limit}` +
331
- `&offset=${offset}` +
332
- `&isExport=${isExport}` +
333
- `&sortBy=${sortBy}` +
334
- `&sortOrder=${sortOrder}` +
335
- `&tangoType=${tangoType}`;
336
-
337
- if (permissionType) {
338
- url += `&permissionType=${permissionType}`;
339
- }
340
-
341
- if (filters) {
342
- if (filters.filterByStatus?.length) {
343
- url += `&filterByStatus=${encodeURIComponent(filters.filterByStatus.join(','))}`;
344
- }
345
-
346
- if (filters.filterByReviewedBy?.length) {
347
- url += `&filterByReviewedBy=${encodeURIComponent(filters.filterByReviewedBy.join(','))}`;
348
- }
349
-
350
- if (filters.fileterByApprovedBy?.length) {
351
- url += `&fileterByApprovedBy=${encodeURIComponent(filters.fileterByApprovedBy.join(','))}`;
352
- }
353
-
354
- if (filters.filterByReviewer) {
355
- url += `&filterByReviewer=${encodeURIComponent(filters.filterByReviewer)}`;
356
- }
357
-
358
- if (filters.filterByApprover) {
359
- url += `&filterByApprover=${encodeURIComponent(filters.filterByApprover)}`;
360
- }
361
-
362
- if (filters.filterByTango) {
363
- url += `&filterByTango=${encodeURIComponent(filters.filterByTango)}`;
364
- }
365
- }
366
-
367
- const options = isExport
368
- ? { responseType: 'arraybuffer' as 'json' }
369
- : {};
370
-
371
- return this.http.get(url, options);
372
- }
373
-
374
-
375
- getTicketsApi(
376
- store: any,
377
- fromDate: any,
378
- toDate: any,
379
- revopsType: any,
380
- status: any,
381
- action: any,
382
- offset: any,
383
- limit: any
384
- ): Observable<any> {
385
- let params = new HttpParams()
386
- .set("storeId", store)
387
- .set("fromDate", fromDate)
388
- .set("toDate", toDate)
389
- .set("offset", offset)
390
- .set("limit", limit);
391
- if (revopsType) {
392
- params = params.set("revopsType", revopsType);
393
- }
394
- if (status) {
395
- params = params.set("status", status);
396
- }
397
- if (action) {
398
- params = params.set("action", action);
399
- }
400
- return this.http.get(`${this.footfallDirapiUrl}/get-tickets`, { params });
401
- }
402
-
403
- getTicketsNewApi(ticketId: any): Observable<any> {
404
- let params = new HttpParams().set("ticketId", ticketId);
405
- return this.http.get(`${this.footfallDirapiUrl}/get-tickets`, { params });
406
- }
407
-
408
- getTaggedStoresApi(
409
- client: any,
410
- fromDate: any,
411
- toDate: any,
412
- searchValue: any,
413
- clusters: any,
414
- sortOrder: any
415
- ): Observable<any> {
416
- let params = new HttpParams()
417
- .set("clientId", client)
418
- .set("fromDate", fromDate)
419
- .set("toDate", toDate); // Add searchValue as an empty string if not provided
420
- // Only add 'clusters' if it's not null, undefined, or an empty array/string
421
- if (searchValue) {
422
- params = params.set("searchValue", searchValue);
423
- }
424
-
425
- if (clusters && clusters.length > 0) {
426
- params = params.set("clusters", clusters);
427
- }
428
- if (sortOrder) {
429
- params = params.set("sortOrder", sortOrder);
430
- }
431
- return this.http.get(`${this.footfallDirapiUrl}/get-tagged-stores`, {
432
- params,
433
- });
434
- }
435
-
436
- getUpdateStatusApi(data: any): Observable<any> {
437
- const url = `${this.footfallDirapiUrl}/update-status`;
438
- return this.http.put(url, data);
439
- }
440
-
441
- getUpdateTempStatusApi(data: any): Observable<any> {
442
- return this.http.post(`${this.footfallDirapiUrl}/update-temp-status`, data);
443
- }
444
-
445
- getOpenTicketListApi(data: any): Observable<any> {
446
- return this.http.post(`${this.footfallDirapiUrl}/open-ticket-list`, data);
447
- }
448
-
449
- getUpdateTicketStatusApi(data: any): Observable<any> {
450
- return this.http.post(
451
- `${this.footfallDirapiUrl}/update-ticket-status`,
452
- data
453
- );
454
- }
455
-
456
- getCreateTicketListApi(data:any): Observable<any> {
457
- return this.http.post(`${this.footfallDirapiUrl}/create-ticket`, data);
458
- }
459
- CreateinternalTicketApi(data:any): Observable<any> {
460
- return this.http.post(`${this.footfallDirapiUrl}/create-internalticket`, data);
461
- }
462
- getclusters(data: any) {
463
- return this.http.post(`${this.trafficApiUrl}/headercluster_v2`, data);
464
- }
465
-
466
- getReviewerApi(clientId: any,type:any,tangotype:any): Observable<any> {
467
- let params = new HttpParams().set("clientId", clientId)
468
- .set("type",type).set("tangotype",tangotype);
469
- return this.http.get(`${this.footfallDirapiUrl}/reviewer-list`, { params });
470
- }
471
-
472
- getTicketAssignApi(data: any): Observable<any> {
473
- return this.http.post(`${this.footfallDirapiUrl}/assign-ticket`, data);
474
- }
475
- reAssignAudit(data: any): Observable<any> {
476
- return this.http.post(`${this.vmsAuditUrl}/reAssign-audit`, data);
477
- }
478
-
479
- getMultiCloseTicketApi(data: any): Observable<any> {
480
- return this.http.post(
481
- `${this.footfallDirapiUrl}/multi-close-tickets`,
482
- data
483
- );
484
- }
485
-
486
- getTypeFunction(clientId: any): Observable<any> {
487
- let params = new HttpParams().set("clientId", clientId);
488
- return this.http.get(`${this.clientApiUrl}/get-footfall-directory-config`, { params });
489
-
490
-
491
- }
492
- private footfallData: any;
493
-
494
- setFootfallData(data: any) {
495
- this.footfallData = data;
496
- }
497
-
498
- getFootfallData() {
499
- return this.footfallData;
500
- }
501
- }
@@ -1,16 +0,0 @@
1
- import { TestBed } from '@angular/core/testing';
2
-
3
- import { TimerService } from './timer.service';
4
-
5
- describe('TimerService', () => {
6
- let service: TimerService;
7
-
8
- beforeEach(() => {
9
- TestBed.configureTestingModule({});
10
- service = TestBed.inject(TimerService);
11
- });
12
-
13
- it('should be created', () => {
14
- expect(service).toBeTruthy();
15
- });
16
- });
@@ -1,92 +0,0 @@
1
- import { Injectable, OnDestroy, OnInit } from '@angular/core';
2
- import { interval,Observable,BehaviorSubject,Subscription } from 'rxjs';
3
- import { Router,ActivatedRoute } from '@angular/router';
4
-
5
- @Injectable({
6
- providedIn: 'root'
7
- })
8
- export class TimerService {
9
-
10
- private timePassed = new BehaviorSubject<number>(0); // Timer count
11
- private subscription: Subscription | null = null; // Timer subscription
12
- private inactivityTimeout: any = null; // Timeout for inactivity
13
- private INACTIVITY_LIMIT = 5000;
14
-
15
- constructor(private route:ActivatedRoute) {
16
-
17
- }
18
-
19
- startTimer(): void {
20
- if (!this.subscription) {
21
- let currentTime = 0;
22
- let timeSpent: any;
23
- if ('timeSpent' in sessionStorage) {
24
- timeSpent = JSON.parse(sessionStorage.getItem('timeSpent') || '{}');
25
- currentTime = timeSpent || 0; // Retrieve the existing timer value
26
- }
27
-
28
- const timer$ = interval(1000); // Emits every 1 second
29
-
30
- this.subscription = timer$.subscribe(() => {
31
- currentTime += 1;
32
- this.timePassed.next(currentTime);
33
- timeSpent = currentTime;
34
- sessionStorage.setItem('timeSpent', JSON.stringify(timeSpent)); // Store the updated object
35
- });
36
- }
37
- this.resetInactivityTimeout();
38
- }
39
-
40
- stopTimer(): void {
41
- if (this.subscription) {
42
- this.subscription.unsubscribe();
43
- this.subscription = null;
44
- }
45
- }
46
-
47
- stopTimerAfterInactivity(): void {
48
- this.inactivityTimeout = setTimeout(() => {
49
- this.stopTimer(); // Stop the timer after inactivity
50
- }, this.INACTIVITY_LIMIT);
51
- }
52
-
53
- resetInactivityTimeout(): void {
54
- if (this.inactivityTimeout) {
55
- clearTimeout(this.inactivityTimeout); // Clear the previous inactivity timeout
56
- }
57
- this.stopTimerAfterInactivity(); // Set a new inactivity timeout
58
- }
59
-
60
- getTimePassed(): BehaviorSubject<number> {
61
- return this.timePassed;
62
- }
63
-
64
- clearTimer(): void {
65
- if (this.subscription) {
66
- this.subscription.unsubscribe();
67
- this.subscription = null;
68
- }
69
- // this.timePassed.next(0); // Optionally reset the timePassed
70
- // sessionStorage.removeItem('totalfiles'); // Optionally clear session storage
71
- // sessionStorage.removeItem('timeSpent')
72
- }
73
-
74
- resetTimer(): void {
75
- this.timePassed.next(0); // Reset to 0
76
- // this.resetInactivityTimeout(); // Reset inactivity timeout
77
- }
78
-
79
- formatTime(seconds: number): string {
80
- const hours = Math.floor(seconds / 3600);
81
- const minutes = Math.floor((seconds % 3600) / 60);
82
- const secs = seconds % 60;
83
-
84
- return `${this.padZero(hours)}:${this.padZero(minutes)}:${this.padZero(secs)}`;
85
- }
86
-
87
- // Helper method to pad single digit numbers with a leading zero
88
- private padZero(num: number): string {
89
- return num < 10 ? '0' + num : '' + num;
90
- }
91
-
92
- }
@@ -1,37 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { RouterModule, Routes } from '@angular/router';
3
- import { TangoManageTicketsComponent } from './components/tango-manage-tickets/tango-manage-tickets.component';
4
- import { FootfallDicviewComponent } from './components/footfall-dicview/footfall-dicview.component';
5
- import { StartAuditComponent } from './components/start-audit/start-audit.component';
6
- import { AuditMappingListComponent } from './components/audit-mapping-list/audit-mapping-list.component';
7
- import { AuditRetagComponent } from './components/audit-retag/audit-retag.component';
8
-
9
-
10
- const routes: Routes = [
11
- {
12
- path:'',
13
- component:TangoManageTicketsComponent
14
- },
15
- {
16
- path: 'list',
17
- component: FootfallDicviewComponent
18
- },
19
- {
20
- path:"audit",
21
- component:StartAuditComponent
22
- },
23
- {
24
- path:"mapping-list",
25
- component:AuditMappingListComponent
26
- },
27
- {
28
- path:'retag-mapping',
29
- component:AuditRetagComponent
30
- },
31
- ];
32
-
33
- @NgModule({
34
- imports: [RouterModule.forChild(routes)],
35
- exports: [RouterModule]
36
- })
37
- export class TangoManageTicketsRoutingModule { }