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';
|
|
@@ -3041,7 +3042,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
3041
3042
|
type: Output
|
|
3042
3043
|
}] } });
|
|
3043
3044
|
|
|
3044
|
-
|
|
3045
|
+
dayjs.extend(customParseFormat);
|
|
3045
3046
|
class CreateDashboardComponent {
|
|
3046
3047
|
constructor(createDashboardService, paginationService, cdr, snackBar, popoverService, configureWidgetsService, textCount) {
|
|
3047
3048
|
this.createDashboardService = createDashboardService;
|
|
@@ -3799,31 +3800,37 @@ class CreateDashboardComponent {
|
|
|
3799
3800
|
}
|
|
3800
3801
|
}
|
|
3801
3802
|
populateDashboardForm(data) {
|
|
3802
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
this.dashboardForm.
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
this.hideToDate =
|
|
3826
|
-
|
|
3803
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3804
|
+
try {
|
|
3805
|
+
console.log("datattttta ===>", data, this.groupList);
|
|
3806
|
+
this.dashboardForm.dashboardName = data === null || data === void 0 ? void 0 : data.dashboard_name,
|
|
3807
|
+
this.dashboardForm.dashboardDescriptionText = (_b = (_a = data === null || data === void 0 ? void 0 : data.description[0]) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : "",
|
|
3808
|
+
this.dashboardForm.selectedViewers = this.setList(this.usersList, data === null || data === void 0 ? void 0 : data.visible_to_users, 'member_id');
|
|
3809
|
+
this.listDetails.selectedUsersList = this.dashboardForm.selectedViewers;
|
|
3810
|
+
data.visible_to_groups = ((data === null || data === void 0 ? void 0 : data.visible_to_groups) && (data === null || data === void 0 ? void 0 : data.visible_to_groups.length)) ? data === null || data === void 0 ? void 0 : data.visible_to_groups : [];
|
|
3811
|
+
this.dashboardForm.selectedGroup = this.setList(this.groupList, (_c = data === null || data === void 0 ? void 0 : data.visible_to_groups) !== null && _c !== void 0 ? _c : [], 'group_id');
|
|
3812
|
+
this.listDetails.selectedGroupList = this.dashboardForm.selectedGroup;
|
|
3813
|
+
this.dashboardForm.selectedResponsibilityCenters = this.setList(this.responsibilityCentersList, data === null || data === void 0 ? void 0 : data.responsibility_center, 'item_id');
|
|
3814
|
+
this.dashboardForm.selectedResponsibilityCategories = this.setList(this.allComplianceCategories, data === null || data === void 0 ? void 0 : data.responsibility_category, 'category_id');
|
|
3815
|
+
this.dashboardForm.selectedRiskCategories = this.setList(this.allRiskCategories, data === null || data === void 0 ? void 0 : data.risk_category, 'category_id');
|
|
3816
|
+
this.dashboardForm.displayCriteria = ((data === null || data === void 0 ? void 0 : data.display_criteria) === "BOTH_RC_AND_CATEGORY") ? 'and' : 'or';
|
|
3817
|
+
this.dashboardForm.selectedFromDate = ((_d = data === null || data === void 0 ? void 0 : data.timeframe) === null || _d === void 0 ? void 0 : _d.start_date) ? (_f = dayjs((_e = data === null || data === void 0 ? void 0 : data.timeframe) === null || _e === void 0 ? void 0 : _e.start_date)) === null || _f === void 0 ? void 0 : _f.toDate() : undefined;
|
|
3818
|
+
this.dashboardForm.selectedToDate = ((_g = data === null || data === void 0 ? void 0 : data.timeframe) === null || _g === void 0 ? void 0 : _g.end_date) ? (_j = dayjs((_h = data === null || data === void 0 ? void 0 : data.timeframe) === null || _h === void 0 ? void 0 : _h.end_date)) === null || _j === void 0 ? void 0 : _j.toDate() : undefined;
|
|
3819
|
+
this.vLoader = false;
|
|
3820
|
+
this.dashboardForm.configureWidget = data.widget_details;
|
|
3821
|
+
this.selectedWidgets = data.widget_details.length > 0 ? [...new Set(data.widget_details)] : [];
|
|
3822
|
+
this.displayedWidgets = data.all_widgets.length > 0 ? [...new Set(data.all_widgets)] : [];
|
|
3823
|
+
this.setFrequency(data === null || data === void 0 ? void 0 : data.email_summary, 'import');
|
|
3824
|
+
let minToDate = this.setToDate((_k = data === null || data === void 0 ? void 0 : data.timeframe) === null || _k === void 0 ? void 0 : _k.start_date);
|
|
3825
|
+
this.toDatePickerConfig = { min: minToDate };
|
|
3826
|
+
this.hideToDate = true;
|
|
3827
|
+
setTimeout(() => {
|
|
3828
|
+
this.hideToDate = false;
|
|
3829
|
+
}, 20);
|
|
3830
|
+
}
|
|
3831
|
+
catch (error) {
|
|
3832
|
+
console.log("populate dashboard error ==>", error);
|
|
3833
|
+
}
|
|
3827
3834
|
}
|
|
3828
3835
|
setFrequency(event, mode) {
|
|
3829
3836
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|