vc-create-dashboard 2.8.14 → 2.8.15
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 customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
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';
|
|
@@ -3025,7 +3026,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
3025
3026
|
type: Output
|
|
3026
3027
|
}] } });
|
|
3027
3028
|
|
|
3028
|
-
|
|
3029
|
+
dayjs.extend(customParseFormat);
|
|
3029
3030
|
class CreateDashboardComponent {
|
|
3030
3031
|
constructor(createDashboardService, paginationService, cdr, snackBar, popoverService, configureWidgetsService, textCount) {
|
|
3031
3032
|
this.createDashboardService = createDashboardService;
|
|
@@ -3202,6 +3203,7 @@ class CreateDashboardComponent {
|
|
|
3202
3203
|
this.datePickerOverlay = true;
|
|
3203
3204
|
}
|
|
3204
3205
|
closeFromDatePicker() {
|
|
3206
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') ==>", this.dashboardForm, this.dashboardForm.selectedFromDate);
|
|
3205
3207
|
if (!this.dashboardForm.selectedFromDate) {
|
|
3206
3208
|
this.dashboardForm.selectedToDate = undefined;
|
|
3207
3209
|
this.hideToDate = true;
|
|
@@ -3213,6 +3215,7 @@ class CreateDashboardComponent {
|
|
|
3213
3215
|
return;
|
|
3214
3216
|
}
|
|
3215
3217
|
let minToDate = this.setToDate(this.dashboardForm.selectedFromDate);
|
|
3218
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') ==>1", minToDate);
|
|
3216
3219
|
this.toDatePickerConfig = { min: minToDate };
|
|
3217
3220
|
const fromDate = new Date(minToDate.split('-').reverse().join('-'));
|
|
3218
3221
|
const toDate = new Date(this.dashboardForm.selectedToDate);
|
|
@@ -3675,7 +3678,7 @@ class CreateDashboardComponent {
|
|
|
3675
3678
|
if (!this.dashboardForm.dashboardName || this.dashboardForm.dashboardName.trim() == ''
|
|
3676
3679
|
|| (this.dashboardForm.dashboardName.length > 30)
|
|
3677
3680
|
|| (this.textCount.transform(this.dashboardForm?.dashboardDescriptionText) > 250)
|
|
3678
|
-
|| (this.dashboardForm
|
|
3681
|
+
|| (this.dashboardForm?.selectedFromDate && (!this.dashboardForm.selectedToDate))
|
|
3679
3682
|
|| (this.dashboardForm.selectedResponsibilityCenters.length == 0 &&
|
|
3680
3683
|
this.dashboardForm.selectedResponsibilityCategories.length == 0 &&
|
|
3681
3684
|
this.dashboardForm.selectedRiskCategories.length == 0)) {
|
|
@@ -3697,6 +3700,8 @@ class CreateDashboardComponent {
|
|
|
3697
3700
|
}
|
|
3698
3701
|
this.vLoader = true;
|
|
3699
3702
|
const dashboard = this.dashboardForm;
|
|
3703
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD')", dashboard);
|
|
3704
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') 123", dayjs(dashboard?.selectedFromDate).format('YYYY-MM-DD'));
|
|
3700
3705
|
const payload = {
|
|
3701
3706
|
dashboard_name: dashboard.dashboardName,
|
|
3702
3707
|
description: [
|