Project

General

Profile

roos-fs tasks #840 » shiftplanning.html

Vadim Pariev, 12/07/2025 04:01 PM

 
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Weekly Calendar Drag & Drop</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
height: 100vh;
overflow: hidden;
}

/* Left side task pool */
#task-pool {
width: 30%;
background: #f3f3f3;
padding: 20px;
display: flex;
flex-direction: column;
border-right: 2px solid #ccc;
box-sizing: border-box;
}

.filters {
margin-bottom: 10px;
display: flex;
flex-direction: column;
gap: 8px;
}

.filters label {
font-size: 14px;
}

.filters input,
.filters select {
padding: 6px 8px;
border-radius: 4px;
border: 1px solid #bbb;
width: 100%;
box-sizing: border-box;
}

/* Project summary */
#project-summary {
margin-bottom: 12px;
font-size: 13px;
display: flex;
flex-direction: column;
gap: 6px;
}

#project-summary-empty {
color: #555;
font-style: italic;
}

.project-summary-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 8px;
border-radius: 4px;
background: #ffffff;
border-left: 4px solid #9ca3af;
box-sizing: border-box;
}

.project-summary-item .project-name {
font-weight: bold;
letter-spacing: 0.03em;
}

.project-summary-item .project-count {
font-family: monospace;
}

.project-summary-item.battery {
border-left-color: #f97316; /* orange */
}

.project-summary-item.wheel {
border-left-color: #3b82f6; /* blue */
}

.task-list-label {
margin: 8px 0 4px;
font-size: 13px;
font-weight: bold;
color: #333;
}

#task-list {
overflow-y: auto;
flex: 1;
padding-right: 4px;
box-sizing: border-box;
}

.task {
color: white;
padding: 15px;
margin-bottom: 10px;
border-radius: 6px;
cursor: grab;
user-select: none;
font-size: 14px;
}

.task.blue {
background: #4a90e2;
}

.task.green {
background: #50b26b;
}

.task.orange {
background: #f5a623;
}

.task.purple {
background: #9b59b6;
}

.task.assigned {
cursor: default;
margin: 5px 0;
}

.task .project-tag {
display: inline-block;
font-size: 11px;
font-weight: bold;
padding: 2px 6px;
border-radius: 10px;
background: rgba(0,0,0,0.2);
margin-bottom: 4px;
}

.task .task-title {
display: block;
font-size: 13px;
margin-top: 2px;
}

/* Weekly calendar */
#calendar {
width: 70%;
display: grid;
grid-template-columns: repeat(5, 1fr);
background: white;
}

.day {
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
padding: 10px;
box-sizing: border-box;
}

.day h3 {
text-align: center;
margin-top: 0;
}

.dropzone {
height: calc(100% - 40px);
border: 2px dashed #ccc;
border-radius: 6px;
padding: 10px;
min-height: 300px;
box-sizing: border-box;
}
</style>
</head>
<body>
<div id="task-pool">
<h2>Tasks (1 hour each)</h2>

<div class="filters">
<label for="location-filter">Location:</label>
<select id="location-filter">
<option value="all">All locations</option>
<option value="berlin">Berlin</option>
<option value="hamburg">Hamburg</option>
<option value="munich">Munich</option>
</select>

<input type="text" id="task-search" placeholder="Search tasks..." />
</div>

<!-- Project summary for selected location -->
<div id="project-summary">
<div id="project-summary-empty">
Select a location to see BATTERY / WHEEL services overview.
</div>
</div>

<div class="task-list-label">Services for selected location</div>

<!-- Task list -->
<div id="task-list">
<!-- Example tasks with project + location -->

<!-- BERLIN -->
<div class="task orange" draggable="true"
data-location="berlin"
data-project="BATTERY">
<span class="project-tag">BATTERY</span>
<span class="task-title">Battery service #1 – Berlin</span>
</div>

<div class="task orange" draggable="true"
data-location="berlin"
data-project="BATTERY">
<span class="project-tag">BATTERY</span>
<span class="task-title">Battery service #2 – Berlin</span>
</div>

<div class="task blue" draggable="true"
data-location="berlin"
data-project="WHEEL">
<span class="project-tag">WHEEL</span>
<span class="task-title">Wheel service #1 – Berlin</span>
</div>

<div class="task blue" draggable="true"
data-location="berlin"
data-project="WHEEL">
<span class="project-tag">WHEEL</span>
<span class="task-title">Wheel service #2 – Berlin</span>
</div>

<!-- HAMBURG -->
<div class="task green" draggable="true"
data-location="hamburg"
data-project="BATTERY">
<span class="project-tag">BATTERY</span>
<span class="task-title">Battery service #1 – Hamburg</span>
</div>

<div class="task purple" draggable="true"
data-location="hamburg"
data-project="WHEEL">
<span class="project-tag">WHEEL</span>
<span class="task-title">Wheel service #1 – Hamburg</span>
</div>

<!-- MUNICH -->
<div class="task green" draggable="true"
data-location="munich"
data-project="BATTERY">
<span class="project-tag">BATTERY</span>
<span class="task-title">Battery service #1 – Munich</span>
</div>

<div class="task purple" draggable="true"
data-location="munich"
data-project="WHEEL">
<span class="project-tag">WHEEL</span>
<span class="task-title">Wheel service #1 – Munich</span>
</div>
</div>
</div>

<div id="calendar">
<div class="day">
<h3>Monday</h3>
<div class="dropzone"></div>
</div>
<div class="day">
<h3>Tuesday</h3>
<div class="dropzone"></div>
</div>
<div class="day">
<h3>Wednesday</h3>
<div class="dropzone"></div>
</di
(2-2/3)