feat: [hr] 휴가관리 잔여연차 탭에도 재직상태 필터 추가
This commit is contained in:
@@ -136,6 +136,14 @@ class="px-3 py-1.5 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:
|
||||
@endfor
|
||||
</select>
|
||||
|
||||
<label class="text-sm text-gray-600 font-medium">재직상태:</label>
|
||||
<select id="balanceEmpStatus" onchange="loadBalance()"
|
||||
class="px-3 py-1.5 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
||||
<option value="">전체</option>
|
||||
<option value="active" selected>재직자</option>
|
||||
<option value="resigned">퇴직자</option>
|
||||
</select>
|
||||
|
||||
{{-- 도움말 버튼 --}}
|
||||
<button type="button"
|
||||
hx-get="{{ route('hr.leaves.help') }}"
|
||||
@@ -497,10 +505,13 @@ function loadBalance(sort, direction) {
|
||||
if (sort) balanceSort = sort;
|
||||
if (direction) balanceDirection = direction;
|
||||
const year = document.getElementById('balanceYear').value;
|
||||
const empStatus = document.getElementById('balanceEmpStatus')?.value || '';
|
||||
const values = { year: year, sort: balanceSort, direction: balanceDirection };
|
||||
if (empStatus) values.emp_status = empStatus;
|
||||
htmx.ajax('GET', '{{ route("api.admin.hr.leaves.balance") }}', {
|
||||
target: '#balance-container',
|
||||
swap: 'innerHTML',
|
||||
values: { year: year, sort: balanceSort, direction: balanceDirection },
|
||||
values: values,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user