Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 86 additions & 26 deletions pdf-ui/src/pages/BudgetDiscussion/SingleBudgetDiscussion/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ import {
IconShare,
IconSort,
IconTrash,
IconInformationCircle,
} from '@intersect.mbo/intersectmbo.org-icons-set';
import {
Badge,
Box,
Button,
Card,
CardContent,
CardHeader,
Grid,
IconButton,
Menu,
Expand Down Expand Up @@ -379,31 +381,92 @@ const SingleBudgetDiscussion = ({ id }) => {
</Box>

<Box mt={4}>
<Card>
{proposal?.attributes?.submitted_for_vote !== null && (
<CardContent data-testid='budget-discussion-submited-card-content'>
<Grid container>
<Grid item xs={10} display='flex' justifyContent='center'>
{proposal?.attributes?.submitted_for_vote !== null && (
<Card
variant='outlined'
sx={{
backgroundColor: alpha('#FFFFFF', 0.3),
marginBottom: 3,
}}
>
<CardHeader
sx={{
pt: 1,
pb: 1,
backgroundColor: alpha('#F2F4F8', 0.7),
}}
title={
<Box
display={'flex'}
justifyContent={'center'}
alignItems={'center'}
flexDirection={'row'}
>
<Typography
variant='body2'
component='h4'
data-testid='submited-for-vote-title'
variant='caption'
component='p'
>
Submitted for vote on {formatIsoDate(proposal?.attributes?.submitted_for_vote)}
Submitted for vote
</Typography>
</Grid>
<Grid item xs={10} display='flex' justifyContent='center'>
<Typography
variant='body2'
component='h4'
data-testid='submited-for-vote-edit'
{/* <Tooltip
title={
<span
style={{
whiteSpace:
'pre-line',
}}
>
Editing and Voting options have been disabled for this proposal because it is included in the Intersect Budget info action
</span>
}
>
Editing options have been disabled for this proposal because it is included in the Intersect Budget info action
</Typography>
</Grid>
</Grid>
</CardContent>
)}
<Box>
<IconInformationCircle
width={16}
height={16}
fill={
theme?.palette
?.primary?.icons
?.grey
}
/>
</Box>
</Tooltip> */}
</Box>
}
></CardHeader>
<CardContent>
<Box
display='flex'
alignItems='center'
justifyContent='space-between'
flexDirection={{
xs: 'column',
md: 'row',
}}
gap={1}
>
<Box
textAlign={{
xs: 'center',
md: 'left',
}}
>

<Typography
variant='caption'
sx={{
textWrap: 'balance',
}}
>
Editing and Voting options have been disabled for this proposal because it is included in the Intersect Budget info action
</Typography>
</Box>
</Box>
</CardContent>
</Card>)}

<Card>
<CardContent>
<Grid container>
<Grid item xs={10}>
Expand Down Expand Up @@ -806,9 +869,7 @@ const SingleBudgetDiscussion = ({ id }) => {
proposal?.attributes?.createdAt
)}`}
</Typography>

<Box>
{proposal?.attributes?.submitted_for_vote == null && (
<Button
variant='outlined'
startIcon={
Expand All @@ -828,8 +889,6 @@ const SingleBudgetDiscussion = ({ id }) => {
>
Review Versions
</Button>
)}

<BudgetDiscussionReviewVersions
open={reviewVersionsOpen}
onClose={
Expand Down Expand Up @@ -1792,7 +1851,8 @@ const SingleBudgetDiscussion = ({ id }) => {
</IconButton>
</Box>

{activePoll && (
{activePoll &&
proposal?.attributes?.submitted_for_vote === null && (
<Box mt={4}>
<BudgetDiscussionPoll
proposalUserId={
Expand Down