Hides "Contact-Support" footer option when user not logged in.

This commit is contained in:
gkolokythas 2020-01-03 18:38:27 +02:00
parent 89b98f5377
commit bc0fd36722
2 changed files with 8 additions and 2 deletions

View File

@ -20,7 +20,7 @@
</div> </div>
</div> </div>
<div class="row d-flex flex-reverse"> <div class="row d-flex flex-reverse">
<div class="col-6 text-center"> <div *ngIf="isAuthenticated()" class="col-6 text-center">
<p class="option" (click)="openContactDialog()" [ngClass]="{'option-active': this.router.url === '/contact-support'}"> <p class="option" (click)="openContactDialog()" [ngClass]="{'option-active': this.router.url === '/contact-support'}">
<!-- <i class="fa fa-envelope-open pr-2 pt-1"></i> --> <!-- <i class="fa fa-envelope-open pr-2 pt-1"></i> -->
{{'FOOTER.CONTACT-SUPPORT' | translate}}</p> {{'FOOTER.CONTACT-SUPPORT' | translate}}</p>

View File

@ -13,6 +13,7 @@ import { FormService } from '@common/forms/form-service';
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model'; import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
import { AuthService } from "@app/core/services/auth/auth.service";
@Component({ @Component({
selector: 'app-sidebar-footer', selector: 'app-sidebar-footer',
@ -30,7 +31,8 @@ export class SidebarFooterComponent extends BaseComponent implements OnInit {
public router: Router, public router: Router,
private contactSupportService: ContactSupportService, private contactSupportService: ContactSupportService,
private uiNotificationService: UiNotificationService, private uiNotificationService: UiNotificationService,
private formService: FormService private formService: FormService,
private authentication: AuthService,
) { ) {
super(); super();
} }
@ -110,4 +112,8 @@ export class SidebarFooterComponent extends BaseComponent implements OnInit {
(<any>this.contactEmailFormModel.validationErrorModel)[item] = (<any>validationErrorModel)[item]; (<any>this.contactEmailFormModel.validationErrorModel)[item] = (<any>validationErrorModel)[item];
}); });
} }
public isAuthenticated(): boolean {
return !(!this.authentication.current());
}
} }