feat: optimize routes around accommodation, confirm note deletions (#1123)

Optimize day routes around the accommodation

When a day has an accommodation set, the route optimizer now treats it as
the day's home base: it optimizes a loop that leaves the hotel and returns
to it, so the stop nearest the hotel comes first. On a transfer day -
checking out of one hotel and into another - the route runs from the first
hotel to the second instead.

The optimizer also gained a 2-opt pass on top of the nearest-neighbor
ordering, which removes the crossings the greedy pass used to leave behind.
A new display setting ("optimize route from accommodation", on by default)
lets you turn the anchoring off.

Confirm before deleting notes

Deleting a plan note or a collab note now asks for confirmation first. On
phones and tablets the edit and delete icons sit close together and were
easy to mis-tap, which deleted notes with no way back.
This commit is contained in:
Maurice
2026-06-07 12:52:06 +02:00
committed by GitHub
parent 093e069ccc
commit 49b3af8b0d
72 changed files with 504 additions and 26 deletions
+3
View File
@@ -19,6 +19,7 @@ const dayplan: TranslationStrings = {
'dayplan.routeError': '路線計算失敗',
'dayplan.toast.needTwoPlaces': '路線最佳化至少需要兩個地點',
'dayplan.toast.routeOptimized': '路線已最佳化',
'dayplan.toast.routeOptimizedFromHotel': '已從你的住宿地點最佳化路線',
'dayplan.toast.noGeoPlaces': '未找到有座標的地點用於路線計算',
'dayplan.confirmed': '已確認',
'dayplan.pendingRes': '待確認',
@@ -30,6 +31,8 @@ const dayplan: TranslationStrings = {
'dayplan.confirmRemoveTimeBody':
'此地點有固定時間({time})。移動後將移除時間並允許自由排序。',
'dayplan.confirmRemoveTimeAction': '移除時間並移動',
'dayplan.confirmDeleteNoteTitle': '刪除筆記?',
'dayplan.confirmDeleteNoteBody': '此筆記將被永久刪除。',
'dayplan.cannotDropOnTimed': '無法將專案放置在有固定時間的條目之間',
'dayplan.cannotBreakChronology': '這將打亂已計劃專案和預訂的時間順序',
'dayplan.mobile.addPlace': '新增地點',