-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve appearance of inspection section #1016
Improve appearance of inspection section #1016
Conversation
d42ff89
to
b57cba3
Compare
73a6d2b
to
b5c516a
Compare
3c14a12
to
a792ec2
Compare
a792ec2
to
620082c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, I'm just nitpicking
frontend/src/components/Pages/InspectionPage/InspectionOverview.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/InspectionPage/InspectionSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/InspectionPage/InspectionTable.tsx
Outdated
Show resolved
Hide resolved
fd2d79b
to
958a3e6
Compare
frontend/src/components/Pages/InspectionPage/InspectionSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/InspectionPage/InspectionSection.tsx
Outdated
Show resolved
Hide resolved
35499ab
to
1cab3c3
Compare
frontend/src/components/Pages/InspectionPage/InspectionSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/InspectionPage/InspectionSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/InspectionPage/InspectionOverview.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/InspectionPage/InspectionSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/InspectionPage/InspectionSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/InspectionPage/InspectionSection.tsx
Outdated
Show resolved
Hide resolved
useEffect(() => { | ||
if (selectedMissions) { | ||
let unscheduledMissions: CondensedMissionDefinition[] = [] | ||
selectedMissions.forEach((mission) => { | ||
if (Object.keys(scheduledMissions).includes(mission.id) && scheduledMissions[mission.id]) | ||
setIsAlreadyScheduled(true) | ||
else unscheduledMissions = unscheduledMissions.concat([mission]) | ||
}) | ||
setUnscheduledMissions(unscheduledMissions) | ||
} | ||
}, [isDialogOpen]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why but changing this to a function breaks the behavior, i know when I wrote the code I knew why, but will need a moment to understand it again
frontend/src/components/Pages/InspectionPage/InspectionSection.tsx
Outdated
Show resolved
Hide resolved
useEffect(() => { | ||
let unscheduledMissions: CondensedMissionDefinition[] = [] | ||
if (selectedMissions) { | ||
selectedMissions.forEach((mission) => { | ||
if (Object.keys(scheduledMissions).includes(mission.id) && scheduledMissions[mission.id]) | ||
setIsAlreadyScheduled(true) | ||
else unscheduledMissions = unscheduledMissions.concat([mission]) | ||
}) | ||
setUnscheduledMissions(unscheduledMissions) | ||
} | ||
}, [isDialogOpen]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have this warning on several places and I'm honestly not sure what the fix here is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can fix it in another PR imo
7ac9624
to
0260a78
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, small issues like warnings can be fixed in another PR imo as this one is getting big
0260a78
to
eaea166
Compare
eaea166
to
26cddd0
Compare
Closes #1021