Initial commit: MapinDrag - 근무 배치 시스템

Flask + Leaflet 기반 지도 드래그앤드롭 근무 배치 시스템
- 엑셀 업로드/파싱
- Leaflet 지도에 근무지/근무자 표시
- 드래그앤드롭으로 근무자 배치
- 엑셀 내보내기
This commit is contained in:
user01
2026-05-12 15:32:34 +09:00
commit ef9439a164
8 changed files with 692 additions and 0 deletions

117
static/style.css Normal file
View File

@@ -0,0 +1,117 @@
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', 'Malgun Gothic', sans-serif; height: 100vh; overflow: hidden; display: flex; flex-direction: column; background: #f0f2f5; }
#header {
display: flex; justify-content: space-between; align-items: center;
padding: 10px 20px; background: #fff; border-bottom: 1px solid #e0e0e0;
box-shadow: 0 1px 3px rgba(0,0,0,0.08); z-index: 1000; min-height: 56px; gap: 12px; flex-wrap: wrap;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-left h1 { font-size: 20px; color: #1a73e8; display: flex; align-items: center; gap: 8px; }
.header-subtitle { color: #666; font-size: 13px; }
.header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn {
display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
border: none; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500;
transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: #1a73e8; color: #fff; }
.btn-primary:hover { background: #1557b0; }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-small { padding: 4px 10px; font-size: 11px; border: none; border-radius: 4px; cursor: pointer; margin-top: 4px; }
.status-badge {
padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600;
background: #e5e7eb; color: #6b7280; min-width: 80px; text-align: center;
}
.status-badge.partial { background: #fef3c7; color: #d97706; }
.status-badge.complete { background: #d1fae5; color: #059669; }
#main { display: flex; flex: 1; overflow: hidden; }
#sidebar {
width: 340px; min-width: 340px; background: #fff; border-right: 1px solid #e0e0e0;
display: flex; flex-direction: column; overflow: hidden;
}
.sidebar-header {
display: flex; justify-content: space-between; align-items: center;
padding: 14px 16px; border-bottom: 1px solid #e0e0e0;
}
.sidebar-header h2 { font-size: 15px; display: flex; align-items: center; gap: 6px; color: #333; }
.count-badge {
background: #1a73e8; color: #fff; padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 600;
}
.worker-list {
flex: 1; overflow-y: auto; padding: 8px;
}
.worker-card {
display: flex; gap: 10px; padding: 10px 12px; margin-bottom: 6px;
background: #f8f9fa; border: 1px solid #e5e7eb; border-radius: 8px;
cursor: grab; transition: all 0.2s; user-select: none;
}
.worker-card:hover { border-color: #1a73e8; box-shadow: 0 2px 8px rgba(26,115,232,0.12); }
.worker-card:active { cursor: grabbing; }
.worker-card.dragging { opacity: 0.4; }
.worker-card.assigned { background: #ecfdf5; border-color: #10b981; }
.worker-card-avatar {
width: 40px; height: 40px; border-radius: 50%; background: #e5e7eb;
display: flex; align-items: center; justify-content: center; color: #6b7280;
flex-shrink: 0; font-size: 16px;
}
.worker-card-avatar.assigned { background: #d1fae5; color: #059669; }
.worker-card-info { flex: 1; min-width: 0; }
.worker-card-name { font-weight: 600; font-size: 14px; color: #111; }
.worker-card-detail { font-size: 12px; color: #6b7280; margin-top: 1px; }
.worker-card-address { font-size: 11px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.worker-card-hope { font-size: 11px; color: #d97706; margin-top: 2px; display: flex; align-items: center; gap: 3px; }
.worker-card-assignment { margin-top: 4px; }
.tag-assigned { font-size: 11px; color: #059669; font-weight: 500; display: flex; align-items: center; gap: 3px; }
.tag-unassigned { font-size: 11px; color: #9ca3af; }
#mapContainer {
flex: 1; position: relative; overflow: hidden;
}
#map { width: 100%; height: 100%; }
#dropOverlay {
position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px;
border: 3px dashed #1a73e8; border-radius: 12px; background: rgba(26,115,232,0.06);
display: none; align-items: center; justify-content: center;
font-size: 18px; color: #1a73e8; font-weight: 600; pointer-events: none; z-index: 500;
}
#dropOverlay.active { display: flex; }
#dropOverlay::before { content: '\f279'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-right: 8px; }
.marker-icon {
display: flex; align-items: center; justify-content: center; border-radius: 50%;
box-shadow: 0 2px 8px rgba(0,0,0,0.2); border: 2px solid #fff;
}
.worker-marker { background: #f59e0b; color: #fff; font-size: 14px; }
.worker-assigned-marker { background: #10b981; color: #fff; font-size: 14px; }
.workplace-marker {
background: #1a73e8; color: #fff; font-size: 18px; border-radius: 8px; width: 42px; height: 42px;
display: flex; align-items: center; justify-content: center;
}
.popup-content { font-size: 13px; line-height: 1.5; min-width: 150px; }
.wp-assignees { margin-top: 6px; padding-top: 6px; border-top: 1px solid #e5e7eb; font-size: 12px; color: #6b7280; }
.toast {
position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
padding: 12px 24px; border-radius: 8px; color: #fff; font-size: 14px; font-weight: 500;
z-index: 9999; transition: all 0.3s; opacity: 1; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
white-space: nowrap;
}
.toast.hidden { opacity: 0; transform: translateX(-50%) translateY(10px); pointer-events: none; }
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }
.toast.info { background: #1a73e8; }
.toast.warning { background: #f59e0b; color: #333; }