Adding scope import
This commit is contained in:
1 parent
cda15df2ed
commit
69cbfa2d3f
18 files changed
+1165
-3
No files matched your search
@@ -0,0 +1,37 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Scope Import · {{ app_name }}{% endblock %}
|
||||
{% block body %}
|
||||
{% include "_nav.html" %}
|
||||
<main class="container">
|
||||
<h1>Scope Import</h1>
|
||||
|
||||
<div class="card">
|
||||
<h2>Upload spreadsheet</h2>
|
||||
<p class="muted">
|
||||
Upload an <code>.xlsx</code> file describing scopes (PartType = Scope). Rows are
|
||||
matched on <code>product_number</code>; re-uploading updates existing scopes.
|
||||
</p>
|
||||
<form hx-post="/admin/scope-import"
|
||||
hx-target="#scope-import-result"
|
||||
hx-swap="innerHTML"
|
||||
hx-encoding="multipart/form-data"
|
||||
hx-indicator="#import-indicator">
|
||||
<label>Spreadsheet
|
||||
<input type="file" name="file" accept=".xlsx" required>
|
||||
</label>
|
||||
<button type="submit" class="btn btn-primary">Import</button>
|
||||
<span id="import-indicator" class="htmx-indicator muted"> Importing…</span>
|
||||
</form>
|
||||
<details style="margin-top:1rem">
|
||||
<summary class="muted">Expected columns</summary>
|
||||
<ul class="muted">
|
||||
{% for col in expected_columns %}
|
||||
<li><code>{{ col }}</code></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<div id="scope-import-result"></div>
|
||||
</main>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user