Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/views/hr/HrEmployees.vue
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@ interface EditedEntitlement {
balance: BalanceRow
}

/** Rows shown at first and added by "Load more" */
/** Rows shown at first: the whole company on most installs */
const FIRST_PAGE = 200
/** Rows "Load more" adds */
const PAGE = 50

const matches: Record<FilterId, (row: EmployeeRow) => boolean> = {
Expand All @@ -315,7 +317,7 @@ const employeesGroupName = ref('')
const contacts = ref(false)
const search = ref('')
const filter = ref<FilterId>('all')
const limit = ref(PAGE)
const limit = ref(FIRST_PAGE)
const year = ref(currentYear)
const years = [currentYear - 1, currentYear, currentYear + 1]
const sessionStore = useSessionStore()
Expand Down Expand Up @@ -355,11 +357,11 @@ watch(year, () => {
})

watch(search, () => {
limit.value = PAGE
limit.value = FIRST_PAGE
})

watch(filter, () => {
limit.value = PAGE
limit.value = FIRST_PAGE
})

onMounted(() => {
Expand Down
Loading