diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js
index 57ea399f..05b9967c 100644
--- a/src/forge/Settings/Setting.js
+++ b/src/forge/Settings/Setting.js
@@ -3,6 +3,7 @@ import { Form, Input, Checkbox, Select , Spin } from "antd";
import Title from '../Component/Title';
import {WhiteBack} from '../Component/layout';
import DivertModal from '../Divert/DivertModal';
+import { Link } from 'react-router-dom';
import axios from "axios";
import "./setting.scss";
const { TextArea } = Input;
@@ -77,6 +78,7 @@ class Setting extends Component {
private_check: result.data.private,
loading:false,
project_units:units,
+ transfer:result.data.transfer,
is_transfering:result.data.is_transfering,
});
}
@@ -215,10 +217,11 @@ class Setting extends Component {
}
// 确定转移仓库
- onSuccess=()=>{
+ onSuccess=(owner)=>{
this.setState({
is_transfering:true,
- divertVisible:false
+ divertVisible:false,
+ transfer:owner
})
}
@@ -227,7 +230,8 @@ class Setting extends Component {
const { projectsId , owner } = this.props.match.params;
const { projectDetail } = this.props;
- const { CategoryList, LanguageList, private_check ,loading , divertVisible , is_transfering } = this.state;
+ const { CategoryList, LanguageList, private_check ,loading , divertVisible , is_transfering, transfer } = this.state;
+ console.log(transfer);
return (
转移仓库
- 将此仓库转移给其他用户或组织
+ {
+ is_transfering ?
+ 此仓库正在转移给【
+ {transfer && {transfer.name}}
+ 】,请联系对方接收此仓库。
+ :
+ `将此仓库转移给其他用户或组织`
+ }
{
diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js
index 2248eca2..0759a6a9 100644
--- a/src/forge/users/Infos.js
+++ b/src/forge/users/Infos.js
@@ -52,7 +52,8 @@ class Infos extends Component {
isSpin: false,
user: undefined,
project_type: undefined,
- route_type: undefined
+ route_type: undefined,
+ undo_events:0
};
}
@@ -73,14 +74,19 @@ class Infos extends Component {
});
const { current_user } = this.props;
const { username } = this.props.match.params;
+ const { pathname } = this.props.location;
let url = `/users/${username || (current_user && current_user.login)}.json`;
axios
.get(url)
.then((result) => {
+ let e = result.data && result.data.undo_events;
+ let p = result.data && result.data.undo_messages;
+ let notice = p !== 0 ? pathname === `/users/${username}/notice` :false;
this.setState({
user: result.data,
isSpin: false,
+ undo_events:notice ? (e-p) : e
});
})
.catch((error) => {
@@ -142,7 +148,7 @@ class Infos extends Component {
const { current_user, mygetHelmetapi } = this.props;
const { username } = this.props.match.params;
- const { user, isSpin, project_type, route_type } = this.state;
+ const { user, isSpin, project_type, route_type , undo_events } = this.state;
return (
@@ -223,7 +229,7 @@ class Infos extends Component {
待办事项
- {user.undo_events}
+ {undo_events}
@@ -318,7 +324,7 @@ class Infos extends Component {
{
- return ;
+ return ;
}}
>
Date: Tue, 27 Apr 2021 17:23:58 +0800
Subject: [PATCH 12/16] =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E7=BB=84=E7=BB=87=E8=B4=A6=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Team/Setting/TeamSettingCommon.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/forge/Team/Setting/TeamSettingCommon.jsx b/src/forge/Team/Setting/TeamSettingCommon.jsx
index 2aeb0742..6a94beb5 100644
--- a/src/forge/Team/Setting/TeamSettingCommon.jsx
+++ b/src/forge/Team/Setting/TeamSettingCommon.jsx
@@ -119,7 +119,7 @@ export default Form.create()(
validator:checkname
}
],
- ,true
+ ,true
)}
{helper(
"组织名称:",
From ae34240bfbb3fff5f7687adbbbc7dcbe09d4a2db Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Tue, 27 Apr 2021 17:46:05 +0800
Subject: [PATCH 13/16] =?UTF-8?q?=E9=80=9A=E7=9F=A5-=E8=B7=B3=E8=BD=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Notice/Index.jsx | 15 ++++++++-------
src/forge/Notice/Notify.jsx | 10 +++++-----
src/forge/Notice/UndoEvent.jsx | 1 -
src/forge/users/Infos.js | 10 ++++++----
4 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/src/forge/Notice/Index.jsx b/src/forge/Notice/Index.jsx
index e222d7b8..218b16f5 100644
--- a/src/forge/Notice/Index.jsx
+++ b/src/forge/Notice/Index.jsx
@@ -18,17 +18,18 @@ function Index(props){
const username = props.match.params.username;
const pathname = props.history.location.pathname;
const user = props.user;
+ const undo_messages = props.undo_messages;
const [ menu , setMenu ] = useState("notify");
- const [ undo_messages , setMessages ] = useState("notify");
- const [ undo_transfer_projects , setTransferProjects ] = useState("notify");
+ const [ messages , setMessages ] = useState(0);
+ const [ transferProjects , setTransferProjects ] = useState(0);
useEffect(()=>{
- if(user){
- setMessages(user.undo_messages);
+ if(user && undo_messages){
+ setMessages(undo_messages);
setTransferProjects(user.undo_transfer_projects);
}
- },[user])
+ },[user,undo_messages])
useEffect(()=>{
if(pathname && username){
@@ -55,13 +56,13 @@ function Index(props){
通知
- {undo_messages ? {undo_messages} :""}
+ {messages ? {messages} :""}
接收仓库
- {undo_transfer_projects ? {undo_transfer_projects} :""}
+ {transferProjects ? {transferProjects} :""}
diff --git a/src/forge/Notice/Notify.jsx b/src/forge/Notice/Notify.jsx
index c4ac6699..d927f56f 100644
--- a/src/forge/Notice/Notify.jsx
+++ b/src/forge/Notice/Notify.jsx
@@ -37,13 +37,13 @@ function Notify(props){
if(status){
switch(status){
case 'canceled':
- return `取消转移【${project && project.name}】仓库`
+ return 取消转移【 {project && project.name}】仓库
case 'common':
- return `正在将【${project && project.name}】仓库转移给【${owner && owner.name}】`
+ return 正在将【 {project && project.name}】仓库转移给【 {owner && owner.name}】
case 'successed':
- return `【${project && project.name}】仓库成功转移给【${owner && owner.name}】`
+ return 【 {project && project.name}】仓库成功转移给【 {owner && owner.name}】
default:
- return `拒绝转移【${project && project.name}】仓库`
+ return 拒绝转移【 {project && project.name}】仓库
}
}else{
@@ -67,7 +67,7 @@ function Notify(props){
{i.applied_user && i.applied_user.name}
{i.time_ago}
- {renderStatus(i.status,i.applied)}
+ {renderStatus(i.status,i.applied)}
)
diff --git a/src/forge/Notice/UndoEvent.jsx b/src/forge/Notice/UndoEvent.jsx
index 4f105141..afb5c706 100644
--- a/src/forge/Notice/UndoEvent.jsx
+++ b/src/forge/Notice/UndoEvent.jsx
@@ -13,7 +13,6 @@ function UndoEvent(props){
const [ page , setPage ] = useState(1);
const [ total , setTotal ] = useState(0);
-
useEffect(()=>{
if(username){
getList();
diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js
index 0759a6a9..06055044 100644
--- a/src/forge/users/Infos.js
+++ b/src/forge/users/Infos.js
@@ -53,7 +53,8 @@ class Infos extends Component {
user: undefined,
project_type: undefined,
route_type: undefined,
- undo_events:0
+ undo_events:0,
+ undo_messages:0
};
}
@@ -86,7 +87,8 @@ class Infos extends Component {
this.setState({
user: result.data,
isSpin: false,
- undo_events:notice ? (e-p) : e
+ undo_events:notice ? (e-p) : e,
+ undo_messages:notice ? result.data && result.data.undo_messages : 0
});
})
.catch((error) => {
@@ -123,7 +125,7 @@ class Infos extends Component {
const {user} = this.state
this.setState({
route_type: undefined,
- project_type:"notice"
+ project_type:"notice",
})
this.props.history.push(`/users/${user && user.login}/notice`)
}
@@ -148,7 +150,7 @@ class Infos extends Component {
const { current_user, mygetHelmetapi } = this.props;
const { username } = this.props.match.params;
- const { user, isSpin, project_type, route_type , undo_events } = this.state;
+ const { user, isSpin, project_type, route_type , undo_events , undo_messages } = this.state;
return (
From 79d8f4e5adbb3e8210e15c0bd0640039f0eebd09 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Tue, 27 Apr 2021 18:27:56 +0800
Subject: [PATCH 14/16] =?UTF-8?q?=E6=B8=85=E7=A9=BA=E5=BC=B9=E7=AA=97?=
=?UTF-8?q?=E9=87=8C=E7=9A=84=E5=86=85=E5=AE=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Component/SearchUser.jsx | 8 +++++++-
src/forge/Divert/DivertModal.jsx | 12 +++++++++++-
src/forge/Notice/Index.jsx | 2 +-
src/forge/users/Infos.js | 15 ++++++++++-----
4 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/src/forge/Component/SearchUser.jsx b/src/forge/Component/SearchUser.jsx
index b9841123..79d23fb6 100644
--- a/src/forge/Component/SearchUser.jsx
+++ b/src/forge/Component/SearchUser.jsx
@@ -5,9 +5,15 @@ import axios from 'axios';
const Option = AutoComplete.Option;
-export default ({ getUser , placeholder, width })=>{
+export default ({ getUser , placeholder, width ,value })=>{
const [ source , setSource ] = useState(undefined);
const [ searchKey , setSearchKey ] = useState(undefined);
+
+ useEffect(()=>{
+ if(!value){
+ setSearchKey(undefined);
+ }
+ },[value])
useEffect(()=>{
getUserList();
diff --git a/src/forge/Divert/DivertModal.jsx b/src/forge/Divert/DivertModal.jsx
index 7d85f809..1b9c486f 100644
--- a/src/forge/Divert/DivertModal.jsx
+++ b/src/forge/Divert/DivertModal.jsx
@@ -8,6 +8,8 @@ const { Option } = Select;
function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
const { getFieldDecorator, validateFields , setFieldsValue } = form;
const [ cate , setCate ] = useState(0);
+ const [ value , setValue ] = useState(undefined);
+
const [ organizations , setOrganizations ] = useState(undefined);
useEffect(()=>{
@@ -18,6 +20,13 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
if(owner && repo && visible===true){
getTeam();
}
+ if(!visible){
+ setFieldsValue({
+ owner_name:undefined,
+ identifier:undefined
+ })
+ setValue(undefined)
+ }
},[repo,owner,visible])
function getTeam(){
@@ -69,6 +78,7 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
};
function getUser(id){
+ setValue(id);
setFieldsValue({
owner_name:id
})
@@ -117,7 +127,7 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
rules:[{required:true,message:"请输入目标用户名"}]
})(
//
-
+
)}
}
diff --git a/src/forge/Notice/Index.jsx b/src/forge/Notice/Index.jsx
index 218b16f5..ea57af38 100644
--- a/src/forge/Notice/Index.jsx
+++ b/src/forge/Notice/Index.jsx
@@ -19,7 +19,7 @@ function Index(props){
const pathname = props.history.location.pathname;
const user = props.user;
const undo_messages = props.undo_messages;
-
+
const [ menu , setMenu ] = useState("notify");
const [ messages , setMessages ] = useState(0);
const [ transferProjects , setTransferProjects ] = useState(0);
diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js
index 06055044..f7a1d887 100644
--- a/src/forge/users/Infos.js
+++ b/src/forge/users/Infos.js
@@ -76,6 +76,7 @@ class Infos extends Component {
const { current_user } = this.props;
const { username } = this.props.match.params;
const { pathname } = this.props.location;
+ const { notice } = this.state;
let url = `/users/${username || (current_user && current_user.login)}.json`;
axios
@@ -83,12 +84,13 @@ class Infos extends Component {
.then((result) => {
let e = result.data && result.data.undo_events;
let p = result.data && result.data.undo_messages;
- let notice = p !== 0 ? pathname === `/users/${username}/notice` :false;
+ let n = notice || pathname === `/users/${username}/notice` ;
this.setState({
user: result.data,
isSpin: false,
- undo_events:notice ? (e-p) : e,
- undo_messages:notice ? result.data && result.data.undo_messages : 0
+ undo_events:n ? (e-p) : e,
+ undo_messages:0,
+ notice:n
});
})
.catch((error) => {
@@ -122,12 +124,15 @@ class Infos extends Component {
}
undo_link = () => {
- const {user} = this.state
+ const {user } = this.state;
this.setState({
route_type: undefined,
project_type:"notice",
+ notice:true
+ },()=>{
+ this.props.history.push(`/users/${user && user.login}/notice`);
+ this.fetchUser();
})
- this.props.history.push(`/users/${user && user.login}/notice`)
}
route_link = (type) => {
From 93a53e2c7f5ff3dc4777a02043ddd5ba3b4e5641 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Tue, 27 Apr 2021 18:44:40 +0800
Subject: [PATCH 15/16] =?UTF-8?q?=E8=BD=AC=E7=A7=BB=E9=A1=B9=E7=9B=AE-bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Main/sub/DetailBanner.jsx | 4 ++--
src/forge/Notice/Index.jsx | 8 +++++---
src/forge/Settings/Setting.js | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/forge/Main/sub/DetailBanner.jsx b/src/forge/Main/sub/DetailBanner.jsx
index 331790c8..aa801773 100644
--- a/src/forge/Main/sub/DetailBanner.jsx
+++ b/src/forge/Main/sub/DetailBanner.jsx
@@ -75,7 +75,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
:""
}
- {
+ {/* {
item.menu_name === "resources" &&
@@ -84,7 +84,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
{projectDetail && projectDetail.source_count ? {projectDetail.source_count} :""}
- }
+ } */}
{
item.menu_name === "versions" &&
diff --git a/src/forge/Notice/Index.jsx b/src/forge/Notice/Index.jsx
index ea57af38..d9d04d59 100644
--- a/src/forge/Notice/Index.jsx
+++ b/src/forge/Notice/Index.jsx
@@ -19,16 +19,18 @@ function Index(props){
const pathname = props.history.location.pathname;
const user = props.user;
const undo_messages = props.undo_messages;
-
+
const [ menu , setMenu ] = useState("notify");
const [ messages , setMessages ] = useState(0);
const [ transferProjects , setTransferProjects ] = useState(0);
useEffect(()=>{
- if(user && undo_messages){
- setMessages(undo_messages);
+ if(user){
setTransferProjects(user.undo_transfer_projects);
}
+ if(undo_messages){
+ setMessages(undo_messages);
+ }
},[user,undo_messages])
useEffect(()=>{
diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js
index 05b9967c..4c719968 100644
--- a/src/forge/Settings/Setting.js
+++ b/src/forge/Settings/Setting.js
@@ -15,7 +15,7 @@ const menu = [
{name:"易修 (Issue)",index:"issues"},
{name:"合并请求",index:"pulls"},
{name:"工作流(beta版)",index:"devops"},
- {name:"资源库",index:"resources"},
+ // {name:"资源库",index:"resources"},
{name:"里程碑",index:"versions"},
{name:"动态",index:"activity"},
]
From 2fcb645d42945b863ce1abd2972d9cf0163d0269 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Wed, 28 Apr 2021 20:17:30 +0800
Subject: [PATCH 16/16] =?UTF-8?q?04-28=E4=BC=91=E5=81=87=E6=9C=9F=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9issue=20--=E9=9C=80=E5=90=88=E5=B9=B6=E8=87=B3?=
=?UTF-8?q?=E5=85=B6=E5=AE=83=E5=88=86=E6=94=AF=EF=BC=88=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E8=AF=B7=E6=B1=82=E7=9B=B8=E5=85=B3=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Merge/NewMerge.js | 2 +-
src/forge/Merge/merge_form.js | 14 ++++++++------
src/forge/Order/MilepostDetail.js | 2 +-
src/forge/Order/order.js | 4 ++--
src/forge/Order/order_form.js | 4 ++--
src/forge/Team/Group/GroupDetails.jsx | 5 +++--
src/modules/tpm/TPMBanner.js | 2 +-
7 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/src/forge/Merge/NewMerge.js b/src/forge/Merge/NewMerge.js
index 2ef27efa..3cbe4ddc 100644
--- a/src/forge/Merge/NewMerge.js
+++ b/src/forge/Merge/NewMerge.js
@@ -178,7 +178,7 @@ class NewMerge extends Component {
let arr = projects_names && projects_names.filter(item=>item.id===value);
let identifier = arr && arr[0].project_id;
let login = arr && arr[0].project_user_login;
- let is_fork_id = parseInt(value) !== parseInt(id)
+ let is_fork_id = parseInt(value) !== parseInt(id);
this.setState({
isSpin: true,
merge_head: is_fork_id,
diff --git a/src/forge/Merge/merge_form.js b/src/forge/Merge/merge_form.js
index 57886d04..1c75a9f9 100644
--- a/src/forge/Merge/merge_form.js
+++ b/src/forge/Merge/merge_form.js
@@ -34,17 +34,19 @@ class MergeForm extends Component {
this.set_defatul();
};
componentDidUpdate=(prevPros)=>{
+ const { projectsId ,owner } = this.props.match.params;
+ const pId = prevPros.match.params.projectsId;
+ const oId = prevPros.match.params.owner;
+ if(pId !== projectsId || oId !== owner ){
+ // console.log("切换了项目分支···········");
+ this.get_default_selects();
+ }
if(prevPros && this.props && !this.props.checkIfLogin()){
this.props.history.push("/403")
return
}
}
- // check_is_login =() =>{
- // if(!this.props.checkIfLogin()){
- // this.props.history.push("/403")
- // return
- // }
- // };
+
get_default_selects = () => {
const { projectsId ,owner } = this.props.match.params;
this.setState({ isSpin: true });
diff --git a/src/forge/Order/MilepostDetail.js b/src/forge/Order/MilepostDetail.js
index 2cfb2f89..7954630d 100644
--- a/src/forge/Order/MilepostDetail.js
+++ b/src/forge/Order/MilepostDetail.js
@@ -218,7 +218,7 @@ class MilepostDetail extends Component {
编辑里程碑
- 创建任务
+ 创建易修
diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js
index ac9e7a0e..8875aa85 100644
--- a/src/forge/Order/order.js
+++ b/src/forge/Order/order.js
@@ -352,12 +352,12 @@ class order extends Component {
if (this.props.checkIfLogin()) {
return(
- + 创建任务
+ + 创建易修
)
}else{
return(
-
+ 创建任务
+
+ 创建易修
)
}
}
diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js
index db36c3ea..ed8d4d8b 100644
--- a/src/forge/Order/order_form.js
+++ b/src/forge/Order/order_form.js
@@ -310,14 +310,14 @@ class order_form extends Component {
- {form_type === "new" ? "新建" :( form_type === "copy" ? "复制" : "编辑")}任务
+ {form_type === "new" ? "新建" :( form_type === "copy" ? "复制" : "编辑")}易修
{getFieldDecorator("subject", {
rules: [
{
required: true,
- message: "请填写任务标题",
+ message: "请填写易修标题",
},
]
})( )}
diff --git a/src/forge/Team/Group/GroupDetails.jsx b/src/forge/Team/Group/GroupDetails.jsx
index 8d1c519b..49720c17 100644
--- a/src/forge/Team/Group/GroupDetails.jsx
+++ b/src/forge/Team/Group/GroupDetails.jsx
@@ -84,11 +84,12 @@ export default ((props) => {
// 移除成员
function removeUser(username) {
- const url = `/organizations/${OIdentifier}/teams/${groupId}/team_users/${username}.json`;
if (username) {
+ const url = `/organizations/${OIdentifier}/teams/${groupId}/team_users/quit.json`;
axios.delete(url).then((result) => {
if (result && result.data) {
-
+ props.showNotification(`已成功退出团队!`);
+ props.history.push(`/organize/${OIdentifier}`);
}
}).catch((error) => { });
}
diff --git a/src/modules/tpm/TPMBanner.js b/src/modules/tpm/TPMBanner.js
index 3f591a40..6760fe04 100644
--- a/src/modules/tpm/TPMBanner.js
+++ b/src/modules/tpm/TPMBanner.js
@@ -1062,7 +1062,7 @@ class TPMBanner extends Component {
:
- 尚未创建任务的实训,不能申请发布
+ 尚未创建易修的实训,不能申请发布
}