Fix linter errors for transaction-log component

This commit is contained in:
Tom Bloor 2017-09-19 15:02:48 +01:00
parent 662d6be5c9
commit 0907134ff7

View file

@ -12,12 +12,13 @@ import 'rxjs/add/operator/map';
@Component({
templateUrl: 'transaction-log.component.html',
})
export class TransactionLogComponent {
export class TransactionLogComponent implements OnInit {
transactionList;
noTransactionList = true;
myDate: any;
minDate: any;
public p: any;
public paginateConfig: PaginationInstance = {
id: 'transpaginate',
@ -41,11 +42,11 @@ export class TransactionLogComponent {
getMinDate() {
// gets the April 1st date of the current year
let aprilDate = moment().month(3).date(1);
let now = moment();
const aprilDate = moment().month(3).date(1);
const now = moment();
// Checks if current time is before April 1st, if so returns true
let beforeApril = now.isBefore(aprilDate);
if ( beforeApril == true ) {
const beforeApril = now.isBefore(aprilDate);
if ( beforeApril === true ) {
this.minDate = aprilDate.subtract(2, 'years').format('YYYY-MM-DD');
} else {
this.minDate = aprilDate.subtract(1, 'years').format('YYYY-MM-DD');