feat: подписка на уведомление о поступлении товара
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -12,6 +12,12 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<% if (stockUpdated) { %>
|
||||
<p class="alert alert--success">
|
||||
Остаток обновлён.<% if (notified > 0) { %> Отправлено уведомлений подписчикам: <%= notified %>.<% } %>
|
||||
</p>
|
||||
<% } %>
|
||||
|
||||
<table class="cart-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -20,6 +26,7 @@
|
||||
<th>Категория</th>
|
||||
<th>Цена</th>
|
||||
<th>Остаток</th>
|
||||
<th>Подписки</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -30,7 +37,19 @@
|
||||
<td><%= p.name %></td>
|
||||
<td><%= p.category_name || '—' %></td>
|
||||
<td><%= formatPrice(p.price_cents) %></td>
|
||||
<td><%= p.stock %></td>
|
||||
<td>
|
||||
<form action="/admin/products/<%= p.id %>/stock" method="post" class="inline-form admin-stock-form">
|
||||
<input type="number" name="stock" class="input input--sm" min="0" value="<%= p.stock %>" aria-label="Остаток">
|
||||
<button type="submit" class="btn btn--ghost btn--sm">OK</button>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<% if (p.alert_count > 0) { %>
|
||||
<span class="badge" title="Ждут уведомления"><%= p.alert_count %></span>
|
||||
<% } else { %>
|
||||
—
|
||||
<% } %>
|
||||
</td>
|
||||
<td><a href="/product/<%= p.slug %>">На сайте</a></td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
|
||||
Reference in New Issue
Block a user