Skip to content

Commit

Permalink
corrected fieldValue in the summary table on the contributor page #1650
Browse files Browse the repository at this point in the history
  • Loading branch information
user committed Jul 3, 2024
1 parent c1ea926 commit 8d6cbf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dataedit/static/peer_review/opr_contributor.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ function renderSummaryPageFields() {
const fields = document.querySelectorAll('.field');
for (let field of fields) {
let field_id = field.id.slice(6);
const fieldValue = $(field).text();
const fieldValue = $(field).find('.value').text().replace(/\s+/g, ' ').trim();
const fieldState = getFieldState(field_id);
const fieldCategory = field.getAttribute('data-category');
if (fieldState === 'ok') {
Expand All @@ -365,7 +365,7 @@ function renderSummaryPageFields() {

for (const review of current_review.reviews) {
const field_id = `#field_${review.key}`.replaceAll(".", "\\.");
const fieldValue = $(field_id).text();
const fieldValue = $(field_id).find('.value').text().replace(/\s+/g, ' ').trim();
const isAccepted = review.fieldReview.some((fieldReview) => fieldReview.state === 'ok');
const isRejected = review.fieldReview.some((fieldReview) => fieldReview.state === 'rejected');

Expand All @@ -389,7 +389,7 @@ function renderSummaryPageFields() {
const category_fields = category.querySelectorAll(".field");
for (field of category_fields) {
const field_id = field.id.slice(6);
const fieldValue = $(field).text();
const fieldValue = $(field).find('.value').text().replace(/\s+/g, ' ').trim();
const found = current_review.reviews.some((review) => review.key === field_id);
const fieldState = getFieldState(field_id);
const fieldCategory = field.getAttribute('data-category');
Expand Down

0 comments on commit 8d6cbf8

Please sign in to comment.