client-app/src/app/common/footer/footer.component.ts

31 lines
987 B
TypeScript
Raw Normal View History

2025-08-02 22:32:20 -03:00
import { Component, effect, inject, Input } from '@angular/core';
2025-07-02 22:40:35 -03:00
import { AngularMaterialModule } from '../../shared/module/angular-material.module';
2025-07-27 16:50:25 -03:00
import { CommonModule } from '@angular/common';
2025-08-02 22:32:20 -03:00
import { User } from '../../core/models/user';
import { UserService } from '../../core/services/common/user.service';
2025-07-02 22:40:35 -03:00
@Component({
selector: 'app-footer',
2025-07-27 16:50:25 -03:00
imports: [AngularMaterialModule, CommonModule],
2025-07-02 22:40:35 -03:00
templateUrl: './footer.component.html',
styleUrl: './footer.component.scss'
})
export class FooterComponent {
currentYear = new Date().getFullYear();
2025-08-02 22:32:20 -03:00
currentServiceProviderName: string = '';
userDetails: User | null = {};
2025-07-27 16:50:25 -03:00
@Input() isUserLoggedIn = false;
2025-08-02 22:32:20 -03:00
private userService = inject(UserService);
constructor(
) {
effect(() => {
this.userDetails = this.userService.userDetailsSignal();
if (this.userDetails?.userDetails) {
this.currentServiceProviderName = this.userDetails.userDetails.serviceProviderName || '';
}
});
}
2025-07-02 22:40:35 -03:00
}