Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 926b65b453 |
@@ -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} />,
|
||||
|
||||
Reference in New Issue
Block a user