Ignore:
Timestamp:
11/04/21 17:01:30 (3 years ago)
Author:
Стојков Марко <mst@…>
Branches:
dev
Children:
caaf82d
Parents:
1e0d869 (diff), b9d7ae5 (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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.actions.ts

    r1e0d869 r6901f8b  
    22import { Action } from '@ngrx/store';
    33
    4 import { PreviewQuestionViewModel, QuestionStateViewModel, SearchQuestionsQueryViewModel } from 'src/app/shared-app/models';
     4import {
     5  PreviewQuestionViewModel,
     6  QuestionStateViewModel,
     7  SearchQuestionsQueryViewModel,
     8  VoteAnswerViewModel,
     9  VoteType
     10} from 'src/app/shared-app/models';
    511
    612export enum QuestionActionTypes {
    713  GetQuestionState = '[Question] Get state',
    814  GetQuestionStateSuccess = '[Question] Get state success',
     15  SetCorrectAnswer = '[Question] Set Correct Answer',
     16  SetCorrectAnswerSuccess = '[Question] Set Correct Answer success',
    917  GetPreviewQuestionsLatest = '[Question] Get preview questions Latest',
    1018  GetPreviewQuestionsLatestSuccess = '[Question] Get preview questions Latest Success',
     
    1321  GetSearchQuestions = '[Question] Get search questions',
    1422  GetSearchQuestionsSuccess = '[Question] Get search questions Success',
     23  VoteAnswer = '[Question] Vote answer',
     24  VoteAnswerSuccess = '[Question] Vote answer Success',
    1525  EffectStartedWorking = '[Question] Effect Started Working',
    1626  EffectFinishedWorking = '[Question] Effect Finished Working',
     
    2838
    2939  constructor(public payload: QuestionStateViewModel) {}
     40}
     41
     42export class SetCorrectAnswer implements Action {
     43  readonly type = QuestionActionTypes.SetCorrectAnswer;
     44
     45  constructor(public questionUid: string, public answerUid: string) {}
     46}
     47
     48export class SetCorrectAnswerSuccess implements Action {
     49  readonly type = QuestionActionTypes.SetCorrectAnswerSuccess;
     50
     51  constructor(public payload: string) {}
    3052}
    3153
     
    6688}
    6789
     90export class VoteAnswer implements Action {
     91  readonly type = QuestionActionTypes.VoteAnswer;
     92
     93  constructor(public questionUid: string, public answerUid: string, public voteType: VoteType) {}
     94}
     95
     96export class VoteAnswerSuccess implements Action {
     97  readonly type = QuestionActionTypes.VoteAnswerSuccess;
     98
     99  constructor(public payload: VoteAnswerViewModel) {}
     100}
     101
    68102export class EffectStartedWorking implements Action {
    69103  readonly type = QuestionActionTypes.EffectStartedWorking;
     
    89123  | GetPreviewQuestionsPopularSuccess
    90124  | GetSearchQuestionsSuccess
     125  | VoteAnswerSuccess
     126  | SetCorrectAnswerSuccess
    91127  | EffectStartedWorking
    92128  | EffectFinishedWorking
Note: See TracChangeset for help on using the changeset viewer.