mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
removed moment dependency from analytics-report-parameter.component.ts
This commit is contained in:
committed by
Jatin_Chugh
parent
a66b3d0846
commit
15178e8e58
@@ -31,7 +31,6 @@ import {
|
||||
} from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import moment from 'moment';
|
||||
import { ParameterValueModel } from '../../diagram/models/report/parameter-value.model';
|
||||
import { ReportParameterDetailsModel } from '../../diagram/models/report/report-parameter-details.model';
|
||||
import { ReportParametersModel } from '../../diagram/models/report/report-parameters.model';
|
||||
@@ -39,8 +38,9 @@ import { ReportQuery } from '../../diagram/models/report/report-query.model';
|
||||
import { AnalyticsService } from '../services/analytics.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { format } from 'date-fns'
|
||||
|
||||
const FORMAT_DATE_ACTIVITI = 'YYYY-MM-DD';
|
||||
const FORMAT_DATE_ACTIVITI = 'yyyy-MM-dd';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-analytics-report-parameters',
|
||||
@@ -194,11 +194,11 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
}
|
||||
|
||||
convertMomentDate(date: string) {
|
||||
return moment(date, FORMAT_DATE_ACTIVITI, true).format(FORMAT_DATE_ACTIVITI) + 'T00:00:00.000Z';
|
||||
return format(new Date(date), FORMAT_DATE_ACTIVITI) + 'T00:00:00.000Z';
|
||||
}
|
||||
|
||||
getTodayDate() {
|
||||
return moment().format(FORMAT_DATE_ACTIVITI);
|
||||
return format(new Date(), FORMAT_DATE_ACTIVITI);
|
||||
}
|
||||
|
||||
convertNumber(value: string): number {
|
||||
|
Reference in New Issue
Block a user