Changeset 6901f8b for src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.actions.ts
- Timestamp:
- 11/04/21 17:01:30 (3 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.actions.ts
r1e0d869 r6901f8b 2 2 import { Action } from '@ngrx/store'; 3 3 4 import { PreviewQuestionViewModel, QuestionStateViewModel, SearchQuestionsQueryViewModel } from 'src/app/shared-app/models'; 4 import { 5 PreviewQuestionViewModel, 6 QuestionStateViewModel, 7 SearchQuestionsQueryViewModel, 8 VoteAnswerViewModel, 9 VoteType 10 } from 'src/app/shared-app/models'; 5 11 6 12 export enum QuestionActionTypes { 7 13 GetQuestionState = '[Question] Get state', 8 14 GetQuestionStateSuccess = '[Question] Get state success', 15 SetCorrectAnswer = '[Question] Set Correct Answer', 16 SetCorrectAnswerSuccess = '[Question] Set Correct Answer success', 9 17 GetPreviewQuestionsLatest = '[Question] Get preview questions Latest', 10 18 GetPreviewQuestionsLatestSuccess = '[Question] Get preview questions Latest Success', … … 13 21 GetSearchQuestions = '[Question] Get search questions', 14 22 GetSearchQuestionsSuccess = '[Question] Get search questions Success', 23 VoteAnswer = '[Question] Vote answer', 24 VoteAnswerSuccess = '[Question] Vote answer Success', 15 25 EffectStartedWorking = '[Question] Effect Started Working', 16 26 EffectFinishedWorking = '[Question] Effect Finished Working', … … 28 38 29 39 constructor(public payload: QuestionStateViewModel) {} 40 } 41 42 export class SetCorrectAnswer implements Action { 43 readonly type = QuestionActionTypes.SetCorrectAnswer; 44 45 constructor(public questionUid: string, public answerUid: string) {} 46 } 47 48 export class SetCorrectAnswerSuccess implements Action { 49 readonly type = QuestionActionTypes.SetCorrectAnswerSuccess; 50 51 constructor(public payload: string) {} 30 52 } 31 53 … … 66 88 } 67 89 90 export class VoteAnswer implements Action { 91 readonly type = QuestionActionTypes.VoteAnswer; 92 93 constructor(public questionUid: string, public answerUid: string, public voteType: VoteType) {} 94 } 95 96 export class VoteAnswerSuccess implements Action { 97 readonly type = QuestionActionTypes.VoteAnswerSuccess; 98 99 constructor(public payload: VoteAnswerViewModel) {} 100 } 101 68 102 export class EffectStartedWorking implements Action { 69 103 readonly type = QuestionActionTypes.EffectStartedWorking; … … 89 123 | GetPreviewQuestionsPopularSuccess 90 124 | GetSearchQuestionsSuccess 125 | VoteAnswerSuccess 126 | SetCorrectAnswerSuccess 91 127 | EffectStartedWorking 92 128 | EffectFinishedWorking
Note:
See TracChangeset
for help on using the changeset viewer.