Skip to content

Commit

Permalink
updaet code
Browse files Browse the repository at this point in the history
  • Loading branch information
nikiquickie committed Dec 5, 2024
1 parent 7fd5f71 commit cfddafd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
7 changes: 4 additions & 3 deletions src/app/core/theme/user/user.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,18 @@
<span translate>Theme.Warehouses</span>
</a>
<a [routerLinkActiveOptions]="{ exact: true }" routerLinkActive="_activeLink"
routerLink="/commerceproducts" class="nav__burger-link" (click)="hideSidebar()">
routerLink="/commerceproducts" class="nav__burger-link" (click)="hideSidebar()" *ngIf='useProduct'>
<span class="material-icons">production_quantity_limits</span>
<span translate>Theme.Products</span>
</a>
<a [routerLinkActiveOptions]="{ exact: true }" routerLinkActive="_activeLink"
routerLink="/commerceservices" class="nav__burger-link" (click)="hideSidebar()">
routerLink="/commerceservices" class="nav__burger-link" (click)="hideSidebar()" *ngIf='useService'>
<span class="material-icons">room_service</span>
<span translate>Theme.Services</span>
</a>
<a [routerLinkActiveOptions]="{ exact: true }" routerLinkActive="_activeLink"
routerLink="/commerceportfolios" class="nav__burger-link" (click)="hideSidebar()">
routerLink="/commerceportfolios" class="nav__burger-link" (click)="hideSidebar()"
*ngIf='usePortfolio'>
<span class="material-icons">photo_camera</span>
<span translate>Theme.Portfolios</span>
</a>
Expand Down
15 changes: 9 additions & 6 deletions src/app/core/theme/user/user.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) { }
}
5 changes: 4 additions & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

0 comments on commit cfddafd

Please sign in to comment.