Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. this.uiBlockService.showUiBlock();
  2.  
  3. this.adminPeriodeGajiService.search({ salaryDate : this.inputForm.value.tglMutasi })
  4. .pipe(
  5. switchMap((periods: GaResponse<AdminPeriodeGaji[]>) => {
  6. this.penggajianForm.patchValue({
  7. bulanBerlaku : periods.data[0].yearMonth
  8. });
  9. return this.employeeSalaryService.search({ employeeId : this.karyawan.id, beginDate: this.inputForm.value.tglMutasi });
  10. }),
  11. takeUntil(this.ngUnsubscribe)
  12. )
  13. .subscribe(
  14. (result) => {
  15. this.uiBlockService.hideUiBlock();
  16. this.penggajianForm.patchValue({
  17. oldGaji: result.data[0].basicSalary,
  18. gaji : result.data[0].basicSalary
  19. });
  20. },
  21. (error) => {
  22. this.uiBlockService.hideUiBlock();
  23. this.contentAlertService.error(error.errors);
  24. },
  25. () => { this.uiBlockService.hideUiBlock(); }
  26. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement