Skip to content

Commit

Permalink
add the toggle to each search so only relevant units are shown in filter
Browse files Browse the repository at this point in the history
  • Loading branch information
vincit-matu authored and joonatank committed May 17, 2024
1 parent fff8fc4 commit 297b161
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/ui/modules/queries/params.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ export const SEARCH_FORM_PARAMS_UNIT = gql`
query SearchFormParamsUnit(
$publishedReservationUnits: Boolean
$ownReservations: Boolean
$onlyDirectBookable: Boolean
$onlySeasonalBookable: Boolean
$orderBy: [UnitOrderingChoices]
) {
units(
publishedReservationUnits: $publishedReservationUnits
ownReservations: $ownReservations
onlyDirectBookable: $onlyDirectBookable
onlySeasonalBookable: $onlySeasonalBookable
orderBy: $orderBy
) {
edges {
Expand Down
1 change: 1 addition & 0 deletions apps/ui/pages/search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export async function getServerSideProps(ctx: GetServerSidePropsContext) {
query: SEARCH_FORM_PARAMS_UNIT,
variables: {
publishedReservationUnits: true,
onlySeasonalBookable: true,
},
});

Expand Down
1 change: 1 addition & 0 deletions apps/ui/pages/search/single.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export async function getServerSideProps(ctx: GetServerSidePropsContext) {
query: SEARCH_FORM_PARAMS_UNIT,
variables: {
publishedReservationUnits: true,
onlyDirectBookable: true,
},
});

Expand Down

0 comments on commit 297b161

Please sign in to comment.