carnet-portal-app/src/app/common/footer/footer.component.ts

31 lines
1.1 KiB
TypeScript
Raw Normal View History

2025-08-02 22:35:52 -03:00
import { Component, effect, inject, Input } from '@angular/core';
2025-06-04 23:21:18 -05:00
import { AngularMaterialModule } from '../../shared/module/angular-material.module';
2025-08-02 22:35:52 -03:00
import { CommonModule } from '@angular/common';
import { User } from '../../core/models/user';
import { UserService } from '../../core/services/common/user.service';
2025-06-04 23:21:18 -05:00
@Component({
selector: 'app-footer',
2025-08-02 22:35:52 -03:00
imports: [AngularMaterialModule, CommonModule],
2025-06-04 23:21:18 -05:00
templateUrl: './footer.component.html',
styleUrl: './footer.component.scss'
})
export class FooterComponent {
currentYear = new Date().getFullYear();
2025-08-02 22:35:52 -03:00
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';
}
});
}
2025-06-04 23:21:18 -05:00
}