FE-892. Recurrent payer info (#260)

* recurrent payer info

* prettier
This commit is contained in:
Denis Ezhov 2019-07-23 19:03:38 +03:00 committed by GitHub
parent 005fcf422d
commit 5f10dc2c7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 1 deletions

View File

@ -1,3 +1,5 @@
export * from './payer';
export * from './customer-payer';
export * from './payment-resource-payer';
export * from './recurrent-payer';
export * from './payment-recurrent-parent';

View File

@ -0,0 +1,4 @@
export class PaymentRecurrentParent {
public invoiceID: string;
public paymentID: string;
}

View File

@ -0,0 +1,13 @@
import { Payer } from './payer';
import { ContactInfo } from 'koffing/backend';
import { PaymentRecurrentParent } from 'koffing/backend/model/payer/payment-recurrent-parent';
export class RecurrentPayer extends Payer {
public contactInfo: ContactInfo;
public paymentRecurrentParent: PaymentRecurrentParent;
constructor() {
super();
this.payerType = 'RecurrentPayer';
}
}

View File

@ -136,3 +136,23 @@ form.form-horizontal.form-label-left.css-form
label.col-sm-5 Статус плательщика:
.col-sm-7
div {{ customer?.status | kofCustomerStatus }}
div(*ngIf="payment.payer?.payerType === 'RecurrentPayer'")
.row
.col-xs-12
.form-group
label.col-sm-5 Email плательщика:
.col-sm-7
div {{ recurrentPayer?.contactInfo?.email }}
.row
.col-xs-12
.form-group
label.col-sm-5 ID родительского платежа:
.col-sm-7
div {{ recurrentPayer?.paymentRecurrentParent?.paymentID }}
.row
.col-xs-12
.form-group
label.col-sm-5 ID родительского инвойса:
.col-sm-7
div {{ recurrentPayer?.paymentRecurrentParent?.invoiceID }}

View File

@ -2,7 +2,14 @@ import { Component, Input, OnChanges } from '@angular/core';
import { get } from 'lodash';
import { CustomerService } from 'koffing/backend/customer.service';
import { PAYMENT_STATUS, Customer, CustomerPayer, PaymentError, Payment } from 'koffing/backend';
import {
PAYMENT_STATUS,
Customer,
CustomerPayer,
PaymentError,
Payment,
RecurrentPayer
} from 'koffing/backend';
import * as errors from './errors.json';
@Component({
@ -14,6 +21,7 @@ export class PaymentDetailsComponent implements OnChanges {
public payment: Payment;
public customer: Customer;
public recurrentPayer: RecurrentPayer;
constructor(private customerService: CustomerService) {}