vc-create-dashboard 2.7.1 → 2.7.3

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,6 +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 moment from 'moment';
4
5
  import * as i1 from '@angular/common/http';
5
6
  import { HttpHeaders, HttpParams } from '@angular/common/http';
6
7
  import { JwtHelperService } from '@auth0/angular-jwt';
@@ -3020,7 +3021,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
3020
3021
  type: Output
3021
3022
  }] } });
3022
3023
 
3023
- // dayjs.extend(customParseFormat);
3024
3024
  class CreateDashboardComponent {
3025
3025
  constructor(createDashboardService, paginationService, cdr, snackBar, popoverService, configureWidgetsService, textCount) {
3026
3026
  this.createDashboardService = createDashboardService;
@@ -3782,8 +3782,8 @@ class CreateDashboardComponent {
3782
3782
  this.dashboardForm.selectedResponsibilityCategories = this.setList(this.allComplianceCategories, data?.responsibility_category, 'category_id');
3783
3783
  this.dashboardForm.selectedRiskCategories = this.setList(this.allRiskCategories, data?.risk_category, 'category_id');
3784
3784
  this.dashboardForm.displayCriteria = (data?.display_criteria === "BOTH_RC_AND_CATEGORY") ? 'and' : 'or';
3785
- this.dashboardForm.selectedFromDate = (data?.timeframe?.start_date) ? dayjs(data?.timeframe?.start_date)?.toDate() : undefined;
3786
- this.dashboardForm.selectedToDate = (data?.timeframe?.end_date) ? dayjs(data?.timeframe?.end_date)?.toDate() : undefined;
3785
+ this.dashboardForm.selectedFromDate = (data?.timeframe?.start_date) ? moment(data?.timeframe?.start_date, 'YYYY-MM-DD')?.toDate() : undefined;
3786
+ this.dashboardForm.selectedToDate = (data?.timeframe?.end_date) ? moment(data?.timeframe?.end_date, 'YYYY-MM-DD')?.toDate() : undefined;
3787
3787
  this.vLoader = false;
3788
3788
  this.dashboardForm.configureWidget = data.widget_details;
3789
3789
  this.selectedWidgets = data.widget_details.length > 0 ? [...new Set(data.widget_details)] : [];
@@ -3792,6 +3792,7 @@ class CreateDashboardComponent {
3792
3792
  let minToDate = this.setToDate(data?.timeframe?.start_date);
3793
3793
  this.toDatePickerConfig = { min: minToDate };
3794
3794
  this.hideToDate = true;
3795
+ console.log(" this.dashboardForm ===>", data, this.groupList);
3795
3796
  setTimeout(() => {
3796
3797
  this.hideToDate = false;
3797
3798
  }, 20);