fix(bookings): keep the editor open until a booking's files are uploaded

Saving a booking or a transport closed the editor and reported success
before the travellers and picked files were written. A failed upload left
a booking without some of its PDFs, no list to retry from, and a create
form that would add a duplicate when saved again. On desktop a file picked
on an existing booking went up at once and vanished when that failed.

The planner's save now takes the editor's follow-up as a step it waits
for: it stores the booking, runs the traveller write and the uploads, and
only then says so and closes. Each file that lands leaves the list, so a
failure leaves exactly the files still to send, and the editor keeps the
stored booking so the retry updates it instead of creating another one,
without a second linked cost or stay. All four editors (desktop booking
and transport dialogs, both phone sheets) share this through
useBookingFollowUp, an import review only moves on once an item's files
are up, and desktop files picked on a saved booking wait for Update like
on the phone.

Closes #2883
This commit is contained in:
Maurice
2026-10-29 14:20:57 +01:00
parent 7d669cb5c3
commit b06e3e6266
47 changed files with 642 additions and 341 deletions
+1 -2
View File
@@ -77,8 +77,7 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': 'سيتم حذف "{name}" نهائيًا، مع التكاليف المرتبطة به.',
'reservations.toast.updated': 'تم تحديث الحجز',
'reservations.toast.removed': 'تم حذف الحجز',
'reservations.toast.fileUploaded': 'تم رفع الملف',
'reservations.toast.uploadError': 'فشل الرفع',
'reservations.toast.filesNotUploaded': 'تم حفظ الحجز، لكن تعذّر رفع بعض الملفات. احفظ مرة أخرى لإرسالها.',
'reservations.newTitle': 'حجز جديد',
'reservations.bookingType': 'نوع الحجز',
'reservations.titleLabel': 'العنوان',
+2 -2
View File
@@ -91,8 +91,8 @@ const reservations: TranslationStrings = {
'reservations.toast.updated': 'Rezervasiya yeniləndi',
'reservations.toast.removed': 'Rezervasiya silindi',
'reservations.toast.fileUploaded': 'Fayl yükləndi',
'reservations.toast.uploadError': 'Faylı yükləmək mümkün olmadı',
'reservations.toast.filesNotUploaded':
'Rezervasiya yadda saxlanıldı, lakin bəzi fayllar yüklənmədi. Onları göndərmək üçün yenidən yadda saxlayın.',
'reservations.newTitle': 'Yeni rezervasiya',
'reservations.bookingType': 'Rezervasiya növü',
+2 -2
View File
@@ -77,8 +77,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" e os custos vinculados serão excluídos permanentemente.',
'reservations.toast.updated': 'Reserva atualizada',
'reservations.toast.removed': 'Reserva excluída',
'reservations.toast.fileUploaded': 'Arquivo enviado',
'reservations.toast.uploadError': 'Falha no envio',
'reservations.toast.filesNotUploaded':
'A reserva foi salva, mas alguns arquivos não foram enviados. Salve novamente para enviá-los.',
'reservations.newTitle': 'Nova reserva',
'reservations.bookingType': 'Tipo de reserva',
'reservations.titleLabel': 'Título',
+2 -2
View File
@@ -46,8 +46,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': "« {name} » i els costos vinculats s'eliminaran permanentment.",
'reservations.toast.updated': 'Reserva actualitzada',
'reservations.toast.removed': 'Reserva eliminada',
'reservations.toast.fileUploaded': 'Fitxer pujat',
'reservations.toast.uploadError': "No s'ha pogut pujar",
'reservations.toast.filesNotUploaded':
"La reserva s'ha desat, però alguns fitxers no s'han pujat. Desa de nou per enviar-los.",
'reservations.newTitle': 'Reserva nova',
'reservations.bookingType': 'Tipus de reserva',
'reservations.titleLabel': 'Títol',
+2 -2
View File
@@ -77,8 +77,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '„{name}” bude trvale smazána i s propojenými náklady.',
'reservations.toast.updated': 'Rezervace aktualizována',
'reservations.toast.removed': 'Rezervace smazána',
'reservations.toast.fileUploaded': 'Soubor byl nahrán',
'reservations.toast.uploadError': 'Nahrávání se nezdařilo',
'reservations.toast.filesNotUploaded':
'Rezervace je uložená, ale některé soubory se nenahrály. Ulož znovu a odešli je.',
'reservations.newTitle': 'Nová rezervace',
'reservations.bookingType': 'Typ rezervace',
'reservations.titleLabel': 'Název',
+2 -2
View File
@@ -85,8 +85,8 @@ const reservations: TranslationStrings = {
'reservations.toast.updateError': 'Fehler beim Aktualisieren',
'reservations.toast.deleteError': 'Fehler beim Löschen',
'reservations.confirm.remove': 'Reservierung für "{name}" entfernen?',
'reservations.toast.fileUploaded': 'Datei hochgeladen',
'reservations.toast.uploadError': 'Fehler beim Hochladen',
'reservations.toast.filesNotUploaded':
'Die Buchung ist gespeichert, aber einige Dateien wurden nicht hochgeladen. Speichere erneut, um sie zu senden.',
'reservations.newTitle': 'Neue Buchung',
'reservations.bookingType': 'Art der Buchung',
'reservations.titleLabel': 'Titel',
+2 -2
View File
@@ -79,8 +79,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" will be permanently deleted, along with its linked costs.',
'reservations.toast.updated': 'Reservation updated',
'reservations.toast.removed': 'Reservation deleted',
'reservations.toast.fileUploaded': 'File uploaded',
'reservations.toast.uploadError': 'Failed to upload',
'reservations.toast.filesNotUploaded':
'The booking is saved, but some files did not upload. Save again to send them.',
'reservations.newTitle': 'New Reservation',
'reservations.bookingType': 'Booking Type',
'reservations.titleLabel': 'Title',
+2 -2
View File
@@ -46,8 +46,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '« {name} » y sus costes vinculados se eliminarán permanentemente.',
'reservations.toast.updated': 'Reserva actualizada',
'reservations.toast.removed': 'Reserva eliminada',
'reservations.toast.fileUploaded': 'Archivo subido',
'reservations.toast.uploadError': 'No se pudo subir',
'reservations.toast.filesNotUploaded':
'La reserva se ha guardado, pero algunos archivos no se subieron. Guarda de nuevo para enviarlos.',
'reservations.newTitle': 'Nueva reserva',
'reservations.bookingType': 'Tipo de reserva',
'reservations.titleLabel': 'Título',
+2 -2
View File
@@ -79,8 +79,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" kustutatakse jäädavalt koos sellega seotud kuludega.',
'reservations.toast.updated': 'Broneering uuendatud',
'reservations.toast.removed': 'Broneering kustutatud',
'reservations.toast.fileUploaded': 'Fail üles laaditud',
'reservations.toast.uploadError': 'Üleslaadimine ebaõnnestus',
'reservations.toast.filesNotUploaded':
'Broneering on salvestatud, kuid mõned failid jäid üles laadimata. Salvesta uuesti, et need saata.',
'reservations.newTitle': 'Uus broneering',
'reservations.bookingType': 'Broneeringu tüüp',
'reservations.titleLabel': 'Pealkiri',
+2 -2
View File
@@ -79,8 +79,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '« {name} » et ses coûts liés seront définitivement supprimés.',
'reservations.toast.updated': 'Réservation mise à jour',
'reservations.toast.removed': 'Réservation supprimée',
'reservations.toast.fileUploaded': 'Fichier importé',
'reservations.toast.uploadError': "Échec de l'import",
'reservations.toast.filesNotUploaded':
"La réservation est enregistrée, mais certains fichiers n'ont pas été importés. Enregistre à nouveau pour les envoyer.",
'reservations.newTitle': 'Nouvelle réservation',
'reservations.bookingType': 'Type de réservation',
'reservations.titleLabel': 'Titre',
+2 -2
View File
@@ -80,8 +80,8 @@ const reservations: TranslationStrings = {
'Η κράτηση "{name}" θα διαγραφεί οριστικά μαζί με τα συνδεδεμένα έξοδα.',
'reservations.toast.updated': 'Η κράτηση ενημερώθηκε',
'reservations.toast.removed': 'Η κράτηση διαγράφηκε',
'reservations.toast.fileUploaded': 'Το αρχείο μεταφορτώθηκε',
'reservations.toast.uploadError': 'Η μεταφόρτωση απέτυχε',
'reservations.toast.filesNotUploaded':
'Η κράτηση αποθηκεύτηκε, αλλά ορισμένα αρχεία δεν μεταφορτώθηκαν. Αποθήκευσε ξανά για να σταλούν.',
'reservations.newTitle': 'Νέα Κράτηση',
'reservations.bookingType': 'Τύπος Κράτησης',
'reservations.titleLabel': 'Τίτλος',
+2 -2
View File
@@ -79,8 +79,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" a hozzá kapcsolt költségekkel együtt véglegesen törlődik.',
'reservations.toast.updated': 'Foglalás frissítve',
'reservations.toast.removed': 'Foglalás törölve',
'reservations.toast.fileUploaded': 'Fájl feltöltve',
'reservations.toast.uploadError': 'Feltöltés sikertelen',
'reservations.toast.filesNotUploaded':
'A foglalás mentve, de néhány fájlt nem sikerült feltölteni. Mentsd újra, hogy elküldd őket.',
'reservations.newTitle': 'Új foglalás',
'reservations.bookingType': 'Foglalás típusa',
'reservations.titleLabel': 'Cím',
+2 -2
View File
@@ -78,8 +78,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" beserta biaya yang terkait akan dihapus permanen.',
'reservations.toast.updated': 'Reservasi diperbarui',
'reservations.toast.removed': 'Reservasi dihapus',
'reservations.toast.fileUploaded': 'File diunggah',
'reservations.toast.uploadError': 'Gagal mengunggah',
'reservations.toast.filesNotUploaded':
'Pemesanan sudah tersimpan, tetapi beberapa file gagal diunggah. Simpan lagi untuk mengirimnya.',
'reservations.newTitle': 'Reservasi Baru',
'reservations.bookingType': 'Jenis Pemesanan',
'reservations.titleLabel': 'Judul',
+2 -2
View File
@@ -78,8 +78,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" e i costi collegati verranno eliminati in modo permanente.',
'reservations.toast.updated': 'Prenotazione aggiornata',
'reservations.toast.removed': 'Prenotazione eliminata',
'reservations.toast.fileUploaded': 'File caricato',
'reservations.toast.uploadError': 'Impossibile caricare',
'reservations.toast.filesNotUploaded':
'La prenotazione è salvata, ma alcuni file non sono stati caricati. Salva di nuovo per inviarli.',
'reservations.newTitle': 'Nuova prenotazione',
'reservations.bookingType': 'Tipo di prenotazione',
'reservations.titleLabel': 'Titolo',
+2 -2
View File
@@ -77,8 +77,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '「{name}」と紐づいた費用は完全に削除されます。',
'reservations.toast.updated': '予約を更新しました',
'reservations.toast.removed': '予約を削除しました',
'reservations.toast.fileUploaded': 'ファイルをアップロードしました',
'reservations.toast.uploadError': 'アップロードに失敗しました',
'reservations.toast.filesNotUploaded':
'予約は保存されましたが、一部のファイルをアップロードできませんでした。もう一度保存すると送信されます。',
'reservations.newTitle': '新しい予約',
'reservations.bookingType': '予約タイプ',
'reservations.titleLabel': 'タイトル',
+2 -2
View File
@@ -77,8 +77,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}"과(와) 연결된 비용이 영구 삭제됩니다.',
'reservations.toast.updated': '예약이 업데이트되었습니다',
'reservations.toast.removed': '예약이 삭제되었습니다',
'reservations.toast.fileUploaded': '파일이 업로드되었습니다',
'reservations.toast.uploadError': '업로드 실패',
'reservations.toast.filesNotUploaded':
'예약은 저장되었지만 일부 파일이 업로드되지 않았습니다. 다시 저장하면 전송됩니다.',
'reservations.newTitle': '새 예약',
'reservations.bookingType': '예약 유형',
'reservations.titleLabel': '제목',
+2 -2
View File
@@ -78,8 +78,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" en de gekoppelde kosten worden permanent verwijderd.',
'reservations.toast.updated': 'Reservering bijgewerkt',
'reservations.toast.removed': 'Reservering verwijderd',
'reservations.toast.fileUploaded': 'Bestand geüpload',
'reservations.toast.uploadError': 'Uploaden mislukt',
'reservations.toast.filesNotUploaded':
'De boeking is opgeslagen, maar sommige bestanden zijn niet geüpload. Sla opnieuw op om ze te versturen.',
'reservations.newTitle': 'Nieuwe reservering',
'reservations.bookingType': 'Boekingstype',
'reservations.titleLabel': 'Titel',
+2 -2
View File
@@ -79,8 +79,8 @@ const reservations: TranslationStrings = {
'Rezerwacja "{name}" zostanie trwale usunięta wraz z powiązanymi kosztami.',
'reservations.toast.updated': 'Rezerwacja została zaktualizowana',
'reservations.toast.removed': 'Rezerwacja została usunięta',
'reservations.toast.fileUploaded': 'Plik został przesłany',
'reservations.toast.uploadError': 'Nie udało się przesłać pliku',
'reservations.toast.filesNotUploaded':
'Rezerwacja została zapisana, ale niektóre pliki nie zostały przesłane. Zapisz ponownie, aby je wysłać.',
'reservations.newTitle': 'Nowa rezerwacja',
'reservations.bookingType': 'Rodzaj rezerwacji',
'reservations.titleLabel': 'Tytuł',
+2 -2
View File
@@ -77,8 +77,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '«{name}» и связанные с ним расходы будут удалены навсегда.',
'reservations.toast.updated': 'Бронирование обновлено',
'reservations.toast.removed': 'Бронирование удалено',
'reservations.toast.fileUploaded': 'Файл загружен',
'reservations.toast.uploadError': 'Ошибка загрузки',
'reservations.toast.filesNotUploaded':
'Бронирование сохранено, но некоторые файлы не загрузились. Сохраните ещё раз, чтобы отправить их.',
'reservations.newTitle': 'Новое бронирование',
'reservations.bookingType': 'Тип бронирования',
'reservations.titleLabel': 'Название',
+2 -2
View File
@@ -80,8 +80,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '„{name}“ bude natrvalo odstránená spolu s prepojenými nákladmi.',
'reservations.toast.updated': 'Rezervácia aktualizovaná',
'reservations.toast.removed': 'Rezervácia odstránená',
'reservations.toast.fileUploaded': 'Súbor bol nahraný',
'reservations.toast.uploadError': 'Nahrávanie zlyhalo',
'reservations.toast.filesNotUploaded':
'Rezervácia je uložená, ale niektoré súbory sa nenahrali. Ulož znova a odošli ich.',
'reservations.newTitle': 'Nová rezervácia',
'reservations.bookingType': 'Typ rezervácie',
'reservations.titleLabel': 'Názov',
+2 -2
View File
@@ -78,8 +78,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" och de kopplade kostnaderna kommer att raderas permanent.',
'reservations.toast.updated': 'Bokning uppdaterad',
'reservations.toast.removed': 'Bokning borttagen',
'reservations.toast.fileUploaded': 'Fil uppladdad',
'reservations.toast.uploadError': 'Det gick inte att ladda upp',
'reservations.toast.filesNotUploaded':
'Bokningen är sparad, men vissa filer laddades inte upp. Spara igen för att skicka dem.',
'reservations.newTitle': 'Ny bokning',
'reservations.bookingType': 'Bokningstyp',
'reservations.titleLabel': 'Titel',
+2 -2
View File
@@ -79,8 +79,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" และค่าใช้จ่ายที่เชื่อมโยงไว้จะถูกลบอย่างถาวร',
'reservations.toast.updated': 'อัพเดตการจองแล้ว',
'reservations.toast.removed': 'ลบการจองแล้ว',
'reservations.toast.fileUploaded': 'อัปโหลดไฟล์แล้ว',
'reservations.toast.uploadError': 'ล้มเหลวในการอัปโหลด',
'reservations.toast.filesNotUploaded':
'บันทึกการจองแล้ว แต่บางไฟล์อัปโหลดไม่สำเร็จ บันทึกอีกครั้งเพื่อส่งไฟล์เหล่านั้น',
'reservations.newTitle': 'การจองใหม่',
'reservations.bookingType': 'ประเภทการจอง',
'reservations.titleLabel': 'ชื่อเรื่อง',
+2 -2
View File
@@ -78,8 +78,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" ve bağlı maliyetleri kalıcı olarak silinecek.',
'reservations.toast.updated': 'Rezervasyon güncellendi',
'reservations.toast.removed': 'Rezervasyon silindi',
'reservations.toast.fileUploaded': 'Dosya yüklendi',
'reservations.toast.uploadError': 'Yükleme başarısız oldu',
'reservations.toast.filesNotUploaded':
'Rezervasyon kaydedildi ancak bazı dosyalar yüklenemedi. Göndermek için yeniden kaydet.',
'reservations.newTitle': 'Yeni Rezervasyon',
'reservations.bookingType': 'Rezervasyon Türü',
'reservations.titleLabel': 'Başlık',
+2 -2
View File
@@ -77,8 +77,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '«{name}» і пов’язані з ним витрати буде видалено назавжди.',
'reservations.toast.updated': 'Бронювання оновлено',
'reservations.toast.removed': 'Бронювання видалено',
'reservations.toast.fileUploaded': 'Файл завантажено',
'reservations.toast.uploadError': 'Помилка завантаження',
'reservations.toast.filesNotUploaded':
'Бронювання збережено, але деякі файли не завантажилися. Збережіть ще раз, щоб надіслати їх.',
'reservations.newTitle': 'Нове бронювання',
'reservations.bookingType': 'Тип бронювання',
'reservations.titleLabel': 'Назва',
+2 -2
View File
@@ -78,8 +78,8 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" và các chi phí liên kết sẽ bị xóa vĩnh viễn.',
'reservations.toast.updated': 'Đã cập nhật đặt chỗ',
'reservations.toast.removed': 'Đã xóa đặt chỗ',
'reservations.toast.fileUploaded': 'Tệp đã được tải lên',
'reservations.toast.uploadError': 'Không thể tải lên',
'reservations.toast.filesNotUploaded':
'Đã lưu đặt chỗ, nhưng một số tệp chưa tải lên được. Hãy lưu lại để gửi chúng.',
'reservations.newTitle': 'Đặt chỗ mới',
'reservations.bookingType': 'Loại đặt chỗ',
'reservations.titleLabel': 'Tiêu đề',
+1 -2
View File
@@ -77,8 +77,7 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" 及其關聯的費用將被永久刪除。',
'reservations.toast.updated': '預訂已更新',
'reservations.toast.removed': '預訂已刪除',
'reservations.toast.fileUploaded': '檔案已上傳',
'reservations.toast.uploadError': '上傳失敗',
'reservations.toast.filesNotUploaded': '預訂已儲存,但部分檔案未能上傳。請再次儲存以傳送。',
'reservations.newTitle': '新建預訂',
'reservations.bookingType': '預訂型別',
'reservations.titleLabel': '標題',
+1 -2
View File
@@ -77,8 +77,7 @@ const reservations: TranslationStrings = {
'reservations.confirm.deleteBodyWithExpense': '"{name}" 及其关联的费用将被永久删除。',
'reservations.toast.updated': '预订已更新',
'reservations.toast.removed': '预订已删除',
'reservations.toast.fileUploaded': '文件已上传',
'reservations.toast.uploadError': '上传失败',
'reservations.toast.filesNotUploaded': '预订已保存,但部分文件未能上传。请再次保存以发送。',
'reservations.newTitle': '新建预订',
'reservations.bookingType': '预订类型',
'reservations.titleLabel': '标题',