gamma-app-controller 2.0.1 → 2.0.3
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/application-controller/application-menu-controller/application-create-menu/application-create-menu.component.mjs +5 -4
- package/esm2020/lib/shared/gamma-bread-crumbs/bread-crumbs.component.mjs +53 -57
- package/esm2020/lib/shared/permission-helper.mjs +32 -1
- package/esm2020/lib/shared/user-access/user-access.component.mjs +3 -3
- package/esm2020/lib/template-module/kpiWithSingleLayout/kpi-single-layout.service.mjs +9 -1
- package/esm2020/lib/template-module/kpiWithSingleLayout/kpi-with-dataset.component.mjs +5 -5
- package/fesm2015/gamma-app-controller.mjs +93 -66
- package/fesm2015/gamma-app-controller.mjs.map +1 -1
- package/fesm2020/gamma-app-controller.mjs +102 -66
- package/fesm2020/gamma-app-controller.mjs.map +1 -1
- package/lib/shared/gamma-bread-crumbs/bread-crumbs.component.d.ts +2 -0
- package/lib/shared/permission-helper.d.ts +1 -0
- package/lib/template-module/kpiWithSingleLayout/kpi-single-layout.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4335,10 +4335,10 @@ class UserAccessComponent {
|
|
|
4335
4335
|
}
|
|
4336
4336
|
}
|
|
4337
4337
|
UserAccessComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserAccessComponent, deps: [{ token: CommonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4338
|
-
UserAccessComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: UserAccessComponent, selector: "app-user-access", inputs: { userOptionContainer: "userOptionContainer" }, outputs: { userOptionContainerChange: "userOptionContainerChange" }, ngImport: i0, template: "<div class=\"p-4 w-full\">\n <div class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n\n <h6 class=\"mb-2 text-lg tracking-tight text-gray-900 dark:text-white border-b pb-3 flex items-center\">\n
|
|
4338
|
+
UserAccessComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: UserAccessComponent, selector: "app-user-access", inputs: { userOptionContainer: "userOptionContainer" }, outputs: { userOptionContainerChange: "userOptionContainerChange" }, ngImport: i0, template: "<div class=\"p-4 w-full\">\n <div class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n\n <h6 class=\"mb-2 text-lg tracking-tight text-gray-900 dark:text-white border-b pb-3 flex items-center\">\n Manage Permissions\n <div class=\"ml-auto\">\n <div class=\"{{ commonService?.btn_primary_md }}\" (click)=\"addNewUser()\">\n Add Permission Entity\n </div>\n </div>\n </h6>\n\n <div class=\"w-full m-2\">\n <ng-container *ngFor=\"let item of userOptionContainer; let i = index\">\n <div class=\"flex flex-row\">\n\n <!-- Accessible User Type -->\n <div class=\"mx-2 w-1/4\">\n <div class=\"text-md p-2 capitalize\">Entity Type</div>\n <dx-select-box [items]=\"menuType\" [(ngModel)]=\"item.entityName\" (onValueChanged)=\"emitChanges()\">\n </dx-select-box>\n </div>\n\n <!-- User -->\n <div class=\"mx-2 w-1/4\">\n <div class=\"text-md p-2 capitalize\">Entity Value</div>\n <dx-tag-box [(ngModel)]=\"item.entityValues\" [acceptCustomValue]=\"true\" (onValueChanged)=\"emitChanges()\">\n </dx-tag-box>\n </div>\n\n <!-- Delete -->\n <div class=\"mx-2\">\n <div class=\"text-md p-2 capitalize\"></div>\n <div class=\"mt-4\">\n <div class=\"{{ commonService?.btn_danger_md }}\" (click)=\"deleteUser(i)\">\n Delete\n </div>\n </div>\n </div>\n\n </div>\n </ng-container>\n </div>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i4$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.DxSelectBoxComponent, selector: "dx-select-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "buttons", "dataSource", "deferRendering", "disabled", "displayExpr", "displayValue", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "fieldTemplate", "focusStateEnabled", "grouped", "groupTemplate", "height", "hint", "hoverStateEnabled", "inputAttr", "isValid", "items", "itemTemplate", "label", "labelMode", "maxLength", "minSearchLength", "name", "noDataText", "opened", "openOnFieldClick", "placeholder", "readOnly", "rtlEnabled", "searchEnabled", "searchExpr", "searchMode", "searchTimeout", "selectedItem", "showClearButton", "showDataBeforeSearch", "showDropDownButton", "showSelectionControls", "spellcheck", "stylingMode", "tabIndex", "text", "useItemTextAsTitle", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueChangeEvent", "valueExpr", "visible", "width", "wrapItemText"], outputs: ["onChange", "onClosed", "onContentReady", "onCopy", "onCustomItemCreating", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onItemClick", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onSelectionChanged", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "dataSourceChange", "deferRenderingChange", "disabledChange", "displayExprChange", "displayValueChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "fieldTemplateChange", "focusStateEnabledChange", "groupedChange", "groupTemplateChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isValidChange", "itemsChange", "itemTemplateChange", "labelChange", "labelModeChange", "maxLengthChange", "minSearchLengthChange", "nameChange", "noDataTextChange", "openedChange", "openOnFieldClickChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "searchEnabledChange", "searchExprChange", "searchModeChange", "searchTimeoutChange", "selectedItemChange", "showClearButtonChange", "showDataBeforeSearchChange", "showDropDownButtonChange", "showSelectionControlsChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useItemTextAsTitleChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "valueExprChange", "visibleChange", "widthChange", "wrapItemTextChange", "onBlur"] }, { kind: "component", type: i8$1.DxTagBoxComponent, selector: "dx-tag-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "applyValueMode", "buttons", "dataSource", "deferRendering", "disabled", "displayExpr", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "fieldTemplate", "focusStateEnabled", "grouped", "groupTemplate", "height", "hideSelectedItems", "hint", "hoverStateEnabled", "inputAttr", "isValid", "items", "itemTemplate", "label", "labelMode", "maxDisplayedTags", "maxFilterQueryLength", "maxLength", "minSearchLength", "multiline", "name", "noDataText", "opened", "openOnFieldClick", "placeholder", "readOnly", "rtlEnabled", "searchEnabled", "searchExpr", "searchMode", "searchTimeout", "selectAllMode", "selectAllText", "selectedItems", "showClearButton", "showDataBeforeSearch", "showDropDownButton", "showMultiTagOnly", "showSelectionControls", "stylingMode", "tabIndex", "tagTemplate", "text", "useItemTextAsTitle", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueExpr", "visible", "width", "wrapItemText"], outputs: ["onChange", "onClosed", "onContentReady", "onCustomItemCreating", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onItemClick", "onKeyDown", "onKeyUp", "onMultiTagPreparing", "onOpened", "onOptionChanged", "onSelectAllValueChanged", "onSelectionChanged", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "applyValueModeChange", "buttonsChange", "dataSourceChange", "deferRenderingChange", "disabledChange", "displayExprChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "fieldTemplateChange", "focusStateEnabledChange", "groupedChange", "groupTemplateChange", "heightChange", "hideSelectedItemsChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isValidChange", "itemsChange", "itemTemplateChange", "labelChange", "labelModeChange", "maxDisplayedTagsChange", "maxFilterQueryLengthChange", "maxLengthChange", "minSearchLengthChange", "multilineChange", "nameChange", "noDataTextChange", "openedChange", "openOnFieldClickChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "searchEnabledChange", "searchExprChange", "searchModeChange", "searchTimeoutChange", "selectAllModeChange", "selectAllTextChange", "selectedItemsChange", "showClearButtonChange", "showDataBeforeSearchChange", "showDropDownButtonChange", "showMultiTagOnlyChange", "showSelectionControlsChange", "stylingModeChange", "tabIndexChange", "tagTemplateChange", "textChange", "useItemTextAsTitleChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueExprChange", "visibleChange", "widthChange", "wrapItemTextChange", "onBlur"] }] });
|
|
4339
4339
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserAccessComponent, decorators: [{
|
|
4340
4340
|
type: Component,
|
|
4341
|
-
args: [{ selector: 'app-user-access', template: "<div class=\"p-4 w-full\">\n <div class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n\n <h6 class=\"mb-2 text-lg tracking-tight text-gray-900 dark:text-white border-b pb-3 flex items-center\">\n
|
|
4341
|
+
args: [{ selector: 'app-user-access', template: "<div class=\"p-4 w-full\">\n <div class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n\n <h6 class=\"mb-2 text-lg tracking-tight text-gray-900 dark:text-white border-b pb-3 flex items-center\">\n Manage Permissions\n <div class=\"ml-auto\">\n <div class=\"{{ commonService?.btn_primary_md }}\" (click)=\"addNewUser()\">\n Add Permission Entity\n </div>\n </div>\n </h6>\n\n <div class=\"w-full m-2\">\n <ng-container *ngFor=\"let item of userOptionContainer; let i = index\">\n <div class=\"flex flex-row\">\n\n <!-- Accessible User Type -->\n <div class=\"mx-2 w-1/4\">\n <div class=\"text-md p-2 capitalize\">Entity Type</div>\n <dx-select-box [items]=\"menuType\" [(ngModel)]=\"item.entityName\" (onValueChanged)=\"emitChanges()\">\n </dx-select-box>\n </div>\n\n <!-- User -->\n <div class=\"mx-2 w-1/4\">\n <div class=\"text-md p-2 capitalize\">Entity Value</div>\n <dx-tag-box [(ngModel)]=\"item.entityValues\" [acceptCustomValue]=\"true\" (onValueChanged)=\"emitChanges()\">\n </dx-tag-box>\n </div>\n\n <!-- Delete -->\n <div class=\"mx-2\">\n <div class=\"text-md p-2 capitalize\"></div>\n <div class=\"mt-4\">\n <div class=\"{{ commonService?.btn_danger_md }}\" (click)=\"deleteUser(i)\">\n Delete\n </div>\n </div>\n </div>\n\n </div>\n </ng-container>\n </div>\n </div>\n</div>" }]
|
|
4342
4342
|
}], ctorParameters: function () { return [{ type: CommonService }]; }, propDecorators: { userOptionContainer: [{
|
|
4343
4343
|
type: Input
|
|
4344
4344
|
}], userOptionContainerChange: [{
|
|
@@ -8139,11 +8139,10 @@ class BreadCrumbsComponent {
|
|
|
8139
8139
|
return;
|
|
8140
8140
|
}
|
|
8141
8141
|
else {
|
|
8142
|
-
|
|
8143
|
-
this.
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
}, 500);
|
|
8142
|
+
debugger;
|
|
8143
|
+
this.kpiListData = value;
|
|
8144
|
+
this.getBreadCrumbsData(value);
|
|
8145
|
+
this.loadBreadCrumbs();
|
|
8147
8146
|
this.isBreadCrumbs = true;
|
|
8148
8147
|
}
|
|
8149
8148
|
}
|
|
@@ -8180,75 +8179,72 @@ class BreadCrumbsComponent {
|
|
|
8180
8179
|
let structures = {};
|
|
8181
8180
|
data.forEach(result => {
|
|
8182
8181
|
const item = {};
|
|
8183
|
-
item["
|
|
8184
|
-
item["
|
|
8185
|
-
item["
|
|
8186
|
-
item["tid"] = result["tid"].trim();
|
|
8187
|
-
if (result["nodes"] !== undefined) {
|
|
8188
|
-
item["nodes"] = this.getBreadCrumbsData(result["nodes"]);
|
|
8189
|
-
}
|
|
8182
|
+
item["name"] = result["kpiName"];
|
|
8183
|
+
item["pageId"] = result.tagType == 'child' ? result["pageId"] : null;
|
|
8184
|
+
item["tid"] = result.tagType == 'child' ? result["childTid"].trim() : result["parentTid"].trim();
|
|
8190
8185
|
this.kpi_names[result["pageId"]] = item["tid"];
|
|
8191
|
-
structures[result["
|
|
8192
|
-
this.kpi_structures[result["
|
|
8186
|
+
structures[result["childTid"]] = item;
|
|
8187
|
+
this.kpi_structures[result["childTid"]] = item;
|
|
8193
8188
|
});
|
|
8194
8189
|
return structures;
|
|
8195
8190
|
}
|
|
8196
8191
|
loadBreadCrumbs() {
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
kpiContainer = this.getBreadCrumbsData(this.kpiListData);
|
|
8201
|
-
}
|
|
8202
|
-
else {
|
|
8203
|
-
kpiContainer = this.getBreadCrumbsData(this.commonService.allKpibrowserDetailContainer);
|
|
8204
|
-
}
|
|
8205
|
-
const kpiId = this.activatedRoute.snapshot.queryParams['pageId'];
|
|
8206
|
-
const kpiTid = this.kpi_names[kpiId];
|
|
8192
|
+
debugger;
|
|
8193
|
+
const pageId = this.activatedRoute.snapshot.queryParams['pageId'];
|
|
8194
|
+
const kpiTid = this.kpi_names[pageId];
|
|
8207
8195
|
const props = this.kpi_structures[kpiTid];
|
|
8208
|
-
const propsList =
|
|
8196
|
+
const propsList = this.buildKpiPath(this.kpiListData, props["tid"]);
|
|
8209
8197
|
this.breadcrumbList = propsList.split("/");
|
|
8210
8198
|
if (this.location.path() !== "") {
|
|
8211
8199
|
let link = {};
|
|
8212
8200
|
this.breadcrumbLinksList = [];
|
|
8201
|
+
this.breadcrumbLinksList.unshift({
|
|
8202
|
+
name: "RA KPI Browser",
|
|
8203
|
+
url: "/apps/raKpi/rakpiBrowser",
|
|
8204
|
+
kpiName: "RA KPI Browser"
|
|
8205
|
+
});
|
|
8213
8206
|
for (let i = 0; i < this.breadcrumbList.length; i++) {
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
url: "/apps/raKpi/rakpiBrowser",
|
|
8219
|
-
kpiName: "RA KPI Browser",
|
|
8220
|
-
};
|
|
8221
|
-
}
|
|
8222
|
-
else {
|
|
8223
|
-
link = {
|
|
8224
|
-
name: this.breadcrumbList[i],
|
|
8225
|
-
url: "/apps/fmsKpi",
|
|
8226
|
-
kpiName: "FMS KPI Browser",
|
|
8227
|
-
};
|
|
8228
|
-
}
|
|
8229
|
-
}
|
|
8230
|
-
else {
|
|
8231
|
-
let returnId = "";
|
|
8232
|
-
for (let j = 0; j <= i; j++) {
|
|
8233
|
-
if (j != 0) {
|
|
8234
|
-
returnId += "/";
|
|
8235
|
-
}
|
|
8236
|
-
returnId += this.breadcrumbList[j];
|
|
8207
|
+
let returnId = "";
|
|
8208
|
+
for (let j = 0; j <= i; j++) {
|
|
8209
|
+
if (j != 0) {
|
|
8210
|
+
returnId += "/";
|
|
8237
8211
|
}
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
}
|
|
8212
|
+
returnId += this.breadcrumbList[j];
|
|
8213
|
+
}
|
|
8214
|
+
link = {
|
|
8215
|
+
name: this.breadcrumbList[i],
|
|
8216
|
+
url: this.breadcrumbLinksList[i]["url"],
|
|
8217
|
+
id: this.breadcrumbList[i],
|
|
8218
|
+
kpiName: this.breadcrumbList[i],
|
|
8219
|
+
returnId: returnId,
|
|
8220
|
+
};
|
|
8221
|
+
this.commonService.global_kpi_name = this.breadcrumbList[i];
|
|
8247
8222
|
this.breadcrumbLinksList.push(link);
|
|
8248
8223
|
}
|
|
8249
8224
|
this.count = this.breadcrumbList.length;
|
|
8250
8225
|
}
|
|
8251
8226
|
}
|
|
8227
|
+
buildKpiPath(kpiListData, startTid) {
|
|
8228
|
+
const path = [];
|
|
8229
|
+
const tidArray = this.buildTidArray(startTid);
|
|
8230
|
+
tidArray.forEach((tid, index) => {
|
|
8231
|
+
const kpi = kpiListData.find(kpi => index === 0
|
|
8232
|
+
? kpi.parentTid === tid
|
|
8233
|
+
: kpi.childTid === tid);
|
|
8234
|
+
if (kpi) {
|
|
8235
|
+
path.push(kpi.kpiName);
|
|
8236
|
+
}
|
|
8237
|
+
});
|
|
8238
|
+
return path.join(" / ");
|
|
8239
|
+
}
|
|
8240
|
+
buildTidArray(startTid) {
|
|
8241
|
+
const parts = startTid.split(".");
|
|
8242
|
+
const result = [];
|
|
8243
|
+
for (let i = 0; i < parts.length; i++) {
|
|
8244
|
+
result.push(parts.slice(0, i + 1).join("."));
|
|
8245
|
+
}
|
|
8246
|
+
return result;
|
|
8247
|
+
}
|
|
8252
8248
|
}
|
|
8253
8249
|
BreadCrumbsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BreadCrumbsComponent, deps: [{ token: i4$2.Location }, { token: i2.Router }, { token: i1.HttpClient }, { token: i2.ActivatedRoute }, { token: CommonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8254
8250
|
BreadCrumbsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BreadCrumbsComponent, selector: "gamma-bread-crumbs", inputs: { kpi_data_container: "kpi_data_container" }, ngImport: i0, template: "<nav class=\"flex mt-1\" aria-label=\"Breadcrumb\" *ngIf=\"isBreadCrumbs\">\n <ol class=\"inline-flex items-center space-x-1 md:space-x-3\">\n <li class=\"inline-flex items-center cursor-pointer\" *ngFor=\"let breadcrumbLabel of breadcrumbLinksList;\">\n <a [routerLink]=\"breadcrumbLabel.url\" [queryParams]=\"{returnId: breadcrumbLabel.returnId }\"\n class=\"inline-flex items-center text-sm font-medium text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white\">\n <svg class=\"w-6 h-6 text-gray-400\" fill=\"currentColor\" viewBox=\"0 0 20 20\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\"\n d=\"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z\"\n clip-rule=\"evenodd\"></path>\n </svg>\n {{breadcrumbLabel.kpiName}}\n </a>\n </li>\n </ol>\n</nav>", styles: [".breadcrumb{padding:0!important;margin-bottom:0!important;font-weight:400;font-size:12px}\n"], dependencies: [{ kind: "directive", type: i4$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }] });
|
|
@@ -13288,25 +13284,25 @@ class ApplicationCreateMenuComponent {
|
|
|
13288
13284
|
ngOnInit() {
|
|
13289
13285
|
let menuId = this.activatedRoute.snapshot.queryParams['menuId'];
|
|
13290
13286
|
let contentType = this.activatedRoute.snapshot.queryParams['contentType'];
|
|
13291
|
-
if (contentType == "edit") {
|
|
13287
|
+
if (menuId && contentType == "edit") {
|
|
13292
13288
|
this.service.getAppMenuConfigById(menuId).subscribe({
|
|
13293
13289
|
next: (data) => {
|
|
13294
13290
|
this.menuObject = data;
|
|
13295
13291
|
this.selectedQueryParamStr = (data['queryParams'] && data['queryParams']['pageId']) ? data['queryParams']['pageId'] : "";
|
|
13296
13292
|
this.userOptionContainer = (data['permissions'] && data['permissions'].length !== 0) ? data['permissions'] : [];
|
|
13297
13293
|
this.isContentType = true;
|
|
13294
|
+
this.getParentMenuList();
|
|
13298
13295
|
}, error: (err) => {
|
|
13299
13296
|
}
|
|
13300
13297
|
});
|
|
13301
13298
|
}
|
|
13302
|
-
this.getParentMenuList();
|
|
13303
13299
|
}
|
|
13304
13300
|
getParentMenuList() {
|
|
13305
13301
|
this.paparentMenuDatasource = [];
|
|
13306
13302
|
this.service.listAppMenuConfigs().subscribe({
|
|
13307
13303
|
next: (data) => {
|
|
13308
13304
|
data.forEach(element => {
|
|
13309
|
-
if (element.type == "collapsable") {
|
|
13305
|
+
if (element.type == "collapsable" || element.menuType == "parent") {
|
|
13310
13306
|
let obj = {};
|
|
13311
13307
|
obj = {
|
|
13312
13308
|
parentMenuTid: element.parentMenuTid,
|
|
@@ -13317,6 +13313,7 @@ class ApplicationCreateMenuComponent {
|
|
|
13317
13313
|
this.paparentMenuDatasource.push(obj);
|
|
13318
13314
|
}
|
|
13319
13315
|
});
|
|
13316
|
+
debugger;
|
|
13320
13317
|
if (this.menuObject.menuId !== "" && this.menuObject.menuType == "parent") {
|
|
13321
13318
|
const menu_object = this.paparentMenuDatasource.filter(menu => menu.menuId == this.menuObject.menuId);
|
|
13322
13319
|
this.defaultSelectedParent = menu_object[0].menuId;
|
|
@@ -18023,6 +18020,14 @@ class KpiWithSingleLayoutService {
|
|
|
18023
18020
|
return response;
|
|
18024
18021
|
}), catchError(this.handleError));
|
|
18025
18022
|
}
|
|
18023
|
+
listKpiEntryConfigs() {
|
|
18024
|
+
const apiUrl = this.environment.appUrl + this.environment.apiVersion + this.environment.packageBasePath + '/listKpiEntryConfigs?caller=app';
|
|
18025
|
+
return this.http
|
|
18026
|
+
.get(apiUrl, { withCredentials: true })
|
|
18027
|
+
.pipe(map((response) => {
|
|
18028
|
+
return response;
|
|
18029
|
+
}), catchError(this.handleError));
|
|
18030
|
+
}
|
|
18026
18031
|
}
|
|
18027
18032
|
KpiWithSingleLayoutService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KpiWithSingleLayoutService, deps: [{ token: i1.HttpClient }, { token: APP_ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
18028
18033
|
KpiWithSingleLayoutService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KpiWithSingleLayoutService, providedIn: "root" });
|
|
@@ -18545,6 +18550,28 @@ class PermissionHelper {
|
|
|
18545
18550
|
}
|
|
18546
18551
|
return false;
|
|
18547
18552
|
}
|
|
18553
|
+
buildMenuTree(userName, kpiData) {
|
|
18554
|
+
let filteredMenus = kpiData;
|
|
18555
|
+
const menuMap = new Map();
|
|
18556
|
+
const menuTree = [];
|
|
18557
|
+
filteredMenus.forEach(menu => {
|
|
18558
|
+
if (!this.getPermissionEntity(menu.permissions))
|
|
18559
|
+
return;
|
|
18560
|
+
menuMap.set(menu.childTid || menu.parentTid, Object.assign(Object.assign({ id: menu.kpiId, title: menu.kpiName, icon: menu.icon, type: menu.kpiType, tagType: menu.tagType, visibility: menu.visibility }, (menu.link && { link: menu.link.replace(/^\/+/, '') })), { children: [] }));
|
|
18561
|
+
});
|
|
18562
|
+
filteredMenus.forEach(kpi => {
|
|
18563
|
+
if (kpi.parentTid && kpi.childTid) {
|
|
18564
|
+
const parent = menuMap.get(kpi.parentTid);
|
|
18565
|
+
if (parent) {
|
|
18566
|
+
parent.children.push(menuMap.get(kpi.childTid));
|
|
18567
|
+
}
|
|
18568
|
+
}
|
|
18569
|
+
else {
|
|
18570
|
+
menuTree.push(menuMap.get(kpi.parentTid));
|
|
18571
|
+
}
|
|
18572
|
+
});
|
|
18573
|
+
return menuTree;
|
|
18574
|
+
}
|
|
18548
18575
|
}
|
|
18549
18576
|
PermissionHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PermissionHelper, deps: [{ token: APP_SECURITY_PRINCIPAL }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
18550
18577
|
PermissionHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PermissionHelper, providedIn: 'root' });
|
|
@@ -18784,10 +18811,10 @@ class KpiWithDataSetTestComponent {
|
|
|
18784
18811
|
this.isDefaultFilterParams = false;
|
|
18785
18812
|
}
|
|
18786
18813
|
ngOnInit() {
|
|
18787
|
-
this.service.
|
|
18788
|
-
|
|
18789
|
-
|
|
18790
|
-
|
|
18814
|
+
this.service.listKpiEntryConfigs().subscribe((data) => {
|
|
18815
|
+
this.kpi_breadcrumbs_container = data;
|
|
18816
|
+
}, err => {
|
|
18817
|
+
this.toastr.error('Unexpected Server Exception. Please contact System Admin.', 'KPI Config');
|
|
18791
18818
|
});
|
|
18792
18819
|
this.loadingModal = true;
|
|
18793
18820
|
this.pageId = this.activatedRoute.snapshot.queryParams['pageId'];
|