Replace combined filament dropdown with separate material + color dropdowns
- app/constants.py: MATERIALS and COLORS standard value lists
- Migration 0008: job_material + job_color columns on print_jobs
- Job creation (both /jobs and /brackets/{id}/jobs) stores these independently
of the filament inventory
- All job tables updated to display job_material · job_color
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
<td class="text-secondary">{{ j.file_name or '—' }}</td>
|
||||
<td class="text-secondary">{{ j.printer.name if j.printer else '—' }}</td>
|
||||
<td class="text-secondary">
|
||||
{% if j.filament %}{{ j.filament.material.value }}{% if j.filament.color %} · {{ j.filament.color }}{% endif %}{% else %}—{% endif %}
|
||||
{% if j.job_material %}{{ j.job_material }}{% if j.job_color %} · {{ j.job_color }}{% endif %}{% else %}—{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% set s = j.status.value %}
|
||||
@@ -140,17 +140,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="form-label text-secondary small">Material & Color</label>
|
||||
<select name="filament_id" class="form-select bg-dark border-secondary text-white">
|
||||
<option value="">— none —</option>
|
||||
{% for f in filaments %}
|
||||
<option value="{{ f.id }}">
|
||||
{{ f.material.value }}{% if f.color %} · {{ f.color }}{% endif %}
|
||||
{% if f.brand %} ({{ f.brand }}){% endif %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label text-secondary small">Material</label>
|
||||
<select name="job_material" class="form-select bg-dark border-secondary text-white">
|
||||
<option value="">— none —</option>
|
||||
{% for m in materials %}<option>{{ m }}</option>{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label text-secondary small">Color</label>
|
||||
<select name="job_color" class="form-select bg-dark border-secondary text-white">
|
||||
<option value="">— none —</option>
|
||||
{% for c in colors %}<option>{{ c }}</option>{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-3">
|
||||
|
||||
Reference in New Issue
Block a user