tango-app-ui-manage-tickets 3.7.0-beta.70 → 3.7.0-beta.71
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 +498 -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 +480 -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 +758 -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 +2488 -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 +9922 -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 +293 -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 -536
- 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 -497
- 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 -772
- 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 -493
- package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.html +0 -3751
- package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.scss +0 -1240
- 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 -2863
- 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,189 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, HostListener, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { TicketService } from '../../services/ticket.service';
|
|
3
|
-
// import { ManageUsersService } from '../../services-v2/manage-users.service';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
7
|
-
selector: 'team-select',
|
|
8
|
-
templateUrl: './custom-select.component.html',
|
|
9
|
-
styleUrl: './custom-select.component.scss',
|
|
10
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
-
})
|
|
12
|
-
export class CustomSelectComponent implements OnChanges, OnInit {
|
|
13
|
-
|
|
14
|
-
@HostListener('document:click', ['$event'])
|
|
15
|
-
onClick(event: MouseEvent) {
|
|
16
|
-
const target = event.target as HTMLElement;
|
|
17
|
-
if (!target.closest('.dropdown')) {
|
|
18
|
-
this.showDropdown = false;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@Input() items: any
|
|
23
|
-
@Input() searchField: string
|
|
24
|
-
@Input() multi: boolean
|
|
25
|
-
@Input() idField: string
|
|
26
|
-
@Input() selectedValues: any = []
|
|
27
|
-
@Input() disabled: boolean | undefined
|
|
28
|
-
@Input() label: string
|
|
29
|
-
@Output() selected = new EventEmitter<any>()
|
|
30
|
-
filteredValues: any = []
|
|
31
|
-
showDropdown: boolean
|
|
32
|
-
searchValue: string
|
|
33
|
-
instanceId: any;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
constructor(private cd: ChangeDetectorRef, private authService:TicketService) { }
|
|
37
|
-
ngOnInit(): void {
|
|
38
|
-
this.instanceId = crypto.randomUUID();
|
|
39
|
-
this.authService.dropDownTrigger.subscribe((e)=>{
|
|
40
|
-
if(e !== this.instanceId){
|
|
41
|
-
this.showDropdown = false
|
|
42
|
-
this.cd.detectChanges()
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
48
|
-
|
|
49
|
-
if (changes['items'] && this.items?.length) {
|
|
50
|
-
this.initializeItems();
|
|
51
|
-
}
|
|
52
|
-
if (changes['selectedValues'] && Array.isArray(changes['selectedValues']?.currentValue) && changes['selectedValues']?.currentValue?.length > 0 && changes['selectedValues']?.currentValue[0]) {
|
|
53
|
-
this.updateSelectedValues();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
initializeItems() {
|
|
58
|
-
this.filteredValues = this.items.map((item: any) => ({ ...item }));
|
|
59
|
-
this.updateSelectedValues()
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
updateSelectedValues() {
|
|
63
|
-
this.selectedValues?.forEach((selectedItem: any) => {
|
|
64
|
-
const item = this.filteredValues?.find((filteredItem: any) => filteredItem?.[this.idField] === selectedItem?.[this.idField]);
|
|
65
|
-
if (item) {
|
|
66
|
-
item.isSelected = true;
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
openDropdown(event: any) {
|
|
73
|
-
this.authService.dropDownTrigger.next(this.instanceId)
|
|
74
|
-
event.stopPropagation();
|
|
75
|
-
this.showDropdown = !this.showDropdown;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
onInput(event: any) {
|
|
79
|
-
if (!event.target.value) {
|
|
80
|
-
this.filteredValues = [...this.items];
|
|
81
|
-
} else {
|
|
82
|
-
const searchTerm = event.target.value.toLowerCase();
|
|
83
|
-
this.filteredValues = this.items.filter((item: any) =>
|
|
84
|
-
item[this.searchField].toLowerCase().includes(searchTerm)
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
this.updateSelectedValues();
|
|
88
|
-
this.cd.detectChanges();
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
onSelect(event: any, item: any) {
|
|
92
|
-
if (this.multi) {
|
|
93
|
-
if (event.currentTarget.checked) {
|
|
94
|
-
this.selectedValues.push(item );
|
|
95
|
-
} else {
|
|
96
|
-
this.selectedValues = this.selectedValues.filter((elem: any) => elem[this.idField] !== item[this.idField]);
|
|
97
|
-
}
|
|
98
|
-
} else {
|
|
99
|
-
this.selectedValues = [{ ...item }];
|
|
100
|
-
this.filteredValues.forEach((element:any) => {
|
|
101
|
-
if(element[this.idField] !== item[this.idField]){
|
|
102
|
-
element.isSelected = false
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
this.showDropdown = false;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
const valuesToEmit = this.selectedValues.map((value: any) => {
|
|
109
|
-
const selectedItem = { ...value };
|
|
110
|
-
delete selectedItem.isSelected;
|
|
111
|
-
return selectedItem;
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
this.cd.detectChanges();
|
|
115
|
-
this.emitSelectedValues(valuesToEmit);
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
onSelectAll(event: any) {
|
|
120
|
-
const selectAll = event.currentTarget.checked;
|
|
121
|
-
this.filteredValues.forEach((item: any) => item.isSelected = selectAll);
|
|
122
|
-
|
|
123
|
-
if (selectAll) {
|
|
124
|
-
this.selectedValues = [...this.filteredValues];
|
|
125
|
-
} else {
|
|
126
|
-
this.selectedValues = [];
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const valuesToEmit = this.selectedValues.map((value: any) => {
|
|
130
|
-
const { isSelected, ...selectedItem } = value;
|
|
131
|
-
return selectedItem;
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
this.cd.detectChanges();
|
|
135
|
-
this.emitSelectedValues(valuesToEmit);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
emitSelectedValues(values: any[]) {
|
|
140
|
-
if (this.multi) {
|
|
141
|
-
this.selected.emit(values);
|
|
142
|
-
} else {
|
|
143
|
-
this.selected.emit(values[0]);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
checkIfAllSelected() {
|
|
148
|
-
return this.filteredValues.every((item: any) => item.isSelected);
|
|
149
|
-
}
|
|
150
|
-
onItemClick(item: any, event: MouseEvent) {
|
|
151
|
-
event.stopPropagation();
|
|
152
|
-
|
|
153
|
-
// For multi-select, row click should not do anything special;
|
|
154
|
-
// checkbox + onSelect already handle it
|
|
155
|
-
if (this.multi) {
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// Mark this item as selected so UI highlights it
|
|
160
|
-
item.isSelected = true;
|
|
161
|
-
|
|
162
|
-
// Fake an event with `currentTarget.checked = true`
|
|
163
|
-
const fakeEvent: any = {
|
|
164
|
-
currentTarget: {
|
|
165
|
-
checked: true
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
// Reuse your existing logic
|
|
170
|
-
this.onSelect(fakeEvent, item);
|
|
171
|
-
}
|
|
172
|
-
getInitialsFromEmail(email?: string): string {
|
|
173
|
-
if (!email) return "";
|
|
174
|
-
|
|
175
|
-
// take text before @
|
|
176
|
-
const namePart = email.split("@")[0];
|
|
177
|
-
|
|
178
|
-
// split by . or space (e.g. "sandeep.pal" -> ["sandeep", "pal"])
|
|
179
|
-
const parts = namePart.split(/[.\s_-]+/).filter(Boolean);
|
|
180
|
-
|
|
181
|
-
if (parts.length >= 2) {
|
|
182
|
-
return (parts[0][0] + parts[1][0]).toUpperCase(); // S + P = SP
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// fallback: first two chars of whole namePart
|
|
186
|
-
return namePart.substring(0, 2).toUpperCase();
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<div class="filter-card">
|
|
2
|
-
<div class="filter-header">
|
|
3
|
-
<span>Filter Options</span>
|
|
4
|
-
<button class="close-btn" (click)="close()">✕</button>
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<div class="field">
|
|
8
|
-
<label>Status</label>
|
|
9
|
-
<select [(ngModel)]="status" class="select">
|
|
10
|
-
<option value="">Select</option>
|
|
11
|
-
<option>Open</option>
|
|
12
|
-
<option>Closed</option>
|
|
13
|
-
<option>In Progress</option>
|
|
14
|
-
</select>
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
<div class="field">
|
|
18
|
-
<label>Store accuracy (%) by condition</label>
|
|
19
|
-
<div class="inline-row">
|
|
20
|
-
<select [(ngModel)]="condition" class="select">
|
|
21
|
-
<option value="">Select</option>
|
|
22
|
-
<option value=">">Greater than</option>
|
|
23
|
-
<option value="<">Lesser than</option>
|
|
24
|
-
<option value=">=">Greater than or equal to</option>
|
|
25
|
-
<option value="<=">Lesser than or equal to</option>
|
|
26
|
-
</select>
|
|
27
|
-
|
|
28
|
-
<input
|
|
29
|
-
type="number"
|
|
30
|
-
[(ngModel)]="ticketValue"
|
|
31
|
-
placeholder="1 to 100%"
|
|
32
|
-
class="percent-input"
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<div class="field">
|
|
38
|
-
<label>Reviewed by</label>
|
|
39
|
-
<select [(ngModel)]="reviewer" class="select">
|
|
40
|
-
<option value="">Select</option>
|
|
41
|
-
<option>drewlenskart.com</option>
|
|
42
|
-
<option>user1lenskart.com</option>
|
|
43
|
-
<option>user2lenskart.com</option>
|
|
44
|
-
</select>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<div class="btn-row">
|
|
48
|
-
<button class="btn btn-reset" (click)="reset()">Reset</button>
|
|
49
|
-
<button class="btn btn-apply" (click)="apply()">Apply</button>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/* grey page background like screenshot (optional – can go in global styles) */
|
|
6
|
-
body, .page-bg {
|
|
7
|
-
background: #f3f4f7;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.filter-card {
|
|
11
|
-
width: 360px;
|
|
12
|
-
padding: 18px 20px 16px;
|
|
13
|
-
background: #ffffff;
|
|
14
|
-
border-radius: 16px;
|
|
15
|
-
box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
|
|
16
|
-
font-size: 13px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.filter-header {
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: space-between;
|
|
22
|
-
align-items: center;
|
|
23
|
-
font-weight: 600;
|
|
24
|
-
margin-bottom: 16px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.close-btn {
|
|
28
|
-
border: none;
|
|
29
|
-
background: transparent;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
font-size: 14px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.field {
|
|
35
|
-
margin-bottom: 14px;
|
|
36
|
-
|
|
37
|
-
label {
|
|
38
|
-
display: block;
|
|
39
|
-
font-size: 12px;
|
|
40
|
-
margin-bottom: 4px;
|
|
41
|
-
color: #4b5563;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.inline-row {
|
|
46
|
-
display: flex;
|
|
47
|
-
gap: 8px;
|
|
48
|
-
align-items: center;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* styled select like design */
|
|
52
|
-
.select {
|
|
53
|
-
width: 100%;
|
|
54
|
-
padding: 8px 10px;
|
|
55
|
-
border-radius: 10px;
|
|
56
|
-
border: 1px solid #e5e7eb;
|
|
57
|
-
background: #f9fafb;
|
|
58
|
-
font-size: 13px;
|
|
59
|
-
outline: none;
|
|
60
|
-
appearance: none; /* hide native arrow */
|
|
61
|
-
background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%),
|
|
62
|
-
linear-gradient(135deg, #9ca3af 50%, transparent 50%);
|
|
63
|
-
background-position: calc(100% - 18px) 12px, calc(100% - 13px) 12px;
|
|
64
|
-
background-size: 5px 5px, 5px 5px;
|
|
65
|
-
background-repeat: no-repeat;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* numeric input on right */
|
|
69
|
-
.percent-input {
|
|
70
|
-
width: 110px;
|
|
71
|
-
padding: 8px 10px;
|
|
72
|
-
border-radius: 10px;
|
|
73
|
-
border: 1px solid #e5e7eb;
|
|
74
|
-
background: #f9fafb;
|
|
75
|
-
font-size: 13px;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/* buttons row */
|
|
79
|
-
.btn-row {
|
|
80
|
-
display: flex;
|
|
81
|
-
gap: 10px;
|
|
82
|
-
margin-top: 10px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.btn {
|
|
86
|
-
flex: 1;
|
|
87
|
-
border-radius: 10px;
|
|
88
|
-
padding: 8px 0;
|
|
89
|
-
font-size: 13px;
|
|
90
|
-
border: 1px solid transparent;
|
|
91
|
-
cursor: pointer;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.btn-reset {
|
|
95
|
-
background: #f9fafb;
|
|
96
|
-
border-color: #e5e7eb;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.btn-apply {
|
|
100
|
-
background: #60b8ff;
|
|
101
|
-
color: #ffffff;
|
|
102
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { FilterOptionsComponent } from './filter-options.component';
|
|
4
|
-
|
|
5
|
-
describe('FilterOptionsComponent', () => {
|
|
6
|
-
let component: FilterOptionsComponent;
|
|
7
|
-
let fixture: ComponentFixture<FilterOptionsComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [FilterOptionsComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(FilterOptionsComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Output } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'lib-filter-options',
|
|
5
|
-
templateUrl: './filter-options.component.html',
|
|
6
|
-
styleUrl: './filter-options.component.scss'
|
|
7
|
-
})
|
|
8
|
-
export class FilterOptionsComponent {
|
|
9
|
-
@Output() applyFilters = new EventEmitter<any>();
|
|
10
|
-
@Output() closePanel = new EventEmitter<void>();
|
|
11
|
-
|
|
12
|
-
// sample model
|
|
13
|
-
status: string = '';
|
|
14
|
-
condition: string = '';
|
|
15
|
-
ticketValue: number | null = null;
|
|
16
|
-
reviewer: string = '';
|
|
17
|
-
|
|
18
|
-
apply() {
|
|
19
|
-
const filters = {
|
|
20
|
-
status: this.status,
|
|
21
|
-
condition: this.condition,
|
|
22
|
-
ticketValue: this.ticketValue,
|
|
23
|
-
reviewer: this.reviewer
|
|
24
|
-
};
|
|
25
|
-
this.applyFilters.emit(filters); // send to parent
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
close() {
|
|
29
|
-
this.closePanel.emit();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
reset() {
|
|
33
|
-
this.status = '';
|
|
34
|
-
this.condition = '';
|
|
35
|
-
this.ticketValue = null;
|
|
36
|
-
this.reviewer = '';
|
|
37
|
-
}
|
|
38
|
-
}
|