refactor(admin, draws, settlement): unify admin datetime display and tighten wallet write permission
This commit is contained in:
@@ -5,6 +5,7 @@ import { useTranslation } from "react-i18next";
|
||||
import type { SettlementAdjustmentRow } from "@/api/admin-agent-settlement";
|
||||
import { AdminNoResourceState } from "@/components/admin/admin-no-resource-state";
|
||||
import { AdminLoadingState } from "@/components/admin/admin-loading-state";
|
||||
import { useAdminDateTimeFormatter } from "@/hooks/use-admin-datetime-formatter";
|
||||
import { formatSettlementPeriodSpan } from "@/lib/agent-settlement-period-range";
|
||||
import { formatDashboardMoneyMinor } from "@/modules/dashboard/use-dashboard-analytics";
|
||||
import {
|
||||
@@ -30,6 +31,7 @@ export function SettlementAdjustmentsTable({
|
||||
onOpenBill,
|
||||
}: SettlementAdjustmentsTableProps): React.ReactElement {
|
||||
const { t } = useTranslation(["settlementCenter", "common"]);
|
||||
const formatTs = useAdminDateTimeFormatter();
|
||||
|
||||
if (loading) {
|
||||
return <AdminLoadingState />;
|
||||
@@ -71,7 +73,7 @@ export function SettlementAdjustmentsTable({
|
||||
{formatDashboardMoneyMinor(row.amount, currencyCode)}
|
||||
</TableCell>
|
||||
<TableCell className="max-w-[200px] truncate text-sm">{row.reason ?? "—"}</TableCell>
|
||||
<TableCell className="text-xs text-muted-foreground">{row.created_at ?? "—"}</TableCell>
|
||||
<TableCell className="text-xs text-muted-foreground">{formatTs(row.created_at)}</TableCell>
|
||||
<TableCell>
|
||||
{row.original_bill_id != null ? (
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user