Advertisement
Guest User

TS

a guest
Oct 22nd, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.48 KB | None | 0 0
  1. import { Component, OnInit } from '@angular/core';
  2. import { GetusercredService } from '../getusercred.service';
  3. import { CheckusercredService } from '../checkusercred.service';
  4. // import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
  5.  
  6. @Component({
  7. selector: 'app-navbarside',
  8. templateUrl: './navbarside.component.html',
  9. styleUrls: ['./navbarside.component.css']
  10. })
  11. export class NavbarsideComponent implements OnInit {
  12.  
  13. username:any;
  14. screensize:any;
  15. showmenu="false";
  16.  
  17. constructor(public getUserCred:GetusercredService, public checkUserCred:CheckusercredService) { }
  18.  
  19. //Inquiry
  20. jsonForInquiryPD:any;
  21. jsonForInquiryLGD:any;
  22. jsonForInquiryPDLGD:any;
  23. jsonForInquiryPDFL:any;
  24. jsonForInquiryPDLGDFL:any;
  25. jsonForInquiryCKPN:any;
  26. jsonForInquiryRegressionModel:any;
  27.  
  28.  
  29. //Treasury
  30. jsonForInquiryDefaultTableRate:any;
  31. jsonForInquiryAssetType:any;
  32. jsonForInquiryAssetECLCalculation:any;
  33.  
  34. //ECL Modelling
  35. jsonForInquiryMacroEconomyData:any;
  36. jsonForInquiryBackTesting:any;
  37. jsonForInquiryScenarioGenerator:any;
  38.  
  39. //Config
  40. jsonForInquiryMacroEconomyConfig:any;
  41. jsonForInquiryECLModelling:any;
  42. jsonForInquiryRatingAndStaging:any;
  43.  
  44. ngOnInit() {
  45. var usercred=this.getUserCred.getUserData();
  46. this.username = JSON.parse(usercred).userFullname;
  47.  
  48. //Inquiry
  49. this.jsonForInquiryPD={};
  50. this.jsonForInquiryLGD={};
  51. this.jsonForInquiryPDLGD={};
  52. this.jsonForInquiryPDFL={};
  53. this.jsonForInquiryPDLGDFL={};
  54. this.jsonForInquiryCKPN={};
  55. this.jsonForInquiryRegressionModel={};
  56.  
  57. //Treasury
  58. this.jsonForInquiryDefaultTableRate={};
  59. this.jsonForInquiryAssetType={};
  60. this.jsonForInquiryAssetECLCalculation={};
  61.  
  62. //ECL Modelling
  63. this.jsonForInquiryMacroEconomyData={};
  64. this.jsonForInquiryBackTesting={};
  65. this.jsonForInquiryScenarioGenerator={};
  66.  
  67. this.jsonForInquiryMacroEconomyConfig={};
  68. this.jsonForInquiryECLModelling={};
  69. this.jsonForInquiryRatingAndStaging={};
  70.  
  71.  
  72. //Inquiry
  73. this.jsonForInquiryPD=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryPD"));
  74. this.jsonForInquiryLGD=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryLGD"));
  75. this.jsonForInquiryPDLGD=JSON.parse(this.checkUserCred.checkUserCred(usercred,"inquiryPDLGD"));
  76. this.jsonForInquiryPDFL=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryPDFL"));
  77. this.jsonForInquiryPDLGDFL=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryPDLGDFL"));
  78. this.jsonForInquiryCKPN=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryCKPN"));
  79. this.jsonForInquiryRegressionModel=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryRegressionModel"));
  80.  
  81.  
  82. //Treasury
  83. this.jsonForInquiryDefaultTableRate=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryAssetRating"));
  84. this.jsonForInquiryAssetECLCalculation=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryAssetDataECL"));
  85.  
  86. //ECL Modelling
  87. this.jsonForInquiryMacroEconomyData=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryMacroEconomyData"));
  88. this.jsonForInquiryBackTesting=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryBackTesting"));
  89. this.jsonForInquiryScenarioGenerator=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryForwardLookingScenario"));
  90.  
  91. //Config
  92. this.jsonForInquiryMacroEconomyConfig=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryMacroEconomyConfig"));
  93. this.jsonForInquiryECLModelling=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryECLConfig"));
  94. this.jsonForInquiryRatingAndStaging=JSON.parse(this.checkUserCred.checkUserCred(usercred,"InquiryRatingConfig"));
  95.  
  96.  
  97.  
  98. // this.breakpointObserver.observe([
  99. // Breakpoints.XSmall,
  100. // Breakpoints.Small,
  101. // Breakpoints.Medium,
  102. // Breakpoints.Large,
  103. // Breakpoints.XLarge
  104. // ]).subscribe(result => {
  105. // if (result.breakpoints[Breakpoints.XSmall]) {
  106. // this.showmenu="true";
  107. // }
  108. // if (result.breakpoints[Breakpoints.Small]) {
  109. // this.showmenu="true";
  110. // }
  111. // if (result.breakpoints[Breakpoints.Medium]) {
  112. // this.showmenu="true";
  113. // }
  114. // if (result.breakpoints[Breakpoints.Large]) {
  115. // this.showmenu="false";
  116. // }
  117. // if (result.breakpoints[Breakpoints.XLarge]) {
  118. // this.showmenu="false";
  119. // }
  120. // });
  121.  
  122.  
  123.  
  124.  
  125. }
  126.  
  127. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement