initiate to sit

This commit is contained in:
Zuhdan Ubay 2020-05-22 10:25:51 +07:00
parent 947ee4e0c2
commit 9101cdaa87
271 changed files with 990780 additions and 494 deletions

View file

@ -58,7 +58,7 @@ export class PromotionComponent implements OnInit {
this.initData();
}
initData(){
initData() {
this.service.getPromotion().subscribe((result) => {
this.source = Object.assign([], result);
});
@ -78,6 +78,9 @@ export class PromotionComponent implements OnInit {
onDeleteConfirm(event): void {
if (window.confirm('Are you sure you want to delete?')) {
this.service.deletePromotion(event.data).subscribe((value) => {
this.initData();
});
event.confirm.resolve();
} else {
event.confirm.reject();