feat(settlement): add idempotency keys to bill operations and enhance credit ledger filtering
Some checks failed
lotteryadmin CI / build (push) Has been cancelled

Added idempotency_key parameter to settlement bill payment and adjustment API calls to prevent duplicate transactions. Enhanced credit ledger panel with expanded reason filters including bet_hold_release, game_settlement_win/loss/reversal, and settlement_confirm/payout. Updated localization files to include new game_settlement_reversal labels across English, Nepali, and Chinese. Improved credit ledger reason
This commit is contained in:
2026-06-23 16:50:14 +08:00
parent c6119da9f8
commit ce38995546
8 changed files with 34 additions and 4 deletions

View File

@@ -55,9 +55,27 @@ export function creditLedgerReasonLabel(
if (reason === "game_settlement") {
return t("creditLedger.reason.game_settlement", { defaultValue: "开奖结算" });
}
if (reason === "game_settlement_reversal") {
return t("creditLedger.reason.game_settlement_reversal", { defaultValue: "开奖冲正" });
}
if (reason === "bet_hold") {
return t("creditLedger.reason.bet_hold", { defaultValue: "下注冻结" });
}
if (reason === "bet_hold_release") {
return t("creditLedger.reason.bet_hold_release", { defaultValue: "占用释放" });
}
if (reason === "game_settlement_win") {
return t("creditLedger.reason.game_settlement_win", { defaultValue: "开奖结算入账" });
}
if (reason === "game_settlement_loss") {
return t("creditLedger.reason.game_settlement_loss", { defaultValue: "开奖结算扣款" });
}
if (reason === "settlement_confirm") {
return t("creditLedger.reason.settlement_confirm", { defaultValue: "账期结算确认" });
}
if (reason === "settlement_payout") {
return t("creditLedger.reason.settlement_payout", { defaultValue: "结算收付入账" });
}
const key = `creditLedger.reason.${reason}` as const;
return t(key, { defaultValue: reason });