v1.8.0: warehouse module (16 commits), docházka mzda model, leave_type=holiday removal, api.ts race fix
Highlights: - Warehouse module: receipts, issues, reservations, inventory, reports, dashboard, master data (categories, suppliers, locations), FIFO service, integration tests - Docházka: mzda PDF counting model (Odpracováno / Vč. svátků / Přesčas / Svátek / So/Ne / Noc) with Czech weekday names and decimal hours - AttendanceAdmin/AttendanceHistory KPI cards unified to mzda formula with fund bar colored by delta, badges for Práce/Dov/Nem/Sv/Nep - Remove leave_type=holiday entirely (auto-computed from Czech public holidays) - Allow multiple work shifts per day (overlap detection only) - Pre-flight refresh in api.ts eliminates spurious 401s on fresh page loads - Prisma: company_settings gets 6 nullable columns for warehouse numbering (PRI/VYD/INV prefixes, default patterns); migration seeds defaults
This commit is contained in:
269
src/admin/warehouse.css
Normal file
269
src/admin/warehouse.css
Normal file
@@ -0,0 +1,269 @@
|
||||
/* ============================================================================
|
||||
Warehouse Module
|
||||
============================================================================ */
|
||||
|
||||
/* Items table — editable line items for receipts, issues, inventory forms.
|
||||
Mirrors the .offers-items-table pattern from offers.css. */
|
||||
.admin-warehouse-movement-table {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
margin-bottom: 1rem;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table .admin-table {
|
||||
min-width: 700px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table .admin-table thead th {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--text-tertiary);
|
||||
padding: 8px 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table .admin-table td {
|
||||
vertical-align: middle;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table .admin-table tbody tr {
|
||||
transition: background var(--transition);
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table .admin-table tbody tr:hover {
|
||||
background: var(--table-row-hover);
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table .admin-table td .admin-form-input {
|
||||
display: block;
|
||||
padding: 6px 8px;
|
||||
font-size: 13px;
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table .admin-table td .admin-form-select {
|
||||
display: block;
|
||||
padding: 6px 32px 6px 8px;
|
||||
font-size: 13px;
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
/* Action column — right-aligned, fixed narrow width */
|
||||
.admin-warehouse-movement-table .admin-table th:last-child,
|
||||
.admin-warehouse-movement-table .admin-table td:last-child {
|
||||
width: 70px;
|
||||
min-width: 70px;
|
||||
text-align: right;
|
||||
padding: 8px 12px 8px 4px;
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table
|
||||
.admin-table
|
||||
td:last-child
|
||||
.admin-table-actions {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
/* Add-row button sits below the table */
|
||||
.admin-warehouse-movement-table + .admin-btn.admin-btn-secondary,
|
||||
.admin-warehouse-add-row-btn {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
/* Column width hints for stable layout */
|
||||
.admin-warehouse-col-item {
|
||||
width: 28%;
|
||||
min-width: 160px;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-batch {
|
||||
width: 14%;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-qty {
|
||||
width: 10%;
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-price {
|
||||
width: 10%;
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-location {
|
||||
width: 14%;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-notes {
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
/* File dropzone — used in receipt form */
|
||||
.admin-warehouse-dropzone {
|
||||
border: 2px dashed var(--border-color);
|
||||
border-radius: 8px;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
border-color 0.2s,
|
||||
background 0.2s;
|
||||
}
|
||||
|
||||
.admin-warehouse-dropzone:hover {
|
||||
border-color: var(--accent-color);
|
||||
background: var(--accent-light);
|
||||
}
|
||||
|
||||
.admin-warehouse-dropzone-icon {
|
||||
color: var(--text-tertiary);
|
||||
margin: 0 auto 0.5rem;
|
||||
}
|
||||
|
||||
.admin-warehouse-dropzone-text {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.admin-warehouse-dropzone-hint {
|
||||
color: var(--text-tertiary);
|
||||
font-size: 0.8rem;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
/* Danger row highlight for below-minimum items */
|
||||
.admin-warehouse-row-danger td {
|
||||
background: var(--danger-light);
|
||||
}
|
||||
|
||||
.admin-warehouse-row-danger td.admin-mono {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.admin-warehouse-danger-value {
|
||||
color: var(--danger) !important;
|
||||
}
|
||||
|
||||
/* KPI grid overrides for warehouse dashboard — use shared admin-kpi-grid */
|
||||
.admin-warehouse-kpi {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
/* File upload dropzone for receipt attachments */
|
||||
.admin-warehouse-upload {
|
||||
border: 2px dashed var(--border-color);
|
||||
border-radius: 8px;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
border-color 0.2s,
|
||||
background 0.2s;
|
||||
}
|
||||
|
||||
.admin-warehouse-upload:hover {
|
||||
border-color: var(--accent-color);
|
||||
background: var(--accent-light);
|
||||
}
|
||||
|
||||
.admin-warehouse-upload-icon {
|
||||
color: var(--text-tertiary);
|
||||
margin: 0 auto 0.5rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.admin-warehouse-upload-text {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.admin-warehouse-upload-hint {
|
||||
color: var(--text-tertiary);
|
||||
font-size: 0.8rem;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
/* Empty state inside table rows */
|
||||
.admin-table .admin-empty-state {
|
||||
padding: 2rem 0;
|
||||
text-align: center;
|
||||
color: var(--text-tertiary);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
/* Responsive overrides */
|
||||
@media (max-width: 768px) {
|
||||
.admin-warehouse-movement-table .admin-table td .admin-form-input {
|
||||
font-size: 16px;
|
||||
min-height: 44px;
|
||||
padding: 9px 10px;
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table .admin-table td .admin-form-select {
|
||||
font-size: 16px;
|
||||
min-height: 44px;
|
||||
padding: 9px 32px 9px 10px;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-qty {
|
||||
width: 4rem !important;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-price {
|
||||
width: 5.5rem !important;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-batch {
|
||||
width: 5rem !important;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-location {
|
||||
width: 5rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.admin-warehouse-movement-table {
|
||||
margin: 0 -1rem;
|
||||
width: calc(100% + 2rem);
|
||||
border-radius: 0;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table .admin-table {
|
||||
min-width: 700px;
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table .admin-table td {
|
||||
padding: 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.admin-warehouse-movement-table .admin-table th {
|
||||
font-size: 10px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-qty {
|
||||
width: 3.5rem !important;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-price {
|
||||
width: 5rem !important;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-batch {
|
||||
width: 4rem !important;
|
||||
}
|
||||
|
||||
.admin-warehouse-col-location {
|
||||
width: 4rem !important;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user