diff --git a/src/app/components/Clients/Pagination.vue b/src/app/components/Clients/Pagination.vue
index 7dae7f44..155bb891 100644
--- a/src/app/components/Clients/Pagination.vue
+++ b/src/app/components/Clients/Pagination.vue
@@ -1,33 +1,62 @@
-
-
-
-
- {{ clientsStore.page }} / {{ clientsStore.totalPages }}
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ page.value }}
+
+
+ …
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/components/Icons/ChevronDoubleLeft.vue b/src/app/components/Icons/ChevronDoubleLeft.vue
new file mode 100644
index 00000000..913b6589
--- /dev/null
+++ b/src/app/components/Icons/ChevronDoubleLeft.vue
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/src/app/components/Icons/ChevronDoubleRight.vue b/src/app/components/Icons/ChevronDoubleRight.vue
new file mode 100644
index 00000000..9e056b09
--- /dev/null
+++ b/src/app/components/Icons/ChevronDoubleRight.vue
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/src/app/components/Icons/ChevronLeft.vue b/src/app/components/Icons/ChevronLeft.vue
new file mode 100644
index 00000000..f9596a47
--- /dev/null
+++ b/src/app/components/Icons/ChevronLeft.vue
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/src/app/components/Icons/ChevronRight.vue b/src/app/components/Icons/ChevronRight.vue
new file mode 100644
index 00000000..c97e165b
--- /dev/null
+++ b/src/app/components/Icons/ChevronRight.vue
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/src/app/pages/index.vue b/src/app/pages/index.vue
index bfaf1326..b00819a2 100644
--- a/src/app/pages/index.vue
+++ b/src/app/pages/index.vue
@@ -15,11 +15,6 @@
v-if="clientsStore.clients && clientsStore.clients.length > 0"
/>
-
-
-
@@ -29,6 +24,11 @@
>
+
+
+
diff --git a/src/app/stores/clients.ts b/src/app/stores/clients.ts
index b70262c0..778b810a 100644
--- a/src/app/stores/clients.ts
+++ b/src/app/stores/clients.ts
@@ -33,7 +33,7 @@ export const useClientsStore = defineStore('Clients', () => {
const sortClient = ref(true)
const page = ref(1);
const limit = ref(10);
- const totalPages = ref(1);
+ const total = ref(0);
const searchParams = ref({
filter: undefined as string | undefined,
@@ -133,14 +133,13 @@ export const useClientsStore = defineStore('Clients', () => {
});
clients.value = transformedClients ?? null;
- if (_clients.value){
- let total = (_clients.value?.total ?? _clients.value?.clients?.length) ?? 0;
- totalPages.value = total <= limit.value ? 1 : Math.ceil(total / limit.value);
- }
+ total.value = (_clients.value?.total ?? _clients.value?.clients?.length) ?? 0;
}
function setSearchQuery(filter: string) {
clients.value = null;
+ total.value = 0;
+ setPageQuery(1);
searchParams.value.filter = filter || undefined;
}
@@ -156,5 +155,5 @@ export const useClientsStore = defineStore('Clients', () => {
searchParams.value.sortClient = value;
}
- return { clients, clientsPersist, sortClient, page, totalPages, refresh, _clients, setSearchQuery, setPageQuery, setSortClientQuery };
+ return { clients, clientsPersist, sortClient, page, total, limit, refresh, _clients, setSearchQuery, setPageQuery, setSortClientQuery };
});