[viewer] applicant -> application

This commit is contained in:
Gaspard Jankowiak 2026-06-06 20:45:24 +02:00 committed by gapato
commit 559a7eece4

View file

@ -191,7 +191,7 @@
<div class="layout">
<aside class="sidebar">
<section class="controls">
<p>Select the downloaded ZIP file to browse applicants and preview files.</p>
<p>Select the downloaded ZIP file to browse applications and preview files.</p>
<input id="zip-input" type="file" accept=".zip,application/zip">
<p id="status">Waiting for ZIP selection...</p>
</section>
@ -199,7 +199,7 @@
</aside>
<main class="content">
<div class="content-header">
<h1 id="viewer-title">Applicant archive</h1>
<h1 id="viewer-title">Applications archive</h1>
<p id="viewer-subtitle">Select the ZIP file, then choose a file on the left to preview it here.</p>
<a id="viewer-download" class="viewer-download" href="#" hidden>Download current file</a>
</div>
@ -332,7 +332,7 @@
})
viewer.removeAttribute("src")
viewerTitle.textContent = "Applicant archive"
viewerTitle.textContent = "Application archive"
viewerSubtitle.textContent = message
viewerDownload.hidden = true
viewerDownload.removeAttribute("href")
@ -466,13 +466,13 @@
const nextArchiveData = new Uint8Array(await file.arrayBuffer())
const entries = unzipSync(nextArchiveData, {
filter(entry) {
return entry.name === "applicants.csv"
return entry.name === "applications.csv"
}
})
const csvEntry = entries["applicants.csv"]
const csvEntry = entries["applications.csv"]
if (csvEntry == null) {
throw new Error("Archive does not contain applicants.csv")
throw new Error("Archive does not contain applications.csv")
}
const text = strFromU8(csvEntry).replace(/^\uFEFF/, "")
@ -481,7 +481,7 @@
if (text.trim() === "") {
renderApplicants([])
setStatus("applicants.csv is empty", false)
setStatus("applications.csv is empty", false)
return
}
@ -489,7 +489,7 @@
const [header, ...records] = rows
if (header == null) {
throw new Error("Unable to parse applicants.csv")
throw new Error("Unable to parse applications.csv")
}
const applicants = readApplicants(records.map((row) => Object.fromEntries(header.map((key, index) => [key, row[index] ?? ""]))))