feat: add import dashboard UI and functionality for CSV and Excel uploads
This commit is contained in:
34
templates/imports/ui.html
Normal file
34
templates/imports/ui.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "partials/alerts.html" import toast %}
|
||||
|
||||
{% block title %}Imports · CalMiner{% endblock %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/css/imports.css" />
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="page-header">
|
||||
<div>
|
||||
<h1>Data Imports</h1>
|
||||
<p class="text-muted">Upload CSV or Excel files to preview and commit bulk updates.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card" data-import-module>
|
||||
<header class="card-header">
|
||||
<h2>Upload Projects or Scenarios</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
{% include "partials/import_upload.html" %}
|
||||
{% include "partials/import_preview_table.html" %}
|
||||
|
||||
<div class="import-actions hidden" data-import-actions>
|
||||
<button class="btn primary" data-import-commit disabled>Commit Import</button>
|
||||
<button class="btn" data-import-cancel>Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ toast("import-toast", hidden=True) }}
|
||||
{% endblock %}
|
||||
@@ -25,7 +25,8 @@
|
||||
"links": [
|
||||
{"href": dashboard_href, "label": "Dashboard", "match_prefix": "/"},
|
||||
{"href": projects_href, "label": "Projects", "match_prefix": "/projects"},
|
||||
{"href": project_create_href, "label": "New Project", "match_prefix": "/projects/create"}
|
||||
{"href": project_create_href, "label": "New Project", "match_prefix": "/projects/create"},
|
||||
{"href": "/imports/ui", "label": "Imports", "match_prefix": "/imports"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user