Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 297b161

Browse files
vincit-matujoonatank
authored andcommitted
add the toggle to each search so only relevant units are shown in filter
1 parent fff8fc4 commit 297b161

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

apps/ui/modules/queries/params.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ export const SEARCH_FORM_PARAMS_UNIT = gql`
44
query SearchFormParamsUnit(
55
$publishedReservationUnits: Boolean
66
$ownReservations: Boolean
7+
$onlyDirectBookable: Boolean
8+
$onlySeasonalBookable: Boolean
79
$orderBy: [UnitOrderingChoices]
810
) {
911
units(
1012
publishedReservationUnits: $publishedReservationUnits
1113
ownReservations: $ownReservations
14+
onlyDirectBookable: $onlyDirectBookable
15+
onlySeasonalBookable: $onlySeasonalBookable
1216
orderBy: $orderBy
1317
) {
1418
edges {

apps/ui/pages/search/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export async function getServerSideProps(ctx: GetServerSidePropsContext) {
9494
query: SEARCH_FORM_PARAMS_UNIT,
9595
variables: {
9696
publishedReservationUnits: true,
97+
onlySeasonalBookable: true,
9798
},
9899
});
99100

apps/ui/pages/search/single.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export async function getServerSideProps(ctx: GetServerSidePropsContext) {
114114
query: SEARCH_FORM_PARAMS_UNIT,
115115
variables: {
116116
publishedReservationUnits: true,
117+
onlyDirectBookable: true,
117118
},
118119
});
119120

0 commit comments

Comments
 (0)