@propmix/profet-common-header 1.0.4 → 1.0.6

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, Injectable, Inject, EventEmitter, Component, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';
3
3
  import { HttpClient, HttpClientModule } from '@angular/common/http';
4
- import { Observable } from 'rxjs';
4
+ import { Observable, reduce } from 'rxjs';
5
5
  import { Router } from '@angular/router';
6
6
  import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
7
7
  import { Auth } from 'aws-amplify';
@@ -22,7 +22,8 @@ EndPoints.API_URLS = {
22
22
  getAppsApi: '/api/company/getALlApplications',
23
23
  getCompanyApplications: '/api/company/getCompanyApplications',
24
24
  getUserCompanies: '/api/profile/getUserCompanies',
25
- updateUserCompany: '/api/company/updateUserCompany'
25
+ updateUserCompany: '/api/company/updateUserCompany',
26
+ fetchCompanyProfile: '/fetchCompanyProfile'
26
27
  };
27
28
 
28
29
  class ApiGatewayService {
@@ -90,9 +91,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
90
91
  }]
91
92
  }] });
92
93
 
94
+ class Utilities {
95
+ static convertObjectToQueryString(obj) {
96
+ let str = '';
97
+ for (const key of Object.keys(obj)) {
98
+ if (obj[key] !== '' && obj[key] != null) {
99
+ if (str != '') {
100
+ str += '&';
101
+ }
102
+ if (Array.isArray(obj[key])) {
103
+ let arLength = obj[key].length;
104
+ obj[key].forEach((ar, index) => {
105
+ str += key + "=" + encodeURIComponent(ar);
106
+ if (index < arLength - 1) {
107
+ str += '&';
108
+ }
109
+ });
110
+ }
111
+ else if (typeof (obj[key]) == 'object') {
112
+ if (Object.keys(obj[key]) && Object.keys(obj[key]).length > 0) {
113
+ let i = 0;
114
+ for (const subKey of Object.keys(obj[key])) {
115
+ if (i > 0) {
116
+ str += '&';
117
+ }
118
+ str += key + "." + subKey + "=" + encodeURIComponent(obj[key][subKey]);
119
+ ++i;
120
+ }
121
+ }
122
+ else {
123
+ str += key + "=" + encodeURIComponent(obj[key]);
124
+ }
125
+ }
126
+ else {
127
+ str += key + "=" + encodeURIComponent(obj[key]);
128
+ }
129
+ }
130
+ }
131
+ return str;
132
+ }
133
+ }
134
+
93
135
  class HeaderConfig {
94
136
  constructor() {
95
137
  this.apiUrl = '';
138
+ this.portalFrontendUrl = '';
96
139
  }
97
140
  }
98
141
 
@@ -102,6 +145,17 @@ class CommonHeaderService {
102
145
  this.baseUrl = '';
103
146
  this._apiGatewayService = inject(ApiGatewayService);
104
147
  this.baseUrl = this.config.apiUrl;
148
+ this.portalFrontendUrl = config.portalFrontendUrl;
149
+ }
150
+ getDomainInfo() {
151
+ let dom = document.location.host.split('.');
152
+ let domainInfo = APP_DOMAIN.find(x => x.domain === dom[0]);
153
+ if (domainInfo) {
154
+ return domainInfo;
155
+ }
156
+ // Check if the second part of the domain exists before using it
157
+ domainInfo = dom[1] ? APP_DOMAIN.find(x => x.domain === dom[1]) : undefined;
158
+ return domainInfo || undefined;
105
159
  }
106
160
  getApps() {
107
161
  let url = `${this.baseUrl + EndPoints.API_URLS.getAppsApi}`;
@@ -119,6 +173,18 @@ class CommonHeaderService {
119
173
  let url = `${this.baseUrl + EndPoints.API_URLS.updateUserCompany}`;
120
174
  return this._apiGatewayService.doPost(url, reqBody);
121
175
  }
176
+ fetchCompanyProfile(reqBody) {
177
+ let config = {
178
+ isUnauthorized: true
179
+ };
180
+ let url = `${this.baseUrl + EndPoints.API_URLS.fetchCompanyProfile + '?' + Utilities.convertObjectToQueryString(reqBody)}`;
181
+ return this._apiGatewayService.doGet(url, config).pipe(reduce((acc, res) => {
182
+ if (res === null || res === void 0 ? void 0 : res.data) {
183
+ acc = res.data;
184
+ }
185
+ return acc;
186
+ }, {}));
187
+ }
122
188
  }
123
189
  CommonHeaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommonHeaderService, deps: [{ token: 'headerConfig' }], target: i0.ɵɵFactoryTarget.Injectable });
124
190
  CommonHeaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommonHeaderService, providedIn: 'root' });
@@ -144,9 +210,10 @@ class HeaderComponent {
144
210
  this._snackbar = inject(MatSnackBar);
145
211
  this._ser = inject(CommonHeaderService);
146
212
  console.log('lib domain', document.location.host);
147
- // console.log('ver => 2.0.0')
213
+ console.log('ver => 1.0.6');
148
214
  }
149
215
  ngOnInit() {
216
+ this.fetchCompanyProfile();
150
217
  this._ser.getApps().subscribe({
151
218
  next: (v) => {
152
219
  var _a;
@@ -164,6 +231,15 @@ class HeaderComponent {
164
231
  .catch(() => console.log("User not logged in"));
165
232
  this.getUserCompany();
166
233
  }
234
+ menuAction() {
235
+ this.menuEvent.emit();
236
+ }
237
+ fetchCompanyProfile() {
238
+ let req = {
239
+ companyName: document.location.host.split('.')[0]
240
+ };
241
+ this.companyProfile$ = this._ser.fetchCompanyProfile(req);
242
+ }
167
243
  fetchCompanyData(allApps) {
168
244
  this._ser.getCompanyApplications().subscribe({
169
245
  next: (v) => {
@@ -211,7 +287,13 @@ class HeaderComponent {
211
287
  }
212
288
  profile() {
213
289
  // this.fetchUserData();
214
- this._router.navigateByUrl('/app/profile');
290
+ if (this._ser.portalFrontendUrl) {
291
+ let url = this._ser.portalFrontendUrl + '/app/profile';
292
+ document.location.href = url;
293
+ }
294
+ else {
295
+ this._router.navigateByUrl('/app/profile');
296
+ }
215
297
  }
216
298
  onLogoutClick() {
217
299
  Auth.signOut({ global: true })
@@ -223,33 +305,38 @@ class HeaderComponent {
223
305
  }
224
306
  switchCompany(company) {
225
307
  // switch the user to the selectec company
226
- let req = { companyKey: company.companyKey };
227
- this._ser.updateUserCompany(req).subscribe({
228
- next: (response) => {
229
- if (response && response.type && response.type == "OK") {
230
- // refresh the current page to reload the contents based on the current company
231
- window.location.reload();
232
- }
233
- else {
308
+ // Find the domain information
309
+ let domainInfo = this._ser.getDomainInfo();
310
+ if (domainInfo) {
311
+ let req = { companyKey: company.companyKey, appName: domainInfo.appCode };
312
+ this._ser.updateUserCompany(req).subscribe({
313
+ next: (response) => {
314
+ if (response && response.type && response.type == "OK") {
315
+ if (response.data.applicationURL) {
316
+ let url = response.data.applicationURL + window.location.pathname;
317
+ window.location.replace(url);
318
+ }
319
+ // refresh the current page to reload the contents based on the current company
320
+ // window.location.reload();
321
+ }
322
+ else {
323
+ // display a message to the user that the company could not be switched.
324
+ this._snackbar.open('Company could not be switched. Please try again or contact support.', 'OK', { duration: 5000 });
325
+ }
326
+ },
327
+ error: (e) => {
234
328
  // display a message to the user that the company could not be switched.
235
329
  this._snackbar.open('Company could not be switched. Please try again or contact support.', 'OK', { duration: 5000 });
236
330
  }
237
- },
238
- error: (e) => {
239
- // display a message to the user that the company could not be switched.
240
- this._snackbar.open('Company could not be switched. Please try again or contact support.', 'OK', { duration: 5000 });
241
- }
242
- });
243
- }
244
- menuAction() {
245
- this.menuEvent.emit();
331
+ });
332
+ }
246
333
  }
247
334
  }
248
335
  HeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
249
- HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: HeaderComponent, selector: "lib-header", inputs: { template: "template" }, outputs: { menuEvent: "menuEvent" }, ngImport: i0, template: "<mat-toolbar color=\"primary\" class=\"common_header shadow-sm\">\n <button mat-icon-button (click)=\"menuAction()\" aria-label=\"main menu\" tabindex=\"0\" class=\"menuHamberger me-4\">\n <img src=\"../assets/images/hamburger_menu.svg\" style=\"width: 20px;height: 20px;\">\n </button>\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img src=\"assets/images/Profet_Logo.png\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <span class=\"example-spacer\"></span>\n <ng-container *ngIf=\"template\" [ngTemplateOutlet]=\"template\"></ng-container>\n <button *ngIf=\"appList.length > 0\" mat-icon-button class=\"me-3 switchButton\" [matMenuTriggerFor]=\"apps\">\n <img src=\"../assets/images/apps.png\" alt=\"apps icon\" style=\"width:20px;height: 20px;\">\n </button>\n <mat-menu #apps=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let app of appList\">\n <button mat-menu-item (click)=\"appRedirect(app)\">{{app.name}}</button>\n </div>\n </mat-menu>\n <div class=\"profile-name\">\n <p *ngIf=\"username\" class=\"xsHiddenUsername mb-0\">{{username}}</p>\n <!--<span class=\"xsHiddenUsername mb-0\" *ngFor=\"let role of userRole\">{{role | formatWord: true:'_'}}</span>-->\n </div>\n <button mat-button [matMenuTriggerFor]=\"menu\">\n <img class=\"avatarLogo\" src=\"../assets/images/dp.png\" alt=\"Avatar Logo\" class=\"avatarLogo rounded-pill\">\n </button>\n <mat-menu #menu=\"matMenu\" class=\"accounts_drpmenu\">\n <span *ngIf=\"username\" class=\"xsShowUsername\">{{username}}</span>\n <button mat-menu-item (click)=\"profile()\">Profile</button>\n <button mat-menu-item (click)=\"onLogoutClick()\">Logout</button>\n <button *ngIf=\"showSwitchCompanies\" mat-menu-item [matMenuTriggerFor]=\"companies\">Switch Company</button>\n <mat-menu #companies=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let company of userCompanies\">\n <button mat-menu-item (click)=\"switchCompany(company)\">{{company.name}}</button>\n </div>\n </mat-menu>\n </mat-menu>\n</mat-toolbar>", styles: ["@import\"~@angular/material/prebuilt-themes/indigo-pink.css\";.profile-name{text-align:end;color:#000}.profile-name span{font-size:12px;color:#9e9e9ede}.avatarLogo{width:40px}mat-toolbar.mat-toolbar.common_header.mat-primary.mat-toolbar-single-row{position:fixed;left:0;top:0;background-color:#fff;height:48px}button.switchButton,button.menuHamberger{padding:8px!important}.sidenavPanel{padding:20px 25px;height:100vh;position:relative}ul.navbarList{padding-left:0;list-style:none;margin-top:40px}ul.navbarList li{color:#666;font-weight:400;margin-bottom:25px;width:170px;cursor:pointer}.active{color:#4177d6!important}ul.navbarList li img{width:23px;margin-right:15px}.accounts_drpmenu{margin-top:.7em}.xsShowUsername{display:none;padding:0 16px;height:48px;line-height:48px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }], encapsulation: i0.ViewEncapsulation.None });
336
+ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: HeaderComponent, selector: "lib-header", inputs: { template: "template" }, outputs: { menuEvent: "menuEvent" }, ngImport: i0, template: "<mat-toolbar color=\"primary\" class=\"common_header shadow-sm\">\n <button mat-icon-button (click)=\"menuAction()\" aria-label=\"main menu\" tabindex=\"0\" class=\"menuHamberger me-4\">\n <img src=\"../assets/images/hamburger_menu.svg\" style=\"width: 20px;height: 20px;\">\n </button>\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img *ngIf=\"companyProfile$ | async\" [src]=\"(companyProfile$ | async)?.logo\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <span class=\"example-spacer\"></span>\n <ng-container *ngIf=\"template\" [ngTemplateOutlet]=\"template\"></ng-container>\n <button *ngIf=\"appList.length > 0\" mat-icon-button class=\"me-3 switchButton\" [matMenuTriggerFor]=\"apps\">\n <img src=\"../assets/images/apps.png\" alt=\"apps icon\" style=\"width:20px;height: 20px;\">\n </button>\n <mat-menu #apps=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let app of appList\">\n <button mat-menu-item (click)=\"appRedirect(app)\">{{app.name}}</button>\n </div>\n </mat-menu>\n <div class=\"profile-name\">\n <p *ngIf=\"username\" class=\"xsHiddenUsername mb-0\">{{username}}</p>\n <!--<span class=\"xsHiddenUsername mb-0\" *ngFor=\"let role of userRole\">{{role | formatWord: true:'_'}}</span>-->\n </div>\n <button mat-button [matMenuTriggerFor]=\"menu\">\n <img class=\"avatarLogo\" src=\"../assets/images/dp.png\" alt=\"Avatar Logo\" class=\"avatarLogo rounded-pill\">\n </button>\n <mat-menu #menu=\"matMenu\" class=\"accounts_drpmenu\">\n <span *ngIf=\"username\" class=\"xsShowUsername\">{{username}}</span>\n <button mat-menu-item (click)=\"profile()\">Profile</button>\n <button mat-menu-item (click)=\"onLogoutClick()\">Logout</button>\n <button *ngIf=\"showSwitchCompanies\" mat-menu-item [matMenuTriggerFor]=\"companies\">Switch Company</button>\n <mat-menu #companies=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let company of userCompanies\">\n <button mat-menu-item (click)=\"switchCompany(company)\">{{company.name}}</button>\n </div>\n </mat-menu>\n </mat-menu>\n</mat-toolbar>", styles: ["@import\"~@angular/material/prebuilt-themes/indigo-pink.css\";.profile-name{text-align:end;color:#000}.profile-name span{font-size:12px;color:#9e9e9ede}.avatarLogo{width:40px}mat-toolbar.mat-toolbar.common_header.mat-primary.mat-toolbar-single-row{position:fixed;left:0;top:0;background-color:#fff;height:48px}button.switchButton,button.menuHamberger{padding:8px!important}.sidenavPanel{padding:20px 25px;height:100vh;position:relative}ul.navbarList{padding-left:0;list-style:none;margin-top:40px}ul.navbarList li{color:#666;font-weight:400;margin-bottom:25px;width:170px;cursor:pointer}.active{color:#4177d6!important}ul.navbarList li img{width:23px;margin-right:15px}.accounts_drpmenu{margin-top:.7em}.xsShowUsername{display:none;padding:0 16px;height:48px;line-height:48px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
250
337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HeaderComponent, decorators: [{
251
338
  type: Component,
252
- args: [{ selector: 'lib-header', encapsulation: ViewEncapsulation.None, template: "<mat-toolbar color=\"primary\" class=\"common_header shadow-sm\">\n <button mat-icon-button (click)=\"menuAction()\" aria-label=\"main menu\" tabindex=\"0\" class=\"menuHamberger me-4\">\n <img src=\"../assets/images/hamburger_menu.svg\" style=\"width: 20px;height: 20px;\">\n </button>\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img src=\"assets/images/Profet_Logo.png\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <span class=\"example-spacer\"></span>\n <ng-container *ngIf=\"template\" [ngTemplateOutlet]=\"template\"></ng-container>\n <button *ngIf=\"appList.length > 0\" mat-icon-button class=\"me-3 switchButton\" [matMenuTriggerFor]=\"apps\">\n <img src=\"../assets/images/apps.png\" alt=\"apps icon\" style=\"width:20px;height: 20px;\">\n </button>\n <mat-menu #apps=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let app of appList\">\n <button mat-menu-item (click)=\"appRedirect(app)\">{{app.name}}</button>\n </div>\n </mat-menu>\n <div class=\"profile-name\">\n <p *ngIf=\"username\" class=\"xsHiddenUsername mb-0\">{{username}}</p>\n <!--<span class=\"xsHiddenUsername mb-0\" *ngFor=\"let role of userRole\">{{role | formatWord: true:'_'}}</span>-->\n </div>\n <button mat-button [matMenuTriggerFor]=\"menu\">\n <img class=\"avatarLogo\" src=\"../assets/images/dp.png\" alt=\"Avatar Logo\" class=\"avatarLogo rounded-pill\">\n </button>\n <mat-menu #menu=\"matMenu\" class=\"accounts_drpmenu\">\n <span *ngIf=\"username\" class=\"xsShowUsername\">{{username}}</span>\n <button mat-menu-item (click)=\"profile()\">Profile</button>\n <button mat-menu-item (click)=\"onLogoutClick()\">Logout</button>\n <button *ngIf=\"showSwitchCompanies\" mat-menu-item [matMenuTriggerFor]=\"companies\">Switch Company</button>\n <mat-menu #companies=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let company of userCompanies\">\n <button mat-menu-item (click)=\"switchCompany(company)\">{{company.name}}</button>\n </div>\n </mat-menu>\n </mat-menu>\n</mat-toolbar>", styles: ["@import\"~@angular/material/prebuilt-themes/indigo-pink.css\";.profile-name{text-align:end;color:#000}.profile-name span{font-size:12px;color:#9e9e9ede}.avatarLogo{width:40px}mat-toolbar.mat-toolbar.common_header.mat-primary.mat-toolbar-single-row{position:fixed;left:0;top:0;background-color:#fff;height:48px}button.switchButton,button.menuHamberger{padding:8px!important}.sidenavPanel{padding:20px 25px;height:100vh;position:relative}ul.navbarList{padding-left:0;list-style:none;margin-top:40px}ul.navbarList li{color:#666;font-weight:400;margin-bottom:25px;width:170px;cursor:pointer}.active{color:#4177d6!important}ul.navbarList li img{width:23px;margin-right:15px}.accounts_drpmenu{margin-top:.7em}.xsShowUsername{display:none;padding:0 16px;height:48px;line-height:48px}\n"] }]
339
+ args: [{ selector: 'lib-header', encapsulation: ViewEncapsulation.None, template: "<mat-toolbar color=\"primary\" class=\"common_header shadow-sm\">\n <button mat-icon-button (click)=\"menuAction()\" aria-label=\"main menu\" tabindex=\"0\" class=\"menuHamberger me-4\">\n <img src=\"../assets/images/hamburger_menu.svg\" style=\"width: 20px;height: 20px;\">\n </button>\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img *ngIf=\"companyProfile$ | async\" [src]=\"(companyProfile$ | async)?.logo\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <span class=\"example-spacer\"></span>\n <ng-container *ngIf=\"template\" [ngTemplateOutlet]=\"template\"></ng-container>\n <button *ngIf=\"appList.length > 0\" mat-icon-button class=\"me-3 switchButton\" [matMenuTriggerFor]=\"apps\">\n <img src=\"../assets/images/apps.png\" alt=\"apps icon\" style=\"width:20px;height: 20px;\">\n </button>\n <mat-menu #apps=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let app of appList\">\n <button mat-menu-item (click)=\"appRedirect(app)\">{{app.name}}</button>\n </div>\n </mat-menu>\n <div class=\"profile-name\">\n <p *ngIf=\"username\" class=\"xsHiddenUsername mb-0\">{{username}}</p>\n <!--<span class=\"xsHiddenUsername mb-0\" *ngFor=\"let role of userRole\">{{role | formatWord: true:'_'}}</span>-->\n </div>\n <button mat-button [matMenuTriggerFor]=\"menu\">\n <img class=\"avatarLogo\" src=\"../assets/images/dp.png\" alt=\"Avatar Logo\" class=\"avatarLogo rounded-pill\">\n </button>\n <mat-menu #menu=\"matMenu\" class=\"accounts_drpmenu\">\n <span *ngIf=\"username\" class=\"xsShowUsername\">{{username}}</span>\n <button mat-menu-item (click)=\"profile()\">Profile</button>\n <button mat-menu-item (click)=\"onLogoutClick()\">Logout</button>\n <button *ngIf=\"showSwitchCompanies\" mat-menu-item [matMenuTriggerFor]=\"companies\">Switch Company</button>\n <mat-menu #companies=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let company of userCompanies\">\n <button mat-menu-item (click)=\"switchCompany(company)\">{{company.name}}</button>\n </div>\n </mat-menu>\n </mat-menu>\n</mat-toolbar>", styles: ["@import\"~@angular/material/prebuilt-themes/indigo-pink.css\";.profile-name{text-align:end;color:#000}.profile-name span{font-size:12px;color:#9e9e9ede}.avatarLogo{width:40px}mat-toolbar.mat-toolbar.common_header.mat-primary.mat-toolbar-single-row{position:fixed;left:0;top:0;background-color:#fff;height:48px}button.switchButton,button.menuHamberger{padding:8px!important}.sidenavPanel{padding:20px 25px;height:100vh;position:relative}ul.navbarList{padding-left:0;list-style:none;margin-top:40px}ul.navbarList li{color:#666;font-weight:400;margin-bottom:25px;width:170px;cursor:pointer}.active{color:#4177d6!important}ul.navbarList li img{width:23px;margin-right:15px}.accounts_drpmenu{margin-top:.7em}.xsShowUsername{display:none;padding:0 16px;height:48px;line-height:48px}\n"] }]
253
340
  }], ctorParameters: function () { return []; }, propDecorators: { template: [{
254
341
  type: Input
255
342
  }], menuEvent: [{
@@ -297,6 +384,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
297
384
  }]
298
385
  }] });
299
386
 
387
+ const APP_DOMAIN = [
388
+ { domain: 'portal', appCode: 'profet_portal' },
389
+ { domain: 'profet-portal', appCode: 'profet_portal' },
390
+ { domain: 'orders', appCode: 'appraisal_management' },
391
+ { domain: 'review', appCode: 'appraisal_review' },
392
+ { domain: 'valuation', appCode: 'appraisal_valuation' }
393
+ ];
394
+
300
395
  /*
301
396
  * Public API Surface of common-header
302
397
  */
@@ -305,5 +400,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
305
400
  * Generated bundle index. Do not edit.
306
401
  */
307
402
 
308
- export { CommonHeaderModule, CommonHeaderService, HeaderComponent, HeaderConfig };
403
+ export { APP_DOMAIN, CommonHeaderModule, CommonHeaderService, HeaderComponent, HeaderConfig };
309
404
  //# sourceMappingURL=propmix-profet-common-header.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"propmix-profet-common-header.mjs","sources":["../../../projects/common-header/src/lib/api-endpoints.def.ts","../../../projects/common-header/src/lib/api-gateway.service.ts","../../../projects/common-header/src/lib/utils/HeaderConfig.ts","../../../projects/common-header/src/lib/common-header.service.ts","../../../projects/common-header/src/lib/header/header.component.ts","../../../projects/common-header/src/lib/header/header.component.html","../../../projects/common-header/src/lib/common-header.module.ts","../../../projects/common-header/src/public-api.ts","../../../projects/common-header/src/propmix-profet-common-header.ts"],"sourcesContent":["export class EndPoints {\n public static API_URLS = {\n getAppsApi: '/api/company/getALlApplications',\n getCompanyApplications: '/api/company/getCompanyApplications',\n getUserCompanies: '/api/profile/getUserCompanies',\n updateUserCompany: '/api/company/updateUserCompany'\n }\n}","import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ApiGatewayService {\n private _http = inject(HttpClient);\n \n doGet(url: string, config?: any): Observable<any> {\n return new Observable(observer => {\n if (!config) {\n config = {\n isLoaderHidden: false\n };\n };\n let headers:any;\n if(config.isUnauthorized){\n headers = {\n skip: \"true\"\n }\n }\n \n // this._loaderService.requestStarted(config);\n this._http\n .get(url,{headers: headers})\n .subscribe({\n next: (data) => {\n // this._loaderService.requestEnded();\n observer.next(data);\n observer.complete();\n },\n error: (error) => {\n // this.handleError(error, config, observer);\n }\n });\n })\n }\n doPost(url: string, req_body?: any): Observable<any> {\n return new Observable(observer => {\n let headers:any;\n this._http\n .post(url, req_body,{headers: headers})\n .subscribe({\n next: (data) => {\n if (data && data.hasOwnProperty('status')) {\n observer.next(data);\n observer.complete();\n } else {\n observer.next(data);\n observer.complete();\n }\n },\n error: (error:any) => {\n // this.handleError(error, config, observer);\n }\n })\n });\n }\n}\n","export class HeaderConfig {\n apiUrl: string = '';\n}","import { HttpClient } from '@angular/common/http';\nimport { Inject, Injectable, inject } from '@angular/core';\nimport { HeaderConfig } from './utils/HeaderConfig';\nimport { EndPoints } from './api-endpoints.def';\nimport { ApiGatewayService } from './api-gateway.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CommonHeaderService {\n private baseUrl: string = '';\n private _apiGatewayService = inject(ApiGatewayService);\n constructor(@Inject('headerConfig') private config: HeaderConfig) { \n this.baseUrl = this.config.apiUrl;\n }\n\n getApps() {\n let url = `${this.baseUrl + EndPoints.API_URLS.getAppsApi}`;\n return this._apiGatewayService.doGet(url);\n }\n getCompanyApplications() {\n let url = `${this.baseUrl + EndPoints.API_URLS.getCompanyApplications}`;\n return this._apiGatewayService.doGet(url);\n }\n getUserCompanies() {\n let url = `${this.baseUrl + EndPoints.API_URLS.getUserCompanies}`;\n return this._apiGatewayService.doGet(url);\n }\n updateUserCompany(reqBody: any) {\n let url = `${this.baseUrl + EndPoints.API_URLS.updateUserCompany}`;\n return this._apiGatewayService.doPost(url, reqBody);\n }\n}\n","import { Component, OnInit, inject, ViewChild, ViewEncapsulation, Input, Output, EventEmitter, TemplateRef } from '@angular/core';\nimport { CommonHeaderService } from '../common-header.service';\nimport { MatSidenav } from '@angular/material/sidenav';\nimport { Router } from '@angular/router';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { UserDetails } from '../utils/UserDetails';\nimport { Auth } from 'aws-amplify';\n\n@Component({\n selector: 'lib-header',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.css'],\n encapsulation: ViewEncapsulation.None\n})\nexport class HeaderComponent implements OnInit{\n \n username: string = '';\n @Input() template!: TemplateRef<any>;\n @Output() menuEvent = new EventEmitter<any>();\n sidenav!: MatSidenav;\n appList: Array<any> = [];\n userCompanies: any;\n showSwitchCompanies: boolean = false;\n private _router = inject(Router);\n private _snackbar = inject(MatSnackBar);\n private _ser = inject(CommonHeaderService);\n\n constructor(){\n console.log('lib domain',document.location.host)\n // console.log('ver => 2.0.0')\n }\n\n ngOnInit(): void {\n this._ser.getApps().subscribe({\n next: (v) => {\n if(v?.data?.applications && v.data.applications.length > 0){\n this.fetchCompanyData(v.data.applications);\n }\n },\n error: (e) => {\n console.log(e)\n }\n });\n Auth.currentAuthenticatedUser().then(user => {\n this.username = user.attributes.given_name;\n })\n .catch(() => console.log(\"User not logged in\"));\n this.getUserCompany();\n }\n\n fetchCompanyData(allApps:Array<any>) {\n this._ser.getCompanyApplications().subscribe({\n next: (v) => {\n if (v?.data.enabledApplications) {\n this.appList = [];\n let appInfo = [];\n let fetchedApplications = v.data.enabledApplications.split(',');\n\n if (fetchedApplications.length > 0) {\n fetchedApplications.forEach((element:any) => {\n appInfo = allApps.filter(ele => ele.name == element);\n if (appInfo && appInfo.length > 0) {\n if(appInfo[0].name != 'mca'){\n this.appList.push({\n name: appInfo[0].displayName,\n value: element,\n appUrl: appInfo[0].appUrl\n });\n }\n }\n });\n }\n }\n\n }\n })\n }\n\n getUserCompany(){\n this._ser.getUserCompanies().subscribe({\n next: (userCompaniesData: any) => {\n if (userCompaniesData && userCompaniesData.data && userCompaniesData.data.companies) {\n this.userCompanies = userCompaniesData.data.companies;\n if (this.userCompanies.length > 1) {\n this.showSwitchCompanies = true;\n }\n }\n },\n error: (e) => {\n console.log(\"Error in fetching companies for the user\");\n }\n })\n }\n\n appRedirect(app:any) {\n // if (app.name != 'Order Management') {\n window.open(app.appUrl, \"_self\");\n // }\n }\n profile() {\n // this.fetchUserData();\n this._router.navigateByUrl('/app/profile');\n }\n onLogoutClick() {\n Auth.signOut({ global: true })\n .then(data => console.log(data))\n .catch(err => {\n console.log(err)\n Auth.signOut();\n });\n }\n switchCompany(company: any) {\n // switch the user to the selectec company\n let req = { companyKey: company.companyKey };\n this._ser.updateUserCompany(req).subscribe({\n next: (response: any) => {\n if (response && response.type && response.type == \"OK\") {\n // refresh the current page to reload the contents based on the current company\n window.location.reload();\n }\n else {\n // display a message to the user that the company could not be switched.\n this._snackbar.open('Company could not be switched. Please try again or contact support.', 'OK', { duration: 5000 })\n }\n },\n error: (e) => {\n // display a message to the user that the company could not be switched.\n this._snackbar.open('Company could not be switched. Please try again or contact support.', 'OK', { duration: 5000 })\n }\n })\n }\n menuAction(){\n this.menuEvent.emit();\n }\n}\n","<mat-toolbar color=\"primary\" class=\"common_header shadow-sm\">\n <button mat-icon-button (click)=\"menuAction()\" aria-label=\"main menu\" tabindex=\"0\" class=\"menuHamberger me-4\">\n <img src=\"../assets/images/hamburger_menu.svg\" style=\"width: 20px;height: 20px;\">\n </button>\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img src=\"assets/images/Profet_Logo.png\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <span class=\"example-spacer\"></span>\n <ng-container *ngIf=\"template\" [ngTemplateOutlet]=\"template\"></ng-container>\n <button *ngIf=\"appList.length > 0\" mat-icon-button class=\"me-3 switchButton\" [matMenuTriggerFor]=\"apps\">\n <img src=\"../assets/images/apps.png\" alt=\"apps icon\" style=\"width:20px;height: 20px;\">\n </button>\n <mat-menu #apps=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let app of appList\">\n <button mat-menu-item (click)=\"appRedirect(app)\">{{app.name}}</button>\n </div>\n </mat-menu>\n <div class=\"profile-name\">\n <p *ngIf=\"username\" class=\"xsHiddenUsername mb-0\">{{username}}</p>\n <!--<span class=\"xsHiddenUsername mb-0\" *ngFor=\"let role of userRole\">{{role | formatWord: true:'_'}}</span>-->\n </div>\n <button mat-button [matMenuTriggerFor]=\"menu\">\n <img class=\"avatarLogo\" src=\"../assets/images/dp.png\" alt=\"Avatar Logo\" class=\"avatarLogo rounded-pill\">\n </button>\n <mat-menu #menu=\"matMenu\" class=\"accounts_drpmenu\">\n <span *ngIf=\"username\" class=\"xsShowUsername\">{{username}}</span>\n <button mat-menu-item (click)=\"profile()\">Profile</button>\n <button mat-menu-item (click)=\"onLogoutClick()\">Logout</button>\n <button *ngIf=\"showSwitchCompanies\" mat-menu-item [matMenuTriggerFor]=\"companies\">Switch Company</button>\n <mat-menu #companies=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let company of userCompanies\">\n <button mat-menu-item (click)=\"switchCompany(company)\">{{company.name}}</button>\n </div>\n </mat-menu>\n </mat-menu>\n</mat-toolbar>","import { NgModule } from '@angular/core';\nimport { HeaderComponent } from './header/header.component';\nimport {MatToolbarModule} from '@angular/material/toolbar';\nimport {MatIconModule} from '@angular/material/icon'\nimport { HttpClientModule } from '@angular/common/http';\nimport {MatButtonModule} from '@angular/material/button'\nimport {MatSidenavModule} from '@angular/material/sidenav';\nimport {MatMenuModule} from '@angular/material/menu';\nimport { CommonModule } from '@angular/common';\nimport { MatSnackBarModule } from \"@angular/material/snack-bar\";\n\n@NgModule({\n declarations: [\n HeaderComponent\n ],\n imports: [\n CommonModule,\n MatToolbarModule,\n MatIconModule,\n HttpClientModule,\n MatButtonModule,\n MatSidenavModule,\n MatMenuModule,\n MatSnackBarModule\n ],\n exports: [\n HeaderComponent\n ]\n})\nexport class CommonHeaderModule { }\n","/*\n * Public API Surface of common-header\n */\n\nexport * from './lib/common-header.service';\nexport * from './lib/common-header.module';\nexport * from './lib/header/header.component';\nexport * from './lib/utils/HeaderConfig';\nexport * from './lib/utils/UserDetails';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAAa,SAAS,CAAA;;AACJ,SAAA,CAAA,QAAQ,GAAG;AACrB,IAAA,UAAU,EAAE,iCAAiC;AAC7C,IAAA,sBAAsB,EAAE,qCAAqC;AAC7D,IAAA,gBAAgB,EAAE,+BAA+B;AACjD,IAAA,iBAAiB,EAAE,gCAAgC;CACtD;;MCCQ,iBAAiB,CAAA;AAH9B,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;KAoDpC;IAlDC,KAAK,CAAC,GAAW,EAAE,MAAY,EAAA;AAC7B,QAAA,OAAO,IAAI,UAAU,CAAC,QAAQ,IAAG;YAC/B,IAAI,CAAC,MAAM,EAAE;AACX,gBAAA,MAAM,GAAG;AACP,oBAAA,cAAc,EAAE,KAAK;iBACtB,CAAC;AACH,aAAA;YAAA,CAAC;AACF,YAAA,IAAI,OAAW,CAAC;YAChB,IAAG,MAAM,CAAC,cAAc,EAAC;AACvB,gBAAA,OAAO,GAAG;AACR,oBAAA,IAAI,EAAE,MAAM;iBACb,CAAA;AACF,aAAA;;AAGD,YAAA,IAAI,CAAC,KAAK;iBACP,GAAG,CAAC,GAAG,EAAC,EAAC,OAAO,EAAE,OAAO,EAAC,CAAC;AAC3B,iBAAA,SAAS,CAAC;AACT,gBAAA,IAAI,EAAE,CAAC,IAAI,KAAI;;AAEb,oBAAA,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBACpB,QAAQ,CAAC,QAAQ,EAAE,CAAC;iBACrB;AACD,gBAAA,KAAK,EAAE,CAAC,KAAK,KAAI;;iBAEhB;AACF,aAAA,CAAC,CAAC;AACP,SAAC,CAAC,CAAA;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B;QAChB,eAAe;QACf,gBAAgB;QAChB,aAAa;QACb,iBAAiB,aAGjB,eAAe,CAAA,EAAA,CAAA,CAAA;AAGN,kBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAb3B,YAAY;QACZ,gBAAgB;QAChB,aAAa;QACb,gBAAgB;QAChB,eAAe;QACf,gBAAgB;QAChB,aAAa;QACb,iBAAiB,CAAA,EAAA,CAAA,CAAA;4FAMR,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAlB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,gBAAgB;wBAChB,aAAa;wBACb,gBAAgB;wBAChB,eAAe;wBACf,gBAAgB;wBAChB,aAAa;wBACb,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,eAAe;AAChB,qBAAA;iBACF,CAAA;;;AC5BD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"propmix-profet-common-header.mjs","sources":["../../../projects/common-header/src/lib/api-endpoints.def.ts","../../../projects/common-header/src/lib/api-gateway.service.ts","../../../projects/common-header/src/lib/utils/Utilities.ts","../../../projects/common-header/src/lib/utils/HeaderConfig.ts","../../../projects/common-header/src/lib/common-header.service.ts","../../../projects/common-header/src/lib/header/header.component.ts","../../../projects/common-header/src/lib/header/header.component.html","../../../projects/common-header/src/lib/common-header.module.ts","../../../projects/common-header/src/lib/utils/app.constants.ts","../../../projects/common-header/src/public-api.ts","../../../projects/common-header/src/propmix-profet-common-header.ts"],"sourcesContent":["export class EndPoints {\n public static API_URLS = {\n getAppsApi: '/api/company/getALlApplications',\n getCompanyApplications: '/api/company/getCompanyApplications',\n getUserCompanies: '/api/profile/getUserCompanies',\n updateUserCompany: '/api/company/updateUserCompany',\n fetchCompanyProfile: '/fetchCompanyProfile'\n }\n}","import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ApiGatewayService {\n private _http = inject(HttpClient);\n \n doGet(url: string, config?: any): Observable<any> {\n return new Observable(observer => {\n if (!config) {\n config = {\n isLoaderHidden: false\n };\n };\n let headers:any;\n if(config.isUnauthorized){\n headers = {\n skip: \"true\"\n }\n }\n \n // this._loaderService.requestStarted(config);\n this._http\n .get(url,{headers: headers})\n .subscribe({\n next: (data) => {\n // this._loaderService.requestEnded();\n observer.next(data);\n observer.complete();\n },\n error: (error) => {\n // this.handleError(error, config, observer);\n }\n });\n })\n }\n doPost(url: string, req_body?: any): Observable<any> {\n return new Observable(observer => {\n let headers:any;\n this._http\n .post(url, req_body,{headers: headers})\n .subscribe({\n next: (data) => {\n if (data && data.hasOwnProperty('status')) {\n observer.next(data);\n observer.complete();\n } else {\n observer.next(data);\n observer.complete();\n }\n },\n error: (error:any) => {\n // this.handleError(error, config, observer);\n }\n })\n });\n }\n}\n","export class Utilities {\n public static convertObjectToQueryString(obj:any) {\n let str = '';\n for (const key of Object.keys(obj)) {\n if (obj[key] !== '' && obj[key] != null) {\n if (str != '') {\n str += '&';\n }\n if(Array.isArray(obj[key])){\n let arLength = obj[key].length;\n obj[key].forEach((ar:any,index:number) => {\n str += key + \"=\" + encodeURIComponent(ar);\n if(index < arLength-1){\n str += '&';\n }\n });\n \n }\n else if(typeof(obj[key]) == 'object'){\n if(Object.keys(obj[key]) && Object.keys(obj[key]).length > 0){\n let i = 0;\n for (const subKey of Object.keys(obj[key])){\n if(i > 0){\n str += '&';\n }\n str += key + \".\" + subKey + \"=\" + encodeURIComponent(obj[key][subKey]);\n ++i;\n }\n }\n else{\n str += key + \"=\" + encodeURIComponent(obj[key]);\n }\n }\n else{\n str += key + \"=\" + encodeURIComponent(obj[key]);\n }\n }\n }\n return str;\n }\n}","export class HeaderConfig {\n apiUrl: string = '';\n portalFrontendUrl?: string = '';\n}","import { HttpClient } from '@angular/common/http';\nimport { Inject, Injectable, inject } from '@angular/core';\nimport { HeaderConfig } from './utils/HeaderConfig';\nimport { EndPoints } from './api-endpoints.def';\nimport { ApiGatewayService } from './api-gateway.service';\nimport { Utilities } from './utils/Utilities';\nimport { reduce } from 'rxjs';\nimport { APP_DOMAIN } from '../public-api';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CommonHeaderService {\n private baseUrl: string = '';\n portalFrontendUrl: string;\n private _apiGatewayService = inject(ApiGatewayService);\n constructor(@Inject('headerConfig') private config: HeaderConfig) { \n this.baseUrl = this.config.apiUrl;\n this.portalFrontendUrl = config.portalFrontendUrl!;\n }\n\n getDomainInfo(){\n let dom = document.location.host.split('.');\n let domainInfo = APP_DOMAIN.find(x => x.domain === dom[0]);\n if (domainInfo) {\n return domainInfo;\n }\n\n // Check if the second part of the domain exists before using it\n domainInfo = dom[1] ? APP_DOMAIN.find(x => x.domain === dom[1]) : undefined;\n return domainInfo || undefined;\n }\n\n getApps() {\n let url = `${this.baseUrl + EndPoints.API_URLS.getAppsApi}`;\n return this._apiGatewayService.doGet(url);\n }\n getCompanyApplications() {\n let url = `${this.baseUrl + EndPoints.API_URLS.getCompanyApplications}`;\n return this._apiGatewayService.doGet(url);\n }\n getUserCompanies() {\n let url = `${this.baseUrl + EndPoints.API_URLS.getUserCompanies}`;\n return this._apiGatewayService.doGet(url);\n }\n updateUserCompany(reqBody: any) {\n let url = `${this.baseUrl + EndPoints.API_URLS.updateUserCompany}`;\n return this._apiGatewayService.doPost(url, reqBody);\n }\n\n fetchCompanyProfile(reqBody: any){\n let config: any = {\n isUnauthorized: true\n }\n let url = `${this.baseUrl + EndPoints.API_URLS.fetchCompanyProfile+ '?' + Utilities.convertObjectToQueryString(reqBody)}`;\n return this._apiGatewayService.doGet(url,config).pipe(\n reduce((acc,res) => {\n if(res?.data){\n acc = res.data;\n }\n return acc;\n },{})\n );\n }\n}\n","import { Component, OnInit, inject, ViewChild, ViewEncapsulation, Input, Output, EventEmitter, TemplateRef } from '@angular/core';\nimport { CommonHeaderService } from '../common-header.service';\nimport { MatSidenav } from '@angular/material/sidenav';\nimport { Router } from '@angular/router';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { UserDetails } from '../utils/UserDetails';\nimport { Auth } from 'aws-amplify';\nimport { Observable } from 'rxjs';\n\n@Component({\n selector: 'lib-header',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.css'],\n encapsulation: ViewEncapsulation.None\n})\nexport class HeaderComponent implements OnInit{\n \n username: string = '';\n @Input() template!: TemplateRef<any>;\n @Output() menuEvent = new EventEmitter<any>();\n sidenav!: MatSidenav;\n appList: Array<any> = [];\n userCompanies: any;\n showSwitchCompanies: boolean = false;\n companyProfile$!: Observable<any>;\n private _router = inject(Router);\n private _snackbar = inject(MatSnackBar);\n private _ser = inject(CommonHeaderService);\n\n constructor(){\n console.log('lib domain',document.location.host)\n console.log('ver => 1.0.6')\n }\n\n ngOnInit(): void {\n this.fetchCompanyProfile();\n this._ser.getApps().subscribe({\n next: (v) => {\n if(v?.data?.applications && v.data.applications.length > 0){\n this.fetchCompanyData(v.data.applications);\n }\n },\n error: (e) => {\n console.log(e)\n }\n });\n Auth.currentAuthenticatedUser().then(user => {\n this.username = user.attributes.given_name;\n })\n .catch(() => console.log(\"User not logged in\"));\n this.getUserCompany();\n }\n\n menuAction(){\n this.menuEvent.emit();\n }\n\n fetchCompanyProfile(){\n let req = {\n companyName: document.location.host.split('.')[0]\n };\n this.companyProfile$ = this._ser.fetchCompanyProfile(req);\n }\n fetchCompanyData(allApps:Array<any>) {\n this._ser.getCompanyApplications().subscribe({\n next: (v) => {\n if (v?.data.enabledApplications) {\n this.appList = [];\n let appInfo = [];\n let fetchedApplications = v.data.enabledApplications.split(',');\n\n if (fetchedApplications.length > 0) {\n fetchedApplications.forEach((element:any) => {\n appInfo = allApps.filter(ele => ele.name == element);\n if (appInfo && appInfo.length > 0) {\n if(appInfo[0].name != 'mca'){\n this.appList.push({\n name: appInfo[0].displayName,\n value: element,\n appUrl: appInfo[0].appUrl\n });\n }\n }\n });\n }\n }\n\n }\n })\n }\n\n getUserCompany(){\n this._ser.getUserCompanies().subscribe({\n next: (userCompaniesData: any) => {\n if (userCompaniesData && userCompaniesData.data && userCompaniesData.data.companies) {\n this.userCompanies = userCompaniesData.data.companies;\n if (this.userCompanies.length > 1) {\n this.showSwitchCompanies = true;\n }\n }\n },\n error: (e) => {\n console.log(\"Error in fetching companies for the user\");\n }\n })\n }\n\n appRedirect(app:any) {\n // if (app.name != 'Order Management') {\n window.open(app.appUrl, \"_self\");\n // }\n }\n profile() {\n // this.fetchUserData();\n if(this._ser.portalFrontendUrl){\n let url = this._ser.portalFrontendUrl+'/app/profile';\n document.location.href = url;\n }\n else{\n this._router.navigateByUrl('/app/profile');\n }\n }\n onLogoutClick() {\n Auth.signOut({ global: true })\n .then(data => console.log(data))\n .catch(err => {\n console.log(err)\n Auth.signOut();\n });\n }\n switchCompany(company: any) {\n // switch the user to the selectec company\n\n // Find the domain information\n let domainInfo = this._ser.getDomainInfo();\n if(domainInfo){\n let req:any = { companyKey: company.companyKey,appName: domainInfo.appCode };\n this._ser.updateUserCompany(req).subscribe({\n next: (response: any) => {\n if (response && response.type && response.type == \"OK\") {\n if(response.data.applicationURL){\n let url = response.data.applicationURL + window.location.pathname;\n window.location.replace(url);\n }\n // refresh the current page to reload the contents based on the current company\n // window.location.reload();\n }\n else {\n // display a message to the user that the company could not be switched.\n this._snackbar.open('Company could not be switched. Please try again or contact support.', 'OK', { duration: 5000 })\n }\n },\n error: (e) => {\n // display a message to the user that the company could not be switched.\n this._snackbar.open('Company could not be switched. Please try again or contact support.', 'OK', { duration: 5000 })\n }\n })\n }\n }\n \n}\n","<mat-toolbar color=\"primary\" class=\"common_header shadow-sm\">\n <button mat-icon-button (click)=\"menuAction()\" aria-label=\"main menu\" tabindex=\"0\" class=\"menuHamberger me-4\">\n <img src=\"../assets/images/hamburger_menu.svg\" style=\"width: 20px;height: 20px;\">\n </button>\n <a class=\"navbar-brand me-auto\" href=\"#\">\n <img *ngIf=\"companyProfile$ | async\" [src]=\"(companyProfile$ | async)?.logo\" alt=\"Logo\" style=\"width:140px;\">\n </a>\n <span class=\"example-spacer\"></span>\n <ng-container *ngIf=\"template\" [ngTemplateOutlet]=\"template\"></ng-container>\n <button *ngIf=\"appList.length > 0\" mat-icon-button class=\"me-3 switchButton\" [matMenuTriggerFor]=\"apps\">\n <img src=\"../assets/images/apps.png\" alt=\"apps icon\" style=\"width:20px;height: 20px;\">\n </button>\n <mat-menu #apps=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let app of appList\">\n <button mat-menu-item (click)=\"appRedirect(app)\">{{app.name}}</button>\n </div>\n </mat-menu>\n <div class=\"profile-name\">\n <p *ngIf=\"username\" class=\"xsHiddenUsername mb-0\">{{username}}</p>\n <!--<span class=\"xsHiddenUsername mb-0\" *ngFor=\"let role of userRole\">{{role | formatWord: true:'_'}}</span>-->\n </div>\n <button mat-button [matMenuTriggerFor]=\"menu\">\n <img class=\"avatarLogo\" src=\"../assets/images/dp.png\" alt=\"Avatar Logo\" class=\"avatarLogo rounded-pill\">\n </button>\n <mat-menu #menu=\"matMenu\" class=\"accounts_drpmenu\">\n <span *ngIf=\"username\" class=\"xsShowUsername\">{{username}}</span>\n <button mat-menu-item (click)=\"profile()\">Profile</button>\n <button mat-menu-item (click)=\"onLogoutClick()\">Logout</button>\n <button *ngIf=\"showSwitchCompanies\" mat-menu-item [matMenuTriggerFor]=\"companies\">Switch Company</button>\n <mat-menu #companies=\"matMenu\" class=\"accounts_drpmenu\">\n <div *ngFor=\"let company of userCompanies\">\n <button mat-menu-item (click)=\"switchCompany(company)\">{{company.name}}</button>\n </div>\n </mat-menu>\n </mat-menu>\n</mat-toolbar>","import { NgModule } from '@angular/core';\nimport { HeaderComponent } from './header/header.component';\nimport {MatToolbarModule} from '@angular/material/toolbar';\nimport {MatIconModule} from '@angular/material/icon'\nimport { HttpClientModule } from '@angular/common/http';\nimport {MatButtonModule} from '@angular/material/button'\nimport {MatSidenavModule} from '@angular/material/sidenav';\nimport {MatMenuModule} from '@angular/material/menu';\nimport { CommonModule } from '@angular/common';\nimport { MatSnackBarModule } from \"@angular/material/snack-bar\";\n\n@NgModule({\n declarations: [\n HeaderComponent\n ],\n imports: [\n CommonModule,\n MatToolbarModule,\n MatIconModule,\n HttpClientModule,\n MatButtonModule,\n MatSidenavModule,\n MatMenuModule,\n MatSnackBarModule\n ],\n exports: [\n HeaderComponent\n ]\n})\nexport class CommonHeaderModule { }\n","export const APP_DOMAIN = [\n { domain: 'portal', appCode: 'profet_portal'},\n { domain: 'profet-portal', appCode: 'profet_portal'},\n { domain: 'orders', appCode: 'appraisal_management'},\n { domain: 'review', appCode: 'appraisal_review'},\n { domain: 'valuation', appCode: 'appraisal_valuation'}\n]","/*\n * Public API Surface of common-header\n */\n\nexport * from './lib/common-header.service';\nexport * from './lib/common-header.module';\nexport * from './lib/header/header.component';\nexport * from './lib/utils/HeaderConfig';\nexport * from './lib/utils/UserDetails';\nexport * from './lib/utils/app.constants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAAa,SAAS,CAAA;;AACJ,SAAA,CAAA,QAAQ,GAAG;AACrB,IAAA,UAAU,EAAE,iCAAiC;AAC7C,IAAA,sBAAsB,EAAE,qCAAqC;AAC7D,IAAA,gBAAgB,EAAE,+BAA+B;AACjD,IAAA,iBAAiB,EAAE,gCAAgC;AACnD,IAAA,mBAAmB,EAAE,sBAAsB;CAC9C;;MCAQ,iBAAiB,CAAA;AAH9B,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;KAoDpC;IAlDC,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