fix: update QR code print layout to show payedAmount instead of yearMonth
Remove billYear and billMonth from second column, add payedAmount as last value. - Update PrintBarcodeData interface to replace yearMonth with payedAmount - Modify fetchBarcodeDataForPrint to include bill.payedAmount - Update PrintPreview display to show payedAmount (formatted from cents) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ export interface PrintBarcodeData {
|
|||||||
locationName: string;
|
locationName: string;
|
||||||
billName: string;
|
billName: string;
|
||||||
barcodeImage: string;
|
barcodeImage: string;
|
||||||
yearMonth: string;
|
payedAmount?: number | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,7 +46,7 @@ export const fetchBarcodeDataForPrint = withUser(async (user: AuthenticatedUser,
|
|||||||
locationName: location.name,
|
locationName: location.name,
|
||||||
billName: bill.name,
|
billName: bill.name,
|
||||||
barcodeImage: bill.barcodeImage,
|
barcodeImage: bill.barcodeImage,
|
||||||
yearMonth: yearMonth
|
payedAmount: bill.payedAmount
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,15 +117,17 @@ export const PrintPreview: React.FC<PrintPreviewProps> = ({ data, year, month, t
|
|||||||
</td>
|
</td>
|
||||||
<td className="border-2 border-gray-800 px-3 py-4">
|
<td className="border-2 border-gray-800 px-3 py-4">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<div className="font-bold text-sm text-gray-900">
|
|
||||||
📅 {item.yearMonth}
|
|
||||||
</div>
|
|
||||||
<div className="font-medium text-sm text-gray-800">
|
<div className="font-medium text-sm text-gray-800">
|
||||||
🏠 {item.locationName}
|
🏠 {item.locationName}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-sm text-gray-700">
|
<div className="text-sm text-gray-700">
|
||||||
📋 {item.billName}
|
📋 {item.billName}
|
||||||
</div>
|
</div>
|
||||||
|
{item.payedAmount && (
|
||||||
|
<div className="text-sm text-gray-700">
|
||||||
|
💰 {(item.payedAmount / 100).toFixed(2)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="border-2 border-gray-800 px-3 py-1.5 text-center">
|
<td className="border-2 border-gray-800 px-3 py-1.5 text-center">
|
||||||
|
|||||||
Reference in New Issue
Block a user