forked from Gitlink/forgeplus-react
组织团队-新增一个团队标识
This commit is contained in:
parent
ab34369642
commit
487a2f0495
|
@ -101,7 +101,7 @@ export default ((props) => {
|
|||
group ?
|
||||
<div>
|
||||
<AlignCenterBetween>
|
||||
<span className="color-grey-3">{group.name}</span>
|
||||
<span className="color-grey-3">{group.nickname}</span>
|
||||
{group.is_member && !group.is_admin ?
|
||||
<Popconfirm
|
||||
title="确认离开团队吗?"
|
||||
|
|
|
@ -137,6 +137,17 @@ export default Form.create()(
|
|||
history.push(`/organize/${OIdentifier}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function checkname(rule, value, callback){
|
||||
if(!value){
|
||||
callback();
|
||||
}
|
||||
if(value && !value.match(/^[a-zA-Z][a-zA-Z\d]{3,14}$/)){
|
||||
callback("只能使用英文字母和数字,以字母开头,长度为4到15个字符");
|
||||
}
|
||||
callback();
|
||||
}
|
||||
return (
|
||||
<Spin spinning={isSpin}>
|
||||
<WhiteBack className="mb30" style={{border:groupId?"none":"1px solid #eee"}}>
|
||||
|
@ -144,10 +155,21 @@ export default Form.create()(
|
|||
<Div>
|
||||
<Form>
|
||||
{helper(
|
||||
'团队名称:',
|
||||
'团队标识:',
|
||||
"name",
|
||||
[
|
||||
{ required: true, message: "请输入团队标识" },
|
||||
{
|
||||
validator:checkname
|
||||
}
|
||||
],
|
||||
<Input placeholder="请输入团队标识" disabled={onwers}/>, true
|
||||
)}
|
||||
{helper(
|
||||
'团队名称:',
|
||||
"nickname",
|
||||
[{ required: true, message: "请输入团队名称" }],
|
||||
<Input placeholder="请输入团队名称" disabled={onwers}/>, true
|
||||
<Input placeholder="请输入团队名称"/>, true
|
||||
)}
|
||||
{helper(
|
||||
<span className="mb5">团队描述:<span className="color-grey-8">(描述团队的目的或作用)</span></span>,
|
||||
|
|
|
@ -75,7 +75,7 @@ function TeamGroupItems({organizeDetail,limit, count , history}){
|
|||
return(
|
||||
<div key={key}>
|
||||
<p className="g-head">
|
||||
<Link to={`/organize/${organizeDetail.name}/group/${item.id}`} className="color-grey-3 font-16">{item.name}</Link>
|
||||
<Link to={`/organize/${organizeDetail.name}/group/${item.id}`} className="color-grey-3 font-16">{item.nickname}</Link>
|
||||
<span>
|
||||
{ item.is_admin && item.authorize!=="owner" && <Popconfirm title={`确定解散团队${item.name}?`} okText="是" cancelText="否" onConfirm={()=>disMissGroup(item.id)}><a className="color-red">解散团队</a></Popconfirm>}
|
||||
{ item.is_member && <LeaveTeam className="ml15" teamID={item.id} onOk={outTeam}/>}
|
||||
|
|
Loading…
Reference in New Issue