diff --git a/src/components/LoanFinding/QuickFiltersSection.vue b/src/components/LoanFinding/QuickFiltersSection.vue index 12dc652013..c3374aa22e 100644 --- a/src/components/LoanFinding/QuickFiltersSection.vue +++ b/src/components/LoanFinding/QuickFiltersSection.vue @@ -16,7 +16,7 @@ :targeted-loan-channel-url="targetedLoanChannelURL" :with-categories="true" :enable-qf-mobile="enableQfMobile" - default-sort="amountLeft" + :default-sort="defaultSort" tracking-category="lending-home" @update-filters="updateQuickFilters" @reset-filters="resetFilters" @@ -100,6 +100,10 @@ export default { type: Boolean, default: false }, + enableAlmostFundedRow: { + type: Boolean, + default: false + }, }, data() { return { @@ -110,7 +114,7 @@ export default { loanSearchState: { pageOffset: 0, pageLimit: 6, - sortBy: 'amountLeft' + sortBy: this.enableAlmostFundedRow ? 'expiringSoon' : 'amountLeft' }, // Default loans for loading animations loans: new Array(6).fill({ id: 0 }), @@ -134,6 +138,11 @@ export default { showOverlay: false, }; }, + computed: { + defaultSort() { + return this.enableAlmostFundedRow ? 'expiringSoon' : 'amountLeft'; + } + }, async mounted() { this.allFacets = await fetchLoanFacets(this.apollo); await this.fetchFilterData(this.flssLoanSearch); diff --git a/src/pages/LoanFinding/LoanFinding.vue b/src/pages/LoanFinding/LoanFinding.vue index 40fb139aad..b8c6aefd38 100644 --- a/src/pages/LoanFinding/LoanFinding.vue +++ b/src/pages/LoanFinding/LoanFinding.vue @@ -63,6 +63,7 @@ :class="{ 'tw-order-last' : enableRelendingExp }" :enable-five-dollars-notes="enableFiveDollarsNotes" :enable-qf-mobile="enableQFMobileVersion" + :enable-almost-funded-row="enableAlmostFundedRow" :user-balance="userBalance" @add-to-basket="trackCategory($event, 'quick-filters')" @data-loaded="trackQuickFiltersDisplayedLoans"