vc-create-dashboard 2.7.3 → 2.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Pipe, Optional, EventEmitter, Component, Input, Output, Directive, HostListener, ViewChild, forwardRef, NgModule } from '@angular/core';
|
|
3
3
|
import * as dayjs from 'dayjs';
|
|
4
|
-
import * as
|
|
4
|
+
import * as customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
|
7
7
|
import { JwtHelperService } from '@auth0/angular-jwt';
|
|
@@ -3139,6 +3139,7 @@ class CreateDashboardComponent {
|
|
|
3139
3139
|
this.smileyMessage = '';
|
|
3140
3140
|
this.groupsEnabled = false;
|
|
3141
3141
|
this.submitted = false;
|
|
3142
|
+
dayjs.extend(customParseFormat);
|
|
3142
3143
|
}
|
|
3143
3144
|
ngOnChanges() {
|
|
3144
3145
|
if (this.createdBy) {
|
|
@@ -3782,8 +3783,8 @@ class CreateDashboardComponent {
|
|
|
3782
3783
|
this.dashboardForm.selectedResponsibilityCategories = this.setList(this.allComplianceCategories, data?.responsibility_category, 'category_id');
|
|
3783
3784
|
this.dashboardForm.selectedRiskCategories = this.setList(this.allRiskCategories, data?.risk_category, 'category_id');
|
|
3784
3785
|
this.dashboardForm.displayCriteria = (data?.display_criteria === "BOTH_RC_AND_CATEGORY") ? 'and' : 'or';
|
|
3785
|
-
this.dashboardForm.selectedFromDate = (data?.timeframe?.start_date) ?
|
|
3786
|
-
this.dashboardForm.selectedToDate = (data?.timeframe?.end_date) ?
|
|
3786
|
+
this.dashboardForm.selectedFromDate = (data?.timeframe?.start_date) ? dayjs(data?.timeframe?.start_date)?.toDate() : undefined;
|
|
3787
|
+
this.dashboardForm.selectedToDate = (data?.timeframe?.end_date) ? dayjs(data?.timeframe?.end_date)?.toDate() : undefined;
|
|
3787
3788
|
this.vLoader = false;
|
|
3788
3789
|
this.dashboardForm.configureWidget = data.widget_details;
|
|
3789
3790
|
this.selectedWidgets = data.widget_details.length > 0 ? [...new Set(data.widget_details)] : [];
|
|
@@ -3792,7 +3793,6 @@ class CreateDashboardComponent {
|
|
|
3792
3793
|
let minToDate = this.setToDate(data?.timeframe?.start_date);
|
|
3793
3794
|
this.toDatePickerConfig = { min: minToDate };
|
|
3794
3795
|
this.hideToDate = true;
|
|
3795
|
-
console.log(" this.dashboardForm ===>", data, this.groupList);
|
|
3796
3796
|
setTimeout(() => {
|
|
3797
3797
|
this.hideToDate = false;
|
|
3798
3798
|
}, 20);
|