@kiva/kv-components 3.79.0 → 3.80.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.80.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.80.0...@kiva/kv-components@3.80.1) (2024-05-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* left some unsaved changes out of the branch, adding those in ([a8498a3](https://github.com/kiva/kv-ui-elements/commit/a8498a3012abe50cf6254e3734a47df31314c473))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.80.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.79.0...@kiva/kv-components@3.80.0) (2024-05-22)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* add showContributors condition ([2fe0be3](https://github.com/kiva/kv-ui-elements/commit/2fe0be34ea8cb18fdce37a0eba979d089a850426))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* show contributors section of loan card ([e65e80f](https://github.com/kiva/kv-ui-elements/commit/e65e80f1862c93e45b9f3a05a3a01d3585b4fc7c))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [3.79.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.78.2...@kiva/kv-components@3.79.0) (2024-05-21)
|
|
7
34
|
|
|
8
35
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.80.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"optional": true
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "7be0808c8e53530e6a7660eefea94866772046de"
|
|
79
79
|
}
|
|
@@ -233,6 +233,16 @@
|
|
|
233
233
|
@remove-from-basket="$emit('remove-from-basket', $event)"
|
|
234
234
|
/>
|
|
235
235
|
</div>
|
|
236
|
+
|
|
237
|
+
<div
|
|
238
|
+
v-if="showContributors && lendersNumber && amountLent"
|
|
239
|
+
class="tw-text-center tw-w-full tw-mt-1 tw-font-medium "
|
|
240
|
+
>
|
|
241
|
+
<p>
|
|
242
|
+
{{ lendersNumber }} people contributed {{ amountLent }}
|
|
243
|
+
</p>
|
|
244
|
+
</div>
|
|
245
|
+
|
|
236
246
|
<div
|
|
237
247
|
v-if="combinedActivities.length > 0"
|
|
238
248
|
class="tw-pt-1.5"
|
|
@@ -263,6 +273,7 @@
|
|
|
263
273
|
</template>
|
|
264
274
|
|
|
265
275
|
<script>
|
|
276
|
+
import numeral from 'numeral';
|
|
266
277
|
import { loanCardComputedProperties, loanCardMethods } from '../utils/loanCard';
|
|
267
278
|
|
|
268
279
|
import KvLoanUse from './KvLoanUse.vue';
|
|
@@ -413,6 +424,10 @@ export default {
|
|
|
413
424
|
type: String,
|
|
414
425
|
default: 'Checkout now',
|
|
415
426
|
},
|
|
427
|
+
showContributors: {
|
|
428
|
+
type: Boolean,
|
|
429
|
+
default: false,
|
|
430
|
+
},
|
|
416
431
|
},
|
|
417
432
|
setup(props) {
|
|
418
433
|
const {
|
|
@@ -493,6 +508,13 @@ export default {
|
|
|
493
508
|
{ width: 335, viewSize: 375 },
|
|
494
509
|
];
|
|
495
510
|
},
|
|
511
|
+
lendersNumber() {
|
|
512
|
+
return this.loan?.lenders?.totalCount ?? 0;
|
|
513
|
+
},
|
|
514
|
+
amountLent() {
|
|
515
|
+
const amount = this.loan?.loanFundraisingInfo?.fundedAmount ?? 0;
|
|
516
|
+
return numeral(parseFloat(amount)).format('$0,0');
|
|
517
|
+
},
|
|
496
518
|
},
|
|
497
519
|
};
|
|
498
520
|
</script>
|
|
@@ -31,6 +31,7 @@ const story = (args) => {
|
|
|
31
31
|
:custom-callouts="customCallouts"
|
|
32
32
|
:is-team-pick="isTeamPick"
|
|
33
33
|
:combined-activities="combinedActivities"
|
|
34
|
+
:showContributors="showContributors"
|
|
34
35
|
:enable-huge-amount="enableHugeAmount"
|
|
35
36
|
:enable-clickable-tags="enableClickableTags"
|
|
36
37
|
:primary-button-text="primaryButtonText"
|
|
@@ -429,3 +430,21 @@ export const RemoveButton = story({
|
|
|
429
430
|
secondaryButtonText: 'Remove Loan',
|
|
430
431
|
secondaryButtonHandler: () => {},
|
|
431
432
|
});
|
|
433
|
+
|
|
434
|
+
export const ContributorsAndAmount = story({
|
|
435
|
+
loanId: loan.id,
|
|
436
|
+
loan: {
|
|
437
|
+
...loan,
|
|
438
|
+
loanFundraisingInfo: {
|
|
439
|
+
fundedAmount: '950.00',
|
|
440
|
+
reservedAmount: '0.00',
|
|
441
|
+
isExpiringSoon: false,
|
|
442
|
+
},
|
|
443
|
+
lenders: {
|
|
444
|
+
totalCount: 7,
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
kvTrackFunction,
|
|
448
|
+
photoPath,
|
|
449
|
+
showContributors: true,
|
|
450
|
+
});
|