vc-create-dashboard 2.7.0 → 2.7.2
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.
- package/esm2020/lib/create-dashboard-container/create-dashboard.component.mjs +33 -26
- package/fesm2015/create-dashboard.mjs +33 -26
- package/fesm2015/create-dashboard.mjs.map +1 -1
- package/fesm2020/create-dashboard.mjs +32 -25
- package/fesm2020/create-dashboard.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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';
|
|
@@ -3020,7 +3021,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
3020
3021
|
type: Output
|
|
3021
3022
|
}] } });
|
|
3022
3023
|
|
|
3023
|
-
|
|
3024
|
+
dayjs.extend(customParseFormat);
|
|
3024
3025
|
class CreateDashboardComponent {
|
|
3025
3026
|
constructor(createDashboardService, paginationService, cdr, snackBar, popoverService, configureWidgetsService, textCount) {
|
|
3026
3027
|
this.createDashboardService = createDashboardService;
|
|
@@ -3769,30 +3770,36 @@ class CreateDashboardComponent {
|
|
|
3769
3770
|
}
|
|
3770
3771
|
}
|
|
3771
3772
|
populateDashboardForm(data) {
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
this.dashboardForm.
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
this.hideToDate =
|
|
3795
|
-
|
|
3773
|
+
try {
|
|
3774
|
+
console.log("datattttta ===>", data, this.groupList);
|
|
3775
|
+
this.dashboardForm.dashboardName = data?.dashboard_name,
|
|
3776
|
+
this.dashboardForm.dashboardDescriptionText = data?.description[0]?.content ?? "",
|
|
3777
|
+
this.dashboardForm.selectedViewers = this.setList(this.usersList, data?.visible_to_users, 'member_id');
|
|
3778
|
+
this.listDetails.selectedUsersList = this.dashboardForm.selectedViewers;
|
|
3779
|
+
data.visible_to_groups = (data?.visible_to_groups && data?.visible_to_groups.length) ? data?.visible_to_groups : [];
|
|
3780
|
+
this.dashboardForm.selectedGroup = this.setList(this.groupList, data?.visible_to_groups ?? [], 'group_id');
|
|
3781
|
+
this.listDetails.selectedGroupList = this.dashboardForm.selectedGroup;
|
|
3782
|
+
this.dashboardForm.selectedResponsibilityCenters = this.setList(this.responsibilityCentersList, data?.responsibility_center, 'item_id');
|
|
3783
|
+
this.dashboardForm.selectedResponsibilityCategories = this.setList(this.allComplianceCategories, data?.responsibility_category, 'category_id');
|
|
3784
|
+
this.dashboardForm.selectedRiskCategories = this.setList(this.allRiskCategories, data?.risk_category, 'category_id');
|
|
3785
|
+
this.dashboardForm.displayCriteria = (data?.display_criteria === "BOTH_RC_AND_CATEGORY") ? 'and' : 'or';
|
|
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;
|
|
3788
|
+
this.vLoader = false;
|
|
3789
|
+
this.dashboardForm.configureWidget = data.widget_details;
|
|
3790
|
+
this.selectedWidgets = data.widget_details.length > 0 ? [...new Set(data.widget_details)] : [];
|
|
3791
|
+
this.displayedWidgets = data.all_widgets.length > 0 ? [...new Set(data.all_widgets)] : [];
|
|
3792
|
+
this.setFrequency(data?.email_summary, 'import');
|
|
3793
|
+
let minToDate = this.setToDate(data?.timeframe?.start_date);
|
|
3794
|
+
this.toDatePickerConfig = { min: minToDate };
|
|
3795
|
+
this.hideToDate = true;
|
|
3796
|
+
setTimeout(() => {
|
|
3797
|
+
this.hideToDate = false;
|
|
3798
|
+
}, 20);
|
|
3799
|
+
}
|
|
3800
|
+
catch (error) {
|
|
3801
|
+
console.log("populate dashboard error ==>", error);
|
|
3802
|
+
}
|
|
3796
3803
|
}
|
|
3797
3804
|
setFrequency(event, mode) {
|
|
3798
3805
|
if (mode === 'export') {
|