mirror of
https://github.com/valitydev/koffing.git
synced 2024-11-06 01:05:19 +00:00
invoices search fixed (#253)
This commit is contained in:
parent
3e34cbcbb0
commit
1725bb18dd
@ -76,12 +76,6 @@ form([formGroup]="searchForm", novalidate)
|
||||
.form-group
|
||||
label Fingerprint:
|
||||
input.form-control(formControlName="fingerprint")
|
||||
.row
|
||||
.col-sm-3.col-xs-12
|
||||
.form-group
|
||||
label.text-left
|
||||
input(type="checkbox", formControlName="invoicesWithPayments")
|
||||
| Инвойсы с платежами
|
||||
.row
|
||||
.col-sm-9.col-xs-12
|
||||
.reset-button-container
|
||||
|
@ -4,6 +4,8 @@ import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||
import * as moment from 'moment';
|
||||
import { mapValues, isEqual, chain, keys, difference } from 'lodash';
|
||||
|
||||
import { PAYMENT_STATUS } from 'koffing/backend';
|
||||
|
||||
@Injectable()
|
||||
export class SearchFormService {
|
||||
public searchForm: FormGroup;
|
||||
@ -18,7 +20,7 @@ export class SearchFormService {
|
||||
to: moment()
|
||||
.endOf('day')
|
||||
.toDate(),
|
||||
invoicesWithPayments: true
|
||||
paymentStatus: PAYMENT_STATUS.captured
|
||||
};
|
||||
|
||||
private mainSearchFields = ['invoiceID', 'invoiceStatus', 'paymentStatus'];
|
||||
@ -68,13 +70,12 @@ export class SearchFormService {
|
||||
ip: '',
|
||||
email: '',
|
||||
paymentID: '',
|
||||
paymentStatus: '',
|
||||
paymentStatus: this.defaultValues.paymentStatus,
|
||||
paymentMethod: '',
|
||||
paymentFlow: '',
|
||||
fingerprint: '',
|
||||
customerID: '',
|
||||
bankCardTokenProvider: '',
|
||||
invoicesWithPayments: this.defaultValues.invoicesWithPayments
|
||||
bankCardTokenProvider: ''
|
||||
});
|
||||
}
|
||||
|
||||
@ -96,8 +97,7 @@ export class SearchFormService {
|
||||
.toDate(),
|
||||
to: moment(params.to)
|
||||
.endOf('day')
|
||||
.toDate(),
|
||||
invoicesWithPayments: params.invoicesWithPayments === 'true'
|
||||
.toDate()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user