100 per page

This commit is contained in:
Bryce Covert
2018-12-15 10:17:47 -08:00
parent b108f81a75
commit ea8a0bc2e0
4 changed files with 4 additions and 5 deletions

View File

@@ -92,7 +92,7 @@
(not (nil? amount)) (helpers/merge-where [:= :amount amount])
(seq statuses ) (helpers/merge-where [:in :status statuses])))
(defn get-graphql [{:keys [start sort-by asc id limit] :as args :or {limit 20}}]
(defn get-graphql [{:keys [start sort-by asc id limit] :as args :or {limit 100}}]
(query
(cond-> (base-graphql args)
true (add-sort-by sort-by asc)

View File

@@ -42,7 +42,6 @@
[:= :exist.vendor-id nil]
[:= :v.vendor-id nil]]]]]
:where [:= :exist.id nil] }]})
statement (j/prepare-statement
(j/get-connection (get-conn))
query
@@ -150,7 +149,7 @@
(not (nil? status)) (helpers/merge-where [:= :status status])
(not (nil? company-id)) (helpers/merge-where [:= :company-id company-id])))
(defn get-graphql [{:keys [start sort-by asc limit] :as args :or {limit 20}}]
(defn get-graphql [{:keys [start sort-by asc limit] :as args :or {limit 100}}]
(query
(cond-> (base-graphql args)

View File

@@ -25,7 +25,7 @@
(limited-companies id) (helpers/merge-where [:in :company-id (limited-companies id)])
(not (nil? company-id)) (helpers/merge-where [:= :company-id company-id])))
(defn get-graphql [{:keys [start sort-by asc limit] :as args :or {limit 20}}]
(defn get-graphql [{:keys [start sort-by asc limit] :as args :or {limit 100}}]
(query
(cond-> (base-graphql args)
#_#_(not (nil? sort-by) ) (add-sort-by sort-by asc)

View File

@@ -19,7 +19,7 @@
y))
(defn paginator [{:keys [start end count total on-change]}]
(let [per-page 20
(let [per-page 100
max-buttons 5
buttons-before (Math/floor (/ max-buttons 2))
total-pages (Math/ceil (/ total per-page))