Advertisement
Guest User

htmlnya

a guest
Nov 13th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 70.88 KB | None | 0 0
  1. <div class="row">
  2. <div class="col-md-12 grid-margin">
  3. <div class="row">
  4. <div class="col-12">
  5. <div class="card">
  6. <div class="card-body" style="padding-bottom:0px">
  7. <h4 class="card-title" style="font-size: 20px">Asset ECL Calculation</h4><br>
  8. <form class="form-sample" [formGroup]="filteringForm">
  9. <div class="row">
  10. <div class="col-md-12">
  11. <div class="form-group row">
  12. </div>
  13. <!-- <form class="forms-sample" [formGroup]="editCalcForm">
  14.  
  15. <div class="form-row">
  16. <div class="col-md-2 col-lg-2 col-sm-2">
  17. <label style="font-size: 11px">Asset Type</label>
  18. <input type="text" class="form-control" style="width: 95%" formControlName="assetTypeF" id="assetTypeF" name="assetTypeF" placeholder="Asset Type" >
  19. <span style="font-size:10px; color: #ed4a4a; " *ngIf="editCalcForm.controls.assetTypeF.invalid && editCalcForm.controls.assetTypeF.touched">Asset Type cannot be empty</span>
  20. </div>
  21.  
  22. <div class="col-md-3 col-lg-3 col-sm-3">
  23. <label style="font-size: 11px">Asset Name</label>
  24. <input type="text" class="form-control" style="width: 95%" formControlName="assetNameF" id="assetNameF" name="assetNameF" placeholder="Asset Name" >
  25. <span style="font-size:10px; color: #ed4a4a; " *ngIf="editCalcForm.controls.assetNameF.invalid && editCalcForm.controls.assetNameF.touched">Asset Name cannot be empty</span>
  26. </div>
  27.  
  28. <div class="col-md-2 col-lg-2 col-sm-2">
  29. <label style="font-size: 11px">Rating</label>
  30. <select formControlName="ratingF" style="min-width: 100%" id="ratingF" name="ratingF" class="btn btn-outline-secondary dropdown-toggle" type="text" >
  31.  
  32. <option *ngFor="let lrating of listRatingName" [value]="lrating">{{lrating}}</option>
  33. </select>
  34. <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.ratingF.invalid && editCalcForm.controls.ratingF.touched">Rating cannot be empty</span>
  35. </div>
  36.  
  37.  
  38. <div class="col-md-2 col-lg-2 col-sm-2">
  39. <label style="font-size: 11px">EIR Rate (%)</label>
  40. <input type="text" class="form-control" style="margin-bottom:10px;width: 95%" formControlName="eirRateF" id="eirRateF" name="eirRateF" placeholder="EIR Rate" >
  41. <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.eirRateF.invalid && editCalcForm.controls.eirRateF.touched">EIR Rate must be numeric & cannot be empty </span>
  42. </div>
  43.  
  44. <div class="col-md-3 col-lg-3 col-sm-3">
  45. <label style="font-size: 11px">Nominal</label>
  46. <input type="text"class="form-control" style="margin-bottom:10px;width: 95%" formControlName="nominalF" id="nominalF" name="nominalF" placeholder="Nominal" >
  47. <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.nominalF.invalid && editCalcForm.controls.nominalF.touched">Nominal must be numeric & cannot be empty </span>
  48. </div>
  49.  
  50. </div>
  51.  
  52. <div class="form-row">
  53. <div class="col-md-3 col-lg-3 col-sm-3">
  54. <label style="font-size: 11px">Buy Date</label>
  55. <div id="datepicker-popup1" class= "input-group date datepicker btn-block" style="max-width:100%">
  56. <input type="text" class="form-control" formControlName="buyDate" id="buyDate" name="buyDate" placeholder="Buy Date" >
  57. <span class="input-group-addon input-group-append border-left" style="text-align: center">
  58. <span class="mdi mdi-calendar input-group-text" style="padding:5px"></span>
  59. </span>
  60. </div>
  61. </div>
  62.  
  63. <div class="col-md-3 col-lg-3 col-sm-3">
  64. <label style="font-size: 11px">Maturity Date</label>
  65.  
  66. <div id="datepicker-popup2" class= "input-group date datepicker btn-block" style="max-width:100%">
  67. <input type="text" class="form-control" formControlName="maturityDate" id="maturityDate" name="maturityDate" placeholder="Maturity Date" >
  68. <span class="input-group-addon input-group-append border-left" style="text-align: center">
  69. <span class="mdi mdi-calendar input-group-text" style="padding:5px"></span>
  70. </span>
  71. </div>
  72.  
  73. </div>
  74. <div class="col-md-3 col-lg-3 col-sm-3">
  75. <label style="font-size: 11px">Rating Type</label>
  76. <select formControlName="ratingLGD" style="min-width: 100%" id="ratingLGD" name="ratingLGD" class="btn btn-outline-secondary dropdown-toggle" type="text" >
  77.  
  78. <option *ngFor="let trating of listRatingNameLGD" [value]="trating">{{trating}}</option>
  79. </select>
  80. <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.ratingLGD.invalid && editCalcForm.controls.ratingLGD.touched">Rating type cannot be empty</span>
  81. </div>
  82.  
  83.  
  84. </div><br>
  85.  
  86. <div class="form row">
  87. <div class="col">
  88. <button (click)="generateExcel()" type="button" class="btn btn-icons btn-inverse-primary" style="margin-right:8px;float:right;margin-bottom:30px;">
  89. <i class="mdi mdi-printer"></i>
  90. </button>
  91. <button type="button" class="btn btn-icons btn-inverse-info" style="margin-right:10px;float:right" data-toggle="modal" data-target="#exampleModal-8">
  92. <i class="mdi mdi-upload"></i>
  93. </button>
  94. <button class="btn btn-icons btn-inverse-success" style="min-width:120px;float: right; margin-right: 10px;margin-bottom:15px; " (click)="goCalculateValue()" type="submit">Calculate</button>
  95. <button class="btn btn-icons btn-inverse-warning" style="min-width:120px;float: right; margin-bottom: 0px; margin-right: 10px;margin-bottom:15px;" data-toggle="modal" data-target="#exampleModal-5" type="submit">Add</button>
  96. </div>
  97. </div>
  98. </form> -->
  99.  
  100. <div class="form-group row">
  101. <label class="col col-form-label">Search by </label><br>
  102. </div>
  103.  
  104. <div class="form-group row">
  105. <div class="col">
  106. <select class="btn btn-secondary dropdown-toggle btn-block" style="min-width:100%" formControlName="currencyFiltering" style="margin-bottom: 15px">
  107. <option value="">Currency</option>
  108. <option *ngFor="let currencyFil of currencyFilter" [value]="currencyFil">{{currencyFil}}</option>
  109. </select>
  110. </div>
  111. <div class="col">
  112. <select class="btn btn-secondary dropdown-toggle btn-block" style="min-width:100%" formControlName="ratingFiltering" style="margin-bottom: 15px">
  113. <option value="">Rating</option>
  114. <option *ngFor="let ratingFil of ratingFilter" [value]="ratingFil">{{ratingFil}}</option>
  115. </select>
  116. </div>
  117. <div class="col">
  118. <select class="btn btn-secondary dropdown-toggle btn-block" style="min-width:100%" formControlName="typeFiltering" style="margin-bottom: 15px">
  119. <option value="">Type</option>
  120. <option *ngFor="let typeFil of typeECLFilter" [value]="typeFil">{{typeFil}}</option>
  121. </select>
  122. </div>
  123. <div class="col">
  124. <select class="btn btn-secondary dropdown-toggle btn-block" style="min-width:100%" formControlName="codeTypeFiltering" style="margin-bottom: 15px">
  125. <option value="">Code Type</option>
  126. <option *ngFor="let codeTypeFil of codeTypeFilter" [value]="codeTypeFil">{{codeTypeFil}}</option>
  127. </select>
  128. </div>
  129. <div class="col">
  130. <select class="btn btn-secondary dropdown-toggle btn-block" style="min-width:100%" formControlName="assetTypeFiltering" style="margin-bottom: 15px">
  131. <option value="">Asset Type</option>
  132. <option *ngFor="let assetTypeFil of assetTypeFilter" [value]="assetTypeFil">{{assetTypeFil}}</option>
  133. </select>
  134. </div>
  135.  
  136. <div class="col">
  137. <select class="btn btn-secondary dropdown-toggle btn-block" style="min-width:100%" formControlName="lembagaFiltering" style="margin-bottom: 15px">
  138. <option value="">Lembaga</option>
  139. <option *ngFor="let lembagaFil of lembagaFilter" [value]="lembagaFil">{{lembagaFil}}</option>
  140. </select>
  141. </div>
  142. </div>
  143. <!-- <div class="col">
  144. <div id="datepicker-popup1" class= "input-group date datepicker btn-block" style="min-width:100%">
  145. <input type="text" class="form-control" id="periodeStart" name="periodeStart" placeholder="Start Period" formControlName="periodeStart">
  146. <span class="input-group-addon input-group-append border-left" style="text-align: center">
  147. <span class="mdi mdi-calendar input-group-text" style="padding: 5px"></span>
  148. </span>
  149. </div>
  150. </div>
  151. <div class="col">
  152. <div id="datepicker-popup2" class= "input-group date datepicker btn-block" style="min-width:100%">
  153. <input type="text" class="form-control" id="periodeEnd" name="periodeEnd" placeholder="End Period" formControlName="periodeEnd">
  154. <span class="input-group-addon input-group-append border-left" style="text-align: center">
  155. <span class="mdi mdi-calendar input-group-text" style="padding: 5px"></span>
  156. </span>
  157. </div>
  158. </div>
  159. </div> -->
  160.  
  161. <div class="form row">
  162. <div class="col">
  163. <button (click)="generateReportExcel()" type="button" class="btn btn-icons btn-inverse-primary" style="margin-right:8px;float:right;margin-bottom:30px;">
  164. <i class="mdi mdi-printer"></i>
  165. </button>
  166. <button type="button" class="btn btn-icons btn-inverse-info" style="margin-right:10px;float:right" data-toggle="modal" data-target="#exampleModal-8">
  167. <i class="mdi mdi-upload"></i>
  168. </button>
  169. <button class="btn btn-icons btn-inverse-success" style="min-width:120px;float: right; margin-right: 10px;margin-bottom:15px; " (click)="goCalculateValue()" type="submit">Calculate</button>
  170. <button class="btn btn-icons btn-inverse-success" style="min-width:120px;float: right; margin-right: 10px;margin-bottom:15px; " data-toggle="modal" data-target="#exampleModal-5" type="submit" hidden="true">Calculate</button>
  171. <!-- <button class="btn btn-icons btn-inverse-success" style="min-width:120px;float: right; margin-right: 10px;margin-bottom:15px; " (click)="goCalculateValue()" type="submit">Calculate</button> -->
  172. <button class="btn btn-icons btn-inverse-primary" style="min-width:120px;float: right; margin-bottom: 0px; margin-right: 10px;margin-bottom:15px;" (click)="markUntouched()" data-toggle="modal" data-target="#exampleModal-6" type="submit">Add</button>
  173. <button class="btn btn-icons btn-inverse-warning" style="min-width:120px;float: right; margin-bottom: 0px; margin-right: 10px;margin-bottom:15px;" (click)="CallingDropdown()" type="submit">Search</button>
  174.  
  175. </div>
  176. </div>
  177.  
  178. </div>
  179. </div>
  180. <!-- </div> -->
  181. </form>
  182. </div>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187.  
  188. <div class="col-md-12 grid-margin">
  189. <div class="card">
  190. <div class="card-body">
  191. <div style="text-align: center; min-width: 100%" *ngIf="loadingBar=='true'">
  192. <div class="col-md-12 col-sm-6 grid-margin stretch-card">
  193. <div class="loader-demo-box" >
  194. <div class="dot-opacity-loader">
  195. <span></span>
  196. <span></span>
  197. <span></span>
  198. <span></span>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. <ng-container *ngIf=" loadingBar=='false' && dataNotFound=='true'">
  204. <table id="user-table" class="table table-striped" style="font-size: 18px; text-align: center">
  205. <tbody>
  206. <tr>
  207. <h4 class="card-title" style="font-size: 20px;text-align: center;">No Data to Display</h4>
  208. </tr>
  209. </tbody>
  210. </table>
  211. </ng-container>
  212. <form [formGroup]="updateForm" (ngSubmit)="reverbUpdateData()">
  213.  
  214. <div id="innerdiv">
  215. <table *ngIf="id.length>0 && loadingBar=='false'" id="user-table" class="table table-striped" style="font-size: 18px; text-align: center" >
  216. <thead>
  217. <tr>
  218. <th>Type</th>
  219. <th>Code Type</th>
  220. <!-- <th>Name</th> -->
  221. <th>Asset Type</th>
  222. <th>Rekening</th>
  223. <th>Asset Name</th>
  224. <th>Loan Type</th>
  225. <th>Lembaga</th>
  226. <th>Currency</th>
  227. <th>Rating</th>
  228. <!-- <th>Rating LGD</th> -->
  229. <th>Buy Date</th>
  230. <th>Maturity Date</th>
  231. <th>EIR Rate</th>
  232. <th>Nominal</th>
  233. <th>Kurs</th>
  234. <th>Nominal Equivalen</th>
  235. <th>COA Debet</th>
  236. <th>COA Kredit</th>
  237. <!-- <th>Period</th> -->
  238. <!-- <th>Calculate Type</th> -->
  239. <!-- <th>Calculate Type LGD</th> -->
  240. <!-- <th>MTM</th>
  241. <th>Fair Value</th> -->
  242. <th>CCF</th>
  243. <th>PD</th>
  244. <th>LGD</th>
  245. <th>Discount Factor</th>
  246. <th>Credit Loss</th>
  247. <th class="headcol" style="border: 0px; background-color:#093652 ;width: 112px; height: 49px">
  248. <label class="table table-striped" style="font-size: 14px; text-align: center;background-color:#093652; margin-right: 30px">Action</label>
  249. </th>
  250. </tr>
  251. </thead>
  252. <tbody>
  253. <tr *ngFor="let listRate of listCalculation | paginate: { itemsPerPage: 10, currentPage: p, totalItems: totalRec };let i = index">
  254. <!-- <td >{{listRate.id}}</td> -->
  255.  
  256.  
  257. <td *ngIf="updateCounter == 0 || listRate.id != code">
  258. {{listRate.type}}
  259. </td>
  260.  
  261. <td *ngIf="updateCounter==1 && listRate.id == code">
  262. <div class="ui fluid input" style="min-width: 60px">
  263. <!-- <input type="text" class="typeahead" formControlName="typeUpdate" id="typeUpdate" name="typeUpdate" placeholder="Type"> -->
  264. <select class="form-control" formControlName="typeUpdate" id="typeUpdate" name="typeUpdate" (change)="getCodeTypeUpdate($event.target.value)">
  265. <option value="null">Select Type</option>
  266. <option *ngFor="let ct of typeFilter" [value]="ct">{{ct}}</option>
  267. </select>
  268. <span style="font-size:10px;color:#ed4a4a; float: left" *ngIf="(updateForm.controls.typeUpdate.invalid && updateForm.controls.typeUpdate.touched) || (updateForm.controls.typeUpdate.value==null && updateForm.controls.typeUpdate.touched) && listRate.id==code">Type cannot be empty</span>
  269.  
  270. </div>
  271. </td>
  272.  
  273.  
  274. <td *ngIf="updateCounter == 0 || listRate.id != code">
  275. {{listRate.codeType}}
  276. </td>
  277. <td *ngIf="updateCounter==1 && listRate.id == code">
  278. <div class="ui fluid input" style="min-width: 60px">
  279. <!-- <input type="text" class="typeahead" formControlName="codeTypeUpdate" id="codeTypeUpdate" name="codeTypeUpdate"> -->
  280. <select class="form-control" formControlName="codeTypeUpdate" style="min-width: 90%" id="codeTypeUpdate" name="codeTypeUpdate">
  281. <option value="null">Select Code Type</option>
  282. <option *ngFor="let ct of codeTypeFilUp" [value]="ct.assetCode">{{ct.assetCode}}</option>
  283. </select>
  284.  
  285. <span style="font-size:10px;color:#ed4a4a;" *ngIf="(updateForm.controls.codeTypeUpdate.invalid && updateForm.controls.codeTypeUpdate.touched) || (updateForm.controls.codeTypeUpdate.touched && updateForm.controls.codeTypeUpdate.value=='null') && listRate.id==code">Code Type cannot be empty</span>
  286. </div>
  287. </td>
  288.  
  289. <td *ngIf="updateCounter == 0 || listRate.id != code">
  290. {{listRate.assetType}}
  291. </td>
  292. <td *ngIf="updateCounter==1 && listRate.id == code">
  293. <div class="ui fluid input" style="min-width: 60px">
  294. <!-- <input type="text" class="typeahead" formControlName="assetTypeUpdate" id="assetTypeUpdate" name="assetTypeUpdate"> -->
  295.  
  296. <select class="typeahead" formControlName="assetTypeUpdate" id="assetTypeUpdate" name="assetTypeUpdate" >
  297. <option value="">Select Asset Type</option>
  298. <option value="AC">AC</option>
  299. <option value="FVOCI">FVOCI</option>
  300. <option value="FVPL">FVPL</option>
  301. </select>
  302. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.assetTypeUpdate.invalid && updateForm.controls.assetTypeUpdate.touched && listRate.id==code">Asset type cannot be empty</span>
  303.  
  304. </div>
  305. </td>
  306.  
  307. <td *ngIf="updateCounter == 0 || listRate.id != code">
  308. {{listRate.rekening}}
  309. </td>
  310. <td *ngIf="updateCounter==1 && listRate.id == code">
  311. <div class="ui fluid input" style="min-width: 60px">
  312. <input type="text" class="typeahead" formControlName="rekeningUpdate" id="rekeningUpdate" name="rekeningUpdate">
  313. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.rekeningUpdate.invalid && updateForm.controls.rekeningUpdate.touched && listRate.id==code">Rekening cannot be empty</span>
  314. </div>
  315. </td>
  316.  
  317. <!-- <td *ngIf="updateCounter == 0 || listRate.id != code">
  318. {{listRate.name}}
  319. </td>
  320. <td *ngIf="updateCounter==1 && listRate.id == code">
  321. <div class="ui fluid input" style="min-width: 60px">
  322. <input type="text" class="typeahead" formControlName="nameUpdate" id="nameUpdate" name="nameUpdate">
  323. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.nameUpdate.invalid && updateForm.controls.nameUpdate.touched && listRate.id==code">Name cannot be empty</span>
  324. </div>
  325. </td> -->
  326.  
  327.  
  328. <td *ngIf="updateCounter == 0 || listRate.id != code">
  329. {{listRate.assetName}}
  330. </td>
  331. <td *ngIf="updateCounter==1 && listRate.id == code">
  332. <div class="ui fluid input" style="min-width: 60px">
  333. <input type="text" class="typeahead" formControlName="assetNameUpdate" id="assetNameUpdate" name="assetNameUpdate">
  334. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.assetNameUpdate.invalid && updateForm.controls.assetNameUpdate.touched && listRate.id==code">Asset name cannot be empty</span>
  335.  
  336. </div>
  337. </td>
  338.  
  339. <td *ngIf="updateCounter == 0 || listRate.id != code">
  340. {{listRate.loanType}}
  341. </td>
  342. <td *ngIf="updateCounter==1 && listRate.id == code">
  343. <div class="ui fluid input" style="min-width: 60px">
  344. <input type="text" class="typeahead" formControlName="loanTypeUpdate" id="loanTypeUpdate" name="loanTypeUpdate">
  345. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.loanTypeUpdate.invalid && updateForm.controls.loanTypeUpdate.touched && listRate.id==code">Loan Type cannot be empty</span>
  346. </div>
  347. </td>
  348.  
  349. <td *ngIf="updateCounter == 0 || listRate.id != code">
  350. {{listRate.lembaga}}
  351. </td>
  352. <td *ngIf="updateCounter==1 && listRate.id == code">
  353. <div class="ui fluid input" style="min-width: 60px">
  354. <select class="typeahead" formControlName="lembagaUpdate" id="lembagaUpdate" name="lembagaUpdate" (change)="onChangeLembagaUpdate($event.target.value)">
  355. <option value="null">Select Lembaga</option>
  356. <option *ngFor="let lm of listLembaga">{{lm}}</option>
  357. </select>
  358. <!-- <input type="text" class="typeahead" formControlName="lembagaUpdate" id="lembagaUpdate" name="lembagaUpdate"> -->
  359. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.lembagaUpdate.invalid && updateForm.controls.lembagaUpdate.touched && listRate.id==code">Lembaga cannot be empty</span>
  360. </div>
  361. </td>
  362.  
  363. <td *ngIf="updateCounter == 0 || listRate.id != code">
  364. {{listRate.currency}}
  365. </td>
  366. <td *ngIf="updateCounter==1 && listRate.id == code">
  367. <div class="ui fluid input" style="min-width: 60px">
  368. <select class="typeahead" formControlName="currencyUpdate" id="currencyUpdate" name="currencyUpdate">
  369. <option value="null">Select Currency</option>
  370. <option *ngFor="let cr of listCurrencyDist">{{cr}}</option>
  371. </select>
  372. <!-- <input type="text" class="typeahead" formControlName="currencyUpdate" id="currencyUpdate" name="currencyUpdate"> -->
  373. <span style="font-size:10px;color:#ed4a4a;" *ngIf="(updateForm.controls.currencyUpdate.invalid && updateForm.controls.currencyUpdate.touched) || (updateForm.controls.currencyUpdate.dirty && updateForm.controls.currencyUpdate.invalid) && listRate.id==code">Currency cannot be empty</span>
  374. </div>
  375. </td>
  376.  
  377. <td *ngIf="updateCounter == 0 || listRate.id != code">
  378. {{listRate.rating}}
  379. </td>
  380. <td *ngIf="updateCounter==1 && listRate.id == code">
  381. <div class="ui fluid input" style="min-width: 60px">
  382. <select class="typeahead" formControlName="ratingUpdate" id="ratingUpdate" name="ratingUpdate" >
  383. <option value="">Select Rating</option>
  384. <option *ngFor="let Nrating of listRatingName; let i = index" [value]="Nrating">{{Nrating}}</option>
  385. </select>
  386. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.ratingUpdate.invalid && updateForm.controls.ratingUpdate.touched && listRate.id==code">Rating cannot be empty</span>
  387.  
  388. </div>
  389. </td>
  390.  
  391.  
  392. <!-- <td *ngIf="updateCounter == 0 || listRate.id != code">
  393. {{listRate.ratingLGD}}
  394. </td>
  395. <td *ngIf="updateCounter==1 && listRate.id == code">
  396. <div class="ui fluid input" style="min-width: 60px">
  397. <select class="typeahead" formControlName="ratingLGDUpdate" id="ratingLGDUpdate" name="ratingLGDUpdate" >
  398. <option value="">Select Rating LGD</option>
  399. <option *ngFor="let Trating of listRatingNameLGD; let i = index" [value]="Trating">{{Trating}}</option>
  400. </select>
  401. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.ratingLGDUpdate.invalid && updateForm.controls.ratingLGDUpdate.touched && listRate.id==code">Rating LGD cannot be empty</span>
  402.  
  403. </div>
  404. </td> -->
  405.  
  406. <td *ngIf="updateCounter == 0 || listRate.id != code">
  407. {{listRate.buyDate}}
  408. </td>
  409.  
  410. <td *ngIf="updateCounter==1 && listRate.id == code" style="position: relative">
  411. <div id="datepicker-popup5" class= "input-group date datepicker btn-block" style="min-width: 60px">
  412. <input type="date" class="typeahead" formControlName="buyDateUpdate" id="buyDateUpdate" name="buyDateUpdate" placeholder="Buy Date" >
  413. <!-- <span span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.buyDateUpdate.invalid && updateForm.controls.buyDateUpdate.touched && listRate.id==code">Buy date cannot be empty</span> -->
  414. <!-- <span class="input-group-addon input-group-append border-left" style="text-align: center"> -->
  415. <!-- <span class="mdi mdi-calendar input-group-text" style="padding:5px"></span> -->
  416. <!-- </span> -->
  417. </div>
  418.  
  419. </td>
  420.  
  421. <!-- <td *ngIf="updateCounter==1 && listRate.id == code">
  422. <div id="datepicker-popup3" class= "input-group date datepicker btn-block" style="min-width: 60px">
  423. <input type="text" class="form-control" formControlName="buyDateUpdate" id="buyDateUpdate" name="buyDateUpdate">
  424. <span class="input-group-addon input-group-append border-left" style="text-align: center">
  425. <span class="mdi mdi-calendar input-group-text" style="padding:5px"></span>
  426. </span>
  427. <span span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.buyDateUpdate.invalid && updateForm.controls.buyDateUpdate.touched && listRate.id==code">Buy date cannot be empty</span>
  428.  
  429. </div>
  430. </td> -->
  431.  
  432. <td *ngIf="updateCounter == 0 || listRate.id != code">
  433. {{listRate.maturityDate}}
  434. </td>
  435. <td *ngIf="updateCounter==1 && listRate.id == code">
  436. <div id="datepicker-popup4" class= "input-group date datepicker btn-block" style="min-width: 60px">
  437. <input type="date" class="typeahead" formControlName="maturityDateUpdate" id="maturityDateUpdate" name="maturityDateUpdate" placeholder="Maturity Date">
  438. <!-- <span class="input-group-addon input-group-append border-left" style="text-align: center">
  439. <span class="mdi mdi-calendar input-group-text" style="padding:5px"></span>
  440. </span> -->
  441. <!-- <span span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.maturityDateUpdate.invalid && updateForm.controls.maturityDateUpdate.touched && listRate.id==code">Maturity date cannot be empty</span> -->
  442. </div>
  443. </td>
  444.  
  445. <td *ngIf="updateCounter == 0 || listRate.id != code">
  446. {{listRate.eirRate}}
  447. </td>
  448. <td *ngIf="updateCounter==1 && listRate.id == code">
  449. <div class="ui fluid input" style="min-width: 60px">
  450. <input type="number" class="typeahead" formControlName="eirRateUpdate" id="eirRateUpdate" name="eirRateUpdate">
  451. <span span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.eirRateUpdate.invalid && updateForm.controls.eirRateUpdate.touched && listRate.id==code">EIR rate must be filled with numeric digits</span>
  452. </div>
  453. </td>
  454. <td *ngIf="updateCounter == 0 || listRate.id != code">
  455. {{listRate.nominal | number: '1.0-10'}}
  456. </td>
  457. <td *ngIf="updateCounter==1 && listRate.id == code">
  458. <div class="ui fluid input" style="min-width: 60px">
  459. <input type="text" class="typeahead" formControlName="nominalUpdate" id="nominalUpdate" name="nominalUpdate" (change)="onChangeNominalUpdate($event.target.value)">
  460. <span span style="font-size:9px;color:#ed4a4a;" *ngIf="updateForm.controls.nominalUpdate.invalid && updateForm.controls.nominalUpdate.touched && listRate.id==code">Nominal must be filled with numeric digits</span>
  461.  
  462. </div>
  463. </td>
  464.  
  465.  
  466. <td *ngIf="updateCounter == 0 || listRate.id != code">
  467. {{listRate.kurs}}
  468. </td>
  469. <td *ngIf="updateCounter==1 && listRate.id == code">
  470. <div class="ui fluid input" style="min-width: 60px">
  471. <input type="text" class="typeahead" formControlName="kursUpdate" id="kursUpdate" name="kursUpdate" (change)="onChangeKursUpdate($event.target.value)">
  472. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.kursUpdate.invalid && updateForm.controls.kursUpdate.touched && listRate.id==code">Kurs must be filled with numeric digits</span>
  473. </div>
  474. </td>
  475.  
  476. <td *ngIf="updateCounter == 0 || listRate.id != code">
  477. {{listRate.nominalEqivalen}}
  478. </td>
  479. <td *ngIf="updateCounter==1 && listRate.id == code">
  480. <div class="ui fluid input" style="min-width: 60px">
  481. <input type="text" class="typeahead" formControlName="nominalEqivalenUpdate" id="nominalEqivalenUpdate" name="nominalEqivalenUpdate" readonly>
  482. <!-- <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.nominalEqivalenUpdate.invalid && updateForm.controls.nominalEqivalenUpdate.touched && listRate.id==code">Nominal Eqivalen must be filled with numeric digits</span> -->
  483. </div>
  484. </td>
  485.  
  486. <td *ngIf="updateCounter == 0 || listRate.id != code">
  487. {{listRate.coaDebet}}
  488. </td>
  489. <td *ngIf="updateCounter==1 && listRate.id == code">
  490. <div class="ui fluid input" style="min-width: 60px">
  491. <input type="text" class="typeahead" formControlName="coaDebetUpdate" id="coaDebetUpdate" name="coaDebetUpdate" >
  492. <!-- <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.nominalEqivalenUpdate.invalid && updateForm.controls.nominalEqivalenUpdate.touched && listRate.id==code">Nominal Eqivalen must be filled with numeric digits</span> -->
  493. </div>
  494. </td>
  495.  
  496. <td *ngIf="updateCounter == 0 || listRate.id != code">
  497. {{listRate.coaKredit}}
  498. </td>
  499. <td *ngIf="updateCounter==1 && listRate.id == code">
  500. <div class="ui fluid input" style="min-width: 60px">
  501. <input type="text" class="typeahead" formControlName="coaKreditUpdate" id="coaKreditUpdate" name="coaKreditUpdate" >
  502. <!-- <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.nominalEqivalenUpdate.invalid && updateForm.controls.nominalEqivalenUpdate.touched && listRate.id==code">Nominal Eqivalen must be filled with numeric digits</span> -->
  503. </div>
  504. </td>
  505.  
  506. <!-- <td *ngIf="updateCounter == 0 || listRate.id != code">
  507. {{listRate.period}}
  508. </td>
  509. <td *ngIf="updateCounter==1 && listRate.id == code">
  510. <div class="ui fluid input" style="min-width: 60px">
  511. <input type="text" class="typeahead" formControlName="periodUpdate" id="periodUpdate" name="periodUpdate">
  512. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.periodUpdate.invalid && updateForm.controls.periodUpdate.touched && listRate.id==code">Period cannot be empty</span>
  513. </div>
  514. </td> -->
  515.  
  516. <!-- <td *ngIf="updateCounter == 0 || listRate.id != code">
  517. {{listRate.calculateType}}
  518. </td>
  519. <td *ngIf="updateCounter==1 && listRate.id == code">
  520. <div class="ui fluid input" style="min-width: 60px">
  521. <input type="text" class="typeahead" formControlName="calculateTypeUpdate" id="calculateTypeUpdate" name="calculateTypeUpdate">
  522. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.calculateTypeUpdate.invalid && updateForm.controls.calculateTypeUpdate.touched && listRate.id==code">Calculate Type cannot be empty</span>
  523. </div>
  524. </td> -->
  525.  
  526.  
  527. <!-- <td *ngIf="updateCounter == 0 || listRate.id != code">
  528. {{listRate.calculateType}}
  529. </td>
  530. <td *ngIf="updateCounter==1 && listRate.id == code">
  531. <div class="ui fluid input" style="min-width: 60px">
  532. <select class="typeahead" formControlName="caltype" id="caltype" name="caltype" >
  533. <option value="PD1YEAR">PD 1 YEAR</option>
  534. <option value="LIFETIME">LIFETIME</option>
  535. </select>
  536. <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.caltype.invalid && updateForm.controls.caltype.touched && listRate.id==code">Rating cannot be empty</span>
  537.  
  538. </div>
  539. </td> -->
  540.  
  541. <!-- <td *ngIf="updateCounter==1 && listRate.id == code">
  542. <div id="datepicker-popup4" class= "input-group date datepicker btn-block" style="min-width:100%">
  543. <input type="date" class="form-control" formControlName="maturityDateUpdate" id="maturityDateUpdate" name="maturityDateUpdate" placeholder="Maturity Date" >
  544.  
  545. </div>
  546. </td> -->
  547.  
  548.  
  549. <td *ngIf="updateCounter == 0 || listRate.id != code">
  550. {{listRate.ccf}}
  551. </td>
  552. <td *ngIf="updateCounter==1 && listRate.id == code">
  553. <div class="ui fluid input" style="min-width: 60px">
  554. <input type="text" class="typeahead" formControlName="ccfUpdate" id="ccfUpdate" name="ccfUpdate" readonly>
  555. <!-- <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.ccfUpdate.invalid && updateForm.controls.ccfUpdate.touched && listRate.id==code">CCF cannot be empty</span> -->
  556. </div>
  557. </td>
  558.  
  559. <td *ngIf="updateCounter == 0 || listRate.id != code">
  560. {{listRate.PD}}
  561. </td>
  562. <td *ngIf="updateCounter==1 && listRate.id == code">
  563. <div class="ui fluid input" style="min-width: 60px">
  564. <input type="text" class="typeahead" formControlName="PDUpdate" id="PDUpdate" name="PDUpdate" readonly>
  565. <!-- <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.PDUpdate.invalid && updateForm.controls.PDUpdate.touched && listRate.id==code">PD cannot be empty</span> -->
  566. </div>
  567. </td>
  568.  
  569.  
  570. <td *ngIf="updateCounter == 0 || listRate.id != code">
  571. {{listRate.LGD}}
  572. </td>
  573. <td *ngIf="updateCounter==1 && listRate.id == code">
  574. <div class="ui fluid input" style="min-width: 60px">
  575. <input type="text" class="typeahead" formControlName="LGDUpdate" id="LGDUpdate" name="LGDUpdate" readonly>
  576. <!-- <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.LGDUpdate.invalid && updateForm.controls.LGDUpdate.touched && listRate.id==code">LGD cannot be empty</span> -->
  577. </div>
  578. </td>
  579.  
  580. <td *ngIf="updateCounter == 0 || listRate.id != code">
  581. {{listRate.discountFactor}}
  582. </td>
  583. <td *ngIf="updateCounter==1 && listRate.id == code">
  584. <div class="ui fluid input" style="min-width: 60px">
  585. <input type="text" class="typeahead" formControlName="discountFactorUpdate" id="discountFactorUpdate" name="discountFactorUpdate" readonly>
  586. <!-- <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.ccfUpdate.invalid && updateForm.controls.ccfUpdate.touched && listRate.id==code">CCF cannot be empty</span> -->
  587. </div>
  588. </td>
  589.  
  590. <td *ngIf="updateCounter == 0 || listRate.id != code">
  591. {{listRate.creditLoss | number: '1.0-10'}}
  592. </td>
  593. <td *ngIf="updateCounter==1 && listRate.id == code">
  594. <div class="ui fluid input" style="min-width: 60px">
  595. <input type="text" class="typeahead" formControlName="creditLossUpdate" id="creditLossUpdate" name="creditLossUpdate" readonly>
  596. <!-- <span style="font-size:10px;color:#ed4a4a;" *ngIf="updateForm.controls.ccfUpdate.invalid && updateForm.controls.ccfUpdate.touched && listRate.id==code">CCF cannot be empty</span> -->
  597. </div>
  598. </td>
  599.  
  600. <td class="headcol">
  601. <button class="btn btn-icons btn-inverse-primary" (click)="updateData(listRate.id,i)" style=" cursor: pointer; margin-top: -15px" *ngIf="updateCounter== 0 || listRate.id != code">
  602. <i class="mdi mdi-account-edit" ></i>
  603. </button>
  604. <button class="btn btn-icons btn-inverse-danger" (click)=open(listRate.id,listRate.assetName) style=" cursor: pointer; margin-top: -15px" data-toggle="modal" data-target="#exampleModal-3" *ngIf="updateCounter== 0 || listRate.id != code">
  605. <i class="mdi mdi-delete" ></i>
  606. </button>
  607. <i *ngIf="updateCounter== 1 && listRate.id == code" (click)="updateDetailCreditLost(listRate.id,i)" class="mdi mdi-checkbox-marked-circle-outline" style="color:green;cursor: pointer;margin-right:20px"></i>
  608. <i *ngIf="updateCounter== 1 && listRate.id == code" class="mdi mdi-minus-circle-outline" style="color:darkred;cursor: pointer" (click)="reverbUpdateData()"></i>
  609. </td>
  610. </tr>
  611. </tbody>
  612. </table>
  613. </div>
  614. <br>
  615. <pagination-controls *ngIf="id.length>0" class="my-pagination" style="font-family: Arial; margin-top: 20px"(pageChange)="p = $event" align="right">
  616. </pagination-controls>
  617. </form>
  618. </div>
  619. </div>
  620. </div>
  621. </div>
  622.  
  623.  
  624. <div class="modal fade" id="exampleModal-3" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel-3" aria-hidden="true">
  625. <div class="modal-dialog modal-sm" role="document">
  626. <div class="modal-content">
  627. <div class="modal-header">
  628. <h5 class="modal-title" id="exampleModalLabel-3">Delete Asset</h5>
  629. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  630. <span aria-hidden="true">&times;</span>
  631. </button>
  632. </div>
  633. <div class="modal-body">
  634. <p>Are you sure want to delete asset: {{deletename}} ?</p>
  635. </div>
  636. <div class="modal-footer">
  637. <button type="button" class="btn btn-danger" (click)="deleteCalculation(deletecalc)" data-dismiss="modal">Delete</button>
  638. <button type="button" class="btn btn-light" data-dismiss="modal">Cancel</button>
  639. </div>
  640. </div>
  641. </div>
  642. </div>
  643.  
  644. <div class="modal fade" id="exampleModal-8" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel-8" aria-hidden="true">
  645. <div class="modal-dialog modal-sm" role="document">
  646. <div class="modal-content">
  647. <div class="modal-header">
  648. <h5 class="modal-title" id="exampleModalLabel-5">Upload Data</h5>
  649. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  650. <span aria-hidden="true">&times;</span>
  651. </button>
  652. </div>
  653. <div class="modal-body">
  654. <p> Please download the latest excel format before upload the new one.<br>
  655. <a download="creditLoss" target="_blank" href="{{baseURL}}assets/CREDIT_LOSS.xlsx">
  656. Click here to download excel
  657. </a>
  658. <!-- You can download it<a (click)="downloadCsv()" style="cursor: pointer; color: rgb(65, 170, 214); text-decoration: underline"> here</a> -->
  659. </p>
  660. <form [formGroup]="uploadFileForm">
  661. <label style="font-size:14px">File Upload</label>
  662. <input style="padding-top:8px" type="file" accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" class="form-control" formControlName="uploadFile" id="uploadFile" (change)="onchangeUpload($event)" name="uploadFile" placeholder="uploadFile">
  663. </form>
  664. </div>
  665. <div class="modal-footer">
  666. <button type="submit" class="btn btn-success" data-dismiss="modal" (click)="uploadFileToActivity()">Submit</button>
  667. <button type="button" class="btn btn-light" data-dismiss="modal">Cancel</button>
  668. </div>
  669. </div>
  670. </div>
  671. </div>
  672.  
  673.  
  674.  
  675. <!-- MODAL FOR ADD NEW ASSET -->
  676.  
  677. <div class="modal fade" id="exampleModal-6" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel-6" aria-hidden="true" >
  678. <div class="modal-dialog modal-lg" >
  679. <div class="modal-content" style="min-width: 500px;">
  680. <div class="modal-header">
  681. <h5 class="modal-title" id="exampleModalLabel-6">Add New Asset</h5>
  682. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  683. <span aria-hidden="true">&times;</span>
  684. </button>
  685. </div>
  686.  
  687. <!-- form start -->
  688.  
  689. <div class="modal-body">
  690. <div class="card-body">
  691. <form class="forms-sample" [formGroup]="editCalcForm">
  692.  
  693. <div class="form-row">
  694.  
  695. <div class="col-md-3 col-lg-3 col-sm-3">
  696. <label style="font-size: 11px">Type</label>
  697. <!-- <input type="text" class="form-control" style="width: 95%" formControlName="type" id="type" name="type" placeholder="Type" > -->
  698. <select class="form-control" style="max-width: 95%;" formControlName="type" id="type" name="type" (change)="getCodeType($event.target.value)">
  699. <option value="null">Select Type</option>
  700. <option *ngFor="let ct of typeFilter" [value]="ct">{{ct}}</option>
  701. </select>
  702. <span style="font-size:10px; color: #ed4a4a; " *ngIf="(editCalcForm.controls.type.invalid && editCalcForm.controls.type.touched) || (editCalcForm.controls.type.value=='' && editCalcForm.controls.type.touched)">Type cannot be empty</span>
  703. </div>
  704.  
  705. <div class="col-md-3 col-lg-3 col-sm-3">
  706. <label style="font-size: 11px">Code Type</label>
  707. <!-- <input type="text" class="form-control" style="width: 95%" formControlName="codeType" id="codeType" name="codeType" placeholder="Code Type" > -->
  708. <select class="form-control" style="max-width: 95%;" formControlName="codeType" id="codeType" name="codeType">
  709. <option value="null">Select Code Type</option>
  710. <option *ngFor="let ct of codeTypeFil" [value]="ct.assetCode">{{ct.assetCode}}</option>
  711. </select>
  712. <span style="font-size:10px; color: #ed4a4a; " *ngIf="(editCalcForm.controls.codeType.invalid && editCalcForm.controls.codeType.touched) || editCalcForm.controls.codeType.value =='null' && editCalcForm.controls.codeType.touched ">Code Type cannot be empty</span>
  713. </div>
  714.  
  715. <div class="col-md-3 col-lg-3 col-sm-3">
  716. <label style="font-size: 11px">Asset Type</label>
  717. <select formControlName="assetTypeF" style="max-width: 95%" class="form-control" id="assetTypeF" name="assetTypeF" >
  718. <option value="null">Select Asset Type</option>
  719. <option value="AC">AC</option>
  720. <option value="FVOCI">FVOCI</option>
  721. <option value="FVPL">FVPL</option>
  722. <!-- <option *ngFor="let Nrating of listRatingName; let i = index" [value]="Nrating">{{Nrating}}</option> -->
  723. </select>
  724. <!-- <input type="text" class="form-control" style="width: 95%" formControlName="assetTypeF" id="assetTypeF" name="assetTypeF" placeholder="Asset Type" > -->
  725. <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.assetTypeF.invalid && editCalcForm.controls.assetTypeF.touched">Asset Type cannot be empty </span>
  726. </div>
  727.  
  728. <div class="col-md-3 col-lg-3 col-sm-3">
  729. <label style="font-size: 11px">Rekening</label>
  730. <input type="text" class="form-control" style="width: 95%" formControlName="rekening" id="rekening" name="rekening" placeholder="Rekening" >
  731. <span style="font-size:10px; color: #ed4a4a; " *ngIf="editCalcForm.controls.rekening.invalid && editCalcForm.controls.rekening.touched">Rekening cannot be empty</span>
  732. </div>
  733.  
  734. <!-- <div class="col-md-3 col-lg-3 col-sm-3">
  735. <label style="font-size: 11px">Name</label>
  736. <input type="text" class="form-control" style="width: 95%" formControlName="name" id="name" name="name" placeholder="Name" >
  737. <span style="font-size:10px; color: #ed4a4a; " *ngIf="editCalcForm.controls.name.invalid && editCalcForm.controls.name.touched">Name cannot be empty</span>
  738. </div> -->
  739.  
  740.  
  741. </div>
  742.  
  743.  
  744. <div class="form-row">
  745.  
  746. <div class="col-md-3 col-lg-3 col-sm-3">
  747. <label style="font-size: 11px">Asset Name</label>
  748. <input type="text" class="form-control" style="width: 95%" formControlName="assetNameF" id="assetNameF" name="assetNameF" placeholder="Asset Name" >
  749. <span style="font-size:10px; color: #ed4a4a; " *ngIf="editCalcForm.controls.assetNameF.invalid && editCalcForm.controls.assetNameF.touched">Asset Name cannot be empty</span>
  750. </div>
  751.  
  752. <div class="col-md-3 col-lg-3 col-sm-3">
  753. <label style="font-size: 11px">Loan Type</label>
  754. <input type="text" class="form-control" style="width: 95%" formControlName="loanType" id="loanType" name="loanType" placeholder="Loan Type" >
  755. <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.loanType.invalid && editCalcForm.controls.loanType.touched">Loan Type cannot be empty </span>
  756. </div>
  757.  
  758. <div class="col-md-3 col-lg-3 col-sm-3">
  759. <label style="font-size: 11px">Lembaga</label>
  760. <select class="typeahead" formControlName="lembaga" style="max-width: 95%;" id="lembaga" name="lembaga" (change)="onChangeLembaga($event.target.value)">
  761. <option value="null">Select Lembaga</option>
  762. <option *ngFor="let lm of listLembaga">{{lm}}</option>
  763. </select>
  764.  
  765. <!-- <input type="text" class="form-control" style="width: 95%" formControlName="lembaga" id="lembaga" name="lembaga" placeholder="Lembaga" > -->
  766. <!-- <span style="font-size:10px; color: #ed4a4a; " *ngIf="editCalcForm.controls.lembaga.invalid && editCalcForm.controls.lembaga.touched">Lembaga cannot be empty</span> -->
  767. </div>
  768.  
  769.  
  770. <div class="col-md-3 col-lg-3 col-sm-3">
  771. <label style="font-size: 11px">Currency</label>
  772. <select class="typeahead" style="max-width: 95%;" formControlName="currency" id="currency" name="currency">
  773. <option value="null">Select Currency</option>
  774. <option *ngFor="let cr of listCurrencyDist">{{cr}}</option>
  775. </select>
  776. <!-- <input type="text" class="form-control" style="width: 95%" formControlName="currency" id="currency" name="currency" placeholder="Currency" > -->
  777. <span style="font-size:10px; color: #ed4a4a; " *ngIf="editCalcForm.controls.currency.invalid && editCalcForm.controls.currency.touched">Currency must be filled with 3 alphabet letter</span>
  778. </div>
  779.  
  780.  
  781.  
  782. </div>
  783.  
  784. <div class="form-row">
  785.  
  786. <div class="col-md-3 col-lg-3 col-sm-3">
  787. <label style="font-size: 11px">Rating</label>
  788. <select formControlName="ratingF" style="max-width: 95%" id="ratingF" name="ratingF" class="form-control" type="text" >
  789. <option value="null">Select Rating</option>
  790. <option *ngFor="let lrating of listRatingName" [value]="lrating">{{lrating}}</option>
  791. </select>
  792. <span style="font-size:10px; color: #ed4a4a;" *ngIf="(editCalcForm.controls.ratingF.invalid && editCalcForm.controls.ratingF.touched) || (editCalcForm.controls.ratingF.value=='null' && editCalcForm.controls.ratingF.touched) ">Rating cannot be empty</span>
  793. </div>
  794.  
  795. <div class="col-md-3 col-lg-3 col-sm-3">
  796. <label style="font-size: 11px">Buy Date</label>
  797. <div id="datepicker-popup1" class= "input-group date datepicker btn-block" style="max-width:95%">
  798. <input type="text" class="form-control" formControlName="buyDate" id="buyDate" name="buyDate" placeholder="Buy Date" >
  799. <span class="input-group-addon input-group-append border-left" style="text-align: center">
  800. <span class="mdi mdi-calendar input-group-text" style="padding:5px"></span>
  801.  
  802. </span>
  803. </div>
  804. <!-- <span span style="font-size:10px;color:#ed4a4a;" *ngIf="editCalcForm.controls.buyDate.invalid && editCalcForm.controls.buyDate.touched">Buy date cannot be empty</span> -->
  805.  
  806. </div>
  807.  
  808. <div class="col-md-3 col-lg-3 col-sm-3">
  809. <label style="font-size: 11px">Maturity Date</label>
  810. <div id="datepicker-popup2" class= "input-group date datepicker btn-block" style="max-width:95%">
  811. <input type="text" class="form-control" formControlName="maturityDate" id="maturityDate" name="maturityDate" placeholder="Maturity Date" >
  812. <span class="input-group-addon input-group-append border-left" style="text-align: center">
  813. <span class="mdi mdi-calendar input-group-text" style="padding:5px"></span>
  814. </span>
  815.  
  816. </div>
  817. <!-- <span span style="font-size:10px;color:#ed4a4a;" *ngIf="editCalcForm.controls.maturityDate.invalid && editCalcForm.controls.maturityDate.touched">Maturity date cannot be empty</span> -->
  818.  
  819. </div>
  820.  
  821. <div class="col-md-3 col-lg-3 col-sm-3">
  822. <label style="font-size: 11px">EIR Rate (%)</label>
  823. <input type="text" class="form-control" style="width: 95%" formControlName="eirRateF" id="eirRateF" name="eirRateF" placeholder="EIR Rate" >
  824. <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.eirRateF.invalid && editCalcForm.controls.eirRateF.touched">EIR Rate must be filled with numeric digits</span>
  825. </div>
  826.  
  827.  
  828.  
  829. <!-- <div class="col-md-3 col-lg-3 col-sm-3">
  830. <label style="font-size: 11px"> Calculate Type</label>
  831. <input type="text" class="form-control" style="width: 95%" formControlName="calculateType" id="kurs" name="calculateType" placeholder="Calculate Type" >
  832. <span style="font-size:10px; color: #ed4a4a; " *ngIf="editCalcForm.controls.calculateType.invalid && editCalcForm.controls.calculateType.touched">Calculate Type cannot be empty</span>
  833. </div> -->
  834.  
  835.  
  836.  
  837. </div>
  838.  
  839.  
  840.  
  841. <div class="form-row">
  842.  
  843. <div class="col-md-3 col-lg-3 col-sm-3">
  844. <label style="font-size: 11px">Nominal</label>
  845. <input type="text"class="form-control" style="width: 95%" formControlName="nominalF" id="nominalF" name="nominalF" placeholder="Nominal" [value]="nominalF" (change)="onChangeNominal($event.target.value)">
  846. <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.nominalF.invalid && editCalcForm.controls.nominalF.touched">Nominal must be filled with numeric digits</span>
  847. </div>
  848.  
  849. <div class="col-md-3 col-lg-3 col-sm-3">
  850. <label style="font-size: 11px">Kurs</label>
  851. <input type="text" class="form-control" style="width: 95%" formControlName="kurs" id="kurs" name="kurs" placeholder="Kurs" [value]="kurs" (change)="onChangeKurs($event.target.value)">
  852. <span style="font-size:10px; color: #ed4a4a; " *ngIf="editCalcForm.controls.kurs.invalid && editCalcForm.controls.kurs.touched">Kurs must be filled with numeric digits</span>
  853. </div>
  854.  
  855.  
  856. <div class="col-md-3 col-lg-3 col-sm-3">
  857. <label style="font-size: 11px">Nominal Equivalen</label>
  858. <input type="text" class="form-control" style="width: 95%" formControlName="nominalEqivalen" id="nominalEqivalen" name="nominalEqivalen" placeholder="Nominal Eqivalen">
  859. <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.nominalEqivalen.invalid && editCalcForm.controls.nominalEqivalen.touched">Nominal Equivalen must be filled with numeric digits</span>
  860. </div>
  861.  
  862. <div class="col-md-3 col-lg-3 col-sm-3">
  863. <label style="font-size: 11px">COA Debet</label>
  864. <input type="text" class="form-control" style="width: 95%" formControlName="coaDebet" id="coaDebet" name="coaDebet" placeholder="COA Debet" >
  865. <!-- <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.coaDebet.invalid && editCalcForm.controls.coaDebet.touched">COA Debet must be filled with numeric digits</span> -->
  866. </div>
  867.  
  868.  
  869.  
  870. <!-- <div class="col-md-3 col-lg-3 col-sm-3">
  871. <label style="font-size: 11px">Period</label>
  872. <input type="text" class="form-control" style="width: 95%" formControlName="period" id="period" name="period" placeholder="period" >
  873. <span style="font-size:10px; color: #ed4a4a; " *ngIf="editCalcForm.controls.period.invalid && editCalcForm.controls.period.touched">Period cannot be empty</span>
  874. </div> -->
  875.  
  876. <!-- <div class="col-md-3 col-lg-3 col-sm-3">
  877. <label style="font-size: 11px">Asset Type</label>
  878. <input type="text" class="form-control" style="width: 95%" formControlName="assetTypeF" id="assetTypeF" name="assetTypeF" placeholder="Asset Type" >
  879. <span style="font-size:10px; color: #ed4a4a; " *ngIf="editCalcForm.controls.assetTypeF.invalid && editCalcForm.controls.assetTypeF.touched">Asset Type cannot be empty</span>
  880. </div> -->
  881.  
  882. <!-- <div class="col-md-3 col-lg-3 col-sm-3">
  883. <label style="font-size: 11px">Rating LGD</label>
  884. <select formControlName="ratingLGD" style="min-width: 95%" id="ratingLGD" name="ratingLGD" class="btn btn-outline-dark dropdown-toggle" type="text" >
  885.  
  886. <option value="null">Select Rating LGD</option>
  887. <option *ngFor="let trating of listRatingNameLGD" [value]="trating">{{trating}}</option>
  888. </select>
  889. <span style="font-size:10px; color: #ed4a4a;" *ngIf="(editCalcForm.controls.ratingLGD.invalid && editCalcForm.controls.ratingLGD.touched) || (editCalcForm.controls.ratingLGD.value == 'null' && editCalcForm.controls.ratingLGD.touched)">Rating type cannot be empty</span>
  890. </div> -->
  891.  
  892.  
  893.  
  894.  
  895. </div>
  896.  
  897. <!-- <div class="form-row">
  898.  
  899.  
  900.  
  901.  
  902. </div> -->
  903.  
  904. <div class="form-row">
  905.  
  906. <div class="col-md-3 col-lg-3 col-sm-3">
  907. <label style="font-size: 11px">COA Kredit</label>
  908. <input type="text" class="form-control" style="width: 95%" formControlName="coaKredit" id="coaKredit" name="coaKredit" placeholder="COA Kredit">
  909. <!-- <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.coaKredit.invalid && editCalcForm.controls.coaKredit.touched">COA Kredit must be filled with numeric digits</span> -->
  910. </div>
  911.  
  912. <!-- <div class="col-md-3 col-lg-3 col-sm-3">
  913. <label style="font-size: 11px">Calculate Type</label>
  914. <select formControlName="calculateType" style="min-width: 100%" id="calculateType" name="calculateType" class="btn btn-outline-secondary dropdown-toggle" type="text" >
  915.  
  916. <option value="PD1YEAR">PD 1 YEAR</option>
  917. <option value="LIFETIME">LIFETIME</option>
  918. </select>
  919. <span style="font-size:10px; color: #ed4a4a;" *ngIf="editCalcForm.controls.calculateType.invalid && editCalcForm.controls.calculateType.touched">Rating type cannot be empty</span>
  920. </div> -->
  921. </div>
  922.  
  923. <br>
  924.  
  925. <div class="modal-footer">
  926. <button type="button" data-dismiss="modal" class="btn btn-success" (click)="goConfigCalculation()" type="submit">Add</button>
  927. <!-- insertDataModelForm.controls.detail.controls[i].controls.dataModelValue.invalid -->
  928. <button type="button" class="btn btn-danger" data-dismiss="modal">Cancel</button>
  929. </div>
  930. </form>
  931. </div>
  932. </div>
  933. <!-- form end -->
  934.  
  935. </div>
  936. </div>
  937. </div>
  938.  
  939. <!-- Modal -->
  940. <div class="modal fade" id="exampleModal-5" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel-5" aria-hidden="true" >
  941. <div class="modal-dialog" >
  942. <div class="modal-content" style="min-width: 500px;">
  943. <div class="modal-header">
  944. <h5 class="modal-title" id="exampleModalLabel-5">Login Approval</h5>
  945. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  946. <span aria-hidden="true">&times;</span>
  947. </button>
  948. </div>
  949. <form class="form-sample" [formGroup]="loginForm">
  950. <div class="modal-body">
  951. <div class="form-group">
  952. <label >Username</label>
  953. <input type="text" class="form-control" formControlName="username" id="dataModelValue" name="dataModelValue" placeholder="">
  954. </div>
  955. <div class="form-group">
  956. <label >Password</label>
  957. <input type="password" class="form-control" formControlName="password" id="dataModelValue" name="dataModelValue" placeholder="">
  958. </div>
  959. </div>
  960. <div class="modal-footer">
  961. <button type="button" data-dismiss="modal" class="btn btn-success" (click)="login()" type="submit">Submit</button>
  962. <!-- insertDataModelForm.controls.detail.controls[i].controls.dataModelValue.invalid -->
  963. <button type="button" class="btn btn-danger" (click)="close()" data-dismiss="modal">Cancel</button>
  964. </div>
  965. </form>
  966. </div>
  967. </div>
  968. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement