Skip to content

Commit cc82a54

Browse files
committed
added milestone list to approved modal and fixed styling
1 parent 335476f commit cc82a54

File tree

3 files changed

+81
-10
lines changed

3 files changed

+81
-10
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# ignore dist directory to speed up linting after we build project
22
dist/*
3+
# ignore test automation folder as it uses TypeScript with its own Eslint config
4+
connect-automation/*

src/projects/detail/components/SimplePlan/components/MilestonesApprovalNotification/MilestonesApprovalNotification.jsx

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,45 @@ class MilestonesApprovalNotification extends React.Component {
114114

115115
if (showAllApproved && this.state.show) {
116116
return (
117-
<div styleName="milestones-notifications">
118-
<div styleName="milestones-notifications-left">
119-
<MilestoneApprovalButton
120-
type="approve"
121-
global
122-
/>
123-
The following milestone(s) has been approved:
117+
<div styleName="approved-notifications">
118+
<div styleName="milestones-notifications">
119+
<div styleName="milestones-notifications-left">
120+
<button
121+
type="submit"
122+
className="tc-btn"
123+
styleName="tranparent-button"
124+
onClick={() => {
125+
this.setState({ open: !this.state.open })
126+
}}
127+
>
128+
<IconCollapse
129+
styleName={`icon-expand ${this.state.open ? 'open' : ''}`}
130+
/>
131+
</button>
132+
The following milestone(s) has been approved&nbsp;
133+
<MilestoneApprovalButton
134+
type="approve"
135+
/>
136+
</div>
137+
{renderDismissButton(() => {
138+
this.setState({ show: false })
139+
})}
124140
</div>
125-
{renderDismissButton(() => {
126-
this.setState({ show: false })
127-
})}
141+
{this.state.open && (
142+
<div styleName="body">
143+
{revieweds.map((item, key) => (
144+
<div
145+
className="flex middle"
146+
styleName="accordion-body-item"
147+
key={key}
148+
>
149+
<div styleName="body-item-one">
150+
<p styleName="bullet">{item.name}</p>
151+
</div>
152+
</div>
153+
))}
154+
</div>
155+
)}
128156
</div>
129157
)
130158
}

src/projects/detail/components/SimplePlan/components/MilestonesApprovalNotification/MilestonesApprovalNotification.scss

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,47 @@
5151
}
5252
}
5353

54+
.approved-notifications {
55+
.milestones-notifications-left {
56+
display: flex;
57+
align-items: center;
58+
59+
button {
60+
padding: 0;
61+
}
62+
}
63+
64+
.body {
65+
padding: 20px calc(35px + 20px);
66+
border-top: none;
67+
background-color: white;
68+
69+
.accordion-body-item {
70+
font-size: 90%;
71+
72+
.body-item-one {
73+
flex: 20;
74+
}
75+
76+
.body-item-two {
77+
flex: 45;
78+
}
79+
80+
&:first-child {
81+
font-weight: normal;
82+
}
83+
84+
.body-item-one {
85+
.bullet {
86+
display: list-item;
87+
list-style-type: disc;
88+
list-style-position: inside;
89+
}
90+
}
91+
}
92+
}
93+
}
94+
5495
.reject-notifications {
5596

5697
.trigger {

0 commit comments

Comments
 (0)