feat: add missing import service and templates
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 12s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 12s
These files were untracked and missing from prior commits, causing ModuleNotFoundError on fresh deploys. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
17
app/templates/partials/import_form.html
Normal file
17
app/templates/partials/import_form.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<article>
|
||||
<header><h3>Import Old Database</h3></header>
|
||||
<form hx-post="/dashboard/import" hx-encoding="multipart/form-data"
|
||||
hx-target="#import-results" hx-swap="innerHTML">
|
||||
<div class="grid">
|
||||
<label>
|
||||
Old Database File (.db)
|
||||
<input type="file" name="db_file" accept=".db" required>
|
||||
</label>
|
||||
<label>
|
||||
|
||||
<button type="submit">Import</button>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
<div id="import-results"></div>
|
||||
</article>
|
||||
37
app/templates/partials/import_results.html
Normal file
37
app/templates/partials/import_results.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Category</th>
|
||||
<th>Imported</th>
|
||||
<th>Skipped</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Workout Sessions</td>
|
||||
<td>{{ result.sessions_imported }}</td>
|
||||
<td>{{ result.sessions_skipped }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Workout Logs</td>
|
||||
<td>{{ result.logs_imported }}</td>
|
||||
<td>{{ result.logs_skipped }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Progress Log</td>
|
||||
<td>{{ result.progress_imported }}</td>
|
||||
<td>{{ result.progress_skipped }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if result.warnings %}
|
||||
<details>
|
||||
<summary>Warnings ({{ result.warnings|length }})</summary>
|
||||
<ul>
|
||||
{% for warning in result.warnings %}
|
||||
<li><small>{{ warning }}</small></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user