Changeset d2b1fa6


Ignore:
Timestamp:
10/27/21 19:44:51 (3 years ago)
Author:
Стојков Марко <mst@…>
Branches:
dev
Children:
c205cc4
Parents:
79ae621
Message:

Merged dev

Location:
src/Clients/Angular/finki-chattery/src/app
Files:
3 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • src/Clients/Angular/finki-chattery/src/app/app.component.ts

    r79ae621 rd2b1fa6  
    11import { Component, OnInit } from '@angular/core';
    2 import { LoaderService, RedirectService } from './core/services';
     2import { LoaderService } from './core/services';
    33
    44@Component({
     
    88})
    99export class AppComponent implements OnInit {
    10   constructor(public loader: LoaderService, private redirect: RedirectService) {}
     10  constructor(public loader: LoaderService) {}
    1111
    12   ngOnInit(): void {
    13     this.redirect.redirectLoggedInUser();
    14   }
     12  ngOnInit(): void {}
    1513}
  • src/Clients/Angular/finki-chattery/src/app/core/guards/authorized-student.guard.ts

    r79ae621 rd2b1fa6  
    11import { Injectable } from '@angular/core';
    2 import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@angular/router';
    3 import { Observable } from 'rxjs';
    4 import { map } from 'rxjs/operators';
     2import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
    53import { ApplicationUserType } from 'src/app/shared-app/models';
    64import { AuthService } from '../services';
     
    1210  constructor(private auth: AuthService) {}
    1311
    14   canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
    15     return this.auth.currentUser().pipe(
    16       map((user) => {
    17         if (user?.userType === ApplicationUserType.Student) {
    18           return true;
    19         }
    20         this.auth.login();
    21         return false;
    22       })
    23     );
     12  canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
     13    return this.auth.user?.userType === ApplicationUserType.Student;
    2414  }
    2515}
  • src/Clients/Angular/finki-chattery/src/app/modules/questioning/questioning.routes.ts

    r79ae621 rd2b1fa6  
    2828        component: AskQuestionComponent,
    2929        canActivate: [AuthorizedStudentGuard]
    30       }
     30      },
    3131      {
    3232        path: ':questionUid',
  • src/Clients/Angular/finki-chattery/src/app/shared-app/models/index.ts

    r79ae621 rd2b1fa6  
    44export * from './category-state-view-models.models';
    55export * from './question-state-enums.models';
    6 export * from './categories.models';
Note: See TracChangeset for help on using the changeset viewer.