feat: 일일순회점검 시스템 구축 및 관리 기능 개선

- 일일순회점검 시스템 신규 구현
  - DB 테이블: patrol_checklist_items, daily_patrol_sessions, patrol_check_records, workplace_items, item_types
  - API: /api/patrol/* 엔드포인트
  - 프론트엔드: 지도 기반 작업장 점검 UI

- 설비 관리 기능 개선
  - 구매 관련 필드 추가 (구매일, 가격, 공급업체 등)
  - 설비 코드 자동 생성 (TKP-XXX 형식)

- 작업장 관리 개선
  - 레이아웃 이미지 업로드 기능
  - 마커 위치 저장 기능

- 부서 관리 기능 추가
- 사이드바 네비게이션 카테고리 재구성
- 이미지 401 오류 수정 (정적 파일 경로 처리)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-02-04 11:41:41 +09:00
parent 2e9d24faf2
commit 90d3e32992
101 changed files with 17421 additions and 7047 deletions

View File

@@ -0,0 +1,35 @@
/**
* 설비 테이블에 구입처 및 구입가격 컬럼 추가
*
* @author TK-FB-Project
* @since 2026-02-04
*/
exports.up = async function(knex) {
// 컬럼 존재 여부 확인
const hasSupplier = await knex.schema.hasColumn('equipments', 'supplier');
const hasPurchasePrice = await knex.schema.hasColumn('equipments', 'purchase_price');
if (!hasSupplier || !hasPurchasePrice) {
await knex.schema.alterTable('equipments', (table) => {
if (!hasSupplier) {
table.string('supplier', 100).nullable().after('manufacturer').comment('구입처');
}
if (!hasPurchasePrice) {
table.decimal('purchase_price', 15, 0).nullable().after('supplier').comment('구입가격');
}
});
console.log('✅ equipments 테이블에 supplier, purchase_price 컬럼 추가 완료');
} else {
console.log(' supplier, purchase_price 컬럼이 이미 존재합니다. 스킵합니다.');
}
};
exports.down = async function(knex) {
await knex.schema.alterTable('equipments', (table) => {
table.dropColumn('supplier');
table.dropColumn('purchase_price');
});
console.log('✅ equipments 테이블에서 supplier, purchase_price 컬럼 삭제 완료');
};