V0.15.0 - Not done yet
This commit is contained in:
@@ -11,8 +11,21 @@
|
||||
</a>
|
||||
|
||||
<div>
|
||||
<h1 class="page-title" style="margin-bottom: 0;">Consumption Sheets</h1>
|
||||
<p class="page-subtitle" style="margin-bottom: 0;">Manage process types and templates</p>
|
||||
<h1 class="page-title" style="margin-bottom: 0; {{ 'color: var(--color-danger);' if showing_archived else '' }}">
|
||||
{{ 'Archived Processes' if showing_archived else 'Consumption Sheets' }}
|
||||
</h1>
|
||||
|
||||
<p class="page-subtitle" style="margin-bottom: var(--space-xs);">Manage process types and templates</p>
|
||||
|
||||
{% if showing_archived %}
|
||||
<a href="{{ url_for('cons_sheets.admin_processes') }}" style="font-size: 0.85rem; color: var(--color-primary); display: inline-flex; align-items: center; gap: 6px;">
|
||||
<i class="fa-solid fa-eye"></i> Return to Active List
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('cons_sheets.admin_processes', archived=1) }}" style="font-size: 0.85rem; color: var(--color-text-muted); display: inline-flex; align-items: center; gap: 6px;">
|
||||
<i class="fa-solid fa-box-archive"></i> View Archived Processes
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,11 +38,32 @@
|
||||
<div class="sessions-grid">
|
||||
{% for process in processes %}
|
||||
<div class="session-card">
|
||||
<div class="session-card-header">
|
||||
<h3 class="session-name">{{ process.process_name }}</h3>
|
||||
<span class="session-type-badge">
|
||||
{{ process.field_count or 0 }} fields
|
||||
</span>
|
||||
<div class="session-card-header" style="display: flex; justify-content: space-between; align-items: flex-start;">
|
||||
<div>
|
||||
<h3 class="session-name">{{ process.process_name }}</h3>
|
||||
<span class="session-type-badge">
|
||||
{{ process.field_count or 0 }} fields
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% if showing_archived %}
|
||||
<form method="POST"
|
||||
action="{{ url_for('cons_sheets.restore_process', process_id=process.id) }}"
|
||||
style="margin: 0;">
|
||||
<button type="submit" class="btn-icon-only" title="Restore Process" style="color: var(--color-success);">
|
||||
<i class="fa-solid fa-trash-arrow-up"></i>
|
||||
</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<form method="POST"
|
||||
action="{{ url_for('cons_sheets.delete_process', process_id=process.id) }}"
|
||||
onsubmit="return confirm('Are you sure you want to delete {{ process.process_name }}?');"
|
||||
style="margin: 0;">
|
||||
<button type="submit" class="btn-icon-only" title="Delete Process">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="session-meta">
|
||||
@@ -57,6 +91,8 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
@@ -50,12 +50,36 @@
|
||||
|
||||
<form method="POST" action="{{ url_for('cons_sheets.update_template_settings', process_id=process.id) }}">
|
||||
<div class="form-group">
|
||||
<label for="rows_per_page" class="form-label">Rows Per Page</label>
|
||||
<label for="rows_per_page" class="form-label">Rows Per Page (Capacity)</label>
|
||||
<input type="number" id="rows_per_page" name="rows_per_page"
|
||||
value="{{ process.rows_per_page or 30 }}" min="1" max="5000" class="form-input">
|
||||
<p class="form-hint">Max detail rows before starting a new page</p>
|
||||
value="{{ process.rows_per_page or 30 }}" min="1" max="5000" class="form-input">
|
||||
<p class="form-hint">How many items fit in the grid before we need a new page?</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="flex: 1;">
|
||||
<label for="print_start_col" class="form-label">Print Start Column</label>
|
||||
<input type="text" id="print_start_col" name="print_start_col"
|
||||
value="{{ process.print_start_col or 'A' }}" class="form-input"
|
||||
placeholder="e.g. A" pattern="[A-Za-z]+" title="Letters only">
|
||||
<p class="form-hint">First column to print.</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="flex: 1;">
|
||||
<label for="print_end_col" class="form-label">Print End Column</label>
|
||||
<input type="text" id="print_end_col" name="print_end_col"
|
||||
value="{{ process.print_end_col or '' }}" class="form-input"
|
||||
placeholder="e.g. K" pattern="[A-Za-z]+" title="Letters only">
|
||||
<p class="form-hint">Last column to print (defines width).</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="page_height" class="form-label">Page Height (Total Rows)</label>
|
||||
<input type="number" id="page_height" name="page_height"
|
||||
value="{{ process.page_height or '' }}" min="1" class="form-input">
|
||||
<p class="form-hint">The exact distance (in Excel rows) from the top of Page 1 to the top of Page 2.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="detail_start_row" class="form-label">Detail Start Row</label>
|
||||
<input type="number" id="detail_start_row" name="detail_start_row"
|
||||
@@ -63,13 +87,6 @@
|
||||
<p class="form-hint">Excel row number where detail data begins</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="detail_end_row" class="form-label">Detail End Row (Footer Start)</label>
|
||||
<input type="number" id="detail_end_row" name="detail_end_row"
|
||||
value="{{ process.detail_end_row or '' }}" min="1" class="form-input">
|
||||
<p class="form-hint">The row number where your pre-made blank lines end. Unused rows up to this point will be deleted.</p>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Save Settings</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -101,6 +101,11 @@
|
||||
<div class="scans-header">
|
||||
<h3 class="scans-title">Scanned Items (<span id="scanListCount">{{ scans|length }}</span>)</h3>
|
||||
</div>
|
||||
<div style="margin-top: 10px;">
|
||||
<button type="button" class="btn btn-secondary btn-sm" onclick="document.getElementById('importModal').style.display='flex'">
|
||||
<i class="fa-solid fa-file-import"></i> Bulk Import Excel
|
||||
</button>
|
||||
</div>
|
||||
<div id="scansList" class="scans-grid" style="--field-count: {{ detail_fields|length }};">
|
||||
{% for scan in scans %}
|
||||
<div class="scan-row scan-row-{{ scan.duplicate_status }}"
|
||||
@@ -137,6 +142,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="importModal" class="modal">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header-bar">
|
||||
<h3 class="modal-title">Bulk Import Data</h3>
|
||||
<button type="button" class="btn-close-modal" onclick="document.getElementById('importModal').style.display='none'">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="text-align: center;">
|
||||
<p style="color: var(--color-text-muted); margin-bottom: 20px;">
|
||||
Upload an Excel file (.xlsx) to automatically populate this session.
|
||||
<br><strong>Warning:</strong> This bypasses all validation checks.
|
||||
</p>
|
||||
|
||||
<div style="margin-bottom: 30px; padding: 15px; background: var(--color-bg); border-radius: 8px;">
|
||||
<p style="font-size: 0.9rem; margin-bottom: 10px;">Step 1: Get the correct format</p>
|
||||
<a href="{{ url_for('cons_sheets.download_import_template', session_id=session['id']) }}" class="btn btn-secondary btn-sm">
|
||||
<i class="fa-solid fa-download"></i> Download Template
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<form action="{{ url_for('cons_sheets.import_session_data', session_id=session['id']) }}" method="POST" enctype="multipart/form-data">
|
||||
<div style="margin-bottom: 20px;">
|
||||
<input type="file" name="file" accept=".xlsx" class="file-input" required style="width: 100%;">
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary btn-block">
|
||||
<i class="fa-solid fa-upload"></i> Upload & Process
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.header-values { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin: var(--space-sm) 0; }
|
||||
.header-pill { background: var(--color-surface-elevated); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--color-text-muted); }
|
||||
|
||||
Reference in New Issue
Block a user