vc-create-dashboard 2.8.16 → 2.8.18
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.
|
@@ -3226,8 +3226,8 @@ class CreateDashboardComponent {
|
|
|
3226
3226
|
this.datePickerOverlay = true;
|
|
3227
3227
|
}
|
|
3228
3228
|
closeFromDatePicker() {
|
|
3229
|
-
var _a, _b;
|
|
3230
|
-
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') ==>", this.dashboardForm, this.dashboardForm.selectedFromDate);
|
|
3229
|
+
var _a, _b, _c;
|
|
3230
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') ==>", this.dashboardForm, new Date((_a = this.dashboardForm) === null || _a === void 0 ? void 0 : _a.selectedFromDate));
|
|
3231
3231
|
if (!this.dashboardForm.selectedFromDate) {
|
|
3232
3232
|
this.dashboardForm.selectedToDate = undefined;
|
|
3233
3233
|
this.hideToDate = true;
|
|
@@ -3251,7 +3251,7 @@ class CreateDashboardComponent {
|
|
|
3251
3251
|
this.hideToDate = false;
|
|
3252
3252
|
}, 20);
|
|
3253
3253
|
}
|
|
3254
|
-
(
|
|
3254
|
+
(_c = (_b = this.fromDatePicker) === null || _b === void 0 ? void 0 : _b.api) === null || _c === void 0 ? void 0 : _c.close();
|
|
3255
3255
|
this.datePickerOverlay = false;
|
|
3256
3256
|
}
|
|
3257
3257
|
closeToDatePicker() {
|
|
@@ -3729,8 +3729,10 @@ class CreateDashboardComponent {
|
|
|
3729
3729
|
}
|
|
3730
3730
|
this.vLoader = true;
|
|
3731
3731
|
const dashboard = this.dashboardForm;
|
|
3732
|
-
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD')", dashboard);
|
|
3733
|
-
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') 123",
|
|
3732
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD')", dashboard, new Date(dashboard === null || dashboard === void 0 ? void 0 : dashboard.selectedFromDate));
|
|
3733
|
+
// console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') 123",dayjs(dashboard?.selectedFromDate).format('YYYY-MM-DD'))
|
|
3734
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') checking ", this.mode);
|
|
3735
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') checking 0", dayjs(new Date(dashboard === null || dashboard === void 0 ? void 0 : dashboard.selectedFromDate)).format('YYYY-MM-DD'));
|
|
3734
3736
|
const payload = {
|
|
3735
3737
|
dashboard_name: dashboard.dashboardName,
|
|
3736
3738
|
description: [
|
|
@@ -3746,12 +3748,13 @@ class CreateDashboardComponent {
|
|
|
3746
3748
|
risk_category: this.returnIds(dashboard.selectedRiskCategories, 'category_id'),
|
|
3747
3749
|
display_criteria: (dashboard.displayCriteria === 'and') ? 'BOTH_RC_AND_CATEGORY' : 'RC_OR_CATEGORY',
|
|
3748
3750
|
timeframe: {
|
|
3749
|
-
start_date: (dashboard.selectedFromDate) ? dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') : '',
|
|
3750
|
-
end_date: (dashboard.selectedToDate) ? dayjs(dashboard.selectedToDate).format('YYYY-MM-DD') : '',
|
|
3751
|
+
start_date: (dashboard.selectedFromDate) ? dayjs(new Date(dashboard === null || dashboard === void 0 ? void 0 : dashboard.selectedFromDate)).format('YYYY-MM-DD') : '',
|
|
3752
|
+
end_date: (dashboard.selectedToDate) ? dayjs(new Date(dashboard === null || dashboard === void 0 ? void 0 : dashboard.selectedToDate)).format('YYYY-MM-DD') : '',
|
|
3751
3753
|
},
|
|
3752
3754
|
email_summary: this.setFrequency('', 'export'),
|
|
3753
3755
|
widget_details: dashboard.configureWidget
|
|
3754
3756
|
};
|
|
3757
|
+
console.log("dayjs(dashboard.selectedFromDate).format('YYYY-MM-DD') checking 1", this.mode);
|
|
3755
3758
|
if (this.mode == 'CREATE') {
|
|
3756
3759
|
this.createDashboardService.submitDashboard(payload).subscribe((res) => {
|
|
3757
3760
|
this.vLoader = false;
|