Compare commits

...

2 Commits

3 changed files with 27 additions and 9 deletions

View File

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

View File

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

View File

@@ -108,6 +108,7 @@
<th data-i18n="batch_number">Batch</th> <th data-i18n="batch_number">Batch</th>
<th data-i18n="canisters">Canisters</th> <th data-i18n="canisters">Canisters</th>
<th data-i18n="boxes">Boxes</th> <th data-i18n="boxes">Boxes</th>
<th data-i18n="total_pages">Pages</th>
<th data-i18n="status">Status</th> <th data-i18n="status">Status</th>
<th></th> <th></th>
</tr> </tr>
@@ -140,6 +141,7 @@
{{ o.box_count }} {{ o.box_count }}
{% endif %} {% endif %}
</td> </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><span class="badge badge-{{ o.status }}">{{ o.get_status_display }}</span></td>
<td> <td>
{% if o.status == 'pending' %} {% if o.status == 'pending' %}
@@ -148,7 +150,7 @@
</td> </td>
</tr> </tr>
{% empty %} {% 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 %} {% endfor %}
</tbody> </tbody>
</table> </table>