mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
upgrade alt version. Please do npm install and check if altjs is at version 0.16.5
This commit is contained in:
parent
4815b650c5
commit
29d9572a37
@ -1,23 +0,0 @@
|
|||||||
import alt from '../alt';
|
|
||||||
import PieceListFetcher from '../fetchers/piece_list_fetcher';
|
|
||||||
|
|
||||||
|
|
||||||
class UserActions {
|
|
||||||
constructor() {
|
|
||||||
this.generateActions(
|
|
||||||
'updateCurrentUser'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
fetchCurrentUser() {
|
|
||||||
UserFetcher.fetchOne()
|
|
||||||
.then((res) => {
|
|
||||||
this.actions.updateCurrentUser(res['users'][0]);
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export default alt.createActions(UserActions);
|
|
@ -11,6 +11,9 @@ let Table = React.createClass({
|
|||||||
columnList: React.PropTypes.arrayOf(React.PropTypes.instanceOf(TableColumnModel))
|
columnList: React.PropTypes.arrayOf(React.PropTypes.instanceOf(TableColumnModel))
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
|
console.log(this.props);
|
||||||
|
|
||||||
if(this.props.itemList && this.props.itemList.length > 0) {
|
if(this.props.itemList && this.props.itemList.length > 0) {
|
||||||
return (
|
return (
|
||||||
<div className="ascribe-table">
|
<div className="ascribe-table">
|
||||||
|
@ -22,7 +22,7 @@ let EditionList = React.createClass({
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<AltContainer store={EditionListStore} actions={EditionListActions}>
|
<AltContainer store={EditionListStore} actions={EditionListActions}>
|
||||||
|
<Table></Table>
|
||||||
</AltContainer>
|
</AltContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,13 @@ let PieceList = React.createClass({
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AltContainer store={PieceListStore} actions={PieceListActions}>
|
<AltContainer
|
||||||
|
store={PieceListStore}
|
||||||
|
actions={PieceListActions}
|
||||||
|
transform={(x) => {
|
||||||
|
console.log('@@@@@@@', x);
|
||||||
|
return { a: 1, b: 2 };
|
||||||
|
}}>
|
||||||
<Table columnList={columnList} />
|
<Table columnList={columnList} />
|
||||||
<Pagination currentPage={this.props.query.page} />
|
<Pagination currentPage={this.props.query.page} />
|
||||||
</AltContainer>
|
</AltContainer>
|
||||||
|
@ -14,7 +14,6 @@ class PieceListStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onUpdatePieceList({ page, pageSize, search, itemList, orderBy, orderAsc }) {
|
onUpdatePieceList({ page, pageSize, search, itemList, orderBy, orderAsc }) {
|
||||||
console.log('onUpdatePieceList', arguments);
|
|
||||||
this.page = page;
|
this.page = page;
|
||||||
this.pageSize = pageSize;
|
this.pageSize = pageSize;
|
||||||
this.search = search;
|
this.search = search;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
"watchify": "^3.1.2"
|
"watchify": "^3.1.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"alt": "^0.15.6",
|
"alt": "^0.16.5",
|
||||||
"classnames": "^1.2.2",
|
"classnames": "^1.2.2",
|
||||||
"isomorphic-fetch": "^2.0.2",
|
"isomorphic-fetch": "^2.0.2",
|
||||||
"object-assign": "^2.0.0",
|
"object-assign": "^2.0.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user