mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +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){
|
||||
|
||||
// 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
|
||||
if(response && response.piece) {
|
||||
PieceActions.updatePiece(response.piece);
|
||||
@ -111,6 +100,18 @@ let CylandRegisterPiece = React.createClass({
|
||||
handleLoanSuccess(response) {
|
||||
let notification = new GlobalNotificationModel(response.notification, 'success', 10000);
|
||||
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);
|
||||
this.transitionTo('piece', {pieceId: this.state.piece.id});
|
||||
},
|
||||
|
@ -30,6 +30,7 @@
|
||||
border: 1px solid #EEE;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0);
|
||||
margin-bottom: 0.6em;
|
||||
background-color: white;
|
||||
|
||||
.active {
|
||||
color: #666;
|
||||
|
Loading…
Reference in New Issue
Block a user