| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- import { Component, OnInit, Input } from "@angular/core";
- import { InstrumentComponent } from "@app/components/investment-proposals/instrument/instrument.component";
- import { FormBuilder, FormGroup, Validators } from "@angular/forms";
- import { IAngularMyDpOptions, IMyDateModel } from "angular-mydatepicker";
- import { formatDate, DatePipe } from "@angular/common";
- @Component({
- selector: "app-bonos",
- templateUrl: "./bonos.component.html"
- })
- export class BonosComponent implements InstrumentComponent {
- title: string = "Bonos";
- @Input() data: any;
- form: any;
- // For daterange
- daysLabels: any = {
- su: "Dom",
- mo: "Lun",
- tu: "Mar",
- we: "Mie",
- th: "Jue",
- fr: "Vie",
- sa: "Sab"
- };
- monthsLabels: any = {
- 1: "Ene",
- 2: "Feb",
- 3: "Mar",
- 4: "Abr",
- 5: "May",
- 6: "Jun",
- 7: "Jul",
- 8: "Ago",
- 9: "Sep",
- 10: "Oct",
- 11: "Nov",
- 12: "Dic"
- };
- investmentProposalForm: FormGroup;
- myDpOptions: IAngularMyDpOptions = {
- dateRange: false,
- dateFormat: "dd/mm/yyyy",
- dayLabels: this.daysLabels,
- monthLabels: this.monthsLabels
- };
- myDateInit: boolean = true;
- model: IMyDateModel = null;
- constructor(private formBuilder: FormBuilder) {
- console.log("init");
- this.investmentProposalForm = this.formBuilder.group({
- valor_nominal: ["", Validators.required],
- ytm_vencimiento: ["", Validators.required],
- precio_c_v: ["", Validators.required],
- precio_vencimiento: ["", Validators.required],
- fecha_liquidacion: ["", Validators.required],
- fecha_cupon: ["", Validators.required],
- fecha_vencimiento: ["", Validators.required],
- comision_casa: ["", Validators.required],
- comision_bolsa: ["", Validators.required],
- cupon: ["", Validators.required],
- costos_transferencia: ["", Validators.required]
- });
- }
- }
|