TD-808: Prepare for Angular 17 (#287)

This commit is contained in:
Rinat Arsaev 2023-11-15 17:34:40 +07:00 committed by GitHub
parent 3cb6b7d2f3
commit 6ed90e1cec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
175 changed files with 624 additions and 6462 deletions

View File

@ -35,7 +35,6 @@
"styles": ["src/app/styles/styles.scss"],
"scripts": [],
"allowedCommonJsDependencies": [
"moment",
"uuid",
"short-uuid",
"js-sha256",

View File

@ -2,5 +2,5 @@
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"import": "node_modules/@vality/cspell-config/cspell.config.js",
"words": ["nspkmir", "applepay", "samsungpay", "googlepay", "submain", "papaparse"]
"words": ["submain", "papaparse"]
}

5144
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -21,10 +21,8 @@
"@angular/common": "16.1.1",
"@angular/compiler": "16.1.1",
"@angular/core": "16.1.1",
"@angular/flex-layout": "15.0.0-beta.42",
"@angular/forms": "16.1.1",
"@angular/material": "16.1.1",
"@angular/material-moment-adapter": "16.1.1",
"@angular/platform-browser": "16.1.1",
"@angular/platform-browser-dynamic": "16.1.1",
"@angular/platform-server": "16.1.1",
@ -36,20 +34,17 @@
"@vality/domain-proto": "2.0.1-45b0719.0",
"@vality/fistful-proto": "2.0.1-3b9a0a7.0",
"@vality/magista-proto": "2.0.2-4383410.0",
"@vality/ng-core": "16.2.1-pr-40-0cd076b.0",
"@vality/ng-core": "16.2.1-pr-49-6a1a300.0",
"@vality/payout-manager-proto": "2.0.1-eb4091a.0",
"@vality/repairer-proto": "2.0.2-07b73e9.0",
"@vality/thrift-ts": "2.4.1-8ad5123.0",
"@vality/woody": "0.1.1",
"coerce-property": "15.0.1",
"@vality/woody": "0.1.3",
"css-element-queries": "1.2.3",
"date-fns": "2.30.0",
"humanize-duration": "3.21.0",
"inputmask": "5.0.7",
"keycloak-angular": "14.0.0",
"keycloak-js": "18.0.1",
"lodash-es": "4.17.21",
"moment": "2.29.4",
"monaco-editor": "0.21.2",
"papaparse": "5.4.1",
"rxjs": "7.8.1",
@ -66,7 +61,6 @@
"@angular/cli": "16.1.0",
"@angular/compiler-cli": "16.1.1",
"@types/element-resize-detector": "1.1.3",
"@types/humanize-duration": "3.18.0",
"@types/inputmask": "5.0.3",
"@types/jasmine": "4.0.3",
"@types/jwt-decode": "2.2.1",

View File

@ -3,23 +3,19 @@ import localeRu from '@angular/common/locales/ru';
import { LOCALE_ID, NgModule, Injector } from '@angular/core';
import { MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER } from '@angular/material/autocomplete';
import { MatButtonModule } from '@angular/material/button';
import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
import { MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatIconModule, MatIconRegistry } from '@angular/material/icon';
import { MatListModule } from '@angular/material/list';
import { MatMenuModule } from '@angular/material/menu';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MAT_MOMENT_DATE_ADAPTER_OPTIONS } from '@angular/material-moment-adapter';
import { BrowserModule, DomSanitizer } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { InputMaskModule } from '@ngneat/input-mask';
import { QUERY_PARAMS_SERIALIZERS } from '@vality/ng-core';
import * as moment from 'moment';
import 'moment/locale/ru';
import { KeycloakTokenInfoModule, MomentUtcDateAdapter } from '@cc/app/shared/services';
import { KeycloakTokenInfoModule } from '@cc/app/shared/services';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@ -43,11 +39,6 @@ import {
registerLocaleData(localeRu);
/**
* For use in specific locations (for example, questionary PDF document)
*/
moment.locale('en-GB');
// Do not use in code! Only for extending windows methods
/* eslint-disable @typescript-eslint/naming-convention */
/** @internal */
@ -79,9 +70,7 @@ export let AppInjector: Injector;
InputMaskModule,
],
providers: [
{ provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: { useUtc: true } },
{ provide: MAT_DATE_FORMATS, useValue: DEFAULT_MAT_DATE_FORMATS },
{ provide: DateAdapter, useClass: MomentUtcDateAdapter, deps: [MAT_DATE_LOCALE] },
{ provide: MAT_DATE_LOCALE, useValue: 'en-GB' },
{ provide: LOCALE_ID, useValue: 'ru' },
{ provide: SMALL_SEARCH_LIMIT, useValue: DEFAULT_SMALL_SEARCH_LIMIT },

View File

@ -1 +1 @@
["apple_pay", "google_pay", "mastercard", "mir", "samsung_pay", "visa"]
[]

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCheckboxModule } from '@angular/material/checkbox';
@ -30,14 +29,12 @@ import { DomainThriftFormComponent } from '../../shared/components/thrift-api-cr
import { ChargebacksRoutingModule } from './chargebacks-routing.module';
import { ChargebacksComponent } from './chargebacks.component';
import { ChargebacksTableComponent } from './components/chargebacks-table/chargebacks-table.component';
import { CreateChargebackDialogComponent } from './components/create-chargeback-dialog/create-chargeback-dialog.component';
import { CreateChargebacksByFileDialogComponent } from './components/create-chargebacks-by-file-dialog/create-chargebacks-by-file-dialog.component';
@NgModule({
declarations: [
ChargebacksComponent,
ChargebacksTableComponent,
CreateChargebackDialogComponent,
CreateChargebacksByFileDialogComponent,
],
imports: [
@ -62,7 +59,6 @@ import { CreateChargebacksByFileDialogComponent } from './components/create-char
MatButtonModule,
DialogModule,
DomainThriftFormComponent,
FlexModule,
FileUploadModule,
MatExpansionModule,
MatInputModule,

View File

@ -1,23 +0,0 @@
<v-dialog title="Create chargeback">
<div fxLayout="column" fxLayoutGap="16px">
<v-input-field [formControl]="invoiceControl" label="Invoice Id" required></v-input-field>
<v-input-field [formControl]="paymentControl" label="Payment Id" required></v-input-field>
<cc-domain-thrift-form
[extensions]="extensions$ | async"
[formControl]="form"
namespace="payment_processing"
type="InvoicePaymentChargebackParams"
></cc-domain-thrift-form>
</div>
<v-dialog-actions>
<button
[disabled]="form.invalid || paymentControl.invalid || invoiceControl.invalid"
color="primary"
mat-raised-button
(click)="create()"
>
Create
</button>
</v-dialog-actions>
</v-dialog>

View File

@ -1,52 +0,0 @@
import { Component, Injector } from '@angular/core';
import { FormControl } from '@angular/forms';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { InvoicePaymentChargebackParams } from '@vality/domain-proto/payment_processing';
import { StatChargeback } from '@vality/magista-proto/magista';
import { DialogSuperclass, NotifyLogService } from '@vality/ng-core';
import { of } from 'rxjs';
import * as short from 'short-uuid';
import { InvoicingService } from '@cc/app/api/payment-processing';
import { NotificationErrorService } from '@cc/app/shared/services/notification-error';
@UntilDestroy()
@Component({
selector: 'cc-create-chargeback-dialog',
templateUrl: './create-chargeback-dialog.component.html',
})
export class CreateChargebackDialogComponent extends DialogSuperclass<
CreateChargebackDialogComponent,
{ chargeback?: Pick<StatChargeback, 'invoice_id' | 'payment_id'> }
> {
form = new FormControl<Partial<InvoicePaymentChargebackParams>>({ id: short().generate() });
paymentControl = new FormControl(this.dialogData?.chargeback?.payment_id);
invoiceControl = new FormControl(this.dialogData?.chargeback?.invoice_id);
extensions$ = of([]);
constructor(
injector: Injector,
private invoicingService: InvoicingService,
private notificationErrorService: NotificationErrorService,
private log: NotifyLogService,
) {
super(injector);
}
create() {
this.invoicingService
.CreateChargeback(
this.invoiceControl.value,
this.paymentControl.value,
this.form.value as InvoicePaymentChargebackParams,
)
.pipe(untilDestroyed(this))
.subscribe({
next: () => {
this.log.success('Chargeback created');
this.closeWithSuccess();
},
error: this.notificationErrorService.error,
});
}
}

View File

@ -1,5 +1,5 @@
<v-dialog [progress]="progress$ | async" title="Create chargebacks">
<div fxLayout="column" fxLayoutGap="16px">
<div style="display: flex; flex-direction: column; gap: 16px">
<mat-checkbox [formControl]="hasHeaderControl">CSV with header</mat-checkbox>
<v-file-upload [extensions]="['csv']" (upload)="loadFile($event)"></v-file-upload>
@ -10,7 +10,9 @@
<mat-panel-title>Default format</mat-panel-title>
</mat-expansion-panel-header>
<div class="mat-body-1">
<code style="word-wrap: break-word">{{ defaultFormat }}</code>
<code style="word-wrap: break-word; word-break: break-word">{{
defaultFormat
}}</code>
</div>
<div class="mat-body-1">
Categories: fraud, dispute, authorisation, processing_error

View File

@ -21,9 +21,12 @@
}}</cc-status>
</cc-page-layout-actions>
<div *ngIf="claim$ | async as claim" gdColumns="1fr" gdGap="24px">
<div *ngIf="claim$ | async as claim" style="display: flex; flex-direction: column; gap: 24px">
<h2 class="mat-headline-5">Changeset</h2>
<div *ngIf="isLoading$ | async; else timeline" fxLayoutAlign="center">
<div
*ngIf="isLoading$ | async; else timeline"
style="display: flex; justify-content: center"
>
<mat-progress-spinner
color="primary"
diameter="128"
@ -95,7 +98,7 @@
</cc-timeline>
</ng-template>
<mat-card>
<mat-card-content fxLayout="row" fxLayoutGap="24px">
<mat-card-content style="display: flex; gap: 24px">
<button color="primary" mat-button (click)="addModification()">
Add modification
</button>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -15,7 +14,7 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatSelectModule } from '@angular/material/select';
import { RouterModule } from '@angular/router';
import { ActionsModule, DialogModule } from '@vality/ng-core';
import { ActionsModule, DialogModule, PipesModule } from '@vality/ng-core';
import { JsonViewerModule } from '@cc/app/shared/components/json-viewer/json-viewer.module';
import { StatusModule } from '@cc/app/shared/components/status';
@ -24,7 +23,6 @@ import { TimelineModule } from '@cc/components/timeline';
import { PageLayoutModule } from '../../shared';
import { MetadataFormModule } from '../../shared/components/metadata-form';
import { HumanizeDurationModule } from '../../shared/pipes/humanize-duration';
import { ClaimRoutingModule } from './claim-routing.module';
import { ClaimComponent } from './claim.component';
@ -52,7 +50,6 @@ import { TimelineItemLoadingComponent } from './components/timeline-item-loading
imports: [
CommonModule,
ClaimRoutingModule,
FlexLayoutModule,
RouterModule,
TimelineModule,
MatIconModule,
@ -74,8 +71,8 @@ import { TimelineItemLoadingComponent } from './components/timeline-item-loading
MatProgressBarModule,
DialogModule,
ActionsModule,
HumanizeDurationModule,
PageLayoutModule,
PipesModule,
],
})
export class ClaimModule {}

View File

@ -1,5 +1,5 @@
<v-dialog [progress]="inProgress$ | async" title="Change claim status">
<div [formGroup]="form" gdColumns="1fr" gdGap="16px">
<div [formGroup]="form" style="display: flex; flex-direction: column; gap: 16px">
<mat-form-field>
<mat-select
[disabled]="inProgress$ | async"

View File

@ -1,8 +1,7 @@
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Component, EventEmitter, Input, Output, booleanAttribute } from '@angular/core';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { Claim, ModificationUnit } from '@vality/domain-proto/claim_management';
import { DialogResponseStatus, DialogService, ConfirmDialogComponent } from '@vality/ng-core';
import { coerceBoolean } from 'coerce-property';
import isEmpty from 'lodash-es/isEmpty';
import { BehaviorSubject, switchMap, from } from 'rxjs';
import { filter, first } from 'rxjs/operators';
@ -28,8 +27,8 @@ export class ModificationUnitTimelineItemComponent {
@Input() claim: Claim;
@Input() modificationUnit: ModificationUnit;
@Input() @coerceBoolean isLoading: boolean = false;
@Input() @coerceBoolean isChangeable: boolean = false;
@Input({ transform: booleanAttribute }) isLoading: boolean = false;
@Input({ transform: booleanAttribute }) isChangeable: boolean = false;
@Input() title?: string;
@Input() icon?: string;
@Input() color?: StatusColor | Color;

View File

@ -3,7 +3,7 @@
{{ text }}
<span *ngIf="createdAt"
>at {{ createdAt | date: 'dd.MM.yyyy HH:mm:ss' }} ({{
createdAt | humanizedDuration: { largest: 1, hasAgoEnding: true }
createdAt | humanizedDuration: { hasAgoEnding: true }
}})</span
>
</span>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -18,7 +17,6 @@ import { ActionsModule, DialogModule, TableModule, FiltersModule } from '@vality
import { PageLayoutModule } from '@cc/app/shared/components';
import { MerchantFieldModule } from '@cc/app/shared/components/merchant-field';
import { ThriftPipesModule } from '@cc/app/shared/pipes';
import { EmptySearchResultModule } from '@cc/components/empty-search-result';
import { ClaimsComponentRouting } from './claims-routing.module';
import { ClaimsTableComponent } from './claims-table/claims-table.component';
@ -40,9 +38,7 @@ import { CreateClaimDialogComponent } from './components/create-claim-dialog/cre
MatSelectModule,
MatSnackBarModule,
ReactiveFormsModule,
FlexLayoutModule,
MatExpansionModule,
EmptySearchResultModule,
ThriftPipesModule,
ActionsModule,
DialogModule,

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatDialogModule } from '@angular/material/dialog';
@ -19,7 +18,6 @@ import { RevertsModule } from './reverts/reverts.module';
imports: [
CommonModule,
HeadlineModule,
FlexLayoutModule,
DepositDetailsRoutingModule,
MatCardModule,
DetailsItemModule,

View File

@ -1,32 +1,26 @@
<mat-card>
<mat-card-content fxLayout="column" fxLayoutGap="16px">
<div fxFlexFill fxLayout fxLayoutGap="16px">
<cc-details-item fxFlex="66" title="ID">{{ deposit.id }}</cc-details-item>
<cc-details-item fxFlex title="Status">
<cc-status [color]="deposit.status | toStatus | toDepositColor">{{
deposit.status | toStatus
}}</cc-status>
</cc-details-item>
</div>
<div fxFlexFill fxLayout fxLayoutGap="16px">
<cc-details-item fxFlex title="Amount"
>{{ deposit.amount | ccThriftInt64 | ccFormatAmount }}
{{ deposit.currency_symbolic_code | ccCurrency }}</cc-details-item
>
<cc-details-item fxFlex title="Fee"
>{{ deposit.fee | ccThriftInt64 | ccFormatAmount }}
{{ deposit.currency_symbolic_code | ccCurrency }}</cc-details-item
>
<cc-details-item fxFlex title="Created At">{{
deposit.created_at | date: 'dd.MM.yyyy HH:mm:ss'
}}</cc-details-item>
</div>
<div fxFlexFill fxLayout fxLayoutGap="16px">
<cc-details-item fxFlex title="Source ID">{{ deposit.source_id }}</cc-details-item>
<cc-details-item fxFlex title="Identity ID">{{ deposit.identity_id }}</cc-details-item>
<cc-details-item fxFlex title="Destination">
<cc-wallet-info [walletID]="deposit.destination_id"></cc-wallet-info>
</cc-details-item>
</div>
<mat-card-content style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px">
<cc-details-item style="grid-column: span 2" title="ID">{{ deposit.id }}</cc-details-item>
<cc-details-item title="Status">
<cc-status [color]="deposit.status | toStatus | toDepositColor">{{
deposit.status | toStatus
}}</cc-status>
</cc-details-item>
<cc-details-item title="Amount"
>{{ deposit.amount | ccThriftInt64 | ccFormatAmount }}
{{ deposit.currency_symbolic_code | ccCurrency }}</cc-details-item
>
<cc-details-item title="Fee"
>{{ deposit.fee | ccThriftInt64 | ccFormatAmount }}
{{ deposit.currency_symbolic_code | ccCurrency }}</cc-details-item
>
<cc-details-item title="Created At">{{
deposit.created_at | date: 'dd.MM.yyyy HH:mm:ss'
}}</cc-details-item>
<cc-details-item title="Source ID">{{ deposit.source_id }}</cc-details-item>
<cc-details-item title="Identity ID">{{ deposit.identity_id }}</cc-details-item>
<cc-details-item title="Destination">
<cc-wallet-info [walletID]="deposit.destination_id"></cc-wallet-info>
</cc-details-item>
</mat-card-content>
</mat-card>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { MatCardModule } from '@angular/material/card';
import { StatusModule } from '@cc/app/shared/components';
@ -15,7 +14,6 @@ import { DepositMainInfoComponent } from './deposit-main-info.component';
CommonModule,
MatCardModule,
DetailsItemModule,
FlexModule,
StatusModule,
ThriftPipesModule,
CommonPipesModule,

View File

@ -1,7 +1,7 @@
<v-dialog [progress]="!!(progress$ | async)" title="Create revert">
<div *ngIf="form" [formGroup]="form" fxLayout="column" fxLayoutGap="16px">
<div fxLayout fxLayoutGap="24px">
<mat-form-field fxFlex>
<div *ngIf="form" [formGroup]="form" style="display: flex; flex-direction: column; gap: 16px">
<div style="display: flex; gap: 24px">
<mat-form-field style="flex: 1">
<input
formControlName="amount"
matInput
@ -10,7 +10,7 @@
type="number"
/>
</mat-form-field>
<mat-form-field fxFlex>
<mat-form-field style="flex: 1">
<input
formControlName="currency"
matInput
@ -21,11 +21,11 @@
/>
</mat-form-field>
</div>
<div fxLayout fxLayoutGap="24px">
<mat-form-field fxFlex>
<div style="display: flex; gap: 24px">
<mat-form-field style="flex: 1">
<input formControlName="reason" matInput placeholder="Reason" type="text" />
</mat-form-field>
<mat-form-field fxFlex>
<mat-form-field style="flex: 1">
<input
formControlName="externalID"
matInput

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog';
@ -18,7 +17,6 @@ import { CreateRevertDialogComponent } from './create-revert-dialog.component';
CommonModule,
ReactiveFormsModule,
MatDialogModule,
FlexModule,
MatFormFieldModule,
MatProgressBarModule,
MatButtonModule,

View File

@ -1 +0,0 @@
export * from './reverts-table.module';

View File

@ -1,35 +0,0 @@
<table *ngIf="displayedColumns" [dataSource]="reverts" fxFlex="100" mat-table>
<ng-container matColumnDef="id">
<th *matHeaderCellDef mat-header-cell>#</th>
<td *matCellDef="let revert" class="id" mat-cell>
{{ revert.id }}
</td>
</ng-container>
<ng-container matColumnDef="status">
<th *matHeaderCellDef mat-header-cell>Status</th>
<td *matCellDef="let revert" mat-cell>
<cc-status [color]="revert.status | toStatus | toRevertColor">{{
revert.status | toStatus
}}</cc-status>
</td>
</ng-container>
<ng-container matColumnDef="amount">
<th *matHeaderCellDef mat-header-cell>Amount</th>
<td *matCellDef="let revert" mat-cell>
{{ revert.body.amount | ccThriftInt64 | ccFormatAmount }}
{{ revert.body.currency.symbolic_code | ccCurrency }}
</td>
</ng-container>
<ng-container matColumnDef="createdAt">
<th *matHeaderCellDef mat-header-cell>Created At</th>
<td *matCellDef="let revert" mat-cell>
{{ revert.created_at | date: 'dd.MM.yyyy HH:mm:ss' }}
</td>
</ng-container>
<tr *matHeaderRowDef="displayedColumns" mat-header-row></tr>
<tr *matRowDef="let row; columns: displayedColumns" mat-row></tr>
</table>

View File

@ -1,8 +0,0 @@
table {
width: 100%;
}
.id {
max-width: 240px;
word-wrap: anywhere;
}

View File

@ -1,15 +0,0 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { RevertState } from '@vality/fistful-proto/deposit_revert';
@Component({
selector: 'cc-reverts-table',
templateUrl: 'reverts-table.component.html',
styleUrls: ['reverts-table.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class RevertsTableComponent {
@Input()
reverts: RevertState[];
displayedColumns = ['id', 'status', 'amount', 'createdAt'];
}

View File

@ -1,24 +0,0 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { MatTableModule } from '@angular/material/table';
import { StatusModule } from '@cc/app/shared/components';
import { CommonPipesModule, ThriftPipesModule } from '@cc/app/shared/pipes';
import { RevertsTableComponent } from './reverts-table.component';
@NgModule({
imports: [
CommonModule,
MatTableModule,
FlexModule,
StatusModule,
CommonPipesModule,
StatusModule,
ThriftPipesModule,
],
declarations: [RevertsTableComponent],
exports: [RevertsTableComponent],
})
export class RevertsTableModule {}

View File

@ -1,36 +1,22 @@
<mat-card>
<mat-card-title fxLayout fxLayoutAlign="space-between center" style="padding: 16px">
<h1 class="mat-headline-5">Reverts</h1>
<button
[disabled]="isCreateRevertAvailable(deposit?.status)"
color="primary"
mat-raised-button
(click)="createRevert()"
>
Create revert
</button>
</mat-card-title>
<ng-container *ngIf="reverts$ | async as reverts; else noReverts">
<cc-empty-search-result
*ngIf="!(doAction$ | async) && reverts.length === 0"
unwrapped
></cc-empty-search-result>
<mat-card-content *ngIf="reverts.length > 0" fxLayout="column" fxLayoutGap="16px">
<cc-reverts-table [reverts]="reverts"></cc-reverts-table>
<div style="display: flex; flex-direction: column; gap: 24px">
<h1 class="mat-headline-5">Reverts</h1>
<v-table
[columns]="columns"
[data]="reverts$ | async"
[hasMore]="hasMore$ | async"
[progress]="doAction$ | async"
(more)="fetchMore()"
(update)="update()"
>
<v-table-actions>
<button
*ngIf="hasMore$ | async"
[disabled]="doAction$ | async"
fxFlex="100"
mat-button
(click)="fetchMore()"
[disabled]="isCreateRevertAvailable(deposit?.status)"
color="primary"
mat-raised-button
(click)="createRevert()"
>
{{ (doAction$ | async) ? 'Loading...' : 'Show more' }}
Create revert
</button>
</mat-card-content>
</ng-container>
<ng-template #noReverts>
<div *ngIf="doAction$ | async" fxFlexFill fxLayoutAlign="center">
<mat-spinner diameter="64"></mat-spinner>
</div>
</ng-template>
</mat-card>
</v-table-actions>
</v-table>
</div>

View File

@ -1,9 +1,12 @@
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
import { DepositStatus, StatDeposit } from '@vality/fistful-proto/fistful_stat';
import { DialogService } from '@vality/ng-core';
import { DepositStatus, StatDeposit, StatDepositRevert } from '@vality/fistful-proto/fistful_stat';
import { DialogService, Column } from '@vality/ng-core';
import startCase from 'lodash-es/startCase';
import { filter } from 'rxjs/operators';
import { getDepositStatus } from '@cc/app/shared/utils';
import { getDepositStatus, createCurrencyColumn } from '@cc/app/shared/utils';
import { getUnionKey } from '../../../../utils';
import { CreateRevertDialogComponent } from './create-revert-dialog/create-revert-dialog.component';
import { FetchRevertsService } from './services/fetch-reverts/fetch-reverts.service';
@ -16,12 +19,33 @@ import { FetchRevertsService } from './services/fetch-reverts/fetch-reverts.serv
providers: [FetchRevertsService],
})
export class RevertsComponent implements OnInit {
@Input()
deposit: StatDeposit;
@Input() deposit: StatDeposit;
reverts$ = this.fetchRevertsService.searchResult$;
hasMore$ = this.fetchRevertsService.hasMore$;
doAction$ = this.fetchRevertsService.doAction$;
columns: Column<StatDepositRevert>[] = [
{ field: 'id' },
{
field: 'status',
type: 'tag',
formatter: (d) => getUnionKey(d.status),
typeParameters: {
label: (d) => startCase(getUnionKey(d.status)),
tags: {
pending: { color: 'pending' },
succeeded: { color: 'success' },
failed: { color: 'warn' },
},
},
},
createCurrencyColumn(
'amount',
(d) => d.body.amount,
(d) => d.body.currency.symbolic_code,
),
{ field: 'created_at', type: 'datetime' },
];
constructor(
private fetchRevertsService: FetchRevertsService,
@ -49,6 +73,10 @@ export class RevertsComponent implements OnInit {
return getDepositStatus(status) !== 'succeeded';
}
update() {
this.fetchRevertsService.refresh();
}
fetchMore() {
this.fetchRevertsService.fetchMore();
}

View File

@ -1,26 +1,21 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { EmptySearchResultModule } from '@cc/components/empty-search-result';
import { TableModule } from '@vality/ng-core';
import { CreateRevertDialogModule } from './create-revert-dialog/create-revert-dialog.module';
import { RevertsTableModule } from './reverts-table';
import { RevertsComponent } from './reverts.component';
@NgModule({
imports: [
CommonModule,
FlexModule,
MatCardModule,
MatButtonModule,
CreateRevertDialogModule,
RevertsTableModule,
MatProgressSpinnerModule,
EmptySearchResultModule,
TableModule,
],
declarations: [RevertsComponent],
exports: [RevertsComponent],

View File

@ -1,10 +1,10 @@
<v-dialog [progress]="isLoading$ | async" title="Create deposit">
<form *ngIf="form" [formGroup]="form" fxLayout="column" fxLayoutGap="16px">
<div fxLayout fxLayoutGap="24px">
<mat-form-field fxFlex>
<input formControlName="destination" matInput placeholder="Destination" required />
</mat-form-field>
<mat-form-field fxFlex>
<form *ngIf="form" [formGroup]="form" style="display: flex; flex-direction: column; gap: 16px">
<mat-form-field>
<input formControlName="destination" matInput placeholder="Destination" required />
</mat-form-field>
<div style="display: flex; gap: 24px">
<mat-form-field style="flex: 1">
<input
formControlName="amount"
matInput
@ -13,9 +13,7 @@
type="number"
/>
</mat-form-field>
</div>
<div fxLayout fxLayoutGap="24px">
<mat-form-field fxFlex>
<mat-form-field style="flex: 1">
<mat-label>Currency</mat-label>
<mat-select formControlName="currency" required>
<mat-option *ngFor="let source of sources$ | async" [value]="source">
@ -23,7 +21,6 @@
</mat-option>
</mat-select>
</mat-form-field>
<div fxFlex></div>
</div>
</form>
<v-dialog-actions>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog';
@ -17,7 +16,6 @@ import { CreateDepositDialogComponent } from './create-deposit-dialog.component'
@NgModule({
imports: [
CommonModule,
FlexModule,
MatDialogModule,
MatFormFieldModule,
MatInputModule,

View File

@ -3,7 +3,8 @@ import { Validators, FormBuilder } from '@angular/forms';
import { DepositParams } from '@vality/fistful-proto/fistful_admin';
import { StatDeposit, StatRequest } from '@vality/fistful-proto/fistful_stat';
import { StatSource } from '@vality/fistful-proto/internal/fistful_stat';
import * as moment from 'moment';
import { getNoTimeZoneIsoString } from '@vality/ng-core';
import { endOfDay, startOfDay } from 'date-fns';
import { EMPTY, forkJoin, merge, Observable, of, Subject } from 'rxjs';
import { catchError, map, switchMap, first } from 'rxjs/operators';
@ -15,7 +16,6 @@ import { createDepositStopPollingCondition } from '@cc/app/shared/utils';
import { poll } from '@cc/utils/poll';
import { toMinor } from '@cc/utils/to-minor';
import { ConfigService } from '../../../../../core/config.service';
import { FetchSourcesService } from '../../../../sources';
@Injectable()
@ -80,7 +80,6 @@ export class CreateDepositService {
private fistfulStatisticsService: FistfulStatisticsService,
private fb: FormBuilder,
private idGenerator: UserInfoBasedIdGeneratorService,
private configService: ConfigService,
private fetchSourcesService: FetchSourcesService,
) {
this.initForm();
@ -115,8 +114,8 @@ export class CreateDepositService {
return {
dsl: createDsl({
deposits: {
from_time: moment().startOf('d').toISOString(),
to_time: moment().endOf('d').toISOString(),
from_time: getNoTimeZoneIsoString(startOfDay(new Date())),
to_time: getNoTimeZoneIsoString(endOfDay(new Date())),
size: 1,
deposit_id: params.id,
},

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -19,8 +18,6 @@ import {
AutocompleteFieldModule,
} from '@vality/ng-core';
import { EmptySearchResultModule } from '@cc/components/empty-search-result';
import { PageLayoutModule } from '../../shared';
import { MerchantFieldModule } from '../../shared/components/merchant-field';
@ -32,11 +29,9 @@ import { DepositsComponent } from './deposits.component';
imports: [
DepositsRoutingModule,
MatCardModule,
FlexModule,
CommonModule,
MatButtonModule,
CreateDepositDialogModule,
EmptySearchResultModule,
MatProgressSpinnerModule,
PageLayoutModule,
TableModule,

View File

@ -1,4 +1,4 @@
<div fxLayout="column" fxLayoutGap="8px">
<div style="display: flex; flex-direction: column; gap: 8px">
<div gdColumns="1fr 1fr" gdGap="24px">
<v-select-field
[formControl]="typesControl"

View File

@ -1,7 +1,6 @@
import { CdkTableModule } from '@angular/cdk/table';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -35,7 +34,6 @@ import { DomainGroupComponent } from './domain-group.component';
MatIconModule,
MatButtonModule,
MatInputModule,
FlexLayoutModule,
MatCardModule,
MatCheckboxModule,
MatSelectModule,

View File

@ -7,7 +7,7 @@
mode="side"
position="end"
>
<div class="details-container" fxLayout="column" fxLayoutGap="24px">
<div class="details-container" style="display: flex; flex-direction: column; gap: 24px">
<cc-thrift-viewer
[extensions]="extensions$ | async"
[kind]="kind"
@ -32,7 +32,10 @@
Create object
</button>
</cc-page-layout-actions>
<div *ngIf="progress$ | async; else content" fxLayout fxLayoutAlign="center stretch">
<div
*ngIf="progress$ | async; else content"
style="display: flex; justify-content: center"
>
<mat-spinner></mat-spinner>
</div>
<ng-template #content>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatInputModule } from '@angular/material/input';
@ -24,7 +23,6 @@ import { DomainInfoComponent } from './domain-info.component';
imports: [
CommonModule,
DomainGroupModule,
FlexLayoutModule,
MatCardModule,
MatProgressBarModule,
MatSnackBarModule,

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -22,7 +21,6 @@ import { DomainObjCreationComponent } from './domain-obj-creation.component';
declarations: [DomainObjCreationComponent],
imports: [
CommonModule,
FlexLayoutModule,
RouterModule,
MatProgressSpinnerModule,
MatCardModule,

View File

@ -1,5 +1,5 @@
<cc-page-layout title="Edit {{ type$ | async }}">
<div *ngIf="progress$ | async; else content" fxLayout fxLayoutAlign="center stretch">
<div *ngIf="progress$ | async; else content" style="display: flex; justify-content: center">
<mat-spinner></mat-spinner>
</div>
<ng-template #content>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -21,7 +20,7 @@ import { DomainObjModificationComponent } from './domain-obj-modification.compon
declarations: [DomainObjModificationComponent],
imports: [
CommonModule,
FlexLayoutModule,
RouterModule,
MatProgressSpinnerModule,
MatCardModule,

View File

@ -1,5 +1,5 @@
<cc-page-layout title="Review changes of {{ type$ | async }}">
<div *ngIf="progress$ | async; else content" fxLayout fxLayoutAlign="center stretch">
<div *ngIf="progress$ | async; else content" style="display: flex; justify-content: center">
<mat-spinner></mat-spinner>
</div>
<ng-template #content>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -22,7 +21,7 @@ import { DomainObjReviewComponent } from './domain-obj-review.component';
declarations: [DomainObjReviewComponent],
imports: [
CommonModule,
FlexLayoutModule,
RouterModule,
MatCardModule,
MatButtonModule,

View File

@ -1,5 +1,5 @@
<div fxLayout="column" fxLayoutGap="24px">
<div class="mat-headline-4">Shops</div>
<div style="display: flex; flex-direction: column; gap: 24px">
<div class="mat-headline-4 mat-no-margin">Shops</div>
<cc-shops-table
[progress]="progress$ | async"
[shops]="shopsParty$ | async"

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { InputFieldModule } from '@vality/ng-core';
@ -13,7 +12,7 @@ import { PartyShopsComponent } from './party-shops.component';
imports: [
PartyShopsRoutingModule,
CommonModule,
FlexModule,
ReactiveFormsModule,
InputFieldModule,
ShopsTableComponent,

View File

@ -1,12 +1,12 @@
<div class="party-container" fxLayout="column" fxLayoutGap="24px">
<div fxLayout fxLayoutAlign="space-between">
<div class="party-container" style="display: flex; flex-direction: column; gap: 24px">
<div style="display: flex; place-content: stretch space-between">
<h3 class="mat-body-1">
{{ (party$ | async)?.contact_info?.email }}
</h3>
<h4 class="mat-secondary-text mat-body-1">{{ (party$ | async)?.id }}</h4>
</div>
<div fxLayout="column" fxLayoutGap="24px">
<div style="display: flex; flex-direction: column; gap: 24px">
<nav mat-tab-nav-bar>
<a
#rla="routerLinkActive"

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button';
import { MatTabsModule } from '@angular/material/tabs';
@ -10,14 +9,7 @@ import { PartyRouting } from './party-routing.module';
import { PartyComponent } from './party.component';
@NgModule({
imports: [
PartyRouting,
CommonModule,
MatTabsModule,
FlexModule,
MatButtonModule,
PageLayoutModule,
],
imports: [PartyRouting, CommonModule, MatTabsModule, MatButtonModule, PageLayoutModule],
declarations: [PartyComponent],
})
export class PartyModule {}

View File

@ -30,7 +30,7 @@
</mat-card-content>
</mat-card>
<div fxLayout fxLayoutAlign="space-between">
<div style="display: flex; place-content: stretch space-between">
<h2 class="mat-h1 mat-no-margin">Chargebacks</h2>
<v-actions>
<button color="primary" mat-button (click)="createChargeback()">

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -28,7 +27,6 @@ import { PaymentRefundsModule } from './payment-refunds';
imports: [
CommonModule,
HeadlineModule,
FlexLayoutModule,
PaymentDetailsRoutingModule,
MatCardModule,
DetailsItemModule,

View File

@ -1,11 +1,13 @@
<div *ngIf="contractor$ | async as contractor; else empty" fxLayout fxLayoutGap="16px">
<cc-details-item fxFlex title="INN">{{ getINN(contractor) }}</cc-details-item>
<cc-details-item fxFlex title="Registered Name">{{ getRegName(contractor) }}</cc-details-item>
<div fxFlex></div>
<div *ngIf="contractor$ | async as contractor; else empty" style="display: flex; gap: 16px">
<cc-details-item style="flex: 1" title="INN">{{ getINN(contractor) }}</cc-details-item>
<cc-details-item style="flex: 1" title="Registered Name">{{
getRegName(contractor)
}}</cc-details-item>
<div style="flex: 1"></div>
</div>
<ng-template #empty>
<div *ngIf="inProgress$ | async; else emptyResult" fxLayout>
<cc-details-item fxFlex>Loading...</cc-details-item>
<div *ngIf="inProgress$ | async; else emptyResult" style="display: flex">
<cc-details-item style="flex: 1">Loading...</cc-details-item>
</div>
<ng-template #emptyResult>
<div>Error contractor loading.</div>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { DetailsItemModule } from '@cc/components/details-item';
@ -8,7 +7,7 @@ import { PaymentContractorComponent } from './payment-contractor.component';
@NgModule({
declarations: [PaymentContractorComponent],
imports: [FlexModule, DetailsItemModule, CommonModule],
imports: [DetailsItemModule, CommonModule],
exports: [PaymentContractorComponent],
})
export class PaymentContractorModule {}

View File

@ -1,12 +1,15 @@
<div *ngIf="error.code !== 'operation_timeout'; else timeout" fxLayout="column" fxLayoutGap="16px">
<div fxLayout fxLayoutGap="16px">
<cc-details-item fxFlex="32" title="Code">{{ error.code }}</cc-details-item>
<cc-details-item fxFlex title="Reason">{{ error.reason }}</cc-details-item>
<div
*ngIf="error.code !== 'operation_timeout'; else timeout"
style="display: flex; flex-direction: column; gap: 16px"
>
<div style="display: flex; gap: 16px">
<cc-details-item style="flex: 1" title="Code">{{ error.code }}</cc-details-item>
<cc-details-item style="flex: 2" title="Reason">{{ error.reason }}</cc-details-item>
</div>
<cc-details-item *ngIf="error.path" fxFlex title="Sub Failure">{{
<cc-details-item *ngIf="error.path" style="flex: 1" title="Sub Failure">{{
error.path
}}</cc-details-item>
</div>
<ng-template #timeout>
<cc-details-item fxFlex>Operation timeout</cc-details-item>
<cc-details-item style="flex: 1">Operation timeout</cc-details-item>
</ng-template>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { DetailsItemModule } from '@cc/components/details-item';
@ -9,7 +8,7 @@ import { PaymentErrorComponent } from './payment-error.component';
@NgModule({
declarations: [PaymentErrorComponent],
imports: [FlexModule, DetailsItemModule, CommonModule, MatProgressSpinnerModule],
imports: [DetailsItemModule, CommonModule, MatProgressSpinnerModule],
exports: [PaymentErrorComponent],
})
export class PaymentErrorModule {}

View File

@ -1,55 +1,60 @@
<div fxLayout="column" fxLayoutGap="16px">
<div fxLayout fxLayoutGap="16px">
<cc-details-item fxFlex title="Amount"
<div style="display: flex; flex-direction: column; gap: 16px">
<div style="display: flex; gap: 16px">
<cc-details-item style="flex: 1" title="Amount"
>{{ payment.amount | ccFormatAmount }}
{{ payment.currency_symbolic_code | ccCurrency }}</cc-details-item
>
<cc-details-item fxFlex title="Created At">{{
<cc-details-item style="flex: 1" title="Created At">{{
payment.created_at | date: 'dd.MM.yyyy HH:mm:ss'
}}</cc-details-item>
<cc-details-item fxFlex title="Status">
<cc-details-item style="flex: 1" title="Status">
<cc-status [color]="payment.status | toStatus | toPaymentColor">{{
payment.status | toStatus
}}</cc-status>
</cc-details-item>
</div>
<div fxLayout fxLayoutGap="16px">
<cc-details-item fxFlex title="Payer">{{ getPayerEmail(payment.payer) }}</cc-details-item>
<cc-details-item fxFlex title="Payment Tool">
<div style="display: flex; gap: 16px">
<cc-details-item style="flex: 1" title="Payer">{{
getPayerEmail(payment.payer)
}}</cc-details-item>
<cc-details-item style="flex: 1" title="Payment Tool">
<cc-payment-tool [paymentTool]="getPaymentTool(payment.payer)"></cc-payment-tool>
</cc-details-item>
<cc-details-item fxFlex title="Invoice">#{{ payment.invoice_id }}</cc-details-item>
<cc-details-item style="flex: 1" title="Invoice">#{{ payment.invoice_id }}</cc-details-item>
</div>
<div fxLayout="column" fxLayoutGap="16px">
<div fxLayout="column" fxLayoutGap="16px">
<div style="display: flex; flex-direction: column; gap: 16px">
<div style="display: flex; flex-direction: column; gap: 16px">
<div>
<mat-divider></mat-divider>
</div>
<div class="mat-h1">Shop</div>
<cc-shop-details [shop]="shop"></cc-shop-details>
</div>
<div *ngIf="hasError(payment.status)" fxLayout="column" fxLayoutGap="16px">
<div
*ngIf="hasError(payment.status)"
style="display: flex; flex-direction: column; gap: 16px"
>
<div>
<mat-divider></mat-divider>
</div>
<div class="mat-headline-4">Failure</div>
<div class="mat-headline-4 mat-no-margin">Failure</div>
<cc-payment-error [status]="payment.status"></cc-payment-error>
</div>
<div fxLayout="column" fxLayoutGap="16px">
<div style="display: flex; flex-direction: column; gap: 16px">
<div>
<mat-divider></mat-divider>
</div>
<div class="mat-h1">Terminal</div>
<cc-payment-terminal [terminalID]="payment.terminal_id.id"></cc-payment-terminal>
</div>
<div fxLayout="column" fxLayoutGap="16px">
<div style="display: flex; flex-direction: column; gap: 16px">
<div>
<mat-divider></mat-divider>
</div>
<div class="mat-h1">Provider</div>
<cc-payment-provider [providerID]="payment.provider_id.id"></cc-payment-provider>
</div>
<div fxLayout="column" fxLayoutGap="16px">
<div style="display: flex; flex-direction: column; gap: 16px">
<div>
<mat-divider></mat-divider>
</div>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatDividerModule } from '@angular/material/divider';
import { MatIconModule } from '@angular/material/icon';
@ -18,7 +17,6 @@ import { PaymentToolModule } from './payment-tool';
@NgModule({
imports: [
CommonModule,
FlexLayoutModule,
MatIconModule,
DetailsItemModule,
StatusModule,

View File

@ -1,11 +1,11 @@
<div *ngIf="provider$ | async as provider; else empty" fxLayout fxLayoutGap="16px">
<cc-details-item fxFlex title="ID">{{ provider.ref.id }}</cc-details-item>
<cc-details-item fxFlex title="Name">{{ provider.data.name }}</cc-details-item>
<div fxFlex></div>
<div *ngIf="provider$ | async as provider; else empty" style="display: flex; gap: 16px">
<cc-details-item style="flex: 1" title="ID">{{ provider.ref.id }}</cc-details-item>
<cc-details-item style="flex: 1" title="Name">{{ provider.data.name }}</cc-details-item>
<div style="flex: 1"></div>
</div>
<ng-template #empty>
<div *ngIf="inProgress$ | async; else emptyResult" fxLayout>
<cc-details-item fxFlex>Loading...</cc-details-item>
<div *ngIf="inProgress$ | async; else emptyResult" style="display: flex">
<cc-details-item style="flex: 1">Loading...</cc-details-item>
</div>
<ng-template #emptyResult>
<div>Error provider loading.</div>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { DetailsItemModule } from '@cc/components/details-item';
@ -8,7 +7,7 @@ import { PaymentProviderComponent } from './payment-provider.component';
@NgModule({
declarations: [PaymentProviderComponent],
imports: [FlexModule, DetailsItemModule, CommonModule],
imports: [DetailsItemModule, CommonModule],
exports: [PaymentProviderComponent],
})
export class PaymentProviderModule {}

View File

@ -1,13 +1,13 @@
<div *ngIf="terminal$ | async as terminal; else empty" fxLayout fxLayoutGap="16px">
<cc-details-item fxFlex title="ID">{{ terminal.ref.id }}</cc-details-item>
<cc-details-item fxFlex title="Name">{{ terminal.data.name }}</cc-details-item>
<div fxFlex></div>
<div *ngIf="terminal$ | async as terminal; else empty" style="display: flex; gap: 16px">
<cc-details-item style="flex: 1" title="ID">{{ terminal.ref.id }}</cc-details-item>
<cc-details-item style="flex: 1" title="Name">{{ terminal.data.name }}</cc-details-item>
<div style="flex: 1"></div>
</div>
<ng-template #empty>
<div *ngIf="inProgress$ | async; else emptyResult" fxLayout>
<cc-details-item fxFlex>Loading...</cc-details-item>
<div *ngIf="inProgress$ | async; else emptyResult" style="display: flex">
<cc-details-item style="flex: 1">Loading...</cc-details-item>
</div>
<ng-template #emptyResult>
<cc-details-item fxFlex>Error terminal loading.</cc-details-item>
<cc-details-item style="flex: 1">Error terminal loading.</cc-details-item>
</ng-template>
</ng-template>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { DetailsItemModule } from '@cc/components/details-item';
@ -8,7 +7,7 @@ import { PaymentTerminalComponent } from './payment-terminal.component';
@NgModule({
declarations: [PaymentTerminalComponent],
imports: [FlexModule, DetailsItemModule, CommonModule],
imports: [DetailsItemModule, CommonModule],
exports: [PaymentTerminalComponent],
})
export class PaymentTerminalModule {}

View File

@ -1,28 +1 @@
<div fxLayout fxLayoutAlign="start center" fxLayoutGap="8px">
<div>{{ bankCard | toCardNumber }}</div>
<!-- TODO Need migration according to: https://github.com/valitydev/damsel/commit/61677b86006d405619bdc5f23d6416a929688180 -->
<!-- <mat-icon-->
<!-- *ngIf="bankCard.payment_system_deprecated === legacyPaymentSystems?.visa"-->
<!-- svgIcon="visa"-->
<!-- ></mat-icon>-->
<!-- <mat-icon-->
<!-- *ngIf="bankCard.payment_system_deprecated === legacyPaymentSystems?.mastercard"-->
<!-- svgIcon="mastercard"-->
<!-- ></mat-icon>-->
<!-- <mat-icon-->
<!-- *ngIf="bankCard.payment_system_deprecated === legacyPaymentSystems?.nspkmir"-->
<!-- svgIcon="mir"-->
<!-- ></mat-icon>-->
<!-- <mat-icon-->
<!-- *ngIf="bankCard.token_provider_deprecated === legacyTokenProviders?.applepay"-->
<!-- svgIcon="apple_pay"-->
<!-- ></mat-icon>-->
<!-- <mat-icon-->
<!-- *ngIf="bankCard.token_provider_deprecated === legacyTokenProviders?.samsungpay"-->
<!-- svgIcon="samsung_pay"-->
<!-- ></mat-icon>-->
<!-- <mat-icon-->
<!-- *ngIf="bankCard.token_provider_deprecated === legacyTokenProviders?.googlepay"-->
<!-- svgIcon="google_pay"-->
<!-- ></mat-icon>-->
</div>
{{ bankCard | toCardNumber }} ({{ bankCard.payment_system.id }})

View File

@ -1,12 +1,11 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatIconModule } from '@angular/material/icon';
import { BankCardComponent } from './bank-card.component';
import { ToCardNumberPipe } from './to-card-number.pipe';
@NgModule({
imports: [CommonModule, FlexLayoutModule, MatIconModule],
imports: [CommonModule, MatIconModule],
declarations: [BankCardComponent, ToCardNumberPipe],
exports: [BankCardComponent],
})

View File

@ -1,11 +1,10 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { BankCardModule } from './bank-card';
import { PaymentToolComponent } from './payment-tool.component';
@NgModule({
imports: [CommonModule, FlexLayoutModule, BankCardModule],
imports: [CommonModule, BankCardModule],
declarations: [PaymentToolComponent],
exports: [PaymentToolComponent],
})

View File

@ -1,8 +1,11 @@
<div *ngIf="doAction$ | async; else content" fxLayout fxLayoutAlign="center center">
<div
*ngIf="doAction$ | async; else content"
style="display: flex; place-content: center; align-items: center"
>
<mat-spinner diameter="64"></mat-spinner>
</div>
<ng-template #content>
<div fxLayout="column" fxLayoutGap="24px">
<div style="display: flex; flex-direction: column; gap: 24px">
<cc-refunds-table [refunds]="refunds$ | async"></cc-refunds-table>
<cc-show-more-button
*ngIf="hasMore$ | async"

View File

@ -1,10 +1,8 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { EmptySearchResultModule } from '@cc/components/empty-search-result';
import { TableModule } from '@cc/components/table';
import { FetchRefundsService } from './fetch-refunds.service';
@ -17,9 +15,7 @@ import { RefundsTableModule } from './refunds-table';
imports: [
CommonModule,
RefundsTableModule,
FlexModule,
MatProgressSpinnerModule,
EmptySearchResultModule,
MatButtonModule,
TableModule,
],

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button';
import { MatTableModule } from '@angular/material/table';
@ -14,7 +13,6 @@ import { RefundsTableComponent } from './refunds-table.component';
imports: [
CommonModule,
MatTableModule,
FlexModule,
MatButtonModule,
StatusModule,
ThriftPipesModule,

View File

@ -1,7 +1,7 @@
<div *ngIf="payout$ | async as payout" fxLayout="column" fxLayoutGap="24px">
<div fxLayoutAlign="space-between">
<div *ngIf="payout$ | async as payout" style="display: flex; flex-direction: column; gap: 24px">
<div style="display: flex; justify-content: space-between">
<cc-headline>Payout details</cc-headline>
<div fxLayoutGap="16px">
<div style="display: flex; gap: 16px">
<button
[disabled]="canBeCancelled(payout.status | ccUnionKey)"
color="warn"
@ -21,8 +21,8 @@
</div>
</div>
<mat-card>
<mat-card-content gdGap="16px">
<div gdColumns="1fr 1fr 1fr" gdGap="16px">
<mat-card-content style="display: grid; gap: 16px">
<div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px">
<cc-details-item title="Payout ID">{{ payout.payout_id }}</cc-details-item>
<cc-details-item title="Amount">
{{ payout.amount | ccFormatAmount }}
@ -44,7 +44,7 @@
<ng-container *ngIf="party$ | async as party">
<div><mat-divider></mat-divider></div>
<h2 class="mat-headline-4">Party</h2>
<div gdColumns="1fr 1fr 1fr" gdGap="16px">
<div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px">
<cc-details-item title="ID">{{ payout.party_id }}</cc-details-item>
<cc-details-item title="Email">
{{ party.contact_info?.email }}
@ -65,7 +65,7 @@
</mat-card>
<mat-card>
<mat-card-content gdGap="24px">
<mat-card-content style="display: grid; gap: 24px">
<h2 class="mat-headline-4">Cash Flow</h2>
<div>
<table [dataSource]="payout.cash_flow" mat-table>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatDividerModule } from '@angular/material/divider';
@ -12,7 +11,6 @@ import { ShopDetailsModule } from '@cc/app/shared/components';
import { PayoutToolDetailsModule } from '@cc/app/shared/components/payout-tool-details/payout-tool-details.module';
import { CommonPipesModule, ThriftPipesModule } from '@cc/app/shared/pipes';
import { DetailsItemModule } from '@cc/components/details-item';
import { EmptySearchResultModule } from '@cc/components/empty-search-result';
import { HeadlineModule } from '@cc/components/headline';
import { PayoutDetailsRoutingModule } from './payout-details-routing.module';
@ -31,9 +29,7 @@ import { PayoutDetailsComponent } from './payout-details.component';
ThriftPipesModule,
ShopDetailsModule,
PayoutToolDetailsModule,
FlexLayoutModule,
MatTableModule,
EmptySearchResultModule,
MatPaginatorModule,
MatButtonModule,
ActionsModule,

View File

@ -1,19 +1,16 @@
<div class="mat-dialog-title">Cancel payout</div>
<mat-dialog-content gdColumns="1fr">
<v-dialog [progress]="progress$ | async" title="Cancel payout">
<mat-form-field>
<mat-label>Details</mat-label>
<input [formControl]="detailsControl" matInput required type="text" />
</mat-form-field>
</mat-dialog-content>
<mat-dialog-actions fxLayout fxLayoutAlign="space-between">
<button [disabled]="!!(progress$ | async)" [mat-dialog-close]="false" mat-button>Cancel</button>
<button
[disabled]="detailsControl.invalid || !!(progress$ | async)"
color="primary"
mat-button
(click)="accept()"
>
Accept
</button>
<mat-progress-bar *ngIf="progress$ | async" mode="indeterminate"></mat-progress-bar>
</mat-dialog-actions>
<v-dialog-actions>
<button
[disabled]="detailsControl.invalid || !!(progress$ | async)"
color="primary"
mat-button
(click)="accept()"
>
Accept
</button>
</v-dialog-actions>
</v-dialog>

View File

@ -6,8 +6,8 @@
formControlName="shopId"
required
></cc-shop-field>
<div fxLayout fxLayoutGap="24px">
<mat-form-field fxFlex>
<div style="display: flex; gap: 24px">
<mat-form-field style="flex: 1">
<input
formControlName="amount"
matInput
@ -16,7 +16,7 @@
type="number"
/>
</mat-form-field>
<mat-form-field fxFlex>
<mat-form-field style="flex: 1">
<input
formControlName="currency"
matInput

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -30,7 +29,6 @@ import {
} from '@cc/app/shared/components';
import { MerchantFieldModule } from '@cc/app/shared/components/merchant-field';
import { CommonPipesModule, ThriftPipesModule } from '@cc/app/shared/pipes';
import { EmptySearchResultModule } from '@cc/components/empty-search-result';
import { CancelPayoutDialogComponent } from './components/cancel-payout-dialog/cancel-payout-dialog.component';
import { CreatePayoutDialogComponent } from './components/create-payout-dialog/create-payout-dialog.component';
@ -45,12 +43,10 @@ import { PayoutsComponent } from './payouts.component';
MatButtonModule,
MatCardModule,
MatProgressBarModule,
EmptySearchResultModule,
MatFormFieldModule,
MatInputModule,
FormsModule,
MerchantFieldModule,
FlexLayoutModule,
ReactiveFormsModule,
MatSelectModule,
MatDatepickerModule,

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatBadgeModule } from '@angular/material/badge';
import { MatButtonModule } from '@angular/material/button';
@ -27,8 +26,6 @@ import { PageLayoutModule } from '@cc/app/shared';
import { MetadataFormModule } from '@cc/app/shared/components/metadata-form';
import { DomainObjectFieldComponent } from '@cc/app/shared/components/thrift-api-crud';
import { EmptySearchResultModule } from '../../../components/empty-search-result';
import { RepairByScenarioDialogComponent } from './components/repair-by-scenario-dialog/repair-by-scenario-dialog.component';
import { RepairingRoutingModule } from './repairing-routing.module';
import { RepairingComponent } from './repairing.component';
@ -40,10 +37,8 @@ import { RepairingComponent } from './repairing.component';
TableModule,
MatCardModule,
ReactiveFormsModule,
FlexLayoutModule,
MatProgressBarModule,
MatButtonModule,
EmptySearchResultModule,
MatTableModule,
MatTooltipModule,
MatBadgeModule,

View File

@ -1,5 +1,5 @@
<v-dialog title="Change Delegate Ruleset">
<div [formGroup]="form" fxLayout="column" fxLayoutGap="24px">
<div [formGroup]="form" style="display: flex; flex-direction: column; gap: 24px">
<mat-form-field>
<mat-label>Delegate Ruleset</mat-label>
<mat-select formControlName="rulesetRefId" required>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatInputModule } from '@angular/material/input';
@ -12,7 +11,6 @@ import { ChangeDelegateRulesetDialogComponent } from './change-delegate-ruleset-
@NgModule({
imports: [
CommonModule,
FlexLayoutModule,
ReactiveFormsModule,
FormsModule,
MatInputModule,

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog';
import { DialogModule } from '@vality/ng-core';
@ -13,7 +12,6 @@ import { ChangeTargetDialogComponent } from './change-target-dialog.component';
imports: [
CommonModule,
TargetRulesetFormModule,
FlexLayoutModule,
MatDialogModule,
MatButtonModule,
DialogModule,

View File

@ -1,5 +1,5 @@
<v-dialog title="Attach party delegate ruleset">
<div [formGroup]="form" fxLayout="column" fxLayoutGap="24px">
<div [formGroup]="form" style="display: flex; flex-direction: column; gap: 24px">
<cc-target-ruleset-form
[type]="dialogData.type"
(valid)="targetRulesetValid$.next($event)"
@ -8,8 +8,8 @@
<ng-container formGroupName="ruleset">
<mat-divider></mat-divider>
<div class="mat-headline-4">Routing ruleset</div>
<div fxLayout="column" fxLayoutGap="16px">
<div class="mat-headline-4 mat-no-margin">Routing ruleset</div>
<div style="display: flex; flex-direction: column; gap: 16px">
<mat-form-field>
<input formControlName="name" matInput placeholder="Name" required />
</mat-form-field>

View File

@ -1,5 +1,5 @@
<div fxLayout="column" fxLayoutGap="24px">
<div fxLayout fxLayoutAlign="space-between center" fxLayoutGap="8px">
<div style="display: flex; flex-direction: column; gap: 24px">
<div style="display: flex; place-content: center space-between; align-items: center; gap: 8px">
<div class="mat-headline-4 mat-no-margin">Party delegate rulesets</div>
<button color="primary" mat-button (click)="attachNewRuleset()">Attach new ruleset</button>
</div>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -34,7 +33,6 @@ const EXPORTED_DECLARATIONS = [PartyDelegateRulesetsComponent, AttachNewRulesetD
PartyDelegateRulesetsRoutingModule,
RoutingRulesetHeaderModule,
MatButtonModule,
FlexLayoutModule,
CommonModule,
RouterModule,
MatCardModule,

View File

@ -1,5 +1,5 @@
<v-dialog title="Party routing rule params">
<div [formGroup]="form" fxLayout="column" fxLayoutGap="24px">
<div [formGroup]="form" style="display: flex; flex-direction: column; gap: 24px">
<mat-form-field *ngIf="dialogData.type === 'payment'">
<mat-label>Shop</mat-label>
<mat-select formControlName="shopID" required>
@ -17,8 +17,8 @@
</mat-select>
</mat-form-field>
<mat-divider></mat-divider>
<div class="mat-headline-4">Routing ruleset</div>
<div fxLayout="column" fxLayoutGap="16px">
<div class="mat-headline-4 mat-no-margin">Routing ruleset</div>
<div style="display: flex; flex-direction: column; gap: 16px">
<mat-form-field>
<input formControlName="name" matInput placeholder="Name" required />
</mat-form-field>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatButtonModule } from '@angular/material/button';
@ -19,7 +18,6 @@ import { AddPartyRoutingRuleDialogComponent } from './add-party-routing-rule-dia
imports: [
CommonModule,
MatButtonModule,
FlexLayoutModule,
MatDialogModule,
MatDividerModule,
ReactiveFormsModule,

View File

@ -1,5 +1,5 @@
<v-dialog title="Routing rules init params">
<div [formGroup]="form" fxLayout="column" fxLayoutGap="24px">
<div [formGroup]="form" style="display: flex; flex-direction: column; gap: 24px">
<mat-form-field>
<input
formControlName="delegateDescription"
@ -8,8 +8,8 @@
/>
</mat-form-field>
<mat-divider></mat-divider>
<div class="mat-headline-4">Routing ruleset</div>
<div fxLayout="column" fxLayoutGap="16px">
<div class="mat-headline-4 mat-no-margin">Routing ruleset</div>
<div style="display: flex; flex-direction: column; gap: 16px">
<mat-form-field>
<input formControlName="name" matInput placeholder="Name" required />
</mat-form-field>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatButtonModule } from '@angular/material/button';
@ -19,7 +18,6 @@ import { InitializeRoutingRulesDialogComponent } from './initialize-routing-rule
imports: [
CommonModule,
MatButtonModule,
FlexLayoutModule,
MatDialogModule,
MatDividerModule,
ReactiveFormsModule,

View File

@ -2,11 +2,7 @@
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</ng-container>
<ng-template #loaded>
<div
*ngIf="partyRuleset$ | async as partyRuleset; else emptyPartyDelegate"
fxLayout="column"
fxLayoutGap="24px"
>
<div *ngIf="partyRuleset$ | async as partyRuleset; else emptyPartyDelegate" class="content">
<cc-routing-ruleset-header
[backTo]="
'party/' + (partyID$ | async) + '/routing-rules/' + (routingRulesType$ | async)
@ -33,12 +29,7 @@
</div>
<ng-template #emptyPartyDelegate>
<div
class="empty-party-delegate"
fxLayout="column"
fxLayoutAlign=" center"
fxLayoutGap="24px"
>
<div class="empty-party-delegate">
<div class="mat-display-1">Routing rules not found</div>
<button class="init" color="primary" mat-raised-button (click)="initialize()">
Initialize

View File

@ -1,4 +1,14 @@
.content {
display: flex;
flex-direction: column;
gap: 24px;
}
.empty-party-delegate {
display: flex;
flex-direction: column;
align-items: center;
gap: 24px;
padding-top: 64px;
}

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -32,7 +31,6 @@ import { PartyRoutingRulesetComponent } from './party-routing-ruleset.component'
PartyRoutingRulesetRoutingModule,
CommonModule,
MatButtonModule,
FlexLayoutModule,
MatDialogModule,
MatDividerModule,
ReactiveFormsModule,

View File

@ -5,6 +5,7 @@ import {
Input,
Output,
OnChanges,
booleanAttribute,
} from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
@ -16,7 +17,6 @@ import {
createOperationColumn,
ComponentChanges,
} from '@vality/ng-core';
import { coerceBoolean } from 'coerce-property';
import { filter, switchMap } from 'rxjs/operators';
import { NotificationErrorService } from '@cc/app/shared/services/notification-error';
@ -45,7 +45,7 @@ export class RoutingRulesListComponent<
{
@Input() data: T[];
@Input() displayedColumns: { key: keyof T; name: string }[];
@Input() @coerceBoolean progress: boolean | '' = false;
@Input({ transform: booleanAttribute }) progress: boolean = false;
@Output() toDetails = new EventEmitter<DelegateId>();

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
@ -17,7 +16,6 @@ import { RoutingRulesListComponent } from './routing-rules-list.component';
MatCardModule,
MatPaginatorModule,
MatIconModule,
FlexLayoutModule,
MatButtonModule,
TableModule,
],

View File

@ -1,6 +1,9 @@
<div fxLayout="column" fxLayoutGap="8px">
<div fxLayout fxLayoutAlign="space-between center" fxLayoutGap="8px">
<div class="mat-headline-4 title" fxLayout fxLayoutAlign=" center" fxLayoutGap="8px">
<div style="display: flex; flex-direction: column; gap: 8px">
<div style="display: flex; place-content: center space-between; align-items: center; gap: 8px">
<div
class="mat-headline-4 title"
style="display: flex; place-content: center flex-start; align-items: center; gap: 8px"
>
<mat-icon *ngIf="backTo" class="back" (click)="navigateBack()">arrow_back</mat-icon>
<div><ng-content></ng-content></div>
</div>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { RouterLink } from '@angular/router';
@ -8,7 +7,7 @@ import { RouterLink } from '@angular/router';
import { RoutingRulesetHeaderComponent } from './routing-ruleset-header.component';
@NgModule({
imports: [CommonModule, FlexLayoutModule, MatIconModule, MatButtonModule, RouterLink],
imports: [CommonModule, MatIconModule, MatButtonModule, RouterLink],
declarations: [RoutingRulesetHeaderComponent],
exports: [RoutingRulesetHeaderComponent],
})

View File

@ -1,4 +1,4 @@
<div fxLayout="column" fxLayoutGap="24px">
<div style="display: flex; flex-direction: column; gap: 24px">
<cc-routing-ruleset-header
[backTo]="
'party/' +

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatButtonModule } from '@angular/material/button';
@ -32,7 +31,6 @@ import { RoutingRulesetComponent } from './routing-ruleset.component';
RoutingRulesetRoutingModule,
CommonModule,
MatButtonModule,
FlexLayoutModule,
MatDialogModule,
MatDividerModule,
ReactiveFormsModule,

View File

@ -1,18 +1,19 @@
<div [formGroup]="form" fxLayout="column" fxLayoutGap="24px">
<div class="mat-headline-4">Change Main Ruleset</div>
<div [formGroup]="form" style="display: flex; flex-direction: column; gap: 24px">
<div class="mat-headline-4 mat-no-margin">Change Main Ruleset</div>
<div fxLayout="column" fxLayoutGap="39px">
<mat-radio-group formControlName="target" fxLayout>
<mat-radio-button [value]="target.PaymentInstitution" fxFlex
<div style="display: flex; flex-direction: column; gap: 39px">
<mat-radio-group formControlName="target" style="display: flex">
<mat-radio-button [value]="target.PaymentInstitution" style="flex: 1"
>Payment Institution</mat-radio-button
>
<mat-radio-button [value]="target.Manual" fxFlex>Manual Target</mat-radio-button>
<mat-radio-button [value]="target.Manual" style="flex: 1"
>Manual Target</mat-radio-button
>
</mat-radio-group>
<div
*ngIf="form.controls.target.value === target.PaymentInstitution"
fxLayout="column"
fxLayoutGap="16px"
style="display: flex; flex-direction: column; gap: 16px"
>
<mat-form-field>
<mat-label>Payment Institution</mat-label>

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatDividerModule } from '@angular/material/divider';
@ -16,7 +15,6 @@ import { TargetRulesetFormComponent } from './target-ruleset-form.component';
@NgModule({
imports: [
CommonModule,
FlexLayoutModule,
ReactiveFormsModule,
MatRadioModule,
MatFormFieldModule,

View File

@ -1,2 +0,0 @@
export * from './parties-search-filters.module';
export * from './parties-search-filters-params';

View File

@ -1,3 +0,0 @@
export interface PartiesSearchFiltersParams {
text: string;
}

View File

@ -1,14 +0,0 @@
<form [formGroup]="form" fxLayout="column">
<mat-form-field fxFlexFill>
<input
autocomplete="false"
formControlName="text"
matInput
placeholder="Search params"
type="string"
/>
<mat-hint class="mat-caption">
Email, ID, INN, Registered name, Legal name, Trading name, Russian bank account
</mat-hint>
</mat-form-field>
</form>

View File

@ -1,29 +0,0 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { PartiesSearchFiltersParams } from './parties-search-filters-params';
import { PartiesSearchFiltersService } from './parties-search-filters.service';
@Component({
selector: 'cc-parties-search-filters',
templateUrl: 'parties-search-filters.component.html',
providers: [PartiesSearchFiltersService],
})
export class PartiesSearchFiltersComponent implements OnInit {
@Input()
initParams: PartiesSearchFiltersParams;
@Output()
searchParamsChanged$ = new EventEmitter();
form = this.partiesSearchFiltersService.form;
constructor(private partiesSearchFiltersService: PartiesSearchFiltersService) {
this.partiesSearchFiltersService.searchParamsChanged$.subscribe((params) =>
this.searchParamsChanged$.emit(params),
);
}
ngOnInit() {
this.partiesSearchFiltersService.init(this.initParams);
}
}

View File

@ -1,14 +0,0 @@
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { PartiesSearchFiltersComponent } from './parties-search-filters.component';
@NgModule({
imports: [FlexModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule],
exports: [PartiesSearchFiltersComponent],
declarations: [PartiesSearchFiltersComponent],
})
export class PartiesSearchFiltersModule {}

View File

@ -1,24 +0,0 @@
import { Injectable } from '@angular/core';
import { UntypedFormBuilder } from '@angular/forms';
import { debounceTime, filter, shareReplay } from 'rxjs/operators';
import { PartiesSearchFiltersParams } from './parties-search-filters-params';
@Injectable()
export class PartiesSearchFiltersService {
form = this.fb.group({
text: '',
});
searchParamsChanged$ = this.form.valueChanges.pipe(
debounceTime(600),
filter(() => this.form.valid),
shareReplay(1),
);
constructor(private fb: UntypedFormBuilder) {}
init(params: PartiesSearchFiltersParams) {
this.form.patchValue(params);
}
}

View File

@ -1,26 +1,19 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { MatCardModule } from '@angular/material/card';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { TableModule } from '@vality/ng-core';
import { EmptySearchResultModule } from '@cc/components/empty-search-result';
import { PageLayoutModule } from '../../shared';
import { PartiesSearchFiltersModule } from './parties-search-filters';
import { SearchPartiesRoutingModule } from './search-parties-routing.module';
import { SearchPartiesComponent } from './search-parties.component';
@NgModule({
imports: [
SearchPartiesRoutingModule,
FlexModule,
MatCardModule,
PartiesSearchFiltersModule,
CommonModule,
EmptySearchResultModule,
MatProgressBarModule,
PageLayoutModule,
TableModule,

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -8,7 +7,6 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatTableModule } from '@angular/material/table';
import { ActionsModule, DialogModule, TableModule } from '@vality/ng-core';
import { EmptySearchResultModule } from '../../../components/empty-search-result';
import { PageLayoutModule } from '../../shared';
import { FistfulThriftFormComponent } from '../../shared/components/fistful-thrift-form';
import { MetadataFormModule } from '../../shared/components/metadata-form';
@ -21,12 +19,10 @@ import { SourcesComponent } from './sources.component';
imports: [
CommonModule,
SourcesRoutingModule,
FlexModule,
ActionsModule,
MatButtonModule,
MatCardModule,
MatProgressBarModule,
EmptySearchResultModule,
TableModule,
MatTableModule,
DialogModule,

View File

@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexModule, GridModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
@ -13,7 +12,6 @@ import { TableModule, ListFieldModule, FiltersModule } from '@vality/ng-core';
import { AmountCurrencyPipe, PageLayoutModule } from '@cc/app/shared';
import { MerchantFieldModule } from '@cc/app/shared/components/merchant-field';
import { MetadataFormModule } from '@cc/app/shared/components/metadata-form';
import { EmptySearchResultModule } from '@cc/components/empty-search-result';
import { WalletsRoutingModule } from './wallets-routing.module';
import { WalletsComponent } from './wallets.component';
@ -23,15 +21,12 @@ import { WalletsComponent } from './wallets.component';
CommonModule,
WalletsRoutingModule,
MatCardModule,
FlexModule,
TableModule,
EmptySearchResultModule,
MatProgressSpinnerModule,
MetadataFormModule,
ReactiveFormsModule,
MatInputModule,
MerchantFieldModule,
GridModule,
MatButtonModule,
MatIconModule,
MtxButtonModule,

Some files were not shown because too many files have changed in this diff Show More