2026-08-04 PinPoint 작업일지입니다. 오늘은 2건의 작업을 진행했습니다.
`estimate_calc2`
현상/기능
- PDF 최종버전 발송 시 현장소장·고객과 전화번호를 보여주고 전체 발송
작업
- 파일
- 「최종버전 발송」→ 수신자 확인 AlertDialog → 「전체 발송」
- customerPhone 상세 유지
- 확인 팝업에 현장소장(이름·전화), 고객(상호/성명·전화) 표시
- 연락처가 모두 있을 때만 「전체 발송」 가능 → 기존 `/api/estimate-calc2/send` 호출
`consultation-management`, `customer-management` (공사관리 등 customers 조인 화면 포함)
현상/기능
- 상담관리에서 고객정보를 바꾸면 고객등록/관리에 반영되고, 고객관리에서 수정해도 다른 페이지에 반영
작업
- 파일
- `update_customer_reception` — 상담 저장 → customers + 동일 customer_id 다른 상담 동기화
- `update_customer` — 고객 저장 → 연결 상담들의 고객정보 동기화
- `create_customer_reception` — 기존 고객 전화번호 매칭 시에도 마스터 갱신
- `prisma/procedures/customer_receptions.sql`, `prisma/procedures/customers.sql`
- `prisma/migrations/20260804100000_sync_customer_reception_customer_info.sql`
- `prisma/migrations/20260804220000_repair_customer_reception_info_mismatch.sql` — 기존 불일치 일괄 보정
- 동기화 필드: name/phone/address/company_name (상담 메모·고객 메모·이메일은 각자 유지)
- 원인: 동기화 적용 전에 상담만 수정된 건(예: EST-20260804-0018 / customer_id=6)이 어긋남 → 최신 updated_at 기준으로 보정
- 이후 상담/고객 저장 시 양쪽이 같게 유지