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
|
.form-group
|
||||||
label Fingerprint:
|
label Fingerprint:
|
||||||
input.form-control(formControlName="fingerprint")
|
input.form-control(formControlName="fingerprint")
|
||||||
.row
|
|
||||||
.col-sm-3.col-xs-12
|
|
||||||
.form-group
|
|
||||||
label.text-left
|
|
||||||
input(type="checkbox", formControlName="invoicesWithPayments")
|
|
||||||
| Инвойсы с платежами
|
|
||||||
.row
|
.row
|
||||||
.col-sm-9.col-xs-12
|
.col-sm-9.col-xs-12
|
||||||
.reset-button-container
|
.reset-button-container
|
||||||
|
@ -4,6 +4,8 @@ import { ActivatedRoute, Params, Router } from '@angular/router';
|
|||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import { mapValues, isEqual, chain, keys, difference } from 'lodash';
|
import { mapValues, isEqual, chain, keys, difference } from 'lodash';
|
||||||
|
|
||||||
|
import { PAYMENT_STATUS } from 'koffing/backend';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SearchFormService {
|
export class SearchFormService {
|
||||||
public searchForm: FormGroup;
|
public searchForm: FormGroup;
|
||||||
@ -18,7 +20,7 @@ export class SearchFormService {
|
|||||||
to: moment()
|
to: moment()
|
||||||
.endOf('day')
|
.endOf('day')
|
||||||
.toDate(),
|
.toDate(),
|
||||||
invoicesWithPayments: true
|
paymentStatus: PAYMENT_STATUS.captured
|
||||||
};
|
};
|
||||||
|
|
||||||
private mainSearchFields = ['invoiceID', 'invoiceStatus', 'paymentStatus'];
|
private mainSearchFields = ['invoiceID', 'invoiceStatus', 'paymentStatus'];
|
||||||
@ -68,13 +70,12 @@ export class SearchFormService {
|
|||||||
ip: '',
|
ip: '',
|
||||||
email: '',
|
email: '',
|
||||||
paymentID: '',
|
paymentID: '',
|
||||||
paymentStatus: '',
|
paymentStatus: this.defaultValues.paymentStatus,
|
||||||
paymentMethod: '',
|
paymentMethod: '',
|
||||||
paymentFlow: '',
|
paymentFlow: '',
|
||||||
fingerprint: '',
|
fingerprint: '',
|
||||||
customerID: '',
|
customerID: '',
|
||||||
bankCardTokenProvider: '',
|
bankCardTokenProvider: ''
|
||||||
invoicesWithPayments: this.defaultValues.invoicesWithPayments
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,8 +97,7 @@ export class SearchFormService {
|
|||||||
.toDate(),
|
.toDate(),
|
||||||
to: moment(params.to)
|
to: moment(params.to)
|
||||||
.endOf('day')
|
.endOf('day')
|
||||||
.toDate(),
|
.toDate()
|
||||||
invoicesWithPayments: params.invoicesWithPayments === 'true'
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user