From c28558d56c5ac591237592f2bf741e699f58b577 Mon Sep 17 00:00:00 2001 From: "@s.roertgen" Date: Tue, 13 Feb 2024 10:20:37 +0100 Subject: [PATCH] Add info about number of uploaded entries #18 --- public/index.html | 7 +++++++ src/publishToReconciliation/handleData.js | 1 + 2 files changed, 8 insertions(+) diff --git a/public/index.html b/public/index.html index d6ab4d1..d2eb13e 100644 --- a/public/index.html +++ b/public/index.html @@ -208,6 +208,13 @@

Unleash the full potential of controlled vocabularies in reconciliation

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") diff --git a/src/publishToReconciliation/handleData.js b/src/publishToReconciliation/handleData.js index d1a88f7..8fa6a9d 100644 --- a/src/publishToReconciliation/handleData.js +++ b/src/publishToReconciliation/handleData.js @@ -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;