tango-app-ui-manage-tickets 3.7.0-beta.60 → 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.
- package/esm2022/lib/components/add-csm-modal/add-csm-modal.component.mjs +98 -0
- package/esm2022/lib/components/audit-log/audit-log.component.mjs +11 -0
- package/esm2022/lib/components/audit-mapping-list/audit-mapping-list.component.mjs +486 -0
- package/esm2022/lib/components/audit-metrics/audit-metrics.component.mjs +298 -0
- package/esm2022/lib/components/audit-report-popup/audit-report-popup.component.mjs +389 -0
- package/esm2022/lib/components/audit-retag/audit-retag.component.mjs +472 -0
- package/esm2022/lib/components/comment-model/comment-model.component.mjs +58 -0
- package/esm2022/lib/components/count/count.component.mjs +89 -0
- package/esm2022/lib/components/custom-select/custom-select.component.mjs +187 -0
- package/esm2022/lib/components/filter-options/filter-options.component.mjs +41 -0
- package/esm2022/lib/components/footfall-dic/footfall-dic.component.mjs +1061 -0
- package/esm2022/lib/components/footfall-dicview/footfall-dicview.component.mjs +1014 -0
- package/esm2022/lib/components/footfall-popup/footfall-popup.component.mjs +15 -0
- package/esm2022/lib/components/group-select/group-select.component.mjs +155 -0
- package/esm2022/lib/components/re-trigger/re-trigger.component.mjs +96 -0
- package/esm2022/lib/components/reactive-select/reactive-select.component.mjs +108 -0
- package/esm2022/lib/components/remove-audit/remove-audit.component.mjs +81 -0
- package/esm2022/lib/components/start-audit/start-audit.component.mjs +761 -0
- package/esm2022/lib/components/tango-manage-tickets/tango-manage-tickets.component.mjs +131 -0
- package/esm2022/lib/components/ticket-filter-panel/ticket-filter-panel.component.mjs +435 -0
- package/esm2022/lib/components/ticket-footfall-new/ticket-footfall-new.component.mjs +2748 -0
- package/esm2022/lib/components/ticketclosepopup/ticketclosepopup.component.mjs +43 -0
- package/esm2022/lib/components/tickets/tickets.component.mjs +847 -0
- package/esm2022/lib/components/viewcategory/viewcategory.component.mjs +89 -0
- package/esm2022/lib/services/audit.service.mjs +88 -0
- package/esm2022/lib/services/excel.service.mjs +45 -0
- package/esm2022/lib/services/ticket.service.mjs +319 -0
- package/esm2022/lib/services/timer.service.mjs +84 -0
- package/esm2022/lib/tango-manage-tickets-routing.module.mjs +44 -0
- package/esm2022/lib/tango-manage-tickets.module.mjs +109 -0
- package/esm2022/public-api.mjs +6 -0
- package/esm2022/tango-app-ui-manage-tickets.mjs +5 -0
- package/fesm2022/tango-app-ui-manage-tickets.mjs +10165 -0
- package/fesm2022/tango-app-ui-manage-tickets.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/add-csm-modal/add-csm-modal.component.d.ts +30 -0
- package/lib/components/audit-log/audit-log.component.d.ts +5 -0
- package/lib/components/audit-mapping-list/audit-mapping-list.component.d.ts +73 -0
- package/lib/components/audit-metrics/audit-metrics.component.d.ts +59 -0
- package/lib/components/audit-report-popup/audit-report-popup.component.d.ts +52 -0
- package/lib/components/audit-retag/audit-retag.component.d.ts +59 -0
- package/lib/components/comment-model/comment-model.component.d.ts +17 -0
- package/lib/components/count/count.component.d.ts +23 -0
- package/lib/components/custom-select/custom-select.component.d.ts +35 -0
- package/lib/components/filter-options/filter-options.component.d.ts +15 -0
- package/lib/components/footfall-dic/footfall-dic.component.d.ts +143 -0
- package/lib/components/footfall-dicview/footfall-dicview.component.d.ts +132 -0
- package/lib/components/footfall-popup/footfall-popup.component.d.ts +8 -0
- package/lib/components/group-select/group-select.component.d.ts +33 -0
- package/lib/components/re-trigger/re-trigger.component.d.ts +32 -0
- package/lib/components/reactive-select/reactive-select.component.d.ts +32 -0
- package/lib/components/remove-audit/remove-audit.component.d.ts +16 -0
- package/lib/components/start-audit/start-audit.component.d.ts +86 -0
- package/lib/components/tango-manage-tickets/tango-manage-tickets.component.d.ts +28 -0
- package/lib/components/ticket-filter-panel/ticket-filter-panel.component.d.ts +79 -0
- package/lib/components/ticket-footfall-new/ticket-footfall-new.component.d.ts +287 -0
- package/lib/components/ticketclosepopup/ticketclosepopup.component.d.ts +15 -0
- package/lib/components/tickets/tickets.component.d.ts +88 -0
- package/lib/components/viewcategory/viewcategory.component.d.ts +16 -0
- package/lib/services/audit.service.d.ts +36 -0
- package/lib/services/excel.service.d.ts +10 -0
- package/lib/services/ticket.service.d.ts +87 -0
- package/lib/services/timer.service.d.ts +22 -0
- package/lib/tango-manage-tickets-routing.module.d.ts +7 -0
- package/lib/tango-manage-tickets.module.d.ts +38 -0
- package/package.json +25 -12
- package/{src/public-api.ts → public-api.d.ts} +2 -8
- package/.eslintrc.json +0 -37
- package/ng-package.json +0 -7
- package/src/lib/components/add-csm-modal/add-csm-modal.component.html +0 -32
- package/src/lib/components/add-csm-modal/add-csm-modal.component.scss +0 -14
- package/src/lib/components/add-csm-modal/add-csm-modal.component.spec.ts +0 -23
- package/src/lib/components/add-csm-modal/add-csm-modal.component.ts +0 -94
- package/src/lib/components/audit-log/audit-log.component.html +0 -1
- package/src/lib/components/audit-log/audit-log.component.scss +0 -0
- package/src/lib/components/audit-log/audit-log.component.spec.ts +0 -23
- package/src/lib/components/audit-log/audit-log.component.ts +0 -10
- package/src/lib/components/audit-mapping-list/audit-mapping-list.component.html +0 -234
- package/src/lib/components/audit-mapping-list/audit-mapping-list.component.scss +0 -186
- package/src/lib/components/audit-mapping-list/audit-mapping-list.component.spec.ts +0 -23
- package/src/lib/components/audit-mapping-list/audit-mapping-list.component.ts +0 -520
- package/src/lib/components/audit-metrics/audit-metrics.component.html +0 -345
- package/src/lib/components/audit-metrics/audit-metrics.component.scss +0 -34
- package/src/lib/components/audit-metrics/audit-metrics.component.spec.ts +0 -23
- package/src/lib/components/audit-metrics/audit-metrics.component.ts +0 -292
- package/src/lib/components/audit-report-popup/audit-report-popup.component.html +0 -111
- package/src/lib/components/audit-report-popup/audit-report-popup.component.scss +0 -101
- package/src/lib/components/audit-report-popup/audit-report-popup.component.spec.ts +0 -23
- package/src/lib/components/audit-report-popup/audit-report-popup.component.ts +0 -397
- package/src/lib/components/audit-retag/audit-retag.component.html +0 -129
- package/src/lib/components/audit-retag/audit-retag.component.scss +0 -146
- package/src/lib/components/audit-retag/audit-retag.component.spec.ts +0 -23
- package/src/lib/components/audit-retag/audit-retag.component.ts +0 -489
- package/src/lib/components/comment-model/comment-model.component.html +0 -24
- package/src/lib/components/comment-model/comment-model.component.scss +0 -20
- package/src/lib/components/comment-model/comment-model.component.spec.ts +0 -23
- package/src/lib/components/comment-model/comment-model.component.ts +0 -53
- package/src/lib/components/count/count.component.html +0 -54
- package/src/lib/components/count/count.component.scss +0 -14
- package/src/lib/components/count/count.component.spec.ts +0 -23
- package/src/lib/components/count/count.component.ts +0 -82
- package/src/lib/components/custom-select/custom-select.component.html +0 -134
- package/src/lib/components/custom-select/custom-select.component.scss +0 -204
- package/src/lib/components/custom-select/custom-select.component.spec.ts +0 -23
- package/src/lib/components/custom-select/custom-select.component.ts +0 -189
- package/src/lib/components/filter-options/filter-options.component.html +0 -51
- package/src/lib/components/filter-options/filter-options.component.scss +0 -102
- package/src/lib/components/filter-options/filter-options.component.spec.ts +0 -23
- package/src/lib/components/filter-options/filter-options.component.ts +0 -38
- package/src/lib/components/footfall-dic/footfall-dic.component.html +0 -1275
- package/src/lib/components/footfall-dic/footfall-dic.component.scss +0 -273
- package/src/lib/components/footfall-dic/footfall-dic.component.spec.ts +0 -23
- package/src/lib/components/footfall-dic/footfall-dic.component.ts +0 -1206
- package/src/lib/components/footfall-dicview/footfall-dicview.component.html +0 -1136
- package/src/lib/components/footfall-dicview/footfall-dicview.component.scss +0 -416
- package/src/lib/components/footfall-dicview/footfall-dicview.component.spec.ts +0 -23
- package/src/lib/components/footfall-dicview/footfall-dicview.component.ts +0 -1168
- package/src/lib/components/footfall-popup/footfall-popup.component.html +0 -61
- package/src/lib/components/footfall-popup/footfall-popup.component.scss +0 -20
- package/src/lib/components/footfall-popup/footfall-popup.component.spec.ts +0 -23
- package/src/lib/components/footfall-popup/footfall-popup.component.ts +0 -12
- package/src/lib/components/group-select/group-select.component.html +0 -44
- package/src/lib/components/group-select/group-select.component.scss +0 -144
- package/src/lib/components/group-select/group-select.component.spec.ts +0 -23
- package/src/lib/components/group-select/group-select.component.ts +0 -145
- package/src/lib/components/re-trigger/re-trigger.component.html +0 -53
- package/src/lib/components/re-trigger/re-trigger.component.scss +0 -16
- package/src/lib/components/re-trigger/re-trigger.component.spec.ts +0 -23
- package/src/lib/components/re-trigger/re-trigger.component.ts +0 -96
- package/src/lib/components/reactive-select/reactive-select.component.html +0 -18
- package/src/lib/components/reactive-select/reactive-select.component.scss +0 -52
- package/src/lib/components/reactive-select/reactive-select.component.spec.ts +0 -23
- package/src/lib/components/reactive-select/reactive-select.component.ts +0 -104
- package/src/lib/components/remove-audit/remove-audit.component.html +0 -38
- package/src/lib/components/remove-audit/remove-audit.component.scss +0 -27
- package/src/lib/components/remove-audit/remove-audit.component.spec.ts +0 -23
- package/src/lib/components/remove-audit/remove-audit.component.ts +0 -81
- package/src/lib/components/start-audit/start-audit.component.html +0 -174
- package/src/lib/components/start-audit/start-audit.component.scss +0 -185
- package/src/lib/components/start-audit/start-audit.component.spec.ts +0 -23
- package/src/lib/components/start-audit/start-audit.component.ts +0 -761
- package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.html +0 -43
- package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.scss +0 -35
- package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.spec.ts +0 -23
- package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.ts +0 -118
- package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.html +0 -386
- package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.scss +0 -87
- package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.spec.ts +0 -23
- package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.ts +0 -494
- package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.html +0 -4743
- package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.scss +0 -1208
- package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.spec.ts +0 -23
- package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.ts +0 -3351
- package/src/lib/components/ticketclosepopup/ticketclosepopup.component.html +0 -100
- package/src/lib/components/ticketclosepopup/ticketclosepopup.component.scss +0 -34
- package/src/lib/components/ticketclosepopup/ticketclosepopup.component.spec.ts +0 -23
- package/src/lib/components/ticketclosepopup/ticketclosepopup.component.ts +0 -48
- package/src/lib/components/tickets/tickets.component.html +0 -451
- package/src/lib/components/tickets/tickets.component.scss +0 -131
- package/src/lib/components/tickets/tickets.component.spec.ts +0 -23
- package/src/lib/components/tickets/tickets.component.ts +0 -809
- package/src/lib/components/viewcategory/viewcategory.component.html +0 -38
- package/src/lib/components/viewcategory/viewcategory.component.scss +0 -29
- package/src/lib/components/viewcategory/viewcategory.component.spec.ts +0 -23
- package/src/lib/components/viewcategory/viewcategory.component.ts +0 -79
- package/src/lib/services/audit.service.spec.ts +0 -16
- package/src/lib/services/audit.service.ts +0 -98
- package/src/lib/services/excel.service.ts +0 -48
- package/src/lib/services/ticket.service.spec.ts +0 -16
- package/src/lib/services/ticket.service.ts +0 -501
- package/src/lib/services/timer.service.spec.ts +0 -16
- package/src/lib/services/timer.service.ts +0 -92
- package/src/lib/tango-manage-tickets-routing.module.ts +0 -37
- package/src/lib/tango-manage-tickets.module.ts +0 -68
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<div class="modal-body mt-5">
|
|
2
|
-
<div class=" d-flex">
|
|
3
|
-
<div class="d-flex justify-content-between w-100">
|
|
4
|
-
<div class="d-flex flex-column">
|
|
5
|
-
<div class="d-flex align-items-center mb-2">
|
|
6
|
-
<div class="fs-2 text-dark fw-bolder my-3 mx-7"> <span class="card-label fw-bold text-dark">
|
|
7
|
-
{{maindata?.name ? maindata?.name : 'Customer' }} Files -
|
|
8
|
-
<span>{{maindata?.count}}</span></span></div>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="btn btn-sm btn-icon btn-active-color-primary me-5" (click)="closepopup()" data-bs-dismiss="modal">
|
|
13
|
-
<span class="svg-icon svg-icon-1">
|
|
14
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
15
|
-
<rect opacity="0.5" x="6" y="17.3137" width="16" height="2" rx="1" transform="rotate(-45 6 17.3137)"
|
|
16
|
-
fill="black"></rect>
|
|
17
|
-
<rect x="7.41422" y="6" width="16" height="2" rx="1" transform="rotate(45 7.41422 6)" fill="black">
|
|
18
|
-
</rect>
|
|
19
|
-
</svg>
|
|
20
|
-
</span>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="card-body">
|
|
24
|
-
<div class="row mx-3">
|
|
25
|
-
<div class="col-md-12 item scroll-y">
|
|
26
|
-
<div class="item" *ngFor="let item of imagelist;let i=index" style="padding: 10px;">
|
|
27
|
-
|
|
28
|
-
<img class="mx-3 mb-3 img" [src]="item.img_path">
|
|
29
|
-
<div class="text-center m-0 fs-7 fw-bold">{{item.img_name}}</div>
|
|
30
|
-
<span class="notify-badge1 cursor-pointer" (click)="removeimage(item)"><i class="fa fa-close" aria-hidden="true"
|
|
31
|
-
style="font-size:15px;color:#00A3FF"></i>
|
|
32
|
-
</span>
|
|
33
|
-
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
.img {
|
|
2
|
-
width: 95px;
|
|
3
|
-
height: 200px;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.item {
|
|
7
|
-
position: relative;
|
|
8
|
-
padding-top: 20px;
|
|
9
|
-
display: inline-block;
|
|
10
|
-
max-height: 595px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.scroll-y {
|
|
14
|
-
overflow-y: auto !important;
|
|
15
|
-
position: relative !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.notify-badge1 {
|
|
19
|
-
position: absolute;
|
|
20
|
-
right: 14px;
|
|
21
|
-
top: 5px;
|
|
22
|
-
background: var(--Primary-50, #EAF8FF);
|
|
23
|
-
text-align: center;
|
|
24
|
-
border-radius: 6px;
|
|
25
|
-
color: #00A3FF;
|
|
26
|
-
border: 2px solid var(--Primary-600, #00A3FF);
|
|
27
|
-
padding: 0px 8px;
|
|
28
|
-
font-size: 20px;
|
|
29
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ViewcategoryComponent } from './viewcategory.component';
|
|
4
|
-
|
|
5
|
-
describe('ViewcategoryComponent', () => {
|
|
6
|
-
let component: ViewcategoryComponent;
|
|
7
|
-
let fixture: ComponentFixture<ViewcategoryComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ViewcategoryComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(ViewcategoryComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, Input } from '@angular/core';
|
|
2
|
-
import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
|
3
|
-
import * as LZString from 'lz-string';
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'lib-viewcategory',
|
|
6
|
-
templateUrl: './viewcategory.component.html',
|
|
7
|
-
styleUrl: './viewcategory.component.scss'
|
|
8
|
-
})
|
|
9
|
-
export class ViewcategoryComponent {
|
|
10
|
-
maindata: any = {}
|
|
11
|
-
imagelist: any = []
|
|
12
|
-
counter: any = 0;
|
|
13
|
-
@Input() data: any
|
|
14
|
-
constructor(public modalService: NgbModal, public activeModel: NgbActiveModal) { }
|
|
15
|
-
|
|
16
|
-
ngOnInit(): void {
|
|
17
|
-
if (this.data) {
|
|
18
|
-
this.maindata = this.data
|
|
19
|
-
}
|
|
20
|
-
var saveData = JSON.parse(sessionStorage.getItem(this.maindata?.type) || '{}')
|
|
21
|
-
if (saveData.length > 0) {
|
|
22
|
-
this.imagelist = saveData
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
removeimage(data: any) {
|
|
26
|
-
|
|
27
|
-
this.counter = 0;
|
|
28
|
-
let oldData = JSON.parse(sessionStorage.getItem(this.maindata?.type) || '{}')
|
|
29
|
-
let auditData = sessionStorage.getItem('audit') || '{}'
|
|
30
|
-
const decompressedData = LZString.decompress(auditData);
|
|
31
|
-
var customer = JSON.parse(decompressedData || '{}')
|
|
32
|
-
customer.map((cus: any) => {
|
|
33
|
-
if (cus.count > 0) {
|
|
34
|
-
cus.mappedid = cus.mappedid.filter((x: any) => x.img_name != data.img_name)
|
|
35
|
-
cus.count = cus.mappedid.length
|
|
36
|
-
}
|
|
37
|
-
})
|
|
38
|
-
console.log(customer)
|
|
39
|
-
const jsonString = JSON.stringify(customer);
|
|
40
|
-
const compressedData = LZString.compress(jsonString);
|
|
41
|
-
sessionStorage.setItem('audit', compressedData)
|
|
42
|
-
if (this.counter < oldData?.length) {
|
|
43
|
-
this.counter = this.counter + 1;
|
|
44
|
-
var wrongData = oldData.splice(oldData.findIndex(({ img_name }: { img_name: string }) => img_name == data?.img_name), 1);
|
|
45
|
-
let stringifydata = sessionStorage.getItem('audit') || '{}'
|
|
46
|
-
const decompressedData = LZString.decompress(stringifydata);
|
|
47
|
-
var customer = JSON.parse(decompressedData || '{}')
|
|
48
|
-
console.log(wrongData)
|
|
49
|
-
if (wrongData.length > 0) {
|
|
50
|
-
wrongData[0].selected = false
|
|
51
|
-
}
|
|
52
|
-
customer.push(wrongData[0])
|
|
53
|
-
const jsonString = JSON.stringify(customer);
|
|
54
|
-
const compressedData = LZString.compress(jsonString);
|
|
55
|
-
sessionStorage.setItem('audit', compressedData)
|
|
56
|
-
sessionStorage.setItem(this.maindata?.type, JSON.stringify(oldData))
|
|
57
|
-
var newdata = JSON.parse(sessionStorage.getItem(this.maindata?.type) || '{}')
|
|
58
|
-
if (newdata.length > 0) {
|
|
59
|
-
this.imagelist = newdata
|
|
60
|
-
} else if (newdata.length == 0) {
|
|
61
|
-
this.activeModel.close({ reload: true });
|
|
62
|
-
} else {
|
|
63
|
-
this.imagelist = []
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
closepopup() {
|
|
74
|
-
console.log(this.counter)
|
|
75
|
-
if (this.counter > 0) {
|
|
76
|
-
this.activeModel.close({ reload: true });
|
|
77
|
-
} else { this.activeModel.close({ reload: false }); }
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { AuditService } from './audit.service';
|
|
4
|
-
|
|
5
|
-
describe('AuditService', () => {
|
|
6
|
-
let service: AuditService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(AuditService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { Injectable, Optional } from '@angular/core';
|
|
2
|
-
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
|
3
|
-
import { Observable, catchError, map, throwError,BehaviorSubject } from 'rxjs';
|
|
4
|
-
import { GlobalStateService } from 'tango-app-ui-global';
|
|
5
|
-
|
|
6
|
-
@Injectable({
|
|
7
|
-
providedIn: 'root'
|
|
8
|
-
})
|
|
9
|
-
export class AuditService {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
ticketApiUrl: any;
|
|
13
|
-
storeApiUrl: any;
|
|
14
|
-
data: any;
|
|
15
|
-
userUrl: any;
|
|
16
|
-
tokenStorage: any;
|
|
17
|
-
zoneauditApiUrl:any;
|
|
18
|
-
edgeAppApiUrl: any;
|
|
19
|
-
clientApiUrl:string
|
|
20
|
-
|
|
21
|
-
clientId = new BehaviorSubject<string>('')
|
|
22
|
-
clientData = new BehaviorSubject<any>(null)
|
|
23
|
-
auditApiUrl: any;
|
|
24
|
-
traxauditApiUrl: any;
|
|
25
|
-
vmsAuditUrl: any;
|
|
26
|
-
footfallDirapiUrl: any;
|
|
27
|
-
|
|
28
|
-
dropDownTrigger = new BehaviorSubject<any>(null)
|
|
29
|
-
constructor(private http: HttpClient, private gs: GlobalStateService) {
|
|
30
|
-
this.gs.environment.subscribe((env) => {
|
|
31
|
-
if (env) {
|
|
32
|
-
this.ticketApiUrl = env.ticketsApiUrl
|
|
33
|
-
this.storeApiUrl = env.storeApiUrl;
|
|
34
|
-
this.userUrl = env.userUrl;
|
|
35
|
-
this.edgeAppApiUrl = env.edgeAppApiUrl;
|
|
36
|
-
this.auditApiUrl = env.auditApiUrl;
|
|
37
|
-
this.clientApiUrl = env.clientApiUrl
|
|
38
|
-
this.vmsAuditUrl = env.vmsAuditUrl
|
|
39
|
-
this.footfallDirapiUrl = env.footfallDirapiUrl
|
|
40
|
-
}
|
|
41
|
-
this.gs.dataRangeValue.subscribe((e:any)=>{
|
|
42
|
-
if(e){
|
|
43
|
-
this.clientId.next(e.client)
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// audit code
|
|
51
|
-
|
|
52
|
-
getAuditMapping(payload:any) {
|
|
53
|
-
return this.http.get(`${this.vmsAuditUrl}/get-file?storeId=${payload?.storeId}&nextId=${payload?.nextId}&limit=${payload?.limit}&Date=${payload?.Date}&count=${payload?.count}`)
|
|
54
|
-
}
|
|
55
|
-
getAuditconfig(clientId:any) {
|
|
56
|
-
return this.http.get(`${this.clientApiUrl}/get-footfall-directory-config?clientId=${clientId}`)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export(data: any) {
|
|
61
|
-
return this.http.get(`${this.clientApiUrl}/audit/processing_info?export=${data.export}&userId=${data.userId}`, {responseType: 'arraybuffer'})
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
getauditCard(filter: any,user:any){
|
|
65
|
-
return this.http.get(`${this.clientApiUrl}/audit/userAuditSummary?range=${filter}&userId=${user}`)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
getactivitylog(data: any) {
|
|
69
|
-
return this.http.post(`${this.clientApiUrl}/activitylog/list`, data)
|
|
70
|
-
}
|
|
71
|
-
saveDraft(data: any) {
|
|
72
|
-
return this.http.post(`${this.vmsAuditUrl}/save-draft`, data)
|
|
73
|
-
}
|
|
74
|
-
getAuditmappinglist(payload:any) {
|
|
75
|
-
return this.http.get(`${this.vmsAuditUrl}/get-drafted-data?fileDate=${payload?.fileDate}&storeId=${payload?.storeId}&auditId=${payload?.auditId}`)
|
|
76
|
-
}
|
|
77
|
-
saveaudit(data: any) {
|
|
78
|
-
return this.http.post(`${this.footfallDirapiUrl}/tango-review-ticket`, data)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
userDetails() {
|
|
84
|
-
return this.http.get(`${this.auditApiUrl}/auth/me`, {
|
|
85
|
-
}).pipe(map((response: any) => {
|
|
86
|
-
localStorage.setItem('user-info', JSON.stringify(response.data));
|
|
87
|
-
return response
|
|
88
|
-
}),
|
|
89
|
-
catchError(this.handleError));
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
private handleError(error: HttpErrorResponse): Observable<never> {
|
|
93
|
-
return throwError(
|
|
94
|
-
() => new Error("Something bad happened; please try again later")
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as FileSaver from 'file-saver';
|
|
3
|
-
import * as XLSX from 'xlsx';
|
|
4
|
-
|
|
5
|
-
const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
|
|
6
|
-
const EXCEL_EXTENSION = '.xlsx';
|
|
7
|
-
const ZIP_TYPE = 'application/zip'
|
|
8
|
-
const ZIP_EXTENSION = '.zip'
|
|
9
|
-
|
|
10
|
-
@Injectable({
|
|
11
|
-
providedIn: 'root'
|
|
12
|
-
})
|
|
13
|
-
export class ExcelService {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
constructor() { }
|
|
17
|
-
|
|
18
|
-
public exportAsExcelFile(json: any[], excelFileName: string): void {
|
|
19
|
-
const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);
|
|
20
|
-
const workbook: XLSX.WorkBook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };
|
|
21
|
-
const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
|
|
22
|
-
this.saveAsExcelFile(excelBuffer, excelFileName);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public saveAsExcelFile(buffer: any, fileName: string): void {
|
|
26
|
-
console.log(buffer, fileName);
|
|
27
|
-
|
|
28
|
-
const data: Blob = new Blob([buffer], {
|
|
29
|
-
type: EXCEL_TYPE
|
|
30
|
-
});
|
|
31
|
-
FileSaver.saveAs(data, fileName + 'list'+ EXCEL_EXTENSION);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
private saveAsTemplate(buffer: any, fileName: string): void {
|
|
35
|
-
const data: Blob = new Blob([buffer], {
|
|
36
|
-
type: EXCEL_TYPE
|
|
37
|
-
});
|
|
38
|
-
FileSaver.saveAs(data, fileName + EXCEL_EXTENSION);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
public saveAsZipFile(buffer: any, fileName: string): void {
|
|
42
|
-
const data: Blob = new Blob([buffer], {
|
|
43
|
-
type: ZIP_TYPE
|
|
44
|
-
});
|
|
45
|
-
FileSaver.saveAs(data, fileName + 'Images'+ ZIP_EXTENSION);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { TicketService } from './ticket.service';
|
|
4
|
-
|
|
5
|
-
describe('TicketService', () => {
|
|
6
|
-
let service: TicketService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(TicketService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|