Skip to content

Commit

Permalink
Add info about number of uploaded entries #18
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Feb 13, 2024
1 parent 954bc9c commit c28558d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,13 @@ <h1>Unleash the full potential of controlled vocabularies in reconciliation</h1>
reconcileUrlLink.innerHTML = reconcileUrl
result.appendChild(reconcileUrlLink)

// show number of entries
if (data.numOfEntries) {
const numOfEntries = document.createElement("p")
numOfEntries.innerHTML = `ℹ️ Added a dataset with ${data.numOfEntries} entries.`
result.appendChild(numOfEntries)
}

// add a button to return to root page saying "Add another dataset"
const button = document.createElement("button")
button.setAttribute("class", "btn")
Expand Down
1 change: 1 addition & 0 deletions src/publishToReconciliation/handleData.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const parseFile = async (reconcileData, log) => {
log.status = "processing";
log.account = account;
log.dataset = j.dataset;
log.numOfEntries = j.entries.length;
writeLog(log);
data.push({ account: j.account, dataset: j.dataset, entries: j.entries });
return data;
Expand Down

0 comments on commit c28558d

Please sign in to comment.