tango-app-ui-manage-tickets 3.7.0-beta.70 → 3.7.0-beta.72

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 +498 -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 +758 -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 +2511 -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 +9945 -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 +293 -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 -536
  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 -497
  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 -772
  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 -493
  150. package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.html +0 -3751
  151. package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.scss +0 -1240
  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 -2863
  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,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { AuditRetagComponent } from './audit-retag.component';
4
-
5
- describe('AuditRetagComponent', () => {
6
- let component: AuditRetagComponent;
7
- let fixture: ComponentFixture<AuditRetagComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [AuditRetagComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(AuditRetagComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,497 +0,0 @@
1
- import { Component, OnInit, HostListener, OnDestroy, ChangeDetectorRef } from '@angular/core';
2
- import * as LZString from 'lz-string';
3
- import { ToastService } from 'tango-app-ui-shared';
4
- import { AuditService } from '../../services/audit.service';
5
- import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
6
- import { ActivatedRoute, Router } from '@angular/router';
7
- import { RemoveAuditComponent } from '../remove-audit/remove-audit.component';
8
- import { AuditReportPopupComponent } from '../audit-report-popup/audit-report-popup.component';
9
- import { Subject, takeUntil, Subscription } from 'rxjs';
10
- import { TimerService } from '../../services/timer.service';
11
- import { ViewcategoryComponent } from '../viewcategory/viewcategory.component';
12
-
13
- @Component({
14
- selector: 'lib-audit-retag',
15
- templateUrl: './audit-retag.component.html',
16
- styleUrl: './audit-retag.component.scss'
17
- })
18
- export class AuditRetagComponent implements OnInit, OnDestroy {
19
-
20
- totalfile = 0;
21
- customer = 0;
22
- junk = 0;
23
- employee = 0;
24
- junkimage: any = []
25
- retagimage: any = []
26
- submitvalue: boolean = true;
27
- auditmappingdata: any = [];
28
- customercount: any = 0;
29
- junkcount: any = 0;
30
- employeecount: any = 0;
31
- employeimage: any = [];
32
- filedetails: any = {};
33
- auditLoading = false;
34
- selectedType: any;
35
- private readonly destroy$ = new Subject();
36
- timePassed: number = 0;
37
- subscription: Subscription | null = null;
38
- formattedTime: string = '00:00:00';
39
-
40
- openmodel: boolean = false;
41
- category: any = []
42
- @HostListener('window:keydown', ['$event'])
43
- handleKeyPress(event: KeyboardEvent) {
44
- if (this.openmodel) return;
45
- // if (event.key === 'g' || event.code === 'KeyG') {
46
- // var group = this.auditmappingdata.filter((data: any) => data.selected === true)
47
- // if (group.length > 0) {
48
- // if (group.length == 1) {
49
- // this.toastr.getErrorToast('Please Select multiple file then add to Group')
50
- // } else {
51
- // let dummyarray = group.shift()
52
- // var groupimages: any = []
53
- // group.forEach((data: any) => {
54
- // this.auditmappingdata.splice(this.auditmappingdata.findIndex(({ img_name }: { img_name: string }) => img_name == data.img_name), 1);
55
- // groupimages.push(data.mappedid[0])
56
- // })
57
- // dummyarray.count = dummyarray.count + groupimages.length
58
- // dummyarray.selected = false
59
-
60
- // dummyarray.mappedid = [...dummyarray.mappedid, ...groupimages]
61
- // const jsonString = JSON.stringify(this.auditmappingdata);
62
- // const compressedData = LZString.compress(jsonString);
63
- // sessionStorage.setItem('audit', compressedData)
64
- // }
65
-
66
- // // this.initial_data_loading()
67
- // } else {
68
- // this.toastr.getErrorToast('Please Select file then add to Group')
69
- // }
70
- // }
71
- const pressed = (event.key || '').toLowerCase();
72
- const matched = this.category.find((m: any) => {
73
- if (!m.key) return false;
74
- const mapKey = m.key.toLowerCase();
75
- // match by event.key (preferred) OR by event.code like 'KeyJ'
76
- return pressed === mapKey || event.code === `Key${mapKey.toUpperCase()}`;
77
- });
78
- console.log(matched)
79
- if (!matched) return
80
- if (matched) {
81
- var newData = this.auditmappingdata.filter((data: any) => data.selected === true)
82
- if (newData.length > 0) {
83
- var oldData = JSON.parse(sessionStorage.getItem(matched?.type) || '{}')
84
- if (Number(oldData.length) > 0) {
85
- newData = [...oldData, ...newData]
86
- } else {
87
- newData = newData
88
- }
89
- this.category.map((data: any) => {
90
- if (data.type === matched?.type) {
91
- data.count = newData.length
92
- }
93
- })
94
- sessionStorage.setItem(matched?.type, JSON.stringify(newData))
95
- this.auditmappingdata = this.auditmappingdata.filter((data: any) => data.selected === false)
96
- const jsonString = JSON.stringify(this.auditmappingdata);
97
- const compressedData = LZString.compress(jsonString);
98
- sessionStorage.setItem('audit', compressedData)
99
- this.toastr.getSuccessToast(`${matched?.type} Added Succesfully!`);
100
- } else {
101
- this.toastr.getErrorToast(`Please Select file then add to ${matched?.type} `)
102
- }
103
-
104
- }
105
-
106
- }
107
- constructor(public modalService: NgbModal, private router: Router, private $api: AuditService,
108
- private toastr: ToastService, private route: ActivatedRoute, private timerService: TimerService, private cd: ChangeDetectorRef) {
109
- this.selectedType = this.route.snapshot.paramMap.get('type')
110
- }
111
-
112
- ngOnInit(): void {
113
- console.log("*************")
114
- this.getAuditConfig()
115
- if (this.retagimage.length == 0) {
116
- this.submitvalue = false;
117
- }
118
- this.auditLoading = false
119
- this.setTimer();
120
- }
121
- getAuditConfig() {
122
-
123
- let filedata = JSON.parse(sessionStorage.getItem('totalfiles') || '{}')
124
- this.$api.getAuditconfig(filedata?.filedetails?.clientId).pipe(takeUntil(this.destroy$)).subscribe({
125
- next: (res: any) => {
126
- if (res && res?.code == 200) {
127
- console.log(res.data.footfallDirectoryConfigs.taggingLimitation)
128
- this.category = res.data.footfallDirectoryConfigs.taggingLimitation
129
- this.initial_data_loading()
130
-
131
- }
132
- }
133
- })
134
- }
135
- setTimer() {
136
- this.subscription = this.timerService.getTimePassed().subscribe(time => {
137
- this.timePassed = time;
138
- this.formattedTime = this.timerService.formatTime(time);
139
- this.cd.detectChanges();
140
- });
141
- this.timerService.startTimer();
142
- document.addEventListener('mousemove', this.handleGlobalMouseEvent);
143
- document.addEventListener('click', this.handleGlobalMouseEvent);
144
- document.addEventListener('mouseenter', this.handleGlobalMouseEvent);
145
- document.addEventListener('scroll', this.handleGlobalMouseEvent);
146
- }
147
-
148
- handleGlobalMouseEvent = (): void => {
149
- this.timerService.startTimer();
150
- }
151
-
152
- ngOnDestroy(): void {
153
- this.destroy$.next(true);
154
- this.destroy$.complete();
155
- document.removeEventListener('mousemove', this.handleGlobalMouseEvent);
156
- document.removeEventListener('click', this.handleGlobalMouseEvent);
157
- document.removeEventListener('mouseenter', this.handleGlobalMouseEvent);
158
- document.removeEventListener('scroll', this.handleGlobalMouseEvent);
159
- this.timerService.clearTimer()
160
-
161
- }
162
-
163
- initial_data_loading() {
164
- console.log("------------")
165
- if ('audit' in sessionStorage) {
166
- let stringifydata = sessionStorage.getItem('audit') || '{}'
167
- const decompressedData = LZString.decompress(stringifydata);
168
- var auditdata = JSON.parse(decompressedData || '{}')
169
- console.log("🚀 ~ AuditRetagComponent ~ initial_data_loading ~ auditdata:", auditdata)
170
- if (auditdata.length > 0) {
171
- this.auditmappingdata = auditdata;
172
- this.customercount = this.auditmappingdata.length
173
- } else {
174
- this.auditmappingdata = []
175
- this.customercount = 0
176
- }
177
- }
178
-
179
- this.category.map((data: any) => {
180
- var count = JSON.parse(sessionStorage.getItem(data.type) || '{}')
181
- console.log("🚀 ~ AuditRetagComponent ~ initial_data_loading ~ count:", count)
182
- data.count = count?.length
183
- })
184
- if ('retag' in sessionStorage) {
185
- var retagdata = JSON.parse(sessionStorage.getItem('retag') || '{}')
186
- if (retagdata.length > 0) {
187
- this.retagimage = retagdata;
188
- this.submitvalue = true;
189
- } else {
190
- this.retagimage = [];
191
- }
192
-
193
- }
194
-
195
- if ('totalfiles' in sessionStorage) {
196
- var files = JSON.parse(sessionStorage.getItem('totalfiles') || '{}')
197
- this.totalfile = files?.totalfiles
198
- this.filedetails = files?.filedetails
199
-
200
- }
201
- }
202
- getmappingdata() {
203
- this.auditLoading = false
204
- var totalfile: any = JSON.parse(sessionStorage.getItem('totalfiles') || '{}');
205
- this.filedetails = totalfile?.filedetails
206
-
207
- var payload: any = {
208
- storeId: totalfile?.filedetails?.storeId,
209
- fileDate: totalfile?.filedetails?.Date,
210
- auditId: totalfile?.auditId,
211
- count: totalfile?.totalfiles
212
- }
213
- this.$api.getAuditmappinglist(payload).pipe(takeUntil(this.destroy$)).subscribe({
214
- next: (res: any) => {
215
- if (res && res?.code == 200) {
216
- this.auditLoading = false
217
- sessionStorage.removeItem('retag')
218
- this.retagimage = []
219
- this.category.map((data: any) => {
220
- let filterData = res?.data?.result?.draftedData?.filter((x: any) => x.type === data.type)
221
- data.value = filterData[0]?.value && filterData[0]?.value.length > 0 ? filterData[0]?.value : []
222
- data.count = data?.value?.length
223
- sessionStorage.setItem(data?.type, JSON.stringify(data?.value && data?.value.length > 0 ? data?.value : []))
224
-
225
- })
226
- let customerData = res?.data?.result?.draftedData?.filter((x: any) => x.type === 'customer')
227
- console.log("🚀 ~ AuditRetagComponent ~ getmappingdata ~ customerData:", customerData)
228
-
229
- this.auditmappingdata = customerData[0]?.value
230
- const jsonString = JSON.stringify(customerData[0]?.value);
231
- const compressedData = LZString.compress(jsonString);
232
- sessionStorage.setItem('audit', compressedData)
233
- this.initial_data_loading()
234
- }
235
- },
236
- error: (err: any) => {
237
-
238
- },
239
- })
240
- }
241
-
242
- reviewdata() {
243
- this.submitvalue = false;
244
- var totalfile: any = JSON.parse(sessionStorage.getItem('totalfiles') || '{}');
245
- if ('audit' in sessionStorage) {
246
- let stringifydata = sessionStorage.getItem('audit') || '{}'
247
- const decompressedData = LZString.decompress(stringifydata);
248
- var auditdata = JSON.parse(decompressedData || '{}')
249
- if (auditdata.length > 0) {
250
- this.auditmappingdata = auditdata;
251
- this.customercount = this.auditmappingdata.length;
252
- }
253
- }
254
- if ('retag' in sessionStorage) {
255
- var retagdata = JSON.parse(sessionStorage.getItem('retag') || '{}')
256
- this.retagimage = retagdata;
257
- this.auditmappingdata = [...this.auditmappingdata, ...this.retagimage]
258
- const jsonString = JSON.stringify(this.auditmappingdata);
259
- const compressedData = LZString.compress(jsonString);
260
- sessionStorage.setItem('audit', compressedData)
261
- sessionStorage.removeItem('retag')
262
- this.retagimage = [];
263
- }
264
- let stringifydata = sessionStorage.getItem('audit') || '{}'
265
- const decompressedData = LZString.decompress(stringifydata);
266
- var customer = JSON.parse(decompressedData || '{}')
267
- let storedData = [
268
- {
269
- type: "customer",
270
- value: customer ? customer : [],
271
- }
272
- ]
273
-
274
- this.category.map((data: any) => {
275
- let sessionvalue = JSON.parse(sessionStorage.getItem(data.type) || '{}');
276
- storedData.push({
277
- type: data.type,
278
- value: sessionvalue && sessionvalue.length > 0 ? sessionvalue : []
279
- })
280
- })
281
- console.log("🚀 ~ StartAuditComponent ~ Reviewdata ~ storedData:", storedData)
282
- var inserobj: any = {
283
-
284
- storeId: totalfile?.filedetails?.storeId,
285
- auditId: totalfile?.auditId ? totalfile?.auditId : totalfile?.filedetails.auditId,
286
- fileDate: totalfile?.filedetails?.Date,
287
- totalCount: totalfile?.totalfiles ? totalfile.totalfiles : 0,
288
- retagCount: 0,
289
- timeSpent: this.timePassed,
290
- retagImage: [],
291
- draftedData: storedData
292
- }
293
- this.$api.saveDraft(inserobj).pipe(takeUntil(this.destroy$)).subscribe({
294
- next: (res: any) => {
295
- if (res && res.code == 200) {
296
- this.getmappingdata();
297
- this.router.navigate(["/manage/tickets/mapping-list",])
298
- }
299
- },
300
- error: (err: any) => {
301
- this.toastr.getErrorToast(err?.error)
302
- },
303
- })
304
- }
305
-
306
- retagallowDrop(event: any) {
307
- event.preventDefault();
308
- }
309
- dragStart(event: any) {
310
- event.dataTransfer.setData("text/plain", event.target.id);
311
- }
312
-
313
- dropretag(event: any) {
314
- event.preventDefault();
315
- const dropretagimage = event.dataTransfer.getData('text/plain');
316
- event.target.appendChild(document.getElementById(dropretagimage));
317
- const dropzone: any = dropretagimage;
318
- this.auditmappingdata.map((data: any) => {
319
-
320
- if (data.img_id == dropzone.id) {
321
- if (data.mappedid.length > 0) {
322
- var findone = this.auditmappingdata.filter((data: any) => data.img_name == dropretagimage)
323
- if (findone.length > 0) {
324
- data.count = data.count + findone[0].count
325
- data.mappedid = [...data.mappedid, ...findone[0].mappedid]
326
- }
327
- if ('duplicate' in sessionStorage) {
328
- let filedata = JSON.parse(sessionStorage.getItem('duplicate') || '{}')
329
- filedata = [...filedata, ...findone]
330
- sessionStorage.setItem('duplicate', JSON.stringify(filedata))
331
- } else {
332
- sessionStorage.setItem('duplicate', JSON.stringify(findone))
333
- let filedata = JSON.parse(sessionStorage.getItem('duplicate') || '{}')
334
- console.log("🚀 ~ StartAuditComponent ~ dropImage ~ filedata:", filedata)
335
-
336
- }
337
- this.category.map((data: any) => {
338
- var count = JSON.parse(sessionStorage.getItem(data.type) || '{}')
339
- data.count = count?.length
340
- })
341
- console.log("🚀 ~ AuditRetagComponent ~ dropretag ~ this.category:", this.category)
342
- } else {
343
- data.count = data.count + 1,
344
- data.mappedid.push(dropretagimage)
345
- }
346
- }
347
- })
348
- }
349
-
350
- selectretagimage(res: any) {
351
- this.retagimage.map((data: any) => {
352
- if (data.img_id == res) {
353
- if (data.mappedid.length == 1) {
354
- data.selected = !data.selected
355
- }
356
- }
357
- })
358
- }
359
-
360
- selectgroupimage(res: any) {
361
- this.auditmappingdata.map((data: any) => {
362
- if (data.img_id == res) {
363
- if (data.mappedid.length == 1) {
364
- data.selected = !data.selected
365
- }
366
- }
367
- })
368
- }
369
-
370
- removeaudit(data: any) {
371
- const modalRef = this.modalService.open(RemoveAuditComponent, {
372
- size: 'lg',
373
- centered: true,
374
- backdrop: 'static',
375
- keyboard: false
376
- })
377
- modalRef.componentInstance.data = data;
378
- modalRef.closed.subscribe((res: any) => {
379
- if (res && res?.reload) {
380
- this.initial_data_loading()
381
- }
382
- })
383
-
384
- }
385
- submitaudit() {
386
- const modalRef = this.modalService.open(AuditReportPopupComponent, {
387
- size: 'lg',
388
- centered: true,
389
- backdrop: 'static',
390
- keyboard: false
391
- })
392
- modalRef.componentInstance.selectedType = this.selectedType;
393
- modalRef.closed;
394
- }
395
-
396
-
397
- viewcategory(data: any) {
398
- const modalRef = this.modalService.open(ViewcategoryComponent, {
399
- size: 'lg',
400
- centered: true,
401
- backdrop: 'static',
402
- keyboard: false
403
- })
404
- modalRef.componentInstance.data = data
405
- modalRef.componentInstance.imageList = data,
406
- modalRef.closed.subscribe((res: any) => {
407
- if (res && res?.reload) {
408
- this.initial_data_loading()
409
- }
410
- })
411
- }
412
-
413
- dropImage(event: any) {
414
- const htmltag = event.dataTransfer.getData('text/html');
415
- var Name = getTagNameFromHTML(htmltag);
416
- const dropZone = event.target;
417
- // console.log(Name)
418
- // debugger
419
- if (Name == 'customer' || Name == 'retag') {
420
- event.preventDefault();
421
- const draggedImageId = event.dataTransfer.getData('text/plain');
422
- const draggedImage = document.getElementById(draggedImageId);
423
- event.target.appendChild(draggedImage);
424
- this.auditmappingdata.map((data: any, index: number) => {
425
-
426
- if (data.img_id === dropZone.id) {
427
- let findone = [];
428
- const retagdata = JSON.parse(sessionStorage.getItem('retag') || '[]');
429
- this.retagimage = retagdata;
430
- findone = this.retagimage.filter((imgData: any) => imgData.img_id === draggedImageId);
431
- if (findone.length === 0) {
432
- findone = this.auditmappingdata.filter((imgData: any) => imgData.img_id === draggedImageId);
433
- }
434
-
435
- this.retagimage = this.retagimage.filter((imgData: any) => imgData.img_id !== draggedImageId);
436
- sessionStorage.setItem('retag', JSON.stringify(this.retagimage));
437
-
438
- console.log("🚀 ~ AuditRetagComponent ~ dropImage ~ findone:", findone)
439
- if (findone.length > 0) {
440
-
441
- data.mappedid = [...data.mappedid, ...findone[0].mappedid];
442
- data.count = data.mappedid.length;
443
- console.log("🚀 ~ AuditRetagComponent ~ dropImage ~ data.mappedid:", data.mappedid)
444
- if ('duplicate' in sessionStorage) {
445
- let filedata = JSON.parse(sessionStorage.getItem('duplicate') || '{}')
446
- filedata = [...filedata, ...findone]
447
- sessionStorage.setItem('duplicate', JSON.stringify(filedata))
448
- } else {
449
- sessionStorage.setItem('duplicate', JSON.stringify(findone))
450
- let filedata = JSON.parse(sessionStorage.getItem('duplicate') || '{}')
451
- console.log("🚀 ~ StartAuditComponent ~ dropImage ~ filedata:", filedata)
452
-
453
- }
454
- } else {
455
- data.count += 1;
456
- data.mappedid.push(draggedImageId);
457
- }
458
- }
459
- })
460
- if (Name == 'customer') {
461
- console.log(this.auditmappingdata.findIndex(({ img_id }: { img_id: string }) => img_id == draggedImageId))
462
- this.auditmappingdata.splice(this.auditmappingdata.findIndex(({ img_id }: { img_id: string }) => img_id == draggedImageId), 1);
463
- this.auditmappingdata.map((data: any) => data.selected = false)
464
- }
465
-
466
-
467
- console.log("🚀 ~ AuditRetagComponent ~ dropImage ~ this.auditmappingdata:", this.auditmappingdata)
468
- this.customercount = this.auditmappingdata?.length;
469
- const jsonString = JSON.stringify(this.auditmappingdata);
470
- const compressedData = LZString.compress(jsonString);
471
- sessionStorage.setItem('audit', compressedData)
472
- var retagdata = JSON.parse(sessionStorage.getItem('retag') || '{}')
473
- this.retagimage = retagdata;
474
- if (this.retagimage.length == 0) {
475
- this.submitvalue = false;
476
- }
477
- this.category.map((data: any) => {
478
- var count = JSON.parse(sessionStorage.getItem(data.type) || '{}')
479
- data.count = count?.length
480
- })
481
- }
482
-
483
-
484
-
485
- function getTagNameFromHTML(html: any) {
486
- var tempElement = document.createElement('div');
487
- tempElement.innerHTML = html;
488
- var firstChild: any = tempElement.firstChild;
489
- if (firstChild.hasAttribute('name')) {
490
- var namePropertyValue = firstChild.getAttribute('name');
491
- return namePropertyValue;
492
- }
493
- return null;
494
- }
495
- }
496
-
497
- }
@@ -1,24 +0,0 @@
1
- <div class="card py-0">
2
- <div class="card-body py-0 d-flex flex-start flex-column p-9 ">
3
- <div class="my-5">
4
- <div class="symbol symbol-75px symbol-circle">
5
- <svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">
6
- <rect x="4" y="4" width="48" height="48" rx="24" fill="#DAF1FF"/>
7
- <rect x="4" y="4" width="48" height="48" rx="24" stroke="#EAF8FF" stroke-width="8"/>
8
- <path d="M37 31C37 31.5304 36.7893 32.0391 36.4142 32.4142C36.0391 32.7893 35.5304 33 35 33H23L19 37V21C19 20.4696 19.2107 19.9609 19.5858 19.5858C19.9609 19.2107 20.4696 19 21 19H35C35.5304 19 36.0391 19.2107 36.4142 19.5858C36.7893 19.9609 37 20.4696 37 21V31Z" stroke="#00A3FF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
9
- </svg>
10
- </div>
11
- </div>
12
- <a class="fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer">Comment</a>
13
- <p class="text-sub">Add comment for the ticket</p>
14
- <div class="w-100">
15
- <label class="label my-2">Comments</label>
16
- <textarea class="form-control" [(ngModel)]="comment" rows="4" type="text"></textarea>
17
-
18
- <div class="d-flex my-7" role="group">
19
- <button class="btn btn-outline w-100 me-3" (click)="cancel()">Cancel</button>
20
- <button class="btn btn-primary w-100 ms-3" (click)="commentSubmit()">Submit</button>
21
- </div>
22
- </div>
23
- </div>
24
- </div>
@@ -1,20 +0,0 @@
1
- ::ng-deep.modal-content {
2
- border-radius: 12px !important;
3
- overflow: unset !important;
4
- }
5
-
6
- ::ng-deep ngb-modal-window .component-host-scrollable {
7
- overflow: unset !important;
8
- }
9
- .text-sub{
10
- color: var(--Gray-500, #667085) !important;
11
- font-size: 14px;
12
- font-weight: 400;
13
- line-height: 20px;
14
- }
15
- .label{
16
- color: var(--Gray-700, #344054) !important;
17
- font-size: 14px;
18
- font-weight: 500;
19
- line-height: 20px;
20
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { CommentModelComponent } from './comment-model.component';
4
-
5
- describe('CommentModelComponent', () => {
6
- let component: CommentModelComponent;
7
- let fixture: ComponentFixture<CommentModelComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [CommentModelComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(CommentModelComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,53 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
3
- import { TicketService } from '../../services/ticket.service';
4
- import { ToastService } from 'tango-app-ui-shared';
5
- import { Subject, takeUntil } from 'rxjs';
6
- @Component({
7
- selector: 'lib-comment-model',
8
- templateUrl: './comment-model.component.html',
9
- styleUrl: './comment-model.component.scss'
10
- })
11
- export class CommentModelComponent {
12
- @Input() ticketId: any;
13
- comment:any= ""
14
- private readonly destroy$ = new Subject();
15
- constructor(private activeModal:NgbActiveModal, private service: TicketService,
16
- private toast: ToastService){
17
-
18
- }
19
-
20
- cancel(){
21
- this.activeModal.close();
22
- }
23
- commentSubmit(){
24
- if(this.comment == ''){
25
- return this.toast.getErrorToast("Please Enter Any comment")
26
- }
27
- let obj = {
28
- "ticketId": this.ticketId,
29
- "primary": "",
30
- "secondary": [],
31
- "comment": this.comment,
32
-
33
- }
34
- this.service
35
- .updateTicketIssue(obj)
36
- .pipe(takeUntil(this.destroy$))
37
- .subscribe({
38
- next: (res: any) => {
39
- if (res && res.code === 200) {
40
- this.toast.getSuccessToast(res.message);
41
- this.activeModal.close("submit");
42
- }
43
- },
44
- error: (err: any) => {
45
- this.toast.getErrorToast(err.error.error ? err.error.error : err.error);
46
- },
47
- complete: () => {},
48
- });
49
- }
50
-
51
- }
52
-
53
-