優化公共事業費操作紀錄與新增操作紀錄規範 Skill
This commit is contained in:
@@ -101,6 +101,10 @@ const fieldLabels: Record<string, string> = {
|
||||
invoice_date: '發票日期',
|
||||
invoice_amount: '發票金額',
|
||||
last_price: '供貨價格',
|
||||
// Utility Fee fields
|
||||
transaction_date: '費用日期',
|
||||
category: '費用類別',
|
||||
amount: '金額',
|
||||
};
|
||||
|
||||
// Purchase Order Status Map
|
||||
@@ -325,7 +329,18 @@ export default function ActivityDetailDialog({ open, onOpenChange, activity }: P
|
||||
<TableBody>
|
||||
{filteredKeys.some(key => !isSnapshotField(key)) ? (
|
||||
filteredKeys
|
||||
.filter(key => !isSnapshotField(key))
|
||||
.filter(key => {
|
||||
if (isSnapshotField(key)) return false;
|
||||
|
||||
// 如果是更新事件,僅顯示有變動的欄位
|
||||
if (activity.event === 'updated') {
|
||||
const oldValue = old[key];
|
||||
const newValue = attributes[key];
|
||||
return JSON.stringify(oldValue) !== JSON.stringify(newValue);
|
||||
}
|
||||
|
||||
return true;
|
||||
})
|
||||
.map((key) => {
|
||||
const oldValue = old[key];
|
||||
const newValue = attributes[key];
|
||||
|
||||
Reference in New Issue
Block a user