fix(miniapp): refresh billing state and clean up controls

This commit is contained in:
2026-03-12 04:27:46 +04:00
parent 9afa9fc845
commit 6e49cd1dfd
9 changed files with 166 additions and 30 deletions

View File

@@ -1,12 +1,14 @@
import { Show } from 'solid-js'
import { cn } from '../../lib/cn'
import { formatFriendlyDate } from '../../lib/dates'
import { majorStringToMinor, sumMajorStrings } from '../../lib/money'
import type { MiniAppDashboard } from '../../miniapp-api'
import { MiniChip, StatCard } from '../ui'
type Props = {
copy: Record<string, string | undefined>
locale: 'en' | 'ru'
dashboard: MiniAppDashboard
member: MiniAppDashboard['members'][number]
detail?: boolean
@@ -123,7 +125,8 @@ export function MemberBalanceCard(props: Props) {
<Show when={props.dashboard.rentFxEffectiveDate}>
{(date) => (
<MiniChip muted>
{props.copy.fxEffectiveDateLabel ?? ''}: {date()}
{props.copy.fxEffectiveDateLabel ?? ''}:{' '}
{formatFriendlyDate(date(), props.locale)}
</MiniChip>
)}
</Show>

View File

@@ -124,3 +124,15 @@ export function XIcon(props: IconProps) {
</svg>
)
}
export function TrashIcon(props: IconProps) {
return (
<svg {...iconProps(props)}>
<path d="M4 7h16" />
<path d="M10 11v6" />
<path d="M14 11v6" />
<path d="M6 7l1 13a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-13" />
<path d="M9 4h6l1 3H8l1-3Z" />
</svg>
)
}