Changeset fcc3080 for src/Clients
- Timestamp:
- 11/14/21 13:58:42 (3 years ago)
- Branches:
- dev
- Children:
- f3c4950
- Parents:
- e071d30
- Location:
- src/Clients/Angular/finki-chattery/src/app
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question-state-response.models.ts
re071d30 rfcc3080 80 80 public voteUid!: string; 81 81 public voteType!: VoteType; 82 public voteAlreadyExists!: boolean; 82 83 } -
src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.mapper.ts
re071d30 rfcc3080 90 90 91 91 public static ToVoteAnswerViewModel(response: VoteAnswerResponse): VoteAnswerViewModel { 92 return new VoteAnswerViewModel(response.answerUid, response.voteUid, response.voteType );92 return new VoteAnswerViewModel(response.answerUid, response.voteUid, response.voteType, response.voteAlreadyExists); 93 93 } 94 94 -
src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.reducers.ts
re071d30 rfcc3080 39 39 case VoteType.Upvote: 40 40 votesCountNew++; 41 if (action.payload.voteAlreadyExists) { 42 votesCountNew++; 43 } 41 44 break; 42 45 case VoteType.Downvote: 43 46 votesCountNew--; 47 if (action.payload.voteAlreadyExists) { 48 votesCountNew--; 49 } 44 50 break; 45 51 } -
src/Clients/Angular/finki-chattery/src/app/shared-app/models/question-state-view-models.models.ts
re071d30 rfcc3080 77 77 78 78 export class VoteAnswerViewModel { 79 constructor(public answerUid: string, public voteUid: string, public voteType: VoteType ) {}79 constructor(public answerUid: string, public voteUid: string, public voteType: VoteType, public voteAlreadyExists: boolean) {} 80 80 }
Note:
See TracChangeset
for help on using the changeset viewer.