@tekkare/romulus 0.1.261 → 0.1.263
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/layer/app/components/layout/viewEmptyState.vue +11 -2
- package/layer/app/components/panels/OipPanelProjects.vue +70 -21
- package/layer/app/components/project/AddButton.vue +127 -0
- package/layer/app/components/project/Banner.vue +68 -0
- package/layer/app/components/project/Dashboard.vue +85 -0
- package/layer/app/components/project/DiscardConfirm.vue +74 -0
- package/layer/app/components/project/Documents.vue +611 -0
- package/layer/app/components/project/Export.vue +205 -0
- package/layer/app/components/project/Inbox.vue +1241 -0
- package/layer/app/components/project/ListPage.vue +102 -0
- package/layer/app/components/project/NewButton.vue +147 -0
- package/layer/app/components/project/Notes.vue +1158 -0
- package/layer/app/components/project/Page.vue +820 -0
- package/layer/app/components/project/Share.vue +135 -0
- package/layer/app/components/project/Watch.vue +273 -0
- package/layer/app/composables/useOipProjectKinds.ts +71 -0
- package/layer/app/composables/useOipResourceHooks.ts +8 -3
- package/layer/app/composables/useProjectDashboard.ts +22 -0
- package/layer/app/composables/useProjects.ts +646 -0
- package/layer/app/oip-defaults/projects.ts +175 -0
- package/layer/app/pages/projects/[id].vue +8 -0
- package/layer/app/pages/projects/index.vue +8 -0
- package/layer/app/types/projects.ts +168 -0
- package/layer/app/utils/projectNoteWelcome.ts +137 -0
- package/layer/nuxt.config.ts +16 -0
- package/layer/server/api/oip/sharing/artifacts.get.ts +44 -0
- package/package.json +2 -1
|
@@ -0,0 +1,1241 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
ProjectInbox - l'Inbox du lecteur dans le projet, facon messagerie :
|
|
3
|
+
la liste des messages a gauche, le panneau de lecture toujours present a
|
|
4
|
+
droite. Sous 1100 px, l'un ou l'autre, avec un retour.
|
|
5
|
+
|
|
6
|
+
L'API ecrit les messages a chaque ouverture (ce qui s'est passe depuis la
|
|
7
|
+
derniere visite) et les garde : lus ou non, ils restent tant que le lecteur
|
|
8
|
+
ne les supprime pas. Les messages epingles restent en tete.
|
|
9
|
+
|
|
10
|
+
Un message resume, le panneau detaille :
|
|
11
|
+
- « Bienvenue dans votre projet ! » : a quoi sert un projet, onglet par
|
|
12
|
+
onglet, a la date ou le lecteur y est arrive ;
|
|
13
|
+
- « Margaux a ajoute 10 ressources » / « a depose 2 documents » : ce qu'un
|
|
14
|
+
autre membre a range, un message par personne, sa liste figee ;
|
|
15
|
+
- « 3 changements sur les fiches suivies » : ce que l'alerte a releve, un
|
|
16
|
+
message par jour, ses details copies ;
|
|
17
|
+
- « 4 nouvelles propositions du suivi » : un lot de nouveautes, dans leur
|
|
18
|
+
etat du moment ; celles en attente s'ajoutent ou s'ecartent. Ecarter est
|
|
19
|
+
definitif : l'API ne repropose jamais un document deja range, retire,
|
|
20
|
+
ajoute ou ecarte.
|
|
21
|
+
|
|
22
|
+
Le texte n'est pas stocke : il s'ecrit ici, dans la langue du lecteur.
|
|
23
|
+
|
|
24
|
+
Servi par le layer OIP (repris de France Augmented Science et d'OIP Case
|
|
25
|
+
Atlas). Le suivi de l'API ne propose que des documents du medicament : une
|
|
26
|
+
app qui cherche elle-meme des fiches liees (`useProjectSuggestions` de
|
|
27
|
+
#oip-app/projects) les ecrit cote client, dans un message `suggestions`
|
|
28
|
+
dont les ids commencent par `local:`. Leurs gestes remontent a la page
|
|
29
|
+
(`local-suggestion`), qui les range ou les ecarte.
|
|
30
|
+
|
|
31
|
+
Modele : la maquette « OIP Platform », onglet Inbox d'un projet (sans les
|
|
32
|
+
favoris : seule l'epingle met un message de cote).
|
|
33
|
+
-->
|
|
34
|
+
<template>
|
|
35
|
+
<div class="project_inbox_split" :class="{ 'is-reading': !!selected }">
|
|
36
|
+
<!-- La liste -->
|
|
37
|
+
<RmCard padding="none" class="project_inbox_col">
|
|
38
|
+
<div class="project_inbox_head">
|
|
39
|
+
<h2 class="project_inbox_title">Inbox</h2>
|
|
40
|
+
<p class="project_inbox_context">
|
|
41
|
+
{{
|
|
42
|
+
en
|
|
43
|
+
? "Agent results, alerts, additions to the project and uploaded documents."
|
|
44
|
+
: "Résultats d'agents, alertes, ajouts au projet et dépôts de documents."
|
|
45
|
+
}}
|
|
46
|
+
</p>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="project_inbox_tools">
|
|
50
|
+
<RmSegmented
|
|
51
|
+
v-model="filter"
|
|
52
|
+
:options="filterOptions"
|
|
53
|
+
size="sm"
|
|
54
|
+
block
|
|
55
|
+
:aria-label="en ? 'Filter the messages' : 'Filtrer les messages'"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div class="project_inbox_list">
|
|
60
|
+
<RmLoadingState v-if="loading && !lines.length" spinner :label="en ? 'Loading' : 'Chargement'" />
|
|
61
|
+
|
|
62
|
+
<p v-else-if="!shown.length" class="project_inbox_none">
|
|
63
|
+
<RmIcon name="Checks" :size="16" />
|
|
64
|
+
{{ en ? "Everything has been read" : "Tout est lu" }}
|
|
65
|
+
</p>
|
|
66
|
+
|
|
67
|
+
<template v-for="part in parts" v-else :key="part.key">
|
|
68
|
+
<p v-if="part.label" class="project_inbox_group">
|
|
69
|
+
<RmIcon v-if="part.key === 'pinned'" name="PushPin" weight="fill" :size="12" />
|
|
70
|
+
{{ part.label }}
|
|
71
|
+
</p>
|
|
72
|
+
<ol class="project_inbox">
|
|
73
|
+
<li
|
|
74
|
+
v-for="line in part.lines"
|
|
75
|
+
:key="line.item.id"
|
|
76
|
+
class="project_inbox_item"
|
|
77
|
+
:class="{ 'is-unread': !line.item.readAt, 'is-active': line.item.id === selectedId }"
|
|
78
|
+
>
|
|
79
|
+
<span class="project_inbox_ico" aria-hidden="true">
|
|
80
|
+
<RmIcon :name="line.icon" :size="16" />
|
|
81
|
+
</span>
|
|
82
|
+
<!-- Le texte du message est le bouton d'ouverture. -->
|
|
83
|
+
<button type="button" class="project_inbox_txt" @click="openLine(line)">
|
|
84
|
+
<span class="project_inbox_line_title">{{ line.title }}</span>
|
|
85
|
+
<span v-if="line.body" class="project_inbox_body">{{ line.body }}</span>
|
|
86
|
+
</button>
|
|
87
|
+
<span class="project_inbox_side">
|
|
88
|
+
<time class="project_inbox_date" :datetime="line.item.occurredAt">{{ formatDate(line.item.occurredAt) }}</time>
|
|
89
|
+
<RmButton
|
|
90
|
+
variant="tertiary"
|
|
91
|
+
size="sm"
|
|
92
|
+
icon-only
|
|
93
|
+
ghost
|
|
94
|
+
class="project_inbox_flag"
|
|
95
|
+
:class="{ 'is-on': !!line.item.pinnedAt }"
|
|
96
|
+
:aria-pressed="!!line.item.pinnedAt"
|
|
97
|
+
:aria-label="pinLabel(line.item)"
|
|
98
|
+
:title="pinLabel(line.item)"
|
|
99
|
+
@click="emit('pin', line.item)"
|
|
100
|
+
>
|
|
101
|
+
<!-- Pleine quand le message est epingle : l'etat se lit sans survol. -->
|
|
102
|
+
<RmIcon name="PushPin" :weight="line.item.pinnedAt ? 'fill' : 'regular'" :size="14" />
|
|
103
|
+
</RmButton>
|
|
104
|
+
</span>
|
|
105
|
+
</li>
|
|
106
|
+
</ol>
|
|
107
|
+
</template>
|
|
108
|
+
</div>
|
|
109
|
+
</RmCard>
|
|
110
|
+
|
|
111
|
+
<!-- Le panneau de lecture -->
|
|
112
|
+
<RmCard padding="none" class="project_reader">
|
|
113
|
+
<div v-if="!selected" class="project_reader_empty">
|
|
114
|
+
<RmIcon name="EnvelopeOpen" :size="40" />
|
|
115
|
+
<p class="project_reader_empty_title">{{ en ? "Select a message" : "Sélectionnez un message" }}</p>
|
|
116
|
+
<p>{{ en ? "It will show here, without leaving the Inbox." : "Il s'affichera ici, sans quitter l'Inbox." }}</p>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<template v-else>
|
|
120
|
+
<div class="project_reader_head">
|
|
121
|
+
<RmButton
|
|
122
|
+
variant="tertiary"
|
|
123
|
+
size="sm"
|
|
124
|
+
icon-only
|
|
125
|
+
ghost
|
|
126
|
+
prefix-icon="ArrowLeft"
|
|
127
|
+
class="project_reader_back"
|
|
128
|
+
:aria-label="en ? 'Back to the list' : 'Retour à la liste'"
|
|
129
|
+
@click="close"
|
|
130
|
+
/>
|
|
131
|
+
<span class="project_inbox_ico" aria-hidden="true">
|
|
132
|
+
<RmIcon :name="selected.icon" :size="16" />
|
|
133
|
+
</span>
|
|
134
|
+
<div class="project_reader_txt">
|
|
135
|
+
<p class="project_reader_title">{{ selected.title }}</p>
|
|
136
|
+
<p class="project_reader_context">{{ selected.context }}</p>
|
|
137
|
+
</div>
|
|
138
|
+
<div class="project_reader_tools">
|
|
139
|
+
<RmButton
|
|
140
|
+
v-for="tool in readerTools"
|
|
141
|
+
:key="tool.key"
|
|
142
|
+
variant="tertiary"
|
|
143
|
+
size="sm"
|
|
144
|
+
icon-only
|
|
145
|
+
ghost
|
|
146
|
+
:class="{ 'is-on': tool.on }"
|
|
147
|
+
:disabled="tool.disabled"
|
|
148
|
+
:aria-pressed="tool.on ?? undefined"
|
|
149
|
+
:aria-label="tool.label"
|
|
150
|
+
:title="tool.label"
|
|
151
|
+
@click="tool.run"
|
|
152
|
+
>
|
|
153
|
+
<RmIcon :name="tool.icon" :weight="tool.on ? 'fill' : 'regular'" :size="14" />
|
|
154
|
+
</RmButton>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
<div class="project_msg">
|
|
159
|
+
<p class="project_msg_text">{{ selected.text }}</p>
|
|
160
|
+
|
|
161
|
+
<!-- Recapitulatif cle / valeur -->
|
|
162
|
+
<div v-if="selected.recap.length" class="project_recap">
|
|
163
|
+
<div v-for="row in selected.recap" :key="row.key" class="project_recap_row">
|
|
164
|
+
<RmIcon :name="row.icon" :size="16" />
|
|
165
|
+
<div>
|
|
166
|
+
<p class="project_recap_k">{{ row.key }}</p>
|
|
167
|
+
<p class="project_recap_v">{{ row.value }}</p>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<!-- Fiches ou documents ranges par un membre -->
|
|
173
|
+
<template v-if="selected.item.kind === 'resources' || selected.item.kind === 'documents'">
|
|
174
|
+
<h3 class="project_msg_h">
|
|
175
|
+
{{ selected.item.kind === "documents" ? (selected.rows.every((row) => row.type === "SharedArtifact") ? (en ? "Documents shared" : "Documents partagés") : en ? "Documents uploaded" : "Documents déposés") : en ? "Resources added" : "Ressources ajoutées" }}
|
|
176
|
+
<span class="project_msg_n">{{ selected.rows.length }}</span>
|
|
177
|
+
</h3>
|
|
178
|
+
<ol class="project_res_list">
|
|
179
|
+
<li v-for="row in selected.rows" :key="`${row.type}-${row.id}`">
|
|
180
|
+
<component
|
|
181
|
+
:is="row.filed ? 'button' : 'div'"
|
|
182
|
+
:type="row.filed ? 'button' : undefined"
|
|
183
|
+
class="project_res_item"
|
|
184
|
+
:class="{ 'is-link': row.filed, 'is-archived': !row.filed }"
|
|
185
|
+
@click="row.filed && emit('open-resource', row)"
|
|
186
|
+
>
|
|
187
|
+
<span class="project_res_ico" aria-hidden="true"><RmIcon :name="row.icon" :size="17" /></span>
|
|
188
|
+
<span class="project_res_txt">
|
|
189
|
+
<span class="project_res_title">{{ row.label }}</span>
|
|
190
|
+
<span v-if="row.subtitle" class="project_res_sub">{{ row.subtitle }}</span>
|
|
191
|
+
<span class="project_res_src">{{ formatDate(row.addedAt) }}</span>
|
|
192
|
+
</span>
|
|
193
|
+
<RmBadge v-if="row.type !== 'UploadedDocument'" variant="info">{{ row.family }}</RmBadge>
|
|
194
|
+
</component>
|
|
195
|
+
</li>
|
|
196
|
+
</ol>
|
|
197
|
+
</template>
|
|
198
|
+
|
|
199
|
+
<!-- Changements releves par l'alerte du projet -->
|
|
200
|
+
<template v-else-if="selected.item.kind === 'changes'">
|
|
201
|
+
<h3 class="project_msg_h">
|
|
202
|
+
{{ en ? "Changes" : "Changements" }}
|
|
203
|
+
<span class="project_msg_n">{{ selected.item.payload?.events?.length ?? 0 }}</span>
|
|
204
|
+
</h3>
|
|
205
|
+
<ol class="project_res_list">
|
|
206
|
+
<li v-for="change in selected.item.payload?.events ?? []" :key="change.id">
|
|
207
|
+
<button type="button" class="project_res_item is-link" @click="emit('open-change', change)">
|
|
208
|
+
<span class="project_res_ico" aria-hidden="true">
|
|
209
|
+
<RmIcon :name="CHANGE_ICON[change.kind] ?? 'Bell'" :size="17" />
|
|
210
|
+
</span>
|
|
211
|
+
<span class="project_res_txt">
|
|
212
|
+
<span class="project_res_title">{{ change.title }}</span>
|
|
213
|
+
<span v-for="text in changeLines(change)" :key="text" class="project_res_sub">{{ text }}</span>
|
|
214
|
+
</span>
|
|
215
|
+
</button>
|
|
216
|
+
</li>
|
|
217
|
+
</ol>
|
|
218
|
+
</template>
|
|
219
|
+
|
|
220
|
+
<!-- Bienvenue : ce que fait un projet, onglet par onglet -->
|
|
221
|
+
<div v-else-if="selected.item.kind === 'welcome'" class="project_recap">
|
|
222
|
+
<div v-for="step in welcomeSteps" :key="step.title" class="project_recap_row">
|
|
223
|
+
<RmIcon :name="step.icon" :size="16" />
|
|
224
|
+
<div>
|
|
225
|
+
<p class="project_recap_k">{{ step.title }}</p>
|
|
226
|
+
<p class="project_recap_v project_recap_v--text">{{ step.text }}</p>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
<!-- Propositions du suivi : ajouter ou ecarter celles en attente -->
|
|
232
|
+
<template v-else-if="selected.item.kind === 'suggestions'">
|
|
233
|
+
<template v-if="cardsOf(selected.item).length">
|
|
234
|
+
<h3 class="project_msg_h">
|
|
235
|
+
{{ en ? "Related suggestions" : "Propositions liées" }}
|
|
236
|
+
<span class="project_msg_n">{{ cardsOf(selected.item).length }}</span>
|
|
237
|
+
</h3>
|
|
238
|
+
<article v-for="card in cardsOf(selected.item)" :key="card.id" class="project_card">
|
|
239
|
+
<div class="project_res_item">
|
|
240
|
+
<span class="project_res_ico" aria-hidden="true"><RmIcon name="Atom" :size="17" /></span>
|
|
241
|
+
<span class="project_res_txt">
|
|
242
|
+
<span class="project_res_title">{{ moleculeTitle(card) }}</span>
|
|
243
|
+
<span v-if="card.reason?.label" class="project_res_sub">{{ card.reason.label }}</span>
|
|
244
|
+
</span>
|
|
245
|
+
<RmBadge v-if="card.status !== 'pending'" :variant="card.status === 'added' ? 'active' : 'grey'">
|
|
246
|
+
{{ statusLabel(card.status) }}
|
|
247
|
+
</RmBadge>
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
<template v-if="card.status === 'pending'">
|
|
251
|
+
<div class="project_card_children">
|
|
252
|
+
<RmCheckbox
|
|
253
|
+
v-for="child in card.children ?? []"
|
|
254
|
+
:key="child.id"
|
|
255
|
+
:model-value="isChecked(card.id, child.id)"
|
|
256
|
+
:label="child.title || child.resourceId"
|
|
257
|
+
:description="childDescription(child)"
|
|
258
|
+
@update:model-value="(value: boolean) => setChecked(card.id, child.id, value)"
|
|
259
|
+
/>
|
|
260
|
+
</div>
|
|
261
|
+
<div class="project_card_actions">
|
|
262
|
+
<RmButton
|
|
263
|
+
variant="secondary"
|
|
264
|
+
size="sm"
|
|
265
|
+
prefix-icon="Plus"
|
|
266
|
+
:disabled="!checkedOf(card).length"
|
|
267
|
+
:loading="busy === card.id"
|
|
268
|
+
@click="accept(card, checkedOf(card))"
|
|
269
|
+
>
|
|
270
|
+
{{ en ? `Add the selection (${checkedOf(card).length})` : `Ajouter la sélection (${checkedOf(card).length})` }}
|
|
271
|
+
</RmButton>
|
|
272
|
+
<RmButton variant="tertiary" size="sm" prefix-icon="X" :disabled="busy === card.id" @click="dismiss(card)">
|
|
273
|
+
{{ en ? "Dismiss the suggestion" : "Écarter la proposition" }}
|
|
274
|
+
</RmButton>
|
|
275
|
+
</div>
|
|
276
|
+
</template>
|
|
277
|
+
</article>
|
|
278
|
+
</template>
|
|
279
|
+
|
|
280
|
+
<template v-for="group in suggestionGroups(selected.item)" :key="group.type">
|
|
281
|
+
<h3 class="project_msg_h">
|
|
282
|
+
{{ group.label }}
|
|
283
|
+
<span class="project_msg_n">{{ group.items.length }}</span>
|
|
284
|
+
</h3>
|
|
285
|
+
<ol class="project_res_list">
|
|
286
|
+
<li v-for="item in group.items" :key="item.id">
|
|
287
|
+
<div class="project_res_item">
|
|
288
|
+
<span class="project_res_ico" aria-hidden="true"><RmIcon :name="group.icon" :size="17" /></span>
|
|
289
|
+
<span class="project_res_txt">
|
|
290
|
+
<span class="project_res_title">{{ item.title || item.resourceId }}</span>
|
|
291
|
+
<span v-if="item.subtitle" class="project_res_sub">{{ item.subtitle }}</span>
|
|
292
|
+
<span v-if="item.reason?.label" class="project_res_src">{{ item.reason.label }}</span>
|
|
293
|
+
</span>
|
|
294
|
+
<span v-if="item.status === 'pending'" class="project_card_actions project_card_actions--inline">
|
|
295
|
+
<RmButton variant="secondary" size="sm" prefix-icon="Plus" :loading="busy === item.id" @click="accept(item)">
|
|
296
|
+
{{ en ? "Add" : "Ajouter" }}
|
|
297
|
+
</RmButton>
|
|
298
|
+
<RmButton variant="tertiary" size="sm" prefix-icon="X" :disabled="busy === item.id" @click="dismiss(item)">
|
|
299
|
+
{{ en ? "Dismiss" : "Écarter" }}
|
|
300
|
+
</RmButton>
|
|
301
|
+
</span>
|
|
302
|
+
<RmBadge v-else :variant="item.status === 'added' ? 'active' : 'grey'">{{ statusLabel(item.status) }}</RmBadge>
|
|
303
|
+
</div>
|
|
304
|
+
</li>
|
|
305
|
+
</ol>
|
|
306
|
+
</template>
|
|
307
|
+
</template>
|
|
308
|
+
|
|
309
|
+
<div v-if="selected.actions.length" class="project_msg_actions">
|
|
310
|
+
<RmButton
|
|
311
|
+
v-for="(action, index) in selected.actions"
|
|
312
|
+
:key="action.label"
|
|
313
|
+
:variant="index === 0 ? 'primary' : 'secondary'"
|
|
314
|
+
size="sm"
|
|
315
|
+
:prefix-icon="action.icon"
|
|
316
|
+
@click="action.run"
|
|
317
|
+
>
|
|
318
|
+
{{ action.label }}
|
|
319
|
+
</RmButton>
|
|
320
|
+
</div>
|
|
321
|
+
</div>
|
|
322
|
+
</template>
|
|
323
|
+
</RmCard>
|
|
324
|
+
</div>
|
|
325
|
+
</template>
|
|
326
|
+
|
|
327
|
+
<script setup lang="ts">
|
|
328
|
+
import { useOipApi } from "#oip-app/api";
|
|
329
|
+
import { oipSnackbar } from "#oip-app/ui";
|
|
330
|
+
import type { ProjectInboxChange, ProjectInboxItem, ProjectSuggestion } from "../../types/projects";
|
|
331
|
+
|
|
332
|
+
type Described = { label: string; subtitle: string; path: string; icon: string; family: string; filed: boolean };
|
|
333
|
+
type Row = Described & { type: string; id: string; addedAt: string };
|
|
334
|
+
|
|
335
|
+
type Line = {
|
|
336
|
+
item: ProjectInboxItem;
|
|
337
|
+
icon: string;
|
|
338
|
+
title: string;
|
|
339
|
+
body: string;
|
|
340
|
+
/** Sous le titre du panneau : la nature du message et sa date. */
|
|
341
|
+
context: string;
|
|
342
|
+
/** Premiere phrase du panneau. */
|
|
343
|
+
text: string;
|
|
344
|
+
recap: Array<{ key: string; value: string; icon: string }>;
|
|
345
|
+
rows: Row[];
|
|
346
|
+
actions: Array<{ label: string; icon: string; run: () => void }>;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
const props = defineProps<{
|
|
350
|
+
projectId: string;
|
|
351
|
+
items: ProjectInboxItem[];
|
|
352
|
+
loading: boolean;
|
|
353
|
+
/** Nomme une fiche comme l'onglet Ressources : la page la connait deja. */
|
|
354
|
+
describe: (type: string, id: string, title?: string | null) => Described;
|
|
355
|
+
}>();
|
|
356
|
+
|
|
357
|
+
const emit = defineEmits<{
|
|
358
|
+
/** Une proposition a ete tranchee ; `added` quand des fiches sont entrees au projet. */
|
|
359
|
+
changed: [added: boolean];
|
|
360
|
+
/** Un message ouvert : la page le marque lu. */
|
|
361
|
+
open: [item: ProjectInboxItem];
|
|
362
|
+
/** « Marquer comme non lu ». */
|
|
363
|
+
unread: [item: ProjectInboxItem];
|
|
364
|
+
pin: [item: ProjectInboxItem];
|
|
365
|
+
remove: [item: ProjectInboxItem];
|
|
366
|
+
/** Une fiche ou un document d'un message, a ouvrir. */
|
|
367
|
+
"open-resource": [row: Row];
|
|
368
|
+
"open-change": [change: ProjectInboxChange];
|
|
369
|
+
/** Un onglet du projet a ouvrir (« Voir dans Ressources »). */
|
|
370
|
+
tab: [key: string];
|
|
371
|
+
/** La page des notes ou l'on a ete mentionne. */
|
|
372
|
+
"open-note": [noteId: string];
|
|
373
|
+
/** Une fiche liee proposee par l'app (id `local:`) : la page la range ou l'ecarte. */
|
|
374
|
+
"local-suggestion": [action: "accept" | "dismiss", item: ProjectSuggestion];
|
|
375
|
+
}>();
|
|
376
|
+
|
|
377
|
+
const { locale } = useI18n();
|
|
378
|
+
const en = computed(() => locale.value === "en");
|
|
379
|
+
/** La famille d'une fiche ; inconnue (une marque rangee depuis une autre app), la ligne garde son type. */
|
|
380
|
+
const kinds = useOipProjectKinds();
|
|
381
|
+
const kindOf = (type: string) => kinds.find((kind) => kind.type === type);
|
|
382
|
+
const order = kinds.map((kind) => kind.type);
|
|
383
|
+
|
|
384
|
+
const CHANGE_ICON: Record<string, string> = {
|
|
385
|
+
changed: "ArrowsClockwise",
|
|
386
|
+
appeared: "Plus",
|
|
387
|
+
disappeared: "MinusCircle",
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
/** « 1 ressource », « 10 ressources ». */
|
|
391
|
+
const count = (n: number, one: string, many: string) => `${n} ${n > 1 ? many : one}`;
|
|
392
|
+
|
|
393
|
+
/** « NCT01234567, PHRC-K 2023 et 3 autres » : de quoi reconnaitre la ligne sans l'ouvrir. */
|
|
394
|
+
function preview(names: string[]) {
|
|
395
|
+
const shown = names.slice(0, 2).join(", ");
|
|
396
|
+
const rest = names.length - 2;
|
|
397
|
+
if (rest <= 0) return shown;
|
|
398
|
+
return en.value ? `${shown} and ${rest} more` : `${shown} et ${rest} ${rest > 1 ? "autres" : "autre"}`;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
const formatDate = (value: string) =>
|
|
402
|
+
value ? new Date(value).toLocaleDateString(en.value ? "en-GB" : "fr-FR", { day: "numeric", month: "long", year: "numeric" }) : "";
|
|
403
|
+
|
|
404
|
+
const pinLabel = (item: ProjectInboxItem) =>
|
|
405
|
+
item.pinnedAt ? (en.value ? "Unpin" : "Désépingler") : en.value ? "Pin to the top of the Inbox" : "Épingler en haut de l'Inbox";
|
|
406
|
+
|
|
407
|
+
/** Les familles d'une liste de fiches : « 6 Essais NCT, 4 Publications ». */
|
|
408
|
+
function familiesOf(rows: Row[]) {
|
|
409
|
+
const families = new Map<string, number>();
|
|
410
|
+
for (const row of rows) families.set(row.family, (families.get(row.family) ?? 0) + 1);
|
|
411
|
+
return [...families].sort((a, b) => b[1] - a[1]).map(([family, k]) => `${k} ${family}`).join(", ");
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/** Le message, ecrit dans la langue du lecteur. */
|
|
415
|
+
function lineOf(item: ProjectInboxItem): Line {
|
|
416
|
+
const who = item.actorName || (en.value ? "A member" : "Un membre");
|
|
417
|
+
const when = formatDate(item.occurredAt);
|
|
418
|
+
const rows: Row[] = (item.payload?.items ?? []).map((entry) => ({
|
|
419
|
+
type: entry.resourceType,
|
|
420
|
+
id: entry.resourceId,
|
|
421
|
+
addedAt: entry.addedAt,
|
|
422
|
+
...props.describe(entry.resourceType, entry.resourceId, entry.title),
|
|
423
|
+
}));
|
|
424
|
+
const base = { item, rows, recap: [] as Line["recap"], actions: [] as Line["actions"] };
|
|
425
|
+
|
|
426
|
+
if (item.kind === "welcome") {
|
|
427
|
+
return {
|
|
428
|
+
...base,
|
|
429
|
+
icon: "HandWaving",
|
|
430
|
+
title: en.value ? "Welcome to your project!" : "Bienvenue dans votre projet !",
|
|
431
|
+
body: en.value
|
|
432
|
+
? "A project gathers the records of one subject, and keeps them up to date for you."
|
|
433
|
+
: "Un projet rassemble les fiches d'un même sujet, et les tient à jour pour vous.",
|
|
434
|
+
context: `${en.value ? "Project" : "Projet"} · ${when}`,
|
|
435
|
+
text: en.value
|
|
436
|
+
? "Use it to follow a subject over time, alone or with colleagues: the records stay in one place, and the project tells you what moves."
|
|
437
|
+
: "Il sert à suivre un sujet dans la durée, seul ou à plusieurs : les fiches restent au même endroit, et le projet vous dit ce qui bouge.",
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
if (item.kind === "resources" || item.kind === "documents") {
|
|
442
|
+
const docs = item.kind === "documents";
|
|
443
|
+
// Un livrable share-platform n'est pas depose mais partage avec le projet.
|
|
444
|
+
const sharedDocs = docs && rows.length > 0 && rows.every((row) => row.type === "SharedArtifact");
|
|
445
|
+
const n = rows.length;
|
|
446
|
+
const what = docs ? count(n, "document", "documents") : en.value ? count(n, "resource", "resources") : count(n, "ressource", "ressources");
|
|
447
|
+
const title = sharedDocs
|
|
448
|
+
? en.value ? `${who} shared ${what}` : `${who} a partagé ${what}`
|
|
449
|
+
: docs
|
|
450
|
+
? en.value ? `${who} uploaded ${what}` : `${who} a déposé ${what}`
|
|
451
|
+
: en.value ? `${who} added ${what}` : `${who} a ajouté ${what}`;
|
|
452
|
+
return {
|
|
453
|
+
...base,
|
|
454
|
+
icon: docs ? "FileText" : "FolderSimplePlus",
|
|
455
|
+
title,
|
|
456
|
+
body: docs ? preview(rows.map((row) => row.label)) : familiesOf(rows),
|
|
457
|
+
context: `${docs ? "Documents" : en.value ? "Resources" : "Ressources"} · ${when}`,
|
|
458
|
+
text: `${title} ${en.value ? "to the project." : "au projet."}`,
|
|
459
|
+
recap: [
|
|
460
|
+
{ key: en.value ? "By" : "Par", value: who, icon: "User" },
|
|
461
|
+
...(!docs && rows.length ? [{ key: en.value ? "Families" : "Familles", value: familiesOf(rows), icon: "Stack" }] : []),
|
|
462
|
+
{ key: en.value ? "When" : "Quand", value: when, icon: "Clock" },
|
|
463
|
+
],
|
|
464
|
+
actions: [
|
|
465
|
+
docs
|
|
466
|
+
? { label: en.value ? "Open the documents" : "Ouvrir les documents", icon: "FileText", run: () => emit("tab", "documents") }
|
|
467
|
+
: { label: en.value ? "See in Resources" : "Voir dans Ressources", icon: "Files", run: () => emit("tab", "resources") },
|
|
468
|
+
],
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
if (item.kind === "changes") {
|
|
473
|
+
const events = item.payload?.events ?? [];
|
|
474
|
+
const title = en.value
|
|
475
|
+
? `${count(events.length, "change", "changes")} on the watched records`
|
|
476
|
+
: `${count(events.length, "changement", "changements")} sur les fiches suivies`;
|
|
477
|
+
return {
|
|
478
|
+
...base,
|
|
479
|
+
icon: "BellRinging",
|
|
480
|
+
title,
|
|
481
|
+
body: preview([...new Set(events.map((event) => event.title))]),
|
|
482
|
+
context: `${en.value ? "Project watch" : "Suivi du projet"} · ${when}`,
|
|
483
|
+
text: en.value
|
|
484
|
+
? "The project watch noticed these moves on the records filed in the project."
|
|
485
|
+
: "Le suivi du projet a relevé ces mouvements sur les fiches rangées.",
|
|
486
|
+
recap: [{ key: en.value ? "Detected on" : "Relevé le", value: when, icon: "Clock" }],
|
|
487
|
+
actions: [{ label: en.value ? "See in Resources" : "Voir dans Ressources", icon: "Files", run: () => emit("tab", "resources") }],
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
if (item.kind === "mention") {
|
|
492
|
+
const page = item.payload?.title || (en.value ? "Untitled page" : "Page sans titre");
|
|
493
|
+
const noteId = item.payload?.noteId;
|
|
494
|
+
return {
|
|
495
|
+
...base,
|
|
496
|
+
icon: "At",
|
|
497
|
+
title: en.value ? `${who} mentioned you` : `${who} vous a mentionné`,
|
|
498
|
+
body: page,
|
|
499
|
+
context: `Notes · ${when}`,
|
|
500
|
+
text: en.value ? `${who} mentioned you on the page « ${page} ».` : `${who} vous a mentionné sur la page « ${page} ».`,
|
|
501
|
+
recap: [
|
|
502
|
+
{ key: en.value ? "By" : "Par", value: who, icon: "User" },
|
|
503
|
+
{ key: "Page", value: page, icon: "Notebook" },
|
|
504
|
+
{ key: en.value ? "When" : "Quand", value: when, icon: "Clock" },
|
|
505
|
+
],
|
|
506
|
+
actions: noteId
|
|
507
|
+
? [{ label: en.value ? "Open the page" : "Ouvrir la page", icon: "Notebook", run: () => emit("open-note", noteId) }]
|
|
508
|
+
: [],
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
const suggestions = item.suggestions ?? [];
|
|
513
|
+
const pending = suggestions.filter((s) => s.status === "pending").length;
|
|
514
|
+
const reasons = [...new Set(suggestions.map((s) => s.reason?.label).filter(Boolean))] as string[];
|
|
515
|
+
// Les fiches liees que l'app cherche elle-meme, a chaque ouverture du projet.
|
|
516
|
+
const related = item.id.startsWith("local-");
|
|
517
|
+
return {
|
|
518
|
+
...base,
|
|
519
|
+
icon: "Sparkle",
|
|
520
|
+
title: related
|
|
521
|
+
? en.value
|
|
522
|
+
? `${count(suggestions.length, "related record", "related records")} to look at`
|
|
523
|
+
: `${count(suggestions.length, "fiche liée", "fiches liées")} à regarder`
|
|
524
|
+
: en.value
|
|
525
|
+
? `${count(suggestions.length, "new suggestion", "new suggestions")} from the watch`
|
|
526
|
+
: `${count(suggestions.length, "nouvelle proposition", "nouvelles propositions")} du suivi`,
|
|
527
|
+
body: pending ? (en.value ? `${pending} to sort` : `${pending} à trier`) : en.value ? "All sorted" : "Tout est trié",
|
|
528
|
+
context: `${related ? (en.value ? "Related records" : "Fiches liées") : en.value ? "Project watch" : "Suivi du projet"} · ${when}`,
|
|
529
|
+
text: related
|
|
530
|
+
? en.value
|
|
531
|
+
? "Records close to those of the project, that it does not hold yet. Nothing is filed without you: a dismissed record does not come back."
|
|
532
|
+
: "Des fiches proches de celles du projet, qu'il ne porte pas encore. Rien n'est rangé sans vous : une fiche écartée ne revient pas."
|
|
533
|
+
: en.value
|
|
534
|
+
? "Documents that match the project and that it does not hold yet. Nothing is filed without you: a dismissed record never comes back."
|
|
535
|
+
: "Des documents qui correspondent au projet et qu'il ne porte pas encore. Rien n'est rangé sans vous : une fiche écartée ne revient pas.",
|
|
536
|
+
recap: [
|
|
537
|
+
{ key: en.value ? "Why" : "Pourquoi", value: preview(reasons), icon: "Crosshair" },
|
|
538
|
+
{ key: en.value ? "To sort" : "À trier", value: `${pending} / ${suggestions.length}`, icon: "Tray" },
|
|
539
|
+
].filter((row) => row.value),
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
const lines = computed(() => props.items.map(lineOf));
|
|
544
|
+
|
|
545
|
+
// ------------------------------------------------------------------ filtre
|
|
546
|
+
|
|
547
|
+
const filter = ref<"all" | "unread">("all");
|
|
548
|
+
const filterOptions = computed(() => [
|
|
549
|
+
{ value: "all", label: `${en.value ? "All" : "Tous"} ${lines.value.length}` },
|
|
550
|
+
{ value: "unread", label: `${en.value ? "Unread" : "Non lus"} ${lines.value.filter((l) => !l.item.readAt).length}` },
|
|
551
|
+
]);
|
|
552
|
+
|
|
553
|
+
/** Le message ouvert reste dans la liste « Non lus » : il vient d'etre lu, pas de partir. */
|
|
554
|
+
const shown = computed(() =>
|
|
555
|
+
filter.value === "unread" ? lines.value.filter((l) => !l.item.readAt || l.item.id === selectedId.value) : lines.value,
|
|
556
|
+
);
|
|
557
|
+
|
|
558
|
+
/** Les epingles restent en tete, dans leur ordre d'arrivee. */
|
|
559
|
+
const parts = computed(() => {
|
|
560
|
+
const pinned = shown.value.filter((line) => line.item.pinnedAt);
|
|
561
|
+
const rest = shown.value.filter((line) => !line.item.pinnedAt);
|
|
562
|
+
return [
|
|
563
|
+
...(pinned.length ? [{ key: "pinned", label: en.value ? "Pinned" : "Épinglés", lines: pinned }] : []),
|
|
564
|
+
...(rest.length ? [{ key: "rest", label: pinned.length ? (en.value ? "Other messages" : "Autres messages") : "", lines: rest }] : []),
|
|
565
|
+
];
|
|
566
|
+
});
|
|
567
|
+
|
|
568
|
+
// Ce que le projet sait faire dans cette app, onglet par onglet.
|
|
569
|
+
const welcomeSteps = computed(() =>
|
|
570
|
+
en.value
|
|
571
|
+
? [
|
|
572
|
+
{ icon: "FolderSimplePlus", title: "File records", text: "The Project button on a card or a record files it here. Find them under Resources, and their figures under Dashboard." },
|
|
573
|
+
{ icon: "FileText", title: "Upload documents", text: "A PDF, a note or a table dropped under Documents is read alongside the records." },
|
|
574
|
+
{ icon: "NotePencil", title: "Take notes", text: "Notes holds free pages next to the data: a summary, a meeting, a hypothesis. Type @ to cite a member, a record or a document. A page stays private until you share it with the project." },
|
|
575
|
+
{ icon: "ShareNetwork", title: "Share", text: "Share opens the project to colleagues: they can read it and file records." },
|
|
576
|
+
{ icon: "Tray", title: "Read the Inbox", text: "What happened while you were away lands here, one line per event. Messages stay until you delete them, and you can pin the ones that matter at the top." },
|
|
577
|
+
{ icon: "Sparkle", title: "Sort the suggestions", text: "The project suggests records close to those it holds. Add or dismiss: a dismissed record does not come back." },
|
|
578
|
+
]
|
|
579
|
+
: [
|
|
580
|
+
{ icon: "FolderSimplePlus", title: "Ranger des fiches", text: "Le bouton Projet d'une carte ou d'une fiche la range ici. Vous les retrouvez dans Ressources, et leurs chiffres dans Tableau de bord." },
|
|
581
|
+
{ icon: "FileText", title: "Déposer des documents", text: "Un PDF, une note ou un tableau déposé dans Documents se lit à côté des fiches." },
|
|
582
|
+
{ icon: "NotePencil", title: "Prendre des notes", text: "Notes accueille des pages libres à côté des données : une synthèse, une réunion, une hypothèse. Tapez @ pour citer un membre, une fiche ou un document. Une page reste privée tant que vous ne la partagez pas au projet." },
|
|
583
|
+
{ icon: "ShareNetwork", title: "Partager", text: "Partager ouvre le projet à vos collègues : ils peuvent le lire et y ranger des fiches." },
|
|
584
|
+
{ icon: "Tray", title: "Lire l'Inbox", text: "Ce qui s'est passé pendant votre absence arrive ici, une ligne par événement. Les messages restent tant que vous ne les supprimez pas, et vous pouvez épingler en haut ceux qui comptent." },
|
|
585
|
+
{ icon: "Sparkle", title: "Trier les propositions", text: "Le projet propose des fiches proches de celles qu'il range. Ajoutez ou écartez : une fiche écartée ne revient pas." },
|
|
586
|
+
],
|
|
587
|
+
);
|
|
588
|
+
|
|
589
|
+
/** Trois lignes au plus : le detail complet se lit sur la fiche. */
|
|
590
|
+
function changeLines(change: ProjectInboxChange) {
|
|
591
|
+
if (change.kind === "disappeared") return [en.value ? "No longer in the source" : "N'est plus dans la source"];
|
|
592
|
+
return (change.changes ?? [])
|
|
593
|
+
.filter((c) => c.field !== "__more")
|
|
594
|
+
.slice(0, 3)
|
|
595
|
+
.map((c) => `${c.label || c.field} : ${c.before || (en.value ? "empty" : "vide")} → ${c.after || (en.value ? "empty" : "vide")}`);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
// ------------------------------------------------------- panneau de lecture
|
|
599
|
+
|
|
600
|
+
const selectedId = ref("");
|
|
601
|
+
/** Relu a chaque rendu : une proposition tranchee s'y voit tout de suite. */
|
|
602
|
+
const selected = computed(() => lines.value.find((line) => line.item.id === selectedId.value) ?? null);
|
|
603
|
+
|
|
604
|
+
function openLine(line: Line) {
|
|
605
|
+
selectedId.value = line.item.id;
|
|
606
|
+
if (!line.item.readAt) emit("open", line.item);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
function close() {
|
|
610
|
+
selectedId.value = "";
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/** Precedent et suivant : dans l'ordre de la liste affichee. */
|
|
614
|
+
const flat = computed(() => parts.value.flatMap((part) => part.lines));
|
|
615
|
+
const position = computed(() => flat.value.findIndex((line) => line.item.id === selectedId.value));
|
|
616
|
+
function step(delta: number) {
|
|
617
|
+
const next = flat.value[position.value + delta];
|
|
618
|
+
if (next) openLine(next);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/** Supprimer est definitif : le panneau passe au message suivant. */
|
|
622
|
+
function remove(item: ProjectInboxItem) {
|
|
623
|
+
const next = flat.value[position.value + 1] ?? flat.value[position.value - 1];
|
|
624
|
+
selectedId.value = next && next.item.id !== item.id ? next.item.id : "";
|
|
625
|
+
emit("remove", item);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
const readerTools = computed(() => {
|
|
629
|
+
const item = selected.value?.item;
|
|
630
|
+
if (!item) return [];
|
|
631
|
+
return [
|
|
632
|
+
{ key: "prev", icon: "CaretUp", label: en.value ? "Previous message" : "Message précédent", disabled: position.value <= 0, run: () => step(-1) },
|
|
633
|
+
{ key: "next", icon: "CaretDown", label: en.value ? "Next message" : "Message suivant", disabled: position.value >= flat.value.length - 1, run: () => step(1) },
|
|
634
|
+
{ key: "pin", icon: "PushPin", label: pinLabel(item), on: !!item.pinnedAt, run: () => emit("pin", item) },
|
|
635
|
+
{ key: "unread", icon: "EnvelopeSimple", label: en.value ? "Mark as unread" : "Marquer comme non lu", disabled: !item.readAt, run: () => emit("unread", item) },
|
|
636
|
+
{ key: "delete", icon: "Trash", label: en.value ? "Delete the message" : "Supprimer le message", run: () => remove(item) },
|
|
637
|
+
{ key: "close", icon: "X", label: en.value ? "Close" : "Fermer", run: close },
|
|
638
|
+
] as Array<{ key: string; icon: string; label: string; on?: boolean; disabled?: boolean; run: () => void }>;
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
// ------------------------------------------------------------ propositions
|
|
642
|
+
|
|
643
|
+
const statusLabel = (status?: string) =>
|
|
644
|
+
status === "added" ? (en.value ? "Added" : "Ajoutée") : en.value ? "Dismissed" : "Écartée";
|
|
645
|
+
|
|
646
|
+
/** Cartes de rebond (une molecule et ses fiches) : l'API les pose sous ce type pour les apps du medicament. */
|
|
647
|
+
const cardsOf = (item: ProjectInboxItem) => (item.suggestions ?? []).filter((s) => s.resourceType === "Molecule");
|
|
648
|
+
|
|
649
|
+
/** Les propositions seules, par famille, dans l'ordre des rubriques de la barre de gauche. */
|
|
650
|
+
function suggestionGroups(item: ProjectInboxItem) {
|
|
651
|
+
const byType = new Map<string, ProjectSuggestion[]>();
|
|
652
|
+
for (const entry of item.suggestions ?? []) {
|
|
653
|
+
if (entry.resourceType === "Molecule") continue;
|
|
654
|
+
byType.set(entry.resourceType, [...(byType.get(entry.resourceType) ?? []), entry]);
|
|
655
|
+
}
|
|
656
|
+
const rank = (type: string) => {
|
|
657
|
+
const index = (order as readonly string[]).indexOf(type);
|
|
658
|
+
return index === -1 ? order.length : index;
|
|
659
|
+
};
|
|
660
|
+
return [...byType]
|
|
661
|
+
.sort(([a], [b]) => rank(a) - rank(b))
|
|
662
|
+
.map(([type, items]) => {
|
|
663
|
+
const kind = kindOf(type);
|
|
664
|
+
return { type, items, icon: kind?.icon ?? "File", label: kind ? (en.value ? kind.label.en : kind.label.fr) : type };
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
function moleculeTitle(card: ProjectSuggestion) {
|
|
669
|
+
const molecule = card.metadata?.molecule;
|
|
670
|
+
const name = molecule ? `${molecule.name} (${molecule.code})` : card.resourceId;
|
|
671
|
+
return en.value ? `New lead: ${name}` : `Nouvelle piste : ${name}`;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
function childDescription(child: ProjectSuggestion) {
|
|
675
|
+
const kind = kindOf(child.resourceType);
|
|
676
|
+
const family = kind ? (en.value ? kind.label.en : kind.label.fr) : child.resourceType;
|
|
677
|
+
const found = child.metadata?.role === "trigger" ? (en.value ? "found by the watch" : "trouvée par le suivi") : "";
|
|
678
|
+
return [family, child.subtitle, found].filter(Boolean).join(", ");
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
const busy = ref("");
|
|
682
|
+
|
|
683
|
+
/** Les fiches decochees d'une carte. Toutes cochees a l'ouverture. */
|
|
684
|
+
const unchecked = ref<Record<string, Set<string>>>({});
|
|
685
|
+
const isChecked = (cardId: string, childId: string) => !unchecked.value[cardId]?.has(childId);
|
|
686
|
+
function setChecked(cardId: string, childId: string, value: boolean) {
|
|
687
|
+
const set = new Set(unchecked.value[cardId] ?? []);
|
|
688
|
+
if (value) set.delete(childId);
|
|
689
|
+
else set.add(childId);
|
|
690
|
+
unchecked.value = { ...unchecked.value, [cardId]: set };
|
|
691
|
+
}
|
|
692
|
+
const checkedOf = (card: ProjectSuggestion) =>
|
|
693
|
+
(card.children ?? []).filter((child) => child.status === "pending" && isChecked(card.id, child.id)).map((child) => child.id);
|
|
694
|
+
|
|
695
|
+
/** Le bandeau de confirmation du cadre, comme les ajouts depuis les cartes. */
|
|
696
|
+
function notify(text: string, ok = true) {
|
|
697
|
+
oipSnackbar([
|
|
698
|
+
{ attribute: "isVisible", value: true },
|
|
699
|
+
{ attribute: "text", value: text },
|
|
700
|
+
{ attribute: "loader", value: false },
|
|
701
|
+
{ attribute: "prefixIcon", value: ok ? "Check" : "WarningCircle" },
|
|
702
|
+
{ attribute: "prefixIconColor", value: ok ? "var(--color-success)" : "var(--color-danger)" },
|
|
703
|
+
]);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
async function accept(item: ProjectSuggestion, childIds?: string[]) {
|
|
707
|
+
if (item.id.startsWith("local:")) return emit("local-suggestion", "accept", item);
|
|
708
|
+
busy.value = item.id;
|
|
709
|
+
try {
|
|
710
|
+
const result = await useOipApi().projectSuggestions.accept(props.projectId, item.id, childIds);
|
|
711
|
+
const n = result?.addedCount ?? 0;
|
|
712
|
+
notify(
|
|
713
|
+
en.value
|
|
714
|
+
? `${n} ${n > 1 ? "records" : "record"} added to the project`
|
|
715
|
+
: `${n} ${n > 1 ? "fiches ajoutées" : "fiche ajoutée"} au projet`,
|
|
716
|
+
);
|
|
717
|
+
emit("changed", n > 0);
|
|
718
|
+
} catch (error) {
|
|
719
|
+
notify(en.value ? "The suggestion could not be added." : "La proposition n'a pas pu être ajoutée.", false);
|
|
720
|
+
} finally {
|
|
721
|
+
busy.value = "";
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
async function dismiss(item: ProjectSuggestion) {
|
|
726
|
+
if (item.id.startsWith("local:")) return emit("local-suggestion", "dismiss", item);
|
|
727
|
+
busy.value = item.id;
|
|
728
|
+
try {
|
|
729
|
+
await useOipApi().projectSuggestions.dismiss(props.projectId, item.id);
|
|
730
|
+
emit("changed", false);
|
|
731
|
+
} catch (error) {
|
|
732
|
+
notify(en.value ? "The suggestion could not be dismissed." : "La proposition n'a pas pu être écartée.", false);
|
|
733
|
+
} finally {
|
|
734
|
+
busy.value = "";
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
</script>
|
|
738
|
+
|
|
739
|
+
<style scoped>
|
|
740
|
+
/* Facon messagerie : la liste a gauche, la lecture toujours presente a droite. */
|
|
741
|
+
.project_inbox_split {
|
|
742
|
+
display: grid;
|
|
743
|
+
grid-template-columns: 360px minmax(0, 1fr);
|
|
744
|
+
gap: var(--space-16, 16px);
|
|
745
|
+
align-items: start;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.project_inbox_head {
|
|
749
|
+
padding: var(--space-16, 16px) var(--space-16, 16px) var(--space-12, 12px);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.project_inbox_title {
|
|
753
|
+
margin: 0;
|
|
754
|
+
font-size: var(--font-16, 16px);
|
|
755
|
+
font-weight: 700;
|
|
756
|
+
color: var(--text-primary);
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.project_inbox_context {
|
|
760
|
+
margin: 4px 0 0;
|
|
761
|
+
font-size: var(--font-12, 12px);
|
|
762
|
+
line-height: 1.5;
|
|
763
|
+
color: var(--text-secondary);
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.project_inbox_tools {
|
|
767
|
+
padding: 0 var(--space-16, 16px) var(--space-8, 8px);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
.project_inbox_list {
|
|
771
|
+
padding: 0 var(--space-16, 16px) var(--space-12, 12px);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.project_inbox {
|
|
775
|
+
display: flex;
|
|
776
|
+
flex-direction: column;
|
|
777
|
+
margin: 0;
|
|
778
|
+
padding: 0;
|
|
779
|
+
list-style: none;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.project_inbox_group {
|
|
783
|
+
display: flex;
|
|
784
|
+
align-items: center;
|
|
785
|
+
gap: var(--space-6, 6px);
|
|
786
|
+
margin: var(--space-8, 8px) 0 var(--space-4, 4px);
|
|
787
|
+
font-size: var(--font-11, 11px);
|
|
788
|
+
font-weight: 700;
|
|
789
|
+
letter-spacing: 0.06em;
|
|
790
|
+
text-transform: uppercase;
|
|
791
|
+
color: var(--text-muted);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
.project_inbox_group :deep(svg) {
|
|
795
|
+
color: var(--color-primary);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
.project_inbox + .project_inbox_group {
|
|
799
|
+
margin-top: var(--space-16, 16px);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
.project_inbox_none {
|
|
803
|
+
display: flex;
|
|
804
|
+
align-items: center;
|
|
805
|
+
gap: var(--space-8, 8px);
|
|
806
|
+
margin: var(--space-8, 8px) 0;
|
|
807
|
+
font-size: var(--font-13, 13px);
|
|
808
|
+
color: var(--text-secondary);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
.project_inbox_item {
|
|
812
|
+
position: relative;
|
|
813
|
+
display: flex;
|
|
814
|
+
align-items: flex-start;
|
|
815
|
+
gap: var(--space-12, 12px);
|
|
816
|
+
margin: 0 calc(-1 * var(--space-8, 8px));
|
|
817
|
+
padding: var(--space-12, 12px) var(--space-8, 8px);
|
|
818
|
+
border-bottom: 1px solid var(--border-soft, var(--border-default));
|
|
819
|
+
border-radius: var(--radius-md, 6px);
|
|
820
|
+
cursor: pointer;
|
|
821
|
+
transition: background-color var(--duration-fast, 0.15s) var(--ease-out, ease);
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
.project_inbox li:last-child.project_inbox_item {
|
|
825
|
+
border-bottom: none;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
/* Le violet clair du bandeau de projet : on voit ou l'on est. */
|
|
829
|
+
.project_inbox_item:hover,
|
|
830
|
+
.project_inbox_item.is-active {
|
|
831
|
+
background: color-mix(in srgb, var(--rm-shell-accent) 16%, var(--rm-shell-surface));
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
.project_inbox_item.is-active {
|
|
835
|
+
box-shadow: inset 3px 0 0 var(--color-primary);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
.project_inbox_item:hover .project_inbox_line_title,
|
|
839
|
+
.project_inbox_item.is-active .project_inbox_line_title {
|
|
840
|
+
color: var(--color-primary);
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/* Non lu : titre en gras et pastille, comme une boite mail. */
|
|
844
|
+
.project_inbox_item.is-unread .project_inbox_line_title {
|
|
845
|
+
font-weight: 700;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
.project_inbox_item.is-unread::before {
|
|
849
|
+
content: "";
|
|
850
|
+
position: absolute;
|
|
851
|
+
top: 22px;
|
|
852
|
+
left: -6px;
|
|
853
|
+
width: 6px;
|
|
854
|
+
height: 6px;
|
|
855
|
+
border-radius: 50%;
|
|
856
|
+
background: var(--color-primary);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.project_inbox_item.is-unread .project_inbox_date {
|
|
860
|
+
color: var(--color-primary);
|
|
861
|
+
font-weight: 600;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
.project_inbox_ico {
|
|
865
|
+
display: flex;
|
|
866
|
+
flex: none;
|
|
867
|
+
align-items: center;
|
|
868
|
+
justify-content: center;
|
|
869
|
+
width: 32px;
|
|
870
|
+
height: 32px;
|
|
871
|
+
border-radius: 50%;
|
|
872
|
+
background: var(--bg-hover, var(--bg-surface-3));
|
|
873
|
+
color: var(--color-secondary, var(--text-secondary));
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
/* Le texte du message est le bouton d'ouverture (focusable, lu par les lecteurs d'ecran). */
|
|
877
|
+
.project_inbox_txt {
|
|
878
|
+
display: flex;
|
|
879
|
+
flex: 1;
|
|
880
|
+
flex-direction: column;
|
|
881
|
+
min-width: 0;
|
|
882
|
+
padding: 0;
|
|
883
|
+
border: 0;
|
|
884
|
+
background: none;
|
|
885
|
+
color: inherit;
|
|
886
|
+
font: inherit;
|
|
887
|
+
text-align: left;
|
|
888
|
+
cursor: pointer;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
.project_inbox_txt:focus-visible {
|
|
892
|
+
outline: 2px solid var(--color-primary);
|
|
893
|
+
outline-offset: 4px;
|
|
894
|
+
border-radius: 2px;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
.project_inbox_line_title {
|
|
898
|
+
font-size: var(--font-13, 13px);
|
|
899
|
+
font-weight: 600;
|
|
900
|
+
color: var(--text-primary);
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
.project_inbox_body {
|
|
904
|
+
display: -webkit-box;
|
|
905
|
+
overflow: hidden;
|
|
906
|
+
margin-top: 2px;
|
|
907
|
+
font-size: var(--font-12, 12px);
|
|
908
|
+
line-height: 1.5;
|
|
909
|
+
color: var(--text-secondary);
|
|
910
|
+
-webkit-box-orient: vertical;
|
|
911
|
+
-webkit-line-clamp: 2;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
.project_inbox_side {
|
|
915
|
+
display: flex;
|
|
916
|
+
flex: none;
|
|
917
|
+
flex-direction: column;
|
|
918
|
+
align-items: flex-end;
|
|
919
|
+
gap: 2px;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
.project_inbox_date {
|
|
923
|
+
font-size: var(--font-11, 11px);
|
|
924
|
+
color: var(--text-muted);
|
|
925
|
+
white-space: nowrap;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/* L'epingle : visible au survol ou au focus, toujours visible quand elle est mise. */
|
|
929
|
+
.project_inbox_flag {
|
|
930
|
+
margin-right: -6px;
|
|
931
|
+
opacity: 0;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
.project_inbox_item:hover .project_inbox_flag,
|
|
935
|
+
.project_inbox_flag:focus-visible,
|
|
936
|
+
.project_inbox_flag.is-on {
|
|
937
|
+
opacity: 1;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.project_inbox_flag.is-on,
|
|
941
|
+
.project_reader_tools .is-on {
|
|
942
|
+
color: var(--color-primary);
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
@media (hover: none) {
|
|
946
|
+
.project_inbox_flag {
|
|
947
|
+
opacity: 1;
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/* ---- Panneau de lecture ---- */
|
|
952
|
+
.project_reader {
|
|
953
|
+
overflow: hidden;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
.project_reader_empty {
|
|
957
|
+
display: flex;
|
|
958
|
+
flex-direction: column;
|
|
959
|
+
align-items: center;
|
|
960
|
+
justify-content: center;
|
|
961
|
+
gap: var(--space-4, 4px);
|
|
962
|
+
min-height: max(420px, calc(100vh - 260px));
|
|
963
|
+
padding: var(--space-32, 32px);
|
|
964
|
+
text-align: center;
|
|
965
|
+
font-size: var(--font-13, 13px);
|
|
966
|
+
color: var(--text-secondary);
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
.project_reader_empty > :deep(svg) {
|
|
970
|
+
margin-bottom: var(--space-8, 8px);
|
|
971
|
+
color: var(--text-muted);
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
.project_reader_empty p {
|
|
975
|
+
margin: 0;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.project_reader_empty_title {
|
|
979
|
+
font-weight: 700;
|
|
980
|
+
color: var(--text-primary);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
.project_reader_head {
|
|
984
|
+
display: flex;
|
|
985
|
+
align-items: center;
|
|
986
|
+
gap: var(--space-12, 12px);
|
|
987
|
+
padding: var(--space-12, 12px) var(--space-16, 16px);
|
|
988
|
+
border-bottom: 1px solid var(--border-soft, var(--border-default));
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
.project_reader_back {
|
|
992
|
+
display: none;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
.project_reader_txt {
|
|
996
|
+
flex: 1;
|
|
997
|
+
min-width: 0;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
.project_reader_title {
|
|
1001
|
+
overflow: hidden;
|
|
1002
|
+
margin: 0;
|
|
1003
|
+
font-size: var(--font-14, 14px);
|
|
1004
|
+
font-weight: 700;
|
|
1005
|
+
color: var(--text-primary);
|
|
1006
|
+
text-overflow: ellipsis;
|
|
1007
|
+
white-space: nowrap;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
.project_reader_context {
|
|
1011
|
+
margin: 2px 0 0;
|
|
1012
|
+
font-size: var(--font-12, 12px);
|
|
1013
|
+
color: var(--text-muted);
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
.project_reader_tools {
|
|
1017
|
+
display: flex;
|
|
1018
|
+
flex: none;
|
|
1019
|
+
align-items: center;
|
|
1020
|
+
gap: 2px;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
/* Corps du message : texte, recapitulatif, elements lies, actions. */
|
|
1024
|
+
.project_msg {
|
|
1025
|
+
max-width: 820px;
|
|
1026
|
+
padding: var(--space-20, 20px) var(--space-24, 24px) var(--space-24, 24px);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
.project_msg_text {
|
|
1030
|
+
margin: 0 0 var(--space-16, 16px);
|
|
1031
|
+
font-size: var(--font-14, 14px);
|
|
1032
|
+
line-height: 1.55;
|
|
1033
|
+
color: var(--text-primary);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
.project_recap {
|
|
1037
|
+
margin-bottom: var(--space-20, 20px);
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
.project_recap_row {
|
|
1041
|
+
display: flex;
|
|
1042
|
+
align-items: flex-start;
|
|
1043
|
+
gap: 12px;
|
|
1044
|
+
padding: 8px 0;
|
|
1045
|
+
border-bottom: 1px solid var(--border-soft, var(--border-default));
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.project_recap_row:last-child {
|
|
1049
|
+
border-bottom: none;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
.project_recap_row > :deep(svg) {
|
|
1053
|
+
flex: 0 0 18px;
|
|
1054
|
+
margin-top: 1px;
|
|
1055
|
+
color: var(--color-secondary, var(--text-secondary));
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.project_recap_row > div {
|
|
1059
|
+
flex: 1;
|
|
1060
|
+
min-width: 0;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.project_recap_k {
|
|
1064
|
+
margin: 0 0 2px;
|
|
1065
|
+
font-size: 10.5px;
|
|
1066
|
+
font-weight: 700;
|
|
1067
|
+
letter-spacing: 0.08em;
|
|
1068
|
+
text-transform: uppercase;
|
|
1069
|
+
color: var(--text-muted);
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
.project_recap_v {
|
|
1073
|
+
margin: 0;
|
|
1074
|
+
font-size: 13px;
|
|
1075
|
+
font-weight: 600;
|
|
1076
|
+
color: var(--text-primary);
|
|
1077
|
+
word-break: break-word;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
.project_recap_v--text {
|
|
1081
|
+
font-weight: 400;
|
|
1082
|
+
line-height: 1.5;
|
|
1083
|
+
color: var(--text-secondary);
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
.project_msg_h {
|
|
1087
|
+
display: flex;
|
|
1088
|
+
align-items: center;
|
|
1089
|
+
gap: var(--space-8, 8px);
|
|
1090
|
+
margin: 0 0 var(--space-8, 8px);
|
|
1091
|
+
font-size: var(--font-13, 13px);
|
|
1092
|
+
font-weight: 700;
|
|
1093
|
+
color: var(--text-primary);
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
.project_msg_n {
|
|
1097
|
+
padding: 0 var(--space-6, 6px);
|
|
1098
|
+
border-radius: var(--radius-pill, 999px);
|
|
1099
|
+
background: var(--bg-surface-3);
|
|
1100
|
+
font-size: var(--font-11, 11px);
|
|
1101
|
+
line-height: 18px;
|
|
1102
|
+
color: var(--text-muted);
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
.project_res_list {
|
|
1106
|
+
display: flex;
|
|
1107
|
+
flex-direction: column;
|
|
1108
|
+
margin: 0 0 var(--space-16, 16px);
|
|
1109
|
+
padding: 0;
|
|
1110
|
+
list-style: none;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
.project_res_item {
|
|
1114
|
+
display: flex;
|
|
1115
|
+
align-items: center;
|
|
1116
|
+
gap: var(--space-12, 12px);
|
|
1117
|
+
width: 100%;
|
|
1118
|
+
padding: 10px 0;
|
|
1119
|
+
border: 0;
|
|
1120
|
+
border-bottom: 1px solid var(--border-soft, var(--border-default));
|
|
1121
|
+
border-radius: 0;
|
|
1122
|
+
background: none;
|
|
1123
|
+
color: inherit;
|
|
1124
|
+
font: inherit;
|
|
1125
|
+
text-align: left;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.project_res_list li:last-child .project_res_item {
|
|
1129
|
+
border-bottom: none;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
.project_res_item.is-link {
|
|
1133
|
+
margin: 0 calc(-1 * var(--space-8, 8px));
|
|
1134
|
+
width: calc(100% + 2 * var(--space-8, 8px));
|
|
1135
|
+
padding: 10px var(--space-8, 8px);
|
|
1136
|
+
border-radius: var(--radius-md, 6px);
|
|
1137
|
+
cursor: pointer;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
.project_res_item.is-link:hover,
|
|
1141
|
+
.project_res_item.is-link:focus-visible {
|
|
1142
|
+
background: color-mix(in srgb, var(--rm-shell-accent) 16%, var(--rm-shell-surface));
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
.project_res_item.is-link:hover .project_res_title {
|
|
1146
|
+
color: var(--color-primary);
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
.project_res_item.is-archived {
|
|
1150
|
+
opacity: 0.6;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
.project_res_ico {
|
|
1154
|
+
display: flex;
|
|
1155
|
+
flex: none;
|
|
1156
|
+
align-items: center;
|
|
1157
|
+
justify-content: center;
|
|
1158
|
+
width: 34px;
|
|
1159
|
+
height: 34px;
|
|
1160
|
+
border-radius: var(--radius-lg, 8px);
|
|
1161
|
+
background: var(--bg-surface-3);
|
|
1162
|
+
color: var(--text-secondary);
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
.project_res_txt {
|
|
1166
|
+
display: flex;
|
|
1167
|
+
flex: 1;
|
|
1168
|
+
flex-direction: column;
|
|
1169
|
+
min-width: 0;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
.project_res_title {
|
|
1173
|
+
font-size: var(--font-13, 13px);
|
|
1174
|
+
font-weight: 600;
|
|
1175
|
+
color: var(--text-primary);
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
.project_res_sub {
|
|
1179
|
+
margin-top: 2px;
|
|
1180
|
+
font-size: var(--font-12, 12px);
|
|
1181
|
+
color: var(--text-secondary);
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
.project_res_src {
|
|
1185
|
+
margin-top: 2px;
|
|
1186
|
+
font-size: var(--font-11, 11px);
|
|
1187
|
+
color: var(--text-muted);
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
.project_card {
|
|
1191
|
+
margin-bottom: var(--space-12, 12px);
|
|
1192
|
+
padding: 0 var(--space-12, 12px) var(--space-12, 12px);
|
|
1193
|
+
border: 1px solid var(--border-default);
|
|
1194
|
+
border-radius: var(--radius-lg, 8px);
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
.project_card .project_res_item {
|
|
1198
|
+
border-bottom: none;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.project_card_children {
|
|
1202
|
+
display: flex;
|
|
1203
|
+
flex-direction: column;
|
|
1204
|
+
gap: 8px;
|
|
1205
|
+
margin-bottom: 12px;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
.project_card_actions {
|
|
1209
|
+
display: flex;
|
|
1210
|
+
flex-wrap: wrap;
|
|
1211
|
+
gap: 8px;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
.project_card_actions--inline {
|
|
1215
|
+
flex: none;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
.project_msg_actions {
|
|
1219
|
+
display: flex;
|
|
1220
|
+
flex-wrap: wrap;
|
|
1221
|
+
gap: var(--space-8, 8px);
|
|
1222
|
+
padding-top: var(--space-16, 16px);
|
|
1223
|
+
border-top: 1px solid var(--border-soft, var(--border-default));
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/* Etroit : la liste ou le message, avec un retour. */
|
|
1227
|
+
@media (max-width: 1100px) {
|
|
1228
|
+
.project_inbox_split {
|
|
1229
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
.project_inbox_split:not(.is-reading) .project_reader,
|
|
1233
|
+
.project_inbox_split.is-reading .project_inbox_col {
|
|
1234
|
+
display: none;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
.project_reader_back {
|
|
1238
|
+
display: inline-flex;
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
</style>
|