Oscar José Nuñez Chávez преди 5 години
родител
ревизия
1f79338879
променени са 1 файла, в които са добавени 12 реда и са изтрити 6 реда
  1. 12 6
      src/app/components/investment-proposals/payment-info/payment-info.component.ts

+ 12 - 6
src/app/components/investment-proposals/payment-info/payment-info.component.ts

@@ -103,7 +103,17 @@ export class PaymentInfoComponent implements OnInit {
         this.generated_inputs_next = "";
         if (this.userListNext.length > 0) {
           for (let i = 0; i < this.userListNext.length; i++) {
-            this.generated_inputs_next += `<div class='form-check form-check-inline'><input type='checkbox' class='form-check-input' id='next-${this.userListNext[i]}' name='users' value='${this.userListNext[i]}'><label class='form-check-label' for='next-${this.userListNext[i]}'>${this.userListNext[i]}</label></div>`;
+            if (this.userListNext[i].checked_email == true) {
+              this.generated_inputs_next += `<div class='form-check form-check-inline'><input type='checkbox' class='form-check-input' id='next-${
+                this.userListNext[i].name
+              }' name='users' value='${this.userListNext[i].name}' checked='${
+                this.userListNext[i].default_email == "true" ? true : false
+              }'><label class='form-check-label' for='next-${
+                this.userListNext[i].name
+              }'>${this.userListNext[i].name}</label></div>`;
+            } else {
+              this.generated_inputs_next += `<div class='form-check form-check-inline'><input type='checkbox' class='form-check-input' id='next-${this.userListNext[i].name}' name='users' value='${this.userListNext[i].name}'><label class='form-check-label' for='next-${this.userListNext[i].name}'>${this.userListNext[i].name}</label></div>`;
+            }
           }
         }
       });
@@ -165,16 +175,12 @@ export class PaymentInfoComponent implements OnInit {
       .getBankAccounts("origen", this.investmentProposalID)
       .subscribe(res => {
         this.accounts_origin = res["result"];
-        console.log("origen");
-        console.log(this.accounts_origin);
       });
 
     this.catalogService
       .getBankAccounts("destino", this.investmentProposalID)
       .subscribe(res => {
         this.accounts_destination = res["result"];
-        console.log("destino");
-        console.log(this.accounts_destination);
       });
 
     this.catalogService.getPaymentTypes().subscribe(res => {
@@ -287,7 +293,7 @@ export class PaymentInfoComponent implements OnInit {
 
             for (let i = 0; i < this.userListNext.length; i++) {
               let html_input: HTMLInputElement = document.getElementById(
-                "next-" + this.userListNext[i]
+                "next-" + this.userListNext[i].name
               ) as HTMLInputElement;
               let html_value: string = html_input.value;
               if (html_input.checked == true) {