refactor: TBM/작업보고 코드 통합 및 API 쿼리 버그 수정
- 공통 유틸리티 추출 (common/utils.js, common/base-state.js) - TBM 모바일 인라인 JS/CSS 외부 파일로 분리 (tbm-mobile.js, tbm-mobile.css) - 미사용 코드 삭제 (index.js, work-report-*.js 등 5개 파일) - TBM/작업보고 state.js, utils.js를 공통 모듈 기반으로 전환 - 작업보고서 SSO 인증 호환 수정 (token/user 함수) - tbmModel.js: incomplete-reports 쿼리에서 users→sso_users 조인 수정, leader_name 조인 추가 - docker-compose.yml: system1-web 볼륨 마운트 추가 - 모바일 인계(handover) 기능 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -70,17 +70,10 @@ const MobileReport = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
// ===== 유틸리티 =====
|
||||
function getKoreaToday() {
|
||||
const today = new Date();
|
||||
return `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, '0')}-${String(today.getDate()).padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
function formatDateForApi(date) {
|
||||
if (!date) return null;
|
||||
const d = date instanceof Date ? date : new Date(date);
|
||||
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
|
||||
}
|
||||
// ===== 유틸리티 (CommonUtils 위임) =====
|
||||
var CU = window.CommonUtils;
|
||||
function getKoreaToday() { return CU.getTodayKST(); }
|
||||
function formatDateForApi(date) { return CU.formatDate(date) || null; }
|
||||
|
||||
function formatDate(dateString) {
|
||||
if (!dateString) return '';
|
||||
@@ -88,10 +81,7 @@ const MobileReport = (function() {
|
||||
return `${d.getMonth() + 1}/${d.getDate()}`;
|
||||
}
|
||||
|
||||
function getDayOfWeek(dateString) {
|
||||
const days = ['일', '월', '화', '수', '목', '금', '토'];
|
||||
return days[new Date(dateString).getDay()];
|
||||
}
|
||||
function getDayOfWeek(dateString) { return CU.getDayOfWeek(dateString); }
|
||||
|
||||
function formatHours(val) {
|
||||
if (!val || val <= 0) return '선택';
|
||||
|
||||
Reference in New Issue
Block a user