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:
51
src/modules/config/doc/odds-config-draft-bar.tsx
Normal file
51
src/modules/config/doc/odds-config-draft-bar.tsx
Normal file
@@ -0,0 +1,51 @@
|
||||
"use client";
|
||||
|
||||
import { Rocket, Save } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type OddsConfigDraftBarProps = {
|
||||
isDirty: boolean;
|
||||
saving: boolean;
|
||||
loadingDetail?: boolean;
|
||||
onSave: () => void;
|
||||
onPublish: () => void;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export function OddsConfigDraftBar({
|
||||
isDirty,
|
||||
saving,
|
||||
loadingDetail = false,
|
||||
onSave,
|
||||
onPublish,
|
||||
className,
|
||||
}: OddsConfigDraftBarProps) {
|
||||
const { t } = useTranslation("config");
|
||||
const busy = saving || loadingDetail;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"sticky bottom-0 z-10 flex flex-col gap-3 border-t border-border/60 bg-card/95 px-4 py-3 backdrop-blur sm:flex-row sm:items-center sm:justify-between sm:px-5",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{isDirty ? t("odds.draftBar.unsaved") : t("odds.draftBar.saved")}
|
||||
</p>
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<Button type="button" variant="outline" size="sm" disabled={busy} onClick={onSave}>
|
||||
<Save className="size-3.5" aria-hidden />
|
||||
{t("versionActions.saveDraft")}
|
||||
</Button>
|
||||
<Button type="button" size="sm" disabled={busy} onClick={onPublish}>
|
||||
<Rocket className="size-3.5" aria-hidden />
|
||||
{t("versionActions.publishCurrent")}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user