feat: close stub-page gaps - profile login/logout, admin Reports/Settings, Help/Docs links
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Sprint A: storefront header profile control (login/logout only, no menu), wired to existing customer Telegram auth (AuthService). Sprint B: backoffice/reports page, reuses AdminAnalyticsFacade (Sales, Top Products, Marketplace Health cards + CSV export). Sprint C: backoffice/settings page, admin UI density preference (comfortable/compact), localStorage-persisted, applied to app-table across all admin list pages. Sprint D: admin bottom-nav Help -> mailto using existing supportEmail, Documentation -> external link via new TenantConfig.documentationUrl. AdminNavLink gains externalHref for non-routerLink nav entries. Docs: docs/GLOBAL-SPRINT-PLAN.md tracks the full sprint breakdown. docs/COMING-SOON-AUDIT.md removed, folded into docs/KNOWN-ISSUES.md. docs/BACKEND.md updated with the new documentationUrl bootstrap field. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -80,6 +80,19 @@
|
||||
</a>
|
||||
}
|
||||
|
||||
<!-- Profile (login/logout only) -->
|
||||
@if (headerConfig().showProfile) {
|
||||
@if (isAuthenticated()) {
|
||||
<button type="button" class="platform-ux-btn" (click)="logout()" [attr.aria-label]="'header.logout' | translate">
|
||||
<app-icon name="logOut" [size]="16" class="platform-ux-icon" />
|
||||
</button>
|
||||
} @else {
|
||||
<button type="button" class="platform-ux-btn" (click)="login()" [attr.aria-label]="'header.login' | translate">
|
||||
<app-icon name="user" [size]="16" class="platform-ux-icon" />
|
||||
</button>
|
||||
}
|
||||
}
|
||||
|
||||
<!-- Region Selector (desktop only) -->
|
||||
@if (headerConfig().showRegion) {
|
||||
<div class="platform-region-selector platform-lang-desktop">
|
||||
@@ -147,4 +160,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<app-telegram-login />
|
||||
|
||||
|
||||
|
||||
@@ -14,10 +14,12 @@ import { FeatureConfigService } from '../../core/config/feature-config.service';
|
||||
import { DEFAULT_HEADER_CONFIG, DEFAULT_USER_EXPERIENCE_CONFIG } from '../../shared/models/config';
|
||||
import { StaticPageResolverService } from '../../core/config/static-page-resolver.service';
|
||||
import { IconComponent } from '../../shared/ui/icon/icon.component';
|
||||
import { AuthService } from '../../services/auth.service';
|
||||
import { TelegramLoginComponent } from '../telegram-login/telegram-login.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-header',
|
||||
imports: [RouterLink, RouterLinkActive, LogoComponent, LanguageSelectorComponent, RegionSelectorComponent, LangRoutePipe, TranslatePipe, IconComponent],
|
||||
imports: [RouterLink, RouterLinkActive, LogoComponent, LanguageSelectorComponent, RegionSelectorComponent, LangRoutePipe, TranslatePipe, IconComponent, TelegramLoginComponent],
|
||||
templateUrl: './header.component.html',
|
||||
styleUrls: ['./header.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
@@ -35,7 +37,9 @@ export class HeaderComponent {
|
||||
private configService = inject(ConfigService);
|
||||
private featureConfig = inject(FeatureConfigService);
|
||||
private staticPageResolver = inject(StaticPageResolverService);
|
||||
private authService = inject(AuthService);
|
||||
|
||||
readonly isAuthenticated = this.authService.isAuthenticated;
|
||||
readonly wishlistCount = this.uxFacade.wishlistCount;
|
||||
readonly compareCount = this.uxFacade.compareCount;
|
||||
readonly userExperienceConfig = computed(() => this.resolveUserExperienceConfig());
|
||||
@@ -118,6 +122,14 @@ export class HeaderComponent {
|
||||
this.router.navigate([`/${lang}/compare`]);
|
||||
}
|
||||
|
||||
login(): void {
|
||||
this.authService.requestLogin();
|
||||
}
|
||||
|
||||
logout(): void {
|
||||
this.authService.logout();
|
||||
}
|
||||
|
||||
navigateToStatic(route: string): void {
|
||||
this.closeMenu();
|
||||
const lang = this.langService.currentLanguage();
|
||||
|
||||
Reference in New Issue
Block a user