Broker System for Supercredit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.9KB

  1. import { Component, OnInit } from '@angular/core';
  2. import {UploadMetaModel} from '../models/uploadMetaModel';
  3. import {UploadAttachService} from '../service/upload.attach.service';
  4. import {LoanModel} from '../models/loan.model';
  5. import {LoanSingleService} from '../service/loan.single.service';
  6. @Component({
  7. selector: 'app-list-income',
  8. templateUrl: './list-income.component.html',
  9. styleUrls: ['./list-income.component.scss']
  10. })
  11. export class ListIncomeComponent implements OnInit {
  12. public uploadMeta: UploadMetaModel = new UploadMetaModel({});
  13. public Loan: LoanModel = new LoanModel({});
  14. public startLoad = false
  15. private UploadMetaFilterIsReady = false;
  16. private LoanFilterIsReady = false;
  17. constructor(private uas: UploadAttachService, private lss: LoanSingleService) { }
  18. ngOnInit(): void {
  19. this.UploadMetaFilterIsReady = true;
  20. // this.UploadMetaFilterIsReady = false;
  21. // this.uas.getUploadMeta(1).subscribe(
  22. // resp => {
  23. // this.UploadMetaFilterIsReady = true;
  24. // this.checkStartUpload();
  25. // // this.uploadMeta = new UploadMetaModel(resp);
  26. // }, error => {
  27. // this.UploadMetaFilterIsReady = true;
  28. // this.checkStartUpload();
  29. // }, () => {
  30. // this.UploadMetaFilterIsReady = true;
  31. // this.checkStartUpload();
  32. // }
  33. // );
  34. // this.lss.getLoan('0482b524-d396-4b03-8abb-f8325c87e2ed').subscribe(
  35. // resp => {
  36. // this.Loan = new LoanModel(resp);
  37. // this.LoanFilterIsReady = true;
  38. // this.checkStartUpload();
  39. // }, err => {
  40. // this.LoanFilterIsReady = true;
  41. // this.checkStartUpload();
  42. // }, () => {
  43. // this.LoanFilterIsReady = true;
  44. // this.checkStartUpload();
  45. // }
  46. // );
  47. this.startLoad = true;
  48. }
  49. private checkStartUpload(): void {
  50. this.startLoad = this.UploadMetaFilterIsReady
  51. }
  52. }