Skip to content

Commit

Permalink
Admin Milestone Rendering (#442)
Browse files Browse the repository at this point in the history
* add support for milestones in admin proposal review view

* prettier

* prettier

* tweak data displayed

* move milestones
  • Loading branch information
dternyak authored May 28, 2019
1 parent 5e3e2d9 commit 0c3164c
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion admin/src/components/ProposalDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Popconfirm,
Input,
Switch,
Tag,
message,
} from 'antd';
import TextArea from 'antd/lib/input/TextArea';
Expand Down Expand Up @@ -379,7 +380,8 @@ class ProposalDetailNaked extends React.Component<Props, State> {
{renderNominatedArbiter()}
{renderMilestoneAccepted()}
{renderFailed()}
<Collapse defaultActiveKey={['brief', 'content']}>
<Collapse defaultActiveKey={['brief', 'content', 'milestones']}>

<Collapse.Panel key="brief" header="brief">
{p.brief}
</Collapse.Panel>
Expand All @@ -388,6 +390,27 @@ class ProposalDetailNaked extends React.Component<Props, State> {
<Markdown source={p.content} />
</Collapse.Panel>

<Collapse.Panel key="milestones" header="milestones">
{
p.milestones.map((milestone, i) =>

<Card title={
<>
{milestone.title + ' '}
{milestone.immediatePayout && <Tag color="magenta">Immediate Payout</Tag>}
</>
}
extra={`${milestone.payoutPercent}% Payout`}
key={i}
>
<p><b>Estimated Date:</b> {formatDateSeconds(milestone.dateEstimated )} </p>
<p>{milestone.content}</p>
</Card>

)
}
</Collapse.Panel>

<Collapse.Panel key="json" header="json">
<pre>{JSON.stringify(p, null, 4)}</pre>
</Collapse.Panel>
Expand Down

0 comments on commit 0c3164c

Please sign in to comment.