feat(api, agents): add agent node profile retrieval and update functionality
Implemented new API functions to fetch and update agent node profiles, enhancing the management capabilities for agent data. This addition improves the overall functionality of the admin agents console, allowing for better user interaction with agent profiles. Updated related types for improved type safety and clarity in the codebase.
This commit is contained in:
@@ -669,6 +669,7 @@ export function OddsConfigDocScreen({
|
||||
className="h-9 w-full font-mono tabular-nums"
|
||||
disabled={saving}
|
||||
value={oddsMultiplierLabel(row.odds_value)}
|
||||
placeholder={t("odds.placeholders.multiplier", { ns: "config" })}
|
||||
onChange={(e) =>
|
||||
updateOddsForScope(scope, {
|
||||
odds_value: parseOddsMultiplierInput(e.target.value),
|
||||
@@ -697,6 +698,7 @@ export function OddsConfigDocScreen({
|
||||
className="h-9 w-full font-mono tabular-nums"
|
||||
disabled={saving}
|
||||
value={rebatePercentUi}
|
||||
placeholder={t("odds.placeholders.rebateRate", { ns: "config" })}
|
||||
onChange={(e) => setRebateForPlayPercent(e.target.value)}
|
||||
/>
|
||||
) : (
|
||||
|
||||
@@ -631,6 +631,7 @@ export function PlayConfigDocScreen() {
|
||||
className="mx-auto h-8 w-16 font-mono tabular-nums text-center"
|
||||
value={row.display_order}
|
||||
disabled={saving}
|
||||
placeholder={t("play.placeholders.displayOrder", { ns: "config" })}
|
||||
onChange={(e) => {
|
||||
const n = Number.parseInt(e.target.value, 10);
|
||||
if (Number.isFinite(n)) {
|
||||
@@ -652,6 +653,7 @@ export function PlayConfigDocScreen() {
|
||||
className="mx-auto h-8 w-24 text-center font-mono tabular-nums"
|
||||
disabled={saving}
|
||||
value={formatAdminMinorDecimal(row.min_bet_amount, amountCurrencyCode)}
|
||||
placeholder={t("play.placeholders.minBetAmount", { ns: "config" })}
|
||||
onChange={(e) =>
|
||||
updateConfigRow(row.play_code, {
|
||||
min_bet_amount:
|
||||
@@ -673,6 +675,7 @@ export function PlayConfigDocScreen() {
|
||||
className="mx-auto h-8 w-24 text-center font-mono tabular-nums"
|
||||
disabled={saving}
|
||||
value={formatAdminMinorDecimal(row.max_bet_amount, amountCurrencyCode)}
|
||||
placeholder={t("play.placeholders.maxBetAmount", { ns: "config" })}
|
||||
onChange={(e) =>
|
||||
updateConfigRow(row.play_code, {
|
||||
max_bet_amount:
|
||||
|
||||
@@ -556,6 +556,7 @@ export function RebateConfigDocScreen({
|
||||
className="font-mono tabular-nums"
|
||||
disabled={saving}
|
||||
value={p2}
|
||||
placeholder={t("rebate.placeholders.d2", { ns: "config" })}
|
||||
onChange={(e) => setP2(e.target.value)}
|
||||
/>
|
||||
) : (
|
||||
@@ -572,6 +573,7 @@ export function RebateConfigDocScreen({
|
||||
className="font-mono tabular-nums"
|
||||
disabled={saving}
|
||||
value={p3}
|
||||
placeholder={t("rebate.placeholders.d3", { ns: "config" })}
|
||||
onChange={(e) => setP3(e.target.value)}
|
||||
/>
|
||||
) : (
|
||||
@@ -588,6 +590,7 @@ export function RebateConfigDocScreen({
|
||||
className="font-mono tabular-nums"
|
||||
disabled={saving}
|
||||
value={p4}
|
||||
placeholder={t("rebate.placeholders.d4", { ns: "config" })}
|
||||
onChange={(e) => setP4(e.target.value)}
|
||||
/>
|
||||
) : (
|
||||
|
||||
@@ -471,6 +471,7 @@ export function RiskCapDocScreen() {
|
||||
className="w-[220px] font-mono tabular-nums"
|
||||
disabled={saving}
|
||||
value={defaultCapStr}
|
||||
placeholder={t("riskCap.placeholders.defaultCap", { ns: "config" })}
|
||||
onChange={(e) => setDefaultCapStr(e.target.value)}
|
||||
/>
|
||||
) : (
|
||||
@@ -525,6 +526,7 @@ export function RiskCapDocScreen() {
|
||||
maxLength={4}
|
||||
disabled={saving}
|
||||
value={r.normalized_number}
|
||||
placeholder={t("riskCap.placeholders.number", { ns: "config" })}
|
||||
onChange={(e) =>
|
||||
updateRow(idx, {
|
||||
normalized_number: e.target.value.replace(/\D/g, "").slice(0, 4),
|
||||
@@ -543,6 +545,7 @@ export function RiskCapDocScreen() {
|
||||
className="h-8 font-mono tabular-nums"
|
||||
disabled={saving}
|
||||
value={formatAdminMinorDecimal(r.cap_amount, amountCurrencyCode)}
|
||||
placeholder={t("riskCap.placeholders.capAmount", { ns: "config" })}
|
||||
onChange={(e) =>
|
||||
updateRow(idx, {
|
||||
cap_amount:
|
||||
|
||||
Reference in New Issue
Block a user