Skip to content
Snippets Groups Projects

Resolve "Mark commented lines when feedback is hidden"

Merged Dominik Seeger requested to merge 160-mark-commented-lines-when-feedback-is-hidden into master
@@ -8,6 +8,7 @@
<template slot="table-content" id='sub-lines'>
<tr v-for="(code, lineNo) in submission" :key="`${submissionObj.pk}${lineNo}`" :id="`sub-line-${lineNo}`">
<submission-line
:hint="hasHiddenComment(lineNo)"
:code="code"
:line-no="lineNo"
@toggleEditor="toggleEditorOnLine(lineNo)"
@@ -180,6 +181,14 @@ export default {
return da.getTime() - db.getTime()
})
},
hasHiddenComment (lineNo) {
const hasOrigComment = this.origFeedback && this.origFeedback[lineNo]
&& this.origFeedback[lineNo].length > 0
const hasUpdatedComment = this.updatedFeedback && this.updatedFeedback[lineNo]
return !this.showFeedback && (hasOrigComment || hasUpdatedComment)
},
init () {
SubmissionNotes.RESET_STATE()
SubmissionNotes.SET_SUBMISSION(this.submissionObj)
Loading