Files
sam-manage/resources/views/approvals/partials/_leave-form.blade.php
김보곤 47fcaaa3a3 feat: [approvals] 근태신청 시작일에 시간 선택 기능 추가
- 근태신청(attendance_request) 선택 시 시작일 input을 datetime-local로 전환
- 라벨도 '시작일' → '시작일시'로 변경
- 휴가/사유서는 기존 date 유지
2026-03-06 17:44:41 +09:00

58 lines
2.7 KiB
PHP

{{--
휴가/근태신청/사유서 전용
Props:
$employees (Collection) - 활성 사원 목록
--}}
@php
$employees = $employees ?? collect();
$currentUserId = auth()->id();
@endphp
<div id="leave-form-container" style="display: none;" class="mb-4">
<div class="space-y-4">
{{-- 신청자 --}}
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">신청자 <span class="text-red-500">*</span></label>
<select id="leave-user-id"
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"
style="max-width: 300px;">
@foreach($employees as $emp)
<option value="{{ $emp->user_id }}" {{ $emp->user_id == $currentUserId ? 'selected' : '' }}>
{{ $emp->display_name }}
</option>
@endforeach
</select>
</div>
{{-- 유형 --}}
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">유형 <span class="text-red-500">*</span></label>
<select id="leave-type"
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"
style="max-width: 300px;">
</select>
</div>
{{-- 시작일 / 종료일 --}}
<div class="flex gap-4 flex-wrap">
<div style="flex: 1 1 200px; max-width: 300px;">
<label class="block text-sm font-medium text-gray-700 mb-1"><span id="leave-start-label">시작일</span> <span class="text-red-500">*</span></label>
<input type="date" id="leave-start-date"
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div style="flex: 1 1 200px; max-width: 300px;">
<label class="block text-sm font-medium text-gray-700 mb-1">종료일 <span class="text-red-500">*</span></label>
<input type="date" id="leave-end-date"
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
</div>
{{-- 사유 --}}
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">사유</label>
<textarea id="leave-reason" rows="3" placeholder="사유를 입력하세요..."
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
</div>
</div>
</div>