Add sales-month planning for crops/products and fix today task label format
This commit is contained in:
@@ -25,6 +25,9 @@
|
||||
<label>Aussaat von Monat<input type="number" name="sow_start_month" min="1" max="12" required></label>
|
||||
<label>Aussaat bis Monat<input type="number" name="sow_end_month" min="1" max="12" required></label>
|
||||
<label>Wachstum (Monate)<input type="number" name="grow_months" min="1" max="24" required></label>
|
||||
<label>Bestpreis-Monat (0=kein Hinweis)
|
||||
<input type="number" name="best_sale_month" min="0" max="12" value="0">
|
||||
</label>
|
||||
<label class="check"><input type="checkbox" name="regrow_enabled"> Wächst nach Ernte erneut</label>
|
||||
<label>Zusatz-Ernten (0 = unendlich)
|
||||
<input type="number" name="regrow_cycles" min="0" max="120" value="0">
|
||||
@@ -37,7 +40,7 @@
|
||||
<h2>Bestehende Feldfrüchte</h2>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead><tr><th>Name</th><th>Aussaat</th><th>Wachstum</th><th>Aktionen</th></tr></thead>
|
||||
<thead><tr><th>Name</th><th>Aussaat</th><th>Wachstum</th><th>Bestpreis</th><th>Aktionen</th></tr></thead>
|
||||
<tbody>
|
||||
{{if .Crops}}
|
||||
{{range .Crops}}
|
||||
@@ -54,6 +57,7 @@
|
||||
<label class="check mt-xs"><input type="checkbox" name="regrow_enabled" {{if .RegrowEnabled}}checked{{end}}> Regrow</label>
|
||||
<input type="number" name="regrow_cycles" min="0" max="120" value="{{.RegrowCycles}}" title="0 = unendlich">
|
||||
</td>
|
||||
<td><input type="number" name="best_sale_month" min="0" max="12" value="{{.BestSaleMonth}}"></td>
|
||||
<td class="actions">
|
||||
<button type="submit" class="btn-small">Speichern</button>
|
||||
<button type="submit" formaction="/crops/delete" formnovalidate class="btn-small danger" onclick="return confirm('Feldfrucht wirklich löschen?')">Löschen</button>
|
||||
@@ -62,7 +66,44 @@
|
||||
</tr>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<tr><td colspan="4">Keine Feldfrüchte vorhanden.</td></tr>
|
||||
<tr><td colspan="5">Keine Feldfrüchte vorhanden.</td></tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card full-width">
|
||||
<h2>Produktionsgüter</h2>
|
||||
<form method="post" action="/products/create" class="grid">
|
||||
<label>Name
|
||||
<input type="text" name="name" maxlength="120" required placeholder="z.B. Mehl">
|
||||
</label>
|
||||
<label>Bestpreis-Monat
|
||||
<input type="number" name="best_sale_month" min="1" max="12" required>
|
||||
</label>
|
||||
<button type="submit">Produktionsgut anlegen</button>
|
||||
</form>
|
||||
|
||||
<div class="table-wrap mt">
|
||||
<table>
|
||||
<thead><tr><th>Name</th><th>Bestpreis-Monat</th><th>Aktionen</th></tr></thead>
|
||||
<tbody>
|
||||
{{if .Products}}
|
||||
{{range .Products}}
|
||||
<tr>
|
||||
<form method="post" action="/products/update">
|
||||
<td><input type="hidden" name="id" value="{{.ID}}"><input type="text" name="name" value="{{.Name}}" maxlength="120" required></td>
|
||||
<td><input type="number" name="best_sale_month" min="1" max="12" value="{{.BestSaleMonth}}" required></td>
|
||||
<td class="actions">
|
||||
<button type="submit" class="btn-small">Speichern</button>
|
||||
<button type="submit" formaction="/products/delete" formnovalidate class="btn-small danger" onclick="return confirm('Produktionsgut wirklich löschen?')">Löschen</button>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<tr><td colspan="3">Keine Produktionsgüter vorhanden.</td></tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user