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:
@@ -2,8 +2,8 @@
|
||||
|
||||
import { ReactNode, useCallback } from 'react';
|
||||
import { format, startOfYear, endOfYear, subMonths, startOfMonth, endOfMonth, subDays } from 'date-fns';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { DatePicker } from '@/components/ui/date-picker';
|
||||
import { ScrollableButtonGroup } from '@/components/atoms/ScrollableButtonGroup';
|
||||
|
||||
/**
|
||||
@@ -152,18 +152,20 @@ export function DateRangeSelector({
|
||||
{/* 날짜 범위 선택 */}
|
||||
{!hideDateInputs && (
|
||||
<div className="flex items-center gap-1 shrink-0">
|
||||
<Input
|
||||
type="date"
|
||||
<DatePicker
|
||||
value={startDate}
|
||||
onChange={(e) => onStartDateChange(e.target.value)}
|
||||
className="w-[165px]"
|
||||
onChange={onStartDateChange}
|
||||
className="w-[170px]"
|
||||
size="sm"
|
||||
displayFormat="yyyy년 MM월 dd일"
|
||||
/>
|
||||
<span className="text-muted-foreground shrink-0">~</span>
|
||||
<Input
|
||||
type="date"
|
||||
<DatePicker
|
||||
value={endDate}
|
||||
onChange={(e) => onEndDateChange(e.target.value)}
|
||||
className="w-[165px]"
|
||||
onChange={onEndDateChange}
|
||||
className="w-[170px]"
|
||||
size="sm"
|
||||
displayFormat="yyyy년 MM월 dd일"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
@@ -186,18 +188,20 @@ export function DateRangeSelector({
|
||||
{/* 날짜 범위 선택 */}
|
||||
{!hideDateInputs && (
|
||||
<div className="flex items-center gap-1 shrink-0">
|
||||
<Input
|
||||
type="date"
|
||||
<DatePicker
|
||||
value={startDate}
|
||||
onChange={(e) => onStartDateChange(e.target.value)}
|
||||
className="w-[165px]"
|
||||
onChange={onStartDateChange}
|
||||
className="w-[170px]"
|
||||
size="sm"
|
||||
displayFormat="yyyy년 MM월 dd일"
|
||||
/>
|
||||
<span className="text-muted-foreground shrink-0">~</span>
|
||||
<Input
|
||||
type="date"
|
||||
<DatePicker
|
||||
value={endDate}
|
||||
onChange={(e) => onEndDateChange(e.target.value)}
|
||||
className="w-[165px]"
|
||||
onChange={onEndDateChange}
|
||||
className="w-[170px]"
|
||||
size="sm"
|
||||
displayFormat="yyyy년 MM월 dd일"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -14,6 +14,7 @@ import { PersonalNumberInput } from "../ui/personal-number-input";
|
||||
import { NumberInput } from "../ui/number-input";
|
||||
import { CurrencyInput } from "../ui/currency-input";
|
||||
import { QuantityInput } from "../ui/quantity-input";
|
||||
import { DatePicker } from "../ui/date-picker";
|
||||
|
||||
export type FormFieldType =
|
||||
| 'text'
|
||||
@@ -166,11 +167,9 @@ export function FormField({
|
||||
|
||||
case 'date':
|
||||
return (
|
||||
<Input
|
||||
id={htmlFor}
|
||||
type="date"
|
||||
value={value as string}
|
||||
onChange={(e) => onChange?.(e.target.value)}
|
||||
<DatePicker
|
||||
value={(value as string) || ''}
|
||||
onChange={(date) => onChange?.(date)}
|
||||
disabled={disabled}
|
||||
className={`${error ? 'border-red-500' : ''} ${inputClassName}`}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user