From 9d4a1772546d2a29bfcb1f8acf2decbc2b717e3a Mon Sep 17 00:00:00 2001 From: Arnaud AMBROSELLI Date: Wed, 20 Dec 2023 12:02:17 +0100 Subject: [PATCH] fix: design fix pour nouveaux comptes-rendus --- dashboard/src/components/IncrementorSmall.js | 4 +-- .../scenes/report/components/ActionsReport.js | 36 ++++++++++--------- .../report/components/CommentsReport.js | 2 +- .../report/components/ObservationsReport.js | 8 ++--- .../report/components/PassagesReport.js | 8 ++--- .../scenes/report/components/PersonsReport.js | 8 ++--- .../report/components/RencontresReport.js | 8 ++--- .../report/components/ServicesReport.js | 19 +++++----- .../scenes/report/components/Transmissions.js | 4 +-- dashboard/src/scenes/report/view.js | 14 ++++---- 10 files changed, 56 insertions(+), 55 deletions(-) diff --git a/dashboard/src/components/IncrementorSmall.js b/dashboard/src/components/IncrementorSmall.js index 9177cdd51..8392a891a 100644 --- a/dashboard/src/components/IncrementorSmall.js +++ b/dashboard/src/components/IncrementorSmall.js @@ -36,12 +36,12 @@ export default function IncrementorSmall({ service, team, date, count: initialVa - setValue(Number(e.currentTarget.value))} diff --git a/dashboard/src/scenes/report/components/ActionsReport.js b/dashboard/src/scenes/report/components/ActionsReport.js index f6f629842..cdb49ef87 100644 --- a/dashboard/src/scenes/report/components/ActionsReport.js +++ b/dashboard/src/scenes/report/components/ActionsReport.js @@ -34,7 +34,7 @@ export const ActionsOrConsultations = ({ actions, consultations }) => {

{caption}

} + renderTab={(caption) =>

{caption}

} onClick={(_, index) => setActiveTab(index === 0 ? 'Actions' : 'Consultations')} activeTabIndex={activeTab.includes('Actions') ? 0 : 1} /> @@ -64,7 +64,7 @@ export const ActionsOrConsultations = ({ actions, consultations }) => { -
+
@@ -104,20 +104,24 @@ const ActionsOrConsultationsFilters = ({ setFilterStatus, filterStatus, disabled return ( <>
-
- - s._id} - getOptionLabel={(s) => s.name} - name="status" - onChange={(s) => setFilterStatus(s.map((s) => s._id))} - isClearable - isDisabled={disabled} - isMulti - value={mappedIdsToLabels.filter((s) => filterStatus.includes(s._id))} - /> +
+ +
+ s._id} + getOptionLabel={(s) => s.name} + name="status" + onChange={(s) => setFilterStatus(s.map((s) => s._id))} + isClearable + isDisabled={disabled} + isMulti + value={mappedIdsToLabels.filter((s) => filterStatus.includes(s._id))} + /> +
diff --git a/dashboard/src/scenes/report/components/CommentsReport.js b/dashboard/src/scenes/report/components/CommentsReport.js index 437cb0fea..ec4098dc2 100644 --- a/dashboard/src/scenes/report/components/CommentsReport.js +++ b/dashboard/src/scenes/report/components/CommentsReport.js @@ -33,7 +33,7 @@ export const CommentsSocialAndMedical = ({ comments, commentsMedical }) => {

{caption}

} + renderTab={(caption) =>

{caption}

} onClick={(_, index) => setActiveTab(index === 0 ? 'Commentaires' : 'Commentaires médicaux')} activeTabIndex={activeTab.includes('Commentaires médicaux') ? 1 : 0} /> diff --git a/dashboard/src/scenes/report/components/ObservationsReport.js b/dashboard/src/scenes/report/components/ObservationsReport.js index 027a163ad..2e6986bf5 100644 --- a/dashboard/src/scenes/report/components/ObservationsReport.js +++ b/dashboard/src/scenes/report/components/ObservationsReport.js @@ -15,12 +15,12 @@ export const ObservationsReport = ({ observations, period, selectedTeams }) => { return ( <> -
-

{observations.length}

-

observation{observations.length > 1 ? 's' : ''}

+
+

{observations.length}

+

observation{observations.length > 1 ? 's' : ''}

diff --git a/dashboard/src/scenes/report/components/PassagesReport.js b/dashboard/src/scenes/report/components/PassagesReport.js index 5adc3df6c..7d41951a3 100644 --- a/dashboard/src/scenes/report/components/PassagesReport.js +++ b/dashboard/src/scenes/report/components/PassagesReport.js @@ -17,12 +17,12 @@ export const PassagesReport = ({ passages, period, selectedTeams }) => { return ( <> -
-

{passages.length}

-

passage{passages.length > 1 ? 's' : ''}

+
+

{passages.length}

+

passage{passages.length > 1 ? 's' : ''}

diff --git a/dashboard/src/scenes/report/components/PersonsReport.js b/dashboard/src/scenes/report/components/PersonsReport.js index e78e6882b..74424947e 100644 --- a/dashboard/src/scenes/report/components/PersonsReport.js +++ b/dashboard/src/scenes/report/components/PersonsReport.js @@ -15,14 +15,14 @@ export const PersonsReport = ({ personsCreated, period, selectedTeams }) => { return ( <> -
-

{personsCreated.length}

-

+

+

{personsCreated.length}

+

personne{personsCreated.length > 1 ? 's' : ''} créée{personsCreated.length > 1 ? 's' : ''}

diff --git a/dashboard/src/scenes/report/components/RencontresReport.js b/dashboard/src/scenes/report/components/RencontresReport.js index bee598380..a40d17692 100644 --- a/dashboard/src/scenes/report/components/RencontresReport.js +++ b/dashboard/src/scenes/report/components/RencontresReport.js @@ -17,12 +17,12 @@ export const RencontresReport = ({ rencontres, period, selectedTeams }) => { return ( <> -
-

{rencontres.length}

-

rencontre{rencontres.length > 1 ? 's' : ''}

+
+

{rencontres.length}

+

rencontre{rencontres.length > 1 ? 's' : ''}

diff --git a/dashboard/src/scenes/report/components/ServicesReport.js b/dashboard/src/scenes/report/components/ServicesReport.js index cfccd21ac..4b185eb9e 100644 --- a/dashboard/src/scenes/report/components/ServicesReport.js +++ b/dashboard/src/scenes/report/components/ServicesReport.js @@ -76,7 +76,7 @@ export default function ServicesReport({ period, selectedTeamsObject }) { return (
-

Services effectués

+

Services effectués

@@ -229,7 +228,7 @@ const ServiceByTeam = ({ team, disabled, dateString, dataTestIdPrefix = '', serv
{/* This key is used to refresh incrementators on team change. */} {/* We could avoid this by mapping on something that actually represents what is displayed (eg: services) */} -
+
{selectedServices.map((service) => ( -

- 👋 Comment s'est passée la journée ? -

+

👋 Comment s'est passée la journée ?

{days.map((day) => { return (
diff --git a/dashboard/src/scenes/report/view.js b/dashboard/src/scenes/report/view.js index 1c539ee07..e5322c49a 100644 --- a/dashboard/src/scenes/report/view.js +++ b/dashboard/src/scenes/report/view.js @@ -345,11 +345,11 @@ const View = () => { viewAllOrganisationData || selectedTeamIds.length ? 'tw-flex' : 'tw-hidden', ].join(' ')}>
-
+
{canSeeComments && ( -
+
)} @@ -361,26 +361,26 @@ const View = () => { }} className="tw-mb-4 tw-grid tw-gap-4"> {organisation.passagesEnabled && ( -
+
)} {organisation.rencontresEnabled && ( -
+
)} {organisation.territoriesEnabled && ( -
+
)} -
+
{organisation.receptionEnabled && ( -
+
)}