• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kiva / ui / 19110502605

05 Nov 2025 05:22PM UTC coverage: 50.049%. Remained the same
19110502605

push

github

emuvente
fix: use 3.5 instead of [30px]

1848 of 3930 branches covered (47.02%)

Branch coverage included in aggregate %.

2728 of 5213 relevant lines covered (52.33%)

258.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.14
/src/components/BorrowerProfile/SupportedByLenders.vue
1
<template>
2
        <div
3
                class="tw-flex tw-items-center"
4
                :class="{'tw-mb-1.5': !minimal}"
5
        >
6
                <div class="tw-flex tw-shrink-0 tw-items-end" data-testid="participation-lenders">
7
                        <kv-user-avatar
8
                                :key="lender.id"
9
                                v-for="(lender, i) in participationLendersDisplayed"
10
                                :lender-name="lender.name"
11
                                :lender-image-url="lender.image.url"
12
                                is-small
13
                                :class="{
14
                                        'tw--ml-1': i > 0,
15
                                        'tw-w-3 tw-h-3': !isChallenge,
16
                                        'tw-w-4 tw-h-4': isChallenge
17
                                }"
18
                                :style="{ 'z-index': participationLendersDisplayed.length - i }"
19
                        />
20
                </div>
21
                <p v-if="!minimal" class="tw-px-1 tw-text-base">
1✔
22
                        {{ supportText }}
23
                </p>
24
        </div>
25
</template>
26

27
<script>
28
import { isLegacyPlaceholderAvatar, KvUserAvatar } from '@kiva/kv-components';
29

30
export default {
2✔
31
        name: 'SupportedByLenders',
32
        components: {
33
                KvUserAvatar
34
        },
35
        props: {
36
                participants: {
37
                        type: Object,
38
                        required: true,
39
                        default: () => ({})
×
40
                },
41
                isChallenge: {
42
                        type: Boolean,
43
                        default: false
44
                },
45
                minimal: {
46
                        type: Boolean,
47
                        default: false
48
                }
49
        },
50
        computed: {
51
                participantsNumber() {
52
                        return this.isChallenge
1!
53
                                ? this.participants?.totalCount ?? 0
×
54
                                : this.participants?.values?.length ?? 0;
1!
55
                },
56
                participantsText() {
57
                        // eslint-disable-next-line no-nested-ternary
58
                        return this.isChallenge
1!
59
                                ? this.participantsNumber === 1
×
60
                                        ? `${this.participantsNumber} member`
61
                                        : `${this.participantsNumber} members`
62
                                : this.participantsNumber === 1
1!
63
                                        ? `${this.participantsNumber} person`
64
                                        : `${this.participantsNumber} people`;
65
                },
66
                supportText() {
67
                        return this.isChallenge
1!
68
                                ? `${this.participantsText} participating`
69
                                : `Supported by ${this.participantsText}`;
70
                },
71
                participationLendersDisplayed() {
72
                        return (this.participants?.values ?? []).map(p => {
1!
73
                                const lender = p?.lender ?? p;
6!
74
                                return ({
6✔
75
                                        ...lender,
76
                                        isLegacyPlaceholder: isLegacyPlaceholderAvatar(p.image?.url.split('/').pop()),
77
                                });
78
                        }).filter(l => l.image).slice(0, 5);
6✔
79
                }
80
        },
81
};
82
</script>
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc