@cccsaurora/howler-ui 2.17.2-patch.632 → 2.17.2-patch.634
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.
|
@@ -6,6 +6,7 @@ import api from '@cccsaurora/howler-ui/api';
|
|
|
6
6
|
import PageCenter from '@cccsaurora/howler-ui/commons/components/pages/PageCenter';
|
|
7
7
|
import { ParameterContext } from '@cccsaurora/howler-ui/components/app/providers/ParameterProvider';
|
|
8
8
|
import useMyApi from '@cccsaurora/howler-ui/components/hooks/useMyApi';
|
|
9
|
+
import useMySnackbar from '@cccsaurora/howler-ui/components/hooks/useMySnackbar';
|
|
9
10
|
import { isEqual, omit, uniqBy } from 'lodash-es';
|
|
10
11
|
import { memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
11
12
|
import { useTranslation } from 'react-i18next';
|
|
@@ -19,6 +20,7 @@ const DossierEditor = () => {
|
|
|
19
20
|
const { t, i18n } = useTranslation();
|
|
20
21
|
const params = useParams();
|
|
21
22
|
const { dispatchApi } = useMyApi();
|
|
23
|
+
const { showSuccessMessage } = useMySnackbar();
|
|
22
24
|
const navigate = useNavigate();
|
|
23
25
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
24
26
|
const setQuery = useContextSelector(ParameterContext, ctx => ctx.setQuery);
|
|
@@ -127,16 +129,18 @@ const DossierEditor = () => {
|
|
|
127
129
|
try {
|
|
128
130
|
if (!params.id) {
|
|
129
131
|
const result = await dispatchApi(api.dossier.post(dossier));
|
|
132
|
+
showSuccessMessage(t('route.dossiers.manager.create.success'));
|
|
130
133
|
navigate(`/dossiers/${result.dossier_id}/edit`);
|
|
131
134
|
}
|
|
132
135
|
else {
|
|
133
136
|
setDossier(await dispatchApi(api.dossier.put(dossier.dossier_id, omit(dossier, ['dossier_id', 'id']))));
|
|
137
|
+
showSuccessMessage(t('route.dossiers.manager.edit.success'));
|
|
134
138
|
}
|
|
135
139
|
}
|
|
136
140
|
finally {
|
|
137
141
|
setLoading(false);
|
|
138
142
|
}
|
|
139
|
-
}, [dispatchApi, dossier, navigate, params.id]);
|
|
143
|
+
}, [dispatchApi, dossier, navigate, params.id, showSuccessMessage, t]);
|
|
140
144
|
useEffect(() => {
|
|
141
145
|
if (!params.id) {
|
|
142
146
|
return;
|
|
@@ -534,8 +534,10 @@
|
|
|
534
534
|
"route.dossiers.create": "New Dossier",
|
|
535
535
|
"route.dossiers.default": "Default",
|
|
536
536
|
"route.dossiers.edit": "Edit Dossier",
|
|
537
|
+
"route.dossiers.manager.create.success": "Dossier Created.",
|
|
537
538
|
"route.dossiers.manager.delete": "Delete Dossier",
|
|
538
539
|
"route.dossiers.manager.delete.success": "Dossier Removed.",
|
|
540
|
+
"route.dossiers.manager.edit.success": "Dossier Updated.",
|
|
539
541
|
"route.dossiers.manager.field.query": "Query",
|
|
540
542
|
"route.dossiers.manager.field.title": "Title",
|
|
541
543
|
"route.dossiers.manager.field.type": "Type",
|
|
@@ -539,8 +539,10 @@
|
|
|
539
539
|
"route.dossiers.create": "Nouveau dossier",
|
|
540
540
|
"route.dossiers.default": "Défaut",
|
|
541
541
|
"route.dossiers.edit": "Modifier le dossier",
|
|
542
|
+
"route.dossiers.manager.create.success": "Dossier crée.",
|
|
542
543
|
"route.dossiers.manager.delete": "Supprimer un dossier",
|
|
543
544
|
"route.dossiers.manager.delete.success": "Dossier supprimé.",
|
|
545
|
+
"route.dossiers.manager.edit.success": "Dossier mise à jour.",
|
|
544
546
|
"route.dossiers.manager.field.query": "Requête",
|
|
545
547
|
"route.dossiers.manager.field.title": "Titre",
|
|
546
548
|
"route.dossiers.manager.field.type": "Type",
|
|
@@ -635,7 +637,7 @@
|
|
|
635
637
|
"route.home.add.visualization.status.description": "Quel est l'état des hits créés au cours des trois derniers mois ?",
|
|
636
638
|
"route.home.add.visualization.unavailable": "Aucune option de visualisation disponible.",
|
|
637
639
|
"route.home.alert.updated.description": "Des mises à jour ont été apportées aux alertes auxquelles vous participez. Depuis votre dernière consultation, {{count}} alertes ont été mises à jour",
|
|
638
|
-
"route.home.alert.updated.title": "
|
|
640
|
+
"route.home.alert.updated.title": "Mises à jour d'alert",
|
|
639
641
|
"route.home.description": "Bienvenue sur Howler. Vous pouvez ajouter des éléments à votre tableau de bord en utilisant les boutons ci-dessus.",
|
|
640
642
|
"route.home.title": "Howler",
|
|
641
643
|
"route.integrations": "Intégrations",
|