修复:领券记录百分比状态配色 (#61)
## 改动 - 将领券记录表格的「点位成功率」列改名为「百分比」 - 全部点位成功的 x/x 使用与「完成」相同的绿色 - 未全部成功的 x/x 使用与「中途退出」相同的警示色 - 保留点击 x/x 查看点位明细的交互 ## 验证 - 提交前已执行 git pull --rebase --autostash origin main - npm run build --------- Co-authored-by: linkeyu <798648091@qq.com> Reviewed-on: #61 Co-authored-by: linkeyu <linkeyu@wonderable.ai> Co-committed-by: linkeyu <linkeyu@wonderable.ai>
This commit was merged in pull request #61.
This commit is contained in:
@@ -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