Implement car reservation schedule management system
Co-authored-by: pdf114514 <57948770+pdf114514@users.noreply.github.com> Agent-Logs-Url: https://github.com/pdf114514/CarReservation/sessions/1d8c6b05-0e8d-4484-a2d8-8d427dfad9cb
This commit is contained in:
266
frontend/src/components/ScheduleView.module.css
Normal file
266
frontend/src/components/ScheduleView.module.css
Normal file
@@ -0,0 +1,266 @@
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100vh - 56px);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 10px 20px;
|
||||
background: white;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
flex-shrink: 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.navGroup {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.toolBtn {
|
||||
background: #f3f4f6;
|
||||
border: 1.5px solid #d1d5db;
|
||||
color: #374151;
|
||||
padding: 6px 14px;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.toolBtn:hover {
|
||||
background: #e5e7eb;
|
||||
}
|
||||
|
||||
.dateRange {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #374151;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.addBtn {
|
||||
background: #1a56db;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 7px 18px;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
transition: background 0.15s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.addBtn:hover {
|
||||
background: #1447c0;
|
||||
}
|
||||
|
||||
.error {
|
||||
background: #fee2e2;
|
||||
color: #dc2626;
|
||||
padding: 10px 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.loading {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
color: #6b7280;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Grid wrapper - scrollable */
|
||||
.gridWrapper {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.grid {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
/* Sticky header row */
|
||||
.headerRow {
|
||||
display: flex;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 20;
|
||||
background: white;
|
||||
border-bottom: 2px solid #d1d5db;
|
||||
}
|
||||
|
||||
.cornerCell {
|
||||
flex-shrink: 0;
|
||||
background: #f9fafb;
|
||||
border-right: 2px solid #d1d5db;
|
||||
border-bottom: 2px solid #d1d5db;
|
||||
position: sticky;
|
||||
left: 0;
|
||||
z-index: 30;
|
||||
}
|
||||
|
||||
.dateHeader {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-right: 1px solid #e5e7eb;
|
||||
gap: 2px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.todayHeader {
|
||||
background: #eff6ff;
|
||||
}
|
||||
|
||||
.weekendHeader {
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.dateDay {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #111827;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.dateDow {
|
||||
font-size: 11px;
|
||||
color: #6b7280;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.weekendDow {
|
||||
color: #ef4444;
|
||||
}
|
||||
|
||||
/* Car rows */
|
||||
.carRow {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.carRow:hover .cellArea {
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.carLabel {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 0 12px;
|
||||
border-right: 2px solid #d1d5db;
|
||||
background: white;
|
||||
position: sticky;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
box-shadow: 2px 0 4px rgba(0,0,0,0.04);
|
||||
}
|
||||
|
||||
.carDot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.carName {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #374151;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* Cell area */
|
||||
.cellArea {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.cell {
|
||||
flex-shrink: 0;
|
||||
border-right: 1px solid #f0f0f0;
|
||||
cursor: crosshair;
|
||||
transition: background 0.1s;
|
||||
}
|
||||
|
||||
.cell:hover {
|
||||
background: rgba(26, 86, 219, 0.04);
|
||||
}
|
||||
|
||||
.todayCell {
|
||||
background: rgba(59, 130, 246, 0.06);
|
||||
}
|
||||
|
||||
.weekendCell {
|
||||
background: rgba(0,0,0,0.015);
|
||||
}
|
||||
|
||||
/* Highlight while dragging to create */
|
||||
.creatingHighlight {
|
||||
position: absolute;
|
||||
border-radius: 6px;
|
||||
background: rgba(26, 86, 219, 0.2);
|
||||
border: 2px dashed #1a56db;
|
||||
pointer-events: none;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
/* Reservation block */
|
||||
.reservationBlock {
|
||||
position: absolute;
|
||||
border-radius: 6px;
|
||||
border: 1.5px solid;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
padding: 2px 8px;
|
||||
z-index: 6;
|
||||
transition: box-shadow 0.1s;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.reservationBlock:hover {
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
||||
z-index: 7;
|
||||
}
|
||||
|
||||
.blockText {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.blockDates {
|
||||
font-size: 10px;
|
||||
opacity: 0.75;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.noCars {
|
||||
padding: 40px 20px;
|
||||
text-align: center;
|
||||
color: #6b7280;
|
||||
font-size: 14px;
|
||||
}
|
||||
Reference in New Issue
Block a user