mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
refresh piece list after loan
This commit is contained in:
parent
6a0a1b1e35
commit
eb54e6fff6
@ -85,17 +85,6 @@ let CylandRegisterPiece = React.createClass({
|
|||||||
|
|
||||||
handleRegisterSuccess(response){
|
handleRegisterSuccess(response){
|
||||||
|
|
||||||
// once the user was able to register a piece successfully, we need to make sure to keep
|
|
||||||
// the piece list up to date
|
|
||||||
PieceListActions.fetchPieceList(
|
|
||||||
this.state.page,
|
|
||||||
this.state.pageSize,
|
|
||||||
this.state.searchTerm,
|
|
||||||
this.state.orderBy,
|
|
||||||
this.state.orderAsc,
|
|
||||||
this.state.filterBy
|
|
||||||
);
|
|
||||||
|
|
||||||
// also start loading the piece for the next step
|
// also start loading the piece for the next step
|
||||||
if(response && response.piece) {
|
if(response && response.piece) {
|
||||||
PieceActions.updatePiece(response.piece);
|
PieceActions.updatePiece(response.piece);
|
||||||
@ -111,6 +100,18 @@ let CylandRegisterPiece = React.createClass({
|
|||||||
handleLoanSuccess(response) {
|
handleLoanSuccess(response) {
|
||||||
let notification = new GlobalNotificationModel(response.notification, 'success', 10000);
|
let notification = new GlobalNotificationModel(response.notification, 'success', 10000);
|
||||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||||
|
|
||||||
|
// once the user was able to register + loan a piece successfully, we need to make sure to keep
|
||||||
|
// the piece list up to date
|
||||||
|
PieceListActions.fetchPieceList(
|
||||||
|
this.state.page,
|
||||||
|
this.state.pageSize,
|
||||||
|
this.state.searchTerm,
|
||||||
|
this.state.orderBy,
|
||||||
|
this.state.orderAsc,
|
||||||
|
this.state.filterBy
|
||||||
|
);
|
||||||
|
|
||||||
PieceActions.fetchOne(this.state.piece.id);
|
PieceActions.fetchOne(this.state.piece.id);
|
||||||
this.transitionTo('piece', {pieceId: this.state.piece.id});
|
this.transitionTo('piece', {pieceId: this.state.piece.id});
|
||||||
},
|
},
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
border: 1px solid #EEE;
|
border: 1px solid #EEE;
|
||||||
border-right: 1px solid rgba(0, 0, 0, 0);
|
border-right: 1px solid rgba(0, 0, 0, 0);
|
||||||
margin-bottom: 0.6em;
|
margin-bottom: 0.6em;
|
||||||
|
background-color: white;
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
color: #666;
|
color: #666;
|
||||||
|
Loading…
Reference in New Issue
Block a user