tango-app-ui-manage-tickets 3.7.0-beta.15 → 3.7.0-beta.16
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.
- package/.eslintrc.json +37 -0
- package/ng-package.json +7 -0
- package/package.json +12 -25
- package/src/lib/components/add-csm-modal/add-csm-modal.component.html +32 -0
- package/src/lib/components/add-csm-modal/add-csm-modal.component.scss +14 -0
- package/src/lib/components/add-csm-modal/add-csm-modal.component.spec.ts +23 -0
- package/src/lib/components/add-csm-modal/add-csm-modal.component.ts +94 -0
- package/src/lib/components/audit-log/audit-log.component.html +1 -0
- package/src/lib/components/audit-log/audit-log.component.scss +0 -0
- package/src/lib/components/audit-log/audit-log.component.spec.ts +23 -0
- package/src/lib/components/audit-log/audit-log.component.ts +10 -0
- package/src/lib/components/audit-metrics/audit-metrics.component.html +345 -0
- package/src/lib/components/audit-metrics/audit-metrics.component.scss +34 -0
- package/src/lib/components/audit-metrics/audit-metrics.component.spec.ts +23 -0
- package/src/lib/components/audit-metrics/audit-metrics.component.ts +292 -0
- package/src/lib/components/comment-model/comment-model.component.html +24 -0
- package/src/lib/components/comment-model/comment-model.component.scss +20 -0
- package/src/lib/components/comment-model/comment-model.component.spec.ts +23 -0
- package/src/lib/components/comment-model/comment-model.component.ts +53 -0
- package/src/lib/components/count/count.component.html +54 -0
- package/src/lib/components/count/count.component.scss +14 -0
- package/src/lib/components/count/count.component.spec.ts +23 -0
- package/src/lib/components/count/count.component.ts +82 -0
- package/src/lib/components/footfall-dic/footfall-dic.component.html +1242 -0
- package/src/lib/components/footfall-dic/footfall-dic.component.scss +273 -0
- package/src/lib/components/footfall-dic/footfall-dic.component.spec.ts +23 -0
- package/src/lib/components/footfall-dic/footfall-dic.component.ts +1106 -0
- package/src/lib/components/group-select/group-select.component.html +44 -0
- package/src/lib/components/group-select/group-select.component.scss +144 -0
- package/src/lib/components/group-select/group-select.component.spec.ts +23 -0
- package/src/lib/components/group-select/group-select.component.ts +145 -0
- package/src/lib/components/re-trigger/re-trigger.component.html +53 -0
- package/src/lib/components/re-trigger/re-trigger.component.scss +16 -0
- package/src/lib/components/re-trigger/re-trigger.component.spec.ts +23 -0
- package/src/lib/components/re-trigger/re-trigger.component.ts +96 -0
- package/src/lib/components/reactive-select/reactive-select.component.html +18 -0
- package/src/lib/components/reactive-select/reactive-select.component.scss +52 -0
- package/src/lib/components/reactive-select/reactive-select.component.spec.ts +23 -0
- package/src/lib/components/reactive-select/reactive-select.component.ts +104 -0
- package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.html +38 -0
- package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.scss +35 -0
- package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.spec.ts +23 -0
- package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.ts +116 -0
- package/src/lib/components/tickets/tickets.component.html +439 -0
- package/src/lib/components/tickets/tickets.component.scss +131 -0
- package/src/lib/components/tickets/tickets.component.spec.ts +23 -0
- package/src/lib/components/tickets/tickets.component.ts +748 -0
- package/src/lib/services/excel.service.ts +48 -0
- package/src/lib/services/ticket.service.spec.ts +16 -0
- package/src/lib/services/ticket.service.ts +175 -0
- package/src/lib/tango-manage-tickets-routing.module.ts +16 -0
- package/src/lib/tango-manage-tickets.module.ts +34 -0
- package/{public-api.d.ts → src/public-api.ts} +8 -2
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/esm2022/lib/components/add-csm-modal/add-csm-modal.component.mjs +0 -98
- package/esm2022/lib/components/audit-log/audit-log.component.mjs +0 -11
- package/esm2022/lib/components/audit-metrics/audit-metrics.component.mjs +0 -298
- package/esm2022/lib/components/comment-model/comment-model.component.mjs +0 -58
- package/esm2022/lib/components/count/count.component.mjs +0 -89
- package/esm2022/lib/components/footfall-dic/footfall-dic.component.mjs +0 -983
- package/esm2022/lib/components/group-select/group-select.component.mjs +0 -155
- package/esm2022/lib/components/re-trigger/re-trigger.component.mjs +0 -96
- package/esm2022/lib/components/reactive-select/reactive-select.component.mjs +0 -108
- package/esm2022/lib/components/tango-manage-tickets/tango-manage-tickets.component.mjs +0 -127
- package/esm2022/lib/components/tickets/tickets.component.mjs +0 -793
- package/esm2022/lib/services/excel.service.mjs +0 -45
- package/esm2022/lib/services/ticket.service.mjs +0 -161
- package/esm2022/lib/tango-manage-tickets-routing.module.mjs +0 -24
- package/esm2022/lib/tango-manage-tickets.module.mjs +0 -54
- package/esm2022/public-api.mjs +0 -6
- package/esm2022/tango-app-ui-manage-tickets.mjs +0 -5
- package/fesm2022/tango-app-ui-manage-tickets.mjs +0 -3006
- package/fesm2022/tango-app-ui-manage-tickets.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/add-csm-modal/add-csm-modal.component.d.ts +0 -30
- package/lib/components/audit-log/audit-log.component.d.ts +0 -5
- package/lib/components/audit-metrics/audit-metrics.component.d.ts +0 -59
- package/lib/components/comment-model/comment-model.component.d.ts +0 -17
- package/lib/components/count/count.component.d.ts +0 -23
- package/lib/components/footfall-dic/footfall-dic.component.d.ts +0 -139
- package/lib/components/group-select/group-select.component.d.ts +0 -33
- package/lib/components/re-trigger/re-trigger.component.d.ts +0 -32
- package/lib/components/reactive-select/reactive-select.component.d.ts +0 -32
- package/lib/components/tango-manage-tickets/tango-manage-tickets.component.d.ts +0 -27
- package/lib/components/tickets/tickets.component.d.ts +0 -84
- package/lib/services/excel.service.d.ts +0 -10
- package/lib/services/ticket.service.d.ts +0 -49
- package/lib/tango-manage-tickets-routing.module.d.ts +0 -7
- package/lib/tango-manage-tickets.module.d.ts +0 -21
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.nav-item .nav-link.active{
|
|
2
|
+
border:none;
|
|
3
|
+
border-radius: 6px;
|
|
4
|
+
background: var(--Primary-50, #EAF8FF);
|
|
5
|
+
padding: 8px 12px;
|
|
6
|
+
}
|
|
7
|
+
.nav-item .nav-link:hover{
|
|
8
|
+
border: none;
|
|
9
|
+
}
|
|
10
|
+
.text-border {
|
|
11
|
+
border-radius: 16px !important;
|
|
12
|
+
background: var(--Gray-100, #F2F4F7) !important;
|
|
13
|
+
color: var(--Gray-700, #344054);
|
|
14
|
+
text-align: center;
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
line-height: 20px;
|
|
18
|
+
padding: 2px 10px !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.text-border-priamry{
|
|
22
|
+
border-radius: 16px;
|
|
23
|
+
background: var(--Primary-50, #EAF8FF);
|
|
24
|
+
color: var(--Primary-700, #009BF3);
|
|
25
|
+
text-align: center;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
font-weight: 500;
|
|
28
|
+
line-height: 20px;
|
|
29
|
+
padding: 2px 10px !important;
|
|
30
|
+
mix-blend-mode: multiply !important;
|
|
31
|
+
}
|
|
32
|
+
tr{
|
|
33
|
+
vertical-align: middle !important;
|
|
34
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,292 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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>
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
}
|