remove payout summary, add title for PaymentInstitutionAccount (#521)

This commit is contained in:
Denis Ezhov 2021-07-27 16:38:19 +03:00 committed by GitHub
parent 5e1beb46ae
commit 96f2982588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 6 additions and 47 deletions

View File

@ -1 +0,0 @@
export * from './payout-summary-info.component';

View File

@ -1,22 +0,0 @@
<div fxLayout="column" fxLayoutGap="20px" *transloco="let p; scope: 'payouts'; read: 'payouts.panel'">
<div class="mat-title" *transloco="let summaryTypes; scope: 'payouts'; read: 'payouts.panel.summaryTypes'">
{{ summaryTypes(summary.type) }}
</div>
<div gdColumns="1fr" gdColumns.gt-sm="1fr 1fr 1fr" gdGap="24px">
<dsh-details-item [title]="p('count')">
{{ summary?.count }}
</dsh-details-item>
<dsh-details-item [title]="p('amount')">
{{ summary?.amount | toMajor | currency: summary?.currency }}
</dsh-details-item>
<dsh-details-item [title]="p('fee')">
{{ summary?.fee | toMajor | currency: summary?.currency }}
</dsh-details-item>
<dsh-details-item [title]="p('firstConfirmationTime')">
{{ summary?.fromTime | date: 'd MMMM y, HH:mm:ss' }}
</dsh-details-item>
<dsh-details-item [title]="p('lastConfirmationTime')">
{{ summary?.toTime | date: 'd MMMM y, HH:mm:ss' }}
</dsh-details-item>
</div>
</div>

View File

@ -1,12 +0,0 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { PayoutSummaryItem } from '@dsh/api-codegen/anapi';
@Component({
selector: 'dsh-payout-summary-info',
templateUrl: 'payout-summary-info.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PayoutSummaryInfoComponent {
@Input() summary: PayoutSummaryItem;
}

View File

@ -1,10 +1,6 @@
<div fxLayout="column" fxLayoutGap="24px">
<dsh-payout-main-info [payout]="payout"></dsh-payout-main-info>
<mat-divider></mat-divider>
<ng-container *ngFor="let summary of payout.payoutSummary">
<dsh-payout-summary-info [summary]="summary"></dsh-payout-summary-info>
<mat-divider></mat-divider>
</ng-container>
<div class="dsh-title">{{ payout?.payoutToolDetails?.detailsType | payoutToolDetailsType }}</div>
<dsh-payout-tool-details [payoutToolDetails]="payout?.payoutToolDetails"></dsh-payout-tool-details>
<ng-container *ngIf="payout.payoutSummary.length">

View File

@ -14,7 +14,6 @@ import { LayoutModule } from '@dsh/components/layout';
import { CreatePayoutReportModule } from '../create-payout-report';
import { PayoutActionsComponent } from './payout-actions';
import { PayoutMainInfoComponent } from './payout-main-info';
import { PayoutSummaryInfoComponent } from './payout-summary-info';
import { PayoutsDetailsComponent } from './payouts-details.component';
@NgModule({
@ -33,12 +32,7 @@ import { PayoutsDetailsComponent } from './payouts-details.component';
PayoutToolDetailsModule,
ApiModelTypesModule,
],
declarations: [
PayoutsDetailsComponent,
PayoutActionsComponent,
PayoutMainInfoComponent,
PayoutSummaryInfoComponent,
],
declarations: [PayoutsDetailsComponent, PayoutActionsComponent, PayoutMainInfoComponent],
exports: [PayoutsDetailsComponent],
})
export class PayoutsDetailsModule {}

View File

@ -22,6 +22,9 @@ export class PayoutToolDetailsTypePipe implements PipeTransform {
case 'PayoutToolDetailsWalletInfo':
path = 'payoutToolDetailsWalletInfo';
break;
case 'PayoutToolDetailsPaymentInstitutionAccount':
path = 'payoutToolDetailsPaymentInstitutionAccount';
break;
}
return path ? this.transloco.translate(`apiModelTypes.payoutToolDetailsType.${path}`) : path;
}

View File

@ -3,6 +3,7 @@
"payoutToolDetailsBankAccount": "Банковский счет",
"payoutToolDetailsInternationalBankAccount": "Международный банковский счет",
"payoutToolDetailsBankCard": "Банковская карта",
"payoutToolDetailsWalletInfo": "Кошелек"
"payoutToolDetailsWalletInfo": "Кошелек",
"payoutToolDetailsPaymentInstitutionAccount": "Аккаунт платежной организации"
}
}