tango-app-ui-shared 3.3.1-beta.92 → 3.3.1-beta.93
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/modules/layout/toolbar/datepicker/datepicker.component.mjs +14 -1
- package/esm2022/lib/modules/layout/toolbar/toolbar.component.mjs +39 -17
- package/esm2022/lib/modules/layout/toolbar/traffic-header/traffic-header/traffic-header.component.mjs +14 -1
- package/esm2022/lib/modules/layout/toolbar/trax-header/trax-header.component.mjs +14 -1
- package/esm2022/lib/services/auth.service.mjs +4 -1
- package/fesm2022/tango-app-ui-shared.mjs +66 -3
- package/fesm2022/tango-app-ui-shared.mjs.map +1 -1
- package/lib/modules/layout/toolbar/datepicker/datepicker.component.d.ts +1 -0
- package/lib/modules/layout/toolbar/toolbar.component.d.ts +5 -1
- package/lib/modules/layout/toolbar/traffic-header/traffic-header/traffic-header.component.d.ts +1 -0
- package/lib/modules/layout/toolbar/trax-header/trax-header.component.d.ts +1 -0
- package/lib/services/auth.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -136,6 +136,9 @@ class AuthService {
|
|
|
136
136
|
getBrandDetails(id) {
|
|
137
137
|
return this.http.get(`${this.clientApiUrl}/client-details/${id}`);
|
|
138
138
|
}
|
|
139
|
+
getHeaderUsers(data) {
|
|
140
|
+
return this.http.post(`${this.trafficApiUrl}/headerUserEmails_v2`, data);
|
|
141
|
+
}
|
|
139
142
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthService, deps: [{ token: i2.Router }, { token: i1.GlobalStateService }, { token: i3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
140
143
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
141
144
|
}
|
|
@@ -2809,6 +2812,19 @@ class DatepickerComponent {
|
|
|
2809
2812
|
localStorage.setItem("header-filters", JSON.stringify(this.selectedFilters));
|
|
2810
2813
|
this.gs.dataRangeValue.next(this.selectedFilters);
|
|
2811
2814
|
}
|
|
2815
|
+
this.getUserInfo(this.selectedFilters.client);
|
|
2816
|
+
}
|
|
2817
|
+
getUserInfo(client) {
|
|
2818
|
+
let obj = {
|
|
2819
|
+
clientId: client ? client : ''
|
|
2820
|
+
};
|
|
2821
|
+
if (client) {
|
|
2822
|
+
this.service.getHeaderUsers(obj).subscribe({
|
|
2823
|
+
next: (e) => {
|
|
2824
|
+
localStorage.setItem("usersEmail-info", JSON.stringify(e?.data?.userEmailData || []));
|
|
2825
|
+
}
|
|
2826
|
+
});
|
|
2827
|
+
}
|
|
2812
2828
|
}
|
|
2813
2829
|
ranges = {
|
|
2814
2830
|
Today: [this.dayjs(), this.dayjs()],
|
|
@@ -3474,9 +3490,22 @@ class TrafficHeaderComponent {
|
|
|
3474
3490
|
// console.log("4")
|
|
3475
3491
|
this.cd.detectChanges();
|
|
3476
3492
|
}
|
|
3493
|
+
this.getUserInfo(this.selectedFilters.client);
|
|
3477
3494
|
},
|
|
3478
3495
|
});
|
|
3479
3496
|
}
|
|
3497
|
+
getUserInfo(client) {
|
|
3498
|
+
let obj = {
|
|
3499
|
+
clientId: client ? client : ''
|
|
3500
|
+
};
|
|
3501
|
+
if (client) {
|
|
3502
|
+
this.auth.getHeaderUsers(obj).subscribe({
|
|
3503
|
+
next: (e) => {
|
|
3504
|
+
localStorage.setItem("usersEmail-info", JSON.stringify(e?.data?.userEmailData || []));
|
|
3505
|
+
}
|
|
3506
|
+
});
|
|
3507
|
+
}
|
|
3508
|
+
}
|
|
3480
3509
|
onClientSelect(event) {
|
|
3481
3510
|
// Update the selected client
|
|
3482
3511
|
this.selectedClient = event;
|
|
@@ -4276,6 +4305,7 @@ class TraxHeaderComponent {
|
|
|
4276
4305
|
this.cd.detectChanges();
|
|
4277
4306
|
}
|
|
4278
4307
|
this.getDateRanges();
|
|
4308
|
+
this.getUserInfo(this.selectedFilters?.client);
|
|
4279
4309
|
},
|
|
4280
4310
|
});
|
|
4281
4311
|
}
|
|
@@ -4393,6 +4423,18 @@ class TraxHeaderComponent {
|
|
|
4393
4423
|
}
|
|
4394
4424
|
}
|
|
4395
4425
|
}
|
|
4426
|
+
getUserInfo(client) {
|
|
4427
|
+
let obj = {
|
|
4428
|
+
clientId: client ? client : ''
|
|
4429
|
+
};
|
|
4430
|
+
if (client) {
|
|
4431
|
+
this.auth.getHeaderUsers(obj).subscribe({
|
|
4432
|
+
next: (e) => {
|
|
4433
|
+
localStorage.setItem("usersEmail-info", JSON.stringify(e?.data?.userEmailData || []));
|
|
4434
|
+
}
|
|
4435
|
+
});
|
|
4436
|
+
}
|
|
4437
|
+
}
|
|
4396
4438
|
opendropdown(e) {
|
|
4397
4439
|
e.stopPropagation();
|
|
4398
4440
|
this.Opendropdown = !this.Opendropdown;
|
|
@@ -6513,6 +6555,7 @@ class ToolbarComponent {
|
|
|
6513
6555
|
router;
|
|
6514
6556
|
route;
|
|
6515
6557
|
gs;
|
|
6558
|
+
auth;
|
|
6516
6559
|
unsubscribe = [];
|
|
6517
6560
|
// Public props
|
|
6518
6561
|
currentLayoutType;
|
|
@@ -6551,17 +6594,23 @@ class ToolbarComponent {
|
|
|
6551
6594
|
traxwithoutdatepicker;
|
|
6552
6595
|
storesSingle;
|
|
6553
6596
|
nobWithoutClient;
|
|
6554
|
-
constructor(layout, router, route, gs) {
|
|
6597
|
+
constructor(layout, router, route, gs, auth) {
|
|
6555
6598
|
this.layout = layout;
|
|
6556
6599
|
this.router = router;
|
|
6557
6600
|
this.route = route;
|
|
6558
6601
|
this.gs = gs;
|
|
6602
|
+
this.auth = auth;
|
|
6559
6603
|
}
|
|
6560
6604
|
ngOnInit() {
|
|
6561
6605
|
if ("user-info" in localStorage) {
|
|
6562
6606
|
const userData = JSON.parse(localStorage.getItem("user-info") || "{}");
|
|
6563
6607
|
this.users = userData;
|
|
6564
6608
|
}
|
|
6609
|
+
if ("header-filters" in localStorage) {
|
|
6610
|
+
const data = JSON.parse(localStorage.getItem("header-filters") || "{}");
|
|
6611
|
+
this.client = data?.client;
|
|
6612
|
+
}
|
|
6613
|
+
this.getUserInfo(this.client ? this.client : this.users.client);
|
|
6565
6614
|
this.showPageTitle();
|
|
6566
6615
|
const subscr = this.layout.layoutConfigSubject
|
|
6567
6616
|
.asObservable()
|
|
@@ -6605,7 +6654,9 @@ class ToolbarComponent {
|
|
|
6605
6654
|
this.unsubscribe.forEach((sb) => sb.unsubscribe());
|
|
6606
6655
|
this.destroy$.next(true);
|
|
6607
6656
|
this.destroy$.complete();
|
|
6657
|
+
// localStorage.removeItem("usersEmail-info");
|
|
6608
6658
|
}
|
|
6659
|
+
client;
|
|
6609
6660
|
showPageTitle() {
|
|
6610
6661
|
let URL = "";
|
|
6611
6662
|
if ("header-filters" in localStorage) {
|
|
@@ -6748,13 +6799,25 @@ class ToolbarComponent {
|
|
|
6748
6799
|
this.storesSingle = storesSingle;
|
|
6749
6800
|
this.nobWithoutClient = nobWithoutClient;
|
|
6750
6801
|
}
|
|
6751
|
-
|
|
6802
|
+
getUserInfo(client) {
|
|
6803
|
+
let obj = {
|
|
6804
|
+
clientId: client ? client : ''
|
|
6805
|
+
};
|
|
6806
|
+
if (client) {
|
|
6807
|
+
this.auth.getHeaderUsers(obj).subscribe({
|
|
6808
|
+
next: (e) => {
|
|
6809
|
+
localStorage.setItem("usersEmail-info", JSON.stringify(e?.data?.userEmailData || []));
|
|
6810
|
+
}
|
|
6811
|
+
});
|
|
6812
|
+
}
|
|
6813
|
+
}
|
|
6814
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarComponent, deps: [{ token: i1.LayoutService }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i1.GlobalStateService }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6752
6815
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ToolbarComponent, selector: "lib-toolbar", inputs: { currentLayoutType: "currentLayoutType", appToolbarLayout: "appToolbarLayout" }, ngImport: i0, template: "<!--begin::Toolbar container-->\r\n<div id=\"kt_app_toolbar_container\" class=\"app-container\" [ngClass]=\"appToolbarContainerCSSClass\">\r\n <ng-container *ngIf=\"(gs.userAccess | async)?.userType === 'tango' || (gs.userAccess | async)?.userType === 'client' || (gs.userAccess | async)?.userType === 'lead'\" >\r\n <ng-container *ngIf=\"showPageTitle()\">\r\n <lib-page-title [appPageTitleDirection]=\"appPageTitleDirection\" [appPageTitleBreadcrumb]=\"appPageTitleBreadcrumb\"\r\n [appPageTitleDescription]=\"appPageTitleDescription\" class=\"page-title d-flex flex-wrap me-3\"\r\n [ngClass]=\"{'flex-column justify-content-center': appPageTitleDirection === 'column', 'align-items-center': appPageTitleDirection !== 'column', appPageTitleCSSClass}\">\r\n </lib-page-title>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"multiSelect && users.userType ==='tango'\">\r\n <lib-classic class=\"d-flex align-items-center gap-2 gap-lg-3\"></lib-classic>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelect && users.userType ==='tango'\">\r\n <lib-client-settings class=\"d-flex align-items-center me-5\"></lib-client-settings>\r\n </ng-container>\r\n <ng-container *ngIf=\"datepicker && (users.userType ==='client' || users.userType ==='tango')\">\r\n <lib-datepicker class=\"d-flex align-items-center me-5\"></lib-datepicker>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelectdatepicker && users.userType ==='tango'\">\r\n <lib-date-single-select class=\"d-flex align-items-center me-5\"></lib-date-single-select>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleStore\">\r\n <lib-single-store class=\"d-flex align-items-center me-5\"></lib-single-store>\r\n </ng-container>\r\n <ng-container *ngIf=\"trafficdatepicker\">\r\n <lib-traffic-header class=\"d-flex align-items-center me-5\"></lib-traffic-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxdatepicker\">\r\n <lib-trax-header class=\"d-flex align-items-center me-5\"></lib-trax-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxwithoutdatepicker\">\r\n <lib-trax-withoutdate class=\"d-flex align-items-center me-5\"></lib-trax-withoutdate>\r\n </ng-container>\r\n <ng-container *ngIf=\"storesSingle\">\r\n <lib-single-storedate class=\"d-flex align-items-center me-5\"></lib-single-storedate>\r\n </ng-container>\r\n <ng-container *ngIf=\"nobWithoutClient\">\r\n <lib-traffic-nob class=\"d-flex align-items-center me-5\"></lib-traffic-nob>\r\n </ng-container>\r\n \r\n <!-- <ng-container *ngIf=\"appToolbarLayout === 'extended'\">\r\n <lib-extended class=\"d-flex align-items-center flex-shrink-0 me-5\"></lib-extended>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'reports'\">\r\n <lib-reports class=\"d-flex align-items-center overflow-auto\" [appPageTitleDisplay]=\"appPageTitleDisplay\">\r\n </lib-reports>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'saas'\">\r\n <lib-saas class=\"d-flex align-items-center gap-2\" [appPageTitleDisplay]=\"appPageTitleDisplay\"></lib-saas>\r\n </ng-container> -->\r\n</ng-container>\r\n</div>\r\n<!--end::Toolbar container-->\r\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PageTitleComponent, selector: "lib-page-title", inputs: ["appPageTitleDirection", "appPageTitleBreadcrumb", "appPageTitleDescription"] }, { kind: "component", type: ClassicComponent, selector: "lib-classic" }, { kind: "component", type: ClientSettingsComponent, selector: "lib-client-settings" }, { kind: "component", type: DatepickerComponent, selector: "lib-datepicker" }, { kind: "component", type: DateSingleSelectComponent, selector: "lib-date-single-select" }, { kind: "component", type: SingleStoreComponent, selector: "lib-single-store", inputs: ["urlString"] }, { kind: "component", type: TrafficHeaderComponent, selector: "lib-traffic-header" }, { kind: "component", type: TraxHeaderComponent, selector: "lib-trax-header" }, { kind: "component", type: SingleStoredateComponent, selector: "lib-single-storedate" }, { kind: "component", type: TraxWithoutdateComponent, selector: "lib-trax-withoutdate" }, { kind: "component", type: TrafficNobComponent, selector: "lib-traffic-nob" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
|
|
6753
6816
|
}
|
|
6754
6817
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarComponent, decorators: [{
|
|
6755
6818
|
type: Component,
|
|
6756
6819
|
args: [{ selector: "lib-toolbar", template: "<!--begin::Toolbar container-->\r\n<div id=\"kt_app_toolbar_container\" class=\"app-container\" [ngClass]=\"appToolbarContainerCSSClass\">\r\n <ng-container *ngIf=\"(gs.userAccess | async)?.userType === 'tango' || (gs.userAccess | async)?.userType === 'client' || (gs.userAccess | async)?.userType === 'lead'\" >\r\n <ng-container *ngIf=\"showPageTitle()\">\r\n <lib-page-title [appPageTitleDirection]=\"appPageTitleDirection\" [appPageTitleBreadcrumb]=\"appPageTitleBreadcrumb\"\r\n [appPageTitleDescription]=\"appPageTitleDescription\" class=\"page-title d-flex flex-wrap me-3\"\r\n [ngClass]=\"{'flex-column justify-content-center': appPageTitleDirection === 'column', 'align-items-center': appPageTitleDirection !== 'column', appPageTitleCSSClass}\">\r\n </lib-page-title>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"multiSelect && users.userType ==='tango'\">\r\n <lib-classic class=\"d-flex align-items-center gap-2 gap-lg-3\"></lib-classic>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelect && users.userType ==='tango'\">\r\n <lib-client-settings class=\"d-flex align-items-center me-5\"></lib-client-settings>\r\n </ng-container>\r\n <ng-container *ngIf=\"datepicker && (users.userType ==='client' || users.userType ==='tango')\">\r\n <lib-datepicker class=\"d-flex align-items-center me-5\"></lib-datepicker>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelectdatepicker && users.userType ==='tango'\">\r\n <lib-date-single-select class=\"d-flex align-items-center me-5\"></lib-date-single-select>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleStore\">\r\n <lib-single-store class=\"d-flex align-items-center me-5\"></lib-single-store>\r\n </ng-container>\r\n <ng-container *ngIf=\"trafficdatepicker\">\r\n <lib-traffic-header class=\"d-flex align-items-center me-5\"></lib-traffic-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxdatepicker\">\r\n <lib-trax-header class=\"d-flex align-items-center me-5\"></lib-trax-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxwithoutdatepicker\">\r\n <lib-trax-withoutdate class=\"d-flex align-items-center me-5\"></lib-trax-withoutdate>\r\n </ng-container>\r\n <ng-container *ngIf=\"storesSingle\">\r\n <lib-single-storedate class=\"d-flex align-items-center me-5\"></lib-single-storedate>\r\n </ng-container>\r\n <ng-container *ngIf=\"nobWithoutClient\">\r\n <lib-traffic-nob class=\"d-flex align-items-center me-5\"></lib-traffic-nob>\r\n </ng-container>\r\n \r\n <!-- <ng-container *ngIf=\"appToolbarLayout === 'extended'\">\r\n <lib-extended class=\"d-flex align-items-center flex-shrink-0 me-5\"></lib-extended>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'reports'\">\r\n <lib-reports class=\"d-flex align-items-center overflow-auto\" [appPageTitleDisplay]=\"appPageTitleDisplay\">\r\n </lib-reports>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'saas'\">\r\n <lib-saas class=\"d-flex align-items-center gap-2\" [appPageTitleDisplay]=\"appPageTitleDisplay\"></lib-saas>\r\n </ng-container> -->\r\n</ng-container>\r\n</div>\r\n<!--end::Toolbar container-->\r\n" }]
|
|
6757
|
-
}], ctorParameters: () => [{ type: i1.LayoutService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i1.GlobalStateService }], propDecorators: { currentLayoutType: [{
|
|
6820
|
+
}], ctorParameters: () => [{ type: i1.LayoutService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i1.GlobalStateService }, { type: AuthService }], propDecorators: { currentLayoutType: [{
|
|
6758
6821
|
type: Input
|
|
6759
6822
|
}], appToolbarLayout: [{
|
|
6760
6823
|
type: Input
|