tango-app-ui-shared 3.3.1-beta.92 → 3.3.1-beta.94
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 +15 -2
- package/esm2022/lib/modules/layout/toolbar/trax-withoutdate/trax-withoutdate.component.mjs +2 -2
- package/esm2022/lib/services/auth.service.mjs +10 -1
- package/fesm2022/tango-app-ui-shared.mjs +74 -5
- 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 +3 -0
- package/package.json +1 -1
|
@@ -43,6 +43,7 @@ class AuthService {
|
|
|
43
43
|
dropDownTrigger = new BehaviorSubject(null);
|
|
44
44
|
trafficApiUrl;
|
|
45
45
|
traxUrl;
|
|
46
|
+
galleryApiUrl;
|
|
46
47
|
constructor(router, gs, http) {
|
|
47
48
|
this.router = router;
|
|
48
49
|
this.gs = gs;
|
|
@@ -56,6 +57,8 @@ class AuthService {
|
|
|
56
57
|
this.authlocalStorageToken = `${env.appVersion}-${env.USERDATA_KEY}`;
|
|
57
58
|
this.billingApiUrl = env.billingApiUrl;
|
|
58
59
|
this.trafficApiUrl = env.trafficApiUrl;
|
|
60
|
+
this.galleryApiUrl = env.galleryApiUrl;
|
|
61
|
+
this.traxUrl = env.trafficApiUrl;
|
|
59
62
|
this.traxUrl = env.traxUrl;
|
|
60
63
|
}
|
|
61
64
|
});
|
|
@@ -133,9 +136,15 @@ class AuthService {
|
|
|
133
136
|
getHeaderStores(data) {
|
|
134
137
|
return this.http.post(`${this.trafficApiUrl}/headerStores_v2`, data);
|
|
135
138
|
}
|
|
139
|
+
getHeadertraxStores(data) {
|
|
140
|
+
return this.http.post(`${this.galleryApiUrl}/headerStores_v2`, data);
|
|
141
|
+
}
|
|
136
142
|
getBrandDetails(id) {
|
|
137
143
|
return this.http.get(`${this.clientApiUrl}/client-details/${id}`);
|
|
138
144
|
}
|
|
145
|
+
getHeaderUsers(data) {
|
|
146
|
+
return this.http.post(`${this.trafficApiUrl}/headerUserEmails_v2`, data);
|
|
147
|
+
}
|
|
139
148
|
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
149
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
141
150
|
}
|
|
@@ -2809,6 +2818,19 @@ class DatepickerComponent {
|
|
|
2809
2818
|
localStorage.setItem("header-filters", JSON.stringify(this.selectedFilters));
|
|
2810
2819
|
this.gs.dataRangeValue.next(this.selectedFilters);
|
|
2811
2820
|
}
|
|
2821
|
+
this.getUserInfo(this.selectedFilters.client);
|
|
2822
|
+
}
|
|
2823
|
+
getUserInfo(client) {
|
|
2824
|
+
let obj = {
|
|
2825
|
+
clientId: client ? client : ''
|
|
2826
|
+
};
|
|
2827
|
+
if (client) {
|
|
2828
|
+
this.service.getHeaderUsers(obj).subscribe({
|
|
2829
|
+
next: (e) => {
|
|
2830
|
+
localStorage.setItem("usersEmail-info", JSON.stringify(e?.data?.userEmailData || []));
|
|
2831
|
+
}
|
|
2832
|
+
});
|
|
2833
|
+
}
|
|
2812
2834
|
}
|
|
2813
2835
|
ranges = {
|
|
2814
2836
|
Today: [this.dayjs(), this.dayjs()],
|
|
@@ -3474,9 +3496,22 @@ class TrafficHeaderComponent {
|
|
|
3474
3496
|
// console.log("4")
|
|
3475
3497
|
this.cd.detectChanges();
|
|
3476
3498
|
}
|
|
3499
|
+
this.getUserInfo(this.selectedFilters.client);
|
|
3477
3500
|
},
|
|
3478
3501
|
});
|
|
3479
3502
|
}
|
|
3503
|
+
getUserInfo(client) {
|
|
3504
|
+
let obj = {
|
|
3505
|
+
clientId: client ? client : ''
|
|
3506
|
+
};
|
|
3507
|
+
if (client) {
|
|
3508
|
+
this.auth.getHeaderUsers(obj).subscribe({
|
|
3509
|
+
next: (e) => {
|
|
3510
|
+
localStorage.setItem("usersEmail-info", JSON.stringify(e?.data?.userEmailData || []));
|
|
3511
|
+
}
|
|
3512
|
+
});
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3480
3515
|
onClientSelect(event) {
|
|
3481
3516
|
// Update the selected client
|
|
3482
3517
|
this.selectedClient = event;
|
|
@@ -4276,6 +4311,7 @@ class TraxHeaderComponent {
|
|
|
4276
4311
|
this.cd.detectChanges();
|
|
4277
4312
|
}
|
|
4278
4313
|
this.getDateRanges();
|
|
4314
|
+
this.getUserInfo(this.selectedFilters?.client);
|
|
4279
4315
|
},
|
|
4280
4316
|
});
|
|
4281
4317
|
}
|
|
@@ -4393,6 +4429,18 @@ class TraxHeaderComponent {
|
|
|
4393
4429
|
}
|
|
4394
4430
|
}
|
|
4395
4431
|
}
|
|
4432
|
+
getUserInfo(client) {
|
|
4433
|
+
let obj = {
|
|
4434
|
+
clientId: client ? client : ''
|
|
4435
|
+
};
|
|
4436
|
+
if (client) {
|
|
4437
|
+
this.auth.getHeaderUsers(obj).subscribe({
|
|
4438
|
+
next: (e) => {
|
|
4439
|
+
localStorage.setItem("usersEmail-info", JSON.stringify(e?.data?.userEmailData || []));
|
|
4440
|
+
}
|
|
4441
|
+
});
|
|
4442
|
+
}
|
|
4443
|
+
}
|
|
4396
4444
|
opendropdown(e) {
|
|
4397
4445
|
e.stopPropagation();
|
|
4398
4446
|
this.Opendropdown = !this.Opendropdown;
|
|
@@ -4546,7 +4594,7 @@ class TraxHeaderComponent {
|
|
|
4546
4594
|
.filter(group => group.checked)
|
|
4547
4595
|
.map(group => group.groupName);
|
|
4548
4596
|
const data = { city, clusters: group, clientId: this.users.clientId ? this.users.clientId : this.selectedFilters.client };
|
|
4549
|
-
this.auth.
|
|
4597
|
+
this.auth.getHeadertraxStores(data).subscribe({
|
|
4550
4598
|
next: (res) => {
|
|
4551
4599
|
if (res && res.code === 200) {
|
|
4552
4600
|
this.stores = res.data.storesData;
|
|
@@ -5386,7 +5434,7 @@ class TraxWithoutdateComponent {
|
|
|
5386
5434
|
.filter(group => group.checked)
|
|
5387
5435
|
.map(group => group.groupName);
|
|
5388
5436
|
const data = { city, clusters: group, clientId: this.users.clientId ? this.users.clientId : this.selectedFilters.client };
|
|
5389
|
-
this.auth.
|
|
5437
|
+
this.auth.getHeadertraxStores(data).subscribe({
|
|
5390
5438
|
next: (res) => {
|
|
5391
5439
|
if (res && res.code === 200) {
|
|
5392
5440
|
this.stores = res.data.storesData;
|
|
@@ -6513,6 +6561,7 @@ class ToolbarComponent {
|
|
|
6513
6561
|
router;
|
|
6514
6562
|
route;
|
|
6515
6563
|
gs;
|
|
6564
|
+
auth;
|
|
6516
6565
|
unsubscribe = [];
|
|
6517
6566
|
// Public props
|
|
6518
6567
|
currentLayoutType;
|
|
@@ -6551,17 +6600,23 @@ class ToolbarComponent {
|
|
|
6551
6600
|
traxwithoutdatepicker;
|
|
6552
6601
|
storesSingle;
|
|
6553
6602
|
nobWithoutClient;
|
|
6554
|
-
constructor(layout, router, route, gs) {
|
|
6603
|
+
constructor(layout, router, route, gs, auth) {
|
|
6555
6604
|
this.layout = layout;
|
|
6556
6605
|
this.router = router;
|
|
6557
6606
|
this.route = route;
|
|
6558
6607
|
this.gs = gs;
|
|
6608
|
+
this.auth = auth;
|
|
6559
6609
|
}
|
|
6560
6610
|
ngOnInit() {
|
|
6561
6611
|
if ("user-info" in localStorage) {
|
|
6562
6612
|
const userData = JSON.parse(localStorage.getItem("user-info") || "{}");
|
|
6563
6613
|
this.users = userData;
|
|
6564
6614
|
}
|
|
6615
|
+
if ("header-filters" in localStorage) {
|
|
6616
|
+
const data = JSON.parse(localStorage.getItem("header-filters") || "{}");
|
|
6617
|
+
this.client = data?.client;
|
|
6618
|
+
}
|
|
6619
|
+
this.getUserInfo(this.client ? this.client : this.users.client);
|
|
6565
6620
|
this.showPageTitle();
|
|
6566
6621
|
const subscr = this.layout.layoutConfigSubject
|
|
6567
6622
|
.asObservable()
|
|
@@ -6605,7 +6660,9 @@ class ToolbarComponent {
|
|
|
6605
6660
|
this.unsubscribe.forEach((sb) => sb.unsubscribe());
|
|
6606
6661
|
this.destroy$.next(true);
|
|
6607
6662
|
this.destroy$.complete();
|
|
6663
|
+
// localStorage.removeItem("usersEmail-info");
|
|
6608
6664
|
}
|
|
6665
|
+
client;
|
|
6609
6666
|
showPageTitle() {
|
|
6610
6667
|
let URL = "";
|
|
6611
6668
|
if ("header-filters" in localStorage) {
|
|
@@ -6748,13 +6805,25 @@ class ToolbarComponent {
|
|
|
6748
6805
|
this.storesSingle = storesSingle;
|
|
6749
6806
|
this.nobWithoutClient = nobWithoutClient;
|
|
6750
6807
|
}
|
|
6751
|
-
|
|
6808
|
+
getUserInfo(client) {
|
|
6809
|
+
let obj = {
|
|
6810
|
+
clientId: client ? client : ''
|
|
6811
|
+
};
|
|
6812
|
+
if (client) {
|
|
6813
|
+
this.auth.getHeaderUsers(obj).subscribe({
|
|
6814
|
+
next: (e) => {
|
|
6815
|
+
localStorage.setItem("usersEmail-info", JSON.stringify(e?.data?.userEmailData || []));
|
|
6816
|
+
}
|
|
6817
|
+
});
|
|
6818
|
+
}
|
|
6819
|
+
}
|
|
6820
|
+
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
6821
|
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
6822
|
}
|
|
6754
6823
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarComponent, decorators: [{
|
|
6755
6824
|
type: Component,
|
|
6756
6825
|
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: [{
|
|
6826
|
+
}], ctorParameters: () => [{ type: i1.LayoutService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i1.GlobalStateService }, { type: AuthService }], propDecorators: { currentLayoutType: [{
|
|
6758
6827
|
type: Input
|
|
6759
6828
|
}], appToolbarLayout: [{
|
|
6760
6829
|
type: Input
|