add admin navbar and brand/platform management components

This commit is contained in:
Vincent Guillet
2025-10-31 18:32:24 +01:00
parent 6dc9f4ffea
commit 7531ea9453
50 changed files with 842 additions and 227 deletions

View File

@@ -1,6 +1,6 @@
import { inject } from '@angular/core';
import { CanActivateFn, CanMatchFn, Router, UrlTree, ActivatedRouteSnapshot, Route } from '@angular/router';
import { AuthService } from '../../services/auth/auth.service';
import { AuthService } from '../services/auth/auth.service';
function requireAdmin(url?: string): boolean | UrlTree {
const authService: AuthService = inject(AuthService);

View File

@@ -1,17 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { CanActivateFn } from '@angular/router';
import { adminOnlyGuard } from './admin-only.guard';
describe('adminOnlyGuard', () => {
const executeGuard: CanActivateFn = (...guardParameters) =>
TestBed.runInInjectionContext(() => adminOnlyGuard(...guardParameters));
beforeEach(() => {
TestBed.configureTestingModule({});
});
it('should be created', () => {
expect(executeGuard).toBeTruthy();
});
});

View File

@@ -1,6 +1,6 @@
import { inject } from '@angular/core';
import { CanActivateFn, CanMatchFn, Router, UrlTree, ActivatedRouteSnapshot, Route } from '@angular/router';
import { AuthService } from '../../services/auth/auth.service';
import { AuthService } from '../services/auth/auth.service';
function requireAuth(url?: string): boolean | UrlTree {
const authService = inject(AuthService);

View File

@@ -1,17 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { CanMatchFn } from '@angular/router';
import { authOnlyGuard } from './auth-only.guard';
describe('authOnlyGuard', () => {
const executeGuard: CanMatchFn = (...guardParameters) =>
TestBed.runInInjectionContext(() => authOnlyGuard(...guardParameters));
beforeEach(() => {
TestBed.configureTestingModule({});
});
it('should be created', () => {
expect(executeGuard).toBeTruthy();
});
});

View File

@@ -1,6 +1,6 @@
import { inject } from '@angular/core';
import { Router, UrlTree, CanActivateFn, CanMatchFn } from '@angular/router';
import { AuthService } from '../../services/auth/auth.service';
import { AuthService } from '../services/auth/auth.service';
function redirectIfLoggedIn(): boolean | UrlTree {
const authService = inject(AuthService);

View File

@@ -1,17 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { CanMatchFn } from '@angular/router';
import { guestOnlyGuard } from './guest-only.guard';
describe('guestOnlyGuard', () => {
const executeGuard: CanMatchFn = (...guardParameters) =>
TestBed.runInInjectionContext(() => guestOnlyGuard(...guardParameters));
beforeEach(() => {
TestBed.configureTestingModule({});
});
it('should be created', () => {
expect(executeGuard).toBeTruthy();
});
});