Ignore:
Timestamp:
10/21/21 20:19:15 (3 years ago)
Author:
Стојков Марко <mst@…>
Branches:
dev
Children:
3bb1377
Parents:
b499ba7 (diff), 45cf412 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged dev

Location:
src/Clients/Angular/finki-chattery/src
Files:
44 added
1 deleted
15 edited

Legend:

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

    rb499ba7 rdd731cd  
    11import { NgModule } from '@angular/core';
    22import { Routes, RouterModule } from '@angular/router';
     3import { AuthorizedGuard } from './core/guards/authorized.guard';
    34
    45const routes: Routes = [
    56  {
     7    path: 'questioning',
     8    canActivate: [AuthorizedGuard],
     9    loadChildren: () => import('./modules/questioning/questioning.module').then((x) => x.QuestioningModule)
     10  },
     11  {
    612    path: '**',
    7     redirectTo: 'public/home'
     13    redirectTo: 'questioning/preview'
    814  }
    915];
  • src/Clients/Angular/finki-chattery/src/app/app.component.html

    rb499ba7 rdd731cd  
    22  <mat-progress-bar class="global-loader" [class.hidden]="!(loader.isLoading | async)" mode="indeterminate"></mat-progress-bar>
    33  <router-outlet></router-outlet>
    4   <button (click)="login()">LOGIN</button>
    54</main>
  • src/Clients/Angular/finki-chattery/src/app/app.component.ts

    rb499ba7 rdd731cd  
    11import { Component, OnInit } from '@angular/core';
    2 import { AuthService, LoaderService, RedirectService } from './core/services';
     2import { LoaderService, RedirectService } from './core/services';
    33
    44@Component({
     
    88})
    99export class AppComponent implements OnInit {
    10   constructor(public loader: LoaderService, private redirect: RedirectService, private auth: AuthService) {}
     10  constructor(public loader: LoaderService, private redirect: RedirectService) {}
    1111
    1212  ngOnInit(): void {
    1313    this.redirect.redirectLoggedInUser();
    1414  }
    15 
    16   public login(): void {
    17     this.auth.login();
    18   }
    1915}
  • src/Clients/Angular/finki-chattery/src/app/core/core.module.ts

    rb499ba7 rdd731cd  
    1414import { reducers } from './state';
    1515import { TokenInterceptor } from './interceptors/token.interceptor';
     16import { EffectsModule } from '@ngrx/effects';
     17import { QuestionEffects } from './state/question-state/question.effects';
     18import { CategoriesEffects } from './state/category-state/category.effects';
    1619
    1720@NgModule({
     
    3336      maxAge: 25,
    3437      logOnly: !environment.production
    35     })
     38    }),
     39    EffectsModule.forRoot([QuestionEffects, CategoriesEffects])
    3640  ],
    3741  exports: [HttpClientModule, COMPONENTS]
  • src/Clients/Angular/finki-chattery/src/app/core/services/auth.service.ts

    rb499ba7 rdd731cd  
    3535      map((user) => {
    3636        if (user) {
     37          if (user.expired) {
     38            return false;
     39          }
     40
    3741          return true;
    3842        }
  • src/Clients/Angular/finki-chattery/src/app/core/services/notification.service.ts

    rb499ba7 rdd731cd  
    2222
    2323  public successNotification(title: string, description?: string): void {
    24     this.toastr.success(this.translate.instant(description), this.translate.instant(title));
     24    if (description) {
     25      this.toastr.success(this.translate.instant(description), this.translate.instant(title));
     26    }
     27    this.toastr.success(this.translate.instant(title));
    2528  }
    2629}
  • src/Clients/Angular/finki-chattery/src/app/core/state/index.ts

    rb499ba7 rdd731cd  
    11import { ActionReducerMap } from '@ngrx/store';
     2import { QuestionState } from './question-state/question.state';
     3import { reducer as questionReducer } from './question-state/question.reducers';
     4import { CategoryState } from './category-state/category.state';
     5import { reducer as categoryReducer } from './category-state/category.reducers';
    26
    3 export interface State {}
     7export interface State {
     8  question: QuestionState;
     9  category: CategoryState;
     10}
    411
    5 export const reducers: ActionReducerMap<State, any> = {};
     12export const reducers: ActionReducerMap<State, any> = {
     13  question: questionReducer,
     14  category: categoryReducer
     15};
  • src/Clients/Angular/finki-chattery/src/app/shared-app/directives/directives.ts

    rb499ba7 rdd731cd  
    1 import { HandleInputFormErrorsDirective, HoverElevationDirective, LoaderDirective, HandleSelectFormErrorsDirective } from '.';
     1import {
     2  HandleInputFormErrorsDirective,
     3  HoverElevationDirective,
     4  LoaderDirective,
     5  HandleSelectFormErrorsDirective,
     6  ShareLinkDirective
     7} from '.';
    28
    39export const DIRECTIVES: any[] = [
     
    511  LoaderDirective,
    612  HoverElevationDirective,
    7   HandleSelectFormErrorsDirective
     13  HandleSelectFormErrorsDirective,
     14  ShareLinkDirective
    815];
  • src/Clients/Angular/finki-chattery/src/app/shared-app/directives/index.ts

    rb499ba7 rdd731cd  
    33export * from './hover-elevation.directive';
    44export * from './handle-select-form-errors.directive';
     5export * from './share-link.directive';
  • src/Clients/Angular/finki-chattery/src/app/shared-app/models/index.ts

    rb499ba7 rdd731cd  
    11export * from './error.models';
    22export * from './user.models';
     3export * from './question-state-view-models.models';
     4export * from './category-state-view-models.models';
  • src/Clients/Angular/finki-chattery/src/app/shared-app/services/translate-from-json.service.ts

    rb499ba7 rdd731cd  
    4343  }
    4444
    45   public instant(key?: string): string | undefined {
    46     if (key) {
    47       return this.translateService.instant(key);
    48     }
    49     return undefined;
     45  public instant(key: string): string {
     46    return this.translateService.instant(key);
    5047  }
    5148}
  • src/Clients/Angular/finki-chattery/src/app/shared-app/shared-app.module.ts

    rb499ba7 rdd731cd  
    88import { FileUploadModule } from 'ng2-file-upload';
    99
    10 import { COMPONENTS } from './components/generic/components';
     10import { COMPONENTS } from './components/components';
    1111import { SharedMaterialModule } from '../shared-material/shared-material.module';
    1212import { DIRECTIVES } from './directives/directives';
    1313import { SERVICES } from './services/services';
    1414import { PIPES } from './pipes/pipes';
    15 import { FileUploadComponent } from './components/generic/file-upload/file-upload.component';
    16 import { HandleSelectFormErrorsDirective } from './directives/handle-select-form-errors.directive';
    1715
    1816@NgModule({
    19   declarations: [COMPONENTS, DIRECTIVES, PIPES, FileUploadComponent, HandleSelectFormErrorsDirective],
     17  declarations: [COMPONENTS, DIRECTIVES, PIPES],
    2018  providers: [SERVICES],
    2119  imports: [
     
    3937    COMPONENTS,
    4038    DIRECTIVES,
    41     PIPES
     39    PIPES,
     40    SharedMaterialModule
    4241  ]
    4342})
  • src/Clients/Angular/finki-chattery/src/app/shared-material/shared-material.module.ts

    rb499ba7 rdd731cd  
    2020import { MatDatepickerModule } from '@angular/material/datepicker';
    2121import { MatNativeDateModule } from '@angular/material/core';
     22import { MatChipsModule } from '@angular/material/chips';
     23import { MatTooltipModule } from '@angular/material/tooltip';
     24import { MatButtonToggleModule } from '@angular/material/button-toggle';
     25
    2226@NgModule({
    2327  imports: [
     
    4044    MatTableModule,
    4145    MatDatepickerModule,
    42     MatNativeDateModule
     46    MatNativeDateModule,
     47    MatChipsModule,
     48    MatTooltipModule,
     49    MatButtonToggleModule
    4350  ],
    4451  exports: [
     
    6067    MatTableModule,
    6168    MatDatepickerModule,
    62     MatNativeDateModule
     69    MatNativeDateModule,
     70    MatChipsModule,
     71    MatTooltipModule,
     72    MatButtonToggleModule
    6373  ]
    6474})
  • src/Clients/Angular/finki-chattery/src/assets/translations/en.json

    rb499ba7 rdd731cd  
    1414  "password-not-match": "Passwords don't match",
    1515  "code-date-passed": "The code date has passed",
    16   "not-found": "Not found"
     16  "not-found": "Not found",
     17  "question-preview-subtitle": "Asked <b>{{createdOn}}</b>, Last active <b>{{lastActive}}</b>, Viewed <b>{{views}}</b> times",
     18  "share-link": "Share",
     19  "share-link-success": "Successfully copied link for sharing",
     20  "question-asked-by-subtitle": "Asked on: {{date}}",
     21  "question-answers": "{{answerCount}} Answers",
     22  "question-answered-by-subtitle": "Answered on: {{date}}",
     23  "student-reputation": "{{reputation}} reputation",
     24  "vote-correct-answer": "This has been accepted as the correct answer by the owner of the question",
     25  "answer-sort-oldest": "Oldest",
     26  "answer-sort-votes": "Votes",
     27  "internet-techologies": "Internet technologies",
     28  "software-engineering": "Software engineering",
     29  "visual-programming": "Visual programming",
     30  "operating-systems": "Operating systems"
    1731}
  • src/Clients/Angular/finki-chattery/src/styles.scss

    rb499ba7 rdd731cd  
    264264
    265265.avatar-image {
    266   width: 100px;
    267   height: 100px;
     266  width: 80px;
     267  height: 80px;
    268268  display: block;
    269269  border-radius: 50%;
Note: See TracChangeset for help on using the changeset viewer.