Applicatie afmaken en GUI-flow herstellen
Voegt boodschappenlijsten, productbeheer, realtime synchronisatie en browsercache-updates toe. Herstelt login- en sessiegedrag en maakt database-seeding herhaalbaar.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+39
-57
@@ -8,64 +8,46 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<% if (products.length === 0) { %>
|
||||
<p class="text-secondary">Nog geen producten.</p>
|
||||
<% } else { %>
|
||||
<div class="list-group">
|
||||
<% products.forEach(product => { %>
|
||||
<div class="list-group-item">
|
||||
<strong><%= product.category_icon || "" %> <%= product.name %></strong>
|
||||
<div class="text-secondary"><%= product.category_name || "Geen categorie" %></div>
|
||||
</div>
|
||||
<% }); %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header"><h3 class="card-title">Nieuw product</h3></div>
|
||||
<div class="card-body">
|
||||
<form method="post" action="/products">
|
||||
<label class="form-label" for="product-name">Productnaam</label>
|
||||
<input id="product-name" class="form-control mb-3" type="text" name="name"
|
||||
placeholder="bijv. Melk" maxlength="120" required>
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<% if(products.length === 0) { %>
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Nog geen producten.
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
|
||||
<div class="list-group">
|
||||
|
||||
|
||||
<% products.forEach(product => { %>
|
||||
|
||||
|
||||
<div class="list-group-item">
|
||||
|
||||
|
||||
<strong>
|
||||
|
||||
<%= product.name %>
|
||||
|
||||
</strong>
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
<span class="text-secondary">
|
||||
|
||||
<%= product.category_icon || "" %>
|
||||
|
||||
<%= product.category_name || "Geen categorie" %>
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<% }) %>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<label class="form-label" for="category-id">Categorie</label>
|
||||
<select id="category-id" class="form-select mb-3" name="category_id">
|
||||
<option value="">Geen categorie</option>
|
||||
<% (categories || []).forEach(category => { %>
|
||||
<option value="<%= category.id %>"><%= category.icon || "" %> <%= category.name %></option>
|
||||
<% }); %>
|
||||
</select>
|
||||
|
||||
<button class="btn btn-primary w-100" type="submit">Product toevoegen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user