forked from Gitlink/forgeplus-react
issue
This commit is contained in:
parent
ff7d191011
commit
a257d832cb
|
@ -564,7 +564,7 @@ class NewHeader extends Component {
|
||||||
</img>
|
</img>
|
||||||
</a>
|
</a>
|
||||||
<ul className="edu-menu-list" style={{ top: '60px', textAlign: 'center' }}>
|
<ul className="edu-menu-list" style={{ top: '60px', textAlign: 'center' }}>
|
||||||
<li className="bor-bottom-greyE" style={{cursor:"default",background:"#fff"}}>{this.props.current_user.username}</li>
|
<li className="bor-bottom-greyE task-hide" title={this.props.current_user.username} style={{cursor:"default",background:"#fff"}}>{this.props.current_user.username}</li>
|
||||||
{
|
{
|
||||||
settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item,key)=>{
|
settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item,key)=>{
|
||||||
return(
|
return(
|
||||||
|
|
|
@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
|
||||||
import { Modal , Checkbox , Spin , Input } from 'antd';
|
import { Modal , Checkbox , Spin , Input } from 'antd';
|
||||||
import Axios from 'axios';
|
import Axios from 'axios';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { values } from 'lodash';
|
|
||||||
|
|
||||||
const { Search } = Input;
|
const { Search } = Input;
|
||||||
const limit = 20;
|
const limit = 20;
|
||||||
|
|
|
@ -30,6 +30,9 @@ function ConcentrateProject({userLogin,current}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSure(is_pinned_project_ids) {
|
function onSure(is_pinned_project_ids) {
|
||||||
|
if(is_pinned_project_ids && is_pinned_project_ids.length===0){
|
||||||
|
setValue([]);
|
||||||
|
}
|
||||||
const url = `/users/${userLogin}/is_pinned_projects/pin.json`;
|
const url = `/users/${userLogin}/is_pinned_projects/pin.json`;
|
||||||
axios.post(url,{
|
axios.post(url,{
|
||||||
is_pinned_project_ids
|
is_pinned_project_ids
|
||||||
|
|
|
@ -183,11 +183,17 @@ class Infos extends Component {
|
||||||
this.props.history.push(`/users/${user && user.login}/organizes`)
|
this.props.history.push(`/users/${user && user.login}/organizes`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resetUser=()=>{
|
||||||
|
const { resetUserInfo } = this.props;
|
||||||
|
|
||||||
|
this.fetchUser();
|
||||||
|
resetUserInfo && resetUserInfo();
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { current_user, mygetHelmetapi } = this.props;
|
const { current_user, mygetHelmetapi , resetUserInfo } = this.props;
|
||||||
const { username } = this.props.match.params;
|
const { username } = this.props.match.params;
|
||||||
const { user, isSpin, project_type, route_type , undo_events , undo_messages , menuKey } = this.state;
|
const { user, isSpin, project_type, route_type , undo_events , undo_messages , menuKey } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="newMain clearfix">
|
<div className="newMain clearfix">
|
||||||
<Spin spinning={isSpin}>
|
<Spin spinning={isSpin}>
|
||||||
|
@ -336,7 +342,7 @@ class Infos extends Component {
|
||||||
<Route
|
<Route
|
||||||
path="/users/:username/info"
|
path="/users/:username/info"
|
||||||
render={() => {
|
render={() => {
|
||||||
return <UpdateInfo {...this.props} {...this.state} resetUser={this.fetchUser}/>;
|
return <UpdateInfo {...this.props} {...this.state} resetUser={this.resetUser}/>;
|
||||||
}}
|
}}
|
||||||
></Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
|
|
|
@ -10,15 +10,16 @@ export default Form.create()(
|
||||||
forwardRef((props)=>{
|
forwardRef((props)=>{
|
||||||
const { getFieldDecorator, validateFields , setFieldsValue } = props && props.form;
|
const { getFieldDecorator, validateFields , setFieldsValue } = props && props.form;
|
||||||
const { username } = props && props.match && props.match.params;
|
const { username } = props && props.match && props.match.params;
|
||||||
const { user , resetUser } = props;
|
const { user , resetUser , current_user } = props;
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(user && user.login){
|
if(current_user && current_user.login){
|
||||||
setFieldsValue({
|
setFieldsValue({
|
||||||
...user,
|
...current_user,
|
||||||
location:user.province && [user.province,user.city]
|
location:current_user.province && [current_user.province,current_user.city]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},[user])
|
},[current_user])
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
validateFields((error,values)=>{
|
validateFields((error,values)=>{
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
import React , { useEffect , useState } from 'react';
|
import React , { useEffect , useState } from 'react';
|
||||||
import { Dropdown, Menu , Pagination } from 'antd';
|
import { Dropdown, Menu , Pagination } from 'antd';
|
||||||
import { Link } from 'react-router-dom';
|
|
||||||
import Search from '../Component/Search';
|
import Search from '../Component/Search';
|
||||||
import Item from './Team-item';
|
import Item from './Team-item';
|
||||||
import Nodata from '../Nodata';
|
import Nodata from '../Nodata';
|
||||||
|
@ -15,7 +14,7 @@ function Team(props){
|
||||||
const [ sort_direction , setSort_direction ] = useState("asc");
|
const [ sort_direction , setSort_direction ] = useState("asc");
|
||||||
const [ sort_by ,setSort_by ] = useState("created_at");
|
const [ sort_by ,setSort_by ] = useState("created_at");
|
||||||
const [ search ,setSearch ] = useState(undefined);
|
const [ search ,setSearch ] = useState(undefined);
|
||||||
console.log(props);
|
|
||||||
const { username } = props.match.params;
|
const { username } = props.match.params;
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(username){
|
if(username){
|
||||||
|
|
|
@ -209,6 +209,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
const common = {
|
const common = {
|
||||||
showLoginDialog: this.showLoginDialog,
|
showLoginDialog: this.showLoginDialog,
|
||||||
checkIfLogin: this.checkIfLogin,
|
checkIfLogin: this.checkIfLogin,
|
||||||
|
resetUserInfo:this.fetchUsers
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div className="indexHOC">
|
<div className="indexHOC">
|
||||||
|
|
Loading…
Reference in New Issue