@memberjunction/ng-explorer-core 0.9.66 → 0.9.77
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/dist/lib/ask-skip/ask-skip.component.js +1 -1
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.d.ts +5 -1
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.js +71 -9
- package/dist/lib/favorites/favorites.component.d.ts +2 -1
- package/dist/lib/favorites/favorites.component.js +31 -17
- package/dist/lib/generic/base-form-component.js +2 -2
- package/dist/lib/generic-browse-list/generic-browse-list.component.d.ts +9 -1
- package/dist/lib/generic-browse-list/generic-browse-list.component.js +76 -24
- package/dist/lib/resource-wrappers/record-resource.component.js +1 -1
- package/dist/lib/resource-wrappers/report-resource.component.js +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +1 -1
- package/dist/lib/single-application/single-application.component.d.ts +0 -1
- package/dist/lib/single-application/single-application.component.js +3 -22
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +1 -1
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.d.ts +13 -0
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +59 -0
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts +22 -2
- package/dist/lib/single-dashboard/single-dashboard.component.js +234 -44
- package/dist/module.d.ts +26 -25
- package/dist/module.js +7 -1
- package/package.json +7 -7
|
@@ -254,7 +254,7 @@ export class AskSkipComponent {
|
|
|
254
254
|
}
|
|
255
255
|
else {
|
|
256
256
|
const md = new Metadata();
|
|
257
|
-
newConvoObject =
|
|
257
|
+
newConvoObject = yield md.GetEntityObject('Conversations');
|
|
258
258
|
yield newConvoObject.Load(conversation.ID);
|
|
259
259
|
// now replace conversation in the list with the new object
|
|
260
260
|
this.Conversations = this.Conversations.map(c => c.ID == conversation.ID ? newConvoObject : c);
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { Router } from '@angular/router';
|
|
2
2
|
import { DashboardEntity } from '@memberjunction/core-entities';
|
|
3
|
+
import { SharedService } from '../../shared/shared.service';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class DashboardBrowserComponent {
|
|
5
6
|
private router;
|
|
7
|
+
private sharedService;
|
|
6
8
|
dashboards: DashboardEntity[];
|
|
7
9
|
showLoader: boolean;
|
|
8
|
-
constructor(router: Router);
|
|
10
|
+
constructor(router: Router, sharedService: SharedService);
|
|
9
11
|
ngOnInit(): void;
|
|
10
12
|
LoadData(): Promise<void>;
|
|
11
13
|
itemClick(item: DashboardEntity): void;
|
|
14
|
+
addNew(): Promise<void>;
|
|
15
|
+
deleteItem(item: DashboardEntity): Promise<void>;
|
|
12
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<DashboardBrowserComponent, never>;
|
|
13
17
|
static ɵcmp: i0.ɵɵComponentDeclaration<DashboardBrowserComponent, "app-dashboard-browser", never, {}, {}, never, never, false, never>;
|
|
14
18
|
}
|
|
@@ -9,12 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Component } from '@angular/core';
|
|
11
11
|
import { Metadata, RunView } from '@memberjunction/core';
|
|
12
|
+
import { DashboardConfigDetails } from '../single-dashboard/single-dashboard.component';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
import * as i1 from "@angular/router";
|
|
14
|
-
import * as i2 from "
|
|
15
|
+
import * as i2 from "../../shared/shared.service";
|
|
16
|
+
import * as i3 from "../generic-browse-list/generic-browse-list.component";
|
|
15
17
|
export class DashboardBrowserComponent {
|
|
16
|
-
constructor(router) {
|
|
18
|
+
constructor(router, sharedService) {
|
|
17
19
|
this.router = router;
|
|
20
|
+
this.sharedService = sharedService;
|
|
18
21
|
this.dashboards = [];
|
|
19
22
|
this.showLoader = false;
|
|
20
23
|
}
|
|
@@ -30,8 +33,12 @@ export class DashboardBrowserComponent {
|
|
|
30
33
|
EntityName: 'Dashboards',
|
|
31
34
|
ExtraFilter: `UserID=${md.CurrentUser.ID}`
|
|
32
35
|
});
|
|
33
|
-
if (result && result.Success)
|
|
36
|
+
if (result && result.Success) {
|
|
34
37
|
this.dashboards = result.Results;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.dashboards = [];
|
|
41
|
+
}
|
|
35
42
|
this.showLoader = false;
|
|
36
43
|
});
|
|
37
44
|
}
|
|
@@ -40,16 +47,71 @@ export class DashboardBrowserComponent {
|
|
|
40
47
|
this.router.navigate(['resource', 'dashboard', item.ID]);
|
|
41
48
|
}
|
|
42
49
|
}
|
|
50
|
+
addNew() {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
this.showLoader = true;
|
|
53
|
+
const metadata = new Metadata();
|
|
54
|
+
let dashboardEntity = yield metadata.GetEntityObject('Dashboards');
|
|
55
|
+
dashboardEntity.NewRecord();
|
|
56
|
+
dashboardEntity.UserID = metadata.CurrentUser.ID;
|
|
57
|
+
let dashboardCount = this.dashboards.length;
|
|
58
|
+
let nameSuffix = dashboardCount > 0 ? `${dashboardCount + 1}` : "";
|
|
59
|
+
dashboardEntity.Name = "New Dashboard " + nameSuffix;
|
|
60
|
+
let defaultConfigDetails = new DashboardConfigDetails();
|
|
61
|
+
const config = {
|
|
62
|
+
columns: defaultConfigDetails.columns,
|
|
63
|
+
rowHeight: defaultConfigDetails.rowHeight,
|
|
64
|
+
resizable: defaultConfigDetails.resizable,
|
|
65
|
+
reorderable: defaultConfigDetails.reorderable,
|
|
66
|
+
items: []
|
|
67
|
+
};
|
|
68
|
+
const configJSON = JSON.stringify(config);
|
|
69
|
+
dashboardEntity.UIConfigDetails = configJSON;
|
|
70
|
+
const result = yield dashboardEntity.Save();
|
|
71
|
+
if (result) {
|
|
72
|
+
this.dashboards.push(dashboardEntity);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this.sharedService.CreateSimpleNotification("Error creating new dashboard entity", "error");
|
|
76
|
+
}
|
|
77
|
+
this.showLoader = false;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
deleteItem(item) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
this.showLoader = true;
|
|
83
|
+
if (item && item.ID && item.ID > 0) {
|
|
84
|
+
const md = new Metadata();
|
|
85
|
+
let dashboardEntity = yield md.GetEntityObject('Dashboards');
|
|
86
|
+
let loadResult = yield dashboardEntity.Load(item.ID);
|
|
87
|
+
if (loadResult) {
|
|
88
|
+
let deleteResult = yield dashboardEntity.Delete();
|
|
89
|
+
if (deleteResult) {
|
|
90
|
+
//todo - change these to use the shared
|
|
91
|
+
this.sharedService.CreateSimpleNotification(`successfully deleted dashboard record ${item.ID}`, "info");
|
|
92
|
+
this.dashboards = this.dashboards.filter(i => i.ID != item.ID);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
this.sharedService.CreateSimpleNotification(`Unable to delete dashboard record ${item.ID}`, "error");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.sharedService.CreateSimpleNotification(`unable to fetch dashboard record ${item.ID}`, "error");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
this.showLoader = false;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
43
105
|
}
|
|
44
|
-
DashboardBrowserComponent.ɵfac = function DashboardBrowserComponent_Factory(t) { return new (t || DashboardBrowserComponent)(i0.ɵɵdirectiveInject(i1.Router)); };
|
|
45
|
-
DashboardBrowserComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DashboardBrowserComponent, selectors: [["app-dashboard-browser"]], decls: 1, vars: 2, consts: [["title", "Dashboards", "itemType", "dashboard", 3, "items", "showLoader", "itemClickEvent"]], template: function DashboardBrowserComponent_Template(rf, ctx) { if (rf & 1) {
|
|
106
|
+
DashboardBrowserComponent.ɵfac = function DashboardBrowserComponent_Factory(t) { return new (t || DashboardBrowserComponent)(i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i2.SharedService)); };
|
|
107
|
+
DashboardBrowserComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DashboardBrowserComponent, selectors: [["app-dashboard-browser"]], decls: 1, vars: 2, consts: [["title", "Dashboards", "itemType", "dashboard", 3, "items", "showLoader", "itemClickEvent", "addButtonClickEvent", "deleteButtonClickEvent"]], template: function DashboardBrowserComponent_Template(rf, ctx) { if (rf & 1) {
|
|
46
108
|
i0.ɵɵelementStart(0, "app-generic-browse-list", 0);
|
|
47
|
-
i0.ɵɵlistener("itemClickEvent", function DashboardBrowserComponent_Template_app_generic_browse_list_itemClickEvent_0_listener($event) { return ctx.itemClick($event); });
|
|
109
|
+
i0.ɵɵlistener("itemClickEvent", function DashboardBrowserComponent_Template_app_generic_browse_list_itemClickEvent_0_listener($event) { return ctx.itemClick($event); })("addButtonClickEvent", function DashboardBrowserComponent_Template_app_generic_browse_list_addButtonClickEvent_0_listener() { return ctx.addNew(); })("deleteButtonClickEvent", function DashboardBrowserComponent_Template_app_generic_browse_list_deleteButtonClickEvent_0_listener($event) { return ctx.deleteItem($event); });
|
|
48
110
|
i0.ɵɵelementEnd();
|
|
49
111
|
} if (rf & 2) {
|
|
50
112
|
i0.ɵɵproperty("items", ctx.dashboards)("showLoader", ctx.showLoader);
|
|
51
|
-
} }, dependencies: [
|
|
113
|
+
} }, dependencies: [i3.GenericBrowseListComponent], styles: [".main-area[_ngcontent-%COMP%] {\r\n display: flex;\r\n height: 100%;\r\n width: 100%;\r\n gap: 24px;\r\n padding: 24px 0;\r\n}\r\n.list-view[_ngcontent-%COMP%] {\r\n padding: 16px;\r\n min-width: 300px;\r\n border-radius: 4px;\r\n background: #FAFAFA;\r\n border: none;\r\n}\r\n .list-view .k-listview-header, .list-view .k-listview-footer {\r\n border: none;\r\n}\r\n .list-view .k-listview-content {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 4px;\r\n background: #fff;\r\n padding: 16px;\r\n}\r\n\r\n.header[_ngcontent-%COMP%], .footer[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 16px;\r\n height: auto;\r\n margin:0;\r\n}\r\n\r\n.header[_ngcontent-%COMP%] {\r\n color: #424242;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n.header[_ngcontent-%COMP%] .head-tag[_ngcontent-%COMP%] {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\nfont-size: 16px;\r\nfont-style: normal;\r\nfont-weight: 400;\r\nline-height: 20px;\r\n}\r\n\r\n.header[_ngcontent-%COMP%] .count[_ngcontent-%COMP%] {\r\n width: 24px;\r\n height: 24px;\r\n min-width: 24px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n font-size: 10px;\r\n background: rgba(0, 0, 0, 0.08);\r\n border-radius: 50%;\r\n}\r\n.footer[_ngcontent-%COMP%] {\r\n font-size: 14px;\r\n margin-top: 16px;\r\n}\r\n\r\n.list-item[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 30px;\r\n cursor: pointer;\r\n margin: 4px;\r\n}\r\n.card-container[_ngcontent-%COMP%] {\r\n margin: 0;\r\n padding: 0;\r\n box-shadow: none;\r\n}\r\n.card-header-entity[_ngcontent-%COMP%] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n}\r\n.card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n\r\n \r\n\r\n\r\n \r\n .view-card[_ngcontent-%COMP%] .view-icon[_ngcontent-%COMP%] {\r\n color: #ff6358;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 6px;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] .k-card-body[_ngcontent-%COMP%] {\r\n background: #fff;\r\n padding: 12px 20px;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] .view-card[_ngcontent-%COMP%] {\r\n overflow: auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n background: #fafafa;\r\n padding: 4px 15px;\r\n }\r\n .view-card[_ngcontent-%COMP%] .btn-wrapper[_ngcontent-%COMP%] {\r\n display: flex;\r\n align-items: center;\r\n }\r\n \r\n .k-card-body[_ngcontent-%COMP%] .view-card-content[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 16px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n margin-bottom: 0;\r\n letter-spacing: 0.18px;\r\n }\r\n .k-card-body[_ngcontent-%COMP%] .view-card-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n color: #666;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n height: 48px;\r\n margin-bottom: 0;\r\n }\r\n .card-container[_ngcontent-%COMP%] {\r\n padding: 0;\r\n margin: 0;\r\n box-shadow: none;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n }\r\n \r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n .main-area[_ngcontent-%COMP%] .card-list[_ngcontent-%COMP%] {\r\n display: flex;\r\n gap: 20px;\r\n }"] });
|
|
52
114
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DashboardBrowserComponent, [{
|
|
53
115
|
type: Component,
|
|
54
|
-
args: [{ selector: 'app-dashboard-browser', template: "<app-generic-browse-list title=\"Dashboards\" itemType=\"dashboard\" [items]=\"dashboards\" (itemClickEvent)=\"itemClick($event)\" [showLoader]=\"showLoader\">\n\n</app-generic-browse-list>", styles: ["\r\n.main-area {\r\n display: flex;\r\n height: 100%;\r\n width: 100%;\r\n gap: 24px;\r\n padding: 24px 0;\r\n}\r\n.list-view {\r\n padding: 16px;\r\n min-width: 300px;\r\n border-radius: 4px;\r\n background: #FAFAFA;\r\n border: none;\r\n}\r\n::ng-deep .list-view .k-listview-header, \r\n::ng-deep .list-view .k-listview-footer {\r\n border: none;\r\n}\r\n::ng-deep .list-view .k-listview-content {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 4px;\r\n background: #fff;\r\n padding: 16px;\r\n}\r\n\r\n.header,\r\n.footer {\r\n color: #424242;\r\n font-size: 16px;\r\n height: auto;\r\n margin:0;\r\n}\r\n\r\n.header {\r\n color: #424242;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n.header .head-tag {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\nfont-size: 16px;\r\nfont-style: normal;\r\nfont-weight: 400;\r\nline-height: 20px;\r\n}\r\n\r\n.header .count {\r\n width: 24px;\r\n height: 24px;\r\n min-width: 24px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n font-size: 10px;\r\n background: rgba(0, 0, 0, 0.08);\r\n border-radius: 50%;\r\n}\r\n.footer {\r\n font-size: 14px;\r\n margin-top: 16px;\r\n}\r\n\r\n.list-item {\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 30px;\r\n cursor: pointer;\r\n margin: 4px;\r\n}\r\n.card-container {\r\n margin: 0;\r\n padding: 0;\r\n box-shadow: none;\r\n}\r\n.card-header-entity {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n}\r\n.card-header-entity .title-wrap h1 {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity .title-wrap {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity .title-wrap p {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n\r\n \r\n\r\n\r\n \r\n .view-card .view-icon {\r\n color: #ff6358;\r\n }\r\n .card-wrapper {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 6px;\r\n }\r\n .card-wrapper .k-card-body {\r\n background: #fff;\r\n padding: 12px 20px;\r\n }\r\n .card-wrapper .view-card {\r\n overflow: auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n background: #fafafa;\r\n padding: 4px 15px;\r\n }\r\n .view-card .btn-wrapper {\r\n display: flex;\r\n align-items: center;\r\n }\r\n \r\n .k-card-body .view-card-content h5 {\r\n color: #424242;\r\n font-size: 16px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n margin-bottom: 0;\r\n letter-spacing: 0.18px;\r\n }\r\n .k-card-body .view-card-content p {\r\n color: #666;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n height: 48px;\r\n margin-bottom: 0;\r\n }\r\n .card-container {\r\n padding: 0;\r\n margin: 0;\r\n box-shadow: none;\r\n }\r\n .card-header-entity {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n }\r\n \r\n .card-header-entity .title-wrap h1 {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity .title-wrap {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity .title-wrap p {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n .main-area .card-list {\r\n display: flex;\r\n gap: 20px;\r\n }\r\n "] }]
|
|
55
|
-
}], function () { return [{ type: i1.Router }]; }, null); })();
|
|
116
|
+
args: [{ selector: 'app-dashboard-browser', template: "<app-generic-browse-list title=\"Dashboards\" itemType=\"dashboard\" [items]=\"dashboards\" (itemClickEvent)=\"itemClick($event)\" (addButtonClickEvent)=\"addNew()\" (deleteButtonClickEvent)=\"deleteItem($event)\" [showLoader]=\"showLoader\">\r\n\r\n</app-generic-browse-list>", styles: ["\r\n.main-area {\r\n display: flex;\r\n height: 100%;\r\n width: 100%;\r\n gap: 24px;\r\n padding: 24px 0;\r\n}\r\n.list-view {\r\n padding: 16px;\r\n min-width: 300px;\r\n border-radius: 4px;\r\n background: #FAFAFA;\r\n border: none;\r\n}\r\n::ng-deep .list-view .k-listview-header, \r\n::ng-deep .list-view .k-listview-footer {\r\n border: none;\r\n}\r\n::ng-deep .list-view .k-listview-content {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 4px;\r\n background: #fff;\r\n padding: 16px;\r\n}\r\n\r\n.header,\r\n.footer {\r\n color: #424242;\r\n font-size: 16px;\r\n height: auto;\r\n margin:0;\r\n}\r\n\r\n.header {\r\n color: #424242;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n.header .head-tag {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\nfont-size: 16px;\r\nfont-style: normal;\r\nfont-weight: 400;\r\nline-height: 20px;\r\n}\r\n\r\n.header .count {\r\n width: 24px;\r\n height: 24px;\r\n min-width: 24px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n font-size: 10px;\r\n background: rgba(0, 0, 0, 0.08);\r\n border-radius: 50%;\r\n}\r\n.footer {\r\n font-size: 14px;\r\n margin-top: 16px;\r\n}\r\n\r\n.list-item {\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 30px;\r\n cursor: pointer;\r\n margin: 4px;\r\n}\r\n.card-container {\r\n margin: 0;\r\n padding: 0;\r\n box-shadow: none;\r\n}\r\n.card-header-entity {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n}\r\n.card-header-entity .title-wrap h1 {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity .title-wrap {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity .title-wrap p {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n\r\n \r\n\r\n\r\n \r\n .view-card .view-icon {\r\n color: #ff6358;\r\n }\r\n .card-wrapper {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 6px;\r\n }\r\n .card-wrapper .k-card-body {\r\n background: #fff;\r\n padding: 12px 20px;\r\n }\r\n .card-wrapper .view-card {\r\n overflow: auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n background: #fafafa;\r\n padding: 4px 15px;\r\n }\r\n .view-card .btn-wrapper {\r\n display: flex;\r\n align-items: center;\r\n }\r\n \r\n .k-card-body .view-card-content h5 {\r\n color: #424242;\r\n font-size: 16px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n margin-bottom: 0;\r\n letter-spacing: 0.18px;\r\n }\r\n .k-card-body .view-card-content p {\r\n color: #666;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n height: 48px;\r\n margin-bottom: 0;\r\n }\r\n .card-container {\r\n padding: 0;\r\n margin: 0;\r\n box-shadow: none;\r\n }\r\n .card-header-entity {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n }\r\n \r\n .card-header-entity .title-wrap h1 {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity .title-wrap {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity .title-wrap p {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n .main-area .card-list {\r\n display: flex;\r\n gap: 20px;\r\n }\r\n "] }]
|
|
117
|
+
}], function () { return [{ type: i1.Router }, { type: i2.SharedService }]; }, null); })();
|
|
@@ -6,8 +6,9 @@ export declare class FavoritesComponent {
|
|
|
6
6
|
favorites: UserFavoriteEntity[];
|
|
7
7
|
ExtraFilter: string;
|
|
8
8
|
constructor(router: Router);
|
|
9
|
-
ngOnInit(): void
|
|
9
|
+
ngOnInit(): Promise<void>;
|
|
10
10
|
favoriteItemClick(fav: UserFavoriteEntity): void;
|
|
11
|
+
favoriteItemDisplayName(fav: any): any;
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<FavoritesComponent, never>;
|
|
12
13
|
static ɵcmp: i0.ɵɵComponentDeclaration<FavoritesComponent, "app-favorites", never, {}, {}, never, never, false, never>;
|
|
13
14
|
}
|
|
@@ -36,10 +36,11 @@ function FavoritesComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
36
36
|
i0.ɵɵelementEnd();
|
|
37
37
|
} if (rf & 2) {
|
|
38
38
|
const dataItem_r2 = ctx.dataItem;
|
|
39
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
39
40
|
i0.ɵɵadvance(2);
|
|
40
41
|
i0.ɵɵtextInterpolate(dataItem_r2.Entity);
|
|
41
42
|
i0.ɵɵadvance(1);
|
|
42
|
-
i0.ɵɵtextInterpolate1(": ",
|
|
43
|
+
i0.ɵɵtextInterpolate1(": ", ctx_r1.favoriteItemDisplayName(dataItem_r2), " ");
|
|
43
44
|
} }
|
|
44
45
|
export class FavoritesComponent {
|
|
45
46
|
constructor(router) {
|
|
@@ -48,28 +49,31 @@ export class FavoritesComponent {
|
|
|
48
49
|
this.ExtraFilter = '';
|
|
49
50
|
}
|
|
50
51
|
ngOnInit() {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const md = new Metadata();
|
|
54
|
+
const rv = new RunView();
|
|
55
|
+
let sFilter = `UserID=${md.CurrentUser.ID}`;
|
|
56
|
+
if (this.ExtraFilter)
|
|
57
|
+
sFilter += `AND (${this.ExtraFilter})`;
|
|
58
|
+
const viewResults = yield rv.RunView({
|
|
59
|
+
EntityName: 'User Favorites',
|
|
60
|
+
ExtraFilter: sFilter
|
|
61
|
+
});
|
|
62
|
+
this.favorites = viewResults.Results; // set the result in the list and let the below happen after async and it will update via data binding when done
|
|
63
|
+
const input = this.favorites.map(fav => {
|
|
64
|
+
return { EntityName: fav.Entity, PrimaryKeyValues: [{ FieldName: 'ID', Value: fav.RecordID }] };
|
|
63
65
|
});
|
|
64
66
|
const results = yield md.GetEntityRecordNames(input);
|
|
65
|
-
if (results)
|
|
67
|
+
if (results) {
|
|
66
68
|
results.forEach((result) => {
|
|
67
|
-
const fav = favorites.
|
|
69
|
+
const fav = this.favorites.find(f => f.Entity == result.EntityName && f.RecordID == result.PrimaryKeyValues[0].Value);
|
|
68
70
|
if (fav) {
|
|
71
|
+
// typecast fav to any so we can add the recordname into the object below
|
|
69
72
|
fav.RecordName = result.Success ? result.RecordName : fav.Entity + ' ' + fav.RecordID;
|
|
70
73
|
}
|
|
71
74
|
});
|
|
72
|
-
|
|
75
|
+
}
|
|
76
|
+
});
|
|
73
77
|
}
|
|
74
78
|
favoriteItemClick(fav) {
|
|
75
79
|
if (fav) {
|
|
@@ -82,6 +86,16 @@ export class FavoritesComponent {
|
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
}
|
|
89
|
+
favoriteItemDisplayName(fav) {
|
|
90
|
+
if (fav) {
|
|
91
|
+
if (fav.RecordName) {
|
|
92
|
+
return fav.RecordName;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
return fav.RecordID;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
85
99
|
}
|
|
86
100
|
FavoritesComponent.ɵfac = function FavoritesComponent_Factory(t) { return new (t || FavoritesComponent)(i0.ɵɵdirectiveInject(i1.Router)); };
|
|
87
101
|
FavoritesComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FavoritesComponent, selectors: [["app-favorites"]], decls: 4, vars: 1, consts: [[1, "list-view", 3, "data"], [1, "entity-wrap"], ["kendoListViewHeaderTemplate", ""], ["kendoListViewItemTemplate", ""], [1, "header"], [1, "head-tag"], [1, "k-icon", "k-i-clock"], [1, "count"], [1, "list-item", 3, "click"]], template: function FavoritesComponent_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -96,5 +110,5 @@ FavoritesComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Favorite
|
|
|
96
110
|
} }, dependencies: [i2.ItemTemplateDirective, i2.HeaderTemplateDirective, i2.ListViewComponent], styles: [".favorites-list[_ngcontent-%COMP%] {\r\n width: 400px;\r\n}", ".main-area[_ngcontent-%COMP%] {\r\n display: flex;\r\n height: 100%;\r\n width: 100%;\r\n gap: 24px;\r\n padding: 24px 0;\r\n}\r\n.list-view[_ngcontent-%COMP%] {\r\n padding: 16px;\r\n min-width: 300px;\r\n border-radius: 4px;\r\n background: #FAFAFA;\r\n border: none;\r\n}\r\n .list-view .k-listview-header, .list-view .k-listview-footer {\r\n border: none;\r\n}\r\n .list-view .k-listview-content {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 4px;\r\n background: #fff;\r\n padding: 16px;\r\n}\r\n\r\n.header[_ngcontent-%COMP%], .footer[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 16px;\r\n height: auto;\r\n margin:0;\r\n}\r\n\r\n.header[_ngcontent-%COMP%] {\r\n color: #424242;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n.header[_ngcontent-%COMP%] .head-tag[_ngcontent-%COMP%] {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\nfont-size: 16px;\r\nfont-style: normal;\r\nfont-weight: 400;\r\nline-height: 20px;\r\n}\r\n\r\n.header[_ngcontent-%COMP%] .count[_ngcontent-%COMP%] {\r\n width: 24px;\r\n height: 24px;\r\n min-width: 24px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n font-size: 10px;\r\n background: rgba(0, 0, 0, 0.08);\r\n border-radius: 50%;\r\n}\r\n.footer[_ngcontent-%COMP%] {\r\n font-size: 14px;\r\n margin-top: 16px;\r\n}\r\n\r\n.list-item[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 30px;\r\n cursor: pointer;\r\n margin: 4px;\r\n}\r\n.card-container[_ngcontent-%COMP%] {\r\n margin: 0;\r\n padding: 0;\r\n box-shadow: none;\r\n}\r\n.card-header-entity[_ngcontent-%COMP%] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n}\r\n.card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n\r\n \r\n\r\n\r\n \r\n .view-card[_ngcontent-%COMP%] .view-icon[_ngcontent-%COMP%] {\r\n color: #ff6358;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 6px;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] .k-card-body[_ngcontent-%COMP%] {\r\n background: #fff;\r\n padding: 12px 20px;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] .view-card[_ngcontent-%COMP%] {\r\n overflow: auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n background: #fafafa;\r\n padding: 4px 15px;\r\n }\r\n .view-card[_ngcontent-%COMP%] .btn-wrapper[_ngcontent-%COMP%] {\r\n display: flex;\r\n align-items: center;\r\n }\r\n \r\n .k-card-body[_ngcontent-%COMP%] .view-card-content[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 16px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n margin-bottom: 0;\r\n letter-spacing: 0.18px;\r\n }\r\n .k-card-body[_ngcontent-%COMP%] .view-card-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n color: #666;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n height: 48px;\r\n margin-bottom: 0;\r\n }\r\n .card-container[_ngcontent-%COMP%] {\r\n padding: 0;\r\n margin: 0;\r\n box-shadow: none;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n }\r\n \r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n .main-area[_ngcontent-%COMP%] .card-list[_ngcontent-%COMP%] {\r\n display: flex;\r\n gap: 20px;\r\n }"] });
|
|
97
111
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FavoritesComponent, [{
|
|
98
112
|
type: Component,
|
|
99
|
-
args: [{ selector: 'app-favorites', template: "<kendo-listview\n [data]=\"favorites\"\n class=\"list-view\"\n>\n <ng-container class=\"entity-wrap\">\n <ng-template kendoListViewHeaderTemplate>\n <div class=\"header\"> \n <div class=\"head-tag\">\n <span class=\"k-icon k-i-clock\"></span>\n Favorites\n </div>\n <div class=\"count\">{{favorites.length}}</div>\n </div>\n </ng-template>\n <ng-template kendoListViewItemTemplate let-dataItem=\"dataItem\">\n <div class=\"list-item\" (click)=\"favoriteItemClick(dataItem)\">\n <b>{{dataItem.Entity}}</b>: {{dataItem
|
|
113
|
+
args: [{ selector: 'app-favorites', template: "<kendo-listview\n [data]=\"favorites\"\n class=\"list-view\"\n>\n <ng-container class=\"entity-wrap\">\n <ng-template kendoListViewHeaderTemplate>\n <div class=\"header\"> \n <div class=\"head-tag\">\n <span class=\"k-icon k-i-clock\"></span>\n Favorites\n </div>\n <div class=\"count\">{{favorites.length}}</div>\n </div>\n </ng-template>\n <ng-template kendoListViewItemTemplate let-dataItem=\"dataItem\">\n <div class=\"list-item\" (click)=\"favoriteItemClick(dataItem)\">\n <b>{{dataItem.Entity}}</b>: {{favoriteItemDisplayName(dataItem)}}\n </div>\n </ng-template>\n </ng-container>\n</kendo-listview>\n", styles: [".favorites-list {\r\n width: 400px;\r\n}", "\r\n.main-area {\r\n display: flex;\r\n height: 100%;\r\n width: 100%;\r\n gap: 24px;\r\n padding: 24px 0;\r\n}\r\n.list-view {\r\n padding: 16px;\r\n min-width: 300px;\r\n border-radius: 4px;\r\n background: #FAFAFA;\r\n border: none;\r\n}\r\n::ng-deep .list-view .k-listview-header, \r\n::ng-deep .list-view .k-listview-footer {\r\n border: none;\r\n}\r\n::ng-deep .list-view .k-listview-content {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 4px;\r\n background: #fff;\r\n padding: 16px;\r\n}\r\n\r\n.header,\r\n.footer {\r\n color: #424242;\r\n font-size: 16px;\r\n height: auto;\r\n margin:0;\r\n}\r\n\r\n.header {\r\n color: #424242;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n.header .head-tag {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\nfont-size: 16px;\r\nfont-style: normal;\r\nfont-weight: 400;\r\nline-height: 20px;\r\n}\r\n\r\n.header .count {\r\n width: 24px;\r\n height: 24px;\r\n min-width: 24px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n font-size: 10px;\r\n background: rgba(0, 0, 0, 0.08);\r\n border-radius: 50%;\r\n}\r\n.footer {\r\n font-size: 14px;\r\n margin-top: 16px;\r\n}\r\n\r\n.list-item {\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 30px;\r\n cursor: pointer;\r\n margin: 4px;\r\n}\r\n.card-container {\r\n margin: 0;\r\n padding: 0;\r\n box-shadow: none;\r\n}\r\n.card-header-entity {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n}\r\n.card-header-entity .title-wrap h1 {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity .title-wrap {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity .title-wrap p {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n\r\n \r\n\r\n\r\n \r\n .view-card .view-icon {\r\n color: #ff6358;\r\n }\r\n .card-wrapper {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 6px;\r\n }\r\n .card-wrapper .k-card-body {\r\n background: #fff;\r\n padding: 12px 20px;\r\n }\r\n .card-wrapper .view-card {\r\n overflow: auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n background: #fafafa;\r\n padding: 4px 15px;\r\n }\r\n .view-card .btn-wrapper {\r\n display: flex;\r\n align-items: center;\r\n }\r\n \r\n .k-card-body .view-card-content h5 {\r\n color: #424242;\r\n font-size: 16px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n margin-bottom: 0;\r\n letter-spacing: 0.18px;\r\n }\r\n .k-card-body .view-card-content p {\r\n color: #666;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n height: 48px;\r\n margin-bottom: 0;\r\n }\r\n .card-container {\r\n padding: 0;\r\n margin: 0;\r\n box-shadow: none;\r\n }\r\n .card-header-entity {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n }\r\n \r\n .card-header-entity .title-wrap h1 {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity .title-wrap {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity .title-wrap p {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n .main-area .card-list {\r\n display: flex;\r\n gap: 20px;\r\n }\r\n "] }]
|
|
100
114
|
}], function () { return [{ type: i1.Router }]; }, null); })();
|
|
@@ -44,7 +44,7 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
if (this.record) {
|
|
46
46
|
const md = new Metadata();
|
|
47
|
-
this._isFavorite = yield md.GetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.
|
|
47
|
+
this._isFavorite = yield md.GetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.PrimaryKeys.map(pk => { return { FieldName: pk.Name, Value: pk.Value }; }));
|
|
48
48
|
this.FavoriteInitDone = true;
|
|
49
49
|
}
|
|
50
50
|
});
|
|
@@ -107,7 +107,7 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
107
107
|
SetFavoriteStatus(isFavorite) {
|
|
108
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
109
|
const md = new Metadata();
|
|
110
|
-
yield md.SetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.
|
|
110
|
+
yield md.SetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.PrimaryKeys.map(pk => { return { FieldName: pk.Name, Value: pk.Value }; }), isFavorite);
|
|
111
111
|
this._isFavorite = isFavorite;
|
|
112
112
|
});
|
|
113
113
|
}
|
|
@@ -8,9 +8,17 @@ export declare class GenericBrowseListComponent {
|
|
|
8
8
|
title: string;
|
|
9
9
|
items: any[];
|
|
10
10
|
iconName: string;
|
|
11
|
+
showAddButton: boolean;
|
|
12
|
+
addText: string;
|
|
13
|
+
backText: string;
|
|
14
|
+
addButtonClickEvent: EventEmitter<any>;
|
|
15
|
+
deleteButtonClickEvent: EventEmitter<any>;
|
|
11
16
|
itemClickEvent: EventEmitter<any>;
|
|
12
17
|
constructor(router: Router);
|
|
13
18
|
itemClick(item: any): void;
|
|
19
|
+
deleteItem(item: any): void;
|
|
20
|
+
addButtonClicked(): void;
|
|
21
|
+
goHomeButtonClicked(): void;
|
|
14
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<GenericBrowseListComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GenericBrowseListComponent, "app-generic-browse-list", never, { "showLoader": "showLoader"; "itemType": "itemType"; "title": "title"; "items": "items"; "iconName": "iconName"; }, { "itemClickEvent": "itemClickEvent"; }, never, never, false, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GenericBrowseListComponent, "app-generic-browse-list", never, { "showLoader": "showLoader"; "itemType": "itemType"; "title": "title"; "items": "items"; "iconName": "iconName"; "showAddButton": "showAddButton"; "addText": "addText"; "backText": "backText"; }, { "addButtonClickEvent": "addButtonClickEvent"; "deleteButtonClickEvent": "deleteButtonClickEvent"; "itemClickEvent": "itemClickEvent"; }, never, never, false, never>;
|
|
16
24
|
}
|
|
@@ -2,38 +2,45 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import * as i1 from "@angular/router";
|
|
4
4
|
import * as i2 from "@angular/common";
|
|
5
|
-
import * as i3 from "@progress/kendo-angular-
|
|
6
|
-
import * as i4 from "@progress/kendo-angular-
|
|
7
|
-
import * as i5 from "@progress/kendo-angular-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import * as i3 from "@progress/kendo-angular-buttons";
|
|
6
|
+
import * as i4 from "@progress/kendo-angular-indicators";
|
|
7
|
+
import * as i5 from "@progress/kendo-angular-icons";
|
|
8
|
+
import * as i6 from "@progress/kendo-angular-layout";
|
|
9
|
+
function GenericBrowseListComponent_kendo_loader_13_Template(rf, ctx) { if (rf & 1) {
|
|
10
|
+
i0.ɵɵelement(0, "kendo-loader", 10);
|
|
10
11
|
} }
|
|
11
|
-
function
|
|
12
|
+
function GenericBrowseListComponent_div_14_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
12
13
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
13
|
-
i0.ɵɵelementStart(0, "div")(1, "kendo-card",
|
|
14
|
-
i0.ɵɵelement(3, "kendo-icon",
|
|
14
|
+
i0.ɵɵelementStart(0, "div")(1, "kendo-card", 13)(2, "kendo-card-header", 14);
|
|
15
|
+
i0.ɵɵelement(3, "kendo-icon", 15);
|
|
16
|
+
i0.ɵɵelementStart(4, "div", 16)(5, "button", 17);
|
|
17
|
+
i0.ɵɵelement(6, "span", 18);
|
|
15
18
|
i0.ɵɵelementEnd();
|
|
16
|
-
i0.ɵɵelementStart(
|
|
17
|
-
i0.ɵɵlistener("click", function
|
|
18
|
-
i0.ɵɵ
|
|
19
|
-
i0.ɵɵ
|
|
19
|
+
i0.ɵɵelementStart(7, "button", 19);
|
|
20
|
+
i0.ɵɵlistener("click", function GenericBrowseListComponent_div_14_div_1_Template_button_click_7_listener() { const restoredCtx = i0.ɵɵrestoreView(_r5); const d_r3 = restoredCtx.$implicit; const ctx_r4 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r4.deleteItem(d_r3)); });
|
|
21
|
+
i0.ɵɵelement(8, "span", 20);
|
|
22
|
+
i0.ɵɵelementEnd()()();
|
|
23
|
+
i0.ɵɵelementStart(9, "kendo-card-body", 21);
|
|
24
|
+
i0.ɵɵlistener("click", function GenericBrowseListComponent_div_14_div_1_Template_kendo_card_body_click_9_listener() { const restoredCtx = i0.ɵɵrestoreView(_r5); const d_r3 = restoredCtx.$implicit; const ctx_r6 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r6.itemClick(d_r3)); });
|
|
25
|
+
i0.ɵɵelementStart(10, "div", 22)(11, "h5", 23);
|
|
26
|
+
i0.ɵɵtext(12);
|
|
20
27
|
i0.ɵɵelementEnd();
|
|
21
|
-
i0.ɵɵelementStart(
|
|
22
|
-
i0.ɵɵtext(
|
|
28
|
+
i0.ɵɵelementStart(13, "p", 24);
|
|
29
|
+
i0.ɵɵtext(14);
|
|
23
30
|
i0.ɵɵelementEnd()()()()();
|
|
24
31
|
} if (rf & 2) {
|
|
25
32
|
const d_r3 = ctx.$implicit;
|
|
26
33
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
27
34
|
i0.ɵɵadvance(3);
|
|
28
35
|
i0.ɵɵclassMap(ctx_r2.iconName);
|
|
29
|
-
i0.ɵɵadvance(
|
|
36
|
+
i0.ɵɵadvance(9);
|
|
30
37
|
i0.ɵɵtextInterpolate(d_r3.Name);
|
|
31
38
|
i0.ɵɵadvance(2);
|
|
32
39
|
i0.ɵɵtextInterpolate(d_r3.Description);
|
|
33
40
|
} }
|
|
34
|
-
function
|
|
35
|
-
i0.ɵɵelementStart(0, "div",
|
|
36
|
-
i0.ɵɵtemplate(1,
|
|
41
|
+
function GenericBrowseListComponent_div_14_Template(rf, ctx) { if (rf & 1) {
|
|
42
|
+
i0.ɵɵelementStart(0, "div", 11);
|
|
43
|
+
i0.ɵɵtemplate(1, GenericBrowseListComponent_div_14_div_1_Template, 15, 4, "div", 12);
|
|
37
44
|
i0.ɵɵelementEnd();
|
|
38
45
|
} if (rf & 2) {
|
|
39
46
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -48,34 +55,69 @@ export class GenericBrowseListComponent {
|
|
|
48
55
|
this.title = '';
|
|
49
56
|
this.items = [];
|
|
50
57
|
this.iconName = 'view-icon';
|
|
58
|
+
this.showAddButton = false;
|
|
59
|
+
this.addText = 'Create New';
|
|
60
|
+
this.backText = 'Go Back';
|
|
61
|
+
this.addButtonClickEvent = new EventEmitter();
|
|
62
|
+
this.deleteButtonClickEvent = new EventEmitter();
|
|
51
63
|
this.itemClickEvent = new EventEmitter();
|
|
64
|
+
this.router = router;
|
|
52
65
|
}
|
|
53
66
|
itemClick(item) {
|
|
54
67
|
if (item) {
|
|
55
68
|
this.itemClickEvent.emit(item);
|
|
56
69
|
}
|
|
57
70
|
}
|
|
71
|
+
deleteItem(item) {
|
|
72
|
+
if (item) {
|
|
73
|
+
this.deleteButtonClickEvent.emit(item);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
addButtonClicked() {
|
|
77
|
+
this.addButtonClickEvent.emit();
|
|
78
|
+
}
|
|
79
|
+
goHomeButtonClicked() {
|
|
80
|
+
this.router.navigate(["dashboard"]);
|
|
81
|
+
}
|
|
58
82
|
}
|
|
59
83
|
GenericBrowseListComponent.ɵfac = function GenericBrowseListComponent_Factory(t) { return new (t || GenericBrowseListComponent)(i0.ɵɵdirectiveInject(i1.Router)); };
|
|
60
|
-
GenericBrowseListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GenericBrowseListComponent, selectors: [["app-generic-browse-list"]], inputs: { showLoader: "showLoader", itemType: "itemType", title: "title", items: "items", iconName: "iconName" }, outputs: { itemClickEvent: "itemClickEvent" }, decls:
|
|
84
|
+
GenericBrowseListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GenericBrowseListComponent, selectors: [["app-generic-browse-list"]], inputs: { showLoader: "showLoader", itemType: "itemType", title: "title", items: "items", iconName: "iconName", showAddButton: "showAddButton", addText: "addText", backText: "backText" }, outputs: { addButtonClickEvent: "addButtonClickEvent", deleteButtonClickEvent: "deleteButtonClickEvent", itemClickEvent: "itemClickEvent" }, decls: 15, vars: 7, consts: [[1, "card-container"], [1, "card-header-entity"], [1, "title-wrap"], [1, "add-item"], ["kendoButton", "", 3, "primary", "click"], [1, "k-icon", "k-font-icon", "k-i-plus"], [1, "k-icon", "k-font-icon", "k-i-chevron-left"], [1, "main-area"], ["type", "converging-spinner", 4, "ngIf"], ["class", "card-list k-d-flex k-flex-row k-h-full k-flex-wrap", 4, "ngIf"], ["type", "converging-spinner"], [1, "card-list", "k-d-flex", "k-flex-row", "k-h-full", "k-flex-wrap"], [4, "ngFor", "ngForOf"], [1, "card-wrapper"], [1, "k-hstack", "view-card"], ["name", "table"], [1, "btn-wrapper"], ["kendoButton", "", "fillMode", "flat"], [1, "k-icon", "k-i-edit"], ["kendoButton", "", "fillMode", "flat", 3, "click"], [1, "k-icon", "k-i-delete"], [3, "click"], [1, "view-card-content", "k-cursor-pointer"], ["kendoCardTitle", ""], ["kendoCardSubtitle", ""]], template: function GenericBrowseListComponent_Template(rf, ctx) { if (rf & 1) {
|
|
61
85
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "h1");
|
|
62
86
|
i0.ɵɵtext(4);
|
|
87
|
+
i0.ɵɵelementEnd()();
|
|
88
|
+
i0.ɵɵelementStart(5, "div", 3)(6, "button", 4);
|
|
89
|
+
i0.ɵɵlistener("click", function GenericBrowseListComponent_Template_button_click_6_listener() { return ctx.addButtonClicked(); });
|
|
90
|
+
i0.ɵɵelement(7, "span", 5);
|
|
91
|
+
i0.ɵɵtext(8);
|
|
92
|
+
i0.ɵɵelementEnd();
|
|
93
|
+
i0.ɵɵelementStart(9, "button", 4);
|
|
94
|
+
i0.ɵɵlistener("click", function GenericBrowseListComponent_Template_button_click_9_listener() { return ctx.goHomeButtonClicked(); });
|
|
95
|
+
i0.ɵɵelement(10, "span", 6);
|
|
96
|
+
i0.ɵɵtext(11);
|
|
63
97
|
i0.ɵɵelementEnd()()();
|
|
64
|
-
i0.ɵɵelementStart(
|
|
65
|
-
i0.ɵɵtemplate(
|
|
66
|
-
i0.ɵɵtemplate(
|
|
98
|
+
i0.ɵɵelementStart(12, "div", 7);
|
|
99
|
+
i0.ɵɵtemplate(13, GenericBrowseListComponent_kendo_loader_13_Template, 1, 0, "kendo-loader", 8);
|
|
100
|
+
i0.ɵɵtemplate(14, GenericBrowseListComponent_div_14_Template, 2, 1, "div", 9);
|
|
67
101
|
i0.ɵɵelementEnd()();
|
|
68
102
|
} if (rf & 2) {
|
|
69
103
|
i0.ɵɵadvance(4);
|
|
70
104
|
i0.ɵɵtextInterpolate(ctx.title);
|
|
71
105
|
i0.ɵɵadvance(2);
|
|
106
|
+
i0.ɵɵproperty("primary", true);
|
|
107
|
+
i0.ɵɵadvance(2);
|
|
108
|
+
i0.ɵɵtextInterpolate1(" ", ctx.addText, " ");
|
|
109
|
+
i0.ɵɵadvance(1);
|
|
110
|
+
i0.ɵɵproperty("primary", true);
|
|
111
|
+
i0.ɵɵadvance(2);
|
|
112
|
+
i0.ɵɵtextInterpolate1(" ", ctx.backText, " ");
|
|
113
|
+
i0.ɵɵadvance(2);
|
|
72
114
|
i0.ɵɵproperty("ngIf", ctx.showLoader);
|
|
73
115
|
i0.ɵɵadvance(1);
|
|
74
116
|
i0.ɵɵproperty("ngIf", !ctx.showLoader);
|
|
75
|
-
} }, dependencies: [i2.NgForOf, i2.NgIf, i3.
|
|
117
|
+
} }, dependencies: [i2.NgForOf, i2.NgIf, i3.Button, i4.LoaderComponent, i5.IconComponent, i6.CardComponent, i6.CardHeaderComponent, i6.CardBodyComponent, i6.CardTitleDirective, i6.CardSubtitleDirective], styles: [".main-area[_ngcontent-%COMP%] {\r\n display: flex;\r\n height: 100%;\r\n width: 100%;\r\n gap: 24px;\r\n padding: 24px 0;\r\n}\r\n.list-view[_ngcontent-%COMP%] {\r\n padding: 16px;\r\n min-width: 300px;\r\n border-radius: 4px;\r\n background: #FAFAFA;\r\n border: none;\r\n}\r\n .list-view .k-listview-header, .list-view .k-listview-footer {\r\n border: none;\r\n}\r\n .list-view .k-listview-content {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 4px;\r\n background: #fff;\r\n padding: 16px;\r\n}\r\n\r\n.header[_ngcontent-%COMP%], .footer[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 16px;\r\n height: auto;\r\n margin:0;\r\n}\r\n\r\n.header[_ngcontent-%COMP%] {\r\n color: #424242;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n.header[_ngcontent-%COMP%] .head-tag[_ngcontent-%COMP%] {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\nfont-size: 16px;\r\nfont-style: normal;\r\nfont-weight: 400;\r\nline-height: 20px;\r\n}\r\n\r\n.header[_ngcontent-%COMP%] .count[_ngcontent-%COMP%] {\r\n width: 24px;\r\n height: 24px;\r\n min-width: 24px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n font-size: 10px;\r\n background: rgba(0, 0, 0, 0.08);\r\n border-radius: 50%;\r\n}\r\n.footer[_ngcontent-%COMP%] {\r\n font-size: 14px;\r\n margin-top: 16px;\r\n}\r\n\r\n.list-item[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 30px;\r\n cursor: pointer;\r\n margin: 4px;\r\n}\r\n.card-container[_ngcontent-%COMP%] {\r\n margin: 0;\r\n padding: 0;\r\n box-shadow: none;\r\n}\r\n.card-header-entity[_ngcontent-%COMP%] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n}\r\n.card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n\r\n \r\n\r\n\r\n \r\n .view-card[_ngcontent-%COMP%] .view-icon[_ngcontent-%COMP%] {\r\n color: #ff6358;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 6px;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] .k-card-body[_ngcontent-%COMP%] {\r\n background: #fff;\r\n padding: 12px 20px;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] .view-card[_ngcontent-%COMP%] {\r\n overflow: auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n background: #fafafa;\r\n padding: 4px 15px;\r\n }\r\n .view-card[_ngcontent-%COMP%] .btn-wrapper[_ngcontent-%COMP%] {\r\n display: flex;\r\n align-items: center;\r\n }\r\n \r\n .k-card-body[_ngcontent-%COMP%] .view-card-content[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 16px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n margin-bottom: 0;\r\n letter-spacing: 0.18px;\r\n }\r\n .k-card-body[_ngcontent-%COMP%] .view-card-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n color: #666;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n height: 48px;\r\n margin-bottom: 0;\r\n }\r\n .card-container[_ngcontent-%COMP%] {\r\n padding: 0;\r\n margin: 0;\r\n box-shadow: none;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n }\r\n \r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n .main-area[_ngcontent-%COMP%] .card-list[_ngcontent-%COMP%] {\r\n display: flex;\r\n gap: 20px;\r\n }"] });
|
|
76
118
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GenericBrowseListComponent, [{
|
|
77
119
|
type: Component,
|
|
78
|
-
args: [{ selector: 'app-generic-browse-list', template: "<div class=\"card-container\">\n <div class=\"card-header-entity\">\n <div class=\"title-wrap\">\n <h1>{{title}}</h1>\n </div>\n </div>\n <div class=\"main-area\"> \n <kendo-loader *ngIf=\"showLoader\" type=\"converging-spinner\" ></kendo-loader>\n <div class=\"card-list k-d-flex k-flex-row k-h-full k-flex-wrap\" *ngIf=\"!showLoader\">\n <div *ngFor=\"let d of items\">\n <kendo-card class=\"card-wrapper\">\n <kendo-card-header class=\"k-hstack view-card\">\n <kendo-icon name=\"table\" [class]=\"iconName\"></kendo-icon>\n </kendo-card-header>\
|
|
120
|
+
args: [{ selector: 'app-generic-browse-list', template: "<div class=\"card-container\">\r\n <div class=\"card-header-entity\">\r\n <div class=\"title-wrap\">\r\n <h1>{{title}}</h1>\r\n </div>\r\n <div class=\"add-item\">\r\n <button kendoButton (click)=\"addButtonClicked()\" [primary]=\"true\">\r\n <span class=\"k-icon k-font-icon k-i-plus\"></span>\r\n {{addText}}\r\n </button>\r\n <button kendoButton (click)=\"goHomeButtonClicked()\" [primary]=\"true\">\r\n <span class=\"k-icon k-font-icon k-i-chevron-left\"></span>\r\n {{backText}}\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"main-area\"> \r\n <kendo-loader *ngIf=\"showLoader\" type=\"converging-spinner\" ></kendo-loader>\r\n <div class=\"card-list k-d-flex k-flex-row k-h-full k-flex-wrap\" *ngIf=\"!showLoader\">\r\n <div *ngFor=\"let d of items\">\r\n <kendo-card class=\"card-wrapper\">\r\n <kendo-card-header class=\"k-hstack view-card\">\r\n <kendo-icon name=\"table\" [class]=\"iconName\"></kendo-icon>\r\n <div class=\"btn-wrapper\">\r\n <button kendoButton fillMode=\"flat\">\r\n <span class=\"k-icon k-i-edit\"></span>\r\n </button>\r\n <button kendoButton fillMode=\"flat\" (click)=\"deleteItem(d)\"><span\r\n class=\"k-icon k-i-delete\"></span></button>\r\n </div>\r\n </kendo-card-header>\r\n <kendo-card-body (click)=\"itemClick(d)\">\r\n <div class=\"view-card-content k-cursor-pointer\">\r\n <h5 kendoCardTitle>{{ d.Name }}</h5>\r\n <p kendoCardSubtitle>{{ d.Description }}</p>\r\n </div>\r\n </kendo-card-body>\r\n </kendo-card>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: ["\r\n.main-area {\r\n display: flex;\r\n height: 100%;\r\n width: 100%;\r\n gap: 24px;\r\n padding: 24px 0;\r\n}\r\n.list-view {\r\n padding: 16px;\r\n min-width: 300px;\r\n border-radius: 4px;\r\n background: #FAFAFA;\r\n border: none;\r\n}\r\n::ng-deep .list-view .k-listview-header, \r\n::ng-deep .list-view .k-listview-footer {\r\n border: none;\r\n}\r\n::ng-deep .list-view .k-listview-content {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 4px;\r\n background: #fff;\r\n padding: 16px;\r\n}\r\n\r\n.header,\r\n.footer {\r\n color: #424242;\r\n font-size: 16px;\r\n height: auto;\r\n margin:0;\r\n}\r\n\r\n.header {\r\n color: #424242;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n.header .head-tag {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\nfont-size: 16px;\r\nfont-style: normal;\r\nfont-weight: 400;\r\nline-height: 20px;\r\n}\r\n\r\n.header .count {\r\n width: 24px;\r\n height: 24px;\r\n min-width: 24px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n font-size: 10px;\r\n background: rgba(0, 0, 0, 0.08);\r\n border-radius: 50%;\r\n}\r\n.footer {\r\n font-size: 14px;\r\n margin-top: 16px;\r\n}\r\n\r\n.list-item {\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 30px;\r\n cursor: pointer;\r\n margin: 4px;\r\n}\r\n.card-container {\r\n margin: 0;\r\n padding: 0;\r\n box-shadow: none;\r\n}\r\n.card-header-entity {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n}\r\n.card-header-entity .title-wrap h1 {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity .title-wrap {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity .title-wrap p {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n\r\n \r\n\r\n\r\n \r\n .view-card .view-icon {\r\n color: #ff6358;\r\n }\r\n .card-wrapper {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 6px;\r\n }\r\n .card-wrapper .k-card-body {\r\n background: #fff;\r\n padding: 12px 20px;\r\n }\r\n .card-wrapper .view-card {\r\n overflow: auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n background: #fafafa;\r\n padding: 4px 15px;\r\n }\r\n .view-card .btn-wrapper {\r\n display: flex;\r\n align-items: center;\r\n }\r\n \r\n .k-card-body .view-card-content h5 {\r\n color: #424242;\r\n font-size: 16px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n margin-bottom: 0;\r\n letter-spacing: 0.18px;\r\n }\r\n .k-card-body .view-card-content p {\r\n color: #666;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n height: 48px;\r\n margin-bottom: 0;\r\n }\r\n .card-container {\r\n padding: 0;\r\n margin: 0;\r\n box-shadow: none;\r\n }\r\n .card-header-entity {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n }\r\n \r\n .card-header-entity .title-wrap h1 {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity .title-wrap {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity .title-wrap p {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n .main-area .card-list {\r\n display: flex;\r\n gap: 20px;\r\n }\r\n "] }]
|
|
79
121
|
}], function () { return [{ type: i1.Router }]; }, { showLoader: [{
|
|
80
122
|
type: Input
|
|
81
123
|
}], itemType: [{
|
|
@@ -86,6 +128,16 @@ GenericBrowseListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
86
128
|
type: Input
|
|
87
129
|
}], iconName: [{
|
|
88
130
|
type: Input
|
|
131
|
+
}], showAddButton: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], addText: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}], backText: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], addButtonClickEvent: [{
|
|
138
|
+
type: Output
|
|
139
|
+
}], deleteButtonClickEvent: [{
|
|
140
|
+
type: Output
|
|
89
141
|
}], itemClickEvent: [{
|
|
90
142
|
type: Output
|
|
91
143
|
}] }); })();
|
|
@@ -38,7 +38,7 @@ let EntityRecordResource = class EntityRecordResource extends BaseResourceCompon
|
|
|
38
38
|
return '';
|
|
39
39
|
else {
|
|
40
40
|
const md = new Metadata();
|
|
41
|
-
const name = yield md.GetEntityRecordName(data.Configuration.Entity, data.ResourceRecordID);
|
|
41
|
+
const name = yield md.GetEntityRecordName(data.Configuration.Entity, [{ FieldName: "ID", Value: data.ResourceRecordID }]);
|
|
42
42
|
const e = md.Entities.find(e => e.Name === data.Configuration.Entity);
|
|
43
43
|
if (!e)
|
|
44
44
|
throw new Error(`Entity ${data.Configuration.Entity} not found in metadata`);
|
|
@@ -28,7 +28,7 @@ let ReportResource = class ReportResource extends BaseResourceComponent {
|
|
|
28
28
|
GetResourceDisplayName(data) {
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
30
|
const md = new Metadata();
|
|
31
|
-
const name = yield md.GetEntityRecordName('Reports', data.ResourceRecordID);
|
|
31
|
+
const name = yield md.GetEntityRecordName('Reports', [{ FieldName: "ID", Value: data.ResourceRecordID }]);
|
|
32
32
|
return `${name ? name : 'Report ID: ' + data.ResourceRecordID}`;
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -28,7 +28,7 @@ let UserViewResource = class UserViewResource extends BaseResourceComponent {
|
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
29
|
const md = new Metadata();
|
|
30
30
|
if (data.ResourceRecordID > 0) {
|
|
31
|
-
const name = yield md.GetEntityRecordName('User Views', data.ResourceRecordID);
|
|
31
|
+
const name = yield md.GetEntityRecordName('User Views', [{ FieldName: "ID", Value: data.ResourceRecordID }]);
|
|
32
32
|
return name ? name : 'View: ' + data.ResourceRecordID;
|
|
33
33
|
}
|
|
34
34
|
else if (((_a = data.Configuration) === null || _a === void 0 ? void 0 : _a.Entity) && ((_b = data.Configuration) === null || _b === void 0 ? void 0 : _b.Entity.length) > 0) {
|
|
@@ -12,7 +12,6 @@ export declare class SingleApplicationComponent implements OnInit {
|
|
|
12
12
|
appName: string;
|
|
13
13
|
appDescription: string;
|
|
14
14
|
appEntities: ApplicationEntityInfo[];
|
|
15
|
-
appFavorites: UserFavoriteEntity[];
|
|
16
15
|
ngOnInit(): void;
|
|
17
16
|
entityItemClick(info: ApplicationEntityInfo): void;
|
|
18
17
|
favoriteItemClick(fav: UserFavoriteEntity): void;
|