update
This commit is contained in:
parent
61fdf536e3
commit
57b43c6a1d
|
|
@ -11,7 +11,7 @@ export default(({ header , nav })=>{
|
|||
nav && nav.list && nav.list.length>0 ?
|
||||
nav.list.map((item,key)=>{
|
||||
return(
|
||||
<li key={key} className={nav.active === key?"active":''}>
|
||||
!item.hide &&<li key={key} className={nav.active === key?"active":''}>
|
||||
<p>
|
||||
<Link to={item.href}>
|
||||
{item.icon && <i className={`iconfont ${item.icon || 'icon-huabanfuben'} font-18 mr10`}></i>}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { AlignCenter } from '../../Component/layout';
|
|||
import Modals from '../../Component/PublicModal/Index';
|
||||
import { Button } from 'antd';
|
||||
|
||||
function DeleteBox({visible , onCancel,onSuccess}){
|
||||
function DeleteBox({visible , onCancel,onSuccess,pr_need}){
|
||||
return(
|
||||
<Modals
|
||||
visible={visible}
|
||||
|
|
@ -19,7 +19,7 @@ function DeleteBox({visible , onCancel,onSuccess}){
|
|||
<div className="desc">
|
||||
<AlignCenter className="descMain">
|
||||
<i className="iconfont icon-jinggao1 mr10 font-20 red"></i>确定解除协议吗?</AlignCenter>
|
||||
<p>您解除协议后,后续提交的合并请求对项目成员将不再可见(已存在的不会受影响)</p>
|
||||
{ pr_need && <p>您解除协议后,后续提交的合并请求对项目成员将不再可见(已存在的不会受影响)</p> }
|
||||
</div>
|
||||
</Modals>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ function Index(props){
|
|||
const[ isSpin, setIsSpin] = useState(false);
|
||||
const [ visible , setVisible ] = useState(false);
|
||||
const [ cancelKey , setCancelKey ] = useState(undefined);
|
||||
const [ pr_need , setPr_need ] = useState(true);
|
||||
|
||||
useEffect(()=>{
|
||||
if(current_user && current_user.user_id){
|
||||
|
|
@ -45,7 +46,7 @@ function Index(props){
|
|||
}
|
||||
return(
|
||||
<div className="cla_personal">
|
||||
<DeleteBox visible={visible} onCancel={()=>{setVisible(false);setCancelKey(undefined)}} onSuccess={onSuccess}/>
|
||||
<DeleteBox visible={visible} pr_need={pr_need} onCancel={()=>{setVisible(false);setCancelKey(undefined)}} onSuccess={onSuccess}/>
|
||||
<div className="default_head">我签署的CLA(开源贡献者协议)</div>
|
||||
{
|
||||
lists && lists.length>0 &&
|
||||
|
|
@ -62,7 +63,7 @@ function Index(props){
|
|||
<span>签署时间<span className="ml10">{i.created_at}</span></span>
|
||||
<p className="mt8">
|
||||
<Button onClick={()=>{props.history.push(`/${i.organization && i.organization.name}/cla/${i.cla && i.cla.key}`)}} style={{color:"#466aff",borderColor:"#466aff"}}>查看协议</Button>
|
||||
{ i.state === "signed" && <Button style={{color:"#ff0c0c",borderColor:"#ff0c0c"}} className="ml20" onClick={()=>{setVisible(true);setCancelKey(i.id)}}>解除协议</Button>}
|
||||
{ i.state === "signed" && <Button style={{color:"#ff0c0c",borderColor:"#ff0c0c"}} className="ml20" onClick={()=>{setVisible(true);setCancelKey(i.id);setPr_need(i.cla.pr_need)}}>解除协议</Button>}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ export default (( props )=>{
|
|||
const pathname = props.location.pathname;
|
||||
const OIdentifier = props.match.params.OIdentifier;
|
||||
const {organizeDetail} = props;
|
||||
console.log(organizeDetail);
|
||||
useEffect(()=>{
|
||||
if(organizeDetail){
|
||||
const {nickname} = organizeDetail;
|
||||
|
|
@ -71,7 +72,7 @@ export default (( props )=>{
|
|||
{name:'组织成员管理',icon:"icon-zuzhichengyuan",href:`/${OIdentifier}/setting/member`},
|
||||
{name:'组织团队管理',icon:"icon-zuzhixiangmu",href:`/${OIdentifier}/setting/group`},
|
||||
// {name:'管理web钩子',icon:"icon-zhongqingdianxinicon10",href:`/${OIdentifier}/setting/hooks`}
|
||||
{name:'CLA管理',img:claIcon,href:`/${OIdentifier}/setting/agreement`}
|
||||
{name:'CLA管理',img:claIcon,href:`/${OIdentifier}/setting/agreement`,hide:organizeDetail && !organizeDetail.enabling_cla}
|
||||
],
|
||||
active
|
||||
}
|
||||
|
|
@ -84,24 +85,27 @@ export default (( props )=>{
|
|||
<Gap >
|
||||
<div>
|
||||
<Switch>
|
||||
<Route
|
||||
path="/:OIdentifier/setting/agreement/new"
|
||||
render={(p) => (
|
||||
<CLANew {...props} {...p}/>
|
||||
)}
|
||||
></Route>
|
||||
<Route
|
||||
{organizeDetail && organizeDetail.enabling_cla &&
|
||||
<Route
|
||||
path="/:OIdentifier/setting/agreement/new"
|
||||
render={(p) => (
|
||||
<CLANew {...props} {...p}/>
|
||||
)}
|
||||
></Route>
|
||||
}
|
||||
{organizeDetail && organizeDetail.enabling_cla && <Route
|
||||
path="/:OIdentifier/setting/agreement/:claid"
|
||||
render={(p) => (
|
||||
<CLANew {...props} {...p}/>
|
||||
)}
|
||||
></Route>
|
||||
<Route
|
||||
></Route>}
|
||||
{organizeDetail && organizeDetail.enabling_cla &&<Route
|
||||
path="/:OIdentifier/setting/agreement"
|
||||
render={(p) => (
|
||||
<CLA {...props} {...p}/>
|
||||
)}
|
||||
></Route>
|
||||
></Route>
|
||||
}
|
||||
<Route
|
||||
path="/:OIdentifier/setting/hooks"
|
||||
render={() => (
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ forwardRef((props)=>{
|
|||
<span className={`ml10`} style={{color:switchBtn ? "#466aff" :"#4c5b76"}}>要求 Pull Request 中所有提交者必须签署 CLA 方可合并</span>
|
||||
</span>
|
||||
<Button onClick={saveClaFunc} className="mt30" type={"primary"}>确认</Button>
|
||||
{ claid && <Button style={{color:"#ff0c0c",borderColor:"#ff0c0c"}} className="ml20">解除协议</Button>}
|
||||
{/* { claid && <Button style={{color:"#ff0c0c",borderColor:"#ff0c0c"}} className="ml20">解除协议</Button>} */}
|
||||
</Form>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue