Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Clients/Angular/finki-chattery/src/app/shared-app/services/shared-dialog.service.ts

    r68d02ca r9df3069  
    22import { MatDialog, MatDialogRef } from '@angular/material/dialog';
    33import { Observable } from 'rxjs';
     4import { EditAnswerDialogComponent } from '../components/question/edit-answer-dialog/edit-answer-dialog.component';
     5// tslint:disable-next-line: max-line-length
     6import { EditAnswerResponseDialogComponent } from '../components/question/edit-answer-response-dialog/edit-answer-response-dialog.component';
    47import { RespondToAnswerDialogComponent } from '../components/question/respond-to-answer-dialog/respond-to-answer-dialog.component';
    58
     
    2225    return dialogRef.afterClosed();
    2326  }
     27
     28  public editResponseToAnswer(questionUid: string, answerUid: string, answerResponseUid: string, text: string): Observable<any> {
     29    let dialogRef: MatDialogRef<EditAnswerResponseDialogComponent>;
     30    dialogRef = this.dialog.open(EditAnswerResponseDialogComponent, {
     31      width: '650px',
     32      height: 'auto'
     33    });
     34
     35    dialogRef.componentInstance.questionUid = questionUid;
     36    dialogRef.componentInstance.answerUid = answerUid;
     37    dialogRef.componentInstance.answerResponseUid = answerResponseUid;
     38    dialogRef.componentInstance.textFieldValue = text;
     39
     40    return dialogRef.afterClosed();
     41  }
     42
     43  public editAnswer(questionUid: string, answerUid: string, text: string): Observable<any> {
     44    let dialogRef: MatDialogRef<EditAnswerDialogComponent>;
     45    dialogRef = this.dialog.open(EditAnswerDialogComponent, {
     46      width: '650px',
     47      height: 'auto'
     48    });
     49
     50    dialogRef.componentInstance.questionUid = questionUid;
     51    dialogRef.componentInstance.answerUid = answerUid;
     52    dialogRef.componentInstance.textFieldValue = text;
     53
     54    return dialogRef.afterClosed();
     55  }
    2456}
Note: See TracChangeset for help on using the changeset viewer.