From ed7a3343c9bfd37ab7e4ad2a6eb04b4f1b7ddda6 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Mon, 28 Dec 2020 15:07:37 -0600 Subject: [PATCH] KYC acceptance property and admin UI --- admin/src/components/ProposalDetail/index.tsx | 75 ++++++++++++------- admin/src/store.ts | 38 ++++++++-- admin/src/types.ts | 1 + backend/grant/admin/views.py | 13 ++++ backend/grant/proposal/models.py | 5 +- backend/migrations/versions/d03c91f3038d_.py | 28 +++++++ frontend/client/components/Header/index.tsx | 4 +- frontend/client/components/Home/Intro.tsx | 4 +- 8 files changed, 130 insertions(+), 38 deletions(-) create mode 100644 backend/migrations/versions/d03c91f3038d_.py diff --git a/admin/src/components/ProposalDetail/index.tsx b/admin/src/components/ProposalDetail/index.tsx index 9e2b2130..eb182b8a 100644 --- a/admin/src/components/ProposalDetail/index.tsx +++ b/admin/src/components/ProposalDetail/index.tsx @@ -3,31 +3,31 @@ import BN from 'bn.js'; import { view } from 'react-easy-state'; import { RouteComponentProps, withRouter } from 'react-router'; import { - Row, - Col, - Card, Alert, Button, + Card, + Col, Collapse, - Popconfirm, Input, - Tag, message, + Popconfirm, + Row, + Tag, } from 'antd'; import TextArea from 'antd/lib/input/TextArea'; import store from 'src/store'; import { formatDateSeconds, formatDurationSeconds } from 'util/time'; import { - PROPOSAL_STATUS, - PROPOSAL_ARBITER_STATUS, MILESTONE_STAGE, + PROPOSAL_ARBITER_STATUS, PROPOSAL_STAGE, + PROPOSAL_STATUS, } from 'src/types'; import { Link } from 'react-router-dom'; import Back from 'components/Back'; import Markdown from 'components/Markdown'; import ArbiterControl from 'components/ArbiterControl'; -import { toZat, fromZat } from 'src/util/units'; +import { fromZat, toZat } from 'src/util/units'; import FeedbackModal from '../FeedbackModal'; import { formatUsd } from 'util/formatters'; import './index.less'; @@ -45,9 +45,11 @@ type State = typeof STATE; class ProposalDetailNaked extends React.Component { state = STATE; rejectInput: null | TextArea = null; + componentDidMount() { this.loadDetail(); } + render() { const id = this.getIdFromQuery(); const { proposalDetail: p, proposalDetailFetching } = store; @@ -183,7 +185,7 @@ class ProposalDetailNaked extends React.Component { {p.rfpOptIn ? ( @@ -272,24 +274,38 @@ class ProposalDetailNaked extends React.Component { description={

Please review this proposal and render your judgment.

- - + {!p.kycApproved ? ( + + ) : ( + <> + + + + )}
-
+ {false &&
{Array.isArray(ccrDrafts) && ccrDrafts.length > 0 ? ( @@ -113,7 +113,7 @@ class Header extends React.Component { )} -
+
} diff --git a/frontend/client/components/Home/Intro.tsx b/frontend/client/components/Home/Intro.tsx index a8fc0f8b..85db65dd 100644 --- a/frontend/client/components/Home/Intro.tsx +++ b/frontend/client/components/Home/Intro.tsx @@ -30,8 +30,8 @@ const HomeIntro: React.SFC = ({ t, authUser }) => ( {t('home.intro.signup')} )} - - {t('home.intro.ccr')} + + Create a Proposal