tango-app-ui-manage-tickets 3.7.0-beta.69 → 3.7.0-beta.70
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-mapping-list/audit-mapping-list.component.html +234 -0
- package/src/lib/components/audit-mapping-list/audit-mapping-list.component.scss +186 -0
- package/src/lib/components/audit-mapping-list/audit-mapping-list.component.spec.ts +23 -0
- package/src/lib/components/audit-mapping-list/audit-mapping-list.component.ts +536 -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/audit-report-popup/audit-report-popup.component.html +111 -0
- package/src/lib/components/audit-report-popup/audit-report-popup.component.scss +101 -0
- package/src/lib/components/audit-report-popup/audit-report-popup.component.spec.ts +23 -0
- package/src/lib/components/audit-report-popup/audit-report-popup.component.ts +397 -0
- package/src/lib/components/audit-retag/audit-retag.component.html +129 -0
- package/src/lib/components/audit-retag/audit-retag.component.scss +146 -0
- package/src/lib/components/audit-retag/audit-retag.component.spec.ts +23 -0
- package/src/lib/components/audit-retag/audit-retag.component.ts +497 -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/custom-select/custom-select.component.html +134 -0
- package/src/lib/components/custom-select/custom-select.component.scss +204 -0
- package/src/lib/components/custom-select/custom-select.component.spec.ts +23 -0
- package/src/lib/components/custom-select/custom-select.component.ts +189 -0
- package/src/lib/components/filter-options/filter-options.component.html +51 -0
- package/src/lib/components/filter-options/filter-options.component.scss +102 -0
- package/src/lib/components/filter-options/filter-options.component.spec.ts +23 -0
- package/src/lib/components/filter-options/filter-options.component.ts +38 -0
- package/src/lib/components/footfall-dic/footfall-dic.component.html +1275 -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 +1206 -0
- package/src/lib/components/footfall-dicview/footfall-dicview.component.html +1136 -0
- package/src/lib/components/footfall-dicview/footfall-dicview.component.scss +416 -0
- package/src/lib/components/footfall-dicview/footfall-dicview.component.spec.ts +23 -0
- package/src/lib/components/footfall-dicview/footfall-dicview.component.ts +1168 -0
- package/src/lib/components/footfall-popup/footfall-popup.component.html +61 -0
- package/src/lib/components/footfall-popup/footfall-popup.component.scss +20 -0
- package/src/lib/components/footfall-popup/footfall-popup.component.spec.ts +23 -0
- package/src/lib/components/footfall-popup/footfall-popup.component.ts +12 -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/remove-audit/remove-audit.component.html +38 -0
- package/src/lib/components/remove-audit/remove-audit.component.scss +27 -0
- package/src/lib/components/remove-audit/remove-audit.component.spec.ts +23 -0
- package/src/lib/components/remove-audit/remove-audit.component.ts +81 -0
- package/src/lib/components/start-audit/start-audit.component.html +174 -0
- package/src/lib/components/start-audit/start-audit.component.scss +185 -0
- package/src/lib/components/start-audit/start-audit.component.spec.ts +23 -0
- package/src/lib/components/start-audit/start-audit.component.ts +772 -0
- package/src/lib/components/tango-manage-tickets/tango-manage-tickets.component.html +43 -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 +118 -0
- package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.html +386 -0
- package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.scss +87 -0
- package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.spec.ts +23 -0
- package/src/lib/components/ticket-filter-panel/ticket-filter-panel.component.ts +493 -0
- package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.html +3751 -0
- package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.scss +1240 -0
- package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.spec.ts +23 -0
- package/src/lib/components/ticket-footfall-new/ticket-footfall-new.component.ts +2863 -0
- package/src/lib/components/ticketclosepopup/ticketclosepopup.component.html +100 -0
- package/src/lib/components/ticketclosepopup/ticketclosepopup.component.scss +34 -0
- package/src/lib/components/ticketclosepopup/ticketclosepopup.component.spec.ts +23 -0
- package/src/lib/components/ticketclosepopup/ticketclosepopup.component.ts +48 -0
- package/src/lib/components/tickets/tickets.component.html +451 -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 +809 -0
- package/src/lib/components/viewcategory/viewcategory.component.html +38 -0
- package/src/lib/components/viewcategory/viewcategory.component.scss +29 -0
- package/src/lib/components/viewcategory/viewcategory.component.spec.ts +23 -0
- package/src/lib/components/viewcategory/viewcategory.component.ts +79 -0
- package/src/lib/services/audit.service.spec.ts +16 -0
- package/src/lib/services/audit.service.ts +98 -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 +501 -0
- package/src/lib/services/timer.service.spec.ts +16 -0
- package/src/lib/services/timer.service.ts +92 -0
- package/src/lib/tango-manage-tickets-routing.module.ts +37 -0
- package/src/lib/tango-manage-tickets.module.ts +68 -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-mapping-list/audit-mapping-list.component.mjs +0 -498
- package/esm2022/lib/components/audit-metrics/audit-metrics.component.mjs +0 -298
- package/esm2022/lib/components/audit-report-popup/audit-report-popup.component.mjs +0 -389
- package/esm2022/lib/components/audit-retag/audit-retag.component.mjs +0 -480
- 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/custom-select/custom-select.component.mjs +0 -187
- package/esm2022/lib/components/filter-options/filter-options.component.mjs +0 -41
- package/esm2022/lib/components/footfall-dic/footfall-dic.component.mjs +0 -1061
- package/esm2022/lib/components/footfall-dicview/footfall-dicview.component.mjs +0 -1014
- package/esm2022/lib/components/footfall-popup/footfall-popup.component.mjs +0 -15
- 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/remove-audit/remove-audit.component.mjs +0 -81
- package/esm2022/lib/components/start-audit/start-audit.component.mjs +0 -758
- package/esm2022/lib/components/tango-manage-tickets/tango-manage-tickets.component.mjs +0 -131
- package/esm2022/lib/components/ticket-filter-panel/ticket-filter-panel.component.mjs +0 -435
- package/esm2022/lib/components/ticket-footfall-new/ticket-footfall-new.component.mjs +0 -2414
- package/esm2022/lib/components/ticketclosepopup/ticketclosepopup.component.mjs +0 -43
- package/esm2022/lib/components/tickets/tickets.component.mjs +0 -847
- package/esm2022/lib/components/viewcategory/viewcategory.component.mjs +0 -89
- package/esm2022/lib/services/audit.service.mjs +0 -88
- package/esm2022/lib/services/excel.service.mjs +0 -45
- package/esm2022/lib/services/ticket.service.mjs +0 -319
- package/esm2022/lib/services/timer.service.mjs +0 -84
- package/esm2022/lib/tango-manage-tickets-routing.module.mjs +0 -44
- package/esm2022/lib/tango-manage-tickets.module.mjs +0 -109
- 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 -9848
- 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-mapping-list/audit-mapping-list.component.d.ts +0 -73
- package/lib/components/audit-metrics/audit-metrics.component.d.ts +0 -59
- package/lib/components/audit-report-popup/audit-report-popup.component.d.ts +0 -52
- package/lib/components/audit-retag/audit-retag.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/custom-select/custom-select.component.d.ts +0 -35
- package/lib/components/filter-options/filter-options.component.d.ts +0 -15
- package/lib/components/footfall-dic/footfall-dic.component.d.ts +0 -143
- package/lib/components/footfall-dicview/footfall-dicview.component.d.ts +0 -132
- package/lib/components/footfall-popup/footfall-popup.component.d.ts +0 -8
- 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/remove-audit/remove-audit.component.d.ts +0 -16
- package/lib/components/start-audit/start-audit.component.d.ts +0 -86
- package/lib/components/tango-manage-tickets/tango-manage-tickets.component.d.ts +0 -28
- package/lib/components/ticket-filter-panel/ticket-filter-panel.component.d.ts +0 -79
- package/lib/components/ticket-footfall-new/ticket-footfall-new.component.d.ts +0 -291
- package/lib/components/ticketclosepopup/ticketclosepopup.component.d.ts +0 -15
- package/lib/components/tickets/tickets.component.d.ts +0 -88
- package/lib/components/viewcategory/viewcategory.component.d.ts +0 -16
- package/lib/services/audit.service.d.ts +0 -36
- package/lib/services/excel.service.d.ts +0 -10
- package/lib/services/ticket.service.d.ts +0 -87
- package/lib/services/timer.service.d.ts +0 -22
- package/lib/tango-manage-tickets-routing.module.d.ts +0 -7
- package/lib/tango-manage-tickets.module.d.ts +0 -38
|
@@ -0,0 +1,189 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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>
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
}
|