- 실시간 작업장 현황을 지도로 시각화 - 작업장 관리 페이지에서 정의한 구역 정보 활용 - TBM 작업자 및 방문자 현황 표시 주요 변경사항: - dashboard.html: 작업장 현황 섹션 추가 (기존 작업 현황 테이블 제거) - workplace-status.js: 지도 렌더링 및 데이터 통합 로직 구현 - modern-dashboard.js: 삭제된 DOM 요소 조건부 체크 추가 시각화 방식: - 인원 없음: 회색 테두리 + 작업장 이름 - 내부 작업자: 파란색 영역 + 인원 수 - 외부 방문자: 보라색 영역 + 인원 수 - 둘 다: 초록색 영역 + 총 인원 수 기술 구현: - Canvas API 기반 사각형 영역 렌더링 - map-regions API를 통한 데이터 일관성 보장 - 클릭 이벤트로 상세 정보 모달 표시 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
/**
|
|
* 출퇴근 출근 여부 필드 추가
|
|
* 아침 출근 확인용 간단한 필드
|
|
*/
|
|
|
|
exports.up = async function(knex) {
|
|
// 컬럼 존재 여부 확인
|
|
const hasColumn = await knex.schema.hasColumn('daily_attendance_records', 'is_present');
|
|
|
|
if (!hasColumn) {
|
|
await knex.schema.table('daily_attendance_records', (table) => {
|
|
// 출근 여부 (아침에 체크)
|
|
table.boolean('is_present').defaultTo(true).comment('출근 여부');
|
|
});
|
|
|
|
// 기존 데이터는 모두 출근으로 처리
|
|
await knex('daily_attendance_records')
|
|
.whereNotNull('id')
|
|
.update({ is_present: true });
|
|
|
|
console.log('✅ is_present 컬럼 추가 완료');
|
|
} else {
|
|
console.log('⏭️ is_present 컬럼이 이미 존재합니다');
|
|
}
|
|
};
|
|
|
|
exports.down = async function(knex) {
|
|
const hasColumn = await knex.schema.hasColumn('daily_attendance_records', 'is_present');
|
|
|
|
if (hasColumn) {
|
|
await knex.schema.table('daily_attendance_records', (table) => {
|
|
table.dropColumn('is_present');
|
|
});
|
|
}
|
|
};
|