Add event type handling for duties in the system
- Introduced a new `event_type` column in the `duties` table to categorize duties as 'duty', 'unavailable', or 'vacation'. - Updated the duty schedule import functionality to parse and store event types from the JSON input. - Enhanced the API response to include event types for each duty, improving the calendar display logic. - Modified the web application to visually differentiate between duty types in the calendar and duty list. - Updated tests to cover new event type functionality and ensure correct parsing and storage of duties. - Revised README documentation to reflect changes in duty event types and their representation in the system.
This commit is contained in:
@@ -164,7 +164,9 @@ body {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.duty-marker {
|
||||
.duty-marker,
|
||||
.unavailable-marker,
|
||||
.vacation-marker {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -173,12 +175,25 @@ body {
|
||||
margin-top: 2px;
|
||||
font-size: 0.65rem;
|
||||
font-weight: 700;
|
||||
color: var(--duty);
|
||||
background: rgba(158, 206, 106, 0.25);
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.duty-marker {
|
||||
color: var(--duty);
|
||||
background: rgba(158, 206, 106, 0.25);
|
||||
}
|
||||
|
||||
.unavailable-marker {
|
||||
color: #e0af68;
|
||||
background: rgba(224, 175, 104, 0.25);
|
||||
}
|
||||
|
||||
.vacation-marker {
|
||||
color: #7dcfff;
|
||||
background: rgba(125, 207, 255, 0.25);
|
||||
}
|
||||
|
||||
.duty-list {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
@@ -197,6 +212,20 @@ body {
|
||||
border-left: 3px solid var(--duty);
|
||||
}
|
||||
|
||||
.duty-item--unavailable {
|
||||
border-left-color: #e0af68;
|
||||
}
|
||||
|
||||
.duty-item--vacation {
|
||||
border-left-color: #7dcfff;
|
||||
}
|
||||
|
||||
.duty-item .duty-item-type {
|
||||
font-size: 0.75rem;
|
||||
color: var(--muted);
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.duty-item .name {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user