forked from Gitlink/forgeplus-react
新增权限
This commit is contained in:
parent
e991f821a5
commit
993f662f45
|
@ -215,6 +215,7 @@ class merge extends Component{
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.setState({
|
||||
order_name:e.key,
|
||||
|
@ -223,6 +224,15 @@ class merge extends Component{
|
|||
this.getIssueList(1,limit,search,author_id,assigned_to_id,status_type,undefined,undefined, e.item.props.value,e.key);
|
||||
}
|
||||
|
||||
islogin(){
|
||||
const { projectsId } = this.props.match.params;
|
||||
if (this.props.checkIfLogin() === false) {
|
||||
this.props.showLoginDialog()
|
||||
return
|
||||
}else{
|
||||
this.props.history.push(`/projects/${projectsId}/merge/new`);
|
||||
}
|
||||
}
|
||||
render(){
|
||||
|
||||
const { issue_chosen , issues , limit , page , search_count , data , isSpin,openselect,closeselect } = this.state;
|
||||
|
@ -252,9 +262,7 @@ class merge extends Component{
|
|||
<div className="topWrapper">
|
||||
<Nav {...this.props} {...this.state}/>
|
||||
{
|
||||
data && data.user_admin_or_member ?
|
||||
<Link to={`/projects/${projectsId}/merge/new`} className="topWrapper_btn">创建合并请求</Link>
|
||||
: ''
|
||||
<a className="topWrapper_btn" onClick={()=>this.islogin()}>创建合并请求</a>
|
||||
}
|
||||
</div>
|
||||
<div className="topWrapper" style={{borderBottom:"none"}}>
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
import React , { Component } from "react";
|
||||
import {Link} from 'react-router-dom';
|
||||
import { Input ,Dropdown , Menu , Icon , Pagination , Spin } from 'antd';
|
||||
import { Input ,Dropdown , Menu , Icon , Pagination , Spin, Button } from 'antd';
|
||||
import './order.css';
|
||||
|
||||
import NoneData from '../Nodata';
|
||||
import Nav from './Nav';
|
||||
import OrderItem from './OrderItem';
|
||||
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
const Search = Input.Search;
|
||||
|
@ -336,6 +335,16 @@ class order extends Component{
|
|||
console.log(id)
|
||||
}
|
||||
|
||||
islogin(){
|
||||
const { projectsId } = this.props.match.params;
|
||||
if (this.props.checkIfLogin() === false) {
|
||||
this.props.showLoginDialog()
|
||||
return
|
||||
}else{
|
||||
this.props.history.push(`/projects/${projectsId}/orders/new`);
|
||||
}
|
||||
}
|
||||
|
||||
render(){
|
||||
const { current_user } = this.props;
|
||||
|
||||
|
@ -366,9 +375,7 @@ class order extends Component{
|
|||
<div className="topWrapper">
|
||||
<Nav {...this.props} {...this.state}/>
|
||||
{
|
||||
data && data.user_admin_or_member ?
|
||||
<Link to={`/projects/${projectsId}/orders/new`} className="topWrapper_btn">创建工单</Link>
|
||||
: ''
|
||||
<a className="topWrapper_btn" onClick={()=>this.islogin()} >创建工单</a>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
@ -448,6 +455,7 @@ class order extends Component{
|
|||
<OrderItem issues={issues} search_count={search_count} page={page} limit={limit} {...this.props} {...this.state} deletedetail={this.deletedetail}></OrderItem>
|
||||
}
|
||||
{ Paginations }
|
||||
|
||||
</Spin>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue