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';
|
|
@@ -3046,7 +3047,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
3046
3047
|
type: Output
|
|
3047
3048
|
}] } });
|
|
3048
3049
|
|
|
3049
|
-
|
|
3050
|
+
dayjs.extend(customParseFormat);
|
|
3050
3051
|
class CreateDashboardComponent {
|
|
3051
3052
|
constructor(createDashboardService, paginationService, cdr, snackBar, popoverService, configureWidgetsService, textCount) {
|
|
3052
3053
|
this.createDashboardService = createDashboardService;
|
|
@@ -3227,6 +3228,7 @@ class CreateDashboardComponent {
|
|
|
3227
3228
|
}
|
|
3228
3229
|
closeFromDatePicker() {
|
|
3229
3230
|
var _a, _b;
|
|
3231
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') ==>", this.dashboardForm, this.dashboardForm.selectedFromDate);
|
|
3230
3232
|
if (!this.dashboardForm.selectedFromDate) {
|
|
3231
3233
|
this.dashboardForm.selectedToDate = undefined;
|
|
3232
3234
|
this.hideToDate = true;
|
|
@@ -3238,6 +3240,7 @@ class CreateDashboardComponent {
|
|
|
3238
3240
|
return;
|
|
3239
3241
|
}
|
|
3240
3242
|
let minToDate = this.setToDate(this.dashboardForm.selectedFromDate);
|
|
3243
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') ==>1", minToDate);
|
|
3241
3244
|
this.toDatePickerConfig = { min: minToDate };
|
|
3242
3245
|
const fromDate = new Date(minToDate.split('-').reverse().join('-'));
|
|
3243
3246
|
const toDate = new Date(this.dashboardForm.selectedToDate);
|
|
@@ -3693,7 +3696,7 @@ class CreateDashboardComponent {
|
|
|
3693
3696
|
* Validates the data submitted on create dashboard form
|
|
3694
3697
|
*/
|
|
3695
3698
|
validateDashboard() {
|
|
3696
|
-
var _a;
|
|
3699
|
+
var _a, _b;
|
|
3697
3700
|
setTimeout(() => {
|
|
3698
3701
|
this.submitted = true;
|
|
3699
3702
|
}, 100);
|
|
@@ -3705,7 +3708,7 @@ class CreateDashboardComponent {
|
|
|
3705
3708
|
if (!this.dashboardForm.dashboardName || this.dashboardForm.dashboardName.trim() == ''
|
|
3706
3709
|
|| (this.dashboardForm.dashboardName.length > 30)
|
|
3707
3710
|
|| (this.textCount.transform((_a = this.dashboardForm) === null || _a === void 0 ? void 0 : _a.dashboardDescriptionText) > 250)
|
|
3708
|
-
|| (this.dashboardForm.selectedFromDate && (!this.dashboardForm.selectedToDate))
|
|
3711
|
+
|| (((_b = this.dashboardForm) === null || _b === void 0 ? void 0 : _b.selectedFromDate) && (!this.dashboardForm.selectedToDate))
|
|
3709
3712
|
|| (this.dashboardForm.selectedResponsibilityCenters.length == 0 &&
|
|
3710
3713
|
this.dashboardForm.selectedResponsibilityCategories.length == 0 &&
|
|
3711
3714
|
this.dashboardForm.selectedRiskCategories.length == 0)) {
|
|
@@ -3727,6 +3730,8 @@ class CreateDashboardComponent {
|
|
|
3727
3730
|
}
|
|
3728
3731
|
this.vLoader = true;
|
|
3729
3732
|
const dashboard = this.dashboardForm;
|
|
3733
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD')", dashboard);
|
|
3734
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') 123", dayjs(dashboard === null || dashboard === void 0 ? void 0 : dashboard.selectedFromDate).format('YYYY-MM-DD'));
|
|
3730
3735
|
const payload = {
|
|
3731
3736
|
dashboard_name: dashboard.dashboardName,
|
|
3732
3737
|
description: [
|