add: pagination of users

This commit is contained in:
Alexandro Uc Santos
2024-02-05 21:26:57 -06:00
parent 1933603692
commit 2df3bcfcfb
10 changed files with 139 additions and 39 deletions

View File

@@ -23,7 +23,7 @@
const loading = ref(false);
onMounted(() => {
drivers.value = companyStore.users?.filter((u) => u.job_role == 'driver');
drivers.value = companyStore.drivers;
if(props?.vehicle?.driver) {
const index = drivers.value.findIndex((d) => d._id === props.vehicle.driver?._id);
driverSelected.value = drivers.value[index];