TD-692: Update Prettier, ESLint, CSpell (#245)

This commit is contained in:
Rinat Arsaev 2023-08-14 12:47:45 +04:00 committed by GitHub
parent 56ed199b66
commit eea2a40d3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
210 changed files with 1719 additions and 1175 deletions

1345
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -37,7 +37,7 @@
"@vality/dominant-cache-proto": "2.0.1-99f38c9.0",
"@vality/fistful-proto": "2.0.1-4ff4ea3.0",
"@vality/magista-proto": "2.0.2-e46bba2.0",
"@vality/ng-core": "16.2.1-pr-33-bd23324.0",
"@vality/ng-core": "16.2.1-pr-33-541079b.0",
"@vality/payout-manager-proto": "2.0.1-b079679.0",
"@vality/repairer-proto": "2.0.1-8f7973d.0",
"@vality/thrift-ts": "2.4.1-8ad5123.0",
@ -74,11 +74,11 @@
"@types/jwt-decode": "2.2.1",
"@types/lodash-es": "4.17.6",
"@types/papaparse": "5.3.7",
"@vality/cspell-config": "0.1.1-pr-15-020121f.0",
"@vality/eslint-config": "1.0.1-pr-27-18c018c.0",
"@vality/prettier-config": "0.1.1-pr-15-225ffc3.0",
"@vality/cspell-config": "7.0.1-pr-33-8e9a771.0",
"@vality/eslint-config": "8.0.1-pr-33-541079b.0",
"@vality/prettier-config": "3.0.1-pr-33-1086ab7.0",
"cross-env": "7.0.3",
"cspell": "6.31.1",
"cspell": "^7.0.0",
"dotenv": "16.0.0",
"eslint": "^8.39.0",
"jasmine-core": "4.2.0",
@ -89,7 +89,7 @@
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.0.0",
"prettier": "2.8.8",
"prettier": "3.0.1",
"typescript": "~5.0.4",
"typescript-memoize": "1.1.1"
}

View File

@ -17,12 +17,12 @@ export class AccounterService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('Accounter'))
map(toWachterHeaders('Accounter')),
);
const metadata$ = from(
import('@vality/domain-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -31,8 +31,8 @@ export class AccounterService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -26,12 +26,12 @@ export class ClaimManagementService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('ClaimManagement'))
map(toWachterHeaders('ClaimManagement')),
);
const metadata$ = from(
import('@vality/domain-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -40,8 +40,8 @@ export class ClaimManagementService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}
@ -70,7 +70,7 @@ export class ClaimManagementService {
partyId: PartyID,
id: ClaimID,
revision: ClaimRevision,
changeset: ModificationChangeset
changeset: ModificationChangeset,
): Observable<void> {
return this.client$.pipe(switchMap((c) => c.UpdateClaim(partyId, id, revision, changeset)));
}
@ -81,12 +81,12 @@ export class ClaimManagementService {
id: ClaimID,
revision: ClaimRevision,
modificationId: ModificationID,
modificationChange: ModificationChange
modificationChange: ModificationChange,
): Observable<void> {
return this.client$.pipe(
switchMap((c) =>
c.UpdateModification(partyId, id, revision, modificationId, modificationChange)
)
c.UpdateModification(partyId, id, revision, modificationId, modificationChange),
),
);
}
@ -95,10 +95,10 @@ export class ClaimManagementService {
partyId: PartyID,
id: ClaimID,
revision: ClaimRevision,
modificationId: ModificationID
modificationId: ModificationID,
): Observable<void> {
return this.client$.pipe(
switchMap((c) => c.RemoveModification(partyId, id, revision, modificationId))
switchMap((c) => c.RemoveModification(partyId, id, revision, modificationId)),
);
}
@ -117,7 +117,7 @@ export class ClaimManagementService {
partyId: PartyID,
id: ClaimID,
revision: ClaimRevision,
reason: string
reason: string,
): Observable<void> {
return this.client$.pipe(switchMap((c) => c.DenyClaim(partyId, id, revision, reason)));
}
@ -127,7 +127,7 @@ export class ClaimManagementService {
partyId: PartyID,
id: ClaimID,
revision: ClaimRevision,
reason: string
reason: string,
): Observable<void> {
return this.client$.pipe(switchMap((c) => c.RevokeClaim(partyId, id, revision, reason)));
}

View File

@ -8,5 +8,5 @@ export const CLAIM_STATUSES = enumerate<keyof ClaimStatus>()(
'pending_acceptance',
'accepted',
'denied',
'revoked'
'revoked',
);

View File

@ -16,12 +16,12 @@ export class DeanonimusService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('Deanonimus'))
map(toWachterHeaders('Deanonimus')),
);
const metadata$ = from(
import('@vality/deanonimus-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -30,8 +30,8 @@ export class DeanonimusService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -18,12 +18,12 @@ export class ManagementService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('DepositManagement'))
map(toWachterHeaders('DepositManagement')),
);
const metadata$ = from(
import('@vality/fistful-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -32,8 +32,8 @@ export class ManagementService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -20,7 +20,7 @@ export class DomainStoreService {
version$ = defer(() => this.snapshot$).pipe(pluck('version'));
isLoading$ = inProgressFrom(
() => this.progress$,
defer(() => this.snapshot$)
defer(() => this.snapshot$),
);
private snapshot$: Observable<Snapshot> = defer(() => this.reload$).pipe(
@ -28,10 +28,10 @@ export class DomainStoreService {
switchMap(() =>
this.repositoryService
.Checkout({ head: {} })
.pipe(progressTo(this.progress$), handleError(this.notificationErrorService.error))
.pipe(progressTo(this.progress$), handleError(this.notificationErrorService.error)),
),
untilDestroyed(this),
shareReplay(1)
shareReplay(1),
);
private reload$ = new ReplaySubject<void>(1);
private progress$ = new BehaviorSubject(0);
@ -39,7 +39,7 @@ export class DomainStoreService {
constructor(
private repositoryService: RepositoryService,
private domainSecretService: DomainSecretService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {}
forceReload(): void {
@ -49,7 +49,7 @@ export class DomainStoreService {
getDomain(raw = false): Observable<Domain> {
return this.snapshot$.pipe(
pluck('domain'),
map((d) => (raw ? d : this.domainSecretService.reduceDomain(d)))
map((d) => (raw ? d : this.domainSecretService.reduceDomain(d))),
);
}
@ -58,8 +58,8 @@ export class DomainStoreService {
map((d) =>
Array.from(d.values())
.filter((o) => getUnionKey(o) === objectType)
.map((o) => o[objectType])
)
.map((o) => o[objectType]),
),
);
}
@ -69,7 +69,7 @@ export class DomainStoreService {
switchMap((v) => this.repositoryService.Commit(v, commit)),
tap(() => {
if (reload) this.forceReload();
})
}),
);
}
}

View File

@ -16,12 +16,12 @@ export class RepositoryService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('Domain'))
map(toWachterHeaders('Domain')),
);
const metadata$ = from(
import('@vality/domain-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -30,8 +30,8 @@ export class RepositoryService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -16,12 +16,12 @@ export class DominantCacheService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('DominantCache'))
map(toWachterHeaders('DominantCache')),
);
const metadata$ = from(
import('@vality/dominant-cache-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -30,8 +30,8 @@ export class DominantCacheService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -18,12 +18,12 @@ export class FistfulAdminService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('FistfulAdmin'))
map(toWachterHeaders('FistfulAdmin')),
);
const metadata$ = from(
import('@vality/fistful-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -32,8 +32,8 @@ export class FistfulAdminService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -16,12 +16,12 @@ export class FistfulStatisticsService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('FistfulStatistics'))
map(toWachterHeaders('FistfulStatistics')),
);
const metadata$ = from(
import('@vality/fistful-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -30,8 +30,8 @@ export class FistfulStatisticsService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -6,7 +6,7 @@ import { DepositParams } from './deposit-params';
export const depositParamsToRequest = (
params: DepositParams,
continuationToken?: string
continuationToken?: string,
): StatRequest => {
const {
fromTime,

View File

@ -24,12 +24,12 @@ export class MerchantStatisticsService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('MerchantStatistics'))
map(toWachterHeaders('MerchantStatistics')),
);
const metadata$ = from(
import('@vality/magista-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -38,8 +38,8 @@ export class MerchantStatisticsService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -31,12 +31,12 @@ export class InvoicingService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('Invoicing'))
map(toWachterHeaders('Invoicing')),
);
const metadata$ = from(
import('@vality/domain-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -45,8 +45,8 @@ export class InvoicingService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}
@ -59,10 +59,10 @@ export class InvoicingService {
CreatePaymentAdjustment(
id: InvoiceID,
paymentId: InvoicePaymentID,
params: InvoicePaymentAdjustmentParams
params: InvoicePaymentAdjustmentParams,
): Observable<InvoicePaymentAdjustment> {
return this.client$.pipe(
switchMap((c) => c.CreatePaymentAdjustment(id, paymentId, params))
switchMap((c) => c.CreatePaymentAdjustment(id, paymentId, params)),
);
}
@ -70,7 +70,7 @@ export class InvoicingService {
CreateChargeback(
id: InvoiceID,
paymentId: InvoicePaymentID,
params: InvoicePaymentChargebackParams
params: InvoicePaymentChargebackParams,
): Observable<InvoicePaymentChargeback> {
return this.client$.pipe(switchMap((c) => c.CreateChargeback(id, paymentId, params)));
}
@ -80,10 +80,10 @@ export class InvoicingService {
id: InvoiceID,
paymentId: InvoicePaymentID,
chargebackId: InvoicePaymentChargebackID,
params: InvoicePaymentChargebackAcceptParams
params: InvoicePaymentChargebackAcceptParams,
): Observable<void> {
return this.client$.pipe(
switchMap((c) => c.AcceptChargeback(id, paymentId, chargebackId, params))
switchMap((c) => c.AcceptChargeback(id, paymentId, chargebackId, params)),
);
}
@ -92,10 +92,10 @@ export class InvoicingService {
id: InvoiceID,
paymentId: InvoicePaymentID,
chargebackId: InvoicePaymentChargebackID,
params: InvoicePaymentChargebackRejectParams
params: InvoicePaymentChargebackRejectParams,
): Observable<void> {
return this.client$.pipe(
switchMap((c) => c.RejectChargeback(id, paymentId, chargebackId, params))
switchMap((c) => c.RejectChargeback(id, paymentId, chargebackId, params)),
);
}
@ -104,10 +104,10 @@ export class InvoicingService {
id: InvoiceID,
paymentId: InvoicePaymentID,
chargebackId: InvoicePaymentChargebackID,
params: InvoicePaymentChargebackReopenParams
params: InvoicePaymentChargebackReopenParams,
): Observable<void> {
return this.client$.pipe(
switchMap((c) => c.ReopenChargeback(id, paymentId, chargebackId, params))
switchMap((c) => c.ReopenChargeback(id, paymentId, chargebackId, params)),
);
}
@ -116,10 +116,10 @@ export class InvoicingService {
id: InvoiceID,
paymentId: InvoicePaymentID,
chargebackId: InvoicePaymentChargebackID,
params: InvoicePaymentChargebackCancelParams
params: InvoicePaymentChargebackCancelParams,
): Observable<void> {
return this.client$.pipe(
switchMap((c) => c.CancelChargeback(id, paymentId, chargebackId, params))
switchMap((c) => c.CancelChargeback(id, paymentId, chargebackId, params)),
);
}
}

View File

@ -17,12 +17,12 @@ export class PartyManagementService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('PartyManagement'))
map(toWachterHeaders('PartyManagement')),
);
const metadata$ = from(
import('@vality/domain-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -31,8 +31,8 @@ export class PartyManagementService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -16,12 +16,12 @@ export class PayoutManagementService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('PayoutManagement'))
map(toWachterHeaders('PayoutManagement')),
);
const metadata$ = from(
import('@vality/payout-manager-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -30,8 +30,8 @@ export class PayoutManagementService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -22,12 +22,12 @@ export class RepairManagementService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('RepairManagement'))
map(toWachterHeaders('RepairManagement')),
);
const metadata$ = from(
import('@vality/repairer-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -36,8 +36,8 @@ export class RepairManagementService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -18,12 +18,12 @@ export class ManagementService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('WalletManagement'))
map(toWachterHeaders('WalletManagement')),
);
const metadata$ = from(
import('@vality/fistful-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -32,8 +32,8 @@ export class ManagementService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -17,12 +17,12 @@ export class ManagementService {
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
map(toWachterHeaders('WithdrawalManagement'))
map(toWachterHeaders('WithdrawalManagement')),
);
const metadata$ = from(
import('@vality/fistful-proto/metadata.json').then(
(m) => m.default as ThriftAstMetadata[]
)
(m) => m.default as ThriftAstMetadata[],
),
);
this.client$ = combineLatest([metadata$, headers$]).pipe(
switchMap(([metadata, headers]) =>
@ -31,8 +31,8 @@ export class ManagementService {
headers,
logging: environment.logging.requests,
path: '/wachter',
})
)
}),
),
);
}

View File

@ -15,7 +15,7 @@ import { AppAuthGuardService } from '@cc/app/shared/services';
],
{
paramsInheritanceStrategy: 'always',
}
},
),
],
providers: [AppAuthGuardService],

View File

@ -35,7 +35,7 @@ export class AppComponent implements OnInit {
constructor(
private keycloakService: KeycloakService,
private appAuthGuardService: AppAuthGuardService
private appAuthGuardService: AppAuthGuardService,
) {}
ngOnInit() {
@ -113,13 +113,13 @@ export class AppComponent implements OnInit {
services: WALLETS_ROUTING_CONFIG.services,
},
],
'name'
'name',
),
];
return menuItems.map((group) =>
group.filter((item) =>
this.appAuthGuardService.userHasSomeServiceMethods(item.services)
)
this.appAuthGuardService.userHasSomeServiceMethods(item.services),
),
);
}
}

View File

@ -91,7 +91,7 @@ export class AppModule {
constructor(
private matIconRegistry: MatIconRegistry,
private domSanitizer: DomSanitizer,
private injector: Injector
private injector: Injector,
) {
this.registerIcons();
AppInjector = this.injector;
@ -101,7 +101,7 @@ export class AppModule {
for (const name of icons) {
this.matIconRegistry.addSvgIcon(
name,
this.domSanitizer.bypassSecurityTrustResourceUrl(`../assets/icons/${name}.svg`)
this.domSanitizer.bypassSecurityTrustResourceUrl(`../assets/icons/${name}.svg`),
);
}
}

View File

@ -23,7 +23,7 @@ const initializer = (keycloak: KeycloakService, configService: ConfigService) =>
bearerPrefix: 'Bearer',
})
.then(() => keycloak.getToken()),
])
]),
),
]);

View File

@ -64,12 +64,12 @@ export class ChargebacksComponent implements OnInit {
dateRange: DateRange;
}>,
private fetchChargebacksService: FetchChargebacksService,
private dialog: DialogService
private dialog: DialogService,
) {}
ngOnInit() {
this.filtersForm.patchValue(
merge({}, this.qp.params.filters, clean({ dateRange: this.qp.params.dateRange }))
merge({}, this.qp.params.filters, clean({ dateRange: this.qp.params.dateRange })),
);
this.filtersForm.valueChanges
.pipe(startWith(null), debounceTime(500), untilDestroyed(this))
@ -102,10 +102,10 @@ export class ChargebacksComponent implements OnInit {
chargeback_statuses: rootParams.chargeback_statuses?.map(createUnion),
},
false,
true
true,
),
},
options
options,
);
this.active =
countProps(rootParams, commonParams) +
@ -118,7 +118,7 @@ export class ChargebacksComponent implements OnInit {
.afterClosed()
.pipe(
filter((res) => res.status === DialogResponseStatus.Success),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe((res) => {
this.filtersForm.reset({
@ -134,7 +134,7 @@ export class ChargebacksComponent implements OnInit {
.afterClosed()
.pipe(
filter((res) => res.status === DialogResponseStatus.Success),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe(() => {
this.load();

View File

@ -59,7 +59,7 @@ export class ChargebacksTableComponent {
formatter: (data) =>
this.amountCurrencyService.toMajor(
data.levy_amount,
data.levy_currency_code.symbolic_code
data.levy_currency_code.symbolic_code,
),
typeParameters: {
currencyCode: (data) => data.levy_currency_code.symbolic_code,
@ -80,7 +80,7 @@ export class ChargebacksTableComponent {
formatter: (data) =>
this.amountCurrencyService.toMajor(
data.provider_fee,
data.currency_code.symbolic_code
data.currency_code.symbolic_code,
),
typeParameters: {
currencyCode: (data) => data.currency_code.symbolic_code,
@ -92,7 +92,7 @@ export class ChargebacksTableComponent {
formatter: (data) =>
this.amountCurrencyService.toMajor(
data.external_fee,
data.currency_code.symbolic_code
data.currency_code.symbolic_code,
),
typeParameters: {
currencyCode: (data) => data.currency_code.symbolic_code,

View File

@ -28,7 +28,7 @@ export class CreateChargebackDialogComponent extends DialogSuperclass<
injector: Injector,
private invoicingService: InvoicingService,
private notificationErrorService: NotificationErrorService,
private log: NotifyLogService
private log: NotifyLogService,
) {
super(injector);
}
@ -38,7 +38,7 @@ export class CreateChargebackDialogComponent extends DialogSuperclass<
.CreateChargeback(
this.invoiceControl.value,
this.paymentControl.value,
this.form.value as InvoicePaymentChargebackParams
this.form.value as InvoicePaymentChargebackParams,
)
.pipe(untilDestroyed(this))
.subscribe({

View File

@ -47,7 +47,7 @@ export class CreateChargebacksByFileDialogComponent
]).pipe(
switchMap(([file]) => loadFileContent(file)),
map((content) =>
parseCsv(content, { header: this.hasHeaderControl.value || false, delimiter: ';' })
parseCsv(content, { header: this.hasHeaderControl.value || false, delimiter: ';' }),
),
tap((d) => {
if (!d.errors.length) return;
@ -58,18 +58,18 @@ export class CreateChargebacksByFileDialogComponent
const chargebacks = unifyCsvItems(d?.data, CSV_CHARGEBACK_PROPS);
if (chargebacks[0].invoice_id) return chargebacks;
this.log.error(
'Perhaps you incorrectly checked the checkbox to have or not a header (the first element does not have at least an invoice ID)'
'Perhaps you incorrectly checked the checkbox to have or not a header (the first element does not have at least an invoice ID)',
);
return [];
}),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
successfullyChargebacks: InvoicePaymentChargeback[] = [];
constructor(
injector: Injector,
private invoicingService: InvoicingService,
private log: NotifyLogService
private log: NotifyLogService,
) {
super(injector);
}
@ -87,26 +87,26 @@ export class CreateChargebacksByFileDialogComponent
this.invoicingService.CreateChargeback(
c.invoice_id,
c.payment_id,
csvChargebacksToInvoicePaymentChargebackParams(c)
)
csvChargebacksToInvoicePaymentChargebackParams(c),
),
),
2,
this.progress$
this.progress$,
)
.pipe(untilDestroyed(this))
.subscribe({
next: (res) => {
this.successfullyChargebacks.push(
...res.filter((c) => !c.hasError).map((c) => c.result)
...res.filter((c) => !c.hasError).map((c) => c.result),
);
const chargebacksWithError = res.filter((c) => c.hasError);
if (chargebacksWithError.length) {
this.log.error(
chargebacksWithError.map((c) => c.error),
`Creating ${chargebacksWithError.length} chargebacks ended in an error. They were re-selected in the table.`
`Creating ${chargebacksWithError.length} chargebacks ended in an error. They were re-selected in the table.`,
);
this.selectedChargebacks = chargebacksWithError.map(
(c) => selected[c.index]
(c) => selected[c.index],
);
} else {
this.log.successOperation('create', 'chargebacks');

View File

@ -5,7 +5,7 @@ import short from 'short-uuid';
import { CsvChargeback } from '../types/csv-chargeback';
export function csvChargebacksToInvoicePaymentChargebackParams(
c: CsvChargeback
c: CsvChargeback,
): InvoicePaymentChargebackParams {
return clean(
{
@ -27,7 +27,7 @@ export function csvChargebacksToInvoicePaymentChargebackParams(
symbolic_code: c['body.currency.symbolic_code'],
},
},
true
true,
),
transaction_info: clean(
{
@ -38,7 +38,7 @@ export function csvChargebacksToInvoicePaymentChargebackParams(
? JSON.parse(c['transaction_info.additional_info'])
: undefined,
},
true
true,
),
external_id: c.external_id,
context: clean(
@ -46,11 +46,11 @@ export function csvChargebacksToInvoicePaymentChargebackParams(
type: c['context.type'],
data: c['context.data'],
},
true
true,
),
occurred_at: c['occurred_at'],
},
false,
true
true,
);
}

View File

@ -15,7 +15,7 @@ export class FetchChargebacksService extends FetchSuperclass<
> {
constructor(
private merchantStatisticsService: MerchantStatisticsService,
private log: NotifyLogService
private log: NotifyLogService,
) {
super();
}
@ -38,7 +38,7 @@ export class FetchChargebacksService extends FetchSuperclass<
catchError((err) => {
this.log.errorOperation(err, 'receive', 'chargebacks');
return of({ result: [] });
})
}),
);
}
}

View File

@ -28,29 +28,29 @@ export class ClaimComponent {
switchMap(({ partyID }) =>
this.partyManagementService
.Get(partyID)
.pipe(progressTo(this.progress$), handleError(this.notificationErrorService.error))
.pipe(progressTo(this.progress$), handleError(this.notificationErrorService.error)),
),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
claim$ = merge(
this.route.params,
defer(() => this.loadClaim$)
defer(() => this.loadClaim$),
).pipe(
map(() => this.route.snapshot.params as Record<string, string>),
switchMap(({ partyID, claimID }) =>
this.claimManagementService
.GetClaim(partyID, Number(claimID))
.pipe(progressTo(this.progress$), handleError(this.notificationErrorService.error))
.pipe(progressTo(this.progress$), handleError(this.notificationErrorService.error)),
),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
isAllowedChangeStatus$ = this.claim$.pipe(
map(
(claim) =>
!!this.allowedClaimStatusesService.getAllowedStatuses(getUnionKey(claim.status))
.length
.length,
),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
isLoading$ = inProgressFrom(() => this.progress$, merge(this.claim$, this.party$));
statusColor = CLAIM_STATUS_COLOR;
@ -65,7 +65,7 @@ export class ClaimComponent {
private notificationService: NotificationService,
private allowedClaimStatusesService: AllowedClaimStatusesService,
private dialogService: DialogService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {}
reloadClaim() {
@ -79,9 +79,9 @@ export class ClaimComponent {
switchMap(([party, claim]) =>
this.dialogService
.open(AddModificationDialogComponent, { party, claim })
.afterClosed()
.afterClosed(),
),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe((result) => {
if (result.status === DialogResponseStatus.Success) this.reloadClaim();
@ -95,9 +95,9 @@ export class ClaimComponent {
switchMap(([party, claim]) =>
this.dialogService
.open(ChangeStatusDialogComponent, { partyID: party.id, claim })
.afterClosed()
.afterClosed(),
),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe((result) => {
if (result.status === DialogResponseStatus.Success) this.reloadClaim();

View File

@ -26,7 +26,7 @@ export class AddModificationDialogComponent extends DialogSuperclass<
control = this.fb.control<Modification | ModificationChange>(
this.dialogData.modificationUnit?.modification || null,
Validators.required
Validators.required,
);
isLoading$ = inProgressFrom(() => this.progress$);
@ -41,7 +41,7 @@ export class AddModificationDialogComponent extends DialogSuperclass<
private fb: FormBuilder,
private claimManagementService: ClaimManagementService,
private notificationService: NotificationService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {
super(injector);
}
@ -68,7 +68,7 @@ export class AddModificationDialogComponent extends DialogSuperclass<
claim.id,
claim.revision,
modificationUnit.modification_id,
this.control.value
this.control.value,
)
.pipe(progressTo(this.progress$), untilDestroyed(this))
.subscribe({

View File

@ -27,7 +27,7 @@ export class ChangeStatusDialogComponent extends DialogSuperclass<
denyReason: null as string,
});
statuses = this.allowedClaimStatusesService.getAllowedStatuses(
getUnionKey(this.dialogData.claim.status)
getUnionKey(this.dialogData.claim.status),
);
inProgress$ = inProgressFrom(() => this.progress$);
@ -39,7 +39,7 @@ export class ChangeStatusDialogComponent extends DialogSuperclass<
private claimManagementService: ClaimManagementService,
private notificationService: NotificationService,
private allowedClaimStatusesService: AllowedClaimStatusesService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {
super(injector);
}

View File

@ -27,7 +27,7 @@ export class ModificationFormComponent
metadata$ = from(import('@vality/domain-proto/metadata.json').then((m) => m.default));
extensions$ = combineLatest([
defer(() => this.claimOrPartyChanged$).pipe(
map(() => createPartyClaimMetadataFormExtensions(this.party, this.claim))
map(() => createPartyClaimMetadataFormExtensions(this.party, this.claim)),
),
this.domainMetadataFormExtensionsService.extensions$,
]).pipe(map((extensionGroups) => extensionGroups.flat()));

View File

@ -11,7 +11,7 @@ import {
} from '@cc/app/shared/components/metadata-form';
function createPartyOptions(
values: IterableIterator<{ id: string }>
values: IterableIterator<{ id: string }>,
): MetadataFormExtensionOption[] {
return Array.from(values).map((value) => ({
label: 'from party',
@ -21,7 +21,7 @@ function createPartyOptions(
}
function createClaimOptions(
modificationUnits: { id: string; modification: unknown }[]
modificationUnits: { id: string; modification: unknown }[],
): MetadataFormExtensionOption[] {
return uniqBy(
modificationUnits.filter(Boolean).map((unit) => ({
@ -30,7 +30,7 @@ function createClaimOptions(
value: unit.id,
color: 'primary',
})),
'value'
'value',
);
}
@ -40,7 +40,7 @@ function generate() {
export function createPartyClaimMetadataFormExtensions(
party: Party,
claim: Claim
claim: Claim,
): MetadataFormExtension[] {
return [
{
@ -51,8 +51,8 @@ export function createPartyClaimMetadataFormExtensions(
...createClaimOptions(
claim.changeset.map(
(unit) =>
unit.modification.party_modification?.contractor_modification
)
unit.modification.party_modification?.contractor_modification,
),
),
...createPartyOptions(party.contractors.values()),
],
@ -68,8 +68,8 @@ export function createPartyClaimMetadataFormExtensions(
...createClaimOptions(
claim.changeset.map(
(unit) =>
unit.modification.party_modification?.contract_modification
)
unit.modification.party_modification?.contract_modification,
),
),
...createPartyOptions(party.contracts.values()),
],
@ -84,8 +84,8 @@ export function createPartyClaimMetadataFormExtensions(
options: [
...createClaimOptions(
claim.changeset.map(
(unit) => unit.modification.party_modification?.shop_modification
)
(unit) => unit.modification.party_modification?.shop_modification,
),
),
...createPartyOptions(party.shops.values()),
],
@ -100,8 +100,8 @@ export function createPartyClaimMetadataFormExtensions(
options: [
...createClaimOptions(
claim.changeset.map(
(unit) => unit.modification.party_modification?.wallet_modification
)
(unit) => unit.modification.party_modification?.wallet_modification,
),
),
...createPartyOptions(party.wallets.values()),
],

View File

@ -48,7 +48,7 @@ export class ModificationUnitTimelineItemComponent {
private claimManagementService: ClaimManagementService,
private notificationService: NotificationService,
private domainMetadataViewExtensionsService: DomainMetadataViewExtensionsService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {}
get name() {
@ -71,9 +71,9 @@ export class ModificationUnitTimelineItemComponent {
claim: this.claim,
modificationUnit: this.modificationUnit,
})
.afterClosed()
.afterClosed(),
),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe((result) => {
if (result.status === DialogResponseStatus.Success) this.claimChanged.emit();
@ -92,11 +92,11 @@ export class ModificationUnitTimelineItemComponent {
party.id,
this.claim.id,
this.claim.revision,
this.modificationUnit.modification_id
)
this.modificationUnit.modification_id,
),
),
progressTo(this.progress$),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe({
next: () => {

View File

@ -2,8 +2,8 @@
<span [ngClass]="{ outdated: outdated, removed: removed }">
{{ text }}
<span *ngIf="createdAt"
>at {{ createdAt | date : 'dd.MM.yyyy HH:mm:ss' }} ({{
createdAt | humanizedDuration : { largest: 1, hasAgoEnding: true }
>at {{ createdAt | date: 'dd.MM.yyyy HH:mm:ss' }} ({{
createdAt | humanizedDuration: { largest: 1, hasAgoEnding: true }
}})</span
>
</span>

View File

@ -55,7 +55,10 @@ export class ClaimsTableComponent {
]),
];
constructor(private router: Router, private partiesStoreService: PartiesStoreService) {}
constructor(
private router: Router,
private partiesStoreService: PartiesStoreService,
) {}
navigateToClaim(partyId: string, claimID: number) {
void this.router.navigate([`/party/${partyId}/claim/${claimID}`]);

View File

@ -33,7 +33,7 @@ export class ClaimsComponent implements OnInit {
private fetchClaimsService: FetchClaimsService,
private dialogService: DialogService,
private fb: NonNullableFormBuilder,
private qp: QueryParamsService<ClaimsComponent['filtersForm']['value']>
private qp: QueryParamsService<ClaimsComponent['filtersForm']['value']>,
) {}
ngOnInit(): void {
@ -50,7 +50,7 @@ export class ClaimsComponent implements OnInit {
void this.qp.set(filters);
this.fetchClaimsService.load(
{ ...filters, statuses: filters.statuses?.map((status) => ({ [status]: {} })) || [] },
options
options,
);
this.active = Object.keys(filters).length;
}

View File

@ -27,7 +27,7 @@ export class CreateClaimDialogComponent extends DialogSuperclass<
private claimService: ClaimManagementService,
private notificationService: NotificationService,
private notificationErrorService: NotificationErrorService,
private router: Router
private router: Router,
) {
super(injector);
}
@ -45,7 +45,7 @@ export class CreateClaimDialogComponent extends DialogSuperclass<
error: (err) => {
this.notificationErrorService.error(
err,
'An error occurred while claim creation'
'An error occurred while claim creation',
);
},
});

View File

@ -13,14 +13,14 @@ export class FetchClaimsService extends FetchSuperclass<
> {
constructor(
private claimManagementService: ClaimManagementService,
private log: NotifyLogService
private log: NotifyLogService,
) {
super();
}
protected fetch(
params: Omit<ClaimSearchQuery, 'continuation_token' | 'limit'>,
{ size, continuationToken }: FetchOptions
{ size, continuationToken }: FetchOptions,
): Observable<FetchResult<Claim>> {
return this.claimManagementService
.SearchClaims({
@ -36,7 +36,7 @@ export class FetchClaimsService extends FetchSuperclass<
catchError((err) => {
this.log.errorOperation(err, 'receive', 'claims');
return of({ result: [] });
})
}),
);
}
}

View File

@ -16,7 +16,7 @@ export class DepositDetailsComponent implements OnInit {
constructor(
private fetchDepositService: ReceiveDepositService,
private route: ActivatedRoute
private route: ActivatedRoute,
) {}
ngOnInit() {

View File

@ -18,7 +18,7 @@
{{ 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'
deposit.created_at | date: 'dd.MM.yyyy HH:mm:ss'
}}</cc-details-item>
</div>
<div fxFlexFill fxLayout fxLayoutGap="16px">

View File

@ -35,7 +35,7 @@ export class CreateRevertDialogComponent extends DialogSuperclass<
private fb: NonNullableFormBuilder,
private depositManagementService: ManagementService,
private idGenerator: UserInfoBasedIdGeneratorService,
private log: NotifyLogService
private log: NotifyLogService,
) {
super(injector);
}
@ -58,8 +58,8 @@ export class CreateRevertDialogComponent extends DialogSuperclass<
external_id: externalID,
},
false,
true
)
true,
),
)
.pipe(untilDestroyed(this))
.subscribe({

View File

@ -26,7 +26,7 @@
<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' }}
{{ revert.created_at | date: 'dd.MM.yyyy HH:mm:ss' }}
</td>
</ng-container>

View File

@ -23,7 +23,10 @@ export class RevertsComponent implements OnInit {
hasMore$ = this.fetchRevertsService.hasMore$;
doAction$ = this.fetchRevertsService.doAction$;
constructor(private fetchRevertsService: FetchRevertsService, private dialog: DialogService) {}
constructor(
private fetchRevertsService: FetchRevertsService,
private dialog: DialogService,
) {}
ngOnInit() {
this.fetchRevertsService.search({ deposit_id: this.deposit.id });

View File

@ -14,14 +14,14 @@ import { FetchRevertsParams } from '../../types/fetch-reverts-params';
export class FetchRevertsService extends PartialFetcher<StatDepositRevert, FetchRevertsParams> {
constructor(
private fistfulStatisticsService: FistfulStatisticsService,
@Inject(SMALL_SEARCH_LIMIT) private smallSearchLimit: number
@Inject(SMALL_SEARCH_LIMIT) private smallSearchLimit: number,
) {
super();
}
fetch(
params: FetchRevertsParams,
continuationToken: string
continuationToken: string,
): Observable<FetchResult<StatDepositRevert>> {
return this.fistfulStatisticsService
.GetDepositReverts({
@ -37,7 +37,7 @@ export class FetchRevertsService extends PartialFetcher<StatDepositRevert, Fetch
map((res) => ({
result: res.data.deposit_reverts,
continuationToken: res.continuation_token,
}))
})),
);
}
}

View File

@ -22,11 +22,11 @@ export class ReceiveDepositService {
this.error$.next(true);
this.notificationErrorService.error(err);
return EMPTY;
})
)
}),
),
),
map(({ data }) => data?.deposits[0]),
shareReplay(1)
shareReplay(1),
);
// eslint-disable-next-line @typescript-eslint/member-ordering
@ -34,7 +34,7 @@ export class ReceiveDepositService {
constructor(
private fistfulStatisticsService: FistfulStatisticsService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {}
receiveDeposit(id: string) {

View File

@ -34,7 +34,7 @@ export class CreateDepositDialogComponent implements OnInit {
private snackBar: MatSnackBar,
private dialogRef: MatDialogRef<CreateDepositDialogComponent>,
private configService: ConfigService,
private fetchSourcesService: FetchSourcesService
private fetchSourcesService: FetchSourcesService,
) {}
ngOnInit() {
@ -43,7 +43,7 @@ export class CreateDepositDialogComponent implements OnInit {
.afterClosed()
.pipe(
switchMap(() => this.sources$.pipe(first())),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe((sources) => this.form.reset({ currency: sources[0] }));
this.depositCreated$.subscribe((deposit) => {

View File

@ -35,9 +35,9 @@ export class CreateDepositService {
catchError(() => {
this.errorSubject$.next(true);
return EMPTY;
})
}),
),
])
]),
),
switchMap(([pollingParams]) =>
this.fistfulStatisticsService.GetDeposits(pollingParams).pipe(
@ -50,15 +50,15 @@ export class CreateDepositService {
catchError(() => {
this.pollingTimeoutSubject$.next(true);
return EMPTY;
})
)
)
}),
),
),
);
// eslint-disable-next-line @typescript-eslint/member-ordering
isLoading$ = progress(
this.create$,
merge([this.depositCreated$, this.errorSubject$, this.pollingErrorSubject$])
merge([this.depositCreated$, this.errorSubject$, this.pollingErrorSubject$]),
);
// eslint-disable-next-line @typescript-eslint/member-ordering
@ -81,7 +81,7 @@ export class CreateDepositService {
private fb: FormBuilder,
private idGenerator: UserInfoBasedIdGeneratorService,
private configService: ConfigService,
private fetchSourcesService: FetchSourcesService
private fetchSourcesService: FetchSourcesService,
) {
this.initForm();
}

View File

@ -30,12 +30,12 @@ export class DepositsComponent implements OnInit {
private paramsStoreService: ParamsStoreService,
private fetchDepositsService: FetchDepositsService,
private snackBar: MatSnackBar,
private router: Router
private router: Router,
) {}
ngOnInit() {
this.fetchDepositsService.errors$.subscribe((e) =>
this.snackBar.open(`An error occurred while search deposits (${String(e)})`, 'OK')
this.snackBar.open(`An error occurred while search deposits (${String(e)})`, 'OK'),
);
}
@ -45,7 +45,7 @@ export class DepositsComponent implements OnInit {
.afterClosed()
.pipe(
filter((deposit) => !!deposit),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe(() => {
this.refresh();

View File

@ -48,10 +48,10 @@ export class SearchFiltersComponent implements OnInit {
constructor(
private searchFiltersService: SearchFiltersService,
private configService: ConfigService,
private fetchSourcesService: FetchSourcesService
private fetchSourcesService: FetchSourcesService,
) {
this.searchFiltersService.searchParamsChanges$.subscribe((params) =>
this.valueChanges.emit(params)
this.valueChanges.emit(params),
);
}

View File

@ -25,7 +25,7 @@ export class SearchFiltersService {
debounceTime(600),
filter(() => this.form.valid),
map(formValueToSearchParams),
shareReplay(1)
shareReplay(1),
);
constructor(private fb: UntypedFormBuilder) {}

View File

@ -11,4 +11,4 @@ export const searchParamsToFormParams = (value: SearchParams): FormValue =>
...(value.fromTime ? { fromTime: moment(value.fromTime) } : {}),
...(value.toTime ? { toTime: moment(value.toTime) } : {}),
...(value.amountTo ? { amountTo: toMajor(value.amountTo) } : {}),
} as FormValue);
}) as FormValue;

View File

@ -13,7 +13,7 @@ import { SearchParams } from '../../types/search-params';
export class FetchDepositsService extends PartialFetcher<StatDeposit, SearchParams> {
constructor(
private fistfulStatisticsService: FistfulStatisticsService,
@Inject(SEARCH_LIMIT) private searchLimit: number
@Inject(SEARCH_LIMIT) private searchLimit: number,
) {
super();
}
@ -26,14 +26,14 @@ export class FetchDepositsService extends PartialFetcher<StatDeposit, SearchPara
...params,
size: this.searchLimit,
},
continuationToken
)
continuationToken,
),
)
.pipe(
map((res) => ({
result: res.data.deposits,
continuationToken: res.continuation_token,
}))
})),
);
}
}

View File

@ -7,7 +7,10 @@ import { SearchParams } from '../../types/search-params';
@Injectable()
export class ParamsStoreService extends QueryParamsStore<SearchParams> {
constructor(protected route: ActivatedRoute, protected router: Router) {
constructor(
protected route: ActivatedRoute,
protected router: Router,
) {
super(router, route);
}

View File

@ -51,11 +51,11 @@ export class DomainGroupComponent implements OnInit, AfterViewInit {
...data[idx],
type,
stringified: JSON.stringify(
objectToJSON([data[idx].obj, data[idx].ref, type])
objectToJSON([data[idx].obj, data[idx].ref, type]),
),
}))
)
)
})),
),
),
),
switchMap((data: DataSourceItem[]) =>
combineLatest([
@ -63,19 +63,21 @@ export class DomainGroupComponent implements OnInit, AfterViewInit {
this.typesControl.valueChanges.pipe(startWith(this.typesControl.value)),
]).pipe(
map(([searchStr, selectedTypes]) =>
this.createMatTableDataSource(data, searchStr, selectedTypes)
)
)
this.createMatTableDataSource(data, searchStr, selectedTypes),
),
),
),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
cols = new Columns('type', 'ref', 'obj', 'actions');
fields$ = this.metadataService.getDomainFields().pipe(
map((fields) => sortBy(fields, 'type')),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
options$ = this.fields$.pipe(
map((fields) => fields.map(({ type }) => ({ label: startCase(String(type)), value: type })))
map((fields) =>
fields.map(({ type }) => ({ label: startCase(String(type)), value: type })),
),
);
isLoading$ = this.domainStoreService.isLoading$;
@ -84,7 +86,7 @@ export class DomainGroupComponent implements OnInit, AfterViewInit {
constructor(
private domainStoreService: DomainStoreService,
private metadataService: MetadataService,
private queryParamsService: QueryParamsService<Params>
private queryParamsService: QueryParamsService<Params>,
) {}
ngOnInit() {
@ -94,7 +96,7 @@ export class DomainGroupComponent implements OnInit, AfterViewInit {
this.queryParamsService.params$
.pipe(
filter((p) => !!p.ref),
withLatestFrom(this.domainStoreService.getDomain())
withLatestFrom(this.domainStoreService.getDomain()),
)
.subscribe(([params, domain]) => {
domain.forEach((obj, ref) => {
@ -116,10 +118,10 @@ export class DomainGroupComponent implements OnInit, AfterViewInit {
private createMatTableDataSource(
data: DataSourceItem[],
searchStr: string,
selectedTypes: string[]
selectedTypes: string[],
) {
const dataSource = new MatTableDataSource(
data.filter((d) => selectedTypes.includes(d.type))
data.filter((d) => selectedTypes.includes(d.type)),
);
dataSource.paginator = this.paginator;
dataSource.sort = this.sort;

View File

@ -16,7 +16,7 @@ export function sortData(data: DataSourceItem[], sort: MatSort): DataSourceItem[
break;
case 'ref': {
const groups = groupBy(data, (o) =>
typeof getUnionValue(o.ref)?.['id'] === 'number' ? 0 : 1
typeof getUnionValue(o.ref)?.['id'] === 'number' ? 0 : 1,
);
data = [

View File

@ -55,7 +55,7 @@ export class DomainInfoComponent {
private notificationService: NotificationService,
private notificationErrorService: NotificationErrorService,
private domainMetadataViewExtensionsService: DomainMetadataViewExtensionsService,
private queryParamsService: QueryParamsService<{ ref?: Reference }>
private queryParamsService: QueryParamsService<{ ref?: Reference }>,
) {}
edit() {
@ -72,8 +72,8 @@ export class DomainInfoComponent {
switchMap(() =>
this.domainStoreService.commit({
ops: [{ remove: { object: this.objWithRef.obj } }],
})
)
}),
),
)
.subscribe({
next: () => {

View File

@ -65,7 +65,7 @@ export class DomainObjCreationComponent {
private notificationService: NotificationService,
private notificationErrorService: NotificationErrorService,
private domainNavigateService: DomainNavigateService,
private metadataService: MetadataService
private metadataService: MetadataService,
) {}
reviewChanges() {
@ -77,10 +77,10 @@ export class DomainObjCreationComponent {
.commit({ ops: [{ insert: { object: this.control.value } }] })
.pipe(
withLatestFrom(
this.metadataService.getDomainFieldByFieldName(getUnionKey(this.control.value))
this.metadataService.getDomainFieldByFieldName(getUnionKey(this.control.value)),
),
progressTo(this.progress$),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe({
next: ([, field]) => {

View File

@ -32,6 +32,6 @@ export class DomainObjCodeLensProvider implements CodeLensProvider {
resolveCodeLens?(
model: ITextModel,
codeLens: CodeLens,
token: CancellationToken
token: CancellationToken,
): ProviderResult<CodeLens>;
}

View File

@ -54,7 +54,7 @@ export class DomainObjModificationComponent implements OnInit {
private domainObjModService: DomainObjModificationService,
private modifiedDomainObjectService: ModifiedDomainObjectService,
private domainMetadataFormExtensionsService: DomainMetadataFormExtensionsService,
private domainNavigateService: DomainNavigateService
private domainNavigateService: DomainNavigateService,
) {}
ngOnInit() {

View File

@ -35,7 +35,7 @@ export class DomainObjReviewComponent {
private notificationService: NotificationService,
private notificationErrorService: NotificationErrorService,
private domainNavigateService: DomainNavigateService,
private domainSecretService: DomainSecretService
private domainSecretService: DomainSecretService,
) {
if (!modifiedDomainObjectService.domainObject) {
this.back();
@ -59,10 +59,10 @@ export class DomainObjReviewComponent {
},
},
],
})
}),
),
withLatestFrom(this.type$),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe({
next: ([, type]) => {

View File

@ -17,11 +17,11 @@ export class DomainObjModificationService {
object$ = defer(() => this.ref$).pipe(
switchMap((ref) => this.getDomainObject(ref, false).pipe(progressTo(this.progress$))),
map((obj) => getUnionValue(obj)),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
type$ = defer(() => this.ref$).pipe(
switchMap((ref) => this.metadataService.getDomainObjectType(ref)),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
private ref$ = this.route.params.pipe(
@ -32,14 +32,14 @@ export class DomainObjModificationService {
this.notificationErrorService.error(err, 'Malformed domain object ref');
return null;
}
})
}),
);
constructor(
private route: ActivatedRoute,
private domainStoreService: DomainStoreService,
private metadataService: MetadataService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {}
private getDomainObject(ref: Reference, rawDomain: boolean): Observable<DomainObject> {
@ -48,9 +48,9 @@ export class DomainObjModificationService {
map((domain) => {
const searchRef = JSON.stringify(ref);
return domain.get(
Array.from(domain.keys()).find((k) => JSON.stringify(toJson(k)) === searchRef)
Array.from(domain.keys()).find((k) => JSON.stringify(toJson(k)) === searchRef),
);
})
}),
);
}
}

View File

@ -8,7 +8,7 @@ import { map, shareReplay } from 'rxjs/operators';
@Injectable()
export class MetadataService {
private metadata$: Observable<ThriftAstMetadata[]> = from(
import('@vality/domain-proto/metadata.json').then((m) => m.default)
import('@vality/domain-proto/metadata.json').then((m) => m.default),
).pipe(shareReplay(1)) as Observable<ThriftAstMetadata[]>;
get metadata() {
@ -28,19 +28,19 @@ export class MetadataService {
map((d) => {
const found = d.find(({ name }) => name === searchName);
return found ? (found.type as string) : null;
})
}),
);
}
getDomainFieldByFieldName(fieldName: string): Observable<Field> {
return this.getDomainFields().pipe(
map((fields) => fields.find((f) => f.name === fieldName))
map((fields) => fields.find((f) => f.name === fieldName)),
);
}
getDomainFields(): Observable<Field[]> {
return this.metadata$.pipe(
map((m) => m.find(({ name }) => name === 'domain').ast.union.DomainObject)
map((m) => m.find(({ name }) => name === 'domain').ast.union.DomainObject),
);
}
}

View File

@ -10,17 +10,17 @@ import { PartyManagementService } from '@cc/app/api/payment-processing';
export class PartyShopsService {
shops$ = defer(() => this.party$).pipe(
pluck('shops'),
map((shops) => Array.from(shops.values()))
map((shops) => Array.from(shops.values())),
);
private party$: Observable<Party> = this.route.params.pipe(
pluck('partyID'),
switchMap((partyID) => this.partyManagementService.Get(partyID)),
shareReplay(1)
shareReplay(1),
);
constructor(
private partyManagementService: PartyManagementService,
private route: ActivatedRoute
private route: ActivatedRoute,
) {}
}

View File

@ -17,7 +17,10 @@ export class ShopsTableComponent implements OnChanges {
dataSource: MatTableDataSource<Shop> = new MatTableDataSource();
displayedColumns = ['id', 'name', 'url', 'actions'];
constructor(private router: Router, private route: ActivatedRoute) {}
constructor(
private router: Router,
private route: ActivatedRoute,
) {}
ngOnChanges({ shops }: SimpleChanges) {
if (shops.currentValue) {

View File

@ -20,7 +20,7 @@ export class PartyComponent {
filter((e) => e instanceof NavigationEnd),
startWith(undefined),
map(() => this.findLinkWithMaxActiveFragments()),
shareReplay(1)
shareReplay(1),
);
partyID$: Observable<string>;
@ -30,7 +30,7 @@ export class PartyComponent {
private route: ActivatedRoute,
private router: Router,
private appAuthGuardService: AppAuthGuardService,
private deanonimusService: DeanonimusService
private deanonimusService: DeanonimusService,
) {
this.partyID$ = this.route.params.pipe(pluck('partyID'), shareReplay(1));
this.merchantEmail$ = this.partyID$.pipe(
@ -41,7 +41,7 @@ export class PartyComponent {
console.error(err);
return of('--/--');
}),
shareReplay(1)
shareReplay(1),
);
}
@ -65,7 +65,7 @@ export class PartyComponent {
},
];
return links.filter((item) =>
this.appAuthGuardService.userHasSomeServiceMethods(item.services)
this.appAuthGuardService.userHasSomeServiceMethods(item.services),
);
}

View File

@ -31,7 +31,7 @@ export class CreateChargebackDialogComponent extends DialogSuperclass<
private invoicingService: InvoicingService,
private domainMetadataFormExtensionsService: DomainMetadataFormExtensionsService,
private notificationErrorService: NotificationErrorService,
private notificationService: NotificationService
private notificationService: NotificationService,
) {
super(injector);
}
@ -41,7 +41,7 @@ export class CreateChargebackDialogComponent extends DialogSuperclass<
.CreateChargeback(
this.dialogData.invoiceID,
this.dialogData.paymentID,
this.form.value as InvoicePaymentChargebackParams
this.form.value as InvoicePaymentChargebackParams,
)
.pipe(untilDestroyed(this))
.subscribe({

View File

@ -25,17 +25,17 @@ export class PaymentDetailsComponent {
chargebacks$ = merge(
this.route.params,
defer(() => this.updateChargebacks$)
defer(() => this.updateChargebacks$),
).pipe(
map(() => this.route.snapshot.params as Record<'invoiceID' | 'paymentID', string>),
switchMap(({ invoiceID, paymentID }) =>
this.invoicingService.GetPayment(invoiceID, paymentID)
this.invoicingService.GetPayment(invoiceID, paymentID),
),
map(({ chargebacks }) => chargebacks),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
metadata$ = from(
import('@vality/magista-proto/metadata.json').then((m) => m.default as ThriftAstMetadata[])
import('@vality/magista-proto/metadata.json').then((m) => m.default as ThriftAstMetadata[]),
);
private updateChargebacks$ = new Subject<void>();
@ -44,14 +44,14 @@ export class PaymentDetailsComponent {
private paymentDetailsService: PaymentDetailsService,
private route: ActivatedRoute,
private invoicingService: InvoicingService,
private dialogService: DialogService
private dialogService: DialogService,
) {}
createChargeback() {
this.dialogService
.open(
CreateChargebackDialogComponent,
this.route.snapshot.params as Record<'invoiceID' | 'paymentID', string>
this.route.snapshot.params as Record<'invoiceID' | 'paymentID', string>,
)
.afterClosed()
.pipe(untilDestroyed(this))

View File

@ -30,7 +30,7 @@ export class PaymentDetailsService {
payment_id: paymentID,
},
invoice_ids: [invoiceID],
})
}),
)
.pipe(
map(({ payments }) => payments[0]),
@ -38,10 +38,10 @@ export class PaymentDetailsService {
if (!payment) {
this.snackBar.open('An error occurred when receiving payment', 'OK');
}
})
)
}),
),
),
shareReplay(1)
shareReplay(1),
);
// eslint-disable-next-line @typescript-eslint/member-ordering
@ -51,13 +51,13 @@ export class PaymentDetailsService {
shop$ = this.payment$.pipe(
switchMap((payment) => combineLatest([this.partyID$, of(payment.shop_id)])),
switchMap(([partyID, shopID]) => this.partyManagementService.GetShop(partyID, shopID)),
shareReplay(1)
shareReplay(1),
);
constructor(
private partyManagementService: PartyManagementService,
private merchantStatisticsService: MerchantStatisticsService,
private route: ActivatedRoute,
private snackBar: MatSnackBar
private snackBar: MatSnackBar,
) {}
}

View File

@ -21,20 +21,20 @@ export class FetchContractorService {
this.hasError$.next();
return of('error');
}),
filter((result) => result !== 'error')
filter((result) => result !== 'error'),
),
])
]),
),
map(([contractID, party]: [ContractID, Party]) => {
const contractorID = party.contracts.get(contractID)?.contractor_id;
return party.contractors.get(contractorID)?.contractor;
}),
shareReplay(1)
shareReplay(1),
);
// eslint-disable-next-line @typescript-eslint/member-ordering
inProgress$ = progress(this.getContractor$, merge(this.contractor$, this.hasError$)).pipe(
startWith(true)
startWith(true),
);
constructor(private partyManagementService: PartyManagementService) {

View File

@ -5,7 +5,7 @@
{{ payment.currency_symbolic_code | ccCurrency }}</cc-details-item
>
<cc-details-item fxFlex title="Created At">{{
payment.created_at | date : 'dd.MM.yyyy HH:mm:ss'
payment.created_at | date: 'dd.MM.yyyy HH:mm:ss'
}}</cc-details-item>
<cc-details-item fxFlex title="Status">
<cc-status [color]="payment.status | toStatus | toPaymentColor">{{

View File

@ -19,15 +19,15 @@ export class FetchProviderService {
this.hasError$.next();
return of('error');
}),
filter((result) => result !== 'error')
)
filter((result) => result !== 'error'),
),
),
shareReplay(1)
shareReplay(1),
);
// eslint-disable-next-line @typescript-eslint/member-ordering
inProgress$ = progress(this.getProvider$, merge(this.provider$, this.hasError$)).pipe(
startWith(true)
startWith(true),
);
constructor(private domainStoreService: DomainStoreService) {

View File

@ -19,15 +19,15 @@ export class FetchTerminalService {
this.hasError$.next();
return of('error');
}),
filter((result) => result !== 'error')
)
filter((result) => result !== 'error'),
),
),
shareReplay(1)
shareReplay(1),
);
// eslint-disable-next-line @typescript-eslint/member-ordering
inProgress$ = progress(this.getTerminal$, merge(this.terminal$, this.hasError$)).pipe(
startWith(true)
startWith(true),
);
constructor(private domainStoreService: DomainStoreService) {

View File

@ -21,7 +21,7 @@ export class FetchRefundsService extends PartialFetcher<
protected fetch(
params: DeepPartial<RefundSearchQuery>,
continuationToken: string
continuationToken: string,
): Observable<FetchResult<StatRefund>> {
return this.merchantStatisticsService
.SearchRefunds(
@ -34,15 +34,15 @@ export class FetchRefundsService extends PartialFetcher<
from_time: new Date('01.01.2020').toISOString(), // TODO
to_time: new Date().toISOString(),
},
params.common_search_query_params
params.common_search_query_params,
),
})
}),
)
.pipe(
map(({ refunds, continuation_token }) => ({
result: refunds,
continuationToken: continuation_token,
}))
})),
);
}
}

View File

@ -17,7 +17,10 @@ export class PaymentRefundsComponent implements OnInit {
hasMore$ = this.fetchRefundsService.hasMore$;
refunds$ = this.fetchRefundsService.searchResult$;
constructor(private fetchRefundsService: FetchRefundsService, private snackBar: MatSnackBar) {}
constructor(
private fetchRefundsService: FetchRefundsService,
private snackBar: MatSnackBar,
) {}
ngOnInit() {
this.fetchRefundsService.search({
@ -26,7 +29,7 @@ export class PaymentRefundsComponent implements OnInit {
invoice_ids: [this.invoiceID],
});
this.fetchRefundsService.errors$.subscribe((e) =>
this.snackBar.open(`An error occurred while search refunds (${String(e)})`, 'OK')
this.snackBar.open(`An error occurred while search refunds (${String(e)})`, 'OK'),
);
}

View File

@ -2,21 +2,21 @@
<ng-container matColumnDef="createdAt">
<th *matHeaderCellDef class="mat-caption" mat-header-cell>Created At</th>
<td *matCellDef="let refund" mat-cell>
{{ refund.created_at | date : 'dd.MM.yyyy HH:mm:ss' }}
{{ refund.created_at | date: 'dd.MM.yyyy HH:mm:ss' }}
</td>
</ng-container>
<ng-container matColumnDef="status">
<th *matHeaderCellDef class="mat-caption" mat-header-cell>Status</th>
<td *matCellDef="let refund" mat-cell>
<cc-status>{{ refund.status | ccMapUnion : mapStatus }}</cc-status>
<cc-status>{{ refund.status | ccMapUnion: mapStatus }}</cc-status>
</td>
</ng-container>
<ng-container matColumnDef="amount">
<th *matHeaderCellDef class="mat-caption" mat-header-cell>Amount</th>
<td *matCellDef="let refund" mat-cell>
{{ refund.amount | amountCurrency : refund.currency_symbolic_code }}
{{ refund.amount | amountCurrency: refund.currency_symbolic_code }}
</td>
</ng-container>

View File

@ -32,7 +32,7 @@ export class CreatePaymentAdjustmentComponent extends DialogSuperclass<
injector: Injector,
private invoicingService: InvoicingService,
private log: NotifyLogService,
private domainMetadataFormExtensionsService: DomainMetadataFormExtensionsService
private domainMetadataFormExtensionsService: DomainMetadataFormExtensionsService,
) {
super(injector);
}
@ -57,13 +57,13 @@ export class CreatePaymentAdjustmentComponent extends DialogSuperclass<
return of(null);
}),
finalize(() =>
this.progress$.next(this.progress$.value + progressStep)
)
)
)
)
this.progress$.next(this.progress$.value + progressStep),
),
),
),
),
),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe({
complete: () => {
@ -82,8 +82,8 @@ export class CreatePaymentAdjustmentComponent extends DialogSuperclass<
.join(', ');
this.log.error(
new Error(
`${this.withError.length} out of ${payments.length} failed. Errors: ${errors}`
)
`${this.withError.length} out of ${payments.length} failed. Errors: ${errors}`,
),
);
}
this.progress$.next(0);

View File

@ -100,6 +100,6 @@ export class PaymentsTableComponent {
constructor(
private amountCurrencyService: AmountCurrencyService,
private partiesStoreService: PartiesStoreService,
private router: Router
private router: Router,
) {}
}

View File

@ -50,7 +50,7 @@ export class PaymentsComponent implements OnInit {
payment_params: {},
});
metadata$ = from(
import('@vality/magista-proto/metadata.json').then((m) => m.default as ThriftAstMetadata[])
import('@vality/magista-proto/metadata.json').then((m) => m.default as ThriftAstMetadata[]),
);
extensions: MetadataFormExtension[] = [
{
@ -63,7 +63,7 @@ export class PaymentsComponent implements OnInit {
'payment_first6',
'payment_last4',
'payment_rrn',
].includes(data?.field?.name)
].includes(data?.field?.name),
),
extension: () => of({ hidden: true }),
},
@ -79,12 +79,12 @@ export class PaymentsComponent implements OnInit {
}>,
private fetchPaymentsService: FetchPaymentsService,
private dialogService: DialogService,
private fb: NonNullableFormBuilder
private fb: NonNullableFormBuilder,
) {}
ngOnInit() {
this.filtersForm.patchValue(
lodashMerge({}, this.qp.params.filters, clean({ dateRange: this.qp.params.dateRange }))
lodashMerge({}, this.qp.params.filters, clean({ dateRange: this.qp.params.dateRange })),
);
const otherFilters = this.otherFiltersControl.value;
const otherFiltersParams: Partial<PaymentSearchQuery> = this.qp.params.otherFilters || {};
@ -123,13 +123,13 @@ export class PaymentsComponent implements OnInit {
},
invoice_ids: filters.invoice_ids,
}),
options
options,
);
this.active =
countProps(
filters,
otherFilters.payment_params,
otherFilters.common_search_query_params
otherFilters.common_search_query_params,
) + +!isEqualDateRange(dateRange, createDateRangeToToday());
}

View File

@ -12,14 +12,14 @@ import { MerchantStatisticsService } from '@cc/app/api/magista';
export class FetchPaymentsService extends FetchSuperclass<StatPayment, PaymentSearchQuery> {
constructor(
private merchantStatisticsService: MerchantStatisticsService,
private log: NotifyLogService
private log: NotifyLogService,
) {
super();
}
protected fetch(
params: PaymentSearchQuery,
{ size, continuationToken }: FetchOptions
{ size, continuationToken }: FetchOptions,
): Observable<FetchResult<StatPayment>> {
return this.merchantStatisticsService
.SearchPayments({
@ -38,7 +38,7 @@ export class FetchPaymentsService extends FetchSuperclass<StatPayment, PaymentSe
catchError((err) => {
this.log.errorOperation(err, 'receive', 'payments');
return of({ result: [] });
})
}),
);
}
}

View File

@ -37,7 +37,7 @@
payout.status.cancelled.details
}}</cc-details-item>
<cc-details-item title="Created At">{{
payout.created_at | date : 'dd.MM.yyyy HH:mm:ss'
payout.created_at | date: 'dd.MM.yyyy HH:mm:ss'
}}</cc-details-item>
</div>

View File

@ -20,25 +20,27 @@ export class PayoutDetailsComponent {
startWith(this.route.snapshot.params),
pluck('payoutId'),
switchMap((id: string) => this.payoutManagementService.GetPayout(id)),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
shop$ = this.payout$.pipe(
switchMap(({ party_id, shop_id }) =>
this.partyManagementService.GetShop(party_id, shop_id)
this.partyManagementService.GetShop(party_id, shop_id),
),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
party$ = this.payout$.pipe(
switchMap(({ party_id }) => this.partyManagementService.Get(party_id)),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
payoutTool$ = combineLatest([this.payout$, this.shop$]).pipe(
switchMap(([{ party_id, payout_tool_id }, { contract_id }]) =>
this.partyManagementService
.GetContract(party_id, contract_id)
.pipe(map((contract) => contract.payout_tools.find((t) => t.id === payout_tool_id)))
.pipe(
map((contract) => contract.payout_tools.find((t) => t.id === payout_tool_id)),
),
),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
displayedColumns = ['source', 'destination', 'volume', 'details'];
@ -46,7 +48,7 @@ export class PayoutDetailsComponent {
private route: ActivatedRoute,
private payoutManagementService: PayoutManagementService,
private partyManagementService: PartyManagementService,
private payoutActionsService: PayoutActionsService
private payoutActionsService: PayoutActionsService,
) {}
canBeConfirmed(status: keyof PayoutStatus) {

View File

@ -12,7 +12,7 @@ import { RouterModule } from '@angular/router';
path: 'payouts/:payoutId',
loadChildren: () =>
import('./payout-details/payout-details.module').then(
(m) => m.PayoutDetailsModule
(m) => m.PayoutDetailsModule,
),
},
]),

View File

@ -27,7 +27,7 @@ export class CancelPayoutDialogComponent extends DialogSuperclass<
injector: Injector,
private payoutManagementService: PayoutManagementService,
private notificationService: NotificationService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {
super(injector);
}

View File

@ -43,7 +43,7 @@ export class CreatePayoutDialogComponent extends DialogSuperclass<CreatePayoutDi
private fb: FormBuilder,
private payoutManagementService: PayoutManagementService,
private notificationService: NotificationService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {
super(injector);
}
@ -64,8 +64,8 @@ export class CreatePayoutDialogComponent extends DialogSuperclass<CreatePayoutDi
},
payout_tool_id: value.payoutToolId,
},
isNil
) as PayoutParams
isNil,
) as PayoutParams,
)
.pipe(untilDestroyed(this), progressTo(this.progress$))
.subscribe({

View File

@ -11,13 +11,13 @@
<ng-container matColumnDef="shop">
<th *matHeaderCellDef mat-header-cell>Shop</th>
<td *matCellDef="let payout" mat-cell>{{ payout.shop_id | shopName : payout.party_id }}</td>
<td *matCellDef="let payout" mat-cell>{{ payout.shop_id | shopName: payout.party_id }}</td>
</ng-container>
<ng-container matColumnDef="createdAt">
<th *matHeaderCellDef mat-header-cell>Created At</th>
<td *matCellDef="let payout" mat-cell>
{{ payout.created_at | date : 'dd.MM.yyyy HH:mm:ss' }}
{{ payout.created_at | date: 'dd.MM.yyyy HH:mm:ss' }}
</td>
</ng-container>

View File

@ -32,7 +32,7 @@ export class PayoutsComponent implements OnInit {
constructor(
private fetchPayoutsService: FetchPayoutsService,
private qp: QueryParamsService<Partial<PayoutsSearchForm>>,
private dialogService: DialogService
private dialogService: DialogService,
) {}
ngOnInit() {
@ -57,14 +57,14 @@ export class PayoutsComponent implements OnInit {
party_id: value.partyId,
shop_ids: value.shops,
},
isNilOrEmptyString
isNilOrEmptyString,
),
payout_id: value.payoutId,
payout_status_types: value.payoutStatusTypes,
payout_type: value.payoutToolType,
},
isNilOrEmptyString
) as SearchParams
isNilOrEmptyString,
) as SearchParams,
);
}

View File

@ -23,14 +23,14 @@ export type SearchParams = Overwrite<
export class FetchPayoutsService extends PartialFetcher<StatPayout, SearchParams> {
constructor(
private merchantStatisticsService: MerchantStatisticsService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {
super();
}
protected fetch(
params: SearchParams,
continuationToken: string
continuationToken: string,
): Observable<FetchResult<StatPayout>> {
return this.merchantStatisticsService
.SearchPayouts({
@ -44,7 +44,7 @@ export class FetchPayoutsService extends PartialFetcher<StatPayout, SearchParams
map(({ continuation_token, payouts }) => ({
result: payouts,
continuationToken: continuation_token,
}))
})),
);
}

View File

@ -16,7 +16,7 @@ export class PayoutActionsService {
constructor(
private payoutManagementService: PayoutManagementService,
private dialogService: DialogService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {}
canBeConfirmed(status: keyof PayoutStatus) {
@ -38,7 +38,7 @@ export class PayoutActionsService {
.pipe(
filter(({ status }) => status === DialogResponseStatus.Success),
switchMap(() => this.payoutManagementService.ConfirmPayout(id)),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe({
error: this.notificationErrorService.error,

View File

@ -39,11 +39,11 @@ export class RepairByScenarioDialogComponent
typeControl = new FormControl<Types>(Types.Same, Validators.required);
form = new FormControl<RepairInvoicesRequest | RepairWithdrawalsRequest>(
[],
Validators.required
Validators.required,
);
sameForm = new FormControl<RepairInvoicesRequest | RepairWithdrawalsRequest>(
null,
Validators.required
Validators.required,
);
metadata$ = from(import('@vality/repairer-proto/metadata.json').then((m) => m.default));
extensions$ = this.domainMetadataFormExtensionsService.extensions$;
@ -61,7 +61,7 @@ export class RepairByScenarioDialogComponent
private repairManagementService: RepairManagementService,
private notificationErrorService: NotificationErrorService,
private notificationService: NotificationService,
private domainMetadataFormExtensionsService: DomainMetadataFormExtensionsService
private domainMetadataFormExtensionsService: DomainMetadataFormExtensionsService,
) {
super(injector);
}
@ -71,7 +71,7 @@ export class RepairByScenarioDialogComponent
.pipe(untilDestroyed(this))
.subscribe(() => {
this.form.setValue(
this.dialogData.machines.map(({ id }) => ({ id, scenario: {} }))
this.dialogData.machines.map(({ id }) => ({ id, scenario: {} })),
);
});
}

View File

@ -80,7 +80,7 @@ export class RepairingComponent implements OnInit {
tooltip: 'history',
},
]),
shareReplay({ refCount: true, bufferSize: 1 })
shareReplay({ refCount: true, bufferSize: 1 }),
);
cellTemplate: Record<string, TemplateRef<unknown>> = {};
@ -92,14 +92,14 @@ export class RepairingComponent implements OnInit {
private repairManagementService: RepairManagementService,
private notificationService: NotificationService,
private notificationErrorService: NotificationErrorService,
private domainStoreService: DomainStoreService
private domainStoreService: DomainStoreService,
) {}
ngOnInit() {
this.filters.valueChanges
.pipe(
map(() => clean(this.filters.value)),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe((v: Filters) => this.qp.set(v));
this.qp.params$
@ -118,9 +118,9 @@ export class RepairingComponent implements OnInit {
to_time: timespan?.end?.toISOString(),
}
: null,
})
}),
),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe((params) => this.machinesService.search(params));
}
@ -144,10 +144,10 @@ export class RepairingComponent implements OnInit {
filter(({ status }) => status === DialogResponseStatus.Success),
switchMap(() =>
this.repairManagementService.SimpleRepairAll(
this.selected$.value.map(({ id, ns }) => ({ id, ns }))
)
this.selected$.value.map(({ id, ns }) => ({ id, ns })),
),
),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe({
next: () => {

View File

@ -10,7 +10,7 @@ import { NotificationErrorService } from '../../../shared/services/notification-
export class MachinesService extends PartialFetcher<Machine, SearchRequest> {
constructor(
private repairManagementService: RepairManagementService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {
super();
}
@ -22,7 +22,7 @@ export class MachinesService extends PartialFetcher<Machine, SearchRequest> {
map(({ machines, continuation_token }) => ({
result: machines,
continuationToken: continuation_token,
}))
})),
);
}

View File

@ -23,7 +23,7 @@ describe('ChangeDelegateRulesetDialogComponent', () => {
fixture = TestBed.createComponent(HostComponent);
debugElement = fixture.debugElement.query(
By.directive(ChangeDelegateRulesetDialogComponent)
By.directive(ChangeDelegateRulesetDialogComponent),
);
component = debugElement.componentInstance;

View File

@ -29,7 +29,7 @@ export class ChangeDelegateRulesetDialogComponent
constructor(
injector: Injector,
private fb: UntypedFormBuilder,
private routingRulesService: RoutingRulesService
private routingRulesService: RoutingRulesService,
) {
super(injector);
}
@ -39,7 +39,7 @@ export class ChangeDelegateRulesetDialogComponent
.getRuleset(this.dialogData.mainRulesetRefID)
.pipe(
map((r) => r?.data?.decisions?.delegates?.[this.dialogData?.delegateIdx]),
untilDestroyed(this)
untilDestroyed(this),
)
.subscribe((delegate) => {
this.form.patchValue({

View File

@ -25,7 +25,7 @@ export class ChangeTargetDialogComponent extends DialogSuperclass<
constructor(
injector: Injector,
private routingRulesService: RoutingRulesService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {
super(injector);
this.routingRulesService

View File

@ -33,7 +33,7 @@ export class AttachNewRulesetDialogComponent extends DialogSuperclass<
injector: Injector,
private fb: UntypedFormBuilder,
private routingRulesService: RoutingRulesService,
private notificationErrorService: NotificationErrorService
private notificationErrorService: NotificationErrorService,
) {
super(injector);
}

View File

@ -22,7 +22,7 @@ import { ROUTING_CONFIG } from './routing-config';
path: '',
loadChildren: () =>
import('../party-routing-ruleset').then(
(m) => m.PartyRoutingRulesetModule
(m) => m.PartyRoutingRulesetModule,
),
},
{

View File

@ -33,7 +33,7 @@ export class PartyDelegateRulesetsComponent {
rules.map(({ mainRoutingRule, partyDelegate, paymentInstitution }) => ({
parentRefId: mainRoutingRule?.ref?.id,
delegateIdx: mainRoutingRule?.data?.decisions?.delegates?.findIndex(
(d) => d === partyDelegate
(d) => d === partyDelegate,
),
paymentInstitution: {
text: paymentInstitution?.data?.name,
@ -47,8 +47,8 @@ export class PartyDelegateRulesetsComponent {
text: partyDelegate?.description,
caption: partyDelegate?.ruleset?.id,
},
}))
)
})),
),
);
private get partyID() {
@ -62,7 +62,7 @@ export class PartyDelegateRulesetsComponent {
private dialogService: DialogService,
private domainStoreService: DomainStoreService,
private notificationErrorService: NotificationErrorService,
private route: ActivatedRoute
private route: ActivatedRoute,
) {}
attachNewRuleset() {

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