From fea515561ef22c6236d468797dcf98b5ce8d9b6a Mon Sep 17 00:00:00 2001 From: W Beecher Baker Date: Mon, 7 Oct 2024 15:09:44 -0400 Subject: [PATCH] improve pagination navigation in inventory panel --- .../Panel/PanelSpecimens/PanelSpecimens.vue | 54 +++++++++++++------ 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/src/modules/otus/components/Panel/PanelSpecimens/PanelSpecimens.vue b/src/modules/otus/components/Panel/PanelSpecimens/PanelSpecimens.vue index 2eaf3c1..21d909c 100644 --- a/src/modules/otus/components/Panel/PanelSpecimens/PanelSpecimens.vue +++ b/src/modules/otus/components/Panel/PanelSpecimens/PanelSpecimens.vue @@ -15,21 +15,45 @@ ({{total}}) - ( - {{ (page - 1) * perPage + 1}}–{{(page - 1) * perPage + inventoryDWC.length}} of {{total}} - ) + {{ void(showFirst = page > 1) }} + {{ void(showPrev = page > 1) }} + {{ void(showNext = inventoryDWC.length === perPage) }} + {{ void(showLast = showNext && typeof total === 'number' && total > (page - 1) * perPage + inventoryDWC.length) }} + ({{ (page - 1) * perPage + 1}}–{{(page - 1) * perPage + inventoryDWC.length}} of {{total}}) + + + + + prev + + + + +