From 7bd2eb1e86a8219bc6ea3bbf4f2ad983cf3221c2 Mon Sep 17 00:00:00 2001 From: kennethcheng Date: Thu, 30 Apr 2026 11:00:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(ledger):=20=E7=BC=96=E5=86=99=E6=97=B6?= =?UTF-8?q?=E5=85=89=E6=9C=BA=E6=A0=B8=E5=BF=83=E8=BE=85=E5=8A=A9=E5=87=BD?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E6=94=AF=E6=8C=81=E5=8E=86=E5=8F=B2=E6=8C=81?= =?UTF-8?q?=E4=BB=93=E8=AE=A1=E7=AE=97=E4=B8=8E=E4=BB=B7=E6=A0=BC=E6=96=AD?= =?UTF-8?q?=E7=82=B9=E7=BB=93=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Memory.md | 8 +++- src/actions/snapshots.ts | 96 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 3 deletions(-) diff --git a/Memory.md b/Memory.md index 579116a..3a16d52 100644 --- a/Memory.md +++ b/Memory.md @@ -133,4 +133,10 @@ - 在 `src/actions/market.ts` 中新增 `importHistoricalPrices(assetId, data)` Server Action,遍歷數據數組對 `assetPricesHistory` 表執行批量 Upsert(基於 `(assetId, date)` 聯合唯一索引的 `onConflictDoUpdate`),衝突時用新價格覆蓋舊價格。 - 前端 `app/dashboard/page.tsx` 的持倉明細表「操作」列與展開區域均新增【導入價格】按鈕。 - 點擊按鈕彈出 Dialog,內含 `