feat(plan): grid component with sticky headers and weekend tint
This commit is contained in:
125
src/admin/plan.css
Normal file
125
src/admin/plan.css
Normal file
@@ -0,0 +1,125 @@
|
||||
/* === Plán prací (work schedule) module === */
|
||||
|
||||
.plan-grid-wrap {
|
||||
overflow: auto;
|
||||
border: 1px solid var(--border, #e5e7eb);
|
||||
border-radius: 8px;
|
||||
max-height: calc(100vh - 240px);
|
||||
}
|
||||
|
||||
.plan-grid {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
width: 100%;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.plan-grid thead th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: var(--bg-secondary, #f9fafb);
|
||||
z-index: 2;
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid var(--border, #e5e7eb);
|
||||
text-align: left;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.plan-grid thead th.plan-grid-date-col {
|
||||
left: 0;
|
||||
z-index: 3;
|
||||
min-width: 110px;
|
||||
}
|
||||
|
||||
.plan-grid tbody td {
|
||||
padding: 6px 8px;
|
||||
border-bottom: 1px solid var(--border, #e5e7eb);
|
||||
vertical-align: top;
|
||||
min-width: 140px;
|
||||
}
|
||||
|
||||
.plan-grid tbody td.plan-grid-date-col {
|
||||
position: sticky;
|
||||
left: 0;
|
||||
background: var(--bg-secondary, #f9fafb);
|
||||
z-index: 1;
|
||||
font-weight: 500;
|
||||
color: var(--text-muted, #6b7280);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.plan-grid tr.plan-grid-weekend td {
|
||||
background: var(--bg-weekend, #fefce8);
|
||||
}
|
||||
.plan-grid tr.plan-grid-weekend td.plan-grid-date-col {
|
||||
background: var(--bg-weekend-strong, #fef3c7);
|
||||
}
|
||||
|
||||
.plan-cell {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
background: transparent;
|
||||
border: 1px dashed transparent;
|
||||
border-radius: 6px;
|
||||
padding: 4px 6px;
|
||||
cursor: pointer;
|
||||
min-height: 40px;
|
||||
}
|
||||
.plan-cell:hover {
|
||||
border-color: var(--primary, #2563eb);
|
||||
}
|
||||
.plan-cell--readonly {
|
||||
cursor: default;
|
||||
}
|
||||
.plan-cell--readonly:hover {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.plan-chip {
|
||||
display: inline-block;
|
||||
border-radius: 4px;
|
||||
padding: 2px 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #1f2937;
|
||||
background: var(--chip-default, #e5e7eb);
|
||||
}
|
||||
.plan-chip--work {
|
||||
background: #dbeafe;
|
||||
}
|
||||
.plan-chip--preparation {
|
||||
background: #ccfbf1;
|
||||
}
|
||||
.plan-chip--travel {
|
||||
background: #fde68a;
|
||||
}
|
||||
.plan-chip--leave {
|
||||
background: #bbf7d0;
|
||||
}
|
||||
.plan-chip--sick {
|
||||
background: #fecaca;
|
||||
}
|
||||
.plan-chip--training {
|
||||
background: #e9d5ff;
|
||||
}
|
||||
.plan-chip--other {
|
||||
background: #e5e7eb;
|
||||
}
|
||||
|
||||
.plan-cell-note {
|
||||
display: block;
|
||||
margin-top: 2px;
|
||||
font-size: 11px;
|
||||
color: var(--text-muted, #6b7280);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.plan-toolbar {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
Reference in New Issue
Block a user