fix(admin): 区分领券点位完成比例颜色

This commit is contained in:
linkeyu
2026-07-22 13:50:01 +08:00
parent efa443ea8a
commit 926b65b453
+8 -2
View File
@@ -149,6 +149,10 @@ function PointScorePopover({ row }: { row: CouponDataRow }) {
return <Typography.Text type="secondary">-</Typography.Text>;
}
const score = `${row.point_success_count}/${row.point_total_count}`;
const scoreColor =
row.point_success_count === row.point_total_count
? STATUS_TAG.completed.color
: STATUS_TAG.abandoned.color;
const loadDetails = async () => {
if (details !== null || loading) return;
setLoading(true);
@@ -215,7 +219,9 @@ function PointScorePopover({ row }: { row: CouponDataRow }) {
</div>
)}
>
<Button type="link" size="small" style={{ height: 'auto', padding: 0 }}>{score}</Button>
<Button type="link" size="small" style={{ height: 'auto', padding: 0, color: scoreColor }}>
{score}
</Button>
</Popover>
);
}
@@ -596,7 +602,7 @@ export default function CouponDataPage() {
render: (v: number | null) => fmtSec(v),
},
{
title: '点位成功率',
title: '百分比',
key: 'point_success_rate',
width: 110,
render: (_: unknown, r: CouponDataRow) => <PointScorePopover row={r} />,