feat(WEB): DatePicker 공통화 및 공정관리/작업자화면 대폭 개선

DatePicker 공통화:
- date-picker.tsx 공통 컴포넌트 신규 추가
- 전체 폼 컴포넌트 DatePicker 통일 적용 (50+ 파일)
- DateRangeSelector 개선

공정관리:
- RuleModal 대폭 리팩토링 (-592줄 → 간소화)
- ProcessForm, StepForm 개선
- ProcessDetail 수정, actions 확장

작업자화면:
- WorkerScreen 기능 대폭 확장 (+543줄)
- WorkItemCard 개선
- types 확장

회계/인사/영업/품질:
- BadDebtDetail, BillDetail, DepositDetail, SalesDetail 등 DatePicker 적용
- EmployeeForm, VacationDialog 등 DatePicker 적용
- OrderRegistration, QuoteRegistration DatePicker 적용
- InspectionCreate, InspectionDetail DatePicker 적용

공사관리/CEO대시보드:
- BiddingDetail, ContractDetail, HandoverReport 등 DatePicker 적용
- ScheduleDetailModal, TodayIssueSection 개선

기타:
- WorkOrderCreate/Edit/Detail/List 개선
- ShipmentCreate/Edit, ReceivingDetail 개선
- calendar, calendarEvents 수정
- datepicker 마이그레이션 체크리스트 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-02-06 15:48:00 +09:00
parent e453753bdd
commit c2ed71540f
68 changed files with 1436 additions and 1134 deletions

View File

@@ -85,7 +85,7 @@ export function StepForm({ mode, processId, initialData }: StepFormProps) {
initialData?.needsApproval ? '필요' : '불필요'
);
const [needsInspection, setNeedsInspection] = useState(
initialData?.needsInspection ? '필요' : '불필요'
initialData?.needsInspection ? '사용' : '미사용'
);
const [isActive, setIsActive] = useState(
initialData?.isActive !== false ? '사용' : '미사용'
@@ -115,8 +115,8 @@ export function StepForm({ mode, processId, initialData }: StepFormProps) {
const [isLoading, setIsLoading] = useState(false);
// 검사여부가 "필요"인지 확인
const isInspectionEnabled = needsInspection === '필요';
// 검사여부가 "사용"인지 확인
const isInspectionEnabled = needsInspection === '사용';
// 제출
const handleSubmit = async (): Promise<{ success: boolean; error?: string }> => {
@@ -130,7 +130,7 @@ export function StepForm({ mode, processId, initialData }: StepFormProps) {
stepName: stepName.trim(),
isRequired: isRequired === '필수',
needsApproval: needsApproval === '필요',
needsInspection: needsInspection === '필요',
needsInspection: needsInspection === '사용',
isActive: isActive === '사용',
order: initialData?.order || 0,
connectionType,
@@ -232,8 +232,8 @@ export function StepForm({ mode, processId, initialData }: StepFormProps) {
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="필요"></SelectItem>
<SelectItem value="불필요"></SelectItem>
<SelectItem value="사용"></SelectItem>
<SelectItem value="미사용"></SelectItem>
</SelectContent>
</Select>
</div>
@@ -293,28 +293,6 @@ export function StepForm({ mode, processId, initialData }: StepFormProps) {
</SelectContent>
</Select>
</div>
{/* 검사여부가 "필요"일 때 버튼 표시 */}
{isInspectionEnabled && (
<>
<Button
type="button"
variant="default"
className="bg-amber-500 hover:bg-amber-600 text-white"
onClick={() => setIsInspectionSettingOpen(true)}
>
<Settings className="h-4 w-4 mr-2" />
</Button>
<Button
type="button"
variant="outline"
onClick={() => setIsInspectionPreviewOpen(true)}
>
<Eye className="h-4 w-4 mr-2" />
</Button>
</>
)}
</div>
</CardContent>
</Card>
@@ -374,6 +352,29 @@ export function StepForm({ mode, processId, initialData }: StepFormProps) {
onCancel={handleCancel}
onSubmit={handleSubmit}
renderForm={renderFormContent}
headerActions={
isInspectionEnabled ? (
<>
<Button
type="button"
variant="default"
className="bg-amber-500 hover:bg-amber-600 text-white"
onClick={() => setIsInspectionSettingOpen(true)}
>
<Settings className="h-4 w-4 mr-2" />
</Button>
<Button
type="button"
variant="outline"
onClick={() => setIsInspectionPreviewOpen(true)}
>
<Eye className="h-4 w-4 mr-2" />
</Button>
</>
) : undefined
}
/>
{/* 검사 설정 모달 */}