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:
Maurice
2026-11-13 09:58:17 +01:00
parent c9c419b4ad
commit a70eea5bf2
62 changed files with 778 additions and 104 deletions
+3
View File
@@ -138,6 +138,9 @@ const budget: TranslationStrings = {
'costs.splitHint.shares': 'กำหนดจำนวนส่วนแบ่งให้แต่ละคน เช่น จำนวนคืนที่พัก แล้วยอดรวมจะถูกแบ่งตามสัดส่วนนั้น',
'costs.splitSharesOf': 'ส่วนแบ่งของ {name}',
'costs.splitSharesNone': 'กำหนดส่วนแบ่งให้อย่างน้อยหนึ่งคน',
'costs.mode.label': 'แบ่งค่าใช้จ่ายระหว่างผู้ร่วมเดินทาง',
'costs.mode.hintSplit': 'ใครจ่ายและใครร่วมรับผิดชอบค่าใช้จ่ายแต่ละรายการ แล้วเคลียร์ยอดตอนท้าย',
'costs.mode.hintTotals': 'เฉพาะยอดรวม: ไม่มีผู้จ่าย ส่วนแบ่ง หรือการเคลียร์ยอด สิ่งที่แบ่งไว้แล้วยังคงบันทึกอยู่',
'costs.splitHint.ticket': 'ใส่รายการที่อยู่ในใบเสร็จ แล้วติ๊กว่าใครสั่งรายการไหน',
'costs.pickSomeone': 'เลือกอย่างน้อยหนึ่งคนที่จะแยกด้วย',
'costs.splitSummary': '{count} คน · คนละ {amount}',