mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
feat(journey): a trip can link a journal and open it to the members it picks
A trip can now show one journal from the Journey addon as its own: any journal its owner picks, and one journal on as many trips as they like. The trip members chosen for the link get into the journal as viewers or editors, see it in their own journal list and follow it live, for as long as the link holds them and they stay on the trip. That access is never copied into journey_contributors. It is read where journal access is read: the contributor repository answers with the stronger of a direct role and a link role, the journal list and the live update recipients take the link members in, and the photo access check goes the same way. Every one of those reads starts from linkReach, which only counts members still on the linking trip, so unlinking, deselecting someone and their leaving the trip all end exactly what the link gave. A member who leaves is also taken off the link, so coming back later does not quietly reopen the journal. Linking or changing the members takes the journal's owner and the new journal_link trip permission (trip owner by default); unlinking takes either. /api/trips/:tripId/journal answers the link as each member may see it, /candidates says who a journal would be opened to for the first time, and four MCP tools do the same over the same service. A trip:journal:changed event tells the trip to look again.
This commit is contained in:
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'التعاون (ملاحظات، استطلاعات، دردشة)',
|
||||
'perm.action.share_manage': 'إدارة روابط المشاركة',
|
||||
'perm.actionHint.trip_create': 'من يمكنه إنشاء رحلات جديدة',
|
||||
'perm.action.journal_link': 'ربط يوميات',
|
||||
'perm.actionHint.trip_edit': 'من يمكنه تغيير اسم الرحلة والتواريخ والوصف والعملة',
|
||||
'perm.actionHint.trip_delete': 'من يمكنه حذف رحلة نهائياً',
|
||||
'perm.actionHint.trip_archive': 'من يمكنه أرشفة أو إلغاء أرشفة رحلة',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'من يمكنه إدارة عناصر التعبئة والحقائب',
|
||||
'perm.actionHint.collab_edit': 'من يمكنه إنشاء ملاحظات واستطلاعات وإرسال رسائل',
|
||||
'perm.actionHint.share_manage': 'من يمكنه إنشاء أو حذف روابط المشاركة العامة',
|
||||
'perm.actionHint.journal_link': 'من يمكنه ربط يومية من Journey بالرحلة وفتحها لأعضائها',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Əməkdaşlıq (qeydlər, sorğular və çat)',
|
||||
'perm.action.share_manage': 'Paylaşma keçidlərini idarə etmək',
|
||||
'perm.actionHint.trip_create': 'Yeni səyahətləri kimin yarada biləcəyi',
|
||||
'perm.action.journal_link': 'Jurnal bağlamaq',
|
||||
'perm.actionHint.trip_edit': 'Səyahətin adını, tarixlərini, təsvirini və valyutasını kimin dəyişə biləcəyi',
|
||||
'perm.actionHint.trip_delete': 'Səyahəti kimin həmişəlik silə biləcəyi',
|
||||
'perm.actionHint.trip_archive': 'Səyahəti kimin arxivləşdirə və ya arxivdən çıxara biləcəyi',
|
||||
@@ -47,6 +48,7 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Baqaj elementlərini və çantaları kimin idarə edə biləcəyi',
|
||||
'perm.actionHint.collab_edit': 'Qeydləri və sorğuları kimin yarada və mesajları kimin göndərə biləcəyi',
|
||||
'perm.actionHint.share_manage': 'Açıq paylaşma keçidlərini kimin yarada və ya silə biləcəyi',
|
||||
'perm.actionHint.journal_link': 'Kim Journey-dən jurnalı səfərə bağlaya və onu üzvlərinə aça bilər',
|
||||
};
|
||||
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Colaboração (notas, enquetes, chat)',
|
||||
'perm.action.share_manage': 'Gerenciar links de compartilhamento',
|
||||
'perm.actionHint.trip_create': 'Quem pode criar novas viagens',
|
||||
'perm.action.journal_link': 'Vincular diário',
|
||||
'perm.actionHint.trip_edit': 'Quem pode alterar nome, datas, descrição e moeda da viagem',
|
||||
'perm.actionHint.trip_delete': 'Quem pode excluir permanentemente uma viagem',
|
||||
'perm.actionHint.trip_archive': 'Quem pode arquivar ou desarquivar uma viagem',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Quem pode gerenciar itens de bagagem e malas',
|
||||
'perm.actionHint.collab_edit': 'Quem pode criar notas, enquetes e enviar mensagens',
|
||||
'perm.actionHint.share_manage': 'Quem pode criar ou excluir links de compartilhamento públicos',
|
||||
'perm.actionHint.journal_link': 'Quem pode vincular um diário do Journey à viagem e abri-lo aos membros',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Col·laboració (notes, enquestes, xat)',
|
||||
'perm.action.share_manage': 'Gestiona els enllaços compartits',
|
||||
'perm.actionHint.trip_create': 'Permet crear viatges nous',
|
||||
'perm.action.journal_link': 'Enllaçar un diari',
|
||||
'perm.actionHint.trip_edit': 'Permet canviar el nom, les dates, la descripció i la moneda del viatge',
|
||||
'perm.actionHint.trip_delete': 'Permet eliminar permanentment un viatge',
|
||||
'perm.actionHint.trip_archive': "Permet arxivar o treure de l'arxiu un viatge",
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': "Permet gestionar els elements d'equipatge i les bosses",
|
||||
'perm.actionHint.collab_edit': 'Permet crear notes, enquestes i enviar missatges',
|
||||
'perm.actionHint.share_manage': 'Permet crear o eliminar enllaços públics compartits',
|
||||
'perm.actionHint.journal_link': 'Qui pot enllaçar un diari de Journey al viatge i obrir-lo als seus membres',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Spolupráce (poznámky, hlasování, chat)',
|
||||
'perm.action.share_manage': 'Spravovat odkazy ke sdílení',
|
||||
'perm.actionHint.trip_create': 'Kdo může vytvářet nové výlety',
|
||||
'perm.action.journal_link': 'Propojit deník',
|
||||
'perm.actionHint.trip_edit': 'Kdo může měnit název, data, popis a měnu výletu',
|
||||
'perm.actionHint.trip_delete': 'Kdo může trvale smazat výlet',
|
||||
'perm.actionHint.trip_archive': 'Kdo může archivovat nebo odarchivovat výlet',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Kdo může spravovat položky balení a tašky',
|
||||
'perm.actionHint.collab_edit': 'Kdo může vytvářet poznámky, hlasování a posílat zprávy',
|
||||
'perm.actionHint.share_manage': 'Kdo může vytvářet nebo mazat veřejné odkazy ke sdílení',
|
||||
'perm.actionHint.journal_link': 'Kdo může k cestě připojit deník z Journey a zpřístupnit ho jejím členům',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Zusammenarbeit (Notizen, Umfragen, Chat)',
|
||||
'perm.action.share_manage': 'Freigabelinks verwalten',
|
||||
'perm.actionHint.trip_create': 'Wer kann neue Reisen erstellen',
|
||||
'perm.action.journal_link': 'Journal verknüpfen',
|
||||
'perm.actionHint.trip_edit': 'Wer kann Reisename, Daten, Beschreibung und Währung ändern',
|
||||
'perm.actionHint.trip_delete': 'Wer kann eine Reise dauerhaft löschen',
|
||||
'perm.actionHint.trip_archive': 'Wer kann eine Reise archivieren oder dearchivieren',
|
||||
@@ -47,5 +48,7 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Wer kann Packstücke und Taschen verwalten',
|
||||
'perm.actionHint.collab_edit': 'Wer kann Notizen, Umfragen erstellen und Nachrichten senden',
|
||||
'perm.actionHint.share_manage': 'Wer kann öffentliche Freigabelinks erstellen oder löschen',
|
||||
'perm.actionHint.journal_link':
|
||||
'Wer ein Journal aus Journey mit dem Trip verknüpfen und für dessen Mitglieder öffnen kann',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Collaboration (notes, polls, chat)',
|
||||
'perm.action.share_manage': 'Manage share links',
|
||||
'perm.actionHint.trip_create': 'Who can create new trips',
|
||||
'perm.action.journal_link': 'Link a journal',
|
||||
'perm.actionHint.trip_edit': 'Who can change trip name, dates, description and currency',
|
||||
'perm.actionHint.trip_delete': 'Who can permanently delete a trip',
|
||||
'perm.actionHint.trip_archive': 'Who can archive or unarchive a trip',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Who can manage packing items and bags',
|
||||
'perm.actionHint.collab_edit': 'Who can create notes, polls and send messages',
|
||||
'perm.actionHint.share_manage': 'Who can create or delete public share links',
|
||||
'perm.actionHint.journal_link': 'Who can link a journal from Journey to the trip and open it to its members',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Colaboración (notas, encuestas, chat)',
|
||||
'perm.action.share_manage': 'Gestionar enlaces compartidos',
|
||||
'perm.actionHint.trip_create': 'Quién puede crear nuevos viajes',
|
||||
'perm.action.journal_link': 'Vincular un diario',
|
||||
'perm.actionHint.trip_edit': 'Quién puede cambiar el nombre, fechas, descripción y moneda del viaje',
|
||||
'perm.actionHint.trip_delete': 'Quién puede eliminar permanentemente un viaje',
|
||||
'perm.actionHint.trip_archive': 'Quién puede archivar o desarchivar un viaje',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Quién puede gestionar artículos de equipaje y bolsas',
|
||||
'perm.actionHint.collab_edit': 'Quién puede crear notas, encuestas y enviar mensajes',
|
||||
'perm.actionHint.share_manage': 'Quién puede crear o eliminar enlaces compartidos públicos',
|
||||
'perm.actionHint.journal_link': 'Quién puede vincular un diario de Journey al viaje y abrirlo a sus miembros',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Koostöö (märkmed, küsitlused, vestlus)',
|
||||
'perm.action.share_manage': 'Jagamislinkide haldus',
|
||||
'perm.actionHint.trip_create': 'Kes saab uusi reise luua',
|
||||
'perm.action.journal_link': 'Päeviku sidumine',
|
||||
'perm.actionHint.trip_edit': 'Kes saab muuta reisi nime, kuupäevi, kirjeldust ja valuutat',
|
||||
'perm.actionHint.trip_delete': 'Kes saab reisi jäädavalt kustutada',
|
||||
'perm.actionHint.trip_archive': 'Kes saab reisi arhiveerida või arhiivist taastada',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Kes saab hallata pakitavaid esemeid ja kotte',
|
||||
'perm.actionHint.collab_edit': 'Kes saab märkmeid ja küsitlusi luua ning sõnumeid saata',
|
||||
'perm.actionHint.share_manage': 'Kes saab avalikke jagamislinke luua või kustutada',
|
||||
'perm.actionHint.journal_link': 'Kes saab Journey päeviku reisiga siduda ja selle liikmetele avada',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Collaboration (notes, sondages, chat)',
|
||||
'perm.action.share_manage': 'Gérer les liens de partage',
|
||||
'perm.actionHint.trip_create': 'Qui peut créer de nouveaux voyages',
|
||||
'perm.action.journal_link': 'Lier un journal',
|
||||
'perm.actionHint.trip_edit': 'Qui peut modifier le nom, les dates, la description et la devise du voyage',
|
||||
'perm.actionHint.trip_delete': 'Qui peut supprimer définitivement un voyage',
|
||||
'perm.actionHint.trip_archive': 'Qui peut archiver ou désarchiver un voyage',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Qui peut gérer les articles de bagages et les sacs',
|
||||
'perm.actionHint.collab_edit': 'Qui peut créer des notes, des sondages et envoyer des messages',
|
||||
'perm.actionHint.share_manage': 'Qui peut créer ou supprimer des liens de partage publics',
|
||||
'perm.actionHint.journal_link': 'Qui peut lier un journal de Journey au voyage et l’ouvrir à ses membres',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Συνεργασία (σημειώσεις, δημοσκοπήσεις, συνομιλία)',
|
||||
'perm.action.share_manage': 'Διαχείριση συνδέσμων κοινής χρήσης',
|
||||
'perm.actionHint.trip_create': 'Ποιος μπορεί να δημιουργεί νέα ταξίδια',
|
||||
'perm.action.journal_link': 'Σύνδεση ημερολογίου',
|
||||
'perm.actionHint.trip_edit': 'Ποιος μπορεί να αλλάζει όνομα, ημερομηνίες, περιγραφή και νόμισμα ταξιδιού',
|
||||
'perm.actionHint.trip_delete': 'Ποιος μπορεί να διαγράφει οριστικά ένα ταξίδι',
|
||||
'perm.actionHint.trip_archive': 'Ποιος μπορεί να αρχειοθετεί ή να επαναφέρει ένα ταξίδι',
|
||||
@@ -47,5 +48,7 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Ποιος μπορεί να διαχειρίζεται αντικείμενα και τσάντες αποσκευών',
|
||||
'perm.actionHint.collab_edit': 'Ποιος μπορεί να δημιουργεί σημειώσεις, δημοσκοπήσεις και να στέλνει μηνύματα',
|
||||
'perm.actionHint.share_manage': 'Ποιος μπορεί να δημιουργεί ή να διαγράφει δημόσιους συνδέσμους κοινής χρήσης',
|
||||
'perm.actionHint.journal_link':
|
||||
'Ποιος μπορεί να συνδέσει ένα ημερολόγιο από το Journey με το ταξίδι και να το ανοίξει στα μέλη του',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Együttműködés (jegyzetek, szavazások, chat)',
|
||||
'perm.action.share_manage': 'Megosztási linkek kezelése',
|
||||
'perm.actionHint.trip_create': 'Ki hozhat létre új utazásokat',
|
||||
'perm.action.journal_link': 'Napló összekapcsolása',
|
||||
'perm.actionHint.trip_edit': 'Ki módosíthatja az utazás nevét, dátumait, leírását és pénznemét',
|
||||
'perm.actionHint.trip_delete': 'Ki törölhet véglegesen egy utazást',
|
||||
'perm.actionHint.trip_archive': 'Ki archiválhat vagy állíthat vissza egy utazást',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Ki kezelheti a csomagolási tételeket és táskákat',
|
||||
'perm.actionHint.collab_edit': 'Ki hozhat létre jegyzeteket, szavazásokat és küldhet üzeneteket',
|
||||
'perm.actionHint.share_manage': 'Ki hozhat létre vagy törölhet nyilvános megosztási linkeket',
|
||||
'perm.actionHint.journal_link': 'Ki kapcsolhat Journey-naplót az úthoz, és nyithatja meg a tagjai számára',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Kolaborasi (catatan, polling, chat)',
|
||||
'perm.action.share_manage': 'Kelola tautan berbagi',
|
||||
'perm.actionHint.trip_create': 'Siapa yang bisa membuat perjalanan baru',
|
||||
'perm.action.journal_link': 'Tautkan jurnal',
|
||||
'perm.actionHint.trip_edit': 'Siapa yang bisa mengubah nama, tanggal, deskripsi, dan mata uang perjalanan',
|
||||
'perm.actionHint.trip_delete': 'Siapa yang bisa menghapus perjalanan secara permanen',
|
||||
'perm.actionHint.trip_archive': 'Siapa yang bisa mengarsipkan atau membatalkan arsip perjalanan',
|
||||
@@ -47,5 +48,7 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Siapa yang bisa mengelola item perlengkapan dan tas',
|
||||
'perm.actionHint.collab_edit': 'Siapa yang bisa membuat catatan, polling, dan mengirim pesan',
|
||||
'perm.actionHint.share_manage': 'Siapa yang bisa membuat atau menghapus tautan berbagi publik',
|
||||
'perm.actionHint.journal_link':
|
||||
'Siapa yang dapat menautkan jurnal dari Journey ke perjalanan dan membukanya untuk anggotanya',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Collaborazione (note, sondaggi, chat)',
|
||||
'perm.action.share_manage': 'Gestire link di condivisione',
|
||||
'perm.actionHint.trip_create': 'Chi può creare nuovi viaggi',
|
||||
'perm.action.journal_link': 'Collega un diario',
|
||||
'perm.actionHint.trip_edit': 'Chi può modificare nome, date, descrizione e valuta del viaggio',
|
||||
'perm.actionHint.trip_delete': 'Chi può eliminare definitivamente un viaggio',
|
||||
'perm.actionHint.trip_archive': 'Chi può archiviare o dearchiviare un viaggio',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Chi può gestire articoli da bagaglio e borse',
|
||||
'perm.actionHint.collab_edit': 'Chi può creare note, sondaggi e inviare messaggi',
|
||||
'perm.actionHint.share_manage': 'Chi può creare o eliminare link di condivisione pubblici',
|
||||
'perm.actionHint.journal_link': 'Chi può collegare un diario di Journey al viaggio e aprirlo ai suoi membri',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'コラボ(メモ・投票・チャット)',
|
||||
'perm.action.share_manage': '共有リンクを管理',
|
||||
'perm.actionHint.trip_create': '新しい旅行を作成できる人',
|
||||
'perm.action.journal_link': 'ジャーナルをリンク',
|
||||
'perm.actionHint.trip_edit': '旅行名や日付などを変更できる人',
|
||||
'perm.actionHint.trip_delete': '旅行を完全に削除できる人',
|
||||
'perm.actionHint.trip_archive': '旅行をアーカイブできる人',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': '持ち物やバッグを管理できる人',
|
||||
'perm.actionHint.collab_edit': 'メモや投票、メッセージを作成できる人',
|
||||
'perm.actionHint.share_manage': '公開共有リンクを管理できる人',
|
||||
'perm.actionHint.journal_link': 'Journey のジャーナルを旅行にリンクし、メンバーに公開できる人',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': '협업 (메모, 투표, 채팅)',
|
||||
'perm.action.share_manage': '공유 링크 관리',
|
||||
'perm.actionHint.trip_create': '누가 새 여행을 만들 수 있는지',
|
||||
'perm.action.journal_link': '저널 연결',
|
||||
'perm.actionHint.trip_edit': '누가 여행 이름, 날짜, 설명, 통화를 변경할 수 있는지',
|
||||
'perm.actionHint.trip_delete': '누가 여행을 영구 삭제할 수 있는지',
|
||||
'perm.actionHint.trip_archive': '누가 여행을 보관하거나 복원할 수 있는지',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': '누가 짐 항목과 가방을 관리할 수 있는지',
|
||||
'perm.actionHint.collab_edit': '누가 메모, 투표를 만들고 메시지를 보낼 수 있는지',
|
||||
'perm.actionHint.share_manage': '누가 공개 공유 링크를 만들거나 삭제할 수 있는지',
|
||||
'perm.actionHint.journal_link': 'Journey의 저널을 여행에 연결하고 멤버에게 공개할 수 있는 사람',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Samenwerking (notities, polls, chat)',
|
||||
'perm.action.share_manage': 'Deellinks beheren',
|
||||
'perm.actionHint.trip_create': 'Wie kan nieuwe reizen aanmaken',
|
||||
'perm.action.journal_link': 'Dagboek koppelen',
|
||||
'perm.actionHint.trip_edit': 'Wie kan reisnaam, data, beschrijving en valuta wijzigen',
|
||||
'perm.actionHint.trip_delete': 'Wie kan een reis permanent verwijderen',
|
||||
'perm.actionHint.trip_archive': 'Wie kan een reis archiveren of dearchiveren',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Wie kan pakitems en tassen beheren',
|
||||
'perm.actionHint.collab_edit': 'Wie kan notities, polls aanmaken en berichten versturen',
|
||||
'perm.actionHint.share_manage': 'Wie kan openbare deellinks aanmaken of verwijderen',
|
||||
'perm.actionHint.journal_link': 'Wie een dagboek uit Journey aan de reis kan koppelen en voor de leden kan openen',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Współpraca',
|
||||
'perm.action.share_manage': 'Zarządzanie udostępnianiem',
|
||||
'perm.actionHint.trip_create': 'Kto może tworzyć nowe podróże',
|
||||
'perm.action.journal_link': 'Połącz dziennik',
|
||||
'perm.actionHint.trip_edit': 'Kto może edytować szczegóły podróży',
|
||||
'perm.actionHint.trip_delete': 'Kto może usunąć podróż',
|
||||
'perm.actionHint.trip_archive': 'Kto może archiwizować podróż',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Kto może zarządzać pakowaniem',
|
||||
'perm.actionHint.collab_edit': 'Kto może korzystać ze współpracy',
|
||||
'perm.actionHint.share_manage': 'Kto może zarządzać linkami',
|
||||
'perm.actionHint.journal_link': 'Kto może połączyć dziennik z Journey z podróżą i udostępnić go jej członkom',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Совместная работа (заметки, опросы, чат)',
|
||||
'perm.action.share_manage': 'Управлять ссылками для обмена',
|
||||
'perm.actionHint.trip_create': 'Кто может создавать новые поездки',
|
||||
'perm.action.journal_link': 'Привязать дневник',
|
||||
'perm.actionHint.trip_edit': 'Кто может менять название, даты, описание и валюту поездки',
|
||||
'perm.actionHint.trip_delete': 'Кто может безвозвратно удалить поездку',
|
||||
'perm.actionHint.trip_archive': 'Кто может архивировать или разархивировать поездку',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Кто может управлять вещами для сборов и сумками',
|
||||
'perm.actionHint.collab_edit': 'Кто может создавать заметки, опросы и отправлять сообщения',
|
||||
'perm.actionHint.share_manage': 'Кто может создавать или удалять публичные ссылки для обмена',
|
||||
'perm.actionHint.journal_link': 'Кто может привязать дневник из Journey к поездке и открыть его участникам',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Spolupráca (poznámky, hlasovania, chat)',
|
||||
'perm.action.share_manage': 'Spravovať odkazy na zdieľanie',
|
||||
'perm.actionHint.trip_create': 'Kto môže vytvárať nové výlety',
|
||||
'perm.action.journal_link': 'Prepojiť denník',
|
||||
'perm.actionHint.trip_edit': 'Kto môže meniť názov, dátumy, popis a menu výletu',
|
||||
'perm.actionHint.trip_delete': 'Kto môže trvalo zmazať výlet',
|
||||
'perm.actionHint.trip_archive': 'Kto môže archivovať alebo obnoviť výlet',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Kto môže spravovať položky balenia a tašky',
|
||||
'perm.actionHint.collab_edit': 'Kto môže vytvárať poznámky, hlasovania a posielať správy',
|
||||
'perm.actionHint.share_manage': 'Kto môže vytvárať alebo mazať verejné odkazy na zdieľanie',
|
||||
'perm.actionHint.journal_link': 'Kto môže k ceste pripojiť denník z Journey a sprístupniť ho jej členom',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Samarbete (anteckningar, omröstningar, chatt)',
|
||||
'perm.action.share_manage': 'Hantera delningslänkar',
|
||||
'perm.actionHint.trip_create': 'Vem kan skapa nya resor',
|
||||
'perm.action.journal_link': 'Koppla en dagbok',
|
||||
'perm.actionHint.trip_edit': 'Vem kan ändra resans namn, datum, beskrivning och valuta',
|
||||
'perm.actionHint.trip_delete': 'Vem kan radera en resa permanent',
|
||||
'perm.actionHint.trip_archive': 'Vem kan lägga till en resa i arkivet eller ta bort den därifrån',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Vem kan sköta packningen av föremål och väskor',
|
||||
'perm.actionHint.collab_edit': 'Vem kan skapa anteckningar, omröstningar och skicka meddelanden',
|
||||
'perm.actionHint.share_manage': 'Vem kan skapa eller ta bort länkar till offentliga delningar',
|
||||
'perm.actionHint.journal_link': 'Vem som kan koppla en dagbok från Journey till resan och öppna den för medlemmarna',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'การทำงานร่วมกัน (บันทึกย่อ โพล แชท)',
|
||||
'perm.action.share_manage': 'จัดการลิงก์แชร์',
|
||||
'perm.actionHint.trip_create': 'ใครสามารถสร้างทริปใหม่ได้',
|
||||
'perm.action.journal_link': 'เชื่อมโยงบันทึก',
|
||||
'perm.actionHint.trip_edit': 'ใครสามารถเปลี่ยนชื่อการเดินทาง วันที่ คำอธิบาย และสกุลเงินได้',
|
||||
'perm.actionHint.trip_delete': 'ใครสามารถลบการเดินทางได้อย่างถาวร',
|
||||
'perm.actionHint.trip_archive': 'ใครสามารถเก็บหรือยกเลิกการเก็บถาวรการเดินทาง',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'ใครสามารถจัดการบรรจุสิ่งของและถุงได้',
|
||||
'perm.actionHint.collab_edit': 'ใครสามารถสร้างบันทึก โพล และส่งข้อความได้',
|
||||
'perm.actionHint.share_manage': 'ใครสามารถสร้างหรือลบลิงก์แชร์สาธารณะได้',
|
||||
'perm.actionHint.journal_link': 'ใครสามารถเชื่อมโยงบันทึกจาก Journey กับทริปและเปิดให้สมาชิกเข้าถึงได้',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'İşbirliği (notlar, anketler, sohbet)',
|
||||
'perm.action.share_manage': 'Paylaşım bağlantılarını yönet',
|
||||
'perm.actionHint.trip_create': 'Kimler yeni seyahat oluşturabilir',
|
||||
'perm.action.journal_link': 'Günlük bağla',
|
||||
'perm.actionHint.trip_edit': 'Kimler seyahat adını, tarihlerini, açıklamasını ve para birimini değiştirebilir',
|
||||
'perm.actionHint.trip_delete': 'Kimler bir seyahati kalıcı olarak silebilir',
|
||||
'perm.actionHint.trip_archive': 'Kimler seyahati arşivleyebilir veya geri alabilir',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Kimler paket öğelerini ve çantaları yönetebilir',
|
||||
'perm.actionHint.collab_edit': 'Kimler not, anket oluşturabilir ve mesaj gönderebilir',
|
||||
'perm.actionHint.share_manage': 'Kimler genel paylaşım bağlantısı oluşturabilir veya silebilir',
|
||||
'perm.actionHint.journal_link': 'Journey’den bir günlüğü geziye kimin bağlayıp üyelerine açabileceği',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Співпраця (нотатки, опитування, чат)',
|
||||
'perm.action.share_manage': 'Керувати посиланнями для обміну',
|
||||
'perm.actionHint.trip_create': 'Хто може створювати нові поїздки',
|
||||
'perm.action.journal_link': 'Привʼязати щоденник',
|
||||
'perm.actionHint.trip_edit': 'Хто може змінювати назву, дати, опис і валюту поїздки',
|
||||
'perm.actionHint.trip_delete': 'Хто може безповоротно видалити поїздку',
|
||||
'perm.actionHint.trip_archive': 'Хто може архівувати або розархівувати поїздку',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Хто може керувати речами для зборів і сумками',
|
||||
'perm.actionHint.collab_edit': 'Хто може створювати нотатки, опитування та надсилати повідомлення',
|
||||
'perm.actionHint.share_manage': 'Хто може створювати або видаляти публічні посилання для обміну',
|
||||
'perm.actionHint.journal_link': 'Хто може привʼязати щоденник із Journey до подорожі й відкрити його учасникам',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': 'Cộng tác (ghi chú, thăm dò ý kiến, trò chuyện)',
|
||||
'perm.action.share_manage': 'Quản lý liên kết chia sẻ',
|
||||
'perm.actionHint.trip_create': 'Ai có thể tạo chuyến đi mới',
|
||||
'perm.action.journal_link': 'Liên kết nhật ký',
|
||||
'perm.actionHint.trip_edit': 'Ai có thể thay đổi tên chuyến đi, ngày tháng, mô tả và đơn vị tiền tệ',
|
||||
'perm.actionHint.trip_delete': 'Ai có thể xóa vĩnh viễn chuyến đi',
|
||||
'perm.actionHint.trip_archive': 'Ai có thể lưu trữ hoặc hủy lưu trữ chuyến đi',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': 'Ai có thể quản lý các mặt hàng đóng gói và túi xách',
|
||||
'perm.actionHint.collab_edit': 'Ai có thể tạo ghi chú, thăm dò ý kiến và gửi tin nhắn',
|
||||
'perm.actionHint.share_manage': 'Ai có thể tạo hoặc xóa liên kết chia sẻ công khai',
|
||||
'perm.actionHint.journal_link': 'Ai có thể liên kết một nhật ký từ Journey với chuyến đi và mở nó cho các thành viên',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': '協作(筆記、投票、聊天)',
|
||||
'perm.action.share_manage': '管理分享連結',
|
||||
'perm.actionHint.trip_create': '誰可以建立新旅行',
|
||||
'perm.action.journal_link': '連結日誌',
|
||||
'perm.actionHint.trip_edit': '誰可以更改旅行名稱、日期、描述和貨幣',
|
||||
'perm.actionHint.trip_delete': '誰可以永久刪除旅行',
|
||||
'perm.actionHint.trip_archive': '誰可以歸檔或取消歸檔旅行',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': '誰可以管理行李物品和包袋',
|
||||
'perm.actionHint.collab_edit': '誰可以建立筆記、投票和傳送訊息',
|
||||
'perm.actionHint.share_manage': '誰可以建立或刪除公開分享連結',
|
||||
'perm.actionHint.journal_link': '誰可以將 Journey 中的日誌連結到旅程並向成員開放',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -32,6 +32,7 @@ const perm: TranslationStrings = {
|
||||
'perm.action.collab_edit': '协作(笔记、投票、聊天)',
|
||||
'perm.action.share_manage': '管理分享链接',
|
||||
'perm.actionHint.trip_create': '谁可以创建新旅行',
|
||||
'perm.action.journal_link': '关联日志',
|
||||
'perm.actionHint.trip_edit': '谁可以更改旅行名称、日期、描述和货币',
|
||||
'perm.actionHint.trip_delete': '谁可以永久删除旅行',
|
||||
'perm.actionHint.trip_archive': '谁可以归档或取消归档旅行',
|
||||
@@ -47,5 +48,6 @@ const perm: TranslationStrings = {
|
||||
'perm.actionHint.packing_edit': '谁可以管理行李物品和包袋',
|
||||
'perm.actionHint.collab_edit': '谁可以创建笔记、投票和发送消息',
|
||||
'perm.actionHint.share_manage': '谁可以创建或删除公开分享链接',
|
||||
'perm.actionHint.journal_link': '谁可以将 Journey 中的日志关联到行程并向成员开放',
|
||||
};
|
||||
export default perm;
|
||||
|
||||
@@ -73,6 +73,7 @@ export * from './trip-invite/trip-invite.schema';
|
||||
export * from './collab/collab.schema';
|
||||
export * from './file/file.schema';
|
||||
export * from './journey/journey.schema';
|
||||
export * from './journey/trip-journal-link.schema';
|
||||
export * from './book/book.schema';
|
||||
export * from './book/journey-stats.schema';
|
||||
export * from './book/book-store.schema';
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
import { idSchema } from '../common/primitives.schema';
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
/**
|
||||
* A trip that shows one journal from the Journey addon as its own, reached at
|
||||
* `/api/trips/:tripId/journal`. The link belongs to the trip: any journal its
|
||||
* owner chooses, one journal on as many trips as they like. The trip members
|
||||
* chosen for it get into the journal as viewers or editors for as long as the
|
||||
* link holds them and they stay on the trip.
|
||||
*/
|
||||
|
||||
/** What a link lets a member do in its journal. */
|
||||
export const tripJournalLinkRoleSchema = z.enum(['viewer', 'editor']);
|
||||
export type TripJournalLinkRole = z.infer<typeof tripJournalLinkRoleSchema>;
|
||||
|
||||
/** One trip member the link lets in. */
|
||||
export const tripJournalLinkMemberRequestSchema = z.object({
|
||||
user_id: idSchema,
|
||||
role: tripJournalLinkRoleSchema,
|
||||
});
|
||||
export type TripJournalLinkMemberRequest = z.infer<typeof tripJournalLinkMemberRequestSchema>;
|
||||
|
||||
/** PUT: show this journal in the trip, to these members. Replaces a journal linked before. */
|
||||
export const tripJournalLinkRequestSchema = z.object({
|
||||
journey_id: idSchema,
|
||||
members: z.array(tripJournalLinkMemberRequestSchema).max(500),
|
||||
});
|
||||
export type TripJournalLinkRequest = z.infer<typeof tripJournalLinkRequestSchema>;
|
||||
|
||||
/** PATCH …/members: who the linked journal is open to, replacing the list. */
|
||||
export const tripJournalLinkMembersRequestSchema = z.object({
|
||||
members: z.array(tripJournalLinkMemberRequestSchema).max(500),
|
||||
});
|
||||
export type TripJournalLinkMembersRequest = z.infer<typeof tripJournalLinkMembersRequestSchema>;
|
||||
|
||||
/** GET …/candidates: whose access a journal would change, before it is linked. */
|
||||
export const tripJournalCandidatesQuerySchema = z.object({
|
||||
journey_id: z.coerce.number().int().positive(),
|
||||
});
|
||||
export type TripJournalCandidatesQuery = z.infer<typeof tripJournalCandidatesQuerySchema>;
|
||||
|
||||
/** Access to a journal as it stands: as its owner, a contributor or through a link. */
|
||||
export const tripJournalAccessRoleSchema = z.enum(['owner', 'editor', 'viewer']);
|
||||
export type TripJournalAccessRole = z.infer<typeof tripJournalAccessRoleSchema>;
|
||||
|
||||
export const tripJournalLinkMemberSchema = z.object({
|
||||
user_id: idSchema,
|
||||
username: z.string(),
|
||||
avatar_url: z.string().nullable(),
|
||||
role: tripJournalLinkRoleSchema,
|
||||
});
|
||||
export type TripJournalLinkMember = z.infer<typeof tripJournalLinkMemberSchema>;
|
||||
|
||||
/** The linked journal as the trip shows it. `members` only for someone who may change them. */
|
||||
export const tripJournalLinkSchema = z.object({
|
||||
journey_id: idSchema,
|
||||
title: z.string(),
|
||||
subtitle: z.string().nullable(),
|
||||
cover_image: z.string().nullable(),
|
||||
owner_id: idSchema,
|
||||
linked_by: idSchema.nullable(),
|
||||
created_at: z.number(),
|
||||
my_role: tripJournalAccessRoleSchema.nullable(),
|
||||
members: z.array(tripJournalLinkMemberSchema).nullable(),
|
||||
});
|
||||
export type TripJournalLink = z.infer<typeof tripJournalLinkSchema>;
|
||||
|
||||
/**
|
||||
* The trip's journal and what the caller may do with it. `link` is null without
|
||||
* one, and also for a caller the linked journal is closed to who may not manage
|
||||
* it: they see no journal in the trip at all.
|
||||
*/
|
||||
export const tripJournalLinkResponseSchema = z.object({
|
||||
link: tripJournalLinkSchema.nullable(),
|
||||
can_link: z.boolean(),
|
||||
can_unlink: z.boolean(),
|
||||
can_edit_members: z.boolean(),
|
||||
});
|
||||
export type TripJournalLinkResponse = z.infer<typeof tripJournalLinkResponseSchema>;
|
||||
|
||||
/** A trip member who could be let into a journal, with the access they hold there today. */
|
||||
export const tripJournalCandidateSchema = z.object({
|
||||
user_id: idSchema,
|
||||
username: z.string(),
|
||||
avatar_url: z.string().nullable(),
|
||||
is_trip_owner: z.boolean(),
|
||||
access: tripJournalAccessRoleSchema.nullable(),
|
||||
});
|
||||
export type TripJournalCandidate = z.infer<typeof tripJournalCandidateSchema>;
|
||||
|
||||
export const tripJournalCandidatesResponseSchema = z.object({
|
||||
candidates: z.array(tripJournalCandidateSchema),
|
||||
});
|
||||
export type TripJournalCandidatesResponse = z.infer<typeof tripJournalCandidatesResponseSchema>;
|
||||
@@ -56,6 +56,9 @@ export const PERMISSION_ACTIONS = [
|
||||
|
||||
// Share link management
|
||||
{ key: 'share_manage', defaultLevel: 'trip_owner', allowedLevels: ['trip_owner', 'trip_member'] },
|
||||
|
||||
// Linking a journal from the Journey addon, which opens it to the members chosen
|
||||
{ key: 'journal_link', defaultLevel: 'trip_owner', allowedLevels: ['trip_owner', 'trip_member'] },
|
||||
] as const satisfies readonly PermissionAction[];
|
||||
|
||||
/** The name of one configurable action, `'day_edit'`, `'budget_edit'`, … */
|
||||
|
||||
@@ -74,6 +74,7 @@ const FIXTURES: Record<TrekWsEventName, Record<string, unknown>> = {
|
||||
'trip:deleted': { id: 1 },
|
||||
'member:added': { member: { user_id: 2 } },
|
||||
'member:removed': { userId: 2 },
|
||||
'trip:journal:changed': {},
|
||||
'docsync:changed': { linkId: 4, pulled: 2, pushed: 1 },
|
||||
'file:created': { file: { id: 13 } },
|
||||
'file:updated': { file: { id: 13 } },
|
||||
|
||||
@@ -230,6 +230,9 @@ export const TREK_WS_EVENTS = {
|
||||
'trip:deleted': { scope: 'trip', payload: z.object({ id }) },
|
||||
'member:added': { scope: 'trip', payload: z.object({ member: entity }) },
|
||||
'member:removed': { scope: 'trip', payload: z.object({ userId: id }) },
|
||||
// The trip's linked journal changed. A signal only: what each member may see of
|
||||
// it differs, so every client asks for its own view of the link.
|
||||
'trip:journal:changed': { scope: 'trip', payload: empty },
|
||||
|
||||
// ── Files ────────────────────────────────────────────────────────────────
|
||||
'file:created': { scope: 'trip', payload: z.object({ file: entity }) },
|
||||
|
||||
Reference in New Issue
Block a user