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