mirror of
https://github.com/valitydev/koffing.git
synced 2024-11-06 01:05:19 +00:00
refactor
This commit is contained in:
parent
f19d8f57b3
commit
eaa47eed5b
@ -1,4 +1,5 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
@ -23,7 +24,6 @@ import { PaymentRefundsComponent } from './payments/payment-refunds/payment-refu
|
||||
import { PaymentRefundDetailsComponent } from './payments/payment-refund-details/payment-refund-details.component';
|
||||
import { PaymentRefundsPipe } from './payments/payment-refunds/payment-refunds.pipe';
|
||||
import { PaymentToolDetailsTokenProviderPipe } from './payments/payment-details/payment-tool-details-token-provider.pipe';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -35,7 +35,7 @@ export class InvoiceService {
|
||||
|
||||
private searchInvoice(shopID: string, invoiceID: string) {
|
||||
const searchRetries = 20;
|
||||
this.invoiceSubject.next(undefined);
|
||||
this.invoiceSubject.next(null);
|
||||
this.searchService
|
||||
.searchInvoices(shopID, {
|
||||
fromTime: moment()
|
||||
|
@ -36,7 +36,7 @@ form.form-horizontal.form-label-left.css-form
|
||||
.form-group
|
||||
label.col-sm-5 RRN:
|
||||
.col-sm-7
|
||||
div {{payment.transactionInfo?.rrn}}
|
||||
div {{payment.transactionInfo.rrn}}
|
||||
.row(*ngIf="payment.error")
|
||||
.col-xs-12
|
||||
.form-group
|
||||
@ -50,13 +50,13 @@ form.form-horizontal.form-label-left.css-form
|
||||
.form-group
|
||||
label.col-sm-5 Удержан до:
|
||||
.col-sm-7
|
||||
div {{flowHold?.heldUntil | date: "dd.MM.yyyy HH:mm:ss"}}
|
||||
div {{flowHold.heldUntil | date: "dd.MM.yyyy HH:mm:ss"}}
|
||||
.row
|
||||
.col-xs-12
|
||||
.form-group
|
||||
label.col-sm-5 По истечению срока удержания:
|
||||
.col-sm-7
|
||||
div {{flowHold?.onHoldExpiration | kofOnHoldExpiration}}
|
||||
div {{flowHold.onHoldExpiration | kofOnHoldExpiration}}
|
||||
|
||||
.col-xs-12.col-sm-6
|
||||
div(*ngIf="paymentResourcePayer")
|
||||
@ -65,27 +65,27 @@ form.form-horizontal.form-label-left.css-form
|
||||
.form-group
|
||||
label.col-sm-5 Email плательщика:
|
||||
.col-sm-7
|
||||
div {{paymentResourcePayer?.contactInfo?.email}}
|
||||
div {{paymentResourcePayer.contactInfo?.email}}
|
||||
.row
|
||||
.col-xs-12
|
||||
.form-group
|
||||
label.col-sm-5 Fingerprint:
|
||||
.col-sm-7
|
||||
div {{paymentResourcePayer?.clientInfo?.fingerprint}}
|
||||
div {{paymentResourcePayer.clientInfo?.fingerprint}}
|
||||
.row
|
||||
.col-xs-12
|
||||
.form-group
|
||||
label.col-sm-5 IP-адрес плательщика:
|
||||
.col-sm-7
|
||||
div {{paymentResourcePayer?.clientInfo?.ip}}
|
||||
div {{paymentResourcePayer.clientInfo?.ip}}
|
||||
.row
|
||||
.col-xs-12
|
||||
.form-group
|
||||
label.col-sm-5 Метод оплаты:
|
||||
.col-sm-7
|
||||
div
|
||||
| {{paymentResourcePayer?.paymentToolDetails?.detailsType | kofPaymentToolDetailsType}}
|
||||
span(*ngIf="bankCard && bankCard?.tokenProvider") ({{bankCard.tokenProvider | kofPaymentToolDetailsTokenProvider}})
|
||||
| {{paymentResourcePayer.paymentToolDetails?.detailsType | kofPaymentToolDetailsType}}
|
||||
span(*ngIf="bankCard && bankCard.tokenProvider") ({{bankCard.tokenProvider | kofPaymentToolDetailsTokenProvider}})
|
||||
|
||||
.row
|
||||
.col-xs-12(*ngIf="payment.shortID")
|
||||
@ -100,7 +100,7 @@ form.form-horizontal.form-label-left.css-form
|
||||
.form-group
|
||||
label.col-sm-5 ID плательщика:
|
||||
.col-sm-7
|
||||
div {{ customerPayer?.customerID }}
|
||||
div {{ customerPayer.customerID }}
|
||||
.row
|
||||
.col-xs-12
|
||||
.form-group
|
||||
@ -115,24 +115,24 @@ form.form-horizontal.form-label-left.css-form
|
||||
div {{ customer?.status | kofCustomerStatus }}
|
||||
|
||||
div(*ngIf="recurrentPayer")
|
||||
.row(*ngIf="recurrentPayer?.contactInfo?.email")
|
||||
.row(*ngIf="recurrentPayer.contactInfo?.email")
|
||||
.col-xs-12
|
||||
.form-group
|
||||
label.col-sm-5 Email плательщика:
|
||||
.col-sm-7
|
||||
div {{ recurrentPayer?.contactInfo?.email }}
|
||||
.row(*ngIf="recurrentPayer?.recurrentParentPayment?.paymentID")
|
||||
div {{ recurrentPayer.contactInfo.email }}
|
||||
.row(*ngIf="recurrentPayer.recurrentParentPayment?.paymentID")
|
||||
.col-xs-12
|
||||
.form-group
|
||||
label.col-sm-5 ID родительского платежа:
|
||||
.col-sm-7
|
||||
div {{ recurrentPayer?.recurrentParentPayment?.paymentID }}
|
||||
.row(*ngIf="recurrentPayer?.recurrentParentPayment?.invoiceID")
|
||||
div {{ recurrentPayer.recurrentParentPayment.paymentID }}
|
||||
.row(*ngIf="recurrentPayer.recurrentParentPayment?.invoiceID")
|
||||
.col-xs-12
|
||||
.form-group
|
||||
label.col-sm-5 ID родительского инвойса:
|
||||
.col-sm-7
|
||||
a([routerLink]="[getRecurrentParentInvoiceLink()]") {{ recurrentPayer?.recurrentParentPayment?.invoiceID }}
|
||||
a([routerLink]="[getRecurrentParentInvoiceLink()]") {{ recurrentPayer.recurrentParentPayment.invoiceID }}
|
||||
|
||||
div(*ngIf="bankCard")
|
||||
.row
|
||||
@ -140,23 +140,23 @@ form.form-horizontal.form-label-left.css-form
|
||||
.form-group
|
||||
label.col-sm-5 Данные карты:
|
||||
.col-sm-7
|
||||
div {{ bankCard?.cardNumberMask }} ({{ bankCard?.paymentSystem }})
|
||||
div {{ bankCard.cardNumberMask }} ({{ bankCard.paymentSystem }})
|
||||
div(*ngIf="digitalWallet")
|
||||
.row
|
||||
.col-xs-12
|
||||
.form-group
|
||||
label.col-sm-5 Провайдер:
|
||||
.col-sm-7
|
||||
div {{digitalWallet?.digitalWalletDetailsType | kofProviderName}}
|
||||
div {{digitalWallet.digitalWalletDetailsType | kofProviderName}}
|
||||
.col-xs-12
|
||||
.form-group
|
||||
label.col-sm-5 Данные кошелька:
|
||||
.col-sm-7
|
||||
div {{digitalWallet?.phoneNumberMask}}
|
||||
div {{digitalWallet.phoneNumberMask}}
|
||||
div(*ngIf="terminal")
|
||||
.row
|
||||
.col-xs-12
|
||||
.form-group
|
||||
label.col-sm-5 Провайдер:
|
||||
.col-sm-7
|
||||
div {{terminal?.provider | kofProviderName}}
|
||||
div {{terminal.provider | kofProviderName}}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnChanges, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { get } from 'lodash';
|
||||
|
||||
import { CustomerService } from 'koffing/backend/customer.service';
|
||||
@ -17,7 +17,6 @@ import {
|
||||
} from 'koffing/backend';
|
||||
import * as errors from './errors.json';
|
||||
import { DigitalWalletDetailsQIWI } from 'koffing/backend/model/payment-tool-details/digital-wallet-details-qiwi';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'kof-payment-details',
|
||||
@ -94,12 +93,9 @@ export class PaymentDetailsComponent implements OnChanges {
|
||||
}
|
||||
|
||||
public getRecurrentParentInvoiceLink(): string {
|
||||
return (
|
||||
'/shop/' +
|
||||
this.payment.shopID +
|
||||
'/invoice/' +
|
||||
return `/shop/${this.payment.shopID}/invoice/${
|
||||
this.recurrentPayer.recurrentParentPayment.invoiceID
|
||||
);
|
||||
}`;
|
||||
}
|
||||
|
||||
public getLabelClass(status: string) {
|
||||
|
@ -24,7 +24,7 @@ export class PaymentsService {
|
||||
if (invoiceID !== this.currentInvoiceID) {
|
||||
this.currentInvoiceID = invoiceID;
|
||||
this.payments = [];
|
||||
this.continuationToken = undefined;
|
||||
this.continuationToken = null;
|
||||
}
|
||||
const request = this.toSearchParams(invoiceID, this.limit, this.continuationToken);
|
||||
return this.searchService
|
||||
|
Loading…
Reference in New Issue
Block a user