feat(performance): 자동 업데이트 일정 설정 — 매출·광고비 따로 간격·요일·시작/끝

- 실적 설정 "자동 업데이트" 카드(관리자): 매출 실적·광고비 각각 사용·요일([매일]·[평일])·
  시작/끝 시각(5분 단위)·간격(5~720분, 5분 단위, 기본 30분), PUT /api/auto-sync-schedule
- 마이그레이션 011 perf_settings(key auto_sync, JSONB). 미적용·값 없음 = 기본 일정(매일 9~19시 30분)
- auto_sync: 종류별 일정·Scheduler(1분마다 다시 읽어 바뀐 종류만 다시 계산, 종류마다 따로 스레드)
- 매출·광고비 탭 카운트다운이 각자 일정대로 다음 회차 계산(nextScheduleSlot)
- 테스트: 일정 계산·검증·Scheduler·저장 API·브라우저(설정 카드·카운트다운)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 18:01:00 +09:00
parent 5d30433019
commit 07861dfe8c
18 changed files with 936 additions and 96 deletions
+24
View File
@@ -376,6 +376,30 @@ td.is-link:hover { background: #eef2ff; text-decoration: underline; }
/* 보기 설정(매출 단위) */
.perf-opt-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.perf-opt-label { font-weight: 600; }
/* 자동 업데이트 일정(2026-10-26) — 매출 실적·광고비 한 줄씩: 이름·사용 | 요일·시간·간격 | 다음 회차 */
.perf-auto-rows { display: flex; flex-direction: column; }
.perf-auto-row { display: grid; grid-template-columns: 130px 1fr; gap: 6px 16px; padding: 12px 0; border-top: 1px solid var(--perf-line); }
.perf-auto-row:first-child { border-top: 0; padding-top: 4px; }
.perf-auto-name { display: flex; flex-direction: column; gap: 6px; }
.perf-auto-on { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.perf-auto-fields { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.perf-auto-field { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.perf-auto-row.is-off .perf-auto-fields { opacity: .45; }
.perf-auto-days { display: inline-flex; gap: 3px; }
.perf-day { position: relative; cursor: pointer; }
.perf-day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.perf-day span { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
border: 1px solid var(--perf-line); background: #fff; font-weight: 600; user-select: none; }
.perf-day.is-sat span { color: var(--perf-sat); }
.perf-day.is-sun span { color: var(--perf-sun); }
.perf-day input:checked + span { background: #111; border-color: #111; color: #fff; }
.perf-day input:focus-visible + span { outline: 2px solid var(--perf-good); outline-offset: 1px; }
.perf-auto-time { width: auto; padding-right: 22px; }
.perf-auto-interval { width: 76px; }
.perf-auto-next { grid-column: 2; }
.perf-auto-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
#perf-auto-msg.is-ok { color: var(--perf-up); }
@media (max-width: 720px) { .perf-auto-row { grid-template-columns: 1fr; } .perf-auto-name { flex-direction: row; gap: 12px; } .perf-auto-next { grid-column: 1; } }
.perf-head-notes { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; margin-left: 12px; font-size: 12px; }
/* 주문 내역 추가 칸(카페24 적립금 · 네이버 배송비·환불금액, 2026-10-19) */
.perf-ev-table .perf-ev-x { white-space: nowrap; color: #6b4e00; }