diff --git a/src/views/user/ListUserView.vue b/src/views/user/ListUserView.vue index 27d3953..35266c4 100644 --- a/src/views/user/ListUserView.vue +++ b/src/views/user/ListUserView.vue @@ -1,6 +1,5 @@ -
+
+ +
@@ -51,6 +55,25 @@ const headers = ref({ Authorization: `Bearer ${auth.token}`, }); const uploadUrl = ref(`${BASE_URL}/v1/users/upload`); +const pageSize = ref(10) +const currentPage = ref(1); + +const total = computed(() => filterUsers.value.length); + +const paginatedData = computed(() => { + const start = (currentPage.value - 1) * pageSize.value; + const end = start + pageSize.value; + return filterUsers.value.slice(start, end); +}); + +const handlePageChange = (page: number) => { + currentPage.value = page; +}; + +const teamFormatter = (row: any) => { + if (row.team == null) return "-"; + return row.team; +}; const handleError = ( error: Error,