Skip to content

Commit

Permalink
feat: show no trustee state with updated tab name and link text
Browse files Browse the repository at this point in the history
  • Loading branch information
mcstover committed Nov 22, 2021
1 parent 62e52ef commit 857ae26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/components/BorrowerProfile/DetailsTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Field Partner
</kv-tab>
<kv-tab :for="trusteeTabId" v-if="hasTrustee">
Trustee
{{ noTrusteeState ? 'No Trustee' : 'Trustee' }}
</kv-tab>
</template>
<template #tabPanels>
Expand Down Expand Up @@ -164,11 +164,14 @@ export default {
return !!this.partner?.name;
},
hasTrustee() {
return !this.isPartnerLoan && this.trustee?.name && this.trustee?.name !== 'No Trustee Endorsement';
return !this.isPartnerLoan && this.trustee?.name;
},
loanTabId() {
return `tab-panel-${this.name}-loan-details`;
},
noTrusteeState() {
return this.trustee?.name === 'No Trustee Endorsement';
},
partnerTabId() {
return `tab-panel-${this.name}-field-partner`;
},
Expand Down
5 changes: 4 additions & 1 deletion src/components/BorrowerProfile/TrusteeDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
:href="`/trustees/${trusteeId}`"
target="_blank"
>
More about this trustee
{{ noTrusteeState ? 'More about loans without endorsements' : 'More about this trustee' }}
</kv-text-link>
<div v-if="endorsement" class="tw-prose tw-my-3">
<h3>{{ endorsementTitle }}</h3>
Expand Down Expand Up @@ -101,6 +101,9 @@ export default {
endorsementTitle() {
return `Why are you endorsing ${this.trusteeName}?`;
},
noTrusteeState() {
return this.trusteeName === 'No Trustee Endorsement';
},
totalLoansValueFormatted() {
return numeral(this.totalLoansValue).format('$0,0[.]00');
},
Expand Down

0 comments on commit 857ae26

Please sign in to comment.