mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 13:23:04 +00:00
feat(costs): let a trip keep its costs as totals only (#1714)
Travellers who track what a trip costs but never split it saw an Unfinished warning on every expense and a settle-up they had no use for. A trip now has a costs mode (appended migration, trips.costs_mode, split by default); totals leaves payers, shares and settling up out of Costs on desktop and phone through the same gate as a trip of one, and saves new expenses without a payer. PUT /api/trips/:id and update_trip take it on budget_edit. The split chips move into their own component.
This commit is contained in:
@@ -58,6 +58,7 @@ export class Trips {
|
||||
created_at?: string | null;
|
||||
updated_at?: string | null;
|
||||
reminder_sent_for?: string | null;
|
||||
costs_mode: string & Opt = 'split';
|
||||
assistant_attachments_collection = new Collection<AssistantAttachments>(this);
|
||||
assistant_threads_collection = new Collection<AssistantThreads>(this);
|
||||
budget_category_order_collection = new Collection<BudgetCategoryOrder>(this);
|
||||
@@ -124,6 +125,7 @@ export const TripsSchema = defineEntity({
|
||||
created_at: p.type(DbTimestampType).nullable().defaultRaw(`CURRENT_TIMESTAMP`).index('idx_trips_created_at'),
|
||||
updated_at: p.type(DbTimestampType).nullable().defaultRaw(`CURRENT_TIMESTAMP`),
|
||||
reminder_sent_for: p.text().nullable(),
|
||||
costs_mode: p.text().default('split'),
|
||||
assistant_attachments_collection: () => p.oneToMany(AssistantAttachments).mappedBy('trip').hidden(),
|
||||
assistant_threads_collection: () => p.oneToMany(AssistantThreads).mappedBy('trip').hidden(),
|
||||
budget_category_order_collection: () => p.oneToMany(BudgetCategoryOrder).mappedBy('trip').hidden(),
|
||||
|
||||
Reference in New Issue
Block a user