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 | |
---|
1 | import { Injectable } from '@angular/core';
|
---|
2 | import { AnswerQuestionStateViewModel, AnswerResponseQuestionStateViewModel } from 'src/app/shared-app/models';
|
---|
3 | import { AuthService } from '.';
|
---|
4 |
|
---|
5 | @Injectable({
|
---|
6 | providedIn: 'root'
|
---|
7 | })
|
---|
8 | export 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.