forked from Gitlink/forgeplus-react
04-28休假期修改issue --需合并至其它分支(合并请求相关)
This commit is contained in:
parent
93a53e2c7f
commit
2fcb645d42
|
@ -178,7 +178,7 @@ class NewMerge extends Component {
|
||||||
let arr = projects_names && projects_names.filter(item=>item.id===value);
|
let arr = projects_names && projects_names.filter(item=>item.id===value);
|
||||||
let identifier = arr && arr[0].project_id;
|
let identifier = arr && arr[0].project_id;
|
||||||
let login = arr && arr[0].project_user_login;
|
let login = arr && arr[0].project_user_login;
|
||||||
let is_fork_id = parseInt(value) !== parseInt(id)
|
let is_fork_id = parseInt(value) !== parseInt(id);
|
||||||
this.setState({
|
this.setState({
|
||||||
isSpin: true,
|
isSpin: true,
|
||||||
merge_head: is_fork_id,
|
merge_head: is_fork_id,
|
||||||
|
|
|
@ -34,17 +34,19 @@ class MergeForm extends Component {
|
||||||
this.set_defatul();
|
this.set_defatul();
|
||||||
};
|
};
|
||||||
componentDidUpdate=(prevPros)=>{
|
componentDidUpdate=(prevPros)=>{
|
||||||
|
const { projectsId ,owner } = this.props.match.params;
|
||||||
|
const pId = prevPros.match.params.projectsId;
|
||||||
|
const oId = prevPros.match.params.owner;
|
||||||
|
if(pId !== projectsId || oId !== owner ){
|
||||||
|
// console.log("切换了项目分支···········");
|
||||||
|
this.get_default_selects();
|
||||||
|
}
|
||||||
if(prevPros && this.props && !this.props.checkIfLogin()){
|
if(prevPros && this.props && !this.props.checkIfLogin()){
|
||||||
this.props.history.push("/403")
|
this.props.history.push("/403")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// check_is_login =() =>{
|
|
||||||
// if(!this.props.checkIfLogin()){
|
|
||||||
// this.props.history.push("/403")
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
get_default_selects = () => {
|
get_default_selects = () => {
|
||||||
const { projectsId ,owner } = this.props.match.params;
|
const { projectsId ,owner } = this.props.match.params;
|
||||||
this.setState({ isSpin: true });
|
this.setState({ isSpin: true });
|
||||||
|
|
|
@ -218,7 +218,7 @@ class MilepostDetail extends Component {
|
||||||
</span>
|
</span>
|
||||||
<div className="milepostdiv">
|
<div className="milepostdiv">
|
||||||
<Link to={`/projects/${owner}/${projectsId}/milestones/${meilid}/edit`} className="topWrapper_btn" style={{ marginRight: 15 }} >编辑里程碑</Link>
|
<Link to={`/projects/${owner}/${projectsId}/milestones/${meilid}/edit`} className="topWrapper_btn" style={{ marginRight: 15 }} >编辑里程碑</Link>
|
||||||
<Link to={`/projects/${owner}/${projectsId}/issues/${meilid}/new`} className="topWrapper_btn">创建任务</Link>
|
<Link to={`/projects/${owner}/${projectsId}/issues/${meilid}/new`} className="topWrapper_btn">创建易修</Link>
|
||||||
</div>
|
</div>
|
||||||
</FlexAJ>
|
</FlexAJ>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -352,12 +352,12 @@ class order extends Component {
|
||||||
if (this.props.checkIfLogin()) {
|
if (this.props.checkIfLogin()) {
|
||||||
return(
|
return(
|
||||||
<Link className="topWrapper_btn ml10" target="_blank" to={`/projects/${owner}/${projectsId}/issues/new`}>
|
<Link className="topWrapper_btn ml10" target="_blank" to={`/projects/${owner}/${projectsId}/issues/new`}>
|
||||||
+ 创建任务
|
+ 创建易修
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
}else{
|
}else{
|
||||||
return(
|
return(
|
||||||
<a className="topWrapper_btn ml10" onClick={this.islogin}>+ 创建任务</a>
|
<a className="topWrapper_btn ml10" onClick={this.islogin}>+ 创建易修</a>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,14 +310,14 @@ class order_form extends Component {
|
||||||
<div className="list-right">
|
<div className="list-right">
|
||||||
<div className="pd20">
|
<div className="pd20">
|
||||||
<h3 className="mb15">
|
<h3 className="mb15">
|
||||||
{form_type === "new" ? "新建" :( form_type === "copy" ? "复制" : "编辑")}任务
|
{form_type === "new" ? "新建" :( form_type === "copy" ? "复制" : "编辑")}易修
|
||||||
</h3>
|
</h3>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
{getFieldDecorator("subject", {
|
{getFieldDecorator("subject", {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请填写任务标题",
|
message: "请填写易修标题",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
})(<Input placeholder="标题" size="large" />)}
|
})(<Input placeholder="标题" size="large" />)}
|
||||||
|
|
|
@ -84,11 +84,12 @@ export default ((props) => {
|
||||||
|
|
||||||
// 移除成员
|
// 移除成员
|
||||||
function removeUser(username) {
|
function removeUser(username) {
|
||||||
const url = `/organizations/${OIdentifier}/teams/${groupId}/team_users/${username}.json`;
|
|
||||||
if (username) {
|
if (username) {
|
||||||
|
const url = `/organizations/${OIdentifier}/teams/${groupId}/team_users/quit.json`;
|
||||||
axios.delete(url).then((result) => {
|
axios.delete(url).then((result) => {
|
||||||
if (result && result.data) {
|
if (result && result.data) {
|
||||||
|
props.showNotification(`已成功退出团队!`);
|
||||||
|
props.history.push(`/organize/${OIdentifier}`);
|
||||||
}
|
}
|
||||||
}).catch((error) => { });
|
}).catch((error) => { });
|
||||||
}
|
}
|
||||||
|
|
|
@ -1062,7 +1062,7 @@ class TPMBanner extends Component {
|
||||||
</div> :
|
</div> :
|
||||||
<div className="task-popup-content">
|
<div className="task-popup-content">
|
||||||
<p className="task-popup-text-center font-16 mt10 mb10">
|
<p className="task-popup-text-center font-16 mt10 mb10">
|
||||||
尚未创建任务的实训,不能申请发布
|
尚未创建易修的实训,不能申请发布
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue