mirror of
https://github.com/valitydev/fraudbusters-ui.git
synced 2024-11-06 16:45:19 +00:00
Fix parameters
This commit is contained in:
parent
34c87ad590
commit
4aff46b7f8
@ -1,4 +1,9 @@
|
||||
<fb-list-header>
|
||||
<div class="fb-body-2" fxFlex>ID</div>
|
||||
<div class="fb-body-2" fxFlex>PARTY ID</div>
|
||||
<div class="fb-body-2" fxFlex>SHOP ID</div>
|
||||
<div class="fb-body-2" fxFlex>AMOUNT</div>
|
||||
<div class="fb-body-2" fxFlex>CURRENCY</div>
|
||||
<div class="fb-body-2" fxFlex>EMAIL</div>
|
||||
<div class="fb-body-2" fxFlex="168px">EVENT TIME</div>
|
||||
</fb-list-header>
|
||||
|
@ -2,13 +2,31 @@
|
||||
<mat-expansion-panel-header>
|
||||
<div fxLayout fxFlexFill [fxLayoutGap]="layoutGapM">
|
||||
<div class="fb-body-2" fxFlex>{{ payment.id }}</div>
|
||||
<div class="fb-body-2" fxFlex>{{ payment.merchantInfo.partyId }}</div>
|
||||
<div class="fb-body-2" fxFlex>{{ payment.merchantInfo.shopId }}</div>
|
||||
<div class="fb-body-2" fxFlex>{{ payment.amount }}</div>
|
||||
<div class="fb-body-2" fxFlex>{{ payment.currency }}</div>
|
||||
<div class="fb-body-2" fxFlex>{{ payment.clientInfo.email }}</div>
|
||||
<div class="fb-body-2" fxFlex="160px">{{ payment.eventTime | date: 'yyyy-MM-dd HH:mm:ss' }}</div>
|
||||
</div>
|
||||
</mat-expansion-panel-header>
|
||||
<div class="panel-content" fxLayout="column" [fxLayoutGap]="layoutGapM">
|
||||
<mat-divider></mat-divider>
|
||||
<div class="fb-body-1 fb-template" fxLayout="column" [fxLayoutGap]="layoutGapS">
|
||||
<div class="fb-body-2" fxFlex>{{ payment.amount }}</div>
|
||||
<div class="fb-body-1 fb-template" fxLayout="row" [fxLayoutGap]="layoutGapS">
|
||||
<div fxLayout="column" [fxLayoutGap]="layoutGapS">
|
||||
<div fxLayout="row" [fxLayoutGap]="layoutGapS">
|
||||
<div fxFlex>Token:</div>
|
||||
<div fxFlex>{{ payment.cardToken }}</div>
|
||||
</div>
|
||||
<div fxLayout="row" [fxLayoutGap]="layoutGapS">
|
||||
<div fxFlex>Fingerprint:</div>
|
||||
<div fxFlex>{{ payment.clientInfo.fingerprint }}</div>
|
||||
</div>
|
||||
<div fxLayout="row" [fxLayoutGap]="layoutGapS">
|
||||
<div fxFlex>Country:</div>
|
||||
<div fxFlex>{{ payment.paymentCountry }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<mat-divider></mat-divider>
|
||||
</div>
|
||||
|
@ -26,6 +26,13 @@ export class HistoricalPaymentsDataComponent {
|
||||
|
||||
search(event) {
|
||||
this.fetchPaymentsService.search({
|
||||
paymentId: event.paymentId,
|
||||
cardToken: event.cardToken,
|
||||
shopId: event.shopId,
|
||||
partyId: event.partyId,
|
||||
status: event.status,
|
||||
fingerprint: event.fingerprint,
|
||||
email: event.email,
|
||||
from: this.datepipe.transform(event.from, 'yyyy-MM-dd HH:mm:ss'),
|
||||
to: this.datepipe.transform(event.to, 'yyyy-MM-dd HH:mm:ss'),
|
||||
});
|
||||
|
@ -42,7 +42,7 @@
|
||||
<input matInput placeholder="status" formControlName="status" type="string" autocomplete="false" />
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<input matInput placeholder="id" formControlName="id" type="string" autocomplete="false" />
|
||||
<input matInput placeholder="id" formControlName="paymentId" type="string" autocomplete="false" />
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<input
|
||||
@ -56,8 +56,5 @@
|
||||
<mat-form-field appearance="outline">
|
||||
<input matInput placeholder="email" formControlName="email" type="string" autocomplete="false" />
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<input matInput placeholder="terminal" formControlName="terminal" type="string" autocomplete="false" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -5,6 +5,7 @@ import { debounceTime, map, take } from 'rxjs/operators';
|
||||
|
||||
import { SearchFieldService } from '../../../../shared/services/utils/search-field.service';
|
||||
import { removeEmptyProperties } from '../../../../shared/utils/remove-empty-properties';
|
||||
import { MAT_DATE_FORMATS } from '@angular/material/core';
|
||||
|
||||
@Component({
|
||||
selector: 'fb-history-data-search',
|
||||
@ -20,7 +21,7 @@ export class HistoryDataSearchComponent {
|
||||
cardToken: '',
|
||||
country: '',
|
||||
status: '',
|
||||
id: '',
|
||||
paymentId: '',
|
||||
fingerprint: '',
|
||||
email: '',
|
||||
from: this.searchFieldService.todayFromTime().toISOString(),
|
||||
|
@ -9,7 +9,7 @@ import { FlexModule } from '@angular/flex-layout';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatNativeDateModule } from '@angular/material/core';
|
||||
import { MAT_DATE_FORMATS, MAT_DATE_LOCALE, MatNativeDateModule } from '@angular/material/core';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
|
@ -8,4 +8,11 @@ export interface SearchHistoricalParams {
|
||||
sortOrder: string;
|
||||
from?: string;
|
||||
to?: string;
|
||||
paymentId?: string;
|
||||
cardToken?: string;
|
||||
shopId?: string;
|
||||
partyId?: string;
|
||||
status?: string;
|
||||
fingerprint?: string;
|
||||
email?: string;
|
||||
}
|
||||
|
@ -12,15 +12,19 @@ import { PartialFetcher } from '../../../shared/utils/partial-fetcher';
|
||||
import { FetchResultContinuation } from '../../../shared/utils/partial-fetcher/fetch-result-continuation';
|
||||
|
||||
export interface FetchPaymentParams {
|
||||
searchValue?: string;
|
||||
sortOrder?: SortOrder;
|
||||
size?: number;
|
||||
id?: string;
|
||||
name?: string;
|
||||
sortBy?: string;
|
||||
sortFieldValue?: string;
|
||||
from?: string;
|
||||
to?: string;
|
||||
paymentId?: string;
|
||||
cardToken?: string;
|
||||
shopId?: string;
|
||||
partyId?: string;
|
||||
status?: string;
|
||||
fingerprint?: string;
|
||||
email?: string;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@ -37,13 +41,32 @@ export class FetchHistoricalPaymentsService extends PartialFetcher<Payment, Fetc
|
||||
}
|
||||
|
||||
protected fetch(params: FetchPaymentParams, lastId?: string): Observable<FetchResultContinuation<Payment>> {
|
||||
const { searchValue, sortOrder, sortFieldValue, size, from, to } = params;
|
||||
const {
|
||||
sortOrder,
|
||||
sortFieldValue,
|
||||
size,
|
||||
from,
|
||||
to,
|
||||
paymentId,
|
||||
cardToken,
|
||||
shopId,
|
||||
partyId,
|
||||
status,
|
||||
fingerprint,
|
||||
email,
|
||||
} = params;
|
||||
return this.paymentHistoricalDataService.filter({
|
||||
searchValue: searchValue || '',
|
||||
sortFieldValue: sortFieldValue || '',
|
||||
from: from || this.searchFieldService.todayFromTime().toISOString(),
|
||||
to: to || new Date().toISOString(),
|
||||
sortOrder: sortOrder || SortOrder.ASC,
|
||||
paymentId: paymentId || '',
|
||||
cardToken: cardToken || '',
|
||||
shopId: shopId || '',
|
||||
partyId: partyId || '',
|
||||
status: status || '',
|
||||
fingerprint: fingerprint || '',
|
||||
email: email || '',
|
||||
size: size ? size : this.SIZE,
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user