团队权限分支

This commit is contained in:
caishi 2021-08-25 14:25:35 +08:00
parent 061fa0ee71
commit 7851785335
2 changed files with 8 additions and 12 deletions

View File

@ -239,7 +239,7 @@ export default Form.create()(
<Switch checked={switch_box_pull} onClick={switch_pull_types} />
<span className="ml30 color-grey-3">合并请求<span className="color-grey-8 ml15">(启用合并请求和代码评审)</span></span>
</AlignCenter>
<AlignCenter className="mb20">
<AlignCenter className="mb10">
<Switch checked={switch_box_release} onClick={switch_releas_types} />
<span className="ml30 color-grey-3">版本发布<span className="color-grey-8 ml15">(跟踪项目版本和下载)</span></span>
</AlignCenter>
@ -249,7 +249,7 @@ export default Form.create()(
</AlignCenter>
</div>
<Button type={"primary"} onClick={saveGroupFrom}>{groupId ? "更新团队设置" : "新建团队"}</Button>
<Cancel className="ml30" onClick={() => cancelEdit()}><span className="pl30 pr30">取消</span></Cancel>
<Cancel className="ml30" onClick={() => cancelEdit()}><span>取消</span></Cancel>
</Div>
</WhiteBack>
</Spin>

View File

@ -5,6 +5,7 @@ import Search from '../Component/Search';
import Item from './Team-item';
import Nodata from '../Nodata';
import axios from 'axios';
import { Link } from 'react-router-dom';
const limit = 15;
function Team(props){
@ -14,7 +15,7 @@ function Team(props){
const [ sort_direction , setSort_direction ] = useState("asc");
const [ sort_by ,setSort_by ] = useState("created_at");
const [ search ,setSearch ] = useState(undefined);
const { checkIfLogin , showLoginDialog } = props;
const { username } = props.match.params;
useEffect(()=>{
if(username){
@ -47,14 +48,6 @@ function Team(props){
</Menu>
)
function newFunc() {
const { checkIfLogin , showLoginDialog } = props;
if(checkIfLogin()){
props.history.push(`/organize/new`);
}else{
showLoginDialog && showLoginDialog();
}
}
return(
<div>
<div className="headerbox">
@ -62,7 +55,10 @@ function Team(props){
<Search value={search} onChange={(e)=>setSearch(e.target.value)} placeholder="请输入组织名称关键字进行搜索" onSearch={onSearch}/>
</div>
<p>
<a onClick={newFunc}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</a>
{
checkIfLogin() &&
<Link to={`/organize/new`}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</Link>
}
<Dropdown overlay={menu}>
<a>排序<i className="iconfont icon-sanjiaoxing-down ml3 font-14"></i></a>
</Dropdown>