forked from Gitlink/forgeplus-react
update issue
This commit is contained in:
parent
f768e0e9db
commit
c5e8e35486
|
@ -133,7 +133,17 @@ function DropMenu({
|
|||
return(
|
||||
<p style={{display:"flex",alignItems:"center"}} className={removeFlag?"removeFlag":''}>
|
||||
{i.image_url && <img src={getImageUrl(i.image_url)} alt="" width="18px" height="18px" style={{borderRadius:"50%"}} className="mr5"/>}
|
||||
<span className={colorFlag ? "colorsquare task-hide":"task-hide"} style={{backgroundColor:colorFlag ?`${i.color}`:"transparent"}}>{i.name}</span>
|
||||
{
|
||||
colorFlag ?
|
||||
(
|
||||
colorFlag === "1" ?
|
||||
<span className={"colorsquare task-hide"} style={{backgroundColor:`${i.color}`}}>{i.name}</span>
|
||||
:
|
||||
<span className={"colorsborder task-hide"} style={{borderColor:`${i.color}`,color:`${i.color}`}}>{i.name}</span>
|
||||
)
|
||||
:
|
||||
<span className={"task-hide"}>{i.name}</span>
|
||||
}
|
||||
{ removeFlag && <a className="removeicon" onClick={()=>showRemoveFunc(i.id || i.name)}><i className="iconfont icon-shanchu8 font-14"></i></a>}
|
||||
</p>
|
||||
)
|
||||
|
|
|
@ -279,17 +279,23 @@ function Details(props){
|
|||
}else{
|
||||
// 调用新建保存接口
|
||||
const url = `/v1/${owner}/${projectsId}/issues`;
|
||||
let b = branch_choose && branch_choose.length>0 ? branch_choose.map(i=>{return i.name}) :undefined;
|
||||
let t = tag_choose && tag_choose.length>0 ? tag_choose.map(i=>{return i.id}) :undefined;
|
||||
let a = assigner_choose && assigner_choose.length>0 ? assigner_choose.map(i=>{return i.id}) :undefined;
|
||||
let m = millstone_choose && millstone_choose.length>0 ? millstone_choose.map(i=>{return i.id}) :undefined;
|
||||
let p = prioritie_choose && prioritie_choose.length>0 ? prioritie_choose.map(i=>{return i.id}) :undefined;
|
||||
let s = status_choose && status_choose.length>0 ? status_choose.map(i=>{return i.id}) :undefined;
|
||||
axios.post(url,{
|
||||
...params,
|
||||
branch_name:branchId && branchId.join(","),
|
||||
status_id:statusId && statusId.join(","),
|
||||
priority_id:prioritiesId && prioritiesId.join(","),
|
||||
milestone_id:millstoneId && millstoneId.join(","),
|
||||
issue_tag_ids:tagId,
|
||||
assigner_ids:charegeId,
|
||||
start_date,due_date
|
||||
branch_name: b && b.join(","),
|
||||
status_id: s && s.join(","),
|
||||
priority_id: p && p.join(","),
|
||||
milestone_id: m && m.join(","),
|
||||
issue_tag_ids: t,
|
||||
assigner_ids: a,
|
||||
start_date,
|
||||
due_date
|
||||
}).then(result=>{
|
||||
debugger;
|
||||
if(result && result.data && result.data.project_issues_index){
|
||||
props.showNotification("任务复制成功!");
|
||||
props.history.push(`/${owner}/${projectsId}/issues/${result.data.project_issues_index}`);
|
||||
|
@ -349,7 +355,7 @@ function Details(props){
|
|||
{
|
||||
details.author &&
|
||||
<div>
|
||||
<a className="author"><img src={getImageUrl(details.author.image_url)} alt="" />{details.author.name}</a>
|
||||
<Link to={`/${details.author.login}`} className="author"><img src={getImageUrl(details.author.image_url)} alt="" />{details.author.name}</Link>
|
||||
<span className="ml10" style={{color:"#898d9d"}}>添加于{details.created_at}</span>
|
||||
</div>
|
||||
}
|
||||
|
@ -413,7 +419,7 @@ function Details(props){
|
|||
placeholder="优先级"
|
||||
menus={prioritiesList}
|
||||
selectValueList={prioritie_choose}
|
||||
colorFlag
|
||||
colorFlag="1"
|
||||
mustFlag
|
||||
editFlag={details && !details.user_permission}
|
||||
chooseFunc={(list)=>{setPrioritie_choose(list);let l = list && list.length>0 ?list.map(i=>{return i.id || i.name}):[];saveForeach(undefined,undefined,l);}}
|
||||
|
@ -427,7 +433,7 @@ function Details(props){
|
|||
selectValueList={tag_choose}
|
||||
chooseFunc={(list)=>{setTag_choose(list);let l = list && list.length>0 ?list.map(i=>{return i.id || i.name}):[];saveForeach(undefined,undefined,undefined,l);}}
|
||||
double={3}
|
||||
colorFlag
|
||||
colorFlag="2"
|
||||
editFlag={details && !details.user_permission}
|
||||
onAdd={permission && permission !== "Reporter" ? ()=>setVisible(true) :false}
|
||||
/>
|
||||
|
|
|
@ -263,6 +263,7 @@ function List(props){
|
|||
setUpdateIds(undefined);
|
||||
setAllValue([]);
|
||||
setVisible(false);
|
||||
setCheckAll(false);
|
||||
props.showNotification("疑修删除成功!");
|
||||
Init();
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ function New(props){
|
|||
placeholder="优先级"
|
||||
menus={prioritiesList}
|
||||
selectValueList={prioritie_choose}
|
||||
colorFlag
|
||||
colorFlag="1"
|
||||
mustFlag
|
||||
chooseFunc={(list)=>{setPrioritie_choose(list);}}
|
||||
/>
|
||||
|
@ -242,7 +242,7 @@ function New(props){
|
|||
selectValueList={tag_choose}
|
||||
chooseFunc={(list)=>{setTag_choose(list);}}
|
||||
double={3}
|
||||
colorFlag
|
||||
colorFlag="2"
|
||||
onAdd={permission && permission !== "Reporter" ? ()=>setVisible(true) :false}
|
||||
/>
|
||||
<DropMenu
|
||||
|
|
|
@ -31,8 +31,10 @@ function Sign(props){
|
|||
|
||||
|
||||
useEffect(()=>{
|
||||
if(!permission || (permission && permission === "Reporter")){
|
||||
window.location.href = "/403";
|
||||
if(permission !== undefined){
|
||||
if(!permission || (permission && permission === "Reporter")){
|
||||
window.location.href = "/403";
|
||||
}
|
||||
}
|
||||
},[permission])
|
||||
|
||||
|
|
|
@ -214,11 +214,11 @@
|
|||
&>a{
|
||||
color: #40424a;
|
||||
margin-right: 10px;
|
||||
font-size: 16px;
|
||||
font-size: 15px;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 519px;
|
||||
max-width: 375px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tagscolor{
|
||||
|
@ -226,8 +226,9 @@
|
|||
border-radius: 3px;
|
||||
height: 20px;
|
||||
line-height: 18px;
|
||||
max-width: 60px;
|
||||
max-width: 108px;
|
||||
border:1px solid ;
|
||||
font-size: 13px;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
@ -236,6 +237,7 @@
|
|||
align-items: center;
|
||||
color: #898d9d;
|
||||
margin-top: 12px;
|
||||
font-size: 13px;
|
||||
img{
|
||||
height: 22px;
|
||||
width: 22px;
|
||||
|
@ -301,6 +303,7 @@
|
|||
line-height: 22px;
|
||||
color: #fff;
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
&.normal{
|
||||
background-color:#28be6c;
|
||||
}
|
||||
|
@ -453,13 +456,23 @@
|
|||
line-height: 30px;
|
||||
color: #acb0bf;
|
||||
margin-top: 10px;
|
||||
.colorsborder{
|
||||
padding: 0px 8px;
|
||||
height: 20px;
|
||||
line-height: 18px;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
border:1px solid ;
|
||||
font-size: 13px;
|
||||
}
|
||||
.colorsquare{
|
||||
padding: 0px 8px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
}
|
||||
&>p{
|
||||
margin-top: 8px!important;
|
||||
|
|
|
@ -476,7 +476,7 @@ function CoderDepot(props){
|
|||
}
|
||||
{
|
||||
issuesFlag &&
|
||||
<CheckProfile {...props} sureFunc={createIssue}>+ 疑修</CheckProfile>
|
||||
<CheckProfile {...props} sureFunc={createIssue} checklogin>+ 疑修</CheckProfile>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue