forked from Gitlink/forgeplus-react
labels
This commit is contained in:
parent
85585746f7
commit
6efe287bc1
|
|
@ -136,7 +136,7 @@ class CoderRootFileDetail extends Component {
|
|||
.then((result) => {
|
||||
if (result) {
|
||||
this.props.showNotification("删除成功!");
|
||||
this.props.history.push(`/projects/${projectsId}`);
|
||||
this.props.history.push(`/projects/${owner}/${projectsId}`);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
|
|
|
|||
|
|
@ -98,9 +98,7 @@ class MergeItem extends Component {
|
|||
<span className="ml15">
|
||||
<Tag className="pr-branch-tag">
|
||||
<Link
|
||||
to={`/projects/${
|
||||
item.is_original ? item.fork_project_id : projectsId
|
||||
}/coders?branch=${item.pull_request_head}`}
|
||||
to={`/projects/${owner}/${ item.is_original ? item.fork_project_id : projectsId }/coders?branch=${item.pull_request_head}`}
|
||||
className="maxW200px hide-1 ver-middle"
|
||||
>
|
||||
{item.is_original
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class Detail extends Component {
|
|||
})
|
||||
.then((result) => {
|
||||
if (result) {
|
||||
this.props.history.push(`/projects/${projectsId}/issues`);
|
||||
this.props.history.push(`/projects/${owner}/${projectsId}/issues`);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
|
|
|
|||
|
|
@ -80,9 +80,9 @@ class Tags extends Component {
|
|||
|
||||
|
||||
getList = (page, order_name, order_type) => {
|
||||
const { projectsId } = this.props.match.params;
|
||||
const { projectsId ,owner } = this.props.match.params;
|
||||
const { limit } = this.state;
|
||||
const url = `/projects/${projectsId}/issue_tags.json`;
|
||||
const url = `/projects/${owner}/${projectsId}/labels.json`;
|
||||
axios.get(url, {
|
||||
params: {
|
||||
page, limit, order_name, order_type
|
||||
|
|
@ -101,8 +101,8 @@ class Tags extends Component {
|
|||
createtagpost = () => {
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if (!err) {
|
||||
const { projectsId } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/issue_tags.json`;
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const url = `/projects/${owner}/${projectsId}/labels.json`;
|
||||
axios.post(url, {
|
||||
...values,
|
||||
project_id: projectsId,
|
||||
|
|
@ -183,9 +183,9 @@ class Tags extends Component {
|
|||
this.updatetag();
|
||||
}
|
||||
updatetag = () => {
|
||||
const { projectsId } = this.props.match.params;
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
let id = this.state.id;
|
||||
const url = `/projects/${projectsId}/issue_tags/${id}.json`;
|
||||
const url = `/projects/${owner}/${projectsId}/labels/${id}.json`;
|
||||
let name = this.state.name;
|
||||
let description = this.state.description;
|
||||
let modalcolor = this.state.newcolor
|
||||
|
|
@ -208,8 +208,8 @@ class Tags extends Component {
|
|||
}
|
||||
|
||||
deletetag = (id) => {
|
||||
const { projectsId } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/issue_tags/${id}.json`;
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const url = `/projects/${owner}/${projectsId}/labels/${id}.json`;
|
||||
axios.delete(url, {
|
||||
data: {
|
||||
project_id: projectsId,
|
||||
|
|
|
|||
|
|
@ -316,8 +316,8 @@ class order extends Component {
|
|||
};
|
||||
|
||||
deletedetail = (id) => {
|
||||
const { projectsId } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/issues/${id}.json`;
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const url = `/projects/${owner}/${projectsId}/issues/${id}.json`;
|
||||
axios.delete(url, {
|
||||
data: {
|
||||
project_id: projectsId,
|
||||
|
|
@ -470,8 +470,8 @@ class order extends Component {
|
|||
isSpin: true
|
||||
})
|
||||
const { checkedValue } = this.state;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/issues/clean.json`;
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const url = `/projects/${owner}/${projectsId}/issues/clean.json`;
|
||||
axios.post(url, {
|
||||
ids: checkedValue
|
||||
}).then(result => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue