forked from Gitlink/forgeplus-react
This commit is contained in:
parent
1621380ba8
commit
a16d9871a3
|
@ -6,7 +6,7 @@ import { getImageUrl } from 'educoder';
|
|||
|
||||
class ActivityItem extends Component{
|
||||
render(){
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const { item } = this.props;
|
||||
return(
|
||||
<div className="activity_item">
|
||||
|
@ -14,20 +14,20 @@ class ActivityItem extends Component{
|
|||
{/* 如果是版本发布 */}
|
||||
{ item.trend_type==="VersionRelease"?
|
||||
<p className="itemLine">
|
||||
<Link to={`/projects/${projectsId}/${author}/version`} className="color-blue font-16">{item.name}</Link>
|
||||
<Link to={`/projects/${projectsId}/version`} className="color-blue font-16">{item.name}</Link>
|
||||
<span className="activity_type">{item.trend_type}</span>
|
||||
</p >
|
||||
:
|
||||
// 如果是工单
|
||||
item.trend_type==="Issue"?
|
||||
<p className="itemLine">
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/${item.trend_id}/detail`} className="color-blue font-16">{item.name}</Link>
|
||||
<Link to={`/projects/${projectsId}/orders/${item.trend_id}/detail`} className="color-blue font-16">{item.name}</Link>
|
||||
<span className="activity_type">{item.trend_type}</span>
|
||||
</p >
|
||||
:
|
||||
// 如果是合并请求
|
||||
<p className="itemLine">
|
||||
<Link to={`/projects/${projectsId}/${author}/merge/${item.trend_id}/Messagecount`} className="color-blue font-16">{item.name}</Link>
|
||||
<Link to={`/projects/${projectsId}/merge/${item.trend_id}/Messagecount`} className="color-blue font-16">{item.name}</Link>
|
||||
<span className="activity_type">{item.trend_type}</span>
|
||||
</p >
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ class Index extends Component{
|
|||
(props) => (<ProjectNew {...this.props} {...props} {...this.state}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:projectsId/:author"
|
||||
<Route path="/projects/:projectsId"
|
||||
render={
|
||||
(props) => (<ProjectDetail {...this.props} {...props} {...this.state}/>)
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ class CoderRootBranch extends Component {
|
|||
|
||||
render(){
|
||||
const { branchList, projectDetail } = this.props;
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const list =()=>{
|
||||
if(branchList && branchList.length>0){
|
||||
return(
|
||||
|
@ -29,7 +29,7 @@ class CoderRootBranch extends Component {
|
|||
return(
|
||||
<li>
|
||||
<div>
|
||||
<Link to={`/projects/${projectsId}/${author}/coders?branch=${item.name}`} className="color-blue font-15" style={{"maxWidth":"100px"}}>{item.name}</Link>
|
||||
<Link to={`/projects/${projectsId}/coders?branch=${item.name}`} className="color-blue font-15" style={{"maxWidth":"100px"}}>{item.name}</Link>
|
||||
{/*<span className="color-blue font-15">{item.name}</span>*/}
|
||||
<p className="f-wrap-alignCenter">
|
||||
<span className="mr5 color-blue">{item.last_commit && item.last_commit.id}</span>
|
||||
|
@ -39,7 +39,7 @@ class CoderRootBranch extends Component {
|
|||
</p>
|
||||
</div>
|
||||
<span>
|
||||
<Link to={`/projects/${projectsId}/${author}/merge/new`} className="mr20 operationBtn">创建合并请求</Link>
|
||||
<Link to={`/projects/${projectsId}/merge/new`} className="mr20 operationBtn">创建合并请求</Link>
|
||||
|
||||
<Dropdown overlay={menu(item.zip_url,item.tar_url)} trigger={['click']} placement="bottomRight" className="operationBtn">
|
||||
<a className="ant-dropdown-link">
|
||||
|
|
|
@ -209,7 +209,7 @@ class CoderRootDirectory extends Component{
|
|||
render(){
|
||||
const { rootList , branch ,filePath , fileDetail , subFileType , readMeContent, isSpin , rootData } = this.state;
|
||||
const { branchLastCommit , http_url , isManager , isDeveloper } = this.props;
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
|
||||
const columns = [
|
||||
{
|
||||
|
@ -295,7 +295,7 @@ class CoderRootDirectory extends Component{
|
|||
{
|
||||
subFileType !== "file" && isManager && isDeveloper &&
|
||||
<p className="addFile">
|
||||
<Link to={`/projects/${projectsId}/${author}/coders/${branch}/newfile${urlRoot}`} >新建文件</Link>
|
||||
<Link to={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`} >新建文件</Link>
|
||||
<Link to={``}>上传文件</Link>
|
||||
</p>
|
||||
}
|
||||
|
|
|
@ -28,22 +28,22 @@ class CoderRootIndex extends Component{
|
|||
return(
|
||||
<div className="main">
|
||||
<Switch {...this.props}>
|
||||
<Route path="/projects/:projectsId/:author/coders/commit"
|
||||
<Route path="/projects/:projectsId/coders/commit"
|
||||
render={
|
||||
(props) => (<CoderRootCommit {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:projectsId/:author/coders/branch"
|
||||
<Route path="/projects/:projectsId/coders/branch"
|
||||
render={
|
||||
(props) => (<CoderRootBranch {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:projectsId/:author/coders"
|
||||
<Route path="/projects/:projectsId/coders"
|
||||
render={
|
||||
(props) => (<CoderRootDirectory {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:projectsId/:author"
|
||||
<Route path="/projects/:projectsId"
|
||||
render={
|
||||
(props) => (<CoderRootDirectory {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
|
|
|
@ -255,7 +255,7 @@ class Detail extends Component{
|
|||
const url = `/projects/${project_id}/forks.json`;
|
||||
axios.post(url).then(result=>{
|
||||
if(result && result.data.status === 0){
|
||||
this.props.history.push(`/projects/${result.data.identifier}/${author}/coders`);
|
||||
this.props.history.push(`/projects/${result.data.identifier}/coders`);
|
||||
}else{
|
||||
this.props.showNotification(result.data.message);
|
||||
}
|
||||
|
@ -290,10 +290,9 @@ class Detail extends Component{
|
|||
const { projectDetail , watchers_count , praises_count , forked_count , project_id , current_user } = this.state;
|
||||
const url = this.props.history.location.pathname;
|
||||
const urlArr= url.split("/");
|
||||
const url_last = urlArr[parseInt(urlArr.length)-1];
|
||||
const urlFlag = (urlArr.length === 4);
|
||||
const urlFlag = (urlArr.length === 3);
|
||||
const { isManager , isDeveloper } = this.props;
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
|
||||
const { state } = this.props.history.location;
|
||||
return(
|
||||
|
@ -305,20 +304,20 @@ class Detail extends Component{
|
|||
{projectDetail && projectDetail.author && projectDetail.author.name}
|
||||
<span className="ml5 mr5">/</span>
|
||||
<span className="hide-1 flex-1">
|
||||
<Link to={`/projects/${projectsId}/${author}/coders`} className="color-white">{ projectDetail && projectDetail.identifier }</Link>
|
||||
<Link to={`/projects/${projectsId}/coders`} className="color-white">{ projectDetail && projectDetail.identifier }</Link>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="f-wrap-between">
|
||||
<ul className="headerMenu-wrapper">
|
||||
<li className={(url_last === ("coders") || urlFlag) ? "active" : ""}><Link to={{pathname:`/projects/${projectsId}/${author}/coders`,state}}><img alt="" src={img_1} width="18" />代码</Link></li>
|
||||
<li className={url_last === ("orders") ? "active" : ""}><Link to={{pathname:`/projects/${projectsId}/${author}/orders`,state}}><img alt="" src={img_2} width="12" />工单{projectDetail&&projectDetail.issues_count===0?"":projectDetail&&projectDetail.issues_count===0?projectDetail.issues_count:""}</Link></li>
|
||||
<li className={url_last === ("merge") ? "active" : ""}><Link to={{pathname:`/projects/${projectsId}/${author}/merge`,state}}><img alt="" src={img_3} width="13" />合并请求{projectDetail&&projectDetail.pull_requests_count===0?"":projectDetail&&projectDetail.pull_requests_count===0?projectDetail.pull_requests_count:""}</Link></li>
|
||||
<li className={url_last === ("version") ? "active" : ""}><Link to={{pathname:`/projects/${projectsId}/${author}/version`,state}}><img alt="" src={img_4} width="16" />版本发布</Link></li>
|
||||
<li className={url_last === ("trends") ? "active" : ""}><Link to={{pathname:`/projects/${projectsId}/${author}/trends`,state}}><img alt="" src={img_6} width="16" />动态</Link></li>
|
||||
<li className={(url.indexOf("coders")>-1 || urlFlag) ? "active" : ""}><Link to={{pathname:`/projects/${projectsId}/coders`,state}}><img alt="" src={img_1} width="18" />代码</Link></li>
|
||||
<li className={url.indexOf("orders")>-1 ? "active" : ""}><Link to={{pathname:`/projects/${projectsId}/orders`,state}}><img alt="" src={img_2} width="12" />工单{projectDetail&&projectDetail.issues_count===0?"":projectDetail&&projectDetail.issues_count===0?projectDetail.issues_count:""}</Link></li>
|
||||
<li className={url.indexOf("merge")>-1 ? "active" : ""}><Link to={{pathname:`/projects/${projectsId}/merge`,state}}><img alt="" src={img_3} width="13" />合并请求{projectDetail&&projectDetail.pull_requests_count===0?"":projectDetail&&projectDetail.pull_requests_count===0?projectDetail.pull_requests_count:""}</Link></li>
|
||||
<li className={url.indexOf("version")>-1 ? "active" : ""}><Link to={{pathname:`/projects/${projectsId}/version`,state}}><img alt="" src={img_4} width="16" />版本发布</Link></li>
|
||||
<li className={url.indexOf("trends")>-1 ? "active" : ""}><Link to={{pathname:`/projects/${projectsId}/trends`,state}}><img alt="" src={img_6} width="16" />动态</Link></li>
|
||||
{
|
||||
isManager &&
|
||||
<li className={url.indexOf("setting")>0 ? "active" : ""}><Link to={`/projects/${projectsId}/${author}/setting`}><img alt="" src={img_7} width="19" />仓库设置</Link></li>
|
||||
<li className={url.indexOf("setting")>0 ? "active" : ""}><Link to={`/projects/${projectsId}/setting`}><img alt="" src={img_7} width="19" />仓库设置</Link></li>
|
||||
}
|
||||
</ul>
|
||||
<span className="df">
|
||||
|
@ -348,55 +347,55 @@ class Detail extends Component{
|
|||
|
||||
<Switch {...this.props}>
|
||||
{/* 新建文件 */}
|
||||
<Route path="/projects/:projectsId/:author/coders/:branch/newfile/:path"
|
||||
<Route path="/projects/:projectsId/coders/:branch/newfile/:path"
|
||||
render={
|
||||
(props) => (<FileNew {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:projectsId/:author/coders/:branch/newfile"
|
||||
<Route path="/projects/:projectsId/coders/:branch/newfile"
|
||||
render={
|
||||
(props) => (<FileNew {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 标签列表 */}
|
||||
<Route path="/projects/:projectsId/:author/orders/tags"
|
||||
<Route path="/projects/:projectsId/orders/tags"
|
||||
render={
|
||||
(props) => (<TagList {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 仓库设置 */}
|
||||
<Route path="/projects/:projectsId/:author/setting"
|
||||
<Route path="/projects/:projectsId/setting"
|
||||
render={
|
||||
(props) => (<Setting {...this.props} {...props} {...this.state} getDetail={this.getDetail} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 工单详情 */}
|
||||
<Route path="/projects/:projectsId/:author/orders/:orderId/detail"
|
||||
<Route path="/projects/:projectsId/orders/:orderId/detail"
|
||||
render={
|
||||
(props) => (<OrderDetail {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 里程碑 */}
|
||||
<Route path="/projects/:projectsId/:author/orders/Milepost"
|
||||
<Route path="/projects/:projectsId/orders/Milepost"
|
||||
render={
|
||||
(props) => (<OrderMilepost {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 新建里程碑 */}
|
||||
<Route path="/projects/:projectsId/:author/orders/meilpost"
|
||||
<Route path="/projects/:projectsId/orders/meilpost"
|
||||
render={
|
||||
(props) => (<OrdernewMilepost {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
{/*里程碑详情*/ }
|
||||
<Route path="/projects/:projectsId/:author/orders/:meilid/MilepostDetail"
|
||||
<Route path="/projects/:projectsId/orders/:meilid/MilepostDetail"
|
||||
render={
|
||||
(props) => (<MilepostDetail {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
{/*修改里程碑*/}
|
||||
<Route path="/projects/:projectsId/:author/orders/:meilid/meilpost"
|
||||
<Route path="/projects/:projectsId/orders/:meilid/meilpost"
|
||||
render={
|
||||
(props) => (<OrderupdateMilepost {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
|
@ -405,28 +404,28 @@ class Detail extends Component{
|
|||
|
||||
{/* 新建工单 */}
|
||||
|
||||
<Route path="/projects/:projectsId/:author/orders/new"
|
||||
<Route path="/projects/:projectsId/orders/new"
|
||||
render={
|
||||
(props) => (<OrderNew {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 修改详情 */}
|
||||
<Route path="/projects/:projectsId/:author/orders/:orderId/updatedetail"
|
||||
<Route path="/projects/:projectsId/orders/:orderId/updatedetail"
|
||||
render={
|
||||
(props) => (<OrderupdateDetail {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 复制详情 */}
|
||||
<Route path="/projects/:projectsId/:author/orders/:orderId/copyetail"
|
||||
<Route path="/projects/:projectsId/orders/:orderId/copyetail"
|
||||
render={
|
||||
(props) => (<OrdercopyDetail {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 动态 */}
|
||||
<Route path="/projects/:projectsId/:author/trends"
|
||||
<Route path="/projects/:projectsId/trends"
|
||||
render={
|
||||
(props) => (<TrendsIndex {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
|
@ -434,66 +433,66 @@ class Detail extends Component{
|
|||
|
||||
|
||||
{/* 代码Index */}
|
||||
<Route path="/projects/:projectsId/:author/orders"
|
||||
<Route path="/projects/:projectsId/orders"
|
||||
render={
|
||||
(props) => (<OrderIndex {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
|
||||
<Route path="/projects/:projectsId/:author/merge/new"
|
||||
<Route path="/projects/:projectsId/merge/new"
|
||||
render={
|
||||
(props) => (<CreateMerge {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
|
||||
<Route path="/projects/:projectsId/:author/merge/:mergeId/UpdateMerge"
|
||||
<Route path="/projects/:projectsId/merge/:mergeId/UpdateMerge"
|
||||
render={
|
||||
(props) => (<UpdateMerge {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
|
||||
<Route path="/projects/:projectsId/:author/merge/:mergeId/Messagecount"
|
||||
<Route path="/projects/:projectsId/merge/:mergeId/Messagecount"
|
||||
render={
|
||||
(props) => (<MessageCount {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
|
||||
<Route path="/projects/:projectsId/:author/merge/:mergeId/MergeSubmit"
|
||||
<Route path="/projects/:projectsId/merge/:mergeId/MergeSubmit"
|
||||
render={
|
||||
(props) => (<MergeSubmit {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:projectsId/:author/version/new"
|
||||
<Route path="/projects/:projectsId/version/new"
|
||||
render={
|
||||
(props) => (<NewVersionIndex {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
<Route path="/projects/:projectsId/:author/version/:versionId/upversion"
|
||||
<Route path="/projects/:projectsId/version/:versionId/upversion"
|
||||
render={
|
||||
(props) => (<UpVersionIndex {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
<Route path="/projects/:projectsId/:author/version"
|
||||
<Route path="/projects/:projectsId/version"
|
||||
render={
|
||||
(props) => (<VersionIndex {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
|
||||
<Route path="/projects/:projectsId/:author/merge"
|
||||
<Route path="/projects/:projectsId/merge"
|
||||
render={
|
||||
(props) => (<MergeIndexDetail {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:projectsId/:author/coders"
|
||||
<Route path="/projects/:projectsId/coders"
|
||||
render={
|
||||
(props) => (<CoderRootIndex {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:projectsId/:author"
|
||||
<Route path="/projects/:projectsId"
|
||||
render={
|
||||
(props) => (<CoderRootIndex {...this.props} {...props} {...this.state} current_user={current_user}/>)
|
||||
}
|
||||
|
|
|
@ -4,15 +4,15 @@ import { Link} from 'react-router-dom';
|
|||
class DetailTop extends Component{
|
||||
render(){
|
||||
const { projectDetail } = this.props;
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const { pathname } = this.props.location;
|
||||
return(
|
||||
<p className="branch-wrapper">
|
||||
<Link to={`/projects/${projectsId}/${author}/coders/commit`} className={ pathname.indexOf("/coders/commit") > 0 ? "active" : ""}>
|
||||
<Link to={`/projects/${projectsId}/coders/commit`} className={ pathname.indexOf("/coders/commit") > 0 ? "active" : ""}>
|
||||
<i className="iconfont icon-tijiaojilu font-18 mr3"></i>
|
||||
<span className="mr3">{projectDetail && projectDetail.commits_count}</span>提交
|
||||
</Link>
|
||||
<Link to={`/projects/${projectsId}/${author}/coders/branch`} className={ pathname.indexOf("/coders/branch") > 0 ? "active" : ""}>
|
||||
<Link to={`/projects/${projectsId}/coders/branch`} className={ pathname.indexOf("/coders/branch") > 0 ? "active" : ""}>
|
||||
<i className="iconfont icon-fenzhi font-18 mr3"></i>
|
||||
<span className="mr3">{projectDetail && projectDetail.branches_count}</span>分支
|
||||
</Link>
|
||||
|
|
|
@ -25,7 +25,7 @@ class IndexItem extends Component{
|
|||
<img className="p-r-photo" alt="" src={getImageUrl(`images/${item.author && item.author.image_url}`)} ></img>
|
||||
<div className="p-r-Infos">
|
||||
<div className="p-r-name">
|
||||
<Link to={`/projects/${item.id}/${item.author && item.author.login}/coder`} className="hide-1 font-16 color-grey-3" style={{whiteSpace:"wrap"}}>{item.name}</Link>
|
||||
<Link to={`/projects/${item.id}/coders`} className="hide-1 font-16 color-grey-3" style={{whiteSpace:"wrap"}}>{item.name}</Link>
|
||||
</div>
|
||||
<div className="p-r-content">
|
||||
<p className="break_word task-hide flex1" style={{maxHeight:"40px",width:"0"}}>{item.description}</p>
|
||||
|
|
|
@ -164,7 +164,7 @@ class MergeDetail extends Component{
|
|||
})
|
||||
}
|
||||
render(){
|
||||
const { projectsId , mergeid , author } = this.props.match.params;
|
||||
const { projectsId , mergeid } = this.props.match.params;
|
||||
const { data,journalsdata, showFiles } = this.state;
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
const url = this.props.history.location.pathname;
|
||||
|
@ -235,14 +235,14 @@ class MergeDetail extends Component{
|
|||
<div className="main">
|
||||
<div className="topWrapper">
|
||||
<Nav {...this.props} {...this.state}/>
|
||||
<Link to={`/projects/${projectsId}/${author}/merge/new`} className="topWrapper_btn">创建合并请求</Link>
|
||||
<Link to={`/projects/${projectsId}/merge/new`} className="topWrapper_btn">创建合并请求</Link>
|
||||
</div>
|
||||
<div>
|
||||
<div className="detailContent">
|
||||
<p>
|
||||
<span className="font-16" > { data && data.issue.subject}</span>
|
||||
<div>
|
||||
<Link to={`/projects/${projectsId}/${author}/merge/${mergeid}/updatemerge`} className="color-blue fr">编辑</Link>
|
||||
<Link to={`/projects/${projectsId}/merge/${mergeid}/updatemerge`} className="color-blue fr">编辑</Link>
|
||||
</div>
|
||||
</p>
|
||||
<p className="mt15">{ data && data.issue.description}</p>
|
||||
|
@ -256,8 +256,8 @@ class MergeDetail extends Component{
|
|||
<div className="detailHeader-wrapper">
|
||||
<div className="normal f-wrap-between">
|
||||
<ul className="headerMenu-wrapper">
|
||||
<li className={url.indexOf("Messagecount")>0? "active" : ""}><Link to={`/projects/${projectsId}/${author}/merge/${mergeid}/Messagecount`}>对话内容</Link></li>
|
||||
<li className={url.indexOf("MergeSubmit")>0 ? "active" : ""}><Link to={`/projects/${projectsId}/${author}/merge/${mergeid}/MergeSubmit`}>代码提交</Link></li>
|
||||
<li className={url.indexOf("Messagecount")>0? "active" : ""}><Link to={`/projects/${projectsId}/merge/${mergeid}/Messagecount`}>对话内容</Link></li>
|
||||
<li className={url.indexOf("MergeSubmit")>0 ? "active" : ""}><Link to={`/projects/${projectsId}/merge/${mergeid}/MergeSubmit`}>代码提交</Link></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -19,7 +19,7 @@ class MergeItem extends Component{
|
|||
|
||||
render(){
|
||||
const { issues , search_count , page , limit } = this.props;
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const renderList =()=>{
|
||||
if(issues && issues.length > 0){
|
||||
return(
|
||||
|
@ -29,7 +29,7 @@ class MergeItem extends Component{
|
|||
<div className="flex-1">
|
||||
<p className="mb15 df">
|
||||
<span className="issueNo"># {search_count - (key + (page-1) * limit)}</span>
|
||||
<Link to={`/projects/${projectsId}/${author}/merge/${item.pull_request_id}/Messagecount`} className="flex-1 hide-1 font-16 color-grey-3 lineh-30">{item.name}</Link>
|
||||
<Link to={`/projects/${projectsId}/merge/${item.pull_request_id}/Messagecount`} className="flex-1 hide-1 font-16 color-grey-3 lineh-30">{item.name}</Link>
|
||||
</p>
|
||||
<p className="color-grey-6 font-12">
|
||||
<span>{item.format_time}</span><span className="ml5">发布</span>
|
||||
|
|
|
@ -105,7 +105,7 @@ class MergeSubmit extends Component{
|
|||
|
||||
|
||||
render(){
|
||||
const { projectsId,mergeId , author} = this.props.match.params;
|
||||
const { projectsId,mergeId } = this.props.match.params;
|
||||
const { data,titledata} = this.state;
|
||||
|
||||
|
||||
|
@ -158,7 +158,7 @@ class MergeSubmit extends Component{
|
|||
<div className="main">
|
||||
<div className="topWrapper">
|
||||
<Nav {...this.props} {...this.state}/>
|
||||
<Link to={`/projects/${projectsId}/${author}/merge/new`} className="topWrapper_btn">创建合并请求</Link>
|
||||
<Link to={`/projects/${projectsId}/merge/new`} className="topWrapper_btn">创建合并请求</Link>
|
||||
</div>
|
||||
<div>
|
||||
<div className="detailContent">
|
||||
|
@ -178,7 +178,7 @@ class MergeSubmit extends Component{
|
|||
由 { data && data.issue.author_name} 于 { data && data.issue.created_at }创建{ data && data.issue.journals_count && data.issue.journals_count > 0 ?` · ${data.issue.journals_count} 条评论`:""}
|
||||
</span>
|
||||
<span className="pull-right lineH32">
|
||||
<Link to={`/projects/${projectsId}/${author}/merge/${mergeId}/UpdateMerge`} className="color-blue fr">编辑</Link>
|
||||
<Link to={`/projects/${projectsId}/merge/${mergeId}/UpdateMerge`} className="color-blue fr">编辑</Link>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -187,8 +187,8 @@ class MergeSubmit extends Component{
|
|||
<div className="detailHeader-wrapper">
|
||||
<div className="normal f-wrap-between">
|
||||
<ul className="headerMenu-wrapper" style={{paddingTop:42,paddingLeft:15}}>
|
||||
<li className={url.indexOf("Messagecount")>0? "active" : ""}><Link to={`/projects/${projectsId}/${author}/merge/${mergeId}/Messagecount`}>对话内容</Link></li>
|
||||
<li className={url.indexOf("MergeSubmit")>0 ? "active" : ""}><Link to={`/projects/${projectsId}/${author}/merge/${mergeId}/MergeSubmit`}>代码提交</Link></li>
|
||||
<li className={url.indexOf("Messagecount")>0? "active" : ""}><Link to={`/projects/${projectsId}/merge/${mergeId}/Messagecount`}>对话内容</Link></li>
|
||||
<li className={url.indexOf("MergeSubmit")>0 ? "active" : ""}><Link to={`/projects/${projectsId}/merge/${mergeId}/MergeSubmit`}>代码提交</Link></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -315,7 +315,7 @@ class MessageCount extends Component{
|
|||
}
|
||||
|
||||
render(){
|
||||
const { projectsId,mergeId , author } = this.props.match.params;
|
||||
const { projectsId,mergeId } = this.props.match.params;
|
||||
const { data,journalsdata, page, limit, search_count, isSpin, isedit, showFiles } = this.state;
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
const { current_user } = this.props;
|
||||
|
@ -411,7 +411,7 @@ class MessageCount extends Component{
|
|||
<div className="main">
|
||||
<div className="topWrapper">
|
||||
<Nav {...this.props} {...this.state}/>
|
||||
<Link to={`/projects/${projectsId}/${author}/merge/new`} className="topWrapper_btn">创建合并请求</Link>
|
||||
<Link to={`/projects/${projectsId}/merge/new`} className="topWrapper_btn">创建合并请求</Link>
|
||||
</div>
|
||||
<div>
|
||||
<div className="detailContent">
|
||||
|
@ -431,7 +431,7 @@ class MessageCount extends Component{
|
|||
由 { data && data.issue.author_name} 于 { data && data.issue.created_at }创建{ data && data.issue.journals_count && data.issue.journals_count > 0 ?` · ${data.issue.journals_count} 条评论`:""}
|
||||
</span>
|
||||
<span className="pull-right lineH32">
|
||||
<Link to={`/projects/${projectsId}/${author}/merge/${mergeId}/UpdateMerge`} className="color-blue fr">编辑</Link>
|
||||
<Link to={`/projects/${projectsId}/merge/${mergeId}/UpdateMerge`} className="color-blue fr">编辑</Link>
|
||||
</span>
|
||||
</p>
|
||||
<div className="df mt20">
|
||||
|
@ -445,8 +445,8 @@ class MessageCount extends Component{
|
|||
<div className="detailHeader-wrapper">
|
||||
<div className="normal f-wrap-between">
|
||||
<ul className="headerMenu-wrapper" style={{paddingTop:42,paddingLeft:15}}>
|
||||
<li className={url.indexOf("Messagecount")>0? "active" : ""}><Link to={`/projects/${projectsId}/${author}/merge/${mergeId}/Messagecount`}>对话内容</Link></li>
|
||||
<li className={url.indexOf("MergeSubmit")>0 ? "active" : ""}><Link to={`/projects/${projectsId}/${author}/merge/${mergeId}/MergeSubmit`}>代码提交</Link></li>
|
||||
<li className={url.indexOf("Messagecount")>0? "active" : ""}><Link to={`/projects/${projectsId}/merge/${mergeId}/Messagecount`}>对话内容</Link></li>
|
||||
<li className={url.indexOf("MergeSubmit")>0 ? "active" : ""}><Link to={`/projects/${projectsId}/merge/${mergeId}/MergeSubmit`}>代码提交</Link></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -139,7 +139,7 @@ class NewMerge extends Component{
|
|||
submit=()=>{
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/pull_requests.json`;
|
||||
|
||||
if(values.issue_tag_ids.length > 0){
|
||||
|
@ -156,7 +156,7 @@ class NewMerge extends Component{
|
|||
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/merge`);
|
||||
this.props.history.push(`/projects/${projectsId}/merge`);
|
||||
}
|
||||
|
||||
}).catch(error=>{
|
||||
|
@ -223,7 +223,7 @@ class NewMerge extends Component{
|
|||
|
||||
render(){
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const { current_user } = this.props;
|
||||
const { issue_tag_ids , fixed_version_id ,assigned_to_id ,issue_chosen,data,titledata} = this.state;
|
||||
|
||||
|
@ -276,7 +276,7 @@ class NewMerge extends Component{
|
|||
if(this.state.mergedata&&this.state.mergedata.status===-2){
|
||||
return(
|
||||
<div>
|
||||
在这些分支直接合并请求已经存在:<Link to={`/projects/${projectsId}/${author}/merge/${this.state.mergedata&&this.state.mergedata.pull_request_id}/Messagecount`} style={{color:'blue'}}>{this.state.mergedata&&this.state.mergedata.pull_request_name}</Link>
|
||||
在这些分支直接合并请求已经存在:<Link to={`/projects/${projectsId}/merge/${this.state.mergedata&&this.state.mergedata.pull_request_id}/Messagecount`} style={{color:'blue'}}>{this.state.mergedata&&this.state.mergedata.pull_request_name}</Link>
|
||||
</div>
|
||||
)
|
||||
}else{
|
||||
|
|
|
@ -134,7 +134,7 @@ class UpdateMerge extends Component{
|
|||
const { fileList } = this.state;
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const { projectsId , mergeId , author } = this.props.match.params;
|
||||
const { projectsId , mergeId } = this.props.match.params;
|
||||
const { subject ,data} = this.state;
|
||||
const url = `/projects/${projectsId}/pull_requests/${mergeId}.json`;
|
||||
|
||||
|
@ -155,7 +155,7 @@ class UpdateMerge extends Component{
|
|||
...values
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/merge`);
|
||||
this.props.history.push(`/projects/${projectsId}/merge`);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
|
@ -167,7 +167,7 @@ class UpdateMerge extends Component{
|
|||
|
||||
|
||||
render(){
|
||||
const { projectsId , mergeId , author } = this.props.match.params;
|
||||
const { projectsId , mergeId } = this.props.match.params;
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
const { current_user } = this.props;
|
||||
const { issue_tag_ids , fixed_version_id , branch_name , status_id , tracker_id , issue_type ,assigned_to_id , priority_id , done_ratio,
|
||||
|
@ -210,7 +210,7 @@ class UpdateMerge extends Component{
|
|||
}
|
||||
<p className="clearfix mt15 text-right">
|
||||
<a className="topWrapper_btn fr" type="submit" style={{marginLeft:5}} onClick={this.handleSubmit}>保存</a>
|
||||
<Link to={`/projects/${projectsId}/${author}/merge/${mergeId}/Messagecount`} className="a_btn cancel_btn fr">取消</Link>
|
||||
<Link to={`/projects/${projectsId}/merge/${mergeId}/Messagecount`} className="a_btn cancel_btn fr">取消</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -225,7 +225,7 @@ class merge extends Component{
|
|||
render(){
|
||||
|
||||
const { issue_chosen , issues , limit , page , search_count , data , isSpin,openselect,closeselect } = this.state;
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
|
||||
const menu = (
|
||||
<Menu onClick={(e)=>this.arrayList(e)}>
|
||||
|
@ -250,7 +250,7 @@ class merge extends Component{
|
|||
<div className="main">
|
||||
<div className="topWrapper">
|
||||
<Nav {...this.props} {...this.state}/>
|
||||
<Link to={`/projects/${projectsId}/${author}/merge/new`} className="topWrapper_btn">创建合并请求</Link>
|
||||
<Link to={`/projects/${projectsId}/merge/new`} className="topWrapper_btn">创建合并请求</Link>
|
||||
</div>
|
||||
<div className="topWrapper" style={{borderBottom:"none"}}>
|
||||
<p className="topWrapper_type">
|
||||
|
|
|
@ -23,7 +23,7 @@ class UserSubmitComponent extends Component{
|
|||
// 提交变更
|
||||
subMitFrom=()=>{
|
||||
const { current_user , filepath , content } = this.props;
|
||||
const { branch , projectsId , author } = this.props.match.params;
|
||||
const { branch , projectsId } = this.props.match.params;
|
||||
const { submitType } = this.state;
|
||||
let path = filepath.substr(1);
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
|
@ -37,7 +37,7 @@ class UserSubmitComponent extends Component{
|
|||
message:values.desc
|
||||
}).then((result)=>{
|
||||
if(result && result.data.name){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/coders`);
|
||||
this.props.history.push(`/projects/${projectsId}/coders`);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
|
|
|
@ -109,7 +109,7 @@ class CopyDetail extends Component{
|
|||
|
||||
//删除工单
|
||||
deleteorder=(id)=>{
|
||||
const { projectsId , orderId , author} = this.props.match.params;
|
||||
const { projectsId , orderId } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/issues/${orderId}.json`;
|
||||
axios.delete(url,{ data: {
|
||||
project_id: projectsId,
|
||||
|
@ -117,7 +117,7 @@ class CopyDetail extends Component{
|
|||
}
|
||||
}).then((result)=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/orders`);
|
||||
this.props.history.push(`/projects/${projectsId}/orders`);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
console.log(error);
|
||||
|
@ -157,9 +157,9 @@ class CopyDetail extends Component{
|
|||
const { fileList } = this.state;
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const { projectsId , orderId , author } = this.props.match.params;
|
||||
const { projectsId , orderId } = this.props.match.params;
|
||||
const { subject } = this.state;
|
||||
const url = `/projects/${projectsId}/${author}/issues/${orderId}.json`;
|
||||
const url = `/projects/${projectsId}/issues/${orderId}.json`;
|
||||
if(values.issue_tag_ids===0){
|
||||
values.issue_tag_ids = ""
|
||||
}else{
|
||||
|
@ -185,7 +185,7 @@ class CopyDetail extends Component{
|
|||
...values
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/orders`);
|
||||
this.props.history.push(`/projects/${projectsId}/orders`);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
|
@ -197,7 +197,7 @@ class CopyDetail extends Component{
|
|||
|
||||
|
||||
render(){
|
||||
const { projectsId , orderId , author } = this.props.match.params;
|
||||
const { projectsId , orderId } = this.props.match.params;
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
const { current_user } = this.props;
|
||||
const { issue_tag_ids , fixed_version_id , branch_name , status_id , tracker_id , issue_type ,assigned_to_id , priority_id , done_ratio,
|
||||
|
@ -259,7 +259,7 @@ class CopyDetail extends Component{
|
|||
<p className="clearfix mt15 text-right">
|
||||
<a className="topWrapper_btn fr" type="submit" style={{marginLeft: 5}}
|
||||
onClick={this.handleSubmit}>保存</a>
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/${orderId}/detail`}
|
||||
<Link to={`/projects/${projectsId}/orders/${orderId}/detail`}
|
||||
className="a_btn cancel_btn fr">取消</Link>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -144,7 +144,7 @@ class Detail extends Component{
|
|||
|
||||
//删除工单信息
|
||||
deletedetail=(id)=>{
|
||||
const { projectsId , orderId , author } = this.props.match.params;
|
||||
const { projectsId , orderId } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/issues/${orderId}.json`;
|
||||
axios.delete(url,{ data: {
|
||||
project_id: projectsId,
|
||||
|
@ -152,7 +152,7 @@ class Detail extends Component{
|
|||
}
|
||||
}).then((result)=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/orders`);
|
||||
this.props.history.push(`/projects/${projectsId}/orders`);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
console.log(error);
|
||||
|
@ -269,14 +269,14 @@ class Detail extends Component{
|
|||
|
||||
//复制
|
||||
copydetail=()=>{
|
||||
const {projectsId , orderId , author} = this.props.match.params;
|
||||
const {projectsId , orderId} = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/issues/${orderId}/copy.json`;
|
||||
axios.post(url,{
|
||||
project_id:projectsId,
|
||||
id:orderId,
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/orders/${result.data.issue_id}/copyetail`);
|
||||
this.props.history.push(`/projects/${projectsId}/orders/${result.data.issue_id}/copyetail`);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
|
@ -329,7 +329,7 @@ class Detail extends Component{
|
|||
};
|
||||
|
||||
render(){
|
||||
const { projectsId , orderId , author} = this.props.match.params;
|
||||
const { projectsId , orderId } = this.props.match.params;
|
||||
const { data,journalsdata, page, limit, search_count, isSpin, isedit, showFiles , quillValue , quillFlag } = this.state;
|
||||
const { current_user } = this.props;
|
||||
const Paginations = (
|
||||
|
@ -422,7 +422,7 @@ class Detail extends Component{
|
|||
<div className="main">
|
||||
<div className="topWrapper">
|
||||
<Nav {...this.props} {...this.state}/>
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/new`} className="topWrapper_btn">创建工单</Link>
|
||||
<Link to={`/projects/${projectsId}/orders/new`} className="topWrapper_btn">创建工单</Link>
|
||||
</div>
|
||||
<div>
|
||||
<div className="detailContent">
|
||||
|
@ -449,7 +449,7 @@ class Detail extends Component{
|
|||
<a className="color-blue fr" style={{marginLeft:20,marginRight:20}}>删除</a>
|
||||
</Popconfirm>
|
||||
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/${orderId}/updatedetail`} className="color-blue fr">编辑</Link>
|
||||
<Link to={`/projects/${projectsId}/orders/${orderId}/updatedetail`} className="color-blue fr">编辑</Link>
|
||||
</span>
|
||||
:
|
||||
""
|
||||
|
|
|
@ -146,7 +146,7 @@ class Milepost extends Component{
|
|||
|
||||
render(){
|
||||
const { data , limit , page,openselect,closeselect } = this.state;
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const menu = (
|
||||
<Menu onClick={this.arrayList}>
|
||||
<Menu.Item key={'created_on'} value="desc">到期日从近到远</Menu.Item>
|
||||
|
@ -181,7 +181,7 @@ class Milepost extends Component{
|
|||
<div className="milepostwidth">
|
||||
<div className="grid-item width100">
|
||||
<i className="iconfont icon-lubiaosignpost3 font-12 mr3"></i>
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/${item.id}/MilepostDetail`} className="font-16">{item.name}</Link>
|
||||
<Link to={`/projects/${projectsId}/orders/${item.id}/MilepostDetail`} className="font-16">{item.name}</Link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -217,7 +217,7 @@ class Milepost extends Component{
|
|||
<div className="milepostleft">
|
||||
<div className="grid-item mr15 color-grey-9">
|
||||
<i className="iconfont icon-bianji3 font-14 mr5"></i>
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/${item.id}/meilpost`} className="color-grey-9">编辑</Link>
|
||||
<Link to={`/projects/${projectsId}/orders/${item.id}/meilpost`} className="color-grey-9">编辑</Link>
|
||||
</div>
|
||||
<div className="grid-item mr15 color-grey-9">
|
||||
<i className="iconfont icon-yiguanbi1 font-14 mr5"></i>
|
||||
|
@ -264,7 +264,7 @@ class Milepost extends Component{
|
|||
<Nav {...this.props} {...this.state} />
|
||||
{
|
||||
data && data.user_admin_or_member ?
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/meilpost`} className="topWrapper_btn">新的里程碑</Link>
|
||||
<Link to={`/projects/${projectsId}/orders/meilpost`} className="topWrapper_btn">新的里程碑</Link>
|
||||
: ''
|
||||
}
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ class MilepostDetail extends Component{
|
|||
render(){
|
||||
|
||||
const { issue_chosen , issues , limit , page , search_count , data , isSpin,openselect,closeselect } = this.state;
|
||||
const { projectsId , meilid , author } = this.props.match.params;
|
||||
const { projectsId , meilid } = this.props.match.params;
|
||||
|
||||
const menu = (
|
||||
<Menu onClick={(e)=>this.getOption(e)}>
|
||||
|
@ -286,8 +286,8 @@ class MilepostDetail extends Component{
|
|||
<div className="topmilepost">
|
||||
<p>{data&&data.name}</p>
|
||||
<div className="milepostdiv">
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/${meilid}/meilpost`} className="topWrapper_btn" style={{marginRight:15}} >编辑里程碑</Link>
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/new`} className="topWrapper_btn">创建工单</Link>
|
||||
<Link to={`/projects/${projectsId}/orders/${meilid}/meilpost`} className="topWrapper_btn" style={{marginRight:15}} >编辑里程碑</Link>
|
||||
<Link to={`/projects/${projectsId}/orders/new`} className="topWrapper_btn">创建工单</Link>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid-item mr10">
|
||||
|
|
|
@ -10,11 +10,11 @@ class Nav extends Component{
|
|||
}
|
||||
|
||||
render(){
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
return(
|
||||
<p className="topWrapper_nav">
|
||||
<NavLink activeClassName="active" className="issue-type-button" to={`/projects/${projectsId}/${author}/orders/tags`}>标签</NavLink>
|
||||
<NavLink activeClassName="active" className="issue-type-button" to={`/projects/${projectsId}/${author}/orders/Milepost`}>里程碑</NavLink>
|
||||
<NavLink activeClassName="active" className="issue-type-button" to={`/projects/${projectsId}/orders/tags`}>标签</NavLink>
|
||||
<NavLink activeClassName="active" className="issue-type-button" to={`/projects/${projectsId}/orders/Milepost`}>里程碑</NavLink>
|
||||
|
||||
</p>
|
||||
)
|
||||
|
|
|
@ -82,7 +82,7 @@ class New extends Component{
|
|||
handleSubmit=()=>{
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const { fileList } = this.state;
|
||||
const url = `/projects/${projectsId}/issues.json`;
|
||||
if(values.status_id==="新增"){
|
||||
|
@ -112,7 +112,7 @@ class New extends Component{
|
|||
}).then(result=>{
|
||||
if(result){
|
||||
this.props.showNotification("工单创建成功!");
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/orders`);
|
||||
this.props.history.push(`/projects/${projectsId}/orders`);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
|
|
|
@ -18,7 +18,7 @@ class OrderItem extends Component{
|
|||
|
||||
render(){
|
||||
const { issues , search_count , page , limit } = this.props;
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
|
||||
const renderList =()=>{
|
||||
if(issues && issues.length > 0){
|
||||
|
@ -29,7 +29,7 @@ class OrderItem extends Component{
|
|||
<div className="flex-1">
|
||||
<p className="mb15 df">
|
||||
<span className="issueNo"># {search_count - (key + (page-1) * limit)}</span>
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/${item.id}/detail`} className="flex-1 hide-1 font-16 color-grey-3 lineh-30">{item.name}</Link>
|
||||
<Link to={`/projects/${projectsId}/orders/${item.id}/detail`} className="flex-1 hide-1 font-16 color-grey-3 lineh-30">{item.name}</Link>
|
||||
</p>
|
||||
<p className="color-grey-6 font-12">
|
||||
<span>{item.format_time}</span><span className="ml5">发布</span>
|
||||
|
@ -49,7 +49,7 @@ class OrderItem extends Component{
|
|||
<li>{item.assign_user_name || "--"}</li>
|
||||
<li>{item.priority || "--"}</li>
|
||||
<li>{item.done_ratio || "--"}</li>
|
||||
<li>{ item.journals_count ? <Link to={`/projects/${projectsId}/${author}/orders/${item.id}/detail`}><i className="iconfont icon-pinglun1 mr3 font-16"></i>{item.journals_count}</Link> : "" }</li>
|
||||
<li>{ item.journals_count ? <Link to={`/projects/${projectsId}/orders/${item.id}/detail`}><i className="iconfont icon-pinglun1 mr3 font-16"></i>{item.journals_count}</Link> : "" }</li>
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -146,7 +146,7 @@ class UpdateDetail extends Component{
|
|||
const { fileList } = this.state;
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const { projectsId , orderId , author } = this.props.match.params;
|
||||
const { projectsId , orderId } = this.props.match.params;
|
||||
const { subject } = this.state;
|
||||
const url = `/projects/${projectsId}/issues/${orderId}.json`;
|
||||
|
||||
|
@ -169,7 +169,7 @@ class UpdateDetail extends Component{
|
|||
...values
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/orders`);
|
||||
this.props.history.push(`/projects/${projectsId}/orders`);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
|
@ -181,7 +181,7 @@ class UpdateDetail extends Component{
|
|||
|
||||
|
||||
render(){
|
||||
const { projectsId , orderId , author } = this.props.match.params;
|
||||
const { projectsId , orderId } = this.props.match.params;
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
const { current_user } = this.props;
|
||||
const { issue_tag_ids , fixed_version_id , branch_name , status_id , tracker_id , issue_type ,assigned_to_id , priority_id , done_ratio,
|
||||
|
@ -231,7 +231,7 @@ class UpdateDetail extends Component{
|
|||
}
|
||||
<p className="clearfix mt15 text-right">
|
||||
<a className="topWrapper_btn fr" type="submit" style={{marginLeft:5}} onClick={this.handleSubmit}>保存</a>
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/${orderId}/detail`} className="a_btn cancel_btn fr">取消</Link>
|
||||
<Link to={`/projects/${projectsId}/orders/${orderId}/detail`} className="a_btn cancel_btn fr">取消</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -68,7 +68,7 @@ class UpdateMilepost extends Component{
|
|||
submit=()=>{
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const { meilid } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/versions/${meilid}.json`;
|
||||
let time=undefined;
|
||||
|
@ -85,7 +85,7 @@ class UpdateMilepost extends Component{
|
|||
status:'open'
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/orders/Milepost`);
|
||||
this.props.history.push(`/projects/${projectsId}/orders/Milepost`);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class NewMilepost extends Component{
|
|||
submit=()=>{
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/versions`;
|
||||
let time=undefined;
|
||||
if(this.state.selectedValue===undefined){
|
||||
|
@ -56,7 +56,7 @@ class NewMilepost extends Component{
|
|||
status:'open'
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/orders/Milepost`);
|
||||
this.props.history.push(`/projects/${projectsId}/orders/Milepost`);
|
||||
}
|
||||
|
||||
}).catch(error=>{
|
||||
|
|
|
@ -311,7 +311,7 @@ class order extends Component{
|
|||
|
||||
render(){
|
||||
const { issue_chosen , issues , limit , page , search_count , data , assigned_to_id , author_id , isSpin,openselect,closeselect } = this.state;
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
|
||||
const menu = (
|
||||
<Menu onClick={(e)=>this.getOption(e)}>
|
||||
|
@ -338,7 +338,7 @@ class order extends Component{
|
|||
<Nav {...this.props} {...this.state}/>
|
||||
{
|
||||
data && data.user_admin_or_member ?
|
||||
<Link to={`/projects/${projectsId}/${author}/orders/new`} className="topWrapper_btn">创建工单</Link>
|
||||
<Link to={`/projects/${projectsId}/orders/new`} className="topWrapper_btn">创建工单</Link>
|
||||
: ''
|
||||
}
|
||||
|
||||
|
|
|
@ -21,28 +21,28 @@ const Collaborator = Loadable({
|
|||
})
|
||||
class Index extends Component{
|
||||
render(){
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
console.log(this.props);
|
||||
const { pathname } = this.props.history.location;
|
||||
|
||||
const flag = (pathname === `/projects/${projectsId}/${author}/setting`);
|
||||
const flag = (pathname === `/projects/${projectsId}/setting`);
|
||||
return(
|
||||
<div>
|
||||
<ul className="settingNav">
|
||||
<li className={flag?"active":""}><Link to={`/projects/${projectsId}/${author}/setting`}>仓库</Link></li>
|
||||
<li className={pathname.indexOf('setting/collaborator')>-1?"active":""}><Link to={`/projects/${projectsId}/${author}/setting/collaborator`}>协作者</Link></li>
|
||||
<li className={flag?"active":""}><Link to={`/projects/${projectsId}/setting`}>仓库</Link></li>
|
||||
<li className={pathname.indexOf('setting/collaborator')>-1?"active":""}><Link to={`/projects/${projectsId}/setting/collaborator`}>协作者</Link></li>
|
||||
{/* <li className={pathname.indexOf('setting/branch')>-1?"active":""}><Link to={`/projects/${projectsId}/setting/branch`}>分支列表</Link></li> */}
|
||||
</ul>
|
||||
<div className="main">
|
||||
<Switch {...this.props}>
|
||||
{/* 协作者 */}
|
||||
<Route path="/projects/:projectsId/:author/collaborator"
|
||||
<Route path="/projects/:projectsId/collaborator"
|
||||
render={
|
||||
(props) => (<Collaborator {...this.props} {...props} {...this.state}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 修改仓库信息 */}
|
||||
<Route path="/projects/:projectsId/:author/setting"
|
||||
<Route path="/projects/:projectsId/setting"
|
||||
render={
|
||||
(props) => (<Setting {...this.props} {...props} {...this.state}/>)
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ class NewVersion extends Component{
|
|||
handleSubmit=(draft)=>{
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const { pull,tag_name,ischeck} = this.state;
|
||||
const url = `/projects/${projectsId}/version_releases.json`;
|
||||
// if(values.issue_type==="普通"){
|
||||
|
@ -82,7 +82,7 @@ class NewVersion extends Component{
|
|||
target_commitish:pull,
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/version`);
|
||||
this.props.history.push(`/projects/${projectsId}/version`);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
|
|
|
@ -48,7 +48,7 @@ class NewVersion extends Component{
|
|||
|
||||
//delete
|
||||
deleteversion=()=>{
|
||||
const { projectsId , versionId , author} = this.props.match.params;
|
||||
const { projectsId , versionId } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/version_releases/${versionId}.json`;
|
||||
axios.delete(url,{ data: {
|
||||
project_id: projectsId,
|
||||
|
@ -56,7 +56,7 @@ class NewVersion extends Component{
|
|||
}
|
||||
}).then((result)=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/version`);
|
||||
this.props.history.push(`/projects/${projectsId}/version`);
|
||||
|
||||
}
|
||||
}).catch((error)=>{
|
||||
|
@ -68,7 +68,7 @@ class NewVersion extends Component{
|
|||
handleSubmit=()=>{
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const { projectsId , versionId , author } = this.props.match.params;
|
||||
const { projectsId , versionId } = this.props.match.params;
|
||||
const { pull,ischeck } = this.state;
|
||||
const url = `/projects/${projectsId}/version_releases/${versionId}.json`;
|
||||
// if(values.issue_type==="普通"){
|
||||
|
@ -82,7 +82,7 @@ class NewVersion extends Component{
|
|||
target_commitish:pull
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
this.props.history.push(`/projects/${projectsId}/${author}/version`);
|
||||
this.props.history.push(`/projects/${projectsId}/version`);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
|
|
|
@ -65,7 +65,7 @@ class version extends Component{
|
|||
|
||||
|
||||
render(){
|
||||
const { projectsId , author } = this.props.match.params;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const{data}=this.state
|
||||
const renderList =()=>{
|
||||
if(data && data.releases && data.releases.length>0 ){
|
||||
|
@ -84,7 +84,7 @@ class version extends Component{
|
|||
{
|
||||
data && data.user_permission ?
|
||||
<div className="versionrighe">
|
||||
<h1 style={{marginLeft:15,marginTop:5}}>{item.name}<Link to={`/projects/${projectsId}/${author}/version/${item.version_id}/upversion`} style={{color:'blue',fontSize:10,marginLeft:5}}>(编辑)</Link> </h1>
|
||||
<h1 style={{marginLeft:15,marginTop:5}}>{item.name}<Link to={`/projects/${projectsId}/version/${item.version_id}/upversion`} style={{color:'blue',fontSize:10,marginLeft:5}}>(编辑)</Link> </h1>
|
||||
</div>
|
||||
: ''
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ class version extends Component{
|
|||
<h1>版本发布</h1>
|
||||
{
|
||||
data && data.user_permission ?
|
||||
<Link to={`/projects/${projectsId}/${author}/version/new`} className="topWrapper_btn">发布新版</Link>
|
||||
<Link to={`/projects/${projectsId}/version/new`} className="topWrapper_btn">发布新版</Link>
|
||||
: ''
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue