@tekkare/romulus 0.1.115 → 0.1.117
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
CHANGED
|
@@ -112,6 +112,7 @@ const FR = {
|
|
|
112
112
|
kindProduct: 'Une marque',
|
|
113
113
|
kindProductHint: 'Une à {max} marques, suivies partout : prix, avis HAS, indications, ANSM, PUT, MITM, Journal officiel.',
|
|
114
114
|
brands: 'Marques surveillées',
|
|
115
|
+
brandsSearch: 'Rechercher une marque, une molécule, une classe ATC',
|
|
115
116
|
brandsHint: 'Cherchez une marque et ajoutez-la. L’alerte couvre tout le hub pour chacune.',
|
|
116
117
|
brandsRequired: 'Choisissez au moins une marque.',
|
|
117
118
|
brandsTooMany: 'Une alerte suit {max} marques au maximum.',
|
|
@@ -164,6 +165,7 @@ const EN = {
|
|
|
164
165
|
kindProduct: 'A brand',
|
|
165
166
|
kindProductHint: 'One to {max} brands, watched everywhere: prices, HAS opinions, indications, ANSM, PUT, MITM, official journal.',
|
|
166
167
|
brands: 'Watched brands',
|
|
168
|
+
brandsSearch: 'Search a brand, a molecule, an ATC class',
|
|
167
169
|
brandsHint: 'Search a brand and add it. The alert covers the whole hub for each one.',
|
|
168
170
|
brandsRequired: 'Pick at least one brand.',
|
|
169
171
|
brandsTooMany: 'An alert watches at most {max} brands.',
|
|
@@ -237,6 +239,13 @@ const kind = ref<RmAlertKind>(
|
|
|
237
239
|
(props.initial?.kind as RmAlertKind) ?? (props.canWatchView ? 'view' : 'product')
|
|
238
240
|
)
|
|
239
241
|
const brands = ref<string[]>(props.initial?.brands ?? [])
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Saisie du selecteur de marques. Le filtre complexe l'amortit lui-meme ;
|
|
245
|
+
* l'appelant n'a plus qu'a la porter jusqu'a l'index.
|
|
246
|
+
*/
|
|
247
|
+
const brandSearch = ref('')
|
|
248
|
+
watch(brandSearch, (value) => emit('search-brands', value))
|
|
240
249
|
const watchesProduct = computed(() => kind.value === 'product')
|
|
241
250
|
|
|
242
251
|
const title = ref(props.initial?.title ?? props.viewTitle)
|
|
@@ -421,16 +430,22 @@ function submit() {
|
|
|
421
430
|
<fieldset v-if="watchesProduct" class="rm-alert-form__group">
|
|
422
431
|
<legend class="rm-alert-form__label">{{ T.brands }}</legend>
|
|
423
432
|
<p class="rm-alert-form__hint">{{ T.brandsHint }}</p>
|
|
424
|
-
|
|
433
|
+
<!-- Le filtre complexe plutot qu'un simple choix multiple : le
|
|
434
|
+
referentiel des marques ne tient pas dans une liste, il se cherche.
|
|
435
|
+
Son mode `remote` amortit la saisie et laisse l'appelant servir les
|
|
436
|
+
options, au lieu de filtrer cent valeurs deja chargees et de laisser
|
|
437
|
+
croire que le reste n'existe pas. -->
|
|
438
|
+
<RmFilterComplex
|
|
425
439
|
v-model="brands"
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
:
|
|
440
|
+
v-model:search="brandSearch"
|
|
441
|
+
<!-- L'intitule du filtre dit l'action, pas le titre de la section :
|
|
442
|
+
repeter « Marques surveillees » juste sous la legende ne dit rien
|
|
443
|
+
de plus, et l'utilisateur a besoin de savoir qu'il peut chercher
|
|
444
|
+
par molecule ou par classe. -->
|
|
445
|
+
:label="T.brandsSearch"
|
|
446
|
+
:options="brandOptions.map((brand) => ({ label: brand, value: brand }))"
|
|
447
|
+
remote
|
|
432
448
|
:lang="lang"
|
|
433
|
-
@search="emit('search-brands', $event)"
|
|
434
449
|
/>
|
|
435
450
|
<p v-if="brands.length > maxBrands" class="rm-alert-form__error">
|
|
436
451
|
{{ T.brandsTooMany.replace('{max}', String(maxBrands)) }}
|