tango-app-ui-manage-tickets 3.7.0-beta.16 → 3.7.0-beta.17

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 (91) 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-metrics/audit-metrics.component.mjs +298 -0
  4. package/esm2022/lib/components/comment-model/comment-model.component.mjs +58 -0
  5. package/esm2022/lib/components/count/count.component.mjs +89 -0
  6. package/esm2022/lib/components/footfall-dic/footfall-dic.component.mjs +983 -0
  7. package/esm2022/lib/components/group-select/group-select.component.mjs +155 -0
  8. package/esm2022/lib/components/re-trigger/re-trigger.component.mjs +96 -0
  9. package/esm2022/lib/components/reactive-select/reactive-select.component.mjs +108 -0
  10. package/esm2022/lib/components/tango-manage-tickets/tango-manage-tickets.component.mjs +127 -0
  11. package/esm2022/lib/components/tickets/tickets.component.mjs +793 -0
  12. package/esm2022/lib/services/excel.service.mjs +45 -0
  13. package/esm2022/lib/services/ticket.service.mjs +161 -0
  14. package/esm2022/lib/tango-manage-tickets-routing.module.mjs +24 -0
  15. package/esm2022/lib/tango-manage-tickets.module.mjs +54 -0
  16. package/esm2022/public-api.mjs +6 -0
  17. package/esm2022/tango-app-ui-manage-tickets.mjs +5 -0
  18. package/fesm2022/tango-app-ui-manage-tickets.mjs +3006 -0
  19. package/fesm2022/tango-app-ui-manage-tickets.mjs.map +1 -0
  20. package/index.d.ts +5 -0
  21. package/lib/components/add-csm-modal/add-csm-modal.component.d.ts +30 -0
  22. package/lib/components/audit-log/audit-log.component.d.ts +5 -0
  23. package/lib/components/audit-metrics/audit-metrics.component.d.ts +59 -0
  24. package/lib/components/comment-model/comment-model.component.d.ts +17 -0
  25. package/lib/components/count/count.component.d.ts +23 -0
  26. package/lib/components/footfall-dic/footfall-dic.component.d.ts +139 -0
  27. package/lib/components/group-select/group-select.component.d.ts +33 -0
  28. package/lib/components/re-trigger/re-trigger.component.d.ts +32 -0
  29. package/lib/components/reactive-select/reactive-select.component.d.ts +32 -0
  30. package/lib/components/tango-manage-tickets/tango-manage-tickets.component.d.ts +27 -0
  31. package/lib/components/tickets/tickets.component.d.ts +84 -0
  32. package/lib/services/excel.service.d.ts +10 -0
  33. package/lib/services/ticket.service.d.ts +49 -0
  34. package/lib/tango-manage-tickets-routing.module.d.ts +7 -0
  35. package/lib/tango-manage-tickets.module.d.ts +21 -0
  36. package/package.json +25 -12
  37. package/{src/public-api.ts → public-api.d.ts} +2 -8
  38. package/.eslintrc.json +0 -37
  39. package/ng-package.json +0 -7
  40. package/src/lib/components/add-csm-modal/add-csm-modal.component.html +0 -32
  41. package/src/lib/components/add-csm-modal/add-csm-modal.component.scss +0 -14
  42. package/src/lib/components/add-csm-modal/add-csm-modal.component.spec.ts +0 -23
  43. package/src/lib/components/add-csm-modal/add-csm-modal.component.ts +0 -94
  44. package/src/lib/components/audit-log/audit-log.component.html +0 -1
  45. package/src/lib/components/audit-log/audit-log.component.scss +0 -0
  46. package/src/lib/components/audit-log/audit-log.component.spec.ts +0 -23
  47. package/src/lib/components/audit-log/audit-log.component.ts +0 -10
  48. package/src/lib/components/audit-metrics/audit-metrics.component.html +0 -345
  49. package/src/lib/components/audit-metrics/audit-metrics.component.scss +0 -34
  50. package/src/lib/components/audit-metrics/audit-metrics.component.spec.ts +0 -23
  51. package/src/lib/components/audit-metrics/audit-metrics.component.ts +0 -292
  52. package/src/lib/components/comment-model/comment-model.component.html +0 -24
  53. package/src/lib/components/comment-model/comment-model.component.scss +0 -20
  54. package/src/lib/components/comment-model/comment-model.component.spec.ts +0 -23
  55. package/src/lib/components/comment-model/comment-model.component.ts +0 -53
  56. package/src/lib/components/count/count.component.html +0 -54
  57. package/src/lib/components/count/count.component.scss +0 -14
  58. package/src/lib/components/count/count.component.spec.ts +0 -23
  59. package/src/lib/components/count/count.component.ts +0 -82
  60. package/src/lib/components/footfall-dic/footfall-dic.component.html +0 -1242
  61. package/src/lib/components/footfall-dic/footfall-dic.component.scss +0 -273
  62. package/src/lib/components/footfall-dic/footfall-dic.component.spec.ts +0 -23
  63. package/src/lib/components/footfall-dic/footfall-dic.component.ts +0 -1106
  64. package/src/lib/components/group-select/group-select.component.html +0 -44
  65. package/src/lib/components/group-select/group-select.component.scss +0 -144
  66. package/src/lib/components/group-select/group-select.component.spec.ts +0 -23
  67. package/src/lib/components/group-select/group-select.component.ts +0 -145
  68. package/src/lib/components/re-trigger/re-trigger.component.html +0 -53
  69. package/src/lib/components/re-trigger/re-trigger.component.scss +0 -16
  70. package/src/lib/components/re-trigger/re-trigger.component.spec.ts +0 -23
  71. package/src/lib/components/re-trigger/re-trigger.component.ts +0 -96
  72. package/src/lib/components/reactive-select/reactive-select.component.html +0 -18
  73. package/src/lib/components/reactive-select/reactive-select.component.scss +0 -52
  74. package/src/lib/components/reactive-select/reactive-select.component.spec.ts +0 -23
  75. package/src/lib/components/reactive-select/reactive-select.component.ts +0 -104
  76. package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.html +0 -38
  77. package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.scss +0 -35
  78. package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.spec.ts +0 -23
  79. package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.ts +0 -116
  80. package/src/lib/components/tickets/tickets.component.html +0 -439
  81. package/src/lib/components/tickets/tickets.component.scss +0 -131
  82. package/src/lib/components/tickets/tickets.component.spec.ts +0 -23
  83. package/src/lib/components/tickets/tickets.component.ts +0 -748
  84. package/src/lib/services/excel.service.ts +0 -48
  85. package/src/lib/services/ticket.service.spec.ts +0 -16
  86. package/src/lib/services/ticket.service.ts +0 -175
  87. package/src/lib/tango-manage-tickets-routing.module.ts +0 -16
  88. package/src/lib/tango-manage-tickets.module.ts +0 -34
  89. package/tsconfig.lib.json +0 -14
  90. package/tsconfig.lib.prod.json +0 -10
  91. package/tsconfig.spec.json +0 -14
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { AuditMetricsComponent } from './audit-metrics.component';
4
-
5
- describe('AuditMetricsComponent', () => {
6
- let component: AuditMetricsComponent;
7
- let fixture: ComponentFixture<AuditMetricsComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [AuditMetricsComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(AuditMetricsComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,292 +0,0 @@
1
- import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
2
- import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
3
- import { Subject, takeUntil } from 'rxjs';
4
- import { GlobalStateService } from 'tango-app-ui-global';
5
- import dayjs from "dayjs";
6
- import "dayjs/locale/en";
7
- import utc from "dayjs/plugin/utc";
8
- import timezone from "dayjs/plugin/timezone";
9
- import { ReTriggerComponent } from '../re-trigger/re-trigger.component';
10
- import { TicketService } from '../../services/ticket.service';
11
- import { ToastService } from 'tango-app-ui-shared';
12
- import { ExcelService } from '../../services/excel.service';
13
- import { CountComponent } from '../count/count.component';
14
-
15
-
16
- @Component({
17
- selector: 'lib-audit-metrics',
18
- templateUrl: './audit-metrics.component.html',
19
- styleUrl: './audit-metrics.component.scss'
20
- })
21
- export class AuditMetricsComponent implements OnInit,OnDestroy {
22
- noData:boolean = false;
23
- loading:boolean = true;
24
-
25
- storesData:any = [];
26
- activity:any = [
27
- {type:'Audit',FileDate:'28-11-2023',Time:'03:24 pm',beforeCout:'300',AfterCount:'100'},
28
- {type:'Re-Audit',FileDate:'28-10-2023',Time:'03:24 pm',beforeCout:'350',AfterCount:'120'},
29
- {type:'Audit',FileDate:'28-11-2023',Time:'03:24 pm',beforeCout:'300',AfterCount:'100'}
30
- ]
31
- @ViewChild('activitylog') activitylog:any;
32
- private readonly destroy$ = new Subject();
33
- headerFilter: any;
34
- sortColumName: any = '';
35
- sortBy: any = 1;
36
- filterByClient: any = [];
37
- filterByStatus: any = [];
38
- pagination: any = [10, 20, 30];
39
- searchTerm: any;
40
- limit:any = 10;
41
- offset:any = 1;
42
- selectedValue: string;
43
- dayjs = dayjs;
44
- filterByStore: any = [];
45
- totalCount: any;
46
- selectedTab:any = '';
47
-
48
- dataObject:any = [
49
- { Description: 'Module Type',type:'single', Issues: [{id:'traffic', text: "Traffic"},{id:'zone', text: "Zone" }]},
50
- { Description: 'Clients', Issues: [] },
51
- { Description: 'Status', Issues: [{id:'closed', text: "Completed" }, {id:'inprogress', text: "Inprogress" },{id:'drafted', text: "Draft" },{id:'assigned', text: "Assigned" },{id:'not_assign', text: "Not Assigened" },{id:'skipped', text: "Skip"},] }
52
- ];
53
-
54
- clientList: any;
55
- selectedType: any = 'traffic';
56
-
57
- constructor(private gs:GlobalStateService,private modalService:NgbModal,private service: TicketService,private toast:ToastService,private excel:ExcelService){
58
-
59
- }
60
-
61
- ngOnInit(){
62
- this.gs.dataRangeValue.pipe(takeUntil(this.destroy$)).subscribe((data: any) => {
63
- if(data!=null){
64
- this.headerFilter = data
65
- this.metricsList();
66
- }
67
- })
68
- }
69
-
70
- metricsList(){
71
- let data:any = {
72
- fromDate: this.dayjs(this.headerFilter?.date?.startDate).format('YYYY-MM-DD'),
73
- toDate: this.dayjs(this.headerFilter?.date?.endDate).format('YYYY-MM-DD'),
74
- filterByClientId : this.filterByClient,
75
- filterByStoreId : this.filterByStore,
76
- filterByStatus : this.filterByStatus,
77
- filterByAuditType : this.selectedTab ===''? [] : [this.selectedTab],
78
- filterByModuleType: [this.selectedType],
79
- searchValue: this.searchTerm,
80
- sortBy: this.sortBy,
81
- limit: this.limit,
82
- offset: this.offset,
83
- isExport: false
84
- };
85
- if(this.sortColumName){data.sortColumnName = this.sortColumName}else if(this.searchTerm){data.searchValue = this.searchTerm}
86
- this.getclientList();
87
- this.service.getstoreMetrics(data).pipe(takeUntil(this.destroy$)).subscribe({
88
- next:(res:any) => {
89
- if(res && res?.code === 200){
90
- this.storesData = res?.data?.result;
91
- this.totalCount = res?.data?.count;
92
- if(!this.storesData?.length){
93
- this.noData = true;
94
- }
95
- if(this.totalCount < 10){
96
- this.pagination = [this.totalCount]
97
- }else{
98
- this.pagination = [10, 20, 30]
99
- }
100
- this.loading = false;
101
- this.noData = false;
102
- }else{
103
- this.noData = true;
104
- this.loading = false;
105
- }
106
- },
107
- error:(err:any)=>{
108
- this.noData = true;
109
- this.loading = false;
110
- this.toast.getErrorToast(err?.message)
111
- }
112
- })
113
- }
114
-
115
- setItemsperPage(){
116
- if(this.totalCount < 10){
117
- return this.totalCount;
118
- }else{
119
- return this.limit;
120
- }
121
- }
122
-
123
- getclientList(){
124
- this.service.getclientList().pipe(takeUntil(this.destroy$)).subscribe({
125
- next:(res:any) => {
126
- if(res && res?.code ===200){
127
- this.clientList = res?.data?.result;
128
- const issues = this.clientList.map((obj: any) => ({ text: obj.clientName,id:obj.clientId }));
129
- const uniqueIssues:any[] = [];
130
- const Clients = new Set();
131
- issues.forEach((issue:any) => {
132
- if (!Clients.has(issue.text)) {
133
- Clients.add(issue.text);
134
- uniqueIssues.push(issue);
135
- }
136
- });
137
- const filtredObject = (this.dataObject.find((obj: any) => obj.Description === "Clients"))
138
- filtredObject.Issues = uniqueIssues;
139
- }
140
- },
141
- error:(err:any) => {
142
-
143
- },
144
- })
145
- }
146
-
147
- ngOnDestroy(): void {
148
- this.destroy$.next(true);
149
- this.destroy$.complete();
150
- }
151
-
152
- receiveData(data:any) {
153
- this.filterByClient = data.find((obj:any) => obj.Description === "Clients")?.Issues.map((item: any) => item?.id);
154
- this.filterByStatus = data.find((obj:any) => obj.Description === "Status")?.Issues?.map((item: any) => item?.id);
155
- this.selectedType = data.find((obj:any) => obj.Description ==='Module Type')?.Issues?.id;
156
- this.metricsList();
157
- }
158
-
159
- onPageChange(pageOffset: any) {
160
- this.pagination.offset = pageOffset;
161
- this.metricsList();
162
- }
163
-
164
- onPageSizeChange(pageSize: any) {
165
- this.pagination.limit = pageSize;
166
- this.pagination.offset = 1;
167
- this.metricsList();
168
- }
169
-
170
- exportXLSX(){
171
- let data:any = {
172
- fromDate: this.dayjs(this.headerFilter?.date?.startDate).format('YYYY-MM-DD'),
173
- toDate: this.dayjs(this.headerFilter?.date?.endDate).format('YYYY-MM-DD'),
174
- filterByClientId : this.filterByClient,
175
- filterByStoreId : this.filterByStore,
176
- filterByStatus : this.filterByStatus,
177
- filterByAuditType : this.selectedTab ===''? [] : [this.selectedTab],
178
- filterByModuleType: [this.selectedType],
179
- searchValue: this.searchTerm,
180
- sortBy: this.sortBy,
181
- limit: 10000,
182
- offset: this.offset,
183
- isExport: true
184
- };
185
- if(this.sortColumName){data.sortColumnName = this.sortColumName}else if(this.searchTerm){data.searchValue = this.searchTerm}
186
- this.service.getstoreMetricsExport(data).pipe(takeUntil(this.destroy$)).subscribe({
187
- next:(res:any) => {
188
- if(res){
189
- this.excel.saveAsExcelFile(res,'AuditMetrics')
190
- }
191
- },
192
- error:(err:any)=>{
193
- this.toast.getErrorToast(err?.message)
194
- }
195
- })
196
- }
197
-
198
- selectedTabs(data:any){
199
- if(data === 'all'){
200
- this.selectedTab = '';
201
- }else{
202
- this.selectedTab = data;
203
- }
204
- this.limit = 10;
205
- this.offset = 1;
206
- this.metricsList();
207
- }
208
-
209
- searchData(){
210
- this.searchTerm = this.searchTerm;
211
- this.metricsList();
212
- }
213
-
214
- openBeforecount(value:any) {
215
- const modalRef = this.modalService.open(CountComponent,{
216
- centered:true,
217
- size:'xl'
218
- })
219
- modalRef.componentInstance.data ={
220
- type : 'before',
221
- fileDate:value?.fileDate,
222
- storeId: value?.storeId,
223
- selectedType: this.selectedType,
224
- zoneName:value?.zoneName,
225
- imageType: 'BC'
226
- }
227
- }
228
- openAftercount(value:any){
229
- const modalRef = this.modalService.open(CountComponent,{
230
- centered:true,
231
- size:'xl'
232
- })
233
- modalRef.componentInstance.data ={
234
- type : 'after',
235
- fileDate:value?.fileDate,
236
- storeId: value?.storeId,
237
- selectedType: this.selectedType,
238
- zoneName:value?.zoneName,
239
- imageType: 'AC'
240
- }
241
- }
242
-
243
- openView(){
244
- const modalRef = this.modalService.open(this.activitylog)
245
- }
246
-
247
- openreTrigger(value:any){
248
- const modalRef = this.modalService.open(ReTriggerComponent,{
249
- centered:true,
250
- // size:''
251
- })
252
- modalRef.componentInstance.reTrigerData ={
253
- type : 'after',
254
- data: value,
255
- selectedType : this.selectedType
256
- }
257
- modalRef.closed.subscribe((res: any) => {
258
- if (res) {
259
- this.service.auditretrigger(res).pipe(takeUntil(this.destroy$)).subscribe({
260
- next:(res:any)=>{
261
- if(res && res.code === 200){
262
- this.toast.getSuccessToast(res?.data?.result);
263
- this.metricsList();
264
- }
265
- },
266
- error:(err:any)=> {
267
- this.toast.getErrorToast(err?.message)
268
- }
269
- })
270
- }
271
- } )
272
- }
273
-
274
- statusBadge(value:any){
275
- let AccountStatus = value;
276
- if(AccountStatus === 'closed'){
277
- return 'badge-light-success'
278
- }else if(AccountStatus === 'assigned' || AccountStatus === 'not Assigned'){
279
- return 'badge-light-warning'
280
- }else{
281
- return 'badge-light-primary'
282
- }
283
- }
284
-
285
- sortData(value:any){
286
- this.sortColumName = value
287
- this.sortBy *= -1;
288
- this.metricsList();
289
- }
290
-
291
-
292
- }
@@ -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
-
@@ -1,14 +0,0 @@
1
- .img {
2
- width: 95px;
3
- height: 200px;
4
- }
5
- .item {
6
- position: relative;
7
- padding-top: 20px;
8
- display: inline-block;
9
- max-height: 595px;
10
- }
11
- .scroll-y{
12
- overflow-y: auto !important;
13
- position: relative !important;
14
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { CountComponent } from './count.component';
4
-
5
- describe('CountComponent', () => {
6
- let component: CountComponent;
7
- let fixture: ComponentFixture<CountComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [CountComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(CountComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,82 +0,0 @@
1
- import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit } from '@angular/core';
2
- import { TicketService } from '../../services/ticket.service';
3
- import { ToastService } from 'tango-app-ui-shared';
4
- import { ExcelService } from '../../services/excel.service';
5
- import { Subject, takeUntil } from 'rxjs';
6
-
7
- @Component({
8
- selector: 'lib-count',
9
- templateUrl: './count.component.html',
10
- styleUrl: './count.component.scss'
11
- })
12
- export class CountComponent implements OnInit,OnDestroy {
13
-
14
- private readonly destroy$ = new Subject();
15
- @Input() data:any;
16
- loading:any = true;
17
- noData:any=false;
18
- auditImages:any;
19
-
20
- constructor(private Service:TicketService,private toast:ToastService,private excel : ExcelService,private cd: ChangeDetectorRef){}
21
- ngOnInit(){
22
- this.getAuditImages();
23
- }
24
-
25
- ngOnDestroy(): void {
26
- this.destroy$.next(true);
27
- this.destroy$.complete();
28
- }
29
-
30
- getAuditImages(){
31
- let params:any = {
32
- fileDate: this.data?.fileDate,
33
- storeId:this.data?.storeId,
34
- imageType:this.data?.imageType,
35
- export : false,
36
- moduleType : this.data?.selectedType,
37
- zoneName: this.data?.zoneName
38
- }
39
- this.Service.getAuditImages(params).pipe(takeUntil(this.destroy$)).subscribe({
40
- next:(res:any)=>{
41
- if(res && res?.code === 200){
42
- this.auditImages = res?.data?.result;
43
- this.loading = false;
44
- this.noData = false;
45
- }else{
46
- this.noData = true;
47
- this.loading = false;
48
- }
49
- this.cd.detectChanges();
50
- },
51
- error:(err:any)=>{
52
- this.noData = true;
53
- this.loading = false;
54
- },
55
- })
56
-
57
- }
58
-
59
- exportTable(){
60
- let params:any = {
61
- fileDate: this.data?.fileDate,
62
- storeId:this.data?.storeId,
63
- imageType:this.data?.imageType,
64
- export : true,
65
- moduleType: this.data?.selectedType,
66
- zoneName: this.data?.zoneName
67
- }
68
- let type = this.data?.type === 'before' ? 'BeforeCount' : 'AfterCount'
69
- this.Service.ExportAuditImagesasxlsx(params).pipe(takeUntil(this.destroy$)).subscribe({
70
- next:(res:any)=>{
71
- if(res){
72
- this.excel.saveAsZipFile(res,type)
73
- }
74
- },
75
- error:(err:any)=>{
76
- this.toast.getErrorToast(err?.error)
77
- },
78
- })
79
-
80
- }
81
-
82
- }