Initial commit: aplicatie de cantarire si etichetare
Aplicatie Flask + SQLite pentru productie alimentara: cantarirea componentelor unui produs finit si tiparirea etichetei prin QZ Tray. - produse finite (retete) formate din componente cantarite - designer vizual de etichete (mm/px, zona sigura, campuri variabile, cod QR cu continut din mai multe bucati) - legare produs finit -> sablon de eticheta - navigare pe doua taburi: Cantarire / Setari - administrare: componente, produse finite, sabloane, campuri, istoric - backup, resetare baza de date, checklist de pregatire, /healthz - CLI de administrare si serviciu systemd pentru productie - vendor/syncpulse-scale-bridge (GPL-3.0-or-later) pentru citirea cantarului
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ "Component nou" if is_new else "Editare component" }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="page-head">
|
||||
<div>
|
||||
<h1>{{ "Component nou" if is_new else "Editare component" }}</h1>
|
||||
<p class="subtitle">Numele apare pe etichetă, lângă greutate.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card narrow">
|
||||
<form method="post" class="form">
|
||||
<div class="field">
|
||||
<label for="code">Cod <span class="req">*</span></label>
|
||||
<input id="code" name="code" type="text" maxlength="40" required
|
||||
value="{{ component.code or '' }}" autofocus>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="name">Denumire <span class="req">*</span></label>
|
||||
<input id="name" name="name" type="text" maxlength="120" required
|
||||
value="{{ component.name or '' }}" placeholder="ex. Fasole">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="unit">Unitate de măsură</label>
|
||||
<select id="unit" name="unit">
|
||||
{% for u in ["g", "kg", "mg", "t", "lb", "oz"] %}
|
||||
<option value="{{ u }}" {{ 'selected' if (component.unit or 'g') == u }}>{{ u }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="description">Descriere</label>
|
||||
<textarea id="description" name="description" rows="3" maxlength="500">{{ component.description or '' }}</textarea>
|
||||
</div>
|
||||
<label class="check">
|
||||
<input type="checkbox" name="active" {{ 'checked' if component.active in [True, 1, '1', 'on', 'true'] or is_new }}>
|
||||
Component activ
|
||||
</label>
|
||||
|
||||
<div class="actions">
|
||||
<button class="btn primary" type="submit">Salvează</button>
|
||||
<a class="btn ghost" href="{{ url_for('components.index') }}">Renunță</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user