tango-app-ui-manage-users 3.7.0-alpha.9 → 3.7.1-alpha.0-test
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/tango-manage-users/add-user-popup/add-user-popup.component.mjs +5 -4
- package/esm2022/lib/components/tango-manage-users/assign-store-popup/assign-store-popup.component.mjs +5 -5
- package/esm2022/lib/components/tango-manage-users/brand-user/brand-user.component.mjs +23 -6
- package/esm2022/lib/components/tango-manage-users/user-table/alert-popup/alert-popup.component.mjs +27 -7
- package/esm2022/lib/components/tango-manage-users/user-table/user-table.component.mjs +3 -3
- package/esm2022/lib/components-v2/add-users/add-users.component.mjs +202 -45
- package/esm2022/lib/components-v2/teams-creation/teams-creation.component.mjs +24 -4
- package/esm2022/lib/components-v2/teams-list/teams-list.component.mjs +11 -3
- package/esm2022/lib/components-v2/viewteams-list/viewteams-list.component.mjs +4 -6
- package/esm2022/lib/services/user.service.mjs +1 -7
- package/esm2022/lib/services-v2/manage-users.service.mjs +6 -1
- package/fesm2022/tango-app-ui-manage-users.mjs +354 -138
- package/fesm2022/tango-app-ui-manage-users.mjs.map +1 -1
- package/lib/components/tango-manage-users/brand-user/brand-user.component.d.ts +1 -0
- package/lib/components/tango-manage-users/user-table/alert-popup/alert-popup.component.d.ts +5 -1
- package/lib/components-v2/add-users/add-users.component.d.ts +4 -1
- package/lib/services/user.service.d.ts +0 -1
- package/lib/services-v2/manage-users.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable,
|
|
2
|
+
import { Injectable, Component, Input, EventEmitter, ChangeDetectionStrategy, HostListener, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i6 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i3
|
|
5
|
+
import * as i3 from '@angular/router';
|
|
6
6
|
import { RouterModule } from '@angular/router';
|
|
7
|
-
import * as i3 from '@angular/forms';
|
|
7
|
+
import * as i3$1 from '@angular/forms';
|
|
8
8
|
import { FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import Swal from 'sweetalert2';
|
|
10
10
|
import * as XLSX from 'xlsx';
|
|
11
11
|
import { read, utils } from 'xlsx';
|
|
12
12
|
import { BehaviorSubject, throwError, map, catchError, Subject, takeUntil } from 'rxjs';
|
|
13
|
-
import * as i1 from '@angular/common/http';
|
|
14
|
-
import * as i2 from 'tango-app-ui-global';
|
|
15
13
|
import * as i1$1 from '@ng-bootstrap/ng-bootstrap';
|
|
16
14
|
import { NgbAccordionModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
|
|
15
|
+
import * as i1 from '@angular/common/http';
|
|
16
|
+
import * as i2 from 'tango-app-ui-global';
|
|
17
17
|
import * as i4 from 'tango-app-ui-shared';
|
|
18
18
|
import { CommonSharedModule } from 'tango-app-ui-shared';
|
|
19
|
+
import * as CryptoJS from 'crypto-js';
|
|
19
20
|
import * as FileSaver from 'file-saver';
|
|
20
21
|
import { NgxPaginationModule } from 'ngx-pagination';
|
|
21
22
|
|
|
@@ -91,6 +92,11 @@ class ManageUsersService {
|
|
|
91
92
|
.post(`${this.userApiUrl}/update-users`, userBody)
|
|
92
93
|
.pipe(map((response) => response));
|
|
93
94
|
}
|
|
95
|
+
getUserTeams(userBody) {
|
|
96
|
+
return this.http
|
|
97
|
+
.post(`${this.teamsApiUrl}/get-user-teams`, userBody)
|
|
98
|
+
.pipe(map((response) => response));
|
|
99
|
+
}
|
|
94
100
|
viewTeamsSubject = new BehaviorSubject(false);
|
|
95
101
|
// Expose an observable for components to subscribe to
|
|
96
102
|
viewTeams$ = this.viewTeamsSubject.asObservable();
|
|
@@ -114,6 +120,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
114
120
|
}]
|
|
115
121
|
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.GlobalStateService }] });
|
|
116
122
|
|
|
123
|
+
class AlertPopupComponent {
|
|
124
|
+
activeModal;
|
|
125
|
+
service;
|
|
126
|
+
cd;
|
|
127
|
+
router;
|
|
128
|
+
route;
|
|
129
|
+
ts;
|
|
130
|
+
user;
|
|
131
|
+
constructor(activeModal, service, cd, router, route, ts) {
|
|
132
|
+
this.activeModal = activeModal;
|
|
133
|
+
this.service = service;
|
|
134
|
+
this.cd = cd;
|
|
135
|
+
this.router = router;
|
|
136
|
+
this.route = route;
|
|
137
|
+
this.ts = ts;
|
|
138
|
+
}
|
|
139
|
+
cancel() {
|
|
140
|
+
this.activeModal.close('close');
|
|
141
|
+
}
|
|
142
|
+
onSubmit() {
|
|
143
|
+
if (this.user?.lastOne) {
|
|
144
|
+
this.activeModal.close();
|
|
145
|
+
if (this.user?.teamName?.length > 0) {
|
|
146
|
+
this.service.changeTab('teams');
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
this.router.navigate(['/manage/stores'], { queryParams: { type: 'clusters' } });
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
this.activeModal.close('submit');
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
onSubmit1() {
|
|
157
|
+
this.activeModal.close("submit");
|
|
158
|
+
}
|
|
159
|
+
onSubmit2() {
|
|
160
|
+
if (this.user?.teamLastOne) {
|
|
161
|
+
this.activeModal.close();
|
|
162
|
+
this.service.changeTab('teams');
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
this.activeModal.close('submit');
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AlertPopupComponent, deps: [{ token: i1$1.NgbActiveModal }, { token: ManageUsersService }, { token: i0.ChangeDetectorRef }, { token: i3.Router }, { token: i3.ActivatedRoute }, { token: i4.ToastService }], target: i0.ɵɵFactoryTarget.Component });
|
|
169
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AlertPopupComponent, selector: "lib-alert-popup", inputs: { user: "user" }, ngImport: i0, template: "<div class=\"card group-delete py-0\">\r\n <div *ngIf=\"(user?.isActive || !user?.isActive) && (!user?.lastOne && !user?.roleStatus)\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Are you sure1?</a>\r\n <span *ngIf=\"user?.isActive\" class=\"sub-title fw-normal mt-2\">Do you want to active the user<b> {{user?.userName}}</b> ?</span>\r\n <span *ngIf=\"!user?.isActive\" class=\"sub-title fw-normal mt-2\">Do you want to deactive the user<b> {{user?.userName}}</b> ?</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button *ngIf=\"user?.isActive\" id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit1()\">Active</button>\r\n <button *ngIf=\"!user?.isActive\" id=\"alert-toast\" class=\"btn btn-danger w-100 ms-3\" (click)=\"onSubmit1()\">Deactive </button>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n <div *ngIf=\"!user?.isActive && user?.lastOne && !user?.roleStatus\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a *ngIf=\"user?.teamName?.length && user?.clusterName?.length ===0\" class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">You are about to deactivate the user assigned as a lead to the {{user?.teamName.length > 1? 'teams':'team'}} <span *ngFor=\"let team of user?.teamName;let last = last\">{{team}}<span *ngIf=\"!last\">,</span></span>.</a>\r\n <a *ngIf=\"user?.teamName?.length && user?.clusterName?.length\" class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">You are about to deactivate the user assigned as a lead to the {{user?.teamName.length > 1? 'teams':'team'}} <span *ngFor=\"let team of user?.teamName;let last = last\">{{team}}<span *ngIf=\"!last\">,</span></span> and {{user?.clusterName.length > 1? 'clusters':'cluster'}} <span *ngFor=\"let cluster of user?.clusterName;let last = last\">{{cluster}}<span *ngIf=\"!last\">,</span></span>.</a>\r\n <a *ngIf=\"user?.clusterName?.length && user?.teamName?.length ===0\" class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">You are about to deactivate the user assigned as a lead to the {{user?.clusterName.length > 1? 'clusters':'cluster'}} <span *ngFor=\"let cluster of user?.clusterName;let last = last\">{{cluster}}<span *ngIf=\"!last\">,</span></span>.</a>\r\n <span class=\"sub-title fw-normal mt-2\">You have to assign another user as lead for the respective cluster/teams to deactivate this user.</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit()\">Assign New Lead</button>\r\n </div>\r\n \r\n </div>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"user?.roleStatus== 'up'\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Upgrading User to an Admin</a>\r\n <span class=\"sub-title fw-normal mt-2\">You are about to promote an user of the team {{user?.teams}} to an Admin. This leads to remove the user from the respective team.</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit1()\">Yes, proceed</button>\r\n </div>\r\n \r\n </div>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"user?.roleStatus== 'down'\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Downgrading Admin to a User</a>\r\n <span *ngIf=\"user?.teamLastOne\" class=\"sub-title fw-normal mt-2\">You are about to de-promote the last admin of the team {{user?.teams}} to a user. So you have to assign another user as lead for the respective teams to downgrade.</span>\r\n <span *ngIf=\"!user?.teamLastOne\" class=\"sub-title fw-normal mt-2\">You are about to de-promote an admin who is the lead of the team {{user?.teams}} to a user. This leads to remove the user from the respective team.</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit2()\">{{ user?.teamLastOne? 'Assign New Lead' : 'Yes, Proceed' }}</button>\r\n </div>\r\n \r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".sub-title{font-size:14px!important}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
170
|
+
}
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AlertPopupComponent, decorators: [{
|
|
172
|
+
type: Component,
|
|
173
|
+
args: [{ selector: 'lib-alert-popup', template: "<div class=\"card group-delete py-0\">\r\n <div *ngIf=\"(user?.isActive || !user?.isActive) && (!user?.lastOne && !user?.roleStatus)\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Are you sure1?</a>\r\n <span *ngIf=\"user?.isActive\" class=\"sub-title fw-normal mt-2\">Do you want to active the user<b> {{user?.userName}}</b> ?</span>\r\n <span *ngIf=\"!user?.isActive\" class=\"sub-title fw-normal mt-2\">Do you want to deactive the user<b> {{user?.userName}}</b> ?</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button *ngIf=\"user?.isActive\" id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit1()\">Active</button>\r\n <button *ngIf=\"!user?.isActive\" id=\"alert-toast\" class=\"btn btn-danger w-100 ms-3\" (click)=\"onSubmit1()\">Deactive </button>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n <div *ngIf=\"!user?.isActive && user?.lastOne && !user?.roleStatus\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a *ngIf=\"user?.teamName?.length && user?.clusterName?.length ===0\" class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">You are about to deactivate the user assigned as a lead to the {{user?.teamName.length > 1? 'teams':'team'}} <span *ngFor=\"let team of user?.teamName;let last = last\">{{team}}<span *ngIf=\"!last\">,</span></span>.</a>\r\n <a *ngIf=\"user?.teamName?.length && user?.clusterName?.length\" class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">You are about to deactivate the user assigned as a lead to the {{user?.teamName.length > 1? 'teams':'team'}} <span *ngFor=\"let team of user?.teamName;let last = last\">{{team}}<span *ngIf=\"!last\">,</span></span> and {{user?.clusterName.length > 1? 'clusters':'cluster'}} <span *ngFor=\"let cluster of user?.clusterName;let last = last\">{{cluster}}<span *ngIf=\"!last\">,</span></span>.</a>\r\n <a *ngIf=\"user?.clusterName?.length && user?.teamName?.length ===0\" class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">You are about to deactivate the user assigned as a lead to the {{user?.clusterName.length > 1? 'clusters':'cluster'}} <span *ngFor=\"let cluster of user?.clusterName;let last = last\">{{cluster}}<span *ngIf=\"!last\">,</span></span>.</a>\r\n <span class=\"sub-title fw-normal mt-2\">You have to assign another user as lead for the respective cluster/teams to deactivate this user.</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit()\">Assign New Lead</button>\r\n </div>\r\n \r\n </div>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"user?.roleStatus== 'up'\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Upgrading User to an Admin</a>\r\n <span class=\"sub-title fw-normal mt-2\">You are about to promote an user of the team {{user?.teams}} to an Admin. This leads to remove the user from the respective team.</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit1()\">Yes, proceed</button>\r\n </div>\r\n \r\n </div>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"user?.roleStatus== 'down'\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Downgrading Admin to a User</a>\r\n <span *ngIf=\"user?.teamLastOne\" class=\"sub-title fw-normal mt-2\">You are about to de-promote the last admin of the team {{user?.teams}} to a user. So you have to assign another user as lead for the respective teams to downgrade.</span>\r\n <span *ngIf=\"!user?.teamLastOne\" class=\"sub-title fw-normal mt-2\">You are about to de-promote an admin who is the lead of the team {{user?.teams}} to a user. This leads to remove the user from the respective team.</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit2()\">{{ user?.teamLastOne? 'Assign New Lead' : 'Yes, Proceed' }}</button>\r\n </div>\r\n \r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".sub-title{font-size:14px!important}\n"] }]
|
|
174
|
+
}], ctorParameters: () => [{ type: i1$1.NgbActiveModal }, { type: ManageUsersService }, { type: i0.ChangeDetectorRef }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: i4.ToastService }], propDecorators: { user: [{
|
|
175
|
+
type: Input
|
|
176
|
+
}] } });
|
|
177
|
+
|
|
117
178
|
class UserService {
|
|
118
179
|
http;
|
|
119
180
|
gs;
|
|
@@ -218,12 +279,6 @@ class UserService {
|
|
|
218
279
|
getUserAssignData(params) {
|
|
219
280
|
return this.http.get(`${this.userApiUrl}/get-assign-Data`, { params: params }).pipe(map((response) => response), catchError(this.handleError));
|
|
220
281
|
}
|
|
221
|
-
createUsers(userBody) {
|
|
222
|
-
return this.http.post(`${this.userApiUrl}/createUser`, userBody);
|
|
223
|
-
// .pipe(
|
|
224
|
-
// map((response: any) => response)
|
|
225
|
-
// );
|
|
226
|
-
}
|
|
227
282
|
messageSource = new BehaviorSubject("default message");
|
|
228
283
|
currentMessage = this.messageSource.asObservable();
|
|
229
284
|
changeMessage(message) {
|
|
@@ -413,7 +468,7 @@ class CustomSelectComponent {
|
|
|
413
468
|
return this.filteredValues.every((item) => item.isSelected);
|
|
414
469
|
}
|
|
415
470
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CustomSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: ManageUsersService }], target: i0.ɵɵFactoryTarget.Component });
|
|
416
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CustomSelectComponent, selector: "team-select", inputs: { items: "items", searchField: "searchField", multi: "multi", idField: "idField", selectedValues: "selectedValues", disabled: "disabled", label: "label" }, outputs: { selected: "selected", deselected: "deselected", deselectedAll: "deselectedAll" }, host: { listeners: { "document:click": "onClick($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"outer-container\">\r\n <div [ngClass]=\"disabled ? 'disable-input':''\" (click)=\"openDropdown($event)\" class=\"form-select\">\r\n <ng-container *ngIf=\"multi\" >\r\n <span *ngIf=\"selectedValues?.length\" class=\"select-value mx-2\"> <img class=\"me-2\" alt=\"Pic\" src=\"./assets/tango/Image/users-teams.svg\">{{selectedValues?.[0]?.[searchField]}}</span> \r\n <span *ngIf=\"selectedValues?.length > 1\" class=\"select-value mx-2\"><img class=\"me-2\" alt=\"Pic\" src=\"./assets/tango/Image/users-teams.svg\">{{selectedValues?.[1]?.[searchField]}}</span> \r\n <span class=\"select-value mx-2\" *ngIf=\"selectedValues?.length > 2\">+{{selectedValues?.length -2}}</span> {{label}} \r\n </ng-container>\r\n <ng-container *ngIf=\"!multi\" >\r\n {{selectedValues?.[0]?.[searchField]}}\r\n </ng-container>\r\n </div>\r\n <div [ngClass]=\"showDropdown ? '' : 'd-none'\" class=\"input-container dropdown\" >\r\n <div class=\"w-100 input-wrapper\">\r\n <input [(ngModel)]=\"searchValue\" placeholder=\"Search\" (input)=\"onInput($event)\" type=\"text\"> \r\n <svg class=\"search-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\">\r\n <path 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\" stroke=\"#667085\" stroke-width=\"1.3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n <ul>\r\n <li *ngIf=\"multi && filteredValues?.length\">\r\n <label class=\"form-check\" [for]=\"instanceId\">\r\n <input (change)=\"onSelectAll($event)\" [checked]=\"checkIfAllSelected()\" class=\"form-check-input me-3\" type=\"checkbox\"\r\n [id]=\"instanceId\">\r\n <span class=\"form-check-label\" >\r\n Select All\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngFor=\"let item of filteredValues\" [ngClass]=\"item.isSelected && !multi ? 'selected' : ''\" >\r\n <label [for]=\"item[idField] + instanceId\" [ngClass]=\"multi ? '': 'ps-0'\" class=\"form-check\">\r\n <input [ngClass]=\"multi ? '': 'd-none'\" (change)=\"onSelect($event, item)\" [(ngModel)]=\"item.isSelected\" class=\"form-check-input me-3\" type=\"checkbox\" value=\"\"\r\n [id]=\"item[idField] + instanceId\">\r\n <span class=\"form-check-label\" >\r\n {{item[searchField]}}\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngIf=\"!filteredValues?.length\" >\r\n <span class=\"d-flex align-items-center justify-content-center\" >No data found</span>\r\n </li>\r\n </ul> \r\n </div> \r\n \r\n</div>", styles: [":host{width:100%;height:100%}.outer-container{position:relative;background-color:#fff}.outer-container .form-select{font-size:1.1rem;font-weight:600;border-radius:8px!important;color:var(--Gray-500, #344054);border:1px solid var(--Gray-300, #D0D5DD)!important;height:42.5px}.outer-container .disable-input{pointer-events:none;background-color:#f9fafb!important}.outer-container .input-container{position:absolute;width:100%;z-index:1}.outer-container .input-container .input-wrapper{padding:8px 10px;background-color:#fff;border-top-right-radius:8px;border-top-left-radius:8px;border-top:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.outer-container .input-container .input-wrapper input{width:100%;border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF);box-shadow:0 1px 2px #1018280d;padding:10px 14px 10px 30px;outline:none}.outer-container .input-container .input-wrapper input ::placeholder{color:var(--Gray-500, #667085);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.outer-container .input-container .input-wrapper .search-icon{position:absolute;left:20px;top:20px}.outer-container .input-container ul{position:relative;background-color:#fff;margin:0;padding:0;max-height:200px;min-height:auto;overflow-y:auto;border-bottom-right-radius:8px;border-bottom-left-radius:8px;border-bottom:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.outer-container .input-container ul .selected{background:#f9fafb}.outer-container .input-container ul li{list-style:none;padding:10px 16px;cursor:pointer}.outer-container .input-container ul li label{cursor:pointer}.outer-container .input-container ul li:hover{background:#f9fafb}.form-check{display:flex;align-items:center}.form-check-input{height:16px;width:16px;border-radius:4px;border:1px solid var(--Primary-600, #00A3FF)}.form-check-input:checked{--bs-form-check-bg-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB4SURBVHgBhY7NDUBQEIRnqcJNKXTg6qYTStCB+Isy6IQSNMDa9SLh5eWZZPcw+81kCX/quABhD73QyKXsGoyIvNCJSto2hEhNtY4N9cwYeMXEsVqB1GaSauRQOpty2tSmO3FgloAmF5nEhgyoesMO6CuFW66fn2xdFyA3ZzcRLrMAAAAASUVORK5CYII=);background-color:#eaf8ff;border-color:#00a3ff}.form-check-label{color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-style:normal;font-weight:500;line-height:20px}.select-value{border-radius:16px!important;background:var(--Gray-100, #F2F4F7)!important;mix-blend-mode:multiply;color:var(--Gray-700, #344054)!important;text-align:center;font-size:14px;font-style:normal;font-weight:500;line-height:20px;padding:4px 12px 4px 6px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
471
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CustomSelectComponent, selector: "team-select", inputs: { items: "items", searchField: "searchField", multi: "multi", idField: "idField", selectedValues: "selectedValues", disabled: "disabled", label: "label" }, outputs: { selected: "selected", deselected: "deselected", deselectedAll: "deselectedAll" }, host: { listeners: { "document:click": "onClick($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"outer-container\">\r\n <div [ngClass]=\"disabled ? 'disable-input':''\" (click)=\"openDropdown($event)\" class=\"form-select\">\r\n <ng-container *ngIf=\"multi\" >\r\n <span *ngIf=\"selectedValues?.length\" class=\"select-value mx-2\"> <img class=\"me-2\" alt=\"Pic\" src=\"./assets/tango/Image/users-teams.svg\">{{selectedValues?.[0]?.[searchField]}}</span> \r\n <span *ngIf=\"selectedValues?.length > 1\" class=\"select-value mx-2\"><img class=\"me-2\" alt=\"Pic\" src=\"./assets/tango/Image/users-teams.svg\">{{selectedValues?.[1]?.[searchField]}}</span> \r\n <span class=\"select-value mx-2\" *ngIf=\"selectedValues?.length > 2\">+{{selectedValues?.length -2}}</span> {{label}} \r\n </ng-container>\r\n <ng-container *ngIf=\"!multi\" >\r\n {{selectedValues?.[0]?.[searchField]}}\r\n </ng-container>\r\n </div>\r\n <div [ngClass]=\"showDropdown ? '' : 'd-none'\" class=\"input-container dropdown\" >\r\n <div class=\"w-100 input-wrapper\">\r\n <input [(ngModel)]=\"searchValue\" placeholder=\"Search\" (input)=\"onInput($event)\" type=\"text\"> \r\n <svg class=\"search-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\">\r\n <path 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\" stroke=\"#667085\" stroke-width=\"1.3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n <ul>\r\n <li *ngIf=\"multi && filteredValues?.length\">\r\n <label class=\"form-check\" [for]=\"instanceId\">\r\n <input (change)=\"onSelectAll($event)\" [checked]=\"checkIfAllSelected()\" class=\"form-check-input me-3\" type=\"checkbox\"\r\n [id]=\"instanceId\">\r\n <span class=\"form-check-label\" >\r\n Select All\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngFor=\"let item of filteredValues\" [ngClass]=\"item.isSelected && !multi ? 'selected' : ''\" >\r\n <label [for]=\"item[idField] + instanceId\" [ngClass]=\"multi ? '': 'ps-0'\" class=\"form-check\">\r\n <input [ngClass]=\"multi ? '': 'd-none'\" (change)=\"onSelect($event, item)\" [(ngModel)]=\"item.isSelected\" class=\"form-check-input me-3\" type=\"checkbox\" value=\"\"\r\n [id]=\"item[idField] + instanceId\">\r\n <span class=\"form-check-label\" >\r\n {{item[searchField]}}\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngIf=\"!filteredValues?.length\" >\r\n <span class=\"d-flex align-items-center justify-content-center\" >No data found</span>\r\n </li>\r\n </ul> \r\n </div> \r\n \r\n</div>", styles: [":host{width:100%;height:100%}.outer-container{position:relative;background-color:#fff}.outer-container .form-select{font-size:1.1rem;font-weight:600;border-radius:8px!important;color:var(--Gray-500, #344054);border:1px solid var(--Gray-300, #D0D5DD)!important;height:42.5px}.outer-container .disable-input{pointer-events:none;background-color:#f9fafb!important}.outer-container .input-container{position:absolute;width:100%;z-index:1}.outer-container .input-container .input-wrapper{padding:8px 10px;background-color:#fff;border-top-right-radius:8px;border-top-left-radius:8px;border-top:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.outer-container .input-container .input-wrapper input{width:100%;border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF);box-shadow:0 1px 2px #1018280d;padding:10px 14px 10px 30px;outline:none}.outer-container .input-container .input-wrapper input ::placeholder{color:var(--Gray-500, #667085);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.outer-container .input-container .input-wrapper .search-icon{position:absolute;left:20px;top:20px}.outer-container .input-container ul{position:relative;background-color:#fff;margin:0;padding:0;max-height:200px;min-height:auto;overflow-y:auto;border-bottom-right-radius:8px;border-bottom-left-radius:8px;border-bottom:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.outer-container .input-container ul .selected{background:#f9fafb}.outer-container .input-container ul li{list-style:none;padding:10px 16px;cursor:pointer}.outer-container .input-container ul li label{cursor:pointer}.outer-container .input-container ul li:hover{background:#f9fafb}.form-check{display:flex;align-items:center}.form-check-input{height:16px;width:16px;border-radius:4px;border:1px solid var(--Primary-600, #00A3FF)}.form-check-input:checked{--bs-form-check-bg-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB4SURBVHgBhY7NDUBQEIRnqcJNKXTg6qYTStCB+Isy6IQSNMDa9SLh5eWZZPcw+81kCX/quABhD73QyKXsGoyIvNCJSto2hEhNtY4N9cwYeMXEsVqB1GaSauRQOpty2tSmO3FgloAmF5nEhgyoesMO6CuFW66fn2xdFyA3ZzcRLrMAAAAASUVORK5CYII=);background-color:#eaf8ff;border-color:#00a3ff}.form-check-label{color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-style:normal;font-weight:500;line-height:20px}.select-value{border-radius:16px!important;background:var(--Gray-100, #F2F4F7)!important;mix-blend-mode:multiply;color:var(--Gray-700, #344054)!important;text-align:center;font-size:14px;font-style:normal;font-weight:500;line-height:20px;padding:4px 12px 4px 6px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
417
472
|
}
|
|
418
473
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CustomSelectComponent, decorators: [{
|
|
419
474
|
type: Component,
|
|
@@ -443,6 +498,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
443
498
|
type: Output
|
|
444
499
|
}] } });
|
|
445
500
|
|
|
501
|
+
const SECRET_KEY$1 = CryptoJS.enc.Utf8.parse(CryptoJS.SHA256("t@ng0-ret@il-@pi-v3")
|
|
502
|
+
.toString(CryptoJS.enc.Base64)
|
|
503
|
+
.substring(0, 32));
|
|
446
504
|
class AddUsersComponent {
|
|
447
505
|
service;
|
|
448
506
|
cd;
|
|
@@ -451,6 +509,7 @@ class AddUsersComponent {
|
|
|
451
509
|
userService;
|
|
452
510
|
ts;
|
|
453
511
|
gs;
|
|
512
|
+
modalService;
|
|
454
513
|
destroy = new Subject();
|
|
455
514
|
type;
|
|
456
515
|
user;
|
|
@@ -499,16 +558,11 @@ class AddUsersComponent {
|
|
|
499
558
|
}
|
|
500
559
|
}
|
|
501
560
|
handleEditChange(modules) {
|
|
502
|
-
// if (!modules.get("isAdd")?.value) {
|
|
503
|
-
// modules.get("isDelete")?.setValue(false);
|
|
504
|
-
// modules.get("isEdit")?.setValue(false);
|
|
505
|
-
// }
|
|
506
561
|
if (!modules.get("isEdit")?.value) {
|
|
507
|
-
// modules.get('isDownload')?.setValue(false);
|
|
508
562
|
modules.get("isDelete")?.setValue(false);
|
|
509
563
|
}
|
|
510
564
|
}
|
|
511
|
-
constructor(service, cd, activeModal, fb, userService, ts, gs) {
|
|
565
|
+
constructor(service, cd, activeModal, fb, userService, ts, gs, modalService) {
|
|
512
566
|
this.service = service;
|
|
513
567
|
this.cd = cd;
|
|
514
568
|
this.activeModal = activeModal;
|
|
@@ -516,13 +570,26 @@ class AddUsersComponent {
|
|
|
516
570
|
this.userService = userService;
|
|
517
571
|
this.ts = ts;
|
|
518
572
|
this.gs = gs;
|
|
573
|
+
this.modalService = modalService;
|
|
519
574
|
}
|
|
520
575
|
ngOnDestroy() {
|
|
521
576
|
this.destroy.next(false);
|
|
522
577
|
this.destroy.complete();
|
|
523
578
|
}
|
|
579
|
+
// must match backend
|
|
580
|
+
decrypt(encryptedText) {
|
|
581
|
+
const [ivHex, encrypted] = encryptedText.split(':');
|
|
582
|
+
const iv = CryptoJS.enc.Hex.parse(ivHex);
|
|
583
|
+
const ciphertext = CryptoJS.enc.Hex.parse(encrypted);
|
|
584
|
+
const cipherParams = CryptoJS.lib.CipherParams.create({ ciphertext });
|
|
585
|
+
const decrypted = CryptoJS.AES.decrypt(cipherParams, SECRET_KEY$1, {
|
|
586
|
+
iv: iv,
|
|
587
|
+
mode: CryptoJS.mode.CBC,
|
|
588
|
+
padding: CryptoJS.pad.Pkcs7
|
|
589
|
+
});
|
|
590
|
+
return decrypted.toString(CryptoJS.enc.Utf8);
|
|
591
|
+
}
|
|
524
592
|
ngOnInit() {
|
|
525
|
-
console.log(this.type);
|
|
526
593
|
let data;
|
|
527
594
|
if ("header-filters" in localStorage) {
|
|
528
595
|
data = JSON.parse(localStorage.getItem('header-filters') || '');
|
|
@@ -532,13 +599,10 @@ class AddUsersComponent {
|
|
|
532
599
|
this.getRoles();
|
|
533
600
|
this.getAllTeamsList();
|
|
534
601
|
if (this.type === "view" || (this.type === "edit")) {
|
|
535
|
-
// this.addSingleUser();
|
|
536
602
|
this.loadUserForm();
|
|
537
603
|
}
|
|
538
604
|
else {
|
|
539
605
|
this.initUserForm();
|
|
540
|
-
// this.getAllTeamsList()
|
|
541
|
-
// this.showsingleuser = false;
|
|
542
606
|
}
|
|
543
607
|
this.getCountryCodes();
|
|
544
608
|
}
|
|
@@ -605,9 +669,6 @@ class AddUsersComponent {
|
|
|
605
669
|
const triggerButton = document.querySelector('#triggerButtonId');
|
|
606
670
|
triggerButton?.focus();
|
|
607
671
|
}
|
|
608
|
-
// onSubmit() {
|
|
609
|
-
// this.activeModal.close('submit');
|
|
610
|
-
// }
|
|
611
672
|
maskEmail(value) {
|
|
612
673
|
if (!value || !value.includes('@'))
|
|
613
674
|
return '';
|
|
@@ -626,7 +687,7 @@ class AddUsersComponent {
|
|
|
626
687
|
return `${first2}${maskedMiddle}${last2}`;
|
|
627
688
|
}
|
|
628
689
|
loadUserForm() {
|
|
629
|
-
this.userService.getUser(this.user.
|
|
690
|
+
this.userService.getUser(this.decrypt(this.user.encryptedEmail)).pipe(takeUntil(this.destroy$)).subscribe({
|
|
630
691
|
next: (res) => {
|
|
631
692
|
if (res && res.code == 200 && res.data.result) {
|
|
632
693
|
const userData = res.data.result;
|
|
@@ -639,7 +700,7 @@ class AddUsersComponent {
|
|
|
639
700
|
this.userForm = this.fb.group({
|
|
640
701
|
userName: [res.data.result.userName, Validators.required],
|
|
641
702
|
email: [email, Validators.compose([Validators.required,
|
|
642
|
-
Validators.pattern("^[a-zA-Z0-9
|
|
703
|
+
Validators.pattern("^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$"),
|
|
643
704
|
])],
|
|
644
705
|
mobileNumber: [mobile, [Validators.required, Validators.minLength(8), Validators.maxLength(13)]],
|
|
645
706
|
role: [res.data.result.role, Validators.required],
|
|
@@ -694,7 +755,7 @@ class AddUsersComponent {
|
|
|
694
755
|
this.userForm = this.fb.group({
|
|
695
756
|
userName: ["", Validators.required],
|
|
696
757
|
email: ["", Validators.compose([Validators.required,
|
|
697
|
-
Validators.pattern("^[a-zA-Z0-9
|
|
758
|
+
Validators.pattern("^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$")
|
|
698
759
|
])],
|
|
699
760
|
mobileNumber: ["", [Validators.required, Validators.minLength(8), Validators.maxLength(13)]],
|
|
700
761
|
role: ["user", Validators.required],
|
|
@@ -759,8 +820,6 @@ class AddUsersComponent {
|
|
|
759
820
|
addUserSubmit() {
|
|
760
821
|
let value = this.updatePermissionsBasedOnUserType(this.userForm.value);
|
|
761
822
|
const updatedData = this.removeNullValues(value);
|
|
762
|
-
// updatedData.email = this.originalEmail;
|
|
763
|
-
// updatedData.mobileNumber = this.originalMobile;
|
|
764
823
|
const clientId = this.$headerFilters.client ? this.$headerFilters.client : this.user_data.clientId;
|
|
765
824
|
this.userService.createSingleUsers({ ...updatedData, clientId }).subscribe({
|
|
766
825
|
next: (res) => {
|
|
@@ -800,36 +859,187 @@ class AddUsersComponent {
|
|
|
800
859
|
}
|
|
801
860
|
user.email = this.originalEmail;
|
|
802
861
|
this.userForm.get("email")?.disable();
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
862
|
+
let mapping = {
|
|
863
|
+
user: 1,
|
|
864
|
+
admin: 2,
|
|
865
|
+
superadmin: 3,
|
|
866
|
+
};
|
|
867
|
+
let oldRole = this.user.role;
|
|
868
|
+
let updatedRole = user.role;
|
|
869
|
+
if (user?.role && mapping[oldRole] < mapping[updatedRole]) {
|
|
870
|
+
this.user["roleStatus"] = "up";
|
|
871
|
+
this.service.getUserTeams({ email: user.email, type: "user" }).subscribe({
|
|
872
|
+
next: (res) => {
|
|
873
|
+
if (res && res.code == 200 && res.data?.result?.length > 0) {
|
|
874
|
+
this.user["teams"] = res.data.result;
|
|
875
|
+
// this.activeModal.close();
|
|
876
|
+
const modalRef = this.modalService.open(AlertPopupComponent, { centered: true, size: 'md', backdrop: "static" });
|
|
877
|
+
modalRef.componentInstance.user = this.user;
|
|
878
|
+
modalRef.result.then((result) => {
|
|
879
|
+
if (result === 'submit') {
|
|
880
|
+
user.teamLead = [];
|
|
881
|
+
this.service.updateUsers(user).subscribe({
|
|
882
|
+
next: (res) => {
|
|
883
|
+
if (res && res.code == 200) {
|
|
884
|
+
this.ts.getSuccessToast("User details updated successfully.");
|
|
885
|
+
this.activeModal.close('submit');
|
|
886
|
+
}
|
|
887
|
+
else {
|
|
888
|
+
this.ts.getErrorToast("Unable to update User!");
|
|
889
|
+
this.activeModal.close();
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
error: (err) => {
|
|
893
|
+
this.ts.getErrorToast(err?.error?.error ? err?.error?.error : "Unable to update User!");
|
|
894
|
+
this.activeModal.close();
|
|
895
|
+
},
|
|
896
|
+
complete: () => { },
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
else {
|
|
902
|
+
this.service.updateUsers(user).subscribe({
|
|
903
|
+
next: (res) => {
|
|
904
|
+
if (res && res.code == 200) {
|
|
905
|
+
this.ts.getSuccessToast("User details updated successfully.");
|
|
906
|
+
this.activeModal.close('submit');
|
|
907
|
+
}
|
|
908
|
+
else {
|
|
909
|
+
this.ts.getErrorToast("Unable to update User!");
|
|
910
|
+
this.activeModal.close();
|
|
911
|
+
}
|
|
912
|
+
},
|
|
913
|
+
error: (err) => {
|
|
914
|
+
this.ts.getErrorToast(err?.error?.error ? err?.error?.error : "Unable to update User!");
|
|
915
|
+
this.activeModal.close();
|
|
916
|
+
},
|
|
917
|
+
complete: () => { },
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
error: (err) => {
|
|
922
|
+
this.ts.getErrorToast(err?.error?.error ? err?.error?.error : "Unable to update User!");
|
|
811
923
|
this.activeModal.close();
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
924
|
+
},
|
|
925
|
+
complete: () => { },
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
else if (user?.role && mapping[oldRole] > mapping[updatedRole]) {
|
|
929
|
+
this.user["roleStatus"] = "down";
|
|
930
|
+
if (!this.user.lastOne) {
|
|
931
|
+
this.service.getUserTeams({ email: user.email, type: "lead" }).subscribe({
|
|
932
|
+
next: (res) => {
|
|
933
|
+
if (res && res.code == 200 && res.data.result?.length > 0) {
|
|
934
|
+
this.user["teams"] = res.data.result;
|
|
935
|
+
// this.activeModal.close();
|
|
936
|
+
// console.log({user:this.user, role1:mapping[oldRole], role2:mapping[updatedRole],mesg:".............2", role:user?.role})
|
|
937
|
+
const modalRef = this.modalService.open(AlertPopupComponent, { centered: true, size: 'md', backdrop: "static" });
|
|
938
|
+
modalRef.componentInstance.user = this.user;
|
|
939
|
+
modalRef.result.then((result) => {
|
|
940
|
+
if (result === 'submit') {
|
|
941
|
+
// user.teamLead = []
|
|
942
|
+
this.service.updateUsers(user).subscribe({
|
|
943
|
+
next: (res) => {
|
|
944
|
+
if (res && res.code == 200) {
|
|
945
|
+
this.ts.getSuccessToast("User details updated successfully.");
|
|
946
|
+
this.activeModal.close('submit');
|
|
947
|
+
}
|
|
948
|
+
else {
|
|
949
|
+
this.ts.getErrorToast("Unable to update User!");
|
|
950
|
+
this.activeModal.close();
|
|
951
|
+
}
|
|
952
|
+
},
|
|
953
|
+
error: (err) => {
|
|
954
|
+
this.ts.getErrorToast(err?.error?.error ? err?.error?.error : "Unable to update User!");
|
|
955
|
+
this.activeModal.close();
|
|
956
|
+
},
|
|
957
|
+
complete: () => { },
|
|
958
|
+
});
|
|
959
|
+
}
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
else {
|
|
963
|
+
this.service.updateUsers(user).subscribe({
|
|
964
|
+
next: (res) => {
|
|
965
|
+
if (res && res.code == 200) {
|
|
966
|
+
this.ts.getSuccessToast("User details updated successfully.");
|
|
967
|
+
this.activeModal.close('submit');
|
|
968
|
+
}
|
|
969
|
+
else {
|
|
970
|
+
this.ts.getErrorToast("Unable to update User!");
|
|
971
|
+
this.activeModal.close();
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
error: (err) => {
|
|
975
|
+
this.ts.getErrorToast(err?.error?.error ? err?.error?.error : "Unable to update User!");
|
|
976
|
+
this.activeModal.close();
|
|
977
|
+
},
|
|
978
|
+
complete: () => { },
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
error: (err) => {
|
|
983
|
+
this.ts.getErrorToast(err?.error?.error ? err?.error?.error : "Unable to update User!");
|
|
984
|
+
this.activeModal.close();
|
|
985
|
+
},
|
|
986
|
+
complete: () => { },
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
else {
|
|
990
|
+
// this.activeModal.close();
|
|
991
|
+
const modalRef = this.modalService.open(AlertPopupComponent, { centered: true, size: 'md', backdrop: "static" });
|
|
992
|
+
modalRef.componentInstance.user = this.user;
|
|
993
|
+
modalRef.result.then((result) => {
|
|
994
|
+
if (result === 'submit') {
|
|
995
|
+
// user.teamLead = []
|
|
996
|
+
this.service.updateUsers(user).subscribe({
|
|
997
|
+
next: (res) => {
|
|
998
|
+
if (res && res.code == 200) {
|
|
999
|
+
this.ts.getSuccessToast("User details updated successfully.");
|
|
1000
|
+
this.activeModal.close('submit');
|
|
1001
|
+
}
|
|
1002
|
+
else {
|
|
1003
|
+
this.ts.getErrorToast("Unable to update User!");
|
|
1004
|
+
this.activeModal.close();
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
error: (err) => {
|
|
1008
|
+
this.ts.getErrorToast(err?.error?.error ? err?.error?.error : "Unable to update User!");
|
|
1009
|
+
this.activeModal.close();
|
|
1010
|
+
},
|
|
1011
|
+
complete: () => { },
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
else {
|
|
1018
|
+
this.service.updateUsers(user).subscribe({
|
|
1019
|
+
next: (res) => {
|
|
1020
|
+
if (res && res.code == 200) {
|
|
1021
|
+
this.ts.getSuccessToast("User details updated successfully.");
|
|
1022
|
+
this.activeModal.close('submit');
|
|
1023
|
+
}
|
|
1024
|
+
else {
|
|
1025
|
+
this.ts.getErrorToast("Unable to update User!");
|
|
1026
|
+
this.activeModal.close();
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
1029
|
+
error: (err) => {
|
|
1030
|
+
this.ts.getErrorToast(err?.error?.error ? err?.error?.error : "Unable to update User!");
|
|
1031
|
+
this.activeModal.close();
|
|
1032
|
+
},
|
|
1033
|
+
complete: () => { },
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
820
1036
|
}
|
|
821
1037
|
updatePermissionsBasedOnUserType(user) {
|
|
822
1038
|
user.rolespermission.forEach((feature) => {
|
|
823
1039
|
feature.modules.forEach((modules) => {
|
|
824
|
-
// if (user.userType === "superAdmin") {
|
|
825
|
-
// modules.isAdd = true;
|
|
826
|
-
// modules.isEdit = true;
|
|
827
|
-
// // modules.isDelete = true;
|
|
828
|
-
// } else
|
|
829
1040
|
if (user.userType === "users") {
|
|
830
1041
|
modules.isAdd = false;
|
|
831
1042
|
modules.isEdit = false;
|
|
832
|
-
// modules.isDelete = false;
|
|
833
1043
|
}
|
|
834
1044
|
});
|
|
835
1045
|
});
|
|
@@ -915,13 +1125,13 @@ class AddUsersComponent {
|
|
|
915
1125
|
preventClose(event) {
|
|
916
1126
|
event.preventDefault();
|
|
917
1127
|
}
|
|
918
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AddUsersComponent, deps: [{ token: ManageUsersService }, { token: i0.ChangeDetectorRef }, { token: i1$1.NgbActiveModal }, { token: i3.FormBuilder }, { token: UserService }, { token: i4.ToastService }, { token: i2.GlobalStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
919
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AddUsersComponent, selector: "lib-add-users", inputs: { type: "type", user: "user", userType: "userType", data: "data" }, ngImport: i0, template: "<div class=\"card pt-0 pb-3 scroll\">\r\n <div class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5 d-flex\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <img alt=\"Pic\" src=\"./assets/tango/Icons/add-store-icon.svg\">\r\n </div>\r\n \r\n </div>\r\n <div class=\"row w-100\">\r\n <div *ngIf=\"type!=='view' && type!=='edit'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Add\r\n User</a>\r\n <div class=\"sub-title\">Please add your user details</div>\r\n </div>\r\n <!-- <div *ngIf=\"type==='edit'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Edit User Details</a>\r\n <div class=\"sub-title\">Please Edit your user details</div>\r\n </div> -->\r\n <div *ngIf=\"type==='view' && type !=='edit'\" class=\"col-md-9\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">User Details</a>\r\n <div class=\"sub-title\">View your user details</div>\r\n </div>\r\n <ng-container *ngIf=\"operationType!=='view'\">\r\n <div *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit && type ==='view' && type !=='edit' && user?.role !== 'superadmin' && user?.isActive == true\" class=\"col-md-3 text-end px-0\" (click)=\"editUser()\">\r\n <button class=\"btn btn-outline\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 20 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_3833_85908)\">\r\n <path\r\n d=\"M9.16602 3.3332H3.33268C2.89065 3.3332 2.46673 3.50879 2.15417 3.82135C1.84161 4.13391 1.66602 4.55784 1.66602 4.99986V16.6665C1.66602 17.1086 1.84161 17.5325 2.15417 17.845C2.46673 18.1576 2.89065 18.3332 3.33268 18.3332H14.9993C15.4414 18.3332 15.8653 18.1576 16.1779 17.845C16.4904 17.5325 16.666 17.1086 16.666 16.6665V10.8332M15.416 2.0832C15.7475 1.75168 16.1972 1.56543 16.666 1.56543C17.1349 1.56543 17.5845 1.75168 17.916 2.0832C18.2475 2.41472 18.4338 2.86436 18.4338 3.3332C18.4338 3.80204 18.2475 4.25168 17.916 4.5832L9.99935 12.4999L6.66602 13.3332L7.49935 9.99986L15.416 2.0832Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_3833_85908\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></button>\r\n </div>\r\n </ng-container>\r\n <div *ngIf=\"type==='edit' && type !=='view'\" class=\"col-md-9\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">User Details</a>\r\n <div class=\"sub-title\">Edit your user details</div>\r\n </div>\r\n <div class=\"w-100 h-0px scroll\">\r\n <div class=\"mt-5\" *ngIf=\"userForm\">\r\n <form [formGroup]=\"userForm\" novalidate=\"novalidate\" (keydown.enter)=\"preventClose($event)\" class=\"\">\r\n <div class=\"row px-0 me-3\">\r\n <!-- User Name Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"username\" class=\"form-label\">User Name <span class=\"alert-required text-danger\">*</span></label>\r\n <input type=\"text\" class=\"form-control\" id=\"username\" formControlName=\"userName\" autocomplete=\"off\" (keypress)=\"omitSpecialChar($event)\" (paste)=\"omitSpecialCharPaste($event)\">\r\n <div *ngIf=\"userForm.get('userName')?.invalid && (userForm.get('userName')?.dirty)\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('userName')?.errors?.['required']\">User Name is required.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Email Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"email\" class=\"form-label\">Email <span class=\"alert-required text-danger\">*</span></label>\r\n <input type=\"email\" class=\"form-control\" id=\"email\" formControlName=\"email\" autocomplete=\"off\">\r\n <div *ngIf=\"userForm.get('email')?.invalid && userForm.get('email')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('email')?.errors?.['required']\">Email is required.</small>\r\n <small *ngIf=\"userForm.get('email')?.errors?.['pattern']\">Invalid email format.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Contact Number Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"contact\" class=\"form-label\">Contact Number <span class=\"alert-required text-danger\">*</span></label>\r\n <div class=\"row\">\r\n <div class=\"col-md-12 col-lg-4 col-xl-4\">\r\n <select class=\"form-select ps-3 pe-8\" id=\"inputGroupSelect01\" formControlName=\"countryCode\">\r\n <option *ngFor=\"let country of countryList\" [value]=\"country.phonecode\">\r\n {{country.name}} ({{country.phonecode}})\r\n </option>\r\n </select>\r\n </div>\r\n <div class=\"col-md-12 col-lg-8 col-xl-8\">\r\n <input type=\"text\" class=\"form-control\" (keypress)=\"omit_special_char($event)\"\r\n id=\"mobileNumber\" autocomplete=\"off\" formControlName=\"mobileNumber\" minlength=\"8\" maxlength=\"13\">\r\n <div *ngIf=\"userForm.get('mobileNumber')?.invalid && userForm.get('mobileNumber')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['required']\">Contact Number is required.</small>\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['minlength']\">Contact Number must be at least 8 digits.</small>\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['maxlength']\">Contact Number cannot exceed 13 digits.</small>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- Role Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"role\" class=\"form-label\">Role <span class=\"alert-required text-danger\">*</span></label>\r\n <select class=\"form-select\" formControlName=\"role\" (change)=\"onRoleChange(userForm.get('role')?.value)\">\r\n <option value=\"admin\">Admin</option>\r\n <option value=\"user\">User</option>\r\n </select>\r\n <div *ngIf=\"userForm.get('role')?.invalid && userForm.get('role')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('role')?.errors?.['required']\">Role is required.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Add to Team Field -->\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\" *ngIf=\"this.userType !=='tango'\">\r\n <label for=\"teamLead\" class=\"form-label teams-title\">Add to a team</label>\r\n <team-select [items]=\"teamList\" [multi]=\"true\" [searchField]=\"'teamName'\" [idField]=\"'_id'\" [disabled]=\"type === 'view' ? true : false\"\r\n (selected)=\"onStoreSelect($event)\" [selectedValues]=\"selectedUser\"></team-select>\r\n </div>\r\n </div>\r\n \r\n <div *ngIf=\"userForm.get('role')?.value === 'admin'\">\r\n\r\n <h3 class=\"teams-title\" *ngIf=\"getPermissions().length\">Access for Admin</h3>\r\n <ng-container *ngIf=\"getPermissions().length\">\r\n <ng-container formArrayName=\"rolespermission\">\r\n <ng-container *ngFor=\"let rolespermission of getPermissions().controls; let i = index\" [formGroupName]=\"i\">\r\n <div class=\"table-responsive my-2 me-3\">\r\n <div class=\"row w-100\">\r\n <div class=\"title-header mt-4 ms-2\">\r\n {{ camelCaseToText(rolespermission.get('featureName')?.value) }}\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"rolespermission.get('modules')\" formArrayName=\"modules\">\r\n <ng-container *ngFor=\"let modules of getFeaturePermissions(rolespermission)?.controls; let j = index\" [formGroupName]=\"j\">\r\n <table class=\"w-100\">\r\n <tbody>\r\n <tr *ngIf=\"rolespermission.get('featureName')?.value !== 'TangoAdmin'\">\r\n <td class=\"w-50\">{{ camelCaseToText(modules.get('name')?.value) }}</td>\r\n <td class=\"text-start\">\r\n <div class=\"d-inline-flex align-items-center\">\r\n <input type=\"checkbox\" formControlName=\"isAdd\" class=\"cursor-pointer\" (change)=\"handleViewChange(modules)\">\r\n <label class=\"global-label ms-2 mt-auto\">Add</label>\r\n </div>\r\n </td>\r\n <td class=\"text-start\">\r\n <div class=\"d-inline-flex align-items-center\">\r\n <input formControlName=\"isEdit\" type=\"checkbox\" class=\"cursor-pointer\" (change)=\"handleEditChange(modules)\">\r\n <label class=\"global-label ms-2 mt-auto\">Edit</label>\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <div *ngIf=\"rolespermission.get('featureName')?.value === 'TangoAdmin'\" class=\"row w-100 text-nowrap\">\r\n <div class=\"col-md-4\" *ngFor=\"let modules of getFeaturePermissions(rolespermission)?.controls; let j = index\" [formGroupName]=\"j\">\r\n <div class=\"d-inline-flex mt-3\">\r\n <input type=\"checkbox\" class=\"cursor-pointer\" formControlName=\"isEdit\">\r\n <label class=\"global-label mb-5 mx-2 mt-1\" style=\"text-wrap:nowrap\">\r\n {{ camelCaseToText(modules.get('name')?.value) }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n </div>\r\n <div *ngIf=\"type!=='view'\" class=\"d-flex my-10\" role=\"group\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\"\r\n (click)=\"onSubmit()\" [disabled]=\"userForm.invalid || type === 'view'\">Submit</button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>", styles: [".scroll{overflow-y:auto;overflow-x:hidden}.title{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600;line-height:28px}.sub-title{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.teams-title{color:var(--Black, #101828)!important;font-size:18px!important;font-weight:600!important;line-height:28px}.title-header{border-radius:6px!important;border-bottom:2px solid var(--Gray-200, #EAECF0)!important;background:#f2f4f7!important;box-shadow:0 4px 10px #0000000d!important;color:var(--Black, #101828)!important;font-size:20px!important;font-weight:600;line-height:30px;padding:8px 16px}input[type=checkbox]{width:18px!important;height:18px!important;margin:5px;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0;padding-top:12px;padding-right:6px}.global-label{color:var(--Gray-700, #344054)!important;font-size:16px!important;font-weight:500;line-height:24px}.w-25{width:40%!important}td{color:var(--Black, #101828)!important;font-size:16px!important;font-weight:500!important;line-height:24px}tr,.add-team{border-bottom:1px solid var(--Gray-200, #EAECF0)!important}input[disabled]{pointer-events:none;opacity:.5}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: CustomSelectComponent, selector: "team-select", inputs: ["items", "searchField", "multi", "idField", "selectedValues", "disabled", "label"], outputs: ["selected", "deselected", "deselectedAll"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }] });
|
|
1128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AddUsersComponent, deps: [{ token: ManageUsersService }, { token: i0.ChangeDetectorRef }, { token: i1$1.NgbActiveModal }, { token: i3$1.FormBuilder }, { token: UserService }, { token: i4.ToastService }, { token: i2.GlobalStateService }, { token: i1$1.NgbModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
1129
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AddUsersComponent, selector: "lib-add-users", inputs: { type: "type", user: "user", userType: "userType", data: "data" }, ngImport: i0, template: "<div class=\"card pt-0 pb-3 scroll\">\r\n <div class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5 d-flex\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <img alt=\"Pic\" src=\"./assets/tango/Icons/add-store-icon.svg\">\r\n </div>\r\n \r\n </div>\r\n <div class=\"row w-100\">\r\n <div *ngIf=\"type!=='view' && type!=='edit'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Add\r\n User</a>\r\n <div class=\"sub-title\">Please add your user details</div>\r\n </div>\r\n <div *ngIf=\"type==='view' && type !=='edit'\" class=\"col-md-9\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">User Details</a>\r\n <div class=\"sub-title\">View your user details</div>\r\n </div>\r\n <ng-container *ngIf=\"operationType!=='view'\">\r\n <div *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit && type ==='view' && type !=='edit' && user?.role !== 'superadmin' && user?.isActive === true\" class=\"col-md-3 text-end px-0\" (click)=\"editUser()\">\r\n <button class=\"btn btn-outline\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 20 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_3833_85908)\">\r\n <path\r\n d=\"M9.16602 3.3332H3.33268C2.89065 3.3332 2.46673 3.50879 2.15417 3.82135C1.84161 4.13391 1.66602 4.55784 1.66602 4.99986V16.6665C1.66602 17.1086 1.84161 17.5325 2.15417 17.845C2.46673 18.1576 2.89065 18.3332 3.33268 18.3332H14.9993C15.4414 18.3332 15.8653 18.1576 16.1779 17.845C16.4904 17.5325 16.666 17.1086 16.666 16.6665V10.8332M15.416 2.0832C15.7475 1.75168 16.1972 1.56543 16.666 1.56543C17.1349 1.56543 17.5845 1.75168 17.916 2.0832C18.2475 2.41472 18.4338 2.86436 18.4338 3.3332C18.4338 3.80204 18.2475 4.25168 17.916 4.5832L9.99935 12.4999L6.66602 13.3332L7.49935 9.99986L15.416 2.0832Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_3833_85908\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></button>\r\n </div>\r\n </ng-container>\r\n <div *ngIf=\"type==='edit' && type !=='view'\" class=\"col-md-9\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">User Details</a>\r\n <div class=\"sub-title\">Edit your user details</div>\r\n </div>\r\n <div class=\"w-100 h-0px scroll\">\r\n <div class=\"mt-5\" *ngIf=\"userForm\">\r\n <form [formGroup]=\"userForm\" novalidate=\"novalidate\" (keydown.enter)=\"preventClose($event)\" class=\"\">\r\n <div class=\"row px-0 me-3\">\r\n <!-- User Name Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"username\" class=\"form-label\">User Name <span class=\"alert-required text-danger\">*</span></label>\r\n <input type=\"text\" class=\"form-control\" id=\"username\" formControlName=\"userName\" autocomplete=\"off\" (keypress)=\"omitSpecialChar($event)\" (paste)=\"omitSpecialCharPaste($event)\">\r\n <div *ngIf=\"userForm.get('userName')?.invalid && (userForm.get('userName')?.dirty)\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('userName')?.errors?.['required']\">User Name is required.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Email Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"email\" class=\"form-label\">Email <span class=\"alert-required text-danger\">*</span></label>\r\n <input type=\"email\" class=\"form-control\" id=\"email\" formControlName=\"email\" autocomplete=\"off\">\r\n <div *ngIf=\"userForm.get('email')?.invalid && userForm.get('email')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('email')?.errors?.['required']\">Email is required.</small>\r\n <small *ngIf=\"userForm.get('email')?.errors?.['pattern']\">Invalid email format.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Contact Number Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"contact\" class=\"form-label\">Contact Number <span class=\"alert-required text-danger\">*</span></label>\r\n <div class=\"row\">\r\n <div class=\"col-md-12 col-lg-4 col-xl-4\">\r\n <select class=\"form-select ps-3 pe-8\" id=\"inputGroupSelect01\" formControlName=\"countryCode\">\r\n <option *ngFor=\"let country of countryList\" [value]=\"country.phonecode\">\r\n {{country.name}} ({{country.phonecode}})\r\n </option>\r\n </select>\r\n </div>\r\n <div class=\"col-md-12 col-lg-8 col-xl-8\">\r\n <input type=\"text\" class=\"form-control\" (keypress)=\"omit_special_char($event)\"\r\n id=\"mobileNumber\" autocomplete=\"off\" formControlName=\"mobileNumber\" minlength=\"8\" maxlength=\"13\">\r\n <div *ngIf=\"userForm.get('mobileNumber')?.invalid && userForm.get('mobileNumber')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['required']\">Contact Number is required.</small>\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['minlength']\">Contact Number must be at least 8 digits.</small>\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['maxlength']\">Contact Number cannot exceed 13 digits.</small>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- Role Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"role\" class=\"form-label\">Role <span class=\"alert-required text-danger\">*</span></label>\r\n <select class=\"form-select\" formControlName=\"role\" (change)=\"onRoleChange(userForm.get('role')?.value)\">\r\n <option value=\"admin\">Admin</option>\r\n <option value=\"user\">User</option>\r\n </select>\r\n <div *ngIf=\"userForm.get('role')?.invalid && userForm.get('role')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('role')?.errors?.['required']\">Role is required.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Add to Team Field -->\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\" *ngIf=\"this.userType !=='tango'\">\r\n <label for=\"teamLead\" class=\"form-label teams-title\">Add to a team</label>\r\n <team-select [items]=\"teamList\" [multi]=\"true\" [searchField]=\"'teamName'\" [idField]=\"'_id'\" [disabled]=\"type === 'view' ? true : false\"\r\n (selected)=\"onStoreSelect($event)\" [selectedValues]=\"selectedUser\"></team-select>\r\n </div>\r\n </div>\r\n \r\n <div *ngIf=\"userForm.get('role')?.value === 'admin'\">\r\n\r\n <h3 class=\"teams-title\" *ngIf=\"getPermissions().length\">Access for Admin</h3>\r\n <ng-container *ngIf=\"getPermissions().length\">\r\n <ng-container formArrayName=\"rolespermission\">\r\n <ng-container *ngFor=\"let rolespermission of getPermissions().controls; let i = index\" [formGroupName]=\"i\">\r\n <div class=\"table-responsive my-2 me-3\">\r\n <div class=\"row w-100\">\r\n <div class=\"title-header mt-4 ms-2\">\r\n {{ camelCaseToText(rolespermission.get('featureName')?.value) }}\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"rolespermission.get('modules')\" formArrayName=\"modules\">\r\n <ng-container *ngFor=\"let modules of getFeaturePermissions(rolespermission)?.controls; let j = index\" [formGroupName]=\"j\">\r\n <table class=\"w-100\">\r\n <tbody>\r\n <tr *ngIf=\"rolespermission.get('featureName')?.value !== 'TangoAdmin'\">\r\n <td class=\"w-50\">{{ camelCaseToText(modules.get('name')?.value) }}</td>\r\n <td class=\"text-start\">\r\n <div class=\"d-inline-flex align-items-center\">\r\n <input type=\"checkbox\" formControlName=\"isAdd\" class=\"cursor-pointer\" (change)=\"handleViewChange(modules)\">\r\n <label class=\"global-label ms-2 mt-auto\">Add</label>\r\n </div>\r\n </td>\r\n <td class=\"text-start\">\r\n <div class=\"d-inline-flex align-items-center\">\r\n <input formControlName=\"isEdit\" type=\"checkbox\" class=\"cursor-pointer\" (change)=\"handleEditChange(modules)\">\r\n <label class=\"global-label ms-2 mt-auto\">Edit</label>\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <div *ngIf=\"rolespermission.get('featureName')?.value === 'TangoAdmin'\" class=\"row w-100 text-nowrap\">\r\n <div class=\"col-md-4\" *ngFor=\"let modules of getFeaturePermissions(rolespermission)?.controls; let j = index\" [formGroupName]=\"j\">\r\n <div class=\"d-inline-flex mt-3\">\r\n <input type=\"checkbox\" class=\"cursor-pointer\" formControlName=\"isEdit\">\r\n <label class=\"global-label mb-5 mx-2 mt-1\" style=\"text-wrap:nowrap\">\r\n {{ camelCaseToText(modules.get('name')?.value) }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n </div>\r\n <div *ngIf=\"type!=='view'\" class=\"d-flex my-10\" role=\"group\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\"\r\n (click)=\"onSubmit()\" [disabled]=\"userForm.invalid || type === 'view'\">Submit</button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>", styles: [".scroll{overflow-y:auto;overflow-x:hidden}.title{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600;line-height:28px}.sub-title{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.teams-title{color:var(--Black, #101828)!important;font-size:18px!important;font-weight:600!important;line-height:28px}.title-header{border-radius:6px!important;border-bottom:2px solid var(--Gray-200, #EAECF0)!important;background:#f2f4f7!important;box-shadow:0 4px 10px #0000000d!important;color:var(--Black, #101828)!important;font-size:20px!important;font-weight:600;line-height:30px;padding:8px 16px}input[type=checkbox]{width:18px!important;height:18px!important;margin:5px;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0;padding-top:12px;padding-right:6px}.global-label{color:var(--Gray-700, #344054)!important;font-size:16px!important;font-weight:500;line-height:24px}.w-25{width:40%!important}td{color:var(--Black, #101828)!important;font-size:16px!important;font-weight:500!important;line-height:24px}tr,.add-team{border-bottom:1px solid var(--Gray-200, #EAECF0)!important}input[disabled]{pointer-events:none;opacity:.5}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i3$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: CustomSelectComponent, selector: "team-select", inputs: ["items", "searchField", "multi", "idField", "selectedValues", "disabled", "label"], outputs: ["selected", "deselected", "deselectedAll"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }] });
|
|
920
1130
|
}
|
|
921
1131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AddUsersComponent, decorators: [{
|
|
922
1132
|
type: Component,
|
|
923
|
-
args: [{ selector: 'lib-add-users', template: "<div class=\"card pt-0 pb-3 scroll\">\r\n <div class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5 d-flex\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <img alt=\"Pic\" src=\"./assets/tango/Icons/add-store-icon.svg\">\r\n </div>\r\n \r\n </div>\r\n <div class=\"row w-100\">\r\n <div *ngIf=\"type!=='view' && type!=='edit'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Add\r\n User</a>\r\n <div class=\"sub-title\">Please add your user details</div>\r\n </div>\r\n <!-- <div *ngIf=\"type==='edit'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Edit User Details</a>\r\n <div class=\"sub-title\">Please Edit your user details</div>\r\n </div> -->\r\n <div *ngIf=\"type==='view' && type !=='edit'\" class=\"col-md-9\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">User Details</a>\r\n <div class=\"sub-title\">View your user details</div>\r\n </div>\r\n <ng-container *ngIf=\"operationType!=='view'\">\r\n <div *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit && type ==='view' && type !=='edit' && user?.role !== 'superadmin' && user?.isActive == true\" class=\"col-md-3 text-end px-0\" (click)=\"editUser()\">\r\n <button class=\"btn btn-outline\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 20 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_3833_85908)\">\r\n <path\r\n d=\"M9.16602 3.3332H3.33268C2.89065 3.3332 2.46673 3.50879 2.15417 3.82135C1.84161 4.13391 1.66602 4.55784 1.66602 4.99986V16.6665C1.66602 17.1086 1.84161 17.5325 2.15417 17.845C2.46673 18.1576 2.89065 18.3332 3.33268 18.3332H14.9993C15.4414 18.3332 15.8653 18.1576 16.1779 17.845C16.4904 17.5325 16.666 17.1086 16.666 16.6665V10.8332M15.416 2.0832C15.7475 1.75168 16.1972 1.56543 16.666 1.56543C17.1349 1.56543 17.5845 1.75168 17.916 2.0832C18.2475 2.41472 18.4338 2.86436 18.4338 3.3332C18.4338 3.80204 18.2475 4.25168 17.916 4.5832L9.99935 12.4999L6.66602 13.3332L7.49935 9.99986L15.416 2.0832Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_3833_85908\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></button>\r\n </div>\r\n </ng-container>\r\n <div *ngIf=\"type==='edit' && type !=='view'\" class=\"col-md-9\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">User Details</a>\r\n <div class=\"sub-title\">Edit your user details</div>\r\n </div>\r\n <div class=\"w-100 h-0px scroll\">\r\n <div class=\"mt-5\" *ngIf=\"userForm\">\r\n <form [formGroup]=\"userForm\" novalidate=\"novalidate\" (keydown.enter)=\"preventClose($event)\" class=\"\">\r\n <div class=\"row px-0 me-3\">\r\n <!-- User Name Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"username\" class=\"form-label\">User Name <span class=\"alert-required text-danger\">*</span></label>\r\n <input type=\"text\" class=\"form-control\" id=\"username\" formControlName=\"userName\" autocomplete=\"off\" (keypress)=\"omitSpecialChar($event)\" (paste)=\"omitSpecialCharPaste($event)\">\r\n <div *ngIf=\"userForm.get('userName')?.invalid && (userForm.get('userName')?.dirty)\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('userName')?.errors?.['required']\">User Name is required.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Email Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"email\" class=\"form-label\">Email <span class=\"alert-required text-danger\">*</span></label>\r\n <input type=\"email\" class=\"form-control\" id=\"email\" formControlName=\"email\" autocomplete=\"off\">\r\n <div *ngIf=\"userForm.get('email')?.invalid && userForm.get('email')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('email')?.errors?.['required']\">Email is required.</small>\r\n <small *ngIf=\"userForm.get('email')?.errors?.['pattern']\">Invalid email format.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Contact Number Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"contact\" class=\"form-label\">Contact Number <span class=\"alert-required text-danger\">*</span></label>\r\n <div class=\"row\">\r\n <div class=\"col-md-12 col-lg-4 col-xl-4\">\r\n <select class=\"form-select ps-3 pe-8\" id=\"inputGroupSelect01\" formControlName=\"countryCode\">\r\n <option *ngFor=\"let country of countryList\" [value]=\"country.phonecode\">\r\n {{country.name}} ({{country.phonecode}})\r\n </option>\r\n </select>\r\n </div>\r\n <div class=\"col-md-12 col-lg-8 col-xl-8\">\r\n <input type=\"text\" class=\"form-control\" (keypress)=\"omit_special_char($event)\"\r\n id=\"mobileNumber\" autocomplete=\"off\" formControlName=\"mobileNumber\" minlength=\"8\" maxlength=\"13\">\r\n <div *ngIf=\"userForm.get('mobileNumber')?.invalid && userForm.get('mobileNumber')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['required']\">Contact Number is required.</small>\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['minlength']\">Contact Number must be at least 8 digits.</small>\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['maxlength']\">Contact Number cannot exceed 13 digits.</small>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- Role Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"role\" class=\"form-label\">Role <span class=\"alert-required text-danger\">*</span></label>\r\n <select class=\"form-select\" formControlName=\"role\" (change)=\"onRoleChange(userForm.get('role')?.value)\">\r\n <option value=\"admin\">Admin</option>\r\n <option value=\"user\">User</option>\r\n </select>\r\n <div *ngIf=\"userForm.get('role')?.invalid && userForm.get('role')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('role')?.errors?.['required']\">Role is required.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Add to Team Field -->\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\" *ngIf=\"this.userType !=='tango'\">\r\n <label for=\"teamLead\" class=\"form-label teams-title\">Add to a team</label>\r\n <team-select [items]=\"teamList\" [multi]=\"true\" [searchField]=\"'teamName'\" [idField]=\"'_id'\" [disabled]=\"type === 'view' ? true : false\"\r\n (selected)=\"onStoreSelect($event)\" [selectedValues]=\"selectedUser\"></team-select>\r\n </div>\r\n </div>\r\n \r\n <div *ngIf=\"userForm.get('role')?.value === 'admin'\">\r\n\r\n <h3 class=\"teams-title\" *ngIf=\"getPermissions().length\">Access for Admin</h3>\r\n <ng-container *ngIf=\"getPermissions().length\">\r\n <ng-container formArrayName=\"rolespermission\">\r\n <ng-container *ngFor=\"let rolespermission of getPermissions().controls; let i = index\" [formGroupName]=\"i\">\r\n <div class=\"table-responsive my-2 me-3\">\r\n <div class=\"row w-100\">\r\n <div class=\"title-header mt-4 ms-2\">\r\n {{ camelCaseToText(rolespermission.get('featureName')?.value) }}\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"rolespermission.get('modules')\" formArrayName=\"modules\">\r\n <ng-container *ngFor=\"let modules of getFeaturePermissions(rolespermission)?.controls; let j = index\" [formGroupName]=\"j\">\r\n <table class=\"w-100\">\r\n <tbody>\r\n <tr *ngIf=\"rolespermission.get('featureName')?.value !== 'TangoAdmin'\">\r\n <td class=\"w-50\">{{ camelCaseToText(modules.get('name')?.value) }}</td>\r\n <td class=\"text-start\">\r\n <div class=\"d-inline-flex align-items-center\">\r\n <input type=\"checkbox\" formControlName=\"isAdd\" class=\"cursor-pointer\" (change)=\"handleViewChange(modules)\">\r\n <label class=\"global-label ms-2 mt-auto\">Add</label>\r\n </div>\r\n </td>\r\n <td class=\"text-start\">\r\n <div class=\"d-inline-flex align-items-center\">\r\n <input formControlName=\"isEdit\" type=\"checkbox\" class=\"cursor-pointer\" (change)=\"handleEditChange(modules)\">\r\n <label class=\"global-label ms-2 mt-auto\">Edit</label>\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <div *ngIf=\"rolespermission.get('featureName')?.value === 'TangoAdmin'\" class=\"row w-100 text-nowrap\">\r\n <div class=\"col-md-4\" *ngFor=\"let modules of getFeaturePermissions(rolespermission)?.controls; let j = index\" [formGroupName]=\"j\">\r\n <div class=\"d-inline-flex mt-3\">\r\n <input type=\"checkbox\" class=\"cursor-pointer\" formControlName=\"isEdit\">\r\n <label class=\"global-label mb-5 mx-2 mt-1\" style=\"text-wrap:nowrap\">\r\n {{ camelCaseToText(modules.get('name')?.value) }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n </div>\r\n <div *ngIf=\"type!=='view'\" class=\"d-flex my-10\" role=\"group\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\"\r\n (click)=\"onSubmit()\" [disabled]=\"userForm.invalid || type === 'view'\">Submit</button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>", styles: [".scroll{overflow-y:auto;overflow-x:hidden}.title{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600;line-height:28px}.sub-title{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.teams-title{color:var(--Black, #101828)!important;font-size:18px!important;font-weight:600!important;line-height:28px}.title-header{border-radius:6px!important;border-bottom:2px solid var(--Gray-200, #EAECF0)!important;background:#f2f4f7!important;box-shadow:0 4px 10px #0000000d!important;color:var(--Black, #101828)!important;font-size:20px!important;font-weight:600;line-height:30px;padding:8px 16px}input[type=checkbox]{width:18px!important;height:18px!important;margin:5px;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0;padding-top:12px;padding-right:6px}.global-label{color:var(--Gray-700, #344054)!important;font-size:16px!important;font-weight:500;line-height:24px}.w-25{width:40%!important}td{color:var(--Black, #101828)!important;font-size:16px!important;font-weight:500!important;line-height:24px}tr,.add-team{border-bottom:1px solid var(--Gray-200, #EAECF0)!important}input[disabled]{pointer-events:none;opacity:.5}\n"] }]
|
|
924
|
-
}], ctorParameters: () => [{ type: ManageUsersService }, { type: i0.ChangeDetectorRef }, { type: i1$1.NgbActiveModal }, { type: i3.FormBuilder }, { type: UserService }, { type: i4.ToastService }, { type: i2.GlobalStateService }], propDecorators: { type: [{
|
|
1133
|
+
args: [{ selector: 'lib-add-users', template: "<div class=\"card pt-0 pb-3 scroll\">\r\n <div class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5 d-flex\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <img alt=\"Pic\" src=\"./assets/tango/Icons/add-store-icon.svg\">\r\n </div>\r\n \r\n </div>\r\n <div class=\"row w-100\">\r\n <div *ngIf=\"type!=='view' && type!=='edit'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Add\r\n User</a>\r\n <div class=\"sub-title\">Please add your user details</div>\r\n </div>\r\n <div *ngIf=\"type==='view' && type !=='edit'\" class=\"col-md-9\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">User Details</a>\r\n <div class=\"sub-title\">View your user details</div>\r\n </div>\r\n <ng-container *ngIf=\"operationType!=='view'\">\r\n <div *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit && type ==='view' && type !=='edit' && user?.role !== 'superadmin' && user?.isActive === true\" class=\"col-md-3 text-end px-0\" (click)=\"editUser()\">\r\n <button class=\"btn btn-outline\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 20 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_3833_85908)\">\r\n <path\r\n d=\"M9.16602 3.3332H3.33268C2.89065 3.3332 2.46673 3.50879 2.15417 3.82135C1.84161 4.13391 1.66602 4.55784 1.66602 4.99986V16.6665C1.66602 17.1086 1.84161 17.5325 2.15417 17.845C2.46673 18.1576 2.89065 18.3332 3.33268 18.3332H14.9993C15.4414 18.3332 15.8653 18.1576 16.1779 17.845C16.4904 17.5325 16.666 17.1086 16.666 16.6665V10.8332M15.416 2.0832C15.7475 1.75168 16.1972 1.56543 16.666 1.56543C17.1349 1.56543 17.5845 1.75168 17.916 2.0832C18.2475 2.41472 18.4338 2.86436 18.4338 3.3332C18.4338 3.80204 18.2475 4.25168 17.916 4.5832L9.99935 12.4999L6.66602 13.3332L7.49935 9.99986L15.416 2.0832Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_3833_85908\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></button>\r\n </div>\r\n </ng-container>\r\n <div *ngIf=\"type==='edit' && type !=='view'\" class=\"col-md-9\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">User Details</a>\r\n <div class=\"sub-title\">Edit your user details</div>\r\n </div>\r\n <div class=\"w-100 h-0px scroll\">\r\n <div class=\"mt-5\" *ngIf=\"userForm\">\r\n <form [formGroup]=\"userForm\" novalidate=\"novalidate\" (keydown.enter)=\"preventClose($event)\" class=\"\">\r\n <div class=\"row px-0 me-3\">\r\n <!-- User Name Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"username\" class=\"form-label\">User Name <span class=\"alert-required text-danger\">*</span></label>\r\n <input type=\"text\" class=\"form-control\" id=\"username\" formControlName=\"userName\" autocomplete=\"off\" (keypress)=\"omitSpecialChar($event)\" (paste)=\"omitSpecialCharPaste($event)\">\r\n <div *ngIf=\"userForm.get('userName')?.invalid && (userForm.get('userName')?.dirty)\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('userName')?.errors?.['required']\">User Name is required.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Email Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"email\" class=\"form-label\">Email <span class=\"alert-required text-danger\">*</span></label>\r\n <input type=\"email\" class=\"form-control\" id=\"email\" formControlName=\"email\" autocomplete=\"off\">\r\n <div *ngIf=\"userForm.get('email')?.invalid && userForm.get('email')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('email')?.errors?.['required']\">Email is required.</small>\r\n <small *ngIf=\"userForm.get('email')?.errors?.['pattern']\">Invalid email format.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Contact Number Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"contact\" class=\"form-label\">Contact Number <span class=\"alert-required text-danger\">*</span></label>\r\n <div class=\"row\">\r\n <div class=\"col-md-12 col-lg-4 col-xl-4\">\r\n <select class=\"form-select ps-3 pe-8\" id=\"inputGroupSelect01\" formControlName=\"countryCode\">\r\n <option *ngFor=\"let country of countryList\" [value]=\"country.phonecode\">\r\n {{country.name}} ({{country.phonecode}})\r\n </option>\r\n </select>\r\n </div>\r\n <div class=\"col-md-12 col-lg-8 col-xl-8\">\r\n <input type=\"text\" class=\"form-control\" (keypress)=\"omit_special_char($event)\"\r\n id=\"mobileNumber\" autocomplete=\"off\" formControlName=\"mobileNumber\" minlength=\"8\" maxlength=\"13\">\r\n <div *ngIf=\"userForm.get('mobileNumber')?.invalid && userForm.get('mobileNumber')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['required']\">Contact Number is required.</small>\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['minlength']\">Contact Number must be at least 8 digits.</small>\r\n <small *ngIf=\"userForm.get('mobileNumber')?.errors?.['maxlength']\">Contact Number cannot exceed 13 digits.</small>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- Role Field -->\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"role\" class=\"form-label\">Role <span class=\"alert-required text-danger\">*</span></label>\r\n <select class=\"form-select\" formControlName=\"role\" (change)=\"onRoleChange(userForm.get('role')?.value)\">\r\n <option value=\"admin\">Admin</option>\r\n <option value=\"user\">User</option>\r\n </select>\r\n <div *ngIf=\"userForm.get('role')?.invalid && userForm.get('role')?.touched\" class=\"text-danger\">\r\n <small *ngIf=\"userForm.get('role')?.errors?.['required']\">Role is required.</small>\r\n </div>\r\n </div>\r\n \r\n <!-- Add to Team Field -->\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\" *ngIf=\"this.userType !=='tango'\">\r\n <label for=\"teamLead\" class=\"form-label teams-title\">Add to a team</label>\r\n <team-select [items]=\"teamList\" [multi]=\"true\" [searchField]=\"'teamName'\" [idField]=\"'_id'\" [disabled]=\"type === 'view' ? true : false\"\r\n (selected)=\"onStoreSelect($event)\" [selectedValues]=\"selectedUser\"></team-select>\r\n </div>\r\n </div>\r\n \r\n <div *ngIf=\"userForm.get('role')?.value === 'admin'\">\r\n\r\n <h3 class=\"teams-title\" *ngIf=\"getPermissions().length\">Access for Admin</h3>\r\n <ng-container *ngIf=\"getPermissions().length\">\r\n <ng-container formArrayName=\"rolespermission\">\r\n <ng-container *ngFor=\"let rolespermission of getPermissions().controls; let i = index\" [formGroupName]=\"i\">\r\n <div class=\"table-responsive my-2 me-3\">\r\n <div class=\"row w-100\">\r\n <div class=\"title-header mt-4 ms-2\">\r\n {{ camelCaseToText(rolespermission.get('featureName')?.value) }}\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"rolespermission.get('modules')\" formArrayName=\"modules\">\r\n <ng-container *ngFor=\"let modules of getFeaturePermissions(rolespermission)?.controls; let j = index\" [formGroupName]=\"j\">\r\n <table class=\"w-100\">\r\n <tbody>\r\n <tr *ngIf=\"rolespermission.get('featureName')?.value !== 'TangoAdmin'\">\r\n <td class=\"w-50\">{{ camelCaseToText(modules.get('name')?.value) }}</td>\r\n <td class=\"text-start\">\r\n <div class=\"d-inline-flex align-items-center\">\r\n <input type=\"checkbox\" formControlName=\"isAdd\" class=\"cursor-pointer\" (change)=\"handleViewChange(modules)\">\r\n <label class=\"global-label ms-2 mt-auto\">Add</label>\r\n </div>\r\n </td>\r\n <td class=\"text-start\">\r\n <div class=\"d-inline-flex align-items-center\">\r\n <input formControlName=\"isEdit\" type=\"checkbox\" class=\"cursor-pointer\" (change)=\"handleEditChange(modules)\">\r\n <label class=\"global-label ms-2 mt-auto\">Edit</label>\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <div *ngIf=\"rolespermission.get('featureName')?.value === 'TangoAdmin'\" class=\"row w-100 text-nowrap\">\r\n <div class=\"col-md-4\" *ngFor=\"let modules of getFeaturePermissions(rolespermission)?.controls; let j = index\" [formGroupName]=\"j\">\r\n <div class=\"d-inline-flex mt-3\">\r\n <input type=\"checkbox\" class=\"cursor-pointer\" formControlName=\"isEdit\">\r\n <label class=\"global-label mb-5 mx-2 mt-1\" style=\"text-wrap:nowrap\">\r\n {{ camelCaseToText(modules.get('name')?.value) }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n </div>\r\n <div *ngIf=\"type!=='view'\" class=\"d-flex my-10\" role=\"group\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\"\r\n (click)=\"onSubmit()\" [disabled]=\"userForm.invalid || type === 'view'\">Submit</button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>", styles: [".scroll{overflow-y:auto;overflow-x:hidden}.title{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600;line-height:28px}.sub-title{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.teams-title{color:var(--Black, #101828)!important;font-size:18px!important;font-weight:600!important;line-height:28px}.title-header{border-radius:6px!important;border-bottom:2px solid var(--Gray-200, #EAECF0)!important;background:#f2f4f7!important;box-shadow:0 4px 10px #0000000d!important;color:var(--Black, #101828)!important;font-size:20px!important;font-weight:600;line-height:30px;padding:8px 16px}input[type=checkbox]{width:18px!important;height:18px!important;margin:5px;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0;padding-top:12px;padding-right:6px}.global-label{color:var(--Gray-700, #344054)!important;font-size:16px!important;font-weight:500;line-height:24px}.w-25{width:40%!important}td{color:var(--Black, #101828)!important;font-size:16px!important;font-weight:500!important;line-height:24px}tr,.add-team{border-bottom:1px solid var(--Gray-200, #EAECF0)!important}input[disabled]{pointer-events:none;opacity:.5}\n"] }]
|
|
1134
|
+
}], ctorParameters: () => [{ type: ManageUsersService }, { type: i0.ChangeDetectorRef }, { type: i1$1.NgbActiveModal }, { type: i3$1.FormBuilder }, { type: UserService }, { type: i4.ToastService }, { type: i2.GlobalStateService }, { type: i1$1.NgbModal }], propDecorators: { type: [{
|
|
925
1135
|
type: Input
|
|
926
1136
|
}], user: [{
|
|
927
1137
|
type: Input
|
|
@@ -975,7 +1185,7 @@ class AddUserPopupComponent {
|
|
|
975
1185
|
expandedItems = [];
|
|
976
1186
|
showsingleuser = false;
|
|
977
1187
|
phoneRegex = /^(\d{3})?\d{15}$/;
|
|
978
|
-
emailRegex = /^[
|
|
1188
|
+
emailRegex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;
|
|
979
1189
|
userData;
|
|
980
1190
|
isExpanded = [];
|
|
981
1191
|
$headerFilters;
|
|
@@ -1051,7 +1261,7 @@ class AddUserPopupComponent {
|
|
|
1051
1261
|
this.userForm = this.fb.group({
|
|
1052
1262
|
userName: ["", Validators.required],
|
|
1053
1263
|
email: ["", Validators.compose([Validators.required,
|
|
1054
|
-
Validators.pattern("^[a-zA-Z0-9
|
|
1264
|
+
Validators.pattern("^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$"),
|
|
1055
1265
|
])],
|
|
1056
1266
|
mobileNumber: ["", [Validators.required, Validators.minLength(7), Validators.maxLength(13)]],
|
|
1057
1267
|
role: ["user", Validators.required],
|
|
@@ -1091,7 +1301,7 @@ class AddUserPopupComponent {
|
|
|
1091
1301
|
userName: [userData.userName, Validators.required],
|
|
1092
1302
|
email: [email, Validators.compose([
|
|
1093
1303
|
Validators.required,
|
|
1094
|
-
Validators.pattern("^[a-zA-Z0-9
|
|
1304
|
+
Validators.pattern("^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$"),
|
|
1095
1305
|
])],
|
|
1096
1306
|
mobileNumber: [mobile, [Validators.required, Validators.minLength(7), Validators.maxLength(13)]],
|
|
1097
1307
|
role: [userData.role, Validators.required],
|
|
@@ -1361,6 +1571,7 @@ class AddUserPopupComponent {
|
|
|
1361
1571
|
return `Invalid value for ${fieldName.toLowerCase()} in row ${row + 1}`;
|
|
1362
1572
|
}
|
|
1363
1573
|
if (regex && !regex.test(value.trim())) {
|
|
1574
|
+
console.log({ regex: regex, email: value, value: regex.test(value.trim()), msg: ".........1" });
|
|
1364
1575
|
return `Please enter valid ${fieldName.toLowerCase()} in row ${row + 1}`;
|
|
1365
1576
|
}
|
|
1366
1577
|
}
|
|
@@ -1408,13 +1619,13 @@ class AddUserPopupComponent {
|
|
|
1408
1619
|
.replace(/^./, (str) => str.toUpperCase())
|
|
1409
1620
|
.trim();
|
|
1410
1621
|
}
|
|
1411
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AddUserPopupComponent, deps: [{ token: i1$1.NgbActiveModal }, { token: i0.ChangeDetectorRef }, { token: i1$1.NgbModal }, { token: i3.FormBuilder }, { token: UserService }, { token: i4.ToastService }, { token: i2.GlobalStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1412
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: AddUserPopupComponent, selector: "lib-add-user-popup", inputs: { type: "type", user: "user", userType: "userType" }, outputs: { dataTosingleuser: "dataTosingleuser" }, viewQueries: [{ propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true }], ngImport: i0, template: "<div class=\"card py-0 scroll\">\r\n <div class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <!-- <div class=\"symbol symbol-75px symbol-circle\">\r\n <img alt=\"Pic\" src=\"./assets/tango/Icons/add-store-icon.svg\">\r\n </div> -->\r\n </div>\r\n <div class=\"row w-100\">\r\n <div *ngIf=\"operationType==='add'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Add\r\n User</a>\r\n <div class=\"sub-title\">Please add your user details</div>\r\n </div>\r\n <!-- <div *ngIf=\"operationType==='edit'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Edit User Details</a>\r\n <div class=\"sub-title\">Please Edit your user details</div>\r\n </div> -->\r\n <div *ngIf=\"operationType==='view'\" class=\"col-md-9\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">User Details</a>\r\n <div class=\"sub-title\">View your user details</div>\r\n </div>\r\n <!-- @if ((gs.userAccess | async)?.Global_User_isEdit) { -->\r\n <div *ngIf=\"operationType==='view' && (gs.userAccess | async)?.Global_User_isEdit\"\r\n class=\"col-md-3 text-end px-0\" (click)=\"editUser()\">\r\n <button class=\"btn btn-outline\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 20 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_3833_85908)\">\r\n <path\r\n d=\"M9.16602 3.3332H3.33268C2.89065 3.3332 2.46673 3.50879 2.15417 3.82135C1.84161 4.13391 1.66602 4.55784 1.66602 4.99986V16.6665C1.66602 17.1086 1.84161 17.5325 2.15417 17.845C2.46673 18.1576 2.89065 18.3332 3.33268 18.3332H14.9993C15.4414 18.3332 15.8653 18.1576 16.1779 17.845C16.4904 17.5325 16.666 17.1086 16.666 16.6665V10.8332M15.416 2.0832C15.7475 1.75168 16.1972 1.56543 16.666 1.56543C17.1349 1.56543 17.5845 1.75168 17.916 2.0832C18.2475 2.41472 18.4338 2.86436 18.4338 3.3332C18.4338 3.80204 18.2475 4.25168 17.916 4.5832L9.99935 12.4999L6.66602 13.3332L7.49935 9.99986L15.416 2.0832Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_3833_85908\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></button>\r\n </div>\r\n <!-- } -->\r\n </div>\r\n <div class=\"fw-bold text-gray-500 my-6\" *ngIf=\"!showsingleuser && this.operationType ==='add'\">\r\n <ul class=\"text-gray-400 fw-bold fs-6\">\r\n <li>Use the template to upload multiple users at once.</li>\r\n <li>Download the template here -\r\n <a [attr.href]=\"userType ==='tango' ? '../../../assets/files/TangoUsersTemplate.xlsx' : '../../../assets/files/UsersTemplate.xlsx'\"\r\n download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li>Add your data to the Template File</li>\r\n <li>Upload it below for processing</li>\r\n\r\n </ul>\r\n </div>\r\n <div class=\"d-flex flex-center flex-wrap mb-5 w-100\" *ngIf=\"!showsingleuser && this.operationType ==='add'\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUpload($event)\" value=\"personal\" class=\"btn-check\" ng-reflect-name=\"accountType\"\r\n ng-reflect-form-control-name=\"accountType\" ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_create_account_form_account_type_personal\"\r\n class=\"btn btn-outline bg-primary btn-outline-default rounded-3 w-100 p-4 mt-5\"><span\r\n class=\"fw-bold fs-4\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <path\r\n d=\"M18 12.5V15.8333C18 16.2754 17.8244 16.6993 17.5118 17.0118C17.1993 17.3244 16.7754 17.5 16.3333 17.5H4.66667C4.22464 17.5 3.80072 17.3244 3.48816 17.0118C3.17559 16.6993 3 16.2754 3 15.8333V12.5M14.6667 6.66667L10.5 2.5M10.5 2.5L6.33333 6.66667M10.5 2.5V12.5\"\r\n stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> <span class=\"text-white mx-2 single-user\">Add Multiple Users</span></span>\r\n </label>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"mx-2 orval\">Or </span>\r\n </p>\r\n <input type=\"radio\" id=\"kt_account_team_size_select_1\" value=\"1-1\" (click)=\"addSingleUser()\"\r\n class=\"btn-check ng-untouched ng-pristine ng-valid\" />\r\n <label for=\"kt_account_team_size_select_1\"\r\n class=\"btn btn-outline btn-outline-default rounded-3 w-100 p-4 mt-3\"><span class=\"fw-bold fs-4\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\" fill=\"none\">\r\n <path\r\n d=\"M17.1663 17.5V15.8333C17.1663 14.9493 16.8152 14.1014 16.19 13.4763C15.5649 12.8512 14.7171 12.5 13.833 12.5H7.16634C6.28229 12.5 5.43444 12.8512 4.80932 13.4763C4.1842 14.1014 3.83301 14.9493 3.83301 15.8333V17.5M13.833 5.83333C13.833 7.67428 12.3406 9.16667 10.4997 9.16667C8.65873 9.16667 7.16634 7.67428 7.16634 5.83333C7.16634 3.99238 8.65873 2.5 10.4997 2.5C12.3406 2.5 13.833 3.99238 13.833 5.83333Z\"\r\n stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span id=\"triggerButtonId\" class=\"mx-2 single-user fw-bold\">Add Single\r\n User</span></span></label>\r\n </div>\r\n\r\n <div class=\"w-100 h-500px scroll\" *ngIf=\"showsingleuser\">\r\n <div class=\"mt-5\" *ngIf=\"userForm\">\r\n <form [formGroup]=\"userForm\" novalidate=\"novalidate\" class=\"\">\r\n <div class=\"row px-0 me-3\">\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"username\" class=\"form-label\">User Name</label>\r\n <input type=\"text\" class=\"form-control\" id=\"username\" formControlName=\"userName\"\r\n autocomplete=\"off\">\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"email\" class=\"form-label\">Email</label>\r\n <input type=\"email\" class=\"form-control\" id=\"email\" formControlName=\"email\"\r\n autocomplete=\"off\" required>\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"contact\" class=\"form-label\">Contact Number</label>\r\n <input type=\"text\" class=\"form-control\" id=\"contact\" formControlName=\"mobileNumber\"\r\n autocomplete=\"off\" required minlength=\"10\" maxlength=\"13\"\r\n (keypress)=\"omit_special_char($event)\">\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"role\" class=\"form-label\">Role</label>\r\n <select class=\"form-select\" formControlName=\"role\"\r\n (change)=\"onRoleChange(userForm.get('role')?.value)\">\r\n <option value=\"superadmin\">Super Admin</option>\r\n <option value=\"admin\">Admin</option>\r\n <option value=\"user\">User</option>\r\n </select>\r\n </div>\r\n <div *ngIf=\"userType === 'tango'\" class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"tangoUserType\" class=\"form-label\">User Type</label>\r\n <select class=\"form-select\" formControlName=\"tangoUserType\"\r\n (change)=\"onRoleChange(userForm.get('tangoUserType')?.value)\">\r\n <option value=\"dashboard\">Dashboard</option>\r\n <option value=\"audit\">Audit</option>\r\n </select>\r\n </div>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bolder mb-0 title cursor-pointer\">Access for\r\n {{userForm.get('role')?.value | titlecase}}</a>\r\n <div class=\"sub-title font-sub\">{{userForm.get('role')?.value | titlecase}} can access respective\r\n enabled features and products</div>\r\n <ng-container *ngIf=\"getPermissions().length\">\r\n <ng-container formArrayName=\"permission\">\r\n <ng-container *ngFor=\"let permission of getPermissions().controls; let i = index\"\r\n [formGroupName]=\"i\">\r\n <div class=\"my-6\">\r\n <div class=\"row me-3\">\r\n <div class=\"col-6\">\r\n <div class=\"title fw-semibold\">\r\n {{ permission.get('featureName')?.value | titlecase }}\r\n\r\n </div>\r\n </div>\r\n <div class=\"col-6 d-flex justify-content-end\" (click)=\"toggleCollapse(i)\">\r\n <div class=\"text-end\">\r\n @if (!isExpanded[i]) {\r\n <svg width=\"13\" height=\"8\" viewBox=\"0 0 13 8\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M1.5 1.5L6.5 6.5L11.5 1.5\" stroke=\"#667085\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n } @else {\r\n <svg width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M11 6.5L6 1.5L1 6.5\" stroke=\"#667085\" stroke-width=\"1.67\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"{ 'collapsed': !isExpanded[i] }\">\r\n <div class=\"table-responsive my-2 me-3\">\r\n <table class=\"w-100\">\r\n <thead>\r\n <tr>\r\n <th>Modules</th>\r\n <th>View</th>\r\n <th>Edit</th>\r\n <th>Download</th>\r\n <th>Delete</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngIf=\"permission.get('product')\"\r\n formArrayName=\"product\">\r\n <ng-container\r\n *ngFor=\"let product of getFeaturePermissions(permission)?.controls;let j=index;\"\r\n [formGroupName]=\"j\">\r\n <tr>\r\n <td>{{ camelCaseToText(product.get('name')?.value) }}\r\n </td>\r\n <td><input formControlName=\"isView\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n (change)=\"handleAddChange(product)\"></td>\r\n <td><input formControlName=\"isEdit\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n (change)=\"handleEditChange(product)\"></td>\r\n <td><input formControlName=\"isDownload\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n [disabled]=\"!product.get('isEdit')?.value || !product.get('isView')?.value\">\r\n </td>\r\n <td><input formControlName=\"isDelete\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n [disabled]=\"!product.get('isEdit')?.value || !product.get('isView')?.value\">\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <div *ngIf=\"operationType!=='view'\" class=\"d-flex my-14\" role=\"group\">\r\n <button class=\"btn btn-outline w-100 mx-3\" (click)=\"cancel()\">Cancel</button>\r\n <button class=\"btn btn-primary w-100 mx-3\" [disabled]=\"userForm.invalid\" id=\"alert-toast\"\r\n (click)=\"onSubmit()\">Submit</button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".title{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600;line-height:28px}.sub-title{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}li{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:500!important;line-height:30px;list-style:decimal!important}.scroll{overflow-y:auto;overflow-x:hidden}.template{color:var(--Primary-700, #009BF3)!important;font-family:Inter;font-size:14px!important;font-weight:600;line-height:20px;text-transform:capitalize}.orval{color:var(--Gray-700, #344054);font-size:14px;font-weight:400!important;line-height:20px}.single-user{color:var(--Gray-700, #344054);font-size:16px!important;line-height:24px;text-transform:capitalize}.form-label{color:var(--Gray-700, #344054);text-shadow:0px 0px 0px #D5EFFE,0px 1px 2px rgba(16,24,40,.05);font-size:14px;font-weight:500;line-height:20px}.form-control:focus{border-radius:8px;border:1px solid var(--Primary-300, #6BCAFF)!important;background:var(--White, #FFF)!important;box-shadow:0 0 0 4px #d5effe,0 1px 2px #1018280d!important}.font-sub{font-size:12px!important;line-height:18px!important}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:none!important}.divider{border-bottom:1px solid #D0D5DD;width:75%;margin-left:2%;background:var(--Gray-300, #D0D5DD)}input[type=checkbox]{width:20px!important;height:20px!important;margin:5px;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0;padding-top:12px;padding-right:6px}.collapsed{display:none}.divider{border-right:1px solid #ccc;margin-left:10px;margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }] });
|
|
1622
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AddUserPopupComponent, deps: [{ token: i1$1.NgbActiveModal }, { token: i0.ChangeDetectorRef }, { token: i1$1.NgbModal }, { token: i3$1.FormBuilder }, { token: UserService }, { token: i4.ToastService }, { token: i2.GlobalStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1623
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: AddUserPopupComponent, selector: "lib-add-user-popup", inputs: { type: "type", user: "user", userType: "userType" }, outputs: { dataTosingleuser: "dataTosingleuser" }, viewQueries: [{ propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true }], ngImport: i0, template: "<div class=\"card py-0 scroll\">\r\n <div class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <!-- <div class=\"symbol symbol-75px symbol-circle\">\r\n <img alt=\"Pic\" src=\"./assets/tango/Icons/add-store-icon.svg\">\r\n </div> -->\r\n </div>\r\n <div class=\"row w-100\">\r\n <div *ngIf=\"operationType==='add'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Add\r\n User</a>\r\n <div class=\"sub-title\">Please add your user details</div>\r\n </div>\r\n <!-- <div *ngIf=\"operationType==='edit'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Edit User Details</a>\r\n <div class=\"sub-title\">Please Edit your user details</div>\r\n </div> -->\r\n <div *ngIf=\"operationType==='view'\" class=\"col-md-9\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">User Details</a>\r\n <div class=\"sub-title\">View your user details</div>\r\n </div>\r\n <!-- @if ((gs.userAccess | async)?.Global_User_isEdit) { -->\r\n <div *ngIf=\"operationType==='view' && (gs.userAccess | async)?.Global_User_isEdit\"\r\n class=\"col-md-3 text-end px-0\" (click)=\"editUser()\">\r\n <button class=\"btn btn-outline\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 20 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_3833_85908)\">\r\n <path\r\n d=\"M9.16602 3.3332H3.33268C2.89065 3.3332 2.46673 3.50879 2.15417 3.82135C1.84161 4.13391 1.66602 4.55784 1.66602 4.99986V16.6665C1.66602 17.1086 1.84161 17.5325 2.15417 17.845C2.46673 18.1576 2.89065 18.3332 3.33268 18.3332H14.9993C15.4414 18.3332 15.8653 18.1576 16.1779 17.845C16.4904 17.5325 16.666 17.1086 16.666 16.6665V10.8332M15.416 2.0832C15.7475 1.75168 16.1972 1.56543 16.666 1.56543C17.1349 1.56543 17.5845 1.75168 17.916 2.0832C18.2475 2.41472 18.4338 2.86436 18.4338 3.3332C18.4338 3.80204 18.2475 4.25168 17.916 4.5832L9.99935 12.4999L6.66602 13.3332L7.49935 9.99986L15.416 2.0832Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_3833_85908\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></button>\r\n </div>\r\n <!-- } -->\r\n </div>\r\n <div class=\"fw-bold text-gray-500 my-6\" *ngIf=\"!showsingleuser && this.operationType ==='add'\">\r\n <ul class=\"text-gray-400 fw-bold fs-6\">\r\n <li>Use the template to upload multiple users at once.</li>\r\n <li>Download the template here -\r\n <a [attr.href]=\"userType ==='tango' ? '../../../assets/files/TangoUsersTemplate.xlsx' : '../../../assets/files/UsersTemplate.xlsx'\"\r\n download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li>Add your data to the Template File</li>\r\n <li>Upload it below for processing</li>\r\n\r\n </ul>\r\n </div>\r\n <div class=\"d-flex flex-center flex-wrap mb-5 w-100\" *ngIf=\"!showsingleuser && this.operationType ==='add'\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUpload($event)\" value=\"personal\" class=\"btn-check\" ng-reflect-name=\"accountType\"\r\n ng-reflect-form-control-name=\"accountType\" ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_create_account_form_account_type_personal\"\r\n class=\"btn btn-outline bg-primary btn-outline-default rounded-3 w-100 p-4 mt-5\"><span\r\n class=\"fw-bold fs-4\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <path\r\n d=\"M18 12.5V15.8333C18 16.2754 17.8244 16.6993 17.5118 17.0118C17.1993 17.3244 16.7754 17.5 16.3333 17.5H4.66667C4.22464 17.5 3.80072 17.3244 3.48816 17.0118C3.17559 16.6993 3 16.2754 3 15.8333V12.5M14.6667 6.66667L10.5 2.5M10.5 2.5L6.33333 6.66667M10.5 2.5V12.5\"\r\n stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> <span class=\"text-white mx-2 single-user\">Add Multiple Users</span></span>\r\n </label>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"mx-2 orval\">Or </span>\r\n </p>\r\n <input type=\"radio\" id=\"kt_account_team_size_select_1\" value=\"1-1\" (click)=\"addSingleUser()\"\r\n class=\"btn-check ng-untouched ng-pristine ng-valid\" />\r\n <label for=\"kt_account_team_size_select_1\"\r\n class=\"btn btn-outline btn-outline-default rounded-3 w-100 p-4 mt-3\"><span class=\"fw-bold fs-4\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\" fill=\"none\">\r\n <path\r\n d=\"M17.1663 17.5V15.8333C17.1663 14.9493 16.8152 14.1014 16.19 13.4763C15.5649 12.8512 14.7171 12.5 13.833 12.5H7.16634C6.28229 12.5 5.43444 12.8512 4.80932 13.4763C4.1842 14.1014 3.83301 14.9493 3.83301 15.8333V17.5M13.833 5.83333C13.833 7.67428 12.3406 9.16667 10.4997 9.16667C8.65873 9.16667 7.16634 7.67428 7.16634 5.83333C7.16634 3.99238 8.65873 2.5 10.4997 2.5C12.3406 2.5 13.833 3.99238 13.833 5.83333Z\"\r\n stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span id=\"triggerButtonId\" class=\"mx-2 single-user fw-bold\">Add Single\r\n User</span></span></label>\r\n </div>\r\n\r\n <div class=\"w-100 h-500px scroll\" *ngIf=\"showsingleuser\">\r\n <div class=\"mt-5\" *ngIf=\"userForm\">\r\n <form [formGroup]=\"userForm\" novalidate=\"novalidate\" class=\"\">\r\n <div class=\"row px-0 me-3\">\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"username\" class=\"form-label\">User Name</label>\r\n <input type=\"text\" class=\"form-control\" id=\"username\" formControlName=\"userName\"\r\n autocomplete=\"off\">\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"email\" class=\"form-label\">Email</label>\r\n <input type=\"email\" class=\"form-control\" id=\"email\" formControlName=\"email\"\r\n autocomplete=\"off\" required>\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"contact\" class=\"form-label\">Contact Number</label>\r\n <input type=\"text\" class=\"form-control\" id=\"contact\" formControlName=\"mobileNumber\"\r\n autocomplete=\"off\" required minlength=\"10\" maxlength=\"13\"\r\n (keypress)=\"omit_special_char($event)\">\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"role\" class=\"form-label\">Role</label>\r\n <select class=\"form-select\" formControlName=\"role\"\r\n (change)=\"onRoleChange(userForm.get('role')?.value)\">\r\n <option value=\"superadmin\">Super Admin</option>\r\n <option value=\"admin\">Admin</option>\r\n <option value=\"user\">User</option>\r\n </select>\r\n </div>\r\n <div *ngIf=\"userType === 'tango'\" class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"tangoUserType\" class=\"form-label\">User Type</label>\r\n <select class=\"form-select\" formControlName=\"tangoUserType\"\r\n (change)=\"onRoleChange(userForm.get('tangoUserType')?.value)\">\r\n <option value=\"dashboard\">Dashboard</option>\r\n <option value=\"audit\">Audit</option>\r\n </select>\r\n </div>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bolder mb-0 title cursor-pointer\">Access for\r\n {{userForm.get('role')?.value | titlecase}}</a>\r\n <div class=\"sub-title font-sub\">{{userForm.get('role')?.value | titlecase}} can access respective\r\n enabled features and products</div>\r\n <ng-container *ngIf=\"getPermissions().length\">\r\n <ng-container formArrayName=\"permission\">\r\n <ng-container *ngFor=\"let permission of getPermissions().controls; let i = index\"\r\n [formGroupName]=\"i\">\r\n <div class=\"my-6\">\r\n <div class=\"row me-3\">\r\n <div class=\"col-6\">\r\n <div class=\"title fw-semibold\">\r\n {{ permission.get('featureName')?.value | titlecase }}\r\n\r\n </div>\r\n </div>\r\n <div class=\"col-6 d-flex justify-content-end\" (click)=\"toggleCollapse(i)\">\r\n <div class=\"text-end\">\r\n @if (!isExpanded[i]) {\r\n <svg width=\"13\" height=\"8\" viewBox=\"0 0 13 8\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M1.5 1.5L6.5 6.5L11.5 1.5\" stroke=\"#667085\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n } @else {\r\n <svg width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M11 6.5L6 1.5L1 6.5\" stroke=\"#667085\" stroke-width=\"1.67\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"{ 'collapsed': !isExpanded[i] }\">\r\n <div class=\"table-responsive my-2 me-3\">\r\n <table class=\"w-100\">\r\n <thead>\r\n <tr>\r\n <th>Modules</th>\r\n <th>View</th>\r\n <th>Edit</th>\r\n <th>Download</th>\r\n <th>Delete</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngIf=\"permission.get('product')\"\r\n formArrayName=\"product\">\r\n <ng-container\r\n *ngFor=\"let product of getFeaturePermissions(permission)?.controls;let j=index;\"\r\n [formGroupName]=\"j\">\r\n <tr>\r\n <td>{{ camelCaseToText(product.get('name')?.value) }}\r\n </td>\r\n <td><input formControlName=\"isView\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n (change)=\"handleAddChange(product)\"></td>\r\n <td><input formControlName=\"isEdit\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n (change)=\"handleEditChange(product)\"></td>\r\n <td><input formControlName=\"isDownload\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n [disabled]=\"!product.get('isEdit')?.value || !product.get('isView')?.value\">\r\n </td>\r\n <td><input formControlName=\"isDelete\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n [disabled]=\"!product.get('isEdit')?.value || !product.get('isView')?.value\">\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <div *ngIf=\"operationType!=='view'\" class=\"d-flex my-14\" role=\"group\">\r\n <button class=\"btn btn-outline w-100 mx-3\" (click)=\"cancel()\">Cancel</button>\r\n <button class=\"btn btn-primary w-100 mx-3\" [disabled]=\"userForm.invalid\" id=\"alert-toast\"\r\n (click)=\"onSubmit()\">Submit</button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".title{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600;line-height:28px}.sub-title{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}li{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:500!important;line-height:30px;list-style:decimal!important}.scroll{overflow-y:auto;overflow-x:hidden}.template{color:var(--Primary-700, #009BF3)!important;font-family:Inter;font-size:14px!important;font-weight:600;line-height:20px;text-transform:capitalize}.orval{color:var(--Gray-700, #344054);font-size:14px;font-weight:400!important;line-height:20px}.single-user{color:var(--Gray-700, #344054);font-size:16px!important;line-height:24px;text-transform:capitalize}.form-label{color:var(--Gray-700, #344054);text-shadow:0px 0px 0px #D5EFFE,0px 1px 2px rgba(16,24,40,.05);font-size:14px;font-weight:500;line-height:20px}.form-control:focus{border-radius:8px;border:1px solid var(--Primary-300, #6BCAFF)!important;background:var(--White, #FFF)!important;box-shadow:0 0 0 4px #d5effe,0 1px 2px #1018280d!important}.font-sub{font-size:12px!important;line-height:18px!important}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:none!important}.divider{border-bottom:1px solid #D0D5DD;width:75%;margin-left:2%;background:var(--Gray-300, #D0D5DD)}input[type=checkbox]{width:20px!important;height:20px!important;margin:5px;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0;padding-top:12px;padding-right:6px}.collapsed{display:none}.divider{border-right:1px solid #ccc;margin-left:10px;margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i3$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }] });
|
|
1413
1624
|
}
|
|
1414
1625
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AddUserPopupComponent, decorators: [{
|
|
1415
1626
|
type: Component,
|
|
1416
1627
|
args: [{ selector: "lib-add-user-popup", template: "<div class=\"card py-0 scroll\">\r\n <div class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <!-- <div class=\"symbol symbol-75px symbol-circle\">\r\n <img alt=\"Pic\" src=\"./assets/tango/Icons/add-store-icon.svg\">\r\n </div> -->\r\n </div>\r\n <div class=\"row w-100\">\r\n <div *ngIf=\"operationType==='add'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Add\r\n User</a>\r\n <div class=\"sub-title\">Please add your user details</div>\r\n </div>\r\n <!-- <div *ngIf=\"operationType==='edit'\" class=\"col-md-12\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Edit User Details</a>\r\n <div class=\"sub-title\">Please Edit your user details</div>\r\n </div> -->\r\n <div *ngIf=\"operationType==='view'\" class=\"col-md-9\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">User Details</a>\r\n <div class=\"sub-title\">View your user details</div>\r\n </div>\r\n <!-- @if ((gs.userAccess | async)?.Global_User_isEdit) { -->\r\n <div *ngIf=\"operationType==='view' && (gs.userAccess | async)?.Global_User_isEdit\"\r\n class=\"col-md-3 text-end px-0\" (click)=\"editUser()\">\r\n <button class=\"btn btn-outline\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 20 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_3833_85908)\">\r\n <path\r\n d=\"M9.16602 3.3332H3.33268C2.89065 3.3332 2.46673 3.50879 2.15417 3.82135C1.84161 4.13391 1.66602 4.55784 1.66602 4.99986V16.6665C1.66602 17.1086 1.84161 17.5325 2.15417 17.845C2.46673 18.1576 2.89065 18.3332 3.33268 18.3332H14.9993C15.4414 18.3332 15.8653 18.1576 16.1779 17.845C16.4904 17.5325 16.666 17.1086 16.666 16.6665V10.8332M15.416 2.0832C15.7475 1.75168 16.1972 1.56543 16.666 1.56543C17.1349 1.56543 17.5845 1.75168 17.916 2.0832C18.2475 2.41472 18.4338 2.86436 18.4338 3.3332C18.4338 3.80204 18.2475 4.25168 17.916 4.5832L9.99935 12.4999L6.66602 13.3332L7.49935 9.99986L15.416 2.0832Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_3833_85908\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg></button>\r\n </div>\r\n <!-- } -->\r\n </div>\r\n <div class=\"fw-bold text-gray-500 my-6\" *ngIf=\"!showsingleuser && this.operationType ==='add'\">\r\n <ul class=\"text-gray-400 fw-bold fs-6\">\r\n <li>Use the template to upload multiple users at once.</li>\r\n <li>Download the template here -\r\n <a [attr.href]=\"userType ==='tango' ? '../../../assets/files/TangoUsersTemplate.xlsx' : '../../../assets/files/UsersTemplate.xlsx'\"\r\n download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li>Add your data to the Template File</li>\r\n <li>Upload it below for processing</li>\r\n\r\n </ul>\r\n </div>\r\n <div class=\"d-flex flex-center flex-wrap mb-5 w-100\" *ngIf=\"!showsingleuser && this.operationType ==='add'\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUpload($event)\" value=\"personal\" class=\"btn-check\" ng-reflect-name=\"accountType\"\r\n ng-reflect-form-control-name=\"accountType\" ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_create_account_form_account_type_personal\"\r\n class=\"btn btn-outline bg-primary btn-outline-default rounded-3 w-100 p-4 mt-5\"><span\r\n class=\"fw-bold fs-4\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <path\r\n d=\"M18 12.5V15.8333C18 16.2754 17.8244 16.6993 17.5118 17.0118C17.1993 17.3244 16.7754 17.5 16.3333 17.5H4.66667C4.22464 17.5 3.80072 17.3244 3.48816 17.0118C3.17559 16.6993 3 16.2754 3 15.8333V12.5M14.6667 6.66667L10.5 2.5M10.5 2.5L6.33333 6.66667M10.5 2.5V12.5\"\r\n stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> <span class=\"text-white mx-2 single-user\">Add Multiple Users</span></span>\r\n </label>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"mx-2 orval\">Or </span>\r\n </p>\r\n <input type=\"radio\" id=\"kt_account_team_size_select_1\" value=\"1-1\" (click)=\"addSingleUser()\"\r\n class=\"btn-check ng-untouched ng-pristine ng-valid\" />\r\n <label for=\"kt_account_team_size_select_1\"\r\n class=\"btn btn-outline btn-outline-default rounded-3 w-100 p-4 mt-3\"><span class=\"fw-bold fs-4\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\" fill=\"none\">\r\n <path\r\n d=\"M17.1663 17.5V15.8333C17.1663 14.9493 16.8152 14.1014 16.19 13.4763C15.5649 12.8512 14.7171 12.5 13.833 12.5H7.16634C6.28229 12.5 5.43444 12.8512 4.80932 13.4763C4.1842 14.1014 3.83301 14.9493 3.83301 15.8333V17.5M13.833 5.83333C13.833 7.67428 12.3406 9.16667 10.4997 9.16667C8.65873 9.16667 7.16634 7.67428 7.16634 5.83333C7.16634 3.99238 8.65873 2.5 10.4997 2.5C12.3406 2.5 13.833 3.99238 13.833 5.83333Z\"\r\n stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span id=\"triggerButtonId\" class=\"mx-2 single-user fw-bold\">Add Single\r\n User</span></span></label>\r\n </div>\r\n\r\n <div class=\"w-100 h-500px scroll\" *ngIf=\"showsingleuser\">\r\n <div class=\"mt-5\" *ngIf=\"userForm\">\r\n <form [formGroup]=\"userForm\" novalidate=\"novalidate\" class=\"\">\r\n <div class=\"row px-0 me-3\">\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"username\" class=\"form-label\">User Name</label>\r\n <input type=\"text\" class=\"form-control\" id=\"username\" formControlName=\"userName\"\r\n autocomplete=\"off\">\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"email\" class=\"form-label\">Email</label>\r\n <input type=\"email\" class=\"form-control\" id=\"email\" formControlName=\"email\"\r\n autocomplete=\"off\" required>\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"contact\" class=\"form-label\">Contact Number</label>\r\n <input type=\"text\" class=\"form-control\" id=\"contact\" formControlName=\"mobileNumber\"\r\n autocomplete=\"off\" required minlength=\"10\" maxlength=\"13\"\r\n (keypress)=\"omit_special_char($event)\">\r\n </div>\r\n <div class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"role\" class=\"form-label\">Role</label>\r\n <select class=\"form-select\" formControlName=\"role\"\r\n (change)=\"onRoleChange(userForm.get('role')?.value)\">\r\n <option value=\"superadmin\">Super Admin</option>\r\n <option value=\"admin\">Admin</option>\r\n <option value=\"user\">User</option>\r\n </select>\r\n </div>\r\n <div *ngIf=\"userType === 'tango'\" class=\"col-md-12 col-lg-6 col-xl-6 col-xxl-6 mb-7\">\r\n <label for=\"tangoUserType\" class=\"form-label\">User Type</label>\r\n <select class=\"form-select\" formControlName=\"tangoUserType\"\r\n (change)=\"onRoleChange(userForm.get('tangoUserType')?.value)\">\r\n <option value=\"dashboard\">Dashboard</option>\r\n <option value=\"audit\">Audit</option>\r\n </select>\r\n </div>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bolder mb-0 title cursor-pointer\">Access for\r\n {{userForm.get('role')?.value | titlecase}}</a>\r\n <div class=\"sub-title font-sub\">{{userForm.get('role')?.value | titlecase}} can access respective\r\n enabled features and products</div>\r\n <ng-container *ngIf=\"getPermissions().length\">\r\n <ng-container formArrayName=\"permission\">\r\n <ng-container *ngFor=\"let permission of getPermissions().controls; let i = index\"\r\n [formGroupName]=\"i\">\r\n <div class=\"my-6\">\r\n <div class=\"row me-3\">\r\n <div class=\"col-6\">\r\n <div class=\"title fw-semibold\">\r\n {{ permission.get('featureName')?.value | titlecase }}\r\n\r\n </div>\r\n </div>\r\n <div class=\"col-6 d-flex justify-content-end\" (click)=\"toggleCollapse(i)\">\r\n <div class=\"text-end\">\r\n @if (!isExpanded[i]) {\r\n <svg width=\"13\" height=\"8\" viewBox=\"0 0 13 8\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M1.5 1.5L6.5 6.5L11.5 1.5\" stroke=\"#667085\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n } @else {\r\n <svg width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M11 6.5L6 1.5L1 6.5\" stroke=\"#667085\" stroke-width=\"1.67\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"{ 'collapsed': !isExpanded[i] }\">\r\n <div class=\"table-responsive my-2 me-3\">\r\n <table class=\"w-100\">\r\n <thead>\r\n <tr>\r\n <th>Modules</th>\r\n <th>View</th>\r\n <th>Edit</th>\r\n <th>Download</th>\r\n <th>Delete</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngIf=\"permission.get('product')\"\r\n formArrayName=\"product\">\r\n <ng-container\r\n *ngFor=\"let product of getFeaturePermissions(permission)?.controls;let j=index;\"\r\n [formGroupName]=\"j\">\r\n <tr>\r\n <td>{{ camelCaseToText(product.get('name')?.value) }}\r\n </td>\r\n <td><input formControlName=\"isView\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n (change)=\"handleAddChange(product)\"></td>\r\n <td><input formControlName=\"isEdit\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n (change)=\"handleEditChange(product)\"></td>\r\n <td><input formControlName=\"isDownload\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n [disabled]=\"!product.get('isEdit')?.value || !product.get('isView')?.value\">\r\n </td>\r\n <td><input formControlName=\"isDelete\" type=\"checkbox\"\r\n class=\"cursor-pointer\"\r\n [disabled]=\"!product.get('isEdit')?.value || !product.get('isView')?.value\">\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <div *ngIf=\"operationType!=='view'\" class=\"d-flex my-14\" role=\"group\">\r\n <button class=\"btn btn-outline w-100 mx-3\" (click)=\"cancel()\">Cancel</button>\r\n <button class=\"btn btn-primary w-100 mx-3\" [disabled]=\"userForm.invalid\" id=\"alert-toast\"\r\n (click)=\"onSubmit()\">Submit</button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".title{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600;line-height:28px}.sub-title{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}li{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:500!important;line-height:30px;list-style:decimal!important}.scroll{overflow-y:auto;overflow-x:hidden}.template{color:var(--Primary-700, #009BF3)!important;font-family:Inter;font-size:14px!important;font-weight:600;line-height:20px;text-transform:capitalize}.orval{color:var(--Gray-700, #344054);font-size:14px;font-weight:400!important;line-height:20px}.single-user{color:var(--Gray-700, #344054);font-size:16px!important;line-height:24px;text-transform:capitalize}.form-label{color:var(--Gray-700, #344054);text-shadow:0px 0px 0px #D5EFFE,0px 1px 2px rgba(16,24,40,.05);font-size:14px;font-weight:500;line-height:20px}.form-control:focus{border-radius:8px;border:1px solid var(--Primary-300, #6BCAFF)!important;background:var(--White, #FFF)!important;box-shadow:0 0 0 4px #d5effe,0 1px 2px #1018280d!important}.font-sub{font-size:12px!important;line-height:18px!important}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:none!important}.divider{border-bottom:1px solid #D0D5DD;width:75%;margin-left:2%;background:var(--Gray-300, #D0D5DD)}input[type=checkbox]{width:20px!important;height:20px!important;margin:5px;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0;padding-top:12px;padding-right:6px}.collapsed{display:none}.divider{border-right:1px solid #ccc;margin-left:10px;margin-right:10px}\n"] }]
|
|
1417
|
-
}], ctorParameters: () => [{ type: i1$1.NgbActiveModal }, { type: i0.ChangeDetectorRef }, { type: i1$1.NgbModal }, { type: i3.FormBuilder }, { type: UserService }, { type: i4.ToastService }, { type: i2.GlobalStateService }], propDecorators: { type: [{
|
|
1628
|
+
}], ctorParameters: () => [{ type: i1$1.NgbActiveModal }, { type: i0.ChangeDetectorRef }, { type: i1$1.NgbModal }, { type: i3$1.FormBuilder }, { type: UserService }, { type: i4.ToastService }, { type: i2.GlobalStateService }], propDecorators: { type: [{
|
|
1418
1629
|
type: Input
|
|
1419
1630
|
}], user: [{
|
|
1420
1631
|
type: Input
|
|
@@ -1551,7 +1762,7 @@ class GroupSelectComponent {
|
|
|
1551
1762
|
return this.filteredValues.every((item) => item.isSelected);
|
|
1552
1763
|
}
|
|
1553
1764
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GroupSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: UserService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1554
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GroupSelectComponent, selector: "lib-group-select", inputs: { items: "items", searchField: "searchField", multi: "multi", idField: "idField", selectedValues: "selectedValues", disabled: "disabled", label: "label" }, outputs: { selected: "selected" }, host: { listeners: { "document:click": "onClick($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"outer-container\">\r\n <div [ngClass]=\"disabled ? 'disable-input':''\" (click)=\"openDropdown($event)\" class=\"form-select\">\r\n <ng-container *ngIf=\"multi\" >\r\n <span *ngIf=\"selectedValues?.length\" class=\"select-value mx-2\"> <img class=\"me-2\" alt=\"Pic\" src=\"./assets/tango/Image/users-teams.svg\">{{selectedValues?.[0]?.[searchField]}}</span> \r\n <!-- <span *ngIf=\"selectedValues?.length > 1\" class=\"select-value mx-2\"><img class=\"me-2\" alt=\"Pic\" src=\"./assets/tango/Image/users-teams.svg\">{{selectedValues?.[1]?.[searchField]}}</span> -->\r\n <span class=\"select-value mx-2\" *ngIf=\"selectedValues?.length > 1\">+{{selectedValues?.length -1}}</span> {{label}} \r\n </ng-container>\r\n <ng-container *ngIf=\"!multi\" >\r\n {{selectedValues?.[0]?.[searchField]}}\r\n </ng-container>\r\n </div>\r\n <div [ngClass]=\"showDropdown ? '' : 'd-none'\" class=\"input-container dropdown\" >\r\n <div class=\"w-100 input-wrapper\">\r\n <input [(ngModel)]=\"searchValue\" placeholder=\"Search\" (input)=\"onInput($event)\" type=\"text\"> \r\n <svg class=\"search-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\">\r\n <path 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\" stroke=\"#667085\" stroke-width=\"1.3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n <ul>\r\n <li *ngIf=\"multi && filteredValues?.length\">\r\n <label class=\"form-check\" [for]=\"instanceId\" >\r\n <input (change)=\"onSelectAll($event)\" [checked]=\"checkIfAllSelected()\" class=\"form-check-input me-3\" type=\"checkbox\"\r\n [id]=\"instanceId\">\r\n <span class=\"form-check-label\" >\r\n Select All\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngFor=\"let item of filteredValues\" [ngClass]=\"item.isSelected && !multi ? 'selected' : ''\" >\r\n <label [for]=\"item[idField] + instanceId\" [ngClass]=\"multi ? '': 'ps-0'\" class=\"form-check\">\r\n <input [ngClass]=\"multi ? '': 'd-none'\" (change)=\"onSelect($event, item)\" [(ngModel)]=\"item.isSelected\" class=\"form-check-input me-3\" type=\"checkbox\" value=\"\"\r\n [id]=\"item[idField] + instanceId\">\r\n <span class=\"form-check-label\" >\r\n {{item[searchField]}}\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngIf=\"!filteredValues?.length\" >\r\n <span class=\"d-flex align-items-center justify-content-center\" >No data found</span>\r\n </li>\r\n </ul> \r\n </div> \r\n \r\n</div>", styles: [":host{width:100%;height:100%}.outer-container{position:relative;background-color:#fff}.outer-container .form-select{font-size:1.1rem;font-weight:600;border-radius:8px!important;color:var(--Gray-500, #344054);border:1px solid var(--Gray-300, #D0D5DD)!important;height:42.5px}.outer-container .disable-input{pointer-events:none;background-color:#f9fafb!important}.outer-container .input-container{position:absolute;width:100%;z-index:1}.outer-container .input-container .input-wrapper{padding:8px 10px;background-color:#fff;border-top-right-radius:8px;border-top-left-radius:8px;border-top:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.outer-container .input-container .input-wrapper input{width:100%;border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF);box-shadow:0 1px 2px #1018280d;padding:10px 14px 10px 30px;outline:none}.outer-container .input-container .input-wrapper input ::placeholder{color:var(--Gray-500, #667085);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.outer-container .input-container .input-wrapper .search-icon{position:absolute;left:20px;top:20px}.outer-container .input-container ul{position:relative;background-color:#fff;margin:0;padding:0;max-height:200px;min-height:auto;overflow-y:auto;border-bottom-right-radius:8px;border-bottom-left-radius:8px;border-bottom:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.outer-container .input-container ul .selected{background:#f9fafb}.outer-container .input-container ul li{list-style:none;padding:10px 16px;cursor:pointer}.outer-container .input-container ul li label{cursor:pointer}.outer-container .input-container ul li:hover{background:#f9fafb}.form-check{display:flex;align-items:center}.form-check-input{height:16px;width:16px;border-radius:4px;border:1px solid var(--Primary-600, #00A3FF)}.form-check-input:checked{--bs-form-check-bg-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB4SURBVHgBhY7NDUBQEIRnqcJNKXTg6qYTStCB+Isy6IQSNMDa9SLh5eWZZPcw+81kCX/quABhD73QyKXsGoyIvNCJSto2hEhNtY4N9cwYeMXEsVqB1GaSauRQOpty2tSmO3FgloAmF5nEhgyoesMO6CuFW66fn2xdFyA3ZzcRLrMAAAAASUVORK5CYII=);background-color:#eaf8ff;border-color:#00a3ff}.form-check-label{color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-style:normal;font-weight:500;line-height:20px}.select-value{border-radius:16px!important;background:var(--Gray-100, #F2F4F7)!important;mix-blend-mode:multiply;color:var(--Gray-700, #344054)!important;text-align:center;font-size:14px;font-style:normal;font-weight:500;line-height:20px;padding:4px 12px 4px 6px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1765
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GroupSelectComponent, selector: "lib-group-select", inputs: { items: "items", searchField: "searchField", multi: "multi", idField: "idField", selectedValues: "selectedValues", disabled: "disabled", label: "label" }, outputs: { selected: "selected" }, host: { listeners: { "document:click": "onClick($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"outer-container\">\r\n <div [ngClass]=\"disabled ? 'disable-input':''\" (click)=\"openDropdown($event)\" class=\"form-select\">\r\n <ng-container *ngIf=\"multi\" >\r\n <span *ngIf=\"selectedValues?.length\" class=\"select-value mx-2\"> <img class=\"me-2\" alt=\"Pic\" src=\"./assets/tango/Image/users-teams.svg\">{{selectedValues?.[0]?.[searchField]}}</span> \r\n <!-- <span *ngIf=\"selectedValues?.length > 1\" class=\"select-value mx-2\"><img class=\"me-2\" alt=\"Pic\" src=\"./assets/tango/Image/users-teams.svg\">{{selectedValues?.[1]?.[searchField]}}</span> -->\r\n <span class=\"select-value mx-2\" *ngIf=\"selectedValues?.length > 1\">+{{selectedValues?.length -1}}</span> {{label}} \r\n </ng-container>\r\n <ng-container *ngIf=\"!multi\" >\r\n {{selectedValues?.[0]?.[searchField]}}\r\n </ng-container>\r\n </div>\r\n <div [ngClass]=\"showDropdown ? '' : 'd-none'\" class=\"input-container dropdown\" >\r\n <div class=\"w-100 input-wrapper\">\r\n <input [(ngModel)]=\"searchValue\" placeholder=\"Search\" (input)=\"onInput($event)\" type=\"text\"> \r\n <svg class=\"search-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\">\r\n <path 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\" stroke=\"#667085\" stroke-width=\"1.3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n <ul>\r\n <li *ngIf=\"multi && filteredValues?.length\">\r\n <label class=\"form-check\" [for]=\"instanceId\" >\r\n <input (change)=\"onSelectAll($event)\" [checked]=\"checkIfAllSelected()\" class=\"form-check-input me-3\" type=\"checkbox\"\r\n [id]=\"instanceId\">\r\n <span class=\"form-check-label\" >\r\n Select All\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngFor=\"let item of filteredValues\" [ngClass]=\"item.isSelected && !multi ? 'selected' : ''\" >\r\n <label [for]=\"item[idField] + instanceId\" [ngClass]=\"multi ? '': 'ps-0'\" class=\"form-check\">\r\n <input [ngClass]=\"multi ? '': 'd-none'\" (change)=\"onSelect($event, item)\" [(ngModel)]=\"item.isSelected\" class=\"form-check-input me-3\" type=\"checkbox\" value=\"\"\r\n [id]=\"item[idField] + instanceId\">\r\n <span class=\"form-check-label\" >\r\n {{item[searchField]}}\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngIf=\"!filteredValues?.length\" >\r\n <span class=\"d-flex align-items-center justify-content-center\" >No data found</span>\r\n </li>\r\n </ul> \r\n </div> \r\n \r\n</div>", styles: [":host{width:100%;height:100%}.outer-container{position:relative;background-color:#fff}.outer-container .form-select{font-size:1.1rem;font-weight:600;border-radius:8px!important;color:var(--Gray-500, #344054);border:1px solid var(--Gray-300, #D0D5DD)!important;height:42.5px}.outer-container .disable-input{pointer-events:none;background-color:#f9fafb!important}.outer-container .input-container{position:absolute;width:100%;z-index:1}.outer-container .input-container .input-wrapper{padding:8px 10px;background-color:#fff;border-top-right-radius:8px;border-top-left-radius:8px;border-top:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.outer-container .input-container .input-wrapper input{width:100%;border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF);box-shadow:0 1px 2px #1018280d;padding:10px 14px 10px 30px;outline:none}.outer-container .input-container .input-wrapper input ::placeholder{color:var(--Gray-500, #667085);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.outer-container .input-container .input-wrapper .search-icon{position:absolute;left:20px;top:20px}.outer-container .input-container ul{position:relative;background-color:#fff;margin:0;padding:0;max-height:200px;min-height:auto;overflow-y:auto;border-bottom-right-radius:8px;border-bottom-left-radius:8px;border-bottom:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.outer-container .input-container ul .selected{background:#f9fafb}.outer-container .input-container ul li{list-style:none;padding:10px 16px;cursor:pointer}.outer-container .input-container ul li label{cursor:pointer}.outer-container .input-container ul li:hover{background:#f9fafb}.form-check{display:flex;align-items:center}.form-check-input{height:16px;width:16px;border-radius:4px;border:1px solid var(--Primary-600, #00A3FF)}.form-check-input:checked{--bs-form-check-bg-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB4SURBVHgBhY7NDUBQEIRnqcJNKXTg6qYTStCB+Isy6IQSNMDa9SLh5eWZZPcw+81kCX/quABhD73QyKXsGoyIvNCJSto2hEhNtY4N9cwYeMXEsVqB1GaSauRQOpty2tSmO3FgloAmF5nEhgyoesMO6CuFW66fn2xdFyA3ZzcRLrMAAAAASUVORK5CYII=);background-color:#eaf8ff;border-color:#00a3ff}.form-check-label{color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-style:normal;font-weight:500;line-height:20px}.select-value{border-radius:16px!important;background:var(--Gray-100, #F2F4F7)!important;mix-blend-mode:multiply;color:var(--Gray-700, #344054)!important;text-align:center;font-size:14px;font-style:normal;font-weight:500;line-height:20px;padding:4px 12px 4px 6px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1555
1766
|
}
|
|
1556
1767
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GroupSelectComponent, decorators: [{
|
|
1557
1768
|
type: Component,
|
|
@@ -2019,10 +2230,10 @@ class AssignStorePopupComponent {
|
|
|
2019
2230
|
.subscribe({
|
|
2020
2231
|
next: (res) => {
|
|
2021
2232
|
if (res && res.code == 200) {
|
|
2022
|
-
this.ts.getSuccessToast(
|
|
2233
|
+
this.ts.getSuccessToast(`Stores Assigned to User Successfully!`);
|
|
2023
2234
|
}
|
|
2024
2235
|
else {
|
|
2025
|
-
this.ts.getErrorToast(`Unable to assign
|
|
2236
|
+
this.ts.getErrorToast(`Unable to assign Stores to User!`);
|
|
2026
2237
|
}
|
|
2027
2238
|
this.activeModal.close('submit');
|
|
2028
2239
|
},
|
|
@@ -2048,10 +2259,10 @@ class AssignStorePopupComponent {
|
|
|
2048
2259
|
.subscribe({
|
|
2049
2260
|
next: (res) => {
|
|
2050
2261
|
if (res && res.code == 200) {
|
|
2051
|
-
this.ts.getSuccessToast(
|
|
2262
|
+
this.ts.getSuccessToast(`Stores Assigned to User Successfully!`);
|
|
2052
2263
|
}
|
|
2053
2264
|
else {
|
|
2054
|
-
this.ts.getErrorToast(`Unable to
|
|
2265
|
+
this.ts.getErrorToast(`Unable to Assign Stores to User!`);
|
|
2055
2266
|
}
|
|
2056
2267
|
this.activeModal.close('submit');
|
|
2057
2268
|
},
|
|
@@ -2119,42 +2330,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2119
2330
|
args: ['afterValidation']
|
|
2120
2331
|
}] } });
|
|
2121
2332
|
|
|
2122
|
-
class AlertPopupComponent {
|
|
2123
|
-
activeModal;
|
|
2124
|
-
service;
|
|
2125
|
-
cd;
|
|
2126
|
-
router;
|
|
2127
|
-
route;
|
|
2128
|
-
user;
|
|
2129
|
-
constructor(activeModal, service, cd, router, route) {
|
|
2130
|
-
this.activeModal = activeModal;
|
|
2131
|
-
this.service = service;
|
|
2132
|
-
this.cd = cd;
|
|
2133
|
-
this.router = router;
|
|
2134
|
-
this.route = route;
|
|
2135
|
-
}
|
|
2136
|
-
cancel() {
|
|
2137
|
-
this.activeModal.close('close');
|
|
2138
|
-
}
|
|
2139
|
-
onSubmit() {
|
|
2140
|
-
if (this.user?.lastOne) {
|
|
2141
|
-
this.activeModal.close();
|
|
2142
|
-
this.service.changeTab('teams');
|
|
2143
|
-
}
|
|
2144
|
-
else {
|
|
2145
|
-
this.activeModal.close('submit');
|
|
2146
|
-
}
|
|
2147
|
-
}
|
|
2148
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AlertPopupComponent, deps: [{ token: i1$1.NgbActiveModal }, { token: ManageUsersService }, { token: i0.ChangeDetectorRef }, { token: i3$1.Router }, { token: i3$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
2149
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AlertPopupComponent, selector: "lib-alert-popup", inputs: { user: "user" }, ngImport: i0, template: "<div class=\"card group-delete py-0\">\r\n <div *ngIf=\"!user?.lastOne\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Are you sure?</a>\r\n <span *ngIf=\"user?.isActive\" class=\"sub-title fw-normal mt-2\">Do you want to active the user<b> {{user?.userName}}</b> ?</span>\r\n <span *ngIf=\"!user?.isActive\" class=\"sub-title fw-normal mt-2\">Do you want to deactive the user<b> {{user?.userName}}</b> ?</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button *ngIf=\"user?.isActive\" id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit()\">Active</button>\r\n <button *ngIf=\"!user?.isActive\" id=\"alert-toast\" class=\"btn btn-danger w-100 ms-3\" (click)=\"onSubmit()\">Deactive </button>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n <div *ngIf=\"user?.lastOne\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a *ngIf=\"user?.teamName?.length\" class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">You are about to deactivate the {{user?.userName}} assigned as a lead to the team <span *ngFor=\"let team of user?.teamName;let last = last\">{{user?.teamName}}<span *ngIf=\"!last\">,</span></span>.</a>\r\n <a *ngIf=\"user?.clusterName?.length\" class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">You are about to deactivate the {{user?.userName}} assigned as a lead to the cluster <span *ngFor=\"let team of user?.clusterName;let last = last\">{{user?.clusterName}}<span *ngIf=\"!last\">,</span></span>.</a>\r\n <span class=\"sub-title fw-normal mt-2\">You have to assign another user as lead for the respective {{user?.clusterName?.length ? 'clusters' : 'teams'}} to deactivate this user.</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit()\">Assign New Lead</button>\r\n </div>\r\n \r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".sub-title{font-size:14px!important}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2150
|
-
}
|
|
2151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AlertPopupComponent, decorators: [{
|
|
2152
|
-
type: Component,
|
|
2153
|
-
args: [{ selector: 'lib-alert-popup', template: "<div class=\"card group-delete py-0\">\r\n <div *ngIf=\"!user?.lastOne\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Are you sure?</a>\r\n <span *ngIf=\"user?.isActive\" class=\"sub-title fw-normal mt-2\">Do you want to active the user<b> {{user?.userName}}</b> ?</span>\r\n <span *ngIf=\"!user?.isActive\" class=\"sub-title fw-normal mt-2\">Do you want to deactive the user<b> {{user?.userName}}</b> ?</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button *ngIf=\"user?.isActive\" id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit()\">Active</button>\r\n <button *ngIf=\"!user?.isActive\" id=\"alert-toast\" class=\"btn btn-danger w-100 ms-3\" (click)=\"onSubmit()\">Deactive </button>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n <div *ngIf=\"user?.lastOne\" class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEF0C7\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FFFAEB\" stroke-width=\"8\"/>\r\n <path d=\"M27.9988 24V28M27.9988 32H28.0088M26.2888 18.86L17.8188 33C17.6442 33.3024 17.5518 33.6453 17.5508 33.9945C17.5498 34.3437 17.6403 34.6871 17.8132 34.9905C17.9862 35.2939 18.2355 35.5467 18.5365 35.7238C18.8375 35.9009 19.1796 35.9961 19.5288 36H36.4688C36.818 35.9961 37.1601 35.9009 37.4611 35.7238C37.7621 35.5467 38.0114 35.2939 38.1844 34.9905C38.3573 34.6871 38.4478 34.3437 38.4468 33.9945C38.4458 33.6453 38.3534 33.3024 38.1788 33L29.7088 18.86C29.5305 18.5661 29.2795 18.3231 28.98 18.1544C28.6805 17.9858 28.3425 17.8972 27.9988 17.8972C27.6551 17.8972 27.3171 17.9858 27.0176 18.1544C26.7181 18.3231 26.4671 18.5661 26.2888 18.86Z\" stroke=\"#DC6803\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div>\r\n </div>\r\n <a *ngIf=\"user?.teamName?.length\" class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">You are about to deactivate the {{user?.userName}} assigned as a lead to the team <span *ngFor=\"let team of user?.teamName;let last = last\">{{user?.teamName}}<span *ngIf=\"!last\">,</span></span>.</a>\r\n <a *ngIf=\"user?.clusterName?.length\" class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">You are about to deactivate the {{user?.userName}} assigned as a lead to the cluster <span *ngFor=\"let team of user?.clusterName;let last = last\">{{user?.clusterName}}<span *ngIf=\"!last\">,</span></span>.</a>\r\n <span class=\"sub-title fw-normal mt-2\">You have to assign another user as lead for the respective {{user?.clusterName?.length ? 'clusters' : 'teams'}} to deactivate this user.</span>\r\n\r\n <div class=\"mt-5 w-100\">\r\n \r\n <div role=\"group\" class=\"d-flex mt-3 mb-15\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button id=\"alert-toast\" class=\"btn btn-primary w-100 ms-3\" (click)=\"onSubmit()\">Assign New Lead</button>\r\n </div>\r\n \r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".sub-title{font-size:14px!important}\n"] }]
|
|
2154
|
-
}], ctorParameters: () => [{ type: i1$1.NgbActiveModal }, { type: ManageUsersService }, { type: i0.ChangeDetectorRef }, { type: i3$1.Router }, { type: i3$1.ActivatedRoute }], propDecorators: { user: [{
|
|
2155
|
-
type: Input
|
|
2156
|
-
}] } });
|
|
2157
|
-
|
|
2158
2333
|
const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
|
|
2159
2334
|
const EXCEL_EXTENSION = '.xlsx';
|
|
2160
2335
|
class ExcelService {
|
|
@@ -2668,11 +2843,11 @@ class UserTableComponent {
|
|
|
2668
2843
|
this.loadTable();
|
|
2669
2844
|
}
|
|
2670
2845
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UserTableComponent, deps: [{ token: i1$1.NgbModal }, { token: i2.PageInfoService }, { token: i0.ChangeDetectorRef }, { token: ExcelService }, { token: i2.GlobalStateService }, { token: i4.ToastService }, { token: UserService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2671
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: UserTableComponent, selector: "lib-user-table", ngImport: i0, template: "<div *ngIf=\"receivedData ===''\" class=\"card\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <div class=\"d-flex overflow-auto h-50px\">\r\n <ul\r\n class=\"nav nav-stretch w-100 nav-line-tabs nav-line-tabs-2x border-bottom-2 fs-5 fw-bolder flex-nowrap\">\r\n <li class=\"nav-item activated cursor-pointer bg-light-primary px-5 text-center me-5\"><a\r\n class=\"nav-link me-0 text-active-primary\">Users</a>\r\n </li>\r\n <li *ngIf=\"(gs.userAccess | async)?.userType === 'tango' && userRole === 'superadmin'\"\r\n class=\"nav-item cursor-pointer me-5\"><a routerLink=\"/manage/users/tango/audit\"\r\n class=\"nav-link text-active-primary\">Audit Users\r\n Summary</a>\r\n </li>\r\n </ul>\r\n </div>\r\n <span class=\"text-sub mb-2 mt-5\">{{pagination?.totalCount}} total users</span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n @if (!loading && !noData) {\r\n <!-- @if ((gs.userAccess |async)?.Global_User_isEdit) { -->\r\n <button type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline btn-outline-default px-4 py-3 rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M8.125 13.125H16.3562L14.7438 14.7438L15.625 15.625L18.75 12.5L15.625 9.375L14.7438 10.2562L16.3562 11.875H8.125V13.125Z\"\r\n fill=\"black\" />\r\n <path\r\n d=\"M13.75 8.75V6.25C13.7505 6.16774 13.7347 6.0862 13.7036 6.01005C13.6725 5.93391 13.6267 5.86465 13.5688 5.80625L9.19375 1.43125C9.13535 1.37332 9.06609 1.32749 8.98994 1.29639C8.91379 1.26529 8.83225 1.24952 8.75 1.25H2.5C2.16848 1.25 1.85054 1.38169 1.61612 1.61611C1.3817 1.85053 1.25 2.16847 1.25 2.5V17.5C1.25 17.8315 1.3817 18.1495 1.61612 18.3839C1.85054 18.6183 2.16848 18.75 2.5 18.75H12.5C12.8315 18.75 13.1495 18.6183 13.3839 18.3839C13.6183 18.1495 13.75 17.8315 13.75 17.5V16.25H12.5V17.5H2.5V2.5H7.5V6.25C7.5 6.58152 7.6317 6.89946 7.86612 7.13388C8.10054 7.3683 8.41848 7.5 8.75 7.5H12.5V8.75H13.75ZM8.75 6.25V2.75625L12.2438 6.25H8.75Z\"\r\n fill=\"black\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n <!-- } -->\r\n }\r\n @if ((gs.userAccess | async)?.Global_User_isAdd) {\r\n <button type=\"button\" (click)=\"users('add')\" class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Add User</span> </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Name\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'userName' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'email' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('role')\">Roles\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'role' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('assigned')\">Clients Assigned\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'assigned' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'assigned' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'mobileNumber' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th>Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td>{{user?.userName}}</td>\r\n <td>{{user?.email}}</td>\r\n <td *ngIf=\"user?.role ==='superadmin'\">Super Admin</td>\r\n <td *ngIf=\"user?.role !=='superadmin'\">{{user?.role | titlecase}}</td>\r\n <td>{{user?.assigned || 0}}</td>\r\n <td>{{user?.mobileNumber}}</td>\r\n <td>\r\n <div class=\"d-flex\">\r\n <span class=\"cursor-pointer\" (click)=\"Viewusers('view',user)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1995_16400)\">\r\n <path\r\n d=\"M1.33325 10C1.33325 10 4.66658 3.33337 10.4999 3.33337C16.3333 3.33337 19.6666 10 19.6666 10C19.6666 10 16.3333 16.6667 10.4999 16.6667C4.66658 16.6667 1.33325 10 1.33325 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10.4999 12.5C11.8806 12.5 12.9999 11.3808 12.9999 10C12.9999 8.61933 11.8806 7.50004 10.4999 7.50004C9.11921 7.50004 7.99992 8.61933 7.99992 10C7.99992 11.3808 9.11921 12.5 10.4999 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1995_16400\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n <span class=\"form-check form-switch mx-6\">\r\n <input class=\"form-check-input mt-3 cursor-pointer\" type=\"checkbox\"\r\n [disabled]=\"!((gs.userAccess | async)?.Global_User_isEdit)\"\r\n (change)=\"userStatusChange(user,i)\" [(ngModel)]=\"userList[i].isActive\"\r\n role=\"switch\" checked=\"\">\r\n @if (userList[i].isActive) {\r\n Active\r\n } @else {\r\n Deactive\r\n }\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-nodata\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodata-title\">No data found</div>\r\n <div class=\"nodata-sub\">There is no result for this Date</div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n<!-- <div *ngIf=\"receivedData ===''\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <div class=\"card p-5\">\r\n <div class=\"border-0\">\r\n <h3 class=\"title fw-bold\">Roles & Permission</h3>\r\n <h6 class=\"sub-title fw-normal\">{{rolesCount || 0}} total roles</h6>\r\n </div>\r\n <div class=\"card-body px-0\">\r\n <div class=\"flex-column align-items-start\">\r\n <div class=\"row\">\r\n <div class=\"col-md-4 border-val mx-3 mb-7 py-7\" *ngFor=\"let obj of roles\">\r\n <a *ngIf=\"obj.roleName ==='superadmin'\" class=\"role-title my-2 cursor-pointer\" >Super Admin</a>\r\n <a *ngIf=\"obj.roleName !=='superadmin'\" class=\"role-title my-2 cursor-pointer\" >{{obj.roleName |\r\n titlecase}}</a>\r\n <div *ngIf=\"obj.roleName ==='superadmin'\" class=\"sub-title fw-semibold my-5\">Oversees all the operations and controls the entire functionality of the dashboard</div>\r\n <div *ngIf=\"obj.roleName ==='admin'\" class=\"sub-title fw-semibold my-5\">Manages specific operations, permissions, and can change setting for assigned locations</div>\r\n <div *ngIf=\"obj.roleName ==='user'\" class=\"sub-title fw-semibold my-5\">Access to specific location and will be able to view dashboard</div>\r\n <div><span class=\"me-5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"24\"\r\n viewBox=\"0 0 25 24\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1973_14308)\">\r\n <path\r\n d=\"M17.5 21V19C17.5 17.9391 17.0786 16.9217 16.3284 16.1716C15.5783 15.4214 14.5609 15 13.5 15H5.5C4.43913 15 3.42172 15.4214 2.67157 16.1716C1.92143 16.9217 1.5 17.9391 1.5 19V21M23.5 21V19C23.4993 18.1137 23.2044 17.2528 22.6614 16.5523C22.1184 15.8519 21.3581 15.3516 20.5 15.13M16.5 3.13C17.3604 3.3503 18.123 3.8507 18.6676 4.55231C19.2122 5.25392 19.5078 6.11683 19.5078 7.005C19.5078 7.89317 19.2122 8.75608 18.6676 9.45769C18.123 10.1593 17.3604 10.6597 16.5 10.88M13.5 7C13.5 9.20914 11.7091 11 9.5 11C7.29086 11 5.5 9.20914 5.5 7C5.5 4.79086 7.29086 3 9.5 3C11.7091 3 13.5 4.79086 13.5 7Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1973_14308\">\r\n <rect width=\"24\" height=\"24\" fill=\"white\" transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n <span class=\"uses-list fw-semibold\">{{obj?.count || 0}} Members</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> -->\r\n\r\n<!--begin::Row-->\r\n<!-- <div *ngIf=\"receivedData ==='Role Value'\" class=\"row gx-5 gx-xl-10\"> -->\r\n<!--begin::Col-->\r\n<!-- <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\"> -->\r\n<!-- <lib-roles-permission-table (dataEvent)=\"receiveData($event)\"></lib-roles-permission-table> -->\r\n<!-- </div> -->\r\n<!--end::Col-->\r\n<!-- </div> -->\r\n<!--end::Row-->", styles: [".border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:16px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}.nav-line-tabs .activated{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.nav-line-tabs .activated a{color:var(--Primary-700, #009BF3)!important}.nav-line-tabs .activated :hover,.nav-item,.nav-item .nav-link:hover{border:0px!important}.nav-line-tabs :hover{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "component", type: i4.FiltersComponent, selector: "lib-filters", inputs: ["dataObject"], outputs: ["appliedFilters"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }] });
|
|
2846
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: UserTableComponent, selector: "lib-user-table", ngImport: i0, template: "<div *ngIf=\"receivedData ===''\" class=\"card\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <div class=\"d-flex overflow-auto h-50px\">\r\n <ul\r\n class=\"nav nav-stretch w-100 nav-line-tabs nav-line-tabs-2x border-bottom-2 fs-5 fw-bolder flex-nowrap\">\r\n <li class=\"nav-item activated cursor-pointer bg-light-primary px-5 text-center me-5\"><a\r\n class=\"nav-link me-0 text-active-primary\">Users</a>\r\n </li>\r\n <li *ngIf=\"(gs.userAccess | async)?.userType === 'tango' && userRole === 'superadmin'\"\r\n class=\"nav-item cursor-pointer me-5\"><a routerLink=\"/manage/users/tango/audit\"\r\n class=\"nav-link text-active-primary\">Audit Users\r\n Summary</a>\r\n </li>\r\n </ul>\r\n </div>\r\n <span class=\"text-sub mb-2 mt-5\">{{pagination?.totalCount}} total users</span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n @if (!loading && !noData) {\r\n <!-- @if ((gs.userAccess |async)?.Global_User_isEdit) { -->\r\n <button type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline btn-outline-default px-4 py-3 rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M8.125 13.125H16.3562L14.7438 14.7438L15.625 15.625L18.75 12.5L15.625 9.375L14.7438 10.2562L16.3562 11.875H8.125V13.125Z\"\r\n fill=\"black\" />\r\n <path\r\n d=\"M13.75 8.75V6.25C13.7505 6.16774 13.7347 6.0862 13.7036 6.01005C13.6725 5.93391 13.6267 5.86465 13.5688 5.80625L9.19375 1.43125C9.13535 1.37332 9.06609 1.32749 8.98994 1.29639C8.91379 1.26529 8.83225 1.24952 8.75 1.25H2.5C2.16848 1.25 1.85054 1.38169 1.61612 1.61611C1.3817 1.85053 1.25 2.16847 1.25 2.5V17.5C1.25 17.8315 1.3817 18.1495 1.61612 18.3839C1.85054 18.6183 2.16848 18.75 2.5 18.75H12.5C12.8315 18.75 13.1495 18.6183 13.3839 18.3839C13.6183 18.1495 13.75 17.8315 13.75 17.5V16.25H12.5V17.5H2.5V2.5H7.5V6.25C7.5 6.58152 7.6317 6.89946 7.86612 7.13388C8.10054 7.3683 8.41848 7.5 8.75 7.5H12.5V8.75H13.75ZM8.75 6.25V2.75625L12.2438 6.25H8.75Z\"\r\n fill=\"black\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n <!-- } -->\r\n }\r\n @if ((gs.userAccess | async)?.Global_User_isAdd) {\r\n <button type=\"button\" (click)=\"users('add')\" class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Add User</span> </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Name\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'userName' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'email' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th >Roles\r\n <!-- class=\"cursor-pointer\" (click)=\"onSort('role')\" -->\r\n <!-- <svg [ngClass]=\"userList_req?.sortColumName === 'role' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> -->\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('assigned')\">Clients Assigned\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'assigned' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'assigned' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'mobileNumber' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th>Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td>{{user?.userName}}</td>\r\n <td>{{user?.email}}</td>\r\n <td *ngIf=\"user?.role ==='superadmin'\">Super Admin</td>\r\n <td *ngIf=\"user?.role !=='superadmin'\">{{user?.role | titlecase}}</td>\r\n <td>{{user?.assigned || 0}}</td>\r\n <td>{{user?.mobileNumber}}</td>\r\n <td>\r\n <div class=\"d-flex\">\r\n <span class=\"cursor-pointer\" (click)=\"Viewusers('view',user)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1995_16400)\">\r\n <path\r\n d=\"M1.33325 10C1.33325 10 4.66658 3.33337 10.4999 3.33337C16.3333 3.33337 19.6666 10 19.6666 10C19.6666 10 16.3333 16.6667 10.4999 16.6667C4.66658 16.6667 1.33325 10 1.33325 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10.4999 12.5C11.8806 12.5 12.9999 11.3808 12.9999 10C12.9999 8.61933 11.8806 7.50004 10.4999 7.50004C9.11921 7.50004 7.99992 8.61933 7.99992 10C7.99992 11.3808 9.11921 12.5 10.4999 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1995_16400\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n <span class=\"form-check form-switch mx-6\">\r\n <input class=\"form-check-input mt-3 cursor-pointer\" type=\"checkbox\"\r\n [disabled]=\"!((gs.userAccess | async)?.Global_User_isEdit)\"\r\n (change)=\"userStatusChange(user,i)\" [(ngModel)]=\"userList[i].isActive\"\r\n role=\"switch\" checked=\"\">\r\n @if (userList[i].isActive) {\r\n Active\r\n } @else {\r\n Deactive\r\n }\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-nodata\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodata-title\">No data found</div>\r\n <div class=\"nodata-sub\">There is no result for this Date</div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n<!-- <div *ngIf=\"receivedData ===''\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <div class=\"card p-5\">\r\n <div class=\"border-0\">\r\n <h3 class=\"title fw-bold\">Roles & Permission</h3>\r\n <h6 class=\"sub-title fw-normal\">{{rolesCount || 0}} total roles</h6>\r\n </div>\r\n <div class=\"card-body px-0\">\r\n <div class=\"flex-column align-items-start\">\r\n <div class=\"row\">\r\n <div class=\"col-md-4 border-val mx-3 mb-7 py-7\" *ngFor=\"let obj of roles\">\r\n <a *ngIf=\"obj.roleName ==='superadmin'\" class=\"role-title my-2 cursor-pointer\" >Super Admin</a>\r\n <a *ngIf=\"obj.roleName !=='superadmin'\" class=\"role-title my-2 cursor-pointer\" >{{obj.roleName |\r\n titlecase}}</a>\r\n <div *ngIf=\"obj.roleName ==='superadmin'\" class=\"sub-title fw-semibold my-5\">Oversees all the operations and controls the entire functionality of the dashboard</div>\r\n <div *ngIf=\"obj.roleName ==='admin'\" class=\"sub-title fw-semibold my-5\">Manages specific operations, permissions, and can change setting for assigned locations</div>\r\n <div *ngIf=\"obj.roleName ==='user'\" class=\"sub-title fw-semibold my-5\">Access to specific location and will be able to view dashboard</div>\r\n <div><span class=\"me-5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"24\"\r\n viewBox=\"0 0 25 24\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1973_14308)\">\r\n <path\r\n d=\"M17.5 21V19C17.5 17.9391 17.0786 16.9217 16.3284 16.1716C15.5783 15.4214 14.5609 15 13.5 15H5.5C4.43913 15 3.42172 15.4214 2.67157 16.1716C1.92143 16.9217 1.5 17.9391 1.5 19V21M23.5 21V19C23.4993 18.1137 23.2044 17.2528 22.6614 16.5523C22.1184 15.8519 21.3581 15.3516 20.5 15.13M16.5 3.13C17.3604 3.3503 18.123 3.8507 18.6676 4.55231C19.2122 5.25392 19.5078 6.11683 19.5078 7.005C19.5078 7.89317 19.2122 8.75608 18.6676 9.45769C18.123 10.1593 17.3604 10.6597 16.5 10.88M13.5 7C13.5 9.20914 11.7091 11 9.5 11C7.29086 11 5.5 9.20914 5.5 7C5.5 4.79086 7.29086 3 9.5 3C11.7091 3 13.5 4.79086 13.5 7Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1973_14308\">\r\n <rect width=\"24\" height=\"24\" fill=\"white\" transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n <span class=\"uses-list fw-semibold\">{{obj?.count || 0}} Members</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> -->\r\n\r\n<!--begin::Row-->\r\n<!-- <div *ngIf=\"receivedData ==='Role Value'\" class=\"row gx-5 gx-xl-10\"> -->\r\n<!--begin::Col-->\r\n<!-- <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\"> -->\r\n<!-- <lib-roles-permission-table (dataEvent)=\"receiveData($event)\"></lib-roles-permission-table> -->\r\n<!-- </div> -->\r\n<!--end::Col-->\r\n<!-- </div> -->\r\n<!--end::Row-->", styles: [".border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:16px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}.nav-line-tabs .activated{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.nav-line-tabs .activated a{color:var(--Primary-700, #009BF3)!important}.nav-line-tabs .activated :hover,.nav-item,.nav-item .nav-link:hover{border:0px!important}.nav-line-tabs :hover{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "component", type: i4.FiltersComponent, selector: "lib-filters", inputs: ["dataObject"], outputs: ["appliedFilters"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }] });
|
|
2672
2847
|
}
|
|
2673
2848
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UserTableComponent, decorators: [{
|
|
2674
2849
|
type: Component,
|
|
2675
|
-
args: [{ selector: "lib-user-table", template: "<div *ngIf=\"receivedData ===''\" class=\"card\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <div class=\"d-flex overflow-auto h-50px\">\r\n <ul\r\n class=\"nav nav-stretch w-100 nav-line-tabs nav-line-tabs-2x border-bottom-2 fs-5 fw-bolder flex-nowrap\">\r\n <li class=\"nav-item activated cursor-pointer bg-light-primary px-5 text-center me-5\"><a\r\n class=\"nav-link me-0 text-active-primary\">Users</a>\r\n </li>\r\n <li *ngIf=\"(gs.userAccess | async)?.userType === 'tango' && userRole === 'superadmin'\"\r\n class=\"nav-item cursor-pointer me-5\"><a routerLink=\"/manage/users/tango/audit\"\r\n class=\"nav-link text-active-primary\">Audit Users\r\n Summary</a>\r\n </li>\r\n </ul>\r\n </div>\r\n <span class=\"text-sub mb-2 mt-5\">{{pagination?.totalCount}} total users</span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n @if (!loading && !noData) {\r\n <!-- @if ((gs.userAccess |async)?.Global_User_isEdit) { -->\r\n <button type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline btn-outline-default px-4 py-3 rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M8.125 13.125H16.3562L14.7438 14.7438L15.625 15.625L18.75 12.5L15.625 9.375L14.7438 10.2562L16.3562 11.875H8.125V13.125Z\"\r\n fill=\"black\" />\r\n <path\r\n d=\"M13.75 8.75V6.25C13.7505 6.16774 13.7347 6.0862 13.7036 6.01005C13.6725 5.93391 13.6267 5.86465 13.5688 5.80625L9.19375 1.43125C9.13535 1.37332 9.06609 1.32749 8.98994 1.29639C8.91379 1.26529 8.83225 1.24952 8.75 1.25H2.5C2.16848 1.25 1.85054 1.38169 1.61612 1.61611C1.3817 1.85053 1.25 2.16847 1.25 2.5V17.5C1.25 17.8315 1.3817 18.1495 1.61612 18.3839C1.85054 18.6183 2.16848 18.75 2.5 18.75H12.5C12.8315 18.75 13.1495 18.6183 13.3839 18.3839C13.6183 18.1495 13.75 17.8315 13.75 17.5V16.25H12.5V17.5H2.5V2.5H7.5V6.25C7.5 6.58152 7.6317 6.89946 7.86612 7.13388C8.10054 7.3683 8.41848 7.5 8.75 7.5H12.5V8.75H13.75ZM8.75 6.25V2.75625L12.2438 6.25H8.75Z\"\r\n fill=\"black\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n <!-- } -->\r\n }\r\n @if ((gs.userAccess | async)?.Global_User_isAdd) {\r\n <button type=\"button\" (click)=\"users('add')\" class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Add User</span> </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Name\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'userName' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'email' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('role')\">Roles\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'role' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('assigned')\">Clients Assigned\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'assigned' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'assigned' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'mobileNumber' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th>Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td>{{user?.userName}}</td>\r\n <td>{{user?.email}}</td>\r\n <td *ngIf=\"user?.role ==='superadmin'\">Super Admin</td>\r\n <td *ngIf=\"user?.role !=='superadmin'\">{{user?.role | titlecase}}</td>\r\n <td>{{user?.assigned || 0}}</td>\r\n <td>{{user?.mobileNumber}}</td>\r\n <td>\r\n <div class=\"d-flex\">\r\n <span class=\"cursor-pointer\" (click)=\"Viewusers('view',user)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1995_16400)\">\r\n <path\r\n d=\"M1.33325 10C1.33325 10 4.66658 3.33337 10.4999 3.33337C16.3333 3.33337 19.6666 10 19.6666 10C19.6666 10 16.3333 16.6667 10.4999 16.6667C4.66658 16.6667 1.33325 10 1.33325 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10.4999 12.5C11.8806 12.5 12.9999 11.3808 12.9999 10C12.9999 8.61933 11.8806 7.50004 10.4999 7.50004C9.11921 7.50004 7.99992 8.61933 7.99992 10C7.99992 11.3808 9.11921 12.5 10.4999 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1995_16400\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n <span class=\"form-check form-switch mx-6\">\r\n <input class=\"form-check-input mt-3 cursor-pointer\" type=\"checkbox\"\r\n [disabled]=\"!((gs.userAccess | async)?.Global_User_isEdit)\"\r\n (change)=\"userStatusChange(user,i)\" [(ngModel)]=\"userList[i].isActive\"\r\n role=\"switch\" checked=\"\">\r\n @if (userList[i].isActive) {\r\n Active\r\n } @else {\r\n Deactive\r\n }\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-nodata\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodata-title\">No data found</div>\r\n <div class=\"nodata-sub\">There is no result for this Date</div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n<!-- <div *ngIf=\"receivedData ===''\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <div class=\"card p-5\">\r\n <div class=\"border-0\">\r\n <h3 class=\"title fw-bold\">Roles & Permission</h3>\r\n <h6 class=\"sub-title fw-normal\">{{rolesCount || 0}} total roles</h6>\r\n </div>\r\n <div class=\"card-body px-0\">\r\n <div class=\"flex-column align-items-start\">\r\n <div class=\"row\">\r\n <div class=\"col-md-4 border-val mx-3 mb-7 py-7\" *ngFor=\"let obj of roles\">\r\n <a *ngIf=\"obj.roleName ==='superadmin'\" class=\"role-title my-2 cursor-pointer\" >Super Admin</a>\r\n <a *ngIf=\"obj.roleName !=='superadmin'\" class=\"role-title my-2 cursor-pointer\" >{{obj.roleName |\r\n titlecase}}</a>\r\n <div *ngIf=\"obj.roleName ==='superadmin'\" class=\"sub-title fw-semibold my-5\">Oversees all the operations and controls the entire functionality of the dashboard</div>\r\n <div *ngIf=\"obj.roleName ==='admin'\" class=\"sub-title fw-semibold my-5\">Manages specific operations, permissions, and can change setting for assigned locations</div>\r\n <div *ngIf=\"obj.roleName ==='user'\" class=\"sub-title fw-semibold my-5\">Access to specific location and will be able to view dashboard</div>\r\n <div><span class=\"me-5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"24\"\r\n viewBox=\"0 0 25 24\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1973_14308)\">\r\n <path\r\n d=\"M17.5 21V19C17.5 17.9391 17.0786 16.9217 16.3284 16.1716C15.5783 15.4214 14.5609 15 13.5 15H5.5C4.43913 15 3.42172 15.4214 2.67157 16.1716C1.92143 16.9217 1.5 17.9391 1.5 19V21M23.5 21V19C23.4993 18.1137 23.2044 17.2528 22.6614 16.5523C22.1184 15.8519 21.3581 15.3516 20.5 15.13M16.5 3.13C17.3604 3.3503 18.123 3.8507 18.6676 4.55231C19.2122 5.25392 19.5078 6.11683 19.5078 7.005C19.5078 7.89317 19.2122 8.75608 18.6676 9.45769C18.123 10.1593 17.3604 10.6597 16.5 10.88M13.5 7C13.5 9.20914 11.7091 11 9.5 11C7.29086 11 5.5 9.20914 5.5 7C5.5 4.79086 7.29086 3 9.5 3C11.7091 3 13.5 4.79086 13.5 7Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1973_14308\">\r\n <rect width=\"24\" height=\"24\" fill=\"white\" transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n <span class=\"uses-list fw-semibold\">{{obj?.count || 0}} Members</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> -->\r\n\r\n<!--begin::Row-->\r\n<!-- <div *ngIf=\"receivedData ==='Role Value'\" class=\"row gx-5 gx-xl-10\"> -->\r\n<!--begin::Col-->\r\n<!-- <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\"> -->\r\n<!-- <lib-roles-permission-table (dataEvent)=\"receiveData($event)\"></lib-roles-permission-table> -->\r\n<!-- </div> -->\r\n<!--end::Col-->\r\n<!-- </div> -->\r\n<!--end::Row-->", styles: [".border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:16px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}.nav-line-tabs .activated{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.nav-line-tabs .activated a{color:var(--Primary-700, #009BF3)!important}.nav-line-tabs .activated :hover,.nav-item,.nav-item .nav-link:hover{border:0px!important}.nav-line-tabs :hover{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}\n"] }]
|
|
2850
|
+
args: [{ selector: "lib-user-table", template: "<div *ngIf=\"receivedData ===''\" class=\"card\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <div class=\"d-flex overflow-auto h-50px\">\r\n <ul\r\n class=\"nav nav-stretch w-100 nav-line-tabs nav-line-tabs-2x border-bottom-2 fs-5 fw-bolder flex-nowrap\">\r\n <li class=\"nav-item activated cursor-pointer bg-light-primary px-5 text-center me-5\"><a\r\n class=\"nav-link me-0 text-active-primary\">Users</a>\r\n </li>\r\n <li *ngIf=\"(gs.userAccess | async)?.userType === 'tango' && userRole === 'superadmin'\"\r\n class=\"nav-item cursor-pointer me-5\"><a routerLink=\"/manage/users/tango/audit\"\r\n class=\"nav-link text-active-primary\">Audit Users\r\n Summary</a>\r\n </li>\r\n </ul>\r\n </div>\r\n <span class=\"text-sub mb-2 mt-5\">{{pagination?.totalCount}} total users</span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n @if (!loading && !noData) {\r\n <!-- @if ((gs.userAccess |async)?.Global_User_isEdit) { -->\r\n <button type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline btn-outline-default px-4 py-3 rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M8.125 13.125H16.3562L14.7438 14.7438L15.625 15.625L18.75 12.5L15.625 9.375L14.7438 10.2562L16.3562 11.875H8.125V13.125Z\"\r\n fill=\"black\" />\r\n <path\r\n d=\"M13.75 8.75V6.25C13.7505 6.16774 13.7347 6.0862 13.7036 6.01005C13.6725 5.93391 13.6267 5.86465 13.5688 5.80625L9.19375 1.43125C9.13535 1.37332 9.06609 1.32749 8.98994 1.29639C8.91379 1.26529 8.83225 1.24952 8.75 1.25H2.5C2.16848 1.25 1.85054 1.38169 1.61612 1.61611C1.3817 1.85053 1.25 2.16847 1.25 2.5V17.5C1.25 17.8315 1.3817 18.1495 1.61612 18.3839C1.85054 18.6183 2.16848 18.75 2.5 18.75H12.5C12.8315 18.75 13.1495 18.6183 13.3839 18.3839C13.6183 18.1495 13.75 17.8315 13.75 17.5V16.25H12.5V17.5H2.5V2.5H7.5V6.25C7.5 6.58152 7.6317 6.89946 7.86612 7.13388C8.10054 7.3683 8.41848 7.5 8.75 7.5H12.5V8.75H13.75ZM8.75 6.25V2.75625L12.2438 6.25H8.75Z\"\r\n fill=\"black\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n <!-- } -->\r\n }\r\n @if ((gs.userAccess | async)?.Global_User_isAdd) {\r\n <button type=\"button\" (click)=\"users('add')\" class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Add User</span> </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Name\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'userName' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'email' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th >Roles\r\n <!-- class=\"cursor-pointer\" (click)=\"onSort('role')\" -->\r\n <!-- <svg [ngClass]=\"userList_req?.sortColumName === 'role' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> -->\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('assigned')\">Clients Assigned\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'assigned' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'assigned' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'mobileNumber' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th>Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td>{{user?.userName}}</td>\r\n <td>{{user?.email}}</td>\r\n <td *ngIf=\"user?.role ==='superadmin'\">Super Admin</td>\r\n <td *ngIf=\"user?.role !=='superadmin'\">{{user?.role | titlecase}}</td>\r\n <td>{{user?.assigned || 0}}</td>\r\n <td>{{user?.mobileNumber}}</td>\r\n <td>\r\n <div class=\"d-flex\">\r\n <span class=\"cursor-pointer\" (click)=\"Viewusers('view',user)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1995_16400)\">\r\n <path\r\n d=\"M1.33325 10C1.33325 10 4.66658 3.33337 10.4999 3.33337C16.3333 3.33337 19.6666 10 19.6666 10C19.6666 10 16.3333 16.6667 10.4999 16.6667C4.66658 16.6667 1.33325 10 1.33325 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10.4999 12.5C11.8806 12.5 12.9999 11.3808 12.9999 10C12.9999 8.61933 11.8806 7.50004 10.4999 7.50004C9.11921 7.50004 7.99992 8.61933 7.99992 10C7.99992 11.3808 9.11921 12.5 10.4999 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1995_16400\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n <span class=\"form-check form-switch mx-6\">\r\n <input class=\"form-check-input mt-3 cursor-pointer\" type=\"checkbox\"\r\n [disabled]=\"!((gs.userAccess | async)?.Global_User_isEdit)\"\r\n (change)=\"userStatusChange(user,i)\" [(ngModel)]=\"userList[i].isActive\"\r\n role=\"switch\" checked=\"\">\r\n @if (userList[i].isActive) {\r\n Active\r\n } @else {\r\n Deactive\r\n }\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-nodata\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodata-title\">No data found</div>\r\n <div class=\"nodata-sub\">There is no result for this Date</div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n<!-- <div *ngIf=\"receivedData ===''\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <div class=\"card p-5\">\r\n <div class=\"border-0\">\r\n <h3 class=\"title fw-bold\">Roles & Permission</h3>\r\n <h6 class=\"sub-title fw-normal\">{{rolesCount || 0}} total roles</h6>\r\n </div>\r\n <div class=\"card-body px-0\">\r\n <div class=\"flex-column align-items-start\">\r\n <div class=\"row\">\r\n <div class=\"col-md-4 border-val mx-3 mb-7 py-7\" *ngFor=\"let obj of roles\">\r\n <a *ngIf=\"obj.roleName ==='superadmin'\" class=\"role-title my-2 cursor-pointer\" >Super Admin</a>\r\n <a *ngIf=\"obj.roleName !=='superadmin'\" class=\"role-title my-2 cursor-pointer\" >{{obj.roleName |\r\n titlecase}}</a>\r\n <div *ngIf=\"obj.roleName ==='superadmin'\" class=\"sub-title fw-semibold my-5\">Oversees all the operations and controls the entire functionality of the dashboard</div>\r\n <div *ngIf=\"obj.roleName ==='admin'\" class=\"sub-title fw-semibold my-5\">Manages specific operations, permissions, and can change setting for assigned locations</div>\r\n <div *ngIf=\"obj.roleName ==='user'\" class=\"sub-title fw-semibold my-5\">Access to specific location and will be able to view dashboard</div>\r\n <div><span class=\"me-5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"24\"\r\n viewBox=\"0 0 25 24\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1973_14308)\">\r\n <path\r\n d=\"M17.5 21V19C17.5 17.9391 17.0786 16.9217 16.3284 16.1716C15.5783 15.4214 14.5609 15 13.5 15H5.5C4.43913 15 3.42172 15.4214 2.67157 16.1716C1.92143 16.9217 1.5 17.9391 1.5 19V21M23.5 21V19C23.4993 18.1137 23.2044 17.2528 22.6614 16.5523C22.1184 15.8519 21.3581 15.3516 20.5 15.13M16.5 3.13C17.3604 3.3503 18.123 3.8507 18.6676 4.55231C19.2122 5.25392 19.5078 6.11683 19.5078 7.005C19.5078 7.89317 19.2122 8.75608 18.6676 9.45769C18.123 10.1593 17.3604 10.6597 16.5 10.88M13.5 7C13.5 9.20914 11.7091 11 9.5 11C7.29086 11 5.5 9.20914 5.5 7C5.5 4.79086 7.29086 3 9.5 3C11.7091 3 13.5 4.79086 13.5 7Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1973_14308\">\r\n <rect width=\"24\" height=\"24\" fill=\"white\" transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n <span class=\"uses-list fw-semibold\">{{obj?.count || 0}} Members</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> -->\r\n\r\n<!--begin::Row-->\r\n<!-- <div *ngIf=\"receivedData ==='Role Value'\" class=\"row gx-5 gx-xl-10\"> -->\r\n<!--begin::Col-->\r\n<!-- <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\"> -->\r\n<!-- <lib-roles-permission-table (dataEvent)=\"receiveData($event)\"></lib-roles-permission-table> -->\r\n<!-- </div> -->\r\n<!--end::Col-->\r\n<!-- </div> -->\r\n<!--end::Row-->", styles: [".border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:16px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}.nav-line-tabs .activated{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.nav-line-tabs .activated a{color:var(--Primary-700, #009BF3)!important}.nav-line-tabs .activated :hover,.nav-item,.nav-item .nav-link:hover{border:0px!important}.nav-line-tabs :hover{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}\n"] }]
|
|
2676
2851
|
}], ctorParameters: () => [{ type: i1$1.NgbModal }, { type: i2.PageInfoService }, { type: i0.ChangeDetectorRef }, { type: ExcelService }, { type: i2.GlobalStateService }, { type: i4.ToastService }, { type: UserService }] });
|
|
2677
2852
|
|
|
2678
2853
|
class ChipSelectComponent {
|
|
@@ -2818,7 +2993,7 @@ class ChipSelectComponent {
|
|
|
2818
2993
|
this.updateSelectedValues();
|
|
2819
2994
|
}
|
|
2820
2995
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChipSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: ManageUsersService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2821
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ChipSelectComponent, selector: "lib-chip-select", inputs: { items: "items", searchField: "searchField", multi: "multi", idField: "idField", selectedValues: "selectedValues", disabled: "disabled", label: "label", badgeValue: "badgeValue", searchKey: "searchKey" }, outputs: { selected: "selected" }, host: { listeners: { "document:click": "onClick($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"chip-box\">\r\n <div class=\"outer-container d-flex align-items-center position-relative w-100\">\r\n <div class=\"input-container form-control\">\r\n <ng-container *ngFor=\"let item of selectedValues;let i=index\">\r\n <span *ngIf=\"i <= 9\" class=\"chip\">\r\n <span class=\"me-3\">{{item?.[searchKey[0]] || item?.[searchKey[1]]}}</span>\r\n <span (click)=\"removeBadge(item,i)\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </span>\r\n </ng-container>\r\n <span *ngIf=\"selectedValues?.length > 9\" class=\"chip\"> +{{selectedValues?.length - 9}}</span>\r\n <input style=\"min-height: 44px;\" type=\"text\" class=\"form-control dropdown-input ps-3 me-3\" [(ngModel)]=\"searchValue\" (click)=\"openDropdown($event)\" (input)=\"onInput($event)\" id=\"searchInput\">\r\n </div>\r\n </div>\r\n <div [ngClass]=\"showDropdown ? '' : 'd-none'\" class=\"input-chip dropdown\" >\r\n <!-- <div class=\"w-100 input-wrapper\">\r\n <input [(ngModel)]=\"searchValue\" placeholder=\"Search\" (input)=\"onInput($event)\" type=\"text\"> \r\n <svg class=\"search-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\">\r\n <path 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\" stroke=\"#667085\" stroke-width=\"1.3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div> -->\r\n <ul>\r\n <li *ngIf=\"multi && filteredValues?.length\">\r\n <label class=\"form-check\" for=\"selectAll\">\r\n <input (change)=\"onSelectAll($event)\" [checked]=\"checkIfAllSelected()\" class=\"form-check-input me-3\" type=\"checkbox\"\r\n id=\"selectAll\">\r\n <span class=\"form-check-label\">\r\n Select All\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngFor=\"let item of filteredValues\" [ngClass]=\"item.isSelected && !multi ? 'selected' : ''\" >\r\n <label [for]=\"item[idField] + instanceId\" [ngClass]=\"multi ? '': 'ps-0'\" class=\"form-check\">\r\n <input [ngClass]=\"multi ? '': 'd-none'\" (change)=\"onSelect($event, item)\" [(ngModel)]=\"item.isSelected\" class=\"form-check-input me-3\" type=\"checkbox\" value=\"\"\r\n [id]=\"item[idField] + instanceId\">\r\n <span class=\"form-check-label\" >\r\n <!-- {{item[searchKey[0]] || item?.[searchKey[1]]}} -->\r\n {{item[searchField[0] || item?.[searchField[1]]]}}\r\n </span> <span class=\"badge-value ms-5\">\r\n {{item[badgeValue]}}\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngIf=\"!filteredValues?.length\" >\r\n <span class=\"d-flex align-items-center justify-content-center\" >No data found</span>\r\n </li>\r\n </ul> \r\n </div> \r\n \r\n</div>", styles: [":host{width:100%;height:100%}.chip-box{position:relative;background-color:#fff}.chip-box .form-select{font-size:1.1rem;font-weight:600;border-radius:8px!important;color:var(--Gray-500, #344054);border:1px solid var(--Gray-300, #D0D5DD)!important;min-height:42.5px;max-height:300px!important}.chip-box .disable-input{pointer-events:none;background-color:#f9fafb!important}.chip-box .input-chip{position:absolute;width:100%;z-index:1}.chip-box .input-chip .input-wrapper{padding:8px 10px;background-color:#fff;border-top-right-radius:8px;border-top-left-radius:8px;border-top:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.chip-box .input-chip .input-wrapper input{width:100%;border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF);box-shadow:0 1px 2px #1018280d;padding:10px 14px 10px 30px;outline:none}.chip-box .input-chip .input-wrapper input ::placeholder{color:var(--Gray-500, #667085);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.chip-box .input-chip .input-wrapper .search-icon{position:absolute;left:20px;top:20px}.chip-box .input-chip ul{position:relative;background-color:#fff;margin:0;padding:0;max-height:200px;min-height:auto;overflow-y:auto;border-bottom-right-radius:8px;border-bottom-left-radius:8px;border-bottom:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.chip-box .input-chip ul .selected{background:#f9fafb}.chip-box .input-chip ul li{list-style:none;padding:10px 16px;cursor:pointer}.chip-box .input-chip ul li label{cursor:pointer}.chip-box .input-chip ul li:hover{background:#f9fafb}.outer-container{position:relative}.outer-container .form-control{padding-top:0;padding-bottom:0}.outer-container .input-container{min-height:auto;max-height:100px!important;overflow:auto;width:100%;display:flex;flex-wrap:wrap}.outer-container .input-container input{all:unset;flex:1;min-width:50px}.outer-container .input-container .chip{margin:10px 0 10px 10px;padding:3px 10px;border-radius:16px;background:var(--Gray-100, #F2F4F7);color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.outer-container .input-container .chip:nth-child(1){margin-left:0}.form-check{display:flex;align-items:center}.form-check-input{height:16px;width:16px;border-radius:4px;border:1px solid var(--Primary-600, #00A3FF)}.form-check-input:checked{--bs-form-check-bg-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB4SURBVHgBhY7NDUBQEIRnqcJNKXTg6qYTStCB+Isy6IQSNMDa9SLh5eWZZPcw+81kCX/quABhD73QyKXsGoyIvNCJSto2hEhNtY4N9cwYeMXEsVqB1GaSauRQOpty2tSmO3FgloAmF5nEhgyoesMO6CuFW66fn2xdFyA3ZzcRLrMAAAAASUVORK5CYII=);background-color:#eaf8ff;border-color:#00a3ff}.form-check-label{color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-style:normal;font-weight:500;line-height:20px}.badge-value{color:var(--Gray-500, #667085);font-size:12px;font-weight:500;line-height:18px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
2996
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ChipSelectComponent, selector: "lib-chip-select", inputs: { items: "items", searchField: "searchField", multi: "multi", idField: "idField", selectedValues: "selectedValues", disabled: "disabled", label: "label", badgeValue: "badgeValue", searchKey: "searchKey" }, outputs: { selected: "selected" }, host: { listeners: { "document:click": "onClick($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"chip-box\">\r\n <div class=\"outer-container d-flex align-items-center position-relative w-100\">\r\n <div class=\"input-container form-control\">\r\n <ng-container *ngFor=\"let item of selectedValues;let i=index\">\r\n <span *ngIf=\"i <= 9\" class=\"chip\">\r\n <span class=\"me-3\">{{item?.[searchKey[0]] || item?.[searchKey[1]]}}</span>\r\n <span (click)=\"removeBadge(item,i)\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </span>\r\n </ng-container>\r\n <span *ngIf=\"selectedValues?.length > 9\" class=\"chip\"> +{{selectedValues?.length - 9}}</span>\r\n <input style=\"min-height: 44px;\" type=\"text\" class=\"form-control dropdown-input ps-3 me-3\" [(ngModel)]=\"searchValue\" (click)=\"openDropdown($event)\" (input)=\"onInput($event)\" id=\"searchInput\">\r\n </div>\r\n </div>\r\n <div [ngClass]=\"showDropdown ? '' : 'd-none'\" class=\"input-chip dropdown\" >\r\n <!-- <div class=\"w-100 input-wrapper\">\r\n <input [(ngModel)]=\"searchValue\" placeholder=\"Search\" (input)=\"onInput($event)\" type=\"text\"> \r\n <svg class=\"search-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\">\r\n <path 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\" stroke=\"#667085\" stroke-width=\"1.3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg> \r\n </div> -->\r\n <ul>\r\n <li *ngIf=\"multi && filteredValues?.length\">\r\n <label class=\"form-check\" for=\"selectAll\">\r\n <input (change)=\"onSelectAll($event)\" [checked]=\"checkIfAllSelected()\" class=\"form-check-input me-3\" type=\"checkbox\"\r\n id=\"selectAll\">\r\n <span class=\"form-check-label\">\r\n Select All\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngFor=\"let item of filteredValues\" [ngClass]=\"item.isSelected && !multi ? 'selected' : ''\" >\r\n <label [for]=\"item[idField] + instanceId\" [ngClass]=\"multi ? '': 'ps-0'\" class=\"form-check\">\r\n <input [ngClass]=\"multi ? '': 'd-none'\" (change)=\"onSelect($event, item)\" [(ngModel)]=\"item.isSelected\" class=\"form-check-input me-3\" type=\"checkbox\" value=\"\"\r\n [id]=\"item[idField] + instanceId\">\r\n <span class=\"form-check-label\" >\r\n <!-- {{item[searchKey[0]] || item?.[searchKey[1]]}} -->\r\n {{item[searchField[0] || item?.[searchField[1]]]}}\r\n </span> <span class=\"badge-value ms-5\">\r\n {{item[badgeValue]}}\r\n </span>\r\n </label>\r\n </li>\r\n <li *ngIf=\"!filteredValues?.length\" >\r\n <span class=\"d-flex align-items-center justify-content-center\" >No data found</span>\r\n </li>\r\n </ul> \r\n </div> \r\n \r\n</div>", styles: [":host{width:100%;height:100%}.chip-box{position:relative;background-color:#fff}.chip-box .form-select{font-size:1.1rem;font-weight:600;border-radius:8px!important;color:var(--Gray-500, #344054);border:1px solid var(--Gray-300, #D0D5DD)!important;min-height:42.5px;max-height:300px!important}.chip-box .disable-input{pointer-events:none;background-color:#f9fafb!important}.chip-box .input-chip{position:absolute;width:100%;z-index:1}.chip-box .input-chip .input-wrapper{padding:8px 10px;background-color:#fff;border-top-right-radius:8px;border-top-left-radius:8px;border-top:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.chip-box .input-chip .input-wrapper input{width:100%;border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD);background:var(--White, #FFF);box-shadow:0 1px 2px #1018280d;padding:10px 14px 10px 30px;outline:none}.chip-box .input-chip .input-wrapper input ::placeholder{color:var(--Gray-500, #667085);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.chip-box .input-chip .input-wrapper .search-icon{position:absolute;left:20px;top:20px}.chip-box .input-chip ul{position:relative;background-color:#fff;margin:0;padding:0;max-height:200px;min-height:auto;overflow-y:auto;border-bottom-right-radius:8px;border-bottom-left-radius:8px;border-bottom:1px solid rgba(16,24,40,.08);border-right:1px solid rgba(16,24,40,.08);border-left:1px solid rgba(16,24,40,.08)}.chip-box .input-chip ul .selected{background:#f9fafb}.chip-box .input-chip ul li{list-style:none;padding:10px 16px;cursor:pointer}.chip-box .input-chip ul li label{cursor:pointer}.chip-box .input-chip ul li:hover{background:#f9fafb}.outer-container{position:relative}.outer-container .form-control{padding-top:0;padding-bottom:0}.outer-container .input-container{min-height:auto;max-height:100px!important;overflow:auto;width:100%;display:flex;flex-wrap:wrap}.outer-container .input-container input{all:unset;flex:1;min-width:50px}.outer-container .input-container .chip{margin:10px 0 10px 10px;padding:3px 10px;border-radius:16px;background:var(--Gray-100, #F2F4F7);color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-weight:500;line-height:20px}.outer-container .input-container .chip:nth-child(1){margin-left:0}.form-check{display:flex;align-items:center}.form-check-input{height:16px;width:16px;border-radius:4px;border:1px solid var(--Primary-600, #00A3FF)}.form-check-input:checked{--bs-form-check-bg-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB4SURBVHgBhY7NDUBQEIRnqcJNKXTg6qYTStCB+Isy6IQSNMDa9SLh5eWZZPcw+81kCX/quABhD73QyKXsGoyIvNCJSto2hEhNtY4N9cwYeMXEsVqB1GaSauRQOpty2tSmO3FgloAmF5nEhgyoesMO6CuFW66fn2xdFyA3ZzcRLrMAAAAASUVORK5CYII=);background-color:#eaf8ff;border-color:#00a3ff}.form-check-label{color:var(--Gray-700, #344054);font-family:Inter;font-size:14px;font-style:normal;font-weight:500;line-height:20px}.badge-value{color:var(--Gray-500, #667085);font-size:12px;font-weight:500;line-height:18px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
2822
2997
|
}
|
|
2823
2998
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChipSelectComponent, decorators: [{
|
|
2824
2999
|
type: Component,
|
|
@@ -2985,7 +3160,6 @@ class TeamsCreationComponent {
|
|
|
2985
3160
|
this.cd.detectChanges();
|
|
2986
3161
|
}
|
|
2987
3162
|
onUserSelect(event) {
|
|
2988
|
-
console.log("user select", event);
|
|
2989
3163
|
this.selectedUsers = event;
|
|
2990
3164
|
if (this.selectedUsers.length > 0) {
|
|
2991
3165
|
this.teamleadList = this.teamleadList.filter((item2) => !this.selectedUsers.some((item1) => item1.userId === item2.userId));
|
|
@@ -3183,11 +3357,32 @@ class TeamsCreationComponent {
|
|
|
3183
3357
|
return uniqueUserNames.size;
|
|
3184
3358
|
}
|
|
3185
3359
|
validateDetails(data) {
|
|
3360
|
+
this.selectedUsers = [];
|
|
3186
3361
|
if (this.afterUpload) {
|
|
3187
|
-
|
|
3188
|
-
this.
|
|
3362
|
+
// Remove duplicates from the uploaded user list
|
|
3363
|
+
const uniqueUploadedUsers = this.afterUpload.filter((item, index, self) => index === self.findIndex((t) => t.userId === item.userId));
|
|
3364
|
+
// Merge new uploaded users with existing selectedUsers (avoid clearing it)
|
|
3365
|
+
const combinedUsers = [...this.selectedUsers, ...uniqueUploadedUsers];
|
|
3366
|
+
// Final deduplicated list
|
|
3367
|
+
const finalUniqueUsers = combinedUsers.filter((item, index, self) => index === self.findIndex((t) => t.userId === item.userId));
|
|
3368
|
+
this.selectedUsers = finalUniqueUsers;
|
|
3369
|
+
// Optional: If you have a userList and want to mark checkboxes
|
|
3370
|
+
if (this.userList) {
|
|
3371
|
+
this.userList = this.userList.map((user) => ({
|
|
3372
|
+
...user,
|
|
3373
|
+
checked: this.selectedUsers.some((u) => u.userId === user.userId)
|
|
3374
|
+
}));
|
|
3375
|
+
}
|
|
3189
3376
|
}
|
|
3190
3377
|
}
|
|
3378
|
+
// validateDetails(data?: any) {
|
|
3379
|
+
// if (this.afterUpload) {
|
|
3380
|
+
// const uniqueUsers = this.afterUpload.filter((item: { userId: string }, index: number, self: { userId: string }[]) =>
|
|
3381
|
+
// index === self.findIndex((t) => t.userId === item.userId)
|
|
3382
|
+
// );
|
|
3383
|
+
// this.selectedUsers = uniqueUsers
|
|
3384
|
+
// }
|
|
3385
|
+
// }
|
|
3191
3386
|
closeactivepopup() {
|
|
3192
3387
|
this.modalService.dismissAll();
|
|
3193
3388
|
}
|
|
@@ -3196,13 +3391,13 @@ class TeamsCreationComponent {
|
|
|
3196
3391
|
preventClose(event) {
|
|
3197
3392
|
event.preventDefault(); // Stops the modal from closing
|
|
3198
3393
|
}
|
|
3199
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TeamsCreationComponent, deps: [{ token: i4.ToastService }, { token: i3
|
|
3200
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TeamsCreationComponent, selector: "lib-teams-creation", inputs: { teamData: "teamData", type: "type", teamsUsers: "teamsUsers" }, viewQueries: [{ propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true }, { propertyName: "afterValidation", first: true, predicate: ["afterValidation"], descendants: true }, { propertyName: "confirmDelete", first: true, predicate: ["confirmDelete"], descendants: true }], ngImport: i0, template: "<div class=\"card pt-0 pb-3 scroll\">\r\n <div class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#DAF1FF\" />\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#EAF8FF\" stroke-width=\"8\" />\r\n <path\r\n d=\"M20.5 23.6816C18.8425 23.6816 17.5 22.2133 17.5 20.4004C17.5 18.5875 18.8425 17.1191 20.5 17.1191C22.1575 17.1191 23.5 18.5875 23.5 20.4004C23.5 22.2133 22.1575 23.6816 20.5 23.6816ZM35.6483 23.6816C33.9908 23.6816 32.6483 22.2133 32.6483 20.4004C32.6483 18.5875 33.9908 17.1191 35.6483 17.1191C37.3058 17.1191 38.6483 18.5875 38.6483 20.4004C38.6483 22.2133 37.3058 23.6816 35.6483 23.6816ZM31.509 26.3066C31.509 28.4805 29.8965 30.2441 27.909 30.2441C25.9215 30.2441 24.309 28.4805 24.309 26.3066C24.309 24.1328 25.9215 22.3691 27.909 22.3691C29.8965 22.3691 31.509 24.1328 31.509 26.3066Z\"\r\n fill=\"#00A3FF\" />\r\n <path\r\n d=\"M20.0013 25.7559C17.7925 25.7559 16 27.7164 16 30.1322C16 30.6121 16.36 31.0059 16.7988 31.0059H24.8013H24.8275C23.8338 30.042 23.2038 28.6352 23.2038 27.0684C23.2038 26.7566 23.2263 26.449 23.275 26.1537C22.765 25.8994 22.1988 25.7559 21.6025 25.7559H20.0013Z\"\r\n fill=\"#00A3FF\" />\r\n <path\r\n d=\"M31.1725 31.0059H31.1987H39.2012C39.64 31.0059 40 30.6162 40 30.1322C40 27.7164 38.2075 25.7559 35.9987 25.7559H34.3975C33.8012 25.7559 33.235 25.8953 32.725 26.1537C32.77 26.4531 32.7963 26.7566 32.7963 27.0684C32.7963 28.6352 32.17 30.042 31.1725 31.0059Z\"\r\n fill=\"#00A3FF\" />\r\n <path\r\n d=\"M25.7988 32.3183C23.0388 32.3183 20.8 34.767 20.8 37.7857C20.8 38.3928 21.25 38.8809 21.8013 38.8809H34.1987C34.7537 38.8809 35.2 38.3887 35.2 37.7857C35.2 34.767 32.9613 32.3183 30.2013 32.3183H25.7988Z\"\r\n fill=\"#00A3FF\" />\r\n </svg>\r\n </div>\r\n </div>\r\n <div class=\"row w-100\">\r\n <div class=\"col-md-12\" *ngIf=\"type === 'create'\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Create Team</a>\r\n <div class=\"sub-title\">Group multiple users to create a team for easier management</div>\r\n </div>\r\n <div class=\"col-md-12\" *ngIf=\"type === 'edit'\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Edit Team</a>\r\n <div class=\"sub-title\">Group multiple users to edit a team for easier management</div>\r\n </div>\r\n\r\n\r\n <div class=\"w-100 h-500px scroll\">\r\n <div class=\"mt-5\">\r\n <form (keydown.enter)=\"preventClose($event)\">\r\n <div class=\"row px-0 me-3\">\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-7\">\r\n <label for=\"teamName\" class=\"form-label\">Team Name<span class=\"mandtryclr ms-1\">*</span></label>\r\n <input type=\"text\" [(ngModel)]=\"teamName\" [ngModelOptions]=\"{standalone: true}\"\r\n class=\"form-control\" id=\"teamName\" autocomplete=\"off\" (keypress)=\"omitSpecialChar($event)\">\r\n </div>\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\">\r\n <label for=\"teamlead\" class=\"form-label\">Team Lead Email<span class=\"mandtryclr ms-1\">*</span></label>\r\n <lib-chip-select [items]=\"teamleadList\" [multi]=\"true\" [searchField]=\"['userName']\" [searchKey]=\"['email']\"\r\n [idField]=\"'userId'\" (selected)=\"onTeamSelect($event)\" (removed)=\"removedChip($event)\"\r\n [selectedValues]=\"selectedTeam\"></lib-chip-select>\r\n </div>\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\">\r\n <label for=\"userlead\" class=\"form-label\">Select Users<span class=\"mandtryclr ms-1\">*</span>\r\n </label>\r\n <team-select [items]=\"userList\" [multi]=\"true\" [searchField]=\"'userName'\"\r\n [idField]=\"'userId'\" (selected)=\"onUserSelect($event)\" (deselected)=\"UserUnselect($event)\" (deselectedAll)=\"UserUnselectAll($event)\"\r\n [selectedValues]=\"selectedUsers\"></team-select>\r\n </div>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"line-bg \"><svg width=\"280\" height=\"2\" viewBox=\"0 0 280 2\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"280\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span><span class=\"mx-15 or-color\">Or </span> <span class=\"line-bg \"><svg width=\"280\"\r\n height=\"2\" viewBox=\"0 0 280 2\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"280\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span>\r\n </p>\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <div class=\"fw-bold text-gray-500 my-6\">\r\n <ol class=\"custom-ordered-list text-gray-400 fw-bold fs-6\">\r\n <li class=\"user-text\">Use the template to upload multiple users at once.</li>\r\n <li class=\"user-text my-3\"><span class=\"user-text\">Download the template here -\r\n </span>\r\n <a class=\"ms-1\" href=\"../../../assets/files/teamsUploadTemplate.xlsx\"\r\n download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text my-3\">Add your data to the Template File</li>\r\n <li class=\"user-text my-3\">Upload it below for processing</li>\r\n </ol>\r\n </div>\r\n </div>\r\n <div\r\n class=\"mt-3 ms-3 right-bar py-10 d-flex justify-content-center align-items-center flex-column\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_account_team_size_select_upload\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n value=\"personal\" class=\"btn-check\" ng-reflect-name=\"accountType\"\r\n ng-reflect-form-control-name=\"accountType\" (change)=\"onUploadTemplate($event)\"\r\n ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_account_team_size_select_upload\" class=\" w-50 p-4\"><span\r\n class=\"fw-bold text-center w-100 fs-4\">\r\n <div class=\"d-flex justify-content-center align-items-center w-100\">\r\n <svg width=\"46\" height=\"46\" viewBox=\"0 0 46 46\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" fill=\"#F2F4F7\" />\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" stroke=\"#F9FAFB\"\r\n stroke-width=\"6\" />\r\n <g clip-path=\"url(#clip0_4047_40566)\">\r\n <path\r\n d=\"M26.3333 26.3334L23 23M23 23L19.6666 26.3334M23 23V30.5M29.9916 28.325C30.8044 27.8819 31.4465 27.1808 31.8165 26.3322C32.1866 25.4837 32.2635 24.5361 32.0351 23.6389C31.8068 22.7418 31.2862 21.9463 30.5555 21.3779C29.8248 20.8095 28.9257 20.5006 28 20.5H26.95C26.6977 19.5244 26.2276 18.6186 25.5749 17.8509C24.9222 17.0831 24.104 16.4732 23.1817 16.0672C22.2594 15.6612 21.2571 15.4695 20.2501 15.5066C19.243 15.5437 18.2575 15.8086 17.3676 16.2814C16.4777 16.7542 15.7066 17.4226 15.1122 18.2363C14.5177 19.0501 14.1155 19.988 13.9358 20.9795C13.756 21.9711 13.8034 22.9905 14.0743 23.9611C14.3452 24.9317 14.8327 25.8282 15.5 26.5834\"\r\n stroke=\"#475467\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_4047_40566\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(13 13)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </div>\r\n <div class=\"nodata-title\"><span class=\"click-upload cursor-pointer\">Click to\r\n upload</span>\r\n <!-- <span class=\"ms-2\">or drag and drop</span> -->\r\n </div>\r\n <div class=\"nodata-sub\">the data added template file for processing.</div>\r\n </span>\r\n </label>\r\n </div>\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5 mt-5\">\r\n <label for=\"userlead\" class=\"form-label\">Description (optional)</label>\r\n <textarea id=\"description\" [(ngModel)]=\"description\"\r\n [ngModelOptions]=\"{standalone: true}\" name=\"description\" class=\"form-control\"\r\n rows=\"5\" cols=\"50\" placeholder=\"Enter a description...\"></textarea>\r\n </div>\r\n\r\n\r\n </div>\r\n <div class=\"d-flex my-10\" role=\"group\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\" *ngIf=\"!isEdit\"\r\n (click)=\"onCreateTeam()\" [disabled]=\"!selectedUsers.length||!selectedTeam.length|| !teamName\">Create\r\n Team</button>\r\n <button class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\" *ngIf=\"isEdit\"\r\n (click)=\"onCreateTeam()\" [disabled]=\"!selectedUsers.length ||!selectedTeam.length||!teamName\">Update\r\n Team</button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template #afterValidation let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"card-title mt-3\"><span class=\"config-heading fw-semibold w-auto\">Add Users</span></div>\r\n </div>\r\n <div class=\"card-body popup-scroll pt-0\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{getStoreCounts(excelData)}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Total Records</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{excelData?.length}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Rows processed</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error w-100 error-heading' \r\n : 'fw-semibold w-100 config-heading'\">\r\n {{ uploadErrors?.doesNotExists?.length +uploadErrors?.duplicate?.length +uploadErrors?.inActive?.length || 0 }}\r\n </div>\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error mt-1 excel-error' \r\n : 'fw-semibold subtitle mt-1'\">\r\n Error\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!excelError\" class=\"table-header mt-5\" style=\"font-weight: 400;\">\r\n <div >You're about to add {{getStoreCounts(excelData)}} {{getStoreCounts(excelData) > 1 ? 'Users' : 'User'}}. Are you sure want to proceed?</div>\r\n \r\n </div>\r\n <div *ngIf=\"excelError?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Invalid Details !</div>\r\n <div class=\"subtitle mt-5\">Please provide correct information.</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of excelError?.error; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.doesNotExists?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">User doesn't exists !</div>\r\n <!-- <div class=\"subtitle mt-5\">Please provide correct information.</div> -->\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.doesNotExists; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.duplicate?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Duplicate records found !</div>\r\n <!-- <div class=\"subtitle mt-5\">Please provide correct information.</div> -->\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.duplicate; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.inActive?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">User is inactive !</div>\r\n <!-- <div class=\"subtitle mt-5\">Please provide correct information.</div> -->\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.inActive; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify-content-end flex-wrap gap-2 pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline\" (click)=\"closeactivepopup()\">Cancel</button>\r\n <button *ngIf=\"!excelError\" class=\"btn btn-md py-3 btn-default ms-3 btn-primary\" (click)=\"validateDetails();model.close()\">Proceed</button>\r\n <button *ngIf=\"excelError\" class=\"btn py-3 btn-md btn-default ms-3 btn-danger\" (click)=\"file1.click()\">Reupload</button>\r\n <input style=\"display: none;\" #file1 type=\"file\" id=\"kt_account_team_size_select_upload\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUploadTemplate($event)\" />\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n", styles: [".scroll{overflow-y:auto;overflow-x:hidden}.title{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600;line-height:28px}.sub-title{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.teams-title{color:var(--Black, #101828)!important;font-size:18px!important;font-weight:600!important;line-height:28px}.title-header{border-radius:6px!important;border-bottom:2px solid var(--Gray-200, #EAECF0)!important;background:#f2f4f7!important;box-shadow:0 4px 10px #0000000d!important;color:var(--Black, #101828)!important;font-size:20px!important;font-weight:600;line-height:30px;padding:8px 16px}.or-color{color:var(--Gray-700, #344054)!important;text-align:center;font-size:12px;font-style:normal;font-weight:500;line-height:18px}.custom-ordered-list{list-style-type:decimal}.user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.right-bar{border-radius:12px;border:1px solid var(--Gray-300, #D0D5DD)}.click-upload{color:var(--Primary-700, #009BF3)!important;font-size:14px!important;font-weight:600!important;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.mandtryclr{color:red}.table-header{color:var(--Gray-800, #1D2939);font-size:16px;font-weight:600;line-height:24px}.text-error{color:var(--Error-700, #B42318)!important;font-size:14px;font-weight:500;line-height:20px}.excel-error{color:var(--Error-600, #D92D20);font-size:14px;font-weight:500;line-height:20px}.error-heading{color:var(--Error-600, #D92D20);font-size:20px;font-weight:500;line-height:30px}.border-error{border:1px solid var(--Error-300, #FDA29B)!important;background:var(--Error-25, #FFFBFA)!important}.popup-card{border-radius:6px;border:1px solid var(--Gray-300, #D0D5DD);background:#fff;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.popup-scroll{min-height:auto;max-height:400px;overflow-y:auto}.config-heading{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: CustomSelectComponent, selector: "team-select", inputs: ["items", "searchField", "multi", "idField", "selectedValues", "disabled", "label"], outputs: ["selected", "deselected", "deselectedAll"] }, { kind: "component", type: ChipSelectComponent, selector: "lib-chip-select", inputs: ["items", "searchField", "multi", "idField", "selectedValues", "disabled", "label", "badgeValue", "searchKey"], outputs: ["selected"] }] });
|
|
3394
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TeamsCreationComponent, deps: [{ token: i4.ToastService }, { token: i3.Router }, { token: i1$1.NgbActiveModal }, { token: ManageUsersService }, { token: i2.GlobalStateService }, { token: i0.ChangeDetectorRef }, { token: i1$1.NgbModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
3395
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TeamsCreationComponent, selector: "lib-teams-creation", inputs: { teamData: "teamData", type: "type", teamsUsers: "teamsUsers" }, viewQueries: [{ propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true }, { propertyName: "afterValidation", first: true, predicate: ["afterValidation"], descendants: true }, { propertyName: "confirmDelete", first: true, predicate: ["confirmDelete"], descendants: true }], ngImport: i0, template: "<div class=\"card pt-0 pb-3 scroll\">\r\n <div class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#DAF1FF\" />\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#EAF8FF\" stroke-width=\"8\" />\r\n <path\r\n d=\"M20.5 23.6816C18.8425 23.6816 17.5 22.2133 17.5 20.4004C17.5 18.5875 18.8425 17.1191 20.5 17.1191C22.1575 17.1191 23.5 18.5875 23.5 20.4004C23.5 22.2133 22.1575 23.6816 20.5 23.6816ZM35.6483 23.6816C33.9908 23.6816 32.6483 22.2133 32.6483 20.4004C32.6483 18.5875 33.9908 17.1191 35.6483 17.1191C37.3058 17.1191 38.6483 18.5875 38.6483 20.4004C38.6483 22.2133 37.3058 23.6816 35.6483 23.6816ZM31.509 26.3066C31.509 28.4805 29.8965 30.2441 27.909 30.2441C25.9215 30.2441 24.309 28.4805 24.309 26.3066C24.309 24.1328 25.9215 22.3691 27.909 22.3691C29.8965 22.3691 31.509 24.1328 31.509 26.3066Z\"\r\n fill=\"#00A3FF\" />\r\n <path\r\n d=\"M20.0013 25.7559C17.7925 25.7559 16 27.7164 16 30.1322C16 30.6121 16.36 31.0059 16.7988 31.0059H24.8013H24.8275C23.8338 30.042 23.2038 28.6352 23.2038 27.0684C23.2038 26.7566 23.2263 26.449 23.275 26.1537C22.765 25.8994 22.1988 25.7559 21.6025 25.7559H20.0013Z\"\r\n fill=\"#00A3FF\" />\r\n <path\r\n d=\"M31.1725 31.0059H31.1987H39.2012C39.64 31.0059 40 30.6162 40 30.1322C40 27.7164 38.2075 25.7559 35.9987 25.7559H34.3975C33.8012 25.7559 33.235 25.8953 32.725 26.1537C32.77 26.4531 32.7963 26.7566 32.7963 27.0684C32.7963 28.6352 32.17 30.042 31.1725 31.0059Z\"\r\n fill=\"#00A3FF\" />\r\n <path\r\n d=\"M25.7988 32.3183C23.0388 32.3183 20.8 34.767 20.8 37.7857C20.8 38.3928 21.25 38.8809 21.8013 38.8809H34.1987C34.7537 38.8809 35.2 38.3887 35.2 37.7857C35.2 34.767 32.9613 32.3183 30.2013 32.3183H25.7988Z\"\r\n fill=\"#00A3FF\" />\r\n </svg>\r\n </div>\r\n </div>\r\n <div class=\"row w-100\">\r\n <div class=\"col-md-12\" *ngIf=\"type === 'create'\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Create Team</a>\r\n <div class=\"sub-title\">Group multiple users to create a team for easier management</div>\r\n </div>\r\n <div class=\"col-md-12\" *ngIf=\"type === 'edit'\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Edit Team</a>\r\n <div class=\"sub-title\">Group multiple users to edit a team for easier management</div>\r\n </div>\r\n\r\n\r\n <div class=\"w-100 h-500px scroll\">\r\n <div class=\"mt-5\">\r\n <form (keydown.enter)=\"preventClose($event)\">\r\n <div class=\"row px-0 me-3\">\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-7\">\r\n <label for=\"teamName\" class=\"form-label\">Team Name<span class=\"mandtryclr ms-1\">*</span></label>\r\n <input type=\"text\" [(ngModel)]=\"teamName\" [ngModelOptions]=\"{standalone: true}\"\r\n class=\"form-control\" id=\"teamName\" autocomplete=\"off\" (keypress)=\"omitSpecialChar($event)\">\r\n </div>\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\">\r\n <label for=\"teamlead\" class=\"form-label\">Team Lead Email<span class=\"mandtryclr ms-1\">*</span></label>\r\n <lib-chip-select [items]=\"teamleadList\" [multi]=\"true\" [searchField]=\"['userName']\" [searchKey]=\"['email']\"\r\n [idField]=\"'userId'\" (selected)=\"onTeamSelect($event)\" (removed)=\"removedChip($event)\"\r\n [selectedValues]=\"selectedTeam\"></lib-chip-select>\r\n </div>\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\">\r\n <label for=\"userlead\" class=\"form-label\">Select Users<span class=\"mandtryclr ms-1\">*</span>\r\n </label>\r\n <team-select [items]=\"userList\" [multi]=\"true\" [searchField]=\"'userName'\"\r\n [idField]=\"'userId'\" (selected)=\"onUserSelect($event)\" (deselected)=\"UserUnselect($event)\" (deselectedAll)=\"UserUnselectAll($event)\"\r\n [selectedValues]=\"selectedUsers\"></team-select>\r\n </div>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"line-bg \"><svg width=\"280\" height=\"2\" viewBox=\"0 0 280 2\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"280\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span><span class=\"mx-15 or-color\">Or </span> <span class=\"line-bg \"><svg width=\"280\"\r\n height=\"2\" viewBox=\"0 0 280 2\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"280\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span>\r\n </p>\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <div class=\"fw-bold text-gray-500 my-6\">\r\n <ol class=\"custom-ordered-list text-gray-400 fw-bold fs-6\">\r\n <li class=\"user-text\">Use the template to upload multiple users at once.</li>\r\n <li class=\"user-text my-3\"><span class=\"user-text\">Download the template here -\r\n </span>\r\n <a class=\"ms-1\" href=\"../../../assets/files/teamsUploadTemplate.xlsx\"\r\n download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text my-3\">Add your data to the Template File</li>\r\n <li class=\"user-text my-3\">Upload it below for processing</li>\r\n </ol>\r\n </div>\r\n </div>\r\n <div\r\n class=\"mt-3 ms-3 right-bar py-10 d-flex justify-content-center align-items-center flex-column\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_account_team_size_select_upload\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n value=\"personal\" class=\"btn-check\" ng-reflect-name=\"accountType\"\r\n ng-reflect-form-control-name=\"accountType\" (change)=\"onUploadTemplate($event)\"\r\n ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_account_team_size_select_upload\" class=\" w-50 p-4\"><span\r\n class=\"fw-bold text-center w-100 fs-4\">\r\n <div class=\"d-flex justify-content-center align-items-center w-100\">\r\n <svg width=\"46\" height=\"46\" viewBox=\"0 0 46 46\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" fill=\"#F2F4F7\" />\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" stroke=\"#F9FAFB\"\r\n stroke-width=\"6\" />\r\n <g clip-path=\"url(#clip0_4047_40566)\">\r\n <path\r\n d=\"M26.3333 26.3334L23 23M23 23L19.6666 26.3334M23 23V30.5M29.9916 28.325C30.8044 27.8819 31.4465 27.1808 31.8165 26.3322C32.1866 25.4837 32.2635 24.5361 32.0351 23.6389C31.8068 22.7418 31.2862 21.9463 30.5555 21.3779C29.8248 20.8095 28.9257 20.5006 28 20.5H26.95C26.6977 19.5244 26.2276 18.6186 25.5749 17.8509C24.9222 17.0831 24.104 16.4732 23.1817 16.0672C22.2594 15.6612 21.2571 15.4695 20.2501 15.5066C19.243 15.5437 18.2575 15.8086 17.3676 16.2814C16.4777 16.7542 15.7066 17.4226 15.1122 18.2363C14.5177 19.0501 14.1155 19.988 13.9358 20.9795C13.756 21.9711 13.8034 22.9905 14.0743 23.9611C14.3452 24.9317 14.8327 25.8282 15.5 26.5834\"\r\n stroke=\"#475467\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_4047_40566\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(13 13)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </div>\r\n <div class=\"nodata-title\"><span class=\"click-upload cursor-pointer\">Click to\r\n upload</span>\r\n <!-- <span class=\"ms-2\">or drag and drop</span> -->\r\n </div>\r\n <div class=\"nodata-sub\">the data added template file for processing.</div>\r\n </span>\r\n </label>\r\n </div>\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5 mt-5\">\r\n <label for=\"userlead\" class=\"form-label\">Description (optional)</label>\r\n <textarea id=\"description\" [(ngModel)]=\"description\"\r\n [ngModelOptions]=\"{standalone: true}\" name=\"description\" class=\"form-control\"\r\n rows=\"5\" cols=\"50\" placeholder=\"Enter a description...\"></textarea>\r\n </div>\r\n\r\n\r\n </div>\r\n <div class=\"d-flex my-10\" role=\"group\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\" *ngIf=\"!isEdit\"\r\n (click)=\"onCreateTeam()\" [disabled]=\"!selectedUsers.length||!selectedTeam.length|| !teamName\">Create\r\n Team</button>\r\n <button class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\" *ngIf=\"isEdit\"\r\n (click)=\"onCreateTeam()\" [disabled]=\"!selectedUsers.length ||!selectedTeam.length||!teamName\">Update\r\n Team</button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template #afterValidation let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"card-title mt-3\"><span class=\"config-heading fw-semibold w-auto\">Add Users</span></div>\r\n </div>\r\n <div class=\"card-body popup-scroll pt-0\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{getStoreCounts(excelData)}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Total Records</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{excelData?.length}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Rows processed</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error w-100 error-heading' \r\n : 'fw-semibold w-100 config-heading'\">\r\n {{ uploadErrors?.doesNotExists?.length +uploadErrors?.duplicate?.length +uploadErrors?.inActive?.length || 0 }}\r\n </div>\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error mt-1 excel-error' \r\n : 'fw-semibold subtitle mt-1'\">\r\n Error\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!excelError\" class=\"table-header mt-5\" style=\"font-weight: 400;\">\r\n <div >You're about to add {{getStoreCounts(excelData)}} {{getStoreCounts(excelData) > 1 ? 'Users' : 'User'}}. Are you sure want to proceed?</div>\r\n \r\n </div>\r\n <div *ngIf=\"excelError?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Invalid Details !</div>\r\n <div class=\"subtitle mt-5\">Please provide correct information.</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of excelError?.error; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.doesNotExists?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">User doesn't exists !</div>\r\n <!-- <div class=\"subtitle mt-5\">Please provide correct information.</div> -->\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.doesNotExists; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.duplicate?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Duplicate records found !</div>\r\n <!-- <div class=\"subtitle mt-5\">Please provide correct information.</div> -->\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.duplicate; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.inActive?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">User is inactive !</div>\r\n <!-- <div class=\"subtitle mt-5\">Please provide correct information.</div> -->\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.inActive; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify-content-end flex-wrap gap-2 pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline\" (click)=\"closeactivepopup()\">Cancel</button>\r\n <button *ngIf=\"!excelError\" class=\"btn btn-md py-3 btn-default ms-3 btn-primary\" (click)=\"validateDetails();model.close()\">Proceed</button>\r\n <button *ngIf=\"excelError\" class=\"btn py-3 btn-md btn-default ms-3 btn-danger\" (click)=\"file1.click()\">Reupload</button>\r\n <input style=\"display: none;\" #file1 type=\"file\" id=\"kt_account_team_size_select_upload\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUploadTemplate($event)\" />\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n", styles: [".scroll{overflow-y:auto;overflow-x:hidden}.title{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600;line-height:28px}.sub-title{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.teams-title{color:var(--Black, #101828)!important;font-size:18px!important;font-weight:600!important;line-height:28px}.title-header{border-radius:6px!important;border-bottom:2px solid var(--Gray-200, #EAECF0)!important;background:#f2f4f7!important;box-shadow:0 4px 10px #0000000d!important;color:var(--Black, #101828)!important;font-size:20px!important;font-weight:600;line-height:30px;padding:8px 16px}.or-color{color:var(--Gray-700, #344054)!important;text-align:center;font-size:12px;font-style:normal;font-weight:500;line-height:18px}.custom-ordered-list{list-style-type:decimal}.user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.right-bar{border-radius:12px;border:1px solid var(--Gray-300, #D0D5DD)}.click-upload{color:var(--Primary-700, #009BF3)!important;font-size:14px!important;font-weight:600!important;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.mandtryclr{color:red}.table-header{color:var(--Gray-800, #1D2939);font-size:16px;font-weight:600;line-height:24px}.text-error{color:var(--Error-700, #B42318)!important;font-size:14px;font-weight:500;line-height:20px}.excel-error{color:var(--Error-600, #D92D20);font-size:14px;font-weight:500;line-height:20px}.error-heading{color:var(--Error-600, #D92D20);font-size:20px;font-weight:500;line-height:30px}.border-error{border:1px solid var(--Error-300, #FDA29B)!important;background:var(--Error-25, #FFFBFA)!important}.popup-card{border-radius:6px;border:1px solid var(--Gray-300, #D0D5DD);background:#fff;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.popup-scroll{min-height:auto;max-height:400px;overflow-y:auto}.config-heading{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: CustomSelectComponent, selector: "team-select", inputs: ["items", "searchField", "multi", "idField", "selectedValues", "disabled", "label"], outputs: ["selected", "deselected", "deselectedAll"] }, { kind: "component", type: ChipSelectComponent, selector: "lib-chip-select", inputs: ["items", "searchField", "multi", "idField", "selectedValues", "disabled", "label", "badgeValue", "searchKey"], outputs: ["selected"] }] });
|
|
3201
3396
|
}
|
|
3202
3397
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TeamsCreationComponent, decorators: [{
|
|
3203
3398
|
type: Component,
|
|
3204
3399
|
args: [{ selector: 'lib-teams-creation', template: "<div class=\"card pt-0 pb-3 scroll\">\r\n <div class=\"card-body py-0 d-flex flex-start flex-column p-9 \">\r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#DAF1FF\" />\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#EAF8FF\" stroke-width=\"8\" />\r\n <path\r\n d=\"M20.5 23.6816C18.8425 23.6816 17.5 22.2133 17.5 20.4004C17.5 18.5875 18.8425 17.1191 20.5 17.1191C22.1575 17.1191 23.5 18.5875 23.5 20.4004C23.5 22.2133 22.1575 23.6816 20.5 23.6816ZM35.6483 23.6816C33.9908 23.6816 32.6483 22.2133 32.6483 20.4004C32.6483 18.5875 33.9908 17.1191 35.6483 17.1191C37.3058 17.1191 38.6483 18.5875 38.6483 20.4004C38.6483 22.2133 37.3058 23.6816 35.6483 23.6816ZM31.509 26.3066C31.509 28.4805 29.8965 30.2441 27.909 30.2441C25.9215 30.2441 24.309 28.4805 24.309 26.3066C24.309 24.1328 25.9215 22.3691 27.909 22.3691C29.8965 22.3691 31.509 24.1328 31.509 26.3066Z\"\r\n fill=\"#00A3FF\" />\r\n <path\r\n d=\"M20.0013 25.7559C17.7925 25.7559 16 27.7164 16 30.1322C16 30.6121 16.36 31.0059 16.7988 31.0059H24.8013H24.8275C23.8338 30.042 23.2038 28.6352 23.2038 27.0684C23.2038 26.7566 23.2263 26.449 23.275 26.1537C22.765 25.8994 22.1988 25.7559 21.6025 25.7559H20.0013Z\"\r\n fill=\"#00A3FF\" />\r\n <path\r\n d=\"M31.1725 31.0059H31.1987H39.2012C39.64 31.0059 40 30.6162 40 30.1322C40 27.7164 38.2075 25.7559 35.9987 25.7559H34.3975C33.8012 25.7559 33.235 25.8953 32.725 26.1537C32.77 26.4531 32.7963 26.7566 32.7963 27.0684C32.7963 28.6352 32.17 30.042 31.1725 31.0059Z\"\r\n fill=\"#00A3FF\" />\r\n <path\r\n d=\"M25.7988 32.3183C23.0388 32.3183 20.8 34.767 20.8 37.7857C20.8 38.3928 21.25 38.8809 21.8013 38.8809H34.1987C34.7537 38.8809 35.2 38.3887 35.2 37.7857C35.2 34.767 32.9613 32.3183 30.2013 32.3183H25.7988Z\"\r\n fill=\"#00A3FF\" />\r\n </svg>\r\n </div>\r\n </div>\r\n <div class=\"row w-100\">\r\n <div class=\"col-md-12\" *ngIf=\"type === 'create'\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Create Team</a>\r\n <div class=\"sub-title\">Group multiple users to create a team for easier management</div>\r\n </div>\r\n <div class=\"col-md-12\" *ngIf=\"type === 'edit'\">\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bold mb-0 title cursor-pointer\">Edit Team</a>\r\n <div class=\"sub-title\">Group multiple users to edit a team for easier management</div>\r\n </div>\r\n\r\n\r\n <div class=\"w-100 h-500px scroll\">\r\n <div class=\"mt-5\">\r\n <form (keydown.enter)=\"preventClose($event)\">\r\n <div class=\"row px-0 me-3\">\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-7\">\r\n <label for=\"teamName\" class=\"form-label\">Team Name<span class=\"mandtryclr ms-1\">*</span></label>\r\n <input type=\"text\" [(ngModel)]=\"teamName\" [ngModelOptions]=\"{standalone: true}\"\r\n class=\"form-control\" id=\"teamName\" autocomplete=\"off\" (keypress)=\"omitSpecialChar($event)\">\r\n </div>\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\">\r\n <label for=\"teamlead\" class=\"form-label\">Team Lead Email<span class=\"mandtryclr ms-1\">*</span></label>\r\n <lib-chip-select [items]=\"teamleadList\" [multi]=\"true\" [searchField]=\"['userName']\" [searchKey]=\"['email']\"\r\n [idField]=\"'userId'\" (selected)=\"onTeamSelect($event)\" (removed)=\"removedChip($event)\"\r\n [selectedValues]=\"selectedTeam\"></lib-chip-select>\r\n </div>\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5\">\r\n <label for=\"userlead\" class=\"form-label\">Select Users<span class=\"mandtryclr ms-1\">*</span>\r\n </label>\r\n <team-select [items]=\"userList\" [multi]=\"true\" [searchField]=\"'userName'\"\r\n [idField]=\"'userId'\" (selected)=\"onUserSelect($event)\" (deselected)=\"UserUnselect($event)\" (deselectedAll)=\"UserUnselectAll($event)\"\r\n [selectedValues]=\"selectedUsers\"></team-select>\r\n </div>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"line-bg \"><svg width=\"280\" height=\"2\" viewBox=\"0 0 280 2\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"280\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span><span class=\"mx-15 or-color\">Or </span> <span class=\"line-bg \"><svg width=\"280\"\r\n height=\"2\" viewBox=\"0 0 280 2\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"280\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span>\r\n </p>\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <div class=\"fw-bold text-gray-500 my-6\">\r\n <ol class=\"custom-ordered-list text-gray-400 fw-bold fs-6\">\r\n <li class=\"user-text\">Use the template to upload multiple users at once.</li>\r\n <li class=\"user-text my-3\"><span class=\"user-text\">Download the template here -\r\n </span>\r\n <a class=\"ms-1\" href=\"../../../assets/files/teamsUploadTemplate.xlsx\"\r\n download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\r\n viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text my-3\">Add your data to the Template File</li>\r\n <li class=\"user-text my-3\">Upload it below for processing</li>\r\n </ol>\r\n </div>\r\n </div>\r\n <div\r\n class=\"mt-3 ms-3 right-bar py-10 d-flex justify-content-center align-items-center flex-column\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_account_team_size_select_upload\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n value=\"personal\" class=\"btn-check\" ng-reflect-name=\"accountType\"\r\n ng-reflect-form-control-name=\"accountType\" (change)=\"onUploadTemplate($event)\"\r\n ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_account_team_size_select_upload\" class=\" w-50 p-4\"><span\r\n class=\"fw-bold text-center w-100 fs-4\">\r\n <div class=\"d-flex justify-content-center align-items-center w-100\">\r\n <svg width=\"46\" height=\"46\" viewBox=\"0 0 46 46\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" fill=\"#F2F4F7\" />\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" stroke=\"#F9FAFB\"\r\n stroke-width=\"6\" />\r\n <g clip-path=\"url(#clip0_4047_40566)\">\r\n <path\r\n d=\"M26.3333 26.3334L23 23M23 23L19.6666 26.3334M23 23V30.5M29.9916 28.325C30.8044 27.8819 31.4465 27.1808 31.8165 26.3322C32.1866 25.4837 32.2635 24.5361 32.0351 23.6389C31.8068 22.7418 31.2862 21.9463 30.5555 21.3779C29.8248 20.8095 28.9257 20.5006 28 20.5H26.95C26.6977 19.5244 26.2276 18.6186 25.5749 17.8509C24.9222 17.0831 24.104 16.4732 23.1817 16.0672C22.2594 15.6612 21.2571 15.4695 20.2501 15.5066C19.243 15.5437 18.2575 15.8086 17.3676 16.2814C16.4777 16.7542 15.7066 17.4226 15.1122 18.2363C14.5177 19.0501 14.1155 19.988 13.9358 20.9795C13.756 21.9711 13.8034 22.9905 14.0743 23.9611C14.3452 24.9317 14.8327 25.8282 15.5 26.5834\"\r\n stroke=\"#475467\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_4047_40566\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(13 13)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </div>\r\n <div class=\"nodata-title\"><span class=\"click-upload cursor-pointer\">Click to\r\n upload</span>\r\n <!-- <span class=\"ms-2\">or drag and drop</span> -->\r\n </div>\r\n <div class=\"nodata-sub\">the data added template file for processing.</div>\r\n </span>\r\n </label>\r\n </div>\r\n <div class=\"col-md-12 col-lg-12 col-xl-12 col-xxl-12 mb-5 mt-5\">\r\n <label for=\"userlead\" class=\"form-label\">Description (optional)</label>\r\n <textarea id=\"description\" [(ngModel)]=\"description\"\r\n [ngModelOptions]=\"{standalone: true}\" name=\"description\" class=\"form-control\"\r\n rows=\"5\" cols=\"50\" placeholder=\"Enter a description...\"></textarea>\r\n </div>\r\n\r\n\r\n </div>\r\n <div class=\"d-flex my-10\" role=\"group\">\r\n <button class=\"btn btn-outline w-100 me-3\" (click)=\"cancel()\">Cancel</button>\r\n <button class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\" *ngIf=\"!isEdit\"\r\n (click)=\"onCreateTeam()\" [disabled]=\"!selectedUsers.length||!selectedTeam.length|| !teamName\">Create\r\n Team</button>\r\n <button class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\" *ngIf=\"isEdit\"\r\n (click)=\"onCreateTeam()\" [disabled]=\"!selectedUsers.length ||!selectedTeam.length||!teamName\">Update\r\n Team</button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template #afterValidation let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"card-title mt-3\"><span class=\"config-heading fw-semibold w-auto\">Add Users</span></div>\r\n </div>\r\n <div class=\"card-body popup-scroll pt-0\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{getStoreCounts(excelData)}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Total Records</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{excelData?.length}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Rows processed</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error w-100 error-heading' \r\n : 'fw-semibold w-100 config-heading'\">\r\n {{ uploadErrors?.doesNotExists?.length +uploadErrors?.duplicate?.length +uploadErrors?.inActive?.length || 0 }}\r\n </div>\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error mt-1 excel-error' \r\n : 'fw-semibold subtitle mt-1'\">\r\n Error\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!excelError\" class=\"table-header mt-5\" style=\"font-weight: 400;\">\r\n <div >You're about to add {{getStoreCounts(excelData)}} {{getStoreCounts(excelData) > 1 ? 'Users' : 'User'}}. Are you sure want to proceed?</div>\r\n \r\n </div>\r\n <div *ngIf=\"excelError?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Invalid Details !</div>\r\n <div class=\"subtitle mt-5\">Please provide correct information.</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of excelError?.error; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.doesNotExists?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">User doesn't exists !</div>\r\n <!-- <div class=\"subtitle mt-5\">Please provide correct information.</div> -->\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.doesNotExists; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.duplicate?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Duplicate records found !</div>\r\n <!-- <div class=\"subtitle mt-5\">Please provide correct information.</div> -->\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.duplicate; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.inActive?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">User is inactive !</div>\r\n <!-- <div class=\"subtitle mt-5\">Please provide correct information.</div> -->\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.inActive; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify-content-end flex-wrap gap-2 pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline\" (click)=\"closeactivepopup()\">Cancel</button>\r\n <button *ngIf=\"!excelError\" class=\"btn btn-md py-3 btn-default ms-3 btn-primary\" (click)=\"validateDetails();model.close()\">Proceed</button>\r\n <button *ngIf=\"excelError\" class=\"btn py-3 btn-md btn-default ms-3 btn-danger\" (click)=\"file1.click()\">Reupload</button>\r\n <input style=\"display: none;\" #file1 type=\"file\" id=\"kt_account_team_size_select_upload\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUploadTemplate($event)\" />\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n", styles: [".scroll{overflow-y:auto;overflow-x:hidden}.title{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600;line-height:28px}.sub-title{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.teams-title{color:var(--Black, #101828)!important;font-size:18px!important;font-weight:600!important;line-height:28px}.title-header{border-radius:6px!important;border-bottom:2px solid var(--Gray-200, #EAECF0)!important;background:#f2f4f7!important;box-shadow:0 4px 10px #0000000d!important;color:var(--Black, #101828)!important;font-size:20px!important;font-weight:600;line-height:30px;padding:8px 16px}.or-color{color:var(--Gray-700, #344054)!important;text-align:center;font-size:12px;font-style:normal;font-weight:500;line-height:18px}.custom-ordered-list{list-style-type:decimal}.user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.right-bar{border-radius:12px;border:1px solid var(--Gray-300, #D0D5DD)}.click-upload{color:var(--Primary-700, #009BF3)!important;font-size:14px!important;font-weight:600!important;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.mandtryclr{color:red}.table-header{color:var(--Gray-800, #1D2939);font-size:16px;font-weight:600;line-height:24px}.text-error{color:var(--Error-700, #B42318)!important;font-size:14px;font-weight:500;line-height:20px}.excel-error{color:var(--Error-600, #D92D20);font-size:14px;font-weight:500;line-height:20px}.error-heading{color:var(--Error-600, #D92D20);font-size:20px;font-weight:500;line-height:30px}.border-error{border:1px solid var(--Error-300, #FDA29B)!important;background:var(--Error-25, #FFFBFA)!important}.popup-card{border-radius:6px;border:1px solid var(--Gray-300, #D0D5DD);background:#fff;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.popup-scroll{min-height:auto;max-height:400px;overflow-y:auto}.config-heading{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}\n"] }]
|
|
3205
|
-
}], ctorParameters: () => [{ type: i4.ToastService }, { type: i3
|
|
3400
|
+
}], ctorParameters: () => [{ type: i4.ToastService }, { type: i3.Router }, { type: i1$1.NgbActiveModal }, { type: ManageUsersService }, { type: i2.GlobalStateService }, { type: i0.ChangeDetectorRef }, { type: i1$1.NgbModal }], propDecorators: { inputFile: [{
|
|
3206
3401
|
type: ViewChild,
|
|
3207
3402
|
args: ["inputFile"]
|
|
3208
3403
|
}], afterValidation: [{
|
|
@@ -3435,7 +3630,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
3435
3630
|
type: Output
|
|
3436
3631
|
}] } });
|
|
3437
3632
|
|
|
3438
|
-
|
|
3633
|
+
const SECRET_KEY = CryptoJS.enc.Utf8.parse(CryptoJS.SHA256("t@ng0-ret@il-@pi-v3")
|
|
3634
|
+
.toString(CryptoJS.enc.Base64)
|
|
3635
|
+
.substring(0, 32));
|
|
3439
3636
|
class BrandUserComponent {
|
|
3440
3637
|
modalService;
|
|
3441
3638
|
pageInfo;
|
|
@@ -3499,6 +3696,19 @@ class BrandUserComponent {
|
|
|
3499
3696
|
}
|
|
3500
3697
|
});
|
|
3501
3698
|
}
|
|
3699
|
+
// must match backend
|
|
3700
|
+
decrypt(encryptedText) {
|
|
3701
|
+
const [ivHex, encrypted] = encryptedText.split(':');
|
|
3702
|
+
const iv = CryptoJS.enc.Hex.parse(ivHex);
|
|
3703
|
+
const ciphertext = CryptoJS.enc.Hex.parse(encrypted);
|
|
3704
|
+
const cipherParams = CryptoJS.lib.CipherParams.create({ ciphertext });
|
|
3705
|
+
const decrypted = CryptoJS.AES.decrypt(cipherParams, SECRET_KEY, {
|
|
3706
|
+
iv: iv,
|
|
3707
|
+
mode: CryptoJS.mode.CBC,
|
|
3708
|
+
padding: CryptoJS.pad.Pkcs7
|
|
3709
|
+
});
|
|
3710
|
+
return decrypted.toString(CryptoJS.enc.Utf8);
|
|
3711
|
+
}
|
|
3502
3712
|
setPageData() {
|
|
3503
3713
|
this.pageInfo.setTitle("Users");
|
|
3504
3714
|
this.pageInfo.setDescription("Onboard your team and help them visualize their stores performance");
|
|
@@ -4053,7 +4263,7 @@ class BrandUserComponent {
|
|
|
4053
4263
|
this.toastService.getSuccessToast(`Stores Assigned to User Successfully!`);
|
|
4054
4264
|
}
|
|
4055
4265
|
else {
|
|
4056
|
-
this.toastService.getErrorToast(`Unable to
|
|
4266
|
+
this.toastService.getErrorToast(`Unable to Assign Stores to User!`);
|
|
4057
4267
|
}
|
|
4058
4268
|
this.modalService.dismissAll('submit');
|
|
4059
4269
|
},
|
|
@@ -4077,7 +4287,7 @@ class BrandUserComponent {
|
|
|
4077
4287
|
modalRef.result.then((result) => {
|
|
4078
4288
|
if (result) {
|
|
4079
4289
|
if (result === 'submit') {
|
|
4080
|
-
this.userService.updateUser({ email: user?.
|
|
4290
|
+
this.userService.updateUser({ email: this.decrypt(user?.encryptedEmail), isActive: user.isActive }).subscribe({
|
|
4081
4291
|
next: (res) => {
|
|
4082
4292
|
if (res && res.code == 200) {
|
|
4083
4293
|
if (user.isActive) {
|
|
@@ -4215,13 +4425,13 @@ class BrandUserComponent {
|
|
|
4215
4425
|
this.selectedUsers = [];
|
|
4216
4426
|
});
|
|
4217
4427
|
}
|
|
4218
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BrandUserComponent, deps: [{ token: i1$1.NgbModal }, { token: i2.PageInfoService }, { token: i0.ChangeDetectorRef }, { token: ExcelService }, { token: i2.GlobalStateService }, { token: i4.ToastService }, { token: UserService }, { token: i3
|
|
4219
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: BrandUserComponent, selector: "lib-brand-user", outputs: { dataToParent: "dataToParent" }, viewQueries: [{ propertyName: "bulkUpload", first: true, predicate: ["bulkUpload"], descendants: true }, { propertyName: "inputFile1", first: true, predicate: ["inputFile1"], descendants: true }, { propertyName: "afterValidation", first: true, predicate: ["afterValidation"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"receivedData !=='Role Value'\">\r\n <div class=\"\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n </h3>\r\n <div class=\"card-toolbar rightcorner \">\r\n <div *ngIf=\"!createTeam\" class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n\r\n <button *ngIf=\"!loading && !noData\" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n \r\n \r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" type=\"button\" (click)=\"bulkAssignasxlsx()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><span class=\"ms-2\">Bulk Assign</span> </button>\r\n\r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" type=\"button\" (click)=\"users('add')\"\r\n class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Add User</span> </button>\r\n\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"createTeam\" class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <button type=\"button\" (click)=\"createTeams()\"\r\n class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" class=\"cursor-pointer\"><span\r\n class=\"inputcheck\"><input type=\"checkbox\" (click)=\"onSelectAll()\"\r\n [(ngModel)]=\"selectAllChecked\" class=\"cursor-pointer\"></span>\r\n\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Name\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'userName' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'email' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'mobileNumber' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('role')\">Roles\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'role' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Assigned To </th>\r\n <th style=\"line-height: 21px !important;\">As a Lead To </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\"><span class=\"inputcheck\"><input\r\n type=\"checkbox\" class=\"cursor-pointer mt-2\" [(ngModel)]=\"user.checked\"\r\n (click)=\"onSelectedTeams(user,i)\"></span></td>\r\n <td>{{user?.userName}}</td>\r\n <td>{{ getMaskedValue(user?.email, userInfo?.role) }}</td>\r\n <td>{{ getMaskedMobile(user?.mobileNumber, userInfo?.role) }}</td>\r\n <td *ngIf=\"user?.role ==='superadmin'\">Super Admin</td>\r\n <td *ngIf=\"user?.role !=='superadmin'\">{{user?.role | titlecase}}</td>\r\n <td><span class=\"badge badge-light-primary\">{{user?.assignedStores||0}} Stores</span> <span class=\"badge badge-light-info\">{{user?.teamCount||0}} Teams</span></td>\r\n <td><span class=\"badge badge-light-purple\">{{user?.clusterCount||0}} Clusters</span> <span class=\"badge badge-light-info\">{{user?.teamlead||0}} Teams</span></td>\r\n\r\n <td>\r\n <div class=\"d-flex\">\r\n <span class=\"mx-3 cursor-pointer\" (click)=\"Viewusers('view',user)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1995_16400)\">\r\n <path\r\n d=\"M1.33325 10C1.33325 10 4.66658 3.33337 10.4999 3.33337C16.3333 3.33337 19.6666 10 19.6666 10C19.6666 10 16.3333 16.6667 10.4999 16.6667C4.66658 16.6667 1.33325 10 1.33325 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10.4999 12.5C11.8806 12.5 12.9999 11.3808 12.9999 10C12.9999 8.61933 11.8806 7.50004 10.4999 7.50004C9.11921 7.50004 7.99992 8.61933 7.99992 10C7.99992 11.3808 9.11921 12.5 10.4999 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1995_16400\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n @if ((gs.userAccess | async)?.Global_User_isEdit) {\r\n <span class=\"mx-3 cursor-pointer\" *ngIf=\"userInfo.role!=='user'\">\r\n <button type=\"button\" (click)=\"assignStore(user)\"\r\n [disabled]=\"!user?.isActive || user?.role ==='superadmin'\"\r\n class=\"btn btn-default mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val\">\r\n <span class=\"mx-2\">Assign</span>\r\n </button>\r\n </span>\r\n }\r\n <span class=\"form-check form-switch\" *ngIf=\"userInfo.role!=='user'\">\r\n <input class=\"form-check-input mt-3\" type=\"checkbox\" role=\"switch\" id=\"support\"\r\n [disabled]=\"!((gs.userAccess | async)?.Global_User_isEdit)\"\r\n (change)=\"userStatusChange(user,i)\" [(ngModel)]=\"userList[i].isActive\">\r\n @if (userList[i].isActive) {\r\n Active\r\n } @else {\r\n Deactive\r\n }\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata.svg\" alt=\"\">\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!--begin::Row-->\r\n<div *ngIf=\"receivedData ==='Role Value'\" class=\"row gx-5 gx-xl-10\">\r\n <!--begin::Col-->\r\n <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\">\r\n <lib-roles-permission-table (dataEvent)=\"receiveData($event)\"></lib-roles-permission-table>\r\n </div>\r\n <!--end::Col-->\r\n</div>\r\n<!--end::Row-->\r\n\r\n<ng-template #bulkUpload let-modal>\r\n <div class=\"card-body flex-column p-9\">\r\n <div class=\"header-title\">Bulk Assign</div>\r\n <div class=\"d-flex justify-content-start align-items-center\">\r\n <div class=\"fw-bold text-gray-500 mt-6\">\r\n <ol class=\"custom-ordered-list text-gray-400 fw-bold px-5 fs-6\">\r\n <li class=\"user-text\">Use the template below to assign multiple users to multiple stores at once.</li>\r\n <li class=\"user-text my-3\"><span class=\"user-text\">Download the template here - </span>\r\n <a class=\"ms-1\" href=\"../../../assets/files/BulkAssignTemplate.xlsx\" download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text my-3\">Add your data to the Template File</li>\r\n <li class=\"user-text my-3\">Upload it below for processing</li> \r\n </ol>\r\n </div>\r\n </div>\r\n <div class=\" w-100 right-bar d-flex justify-content-center align-items-center flex-column\" >\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal1\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\" value=\"personal1\"\r\n class=\"btn-check\"\r\n (change)=\"onUpload1($event)\"\r\n ng-reflect-value=\"personal\" type=\"file\" #inputFile1 />\r\n <label for=\"kt_create_account_form_account_type_personal1\" class=\" w-1-0 p-4\"><span\r\n class=\"fw-bold text-center w-100 fs-4\">\r\n <div class=\"d-flex justify-content-center align-items-center w-100\">\r\n <svg width=\"46\" height=\"46\" viewBox=\"0 0 46 46\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" fill=\"#F2F4F7\" />\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" stroke=\"#F9FAFB\"\r\n stroke-width=\"6\" />\r\n <g clip-path=\"url(#clip0_4047_40566)\">\r\n <path\r\n d=\"M26.3333 26.3334L23 23M23 23L19.6666 26.3334M23 23V30.5M29.9916 28.325C30.8044 27.8819 31.4465 27.1808 31.8165 26.3322C32.1866 25.4837 32.2635 24.5361 32.0351 23.6389C31.8068 22.7418 31.2862 21.9463 30.5555 21.3779C29.8248 20.8095 28.9257 20.5006 28 20.5H26.95C26.6977 19.5244 26.2276 18.6186 25.5749 17.8509C24.9222 17.0831 24.104 16.4732 23.1817 16.0672C22.2594 15.6612 21.2571 15.4695 20.2501 15.5066C19.243 15.5437 18.2575 15.8086 17.3676 16.2814C16.4777 16.7542 15.7066 17.4226 15.1122 18.2363C14.5177 19.0501 14.1155 19.988 13.9358 20.9795C13.756 21.9711 13.8034 22.9905 14.0743 23.9611C14.3452 24.9317 14.8327 25.8282 15.5 26.5834\"\r\n stroke=\"#475467\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_4047_40566\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(13 13)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </div>\r\n <div class=\"nodata-title mb-3\"><span class=\"click-upload cursor-pointer\">Click to\r\n upload</span>\r\n </div>\r\n <div class=\"nodata-sub\">the data added template file for processing.</div>\r\n </span>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #afterValidation let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"card-title mt-3\"><span class=\"config-heading fw-semibold w-auto\">Bulk Assign</span></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{getEmailCounts(excelData)}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Total Records</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{excelData?.length}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Rows processed</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error w-100 error-heading' \r\n : 'fw-semibold w-100 config-heading'\">\r\n {{ excelError?.error?.length || 0 }}\r\n </div>\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error mt-1 excel-error' \r\n : 'fw-semibold subtitle mt-1'\">\r\n Error\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!excelError\" class=\"table-header mt-5\" style=\"font-weight: 400;\">\r\n <div >You're about to assign {{getEmailCounts(excelData)}} {{getEmailCounts(excelData) > 1 ? 'Users' : 'User'}}. Are you sure want to proceed?</div>\r\n \r\n </div>\r\n <div *ngIf=\"excelError\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Invalid Details !</div>\r\n <div class=\"subtitle mt-5\">Please provide correct information.</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of excelError?.error; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify-content-end flex-wrap gap-2 pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline\" (click)=\"closeactivepopup()\">Cancel</button>\r\n <button *ngIf=\"!excelError\" class=\"btn btn-md py-3 btn-default btn-primary\" (click)=\"proceedSubmit()\">Proceed</button>\r\n <button *ngIf=\"excelError\" class=\"btn py-3 btn-md btn-default ms-3 btn-danger\" (click)=\"file1.click();\">Reupload</button>\r\n <input style=\"display: none;\" #file1 type=\"file\" id=\"kt_account_team_size_select_2\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUpload1($event)\" />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:10px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}.p-4{padding:.85rem!important}.inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rightcorner{position:absolute;top:10px;right:16px;font-size:18px}.user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.right-bar{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD)}.click-upload{color:var(--Primary-700, #009BF3)!important;font-size:14px!important;font-weight:600!important;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.header-title{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.subtitle{color:var(--Gray-500, #667085);font-size:14px;font-weight:400;line-height:20px}.config-heading{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.table-header{color:var(--Gray-800, #1D2939);font-size:16px;font-weight:400;line-height:24px}.text-error{color:var(--Error-700, #B42318)!important;font-size:14px;font-weight:500;line-height:20px}.excel-error{color:var(--Error-600, #D92D20);font-size:14px;font-weight:500;line-height:20px}.error-heading{color:var(--Error-600, #D92D20);font-size:20px;font-weight:500;line-height:30px}.border-error{border:1px solid var(--Error-300, #FDA29B)!important;background:var(--Error-25, #FFFBFA)!important}.popup-card{border-radius:6px;border:1px solid var(--Gray-300, #D0D5DD);background:#fff;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.popup-scroll{min-height:auto;max-height:400px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "component", type: i4.FiltersComponent, selector: "lib-filters", inputs: ["dataObject"], outputs: ["appliedFilters"] }, { kind: "component", type: RolesPermissionTableComponent, selector: "lib-roles-permission-table", outputs: ["dataEvent"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }] });
|
|
4428
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BrandUserComponent, deps: [{ token: i1$1.NgbModal }, { token: i2.PageInfoService }, { token: i0.ChangeDetectorRef }, { token: ExcelService }, { token: i2.GlobalStateService }, { token: i4.ToastService }, { token: UserService }, { token: i3.Router }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
4429
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: BrandUserComponent, selector: "lib-brand-user", outputs: { dataToParent: "dataToParent" }, viewQueries: [{ propertyName: "bulkUpload", first: true, predicate: ["bulkUpload"], descendants: true }, { propertyName: "inputFile1", first: true, predicate: ["inputFile1"], descendants: true }, { propertyName: "afterValidation", first: true, predicate: ["afterValidation"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"receivedData !=='Role Value'\">\r\n <div class=\"\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n </h3>\r\n <div class=\"card-toolbar rightcorner \">\r\n <div *ngIf=\"!createTeam\" class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n\r\n <button *ngIf=\"!loading && !noData\" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n \r\n \r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" type=\"button\" (click)=\"bulkAssignasxlsx()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><span class=\"ms-2\">Bulk Assign</span> </button>\r\n\r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" type=\"button\" (click)=\"users('add')\"\r\n class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Add User</span> </button>\r\n\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"createTeam\" class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <button type=\"button\" (click)=\"createTeams()\"\r\n class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" class=\"cursor-pointer\"><span\r\n class=\"inputcheck\"><input type=\"checkbox\" (click)=\"onSelectAll()\"\r\n [(ngModel)]=\"selectAllChecked\" class=\"cursor-pointer\"></span>\r\n\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Name\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'userName' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'email' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'mobileNumber' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th >Roles\r\n <!-- class=\"cursor-pointer\" (click)=\"onSort('role')\" -->\r\n <!-- <svg [ngClass]=\"userList_req?.sortColumName === 'role' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> -->\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Assigned To </th>\r\n <th style=\"line-height: 21px !important;\">As a Lead To </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\"><span class=\"inputcheck\"><input\r\n type=\"checkbox\" class=\"cursor-pointer mt-2\" [(ngModel)]=\"user.checked\"\r\n (click)=\"onSelectedTeams(user,i)\"></span></td>\r\n <td>{{user?.userName}}</td>\r\n <td>{{ getMaskedValue(user?.email, userInfo?.role) }}</td>\r\n <td>{{ getMaskedMobile(user?.mobileNumber, userInfo?.role) }}</td>\r\n <td *ngIf=\"user?.role ==='superadmin'\">Super Admin</td>\r\n <td *ngIf=\"user?.role !=='superadmin'\">{{user?.role | titlecase}}</td>\r\n <td><span class=\"badge badge-light-primary me-1\">{{user?.assignedStores||0}} Stores</span> <span class=\"badge badge-light-info\">{{user?.teamCount||0}} Teams</span></td>\r\n <td><span class=\"badge badge-light-purple me-1\">{{user?.clusterCount||0}} Clusters</span> <span class=\"badge badge-light-info\">{{user?.teamlead||0}} Teams</span></td>\r\n\r\n <td>\r\n <div class=\"d-flex\">\r\n <span class=\"mx-3 cursor-pointer\" (click)=\"Viewusers('view',user)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1995_16400)\">\r\n <path\r\n d=\"M1.33325 10C1.33325 10 4.66658 3.33337 10.4999 3.33337C16.3333 3.33337 19.6666 10 19.6666 10C19.6666 10 16.3333 16.6667 10.4999 16.6667C4.66658 16.6667 1.33325 10 1.33325 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10.4999 12.5C11.8806 12.5 12.9999 11.3808 12.9999 10C12.9999 8.61933 11.8806 7.50004 10.4999 7.50004C9.11921 7.50004 7.99992 8.61933 7.99992 10C7.99992 11.3808 9.11921 12.5 10.4999 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1995_16400\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n @if ((gs.userAccess | async)?.Global_User_isEdit) {\r\n <span class=\"mx-3 cursor-pointer\" *ngIf=\"userInfo.role!=='user'\">\r\n <button type=\"button\" (click)=\"assignStore(user)\"\r\n [disabled]=\"!user?.isActive || user?.role ==='superadmin'\"\r\n class=\"btn btn-default mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val\">\r\n <span class=\"mx-2\">Assign</span>\r\n </button>\r\n </span>\r\n }\r\n <span class=\"form-check form-switch\" *ngIf=\"userInfo.role!=='user'\">\r\n <input class=\"form-check-input mt-3\" type=\"checkbox\" role=\"switch\" id=\"support\"\r\n [disabled]=\"!((gs.userAccess | async)?.Global_User_isEdit)\"\r\n (change)=\"userStatusChange(user,i)\" [(ngModel)]=\"userList[i].isActive\">\r\n @if (userList[i].isActive) {\r\n Active\r\n } @else {\r\n Deactive\r\n }\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata.svg\" alt=\"\">\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!--begin::Row-->\r\n<div *ngIf=\"receivedData ==='Role Value'\" class=\"row gx-5 gx-xl-10\">\r\n <!--begin::Col-->\r\n <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\">\r\n <lib-roles-permission-table (dataEvent)=\"receiveData($event)\"></lib-roles-permission-table>\r\n </div>\r\n <!--end::Col-->\r\n</div>\r\n<!--end::Row-->\r\n\r\n<ng-template #bulkUpload let-modal>\r\n <div class=\"card-body flex-column p-9\">\r\n <div class=\"header-title\">Bulk Assign</div>\r\n <div class=\"d-flex justify-content-start align-items-center\">\r\n <div class=\"fw-bold text-gray-500 mt-6\">\r\n <ol class=\"custom-ordered-list text-gray-400 fw-bold px-5 fs-6\">\r\n <li class=\"user-text\">Use the template below to assign multiple users to multiple stores at once.</li>\r\n <li class=\"user-text my-3\"><span class=\"user-text\">Download the template here - </span>\r\n <a class=\"ms-1\" href=\"../../../assets/files/BulkAssignTemplate.xlsx\" download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text my-3\">Add your data to the Template File</li>\r\n <li class=\"user-text my-3\">Upload it below for processing</li> \r\n </ol>\r\n </div>\r\n </div>\r\n <div class=\" w-100 right-bar d-flex justify-content-center align-items-center flex-column\" >\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal1\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\" value=\"personal1\"\r\n class=\"btn-check\"\r\n (change)=\"onUpload1($event)\"\r\n ng-reflect-value=\"personal\" type=\"file\" #inputFile1 />\r\n <label for=\"kt_create_account_form_account_type_personal1\" class=\" w-1-0 p-4\"><span\r\n class=\"fw-bold text-center w-100 fs-4\">\r\n <div class=\"d-flex justify-content-center align-items-center w-100\">\r\n <svg width=\"46\" height=\"46\" viewBox=\"0 0 46 46\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" fill=\"#F2F4F7\" />\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" stroke=\"#F9FAFB\"\r\n stroke-width=\"6\" />\r\n <g clip-path=\"url(#clip0_4047_40566)\">\r\n <path\r\n d=\"M26.3333 26.3334L23 23M23 23L19.6666 26.3334M23 23V30.5M29.9916 28.325C30.8044 27.8819 31.4465 27.1808 31.8165 26.3322C32.1866 25.4837 32.2635 24.5361 32.0351 23.6389C31.8068 22.7418 31.2862 21.9463 30.5555 21.3779C29.8248 20.8095 28.9257 20.5006 28 20.5H26.95C26.6977 19.5244 26.2276 18.6186 25.5749 17.8509C24.9222 17.0831 24.104 16.4732 23.1817 16.0672C22.2594 15.6612 21.2571 15.4695 20.2501 15.5066C19.243 15.5437 18.2575 15.8086 17.3676 16.2814C16.4777 16.7542 15.7066 17.4226 15.1122 18.2363C14.5177 19.0501 14.1155 19.988 13.9358 20.9795C13.756 21.9711 13.8034 22.9905 14.0743 23.9611C14.3452 24.9317 14.8327 25.8282 15.5 26.5834\"\r\n stroke=\"#475467\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_4047_40566\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(13 13)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </div>\r\n <div class=\"nodata-title mb-3\"><span class=\"click-upload cursor-pointer\">Click to\r\n upload</span>\r\n </div>\r\n <div class=\"nodata-sub\">the data added template file for processing.</div>\r\n </span>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #afterValidation let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"card-title mt-3\"><span class=\"config-heading fw-semibold w-auto\">Bulk Assign</span></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{getEmailCounts(excelData)}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Total Records</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{excelData?.length}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Rows processed</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error w-100 error-heading' \r\n : 'fw-semibold w-100 config-heading'\">\r\n {{ excelError?.error?.length || 0 }}\r\n </div>\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error mt-1 excel-error' \r\n : 'fw-semibold subtitle mt-1'\">\r\n Error\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!excelError\" class=\"table-header mt-5\" style=\"font-weight: 400;\">\r\n <div >You're about to assign {{getEmailCounts(excelData)}} {{getEmailCounts(excelData) > 1 ? 'Users' : 'User'}}. Are you sure want to proceed?</div>\r\n \r\n </div>\r\n <div *ngIf=\"excelError\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Invalid Details !</div>\r\n <div class=\"subtitle mt-5\">Please provide correct information.</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of excelError?.error; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify-content-end flex-wrap gap-2 pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline\" (click)=\"closeactivepopup()\">Cancel</button>\r\n <button *ngIf=\"!excelError\" class=\"btn btn-md py-3 btn-default btn-primary\" (click)=\"proceedSubmit()\">Proceed</button>\r\n <button *ngIf=\"excelError\" class=\"btn py-3 btn-md btn-default ms-3 btn-danger\" (click)=\"file1.click();\">Reupload</button>\r\n <input style=\"display: none;\" #file1 type=\"file\" id=\"kt_account_team_size_select_2\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUpload1($event)\" />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:10px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}.p-4{padding:.85rem!important}.inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rightcorner{position:absolute;top:10px;right:16px;font-size:18px}.user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.right-bar{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD)}.click-upload{color:var(--Primary-700, #009BF3)!important;font-size:14px!important;font-weight:600!important;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.header-title{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.subtitle{color:var(--Gray-500, #667085);font-size:14px;font-weight:400;line-height:20px}.config-heading{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.table-header{color:var(--Gray-800, #1D2939);font-size:16px;font-weight:400;line-height:24px}.text-error{color:var(--Error-700, #B42318)!important;font-size:14px;font-weight:500;line-height:20px}.excel-error{color:var(--Error-600, #D92D20);font-size:14px;font-weight:500;line-height:20px}.error-heading{color:var(--Error-600, #D92D20);font-size:20px;font-weight:500;line-height:30px}.border-error{border:1px solid var(--Error-300, #FDA29B)!important;background:var(--Error-25, #FFFBFA)!important}.popup-card{border-radius:6px;border:1px solid var(--Gray-300, #D0D5DD);background:#fff;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.popup-scroll{min-height:auto;max-height:400px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "component", type: i4.FiltersComponent, selector: "lib-filters", inputs: ["dataObject"], outputs: ["appliedFilters"] }, { kind: "component", type: RolesPermissionTableComponent, selector: "lib-roles-permission-table", outputs: ["dataEvent"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }] });
|
|
4220
4430
|
}
|
|
4221
4431
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BrandUserComponent, decorators: [{
|
|
4222
4432
|
type: Component,
|
|
4223
|
-
args: [{ selector: 'lib-brand-user', template: "<div *ngIf=\"receivedData !=='Role Value'\">\r\n <div class=\"\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n </h3>\r\n <div class=\"card-toolbar rightcorner \">\r\n <div *ngIf=\"!createTeam\" class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n\r\n <button *ngIf=\"!loading && !noData\" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n \r\n \r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" type=\"button\" (click)=\"bulkAssignasxlsx()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><span class=\"ms-2\">Bulk Assign</span> </button>\r\n\r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" type=\"button\" (click)=\"users('add')\"\r\n class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Add User</span> </button>\r\n\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"createTeam\" class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <button type=\"button\" (click)=\"createTeams()\"\r\n class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" class=\"cursor-pointer\"><span\r\n class=\"inputcheck\"><input type=\"checkbox\" (click)=\"onSelectAll()\"\r\n [(ngModel)]=\"selectAllChecked\" class=\"cursor-pointer\"></span>\r\n\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Name\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'userName' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'email' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'mobileNumber' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('role')\">Roles\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'role' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Assigned To </th>\r\n <th style=\"line-height: 21px !important;\">As a Lead To </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\"><span class=\"inputcheck\"><input\r\n type=\"checkbox\" class=\"cursor-pointer mt-2\" [(ngModel)]=\"user.checked\"\r\n (click)=\"onSelectedTeams(user,i)\"></span></td>\r\n <td>{{user?.userName}}</td>\r\n <td>{{ getMaskedValue(user?.email, userInfo?.role) }}</td>\r\n <td>{{ getMaskedMobile(user?.mobileNumber, userInfo?.role) }}</td>\r\n <td *ngIf=\"user?.role ==='superadmin'\">Super Admin</td>\r\n <td *ngIf=\"user?.role !=='superadmin'\">{{user?.role | titlecase}}</td>\r\n <td><span class=\"badge badge-light-primary\">{{user?.assignedStores||0}} Stores</span> <span class=\"badge badge-light-info\">{{user?.teamCount||0}} Teams</span></td>\r\n <td><span class=\"badge badge-light-purple\">{{user?.clusterCount||0}} Clusters</span> <span class=\"badge badge-light-info\">{{user?.teamlead||0}} Teams</span></td>\r\n\r\n <td>\r\n <div class=\"d-flex\">\r\n <span class=\"mx-3 cursor-pointer\" (click)=\"Viewusers('view',user)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1995_16400)\">\r\n <path\r\n d=\"M1.33325 10C1.33325 10 4.66658 3.33337 10.4999 3.33337C16.3333 3.33337 19.6666 10 19.6666 10C19.6666 10 16.3333 16.6667 10.4999 16.6667C4.66658 16.6667 1.33325 10 1.33325 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10.4999 12.5C11.8806 12.5 12.9999 11.3808 12.9999 10C12.9999 8.61933 11.8806 7.50004 10.4999 7.50004C9.11921 7.50004 7.99992 8.61933 7.99992 10C7.99992 11.3808 9.11921 12.5 10.4999 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1995_16400\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n @if ((gs.userAccess | async)?.Global_User_isEdit) {\r\n <span class=\"mx-3 cursor-pointer\" *ngIf=\"userInfo.role!=='user'\">\r\n <button type=\"button\" (click)=\"assignStore(user)\"\r\n [disabled]=\"!user?.isActive || user?.role ==='superadmin'\"\r\n class=\"btn btn-default mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val\">\r\n <span class=\"mx-2\">Assign</span>\r\n </button>\r\n </span>\r\n }\r\n <span class=\"form-check form-switch\" *ngIf=\"userInfo.role!=='user'\">\r\n <input class=\"form-check-input mt-3\" type=\"checkbox\" role=\"switch\" id=\"support\"\r\n [disabled]=\"!((gs.userAccess | async)?.Global_User_isEdit)\"\r\n (change)=\"userStatusChange(user,i)\" [(ngModel)]=\"userList[i].isActive\">\r\n @if (userList[i].isActive) {\r\n Active\r\n } @else {\r\n Deactive\r\n }\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata.svg\" alt=\"\">\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!--begin::Row-->\r\n<div *ngIf=\"receivedData ==='Role Value'\" class=\"row gx-5 gx-xl-10\">\r\n <!--begin::Col-->\r\n <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\">\r\n <lib-roles-permission-table (dataEvent)=\"receiveData($event)\"></lib-roles-permission-table>\r\n </div>\r\n <!--end::Col-->\r\n</div>\r\n<!--end::Row-->\r\n\r\n<ng-template #bulkUpload let-modal>\r\n <div class=\"card-body flex-column p-9\">\r\n <div class=\"header-title\">Bulk Assign</div>\r\n <div class=\"d-flex justify-content-start align-items-center\">\r\n <div class=\"fw-bold text-gray-500 mt-6\">\r\n <ol class=\"custom-ordered-list text-gray-400 fw-bold px-5 fs-6\">\r\n <li class=\"user-text\">Use the template below to assign multiple users to multiple stores at once.</li>\r\n <li class=\"user-text my-3\"><span class=\"user-text\">Download the template here - </span>\r\n <a class=\"ms-1\" href=\"../../../assets/files/BulkAssignTemplate.xlsx\" download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text my-3\">Add your data to the Template File</li>\r\n <li class=\"user-text my-3\">Upload it below for processing</li> \r\n </ol>\r\n </div>\r\n </div>\r\n <div class=\" w-100 right-bar d-flex justify-content-center align-items-center flex-column\" >\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal1\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\" value=\"personal1\"\r\n class=\"btn-check\"\r\n (change)=\"onUpload1($event)\"\r\n ng-reflect-value=\"personal\" type=\"file\" #inputFile1 />\r\n <label for=\"kt_create_account_form_account_type_personal1\" class=\" w-1-0 p-4\"><span\r\n class=\"fw-bold text-center w-100 fs-4\">\r\n <div class=\"d-flex justify-content-center align-items-center w-100\">\r\n <svg width=\"46\" height=\"46\" viewBox=\"0 0 46 46\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" fill=\"#F2F4F7\" />\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" stroke=\"#F9FAFB\"\r\n stroke-width=\"6\" />\r\n <g clip-path=\"url(#clip0_4047_40566)\">\r\n <path\r\n d=\"M26.3333 26.3334L23 23M23 23L19.6666 26.3334M23 23V30.5M29.9916 28.325C30.8044 27.8819 31.4465 27.1808 31.8165 26.3322C32.1866 25.4837 32.2635 24.5361 32.0351 23.6389C31.8068 22.7418 31.2862 21.9463 30.5555 21.3779C29.8248 20.8095 28.9257 20.5006 28 20.5H26.95C26.6977 19.5244 26.2276 18.6186 25.5749 17.8509C24.9222 17.0831 24.104 16.4732 23.1817 16.0672C22.2594 15.6612 21.2571 15.4695 20.2501 15.5066C19.243 15.5437 18.2575 15.8086 17.3676 16.2814C16.4777 16.7542 15.7066 17.4226 15.1122 18.2363C14.5177 19.0501 14.1155 19.988 13.9358 20.9795C13.756 21.9711 13.8034 22.9905 14.0743 23.9611C14.3452 24.9317 14.8327 25.8282 15.5 26.5834\"\r\n stroke=\"#475467\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_4047_40566\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(13 13)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </div>\r\n <div class=\"nodata-title mb-3\"><span class=\"click-upload cursor-pointer\">Click to\r\n upload</span>\r\n </div>\r\n <div class=\"nodata-sub\">the data added template file for processing.</div>\r\n </span>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #afterValidation let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"card-title mt-3\"><span class=\"config-heading fw-semibold w-auto\">Bulk Assign</span></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{getEmailCounts(excelData)}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Total Records</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{excelData?.length}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Rows processed</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error w-100 error-heading' \r\n : 'fw-semibold w-100 config-heading'\">\r\n {{ excelError?.error?.length || 0 }}\r\n </div>\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error mt-1 excel-error' \r\n : 'fw-semibold subtitle mt-1'\">\r\n Error\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!excelError\" class=\"table-header mt-5\" style=\"font-weight: 400;\">\r\n <div >You're about to assign {{getEmailCounts(excelData)}} {{getEmailCounts(excelData) > 1 ? 'Users' : 'User'}}. Are you sure want to proceed?</div>\r\n \r\n </div>\r\n <div *ngIf=\"excelError\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Invalid Details !</div>\r\n <div class=\"subtitle mt-5\">Please provide correct information.</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of excelError?.error; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify-content-end flex-wrap gap-2 pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline\" (click)=\"closeactivepopup()\">Cancel</button>\r\n <button *ngIf=\"!excelError\" class=\"btn btn-md py-3 btn-default btn-primary\" (click)=\"proceedSubmit()\">Proceed</button>\r\n <button *ngIf=\"excelError\" class=\"btn py-3 btn-md btn-default ms-3 btn-danger\" (click)=\"file1.click();\">Reupload</button>\r\n <input style=\"display: none;\" #file1 type=\"file\" id=\"kt_account_team_size_select_2\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUpload1($event)\" />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:10px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}.p-4{padding:.85rem!important}.inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rightcorner{position:absolute;top:10px;right:16px;font-size:18px}.user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.right-bar{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD)}.click-upload{color:var(--Primary-700, #009BF3)!important;font-size:14px!important;font-weight:600!important;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.header-title{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.subtitle{color:var(--Gray-500, #667085);font-size:14px;font-weight:400;line-height:20px}.config-heading{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.table-header{color:var(--Gray-800, #1D2939);font-size:16px;font-weight:400;line-height:24px}.text-error{color:var(--Error-700, #B42318)!important;font-size:14px;font-weight:500;line-height:20px}.excel-error{color:var(--Error-600, #D92D20);font-size:14px;font-weight:500;line-height:20px}.error-heading{color:var(--Error-600, #D92D20);font-size:20px;font-weight:500;line-height:30px}.border-error{border:1px solid var(--Error-300, #FDA29B)!important;background:var(--Error-25, #FFFBFA)!important}.popup-card{border-radius:6px;border:1px solid var(--Gray-300, #D0D5DD);background:#fff;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.popup-scroll{min-height:auto;max-height:400px;overflow-y:auto}\n"] }]
|
|
4224
|
-
}], ctorParameters: () => [{ type: i1$1.NgbModal }, { type: i2.PageInfoService }, { type: i0.ChangeDetectorRef }, { type: ExcelService }, { type: i2.GlobalStateService }, { type: i4.ToastService }, { type: UserService }, { type: i3
|
|
4433
|
+
args: [{ selector: 'lib-brand-user', template: "<div *ngIf=\"receivedData !=='Role Value'\">\r\n <div class=\"\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n </h3>\r\n <div class=\"card-toolbar rightcorner \">\r\n <div *ngIf=\"!createTeam\" class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n\r\n <button *ngIf=\"!loading && !noData\" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n \r\n \r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" type=\"button\" (click)=\"bulkAssignasxlsx()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><span class=\"ms-2\">Bulk Assign</span> </button>\r\n\r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" type=\"button\" (click)=\"users('add')\"\r\n class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Add User</span> </button>\r\n\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"createTeam\" class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <button type=\"button\" (click)=\"createTeams()\"\r\n class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" class=\"cursor-pointer\"><span\r\n class=\"inputcheck\"><input type=\"checkbox\" (click)=\"onSelectAll()\"\r\n [(ngModel)]=\"selectAllChecked\" class=\"cursor-pointer\"></span>\r\n\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Name\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'userName' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'email' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"userList_req?.sortColumName === 'mobileNumber' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th >Roles\r\n <!-- class=\"cursor-pointer\" (click)=\"onSort('role')\" -->\r\n <!-- <svg [ngClass]=\"userList_req?.sortColumName === 'role' && userList_req?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"userList_req?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> -->\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Assigned To </th>\r\n <th style=\"line-height: 21px !important;\">As a Lead To </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\"><span class=\"inputcheck\"><input\r\n type=\"checkbox\" class=\"cursor-pointer mt-2\" [(ngModel)]=\"user.checked\"\r\n (click)=\"onSelectedTeams(user,i)\"></span></td>\r\n <td>{{user?.userName}}</td>\r\n <td>{{ getMaskedValue(user?.email, userInfo?.role) }}</td>\r\n <td>{{ getMaskedMobile(user?.mobileNumber, userInfo?.role) }}</td>\r\n <td *ngIf=\"user?.role ==='superadmin'\">Super Admin</td>\r\n <td *ngIf=\"user?.role !=='superadmin'\">{{user?.role | titlecase}}</td>\r\n <td><span class=\"badge badge-light-primary me-1\">{{user?.assignedStores||0}} Stores</span> <span class=\"badge badge-light-info\">{{user?.teamCount||0}} Teams</span></td>\r\n <td><span class=\"badge badge-light-purple me-1\">{{user?.clusterCount||0}} Clusters</span> <span class=\"badge badge-light-info\">{{user?.teamlead||0}} Teams</span></td>\r\n\r\n <td>\r\n <div class=\"d-flex\">\r\n <span class=\"mx-3 cursor-pointer\" (click)=\"Viewusers('view',user)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1995_16400)\">\r\n <path\r\n d=\"M1.33325 10C1.33325 10 4.66658 3.33337 10.4999 3.33337C16.3333 3.33337 19.6666 10 19.6666 10C19.6666 10 16.3333 16.6667 10.4999 16.6667C4.66658 16.6667 1.33325 10 1.33325 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10.4999 12.5C11.8806 12.5 12.9999 11.3808 12.9999 10C12.9999 8.61933 11.8806 7.50004 10.4999 7.50004C9.11921 7.50004 7.99992 8.61933 7.99992 10C7.99992 11.3808 9.11921 12.5 10.4999 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1995_16400\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n @if ((gs.userAccess | async)?.Global_User_isEdit) {\r\n <span class=\"mx-3 cursor-pointer\" *ngIf=\"userInfo.role!=='user'\">\r\n <button type=\"button\" (click)=\"assignStore(user)\"\r\n [disabled]=\"!user?.isActive || user?.role ==='superadmin'\"\r\n class=\"btn btn-default mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val\">\r\n <span class=\"mx-2\">Assign</span>\r\n </button>\r\n </span>\r\n }\r\n <span class=\"form-check form-switch\" *ngIf=\"userInfo.role!=='user'\">\r\n <input class=\"form-check-input mt-3\" type=\"checkbox\" role=\"switch\" id=\"support\"\r\n [disabled]=\"!((gs.userAccess | async)?.Global_User_isEdit)\"\r\n (change)=\"userStatusChange(user,i)\" [(ngModel)]=\"userList[i].isActive\">\r\n @if (userList[i].isActive) {\r\n Active\r\n } @else {\r\n Deactive\r\n }\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata.svg\" alt=\"\">\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!--begin::Row-->\r\n<div *ngIf=\"receivedData ==='Role Value'\" class=\"row gx-5 gx-xl-10\">\r\n <!--begin::Col-->\r\n <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\">\r\n <lib-roles-permission-table (dataEvent)=\"receiveData($event)\"></lib-roles-permission-table>\r\n </div>\r\n <!--end::Col-->\r\n</div>\r\n<!--end::Row-->\r\n\r\n<ng-template #bulkUpload let-modal>\r\n <div class=\"card-body flex-column p-9\">\r\n <div class=\"header-title\">Bulk Assign</div>\r\n <div class=\"d-flex justify-content-start align-items-center\">\r\n <div class=\"fw-bold text-gray-500 mt-6\">\r\n <ol class=\"custom-ordered-list text-gray-400 fw-bold px-5 fs-6\">\r\n <li class=\"user-text\">Use the template below to assign multiple users to multiple stores at once.</li>\r\n <li class=\"user-text my-3\"><span class=\"user-text\">Download the template here - </span>\r\n <a class=\"ms-1\" href=\"../../../assets/files/BulkAssignTemplate.xlsx\" download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text my-3\">Add your data to the Template File</li>\r\n <li class=\"user-text my-3\">Upload it below for processing</li> \r\n </ol>\r\n </div>\r\n </div>\r\n <div class=\" w-100 right-bar d-flex justify-content-center align-items-center flex-column\" >\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal1\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\" value=\"personal1\"\r\n class=\"btn-check\"\r\n (change)=\"onUpload1($event)\"\r\n ng-reflect-value=\"personal\" type=\"file\" #inputFile1 />\r\n <label for=\"kt_create_account_form_account_type_personal1\" class=\" w-1-0 p-4\"><span\r\n class=\"fw-bold text-center w-100 fs-4\">\r\n <div class=\"d-flex justify-content-center align-items-center w-100\">\r\n <svg width=\"46\" height=\"46\" viewBox=\"0 0 46 46\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" fill=\"#F2F4F7\" />\r\n <rect x=\"3\" y=\"3\" width=\"40\" height=\"40\" rx=\"20\" stroke=\"#F9FAFB\"\r\n stroke-width=\"6\" />\r\n <g clip-path=\"url(#clip0_4047_40566)\">\r\n <path\r\n d=\"M26.3333 26.3334L23 23M23 23L19.6666 26.3334M23 23V30.5M29.9916 28.325C30.8044 27.8819 31.4465 27.1808 31.8165 26.3322C32.1866 25.4837 32.2635 24.5361 32.0351 23.6389C31.8068 22.7418 31.2862 21.9463 30.5555 21.3779C29.8248 20.8095 28.9257 20.5006 28 20.5H26.95C26.6977 19.5244 26.2276 18.6186 25.5749 17.8509C24.9222 17.0831 24.104 16.4732 23.1817 16.0672C22.2594 15.6612 21.2571 15.4695 20.2501 15.5066C19.243 15.5437 18.2575 15.8086 17.3676 16.2814C16.4777 16.7542 15.7066 17.4226 15.1122 18.2363C14.5177 19.0501 14.1155 19.988 13.9358 20.9795C13.756 21.9711 13.8034 22.9905 14.0743 23.9611C14.3452 24.9317 14.8327 25.8282 15.5 26.5834\"\r\n stroke=\"#475467\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_4047_40566\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(13 13)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </div>\r\n <div class=\"nodata-title mb-3\"><span class=\"click-upload cursor-pointer\">Click to\r\n upload</span>\r\n </div>\r\n <div class=\"nodata-sub\">the data added template file for processing.</div>\r\n </span>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #afterValidation let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"card-title mt-3\"><span class=\"config-heading fw-semibold w-auto\">Bulk Assign</span></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{getEmailCounts(excelData)}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Total Records</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{excelData?.length}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Rows processed</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-70px\">\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error w-100 error-heading' \r\n : 'fw-semibold w-100 config-heading'\">\r\n {{ excelError?.error?.length || 0 }}\r\n </div>\r\n <div [ngClass]=\"excelError \r\n ? 'fw-semibold text-error mt-1 excel-error' \r\n : 'fw-semibold subtitle mt-1'\">\r\n Error\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!excelError\" class=\"table-header mt-5\" style=\"font-weight: 400;\">\r\n <div >You're about to assign {{getEmailCounts(excelData)}} {{getEmailCounts(excelData) > 1 ? 'Users' : 'User'}}. Are you sure want to proceed?</div>\r\n \r\n </div>\r\n <div *ngIf=\"excelError\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Invalid Details !</div>\r\n <div class=\"subtitle mt-5\">Please provide correct information.</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of excelError?.error; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify-content-end flex-wrap gap-2 pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline\" (click)=\"closeactivepopup()\">Cancel</button>\r\n <button *ngIf=\"!excelError\" class=\"btn btn-md py-3 btn-default btn-primary\" (click)=\"proceedSubmit()\">Proceed</button>\r\n <button *ngIf=\"excelError\" class=\"btn py-3 btn-md btn-default ms-3 btn-danger\" (click)=\"file1.click();\">Reupload</button>\r\n <input style=\"display: none;\" #file1 type=\"file\" id=\"kt_account_team_size_select_2\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUpload1($event)\" />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:10px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}.p-4{padding:.85rem!important}.inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rightcorner{position:absolute;top:10px;right:16px;font-size:18px}.user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.right-bar{border-radius:8px;border:1px solid var(--Gray-300, #D0D5DD)}.click-upload{color:var(--Primary-700, #009BF3)!important;font-size:14px!important;font-weight:600!important;line-height:20px;text-decoration-line:underline;text-transform:capitalize}.header-title{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.subtitle{color:var(--Gray-500, #667085);font-size:14px;font-weight:400;line-height:20px}.config-heading{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.table-header{color:var(--Gray-800, #1D2939);font-size:16px;font-weight:400;line-height:24px}.text-error{color:var(--Error-700, #B42318)!important;font-size:14px;font-weight:500;line-height:20px}.excel-error{color:var(--Error-600, #D92D20);font-size:14px;font-weight:500;line-height:20px}.error-heading{color:var(--Error-600, #D92D20);font-size:20px;font-weight:500;line-height:30px}.border-error{border:1px solid var(--Error-300, #FDA29B)!important;background:var(--Error-25, #FFFBFA)!important}.popup-card{border-radius:6px;border:1px solid var(--Gray-300, #D0D5DD);background:#fff;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.popup-scroll{min-height:auto;max-height:400px;overflow-y:auto}\n"] }]
|
|
4434
|
+
}], ctorParameters: () => [{ type: i1$1.NgbModal }, { type: i2.PageInfoService }, { type: i0.ChangeDetectorRef }, { type: ExcelService }, { type: i2.GlobalStateService }, { type: i4.ToastService }, { type: UserService }, { type: i3.Router }, { type: i3.ActivatedRoute }], propDecorators: { dataToParent: [{
|
|
4225
4435
|
type: Output
|
|
4226
4436
|
}], bulkUpload: [{
|
|
4227
4437
|
type: ViewChild,
|
|
@@ -4405,13 +4615,13 @@ class UsersListComponent {
|
|
|
4405
4615
|
this.userCount = data; // Store data from the child
|
|
4406
4616
|
this.dataToParent.emit(this.userCount);
|
|
4407
4617
|
}
|
|
4408
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UsersListComponent, deps: [{ token: i4.ToastService }, { token: i3
|
|
4618
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UsersListComponent, deps: [{ token: i4.ToastService }, { token: i3.Router }, { token: i1$1.NgbModal }, { token: UserService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4409
4619
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: UsersListComponent, selector: "lib-users-list", outputs: { dataToParent: "dataToParent" }, viewQueries: [{ propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true }], ngImport: i0, template: "\r\n <div *ngIf=\"userListData === 0\" class=\"card-body d-flex flex-center flex-column p-9\">\r\n \r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#D1FADF\" />\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#ECFDF3\" stroke-width=\"8\" />\r\n <path\r\n d=\"M28 24V32M24 28H32M38 28C38 33.5228 33.5228 38 28 38C22.4772 38 18 33.5228 18 28C18 22.4772 22.4772 18 28 18C33.5228 18 38 22.4772 38 28Z\"\r\n stroke=\"#039855\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n \r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bolder mb-0 title cursor-pointer\"> Upload to add users </a>\r\n \r\n <div class=\"fw-bold text-gray-500 my-6\">\r\n <ul class=\"text-gray-400 fw-bold fs-6\">\r\n <!-- <li class=\"user-text\">Use the template to upload multiple users at once.</li> -->\r\n <li class=\"user-text my-3\"><span class=\"user-text\">Download the template here - </span>\r\n <a class=\"ms-1\" href=\"../../../assets/files/UsersTemplate.xlsx\" download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text my-3\">Add your data to the Template File</li>\r\n <li class=\"user-text my-3\">Upload it below for processing</li>\r\n \r\n </ul>\r\n </div>\r\n <div class=\"d-flex flex-center flex-wrap mb-5\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal\"\r\n (change)=\"onUpload($event)\" value=\"personal\" class=\"btn-check\" ng-reflect-name=\"accountType\"\r\n ng-reflect-form-control-name=\"accountType\" ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_create_account_form_account_type_personal\"\r\n class=\"btn btn-outline bg-primary btn-outline-default rounded-3 w-100 p-4 mt-5\"><span\r\n class=\"fw-bold fs-4\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\"\r\n fill=\"none\">\r\n <path\r\n d=\"M18 12.5V15.8333C18 16.2754 17.8244 16.6993 17.5118 17.0118C17.1993 17.3244 16.7754 17.5 16.3333 17.5H4.66667C4.22464 17.5 3.80072 17.3244 3.48816 17.0118C3.17559 16.6993 3 16.2754 3 15.8333V12.5M14.6667 6.66667L10.5 2.5M10.5 2.5L6.33333 6.66667M10.5 2.5V12.5\"\r\n stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> <span class=\"text-white mx-2 single-user\">Add Multiple Users</span></span>\r\n </label>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"mx-2 orval\">Or </span>\r\n </p>\r\n <input type=\"radio\" id=\"kt_account_team_size_select_1\" value=\"1-1\" (click)=\"addSingleUser()\"\r\n class=\"btn-check ng-untouched ng-pristine ng-valid\" />\r\n <label for=\"kt_account_team_size_select_1\"\r\n class=\"btn btn-outline btn-outline-default rounded-3 w-100 p-4 mt-3\"><span class=\"fw-bold fs-4\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\" fill=\"none\">\r\n <path\r\n d=\"M17.1663 17.5V15.8333C17.1663 14.9493 16.8152 14.1014 16.19 13.4763C15.5649 12.8512 14.7171 12.5 13.833 12.5H7.16634C6.28229 12.5 5.43444 12.8512 4.80932 13.4763C4.1842 14.1014 3.83301 14.9493 3.83301 15.8333V17.5M13.833 5.83333C13.833 7.67428 12.3406 9.16667 10.4997 9.16667C8.65873 9.16667 7.16634 7.67428 7.16634 5.83333C7.16634 3.99238 8.65873 2.5 10.4997 2.5C12.3406 2.5 13.833 3.99238 13.833 5.83333Z\"\r\n stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"mx-2 single-user fw-bold\">Add Single User</span></span></label>\r\n \r\n </div>\r\n </div>\r\n\r\n<lib-brand-user *ngIf=\"userListData !== 0\" (dataToParent)=\"receiveData($event)\"></lib-brand-user>\r\n", styles: [".user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.template{color:var(--Primary-700, #009BF3)!important;font-size:14px!important;font-weight:600;line-height:20px;text-transform:capitalize}td{padding:16px 24px!important;line-height:36px!important}.inputcheck input[type=checkbox]{width:20px!important;height:20px!important;margin:2px;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BrandUserComponent, selector: "lib-brand-user", outputs: ["dataToParent"] }] });
|
|
4410
4620
|
}
|
|
4411
4621
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UsersListComponent, decorators: [{
|
|
4412
4622
|
type: Component,
|
|
4413
4623
|
args: [{ selector: 'lib-users-list', template: "\r\n <div *ngIf=\"userListData === 0\" class=\"card-body d-flex flex-center flex-column p-9\">\r\n \r\n <div class=\"my-5\">\r\n <div class=\"symbol symbol-75px symbol-circle\">\r\n <svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#D1FADF\" />\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#ECFDF3\" stroke-width=\"8\" />\r\n <path\r\n d=\"M28 24V32M24 28H32M38 28C38 33.5228 33.5228 38 28 38C22.4772 38 18 33.5228 18 28C18 22.4772 22.4772 18 28 18C33.5228 18 38 22.4772 38 28Z\"\r\n stroke=\"#039855\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n \r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bolder mb-0 title cursor-pointer\"> Upload to add users </a>\r\n \r\n <div class=\"fw-bold text-gray-500 my-6\">\r\n <ul class=\"text-gray-400 fw-bold fs-6\">\r\n <!-- <li class=\"user-text\">Use the template to upload multiple users at once.</li> -->\r\n <li class=\"user-text my-3\"><span class=\"user-text\">Download the template here - </span>\r\n <a class=\"ms-1\" href=\"../../../assets/files/UsersTemplate.xlsx\" download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text my-3\">Add your data to the Template File</li>\r\n <li class=\"user-text my-3\">Upload it below for processing</li>\r\n \r\n </ul>\r\n </div>\r\n <div class=\"d-flex flex-center flex-wrap mb-5\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal\"\r\n (change)=\"onUpload($event)\" value=\"personal\" class=\"btn-check\" ng-reflect-name=\"accountType\"\r\n ng-reflect-form-control-name=\"accountType\" ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_create_account_form_account_type_personal\"\r\n class=\"btn btn-outline bg-primary btn-outline-default rounded-3 w-100 p-4 mt-5\"><span\r\n class=\"fw-bold fs-4\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\"\r\n fill=\"none\">\r\n <path\r\n d=\"M18 12.5V15.8333C18 16.2754 17.8244 16.6993 17.5118 17.0118C17.1993 17.3244 16.7754 17.5 16.3333 17.5H4.66667C4.22464 17.5 3.80072 17.3244 3.48816 17.0118C3.17559 16.6993 3 16.2754 3 15.8333V12.5M14.6667 6.66667L10.5 2.5M10.5 2.5L6.33333 6.66667M10.5 2.5V12.5\"\r\n stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> <span class=\"text-white mx-2 single-user\">Add Multiple Users</span></span>\r\n </label>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"mx-2 orval\">Or </span>\r\n </p>\r\n <input type=\"radio\" id=\"kt_account_team_size_select_1\" value=\"1-1\" (click)=\"addSingleUser()\"\r\n class=\"btn-check ng-untouched ng-pristine ng-valid\" />\r\n <label for=\"kt_account_team_size_select_1\"\r\n class=\"btn btn-outline btn-outline-default rounded-3 w-100 p-4 mt-3\"><span class=\"fw-bold fs-4\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\" fill=\"none\">\r\n <path\r\n d=\"M17.1663 17.5V15.8333C17.1663 14.9493 16.8152 14.1014 16.19 13.4763C15.5649 12.8512 14.7171 12.5 13.833 12.5H7.16634C6.28229 12.5 5.43444 12.8512 4.80932 13.4763C4.1842 14.1014 3.83301 14.9493 3.83301 15.8333V17.5M13.833 5.83333C13.833 7.67428 12.3406 9.16667 10.4997 9.16667C8.65873 9.16667 7.16634 7.67428 7.16634 5.83333C7.16634 3.99238 8.65873 2.5 10.4997 2.5C12.3406 2.5 13.833 3.99238 13.833 5.83333Z\"\r\n stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"mx-2 single-user fw-bold\">Add Single User</span></span></label>\r\n \r\n </div>\r\n </div>\r\n\r\n<lib-brand-user *ngIf=\"userListData !== 0\" (dataToParent)=\"receiveData($event)\"></lib-brand-user>\r\n", styles: [".user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.template{color:var(--Primary-700, #009BF3)!important;font-size:14px!important;font-weight:600;line-height:20px;text-transform:capitalize}td{padding:16px 24px!important;line-height:36px!important}.inputcheck input[type=checkbox]{width:20px!important;height:20px!important;margin:2px;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}\n"] }]
|
|
4414
|
-
}], ctorParameters: () => [{ type: i4.ToastService }, { type: i3
|
|
4624
|
+
}], ctorParameters: () => [{ type: i4.ToastService }, { type: i3.Router }, { type: i1$1.NgbModal }, { type: UserService }], propDecorators: { inputFile: [{
|
|
4415
4625
|
type: ViewChild,
|
|
4416
4626
|
args: ["inputFile"]
|
|
4417
4627
|
}], dataToParent: [{
|
|
@@ -4605,8 +4815,6 @@ class ViewteamsListComponent {
|
|
|
4605
4815
|
loadTable() {
|
|
4606
4816
|
this.loading = true;
|
|
4607
4817
|
this.noData = false;
|
|
4608
|
-
// this.pagination.offset=1;
|
|
4609
|
-
// this.pagination.limit =10;
|
|
4610
4818
|
this.pagination.totalCount = 0;
|
|
4611
4819
|
this.userService.getviewteamsList(this.reqdata).pipe(takeUntil(this.destroy$)).subscribe((res) => {
|
|
4612
4820
|
if (res && res.code === 200) {
|
|
@@ -4624,7 +4832,7 @@ class ViewteamsListComponent {
|
|
|
4624
4832
|
else {
|
|
4625
4833
|
this.paginationSizes = [10, 20, 30];
|
|
4626
4834
|
}
|
|
4627
|
-
this.noData = false;
|
|
4835
|
+
this.noData = res?.data?.result?.length < 1 ? true : false;
|
|
4628
4836
|
this.loading = false;
|
|
4629
4837
|
}
|
|
4630
4838
|
else {
|
|
@@ -4753,11 +4961,11 @@ class ViewteamsListComponent {
|
|
|
4753
4961
|
});
|
|
4754
4962
|
}
|
|
4755
4963
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ViewteamsListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: ManageUsersService }, { token: i2.GlobalStateService }, { token: ExcelService }, { token: i1$1.NgbModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
4756
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ViewteamsListComponent, selector: "lib-viewteams-list", inputs: { teamData: "teamData" }, ngImport: i0, template: "<div *ngIf=\"viewTeams\" class=\"card border-0 p-5\">\r\n <div class=\"card-header border-0 px-0\">\r\n <h3 class=\"card-title align-items-start d-flex align-items-center\">\r\n <span class=\"cursor-pointer\" (click)=\"backteamsList()\"> <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g filter=\"url(#filter0_d_1029_22185)\">\r\n <rect x=\"2\" y=\"1\" width=\"44\" height=\"44\" rx=\"8\" fill=\"white\" />\r\n <rect x=\"2.5\" y=\"1.5\" width=\"43\" height=\"43\" rx=\"7.5\" stroke=\"#D0D5DD\" />\r\n <path d=\"M29.8334 22.9998H18.1667M18.1667 22.9998L24 28.8332M18.1667 22.9998L24 17.1665\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <filter id=\"filter0_d_1029_22185\" x=\"0\" y=\"0\" width=\"48\" height=\"48\"\r\n filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\r\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\r\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\"\r\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\" />\r\n <feOffset dy=\"1\" />\r\n <feGaussianBlur stdDeviation=\"1\" />\r\n <feColorMatrix type=\"matrix\"\r\n values=\"0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0\" />\r\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_1029_22185\" />\r\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow_1029_22185\"\r\n result=\"shape\" />\r\n </filter>\r\n </defs>\r\n </svg></span>\r\n <div class=\"ms-3\">\r\n <div class=\"card-label mb-2\">{{teamData?.teamName}}</div>\r\n <div class=\"text-sub mb-2\">{{pagination?.totalCount ? pagination?.totalCount :'0'}} total users</div>\r\n </div>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n\r\n <button *ngIf=\"!loading && !noData\" type=\"button\"\r\n (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n <button *ngIf=\"!loading && !noData && (gs.userAccess |async)?.Global_User_isEdit\" class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\" \r\n (click)=\"Configure()\">Configure</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-0 px-0 d-flex\" *ngIf=\"leadData?.length\">\r\n <div class=\"d-flex mt-5 mx-5 w-100 overflow-auto\">\r\n <div class=\"p-3 pt-7 text-nowrap\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"users\">\r\n <path id=\"Icon\"\r\n d=\"M17 21V19C17 17.9391 16.5786 16.9217 15.8284 16.1716C15.0783 15.4214 14.0609 15 13 15H5C3.93913 15 2.92172 15.4214 2.17157 16.1716C1.42143 16.9217 1 17.9391 1 19V21M23 21V19C22.9993 18.1137 22.7044 17.2528 22.1614 16.5523C21.6184 15.8519 20.8581 15.3516 20 15.13M16 3.13C16.8604 3.3503 17.623 3.8507 18.1676 4.55231C18.7122 5.25392 19.0078 6.11683 19.0078 7.005C19.0078 7.89317 18.7122 8.75608 18.1676 9.45769C17.623 10.1593 16.8604 10.6597 16 10.88M13 7C13 9.20914 11.2091 11 9 11C6.79086 11 5 9.20914 5 7C5 4.79086 6.79086 3 9 3C11.2091 3 13 4.79086 13 7Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n <span class=\"heading ms-2\">Lead By</span>\r\n </div>\r\n <div class=\"btn btn-default btn-outline btn-outline-default rounded-3 text-nowrap border-val1 ms-4\"\r\n *ngFor=\"let obj of leadData\">\r\n <span class=\"heading \">{{obj.userName}}</span>\r\n <span *ngIf=\"obj?.role\" class=\"blue-badge ms-2\">{{obj?.role | titlecase}}</span>\r\n <div class=\"sub-header mt-2\">{{getMaskedValue(obj.email,users?.role)}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0 mt-10\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <!-- <th class=\"cursor-pointer\"><span class=\"inputcheck\"><input type=\"checkbox\"\r\n class=\"cursor-pointer\"></span>\r\n\r\n </th> -->\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Username\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'userName' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'email' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'mobileNumber' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('role')\">Roles\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'role' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('assignedStores')\">Stores Assigned\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'assignedStores' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'assignedStores' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('clusterCount')\">Clusters\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'clusterCount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'clusterCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('teamCount')\">Teams\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'teamCount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'teamCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n <!-- <th class=\"cursor-pointer\" (click)=\"onSort('description')\">Assigned Type\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'description' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'description' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th> -->\r\n <!-- <th style=\"line-height: 21px !important;\">Actions</th> -->\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of viewteamsList;let i=index;\">\r\n <tr>\r\n <!-- <td><span class=\"inputcheck\"><input type=\"checkbox\" class=\"cursor-pointer mt-2\"></span></td> -->\r\n <td>{{user?.userName}}</td>\r\n <td>{{getMaskedValue(user?.email,users.role)}}</td>\r\n <td>{{getMaskedMobile(user?.mobileNumber,users.role)}}</td>\r\n <td>{{user?.role |titlecase}}</td>\r\n <td>{{user?.assignedStores}}</td>\r\n <td>{{user?.clusterCount}}</td>\r\n <td>{{user?.teamCount}}</td>\r\n <td>\r\n <div class=\"d-flex\" (click)=\"Viewusers('view',user)\">\r\n <span class=\"cursor-pointer\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10C0.833374 10 4.16671 3.33334 10 3.33334C15.8334 3.33334 19.1667 10 19.1667 10C19.1667 10 15.8334 16.6667 10 16.6667C4.16671 16.6667 0.833374 10 0.833374 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5C11.3808 12.5 12.5 11.3807 12.5 10C12.5 8.6193 11.3808 7.50001 10 7.50001C8.61933 7.50001 7.50004 8.6193 7.50004 10C7.50004 11.3807 8.61933 12.5 10 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n </div>\r\n </td>\r\n <!-- <td>store</td> -->\r\n <!-- <td>\r\n <span class=\"me-3 cursor-pointer\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10.0002C0.833374 10.0002 4.16671 3.3335 10 3.3335C15.8334 3.3335 19.1667 10.0002 19.1667 10.0002C19.1667 10.0002 15.8334 16.6668 10 16.6668C4.16671 16.6668 0.833374 10.0002 0.833374 10.0002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5002C11.3808 12.5002 12.5 11.3809 12.5 10.0002C12.5 8.61945 11.3808 7.50016 10 7.50016C8.61933 7.50016 7.50004 8.61945 7.50004 10.0002C7.50004 11.3809 8.61933 12.5002 10 12.5002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </span>\r\n\r\n </td> -->\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"viewteamsList.length!==0\" [itemsPerPage]=\"pagination.limit\"\r\n [currentPage]=\"pagination.offset\" [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\"\r\n [pageSize]=\"paginationSize()\" (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <!-- <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"noData\" class=\"row \">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata.svg\" alt=\"\">\r\n </div>\r\n </div>\r\n </div> -->\r\n</div>", styles: [".img-src{width:25%;height:20%}.inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}.heading{color:var(--Gray-700, #344054);font-family:Inter;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.sub-header{color:var(--Gray-500, #667085);text-align:left;font-family:Inter;font-size:12px;font-style:normal;font-weight:500;line-height:18px}.bg-colr{background-color:#f2f4f7}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rotate{rotate:180deg;transition:1s}.overflow-auto{overflow-x:auto}.blue-badge{color:#009bf3;font-size:12px;font-weight:500;line-height:18px;border-radius:16px;background:#eaf8ff;padding:2px 8px}.border-val1{cursor:auto}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "component", type: i4.FiltersComponent, selector: "lib-filters", inputs: ["dataObject"], outputs: ["appliedFilters"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }] });
|
|
4964
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ViewteamsListComponent, selector: "lib-viewteams-list", inputs: { teamData: "teamData" }, ngImport: i0, template: "<div *ngIf=\"viewTeams\" class=\"card border-0 p-5\">\r\n <div class=\"card-header border-0 px-0\">\r\n <h3 class=\"card-title align-items-start d-flex align-items-center\">\r\n <span class=\"cursor-pointer\" (click)=\"backteamsList()\"> <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g filter=\"url(#filter0_d_1029_22185)\">\r\n <rect x=\"2\" y=\"1\" width=\"44\" height=\"44\" rx=\"8\" fill=\"white\" />\r\n <rect x=\"2.5\" y=\"1.5\" width=\"43\" height=\"43\" rx=\"7.5\" stroke=\"#D0D5DD\" />\r\n <path d=\"M29.8334 22.9998H18.1667M18.1667 22.9998L24 28.8332M18.1667 22.9998L24 17.1665\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <filter id=\"filter0_d_1029_22185\" x=\"0\" y=\"0\" width=\"48\" height=\"48\"\r\n filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\r\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\r\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\"\r\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\" />\r\n <feOffset dy=\"1\" />\r\n <feGaussianBlur stdDeviation=\"1\" />\r\n <feColorMatrix type=\"matrix\"\r\n values=\"0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0\" />\r\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_1029_22185\" />\r\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow_1029_22185\"\r\n result=\"shape\" />\r\n </filter>\r\n </defs>\r\n </svg></span>\r\n <div class=\"ms-3\">\r\n <div class=\"card-label mb-2\">{{teamData?.teamName}}</div>\r\n <div class=\"text-sub mb-2\">{{pagination?.totalCount ? pagination?.totalCount :'0'}} total users</div>\r\n </div>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n\r\n <button *ngIf=\"!loading && !noData\" type=\"button\"\r\n (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n <button *ngIf=\"!loading && (!noData || leadData?.length > 0) && (gs.userAccess |async)?.Global_User_isEdit\" class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\" \r\n (click)=\"Configure()\">Configure</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-0 px-0 d-flex\" *ngIf=\"leadData?.length\">\r\n <div class=\"d-flex mt-5 mx-5 w-100 overflow-auto\">\r\n <div class=\"p-3 pt-7 text-nowrap\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"users\">\r\n <path id=\"Icon\"\r\n d=\"M17 21V19C17 17.9391 16.5786 16.9217 15.8284 16.1716C15.0783 15.4214 14.0609 15 13 15H5C3.93913 15 2.92172 15.4214 2.17157 16.1716C1.42143 16.9217 1 17.9391 1 19V21M23 21V19C22.9993 18.1137 22.7044 17.2528 22.1614 16.5523C21.6184 15.8519 20.8581 15.3516 20 15.13M16 3.13C16.8604 3.3503 17.623 3.8507 18.1676 4.55231C18.7122 5.25392 19.0078 6.11683 19.0078 7.005C19.0078 7.89317 18.7122 8.75608 18.1676 9.45769C17.623 10.1593 16.8604 10.6597 16 10.88M13 7C13 9.20914 11.2091 11 9 11C6.79086 11 5 9.20914 5 7C5 4.79086 6.79086 3 9 3C11.2091 3 13 4.79086 13 7Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n <span class=\"heading ms-2\">Lead By</span>\r\n </div>\r\n <div class=\"btn btn-default btn-outline btn-outline-default rounded-3 text-nowrap border-val1 ms-4\"\r\n *ngFor=\"let obj of leadData\">\r\n <span class=\"heading \">{{obj.userName}}</span>\r\n <span *ngIf=\"obj?.role\" class=\"blue-badge ms-2\">{{obj?.role | titlecase}}</span>\r\n <div class=\"sub-header mt-2\">{{getMaskedValue(obj.email,users?.role)}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0 mt-10\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Username\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'userName' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'email' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'mobileNumber' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('role')\">Roles\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'role' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('assignedStores')\">Stores Assigned\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'assignedStores' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'assignedStores' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('clusterCount')\">Clusters\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'clusterCount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'clusterCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('teamCount')\">Teams\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'teamCount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'teamCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n <!-- <th class=\"cursor-pointer\" (click)=\"onSort('description')\">Assigned Type\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'description' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'description' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th> -->\r\n <!-- <th style=\"line-height: 21px !important;\">Actions</th> -->\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of viewteamsList;let i=index;\">\r\n <tr>\r\n <!-- <td><span class=\"inputcheck\"><input type=\"checkbox\" class=\"cursor-pointer mt-2\"></span></td> -->\r\n <td>{{user?.userName}}</td>\r\n <td>{{getMaskedValue(user?.email,users.role)}}</td>\r\n <td>{{getMaskedMobile(user?.mobileNumber,users.role)}}</td>\r\n <td>{{user?.role |titlecase}}</td>\r\n <td>{{user?.assignedStores}}</td>\r\n <td>{{user?.clusterCount}}</td>\r\n <td>{{user?.teamCount}}</td>\r\n <td>\r\n <div class=\"d-flex\" (click)=\"Viewusers('view',user)\">\r\n <span class=\"cursor-pointer\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10C0.833374 10 4.16671 3.33334 10 3.33334C15.8334 3.33334 19.1667 10 19.1667 10C19.1667 10 15.8334 16.6667 10 16.6667C4.16671 16.6667 0.833374 10 0.833374 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5C11.3808 12.5 12.5 11.3807 12.5 10C12.5 8.6193 11.3808 7.50001 10 7.50001C8.61933 7.50001 7.50004 8.6193 7.50004 10C7.50004 11.3807 8.61933 12.5 10 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n </div>\r\n </td>\r\n <!-- <td>store</td> -->\r\n <!-- <td>\r\n <span class=\"me-3 cursor-pointer\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10.0002C0.833374 10.0002 4.16671 3.3335 10 3.3335C15.8334 3.3335 19.1667 10.0002 19.1667 10.0002C19.1667 10.0002 15.8334 16.6668 10 16.6668C4.16671 16.6668 0.833374 10.0002 0.833374 10.0002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5002C11.3808 12.5002 12.5 11.3809 12.5 10.0002C12.5 8.61945 11.3808 7.50016 10 7.50016C8.61933 7.50016 7.50004 8.61945 7.50004 10.0002C7.50004 11.3809 8.61933 12.5002 10 12.5002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </span>\r\n\r\n </td> -->\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"viewteamsList.length!==0\" [itemsPerPage]=\"pagination.limit\"\r\n [currentPage]=\"pagination.offset\" [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\"\r\n [pageSize]=\"paginationSize()\" (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12\">\r\n <div class=\"d-flex justify-content-center align-items-center mb-2\">\r\n <img class=\"w-10\" src=\"assets/tango/Icons/no-record.svg\" alt=\"\">\r\n </div>\r\n <div class=\"text-center\">\r\n <span class=\"heading d-flex justify-content-center align-items-center\">No Users found</span>\r\n <div class=\"sub-header1 mt-1\">To add a user to this cluster, please click the</div>\r\n <div class=\"sub-header1\">configure button above</div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".img-src{width:25%;height:20%}.inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}.heading{color:var(--Gray-700, #344054);font-family:Inter;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.sub-header{color:var(--Gray-500, #667085);text-align:left;font-family:Inter;font-size:12px;font-style:normal;font-weight:500;line-height:18px}.bg-colr{background-color:#f2f4f7}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rotate{rotate:180deg;transition:1s}.overflow-auto{overflow-x:auto}.blue-badge{color:#009bf3;font-size:12px;font-weight:500;line-height:18px;border-radius:16px;background:#eaf8ff;padding:2px 8px}.border-val1{cursor:auto}.sub-header1{color:var(--Gray-500, #667085);font-size:14px;font-weight:400;line-height:20px}.w-10{width:6%!important}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "component", type: i4.FiltersComponent, selector: "lib-filters", inputs: ["dataObject"], outputs: ["appliedFilters"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }] });
|
|
4757
4965
|
}
|
|
4758
4966
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ViewteamsListComponent, decorators: [{
|
|
4759
4967
|
type: Component,
|
|
4760
|
-
args: [{ selector: 'lib-viewteams-list', template: "<div *ngIf=\"viewTeams\" class=\"card border-0 p-5\">\r\n <div class=\"card-header border-0 px-0\">\r\n <h3 class=\"card-title align-items-start d-flex align-items-center\">\r\n <span class=\"cursor-pointer\" (click)=\"backteamsList()\"> <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g filter=\"url(#filter0_d_1029_22185)\">\r\n <rect x=\"2\" y=\"1\" width=\"44\" height=\"44\" rx=\"8\" fill=\"white\" />\r\n <rect x=\"2.5\" y=\"1.5\" width=\"43\" height=\"43\" rx=\"7.5\" stroke=\"#D0D5DD\" />\r\n <path d=\"M29.8334 22.9998H18.1667M18.1667 22.9998L24 28.8332M18.1667 22.9998L24 17.1665\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <filter id=\"filter0_d_1029_22185\" x=\"0\" y=\"0\" width=\"48\" height=\"48\"\r\n filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\r\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\r\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\"\r\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\" />\r\n <feOffset dy=\"1\" />\r\n <feGaussianBlur stdDeviation=\"1\" />\r\n <feColorMatrix type=\"matrix\"\r\n values=\"0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0\" />\r\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_1029_22185\" />\r\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow_1029_22185\"\r\n result=\"shape\" />\r\n </filter>\r\n </defs>\r\n </svg></span>\r\n <div class=\"ms-3\">\r\n <div class=\"card-label mb-2\">{{teamData?.teamName}}</div>\r\n <div class=\"text-sub mb-2\">{{pagination?.totalCount ? pagination?.totalCount :'0'}} total users</div>\r\n </div>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n\r\n <button *ngIf=\"!loading && !noData\" type=\"button\"\r\n (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n <button *ngIf=\"!loading && !noData && (gs.userAccess |async)?.Global_User_isEdit\" class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\" \r\n (click)=\"Configure()\">Configure</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-0 px-0 d-flex\" *ngIf=\"leadData?.length\">\r\n <div class=\"d-flex mt-5 mx-5 w-100 overflow-auto\">\r\n <div class=\"p-3 pt-7 text-nowrap\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"users\">\r\n <path id=\"Icon\"\r\n d=\"M17 21V19C17 17.9391 16.5786 16.9217 15.8284 16.1716C15.0783 15.4214 14.0609 15 13 15H5C3.93913 15 2.92172 15.4214 2.17157 16.1716C1.42143 16.9217 1 17.9391 1 19V21M23 21V19C22.9993 18.1137 22.7044 17.2528 22.1614 16.5523C21.6184 15.8519 20.8581 15.3516 20 15.13M16 3.13C16.8604 3.3503 17.623 3.8507 18.1676 4.55231C18.7122 5.25392 19.0078 6.11683 19.0078 7.005C19.0078 7.89317 18.7122 8.75608 18.1676 9.45769C17.623 10.1593 16.8604 10.6597 16 10.88M13 7C13 9.20914 11.2091 11 9 11C6.79086 11 5 9.20914 5 7C5 4.79086 6.79086 3 9 3C11.2091 3 13 4.79086 13 7Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n <span class=\"heading ms-2\">Lead By</span>\r\n </div>\r\n <div class=\"btn btn-default btn-outline btn-outline-default rounded-3 text-nowrap border-val1 ms-4\"\r\n *ngFor=\"let obj of leadData\">\r\n <span class=\"heading \">{{obj.userName}}</span>\r\n <span *ngIf=\"obj?.role\" class=\"blue-badge ms-2\">{{obj?.role | titlecase}}</span>\r\n <div class=\"sub-header mt-2\">{{getMaskedValue(obj.email,users?.role)}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0 mt-10\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <!-- <th class=\"cursor-pointer\"><span class=\"inputcheck\"><input type=\"checkbox\"\r\n class=\"cursor-pointer\"></span>\r\n\r\n </th> -->\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Username\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'userName' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'email' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'mobileNumber' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('role')\">Roles\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'role' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('assignedStores')\">Stores Assigned\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'assignedStores' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'assignedStores' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('clusterCount')\">Clusters\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'clusterCount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'clusterCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('teamCount')\">Teams\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'teamCount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'teamCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n <!-- <th class=\"cursor-pointer\" (click)=\"onSort('description')\">Assigned Type\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'description' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'description' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th> -->\r\n <!-- <th style=\"line-height: 21px !important;\">Actions</th> -->\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of viewteamsList;let i=index;\">\r\n <tr>\r\n <!-- <td><span class=\"inputcheck\"><input type=\"checkbox\" class=\"cursor-pointer mt-2\"></span></td> -->\r\n <td>{{user?.userName}}</td>\r\n <td>{{getMaskedValue(user?.email,users.role)}}</td>\r\n <td>{{getMaskedMobile(user?.mobileNumber,users.role)}}</td>\r\n <td>{{user?.role |titlecase}}</td>\r\n <td>{{user?.assignedStores}}</td>\r\n <td>{{user?.clusterCount}}</td>\r\n <td>{{user?.teamCount}}</td>\r\n <td>\r\n <div class=\"d-flex\" (click)=\"Viewusers('view',user)\">\r\n <span class=\"cursor-pointer\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10C0.833374 10 4.16671 3.33334 10 3.33334C15.8334 3.33334 19.1667 10 19.1667 10C19.1667 10 15.8334 16.6667 10 16.6667C4.16671 16.6667 0.833374 10 0.833374 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5C11.3808 12.5 12.5 11.3807 12.5 10C12.5 8.6193 11.3808 7.50001 10 7.50001C8.61933 7.50001 7.50004 8.6193 7.50004 10C7.50004 11.3807 8.61933 12.5 10 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n </div>\r\n </td>\r\n <!-- <td>store</td> -->\r\n <!-- <td>\r\n <span class=\"me-3 cursor-pointer\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10.0002C0.833374 10.0002 4.16671 3.3335 10 3.3335C15.8334 3.3335 19.1667 10.0002 19.1667 10.0002C19.1667 10.0002 15.8334 16.6668 10 16.6668C4.16671 16.6668 0.833374 10.0002 0.833374 10.0002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5002C11.3808 12.5002 12.5 11.3809 12.5 10.0002C12.5 8.61945 11.3808 7.50016 10 7.50016C8.61933 7.50016 7.50004 8.61945 7.50004 10.0002C7.50004 11.3809 8.61933 12.5002 10 12.5002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </span>\r\n\r\n </td> -->\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"viewteamsList.length!==0\" [itemsPerPage]=\"pagination.limit\"\r\n [currentPage]=\"pagination.offset\" [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\"\r\n [pageSize]=\"paginationSize()\" (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <!-- <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"noData\" class=\"row \">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata.svg\" alt=\"\">\r\n </div>\r\n </div>\r\n </div> -->\r\n</div>", styles: [".img-src{width:25%;height:20%}.inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}.heading{color:var(--Gray-700, #344054);font-family:Inter;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.sub-header{color:var(--Gray-500, #667085);text-align:left;font-family:Inter;font-size:12px;font-style:normal;font-weight:500;line-height:18px}.bg-colr{background-color:#f2f4f7}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rotate{rotate:180deg;transition:1s}.overflow-auto{overflow-x:auto}.blue-badge{color:#009bf3;font-size:12px;font-weight:500;line-height:18px;border-radius:16px;background:#eaf8ff;padding:2px 8px}.border-val1{cursor:auto}\n"] }]
|
|
4968
|
+
args: [{ selector: 'lib-viewteams-list', template: "<div *ngIf=\"viewTeams\" class=\"card border-0 p-5\">\r\n <div class=\"card-header border-0 px-0\">\r\n <h3 class=\"card-title align-items-start d-flex align-items-center\">\r\n <span class=\"cursor-pointer\" (click)=\"backteamsList()\"> <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g filter=\"url(#filter0_d_1029_22185)\">\r\n <rect x=\"2\" y=\"1\" width=\"44\" height=\"44\" rx=\"8\" fill=\"white\" />\r\n <rect x=\"2.5\" y=\"1.5\" width=\"43\" height=\"43\" rx=\"7.5\" stroke=\"#D0D5DD\" />\r\n <path d=\"M29.8334 22.9998H18.1667M18.1667 22.9998L24 28.8332M18.1667 22.9998L24 17.1665\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <filter id=\"filter0_d_1029_22185\" x=\"0\" y=\"0\" width=\"48\" height=\"48\"\r\n filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\r\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\r\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\"\r\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\" />\r\n <feOffset dy=\"1\" />\r\n <feGaussianBlur stdDeviation=\"1\" />\r\n <feColorMatrix type=\"matrix\"\r\n values=\"0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0\" />\r\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_1029_22185\" />\r\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow_1029_22185\"\r\n result=\"shape\" />\r\n </filter>\r\n </defs>\r\n </svg></span>\r\n <div class=\"ms-3\">\r\n <div class=\"card-label mb-2\">{{teamData?.teamName}}</div>\r\n <div class=\"text-sub mb-2\">{{pagination?.totalCount ? pagination?.totalCount :'0'}} total users</div>\r\n </div>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n <lib-filters [dataObject]=\"dataObject\" (appliedFilters)=\"applyFilters($event)\"></lib-filters>\r\n\r\n <button *ngIf=\"!loading && !noData\" type=\"button\"\r\n (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n <button *ngIf=\"!loading && (!noData || leadData?.length > 0) && (gs.userAccess |async)?.Global_User_isEdit\" class=\"btn btn-primary w-100 ms-3\" id=\"alert-toast\" \r\n (click)=\"Configure()\">Configure</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-0 px-0 d-flex\" *ngIf=\"leadData?.length\">\r\n <div class=\"d-flex mt-5 mx-5 w-100 overflow-auto\">\r\n <div class=\"p-3 pt-7 text-nowrap\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"users\">\r\n <path id=\"Icon\"\r\n d=\"M17 21V19C17 17.9391 16.5786 16.9217 15.8284 16.1716C15.0783 15.4214 14.0609 15 13 15H5C3.93913 15 2.92172 15.4214 2.17157 16.1716C1.42143 16.9217 1 17.9391 1 19V21M23 21V19C22.9993 18.1137 22.7044 17.2528 22.1614 16.5523C21.6184 15.8519 20.8581 15.3516 20 15.13M16 3.13C16.8604 3.3503 17.623 3.8507 18.1676 4.55231C18.7122 5.25392 19.0078 6.11683 19.0078 7.005C19.0078 7.89317 18.7122 8.75608 18.1676 9.45769C17.623 10.1593 16.8604 10.6597 16 10.88M13 7C13 9.20914 11.2091 11 9 11C6.79086 11 5 9.20914 5 7C5 4.79086 6.79086 3 9 3C11.2091 3 13 4.79086 13 7Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </svg>\r\n <span class=\"heading ms-2\">Lead By</span>\r\n </div>\r\n <div class=\"btn btn-default btn-outline btn-outline-default rounded-3 text-nowrap border-val1 ms-4\"\r\n *ngFor=\"let obj of leadData\">\r\n <span class=\"heading \">{{obj.userName}}</span>\r\n <span *ngIf=\"obj?.role\" class=\"blue-badge ms-2\">{{obj?.role | titlecase}}</span>\r\n <div class=\"sub-header mt-2\">{{getMaskedValue(obj.email,users?.role)}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0 mt-10\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Username\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'userName' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('email')\">Email\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'email' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'email' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('mobileNumber')\">Contact Number\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'mobileNumber' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'mobileNumber' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('role')\">Roles\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'role' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'role' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('assignedStores')\">Stores Assigned\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'assignedStores' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'assignedStores' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('clusterCount')\">Clusters\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'clusterCount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'clusterCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('teamCount')\">Teams\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'teamCount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'teamCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n <!-- <th class=\"cursor-pointer\" (click)=\"onSort('description')\">Assigned Type\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'description' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'description' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th> -->\r\n <!-- <th style=\"line-height: 21px !important;\">Actions</th> -->\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of viewteamsList;let i=index;\">\r\n <tr>\r\n <!-- <td><span class=\"inputcheck\"><input type=\"checkbox\" class=\"cursor-pointer mt-2\"></span></td> -->\r\n <td>{{user?.userName}}</td>\r\n <td>{{getMaskedValue(user?.email,users.role)}}</td>\r\n <td>{{getMaskedMobile(user?.mobileNumber,users.role)}}</td>\r\n <td>{{user?.role |titlecase}}</td>\r\n <td>{{user?.assignedStores}}</td>\r\n <td>{{user?.clusterCount}}</td>\r\n <td>{{user?.teamCount}}</td>\r\n <td>\r\n <div class=\"d-flex\" (click)=\"Viewusers('view',user)\">\r\n <span class=\"cursor-pointer\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10C0.833374 10 4.16671 3.33334 10 3.33334C15.8334 3.33334 19.1667 10 19.1667 10C19.1667 10 15.8334 16.6667 10 16.6667C4.16671 16.6667 0.833374 10 0.833374 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5C11.3808 12.5 12.5 11.3807 12.5 10C12.5 8.6193 11.3808 7.50001 10 7.50001C8.61933 7.50001 7.50004 8.6193 7.50004 10C7.50004 11.3807 8.61933 12.5 10 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n\r\n </span>\r\n </div>\r\n </td>\r\n <!-- <td>store</td> -->\r\n <!-- <td>\r\n <span class=\"me-3 cursor-pointer\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10.0002C0.833374 10.0002 4.16671 3.3335 10 3.3335C15.8334 3.3335 19.1667 10.0002 19.1667 10.0002C19.1667 10.0002 15.8334 16.6668 10 16.6668C4.16671 16.6668 0.833374 10.0002 0.833374 10.0002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5002C11.3808 12.5002 12.5 11.3809 12.5 10.0002C12.5 8.61945 11.3808 7.50016 10 7.50016C8.61933 7.50016 7.50004 8.61945 7.50004 10.0002C7.50004 11.3809 8.61933 12.5002 10 12.5002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </span>\r\n\r\n </td> -->\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"viewteamsList.length!==0\" [itemsPerPage]=\"pagination.limit\"\r\n [currentPage]=\"pagination.offset\" [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\"\r\n [pageSize]=\"paginationSize()\" (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <div class=\"col-lg-12\">\r\n <div class=\"d-flex justify-content-center align-items-center mb-2\">\r\n <img class=\"w-10\" src=\"assets/tango/Icons/no-record.svg\" alt=\"\">\r\n </div>\r\n <div class=\"text-center\">\r\n <span class=\"heading d-flex justify-content-center align-items-center\">No Users found</span>\r\n <div class=\"sub-header1 mt-1\">To add a user to this cluster, please click the</div>\r\n <div class=\"sub-header1\">configure button above</div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".img-src{width:25%;height:20%}.inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}.heading{color:var(--Gray-700, #344054);font-family:Inter;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.sub-header{color:var(--Gray-500, #667085);text-align:left;font-family:Inter;font-size:12px;font-style:normal;font-weight:500;line-height:18px}.bg-colr{background-color:#f2f4f7}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rotate{rotate:180deg;transition:1s}.overflow-auto{overflow-x:auto}.blue-badge{color:#009bf3;font-size:12px;font-weight:500;line-height:18px;border-radius:16px;background:#eaf8ff;padding:2px 8px}.border-val1{cursor:auto}.sub-header1{color:var(--Gray-500, #667085);font-size:14px;font-weight:400;line-height:20px}.w-10{width:6%!important}\n"] }]
|
|
4761
4969
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: ManageUsersService }, { type: i2.GlobalStateService }, { type: ExcelService }, { type: i1$1.NgbModal }], propDecorators: { teamData: [{
|
|
4762
4970
|
type: Input
|
|
4763
4971
|
}] } });
|
|
@@ -5150,6 +5358,9 @@ class TeamsListComponent {
|
|
|
5150
5358
|
if (element?.['Team Name'] == '' || element?.['Team Name'] == null) {
|
|
5151
5359
|
error.push(`Invalid Team Name - A${index + 2}`);
|
|
5152
5360
|
}
|
|
5361
|
+
if (element?.['Team Name'] && /[^a-zA-Z0-9 _-]/.test(element['Team Name'])) {
|
|
5362
|
+
error.push(`Special characters are not allowed in team name - A${index + 2}`);
|
|
5363
|
+
}
|
|
5153
5364
|
if (element?.['Lead Email'] == '' || element?.['Lead Email'] == null) {
|
|
5154
5365
|
error.push(`Invalid Lead Email - B${index + 2}`);
|
|
5155
5366
|
}
|
|
@@ -5385,6 +5596,11 @@ class TeamsListComponent {
|
|
|
5385
5596
|
this.afterUplload(popupcontent);
|
|
5386
5597
|
}
|
|
5387
5598
|
else if (err.error.code === 500) {
|
|
5599
|
+
this.modalService.dismissAll();
|
|
5600
|
+
this.ts.getErrorToast(err.error.error);
|
|
5601
|
+
}
|
|
5602
|
+
else {
|
|
5603
|
+
this.modalService.dismissAll();
|
|
5388
5604
|
this.ts.getErrorToast(err.error.error);
|
|
5389
5605
|
}
|
|
5390
5606
|
this.inputFile.nativeElement.value = "";
|
|
@@ -5394,13 +5610,13 @@ class TeamsListComponent {
|
|
|
5394
5610
|
closeactivepopup() {
|
|
5395
5611
|
this.modalService.dismissAll();
|
|
5396
5612
|
}
|
|
5397
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TeamsListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: ManageUsersService }, { token: ExcelService }, { token: i2.GlobalStateService }, { token: i4.ToastService }, { token: i3
|
|
5398
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TeamsListComponent, selector: "lib-teams-list", outputs: { dataTo: "dataTo" }, viewQueries: [{ propertyName: "tooltipContent", first: true, predicate: ["tooltipContent"], descendants: true }, { propertyName: "tooltipContents", first: true, predicate: ["tooltipContents"], descendants: true }, { propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true }, { propertyName: "afterValidation", first: true, predicate: ["afterValidation"], descendants: true }, { propertyName: "confirmDelete", first: true, predicate: ["confirmDelete"], descendants: true }], ngImport: i0, template: "<div>\r\n <div class=\"\" *ngIf=\"!loading && !viewTeams&&!showcreatebutton\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n </h3>\r\n <div class=\"card-toolbar rightcorner\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1 \">\r\n <span *ngIf=\"!selectedUsers?.length\" class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input *ngIf=\"!selectedUsers?.length\" type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n\r\n\r\n <button *ngIf=\"!loading && !noData&& !selectedUsers?.length \" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline px-4 py-3 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n\r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd && teamsList.length>0 && !selectedUsers?.length\" type=\"button\" (click)=\"openTeam()\" class=\"btn btn-sm py-3 btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n <div *ngIf=\"selectedUsers?.length\" class=\"btn-delete cursor-pointer px-5 mx-2 rounded-3 text-nowrap\" (click)=\"DeleteAllTeam()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M2.5 4.99996H4.16667M4.16667 4.99996H17.5M4.16667 4.99996V16.6666C4.16667 17.1087 4.34226 17.5326 4.65482 17.8451C4.96738 18.1577 5.39131 18.3333 5.83333 18.3333H14.1667C14.6087 18.3333 15.0326 18.1577 15.3452 17.8451C15.6577 17.5326 15.8333 17.1087 15.8333 16.6666V4.99996H4.16667ZM6.66667 4.99996V3.33329C6.66667 2.89127 6.84226 2.46734 7.15482 2.15478C7.46738 1.84222 7.89131 1.66663 8.33333 1.66663H11.6667C12.1087 1.66663 12.5326 1.84222 12.8452 2.15478C13.1577 2.46734 13.3333 2.89127 13.3333 3.33329V4.99996M8.33333 9.16663V14.1666M11.6667 9.16663V14.1666\" stroke=\"#B42318\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"ms-2\">Delete All</span>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"card-header border-0 pt-3 left-move\">\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1 \">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n\r\n\r\n <button *ngIf=\"!loading && !noData \" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n\r\n <button type=\"button\" (click)=\"createTeam()\" class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <div *ngIf=\"!loading && !noData && !viewTeams&&teamsList.length>0\" class=\"card-body p-0\">\r\n <div *ngIf=\"selectedUsers?.length\" class=\"alert-box\">\r\n <span><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"37\" height=\"36\" viewBox=\"0 0 37 36\" fill=\"none\">\r\n <rect x=\"2.5\" y=\"2\" width=\"32\" height=\"32\" rx=\"16\" fill=\"#DAF1FF\"/>\r\n <rect x=\"2.5\" y=\"2\" width=\"32\" height=\"32\" rx=\"16\" stroke=\"#EAF8FF\" stroke-width=\"4\"/>\r\n <g clip-path=\"url(#clip0_12293_6263)\">\r\n <path d=\"M25.1666 17.3866V18C25.1658 19.4376 24.7003 20.8364 23.8395 21.9878C22.9787 23.1393 21.7688 23.9816 20.3902 24.3892C19.0115 24.7968 17.5381 24.7479 16.1896 24.2497C14.841 23.7515 13.6897 22.8307 12.9072 21.6247C12.1248 20.4186 11.7531 18.992 11.8477 17.5575C11.9423 16.123 12.4981 14.7575 13.4321 13.6647C14.3662 12.5718 15.6284 11.8102 17.0307 11.4934C18.433 11.1766 19.9001 11.3215 21.2133 11.9066M25.1666 12.6666L18.4999 19.34L16.4999 17.34\" stroke=\"#00A3FF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_12293_6263\">\r\n <rect width=\"16\" height=\"16\" fill=\"white\" transform=\"translate(10.5 10)\"/>\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n <span><span>{{selectedUsers.length === teamsList.length ? 'All ' : 'Totally '}}</span>{{selectedUsers.length}} {{ selectedUsers.length > 1 ? 'Clusters' : 'Cluster'}} on this page are selected.</span><span *ngIf=\"!clustersAllselect || getCheckedClusterCount(this.clustersAllselect) < pagination.totalCount\" class=\"selectAll\" (click)=\"selectAllClusters('selectAll')\">Select all {{pagination.totalCount}} Clusters filtered</span>\r\n <span *ngIf=\"clustersAllselect && getCheckedClusterCount(this.clustersAllselect) === pagination.totalCount\" class=\"selectAll\" (click)=\"selectAllClusters('unselect')\">Unselect all {{pagination.totalCount}} Clusters filtered</span>\r\n <span></span>\r\n </div>\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" class=\"cursor-pointer\"><span class=\"inputcheck\"><input type=\"checkbox\" (click)=\"onSelectAll()\" [(ngModel)]=\"selectAllChecked\"\r\n class=\"cursor-pointer\"></span>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('teamName')\">Team Name\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'teamName' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'teamName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userscount')\">Users\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'userscount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'userscount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Lead Name\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Lead Email\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('description')\">Description\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'description' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'description' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of teamsList;let i=index;\">\r\n <tr>\r\n <td *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\"><span class=\"inputcheck\"><input type=\"checkbox\" class=\"cursor-pointer mt-2\" [(ngModel)]=\"user.isChecked\" (click)=\"onSelectedTeam(user,i)\"></span></td>\r\n <td>{{user?.teamName}}</td>\r\n <td>{{user?.userscount}}</td>\r\n <td><div class=\"mx-2\">\r\n <div class=\"table-title\">\r\n <span class=\"camerastatus\">\r\n <span>\r\n {{ user?.leadName[0]?user?.leadName[0]:\"--\" }}\r\n </span>\r\n <span *ngIf=\"user?.leadName.length > 1\">\r\n +{{ user.leadName.length - 1 }}\r\n </span>\r\n </span>\r\n\r\n </div>\r\n </div></td>\r\n <td>\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"symbol symbol-35px symbol-circle\">\r\n <span class=\"symbol-label badge-light-primary text-symbol\" *ngIf=\"user?.leademail.length>0\">\r\n <span class=\"text-primary fs-4 badge badge-light-primary fw-normal\">\r\n {{ user?.leademail[0]?.substring(0, 2) | uppercase }}\r\n </span>\r\n </span>\r\n </div>\r\n <div class=\"mx-2\">\r\n <div class=\"table-title\">\r\n <span class=\"camerastatus\">\r\n <span>\r\n {{ getMaskedValue(user?.leademail[0] ,users?.role) }}\r\n </span>\r\n <span *ngIf=\"user?.leademail.length > 1\">\r\n +{{ user.leademail.length - 1 }}\r\n </span>\r\n </span>\r\n\r\n </div>\r\n </div>\r\n <span *ngIf=\"user?.Teamleadcount>0\">+{{user?.Teamleadcount}}</span>\r\n </div>\r\n </td>\r\n <td class=\"description\">{{user?.description ? user?.description : \"--\"}}</td>\r\n <td>\r\n <span class=\"me-3 cursor-pointer\" (click)=\"viewTeamsdata(user)\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10.0002C0.833374 10.0002 4.16671 3.3335 10 3.3335C15.8334 3.3335 19.1667 10.0002 19.1667 10.0002C19.1667 10.0002 15.8334 16.6668 10 16.6668C4.16671 16.6668 0.833374 10.0002 0.833374 10.0002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5002C11.3808 12.5002 12.5 11.3809 12.5 10.0002C12.5 8.61945 11.3808 7.50016 10 7.50016C8.61933 7.50016 7.50004 8.61945 7.50004 10.0002C7.50004 11.3809 8.61933 12.5002 10 12.5002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </span>\r\n <span *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" class=\"me-3 cursor-pointer\" (click)=\"editTeamsdata(user)\">\r\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g clip-path=\"url(#clip0_2181_11160)\">\r\n <path\r\n d=\"M24.1666 12.4999C24.3855 12.2811 24.6453 12.1074 24.9313 11.989C25.2173 11.8705 25.5238 11.8096 25.8333 11.8096C26.1428 11.8096 26.4493 11.8705 26.7353 11.989C27.0213 12.1074 27.2811 12.2811 27.5 12.4999C27.7188 12.7188 27.8924 12.9786 28.0109 13.2646C28.1294 13.5506 28.1903 13.8571 28.1903 14.1666C28.1903 14.4761 28.1294 14.7826 28.0109 15.0686C27.8924 15.3546 27.7188 15.6144 27.5 15.8333L16.25 27.0833L11.6666 28.3333L12.9166 23.7499L24.1666 12.4999Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_2181_11160\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(10 10)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n <span *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" class=\"cursor-pointer\" (click)=\"deleteTeam(user)\">\r\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M12.5 14.9998H14.1667M14.1667 14.9998H27.5M14.1667 14.9998V26.6665C14.1667 27.1085 14.3423 27.5325 14.6548 27.845C14.9674 28.1576 15.3913 28.3332 15.8333 28.3332H24.1667C24.6087 28.3332 25.0326 28.1576 25.3452 27.845C25.6577 27.5325 25.8333 27.1085 25.8333 26.6665V14.9998H14.1667ZM16.6667 14.9998V13.3332C16.6667 12.8911 16.8423 12.4672 17.1548 12.1547C17.4674 11.8421 17.8913 11.6665 18.3333 11.6665H21.6667C22.1087 11.6665 22.5326 11.8421 22.8452 12.1547C23.1577 12.4672 23.3333 12.8911 23.3333 13.3332V14.9998M18.3333 19.1665V24.1665M21.6667 19.1665V24.1665\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData && !viewTeams&&teamsList.length>0\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"teamsList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"noData&&!showcreatebutton\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata.svg\" alt=\"\">\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"card-body d-flex flex-center flex-column p-9\" *ngIf=\"showcreatebutton\">\r\n <div class=\"mb-5\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#D1FADF\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#ECFDF3\" stroke-width=\"8\"/>\r\n <path d=\"M28 24V32M24 28H32M38 28C38 33.5228 33.5228 38 28 38C22.4772 38 18 33.5228 18 28C18 22.4772 22.4772 18 28 18C33.5228 18 38 22.4772 38 28Z\" stroke=\"#039855\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bolder mb-0 title cursor-pointer\"> Add teams </a>\r\n <div class=\"fw-bold text-gray-800 my-6\">\r\n <ul class=\"custom-ordered-list text-gray-800 fw-bold fs-6\">\r\n <li class=\"user-text mb-2\">Use the template to upload multiple Teams at once.</li>\r\n <li class=\"user-text mb-2\">Download the template here -\r\n <a href=\"./../../assets/files/teamsBulkUploadTemplate.xlsx\" download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text mb-2\">Add your data to the Template File</li>\r\n <li class=\"user-text mb-2\">Upload it below for processing</li>\r\n </ul>\r\n </div>\r\n <div class=\"d-flex flex-center flex-column mb-5\" style=\"width: 57% !important;\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\" value=\"personal\"\r\n class=\"btn-check\" ng-reflect-name=\"accountType\" ng-reflect-form-control-name=\"accountType\"\r\n (change)=\"onUpload($event)\"\r\n ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_create_account_form_account_type_personal\"\r\n class=\"btn btn-outline btn-primary bg-primary btn-outline-default rounded-3 w-50 p-4 mt-5\"><span\r\n class=\"fw-bold fs-4\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\"\r\n fill=\"none\">\r\n <path\r\n d=\"M18 12.5V15.8333C18 16.2754 17.8244 16.6993 17.5118 17.0118C17.1993 17.3244 16.7754 17.5 16.3333 17.5H4.66667C4.22464 17.5 3.80072 17.3244 3.48816 17.0118C3.17559 16.6993 3 16.2754 3 15.8333V12.5M14.6667 6.66667L10.5 2.5M10.5 2.5L6.33333 6.66667M10.5 2.5V12.5\"\r\n stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> \r\n <span class=\"text-white mx-2\">Upload To Add Multiple Teams</span></span>\r\n </label>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"line-bg \"><svg width=\"224\" height=\"2\" viewBox=\"0 0 124 2\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"123.333\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span><span class=\"mx-2\">Or </span> <span class=\"line-bg \"><svg width=\"224\" height=\"2\" viewBox=\"0 0 124 2\"\r\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"123.333\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span>\r\n </p>\r\n <input type=\"radio\" id=\"kt_account_team_size_select_1\" value=\"1-1\" (click)=\"createTeam()\"\r\n class=\"btn-check ng-untouched ng-pristine ng-valid\" />\r\n <label for=\"kt_account_team_size_select_1\"\r\n class=\"btn btn-outline btn-outline-default rounded-3 w-50 p-4 mt-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M9.99984 4.16675V15.8334M4.1665 10.0001H15.8332\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"fw-bold fs-4 mx-2\">\r\n Add Single Team</span></label>\r\n </div>\r\n \r\n \r\n</div>\r\n</div>\r\n\r\n<div *ngIf=\"viewTeams && !showcreatebutton\">\r\n <lib-viewteams-list [teamData]=\"this.selectedTeam\"></lib-viewteams-list>\r\n</div>\r\n\r\n<ng-template #afterValidation let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"card-title mt-3\"><span class=\"config-heading fw-semibold w-auto\">Add Teams</span></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{getStoreCounts(excelData)}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Total Records</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{excelData?.length}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Rows processed</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div [ngClass]=\"excelError?.error?.length \r\n ? 'fw-semibold text-error w-100 error-heading' \r\n : 'fw-semibold w-100 config-heading'\">\r\n {{ excelError?.error?.length || 0 }}\r\n </div>\r\n <div [ngClass]=\"excelError?.error?.length \r\n ? 'fw-semibold text-error mt-1 excel-error' \r\n : 'fw-semibold subtitle mt-1'\">\r\n Error\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!excelError?.error?.length\" class=\"table-header mt-5\" style=\"font-weight: 400;\">\r\n <div >You're about to add {{getStoreCounts(excelData)}} {{getStoreCounts(excelData) >1 ?'Teams':'Team'}}. Are you sure want to proceed?</div>\r\n \r\n </div>\r\n <div *ngIf=\"excelError?.error?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Invalid Details !</div>\r\n <div class=\"subtitle mt-5\">Please provide correct information.</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of excelError?.error; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.doesNotExists?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Data not exists !</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.doesNotExists; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.inActive?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Data inactive !</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.inActive; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify-content-end flex-wrap gap-2 pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline\" (click)=\"closeactivepopup()\">Cancel</button>\r\n <button *ngIf=\"!excelError?.error?.length\" class=\"btn btn-md py-3 btn-default ms-3 btn-primary\" (click)=\"validateDetails()\">Proceed</button>\r\n <button *ngIf=\"excelError?.error?.length\" class=\"btn py-3 btn-md btn-default ms-3 btn-danger\" (click)=\"file1.click()\">Reupload</button>\r\n <input style=\"display: none;\" #file1 type=\"file\" id=\"kt_account_team_size_select_2\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUpload($event)\" />\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #confirmDelete let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"mt-3\">\r\n <div class=\"mt-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEE4E2\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FEF3F2\" stroke-width=\"8\"/>\r\n <path d=\"M28 24V28M28 32H28.01M38 28C38 33.5228 33.5228 38 28 38C22.4772 38 18 33.5228 18 28C18 22.4772 22.4772 18 28 18C33.5228 18 38 22.4772 38 28Z\" stroke=\"#D92D20\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n <div class=\"config-heading fw-semibold mt-3 w-auto\">Delete {{teamId?.length}} {{teamId?.length > 1 ? 'Teams' : 'Team'}}? </div></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"mt-5\">\r\n <div class=\"subtitle\" style=\"font-weight: 400;\">Are you sure you want to delete the selected team? This action cannot be undone.</div>\r\n </div>\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify justify-content-between pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline w-50 me-2\" (click)=\"model.close()\">Cancel</button>\r\n <button class=\"btn btn-md py-3 btn-default btn-danger w-50 ms-2\" (click)=\"model.close('submit')\">Delete</button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}.left-move{justify-content:end}.img-src{width:25%;height:20%}.w-25{width:15%!important}td.description{overflow:hidden;text-overflow:ellipsis;max-width:100px}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rotate{rotate:180deg;transition:1s}td{line-height:30px}.rightcorner{position:absolute;top:10px;right:16px;font-size:18px}.user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.table-header{color:var(--Gray-800, #1D2939);font-size:16px;font-weight:600;line-height:24px}.text-error{color:var(--Error-700, #B42318)!important;font-size:14px;font-weight:500;line-height:20px}.excel-error{color:var(--Error-600, #D92D20);font-size:14px;font-weight:500;line-height:20px}.error-heading{color:var(--Error-600, #D92D20);font-size:20px;font-weight:500;line-height:30px}.border-error{border:1px solid var(--Error-300, #FDA29B)!important;background:var(--Error-25, #FFFBFA)!important}.popup-card{border-radius:6px;border:1px solid var(--Gray-300, #D0D5DD);background:#fff;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.btn-delete{border:1px solid var(--Error-50, #FEF3F2);background:var(--Error-50, #FEF3F2);padding:12px 14px;box-shadow:0 1px 2px #1018280d;color:var(--Error-700, #B42318);font-size:14px;font-weight:600;line-height:20px}.alert-box{border-radius:4px;border-left:2px solid var(--Primary-600, #00A3FF);background:var(--Gray-100, #F2F4F7);box-shadow:0 4px 16px #0000001a;display:flex;height:68px;padding:6px 8px 6px 16px;justify-content:center;align-items:center;cursor:pointer;gap:8px;align-self:stretch;color:var(--Gray-500, #667085);font-size:14px;font-weight:600}.alert-box .selectAll{color:var(--Primary-700, #009BF3);font-size:15px;font-weight:700;text-decoration-line:underline;text-decoration-thickness:auto;text-underline-offset:auto}.popup-scroll{min-height:auto;max-height:400px;overflow-y:auto}.subtitle{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:500!important;line-height:20px!important}.config-heading{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600!important;line-height:28px!important}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "component", type: ViewteamsListComponent, selector: "lib-viewteams-list", inputs: ["teamData"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }] });
|
|
5613
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TeamsListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: ManageUsersService }, { token: ExcelService }, { token: i2.GlobalStateService }, { token: i4.ToastService }, { token: i3.Router }, { token: i1$1.NgbModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
5614
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TeamsListComponent, selector: "lib-teams-list", outputs: { dataTo: "dataTo" }, viewQueries: [{ propertyName: "tooltipContent", first: true, predicate: ["tooltipContent"], descendants: true }, { propertyName: "tooltipContents", first: true, predicate: ["tooltipContents"], descendants: true }, { propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true }, { propertyName: "afterValidation", first: true, predicate: ["afterValidation"], descendants: true }, { propertyName: "confirmDelete", first: true, predicate: ["confirmDelete"], descendants: true }], ngImport: i0, template: "<div>\r\n <div class=\"\" *ngIf=\"!loading && !viewTeams&&!showcreatebutton\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n </h3>\r\n <div class=\"card-toolbar rightcorner\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1 \">\r\n <span *ngIf=\"!selectedUsers?.length\" class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input *ngIf=\"!selectedUsers?.length\" type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n\r\n\r\n <button *ngIf=\"!loading && !noData&& !selectedUsers?.length \" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline px-4 py-3 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n\r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd && teamsList.length>0 && !selectedUsers?.length\" type=\"button\" (click)=\"openTeam()\" class=\"btn btn-sm py-3 btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n <div *ngIf=\"selectedUsers?.length\" class=\"btn-delete cursor-pointer px-5 mx-2 rounded-3 text-nowrap\" (click)=\"DeleteAllTeam()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M2.5 4.99996H4.16667M4.16667 4.99996H17.5M4.16667 4.99996V16.6666C4.16667 17.1087 4.34226 17.5326 4.65482 17.8451C4.96738 18.1577 5.39131 18.3333 5.83333 18.3333H14.1667C14.6087 18.3333 15.0326 18.1577 15.3452 17.8451C15.6577 17.5326 15.8333 17.1087 15.8333 16.6666V4.99996H4.16667ZM6.66667 4.99996V3.33329C6.66667 2.89127 6.84226 2.46734 7.15482 2.15478C7.46738 1.84222 7.89131 1.66663 8.33333 1.66663H11.6667C12.1087 1.66663 12.5326 1.84222 12.8452 2.15478C13.1577 2.46734 13.3333 2.89127 13.3333 3.33329V4.99996M8.33333 9.16663V14.1666M11.6667 9.16663V14.1666\" stroke=\"#B42318\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"ms-2\">Delete All</span>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"card-header border-0 pt-3 left-move\">\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1 \">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n\r\n\r\n <button *ngIf=\"!loading && !noData \" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n\r\n <button type=\"button\" (click)=\"createTeam()\" class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <div *ngIf=\"!loading && !noData && !viewTeams&&teamsList.length>0\" class=\"card-body p-0\">\r\n <div *ngIf=\"selectedUsers?.length\" class=\"alert-box\">\r\n <span><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"37\" height=\"36\" viewBox=\"0 0 37 36\" fill=\"none\">\r\n <rect x=\"2.5\" y=\"2\" width=\"32\" height=\"32\" rx=\"16\" fill=\"#DAF1FF\"/>\r\n <rect x=\"2.5\" y=\"2\" width=\"32\" height=\"32\" rx=\"16\" stroke=\"#EAF8FF\" stroke-width=\"4\"/>\r\n <g clip-path=\"url(#clip0_12293_6263)\">\r\n <path d=\"M25.1666 17.3866V18C25.1658 19.4376 24.7003 20.8364 23.8395 21.9878C22.9787 23.1393 21.7688 23.9816 20.3902 24.3892C19.0115 24.7968 17.5381 24.7479 16.1896 24.2497C14.841 23.7515 13.6897 22.8307 12.9072 21.6247C12.1248 20.4186 11.7531 18.992 11.8477 17.5575C11.9423 16.123 12.4981 14.7575 13.4321 13.6647C14.3662 12.5718 15.6284 11.8102 17.0307 11.4934C18.433 11.1766 19.9001 11.3215 21.2133 11.9066M25.1666 12.6666L18.4999 19.34L16.4999 17.34\" stroke=\"#00A3FF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_12293_6263\">\r\n <rect width=\"16\" height=\"16\" fill=\"white\" transform=\"translate(10.5 10)\"/>\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n <span><span>{{selectedUsers.length === teamsList.length ? 'All ' : 'Totally '}}</span>{{selectedUsers.length}} {{ selectedUsers.length > 1 ? 'Clusters' : 'Cluster'}} on this page are selected.</span><span *ngIf=\"!clustersAllselect || getCheckedClusterCount(this.clustersAllselect) < pagination.totalCount\" class=\"selectAll\" (click)=\"selectAllClusters('selectAll')\">Select all {{pagination.totalCount}} Clusters filtered</span>\r\n <span *ngIf=\"clustersAllselect && getCheckedClusterCount(this.clustersAllselect) === pagination.totalCount\" class=\"selectAll\" (click)=\"selectAllClusters('unselect')\">Unselect all {{pagination.totalCount}} Clusters filtered</span>\r\n <span></span>\r\n </div>\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" class=\"cursor-pointer\"><span class=\"inputcheck\"><input type=\"checkbox\" (click)=\"onSelectAll()\" [(ngModel)]=\"selectAllChecked\"\r\n class=\"cursor-pointer\"></span>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('teamName')\">Team Name\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'teamName' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'teamName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userscount')\">Users\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'userscount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'userscount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Lead Name\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Lead Email\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('description')\">Description\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'description' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'description' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of teamsList;let i=index;\">\r\n <tr>\r\n <td *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\"><span class=\"inputcheck\"><input type=\"checkbox\" class=\"cursor-pointer mt-2\" [(ngModel)]=\"user.isChecked\" (click)=\"onSelectedTeam(user,i)\"></span></td>\r\n <td>{{user?.teamName}}</td>\r\n <td>{{user?.userscount}}</td>\r\n <td><div class=\"mx-2\">\r\n <div class=\"table-title\">\r\n <span class=\"camerastatus\">\r\n <span>\r\n {{ user?.leadName[0]?user?.leadName[0]:\"--\" }}\r\n </span>\r\n <span *ngIf=\"user?.leadName.length > 1\">\r\n +{{ user.leadName.length - 1 }}\r\n </span>\r\n </span>\r\n\r\n </div>\r\n </div></td>\r\n <td>\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"symbol symbol-35px symbol-circle\">\r\n <span class=\"symbol-label badge-light-primary text-symbol\" *ngIf=\"user?.leademail.length>0\">\r\n <span class=\"text-primary fs-4 badge badge-light-primary fw-normal\">\r\n {{ user?.leademail[0]?.substring(0, 2) | uppercase }}\r\n </span>\r\n </span>\r\n </div>\r\n <div class=\"mx-2\">\r\n <div class=\"table-title\">\r\n <span class=\"camerastatus\">\r\n <span>\r\n {{ getMaskedValue(user?.leademail[0] ,users?.role) }}\r\n </span>\r\n <span *ngIf=\"user?.leademail.length > 1\">\r\n +{{ user.leademail.length - 1 }}\r\n </span>\r\n </span>\r\n\r\n </div>\r\n </div>\r\n <span *ngIf=\"user?.Teamleadcount>0\">+{{user?.Teamleadcount}}</span>\r\n </div>\r\n </td>\r\n <td class=\"description\">{{user?.description ? user?.description : \"--\"}}</td>\r\n <td>\r\n <span class=\"me-3 cursor-pointer\" (click)=\"viewTeamsdata(user)\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10.0002C0.833374 10.0002 4.16671 3.3335 10 3.3335C15.8334 3.3335 19.1667 10.0002 19.1667 10.0002C19.1667 10.0002 15.8334 16.6668 10 16.6668C4.16671 16.6668 0.833374 10.0002 0.833374 10.0002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5002C11.3808 12.5002 12.5 11.3809 12.5 10.0002C12.5 8.61945 11.3808 7.50016 10 7.50016C8.61933 7.50016 7.50004 8.61945 7.50004 10.0002C7.50004 11.3809 8.61933 12.5002 10 12.5002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </span>\r\n <span *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" class=\"me-3 cursor-pointer\" (click)=\"editTeamsdata(user)\">\r\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g clip-path=\"url(#clip0_2181_11160)\">\r\n <path\r\n d=\"M24.1666 12.4999C24.3855 12.2811 24.6453 12.1074 24.9313 11.989C25.2173 11.8705 25.5238 11.8096 25.8333 11.8096C26.1428 11.8096 26.4493 11.8705 26.7353 11.989C27.0213 12.1074 27.2811 12.2811 27.5 12.4999C27.7188 12.7188 27.8924 12.9786 28.0109 13.2646C28.1294 13.5506 28.1903 13.8571 28.1903 14.1666C28.1903 14.4761 28.1294 14.7826 28.0109 15.0686C27.8924 15.3546 27.7188 15.6144 27.5 15.8333L16.25 27.0833L11.6666 28.3333L12.9166 23.7499L24.1666 12.4999Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_2181_11160\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(10 10)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n <span *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" class=\"cursor-pointer\" (click)=\"deleteTeam(user)\">\r\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M12.5 14.9998H14.1667M14.1667 14.9998H27.5M14.1667 14.9998V26.6665C14.1667 27.1085 14.3423 27.5325 14.6548 27.845C14.9674 28.1576 15.3913 28.3332 15.8333 28.3332H24.1667C24.6087 28.3332 25.0326 28.1576 25.3452 27.845C25.6577 27.5325 25.8333 27.1085 25.8333 26.6665V14.9998H14.1667ZM16.6667 14.9998V13.3332C16.6667 12.8911 16.8423 12.4672 17.1548 12.1547C17.4674 11.8421 17.8913 11.6665 18.3333 11.6665H21.6667C22.1087 11.6665 22.5326 11.8421 22.8452 12.1547C23.1577 12.4672 23.3333 12.8911 23.3333 13.3332V14.9998M18.3333 19.1665V24.1665M21.6667 19.1665V24.1665\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData && !viewTeams&&teamsList.length>0\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"teamsList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"noData&&!showcreatebutton\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata.svg\" alt=\"\">\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"card-body d-flex flex-center flex-column p-9\" *ngIf=\"showcreatebutton\">\r\n <div class=\"mb-5\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#D1FADF\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#ECFDF3\" stroke-width=\"8\"/>\r\n <path d=\"M28 24V32M24 28H32M38 28C38 33.5228 33.5228 38 28 38C22.4772 38 18 33.5228 18 28C18 22.4772 22.4772 18 28 18C33.5228 18 38 22.4772 38 28Z\" stroke=\"#039855\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bolder mb-0 title cursor-pointer\"> Add teams </a>\r\n <div class=\"fw-bold text-gray-800 my-6\">\r\n <ul class=\"custom-ordered-list text-gray-800 fw-bold fs-6\">\r\n <li class=\"user-text mb-2\">Use the template to upload multiple Teams at once.</li>\r\n <li class=\"user-text mb-2\">Download the template here -\r\n <a href=\"./../../assets/files/teamsBulkUploadTemplate.xlsx\" download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text mb-2\">Add your data to the Template File</li>\r\n <li class=\"user-text mb-2\">Upload it below for processing</li>\r\n </ul>\r\n </div>\r\n <div class=\"d-flex flex-center flex-column mb-5\" style=\"width: 57% !important;\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\" value=\"personal\"\r\n class=\"btn-check\" ng-reflect-name=\"accountType\" ng-reflect-form-control-name=\"accountType\"\r\n (change)=\"onUpload($event)\"\r\n ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_create_account_form_account_type_personal\"\r\n class=\"btn btn-outline btn-primary bg-primary btn-outline-default rounded-3 w-50 p-4 mt-5\"><span\r\n class=\"fw-bold fs-4\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\"\r\n fill=\"none\">\r\n <path\r\n d=\"M18 12.5V15.8333C18 16.2754 17.8244 16.6993 17.5118 17.0118C17.1993 17.3244 16.7754 17.5 16.3333 17.5H4.66667C4.22464 17.5 3.80072 17.3244 3.48816 17.0118C3.17559 16.6993 3 16.2754 3 15.8333V12.5M14.6667 6.66667L10.5 2.5M10.5 2.5L6.33333 6.66667M10.5 2.5V12.5\"\r\n stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> \r\n <span class=\"text-white mx-2\">Upload To Add Multiple Teams</span></span>\r\n </label>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"line-bg \"><svg width=\"224\" height=\"2\" viewBox=\"0 0 124 2\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"123.333\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span><span class=\"mx-2\">Or </span> <span class=\"line-bg \"><svg width=\"224\" height=\"2\" viewBox=\"0 0 124 2\"\r\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"123.333\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span>\r\n </p>\r\n <input type=\"radio\" id=\"kt_account_team_size_select_1\" value=\"1-1\" (click)=\"createTeam()\"\r\n class=\"btn-check ng-untouched ng-pristine ng-valid\" />\r\n <label for=\"kt_account_team_size_select_1\"\r\n class=\"btn btn-outline btn-outline-default rounded-3 w-50 p-4 mt-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M9.99984 4.16675V15.8334M4.1665 10.0001H15.8332\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"fw-bold fs-4 mx-2\">\r\n Add Single Team</span></label>\r\n </div>\r\n \r\n \r\n</div>\r\n</div>\r\n\r\n<div *ngIf=\"viewTeams && !showcreatebutton\">\r\n <lib-viewteams-list [teamData]=\"this.selectedTeam\"></lib-viewteams-list>\r\n</div>\r\n\r\n<ng-template #afterValidation let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"card-title mt-3\"><span class=\"config-heading fw-semibold w-auto\">Add Teams</span></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{getStoreCounts(excelData)}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Total Records</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{excelData?.length}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Rows processed</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div [ngClass]=\"excelError?.error?.length \r\n ? 'fw-semibold text-error w-100 error-heading' \r\n : 'fw-semibold w-100 config-heading'\">\r\n {{ excelError?.error?.length || 0 }}\r\n </div>\r\n <div [ngClass]=\"excelError?.error?.length \r\n ? 'fw-semibold text-error mt-1 excel-error' \r\n : 'fw-semibold subtitle mt-1'\">\r\n Error\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!excelError?.error?.length\" class=\"table-header mt-5\" style=\"font-weight: 400;\">\r\n <div >You're about to add {{getStoreCounts(excelData)}} {{getStoreCounts(excelData) >1 ?'Teams':'Team'}}. Are you sure want to proceed?</div>\r\n \r\n </div>\r\n <div *ngIf=\"excelError?.error?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Invalid Details !</div>\r\n <div class=\"subtitle mt-5\">Please provide correct information.</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of excelError?.error; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.doesNotExists?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Data not exists !</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.doesNotExists; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.inActive?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Data inactive !</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.inActive; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify-content-end flex-wrap gap-2 pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline\" (click)=\"closeactivepopup()\">Cancel</button>\r\n <button *ngIf=\"!excelError?.error?.length\" class=\"btn btn-md py-3 btn-default ms-3 btn-primary\" (click)=\"validateDetails()\">Proceed</button>\r\n <button *ngIf=\"excelError?.error?.length\" class=\"btn py-3 btn-md btn-default ms-3 btn-danger\" (click)=\"file1.click()\">Reupload</button>\r\n <input style=\"display: none;\" #file1 type=\"file\" id=\"kt_account_team_size_select_2\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUpload($event)\" />\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #confirmDelete let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"mt-3\">\r\n <div class=\"mt-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEE4E2\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FEF3F2\" stroke-width=\"8\"/>\r\n <path d=\"M28 24V28M28 32H28.01M38 28C38 33.5228 33.5228 38 28 38C22.4772 38 18 33.5228 18 28C18 22.4772 22.4772 18 28 18C33.5228 18 38 22.4772 38 28Z\" stroke=\"#D92D20\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n <div class=\"config-heading fw-semibold mt-3 w-auto\">Delete {{teamId?.length}} {{teamId?.length > 1 ? 'Teams' : 'Team'}}? </div></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"mt-5\">\r\n <div class=\"subtitle\" style=\"font-weight: 400;\">Are you sure you want to delete the selected team? This action cannot be undone.</div>\r\n </div>\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify justify-content-between pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline w-50 me-2\" (click)=\"model.close()\">Cancel</button>\r\n <button class=\"btn btn-md py-3 btn-default btn-danger w-50 ms-2\" (click)=\"model.close('submit')\">Delete</button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}.left-move{justify-content:end}.img-src{width:25%;height:20%}.w-25{width:15%!important}td.description{overflow:hidden;text-overflow:ellipsis;max-width:100px}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rotate{rotate:180deg;transition:1s}td{line-height:30px}.rightcorner{position:absolute;top:10px;right:16px;font-size:18px}.user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.table-header{color:var(--Gray-800, #1D2939);font-size:16px;font-weight:600;line-height:24px}.text-error{color:var(--Error-700, #B42318)!important;font-size:14px;font-weight:500;line-height:20px}.excel-error{color:var(--Error-600, #D92D20);font-size:14px;font-weight:500;line-height:20px}.error-heading{color:var(--Error-600, #D92D20);font-size:20px;font-weight:500;line-height:30px}.border-error{border:1px solid var(--Error-300, #FDA29B)!important;background:var(--Error-25, #FFFBFA)!important}.popup-card{border-radius:6px;border:1px solid var(--Gray-300, #D0D5DD);background:#fff;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.btn-delete{border:1px solid var(--Error-50, #FEF3F2);background:var(--Error-50, #FEF3F2);padding:12px 14px;box-shadow:0 1px 2px #1018280d;color:var(--Error-700, #B42318);font-size:14px;font-weight:600;line-height:20px}.alert-box{border-radius:4px;border-left:2px solid var(--Primary-600, #00A3FF);background:var(--Gray-100, #F2F4F7);box-shadow:0 4px 16px #0000001a;display:flex;height:68px;padding:6px 8px 6px 16px;justify-content:center;align-items:center;cursor:pointer;gap:8px;align-self:stretch;color:var(--Gray-500, #667085);font-size:14px;font-weight:600}.alert-box .selectAll{color:var(--Primary-700, #009BF3);font-size:15px;font-weight:700;text-decoration-line:underline;text-decoration-thickness:auto;text-underline-offset:auto}.popup-scroll{min-height:auto;max-height:400px;overflow-y:auto}.subtitle{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:500!important;line-height:20px!important}.config-heading{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600!important;line-height:28px!important}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "component", type: ViewteamsListComponent, selector: "lib-viewteams-list", inputs: ["teamData"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }] });
|
|
5399
5615
|
}
|
|
5400
5616
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TeamsListComponent, decorators: [{
|
|
5401
5617
|
type: Component,
|
|
5402
|
-
args: [{ selector: 'lib-teams-list', template: "<div>\r\n <div class=\"\" *ngIf=\"!loading && !viewTeams&&!showcreatebutton\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n </h3>\r\n <div class=\"card-toolbar rightcorner\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1 \">\r\n <span *ngIf=\"!selectedUsers?.length\" class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input *ngIf=\"!selectedUsers?.length\" type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n\r\n\r\n <button *ngIf=\"!loading && !noData&& !selectedUsers?.length \" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline px-4 py-3 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n\r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd && teamsList.length>0 && !selectedUsers?.length\" type=\"button\" (click)=\"openTeam()\" class=\"btn btn-sm py-3 btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n <div *ngIf=\"selectedUsers?.length\" class=\"btn-delete cursor-pointer px-5 mx-2 rounded-3 text-nowrap\" (click)=\"DeleteAllTeam()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M2.5 4.99996H4.16667M4.16667 4.99996H17.5M4.16667 4.99996V16.6666C4.16667 17.1087 4.34226 17.5326 4.65482 17.8451C4.96738 18.1577 5.39131 18.3333 5.83333 18.3333H14.1667C14.6087 18.3333 15.0326 18.1577 15.3452 17.8451C15.6577 17.5326 15.8333 17.1087 15.8333 16.6666V4.99996H4.16667ZM6.66667 4.99996V3.33329C6.66667 2.89127 6.84226 2.46734 7.15482 2.15478C7.46738 1.84222 7.89131 1.66663 8.33333 1.66663H11.6667C12.1087 1.66663 12.5326 1.84222 12.8452 2.15478C13.1577 2.46734 13.3333 2.89127 13.3333 3.33329V4.99996M8.33333 9.16663V14.1666M11.6667 9.16663V14.1666\" stroke=\"#B42318\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"ms-2\">Delete All</span>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"card-header border-0 pt-3 left-move\">\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1 \">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n\r\n\r\n <button *ngIf=\"!loading && !noData \" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n\r\n <button type=\"button\" (click)=\"createTeam()\" class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <div *ngIf=\"!loading && !noData && !viewTeams&&teamsList.length>0\" class=\"card-body p-0\">\r\n <div *ngIf=\"selectedUsers?.length\" class=\"alert-box\">\r\n <span><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"37\" height=\"36\" viewBox=\"0 0 37 36\" fill=\"none\">\r\n <rect x=\"2.5\" y=\"2\" width=\"32\" height=\"32\" rx=\"16\" fill=\"#DAF1FF\"/>\r\n <rect x=\"2.5\" y=\"2\" width=\"32\" height=\"32\" rx=\"16\" stroke=\"#EAF8FF\" stroke-width=\"4\"/>\r\n <g clip-path=\"url(#clip0_12293_6263)\">\r\n <path d=\"M25.1666 17.3866V18C25.1658 19.4376 24.7003 20.8364 23.8395 21.9878C22.9787 23.1393 21.7688 23.9816 20.3902 24.3892C19.0115 24.7968 17.5381 24.7479 16.1896 24.2497C14.841 23.7515 13.6897 22.8307 12.9072 21.6247C12.1248 20.4186 11.7531 18.992 11.8477 17.5575C11.9423 16.123 12.4981 14.7575 13.4321 13.6647C14.3662 12.5718 15.6284 11.8102 17.0307 11.4934C18.433 11.1766 19.9001 11.3215 21.2133 11.9066M25.1666 12.6666L18.4999 19.34L16.4999 17.34\" stroke=\"#00A3FF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_12293_6263\">\r\n <rect width=\"16\" height=\"16\" fill=\"white\" transform=\"translate(10.5 10)\"/>\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n <span><span>{{selectedUsers.length === teamsList.length ? 'All ' : 'Totally '}}</span>{{selectedUsers.length}} {{ selectedUsers.length > 1 ? 'Clusters' : 'Cluster'}} on this page are selected.</span><span *ngIf=\"!clustersAllselect || getCheckedClusterCount(this.clustersAllselect) < pagination.totalCount\" class=\"selectAll\" (click)=\"selectAllClusters('selectAll')\">Select all {{pagination.totalCount}} Clusters filtered</span>\r\n <span *ngIf=\"clustersAllselect && getCheckedClusterCount(this.clustersAllselect) === pagination.totalCount\" class=\"selectAll\" (click)=\"selectAllClusters('unselect')\">Unselect all {{pagination.totalCount}} Clusters filtered</span>\r\n <span></span>\r\n </div>\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\" class=\"cursor-pointer\"><span class=\"inputcheck\"><input type=\"checkbox\" (click)=\"onSelectAll()\" [(ngModel)]=\"selectAllChecked\"\r\n class=\"cursor-pointer\"></span>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('teamName')\">Team Name\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'teamName' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'teamName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userscount')\">Users\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'userscount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'userscount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Lead Name\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Lead Email\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('description')\">Description\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'description' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'description' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of teamsList;let i=index;\">\r\n <tr>\r\n <td *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd\"><span class=\"inputcheck\"><input type=\"checkbox\" class=\"cursor-pointer mt-2\" [(ngModel)]=\"user.isChecked\" (click)=\"onSelectedTeam(user,i)\"></span></td>\r\n <td>{{user?.teamName}}</td>\r\n <td>{{user?.userscount}}</td>\r\n <td><div class=\"mx-2\">\r\n <div class=\"table-title\">\r\n <span class=\"camerastatus\">\r\n <span>\r\n {{ user?.leadName[0]?user?.leadName[0]:\"--\" }}\r\n </span>\r\n <span *ngIf=\"user?.leadName.length > 1\">\r\n +{{ user.leadName.length - 1 }}\r\n </span>\r\n </span>\r\n\r\n </div>\r\n </div></td>\r\n <td>\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"symbol symbol-35px symbol-circle\">\r\n <span class=\"symbol-label badge-light-primary text-symbol\" *ngIf=\"user?.leademail.length>0\">\r\n <span class=\"text-primary fs-4 badge badge-light-primary fw-normal\">\r\n {{ user?.leademail[0]?.substring(0, 2) | uppercase }}\r\n </span>\r\n </span>\r\n </div>\r\n <div class=\"mx-2\">\r\n <div class=\"table-title\">\r\n <span class=\"camerastatus\">\r\n <span>\r\n {{ getMaskedValue(user?.leademail[0] ,users?.role) }}\r\n </span>\r\n <span *ngIf=\"user?.leademail.length > 1\">\r\n +{{ user.leademail.length - 1 }}\r\n </span>\r\n </span>\r\n\r\n </div>\r\n </div>\r\n <span *ngIf=\"user?.Teamleadcount>0\">+{{user?.Teamleadcount}}</span>\r\n </div>\r\n </td>\r\n <td class=\"description\">{{user?.description ? user?.description : \"--\"}}</td>\r\n <td>\r\n <span class=\"me-3 cursor-pointer\" (click)=\"viewTeamsdata(user)\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10.0002C0.833374 10.0002 4.16671 3.3335 10 3.3335C15.8334 3.3335 19.1667 10.0002 19.1667 10.0002C19.1667 10.0002 15.8334 16.6668 10 16.6668C4.16671 16.6668 0.833374 10.0002 0.833374 10.0002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5002C11.3808 12.5002 12.5 11.3809 12.5 10.0002C12.5 8.61945 11.3808 7.50016 10 7.50016C8.61933 7.50016 7.50004 8.61945 7.50004 10.0002C7.50004 11.3809 8.61933 12.5002 10 12.5002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </span>\r\n <span *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" class=\"me-3 cursor-pointer\" (click)=\"editTeamsdata(user)\">\r\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g clip-path=\"url(#clip0_2181_11160)\">\r\n <path\r\n d=\"M24.1666 12.4999C24.3855 12.2811 24.6453 12.1074 24.9313 11.989C25.2173 11.8705 25.5238 11.8096 25.8333 11.8096C26.1428 11.8096 26.4493 11.8705 26.7353 11.989C27.0213 12.1074 27.2811 12.2811 27.5 12.4999C27.7188 12.7188 27.8924 12.9786 28.0109 13.2646C28.1294 13.5506 28.1903 13.8571 28.1903 14.1666C28.1903 14.4761 28.1294 14.7826 28.0109 15.0686C27.8924 15.3546 27.7188 15.6144 27.5 15.8333L16.25 27.0833L11.6666 28.3333L12.9166 23.7499L24.1666 12.4999Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_2181_11160\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(10 10)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n <span *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" class=\"cursor-pointer\" (click)=\"deleteTeam(user)\">\r\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M12.5 14.9998H14.1667M14.1667 14.9998H27.5M14.1667 14.9998V26.6665C14.1667 27.1085 14.3423 27.5325 14.6548 27.845C14.9674 28.1576 15.3913 28.3332 15.8333 28.3332H24.1667C24.6087 28.3332 25.0326 28.1576 25.3452 27.845C25.6577 27.5325 25.8333 27.1085 25.8333 26.6665V14.9998H14.1667ZM16.6667 14.9998V13.3332C16.6667 12.8911 16.8423 12.4672 17.1548 12.1547C17.4674 11.8421 17.8913 11.6665 18.3333 11.6665H21.6667C22.1087 11.6665 22.5326 11.8421 22.8452 12.1547C23.1577 12.4672 23.3333 12.8911 23.3333 13.3332V14.9998M18.3333 19.1665V24.1665M21.6667 19.1665V24.1665\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData && !viewTeams&&teamsList.length>0\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"teamsList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"noData&&!showcreatebutton\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata.svg\" alt=\"\">\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"card-body d-flex flex-center flex-column p-9\" *ngIf=\"showcreatebutton\">\r\n <div class=\"mb-5\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#D1FADF\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#ECFDF3\" stroke-width=\"8\"/>\r\n <path d=\"M28 24V32M24 28H32M38 28C38 33.5228 33.5228 38 28 38C22.4772 38 18 33.5228 18 28C18 22.4772 22.4772 18 28 18C33.5228 18 38 22.4772 38 28Z\" stroke=\"#039855\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bolder mb-0 title cursor-pointer\"> Add teams </a>\r\n <div class=\"fw-bold text-gray-800 my-6\">\r\n <ul class=\"custom-ordered-list text-gray-800 fw-bold fs-6\">\r\n <li class=\"user-text mb-2\">Use the template to upload multiple Teams at once.</li>\r\n <li class=\"user-text mb-2\">Download the template here -\r\n <a href=\"./../../assets/files/teamsBulkUploadTemplate.xlsx\" download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text mb-2\">Add your data to the Template File</li>\r\n <li class=\"user-text mb-2\">Upload it below for processing</li>\r\n </ul>\r\n </div>\r\n <div class=\"d-flex flex-center flex-column mb-5\" style=\"width: 57% !important;\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\" value=\"personal\"\r\n class=\"btn-check\" ng-reflect-name=\"accountType\" ng-reflect-form-control-name=\"accountType\"\r\n (change)=\"onUpload($event)\"\r\n ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_create_account_form_account_type_personal\"\r\n class=\"btn btn-outline btn-primary bg-primary btn-outline-default rounded-3 w-50 p-4 mt-5\"><span\r\n class=\"fw-bold fs-4\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\"\r\n fill=\"none\">\r\n <path\r\n d=\"M18 12.5V15.8333C18 16.2754 17.8244 16.6993 17.5118 17.0118C17.1993 17.3244 16.7754 17.5 16.3333 17.5H4.66667C4.22464 17.5 3.80072 17.3244 3.48816 17.0118C3.17559 16.6993 3 16.2754 3 15.8333V12.5M14.6667 6.66667L10.5 2.5M10.5 2.5L6.33333 6.66667M10.5 2.5V12.5\"\r\n stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> \r\n <span class=\"text-white mx-2\">Upload To Add Multiple Teams</span></span>\r\n </label>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"line-bg \"><svg width=\"224\" height=\"2\" viewBox=\"0 0 124 2\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"123.333\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span><span class=\"mx-2\">Or </span> <span class=\"line-bg \"><svg width=\"224\" height=\"2\" viewBox=\"0 0 124 2\"\r\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"123.333\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span>\r\n </p>\r\n <input type=\"radio\" id=\"kt_account_team_size_select_1\" value=\"1-1\" (click)=\"createTeam()\"\r\n class=\"btn-check ng-untouched ng-pristine ng-valid\" />\r\n <label for=\"kt_account_team_size_select_1\"\r\n class=\"btn btn-outline btn-outline-default rounded-3 w-50 p-4 mt-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M9.99984 4.16675V15.8334M4.1665 10.0001H15.8332\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"fw-bold fs-4 mx-2\">\r\n Add Single Team</span></label>\r\n </div>\r\n \r\n \r\n</div>\r\n</div>\r\n\r\n<div *ngIf=\"viewTeams && !showcreatebutton\">\r\n <lib-viewteams-list [teamData]=\"this.selectedTeam\"></lib-viewteams-list>\r\n</div>\r\n\r\n<ng-template #afterValidation let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"card-title mt-3\"><span class=\"config-heading fw-semibold w-auto\">Add Teams</span></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{getStoreCounts(excelData)}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Total Records</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{excelData?.length}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Rows processed</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div [ngClass]=\"excelError?.error?.length \r\n ? 'fw-semibold text-error w-100 error-heading' \r\n : 'fw-semibold w-100 config-heading'\">\r\n {{ excelError?.error?.length || 0 }}\r\n </div>\r\n <div [ngClass]=\"excelError?.error?.length \r\n ? 'fw-semibold text-error mt-1 excel-error' \r\n : 'fw-semibold subtitle mt-1'\">\r\n Error\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!excelError?.error?.length\" class=\"table-header mt-5\" style=\"font-weight: 400;\">\r\n <div >You're about to add {{getStoreCounts(excelData)}} {{getStoreCounts(excelData) >1 ?'Teams':'Team'}}. Are you sure want to proceed?</div>\r\n \r\n </div>\r\n <div *ngIf=\"excelError?.error?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Invalid Details !</div>\r\n <div class=\"subtitle mt-5\">Please provide correct information.</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of excelError?.error; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.doesNotExists?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Data not exists !</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.doesNotExists; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.inActive?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Data inactive !</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.inActive; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify-content-end flex-wrap gap-2 pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline\" (click)=\"closeactivepopup()\">Cancel</button>\r\n <button *ngIf=\"!excelError?.error?.length\" class=\"btn btn-md py-3 btn-default ms-3 btn-primary\" (click)=\"validateDetails()\">Proceed</button>\r\n <button *ngIf=\"excelError?.error?.length\" class=\"btn py-3 btn-md btn-default ms-3 btn-danger\" (click)=\"file1.click()\">Reupload</button>\r\n <input style=\"display: none;\" #file1 type=\"file\" id=\"kt_account_team_size_select_2\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUpload($event)\" />\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #confirmDelete let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"mt-3\">\r\n <div class=\"mt-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEE4E2\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FEF3F2\" stroke-width=\"8\"/>\r\n <path d=\"M28 24V28M28 32H28.01M38 28C38 33.5228 33.5228 38 28 38C22.4772 38 18 33.5228 18 28C18 22.4772 22.4772 18 28 18C33.5228 18 38 22.4772 38 28Z\" stroke=\"#D92D20\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n <div class=\"config-heading fw-semibold mt-3 w-auto\">Delete {{teamId?.length}} {{teamId?.length > 1 ? 'Teams' : 'Team'}}? </div></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"mt-5\">\r\n <div class=\"subtitle\" style=\"font-weight: 400;\">Are you sure you want to delete the selected team? This action cannot be undone.</div>\r\n </div>\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify justify-content-between pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline w-50 me-2\" (click)=\"model.close()\">Cancel</button>\r\n <button class=\"btn btn-md py-3 btn-default btn-danger w-50 ms-2\" (click)=\"model.close('submit')\">Delete</button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}.left-move{justify-content:end}.img-src{width:25%;height:20%}.w-25{width:15%!important}td.description{overflow:hidden;text-overflow:ellipsis;max-width:100px}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rotate{rotate:180deg;transition:1s}td{line-height:30px}.rightcorner{position:absolute;top:10px;right:16px;font-size:18px}.user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.table-header{color:var(--Gray-800, #1D2939);font-size:16px;font-weight:600;line-height:24px}.text-error{color:var(--Error-700, #B42318)!important;font-size:14px;font-weight:500;line-height:20px}.excel-error{color:var(--Error-600, #D92D20);font-size:14px;font-weight:500;line-height:20px}.error-heading{color:var(--Error-600, #D92D20);font-size:20px;font-weight:500;line-height:30px}.border-error{border:1px solid var(--Error-300, #FDA29B)!important;background:var(--Error-25, #FFFBFA)!important}.popup-card{border-radius:6px;border:1px solid var(--Gray-300, #D0D5DD);background:#fff;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.btn-delete{border:1px solid var(--Error-50, #FEF3F2);background:var(--Error-50, #FEF3F2);padding:12px 14px;box-shadow:0 1px 2px #1018280d;color:var(--Error-700, #B42318);font-size:14px;font-weight:600;line-height:20px}.alert-box{border-radius:4px;border-left:2px solid var(--Primary-600, #00A3FF);background:var(--Gray-100, #F2F4F7);box-shadow:0 4px 16px #0000001a;display:flex;height:68px;padding:6px 8px 6px 16px;justify-content:center;align-items:center;cursor:pointer;gap:8px;align-self:stretch;color:var(--Gray-500, #667085);font-size:14px;font-weight:600}.alert-box .selectAll{color:var(--Primary-700, #009BF3);font-size:15px;font-weight:700;text-decoration-line:underline;text-decoration-thickness:auto;text-underline-offset:auto}.popup-scroll{min-height:auto;max-height:400px;overflow-y:auto}.subtitle{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:500!important;line-height:20px!important}.config-heading{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600!important;line-height:28px!important}\n"] }]
|
|
5403
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: ManageUsersService }, { type: ExcelService }, { type: i2.GlobalStateService }, { type: i4.ToastService }, { type: i3
|
|
5618
|
+
args: [{ selector: 'lib-teams-list', template: "<div>\r\n <div class=\"\" *ngIf=\"!loading && !viewTeams&&!showcreatebutton\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n </h3>\r\n <div class=\"card-toolbar rightcorner\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1 \">\r\n <span *ngIf=\"!selectedUsers?.length\" class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input *ngIf=\"!selectedUsers?.length\" type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n\r\n\r\n <button *ngIf=\"!loading && !noData&& !selectedUsers?.length \" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline px-4 py-3 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n\r\n <button *ngIf=\"(gs.userAccess |async)?.Global_User_isAdd && teamsList.length>0 && !selectedUsers?.length\" type=\"button\" (click)=\"openTeam()\" class=\"btn btn-sm py-3 btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n <div *ngIf=\"selectedUsers?.length\" class=\"btn-delete cursor-pointer px-5 mx-2 rounded-3 text-nowrap\" (click)=\"DeleteAllTeam()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M2.5 4.99996H4.16667M4.16667 4.99996H17.5M4.16667 4.99996V16.6666C4.16667 17.1087 4.34226 17.5326 4.65482 17.8451C4.96738 18.1577 5.39131 18.3333 5.83333 18.3333H14.1667C14.6087 18.3333 15.0326 18.1577 15.3452 17.8451C15.6577 17.5326 15.8333 17.1087 15.8333 16.6666V4.99996H4.16667ZM6.66667 4.99996V3.33329C6.66667 2.89127 6.84226 2.46734 7.15482 2.15478C7.46738 1.84222 7.89131 1.66663 8.33333 1.66663H11.6667C12.1087 1.66663 12.5326 1.84222 12.8452 2.15478C13.1577 2.46734 13.3333 2.89127 13.3333 3.33329V4.99996M8.33333 9.16663V14.1666M11.6667 9.16663V14.1666\" stroke=\"#B42318\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"ms-2\">Delete All</span>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"card-header border-0 pt-3 left-move\">\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1 \">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n\r\n\r\n <button *ngIf=\"!loading && !noData \" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default mx-2 btn-outline p-4 btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n\r\n <button type=\"button\" (click)=\"createTeam()\" class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Create Team</span> </button>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <div *ngIf=\"!loading && !noData && !viewTeams&&teamsList.length>0\" class=\"card-body p-0\">\r\n <div *ngIf=\"selectedUsers?.length\" class=\"alert-box\">\r\n <span><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"37\" height=\"36\" viewBox=\"0 0 37 36\" fill=\"none\">\r\n <rect x=\"2.5\" y=\"2\" width=\"32\" height=\"32\" rx=\"16\" fill=\"#DAF1FF\"/>\r\n <rect x=\"2.5\" y=\"2\" width=\"32\" height=\"32\" rx=\"16\" stroke=\"#EAF8FF\" stroke-width=\"4\"/>\r\n <g clip-path=\"url(#clip0_12293_6263)\">\r\n <path d=\"M25.1666 17.3866V18C25.1658 19.4376 24.7003 20.8364 23.8395 21.9878C22.9787 23.1393 21.7688 23.9816 20.3902 24.3892C19.0115 24.7968 17.5381 24.7479 16.1896 24.2497C14.841 23.7515 13.6897 22.8307 12.9072 21.6247C12.1248 20.4186 11.7531 18.992 11.8477 17.5575C11.9423 16.123 12.4981 14.7575 13.4321 13.6647C14.3662 12.5718 15.6284 11.8102 17.0307 11.4934C18.433 11.1766 19.9001 11.3215 21.2133 11.9066M25.1666 12.6666L18.4999 19.34L16.4999 17.34\" stroke=\"#00A3FF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_12293_6263\">\r\n <rect width=\"16\" height=\"16\" fill=\"white\" transform=\"translate(10.5 10)\"/>\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n <span><span>{{selectedUsers.length === teamsList.length ? 'All ' : 'Totally '}}</span>{{selectedUsers.length}} {{ selectedUsers.length > 1 ? 'Clusters' : 'Cluster'}} on this page are selected.</span><span *ngIf=\"!clustersAllselect || getCheckedClusterCount(this.clustersAllselect) < pagination.totalCount\" class=\"selectAll\" (click)=\"selectAllClusters('selectAll')\">Select all {{pagination.totalCount}} Clusters filtered</span>\r\n <span *ngIf=\"clustersAllselect && getCheckedClusterCount(this.clustersAllselect) === pagination.totalCount\" class=\"selectAll\" (click)=\"selectAllClusters('unselect')\">Unselect all {{pagination.totalCount}} Clusters filtered</span>\r\n <span></span>\r\n </div>\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" class=\"cursor-pointer\"><span class=\"inputcheck\"><input type=\"checkbox\" (click)=\"onSelectAll()\" [(ngModel)]=\"selectAllChecked\"\r\n class=\"cursor-pointer\"></span>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('teamName')\">Team Name\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'teamName' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'teamName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userscount')\">Users\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'userscount' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'userscount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Lead Name\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Lead Email\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('description')\">Description\r\n <svg [ngClass]=\"reqdata?.sortColumName === 'description' && reqdata?.sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"reqdata?.sortColumName === 'description' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th style=\"line-height: 21px !important;\">Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of teamsList;let i=index;\">\r\n <tr>\r\n <td *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\"><span class=\"inputcheck\"><input type=\"checkbox\" class=\"cursor-pointer mt-2\" [(ngModel)]=\"user.isChecked\" (click)=\"onSelectedTeam(user,i)\"></span></td>\r\n <td>{{user?.teamName}}</td>\r\n <td>{{user?.userscount}}</td>\r\n <td><div class=\"mx-2\">\r\n <div class=\"table-title\">\r\n <span class=\"camerastatus\">\r\n <span>\r\n {{ user?.leadName[0]?user?.leadName[0]:\"--\" }}\r\n </span>\r\n <span *ngIf=\"user?.leadName.length > 1\">\r\n +{{ user.leadName.length - 1 }}\r\n </span>\r\n </span>\r\n\r\n </div>\r\n </div></td>\r\n <td>\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"symbol symbol-35px symbol-circle\">\r\n <span class=\"symbol-label badge-light-primary text-symbol\" *ngIf=\"user?.leademail.length>0\">\r\n <span class=\"text-primary fs-4 badge badge-light-primary fw-normal\">\r\n {{ user?.leademail[0]?.substring(0, 2) | uppercase }}\r\n </span>\r\n </span>\r\n </div>\r\n <div class=\"mx-2\">\r\n <div class=\"table-title\">\r\n <span class=\"camerastatus\">\r\n <span>\r\n {{ getMaskedValue(user?.leademail[0] ,users?.role) }}\r\n </span>\r\n <span *ngIf=\"user?.leademail.length > 1\">\r\n +{{ user.leademail.length - 1 }}\r\n </span>\r\n </span>\r\n\r\n </div>\r\n </div>\r\n <span *ngIf=\"user?.Teamleadcount>0\">+{{user?.Teamleadcount}}</span>\r\n </div>\r\n </td>\r\n <td class=\"description\">{{user?.description ? user?.description : \"--\"}}</td>\r\n <td>\r\n <span class=\"me-3 cursor-pointer\" (click)=\"viewTeamsdata(user)\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g id=\"eye\">\r\n <g id=\"Icon\">\r\n <path\r\n d=\"M0.833374 10.0002C0.833374 10.0002 4.16671 3.3335 10 3.3335C15.8334 3.3335 19.1667 10.0002 19.1667 10.0002C19.1667 10.0002 15.8334 16.6668 10 16.6668C4.16671 16.6668 0.833374 10.0002 0.833374 10.0002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10 12.5002C11.3808 12.5002 12.5 11.3809 12.5 10.0002C12.5 8.61945 11.3808 7.50016 10 7.50016C8.61933 7.50016 7.50004 8.61945 7.50004 10.0002C7.50004 11.3809 8.61933 12.5002 10 12.5002Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </span>\r\n <span *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" class=\"me-3 cursor-pointer\" (click)=\"editTeamsdata(user)\">\r\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g clip-path=\"url(#clip0_2181_11160)\">\r\n <path\r\n d=\"M24.1666 12.4999C24.3855 12.2811 24.6453 12.1074 24.9313 11.989C25.2173 11.8705 25.5238 11.8096 25.8333 11.8096C26.1428 11.8096 26.4493 11.8705 26.7353 11.989C27.0213 12.1074 27.2811 12.2811 27.5 12.4999C27.7188 12.7188 27.8924 12.9786 28.0109 13.2646C28.1294 13.5506 28.1903 13.8571 28.1903 14.1666C28.1903 14.4761 28.1294 14.7826 28.0109 15.0686C27.8924 15.3546 27.7188 15.6144 27.5 15.8333L16.25 27.0833L11.6666 28.3333L12.9166 23.7499L24.1666 12.4999Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_2181_11160\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(10 10)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n <span *ngIf=\"(gs.userAccess |async)?.Global_User_isEdit\" class=\"cursor-pointer\" (click)=\"deleteTeam(user)\">\r\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M12.5 14.9998H14.1667M14.1667 14.9998H27.5M14.1667 14.9998V26.6665C14.1667 27.1085 14.3423 27.5325 14.6548 27.845C14.9674 28.1576 15.3913 28.3332 15.8333 28.3332H24.1667C24.6087 28.3332 25.0326 28.1576 25.3452 27.845C25.6577 27.5325 25.8333 27.1085 25.8333 26.6665V14.9998H14.1667ZM16.6667 14.9998V13.3332C16.6667 12.8911 16.8423 12.4672 17.1548 12.1547C17.4674 11.8421 17.8913 11.6665 18.3333 11.6665H21.6667C22.1087 11.6665 22.5326 11.8421 22.8452 12.1547C23.1577 12.4672 23.3333 12.8911 23.3333 13.3332V14.9998M18.3333 19.1665V24.1665M21.6667 19.1665V24.1665\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData && !viewTeams&&teamsList.length>0\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"teamsList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer mb-10\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"noData&&!showcreatebutton\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-src\" src=\"./assets/tango/Icons/Nodata.svg\" alt=\"\">\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"card-body d-flex flex-center flex-column p-9\" *ngIf=\"showcreatebutton\">\r\n <div class=\"mb-5\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#D1FADF\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#ECFDF3\" stroke-width=\"8\"/>\r\n <path d=\"M28 24V32M24 28H32M38 28C38 33.5228 33.5228 38 28 38C22.4772 38 18 33.5228 18 28C18 22.4772 22.4772 18 28 18C33.5228 18 38 22.4772 38 28Z\" stroke=\"#039855\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n <a class=\"fs-4 text-gray-800 text-hover-primary fw-bolder mb-0 title cursor-pointer\"> Add teams </a>\r\n <div class=\"fw-bold text-gray-800 my-6\">\r\n <ul class=\"custom-ordered-list text-gray-800 fw-bold fs-6\">\r\n <li class=\"user-text mb-2\">Use the template to upload multiple Teams at once.</li>\r\n <li class=\"user-text mb-2\">Download the template here -\r\n <a href=\"./../../assets/files/teamsBulkUploadTemplate.xlsx\" download>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n 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.5M5.83333 8.33333L10 12.5M10 12.5L14.1667 8.33333M10 12.5V2.5\"\r\n stroke=\"#009BF3\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n <span class=\"template ms-2\">Download Template</span>\r\n </a>\r\n </li>\r\n <li class=\"user-text mb-2\">Add your data to the Template File</li>\r\n <li class=\"user-text mb-2\">Upload it below for processing</li>\r\n </ul>\r\n </div>\r\n <div class=\"d-flex flex-center flex-column mb-5\" style=\"width: 57% !important;\">\r\n <input name=\"accountType\" type=\"radio\" id=\"kt_create_account_form_account_type_personal\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\" value=\"personal\"\r\n class=\"btn-check\" ng-reflect-name=\"accountType\" ng-reflect-form-control-name=\"accountType\"\r\n (change)=\"onUpload($event)\"\r\n ng-reflect-value=\"personal\" type=\"file\" #inputFile />\r\n <label for=\"kt_create_account_form_account_type_personal\"\r\n class=\"btn btn-outline btn-primary bg-primary btn-outline-default rounded-3 w-50 p-4 mt-5\"><span\r\n class=\"fw-bold fs-4\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\" viewBox=\"0 0 21 20\"\r\n fill=\"none\">\r\n <path\r\n d=\"M18 12.5V15.8333C18 16.2754 17.8244 16.6993 17.5118 17.0118C17.1993 17.3244 16.7754 17.5 16.3333 17.5H4.66667C4.22464 17.5 3.80072 17.3244 3.48816 17.0118C3.17559 16.6993 3 16.2754 3 15.8333V12.5M14.6667 6.66667L10.5 2.5M10.5 2.5L6.33333 6.66667M10.5 2.5V12.5\"\r\n stroke=\"white\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> \r\n <span class=\"text-white mx-2\">Upload To Add Multiple Teams</span></span>\r\n </label>\r\n <p class=\"text-gray-400 fw-bold my-3\">\r\n <span class=\"line-bg \"><svg width=\"224\" height=\"2\" viewBox=\"0 0 124 2\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"123.333\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span><span class=\"mx-2\">Or </span> <span class=\"line-bg \"><svg width=\"224\" height=\"2\" viewBox=\"0 0 124 2\"\r\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect y=\"0.5\" width=\"123.333\" height=\"1\" fill=\"#EAECF0\" />\r\n </svg>\r\n </span>\r\n </p>\r\n <input type=\"radio\" id=\"kt_account_team_size_select_1\" value=\"1-1\" (click)=\"createTeam()\"\r\n class=\"btn-check ng-untouched ng-pristine ng-valid\" />\r\n <label for=\"kt_account_team_size_select_1\"\r\n class=\"btn btn-outline btn-outline-default rounded-3 w-50 p-4 mt-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M9.99984 4.16675V15.8334M4.1665 10.0001H15.8332\" stroke=\"#101828\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n <span class=\"fw-bold fs-4 mx-2\">\r\n Add Single Team</span></label>\r\n </div>\r\n \r\n \r\n</div>\r\n</div>\r\n\r\n<div *ngIf=\"viewTeams && !showcreatebutton\">\r\n <lib-viewteams-list [teamData]=\"this.selectedTeam\"></lib-viewteams-list>\r\n</div>\r\n\r\n<ng-template #afterValidation let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"card-title mt-3\"><span class=\"config-heading fw-semibold w-auto\">Add Teams</span></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{getStoreCounts(excelData)}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Total Records</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div class=\"fw-semibold config-heading w-100\">{{excelData?.length}}</div>\r\n <div class=\"fw-semibold subtitle mt-1\">Rows processed</div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"popup-card rounded-3 p-3 flex-column h-80px\">\r\n <div [ngClass]=\"excelError?.error?.length \r\n ? 'fw-semibold text-error w-100 error-heading' \r\n : 'fw-semibold w-100 config-heading'\">\r\n {{ excelError?.error?.length || 0 }}\r\n </div>\r\n <div [ngClass]=\"excelError?.error?.length \r\n ? 'fw-semibold text-error mt-1 excel-error' \r\n : 'fw-semibold subtitle mt-1'\">\r\n Error\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!excelError?.error?.length\" class=\"table-header mt-5\" style=\"font-weight: 400;\">\r\n <div >You're about to add {{getStoreCounts(excelData)}} {{getStoreCounts(excelData) >1 ?'Teams':'Team'}}. Are you sure want to proceed?</div>\r\n \r\n </div>\r\n <div *ngIf=\"excelError?.error?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Invalid Details !</div>\r\n <div class=\"subtitle mt-5\">Please provide correct information.</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of excelError?.error; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.doesNotExists?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Data not exists !</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.doesNotExists; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"uploadErrors?.inActive?.length\" class=\"flex-column mt-5\">\r\n <div class=\"config-heading fw-bold\">Data inactive !</div>\r\n <div class=\"p-5 w-100 rounded-3 border-error mt-5 flex-column\">\r\n <div *ngFor=\"let error of uploadErrors?.inActive; let i = index; let last = last\" [ngClass]=\"!last ? 'mb-2' : ''\" class=\"text-error\">{{i + 1}}) {{error}}</div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify-content-end flex-wrap gap-2 pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline\" (click)=\"closeactivepopup()\">Cancel</button>\r\n <button *ngIf=\"!excelError?.error?.length\" class=\"btn btn-md py-3 btn-default ms-3 btn-primary\" (click)=\"validateDetails()\">Proceed</button>\r\n <button *ngIf=\"excelError?.error?.length\" class=\"btn py-3 btn-md btn-default ms-3 btn-danger\" (click)=\"file1.click()\">Reupload</button>\r\n <input style=\"display: none;\" #file1 type=\"file\" id=\"kt_account_team_size_select_2\" accept = \".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel\"\r\n (change)=\"onUpload($event)\" />\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #confirmDelete let-model>\r\n <div class=\"card border-0\">\r\n <div class=\"card-header border-0 mt-0\">\r\n <div class=\"mt-3\">\r\n <div class=\"mt-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\">\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" fill=\"#FEE4E2\"/>\r\n <rect x=\"4\" y=\"4\" width=\"48\" height=\"48\" rx=\"24\" stroke=\"#FEF3F2\" stroke-width=\"8\"/>\r\n <path d=\"M28 24V28M28 32H28.01M38 28C38 33.5228 33.5228 38 28 38C22.4772 38 18 33.5228 18 28C18 22.4772 22.4772 18 28 18C33.5228 18 38 22.4772 38 28Z\" stroke=\"#D92D20\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </div>\r\n <div class=\"config-heading fw-semibold mt-3 w-auto\">Delete {{teamId?.length}} {{teamId?.length > 1 ? 'Teams' : 'Team'}}? </div></div>\r\n </div>\r\n <div class=\"card-body pt-0 popup-scroll\">\r\n <div class=\"mt-5\">\r\n <div class=\"subtitle\" style=\"font-weight: 400;\">Are you sure you want to delete the selected team? This action cannot be undone.</div>\r\n </div>\r\n </div>\r\n <div class=\"card-footer border-0 d-flex justify justify-content-between pt-0\">\r\n <button class=\"btn btn-md btn-default btn-outline w-50 me-2\" (click)=\"model.close()\">Cancel</button>\r\n <button class=\"btn btn-md py-3 btn-default btn-danger w-50 ms-2\" (click)=\"model.close('submit')\">Delete</button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".inputcheck input[type=checkbox]{width:18px!important;height:18px!important;margin:0;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}.inputcheck input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}.inputcheck input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.5em;padding-left:0!important;padding-top:12px;padding-right:6px}.left-move{justify-content:end}.img-src{width:25%;height:20%}.w-25{width:15%!important}td.description{overflow:hidden;text-overflow:ellipsis;max-width:100px}table th{border-bottom:1px solid var(--Gray-200, #EAECF0)!important;background:var(--Gray-50, #F9FAFB)!important;color:var(--Gray-500, #667085)!important;font-size:12px!important;font-weight:500!important;line-height:0px!important}.rotate{rotate:180deg;transition:1s}td{line-height:30px}.rightcorner{position:absolute;top:10px;right:16px;font-size:18px}.user-text{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:400!important;line-height:20px}.table-header{color:var(--Gray-800, #1D2939);font-size:16px;font-weight:600;line-height:24px}.text-error{color:var(--Error-700, #B42318)!important;font-size:14px;font-weight:500;line-height:20px}.excel-error{color:var(--Error-600, #D92D20);font-size:14px;font-weight:500;line-height:20px}.error-heading{color:var(--Error-600, #D92D20);font-size:20px;font-weight:500;line-height:30px}.border-error{border:1px solid var(--Error-300, #FDA29B)!important;background:var(--Error-25, #FFFBFA)!important}.popup-card{border-radius:6px;border:1px solid var(--Gray-300, #D0D5DD);background:#fff;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.btn-delete{border:1px solid var(--Error-50, #FEF3F2);background:var(--Error-50, #FEF3F2);padding:12px 14px;box-shadow:0 1px 2px #1018280d;color:var(--Error-700, #B42318);font-size:14px;font-weight:600;line-height:20px}.alert-box{border-radius:4px;border-left:2px solid var(--Primary-600, #00A3FF);background:var(--Gray-100, #F2F4F7);box-shadow:0 4px 16px #0000001a;display:flex;height:68px;padding:6px 8px 6px 16px;justify-content:center;align-items:center;cursor:pointer;gap:8px;align-self:stretch;color:var(--Gray-500, #667085);font-size:14px;font-weight:600}.alert-box .selectAll{color:var(--Primary-700, #009BF3);font-size:15px;font-weight:700;text-decoration-line:underline;text-decoration-thickness:auto;text-underline-offset:auto}.popup-scroll{min-height:auto;max-height:400px;overflow-y:auto}.subtitle{color:var(--Gray-500, #667085)!important;font-size:14px!important;font-weight:500!important;line-height:20px!important}.config-heading{color:var(--Gray-900, #101828)!important;font-size:18px!important;font-weight:600!important;line-height:28px!important}\n"] }]
|
|
5619
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: ManageUsersService }, { type: ExcelService }, { type: i2.GlobalStateService }, { type: i4.ToastService }, { type: i3.Router }, { type: i1$1.NgbModal }], propDecorators: { dataTo: [{
|
|
5404
5620
|
type: Output
|
|
5405
5621
|
}], tooltipContent: [{
|
|
5406
5622
|
type: ViewChild,
|
|
@@ -5465,13 +5681,13 @@ class UsersManageComponent {
|
|
|
5465
5681
|
}
|
|
5466
5682
|
});
|
|
5467
5683
|
}
|
|
5468
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UsersManageComponent, deps: [{ token: ManageUsersService }, { token: i3
|
|
5684
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UsersManageComponent, deps: [{ token: ManageUsersService }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
5469
5685
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: UsersManageComponent, selector: "lib-users-manage", ngImport: i0, template: "<div class=\"card mb-5\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <div class=\"d-flex overflow-auto mb-2\">\r\n <ul class=\"nav nav-stretch nav-line-tabs1 nav-line-tabs flex-nowrap \" style=\"border-bottom: white!important;overflow-y: hidden;\">\r\n \r\n <li class=\"nav-item nav-item1\" (click)=\"selectedTabs('users')\">\r\n <a [ngClass]=\"selectedTab ==='users' ? 'active' :''\"\r\n class=\"nav-link nav-link1 cursor-pointer tab-title me-6\">Users <span class=\"blue-badge mx-2\" >{{ userCount ? userCount : '0'}}</span></a>\r\n </li>\r\n <li class=\"nav-item nav-item1\" (click)=\"selectedTabs('teams')\"><a\r\n [ngClass]=\"selectedTab ==='teams' ? 'active' :''\"\r\n class=\"nav-link nav-link1 cursor-pointer no-border tab-title me-6 \">Teams <span class=\"blue-badge mx-2\" >{{ teamCount ? teamCount : '0'}}</span></a>\r\n </li>\r\n \r\n </ul>\r\n </div>\r\n </div>\r\n <!-- <div class=\"card-header my-3 min-h-55px\">\r\n <ul class=\"nav nav-stretch nav-line-tabs1 nav-line-tabs flex-nowrap \">\r\n\r\n <li class=\"nav-item nav-item1\" (click)=\"selectedTabs('users')\" >\r\n <a [ngClass]=\"selectedTab ==='users' ? 'active' :''\"\r\n class=\"nav-link nav-link1 cursor-pointer tab-title me-6\">Users <span class=\"blue-badge mx-2\">{{ userCount ? userCount : '0'}}</span></a>\r\n </li>\r\n <li class=\"nav-item nav-item1\" (click)=\"selectedTabs('teams')\"><a\r\n [ngClass]=\"selectedTab ==='teams' ? 'active' :''\"\r\n class=\"nav-link nav-link1 cursor-pointer no-border tab-title me-6\">Teams <span class=\"blue-badge mx-2\">{{ teamCount ? teamCount : '0'}}</span></a>\r\n </li>\r\n\r\n </ul>\r\n </div> -->\r\n <div class=\"card-card pt-2 pb-1 \">\r\n <lib-users-list *ngIf=\"selectedTab ==='users'\" (dataToParent)=\"receiveData($event)\"></lib-users-list>\r\n <lib-teams-list *ngIf=\"selectedTab ==='teams'\" (dataTo)=\"receive($event)\"></lib-teams-list>\r\n </div>\r\n</div>", styles: [".nav-item1 .nav-link1.active{border:none;border-radius:0;background:var(--Primary-50, #EAF8FF);border-bottom:2px solid #009BF3!important;padding:12px}.nav-item1 .nav-link1:hover{border:none}.tab-title{color:var(--Primary-700, #009BF3)!important;font-size:16px!important;font-style:normal;font-weight:500;line-height:24px}.blue-badge{border-radius:16px!important;background:var(--Primary-50, #EAF8FF)!important;color:var(--Primary-700, #009BF3)!important;text-align:center;font-size:14px!important;font-style:normal;font-weight:500;line-height:20px;padding:2px 10px!important;mix-blend-mode:multiply!important}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UsersListComponent, selector: "lib-users-list", outputs: ["dataToParent"] }, { kind: "component", type: TeamsListComponent, selector: "lib-teams-list", outputs: ["dataTo"] }] });
|
|
5470
5686
|
}
|
|
5471
5687
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UsersManageComponent, decorators: [{
|
|
5472
5688
|
type: Component,
|
|
5473
5689
|
args: [{ selector: 'lib-users-manage', template: "<div class=\"card mb-5\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <div class=\"d-flex overflow-auto mb-2\">\r\n <ul class=\"nav nav-stretch nav-line-tabs1 nav-line-tabs flex-nowrap \" style=\"border-bottom: white!important;overflow-y: hidden;\">\r\n \r\n <li class=\"nav-item nav-item1\" (click)=\"selectedTabs('users')\">\r\n <a [ngClass]=\"selectedTab ==='users' ? 'active' :''\"\r\n class=\"nav-link nav-link1 cursor-pointer tab-title me-6\">Users <span class=\"blue-badge mx-2\" >{{ userCount ? userCount : '0'}}</span></a>\r\n </li>\r\n <li class=\"nav-item nav-item1\" (click)=\"selectedTabs('teams')\"><a\r\n [ngClass]=\"selectedTab ==='teams' ? 'active' :''\"\r\n class=\"nav-link nav-link1 cursor-pointer no-border tab-title me-6 \">Teams <span class=\"blue-badge mx-2\" >{{ teamCount ? teamCount : '0'}}</span></a>\r\n </li>\r\n \r\n </ul>\r\n </div>\r\n </div>\r\n <!-- <div class=\"card-header my-3 min-h-55px\">\r\n <ul class=\"nav nav-stretch nav-line-tabs1 nav-line-tabs flex-nowrap \">\r\n\r\n <li class=\"nav-item nav-item1\" (click)=\"selectedTabs('users')\" >\r\n <a [ngClass]=\"selectedTab ==='users' ? 'active' :''\"\r\n class=\"nav-link nav-link1 cursor-pointer tab-title me-6\">Users <span class=\"blue-badge mx-2\">{{ userCount ? userCount : '0'}}</span></a>\r\n </li>\r\n <li class=\"nav-item nav-item1\" (click)=\"selectedTabs('teams')\"><a\r\n [ngClass]=\"selectedTab ==='teams' ? 'active' :''\"\r\n class=\"nav-link nav-link1 cursor-pointer no-border tab-title me-6\">Teams <span class=\"blue-badge mx-2\">{{ teamCount ? teamCount : '0'}}</span></a>\r\n </li>\r\n\r\n </ul>\r\n </div> -->\r\n <div class=\"card-card pt-2 pb-1 \">\r\n <lib-users-list *ngIf=\"selectedTab ==='users'\" (dataToParent)=\"receiveData($event)\"></lib-users-list>\r\n <lib-teams-list *ngIf=\"selectedTab ==='teams'\" (dataTo)=\"receive($event)\"></lib-teams-list>\r\n </div>\r\n</div>", styles: [".nav-item1 .nav-link1.active{border:none;border-radius:0;background:var(--Primary-50, #EAF8FF);border-bottom:2px solid #009BF3!important;padding:12px}.nav-item1 .nav-link1:hover{border:none}.tab-title{color:var(--Primary-700, #009BF3)!important;font-size:16px!important;font-style:normal;font-weight:500;line-height:24px}.blue-badge{border-radius:16px!important;background:var(--Primary-50, #EAF8FF)!important;color:var(--Primary-700, #009BF3)!important;text-align:center;font-size:14px!important;font-style:normal;font-weight:500;line-height:20px;padding:2px 10px!important;mix-blend-mode:multiply!important}\n"] }]
|
|
5474
|
-
}], ctorParameters: () => [{ type: ManageUsersService }, { type: i3
|
|
5690
|
+
}], ctorParameters: () => [{ type: ManageUsersService }, { type: i3.ActivatedRoute }] });
|
|
5475
5691
|
|
|
5476
5692
|
class AuditUserListComponent {
|
|
5477
5693
|
modalService;
|
|
@@ -5653,7 +5869,7 @@ class AuditUserListComponent {
|
|
|
5653
5869
|
this.dataEmitter.emit(this.viewuser);
|
|
5654
5870
|
}
|
|
5655
5871
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuditUserListComponent, deps: [{ token: i1$1.NgbModal }, { token: i0.ChangeDetectorRef }, { token: i4.ToastService }, { token: i2.GlobalStateService }, { token: UserService }, { token: ExcelService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5656
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: AuditUserListComponent, selector: "lib-audit-user-list", inputs: { viewuser: "viewuser", userDetails: "userDetails" }, outputs: { dataEmitter: "dataEmitter" }, ngImport: i0, template: "<div class=\"card p-0 rounded-3 mb-5\">\r\n <div class=\"card-header border-0\">\r\n <div class=\"card-title m-0\">\r\n <div class=\"d-flex align-items-center\">\r\n <span (click)=\"backTosummary()\" class=\"btn me-3 px-2 py-2 btn-outline\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M15.8332 10H4.1665M4.1665 10L9.99984 15.8333M4.1665 10L9.99984 4.16667\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n <span *ngIf=\"userData?.userName\" class=\"me-3 fw-bold\">{{(userDetails?.userName ? userDetails?.userName : userDetails?.userName) | titlecase}}</span> <span\r\n class=\"badge me-3 badge-light-default\">{{userData?.tangoUserType | titlecase}}</span><span\r\n class=\"badge me-3 badge-light-success\">{{userData?.role | titlecase}}</span>\r\n <span *ngIf=\"userData?.email\" class=\"me-3\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\"\r\n height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path\r\n d=\"M14.6668 4.00001C14.6668 3.26667 14.0668 2.66667 13.3335 2.66667H2.66683C1.9335 2.66667 1.3335 3.26667 1.3335 4.00001M14.6668 4.00001V12C14.6668 12.7333 14.0668 13.3333 13.3335 13.3333H2.66683C1.9335 13.3333 1.3335 12.7333 1.3335 12V4.00001M14.6668 4.00001L8.00016 8.66667L1.3335 4.00001\"\r\n stroke=\"#667085\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> <span class=\"ms-2 top-list\">{{userData?.email}}</span></span>\r\n <span *ngIf=\"userData?.mobileNumber\" class=\"me-3\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\"\r\n height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_8096_7888)\">\r\n <path\r\n d=\"M16.5001 12.69V14.94C16.5009 15.1489 16.4581 15.3556 16.3745 15.547C16.2908 15.7384 16.168 15.9102 16.0141 16.0514C15.8602 16.1926 15.6785 16.3001 15.4806 16.367C15.2828 16.4339 15.0731 16.4588 14.8651 16.44C12.5572 16.1892 10.3403 15.4006 8.39257 14.1375C6.58044 12.986 5.04407 11.4496 3.89257 9.6375C2.62506 7.6809 1.83625 5.45324 1.59007 3.135C1.57133 2.9276 1.59598 2.71857 1.66245 2.52121C1.72892 2.32386 1.83575 2.14251 1.97615 1.98871C2.11654 1.83491 2.28743 1.71203 2.47792 1.62789C2.6684 1.54375 2.87433 1.50019 3.08257 1.5H5.33257C5.69655 1.49641 6.04942 1.62531 6.32539 1.86265C6.60137 2.09999 6.78163 2.42958 6.83257 2.79C6.92754 3.51005 7.10366 4.21704 7.35757 4.8975C7.45848 5.16594 7.48032 5.45768 7.4205 5.73816C7.36069 6.01863 7.22172 6.27608 7.02007 6.48L6.06757 7.4325C7.13524 9.31016 8.68991 10.8648 10.5676 11.9325L11.5201 10.98C11.724 10.7783 11.9814 10.6394 12.2619 10.5796C12.5424 10.5197 12.8341 10.5416 13.1026 10.6425C13.783 10.8964 14.49 11.0725 15.2101 11.1675C15.5744 11.2189 15.9071 11.4024 16.145 11.6831C16.3828 11.9638 16.5092 12.3222 16.5001 12.69Z\"\r\n stroke=\"#667085\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_8096_7888\">\r\n <rect width=\"18\" height=\"18\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg> <span class=\"ms-2 top-list\">{{userData?.mobileNumber }}</span></span>\r\n <span *ngIf=\"userData?.clientAssigned\" class=\"me-3\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\"\r\n height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <path\r\n d=\"M12.75 15.75V14.25C12.75 13.4544 12.4339 12.6913 11.8713 12.1287C11.3087 11.5661 10.5456 11.25 9.75 11.25H3.75C2.95435 11.25 2.19129 11.5661 1.62868 12.1287C1.06607 12.6913 0.75 13.4544 0.75 14.25V15.75M17.25 15.75V14.25C17.2495 13.5853 17.0283 12.9396 16.621 12.4142C16.2138 11.8889 15.6436 11.5137 15 11.3475M12 2.3475C12.6453 2.51273 13.2173 2.88803 13.6257 3.41423C14.0342 3.94044 14.2559 4.58762 14.2559 5.25375C14.2559 5.91988 14.0342 6.56706 13.6257 7.09327C13.2173 7.61947 12.6453 7.99477 12 8.16M9.75 5.25C9.75 6.90685 8.40685 8.25 6.75 8.25C5.09315 8.25 3.75 6.90685 3.75 5.25C3.75 3.59315 5.09315 2.25 6.75 2.25C8.40685 2.25 9.75 3.59315 9.75 5.25Z\"\r\n stroke=\"#667085\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 top-list\">Clients Assigned:{{userData?.clientAssigned ?? 0}}</span></span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"card p-3 rounded-3 mb-5\">\r\n <div class=\"w-100 p-5 bg-highlighted d-flex align-items-center\">\r\n <span class=\"fw-bold text-highlighted\">\u20B9 {{consolidatedData?.totalCredit ? consolidatedData?.totalCredit.toFixed(2) : 0}}</span><span\r\n class=\"fw-semibold text-sub ms-3\">{{consolidatedData?.message}}\r\n <!-- {{headerFilter?.date?.startDate}} \u2013 {{headerFilter?.date?.endDate}} -->\r\n </span>\r\n </div>\r\n <div class=\"d-flex justify-content-between align-items-center px-5 py-5\">\r\n <div class=\"Boxes\">\r\n <div class=\"box-header\">{{consolidatedData?.totalFiles ?? 0}}</div>\r\n <div class=\"box-label fw-semibold\">Total Files</div>\r\n </div>\r\n <div class=\"Boxes\">\r\n <div class=\"box-header\">{{consolidatedData?.totalBC ?? 0}}</div>\r\n <div class=\"box-label fw-semibold\">Before Count</div>\r\n </div>\r\n <div class=\"Boxes\">\r\n <div class=\"box-header\">{{consolidatedData?.totalAC ?? 0}}</div>\r\n <div class=\"box-label fw-semibold\">After Count</div>\r\n </div>\r\n <div class=\"Boxes\">\r\n <div class=\"box-header\">{{consolidatedData?.totalEarnings ? consolidatedData?.totalEarnings.toFixed(2) : 0}}</div>\r\n <div class=\"box-label fw-semibold\">Total Earnings</div>\r\n </div>\r\n <div class=\"Boxes\">\r\n <div class=\"box-header\">{{consolidatedData?.totalReducedAmount ? consolidatedData?.totalReducedAmount.toFixed(2) : 0}}</div>\r\n <div class=\"box-label fw-semibold\">Total Reduced Amount</div>\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"card\">\r\n <div class=\"card-header border-0 pt-3 mb-5\">\r\n <div class=\"card-title d-grid\">\r\n <div class=\"title\">Summary Table</div>\r\n <div class=\"text-sub\">Based on {{headerFilter?.date?.startDate | date:'dd MMM, yyyy'}} \u2013 {{headerFilter?.date?.endDate | date:'dd MMM, yyyy'}}</div>\r\n </div>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n @if (!loading && !noData) {\r\n <!-- @if ((gs.userAccess |async)?.Global_User_isEdit) { -->\r\n <button *ngIf=\"!noData && !loading\" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default px-4 py-3 mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M8.125 13.125H16.3562L14.7438 14.7438L15.625 15.625L18.75 12.5L15.625 9.375L14.7438 10.2562L16.3562 11.875H8.125V13.125Z\"\r\n fill=\"black\" />\r\n <path\r\n d=\"M13.75 8.75V6.25C13.7505 6.16775 13.7347 6.08621 13.7036 6.01006C13.6725 5.93391 13.6267 5.86465 13.5688 5.80625L9.19375 1.43125C9.13535 1.37333 9.06609 1.3275 8.98994 1.2964C8.91379 1.26529 8.83225 1.24953 8.75 1.25H2.5C2.16848 1.25 1.85054 1.3817 1.61612 1.61612C1.3817 1.85054 1.25 2.16848 1.25 2.5V17.5C1.25 17.8315 1.3817 18.1495 1.61612 18.3839C1.85054 18.6183 2.16848 18.75 2.5 18.75H12.5C12.8315 18.75 13.1495 18.6183 13.3839 18.3839C13.6183 18.1495 13.75 17.8315 13.75 17.5V16.25H12.5V17.5H2.5V2.5H7.5V6.25C7.5 6.58152 7.6317 6.89947 7.86612 7.13389C8.10054 7.36831 8.41848 7.5 8.75 7.5H12.5V8.75H13.75ZM8.75 6.25V2.75625L12.2438 6.25H8.75Z\"\r\n fill=\"black\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n <!-- } -->\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('fileDate')\">File Date\r\n <svg [ngClass]=\"sortColumName === 'fileDate' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'fileDate' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalFilesCount')\">Total Files\r\n <svg [ngClass]=\"sortColumName === 'totalFilesCount' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalFilesCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalBeforeCount')\">Total BC\r\n <svg [ngClass]=\"sortColumName === 'totalBeforeCount' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalBeforeCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalAfterCount')\">Total AC\r\n <svg [ngClass]=\"sortColumName === 'totalAfterCount' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalAfterCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalEarn')\">Total Earnings(Rs)\r\n <svg [ngClass]=\"sortColumName === 'totalEarn' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalEarn' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionByMinimumTarget')\">Deduction by Minimum\r\n Target\r\n <svg [ngClass]=\"sortColumName === 'deductionByMinimumTarget' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionByMinimumTarget' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionByMapping')\">Deduction by Mapping\r\n <svg [ngClass]=\"sortColumName === 'deductionByMapping' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionByMapping' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionByLateLogin')\">Deduction by Late Login\r\n <svg [ngClass]=\"sortColumName === 'deductionByLateLogin' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionByLateLogin' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalReducedAmount')\">Total Reduced Amount\r\n <svg [ngClass]=\"sortColumName === 'totalReducedAmount' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalReducedAmount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalCredit')\">Total Credit\r\n <svg [ngClass]=\"sortColumName === 'totalCredit' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalCredit' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td>{{user?.fileDate ?? '--'}}</td>\r\n <td>{{user?.totalFilesCount ?? '--'}}</td>\r\n <td>{{user?.totalBeforeCount ?? '--'}}</td>\r\n <td>{{user?.totalAfterCount ?? '--'}}</td>\r\n <td>{{user?.totalEarn ? user?.totalEarn.toFixed(2) : 0}}</td>\r\n <td>{{user?.deductionByMinimumTarget ? user?.deductionByMinimumTarget.toFixed(2) : 0}}</td>\r\n <td>{{user?.deductionByMapping ? user?.deductionByMapping.toFixed(2) : 0}}</td>\r\n <td>{{user.deductionByLateLogin ? user.deductionByLateLogin.toFixed(2) : 0}}\r\n </td>\r\n <td>{{user?.totalReducedAmount ? user?.totalReducedAmount.toFixed(2) : 0}}</td>\r\n <td>{{user?.totalCredit ? user?.totalCredit.toFixed(2) : 0}}</td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <!-- <div class=\"row\"> -->\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-nodata\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodata-title\">No data found</div>\r\n <div class=\"nodata-sub\">There is no result for this Date</div>\r\n </div>\r\n </div>\r\n <!-- </div> -->\r\n </div>\r\n</div>", styles: [".Boxes .box-header{color:var(--Black, #101828);font-size:20px;font-weight:700;line-height:30px}.Boxes .box-label{color:var(--Black, #101828);font-size:14px;line-height:20px}.card-title .title{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.card-title .text-sub{color:var(--Gray-500, #667085);font-size:14px;font-weight:400;line-height:20px}.bg-highlighted{border-radius:6px;border-bottom:2px solid var(--Gray-200, #EAECF0);background:radial-gradient(206.89% 107.47% at 16.16% 32.77%,#fff6,#45bbfe33),#f2f4f7;box-shadow:0 4px 10px #0000000d;padding:8px 16px}.text-highlighted{color:var(--Black, #101828);font-size:30px;line-height:38px}.text-sub{color:var(--Gray-700, #344054);font-size:14px;line-height:20px}.top-list{color:var(--Gray-500, #667085);font-size:12px;font-weight:500;line-height:18px}.nav-line-tabs .activated{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.nav-line-tabs .activated a{color:var(--Primary-700, #009BF3)!important}.nav-line-tabs .activated :hover,.nav-item,.nav-item .nav-link:hover{border:0px!important}.nav-line-tabs :hover{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:16px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i6.DatePipe, name: "date" }] });
|
|
5872
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: AuditUserListComponent, selector: "lib-audit-user-list", inputs: { viewuser: "viewuser", userDetails: "userDetails" }, outputs: { dataEmitter: "dataEmitter" }, ngImport: i0, template: "<div class=\"card p-0 rounded-3 mb-5\">\r\n <div class=\"card-header border-0\">\r\n <div class=\"card-title m-0\">\r\n <div class=\"d-flex align-items-center\">\r\n <span (click)=\"backTosummary()\" class=\"btn me-3 px-2 py-2 btn-outline\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M15.8332 10H4.1665M4.1665 10L9.99984 15.8333M4.1665 10L9.99984 4.16667\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n <span *ngIf=\"userData?.userName\" class=\"me-3 fw-bold\">{{(userDetails?.userName ? userDetails?.userName : userDetails?.userName) | titlecase}}</span> <span\r\n class=\"badge me-3 badge-light-default\">{{userData?.tangoUserType | titlecase}}</span><span\r\n class=\"badge me-3 badge-light-success\">{{userData?.role | titlecase}}</span>\r\n <span *ngIf=\"userData?.email\" class=\"me-3\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\"\r\n height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path\r\n d=\"M14.6668 4.00001C14.6668 3.26667 14.0668 2.66667 13.3335 2.66667H2.66683C1.9335 2.66667 1.3335 3.26667 1.3335 4.00001M14.6668 4.00001V12C14.6668 12.7333 14.0668 13.3333 13.3335 13.3333H2.66683C1.9335 13.3333 1.3335 12.7333 1.3335 12V4.00001M14.6668 4.00001L8.00016 8.66667L1.3335 4.00001\"\r\n stroke=\"#667085\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg> <span class=\"ms-2 top-list\">{{userData?.email}}</span></span>\r\n <span *ngIf=\"userData?.mobileNumber\" class=\"me-3\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\"\r\n height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_8096_7888)\">\r\n <path\r\n d=\"M16.5001 12.69V14.94C16.5009 15.1489 16.4581 15.3556 16.3745 15.547C16.2908 15.7384 16.168 15.9102 16.0141 16.0514C15.8602 16.1926 15.6785 16.3001 15.4806 16.367C15.2828 16.4339 15.0731 16.4588 14.8651 16.44C12.5572 16.1892 10.3403 15.4006 8.39257 14.1375C6.58044 12.986 5.04407 11.4496 3.89257 9.6375C2.62506 7.6809 1.83625 5.45324 1.59007 3.135C1.57133 2.9276 1.59598 2.71857 1.66245 2.52121C1.72892 2.32386 1.83575 2.14251 1.97615 1.98871C2.11654 1.83491 2.28743 1.71203 2.47792 1.62789C2.6684 1.54375 2.87433 1.50019 3.08257 1.5H5.33257C5.69655 1.49641 6.04942 1.62531 6.32539 1.86265C6.60137 2.09999 6.78163 2.42958 6.83257 2.79C6.92754 3.51005 7.10366 4.21704 7.35757 4.8975C7.45848 5.16594 7.48032 5.45768 7.4205 5.73816C7.36069 6.01863 7.22172 6.27608 7.02007 6.48L6.06757 7.4325C7.13524 9.31016 8.68991 10.8648 10.5676 11.9325L11.5201 10.98C11.724 10.7783 11.9814 10.6394 12.2619 10.5796C12.5424 10.5197 12.8341 10.5416 13.1026 10.6425C13.783 10.8964 14.49 11.0725 15.2101 11.1675C15.5744 11.2189 15.9071 11.4024 16.145 11.6831C16.3828 11.9638 16.5092 12.3222 16.5001 12.69Z\"\r\n stroke=\"#667085\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_8096_7888\">\r\n <rect width=\"18\" height=\"18\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg> <span class=\"ms-2 top-list\">{{userData?.mobileNumber }}</span></span>\r\n <span *ngIf=\"userData?.clientAssigned\" class=\"me-3\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\"\r\n height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <path\r\n d=\"M12.75 15.75V14.25C12.75 13.4544 12.4339 12.6913 11.8713 12.1287C11.3087 11.5661 10.5456 11.25 9.75 11.25H3.75C2.95435 11.25 2.19129 11.5661 1.62868 12.1287C1.06607 12.6913 0.75 13.4544 0.75 14.25V15.75M17.25 15.75V14.25C17.2495 13.5853 17.0283 12.9396 16.621 12.4142C16.2138 11.8889 15.6436 11.5137 15 11.3475M12 2.3475C12.6453 2.51273 13.2173 2.88803 13.6257 3.41423C14.0342 3.94044 14.2559 4.58762 14.2559 5.25375C14.2559 5.91988 14.0342 6.56706 13.6257 7.09327C13.2173 7.61947 12.6453 7.99477 12 8.16M9.75 5.25C9.75 6.90685 8.40685 8.25 6.75 8.25C5.09315 8.25 3.75 6.90685 3.75 5.25C3.75 3.59315 5.09315 2.25 6.75 2.25C8.40685 2.25 9.75 3.59315 9.75 5.25Z\"\r\n stroke=\"#667085\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 top-list\">Clients Assigned:{{userData?.clientAssigned ?? 0}}</span></span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"card p-3 rounded-3 mb-5\">\r\n <div class=\"w-100 p-5 bg-highlighted d-flex align-items-center\">\r\n <span class=\"fw-bold text-highlighted\">\u20B9 {{consolidatedData?.totalCredit ? consolidatedData?.totalCredit.toFixed(2) : 0}}</span><span\r\n class=\"fw-semibold text-sub ms-3\">{{consolidatedData?.message}}\r\n <!-- {{headerFilter?.date?.startDate}} \u2013 {{headerFilter?.date?.endDate}} -->\r\n </span>\r\n </div>\r\n <div class=\"d-flex justify-content-between align-items-center px-5 py-5\">\r\n <div class=\"Boxes\">\r\n <div class=\"box-header\">{{consolidatedData?.totalFiles ?? 0}}</div>\r\n <div class=\"box-label fw-semibold\">Total Files</div>\r\n </div>\r\n <div class=\"Boxes\">\r\n <div class=\"box-header\">{{consolidatedData?.totalBC ?? 0}}</div>\r\n <div class=\"box-label fw-semibold\">Before Count</div>\r\n </div>\r\n <div class=\"Boxes\">\r\n <div class=\"box-header\">{{consolidatedData?.totalAC ?? 0}}</div>\r\n <div class=\"box-label fw-semibold\">After Count</div>\r\n </div>\r\n <div class=\"Boxes\">\r\n <div class=\"box-header\">{{consolidatedData?.totalEarnings ? consolidatedData?.totalEarnings.toFixed(2) : 0}}</div>\r\n <div class=\"box-label fw-semibold\">Total Earnings</div>\r\n </div>\r\n <div class=\"Boxes\">\r\n <div class=\"box-header\">{{consolidatedData?.totalReducedAmount ? consolidatedData?.totalReducedAmount.toFixed(2) : 0}}</div>\r\n <div class=\"box-label fw-semibold\">Total Reduced Amount</div>\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"card\">\r\n <div class=\"card-header border-0 pt-3 mb-5\">\r\n <div class=\"card-title d-grid\">\r\n <div class=\"title\">Summary Table</div>\r\n <div class=\"text-sub\">Based on {{headerFilter?.date?.startDate | date:'dd MMM, yyyy'}} \u2013 {{headerFilter?.date?.endDate | date:'dd MMM, yyyy'}}</div>\r\n </div>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n @if (!loading && !noData) {\r\n <!-- @if ((gs.userAccess |async)?.Global_User_isEdit) { -->\r\n <button *ngIf=\"!noData && !loading\" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn btn-default px-4 py-3 mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M8.125 13.125H16.3562L14.7438 14.7438L15.625 15.625L18.75 12.5L15.625 9.375L14.7438 10.2562L16.3562 11.875H8.125V13.125Z\"\r\n fill=\"black\" />\r\n <path\r\n d=\"M13.75 8.75V6.25C13.7505 6.16775 13.7347 6.08621 13.7036 6.01006C13.6725 5.93391 13.6267 5.86465 13.5688 5.80625L9.19375 1.43125C9.13535 1.37333 9.06609 1.3275 8.98994 1.2964C8.91379 1.26529 8.83225 1.24953 8.75 1.25H2.5C2.16848 1.25 1.85054 1.3817 1.61612 1.61612C1.3817 1.85054 1.25 2.16848 1.25 2.5V17.5C1.25 17.8315 1.3817 18.1495 1.61612 18.3839C1.85054 18.6183 2.16848 18.75 2.5 18.75H12.5C12.8315 18.75 13.1495 18.6183 13.3839 18.3839C13.6183 18.1495 13.75 17.8315 13.75 17.5V16.25H12.5V17.5H2.5V2.5H7.5V6.25C7.5 6.58152 7.6317 6.89947 7.86612 7.13389C8.10054 7.36831 8.41848 7.5 8.75 7.5H12.5V8.75H13.75ZM8.75 6.25V2.75625L12.2438 6.25H8.75Z\"\r\n fill=\"black\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n <!-- } -->\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('fileDate')\">File Date\r\n <svg [ngClass]=\"sortColumName === 'fileDate' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'fileDate' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalFilesCount')\">Total Files\r\n <svg [ngClass]=\"sortColumName === 'totalFilesCount' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalFilesCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalBeforeCount')\">Total BC\r\n <svg [ngClass]=\"sortColumName === 'totalBeforeCount' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalBeforeCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalAfterCount')\">Total AC\r\n <svg [ngClass]=\"sortColumName === 'totalAfterCount' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalAfterCount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalEarn')\">Total Earnings(Rs)\r\n <svg [ngClass]=\"sortColumName === 'totalEarn' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalEarn' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionByMinimumTarget')\">Deduction by Minimum\r\n Target\r\n <svg [ngClass]=\"sortColumName === 'deductionByMinimumTarget' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionByMinimumTarget' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionByMapping')\">Deduction by Mapping\r\n <svg [ngClass]=\"sortColumName === 'deductionByMapping' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionByMapping' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionByLateLogin')\">Deduction by Late Login\r\n <svg [ngClass]=\"sortColumName === 'deductionByLateLogin' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionByLateLogin' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalReducedAmount')\">Total Reduced Amount\r\n <svg [ngClass]=\"sortColumName === 'totalReducedAmount' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalReducedAmount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalCredit')\">Total Credit\r\n <svg [ngClass]=\"sortColumName === 'totalCredit' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalCredit' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td>{{user?.fileDate ?? '--'}}</td>\r\n <td>{{user?.totalFilesCount ?? '--'}}</td>\r\n <td>{{user?.totalBeforeCount ?? '--'}}</td>\r\n <td>{{user?.totalAfterCount ?? '--'}}</td>\r\n <td>{{user?.totalEarn ? user?.totalEarn.toFixed(2) : 0}}</td>\r\n <td>{{user?.deductionByMinimumTarget ? user?.deductionByMinimumTarget.toFixed(2) : 0}}</td>\r\n <td>{{user?.deductionByMapping ? user?.deductionByMapping.toFixed(2) : 0}}</td>\r\n <td>{{user.deductionByLateLogin ? user.deductionByLateLogin.toFixed(2) : 0}}\r\n </td>\r\n <td>{{user?.totalReducedAmount ? user?.totalReducedAmount.toFixed(2) : 0}}</td>\r\n <td>{{user?.totalCredit ? user?.totalCredit.toFixed(2) : 0}}</td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <!-- <div class=\"row\"> -->\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-nodata\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodata-title\">No data found</div>\r\n <div class=\"nodata-sub\">There is no result for this Date</div>\r\n </div>\r\n </div>\r\n <!-- </div> -->\r\n </div>\r\n</div>", styles: [".Boxes .box-header{color:var(--Black, #101828);font-size:20px;font-weight:700;line-height:30px}.Boxes .box-label{color:var(--Black, #101828);font-size:14px;line-height:20px}.card-title .title{color:var(--Gray-900, #101828);font-size:18px;font-weight:600;line-height:28px}.card-title .text-sub{color:var(--Gray-500, #667085);font-size:14px;font-weight:400;line-height:20px}.bg-highlighted{border-radius:6px;border-bottom:2px solid var(--Gray-200, #EAECF0);background:radial-gradient(206.89% 107.47% at 16.16% 32.77%,#fff6,#45bbfe33),#f2f4f7;box-shadow:0 4px 10px #0000000d;padding:8px 16px}.text-highlighted{color:var(--Black, #101828);font-size:30px;line-height:38px}.text-sub{color:var(--Gray-700, #344054);font-size:14px;line-height:20px}.top-list{color:var(--Gray-500, #667085);font-size:12px;font-weight:500;line-height:18px}.nav-line-tabs .activated{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.nav-line-tabs .activated a{color:var(--Primary-700, #009BF3)!important}.nav-line-tabs .activated :hover,.nav-item,.nav-item .nav-link:hover{border:0px!important}.nav-line-tabs :hover{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:16px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "pipe", type: i6.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i6.DatePipe, name: "date" }] });
|
|
5657
5873
|
}
|
|
5658
5874
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuditUserListComponent, decorators: [{
|
|
5659
5875
|
type: Component,
|
|
@@ -5854,7 +6070,7 @@ class AuditUserEarningsComponent {
|
|
|
5854
6070
|
this.loadTable();
|
|
5855
6071
|
}
|
|
5856
6072
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuditUserEarningsComponent, deps: [{ token: i1$1.NgbModal }, { token: i0.ChangeDetectorRef }, { token: i2.GlobalStateService }, { token: i4.ToastService }, { token: UserService }, { token: ExcelService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5857
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: AuditUserEarningsComponent, selector: "lib-audit-user-earnings", ngImport: i0, template: "<div *ngIf=\"!viewuser\" class=\"card\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <div class=\"d-flex overflow-auto h-50px\">\r\n <ul\r\n class=\"nav nav-stretch w-100 nav-line-tabs nav-line-tabs-2x border-bottom-2 fs-5 fw-bolder flex-nowrap\">\r\n <li class=\"nav-item cursor-pointer px-5 me-5 text-center\"><a routerLink=\"/manage/users/tango\"\r\n class=\"nav-link mx-0 text-active-primary\">Users</a>\r\n </li>\r\n <li class=\"nav-item activated px-5 me-5 bg-light-primary cursor-pointer\"><a\r\n class=\"nav-link text-active-primary mx-0\">Audit Users\r\n Summary</a>\r\n </li>\r\n </ul>\r\n </div>\r\n <span class=\"text-sub mb-2 mt-5\">{{pagination?.totalCount}} total users</span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n @if (!loading && !noData) {\r\n <!-- @if ((gs.userAccess |async)?.Global_User_isEdit) { -->\r\n <button *ngIf=\"!noData && !loading\" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn py-3 px-4 btn-default mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M8.125 13.125H16.3562L14.7438 14.7438L15.625 15.625L18.75 12.5L15.625 9.375L14.7438 10.2562L16.3562 11.875H8.125V13.125Z\"\r\n fill=\"black\" />\r\n <path\r\n d=\"M13.75 8.75V6.25C13.7505 6.16775 13.7347 6.08621 13.7036 6.01006C13.6725 5.93391 13.6267 5.86465 13.5688 5.80625L9.19375 1.43125C9.13535 1.37333 9.06609 1.3275 8.98994 1.2964C8.91379 1.26529 8.83225 1.24953 8.75 1.25H2.5C2.16848 1.25 1.85054 1.3817 1.61612 1.61612C1.3817 1.85054 1.25 2.16848 1.25 2.5V17.5C1.25 17.8315 1.3817 18.1495 1.61612 18.3839C1.85054 18.6183 2.16848 18.75 2.5 18.75H12.5C12.8315 18.75 13.1495 18.6183 13.3839 18.3839C13.6183 18.1495 13.75 17.8315 13.75 17.5V16.25H12.5V17.5H2.5V2.5H7.5V6.25C7.5 6.58152 7.6317 6.89947 7.86612 7.13389C8.10054 7.36831 8.41848 7.5 8.75 7.5H12.5V8.75H13.75ZM8.75 6.25V2.75625L12.2438 6.25H8.75Z\"\r\n fill=\"black\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n\r\n <!-- <button *ngIf=\"!noData && !loading\" type=\"button\" (click)=\"generateReport()\"\r\n class=\"btn py-3 px-4 btn-default mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val\"><span\r\n class=\"ms-2\">Generate</span> </button> -->\r\n\r\n\r\n <!-- } -->\r\n }\r\n @if ((gs.userAccess | async)?.Global_User_isAdd) {\r\n <button type=\"button\" (click)=\"addUsers('add')\"\r\n class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Add User</span> </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Name\r\n <svg [ngClass]=\"sortColumName === 'userName' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('fileDateFrom')\">File Date From\r\n <svg [ngClass]=\"sortColumName === 'fileDateFrom' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'fileDateFrom' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('fileDateTo')\">File Date To\r\n <svg [ngClass]=\"sortColumName === 'fileDateTo' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'fileDateTo' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('noOfDays')\">No.of Days\r\n <svg [ngClass]=\"sortColumName === 'noOfDays' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'noOfDays' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalFiles')\">Total Files\r\n <svg [ngClass]=\"sortColumName === 'totalFiles' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalFiles' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalBC')\">Total BC\r\n <svg [ngClass]=\"sortColumName === 'totalBC' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalBC' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalAC')\">Total AC\r\n <svg [ngClass]=\"sortColumName === 'totalAC' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalAC' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalEarnings')\">Total Earnings(Rs)\r\n <svg [ngClass]=\"sortColumName === 'totalEarnings' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalEarnings' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('bcCredit')\">BC Credit\r\n <svg [ngClass]=\"sortColumName === 'bcCredit' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'bcCredit' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('acCredit')\">AC Credit\r\n <svg [ngClass]=\"sortColumName === 'acCredit' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'acCredit' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionbyMinimumTarget')\">Deduction by Minimum\r\n Target\r\n <svg [ngClass]=\"sortColumName === 'deductionbyMinimumTarget' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionbyMinimumTarget' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionbyMapping')\">Deduction by Mapping\r\n <svg [ngClass]=\"sortColumName === 'deductionbyMapping' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionbyMapping' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionbyLateLogin')\">Deduction by Late Login\r\n <svg [ngClass]=\"sortColumName === 'deductionbyLateLogin' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionbyLateLogin' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalReducedAmount')\">Total Reduced Amount\r\n <svg [ngClass]=\"sortColumName === 'totalReducedAmount' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalReducedAmount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalCredit')\">Total Credit\r\n <svg [ngClass]=\"sortColumName === 'totalCredit' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalCredit' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th>Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td>{{user?.userName ? user?.userName : '--'}}</td>\r\n <td>{{user?.fileDateFrom ? user?.fileDateFrom : '--'}}</td>\r\n <td>{{user?.fileDateTo ? user?.fileDateTo : '--'}}</td>\r\n <td>{{user?.noOfDays ? user?.noOfDays : 0}}</td>\r\n <td>{{user?.totalFiles ?? '--'}}</td>\r\n <td>{{user?.totalBC ?? '--'}}</td>\r\n <td>{{user?.totalAC ?? '--'}}</td>\r\n <td>{{user?.totalEarnings ? user?.totalEarnings.toFixed(2) : 0}}</td>\r\n <td>{{user.bcCredit ? user.bcCredit.toFixed(2) : 0}}</td>\r\n <td>{{user?.acCredit ? user?.acCredit.toFixed(2) : 0}}</td>\r\n <td>{{user?.deductionbyMinimumTarget ? user?.deductionbyMinimumTarget.toFixed(2) : 0}}</td>\r\n <td>{{user?.deductionbyMapping ? user?.deductionbyMapping.toFixed(2) : 0}}</td>\r\n <td>{{user?.deductionbyLateLogin ? user?.deductionbyLateLogin.toFixed(2) : 0}}</td>\r\n <td>{{user?.totalReducedAmount ? user?.totalReducedAmount.toFixed(2) : 0}}</td>\r\n <td>{{user?.totalCredit ? user?.totalCredit.toFixed(2) : 0}}</td>\r\n <td>\r\n <div class=\"d-flex\">\r\n <span class=\"cursor-pointer\" (click)=\"Viewusers('view',user)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1995_16400)\">\r\n <path\r\n d=\"M1.33325 10C1.33325 10 4.66658 3.33337 10.4999 3.33337C16.3333 3.33337 19.6666 10 19.6666 10C19.6666 10 16.3333 16.6667 10.4999 16.6667C4.66658 16.6667 1.33325 10 1.33325 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10.4999 12.5C11.8806 12.5 12.9999 11.3808 12.9999 10C12.9999 8.61933 11.8806 7.50004 10.4999 7.50004C9.11921 7.50004 7.99992 8.61933 7.99992 10C7.99992 11.3808 9.11921 12.5 10.4999 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1995_16400\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <!-- <div class=\"row\"> -->\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-nodata\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodata-title\">No data found</div>\r\n <div class=\"nodata-sub\">There is no result for this Date</div>\r\n </div>\r\n </div>\r\n <!-- </div> -->\r\n </div>\r\n</div>\r\n<div *ngIf=\"viewuser\">\r\n <lib-audit-user-list (dataEmitter)=\"receivedData($event)\" [viewuser]=\"viewuser\"\r\n [userDetails]=\"userDetails\"></lib-audit-user-list>\r\n</div>", styles: [".nav-line-tabs .activated{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.nav-line-tabs .activated a{color:var(--Primary-700, #009BF3)!important}.nav-line-tabs .activated :hover,.nav-item,.nav-item .nav-link:hover{border:0px!important}.nav-line-tabs :hover{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:16px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "component", type: AuditUserListComponent, selector: "lib-audit-user-list", inputs: ["viewuser", "userDetails"], outputs: ["dataEmitter"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }] });
|
|
6073
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: AuditUserEarningsComponent, selector: "lib-audit-user-earnings", ngImport: i0, template: "<div *ngIf=\"!viewuser\" class=\"card\">\r\n <div class=\"card-header border-0 pt-3\">\r\n <h3 class=\"card-title align-items-start flex-column\">\r\n <div class=\"d-flex overflow-auto h-50px\">\r\n <ul\r\n class=\"nav nav-stretch w-100 nav-line-tabs nav-line-tabs-2x border-bottom-2 fs-5 fw-bolder flex-nowrap\">\r\n <li class=\"nav-item cursor-pointer px-5 me-5 text-center\"><a routerLink=\"/manage/users/tango\"\r\n class=\"nav-link mx-0 text-active-primary\">Users</a>\r\n </li>\r\n <li class=\"nav-item activated px-5 me-5 bg-light-primary cursor-pointer\"><a\r\n class=\"nav-link text-active-primary mx-0\">Audit Users\r\n Summary</a>\r\n </li>\r\n </ul>\r\n </div>\r\n <span class=\"text-sub mb-2 mt-5\">{{pagination?.totalCount}} total users</span>\r\n </h3>\r\n <div class=\"card-toolbar\">\r\n <div class=\"d-flex\">\r\n <div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\r\n <rect opacity=\"0.5\" x=\"17.0365\" y=\"15.1223\" width=\"8.15546\" height=\"2\" rx=\"1\"\r\n transform=\"rotate(45 17.0365 15.1223)\" fill=\"currentColor\"></rect>\r\n <path\r\n d=\"M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z\"\r\n fill=\"currentColor\"></path>\r\n </svg>\r\n </span>\r\n <input type=\"text\" (change)=\"searchData()\" [(ngModel)]=\"searchValue\" class=\"form-control ps-14 me-2\"\r\n name=\"search\" autocomplete=\"off\" placeholder=\"Search\" autocomplete=\"off\" />\r\n @if (!loading && !noData) {\r\n <!-- @if ((gs.userAccess |async)?.Global_User_isEdit) { -->\r\n <button *ngIf=\"!noData && !loading\" type=\"button\" (click)=\"exportXLSX()\"\r\n class=\"btn py-3 px-4 btn-default mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val\"><svg\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M8.125 13.125H16.3562L14.7438 14.7438L15.625 15.625L18.75 12.5L15.625 9.375L14.7438 10.2562L16.3562 11.875H8.125V13.125Z\"\r\n fill=\"black\" />\r\n <path\r\n d=\"M13.75 8.75V6.25C13.7505 6.16775 13.7347 6.08621 13.7036 6.01006C13.6725 5.93391 13.6267 5.86465 13.5688 5.80625L9.19375 1.43125C9.13535 1.37333 9.06609 1.3275 8.98994 1.2964C8.91379 1.26529 8.83225 1.24953 8.75 1.25H2.5C2.16848 1.25 1.85054 1.3817 1.61612 1.61612C1.3817 1.85054 1.25 2.16848 1.25 2.5V17.5C1.25 17.8315 1.3817 18.1495 1.61612 18.3839C1.85054 18.6183 2.16848 18.75 2.5 18.75H12.5C12.8315 18.75 13.1495 18.6183 13.3839 18.3839C13.6183 18.1495 13.75 17.8315 13.75 17.5V16.25H12.5V17.5H2.5V2.5H7.5V6.25C7.5 6.58152 7.6317 6.89947 7.86612 7.13389C8.10054 7.36831 8.41848 7.5 8.75 7.5H12.5V8.75H13.75ZM8.75 6.25V2.75625L12.2438 6.25H8.75Z\"\r\n fill=\"black\" />\r\n </svg><span class=\"ms-2\">Export</span> </button>\r\n\r\n <!-- <button *ngIf=\"!noData && !loading\" type=\"button\" (click)=\"generateReport()\"\r\n class=\"btn py-3 px-4 btn-default mx-2 btn-outline btn-outline-default rounded-3 text-nowrap border-val\"><span\r\n class=\"ms-2\">Generate</span> </button> -->\r\n\r\n\r\n <!-- } -->\r\n }\r\n @if ((gs.userAccess | async)?.Global_User_isAdd) {\r\n <button type=\"button\" (click)=\"addUsers('add')\"\r\n class=\"btn btn-primary mx-2 rounded-3 text-nowrap\"><svg xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path d=\"M10.0001 4.16663V15.8333M4.16675 9.99996H15.8334\" stroke=\"white\"\r\n stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg><span class=\"ms-2 text-white\">Add User</span> </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"card-body p-0\">\r\n <div class=\"table-responsive\">\r\n <table class=\"table bottom-border text-nowrap \">\r\n <thead>\r\n <tr>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('userName')\">Name\r\n <svg [ngClass]=\"sortColumName === 'userName' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'userName' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('fileDateFrom')\">File Date From\r\n <svg [ngClass]=\"sortColumName === 'fileDateFrom' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'fileDateFrom' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('fileDateTo')\">File Date To\r\n <svg [ngClass]=\"sortColumName === 'fileDateTo' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'fileDateTo' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('noOfDays')\">No.of Days\r\n <svg [ngClass]=\"sortColumName === 'noOfDays' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'noOfDays' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalFiles')\">Total Files\r\n <svg [ngClass]=\"sortColumName === 'totalFiles' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalFiles' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalBC')\">Total BC\r\n <svg [ngClass]=\"sortColumName === 'totalBC' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalBC' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalAC')\">Total AC\r\n <svg [ngClass]=\"sortColumName === 'totalAC' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalAC' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalEarnings')\">Total Earnings(Rs)\r\n <svg [ngClass]=\"sortColumName === 'totalEarnings' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalEarnings' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('bcCredit')\">BC Credit\r\n <svg [ngClass]=\"sortColumName === 'bcCredit' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'bcCredit' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('acCredit')\">AC Credit\r\n <svg [ngClass]=\"sortColumName === 'acCredit' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'acCredit' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionbyMinimumTarget')\">Deduction by Minimum\r\n Target\r\n <svg [ngClass]=\"sortColumName === 'deductionbyMinimumTarget' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionbyMinimumTarget' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionbyMapping')\">Deduction by Mapping\r\n <svg [ngClass]=\"sortColumName === 'deductionbyMapping' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionbyMapping' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('deductionbyLateLogin')\">Deduction by Late Login\r\n <svg [ngClass]=\"sortColumName === 'deductionbyLateLogin' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'deductionbyLateLogin' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalReducedAmount')\">Total Reduced Amount\r\n <svg [ngClass]=\"sortColumName === 'totalReducedAmount' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalReducedAmount' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th class=\"cursor-pointer\" (click)=\"onSort('totalCredit')\">Total Credit\r\n <svg [ngClass]=\"sortColumName === 'totalCredit' && sortBy === 1 ? 'rotate' : ''\"\r\n xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"\r\n fill=\"none\">\r\n <path\r\n d=\"M8.00016 3.33337V12.6667M8.00016 12.6667L12.6668 8.00004M8.00016 12.6667L3.3335 8.00004\"\r\n [attr.stroke]=\"sortColumName === 'totalCredit' ? '#00A3FF' : '#667085'\"\r\n stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </th>\r\n <th>Actions</th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"fw-semibold\">\r\n <ng-container *ngFor=\"let user of userList;let i=index;\">\r\n <tr>\r\n <td>{{user?.userName ? user?.userName : '--'}}</td>\r\n <td>{{user?.fileDateFrom ? user?.fileDateFrom : '--'}}</td>\r\n <td>{{user?.fileDateTo ? user?.fileDateTo : '--'}}</td>\r\n <td>{{user?.noOfDays ? user?.noOfDays : 0}}</td>\r\n <td>{{user?.totalFiles ?? '--'}}</td>\r\n <td>{{user?.totalBC ?? '--'}}</td>\r\n <td>{{user?.totalAC ?? '--'}}</td>\r\n <td>{{user?.totalEarnings ? user?.totalEarnings.toFixed(2) : 0}}</td>\r\n <td>{{user.bcCredit ? user.bcCredit.toFixed(2) : 0}}</td>\r\n <td>{{user?.acCredit ? user?.acCredit.toFixed(2) : 0}}</td>\r\n <td>{{user?.deductionbyMinimumTarget ? user?.deductionbyMinimumTarget.toFixed(2) : 0}}</td>\r\n <td>{{user?.deductionbyMapping ? user?.deductionbyMapping.toFixed(2) : 0}}</td>\r\n <td>{{user?.deductionbyLateLogin ? user?.deductionbyLateLogin.toFixed(2) : 0}}</td>\r\n <td>{{user?.totalReducedAmount ? user?.totalReducedAmount.toFixed(2) : 0}}</td>\r\n <td>{{user?.totalCredit ? user?.totalCredit.toFixed(2) : 0}}</td>\r\n <td>\r\n <div class=\"d-flex\">\r\n <span class=\"cursor-pointer\" (click)=\"Viewusers('view',user)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21\" height=\"20\"\r\n viewBox=\"0 0 21 20\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1995_16400)\">\r\n <path\r\n d=\"M1.33325 10C1.33325 10 4.66658 3.33337 10.4999 3.33337C16.3333 3.33337 19.6666 10 19.6666 10C19.6666 10 16.3333 16.6667 10.4999 16.6667C4.66658 16.6667 1.33325 10 1.33325 10Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M10.4999 12.5C11.8806 12.5 12.9999 11.3808 12.9999 10C12.9999 8.61933 11.8806 7.50004 10.4999 7.50004C9.11921 7.50004 7.99992 8.61933 7.99992 10C7.99992 11.3808 9.11921 12.5 10.4999 12.5Z\"\r\n stroke=\"#667085\" stroke-width=\"1.66667\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1995_16400\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\"\r\n transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!loading && !noData\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <lib-pagination *ngIf=\"userList.length!==0\" [itemsPerPage]=\"pagination.limit\" [currentPage]=\"pagination.offset\"\r\n [totalItems]=\"pagination.totalCount\" [paginationSizes]=\"paginationSizes\" [pageSize]=\"paginationSize()\"\r\n (pageChange)=\"onPageChange($event)\" (pageSizeChange)=\"onPageSizeChange($event)\"></lib-pagination>\r\n </div>\r\n <div *ngIf=\"loading\" class=\"row loader d-flex justify-content-center align-items-center\">\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n <div class=\"shimmer\">\r\n <div class=\"wrapper\">\r\n <div class=\"stroke animate title\"></div>\r\n <div class=\"stroke animate link\"></div>\r\n <div class=\"stroke animate description\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"noData\" class=\"row\">\r\n <!-- <div class=\"row\"> -->\r\n <div class=\"col-lg-12 mb-3\">\r\n <div class=\"card-body d-flex justify-content-center align-items-center flex-column\">\r\n <img class=\"img-nodata\" src=\"./assets/tango/Icons/Nodata1.svg\" alt=\"\">\r\n <div class=\"nodata-title\">No data found</div>\r\n <div class=\"nodata-sub\">There is no result for this Date</div>\r\n </div>\r\n </div>\r\n <!-- </div> -->\r\n </div>\r\n</div>\r\n<div *ngIf=\"viewuser\">\r\n <lib-audit-user-list (dataEmitter)=\"receivedData($event)\" [viewuser]=\"viewuser\"\r\n [userDetails]=\"userDetails\"></lib-audit-user-list>\r\n</div>", styles: [".nav-line-tabs .activated{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.nav-line-tabs .activated a{color:var(--Primary-700, #009BF3)!important}.nav-line-tabs .activated :hover,.nav-item,.nav-item .nav-link:hover{border:0px!important}.nav-line-tabs :hover{border-bottom:3px solid var(--bs-primary)!important;transition:color .2s ease!important}.border-val{color:var(--Gray-700, #344054)!important;font-family:Inter;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}.table-title-primary{color:var(--Primary-700, #009BF3)!important;font-weight:500!important}.table-sub{line-height:30px!important;color:var(--Gray-500, #667085)!important}td{padding:16px 24px!important;line-height:36px!important}.img-src{width:25%;height:20%}.border-val{padding:16px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #344054);font-size:16px;font-weight:600;line-height:24px}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}.rotate{rotate:180deg;transition:1s}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PaginationComponent, selector: "lib-pagination", inputs: ["collection", "itemsPerPage", "currentPage", "totalItems", "directionLinks", "pageSize", "paginationSizes"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "component", type: AuditUserListComponent, selector: "lib-audit-user-list", inputs: ["viewuser", "userDetails"], outputs: ["dataEmitter"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }] });
|
|
5858
6074
|
}
|
|
5859
6075
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuditUserEarningsComponent, decorators: [{
|
|
5860
6076
|
type: Component,
|
|
@@ -5885,7 +6101,7 @@ const routes = [
|
|
|
5885
6101
|
];
|
|
5886
6102
|
class TangoManageUsersRoutingModule {
|
|
5887
6103
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoManageUsersRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5888
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: TangoManageUsersRoutingModule, imports: [i3
|
|
6104
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: TangoManageUsersRoutingModule, imports: [i3.RouterModule], exports: [RouterModule] });
|
|
5889
6105
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoManageUsersRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
|
|
5890
6106
|
}
|
|
5891
6107
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoManageUsersRoutingModule, decorators: [{
|
|
@@ -6043,13 +6259,13 @@ class TangoManageUsersComponent {
|
|
|
6043
6259
|
this.destroy$.next(true);
|
|
6044
6260
|
this.destroy$.complete();
|
|
6045
6261
|
}
|
|
6046
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoManageUsersComponent, deps: [{ token: i2.PageInfoService }, { token: UserService }, { token: i0.ChangeDetectorRef }, { token: i2.GlobalStateService }, { token: i3
|
|
6047
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: TangoManageUsersComponent, selector: "lib-tango-manage-users", ngImport: i0, template: "<!-- Users subhead start -->\r\n<div class=\"card mb-5\">\r\n @if (USER?.userType==='tango') {\r\n <div class=\"card-body pt-2 pb-1\">\r\n <div class=\"d-flex overflow-auto mb-2\">\r\n <ul \r\n class=\"nav nav-stretch nav-line-tabs1 nav-line-tabs-2x justify-content-center align-items-center border-transparent flex-nowrap\">\r\n <li (click)=\"userValue('Brand User')\" class=\"nav-item\" [routerLink]=\"['/manage/users']\" [queryParams]=\"{ type: 'client' }\">\r\n <a [ngClass]=\"userData ==='Brand User' ? 'active' :''\"\r\n class=\"nav-link text-active-primary cursor-pointer me-6\">Brand User</a>\r\n </li>\r\n <li (click)=\"userValue('Tango User')\" class=\"nav-item\" [routerLink]=\"['/manage/users']\" [queryParams]=\"{ type: 'tango' }\">\r\n <a [ngClass]=\"userData ==='Tango User' ? 'active' :''\"\r\n class=\"nav-link text-active-primary cursor-pointer no-border me-6 \">Tango User</a>\r\n </li>\r\n \r\n </ul>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n<!-- Users subhead end -->\r\n<!-- *ngIf=\"userdata =='Tango User'\" -->\r\n<!--begin::Row-->\r\n<div *ngIf=\"receivedData !=='Role Value' && (userData ==='Tango User' || userData ==='Brand User')\" class=\"row gx-5 gx-xl-10\">\r\n <!--begin::Col-->\r\n <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\">\r\n <!-- (dataTouserlist)=\"receiveData($event)\" -->\r\n <lib-user-table *ngIf=\"userData ==='Tango User'\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 mb-5 mb-xl-1\"></lib-user-table>\r\n <lib-brand-user *ngIf=\"userData ==='Brand User'\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 mb-5 mb-xl-1\"></lib-brand-user>\r\n\r\n </div>\r\n <!-- <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <div class=\"card p-5\">\r\n <div class=\"border-0\">\r\n <h3 class=\"title fw-bold\">Roles & Permission</h3>\r\n <h6 class=\"sub-title fw-normal\">{{rolesCount || 0}} total roles</h6>\r\n </div>\r\n <div class=\"card-body px-0\">\r\n <div class=\"flex-column align-items-start\">\r\n <div class=\"row\">\r\n <div class=\"col-md-4 border-val mx-3 mb-7 py-7\" *ngFor=\"let obj of roles;let i=index\">\r\n <a class=\"role-title my-2 cursor-pointer\" (click)=\"userDetials(obj)\">{{obj.roleName |\r\n titlecase}}</a>\r\n <div *ngIf=\"obj.roleName ==='superadmin'\" class=\"sub-title fw-semibold my-5\">Oversees all the operations and controls the entire functionality of the dashboard</div>\r\n <div *ngIf=\"obj.roleName ==='admin'\" class=\"sub-title fw-semibold my-5\">Manages specific operations, permissions, and can change setting for assigned locations</div>\r\n <div *ngIf=\"obj.roleName ==='user'\" class=\"sub-title fw-semibold my-5\">Access to specific location and will be able to view dashboard</div>\r\n <div><span class=\"me-5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"24\"\r\n viewBox=\"0 0 25 24\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1973_14308)\">\r\n <path\r\n d=\"M17.5 21V19C17.5 17.9391 17.0786 16.9217 16.3284 16.1716C15.5783 15.4214 14.5609 15 13.5 15H5.5C4.43913 15 3.42172 15.4214 2.67157 16.1716C1.92143 16.9217 1.5 17.9391 1.5 19V21M23.5 21V19C23.4993 18.1137 23.2044 17.2528 22.6614 16.5523C22.1184 15.8519 21.3581 15.3516 20.5 15.13M16.5 3.13C17.3604 3.3503 18.123 3.8507 18.6676 4.55231C19.2122 5.25392 19.5078 6.11683 19.5078 7.005C19.5078 7.89317 19.2122 8.75608 18.6676 9.45769C18.123 10.1593 17.3604 10.6597 16.5 10.88M13.5 7C13.5 9.20914 11.7091 11 9.5 11C7.29086 11 5.5 9.20914 5.5 7C5.5 4.79086 7.29086 3 9.5 3C11.7091 3 13.5 4.79086 13.5 7Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1973_14308\">\r\n <rect width=\"24\" height=\"24\" fill=\"white\" transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n <span class=\"uses-list fw-semibold\">{{obj?.count || 0}} Members</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n <!--end::Col-->\r\n</div>\r\n<!--end::Row-->\r\n\r\n<!--begin::Row-->\r\n<div *ngIf=\"receivedData ==='Role Value'\" class=\"row gx-5 gx-xl-10\">\r\n <!--begin::Col-->\r\n <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\">\r\n <lib-roles-permission-table (dataEvent)=\"receiveData($event)\"></lib-roles-permission-table>\r\n </div>\r\n <!--end::Col-->\r\n</div>\r\n<!--end::Row-->\r\n\r\n<!-- <div *ngFor=\"let obj of values\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"obj.value\">\r\n </div> -->", styles: [".nav-line-tabs1.nav-line-tabs-2x .nav-item .nav-link.active{border-radius:6px!important;background:var(--Primary-50, #EAF8FF)!important;padding:10px 14px!important;color:var(--Primary-700, #009BF3)!important}.nav-line-tabs1 .nav-link{color:var(--Gray-500, #667085)!important;font-size:16px;font-weight:500!important;line-height:24px}.daterangepicker{display:block!important;top:153.85px!important;left:900px!important;right:0}:host::ng-deep .md-drppicker .btn{line-height:10px!important}:host::ng-deep .md-drppicker.drops-down-down.ltr.double.show-ranges.shown{left:0!important;height:350px}:host::ng-deep .md-drppicker td{border-radius:44px}:host::ng-deep .md-drppicker .btn{border-radius:7px!important;background-color:#019df5!important}:host::ng-deep .md-drppicker .btn{right:99px;top:300px}:host::ng-deep .md-drppicker .ranges ul li button.active{background-color:#029cf3!important}:host::ng-deep .md-drppicker td.active,:host::ng-deep .md-drppicker td.active:hover{background-color:#029cf4!important}.title{color:var(--Gray-900, #101828);font-size:20px;line-height:30px}.sub-title{color:var(--Gray-500, #667085);font-size:14px;line-height:20px}.border-val{padding:16px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #00A3FF);font-size:16px;font-weight:600;line-height:24px;text-decoration-line:underline}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3
|
|
6262
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoManageUsersComponent, deps: [{ token: i2.PageInfoService }, { token: UserService }, { token: i0.ChangeDetectorRef }, { token: i2.GlobalStateService }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
6263
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: TangoManageUsersComponent, selector: "lib-tango-manage-users", ngImport: i0, template: "<!-- Users subhead start -->\r\n<div class=\"card mb-5\">\r\n @if (USER?.userType==='tango') {\r\n <div class=\"card-body pt-2 pb-1\">\r\n <div class=\"d-flex overflow-auto mb-2\">\r\n <ul \r\n class=\"nav nav-stretch nav-line-tabs1 nav-line-tabs-2x justify-content-center align-items-center border-transparent flex-nowrap\">\r\n <li (click)=\"userValue('Brand User')\" class=\"nav-item\" [routerLink]=\"['/manage/users']\" [queryParams]=\"{ type: 'client' }\">\r\n <a [ngClass]=\"userData ==='Brand User' ? 'active' :''\"\r\n class=\"nav-link text-active-primary cursor-pointer me-6\">Brand User</a>\r\n </li>\r\n <li (click)=\"userValue('Tango User')\" class=\"nav-item\" [routerLink]=\"['/manage/users']\" [queryParams]=\"{ type: 'tango' }\">\r\n <a [ngClass]=\"userData ==='Tango User' ? 'active' :''\"\r\n class=\"nav-link text-active-primary cursor-pointer no-border me-6 \">Tango User</a>\r\n </li>\r\n \r\n </ul>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n<!-- Users subhead end -->\r\n<!-- *ngIf=\"userdata =='Tango User'\" -->\r\n<!--begin::Row-->\r\n<div *ngIf=\"receivedData !=='Role Value' && (userData ==='Tango User' || userData ==='Brand User')\" class=\"row gx-5 gx-xl-10\">\r\n <!--begin::Col-->\r\n <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\">\r\n <!-- (dataTouserlist)=\"receiveData($event)\" -->\r\n <lib-user-table *ngIf=\"userData ==='Tango User'\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 mb-5 mb-xl-1\"></lib-user-table>\r\n <lib-brand-user *ngIf=\"userData ==='Brand User'\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 mb-5 mb-xl-1\"></lib-brand-user>\r\n\r\n </div>\r\n <!-- <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <div class=\"card p-5\">\r\n <div class=\"border-0\">\r\n <h3 class=\"title fw-bold\">Roles & Permission</h3>\r\n <h6 class=\"sub-title fw-normal\">{{rolesCount || 0}} total roles</h6>\r\n </div>\r\n <div class=\"card-body px-0\">\r\n <div class=\"flex-column align-items-start\">\r\n <div class=\"row\">\r\n <div class=\"col-md-4 border-val mx-3 mb-7 py-7\" *ngFor=\"let obj of roles;let i=index\">\r\n <a class=\"role-title my-2 cursor-pointer\" (click)=\"userDetials(obj)\">{{obj.roleName |\r\n titlecase}}</a>\r\n <div *ngIf=\"obj.roleName ==='superadmin'\" class=\"sub-title fw-semibold my-5\">Oversees all the operations and controls the entire functionality of the dashboard</div>\r\n <div *ngIf=\"obj.roleName ==='admin'\" class=\"sub-title fw-semibold my-5\">Manages specific operations, permissions, and can change setting for assigned locations</div>\r\n <div *ngIf=\"obj.roleName ==='user'\" class=\"sub-title fw-semibold my-5\">Access to specific location and will be able to view dashboard</div>\r\n <div><span class=\"me-5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"24\"\r\n viewBox=\"0 0 25 24\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1973_14308)\">\r\n <path\r\n d=\"M17.5 21V19C17.5 17.9391 17.0786 16.9217 16.3284 16.1716C15.5783 15.4214 14.5609 15 13.5 15H5.5C4.43913 15 3.42172 15.4214 2.67157 16.1716C1.92143 16.9217 1.5 17.9391 1.5 19V21M23.5 21V19C23.4993 18.1137 23.2044 17.2528 22.6614 16.5523C22.1184 15.8519 21.3581 15.3516 20.5 15.13M16.5 3.13C17.3604 3.3503 18.123 3.8507 18.6676 4.55231C19.2122 5.25392 19.5078 6.11683 19.5078 7.005C19.5078 7.89317 19.2122 8.75608 18.6676 9.45769C18.123 10.1593 17.3604 10.6597 16.5 10.88M13.5 7C13.5 9.20914 11.7091 11 9.5 11C7.29086 11 5.5 9.20914 5.5 7C5.5 4.79086 7.29086 3 9.5 3C11.7091 3 13.5 4.79086 13.5 7Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1973_14308\">\r\n <rect width=\"24\" height=\"24\" fill=\"white\" transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n <span class=\"uses-list fw-semibold\">{{obj?.count || 0}} Members</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n <!--end::Col-->\r\n</div>\r\n<!--end::Row-->\r\n\r\n<!--begin::Row-->\r\n<div *ngIf=\"receivedData ==='Role Value'\" class=\"row gx-5 gx-xl-10\">\r\n <!--begin::Col-->\r\n <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\">\r\n <lib-roles-permission-table (dataEvent)=\"receiveData($event)\"></lib-roles-permission-table>\r\n </div>\r\n <!--end::Col-->\r\n</div>\r\n<!--end::Row-->\r\n\r\n<!-- <div *ngFor=\"let obj of values\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"obj.value\">\r\n </div> -->", styles: [".nav-line-tabs1.nav-line-tabs-2x .nav-item .nav-link.active{border-radius:6px!important;background:var(--Primary-50, #EAF8FF)!important;padding:10px 14px!important;color:var(--Primary-700, #009BF3)!important}.nav-line-tabs1 .nav-link{color:var(--Gray-500, #667085)!important;font-size:16px;font-weight:500!important;line-height:24px}.daterangepicker{display:block!important;top:153.85px!important;left:900px!important;right:0}:host::ng-deep .md-drppicker .btn{line-height:10px!important}:host::ng-deep .md-drppicker.drops-down-down.ltr.double.show-ranges.shown{left:0!important;height:350px}:host::ng-deep .md-drppicker td{border-radius:44px}:host::ng-deep .md-drppicker .btn{border-radius:7px!important;background-color:#019df5!important}:host::ng-deep .md-drppicker .btn{right:99px;top:300px}:host::ng-deep .md-drppicker .ranges ul li button.active{background-color:#029cf3!important}:host::ng-deep .md-drppicker td.active,:host::ng-deep .md-drppicker td.active:hover{background-color:#029cf4!important}.title{color:var(--Gray-900, #101828);font-size:20px;line-height:30px}.sub-title{color:var(--Gray-500, #667085);font-size:14px;line-height:20px}.border-val{padding:16px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #00A3FF);font-size:16px;font-weight:600;line-height:24px;text-decoration-line:underline}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: UserTableComponent, selector: "lib-user-table" }, { kind: "component", type: RolesPermissionTableComponent, selector: "lib-roles-permission-table", outputs: ["dataEvent"] }, { kind: "component", type: BrandUserComponent, selector: "lib-brand-user", outputs: ["dataToParent"] }] });
|
|
6048
6264
|
}
|
|
6049
6265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoManageUsersComponent, decorators: [{
|
|
6050
6266
|
type: Component,
|
|
6051
6267
|
args: [{ selector: "lib-tango-manage-users", template: "<!-- Users subhead start -->\r\n<div class=\"card mb-5\">\r\n @if (USER?.userType==='tango') {\r\n <div class=\"card-body pt-2 pb-1\">\r\n <div class=\"d-flex overflow-auto mb-2\">\r\n <ul \r\n class=\"nav nav-stretch nav-line-tabs1 nav-line-tabs-2x justify-content-center align-items-center border-transparent flex-nowrap\">\r\n <li (click)=\"userValue('Brand User')\" class=\"nav-item\" [routerLink]=\"['/manage/users']\" [queryParams]=\"{ type: 'client' }\">\r\n <a [ngClass]=\"userData ==='Brand User' ? 'active' :''\"\r\n class=\"nav-link text-active-primary cursor-pointer me-6\">Brand User</a>\r\n </li>\r\n <li (click)=\"userValue('Tango User')\" class=\"nav-item\" [routerLink]=\"['/manage/users']\" [queryParams]=\"{ type: 'tango' }\">\r\n <a [ngClass]=\"userData ==='Tango User' ? 'active' :''\"\r\n class=\"nav-link text-active-primary cursor-pointer no-border me-6 \">Tango User</a>\r\n </li>\r\n \r\n </ul>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n<!-- Users subhead end -->\r\n<!-- *ngIf=\"userdata =='Tango User'\" -->\r\n<!--begin::Row-->\r\n<div *ngIf=\"receivedData !=='Role Value' && (userData ==='Tango User' || userData ==='Brand User')\" class=\"row gx-5 gx-xl-10\">\r\n <!--begin::Col-->\r\n <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\">\r\n <!-- (dataTouserlist)=\"receiveData($event)\" -->\r\n <lib-user-table *ngIf=\"userData ==='Tango User'\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 mb-5 mb-xl-1\"></lib-user-table>\r\n <lib-brand-user *ngIf=\"userData ==='Brand User'\" class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 mb-5 mb-xl-1\"></lib-brand-user>\r\n\r\n </div>\r\n <!-- <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12 my-3\">\r\n <div class=\"card p-5\">\r\n <div class=\"border-0\">\r\n <h3 class=\"title fw-bold\">Roles & Permission</h3>\r\n <h6 class=\"sub-title fw-normal\">{{rolesCount || 0}} total roles</h6>\r\n </div>\r\n <div class=\"card-body px-0\">\r\n <div class=\"flex-column align-items-start\">\r\n <div class=\"row\">\r\n <div class=\"col-md-4 border-val mx-3 mb-7 py-7\" *ngFor=\"let obj of roles;let i=index\">\r\n <a class=\"role-title my-2 cursor-pointer\" (click)=\"userDetials(obj)\">{{obj.roleName |\r\n titlecase}}</a>\r\n <div *ngIf=\"obj.roleName ==='superadmin'\" class=\"sub-title fw-semibold my-5\">Oversees all the operations and controls the entire functionality of the dashboard</div>\r\n <div *ngIf=\"obj.roleName ==='admin'\" class=\"sub-title fw-semibold my-5\">Manages specific operations, permissions, and can change setting for assigned locations</div>\r\n <div *ngIf=\"obj.roleName ==='user'\" class=\"sub-title fw-semibold my-5\">Access to specific location and will be able to view dashboard</div>\r\n <div><span class=\"me-5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"24\"\r\n viewBox=\"0 0 25 24\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1973_14308)\">\r\n <path\r\n d=\"M17.5 21V19C17.5 17.9391 17.0786 16.9217 16.3284 16.1716C15.5783 15.4214 14.5609 15 13.5 15H5.5C4.43913 15 3.42172 15.4214 2.67157 16.1716C1.92143 16.9217 1.5 17.9391 1.5 19V21M23.5 21V19C23.4993 18.1137 23.2044 17.2528 22.6614 16.5523C22.1184 15.8519 21.3581 15.3516 20.5 15.13M16.5 3.13C17.3604 3.3503 18.123 3.8507 18.6676 4.55231C19.2122 5.25392 19.5078 6.11683 19.5078 7.005C19.5078 7.89317 19.2122 8.75608 18.6676 9.45769C18.123 10.1593 17.3604 10.6597 16.5 10.88M13.5 7C13.5 9.20914 11.7091 11 9.5 11C7.29086 11 5.5 9.20914 5.5 7C5.5 4.79086 7.29086 3 9.5 3C11.7091 3 13.5 4.79086 13.5 7Z\"\r\n stroke=\"#667085\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1973_14308\">\r\n <rect width=\"24\" height=\"24\" fill=\"white\" transform=\"translate(0.5)\" />\r\n </clipPath>\r\n </defs>\r\n </svg></span>\r\n <span class=\"uses-list fw-semibold\">{{obj?.count || 0}} Members</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n <!--end::Col-->\r\n</div>\r\n<!--end::Row-->\r\n\r\n<!--begin::Row-->\r\n<div *ngIf=\"receivedData ==='Role Value'\" class=\"row gx-5 gx-xl-10\">\r\n <!--begin::Col-->\r\n <div class=\"col-xxl-12 col-md-12 col-xl-12 col-lg-12\">\r\n <lib-roles-permission-table (dataEvent)=\"receiveData($event)\"></lib-roles-permission-table>\r\n </div>\r\n <!--end::Col-->\r\n</div>\r\n<!--end::Row-->\r\n\r\n<!-- <div *ngFor=\"let obj of values\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"obj.value\">\r\n </div> -->", styles: [".nav-line-tabs1.nav-line-tabs-2x .nav-item .nav-link.active{border-radius:6px!important;background:var(--Primary-50, #EAF8FF)!important;padding:10px 14px!important;color:var(--Primary-700, #009BF3)!important}.nav-line-tabs1 .nav-link{color:var(--Gray-500, #667085)!important;font-size:16px;font-weight:500!important;line-height:24px}.daterangepicker{display:block!important;top:153.85px!important;left:900px!important;right:0}:host::ng-deep .md-drppicker .btn{line-height:10px!important}:host::ng-deep .md-drppicker.drops-down-down.ltr.double.show-ranges.shown{left:0!important;height:350px}:host::ng-deep .md-drppicker td{border-radius:44px}:host::ng-deep .md-drppicker .btn{border-radius:7px!important;background-color:#019df5!important}:host::ng-deep .md-drppicker .btn{right:99px;top:300px}:host::ng-deep .md-drppicker .ranges ul li button.active{background-color:#029cf3!important}:host::ng-deep .md-drppicker td.active,:host::ng-deep .md-drppicker td.active:hover{background-color:#029cf4!important}.title{color:var(--Gray-900, #101828);font-size:20px;line-height:30px}.sub-title{color:var(--Gray-500, #667085);font-size:14px;line-height:20px}.border-val{padding:16px;border-radius:12px;border:1px solid var(--Gray-200, #EAECF0);background:#fff;box-shadow:0 0 20px #4c577d05}.role-title{color:var(--Primary-600, #00A3FF);font-size:16px;font-weight:600;line-height:24px;text-decoration-line:underline}.col-md-4{width:31%!important}.user-list{color:var(--Gray-700, #344054);font-size:16px;line-height:24px}\n"] }]
|
|
6052
|
-
}], ctorParameters: () => [{ type: i2.PageInfoService }, { type: UserService }, { type: i0.ChangeDetectorRef }, { type: i2.GlobalStateService }, { type: i3
|
|
6268
|
+
}], ctorParameters: () => [{ type: i2.PageInfoService }, { type: UserService }, { type: i0.ChangeDetectorRef }, { type: i2.GlobalStateService }, { type: i3.ActivatedRoute }] });
|
|
6053
6269
|
|
|
6054
6270
|
class TangoManageUsersModule {
|
|
6055
6271
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoManageUsersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|