separate out date functions

This commit is contained in:
Patrick Nagurny
2019-06-27 16:37:46 -04:00
parent 5b720b79c4
commit 714a1b187b
12 changed files with 220 additions and 216 deletions

View File

@@ -17,7 +17,7 @@ import {
ValidationErrors
} from '@angular/forms';
import { AppError } from '../shared/error';
import { Util } from '../shared/util';
import { DateUtil } from '../shared/dateutil';
@Component({
selector: 'app-balancesheet',
@@ -65,7 +65,7 @@ export class BalanceSheetReport {
this.org = this.orgService.getCurrentOrg();
this.form = fb.group({
date: [Util.getLocalDateStringExcl(this.date, this.org.timezone), Validators.required],
date: [DateUtil.getLocalDateStringExcl(this.date, this.org.timezone), Validators.required],
priceSource: [this.priceSource, Validators.required]
});
}
@@ -134,7 +134,7 @@ export class BalanceSheetReport {
this.treeSubscription.unsubscribe();
//this.dataService.setLoading(true);
this.showOptionsForm = false;
this.date = Util.getDateFromLocalDateStringExcl(this.form.value.date, this.org.timezone);
this.date = DateUtil.getDateFromLocalDateStringExcl(this.form.value.date, this.org.timezone);
this.priceSource = this.form.value.priceSource;
let reportData = this.configService.get('reportData');