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,104 +0,0 @@
1
- import { ChangeDetectorRef, Component, EventEmitter, HostListener, Input, OnInit, Output, Provider, forwardRef } from '@angular/core';
2
- import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
3
- import { TicketService } from '../../services/ticket.service';
4
-
5
- const SELECT_CONTROL_VALUE_ACCESSOR: Provider = {
6
- provide: NG_VALUE_ACCESSOR,
7
- useExisting: forwardRef(() => ReactiveSelectComponent),
8
- multi: true,
9
- };
10
-
11
- @Component({
12
- selector: 'lib-reactive-select',
13
- templateUrl: './reactive-select.component.html',
14
- styleUrl: './reactive-select.component.scss',
15
- providers: [SELECT_CONTROL_VALUE_ACCESSOR]
16
- })
17
- export class ReactiveSelectComponent implements ControlValueAccessor, OnInit {
18
-
19
- private onTouched: Function;
20
- private onChanged: Function;
21
- @Input() isDisabled: boolean;
22
- @Input() idField: string
23
- @Input() nameField: string
24
- @Input() label: string
25
- @Input() data: any
26
- @Output() itemChange = new EventEmitter()
27
- protected isOpened: boolean = false
28
- protected selected: Record<string, any> | null = null
29
- protected selectedId: string | number
30
- instanceId: string;
31
-
32
-
33
- constructor(private apiService: TicketService, private cd: ChangeDetectorRef) {
34
-
35
- }
36
-
37
- ngOnInit(): void {
38
- this.instanceId = crypto.randomUUID();
39
- this.apiService.dropDownTrigger.subscribe((e) => {
40
- if (e !== this.instanceId) {
41
- this.isOpened = false
42
- this.cd.detectChanges()
43
- }
44
- })
45
- }
46
-
47
-
48
- writeValue(val: string | number): void {
49
- this.selectedId = val
50
- this.selected = this.data.filter((item: Record<string, any>) => item?.[this.idField] === val)[0]
51
-
52
- }
53
- registerOnChange(fn: any): void {
54
- this.onChanged = fn
55
-
56
- }
57
- registerOnTouched(fn: any): void {
58
- this.onTouched = fn
59
- }
60
- setDisabledState?(isDisabled: boolean): void {
61
- this.isDisabled = isDisabled
62
-
63
- }
64
-
65
- onSelect(item: Record<string, any>) {
66
- this.onTouched()
67
- this.selected = item
68
- this.selectedId = item?.[this.idField]
69
- this.isOpened = false
70
- this.itemChange.next(this.selectedId)
71
- this.onChanged(this.selectedId)
72
- }
73
-
74
- @HostListener('document:click', ['$event'])
75
- onClick(event: MouseEvent) {
76
- // console.log(this.isDisabled)
77
- if (!this.isDisabled) {
78
- const targetElement = event.target as HTMLElement;
79
- if (!this.isComponentClicked(targetElement)) {
80
- this.isOpened = false;
81
- }
82
- }
83
- }
84
-
85
- isComponentClicked(targetElement: HTMLElement): boolean {
86
- const parentElement = targetElement.parentElement;
87
- if (parentElement) {
88
- const clickedOnComponent = parentElement.classList.contains('custom-select');
89
- if (clickedOnComponent) {
90
- return true;
91
- } else {
92
- return this.isComponentClicked(parentElement);
93
- }
94
- }
95
- return false;
96
- }
97
-
98
- openDropdown(){
99
- this.isOpened = !this.isOpened;
100
- this.apiService.dropDownTrigger.next(this.instanceId)
101
- }
102
-
103
-
104
- }
@@ -1,38 +0,0 @@
1
- <div class="card mb-5 py-3 px-5">
2
- <ul class="nav nav-stretch nav-line-tabs1 nav-line-tabs border-transparent flex-nowrap">
3
- <li class="nav-item">
4
- <a [routerLink]="['/manage/tickets']" [queryParams]="{ type: 'installation' }" (click)="Selectedtabs('installation')"
5
- [ngClass]="SelectedTab === 'installation' ? 'active' : ''" class="nav-link cursor-pointer no-border me-3">
6
- Installation<span class="mx-2 " [ngClass]="SelectedTab ==='installation' ? 'badge-num-primary' :'badge-num-muted'">{{ticketAllCount?.installationCount?ticketAllCount?.installationCount:0}}</span>
7
- </a>
8
- </li>
9
- <li class="nav-item" >
10
- <a [routerLink]="['/manage/tickets']" [queryParams]="{ type: 'infra' }" (click)="Selectedtabs('infra')"
11
- [ngClass]="SelectedTab === 'infra' ? 'active' : ''" class="nav-link cursor-pointer no-border me-3">
12
- Infra<span class="mx-2" [ngClass]="SelectedTab ==='infra' ? 'badge-num-primary' :'badge-num-muted'">{{ticketAllCount?.infraCount?ticketAllCount?.infraCount:0}}</span>
13
- </a>
14
- </li>
15
- <li class="nav-item" [routerLink]="['/manage/tickets']" [queryParams]="{ type: 'dataMismatch' }" (click)="Selectedtabs('dataMismatch')">
16
- <a [ngClass]="SelectedTab ==='dataMismatch' ? 'active' :''" class="nav-link cursor-pointer me-3">Data Mismatch
17
- <span class="mx-2" [ngClass]="SelectedTab ==='dataMismatch' ? 'badge-num-primary' :'badge-num-muted'">{{ticketAllCount?.datamismatchCount? ticketAllCount?.datamismatchCount:0}}</span></a>
18
- </li>
19
- <!-- <li *ngIf="this.users.userType ==='tango'" class="nav-item" [routerLink]="['/manage/tickets']" [queryParams]="{ type: 'audit' }" (click)="Selectedtabs('audit')"><a [ngClass]="SelectedTab ==='audit' ? 'active' :''"
20
- class="nav-link cursor-pointer no-border me-3">Audit</a>
21
- </li> -->
22
- <li *ngIf="this.users.userType ==='tango'" class="nav-item" (click)="Selectedtabs('mat')"><a [routerLink]="['/manage/tickets']" [queryParams]="{ type: 'mat' }" [ngClass]="SelectedTab ==='mat' ? 'active' :''"
23
- class="nav-link cursor-pointer no-border me-3">Employee Mat
24
- <span class="mx-2 " [ngClass]="SelectedTab ==='mat' ? 'badge-num-primary' :'badge-num-muted'">{{ticketAllCount?.matCount ?ticketAllCount?.matCount:0}}</span></a>
25
- </li>
26
- <li *ngIf="(gs.userAccess | async)?.userType === 'tango' || headerFilters?.client ==='11'" class="nav-item" (click)="Selectedtabs('footfall')"><a [routerLink]="['/manage/tickets']" [queryParams]="{ type: 'footfall' }" [ngClass]="SelectedTab ==='footfall' ? 'active' :''"
27
- class="nav-link cursor-pointer no-border me-3">Footfall Directory
28
- <span class="mx-2 " [ngClass]="SelectedTab ==='footfall' ? 'badge-num-primary' :'badge-num-muted'">{{ticketAllCount?.footfallDirectory ?ticketAllCount?.footfallDirectory:0}}</span>
29
-
30
- </a>
31
- </li>
32
-
33
- </ul>
34
- </div>
35
- <lib-footfall-dic *ngIf="SelectedTab ==='footfall'"></lib-footfall-dic>
36
- <lib-tickets *ngIf="SelectedTab !=='audit' && SelectedTab !=='footfall'"></lib-tickets>
37
- <lib-audit-metrics *ngIf="SelectedTab ==='audit'"></lib-audit-metrics>
38
- <router-outlet></router-outlet>
@@ -1,35 +0,0 @@
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
- .badge-num-primary {
11
- border-radius: 16px !important;
12
- background: var(--Primary-50, #EAF8FF) !important;
13
- color: var(--Primary-700, #009BF3) !important;
14
- text-align: center;
15
- font-size: 14px !important;
16
- font-style: normal;
17
- font-weight: 500;
18
- line-height: 20px;
19
- padding: 2px 10px !important;
20
- mix-blend-mode: multiply !important;
21
- }
22
-
23
- .badge-num-muted {
24
- border-radius: 16px !important;
25
- background: var(--Primary-50, #F2F4F7) !important;
26
- color: var(--Gray-700, #344054) !important;
27
- text-align: center;
28
- font-size: 14px;
29
- font-style: normal;
30
- font-weight: 500;
31
- line-height: 20px;
32
- padding: 2px 10px !important;
33
- mix-blend-mode: multiply !important;
34
- }
35
-
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { TangoManageTicketsComponent } from './tango-manage-tickets.component';
4
-
5
- describe('TangoManageTicketsComponent', () => {
6
- let component: TangoManageTicketsComponent;
7
- let fixture: ComponentFixture<TangoManageTicketsComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [TangoManageTicketsComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(TangoManageTicketsComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,116 +0,0 @@
1
- import { Component, OnDestroy, OnInit } from '@angular/core';
2
- import { ActivatedRoute, Router } from '@angular/router';
3
- import { GlobalStateService, PageInfoService } from 'tango-app-ui-global';
4
- import { Subject, takeUntil } from "rxjs";
5
- import { TicketService } from '../../services/ticket.service';
6
- @Component({
7
- selector: 'lib-tango-manage-tickets',
8
- templateUrl: './tango-manage-tickets.component.html',
9
- styleUrl: './tango-manage-tickets.component.scss'
10
- })
11
- export class TangoManageTicketsComponent implements OnInit,OnDestroy {
12
- SelectedTab:any='installation'
13
- private readonly destroy$ = new Subject();
14
- headerFilters: any;
15
- ticketAllCount: any;
16
- users: any;
17
- constructor(private pageInfo:PageInfoService,private route: ActivatedRoute,private router:Router,public gs:GlobalStateService,private service:TicketService){
18
- }
19
-
20
- ngOnInit(): void {
21
- const userData: any = JSON.parse(localStorage.getItem("user-info") || "{}");
22
- this.users = userData;
23
- this.route?.queryParams?.pipe(takeUntil(this.destroy$)).subscribe(params => {
24
- if (params.hasOwnProperty('type')) {
25
- const type = params['type'];
26
- this.Selectedtabs(type);
27
-
28
- } else{
29
- this.updateStoreIdQueryParam()
30
- }
31
- });
32
- this.onLoad();
33
- this.setPageData();
34
- }
35
-
36
- updateStoreIdQueryParam() {
37
- const queryParams = { ...this.route?.snapshot?.queryParams };
38
- // Update storeId in queryParams
39
- queryParams.type = this.SelectedTab.toLocaleLowerCase();
40
- // Navigate to the same route with updated queryParams
41
- this.router.navigate([], { queryParams: queryParams, queryParamsHandling: 'merge' });
42
- }
43
-
44
- setPageData(){
45
- this.pageInfo.setTitle('Tickets')
46
- this.pageInfo.setDescription('Summary of queries raised,addresed & resolved')
47
- let breadcrumbs : any[]=[];
48
- if (this.gs.userAccess.value?.userType === "tango") {
49
- breadcrumbs= [
50
- {
51
- title: "Manage",
52
- path: "/manage/brands",
53
- isActive: false,
54
- isSeparator: false,
55
- },
56
- {
57
- title: "Manage",
58
- path: "/manage/brands",
59
- isActive: false,
60
- isSeparator: true,
61
- },
62
- ];
63
- } else if (this.gs.userAccess.value?.userType === "client") {
64
- breadcrumbs= [
65
- {
66
- title: "Manage",
67
- path: "/manage/summary",
68
- isActive: false,
69
- isSeparator: false,
70
- },
71
- {
72
- title: "Manage",
73
- path: "/manage/summary",
74
- isActive: false,
75
- isSeparator: true,
76
- },
77
- ];
78
- }
79
- this.pageInfo.setBreadcrumbs(breadcrumbs);
80
- }
81
-
82
-
83
- Selectedtabs(value:any){
84
- this.SelectedTab = value;
85
- }
86
- ngOnDestroy(): void {
87
- this.destroy$.next(true);
88
- this.destroy$.complete();
89
- }
90
- onLoad(){
91
- this.gs.dataRangeValue?.pipe(takeUntil(this.destroy$))?.subscribe({
92
- next: (data: any) => {
93
- if (data) {
94
- this.headerFilters = data;
95
- this.getAllCount();
96
- }
97
- }
98
- })
99
- }
100
-
101
- getAllCount(){
102
- let obj ={
103
- clientId: this.headerFilters?.clients,
104
- fromDate: this.headerFilters?.date?.startDate,
105
- toDate: this.headerFilters?.date?.endDate
106
- }
107
- this.service.getAllCounts(obj)?.pipe(takeUntil(this.destroy$))?.subscribe({
108
- next: (res: any) => {
109
- if(res.code ===200){
110
- this.ticketAllCount = res?.data[0];
111
- }
112
- }
113
- })
114
- }
115
-
116
- }