From 8e9b2de2422998bf2750a2f177dbce97d1f70c52 Mon Sep 17 00:00:00 2001 From: sriram-at-840620226347 Date: Thu, 17 Oct 2019 11:29:01 +0530 Subject: [PATCH] changes by suren --- .../components/payment/payment.component.html | 2 +- .../components/payment/payment.component.ts | 40 ++++++++++++------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/ng8-seed/src/app/components/payment/payment.component.html b/ng8-seed/src/app/components/payment/payment.component.html index 696b451..50cc0c0 100644 --- a/ng8-seed/src/app/components/payment/payment.component.html +++ b/ng8-seed/src/app/components/payment/payment.component.html @@ -48,7 +48,7 @@

₹ {{grand_tot_value}}


- + Online  Offline diff --git a/ng8-seed/src/app/components/payment/payment.component.ts b/ng8-seed/src/app/components/payment/payment.component.ts index d7016bd..66e867a 100644 --- a/ng8-seed/src/app/components/payment/payment.component.ts +++ b/ng8-seed/src/app/components/payment/payment.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; import { Router } from '@angular/router'; -import { FormBuilder, FormGroup } from '@angular/forms'; +import { FormBuilder, FormGroup, FormControl } from '@angular/forms'; import { ApiService } from 'app/shared/api.service'; @Component({ @@ -87,6 +87,14 @@ export class PaymentComponent implements OnInit { remarks:[''] }) } + this.offlineDetForm=this.fb.group({ + payment_type:[''], + payment_ref:[''], + check_date:[''], + check_branch_bank:[''], + check_deposit_mode:[''], + cheque_drop_address:[''] + }) // } } @@ -173,19 +181,23 @@ export class PaymentComponent implements OnInit { console.log("Error") }) } - changeType(value){ - console.log(value) - if(value.target.innerText == 'Offline'){ - this.offlineDetForm=this.fb.group({ - payment_type:[''], - payment_ref:[''], - check_date:[''], - check_branch_bank:[''], - check_deposit_mode:[''], - cheque_drop_address:[''] - }) - } + // changeType(value){ + // console.log(value) + // if(value.target.innerText == 'Offline'){ + // this.offlineDetForm.addControl('payment_type',new FormControl('')) + // this.offlineDetForm.addControl('payment_ref',new FormControl('')) + // this.offlineDetForm.addControl('check_date',new FormControl('')) + // this.offlineDetForm.addControl('check_branch_bank',new FormControl('')) + // this.offlineDetForm=this.fb.group({ + // payment_type:[''], + // payment_ref:[''], + // check_date:[''], + // check_branch_bank:[''], + // check_deposit_mode:[''], + // cheque_drop_address:[''] + // }) + // } - } + // } }