refactor(overview): derive payment badge colour from shared status variant
This commit is contained in:
parent
0acd12360f
commit
e967cb59e9
3 changed files with 25 additions and 17 deletions
|
|
@ -471,15 +471,17 @@
|
|||
sort_field={@sort_field}
|
||||
sort_order={@sort_order}
|
||||
/>
|
||||
<span
|
||||
<.badge
|
||||
:if={MvWeb.MemberLive.Index.payment_period_active?(@payment_period)}
|
||||
class="badge badge-soft badge-primary badge-sm font-normal shrink-0"
|
||||
variant="primary"
|
||||
size="sm"
|
||||
class="font-normal shrink-0"
|
||||
title={PaymentAging.period_tooltip(@payment_period)}
|
||||
aria-label={PaymentAging.period_tooltip(@payment_period)}
|
||||
data-testid="payment-period-badge"
|
||||
>
|
||||
{PaymentAging.period_short_code(@payment_period) || gettext("filtered")}
|
||||
</span>
|
||||
</.badge>
|
||||
</div>
|
||||
"""
|
||||
}
|
||||
|
|
@ -499,7 +501,6 @@
|
|||
id={"payment-badge-#{member.id}"}
|
||||
class={["badge badge-soft badge-md", badge.color_class]}
|
||||
style={count > 0 && "anchor-name: #{anchor}"}
|
||||
data-variant={badge.variant}
|
||||
phx-hook={count > 0 && "HoverPopover"}
|
||||
data-popover-target={count > 0 && tip_id}
|
||||
aria-details={count > 0 && tip_id}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue