feat: enhance wallet strip for mobile responsiveness
Some checks failed
lotteryfront CI / build (push) Has been cancelled

- Added mobile-specific styles to the HallWalletStrip component for better usability on smaller screens.
- Adjusted padding, font sizes, and spacing based on device type.
- Introduced a new hook `useIsMobile` to determine the device type.

feat: sort ticket items by provider code

- Updated the sorting logic in `sortTicketGroupItems` to include provider code for better organization of ticket items.

feat: display provider information in ticket order details

- Added a `providerLabel` function to format provider information.
- Updated `TicketOrderDetailScreen` and `TicketOrdersListScreen` to display provider name and code.

feat: enhance ticket item types with provider information

- Extended `TicketItemListRow` and `TicketItemDetailPayload` types to include optional provider code and name.

feat: add API for fetching bet providers

- Created a new API endpoint to retrieve bet providers.
- Defined types for bet provider data in `bet-provider.ts`.

chore: update player spacing constants

- Adjusted padding values in `player-spacing.ts` for improved layout consistency.
This commit is contained in:
2026-07-08 15:57:09 +08:00
parent 45376473f3
commit add3d1fc05
17 changed files with 619 additions and 104 deletions

View File

@@ -29,6 +29,10 @@ type HallBetResultDialogProps = {
const SUCCESS_ITEM_STATUSES = new Set(["pending_draw", "placed"]);
const FAILURE_ITEM_STATUSES = new Set(["failed", "refunded"]);
function providerLabel(providerName?: string | null, providerCode?: string | null): string {
return providerName || providerCode || "-";
}
export function HallBetResultDialog({
open,
onOpenChange,
@@ -202,7 +206,7 @@ export function HallBetResultDialog({
{t("hall.result.items")}
</p>
<div className="overflow-x-auto rounded-xl border border-[#dfe8f6]">
<table className="min-w-[430px] w-full border-collapse text-xs">
<table className="min-w-[520px] w-full border-collapse text-xs">
<thead className="bg-[#f4f7fd] text-[#304f86]">
<tr>
<th className="w-10 border-r border-[#dfe8f6] px-2 py-2.5 text-center font-black">
@@ -214,6 +218,9 @@ export function HallBetResultDialog({
<th className="border-r border-[#dfe8f6] px-2 py-2.5 text-center font-black">
{t("orders.play")}
</th>
<th className="border-r border-[#dfe8f6] px-2 py-2.5 text-center font-black">
{t("hall.providers.title", { defaultValue: "开注商" })}
</th>
<th className="px-2 py-2.5 text-center font-black">
{t("hall.result.actualDeduct")}
</th>
@@ -239,6 +246,11 @@ export function HallBetResultDialog({
<td className="border-r border-[#e8eef7] px-2 py-3 text-center font-semibold text-[#0755c7]">
{playLabel(item.play_code, t)}
</td>
<td className="border-r border-[#e8eef7] px-2 py-3 text-center">
<span className="inline-flex rounded-full bg-[#eef5ff] px-2 py-0.5 font-black text-[#0b56b7]">
{providerLabel(item.provider_name, item.provider_code)}
</span>
</td>
<td className="px-2 py-3 text-center font-black tabular-nums text-[#0b3f96]">
{formatMinorAsCurrency(item.actual_deduct_amount, currencyCode)}
</td>
@@ -265,7 +277,7 @@ export function HallBetResultDialog({
>
<span className="min-w-0 truncate font-semibold text-slate-700">
<span className="font-mono font-black text-slate-950">{item.number}</span>{" "}
{playLabel(item.play_code, t)}
{playLabel(item.play_code, t)} · {providerLabel(item.provider_name, item.provider_code)}
</span>
<span className="shrink-0 font-bold text-[#e5002c]">
{item.fail_reason_text ?? item.fail_reason_code ?? t("hall.result.failed")}