Ver código fonte

Ajustes en detalle de propuestas, historico e instrumento de deposito a plazo

Oscar José Nuñez Chávez 5 anos atrás
pai
commit
925e3eb27a

+ 3 - 2
src/app/components/instruments/dap/dap.component.ts

@@ -145,7 +145,7 @@ export class DAP implements InstrumentComponent {
 
       numero_certificado: [
         this.instrument_exists ? "" : this.instrument_work.numero_certificado,
-        [Validators.required]
+        []
       ],
 
       fecha_vencimiento: [
@@ -253,7 +253,8 @@ export class DAP implements InstrumentComponent {
             rendimiento_neto: this.rendimiento_neto,
             fecha_inicio_vigencia: this.fecha_inicio_vigencia,
             renta: this.renta,
-            numero_certificado: this.numero_certificado,
+            numero_certificado: this.investmentProposalForm.value
+              .numero_certificado,
             proyecciones: this.proyecciones,
 
             fecha_operacion: this.investmentProposalForm.value.fecha_operacion

+ 2 - 2
src/app/components/investment-proposals/approve/approve.component.ts

@@ -188,8 +188,8 @@ export class InvestmentProposalApproveComponent implements OnInit {
           if (this.general != undefined) {
             this.subject = this.general.asunto;
             this.investmentName = this.general.name;
-            this.comment = this.complement.comment;
-            this.justification = this.complement.comment;
+            this.comment = this.complement.comentarios;
+            this.justification = this.complement.justificacion;
 
             this.catalogService.getFinancialEntities().subscribe(res => {
               this.financials = res.find(

+ 9 - 5
src/app/components/investment-proposals/change-history/change-history.component.html

@@ -55,11 +55,15 @@
                               {{ item.created_date }}
                             </div>
                           </h6>
-                          <p class="mt-10">
-                            Estado inicial: {{ item.estado_inicial }}
-                          </p>
-                          <p class="mt-10">
-                            Estado final: {{ item.estado_final }}
+                          <p class="mt-10">Estado: {{ item.estado_final }}</p>
+                          <p>Comentario: {{ item.comentario }}</p>
+                          <p *ngIf="item.evidencia != null">
+                            Archivo
+                            <a
+                              [href]="fileDownload + item.evidencia"
+                              target="_blank"
+                              >Descargar archivo</a
+                            >
                           </p>
                         </div>
                       </div>

+ 4 - 1
src/app/components/investment-proposals/change-history/change-history.component.ts

@@ -14,6 +14,7 @@ import { InstrumentDirective } from "../instrument/instrument.directive";
 import { InstrumentComponent } from "../instrument/instrument.component";
 import { InstrumentsService } from "@app/services/instruments.service";
 import { InvestmentsService } from "@app/services/investments.service";
+import { environment } from "@environments/environment";
 
 @Component({
   selector: "app-investment-proposal-changes",
@@ -26,10 +27,10 @@ export class ChangeHistoryComponent implements OnInit {
   @Input() formData: InvestmentProposalForm;
   @ViewChild(InstrumentDirective, { static: true })
   adHost: InstrumentDirective;
-
   investmentProposalID: string;
   logs: any;
   investmentCode: any;
+  fileDownload: string;
 
   constructor(
     private router: Router,
@@ -53,7 +54,9 @@ export class ChangeHistoryComponent implements OnInit {
       .getProposalInvestment(this.investmentProposalID)
       .subscribe(
         res => {
+          this.fileDownload = environment.productionApiUrl;
           this.investmentCode = res["result"]["codigo_inversion"];
+          console.log(this.fileDownload);
         },
         err => {}
       );

+ 2 - 4
src/app/components/investment-proposals/proposal-detail/proposal-detail.component.html

@@ -238,11 +238,9 @@
                                     </div>
                                   </h6>
                                   <p class="mt-10">
-                                    Estado inicial: {{ item.estado_inicial }}
-                                  </p>
-                                  <p class="mt-10">
-                                    Estado final: {{ item.estado_final }}
+                                    Estado: {{ item.estado_final }}
                                   </p>
+                                  <p>Comentario: {{ item.comentario }}</p>
                                 </div>
                               </div>
                               <div class="divider mt-15"></div>

+ 2 - 3
src/app/components/investment-proposals/proposal-detail/proposal-detail.component.ts

@@ -184,7 +184,6 @@ export class InvestmentProposalDetailComponent implements OnInit {
           this.instrument = this.formDataService.getWork();
           this.complement = this.formDataService.getComplementInfo();
           this.formData = this.formDataService.getFormData();
-
           this.formData.instrumentos;
 
           this.indexDynamicComponent = this.ads.findIndex(
@@ -198,8 +197,8 @@ export class InvestmentProposalDetailComponent implements OnInit {
           if (this.general != undefined) {
             this.subject = this.general.asunto;
             this.investmentName = this.general.name;
-            this.comment = this.complement.comment;
-            this.justification = this.complement.comment;
+            this.comment = this.complement.comentarios;
+            this.justification = this.complement.justificacion;
 
             this.catalogService.getFinancialEntities().subscribe(res => {
               this.financials = res.find(

+ 3 - 3
src/app/components/investment-proposals/result/result.component.ts

@@ -118,7 +118,7 @@ export class ResultComponent implements OnInit {
     this.general = this.formDataService.getGeneralInfo();
     this.instrument = this.formDataService.getWork();
     this.complement = this.formDataService.getComplementInfo();
-
+    console.log(this.instrument);
     this.catalogService.getFinancialEntities().subscribe(res => {
       this.financials = res.find(
         e => e.id_entidad_financiera == this.general.casa
@@ -458,7 +458,7 @@ export class ResultComponent implements OnInit {
   // Verifica permisos para mostrar boton de edicion y/o envio a revision,
   // segun los permisos del usuario y el estado de la propuesta
   can_send_to_review(status: string) {
-    if (status == "NUEVA" && (this.userRole.length == 0 || this.userRole)) {
+    if (status == "NUEVA" || status == "RECHA") {
       // TO DO ver que el codigo de los tipos de usuario
       return true;
     } else {
@@ -467,7 +467,7 @@ export class ResultComponent implements OnInit {
   }
 
   can_finish_proposal(status: string) {
-    if (status == "LIQUI" && (this.userRole.length == 0 || this.userRole)) {
+    if (status == "LIQUI") {
       // TO DO ver que el codigo de los tipos de usuario
       return true;
     } else {

+ 3 - 2
src/app/components/investment-proposals/review/review.component.ts

@@ -188,8 +188,9 @@ export class InvestmentProposalReviewComponent implements OnInit {
           if (this.general != undefined) {
             this.subject = this.general.asunto;
             this.investmentName = this.general.name;
-            this.comment = this.complement.comment;
-            this.justification = this.complement.comment;
+            console.log(this.complement);
+            this.comment = this.complement.comentarios;
+            this.justification = this.complement.justificacion;
 
             this.catalogService.getFinancialEntities().subscribe(res => {
               this.financials = res.find(