Merge pull request 'Add pages column and widen data entry tables' (#23) from cursor/entry-pages-wider-table into main

This commit was merged in pull request #23.
This commit is contained in:
2026-10-07 05:19:14 +00:00
3 changed files with 27 additions and 9 deletions

View File

@@ -35,6 +35,7 @@
--font-sans: 'Inter', sans-serif;
--font-fa: 'Vazirmatn', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
--content-max: 1200px;
}
[data-theme="dark"] {
@@ -123,7 +124,7 @@ html[lang="fa"] body {
.nav-container {
position: relative;
z-index: 1;
max-width: 1200px;
max-width: var(--content-max);
margin: 0 auto;
padding: 1rem 2rem;
display: flex;
@@ -201,15 +202,27 @@ html[lang="fa"] body {
}
/* Layout */
@media (min-width: 1400px) {
:root {
--content-max: 1600px;
}
}
@media (min-width: 1800px) {
:root {
--content-max: 1800px;
}
}
.main-content {
max-width: 1200px;
max-width: var(--content-max);
margin: 2rem auto;
padding: 0 2rem;
}
.page-grid {
display: grid;
grid-template-columns: 1fr 1.5fr;
grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
gap: 2rem;
align-items: start;
}
@@ -393,10 +406,16 @@ input:focus, select:focus {
}
.data-table th, .data-table td {
padding: 1rem 1.5rem;
padding: 0.85rem 1rem;
border-bottom: 1px solid var(--border);
}
@media (min-width: 1400px) {
.data-table th, .data-table td {
padding: 1rem 1.25rem;
}
}
.data-table th {
font-weight: 500;
color: var(--text-secondary);

View File

@@ -181,10 +181,7 @@ async function adjustCount(id, field, delta) {
const tw = document.getElementById(`tw-${id}`);
if (tw) tw.textContent = `${order.total_weight} kg`;
const pages = document.getElementById(`pages-${id}`);
if (pages) {
const unit = (translations[currentLang] || translations.en).pages_unit;
pages.innerHTML = `${order.canister_pages + order.box_pages} <span data-i18n="pages_unit">${unit}</span>`;
}
if (pages) pages.textContent = order.canister_pages + order.box_pages;
} catch (err) {
showToast('Network error', true);
}

View File

@@ -108,6 +108,7 @@
<th data-i18n="batch_number">Batch</th>
<th data-i18n="canisters">Canisters</th>
<th data-i18n="boxes">Boxes</th>
<th data-i18n="total_pages">Pages</th>
<th data-i18n="status">Status</th>
<th></th>
</tr>
@@ -140,6 +141,7 @@
{{ o.box_count }}
{% endif %}
</td>
<td class="mono" id="pages-{{ o.id }}">{{ o.canister_pages|add:o.box_pages }}</td>
<td><span class="badge badge-{{ o.status }}">{{ o.get_status_display }}</span></td>
<td>
{% if o.status == 'pending' %}
@@ -148,7 +150,7 @@
</td>
</tr>
{% empty %}
<tr><td colspan="7" class="empty-state" data-i18n="no_orders">No orders yet</td></tr>
<tr><td colspan="8" class="empty-state" data-i18n="no_orders">No orders yet</td></tr>
{% endfor %}
</tbody>
</table>