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