diff --git a/src/app/core/theme/user/user.component.html b/src/app/core/theme/user/user.component.html index 5620283..5cb5ec8 100644 --- a/src/app/core/theme/user/user.component.html +++ b/src/app/core/theme/user/user.component.html @@ -75,17 +75,18 @@ Theme.Warehouses + routerLink="/commerceproducts" class="nav__burger-link" (click)="hideSidebar()" *ngIf='useProduct'> production_quantity_limits Theme.Products + routerLink="/commerceservices" class="nav__burger-link" (click)="hideSidebar()" *ngIf='useService'> room_service Theme.Services + routerLink="/commerceportfolios" class="nav__burger-link" (click)="hideSidebar()" + *ngIf='usePortfolio'> photo_camera Theme.Portfolios diff --git a/src/app/core/theme/user/user.component.ts b/src/app/core/theme/user/user.component.ts index b651444..b6341f6 100644 --- a/src/app/core/theme/user/user.component.ts +++ b/src/app/core/theme/user/user.component.ts @@ -5,11 +5,11 @@ import { Platform } from '@angular/cdk/platform'; import { Component } from '@angular/core'; @Component({ - selector: 'app-user', - templateUrl: './user.component.html', - styleUrls: ['./user.component.scss'], - animations: [coreAnimation], - standalone: false + selector: 'app-user', + templateUrl: './user.component.html', + styleUrls: ['./user.component.scss'], + animations: [coreAnimation], + standalone: false }) export class UserComponent { readonly url = environment.url; @@ -20,6 +20,9 @@ export class UserComponent { this.showSidebar = false; } } + readonly usePortfolio = typeof (environment as { usePortfolio: boolean }).usePortfolio === 'boolean' ? (environment as { usePortfolio: boolean }).usePortfolio : true; + readonly useProduct = typeof (environment as { useProduct: boolean }).useProduct === 'boolean' ? (environment as { useProduct: boolean }).useProduct : true; + readonly useService = typeof (environment as { useService: boolean }).useService === 'boolean' ? (environment as { useService: boolean }).useService : true; - constructor(public us: UserService, private _platform: Platform) {} + constructor(public us: UserService, private _platform: Platform) { } } diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 3fc0d7e..69c3fa8 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -2,5 +2,8 @@ export const environment = { roles: [], production: true, appId: 'test', - url: 'https://webart.work' + url: 'https://webart.work', + usePortfolio: false, + useService: false, + useProduct: true };