Add daily expense tracking with sort/split and CSV export

Standalone expenses (date, description, category, amount) with the same
equal/own/payer split machinery as entry costs, merged into the costs
panel and settle-up as a single expense bucket. Self-fetching card
with per-day grouping, client-side sorting, and quick-add. CSV export
interleaves expenses with priced entries, one share column per member
(UTF-8 BOM, RFC 4180, formula-injection guard on text cells).

Also fixes trip deletion, which hit a foreign-key violation and rolled
back for any trip with checklist items.
This commit is contained in:
2026-08-06 17:55:04 +07:00
parent e342cd9a91
commit f272e74b84
19 changed files with 2123 additions and 6 deletions
+6
View File
@@ -94,6 +94,12 @@ export const api = {
addSuggestions: (tripId, keys, personal) =>
post(`/api/trips/${tripId}/checklist/suggestions`, personal === undefined ? { keys } : { keys, personal }),
},
expenses: {
list: (tripId) => get(`/api/trips/${tripId}/expenses`),
create: (tripId, payload) => post(`/api/trips/${tripId}/expenses`, payload),
update: (expenseId, patchBody) => patch(`/api/expenses/${expenseId}`, patchBody),
remove: (expenseId) => del(`/api/expenses/${expenseId}`),
},
};
export default api;