From 2941e083997956b67d7016bb3c4c00b5ee680098 Mon Sep 17 00:00:00 2001 From: "Kernchen, Sophie" Date: Fri, 20 Feb 2026 12:00:31 +0100 Subject: [PATCH 1/8] Start to use bootstrap classes --- public/curation/extract.js | 20 +++++++++++++------- public/curation/index.html | 13 +++++++------ public/style.css | 27 ++++++++++++++------------- 3 files changed, 34 insertions(+), 26 deletions(-) diff --git a/public/curation/extract.js b/public/curation/extract.js index 88d9123..51246ae 100644 --- a/public/curation/extract.js +++ b/public/curation/extract.js @@ -8,6 +8,8 @@ function extract_info(cell, obj, tag, colorPolicies){ element.style.color = colorPolicies[obj[2]["conflict"]]; element.appendChild(document.createTextNode(` ${obj[0]}`)); cell.appendChild(element); + console.log("parent: "+cell.parentNode) + //cell.parentNode.style.background = colorPolicies[obj[2]["conflict"]]; }else{ cell.appendChild(document.createTextNode(` ${obj[0]}`)); } @@ -16,8 +18,11 @@ function extract_info(cell, obj, tag, colorPolicies){ else if(!Array.isArray(obj[0]) && Object.keys(obj[0]).includes("familyName")){ obj.forEach(e =>{ const element = document.createElement("div"); - extract_person(e, element, tag, colorPolicies); + const hasConfict = extract_person(e, element, tag, colorPolicies); cell.appendChild(element); + /*if (hasConfict){ + cell.classList.add("table-warning"); + }*/ })} else if(Array.isArray(obj[0])){ @@ -53,12 +58,13 @@ function extract_info(cell, obj, tag, colorPolicies){ } function extract_person(e, element, tag, colorPolicies){ + let hasConfict = false; const tooltip = document.createElement("div"); const tooltiptag = document.createElement("div"); - tooltip.classList.add("tooltip"); + tooltip.classList.add("swc-tooltip"); tooltip.onclick = function(){link_to_person(e)}; const tooltiptext = document.createElement("div"); - tooltiptext.classList.add("tooltiptext"); + tooltiptext.classList.add("swc-tooltiptext"); const text = document.createTextNode(`${e.familyName[0]}, ${e.givenName[0]} `); tooltiptag.appendChild(document.createTextNode("See Details")); tooltiptag.appendChild(document.createElement("br")); @@ -77,8 +83,8 @@ function extract_info(cell, obj, tag, colorPolicies){ if(e[k][key][2] && e[k][key][2]["conflict"]){ pair_in_list.style.color = colorPolicies[e[k][key][2]["conflict"]]; tooltiptag.style.color = colorPolicies[e[k][key][2]["conflict"]]; - /*pair_in_list.className += " error"; - tooltiptag.className += " error";*/ + hasConfict = true; + } pair.appendChild(pair_in_list); } @@ -89,8 +95,7 @@ function extract_info(cell, obj, tag, colorPolicies){ if(e[k][2] && e[k][2]["conflict"]){ pair.style.color = colorPolicies[e[k][2]["conflict"]]; tooltiptag.style.color = colorPolicies[e[k][2]["conflict"]]; - //pair.className += " error"; - //tooltiptag.className += " error"; + hasConfict = true; } } tooltiptext.appendChild(pair); @@ -99,6 +104,7 @@ function extract_info(cell, obj, tag, colorPolicies){ tooltip.appendChild(tooltiptext); tooltip.appendChild(text); element.appendChild(tooltip); + return hasConfict; } function link_to_person(data){ diff --git a/public/curation/index.html b/public/curation/index.html index 09118ce..5935846 100644 --- a/public/curation/index.html +++ b/public/curation/index.html @@ -5,7 +5,7 @@ - + Software CaRD @@ -26,7 +26,7 @@

Software CaRD - - -
+
+ +
+
- +
diff --git a/public/style.css b/public/style.css index b2627fd..8cb094b 100644 --- a/public/style.css +++ b/public/style.css @@ -52,20 +52,20 @@ button{ justify-content: center; } -.conflict-operators{ - display: flex; - flex-direction: row; - align-items: center; - justify-content: flex-end; +.operators{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; } -.tooltip { +.swc-tooltip { position: relative; border-bottom: 1px dotted black; white-space:pre-wrap; } -.tooltip .tooltiptext { +.swc-tooltip .swc-tooltiptext { visibility: hidden; background-color: #555; color: #fff; @@ -80,12 +80,12 @@ opacity: 0; transition: opacity 0.3s; border-radius: 12px; } -.tooltip .tooltiptext p{ +.swc-tooltip .swc-tooltiptext p{ font-size: large; margin: 0px; } -.tooltip .tooltiptext::after { +.swc-tooltip .swc-tooltiptext::after { content: ""; position: absolute; top: 100%; @@ -97,7 +97,7 @@ border-style: solid; border-color: #555 transparent transparent transparent; } -.tooltip:hover .tooltiptext { +.swc-tooltip:hover .swc-tooltiptext { visibility: visible; opacity: 1; } @@ -137,7 +137,8 @@ button{ text-align: center; background-image: none; background-color: #ddd; - color:black + color:black; + padding: 0px; } @@ -164,8 +165,8 @@ button{ .dropdown { position: relative; display: inline-block; - left: 41%; - top: -15px; + left: 36%; + top: 10px; } /* Dropdown Content (Hidden by Default) */ From b21005d5ad5d4227a61cfc28fb937a77ca3d8f89 Mon Sep 17 00:00:00 2001 From: "Kernchen, Sophie" Date: Mon, 23 Feb 2026 15:02:55 +0100 Subject: [PATCH 2/8] Show plus to add comment (without function) --- public/curation/index.html | 23 +++++++++++++- public/style.css | 62 +++++++++++++++++++++++++++++++++++++- 2 files changed, 83 insertions(+), 2 deletions(-) diff --git a/public/curation/index.html b/public/curation/index.html index 5935846..22b44a3 100644 --- a/public/curation/index.html +++ b/public/curation/index.html @@ -9,7 +9,7 @@ Software CaRD - + @@ -19,6 +19,24 @@

Software CaRD +

Metadata

diff --git a/public/style.css b/public/style.css index 8cb094b..98da501 100644 --- a/public/style.css +++ b/public/style.css @@ -59,6 +59,32 @@ button{ justify-content: center; } +.navigation{ + position: absolute; + font-size: larger; + top:5%; + right:3%; + display: flex; + flex-direction: row; +} + +.notes{ + right: 5%; + cursor: pointer; +} +.notes:hover .notes-desc{ + visibility: visible; +} +.notes-desc{ + font-size: medium; + position: absolute; + width: 300px; + padding: 0px; + right: 1px; + text-align: end; + visibility: hidden; +} + .swc-tooltip { position: relative; border-bottom: 1px dotted black; @@ -192,4 +218,38 @@ button{ .dropdown-content a:hover {background-color: #f1f1f1} /* Show the dropdown menu (use JS to add this class to the .dropdown-content container when the user clicks on the dropdown button) */ -.show {display:block;} \ No newline at end of file +.show {display:block;} + +tr:hover .single-line-comment{ + visibility: visible; +} +.single-line-comment{ + position:absolute; + right: 20%; + visibility: hidden; +} +.single-line-comment:hover .hover-text{ + visibility: visible; +} + +.hover-text{ + visibility: hidden; + position: relative; + background-color: #555; + color: #fff; + text-align: center; + padding: 2px; + border-radius: 6px; + z-index: 1; +} +.hover-text::after { +content: ""; +position: absolute; +bottom: 100%; +left: 50%; +margin-left: -5px; +margin-right: 5px; +border-width: 5px; +border-style: solid; +border-color: transparent transparent #555 transparent; +} \ No newline at end of file From b29d38b1ee4d6adf8edebbd0e14520f033a8e12c Mon Sep 17 00:00:00 2001 From: "Kernchen, Sophie" Date: Tue, 3 Mar 2026 09:50:21 +0100 Subject: [PATCH 3/8] Start to add conflict view --- public/curation/conflict/index.html | 95 +++++++++++++++++++++++++++++ public/curation/index.html | 1 - public/style.css | 14 ++++- 3 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 public/curation/conflict/index.html diff --git a/public/curation/conflict/index.html b/public/curation/conflict/index.html new file mode 100644 index 0000000..620b3eb --- /dev/null +++ b/public/curation/conflict/index.html @@ -0,0 +1,95 @@ + + + + + + + + + + Software CaRD + + + + + + + + + +

Curation Conflict

+ + +
+

See the conflict in the folling tables:

+
+
+
+ +

Comment on this row

+
+ + + + + + + + + + + + + + + +
CITATION.cff
@id + https://orcid.org/0000-0001-6372-3853 +
+ + + + + + + + + + + + + + + +
codemeta.md
@id + https://orcid.org/0000-0001-2345-6789 +
+
+
+

+ + +

+
+

Add comment to conflict

+ + +
+ + + diff --git a/public/curation/index.html b/public/curation/index.html index 22b44a3..a374223 100644 --- a/public/curation/index.html +++ b/public/curation/index.html @@ -9,7 +9,6 @@ Software CaRD - diff --git a/public/style.css b/public/style.css index 98da501..581721d 100644 --- a/public/style.css +++ b/public/style.css @@ -252,4 +252,16 @@ margin-right: 5px; border-width: 5px; border-style: solid; border-color: transparent transparent #555 transparent; -} \ No newline at end of file +} + +#conflict{ + display: flex; + flex-direction: row; +} + +.comment{ + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} From 11a7fd794279c0afb14da08a83f3001c4ff90d25 Mon Sep 17 00:00:00 2001 From: "Kernchen, Sophie" Date: Thu, 28 May 2026 14:16:53 +0200 Subject: [PATCH 4/8] Add sigle-line-comments --- public/curation/curation.js | 22 ++++++++++++++++++++ public/curation/index.html | 10 ++++++++- public/curation/safe_comments.js | 3 +++ public/style.css | 35 ++++++++++++++++++++++++++++++-- 4 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 public/curation/safe_comments.js diff --git a/public/curation/curation.js b/public/curation/curation.js index b29ee3b..fb01967 100644 --- a/public/curation/curation.js +++ b/public/curation/curation.js @@ -1,4 +1,5 @@ import { extract_info } from "./extract.js"; +import { add_to_batch } from "./safe_comments.js"; /** * Fetches json_document and displays their contents in a table. @@ -102,6 +103,25 @@ export function displayJSON(json_document){ extract_info(mvalue, data[element], mtag, colorPolicies); tbody.appendChild(row); + + const slcomment = mvalue.querySelector("#single-line-comment"), + slcommentPopup = mvalue.querySelector("#single-line-comment-popup"); + const input = mvalue.querySelector("#comment"); + mvalue.querySelector('input[type="submit"]').addEventListener("click", () => { + add_to_batch(element, input.value); + }); + //slcommentPopup.style.visibility = "visible"; + slcomment.addEventListener('click', (event)=>{ + event.stopPropagation(); + console.log("clicked"); + slcommentPopup.style.visibility = "visible"; + }) + document.addEventListener('click', function(e) { + if ( slcommentPopup.style.visibility === "visible" && !slcommentPopup.contains(e.target) ) { + slcommentPopup.style.visibility = "hidden"; + } + }) + }) }) //Extend Checkbox for metadata source @@ -117,6 +137,8 @@ export function displayJSON(json_document){ } + + /** * Function to get a smaller object from the orginal object. * searches through data till skey and svalue match and return the data from this point. diff --git a/public/curation/index.html b/public/curation/index.html index a374223..2544062 100644 --- a/public/curation/index.html +++ b/public/curation/index.html @@ -72,8 +72,16 @@

Software CaRD -
+ +
+

Comment on this row

+ +
+
+
+
+
+ +
diff --git a/public/curation/safe_comments.js b/public/curation/safe_comments.js new file mode 100644 index 0000000..46260c4 --- /dev/null +++ b/public/curation/safe_comments.js @@ -0,0 +1,3 @@ +export function add_to_batch(value, comment){ + alert(`${value}, ${comment}`); +} diff --git a/public/style.css b/public/style.css index 581721d..84c3e83 100644 --- a/public/style.css +++ b/public/style.css @@ -221,13 +221,17 @@ button{ .show {display:block;} tr:hover .single-line-comment{ - visibility: visible; + opacity: 1; + pointer-events: auto; } .single-line-comment{ position:absolute; right: 20%; - visibility: hidden; + opacity: 0; + pointer-events: none; + transition: opacity 0.2s; } + .single-line-comment:hover .hover-text{ visibility: visible; } @@ -254,6 +258,33 @@ border-style: solid; border-color: transparent transparent #555 transparent; } +.single-line-comment-popup{ + position: absolute; + visibility: hidden; + background-color: #bababa; + padding: 5px; + border-radius: 12px; + top: 17px; + left: -250px; + z-index: 1; +} +.single-line-comment-popup::after { +content: ""; +position: absolute; +bottom: 100%; +left: 50%; +margin-left: -5px; +margin-right: 5px; +border-width: 5px; +border-style: solid; +border-color: transparent transparent #bababa transparent; +} + +input[type=text]{ + width:500px; + border-radius: 12px; +} + #conflict{ display: flex; flex-direction: row; From cd1d9c1c2b18ca9874bd2b62a1c0f22ca46b4d7c Mon Sep 17 00:00:00 2001 From: "Kernchen, Sophie" Date: Fri, 29 May 2026 00:34:35 +0200 Subject: [PATCH 5/8] Add issue to Gitlab --- public/curation/click.js | 2 +- public/curation/curation.js | 5 +- public/curation/index.html | 3 +- public/curation/safe_comments.js | 6 ++- public/curation/send_report.js | 82 ++++++++++++++++++++++++++++++++ public/modules/storage.js | 60 ++++++++++++++++++++++- 6 files changed, 150 insertions(+), 8 deletions(-) create mode 100644 public/curation/send_report.js diff --git a/public/curation/click.js b/public/curation/click.js index 556a512..d0a9d07 100644 --- a/public/curation/click.js +++ b/public/curation/click.js @@ -16,4 +16,4 @@ function filterFunction() { a[i].style.display = "none"; } } -} \ No newline at end of file +} diff --git a/public/curation/curation.js b/public/curation/curation.js index fb01967..0a6c91a 100644 --- a/public/curation/curation.js +++ b/public/curation/curation.js @@ -1,5 +1,5 @@ import { extract_info } from "./extract.js"; -import { add_to_batch } from "./safe_comments.js"; +import { addToBatch } from "./safe_comments.js"; /** * Fetches json_document and displays their contents in a table. @@ -108,9 +108,8 @@ export function displayJSON(json_document){ slcommentPopup = mvalue.querySelector("#single-line-comment-popup"); const input = mvalue.querySelector("#comment"); mvalue.querySelector('input[type="submit"]').addEventListener("click", () => { - add_to_batch(element, input.value); + addToBatch(element, input.value); }); - //slcommentPopup.style.visibility = "visible"; slcomment.addEventListener('click', (event)=>{ event.stopPropagation(); console.log("clicked"); diff --git a/public/curation/index.html b/public/curation/index.html index 2544062..c7a58df 100644 --- a/public/curation/index.html +++ b/public/curation/index.html @@ -25,7 +25,7 @@

Software CaRD

- 📃 + 📃

Send Issue Report to GitLab/GitHub

@@ -117,6 +117,7 @@

Policy Report

+ diff --git a/public/curation/safe_comments.js b/public/curation/safe_comments.js index 46260c4..acc4fea 100644 --- a/public/curation/safe_comments.js +++ b/public/curation/safe_comments.js @@ -1,3 +1,5 @@ -export function add_to_batch(value, comment){ - alert(`${value}, ${comment}`); +import { addComment } from '../modules/storage.js' + +export async function addToBatch(value, comment){ + addComment(value, comment); } diff --git a/public/curation/send_report.js b/public/curation/send_report.js new file mode 100644 index 0000000..d869bab --- /dev/null +++ b/public/curation/send_report.js @@ -0,0 +1,82 @@ +import { retrieveComment, retrievePipeline } from "../modules/storage.js"; +import { Octokit } from "https://esm.sh/@octokit/rest"; + + +const report = document.getElementById("sendReport"); +report.addEventListener("click", sendReport); +async function sendReport(){ + var message = "In [Software-CaRD](https://software-metadata.pub/software-card/) the following notes were added.\n"; + var comment = await retrieveComment(); + while (comment !== null) { + + message += ` +### ${comment.value} + +${comment.comment} + +`; + + comment = await retrieveComment(); + } + + console.log(message); + + + const token = localStorage.getItem("gitlab-api-token"); + const username = localStorage.getItem("gitlab-username"); + var [projectId, pipelineId, jobId] = await retrievePipeline(); + if(token.startsWith("glpat")){ + issueGitlab(token, projectId, message); + }else{ + issueGithub(token, username, message); + } +} + +async function issueGitlab(token, projectId, message){ +const response = await fetch( + `https://codebase.helmholtz.cloud/api/v4/projects/${projectId}/issues`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + "PRIVATE-TOKEN": token + }, + body: JSON.stringify({ + title: "Software CaRD Report", + description: message + }) + } + ); + + const data = await response.json(); + +} +async function issueGithub(token, username, message){ + //TODO Test for Github +const octokit = new Octokit({ + auth: token + }) + +try{ + await octokit.request('POST /repos/SKernchen/SoftwareCaRD-Test/issues', { + owner: `${username}`, + repo: 'SoftwareCaRD-test', + title: `Curation Report`, + labels: ['curation'], + body: message, + headers: { + 'X-GitHub-Api-Version': '2022-11-28' + } + }) + alert("Send to GitHub"); + }catch(error){ + if (error.response) { + console.error(`Error! Status: ${error.response.status}. Message: ${error.response.data.message}`) + } + console.error(error) + document.body.innerHTML = `

Oooopsie

Your Report could not get sended to GitHub! Consider sending this:

${message}

another way.

+

Error message: ${error}

+ Back to Dashboard +
`; + } +} \ No newline at end of file diff --git a/public/modules/storage.js b/public/modules/storage.js index 0545a6b..7e72bda 100644 --- a/public/modules/storage.js +++ b/public/modules/storage.js @@ -8,6 +8,8 @@ function getDatabase() { var pipelineQueue = database.createObjectStore("PipelineQueue", { autoIncrement: true }); pipelineQueue.createIndex("PipelineIdIndex", ["pipelineId"]); + var commentQueue = database.createObjectStore("CommentQueue", { autoIncrement: true }); + commentQueue.createIndex("CommentIdIndex", ["commentId"]); // It would also be nice to have an index to return only entries where imported: false. // However, booleans are not valid keys. See: // https://w3c.github.io/IndexedDB/#key-construct @@ -92,6 +94,62 @@ async function retrievePipeline() { return new Promise(); } +function addCommentToQueue(queue, index, value, comment) { + return new Promise((resolve,reject) => { + queue.put({ + value: value, + comment: comment, + imported: false + }); + resolve(); + }); +} + +async function addComment(value, comment) { + try { + var database = await getDatabase(); + var queue = await getDatabaseStore(database, "CommentQueue"); + var index = await getStoreIndex(queue, "CommentIdIndex"); + addCommentToQueue(queue, index, value, comment); + } catch (error) { + console.error(error); + } +} + +function getUnregisteredCommentFromQueue(queue) { + return new Promise((resolve, reject) => { + var comments = queue.openCursor(); + + comments.onsuccess = (event) => { + + const cursor = event.target.result; + if (cursor) { + const comment = cursor.value; + + cursor.delete(); + + resolve(comment); + return; + } + + resolve(null); + }; + + comments.onerror = (event) => { reject("Search for unimported comments failed") }; + }); +} + +async function retrieveComment() { + try { + var database = await getDatabase(); + var queue = await getDatabaseStore(database, "CommentQueue"); + return getUnregisteredCommentFromQueue(queue); + } catch (error) { + console.error(error); + } + return null; +} + function deleteDatabase(name) { return new Promise((resolve, reject) => { var deletion = indexedDB.deleteDatabase(name); @@ -109,4 +167,4 @@ async function deleteAllPipelines() { } } -export { registerPipeline, retrievePipeline, deleteAllPipelines } +export { registerPipeline, retrievePipeline, deleteAllPipelines, addComment, retrieveComment } From 589e3d63ccc2f7c35fb3a382591f1e1f47f47430 Mon Sep 17 00:00:00 2001 From: "Kernchen, Sophie" Date: Fri, 29 May 2026 11:20:51 +0200 Subject: [PATCH 6/8] Change button color --- public/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/style.css b/public/style.css index 84c3e83..b4a17ce 100644 --- a/public/style.css +++ b/public/style.css @@ -130,7 +130,7 @@ opacity: 1; button{ border-radius: 12px; - background-image: -webkit-linear-gradient(166.66deg, rgb(34, 198, 227) 4.62%, rgb(23, 124, 207) 10.62%, rgb(116, 75, 196) 86.29%); + background-color: rgb(23, 124, 207) ; color: white; border-color: white; padding: 10px; From fbf47ed469e07d92bc6a9c7517f336614abfad0a Mon Sep 17 00:00:00 2001 From: "Kernchen, Sophie" Date: Fri, 29 May 2026 11:35:10 +0200 Subject: [PATCH 7/8] Adapt message for comments --- public/curation/curation.js | 2 +- public/curation/safe_comments.js | 4 ++-- public/curation/send_report.js | 3 +++ public/modules/storage.js | 7 ++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/public/curation/curation.js b/public/curation/curation.js index 0a6c91a..80186cd 100644 --- a/public/curation/curation.js +++ b/public/curation/curation.js @@ -108,7 +108,7 @@ export function displayJSON(json_document){ slcommentPopup = mvalue.querySelector("#single-line-comment-popup"); const input = mvalue.querySelector("#comment"); mvalue.querySelector('input[type="submit"]').addEventListener("click", () => { - addToBatch(element, input.value); + addToBatch(element, data[element], input.value); }); slcomment.addEventListener('click', (event)=>{ event.stopPropagation(); diff --git a/public/curation/safe_comments.js b/public/curation/safe_comments.js index acc4fea..d386673 100644 --- a/public/curation/safe_comments.js +++ b/public/curation/safe_comments.js @@ -1,5 +1,5 @@ import { addComment } from '../modules/storage.js' -export async function addToBatch(value, comment){ - addComment(value, comment); +export async function addToBatch(value, data, comment){ + addComment(value, data, comment); } diff --git a/public/curation/send_report.js b/public/curation/send_report.js index d869bab..6cb18cf 100644 --- a/public/curation/send_report.js +++ b/public/curation/send_report.js @@ -13,6 +13,9 @@ async function sendReport(){ ### ${comment.value} ${comment.comment} + + +
${comment.value}${json.stringify(comment.data[0])}
`; diff --git a/public/modules/storage.js b/public/modules/storage.js index 7e72bda..8f28efd 100644 --- a/public/modules/storage.js +++ b/public/modules/storage.js @@ -94,10 +94,11 @@ async function retrievePipeline() { return new Promise(); } -function addCommentToQueue(queue, index, value, comment) { +function addCommentToQueue(queue, index, value, data, comment) { return new Promise((resolve,reject) => { queue.put({ value: value, + data: data, comment: comment, imported: false }); @@ -105,12 +106,12 @@ function addCommentToQueue(queue, index, value, comment) { }); } -async function addComment(value, comment) { +async function addComment(value, data, comment) { try { var database = await getDatabase(); var queue = await getDatabaseStore(database, "CommentQueue"); var index = await getStoreIndex(queue, "CommentIdIndex"); - addCommentToQueue(queue, index, value, comment); + addCommentToQueue(queue, index, value, data, comment); } catch (error) { console.error(error); } From cad6b82e07d527a90a44229fc0a0e664d2a40a9f Mon Sep 17 00:00:00 2001 From: "Kernchen, Sophie" Date: Fri, 29 May 2026 11:38:35 +0200 Subject: [PATCH 8/8] Remove unecessary variable --- public/curation/extract.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/public/curation/extract.js b/public/curation/extract.js index 51246ae..6685e48 100644 --- a/public/curation/extract.js +++ b/public/curation/extract.js @@ -18,11 +18,8 @@ function extract_info(cell, obj, tag, colorPolicies){ else if(!Array.isArray(obj[0]) && Object.keys(obj[0]).includes("familyName")){ obj.forEach(e =>{ const element = document.createElement("div"); - const hasConfict = extract_person(e, element, tag, colorPolicies); + extract_person(e, element, tag, colorPolicies); cell.appendChild(element); - /*if (hasConfict){ - cell.classList.add("table-warning"); - }*/ })} else if(Array.isArray(obj[0])){