Files
tk-factory-services/system1-factory/web/pages/work/daily-status.html
Hyungi Ahn 0de9d5bb48 feat(sso): 인앱 브라우저 SSO 토큰 릴레이 — 카톡 WebView 쿠키 미공유 해결
카카오톡 인앱 WebView는 서브도메인 간 쿠키를 공유하지 않아
tkds에서 로그인 후 tkfb로 리다이렉트 시 인증이 풀리는 문제.

- sso-relay.js: URL hash의 _sso= 토큰을 로컬 쿠키+localStorage로 설정
- gateway dashboard: 로그인 후 redirect URL에 #_sso=<token> 추가
- 전 서비스 HTML: core JS 직전에 sso-relay.js 로드 (81개 파일)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 15:44:02 +09:00

172 lines
8.3 KiB
HTML

<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>입력 현황 - TK 공장관리</title>
<script src="https://cdn.tailwindcss.com"></script>
<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=2026040103">
<link rel="stylesheet" href="/css/daily-status.css?v=2026033001">
</head>
<body class="bg-gray-50">
<header class="bg-orange-700 text-white sticky top-0 z-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center h-14">
<div class="flex items-center gap-3">
<button id="mobileMenuBtn" class="lg:hidden text-orange-200 hover:text-white"><i class="fas fa-bars text-xl"></i></button>
<i class="fas fa-industry text-xl text-orange-200"></i>
<h1 class="text-lg font-semibold">TK 공장관리</h1>
</div>
<div class="flex items-center gap-4">
<span id="headerUserName" class="text-sm hidden sm:block">-</span>
<div id="headerUserAvatar" class="w-8 h-8 bg-orange-600 rounded-full flex items-center justify-center text-sm font-bold">-</div>
<button onclick="doLogout()" class="text-orange-200 hover:text-white" title="로그아웃"><i class="fas fa-sign-out-alt"></i></button>
</div>
</div>
</div>
</header>
<div id="mobileOverlay" class="hidden fixed inset-0 bg-black/50 z-30 lg:hidden"></div>
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 fade-in">
<div class="flex gap-6">
<nav id="sideNav" class="hidden lg:flex flex-col gap-1 w-52 flex-shrink-0 pt-2 fixed lg:static z-40 bg-white lg:bg-transparent p-4 lg:p-0 rounded-lg lg:rounded-none shadow-lg lg:shadow-none top-14 left-0 bottom-0 overflow-y-auto"></nav>
<div class="flex-1 min-w-0">
<!-- Header -->
<div class="ds-header">
<h1><i class="fas fa-chart-bar mr-2"></i>일별 입력 현황</h1>
</div>
<!-- Date Navigation -->
<div class="ds-date-nav">
<button type="button" class="ds-date-btn" id="prevDate" onclick="changeDate(-1)">
<i class="fas fa-chevron-left"></i>
</button>
<div class="ds-date-display" id="dateDisplay" onclick="openDatePicker()">
<span id="dateText">2026-03-30</span>
<span id="dayText" class="ds-day-label">월요일</span>
</div>
<button type="button" class="ds-date-btn" id="nextDate" onclick="changeDate(1)">
<i class="fas fa-chevron-right"></i>
</button>
<input type="date" id="datePicker" class="hidden" onchange="onDatePicked(this.value)">
</div>
<!-- Summary Cards -->
<div class="ds-summary">
<div class="ds-card ds-card-total" onclick="setFilter('all')">
<div class="ds-card-num" id="totalCount">-</div>
<div class="ds-card-label">전체 작업자</div>
</div>
<div class="ds-card ds-card-done" onclick="setFilter('complete')">
<div class="ds-card-num" id="doneCount">-</div>
<div class="ds-card-label">완료</div>
<div class="ds-card-pct" id="donePct">-</div>
</div>
<div class="ds-card ds-card-missing" onclick="setFilter('both_missing')">
<div class="ds-card-num" id="missingCount">-</div>
<div class="ds-card-label">미입력</div>
<div class="ds-card-pct" id="missingPct">-</div>
</div>
</div>
<!-- Filter Tabs -->
<div class="ds-tabs">
<button type="button" class="ds-tab active" data-filter="all" onclick="setFilter('all')">전체 <span class="ds-tab-badge" id="filterAll">0</span></button>
<button type="button" class="ds-tab" data-filter="complete" onclick="setFilter('complete')">완료 <span class="ds-tab-badge" id="filterComplete">0</span></button>
<button type="button" class="ds-tab" data-filter="both_missing" onclick="setFilter('both_missing')">미입력 <span class="ds-tab-badge" id="filterMissing">0</span></button>
<button type="button" class="ds-tab" data-filter="partial" onclick="setFilter('partial')">부분 <span class="ds-tab-badge" id="filterPartial">0</span></button>
</div>
<!-- Worker List -->
<div class="ds-list" id="workerList">
<div class="ds-skeleton"></div>
<div class="ds-skeleton"></div>
<div class="ds-skeleton"></div>
</div>
<!-- Empty State -->
<div class="ds-empty hidden" id="emptyState">
<i class="fas fa-clipboard-check text-3xl text-gray-300"></i>
<p>해당 조건의 작업자가 없습니다</p>
</div>
<!-- No Permission -->
<div class="ds-no-perm hidden" id="noPermission">
<i class="fas fa-lock text-3xl text-gray-300"></i>
<p>접근 권한이 없습니다</p>
<a href="/pages/dashboard.html" class="ds-link">대시보드로 이동</a>
</div>
<!-- Bottom Action -->
<div class="ds-bottom-action" id="bottomAction">
<button type="button" class="ds-proxy-btn" id="proxyBtn" onclick="goProxyInput()" disabled>
<i class="fas fa-user-edit mr-2"></i>미입력자 대리입력 (<span id="proxyCount">0</span>명)
</button>
</div>
<!-- Bottom Nav -->
<nav class="m-bottom-nav">
<a href="/pages/dashboard.html" class="m-nav-item">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
<polyline points="9 22 9 12 15 12 15 22"/>
</svg>
<span class="m-nav-label"></span>
</a>
<a href="/pages/work/tbm-mobile.html" class="m-nav-item">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 11l3 3L22 4"/>
<path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/>
</svg>
<span class="m-nav-label">TBM</span>
</a>
<a href="/pages/work/daily-status.html" class="m-nav-item active">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="3" width="18" height="18" rx="2"/>
<path d="M3 9h18"/>
<path d="M9 21V9"/>
</svg>
<span class="m-nav-label">현황</span>
</a>
<a href="/pages/work/report-create.html" class="m-nav-item">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
<polyline points="14 2 14 8 20 8"/>
</svg>
<span class="m-nav-label">작업보고</span>
</a>
</nav>
<!-- Worker Detail Bottom Sheet -->
<div class="ds-sheet-overlay hidden" id="sheetOverlay" onclick="closeSheet()"></div>
<div class="ds-sheet hidden" id="detailSheet">
<div class="ds-sheet-handle" onclick="closeSheet()"></div>
<div class="ds-sheet-header">
<span id="sheetWorkerName">-</span>
<span id="sheetWorkerInfo" class="ds-sheet-sub">-</span>
</div>
<div class="ds-sheet-body" id="sheetBody">
<div class="ds-sheet-loading"><i class="fas fa-spinner fa-spin"></i> 로딩 중...</div>
</div>
<div class="ds-sheet-actions">
<button type="button" class="ds-sheet-btn" id="sheetProxyBtn" onclick="goProxyInputSingle()">
<i class="fas fa-user-edit mr-1"></i>이 작업자 대리입력
</button>
</div>
</div>
<!-- Toast -->
<div id="toastContainer" class="toast-container"></div>
</div>
</div>
</div>
<script src="/js/sso-relay.js?v=20260401"></script>
<script src="/static/js/tkfb-core.js?v=2026040105"></script>
<script src="/js/api-base.js?v=2026031701"></script>
<script src="/js/daily-status.js?v=2026033001"></script>
</body>
</html>