feat: [hr] 사원 등록/수정 폼에 고용형태 선택 추가
- Employee 모델에 EMPLOYMENT_TYPES 상수 정의 (정규직/계약직/일용직/프리랜서) - create/edit 뷰에 고용형태 select 드롭다운 추가
This commit is contained in:
@@ -13,6 +13,13 @@ class Employee extends Model
|
||||
{
|
||||
use ModelTrait;
|
||||
|
||||
const EMPLOYMENT_TYPES = [
|
||||
'regular' => '정규직',
|
||||
'contract' => '계약직',
|
||||
'daily' => '일용직',
|
||||
'freelancer' => '프리랜서',
|
||||
];
|
||||
|
||||
protected $table = 'tenant_user_profiles';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -214,6 +214,16 @@ class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:rin
|
||||
<option value="resigned">퇴직</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="flex: 1 1 150px;">
|
||||
<label for="employment_type_key" class="block text-sm font-medium text-gray-700 mb-1">고용형태</label>
|
||||
<select name="employment_type_key" id="employment_type_key"
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
||||
<option value="">선택</option>
|
||||
@foreach(\App\Models\HR\Employee::EMPLOYMENT_TYPES as $key => $label)
|
||||
<option value="{{ $key }}">{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 주소 --}}
|
||||
|
||||
@@ -165,6 +165,16 @@ class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:rin
|
||||
<option value="resigned" {{ $employee->employee_status === 'resigned' ? 'selected' : '' }}>퇴직</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="flex: 1 1 150px;">
|
||||
<label for="employment_type_key" class="block text-sm font-medium text-gray-700 mb-1">고용형태</label>
|
||||
<select name="employment_type_key" id="employment_type_key"
|
||||
class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
||||
<option value="">선택</option>
|
||||
@foreach(\App\Models\HR\Employee::EMPLOYMENT_TYPES as $key => $label)
|
||||
<option value="{{ $key }}" {{ $employee->employment_type_key === $key ? 'selected' : '' }}>{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 주소 --}}
|
||||
|
||||
Reference in New Issue
Block a user