mirror of
https://github.com/valitydev/control-center.git
synced 2024-11-06 02:25:17 +00:00
Move payment adjustments module to section (#234)
This commit is contained in:
parent
5bbde6712b
commit
88681edb38
@ -26,11 +26,11 @@ import { DepositsModule } from './deposits/deposits.module';
|
||||
import { DomainModule } from './domain';
|
||||
import icons from './icons.json';
|
||||
import { NotFoundModule } from './not-found';
|
||||
import { PaymentAdjustmentModule } from './payment-adjustment/payment-adjustment.module';
|
||||
import { PayoutsModule } from './payouts/payouts.module';
|
||||
import { RepairingModule } from './repairing/repairing.module';
|
||||
import { OperationsModule } from './sections/operations/operations.module';
|
||||
import { PartyModule } from './sections/party/party.module';
|
||||
import { PaymentAdjustmentModule } from './sections/payment-adjustment/payment-adjustment.module';
|
||||
import { SearchClaimsModule } from './sections/search-claims/search-claims.module';
|
||||
import { SearchPartiesModule } from './sections/search-parties/search-parties.module';
|
||||
import { SettingsModule } from './settings';
|
||||
|
@ -3,7 +3,7 @@ import groupBy from 'lodash-es/groupBy';
|
||||
import { Observable, Subject, throwError } from 'rxjs';
|
||||
import { catchError, map, tap } from 'rxjs/internal/operators';
|
||||
|
||||
import { PaymentProcessingService } from '../../../thrift-services/damsel/payment-processing.service';
|
||||
import { PaymentProcessingService } from '../../../../thrift-services/damsel/payment-processing.service';
|
||||
import { ExecutorService } from '../executor.service';
|
||||
import { AdjustmentOperationEvent, EventType } from './adjustment-event';
|
||||
import { ExecResultGroup } from './exec-result-group';
|
@ -1,7 +1,7 @@
|
||||
import {
|
||||
InvoicePaymentAdjustmentParams,
|
||||
UserInfo,
|
||||
} from '../../../thrift-services/damsel/gen-model/payment_processing';
|
||||
} from '../../../../thrift-services/damsel/gen-model/payment_processing';
|
||||
|
||||
export interface PaymentAdjustmentCreationParams {
|
||||
user: UserInfo;
|
@ -3,7 +3,7 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import forEach from 'lodash-es/forEach';
|
||||
import groupBy from 'lodash-es/groupBy';
|
||||
|
||||
import { InvoicePaymentAdjustmentParams } from '../../../thrift-services/damsel/gen-model/payment_processing';
|
||||
import { InvoicePaymentAdjustmentParams } from '../../../../thrift-services/damsel/gen-model/payment_processing';
|
||||
import {
|
||||
AdjustmentOperationEvent,
|
||||
BatchPaymentAdjustmentService,
|
@ -5,12 +5,12 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { KeycloakService } from 'keycloak-angular';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { StatPayment } from '../../thrift-services/damsel/gen-model/merch_stat';
|
||||
import { StatPayment } from '../../../thrift-services/damsel/gen-model/merch_stat';
|
||||
import {
|
||||
InvoicePaymentAdjustmentParams,
|
||||
InvoicePaymentAdjustmentScenario,
|
||||
UserInfo,
|
||||
} from '../../thrift-services/damsel/gen-model/payment_processing';
|
||||
} from '../../../thrift-services/damsel/gen-model/payment_processing';
|
||||
import {
|
||||
BatchPaymentAdjustmentService,
|
||||
CancelAdjustmentService,
|
@ -1,16 +1,19 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
|
||||
import { StatPayment } from '../thrift-services/damsel/gen-model/merch_stat';
|
||||
import { StatPayment } from '../../thrift-services/damsel/gen-model/merch_stat';
|
||||
import { CreateAndCaptureComponent } from './create-and-capture/create-and-capture.component';
|
||||
import { PaymentAdjustmentService } from './payment-adjustment.service';
|
||||
import { SearchFormParams } from './search-form/search-form-params';
|
||||
|
||||
@UntilDestroy()
|
||||
@Component({
|
||||
selector: 'cc-payment-adjustment',
|
||||
templateUrl: './payment-adjustment.component.html',
|
||||
styleUrls: ['payment-adjustment.component.scss'],
|
||||
providers: [PaymentAdjustmentService],
|
||||
})
|
||||
export class PaymentAdjustmentComponent implements OnInit {
|
||||
isLoading = false;
|
||||
@ -30,7 +33,9 @@ export class PaymentAdjustmentComponent implements OnInit {
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.paymentAdjustmentService.searchPaymentChanges$.subscribe((payments) => {
|
||||
this.paymentAdjustmentService.searchPaymentChanges$
|
||||
.pipe(untilDestroyed(this))
|
||||
.subscribe((payments) => {
|
||||
this.payments = payments;
|
||||
});
|
||||
}
|
||||
@ -59,7 +64,10 @@ export class PaymentAdjustmentComponent implements OnInit {
|
||||
this.payments = [];
|
||||
this.selectedPayments = [];
|
||||
this.isLoading = true;
|
||||
this.paymentAdjustmentService.fetchPayments(this.searchParams).subscribe(
|
||||
this.paymentAdjustmentService
|
||||
.fetchPayments(this.searchParams)
|
||||
.pipe(untilDestroyed(this))
|
||||
.subscribe(
|
||||
() => {
|
||||
this.selectedPayments = [];
|
||||
this.isLoading = false;
|
@ -25,9 +25,9 @@ import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { ThriftPipesModule } from '@cc/app/shared/pipes';
|
||||
import { CardContainerModule } from '@cc/components/card-container/card-container.module';
|
||||
|
||||
import { DomainModule } from '../domain';
|
||||
import { PapiModule } from '../papi/papi.module';
|
||||
import { DamselModule } from '../thrift-services/damsel';
|
||||
import { DomainModule } from '../../domain';
|
||||
import { PapiModule } from '../../papi/papi.module';
|
||||
import { DamselModule } from '../../thrift-services/damsel';
|
||||
import { ActionItemComponent } from './create-and-capture/action-item/action-item.component';
|
||||
import { CancelActionsComponent } from './create-and-capture/cancel-actions/cancel-actions.component';
|
||||
import { CaptureActionsComponent } from './create-and-capture/capture-actions/capture-actions.component';
|
||||
@ -35,7 +35,6 @@ import { CreateActionsComponent } from './create-and-capture/create-actions/crea
|
||||
import { CreateAndCaptureComponent } from './create-and-capture/create-and-capture.component';
|
||||
import { PaymentAdjustmentRoutingModule } from './payment-adjustment-routing.module';
|
||||
import { PaymentAdjustmentComponent } from './payment-adjustment.component';
|
||||
import { PaymentAdjustmentService } from './payment-adjustment.service';
|
||||
import { SearchFormComponent } from './search-form/search-form.component';
|
||||
import { TableComponent } from './table/table.component';
|
||||
|
||||
@ -81,6 +80,5 @@ import { TableComponent } from './table/table.component';
|
||||
CaptureActionsComponent,
|
||||
],
|
||||
entryComponents: [CreateAndCaptureComponent],
|
||||
providers: [PaymentAdjustmentService],
|
||||
})
|
||||
export class PaymentAdjustmentModule {}
|
@ -2,10 +2,10 @@ import { Injectable } from '@angular/core';
|
||||
import { Observable, of, Subject } from 'rxjs';
|
||||
import { mergeMap, shareReplay } from 'rxjs/operators';
|
||||
|
||||
import { DomainService } from '../domain';
|
||||
import { QueryDSL } from '../query-dsl';
|
||||
import { StatPayment, StatResponse } from '../thrift-services/damsel/gen-model/merch_stat';
|
||||
import { MerchantStatisticsService } from '../thrift-services/damsel/merchant-statistics.service';
|
||||
import { DomainService } from '../../domain';
|
||||
import { QueryDSL } from '../../query-dsl';
|
||||
import { StatPayment, StatResponse } from '../../thrift-services/damsel/gen-model/merch_stat';
|
||||
import { MerchantStatisticsService } from '../../thrift-services/damsel/merchant-statistics.service';
|
||||
import { SearchFormParams } from './search-form/search-form-params';
|
||||
|
||||
@Injectable()
|
@ -14,7 +14,7 @@ import { MatTableDataSource } from '@angular/material/table';
|
||||
|
||||
import { i64ToNumber } from '@cc/utils/i64-to-number';
|
||||
|
||||
import { StatPayment } from '../../thrift-services/damsel/gen-model/merch_stat';
|
||||
import { StatPayment } from '../../../thrift-services/damsel/gen-model/merch_stat';
|
||||
|
||||
@Component({
|
||||
selector: 'cc-payment-adjustment-table',
|
Loading…
Reference in New Issue
Block a user