@dative-gpi/foundation-core-domain 1.0.137-reportv3 → 1.0.137-widgetextensions2
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/models/dashboards/dashboardSettings.ts +24 -0
- package/models/dashboards/index.ts +1 -0
- package/models/index.ts +0 -1
- package/models/widgetTemplates/widgetTemplateInfos.ts +6 -0
- package/models/widgets/index.ts +2 -1
- package/models/widgets/widgetInterface.ts +11 -0
- package/package.json +4 -4
- package/models/reports/index.ts +0 -4
- package/models/reports/reportDetails.ts +0 -39
- package/models/reports/reportExecutions.ts +0 -79
- package/models/reports/reportInfos.ts +0 -71
- package/models/reports/translationReport.ts +0 -17
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
+
import type { CreateDashboardDatePresetDTO, CreateDashboardEntityPresetDTO, CreateDashboardVariableDTO, DashboardTranslationDTO, UpdateDashboardOrganisationDTO, UpdateDashboardOrganisationTypeDTO, UpdateDashboardShallowDTO } from "@dative-gpi/foundation-core-domain/models";
|
|
3
|
+
|
|
4
|
+
export interface DashboardSettings {
|
|
5
|
+
folderId: string | null;
|
|
6
|
+
imageId: string | null;
|
|
7
|
+
image: string | null;
|
|
8
|
+
labelDefault: string;
|
|
9
|
+
locked: boolean;
|
|
10
|
+
code: string;
|
|
11
|
+
colors: string[];
|
|
12
|
+
icon: string;
|
|
13
|
+
tags: string[];
|
|
14
|
+
translations: DashboardTranslationDTO[];
|
|
15
|
+
entityPresetCode: string | null;
|
|
16
|
+
datePresetCode: string | null;
|
|
17
|
+
variableCode: string | null;
|
|
18
|
+
datePresets: CreateDashboardDatePresetDTO[];
|
|
19
|
+
entityPresets: CreateDashboardEntityPresetDTO[];
|
|
20
|
+
variables: CreateDashboardVariableDTO[];
|
|
21
|
+
scope: ApplicationScope;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type UpdateDashboardSettingsDTO = Omit<UpdateDashboardOrganisationDTO & UpdateDashboardOrganisationTypeDTO & UpdateDashboardShallowDTO, "widgets">;
|
package/models/index.ts
CHANGED
|
@@ -38,7 +38,6 @@ export * from "./models";
|
|
|
38
38
|
export * from "./modelStatuses"; // No service
|
|
39
39
|
export * from "./organisations";
|
|
40
40
|
export * from "./permissionCategories";
|
|
41
|
-
export * from "./reports";
|
|
42
41
|
export * from "./roleOrganisations";
|
|
43
42
|
export * from "./roleOrganisationTypes";
|
|
44
43
|
export * from "./routes";
|
|
@@ -16,6 +16,8 @@ const clean = <T>(meta: T): T => {
|
|
|
16
16
|
|
|
17
17
|
export class WidgetTemplateInfos {
|
|
18
18
|
id: string;
|
|
19
|
+
extensionId: string | null;
|
|
20
|
+
extensionHost: string | null;
|
|
19
21
|
label: string;
|
|
20
22
|
code: string;
|
|
21
23
|
icon: string;
|
|
@@ -27,6 +29,8 @@ export class WidgetTemplateInfos {
|
|
|
27
29
|
|
|
28
30
|
constructor(params: WidgetTemplateInfosDTO) {
|
|
29
31
|
this.id = params.id;
|
|
32
|
+
this.extensionId = params.extensionId ?? null;
|
|
33
|
+
this.extensionHost = params.extensionHost ?? null;
|
|
30
34
|
this.label = params.label;
|
|
31
35
|
this.code = params.code;
|
|
32
36
|
this.icon = params.icon;
|
|
@@ -40,6 +44,8 @@ export class WidgetTemplateInfos {
|
|
|
40
44
|
|
|
41
45
|
export interface WidgetTemplateInfosDTO {
|
|
42
46
|
id: string;
|
|
47
|
+
extensionId?: string;
|
|
48
|
+
extensionHost?: string;
|
|
43
49
|
label: string;
|
|
44
50
|
code: string;
|
|
45
51
|
icon: string;
|
package/models/widgets/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-domain",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.137-
|
|
4
|
+
"version": "1.0.137-widgetextensions2",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "1.0.137-
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.137-
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.137-widgetextensions2",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.137-widgetextensions2"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "cad1342d5c937276bcb3f03f852f273e8a182a9b"
|
|
17
17
|
}
|
package/models/reports/index.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { DashboardType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
-
import { ReportInfos, type ReportInfosDTO } from "./reportInfos";
|
|
3
|
-
import type { TranslationReportDTO } from "./translationReport";
|
|
4
|
-
|
|
5
|
-
export class ReportDetails extends ReportInfos {
|
|
6
|
-
|
|
7
|
-
constructor(params: ReportDetailsDTO) {
|
|
8
|
-
super(params);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface ReportDetailsDTO extends ReportInfosDTO {
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface CreateReportDTO {
|
|
16
|
-
labelDefault: string;
|
|
17
|
-
bodyDefault: string;
|
|
18
|
-
dashboardId: string;
|
|
19
|
-
startDate: string;
|
|
20
|
-
endDate: string;
|
|
21
|
-
dashboardScope: DashboardType;
|
|
22
|
-
icon: string;
|
|
23
|
-
cron: string;
|
|
24
|
-
userIds: string[];
|
|
25
|
-
translations: TranslationReportDTO[];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface UpdateReportDTO {
|
|
29
|
-
labelDefault: string;
|
|
30
|
-
bodyDefault: string;
|
|
31
|
-
dashboardId: string;
|
|
32
|
-
startDate: string;
|
|
33
|
-
endDate: string;
|
|
34
|
-
dashboardScope: DashboardType;
|
|
35
|
-
icon: string;
|
|
36
|
-
cron: string;
|
|
37
|
-
userIds: string[];
|
|
38
|
-
translations: TranslationReportDTO[];
|
|
39
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type { DashboardType, JobState } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
-
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
3
|
-
|
|
4
|
-
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
5
|
-
|
|
6
|
-
const { epochToLongDateFormat } = useDateFormat();
|
|
7
|
-
|
|
8
|
-
export class ReportExecution {
|
|
9
|
-
id: string | null;
|
|
10
|
-
reportId: string;
|
|
11
|
-
jobId: string;
|
|
12
|
-
fileId: string | null;
|
|
13
|
-
fileLabel: string | null;
|
|
14
|
-
reportLabel: string | null;
|
|
15
|
-
mailBody: string | null;
|
|
16
|
-
state: JobState;
|
|
17
|
-
startDate: string;
|
|
18
|
-
endDate: string;
|
|
19
|
-
users: string[];
|
|
20
|
-
dashboardLabel: string;
|
|
21
|
-
dashboardId: string;
|
|
22
|
-
dashboardScope: DashboardType;
|
|
23
|
-
executedAt: number;
|
|
24
|
-
error: string;
|
|
25
|
-
cron: string;
|
|
26
|
-
|
|
27
|
-
get executedAtGroup(): string {
|
|
28
|
-
return epochToLongDateFormat(this.executedAt);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
constructor(params: ReportExecutionDTO) {
|
|
33
|
-
this.id = params.id;
|
|
34
|
-
this.reportId = params.reportId;
|
|
35
|
-
this.jobId = params.jobId;
|
|
36
|
-
this.fileId = params.fileId;
|
|
37
|
-
this.fileLabel = params.fileLabel;
|
|
38
|
-
this.reportLabel = params.reportLabel;
|
|
39
|
-
this.mailBody = params.mailBody
|
|
40
|
-
this.state = params.state;
|
|
41
|
-
this.startDate = params.startDate;
|
|
42
|
-
this.endDate = params.endDate;
|
|
43
|
-
this.users = params.users;
|
|
44
|
-
this.dashboardLabel = params.dashboardLabel;
|
|
45
|
-
this.dashboardId = params.dashboardId;
|
|
46
|
-
this.dashboardScope = params.dashboardScope;
|
|
47
|
-
this.executedAt = isoToEpoch(params.executedAt);
|
|
48
|
-
this.error = params.error;
|
|
49
|
-
this.cron = params.cron;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
export interface ReportExecutionDTO {
|
|
55
|
-
id: string | null;
|
|
56
|
-
reportId: string;
|
|
57
|
-
jobId: string;
|
|
58
|
-
fileId: string | null;
|
|
59
|
-
fileLabel: string | null;
|
|
60
|
-
reportLabel: string | null;
|
|
61
|
-
mailBody: string | null;
|
|
62
|
-
state: JobState;
|
|
63
|
-
success: boolean;
|
|
64
|
-
startDate: string;
|
|
65
|
-
endDate: string;
|
|
66
|
-
users: string[];
|
|
67
|
-
dashboardLabel: string;
|
|
68
|
-
dashboardId: string;
|
|
69
|
-
dashboardScope: DashboardType;
|
|
70
|
-
executedAt: string;
|
|
71
|
-
error: string;
|
|
72
|
-
cron: string;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface ReportExecutionFilters {
|
|
76
|
-
reportId?: string | null;
|
|
77
|
-
startDate?: string | null;
|
|
78
|
-
endDate?: string | null;
|
|
79
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { DashboardType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
-
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
3
|
-
import { TranslationReport } from "./translationReport";
|
|
4
|
-
|
|
5
|
-
export class ReportInfos {
|
|
6
|
-
|
|
7
|
-
id: string;
|
|
8
|
-
labelDefault: string;
|
|
9
|
-
bodyDefault: string;
|
|
10
|
-
label: string;
|
|
11
|
-
body: string;
|
|
12
|
-
cron: string;
|
|
13
|
-
icon: string;
|
|
14
|
-
userIds: string[];
|
|
15
|
-
dashboardId: string;
|
|
16
|
-
dashboardScope: DashboardType;
|
|
17
|
-
dashboardLabel: string;
|
|
18
|
-
startDate: string;
|
|
19
|
-
endDate: string;
|
|
20
|
-
createdAt: number | null;
|
|
21
|
-
nextExecution: number | null;
|
|
22
|
-
lastExecution: number | null;
|
|
23
|
-
translations: TranslationReport[];
|
|
24
|
-
|
|
25
|
-
constructor(params: ReportInfosDTO) {
|
|
26
|
-
this.id = params.id;
|
|
27
|
-
this.labelDefault = params.labelDefault;
|
|
28
|
-
this.bodyDefault = params.bodyDefault;
|
|
29
|
-
this.label = params.label;
|
|
30
|
-
this.body = params.body;
|
|
31
|
-
this.cron = params.cron;
|
|
32
|
-
this.icon = params.icon;
|
|
33
|
-
this.dashboardId = params.dashboardId;
|
|
34
|
-
this.dashboardScope = params.dashboardScope;
|
|
35
|
-
this.dashboardLabel = params.dashboardLabel;
|
|
36
|
-
this.startDate = params.startDate;
|
|
37
|
-
this.endDate = params.endDate;
|
|
38
|
-
this.userIds = params.userIds;
|
|
39
|
-
this.createdAt = params.createdAt ? isoToEpoch(params.createdAt) : null;
|
|
40
|
-
this.nextExecution = params.nextExecution ? isoToEpoch(params.nextExecution) : null;
|
|
41
|
-
this.lastExecution = params.lastExecution ? isoToEpoch(params.lastExecution) : null;
|
|
42
|
-
this.translations = params.translations.map((translation) => new TranslationReport(translation));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
export interface ReportInfosDTO {
|
|
48
|
-
id: string;
|
|
49
|
-
labelDefault: string;
|
|
50
|
-
bodyDefault: string;
|
|
51
|
-
label: string;
|
|
52
|
-
body: string;
|
|
53
|
-
cron: string;
|
|
54
|
-
icon: string;
|
|
55
|
-
dashboardId: string;
|
|
56
|
-
dashboardScope: DashboardType;
|
|
57
|
-
dashboardLabel: string;
|
|
58
|
-
startDate: string;
|
|
59
|
-
endDate: string;
|
|
60
|
-
userIds: string[];
|
|
61
|
-
createdAt: string | null;
|
|
62
|
-
nextExecution: string | null;
|
|
63
|
-
lastExecution: string | null;
|
|
64
|
-
translations: TranslationReport[];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface ReportFilters {
|
|
68
|
-
search?: string | null;
|
|
69
|
-
startDate?: string | null;
|
|
70
|
-
endDate?: string | null;
|
|
71
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export class TranslationReport {
|
|
2
|
-
languageCode: string;
|
|
3
|
-
label: string;
|
|
4
|
-
body: string;
|
|
5
|
-
|
|
6
|
-
constructor(params: TranslationReportDTO) {
|
|
7
|
-
this.languageCode = params.languageCode;
|
|
8
|
-
this.label = params.label;
|
|
9
|
-
this.body = params.body;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface TranslationReportDTO {
|
|
14
|
-
languageCode: string;
|
|
15
|
-
label: string;
|
|
16
|
-
body: string;
|
|
17
|
-
}
|