Skip to content

Commit

Permalink
Merge pull request #3711 from Tangerine-Community/enable-js-code-in-f…
Browse files Browse the repository at this point in the history
…eedback-page

feat(client): Add Custom JS code
  • Loading branch information
esurface committed Jun 21, 2024
2 parents 0fd1e83 + 565fcc4 commit b1f13e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions client/src/app/class/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export class Feedback {
skill:string;
assignment:string;
message:string;
customJSCode: string;
messageTruncated: string; // for listing
calculatedScore:string;
percentileRange: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,17 @@ export interface DialogData {
selector: 'feedback-dialog',
templateUrl: 'feedback-dialog.html',
})
export class FeedbackDialog {
export class FeedbackDialog implements OnInit {
constructor(
public dialogRef: MatDialogRef<FeedbackDialog>,
@Inject(MAT_DIALOG_DATA) public data: DialogData,
) {
}

async ngOnInit(){
if(this.data.classGroupReport?.feedback?.customJSCode){
eval(this.data.classGroupReport?.feedback?.customJSCode)
}
}
tNumber(fragment) {
return tNumber(fragment)
}
Expand Down

0 comments on commit b1f13e1

Please sign in to comment.