Fix promotion request list update
parent
dd31c355cf
commit
bc24aaf26f
|
@ -61,22 +61,21 @@ export class RequestPromotionComponent {
|
|||
const promotion = {
|
||||
"userId": this.user._id,
|
||||
"oldRankLvl": this.user.rank.level,
|
||||
"newRankLvl": this.newLevel,
|
||||
"newRankLvl": this.newLevel
|
||||
};
|
||||
|
||||
this.promotionService.requestPromotion(promotion).subscribe();
|
||||
this.showSuccessLabel = true;
|
||||
setTimeout(() => {
|
||||
this.showSuccessLabel = false;
|
||||
}, 2000);
|
||||
this.showForm = false;
|
||||
this.user = {};
|
||||
|
||||
let currentUser = JSON.parse(localStorage.getItem('currentUser'));
|
||||
this.promotionService.getSquadPromotions(currentUser.squad._id).subscribe(promotions => {
|
||||
this.uncheckedPromotions = promotions;
|
||||
})
|
||||
|
||||
this.promotionService.requestPromotion(promotion).subscribe(() => {
|
||||
this.showSuccessLabel = true;
|
||||
setTimeout(() => {
|
||||
this.showSuccessLabel = false;
|
||||
}, 2000);
|
||||
this.showForm = false;
|
||||
this.user = {};
|
||||
let currentUser = JSON.parse(localStorage.getItem('currentUser'));
|
||||
this.promotionService.getSquadPromotions(currentUser.squad._id).subscribe(promotions => {
|
||||
this.uncheckedPromotions = promotions;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
cancel() {
|
||||
|
|
Loading…
Reference in New Issue