Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
feat: Added separate component for results list rendering.
Browse files Browse the repository at this point in the history
  • Loading branch information
duozersk committed Feb 16, 2022
1 parent 523ea49 commit f4a659c
Show file tree
Hide file tree
Showing 4 changed files with 385 additions and 339 deletions.
26 changes: 19 additions & 7 deletions openy_af4_vue_app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,12 @@
v-else-if="step === 'results'"
:data="data"
:ages="ages"
:selected-ages="selectedAges"
:is-loading-data="isLoadingData"
:cart-items="cartItems"
:legacy-mode="legacyMode"
:disable-spots-available="disableSpotsAvailable"
:request-more-info="daxko"
:bs-version="bsVersion"
@startOver="startOver()"
@addItem="addItem($event)"
@removeItem="removeItem($event)"
@removeItems="removeItems"
>
Expand Down Expand Up @@ -195,9 +192,18 @@
<template v-slot:sort>
<SortSelect v-model="selectedSort" :sort-options="sortOptions" />
</template>
<template v-slot:pager>
<DaxkoPager v-if="daxko" v-model="selectedPage" :daxko-pages="daxkoPages" />
<Pager v-else v-model="selectedPage" :total-pages="data.pager_info.total_pages" />
<template v-slot:results-list>
<ResultsList
:results="data.table"
:ages="ages"
:selected-ages="selectedAges"
:cart-items="cartItems"
:legacy-mode="legacyMode"
:disable-spots-available="disableSpotsAvailable"
:request-more-info="daxko"
@addItem="addItem($event)"
@removeItem="removeItem($event)"
/>
</template>
<template v-slot:no-results>
<NoResults
Expand All @@ -212,6 +218,10 @@
@clearKeywords="clearKeywords($event)"
/>
</template>
<template v-slot:pager>
<DaxkoPager v-if="daxko" v-model="selectedPage" :daxko-pages="daxkoPages" />
<Pager v-else v-model="selectedPage" :total-pages="data.pager_info.total_pages" />
</template>
</Results>
</div>
</template>
Expand All @@ -237,6 +247,7 @@ import SortRadios from '@/components/filters/SortRadios.vue'
import SortSelect from '@/components/filters/SortSelect.vue'
import SearchForm from '@/components/filters/SearchForm.vue'
import NoResults from '@/components/NoResults.vue'
import ResultsList from '@/components/ResultsList.vue'
export default {
name: 'ActivityFinder',
Expand All @@ -259,7 +270,8 @@ export default {
SortRadios,
SortSelect,
SearchForm,
NoResults
NoResults,
ResultsList
},
props: {
backendService: {
Expand Down
Loading

0 comments on commit f4a659c

Please sign in to comment.