- {r.paidOn}
- {r.note ? ` · ${r.note}` : ""}
+
+
+
+
+
{tugrikRaw(r.amount)}
+
+ {r.paidOn}
+ {r.note ? ` · ${r.note}` : ""}
+
@@ -190,14 +194,6 @@ export function LendingDetail({ id }: LendingDetailProps) {
);
}
-function BackLink() {
- return (
-
- ← {s.common.back}
-
- );
-}
-
function AddRepaymentSheet({
onClose,
onSave,
diff --git a/src/features/assets/ManualAssetDetail.tsx b/src/features/assets/ManualAssetDetail.tsx
index 99ec9a8..058f62f 100644
--- a/src/features/assets/ManualAssetDetail.tsx
+++ b/src/features/assets/ManualAssetDetail.tsx
@@ -9,11 +9,23 @@ import { apiGet } from "@/api/client";
import { useManualAssets } from "@/api/hooks/reads";
import { useManualAssetMutations } from "@/api/hooks/mutations";
import { AssetPointSchema, AssetListingSchema, type ManualAsset, type RevalueResult } from "@/api/schemas";
-import { Card, MercuryButton } from "@/ds";
+import { Card, MercuryButton, IconChip, type IconName } from "@/ds";
import { tugrikRaw, tugrikShortRaw } from "@/ds/money";
import { assetsStrings as s } from "./strings";
import { ValueHistoryChart } from "./ValueHistoryChart";
import { ConfirmDialog } from "./ConfirmDialog";
+import { DetailHeader } from "./DetailHeader";
+
+function assetChip(category: string): { icon: IconName; tint: string; fg: string } {
+ switch (category) {
+ case "car":
+ return { icon: "car", tint: "#DDE6F6", fg: "#2A4B9A" };
+ case "electronics":
+ return { icon: "monitor", tint: "#E1E5EA", fg: "#42505F" };
+ default:
+ return { icon: "layers", tint: "#EDEBE7", fg: "#6B6257" };
+ }
+}
// --- Local reads (no hook exists yet for asset history/listings; these mirror
// the shape of reads.ts's other hooks and hit the same endpoints iOS uses:
@@ -83,7 +95,7 @@ export function ManualAssetDetail({ name }: ManualAssetDetailProps) {
if (!asset) {
return (
);
@@ -109,14 +121,16 @@ export function ManualAssetDetail({ name }: ManualAssetDetailProps) {
const categoryLabel = s.manualAssets.categories[asset.category] ?? asset.category;
const conditionLabel = s.manualAssets.conditions[asset.condition] ?? asset.condition;
+ const chip = assetChip(asset.category);
+
return (
-
+
+
+
+
{categoryLabel} · {conditionLabel}
{tugrikRaw(value)}
- ← {s.common.back}
-
- );
-}
-
function DetailRow({ label, value, color }: { label: string; value: string; color?: string }) {
return (
diff --git a/src/features/assets/strings.ts b/src/features/assets/strings.ts
index a406ce7..8483019 100644
--- a/src/features/assets/strings.ts
+++ b/src/features/assets/strings.ts
@@ -14,6 +14,7 @@ export const assetsStrings = {
accounts: {
title: "Миний дансууд",
empty: "Холбосон данс алга",
+ emptyHint: "Банкны дансаа холбомогц энд харагдана",
},
manualAssets: {
title: "Хөрөнгийн жагсаалт",
@@ -65,6 +66,7 @@ export const assetsStrings = {
lending: {
title: "Найзуудад өгсөн зээл",
empty: "Зээл бүртгэгдээгүй байна",
+ emptyHint: "Найздаа зээл өгсөн бол + дарж бүртгээрэй",
add: "Шинэ зээл",
total: "нийт",
statusPaid: "Төлсөн",