### File

`modules/payments-component/src/paymets/payment-methods/bank-transfer/bank-transfer.component.ts`

### Metadata

selector | `bank-transfer`
styleUrls | `bank-transfer.component.scss`
templateUrl | `bank-transfer.component.html`

### Outputs

`formSaved` | `$event` type: `EventEmitter`

### Constructor

`constructor(fb: any)`

### Methods

nextStep
`nextStep()`
Returns: `void`

generateOrderNumber
`generateOrderNumber()`
Returns: `void`

### Properties

Public bankTransferForm
`bankTransferForm: `any` </bcode>`

Public details
`details: `string` </bcode>`
Default value: `Some details`

Private orderNumber
`orderNumber: `any` </bcode>`

Private uid
`uid: `any` </bcode>`

    import { FormGroup, FormBuilder } from '@angular/forms';
    import { Component, EventEmitter, Output, OnInit } from '@angular/core';
    @Component({
        selector: 'bank-transfer',
        templateUrl: './bank-transfer.component.html',
        styleUrls: ['bank-transfer.component.scss']
    })
    export class BankTransferComponent implements OnInit{
        public bankTransferForm: FormGroup;
        @Output() public formSaved = new EventEmitter();
        private uid;
        private orderNumber;
        public details = "Some details";
        constructor(private fb: FormBuilder){
        }

        ngOnInit() {
            //TODO
            this.uid = "something";
            let currDate = new Date();
            this.orderNumber = "" + this.uid + currDate.getTime();
            this.bankTransferForm = this.fb.group({
                paymentMethod: 'BANK_TRANSFER',
                deliveryRequired: true,
                orderNumber: this.orderNumber,
                details: this.details
            });
        }

        nextStep(){
            this.formSaved.next(this.bankTransferForm.value);
        }

        generateOrderNumber() {
            return this.orderNumber;
        }
    }

# results matching ""

# No results matching ""