Skip to content

Commit

Permalink
chore: orders and refunds more table items (#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarnaikjuspay authored Jul 11, 2024
1 parent 8aa1653 commit 088f0d1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/Paginator.res
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let make = (
}, (shouldRefetch, handleRefetch))

let selectInputOption = {
[5, 10, 15, 25, 50, 100]
[5, 10, 15, 25, 50]
->Array.filter(val => val <= totalResults)
->Array.map(Int.toString)
->SelectBox.makeOptions
Expand Down
4 changes: 2 additions & 2 deletions src/screens/APIUtils/APIUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ let useGetURL = () => {
| None => `payments/list?limit=100`
}
}
| Post => `payments/list?limit=20`
| Post => `payments/list`
| _ => ""
}
| REFUNDS =>
Expand All @@ -101,7 +101,7 @@ let useGetURL = () => {
}
| Post =>
switch id {
| Some(_keyid) => `refunds/list?limit=20`
| Some(_keyid) => `refunds/list`
| None => `refunds`
}
| _ => ""
Expand Down
3 changes: 1 addition & 2 deletions src/screens/Order/Orders.res
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let make = (~previewOnly=false) => {
let filters = Dict.make()

filters->Dict.set("offset", offset->Int.toFloat->JSON.Encode.float)
filters->Dict.set("limit", 20->Int.toFloat->JSON.Encode.float)
filters->Dict.set("limit", 50->Int.toFloat->JSON.Encode.float)
if !(searchText->isEmptyString) {
filters->Dict.set("payment_id", searchText->String.trim->JSON.Encode.string)
}
Expand Down Expand Up @@ -138,7 +138,6 @@ let make = (~previewOnly=false) => {
sortingBasedOnDisabled=false
hideTitle=true
previewOnly
showResultsPerPageSelector=false
/>
</PageLoaderWrapper>
</div>
Expand Down
3 changes: 1 addition & 2 deletions src/screens/Refunds/Refund.res
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let make = () => {
let filters = Dict.make()

filters->Dict.set("offset", offset->Int.toFloat->JSON.Encode.float)
filters->Dict.set("limit", 20->Int.toFloat->JSON.Encode.float)
filters->Dict.set("limit", 50->Int.toFloat->JSON.Encode.float)
if !(searchText->isEmptyString) {
filters->Dict.set("payment_id", searchText->String.trim->JSON.Encode.string)
filters->Dict.set("refund_id", searchText->String.trim->JSON.Encode.string)
Expand Down Expand Up @@ -102,7 +102,6 @@ let make = () => {
customColumnMapper=TableAtoms.refundsMapDefaultCols
showSerialNumberInCustomizeColumns=false
sortingBasedOnDisabled=false
showResultsPerPageSelector=false
/>
</PageLoaderWrapper>
</div>
Expand Down

0 comments on commit 088f0d1

Please sign in to comment.