feat(vacation): 휴가 관리 모듈 — 월간 달력 bar/연차·반차 신청/승인 워크플로/공휴일·연차 설정
- vacation_db 전용 저장소(VacationDBStore), VACATION_DB_URL 미설정 시 '설정 필요' 안내 - 월간 달력: 구글식 휴가 bar(주 단위 lane 배정), 일/공휴일 빨강·토요일 파랑 - 신청 폼: 종류/기간/시작·종료 구분(종일/오전/오후)/사유 + 예상 일수 미리보기 - 일수 계산은 서버(compute_days)에서 주말+공휴일(is_red) 제외 재계산 - 워크플로: 작성중/반려→제출→승인|반려, 취소 soft delete, 본인만 수정(작성중/반려) - 권한: vacation(접근)/vacation_approver(승인), admin 통과. 설정은 admin 전용 - 공휴일(vacation_holidays) DB 기반 provider + settings CRUD, 연차잔여(vacation_balances) - 엑셀 내보내기(openpyxl), scripts/sql/vacation_db_init.sql(멱등, 2026 공휴일 seed) - main.py 등록, 메뉴 ready 전환, docs/.env.example/CLAUDE.md 갱신 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,189 @@
|
||||
/* 휴가 관리(vacation) 모듈 스타일.
|
||||
DESIGN.md 토큰 준수 — 모노크롬, 10/14px radius, 카드 padding 16px.
|
||||
캐시 버전: ?v=20260530a (변경 시 템플릿 head_extra 의 ?v= 도 함께 올린다) */
|
||||
|
||||
:root {
|
||||
--vac-ash: #e5e5e5;
|
||||
--vac-ghost: #f2f2f2;
|
||||
--vac-muted: #737373;
|
||||
--vac-black: #0a0a0a;
|
||||
--vac-red: #c22b10;
|
||||
--vac-blue: #1d4ed8;
|
||||
--vac-green: #10733a;
|
||||
}
|
||||
|
||||
.vac { display: flex; flex-direction: column; gap: 16px; }
|
||||
|
||||
/* ── 페이지 액션 + 잔여 요약 ── */
|
||||
.vac-actions {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
gap: 12px; flex-wrap: wrap;
|
||||
}
|
||||
.vac-actions-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
||||
.vac-mini { margin-left: 4px; }
|
||||
.vac-balance {
|
||||
display: flex; align-items: baseline; gap: 8px;
|
||||
font-size: 14px; color: var(--vac-black);
|
||||
}
|
||||
.vac-balance strong { font-weight: 600; }
|
||||
.vac-bal-sep { color: var(--vac-ash); }
|
||||
.vac-bal-remain strong { color: var(--vac-green); }
|
||||
.vac-bal-year { margin-left: 6px; font-size: 12px; }
|
||||
|
||||
/* ── 레이아웃: 달력 좌 / 리스트 우 ── */
|
||||
.vac-layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 340px;
|
||||
gap: 16px;
|
||||
align-items: start;
|
||||
}
|
||||
@media (max-width: 1100px) {
|
||||
.vac-layout { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
/* ── 달력 카드 ── */
|
||||
.vac-cal-card { padding: 16px; }
|
||||
.vac-cal-head {
|
||||
display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
|
||||
}
|
||||
.vac-cal-title { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -0.45px; }
|
||||
.vac-nav-btn { padding: 4px 12px; font-size: 16px; line-height: 1; }
|
||||
.vac-today-btn { margin-left: auto; }
|
||||
|
||||
.vac-cal { border: 1px solid var(--vac-ash); border-radius: 10px; overflow: hidden; }
|
||||
|
||||
.vac-wd-row {
|
||||
display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
|
||||
background: var(--vac-ghost); border-bottom: 1px solid var(--vac-ash);
|
||||
}
|
||||
.vac-wd {
|
||||
text-align: center; padding: 6px 0; font-size: 13px; font-weight: 500;
|
||||
color: var(--vac-black);
|
||||
}
|
||||
|
||||
/* 주(week) — 1행=날짜, 2행+=bar lane */
|
||||
.vac-week {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, minmax(0, 1fr));
|
||||
grid-template-rows: 30px;
|
||||
grid-auto-rows: 21px;
|
||||
border-bottom: 1px solid var(--vac-ash);
|
||||
padding-bottom: 4px;
|
||||
position: relative;
|
||||
}
|
||||
.vac-week:last-child { border-bottom: none; }
|
||||
|
||||
.vac-day {
|
||||
border-right: 1px solid var(--vac-ash);
|
||||
padding: 4px 6px; text-decoration: none;
|
||||
display: block; min-height: 30px;
|
||||
}
|
||||
.vac-day:nth-child(7n) { border-right: none; }
|
||||
.vac-day-num { font-size: 13px; font-weight: 500; color: var(--vac-black); }
|
||||
.vac-out { background: #fafafa; }
|
||||
.vac-out .vac-day-num { color: #bbb; }
|
||||
.vac-today { background: #f5f5f5; }
|
||||
.vac-today .vac-day-num {
|
||||
background: var(--vac-black); color: #fff; border-radius: 9999px;
|
||||
padding: 1px 7px;
|
||||
}
|
||||
.vac-selected { box-shadow: inset 0 0 0 2px var(--vac-black); }
|
||||
.vac-red { color: var(--vac-red) !important; }
|
||||
.vac-blue { color: var(--vac-blue) !important; }
|
||||
|
||||
/* ── 휴가 bar (구글 달력 스타일) ── */
|
||||
.vac-bar {
|
||||
margin: 1px 3px; padding: 0 6px; height: 18px; line-height: 18px;
|
||||
border-radius: 6px; font-size: 11px; text-decoration: none;
|
||||
overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
|
||||
align-self: center;
|
||||
}
|
||||
.vac-bar-label { pointer-events: none; }
|
||||
.vac-bar-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
|
||||
.vac-bar-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
|
||||
|
||||
.vac-bar-draft { background: #fff; border: 1px dashed var(--vac-muted); color: var(--vac-muted); }
|
||||
.vac-bar-submit { background: var(--vac-ghost); border: 1px solid var(--vac-muted); color: var(--vac-black); }
|
||||
.vac-bar-approve { background: var(--vac-black); color: #fff; }
|
||||
.vac-bar-reject { background: #fff; border: 1px solid var(--vac-red); color: var(--vac-red); text-decoration: line-through; }
|
||||
.vac-bar-cancel { background: #fff; border: 1px dashed var(--vac-ash); color: #bbb; opacity: 0.7; }
|
||||
|
||||
/* 범례 */
|
||||
.vac-legend { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
|
||||
.vac-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--vac-muted); }
|
||||
.vac-dot { width: 14px; height: 12px; border-radius: 4px; display: inline-block; }
|
||||
|
||||
/* ── 선택일 리스트 ── */
|
||||
.vac-list-card { padding: 16px; }
|
||||
.vac-list-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
|
||||
.vac-list-head h2 { font-size: 16px; font-weight: 600; margin: 0; }
|
||||
.vac-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
|
||||
.vac-list-link {
|
||||
display: block; text-decoration: none; color: var(--vac-black);
|
||||
border: 1px solid var(--vac-ash); border-radius: 10px; padding: 10px 12px;
|
||||
}
|
||||
.vac-list-link:hover { background: var(--vac-ghost); }
|
||||
.vac-list-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
||||
.vac-list-meta { font-size: 12px; margin-top: 4px; }
|
||||
.vac-list-reason { font-size: 12px; margin-top: 4px; }
|
||||
.vac-empty { padding: 12px 0; }
|
||||
|
||||
/* ── 신청 폼 ── */
|
||||
.vac-form-card { padding: 16px; max-width: 760px; }
|
||||
.vac-form-grid {
|
||||
display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px; margin-bottom: 12px;
|
||||
}
|
||||
.vac-full { grid-column: 1 / -1; }
|
||||
.vac-days-preview { margin: 12px 0; font-size: 14px; }
|
||||
.vac-days-preview strong { font-size: 16px; font-weight: 600; }
|
||||
.vac-form-actions { display: flex; gap: 8px; margin-top: 8px; }
|
||||
|
||||
/* ── 상세 ── */
|
||||
.vac-detail-card { padding: 16px; max-width: 760px; }
|
||||
.vac-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
||||
.vac-detail-head h2 { font-size: 18px; font-weight: 600; margin: 0; }
|
||||
.vac-detail-grid {
|
||||
display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px 24px; margin: 16px 0;
|
||||
}
|
||||
.vac-detail-grid dt { font-size: 12px; color: var(--vac-muted); margin-bottom: 2px; }
|
||||
.vac-detail-grid dd { margin: 0; font-size: 14px; }
|
||||
.vac-detail-block { margin: 12px 0; }
|
||||
.vac-detail-label { font-size: 12px; color: var(--vac-muted); margin-bottom: 4px; }
|
||||
.vac-reject-block p { color: var(--vac-red); }
|
||||
.vac-approve-box {
|
||||
display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
|
||||
background: var(--vac-ghost); border-radius: 10px; padding: 12px; margin: 12px 0;
|
||||
}
|
||||
.vac-reject-form { display: flex; gap: 6px; align-items: center; }
|
||||
.vac-inline-form { display: inline; }
|
||||
.vac-detail-actions { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
|
||||
.vac-push-right { margin-left: auto; }
|
||||
|
||||
/* ── 승인 대기 ── */
|
||||
.vac-pending-table .vac-act-col { width: 280px; }
|
||||
.vac-pending-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
||||
.vac-reason-cell { max-width: 260px; }
|
||||
.erp-btn-sm { padding: 2px 10px; font-size: 12px; }
|
||||
.erp-input-sm { padding: 2px 8px; font-size: 12px; min-width: 140px; }
|
||||
|
||||
/* ── 설정 ── */
|
||||
.vac-settings-head { margin-bottom: 4px; }
|
||||
.vac-year-form { display: flex; gap: 8px; align-items: flex-end; }
|
||||
.vac-year-field { max-width: 140px; }
|
||||
.vac-settings-grid {
|
||||
display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
|
||||
align-items: start;
|
||||
}
|
||||
@media (max-width: 1100px) { .vac-settings-grid { grid-template-columns: 1fr; } }
|
||||
.vac-set-card { padding: 16px; }
|
||||
.vac-card-head h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
|
||||
.vac-holiday-form, .vac-balance-form {
|
||||
display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 10px; margin-bottom: 12px; align-items: end;
|
||||
}
|
||||
.vac-holiday-form button, .vac-balance-form button { grid-column: 1 / -1; }
|
||||
.vac-check { display: flex; align-items: center; gap: 6px; font-size: 13px; }
|
||||
.vac-set-scroll { max-height: 420px; overflow: auto; }
|
||||
.vac-set-note { font-size: 12px; margin-top: 8px; }
|
||||
Reference in New Issue
Block a user