source: src/Clients/Angular/finki-chattery/src/app/core/services/student-question.service.ts@ 9df3069

dev
Last change on this file since 9df3069 was 9df3069, checked in by Стојков Марко <mst@…>, 3 years ago

Edit answer and answer response

  • Property mode set to 100644
File size: 642 bytes
Line 
1import { Injectable } from '@angular/core';
2import { AnswerQuestionStateViewModel, AnswerResponseQuestionStateViewModel } from 'src/app/shared-app/models';
3import { AuthService } from '.';
4
5@Injectable({
6 providedIn: 'root'
7})
8export class StudentQuestionService {
9 constructor(private auth: AuthService) {}
10
11 currentUserCanEditAnswer(answer: AnswerQuestionStateViewModel): boolean {
12 return this.auth.selfUser?.student?.uid === answer.student.uid;
13 }
14
15 currentUserCanEditAnswerResponse(answerResponse: AnswerResponseQuestionStateViewModel): boolean {
16 return this.auth.selfUser?.student?.uid === answerResponse.student.uid;
17 }
18}
Note: See TracBrowser for help on using the repository browser.