tango-app-ui-manage-tickets 3.7.0-beta.7 → 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-metrics/audit-metrics.component.mjs +0 -298
- package/esm2022/lib/components/comment-model/comment-model.component.mjs +0 -58
- package/esm2022/lib/components/count/count.component.mjs +0 -89
- package/esm2022/lib/components/footfall-dic/footfall-dic.component.mjs +0 -894
- package/esm2022/lib/components/group-select/group-select.component.mjs +0 -155
- package/esm2022/lib/components/re-trigger/re-trigger.component.mjs +0 -96
- package/esm2022/lib/components/reactive-select/reactive-select.component.mjs +0 -108
- package/esm2022/lib/components/tango-manage-tickets/tango-manage-tickets.component.mjs +0 -127
- package/esm2022/lib/components/tickets/tickets.component.mjs +0 -793
- package/esm2022/lib/services/excel.service.mjs +0 -45
- package/esm2022/lib/services/ticket.service.mjs +0 -158
- package/esm2022/lib/tango-manage-tickets-routing.module.mjs +0 -24
- package/esm2022/lib/tango-manage-tickets.module.mjs +0 -54
- package/esm2022/public-api.mjs +0 -6
- package/esm2022/tango-app-ui-manage-tickets.mjs +0 -5
- package/fesm2022/tango-app-ui-manage-tickets.mjs +0 -2914
- package/fesm2022/tango-app-ui-manage-tickets.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/add-csm-modal/add-csm-modal.component.d.ts +0 -30
- package/lib/components/audit-log/audit-log.component.d.ts +0 -5
- package/lib/components/audit-metrics/audit-metrics.component.d.ts +0 -59
- package/lib/components/comment-model/comment-model.component.d.ts +0 -17
- package/lib/components/count/count.component.d.ts +0 -23
- package/lib/components/footfall-dic/footfall-dic.component.d.ts +0 -130
- package/lib/components/group-select/group-select.component.d.ts +0 -33
- package/lib/components/re-trigger/re-trigger.component.d.ts +0 -32
- package/lib/components/reactive-select/reactive-select.component.d.ts +0 -32
- package/lib/components/tango-manage-tickets/tango-manage-tickets.component.d.ts +0 -27
- package/lib/components/tickets/tickets.component.d.ts +0 -84
- package/lib/services/excel.service.d.ts +0 -10
- package/lib/services/ticket.service.d.ts +0 -49
- package/lib/tango-manage-tickets-routing.module.d.ts +0 -7
- package/lib/tango-manage-tickets.module.d.ts +0 -21
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<div class="card">
|
|
2
|
+
<div class="card-header">
|
|
3
|
+
<div class="card-title d-grid">
|
|
4
|
+
<div *ngIf="data?.type" class="card-label">{{data?.type | titlecase}} Count - {{data?.storeId}}</div>
|
|
5
|
+
<div class="text-sub">{{data?.fileDate | customDateFormat}}</div>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="card-toolbar">
|
|
8
|
+
<button *ngIf="!noData" type="button" (click)="exportTable()"
|
|
9
|
+
class="btn btn-default mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
10
|
+
<path d="M17.5 12.5V15.8333C17.5 16.2754 17.3244 16.6993 17.0118 17.0118C16.6993 17.3244 16.2754 17.5 15.8333 17.5H4.16667C3.72464 17.5 3.30072 17.3244 2.98816 17.0118C2.67559 16.6993 2.5 16.2754 2.5 15.8333V12.5M14.1667 6.66667L10 2.5M10 2.5L5.83333 6.66667M10 2.5V12.5" stroke="#344054" stroke-width="1.67" stroke-linecap="round" stroke-linejoin="round"/>
|
|
11
|
+
</svg>
|
|
12
|
+
<span class="ms-2">Export</span> </button>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="card-body">
|
|
16
|
+
<div class="row mx-3">
|
|
17
|
+
<div class="col-md-12 item scroll-y">
|
|
18
|
+
<div class="item" *ngFor="let images of auditImages;let i=index" style="padding: 10px;">
|
|
19
|
+
<img class="mx-3 my-3 img" [src]="images?.imgPath">
|
|
20
|
+
<div class="text-center m-0 fs-7 fw-bold">{{images?.imgName}}</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<ng-container *ngIf="loading">
|
|
27
|
+
<div class="row loader d-flex justify-content-center align-items-center">
|
|
28
|
+
<div class="shimmer">
|
|
29
|
+
<div class="wrapper">
|
|
30
|
+
<div class="stroke animate title"></div>
|
|
31
|
+
<div class="stroke animate link"></div>
|
|
32
|
+
<div class="stroke animate description"></div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="shimmer">
|
|
36
|
+
<div class="wrapper">
|
|
37
|
+
<div class="stroke animate title"></div>
|
|
38
|
+
<div class="stroke animate link"></div>
|
|
39
|
+
<div class="stroke animate description"></div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</ng-container>
|
|
44
|
+
<ng-container *ngIf="noData">
|
|
45
|
+
<div class="row">
|
|
46
|
+
<div class="col-lg-12 mb-3">
|
|
47
|
+
<div class="card-body d-flex justify-content-center align-items-center flex-column">
|
|
48
|
+
<img class="img-src w-25" src="./assets/tango/Icons/Nodata.svg" alt="">
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</ng-container>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CountComponent } from './count.component';
|
|
4
|
+
|
|
5
|
+
describe('CountComponent', () => {
|
|
6
|
+
let component: CountComponent;
|
|
7
|
+
let fixture: ComponentFixture<CountComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [CountComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(CountComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { TicketService } from '../../services/ticket.service';
|
|
3
|
+
import { ToastService } from 'tango-app-ui-shared';
|
|
4
|
+
import { ExcelService } from '../../services/excel.service';
|
|
5
|
+
import { Subject, takeUntil } from 'rxjs';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'lib-count',
|
|
9
|
+
templateUrl: './count.component.html',
|
|
10
|
+
styleUrl: './count.component.scss'
|
|
11
|
+
})
|
|
12
|
+
export class CountComponent implements OnInit,OnDestroy {
|
|
13
|
+
|
|
14
|
+
private readonly destroy$ = new Subject();
|
|
15
|
+
@Input() data:any;
|
|
16
|
+
loading:any = true;
|
|
17
|
+
noData:any=false;
|
|
18
|
+
auditImages:any;
|
|
19
|
+
|
|
20
|
+
constructor(private Service:TicketService,private toast:ToastService,private excel : ExcelService,private cd: ChangeDetectorRef){}
|
|
21
|
+
ngOnInit(){
|
|
22
|
+
this.getAuditImages();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ngOnDestroy(): void {
|
|
26
|
+
this.destroy$.next(true);
|
|
27
|
+
this.destroy$.complete();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
getAuditImages(){
|
|
31
|
+
let params:any = {
|
|
32
|
+
fileDate: this.data?.fileDate,
|
|
33
|
+
storeId:this.data?.storeId,
|
|
34
|
+
imageType:this.data?.imageType,
|
|
35
|
+
export : false,
|
|
36
|
+
moduleType : this.data?.selectedType,
|
|
37
|
+
zoneName: this.data?.zoneName
|
|
38
|
+
}
|
|
39
|
+
this.Service.getAuditImages(params).pipe(takeUntil(this.destroy$)).subscribe({
|
|
40
|
+
next:(res:any)=>{
|
|
41
|
+
if(res && res?.code === 200){
|
|
42
|
+
this.auditImages = res?.data?.result;
|
|
43
|
+
this.loading = false;
|
|
44
|
+
this.noData = false;
|
|
45
|
+
}else{
|
|
46
|
+
this.noData = true;
|
|
47
|
+
this.loading = false;
|
|
48
|
+
}
|
|
49
|
+
this.cd.detectChanges();
|
|
50
|
+
},
|
|
51
|
+
error:(err:any)=>{
|
|
52
|
+
this.noData = true;
|
|
53
|
+
this.loading = false;
|
|
54
|
+
},
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
exportTable(){
|
|
60
|
+
let params:any = {
|
|
61
|
+
fileDate: this.data?.fileDate,
|
|
62
|
+
storeId:this.data?.storeId,
|
|
63
|
+
imageType:this.data?.imageType,
|
|
64
|
+
export : true,
|
|
65
|
+
moduleType: this.data?.selectedType,
|
|
66
|
+
zoneName: this.data?.zoneName
|
|
67
|
+
}
|
|
68
|
+
let type = this.data?.type === 'before' ? 'BeforeCount' : 'AfterCount'
|
|
69
|
+
this.Service.ExportAuditImagesasxlsx(params).pipe(takeUntil(this.destroy$)).subscribe({
|
|
70
|
+
next:(res:any)=>{
|
|
71
|
+
if(res){
|
|
72
|
+
this.excel.saveAsZipFile(res,type)
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
error:(err:any)=>{
|
|
76
|
+
this.toast.getErrorToast(err?.error)
|
|
77
|
+
},
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<div class="outer-container">
|
|
2
|
+
<!-- TRIGGER -->
|
|
3
|
+
<div
|
|
4
|
+
[ngClass]="disabled ? 'disable-input' : ''"
|
|
5
|
+
class="select-trigger form-select"
|
|
6
|
+
(click)="openDropdown($event)"
|
|
7
|
+
>
|
|
8
|
+
<ng-container *ngIf="multi; else singleMode">
|
|
9
|
+
<span *ngIf="selectedValues?.length" class="select-value mx-2">
|
|
10
|
+
<!-- <img class="me-2 trigger-avatar" alt="Pic" src="./assets/tango/Image/users-teams.svg" /> -->
|
|
11
|
+
{{ selectedValues?.[0]?.[searchField] }}
|
|
12
|
+
</span>
|
|
13
|
+
<span class="select-value mx-2" *ngIf="selectedValues?.length > 1">
|
|
14
|
+
+{{ selectedValues?.length - 1 }}
|
|
15
|
+
</span>
|
|
16
|
+
<span *ngIf="!selectedValues?.length">{{ label || 'Select' }}</span>
|
|
17
|
+
</ng-container>
|
|
18
|
+
|
|
19
|
+
<ng-template #singleMode>
|
|
20
|
+
<span *ngIf="selectedValues?.[0]; else placeholderSingle">
|
|
21
|
+
{{ selectedValues?.[0]?.[searchField] || 'Select' }}
|
|
22
|
+
</span>
|
|
23
|
+
<ng-template #placeholderSingle>
|
|
24
|
+
<span >{{ label || 'Select' }}</span>
|
|
25
|
+
</ng-template>
|
|
26
|
+
</ng-template>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<!-- DROPDOWN PANEL -->
|
|
32
|
+
<div
|
|
33
|
+
class="input-container dropdown"
|
|
34
|
+
[ngClass]="showDropdown ? '' : 'd-none'"
|
|
35
|
+
(click)="$event.stopPropagation()"
|
|
36
|
+
>
|
|
37
|
+
<!-- Search -->
|
|
38
|
+
<div class="w-100 input-wrapper">
|
|
39
|
+
<input
|
|
40
|
+
[(ngModel)]="searchValue"
|
|
41
|
+
placeholder="Search"
|
|
42
|
+
(input)="onInput($event)"
|
|
43
|
+
type="text"
|
|
44
|
+
/>
|
|
45
|
+
<svg
|
|
46
|
+
class="search-icon"
|
|
47
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
48
|
+
width="16"
|
|
49
|
+
height="17"
|
|
50
|
+
viewBox="0 0 16 17"
|
|
51
|
+
fill="none"
|
|
52
|
+
>
|
|
53
|
+
<path
|
|
54
|
+
d="M14 14.5L11.1 11.6M12.6667 7.83333C12.6667 10.7789 10.2789 13.1667 7.33333 13.1667C4.38781 13.1667 2 10.7789 2 7.83333C2 4.88781 4.38781 2.5 7.33333 2.5C10.2789 2.5 12.6667 4.88781 12.6667 7.83333Z"
|
|
55
|
+
stroke="#667085"
|
|
56
|
+
stroke-width="1.3"
|
|
57
|
+
stroke-linecap="round"
|
|
58
|
+
stroke-linejoin="round"
|
|
59
|
+
/>
|
|
60
|
+
</svg>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<ul>
|
|
64
|
+
<!-- Select all (multi mode only) -->
|
|
65
|
+
<li *ngIf="multi && filteredValues?.length">
|
|
66
|
+
<label class="form-check" [for]="instanceId">
|
|
67
|
+
<input
|
|
68
|
+
(change)="onSelectAll($event)"
|
|
69
|
+
[checked]="checkIfAllSelected()"
|
|
70
|
+
class="form-check-input me-3"
|
|
71
|
+
type="checkbox"
|
|
72
|
+
[id]="instanceId"
|
|
73
|
+
/>
|
|
74
|
+
<span class="form-check-label"> Select All </span>
|
|
75
|
+
</label>
|
|
76
|
+
</li>
|
|
77
|
+
|
|
78
|
+
<!-- LIST ITEMS -->
|
|
79
|
+
<li
|
|
80
|
+
*ngFor="let item of filteredValues"
|
|
81
|
+
[ngClass]="item.isSelected && !multi ? 'selected' : ''"
|
|
82
|
+
(click)="onItemClick(item, $event)"
|
|
83
|
+
>
|
|
84
|
+
<!-- multi → checkbox + label ; single → user row (avatar + name + email) -->
|
|
85
|
+
<ng-container *ngIf="multi; else singleItemTemplate">
|
|
86
|
+
<label
|
|
87
|
+
[for]="item[idField] + instanceId"
|
|
88
|
+
[ngClass]="multi ? '' : 'ps-0'"
|
|
89
|
+
class="form-check"
|
|
90
|
+
>
|
|
91
|
+
<input
|
|
92
|
+
(change)="onSelect($event, item)"
|
|
93
|
+
[(ngModel)]="item.isSelected"
|
|
94
|
+
class="form-check-input me-3"
|
|
95
|
+
type="checkbox"
|
|
96
|
+
[id]="item[idField] + instanceId"
|
|
97
|
+
/>
|
|
98
|
+
<span class="form-check-label">
|
|
99
|
+
{{ item[searchField] }}
|
|
100
|
+
</span>
|
|
101
|
+
</label>
|
|
102
|
+
</ng-container>
|
|
103
|
+
|
|
104
|
+
<ng-template #singleItemTemplate>
|
|
105
|
+
<div class="user-row">
|
|
106
|
+
<div class="avatar avatar-text light-primary p-3">
|
|
107
|
+
{{ getInitialsFromEmail(item.email ||
|
|
108
|
+
item.email) }}
|
|
109
|
+
</div>
|
|
110
|
+
<!-- <img
|
|
111
|
+
class="user-avatar"
|
|
112
|
+
[src]="item.avatarUrl || './assets/tango/Image/Avatar.svg'"
|
|
113
|
+
alt="{{ item[searchField] }}"
|
|
114
|
+
/> -->
|
|
115
|
+
<div class="user-text">
|
|
116
|
+
<div class="user-name">
|
|
117
|
+
{{ item[searchField] }}
|
|
118
|
+
</div>
|
|
119
|
+
<div class="user-email">
|
|
120
|
+
{{ item.email }}
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</ng-template>
|
|
125
|
+
</li>
|
|
126
|
+
|
|
127
|
+
<li *ngIf="!filteredValues?.length">
|
|
128
|
+
<span class="d-flex align-items-center justify-content-center">
|
|
129
|
+
No data found
|
|
130
|
+
</span>
|
|
131
|
+
</li>
|
|
132
|
+
</ul>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
.outer-container {
|
|
8
|
+
// z-index: 1;
|
|
9
|
+
position: relative;
|
|
10
|
+
background-color: white;
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
.form-select {
|
|
14
|
+
font-size: 1.1rem;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
border-radius: 8px !important;
|
|
17
|
+
color: var(--Gray-500, #344054);
|
|
18
|
+
border: 1px solid var(--Gray-300, #D0D5DD) !important;
|
|
19
|
+
height: 42.5px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.disable-input{
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
background-color: #F9FAFB !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.input-container {
|
|
28
|
+
// position: absolute;
|
|
29
|
+
width: 100%;
|
|
30
|
+
z-index: 1;
|
|
31
|
+
|
|
32
|
+
.input-wrapper {
|
|
33
|
+
padding: 8px 10px;
|
|
34
|
+
background-color: white;
|
|
35
|
+
border-top-right-radius: 8px;
|
|
36
|
+
border-top-left-radius: 8px;
|
|
37
|
+
border-top: 1px solid rgba(16, 24, 40, 0.08);
|
|
38
|
+
border-right: 1px solid rgba(16, 24, 40, 0.08);
|
|
39
|
+
border-left: 1px solid rgba(16, 24, 40, 0.08);
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
input {
|
|
43
|
+
width: 100%;
|
|
44
|
+
border-radius: 8px;
|
|
45
|
+
border: 1px solid var(--Gray-300, #D0D5DD);
|
|
46
|
+
background: var(--White, #FFF);
|
|
47
|
+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
48
|
+
padding: 10px 14px 10px 30px;
|
|
49
|
+
outline: none;
|
|
50
|
+
|
|
51
|
+
::placeholder {
|
|
52
|
+
color: var(--Gray-500, #667085);
|
|
53
|
+
font-family: Inter;
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
line-height: 20px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.search-icon {
|
|
61
|
+
position: absolute;
|
|
62
|
+
left: 20px;
|
|
63
|
+
top: 20px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
ul {
|
|
68
|
+
position: relative;
|
|
69
|
+
background-color: white;
|
|
70
|
+
margin: 0;
|
|
71
|
+
padding: 0;
|
|
72
|
+
max-height: 200px;
|
|
73
|
+
min-height: auto;
|
|
74
|
+
overflow-y: auto;
|
|
75
|
+
border-bottom-right-radius: 8px;
|
|
76
|
+
border-bottom-left-radius: 8px;
|
|
77
|
+
border-bottom: 1px solid rgba(16, 24, 40, 0.08);
|
|
78
|
+
border-right: 1px solid rgba(16, 24, 40, 0.08);
|
|
79
|
+
border-left: 1px solid rgba(16, 24, 40, 0.08);
|
|
80
|
+
|
|
81
|
+
.selected{
|
|
82
|
+
background: #F9FAFB;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
li {
|
|
86
|
+
list-style: none;
|
|
87
|
+
padding: 10px 16px;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
|
|
90
|
+
label{
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
li:hover{
|
|
97
|
+
background: #F9FAFB;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.form-check {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.form-check-input {
|
|
112
|
+
height: 16px;
|
|
113
|
+
width: 16px;
|
|
114
|
+
border-radius: 4px;
|
|
115
|
+
border: 1px solid var(--Primary-600, #00A3FF);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.form-check-input:checked {
|
|
119
|
+
--bs-form-check-bg-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB4SURBVHgBhY7NDUBQEIRnqcJNKXTg6qYTStCB+Isy6IQSNMDa9SLh5eWZZPcw+81kCX/quABhD73QyKXsGoyIvNCJSto2hEhNtY4N9cwYeMXEsVqB1GaSauRQOpty2tSmO3FgloAmF5nEhgyoesMO6CuFW66fn2xdFyA3ZzcRLrMAAAAASUVORK5CYII=');
|
|
120
|
+
background-color: #EAF8FF;
|
|
121
|
+
border-color: #00A3FF;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.form-check-label {
|
|
125
|
+
color: var(--Gray-700, #344054);
|
|
126
|
+
font-family: Inter;
|
|
127
|
+
font-size: 14px;
|
|
128
|
+
font-style: normal;
|
|
129
|
+
font-weight: 500;
|
|
130
|
+
line-height: 20px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.select-value{
|
|
134
|
+
border-radius: 16px !important;
|
|
135
|
+
background: var(--Gray-100, #F2F4F7) !important;
|
|
136
|
+
mix-blend-mode: multiply;
|
|
137
|
+
color: var(--Gray-700, #344054) !important;
|
|
138
|
+
text-align: center;
|
|
139
|
+
font-size: 14px;
|
|
140
|
+
font-style: normal;
|
|
141
|
+
font-weight: 500;
|
|
142
|
+
line-height: 20px;
|
|
143
|
+
padding: 4px 12px 4px 6px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.user-row {
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
padding: 8px 14px;
|
|
150
|
+
cursor: pointer;
|
|
151
|
+
border-bottom: 1px solid #f3f4f6;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.user-row:last-child {
|
|
155
|
+
border-bottom: none;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.user-row:hover {
|
|
159
|
+
background: #f5f7ff;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.user-avatar {
|
|
163
|
+
width: 36px;
|
|
164
|
+
height: 36px;
|
|
165
|
+
border-radius: 50%;
|
|
166
|
+
object-fit: cover;
|
|
167
|
+
margin-right: 10px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.user-text {
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-direction: column;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.user-name {
|
|
176
|
+
font-size: 14px;
|
|
177
|
+
font-weight: 500;
|
|
178
|
+
color: #111827;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.user-email {
|
|
182
|
+
font-size: 12px;
|
|
183
|
+
color: #6b7280;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.disable-input {
|
|
187
|
+
pointer-events: none;
|
|
188
|
+
opacity: 0.6;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
.avatar {
|
|
193
|
+
width: 42px;
|
|
194
|
+
height: 40px;
|
|
195
|
+
border-radius: 50%;
|
|
196
|
+
margin-right: 15px;
|
|
197
|
+
font-size: 14px;
|
|
198
|
+
color: #1D2939;
|
|
199
|
+
font-weight: 600;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.light-primary {
|
|
203
|
+
background: #eaf8ff !important;
|
|
204
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CustomSelectComponent } from './custom-select.component';
|
|
4
|
+
|
|
5
|
+
describe('CustomSelectComponent', () => {
|
|
6
|
+
let component: CustomSelectComponent;
|
|
7
|
+
let fixture: ComponentFixture<CustomSelectComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [CustomSelectComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(CustomSelectComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|