feat(admin): sprint 19 admin dashboard, routing, i18n
- Add admin dashboard feature (models/gateway/facade/components/page) - Wire admin/products routes and backoffice coming-soon placeholders - Add lastPublishedAt to ProjectEditorFacade/state - Add dashboard i18n keys (en/ru/hy) and docs/ADMIN.md Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { Component, ChangeDetectionStrategy, Input, Injector, Signal, inject, effect, OnDestroy, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthService } from '../../services/auth.service';
|
||||
import { AdminAuthService } from '../../core/admin-auth/admin-auth.service';
|
||||
import { LanguageService } from '../../services/language.service';
|
||||
import { TranslatePipe } from '../../i18n/translate.pipe';
|
||||
import { QrLoginEngine } from '../../shared/qr-login/qr-login.engine';
|
||||
import { QrLoginAdapter, QrLoginStatus } from '../../shared/qr-login/qr-login.model';
|
||||
@@ -27,6 +29,8 @@ export class TelegramLoginComponent implements OnInit, OnDestroy {
|
||||
private readonly customerAuth = inject(AuthService);
|
||||
private readonly adminAuth = inject(AdminAuthService);
|
||||
private readonly injector = inject(Injector);
|
||||
private readonly router = inject(Router);
|
||||
private readonly languageService = inject(LanguageService);
|
||||
|
||||
private engine!: QrLoginEngine<AuthSession>;
|
||||
|
||||
@@ -49,7 +53,10 @@ export class TelegramLoginComponent implements OnInit, OnDestroy {
|
||||
checkSessionOnce: id => this.adminAuth.checkSessionOnce(id),
|
||||
isSessionActive: session => !!session?.active,
|
||||
getAppLoginUrl: id => this.adminAuth.getAdminAppLoginUrl(id),
|
||||
onLoginComplete: () => this.adminAuth.onLoginComplete(),
|
||||
onLoginComplete: () => {
|
||||
this.adminAuth.onLoginComplete();
|
||||
void this.router.navigate([this.languageService.currentLanguage(), 'backoffice', 'dashboard']);
|
||||
},
|
||||
}
|
||||
: {
|
||||
createSession: () => this.customerAuth.createWebSession(),
|
||||
|
||||
Reference in New Issue
Block a user