Merge branch 'pr-72'

This commit is contained in:
Felipe Coutinho
2026-05-23 12:57:47 -03:00

View File

@@ -124,10 +124,11 @@ interface TransactionRow {
function createEmptyTransactionRow(
defaultPayerId?: string | null,
lastPurchaseDate?: string,
): TransactionRow {
return {
id: createClientSafeId(),
purchaseDate: getTodayDateString(),
purchaseDate: lastPurchaseDate ?? getTodayDateString(),
name: "",
amount: "",
categoryId: undefined,
@@ -194,9 +195,10 @@ export function MassAddDialog({
};
const addTransaction = () => {
const lastTransaction = transactions[transactions.length - 1];
setTransactions([
...transactions,
createEmptyTransactionRow(defaultPayerId),
createEmptyTransactionRow(defaultPayerId, lastTransaction?.purchaseDate),
]);
setIsDirty(true);
};