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

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 +486 -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 +472 -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 +761 -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 +2748 -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 +10165 -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,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,489 +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
- this.getAuditConfig()
114
- if (this.retagimage.length == 0) {
115
- this.submitvalue = false;
116
- }
117
- this.auditLoading = false
118
- this.setTimer();
119
- }
120
- getAuditConfig() {
121
-
122
- let filedata = JSON.parse(sessionStorage.getItem('totalfiles') || '{}')
123
- this.$api.getAuditconfig(filedata?.filedetails?.clientId).pipe(takeUntil(this.destroy$)).subscribe({
124
- next: (res: any) => {
125
- if (res && res?.code == 200) {
126
- console.log(res.data.footfallDirectoryConfigs.taggingLimitation)
127
- this.category = res.data.footfallDirectoryConfigs.taggingLimitation
128
- this.initial_data_loading()
129
-
130
- }
131
- }
132
- })
133
- }
134
- setTimer() {
135
- this.subscription = this.timerService.getTimePassed().subscribe(time => {
136
- this.timePassed = time;
137
- this.formattedTime = this.timerService.formatTime(time);
138
- this.cd.detectChanges();
139
- });
140
- this.timerService.startTimer();
141
- document.addEventListener('mousemove', this.handleGlobalMouseEvent);
142
- document.addEventListener('click', this.handleGlobalMouseEvent);
143
- document.addEventListener('mouseenter', this.handleGlobalMouseEvent);
144
- document.addEventListener('scroll', this.handleGlobalMouseEvent);
145
- }
146
-
147
- handleGlobalMouseEvent = (): void => {
148
- this.timerService.startTimer();
149
- }
150
-
151
- ngOnDestroy(): void {
152
- this.destroy$.next(true);
153
- this.destroy$.complete();
154
- document.removeEventListener('mousemove', this.handleGlobalMouseEvent);
155
- document.removeEventListener('click', this.handleGlobalMouseEvent);
156
- document.removeEventListener('mouseenter', this.handleGlobalMouseEvent);
157
- document.removeEventListener('scroll', this.handleGlobalMouseEvent);
158
- this.timerService.clearTimer()
159
-
160
- }
161
-
162
- initial_data_loading() {
163
- if ('audit' in sessionStorage) {
164
- let stringifydata = sessionStorage.getItem('audit') || '{}'
165
- const decompressedData = LZString.decompress(stringifydata);
166
- var auditdata = JSON.parse(decompressedData || '{}')
167
- if (auditdata.length > 0) {
168
- this.auditmappingdata = auditdata;
169
- this.customercount = this.auditmappingdata.length
170
- } else {
171
- this.auditmappingdata = []
172
- this.customercount = 0
173
- }
174
- }
175
-
176
- this.category.map((data: any) => {
177
- var count = JSON.parse(sessionStorage.getItem(data.type) || '{}')
178
- data.count = count?.length
179
- })
180
- if ('retag' in sessionStorage) {
181
- var retagdata = JSON.parse(sessionStorage.getItem('retag') || '{}')
182
- if (retagdata.length > 0) {
183
- this.retagimage = retagdata;
184
- this.submitvalue = true;
185
- } else {
186
- this.retagimage = [];
187
- }
188
-
189
- }
190
-
191
- if ('totalfiles' in sessionStorage) {
192
- var files = JSON.parse(sessionStorage.getItem('totalfiles') || '{}')
193
- this.totalfile = files?.totalfiles
194
- this.filedetails = files?.filedetails
195
-
196
- }
197
- }
198
- getmappingdata() {
199
- this.auditLoading = false
200
- var totalfile: any = JSON.parse(sessionStorage.getItem('totalfiles') || '{}');
201
- this.filedetails = totalfile?.filedetails
202
-
203
- var payload: any = {
204
- storeId: totalfile?.filedetails?.storeId,
205
- fileDate: totalfile?.filedetails?.Date,
206
- auditId: totalfile?.auditId,
207
- count: totalfile?.totalfiles
208
- }
209
- this.$api.getAuditmappinglist(payload).pipe(takeUntil(this.destroy$)).subscribe({
210
- next: (res: any) => {
211
- if (res && res?.code == 200) {
212
- this.auditLoading = false
213
- sessionStorage.removeItem('retag')
214
- this.retagimage = []
215
- this.category.map((data: any) => {
216
- let filterData = res?.data?.result?.draftedData?.filter((x: any) => x.type === data.type)
217
- data.value = filterData[0]?.value && filterData[0]?.value.length > 0 ? filterData[0]?.value : []
218
- data.count = data?.value?.length
219
- sessionStorage.setItem(data?.type, JSON.stringify(data?.value && data?.value.length > 0 ? data?.value : []))
220
-
221
- })
222
- let customerData = res?.data?.result?.draftedData?.filter((x: any) => x.type === 'customer')
223
-
224
- this.auditmappingdata = customerData[0]?.value
225
- const jsonString = JSON.stringify(customerData[0]?.value);
226
- const compressedData = LZString.compress(jsonString);
227
- sessionStorage.setItem('audit', compressedData)
228
- this.initial_data_loading()
229
- }
230
- },
231
- error: (err: any) => {
232
-
233
- },
234
- })
235
- }
236
-
237
- reviewdata() {
238
- this.submitvalue = false;
239
- var totalfile: any = JSON.parse(sessionStorage.getItem('totalfiles') || '{}');
240
- if ('audit' in sessionStorage) {
241
- let stringifydata = sessionStorage.getItem('audit') || '{}'
242
- const decompressedData = LZString.decompress(stringifydata);
243
- var auditdata = JSON.parse(decompressedData || '{}')
244
- if (auditdata.length > 0) {
245
- this.auditmappingdata = auditdata;
246
- this.customercount = this.auditmappingdata.length;
247
- }
248
- }
249
- if ('retag' in sessionStorage) {
250
- var retagdata = JSON.parse(sessionStorage.getItem('retag') || '{}')
251
- this.retagimage = retagdata;
252
- this.auditmappingdata = [...this.auditmappingdata, ...this.retagimage]
253
- const jsonString = JSON.stringify(this.auditmappingdata);
254
- const compressedData = LZString.compress(jsonString);
255
- sessionStorage.setItem('audit', compressedData)
256
- sessionStorage.removeItem('retag')
257
- this.retagimage = [];
258
- }
259
- let stringifydata = sessionStorage.getItem('audit') || '{}'
260
- const decompressedData = LZString.decompress(stringifydata);
261
- var customer = JSON.parse(decompressedData || '{}')
262
- let storedData = [
263
- {
264
- type: "customer",
265
- value: customer ? customer : [],
266
- }
267
- ]
268
-
269
- this.category.map((data: any) => {
270
- let sessionvalue = JSON.parse(sessionStorage.getItem(data.type) || '{}');
271
- storedData.push({
272
- type: data.type,
273
- value: sessionvalue && sessionvalue.length > 0 ? sessionvalue : []
274
- })
275
- })
276
- console.log("🚀 ~ StartAuditComponent ~ Reviewdata ~ storedData:", storedData)
277
- var inserobj: any = {
278
-
279
- storeId: totalfile?.filedetails?.storeId,
280
- auditId: totalfile?.auditId ? totalfile?.auditId : totalfile?.filedetails.auditId,
281
- fileDate: totalfile?.filedetails?.Date,
282
- totalCount: totalfile?.totalfiles ? totalfile.totalfiles : 0,
283
- retagCount: 0,
284
- timeSpent: this.timePassed,
285
- retagImage: [],
286
- draftedData: storedData
287
- }
288
- this.$api.saveDraft(inserobj).pipe(takeUntil(this.destroy$)).subscribe({
289
- next: (res: any) => {
290
- if (res && res.code == 200) {
291
- this.getmappingdata();
292
- this.router.navigate(["/manage/tickets/mapping-list",])
293
- }
294
- },
295
- error: (err: any) => {
296
- this.toastr.getErrorToast(err?.error)
297
- },
298
- })
299
- }
300
-
301
- retagallowDrop(event: any) {
302
- event.preventDefault();
303
- }
304
- dragStart(event: any) {
305
- event.dataTransfer.setData("text/plain", event.target.id);
306
- }
307
-
308
- dropretag(event: any) {
309
- event.preventDefault();
310
- const dropretagimage = event.dataTransfer.getData('text/plain');
311
- event.target.appendChild(document.getElementById(dropretagimage));
312
- const dropzone: any = dropretagimage;
313
- this.auditmappingdata.map((data: any) => {
314
-
315
- if (data.img_id == dropzone.id) {
316
- if (data.mappedid.length > 0) {
317
- var findone = this.auditmappingdata.filter((data: any) => data.img_name == dropretagimage)
318
- if (findone.length > 0) {
319
- data.count = data.count + findone[0].count
320
- data.mappedid = [...data.mappedid, ...findone[0].mappedid]
321
- }
322
- if ('duplicate' in sessionStorage) {
323
- let filedata = JSON.parse(sessionStorage.getItem('duplicate') || '{}')
324
- filedata = [...filedata, ...findone]
325
- sessionStorage.setItem('duplicate', JSON.stringify(filedata))
326
- } else {
327
- sessionStorage.setItem('duplicate', JSON.stringify(findone))
328
- let filedata = JSON.parse(sessionStorage.getItem('duplicate') || '{}')
329
- console.log("🚀 ~ StartAuditComponent ~ dropImage ~ filedata:", filedata)
330
-
331
- }
332
- this.category.map((data: any) => {
333
- var count = JSON.parse(sessionStorage.getItem(data.type) || '{}')
334
- data.count = count?.length
335
- })
336
- console.log("🚀 ~ AuditRetagComponent ~ dropretag ~ this.category:", this.category)
337
- } else {
338
- data.count = data.count + 1,
339
- data.mappedid.push(dropretagimage)
340
- }
341
- }
342
- })
343
- }
344
-
345
- selectretagimage(res: any) {
346
- this.retagimage.map((data: any) => {
347
- if (data.img_id == res) {
348
- if (data.mappedid.length == 1) {
349
- data.selected = !data.selected
350
- }
351
- }
352
- })
353
- }
354
-
355
- selectgroupimage(res: any) {
356
- this.auditmappingdata.map((data: any) => {
357
- if (data.img_id == res) {
358
- if (data.mappedid.length == 1) {
359
- data.selected = !data.selected
360
- }
361
- }
362
- })
363
- }
364
-
365
- removeaudit(data: any) {
366
- const modalRef = this.modalService.open(RemoveAuditComponent, {
367
- size: 'lg',
368
- centered: true,
369
- backdrop: 'static',
370
- keyboard: false
371
- })
372
- modalRef.componentInstance.data = data;
373
- modalRef.closed.subscribe((res: any) => {
374
- if (res && res?.reload) {
375
- this.initial_data_loading()
376
- }
377
- })
378
-
379
- }
380
- submitaudit() {
381
- const modalRef = this.modalService.open(AuditReportPopupComponent, {
382
- size: 'lg',
383
- centered: true,
384
- backdrop: 'static',
385
- keyboard: false
386
- })
387
- modalRef.componentInstance.selectedType = this.selectedType;
388
- modalRef.closed;
389
- }
390
-
391
-
392
- viewcategory(data: any) {
393
- const modalRef = this.modalService.open(ViewcategoryComponent, {
394
- size: 'lg',
395
- centered: true,
396
- backdrop: 'static',
397
- keyboard: false
398
- })
399
- modalRef.componentInstance.data = data
400
- modalRef.componentInstance.imageList = data,
401
- modalRef.closed.subscribe((res: any) => {
402
- if (res && res?.reload) {
403
- this.initial_data_loading()
404
- }
405
- })
406
- }
407
-
408
- dropImage(event: any) {
409
- const htmltag = event.dataTransfer.getData('text/html');
410
- var Name = getTagNameFromHTML(htmltag);
411
- const dropZone = event.target;
412
- console.log(Name)
413
- debugger
414
- if (Name == 'customer' || Name == 'retag') {
415
- event.preventDefault();
416
- const draggedImageId = event.dataTransfer.getData('text/plain');
417
- const draggedImage = document.getElementById(draggedImageId);
418
- event.target.appendChild(draggedImage);
419
- this.auditmappingdata.map((data: any, index: number) => {
420
-
421
- if (data.img_id === dropZone.id) {
422
- let findone = [];
423
- const retagdata = JSON.parse(sessionStorage.getItem('retag') || '[]');
424
- this.retagimage = retagdata;
425
- findone = this.retagimage.filter((imgData: any) => imgData.img_id === draggedImageId);
426
- if (findone.length === 0) {
427
- findone = this.auditmappingdata.filter((imgData: any) => imgData.img_id === draggedImageId);
428
- }
429
-
430
- this.retagimage = this.retagimage.filter((imgData: any) => imgData.img_id !== draggedImageId);
431
- sessionStorage.setItem('retag', JSON.stringify(this.retagimage));
432
-
433
- console.log("🚀 ~ AuditRetagComponent ~ dropImage ~ findone:", findone)
434
- if (findone.length > 0) {
435
- data.count += findone[0].count;
436
-
437
- data.mappedid = [...data.mappedid, ...findone[0]];
438
- if ('duplicate' in sessionStorage) {
439
- let filedata = JSON.parse(sessionStorage.getItem('duplicate') || '{}')
440
- filedata = [...filedata, ...findone]
441
- sessionStorage.setItem('duplicate', JSON.stringify(filedata))
442
- } else {
443
- sessionStorage.setItem('duplicate', JSON.stringify(findone))
444
- let filedata = JSON.parse(sessionStorage.getItem('duplicate') || '{}')
445
- console.log("🚀 ~ StartAuditComponent ~ dropImage ~ filedata:", filedata)
446
-
447
- }
448
- } else {
449
- data.count += 1;
450
- data.mappedid.push(draggedImageId);
451
- }
452
- }
453
- })
454
- if (Name == 'customer') {
455
- this.auditmappingdata.splice(this.auditmappingdata.findIndex(({ img_id }: { img_id: string }) => img_id == draggedImageId), 1);
456
- this.auditmappingdata.map((data: any) => data.selected = false)
457
- }
458
-
459
-
460
- this.customercount = this.auditmappingdata?.length;
461
- const jsonString = JSON.stringify(this.auditmappingdata);
462
- const compressedData = LZString.compress(jsonString);
463
- sessionStorage.setItem('audit', compressedData)
464
- var retagdata = JSON.parse(sessionStorage.getItem('retag') || '{}')
465
- this.retagimage = retagdata;
466
- if (this.retagimage.length == 0) {
467
- this.submitvalue = false;
468
- }
469
- this.category.map((data: any) => {
470
- var count = JSON.parse(sessionStorage.getItem(data.type) || '{}')
471
- data.count = count?.length
472
- })
473
- }
474
-
475
-
476
-
477
- function getTagNameFromHTML(html: any) {
478
- var tempElement = document.createElement('div');
479
- tempElement.innerHTML = html;
480
- var firstChild: any = tempElement.firstChild;
481
- if (firstChild.hasAttribute('name')) {
482
- var namePropertyValue = firstChild.getAttribute('name');
483
- return namePropertyValue;
484
- }
485
- return null;
486
- }
487
- }
488
-
489
- }
@@ -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
-
@@ -1,54 +0,0 @@
1
- <div class="card">
2
- <div class="card-header">
3
- <div class="card-title d-grid">
4
- <div *ngIf="data?.type" class="card-label">{{data?.type | titlecase}} Count - {{data?.storeId}}</div>
5
- <div class="text-sub">{{data?.fileDate | customDateFormat}}</div>
6
- </div>
7
- <div class="card-toolbar">
8
- <button *ngIf="!noData" type="button" (click)="exportTable()"
9
- class="btn btn-default mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
10
- <path d="M17.5 12.5V15.8333C17.5 16.2754 17.3244 16.6993 17.0118 17.0118C16.6993 17.3244 16.2754 17.5 15.8333 17.5H4.16667C3.72464 17.5 3.30072 17.3244 2.98816 17.0118C2.67559 16.6993 2.5 16.2754 2.5 15.8333V12.5M14.1667 6.66667L10 2.5M10 2.5L5.83333 6.66667M10 2.5V12.5" stroke="#344054" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"/>
11
- </svg>
12
- <span class="ms-2">Export</span> </button>
13
- </div>
14
- </div>
15
- <div class="card-body">
16
- <div class="row mx-3">
17
- <div class="col-md-12 item scroll-y">
18
- <div class="item" *ngFor="let images of auditImages;let i=index" style="padding: 10px;">
19
- <img class="mx-3 my-3 img" [src]="images?.imgPath">
20
- <div class="text-center m-0 fs-7 fw-bold">{{images?.imgName}}</div>
21
- </div>
22
- </div>
23
- </div>
24
- </div>
25
-
26
- <ng-container *ngIf="loading">
27
- <div class="row loader d-flex justify-content-center align-items-center">
28
- <div class="shimmer">
29
- <div class="wrapper">
30
- <div class="stroke animate title"></div>
31
- <div class="stroke animate link"></div>
32
- <div class="stroke animate description"></div>
33
- </div>
34
- </div>
35
- <div class="shimmer">
36
- <div class="wrapper">
37
- <div class="stroke animate title"></div>
38
- <div class="stroke animate link"></div>
39
- <div class="stroke animate description"></div>
40
- </div>
41
- </div>
42
- </div>
43
- </ng-container>
44
- <ng-container *ngIf="noData">
45
- <div class="row">
46
- <div class="col-lg-12 mb-3">
47
- <div class="card-body d-flex justify-content-center align-items-center flex-column">
48
- <img class="img-src w-25" src="./assets/tango/Icons/Nodata.svg" alt="">
49
- </div>
50
- </div>
51
- </div>
52
- </ng-container>
53
- </div>
54
-