31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
import { Component, effect, inject, Input } from '@angular/core';
|
|
import { AngularMaterialModule } from '../../shared/module/angular-material.module';
|
|
import { CommonModule } from '@angular/common';
|
|
import { User } from '../../core/models/user';
|
|
import { UserService } from '../../core/services/common/user.service';
|
|
|
|
@Component({
|
|
selector: 'app-footer',
|
|
imports: [AngularMaterialModule, CommonModule],
|
|
templateUrl: './footer.component.html',
|
|
styleUrl: './footer.component.scss'
|
|
})
|
|
export class FooterComponent {
|
|
currentYear = new Date().getFullYear();
|
|
currentServiceProviderName: string = 'USCIB Carnet Portal';
|
|
userDetails: User | null = {};
|
|
|
|
@Input() isUserLoggedIn = false;
|
|
|
|
private userService = inject(UserService);
|
|
|
|
constructor(
|
|
) {
|
|
effect(() => {
|
|
this.userDetails = this.userService.userDetailsSignal();
|
|
if (this.userDetails?.userDetails && this.userDetails.userDetails.serviceProviderName) {
|
|
this.currentServiceProviderName = this.userDetails.userDetails.serviceProviderName || 'USCIB Carnet Portal';
|
|
}
|
|
});
|
|
}
|
|
} |