feat(api, agents, i18n): enhance settlement features and multi-language support
Added new types and API functions for settlement period summaries and credit ledgers, improving the management of agent settlements. Updated the admin console to reflect these changes, enhancing user experience with better navigation and data presentation. Additionally, expanded multi-language support by incorporating new translations in English, Nepali, and Chinese for settlement-related terms, ensuring consistency across the platform.
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import { useAsyncEffect } from "@/hooks/use-async-effect";
|
||||
import { percentUiToRatio } from "@/lib/admin-rate-percent";
|
||||
import { adminSiteCodeLabel } from "@/lib/admin-select-display";
|
||||
import { LotteryApiBizError } from "@/types/api/errors";
|
||||
import type { AdminIntegrationSiteRow } from "@/types/api/admin-integration-site";
|
||||
|
||||
@@ -128,19 +129,23 @@ export function AgentLineProvisionWizard(): React.ReactElement {
|
||||
disabled={sitesLoading || unboundSites.length === 0}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue
|
||||
placeholder={
|
||||
sitesLoading
|
||||
? t("common:loading", { defaultValue: "加载中…" })
|
||||
: unboundSites.length === 0
|
||||
? t("agents:lineProvision.noUnboundSite", {
|
||||
defaultValue: "暂无未绑定一级代理的站点",
|
||||
})
|
||||
: t("agents:lineProvision.siteCodePlaceholder", {
|
||||
defaultValue: "选择站点",
|
||||
})
|
||||
<SelectValue>
|
||||
{(v) =>
|
||||
adminSiteCodeLabel(
|
||||
v,
|
||||
unboundSites,
|
||||
sitesLoading
|
||||
? t("common:loading", { defaultValue: "加载中…" })
|
||||
: unboundSites.length === 0
|
||||
? t("agents:lineProvision.noUnboundSite", {
|
||||
defaultValue: "暂无未绑定一级代理的站点",
|
||||
})
|
||||
: t("agents:lineProvision.siteCodePlaceholder", {
|
||||
defaultValue: "选择站点",
|
||||
}),
|
||||
)
|
||||
}
|
||||
/>
|
||||
</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{unboundSites.map((site) => (
|
||||
@@ -248,7 +253,15 @@ export function AgentLineProvisionWizard(): React.ReactElement {
|
||||
}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
<SelectValue>
|
||||
{(v) =>
|
||||
v === "daily"
|
||||
? t("agents:profile.cycleDaily", { defaultValue: "日结" })
|
||||
: v === "monthly"
|
||||
? t("agents:profile.cycleMonthly", { defaultValue: "月结" })
|
||||
: t("agents:profile.cycleWeekly", { defaultValue: "周结" })
|
||||
}
|
||||
</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="daily">
|
||||
|
||||
Reference in New Issue
Block a user