BigW Consortium Gitlab

Added discussion_line_code value to note response and use it to query the right…

Added discussion_line_code value to note response and use it to query the right row for the discussion UI
parent 9c3f094a
...@@ -414,7 +414,8 @@ export default class Notes { ...@@ -414,7 +414,8 @@ export default class Notes {
} }
this.note_ids.push(noteEntity.id); this.note_ids.push(noteEntity.id);
form = $form || $(`.js-discussion-note-form[data-discussion-id="${noteEntity.discussion_id}"]`); form = $form || $(`.js-discussion-note-form[data-discussion-id="${noteEntity.discussion_id}"]`);
row = form.closest('tr');
row = form.length ? form.closest('tr') : $(`#${noteEntity.discussion_line_code}`);
if (noteEntity.on_image) { if (noteEntity.on_image) {
row = form; row = form;
......
...@@ -106,7 +106,8 @@ module NotesActions ...@@ -106,7 +106,8 @@ module NotesActions
discussion_resolvable: discussion.resolvable?, discussion_resolvable: discussion.resolvable?,
diff_discussion_html: diff_discussion_html(discussion), diff_discussion_html: diff_discussion_html(discussion),
discussion_html: discussion_html(discussion) discussion_html: discussion_html(discussion),
discussion_line_code: discussion.line_code,
) )
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment