Skip to content

Commit 6532ac1

Browse files
authored
Signalements - Il n'y a plus de scroll dans la liste des signalement (#3792)
## Linked issues - Resolve #3786 ---- - [ ] Tests E2E (Cypress)
2 parents f05f602 + 869a272 commit 6532ac1

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

frontend/src/features/PriorNotification/components/ReportingList.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function ReportingList() {
5858
</StyledLinkButton>
5959
</CardHeader>
6060

61-
<CurrentReportingList
61+
<StyledCurrentReportingList
6262
onIsDirty={handleIsDirty}
6363
vesselIdentity={vesselIdentity}
6464
withOpenedNewReportingForm
@@ -94,3 +94,8 @@ const StyledLinkButton = styled(LinkButton)`
9494
rotate: 90deg;
9595
}
9696
`
97+
98+
const StyledCurrentReportingList = styled(CurrentReportingList)`
99+
flex-grow: 1;
100+
overflow-y: auto;
101+
`

frontend/src/features/Reporting/components/CurrentReportingList/Content.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ import type { Reporting, ReportingAndOccurrences, VesselReportings } from '@feat
1414
import type { VesselIdentity } from 'domain/entities/vessel/types'
1515

1616
type ContentProps = Readonly<{
17+
className: string | undefined
1718
onIsDirty: ((isDirty: boolean) => void) | undefined
1819
vesselIdentity: VesselIdentity
1920
vesselReportings: VesselReportings
2021
withOpenedNewReportingForm: boolean
2122
withVesselSidebarHistoryLink: boolean
2223
}>
2324
export function Content({
25+
className,
2426
onIsDirty,
2527
vesselIdentity,
2628
vesselReportings,
@@ -56,7 +58,7 @@ export function Content({
5658
}
5759

5860
return (
59-
<Wrapper>
61+
<Wrapper className={className}>
6062
{!vesselReportings.current.length && !isNewReportingFormOpen && (
6163
<NoReporting>Pas de signalement ouvert sur ce navire.</NoReporting>
6264
)}
@@ -101,7 +103,7 @@ const Wrapper = styled.div`
101103
display: flex;
102104
flex-direction: column;
103105
margin: 10px 5px 5px 5px;
104-
padding: 16px 16px 1px 16px;
106+
padding: 16px;
105107
text-align: left;
106108
`
107109

frontend/src/features/Reporting/components/CurrentReportingList/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ import { Content } from './Content'
1010
import type { VesselIdentity } from 'domain/entities/vessel/types'
1111

1212
type CurrentReportingListProps = Readonly<{
13+
className?: string
1314
onIsDirty?: (isDirty: boolean) => void
1415
startDate?: Date
1516
vesselIdentity: VesselIdentity | undefined
1617
withOpenedNewReportingForm?: boolean
1718
withVesselSidebarHistoryLink?: boolean
1819
}>
1920
export function CurrentReportingList({
21+
className,
2022
onIsDirty,
2123
startDate = getDefaultReportingsStartDate(),
2224
vesselIdentity,
@@ -39,6 +41,7 @@ export function CurrentReportingList({
3941

4042
return (
4143
<Content
44+
className={className}
4245
onIsDirty={onIsDirty}
4346
vesselIdentity={vesselIdentity}
4447
vesselReportings={vesselReportings}

frontend/src/features/Vessel/components/VesselSidebar/ReportingList/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ const Body = styled.div`
100100
display: flex;
101101
flex-direction: column;
102102
flex-grow: 1;
103+
max-height: 700px;
103104
overflow-x: hidden;
104105
padding: 5px;
105106
`

0 commit comments

Comments
 (0)