근태(Holyday) API 추가 및 일별/업무형태별 집계 다이얼로그 구현, OT 시작/종료시간 필드 추가
This commit is contained in:
@@ -18,6 +18,8 @@ export interface JobreportFormData {
|
||||
description: string;
|
||||
hrs: number;
|
||||
ot: number;
|
||||
otStart: string; // 초과근무 시작시간 (HH:mm 형식)
|
||||
otEnd: string; // 초과근무 종료시간 (HH:mm 형식)
|
||||
jobgrp: string;
|
||||
tag: string;
|
||||
}
|
||||
@@ -39,6 +41,8 @@ export const initialFormData: JobreportFormData = {
|
||||
description: '',
|
||||
hrs: 8,
|
||||
ot: 0,
|
||||
otStart: '18:00',
|
||||
otEnd: '20:00',
|
||||
jobgrp: '',
|
||||
tag: '',
|
||||
};
|
||||
@@ -339,11 +343,10 @@ export function JobreportEditModal({
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShowJobTypeModal(true)}
|
||||
className={`w-full border rounded-lg px-4 py-2 text-left flex items-center justify-between focus:outline-none focus:ring-2 focus:ring-primary-400 transition-colors ${
|
||||
formData.type
|
||||
? 'bg-white/20 border-white/30 text-white'
|
||||
: 'bg-pink-500/30 border-pink-400/50 text-pink-200'
|
||||
}`}
|
||||
className={`w-full border rounded-lg px-4 py-2 text-left flex items-center justify-between focus:outline-none focus:ring-2 focus:ring-primary-400 transition-colors ${formData.type
|
||||
? 'bg-white/20 border-white/30 text-white'
|
||||
: 'bg-pink-500/30 border-pink-400/50 text-pink-200'
|
||||
}`}
|
||||
>
|
||||
<span>{getJobTypeDisplayText()}</span>
|
||||
<ChevronDown className="w-4 h-4 text-white/50" />
|
||||
@@ -411,6 +414,34 @@ export function JobreportEditModal({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 5행: 초과근무 시간대 (OT > 0일 때만 표시) */}
|
||||
{formData.ot > 0 && (
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="block text-white/70 text-sm font-medium mb-2">
|
||||
초과근무 시작시간
|
||||
</label>
|
||||
<input
|
||||
type="time"
|
||||
value={formData.otStart}
|
||||
onChange={(e) => handleFieldChange('otStart', e.target.value)}
|
||||
className="w-full bg-white/20 border border-white/30 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-primary-400"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-white/70 text-sm font-medium mb-2">
|
||||
초과근무 종료시간
|
||||
</label>
|
||||
<input
|
||||
type="time"
|
||||
value={formData.otEnd}
|
||||
onChange={(e) => handleFieldChange('otEnd', e.target.value)}
|
||||
className="w-full bg-white/20 border border-white/30 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-primary-400"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 업무내용 */}
|
||||
<div>
|
||||
<label className="block text-white/70 text-sm font-medium mb-2">
|
||||
|
||||
Reference in New Issue
Block a user