From ef70d26dfd9f5199c616f37c5d6325d213167ab3 Mon Sep 17 00:00:00 2001 From: Mailine Nguyen Date: Wed, 12 Mar 2025 16:21:28 +0100 Subject: [PATCH] feat: add tooltip to add activity button when the survey is locked --- src/i18n/locales/fr/fr.json | 3 ++- .../activity-summary/ActivitySummary.tsx | 20 +++++++++++-------- yarn.lock | 8 ++++---- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/i18n/locales/fr/fr.json b/src/i18n/locales/fr/fr.json index bf082263..071a2d86 100644 --- a/src/i18n/locales/fr/fr.json +++ b/src/i18n/locales/fr/fr.json @@ -300,7 +300,8 @@ "and": " et ", "end-alert": " se chevauchent.", "info": "Indiquez vos différentes occupations de la journée. Par défaut, votre première activité débute à 4h du matin.", - "lock": "Verrouiller le carnet" + "lock": "Verrouiller le carnet", + "locked-info": "Le carnet est verrouillé. Vous ne pouvez plus le modifier." }, "secondary-activity": { "info-light": "Discuter, écouter de la musique, lire un article, regarder la télévision, manger, etc...", diff --git a/src/pages/activity/activity-summary/ActivitySummary.tsx b/src/pages/activity/activity-summary/ActivitySummary.tsx index 136468f5..c401d658 100644 --- a/src/pages/activity/activity-summary/ActivitySummary.tsx +++ b/src/pages/activity/activity-summary/ActivitySummary.tsx @@ -7,7 +7,7 @@ import { makeStylesEdt, TooltipInfo, } from "@inseefrlab/lunatic-edt"; -import { Box, Button, Divider, Switch, Typography } from "@mui/material"; +import { Box, Button, Divider, Switch, Tooltip, Typography } from "@mui/material"; import { PDFDownloadLink } from "@react-pdf/renderer"; import ErrorIcon from "../../../assets/illustration/error/activity.svg?react"; import InfoAlertIcon from "../../../assets/illustration/info-alert.svg?react"; @@ -603,13 +603,17 @@ const ActivitySummaryPage = () => { ))} - + + + + + {isSummaryEdited ? ( diff --git a/yarn.lock b/yarn.lock index 2544f462..95afd459 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1202,10 +1202,10 @@ dependencies: antlr4 "4.8.0" -"@inseefrlab/lunatic-edt@^0.14.6": - version "0.14.6" - resolved "https://registry.yarnpkg.com/@inseefrlab/lunatic-edt/-/lunatic-edt-0.14.6.tgz#1994526ed7d699137cd6e19c740eb53cc796b6b2" - integrity sha512-1abnuK4IK9WMMw+t27d6SBYqHP02D8ewwq8BSD7RmxXDd1KiZZzs09lD1UVLGVEXPOP2yQ2hsKRk5lrsTRB5jQ== +"@inseefrlab/lunatic-edt@^0.14.8": + version "0.14.8" + resolved "https://registry.yarnpkg.com/@inseefrlab/lunatic-edt/-/lunatic-edt-0.14.8.tgz#f3c07bf1bb9ca2fd04f4362980c54185fddab733" + integrity sha512-VKWgeMF0ZIvlrirWEWf3YeZkrEHYCO8qQTyxh2eRMy3IrGk+1RC7aSTwZ5s2+ZF5SfP2i7ZcJ2kjpltMDZ7Veg== dependencies: "@date-io/dayjs" "^2.16.0" "@emotion/react" "^11.10.4"