fix(monthly-confirm): 셀 색상 개선 + 연차일수 버그 + 여백 수정

- 정시=흰색, 연차=노랑, 연장=연보라, 휴무=회색, 특근=주황
- 반차 0.5일/반반차 0.25일 정확히 계산 (fallback deductMap)
- 연차현황 하단 여백 80→160px (버튼 겹침 방지)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-04-01 07:42:03 +09:00
parent 798ccc62ad
commit 1340918f8e
3 changed files with 17 additions and 10 deletions

View File

@@ -61,13 +61,16 @@ body { max-width: 480px; margin: 0 auto; }
.cal-val { font-size: 0.65rem; font-weight: 700; line-height: 1.2; text-align: center; } .cal-val { font-size: 0.65rem; font-weight: 700; line-height: 1.2; text-align: center; }
/* 셀 상태별 색상 */ /* 셀 상태별 색상 — 정시=흰색, 연차=노랑, 연장=연보라, 휴무=회색 */
.cal-cell.normal { background: white; }
.cal-cell.normal .cal-val { color: #1f2937; } .cal-cell.normal .cal-val { color: #1f2937; }
.cal-cell.vac .cal-val { color: #059669; } .cal-cell.vac { background: #fefce8; }
.cal-cell.off { background: #f9fafb; } .cal-cell.vac .cal-val { color: #92400e; font-weight: 700; }
.cal-cell.off { background: #f3f4f6; }
.cal-cell.off .cal-val { color: #9ca3af; font-weight: 500; } .cal-cell.off .cal-val { color: #9ca3af; font-weight: 500; }
.cal-cell.overtime .cal-val { color: #f59e0b; } .cal-cell.overtime { background: #f5f3ff; }
.cal-cell.special { background: #fefce8; } .cal-cell.overtime .cal-val { color: #7c3aed; }
.cal-cell.special { background: #fff7ed; }
.cal-cell.special .cal-val { color: #b45309; } .cal-cell.special .cal-val { color: #b45309; }
.cal-cell.partial .cal-val { color: #6b7280; } .cal-cell.partial .cal-val { color: #6b7280; }
.cal-cell.none .cal-val { color: #d1d5db; } .cal-cell.none .cal-val { color: #d1d5db; }
@@ -93,7 +96,7 @@ body { max-width: 480px; margin: 0 auto; }
/* 연차 현황 */ /* 연차 현황 */
.mmc-vac-title { font-size: 0.8rem; font-weight: 600; color: #6b7280; margin-bottom: 6px; padding: 0 4px; } .mmc-vac-title { font-size: 0.8rem; font-weight: 600; color: #6b7280; margin-bottom: 6px; padding: 0 4px; }
.mmc-vac-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 80px; } .mmc-vac-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 160px; }
.mmc-vac-card { .mmc-vac-card {
background: white; border-radius: 10px; padding: 12px 8px; background: white; border-radius: 10px; padding: 12px 8px;
text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06); text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06);

View File

@@ -178,8 +178,12 @@ function renderSummaryCards(records) {
if (hrs > 8) overtimeHours += (hrs - 8); if (hrs > 8) overtimeHours += (hrs - 8);
if (vacType) { if (vacType) {
var vd = r.attendance.vacation_days ? parseFloat(r.attendance.vacation_days) : 0; var vd = r.attendance.vacation_days ? parseFloat(r.attendance.vacation_days) : 0;
if (vd > 0) vacDays += vd; if (vd > 0) { vacDays += vd; }
else vacDays += 1; // fallback else {
// fallback: vacation_type 이름으로 차감일수 매핑
var deductMap = { '연차': 1, '반차': 0.5, '반반차': 0.25, '조퇴': 0.75, '병가': 1 };
vacDays += deductMap[vacType] || 1;
}
} }
}); });

View File

@@ -8,7 +8,7 @@
<script>tailwind.config = { corePlugins: { preflight: false } }</script> <script>tailwind.config = { corePlugins: { preflight: false } }</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="/static/css/tkfb.css?v=2026033108"> <link rel="stylesheet" href="/static/css/tkfb.css?v=2026033108">
<link rel="stylesheet" href="/css/my-monthly-confirm.css?v=2026040102"> <link rel="stylesheet" href="/css/my-monthly-confirm.css?v=2026040103">
</head> </head>
<body class="bg-gray-50"> <body class="bg-gray-50">
<header class="bg-orange-700 text-white sticky top-0 z-50"> <header class="bg-orange-700 text-white sticky top-0 z-50">
@@ -106,7 +106,7 @@
<script src="/static/js/tkfb-core.js?v=2026033108"></script> <script src="/static/js/tkfb-core.js?v=2026033108"></script>
<script src="/js/api-base.js?v=2026031701"></script> <script src="/js/api-base.js?v=2026031701"></script>
<script src="/js/my-monthly-confirm.js?v=2026040102"></script> <script src="/js/my-monthly-confirm.js?v=2026040103"></script>
<script>initAuth();</script> <script>initAuth();</script>
</body> </body>
</html> </html>