Skip to content

Commit

Permalink
feat: core-251 adding previous loan link to borrower profile
Browse files Browse the repository at this point in the history
  • Loading branch information
BoulderBrains committed Nov 15, 2021
1 parent 5f91ff5 commit 16de5b5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/components/BorrowerProfile/LoanDescription.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
v-if="previousLoanId"
:loan-id="loanId"
:previous-loan-id="previousLoanId"
:borrower-or-group-name="borrowerOrGroupName"
/>

<section v-if="storyTranslation">
Expand Down Expand Up @@ -128,8 +129,8 @@ export default {
default: () => {},
},
previousLoanId: { // LoanBasic.previousLoanId
type: Number,
default: 0,
type: String,
default: '',
},
loanId: {
type: Number,
Expand Down
22 changes: 19 additions & 3 deletions src/components/BorrowerProfile/PreviousLoanDescription.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<section>
<kv-text-link
v-if="previousLoanId"
v-kv-track-event="['Borrower profile', 'click-Loan details', 'Show previous loan details', this.loanId]"
@click.prevent="performClick"
>
Expand All @@ -25,6 +24,19 @@
v-html="paragraph"
>
</p>

<router-link
v-if="previousLoanId && this.borrowerOrGroupName !== ''"
:to="`/lend/${previousLoanId}`"
v-kv-track-event="[
'Borrower profile',
'Loan details',
'Borrower\'s previous loan',
previousLoanId
]"
>
{{ this.borrowerOrGroupName }}'s previous loan
</router-link>
</div>
</kv-expandable>
</section>
Expand Down Expand Up @@ -67,8 +79,12 @@ export default {
default: 0,
},
previousLoanId: {
type: Number,
default: 0,
type: String,
default: '',
},
borrowerOrGroupName: {
type: String,
default: ''
}
},
computed: {
Expand Down

0 comments on commit 16de5b5

Please sign in to comment.