@dative-gpi/foundation-core-domain 1.0.137 → 1.0.139-chartlists
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/dashboardShallowWidgets/dashboardShallowWidgetDetails.ts +4 -0
- package/models/dashboardShallowWidgets/dashboardShallowWidgetInfos.ts +30 -0
- package/models/dashboardShallowWidgets/index.ts +2 -0
- package/models/dashboardShallows/dashboardShallowDetails.ts +25 -25
- package/models/dashboards/dashboardSettings.ts +22 -0
- package/models/dashboards/index.ts +1 -0
- package/models/deviceOrganisations/deviceOrganisationDetails.ts +2 -0
- package/models/deviceOrganisations/deviceOrganisationInfos.ts +9 -0
- package/models/index.ts +2 -0
- package/models/locations/locationInfos.ts +3 -0
- package/models/reports/index.ts +4 -0
- package/models/reports/reportDetails.ts +39 -0
- package/models/reports/reportExecutions.ts +79 -0
- package/models/reports/reportInfos.ts +71 -0
- package/models/reports/translationReport.ts +17 -0
- 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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
|
|
3
|
+
const clean = <T>(meta: T): T => {
|
|
4
|
+
const newMeta = _.cloneDeepWith(meta, (value) => {
|
|
5
|
+
if (typeof value === "string") {
|
|
6
|
+
try {
|
|
7
|
+
return JSON.parse(value as string);
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return value
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
return newMeta;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class DashboardShallowWidgetInfos {
|
|
18
|
+
widgetId: string;
|
|
19
|
+
meta: { [key: string]: string };
|
|
20
|
+
|
|
21
|
+
constructor(params: DashboardShallowWidgetInfosDTO) {
|
|
22
|
+
this.widgetId = params.widgetId;
|
|
23
|
+
this.meta = clean(params.meta);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface DashboardShallowWidgetInfosDTO {
|
|
28
|
+
widgetId: string;
|
|
29
|
+
meta: { [key: string]: string };
|
|
30
|
+
}
|
|
@@ -1,42 +1,32 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
3
|
-
import type
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import type
|
|
8
|
-
import {
|
|
9
|
-
import type
|
|
10
|
-
import {
|
|
11
|
-
import type
|
|
12
|
-
import { DashboardVariableInfos } from "../dashboardVariables";
|
|
13
|
-
import type { DashboardShallowInfosDTO } from "./dashboardShallowInfos";
|
|
14
|
-
import { DashboardShallowInfos } from "./dashboardShallowInfos";
|
|
15
|
-
import type { DashboardTranslationDTO } from "../dashboards";
|
|
16
|
-
import { DashboardTranslation } from "../dashboards";
|
|
17
|
-
import type { WidgetInfosDTO } from "../widgets/widgetInfos";
|
|
18
|
-
import { WidgetInfos } from "../widgets/widgetInfos";
|
|
19
|
-
import type { PathCrumbDTO } from "../shared/pathCrumb";
|
|
20
|
-
import { PathCrumb } from "../shared/pathCrumb";
|
|
21
|
-
|
|
1
|
+
import { type CreateDashboardShallowEntityPresetDTO, DashboardShallowEntityPresetInfos, type DashboardShallowEntityPresetInfosDTO } from "../dashboardShallowEntityPresets";
|
|
2
|
+
import { type CreateDashboardShallowDatePresetDTO, DashboardShallowDatePresetInfos, type DashboardShallowDatePresetInfosDTO } from "../dashboardShallowDatePresets";
|
|
3
|
+
import { type CreateDashboardShallowVariableDTO, DashboardShallowVariableInfos, type DashboardShallowVariableInfosDTO } from "../dashboardShallowVariables";
|
|
4
|
+
import { type CreateDashboardShallowWidgetDTO, DashboardShallowWidgetInfos, type DashboardShallowWidgetInfosDTO } from "../dashboardShallowWidgets";
|
|
5
|
+
import { DashboardEntityPresetInfos, type DashboardEntityPresetInfosDTO } from "../dashboardEntityPresets";
|
|
6
|
+
import { DashboardDatePresetInfos, type DashboardDatePresetInfosDTO } from "../dashboardDatePresets";
|
|
7
|
+
import { DashboardVariableInfos, type DashboardVariableInfosDTO } from "../dashboardVariables";
|
|
8
|
+
import { DashboardShallowInfos, type DashboardShallowInfosDTO } from "./dashboardShallowInfos";
|
|
9
|
+
import { DashboardTranslation, type DashboardTranslationDTO } from "../dashboards";
|
|
10
|
+
import { WidgetInfos, type WidgetInfosDTO } from "../widgets/widgetInfos";
|
|
11
|
+
import { PathCrumb, type PathCrumbDTO } from "../shared/pathCrumb";
|
|
22
12
|
|
|
23
13
|
export class DashboardShallowDetails extends DashboardShallowInfos {
|
|
24
14
|
labelDefault: string;
|
|
25
15
|
translations: DashboardTranslation[];
|
|
26
16
|
path: PathCrumb[];
|
|
27
17
|
|
|
28
|
-
widgets: WidgetInfos[];
|
|
29
|
-
|
|
30
18
|
entityPresetCode: string | null;
|
|
31
19
|
datePresetCode: string | null;
|
|
32
20
|
variableCode: string | null;
|
|
33
21
|
defaultDatePresets: DashboardDatePresetInfos[];
|
|
34
22
|
defaultEntityPresets: DashboardEntityPresetInfos[];
|
|
35
23
|
defaultVariables: DashboardVariableInfos[];
|
|
24
|
+
defaultWidgets: WidgetInfos[];
|
|
36
25
|
|
|
37
26
|
overrideDatePresets: DashboardShallowDatePresetInfos[];
|
|
38
27
|
overrideEntityPresets: DashboardShallowEntityPresetInfos[];
|
|
39
28
|
overrideVariables: DashboardShallowVariableInfos[];
|
|
29
|
+
overrideWidgets: DashboardShallowWidgetInfos[];
|
|
40
30
|
|
|
41
31
|
get datePresets() : DashboardDatePresetInfos[] {
|
|
42
32
|
return this.defaultDatePresets.map(d => {
|
|
@@ -59,17 +49,24 @@ export class DashboardShallowDetails extends DashboardShallowInfos {
|
|
|
59
49
|
});
|
|
60
50
|
}
|
|
61
51
|
|
|
52
|
+
get widgets() {
|
|
53
|
+
return this.defaultWidgets.map(d => {
|
|
54
|
+
const override = this.overrideWidgets.find(od => od.widgetId === d.id);
|
|
55
|
+
return override ? new WidgetInfos({ ...d, ...override }) : d;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
62
59
|
constructor(params: DashboardShallowDetailsDTO) {
|
|
63
60
|
super(params);
|
|
64
61
|
|
|
65
62
|
this.labelDefault = params.labelDefault;
|
|
66
63
|
this.path = params.path.map(dto => new PathCrumb(dto)).sort((a, b) => b.index - a.index);
|
|
67
64
|
this.translations = params.translations.map(t => new DashboardTranslation(t));
|
|
68
|
-
this.widgets = params.widgets.map(dto => new WidgetInfos(dto));
|
|
69
65
|
|
|
70
66
|
this.overrideDatePresets = params.overrideDatePresets.map(dto => new DashboardShallowDatePresetInfos(dto));
|
|
71
67
|
this.overrideEntityPresets = params.overrideEntityPresets.map(dto => new DashboardShallowEntityPresetInfos(dto));
|
|
72
68
|
this.overrideVariables = params.overrideVariables.map(dto => new DashboardShallowVariableInfos(dto));
|
|
69
|
+
this.overrideWidgets = params.overrideWidgets.map(dto => new DashboardShallowWidgetInfos(dto));
|
|
73
70
|
|
|
74
71
|
this.entityPresetCode = params.entityPresetCode;
|
|
75
72
|
this.datePresetCode = params.datePresetCode;
|
|
@@ -77,6 +74,7 @@ export class DashboardShallowDetails extends DashboardShallowInfos {
|
|
|
77
74
|
this.defaultDatePresets = params.defaultDatePresets.map(dto => new DashboardDatePresetInfos(dto));
|
|
78
75
|
this.defaultEntityPresets = params.defaultEntityPresets.map(dto => new DashboardEntityPresetInfos(dto));
|
|
79
76
|
this.defaultVariables = params.defaultVariables.map(dto => new DashboardVariableInfos(dto));
|
|
77
|
+
this.defaultWidgets = params.defaultWidgets.map(dto => new WidgetInfos(dto));
|
|
80
78
|
}
|
|
81
79
|
}
|
|
82
80
|
|
|
@@ -86,6 +84,7 @@ export interface DashboardShallowDetailsDTO extends DashboardShallowInfosDTO {
|
|
|
86
84
|
overrideDatePresets: DashboardShallowDatePresetInfosDTO[];
|
|
87
85
|
overrideEntityPresets: DashboardShallowEntityPresetInfosDTO[];
|
|
88
86
|
overrideVariables: DashboardShallowVariableInfosDTO[];
|
|
87
|
+
overrideWidgets: DashboardShallowWidgetInfosDTO[];
|
|
89
88
|
translations: DashboardTranslationDTO[];
|
|
90
89
|
dashboardId: string;
|
|
91
90
|
scope: number;
|
|
@@ -95,7 +94,7 @@ export interface DashboardShallowDetailsDTO extends DashboardShallowInfosDTO {
|
|
|
95
94
|
defaultDatePresets: DashboardDatePresetInfosDTO[];
|
|
96
95
|
defaultEntityPresets: DashboardEntityPresetInfosDTO[];
|
|
97
96
|
defaultVariables: DashboardVariableInfosDTO[];
|
|
98
|
-
|
|
97
|
+
defaultWidgets: WidgetInfosDTO[];
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
export interface CreateDashboardShallowDTO {
|
|
@@ -114,6 +113,7 @@ export interface UpdateDashboardShallowDTO {
|
|
|
114
113
|
overrideDatePresets: CreateDashboardShallowDatePresetDTO[];
|
|
115
114
|
overrideEntityPresets: CreateDashboardShallowEntityPresetDTO[];
|
|
116
115
|
overrideVariables: CreateDashboardShallowVariableDTO[];
|
|
116
|
+
overrideWidgets: CreateDashboardShallowWidgetDTO[];
|
|
117
117
|
translations: DashboardTranslationDTO[];
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
+
import type { CreateDashboardDatePresetDTO, CreateDashboardEntityPresetDTO, CreateDashboardVariableDTO, DashboardTranslationDTO } 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
|
+
}
|
|
@@ -46,6 +46,8 @@ export interface CreateDeviceOrganisationDTO {
|
|
|
46
46
|
export interface UpdateDeviceOrganisationDTO {
|
|
47
47
|
managerId: string | null;
|
|
48
48
|
locationId: string | null;
|
|
49
|
+
latitude: number | null;
|
|
50
|
+
longitude: number | null;
|
|
49
51
|
groupId: string | null;
|
|
50
52
|
imageId: string | null;
|
|
51
53
|
image: string | null;
|
|
@@ -2,6 +2,7 @@ import { DeviceConnectivityDetails, type DeviceConnectivityDetailsDTO } from "..
|
|
|
2
2
|
import { DeviceStatusDetails, type DeviceStatusDetailsDTO } from "../deviceStatuses/deviceStatusDetails";
|
|
3
3
|
import { DeviceOrganisationAlert, type DeviceOrganisationAlertDTO } from "./deviceOrganisationAlert";
|
|
4
4
|
import { ModelStatusInfos, type ModelStatusInfosDTO } from "../modelStatuses/modelStatusInfos";
|
|
5
|
+
import { type EntityType } from '@dative-gpi/foundation-shared-domain/enums';
|
|
5
6
|
import { PathCrumb, type PathCrumbDTO } from "../shared/pathCrumb";
|
|
6
7
|
|
|
7
8
|
export class DeviceOrganisationInfos {
|
|
@@ -9,6 +10,8 @@ export class DeviceOrganisationInfos {
|
|
|
9
10
|
deviceId: string;
|
|
10
11
|
manufacturerId: string;
|
|
11
12
|
manufacturerLabel: string;
|
|
13
|
+
latitude: number | null;
|
|
14
|
+
longitude: number | null;
|
|
12
15
|
articleId: string;
|
|
13
16
|
articleLabel: string;
|
|
14
17
|
modelId: string;
|
|
@@ -44,6 +47,8 @@ export class DeviceOrganisationInfos {
|
|
|
44
47
|
this.deviceId = params.deviceId;
|
|
45
48
|
this.manufacturerId = params.manufacturerId;
|
|
46
49
|
this.manufacturerLabel = params.manufacturerLabel;
|
|
50
|
+
this.latitude = params.latitude;
|
|
51
|
+
this.longitude = params.longitude;
|
|
47
52
|
this.articleId = params.articleId;
|
|
48
53
|
this.articleLabel = params.articleLabel;
|
|
49
54
|
this.modelId = params.modelId;
|
|
@@ -82,6 +87,8 @@ export interface DeviceOrganisationInfosDTO {
|
|
|
82
87
|
deviceId: string;
|
|
83
88
|
manufacturerId: string;
|
|
84
89
|
manufacturerLabel: string;
|
|
90
|
+
latitude: number | null;
|
|
91
|
+
longitude: number | null;
|
|
85
92
|
articleId: string;
|
|
86
93
|
articleLabel: string;
|
|
87
94
|
modelId: string;
|
|
@@ -124,4 +131,6 @@ export interface DeviceOrganisationFilters {
|
|
|
124
131
|
deviceOrganisationsIds?: string[] | null;
|
|
125
132
|
otherDeviceOrganisationsIds?: string[] | null;
|
|
126
133
|
search?: string | null;
|
|
134
|
+
entityType?: EntityType | null;
|
|
135
|
+
entitiesIds?: string[] | null;
|
|
127
136
|
}
|
package/models/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from "./dashboardShallowDatePresets"; // No service
|
|
|
19
19
|
export * from "./dashboardShallowEntityPresets"; // No service
|
|
20
20
|
export * from "./dashboardShallows";
|
|
21
21
|
export * from "./dashboardShallowVariables"; // No service
|
|
22
|
+
export * from "./dashboardShallowWidgets"; // No service
|
|
22
23
|
export * from "./dashboardVariables"; // No service
|
|
23
24
|
export * from "./dashboardVariableValues"; // No service
|
|
24
25
|
export * from "./dataCategories";
|
|
@@ -37,6 +38,7 @@ export * from "./models";
|
|
|
37
38
|
export * from "./modelStatuses"; // No service
|
|
38
39
|
export * from "./organisations";
|
|
39
40
|
export * from "./permissionCategories";
|
|
41
|
+
export * from "./reports";
|
|
40
42
|
export * from "./roleOrganisations";
|
|
41
43
|
export * from "./roleOrganisationTypes";
|
|
42
44
|
export * from "./routes";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EntityType } from '@dative-gpi/foundation-shared-domain/enums';
|
|
1
2
|
import { Address, type AddressDTO } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
3
|
|
|
3
4
|
export class LocationInfos {
|
|
@@ -46,4 +47,6 @@ export interface LocationFilters {
|
|
|
46
47
|
locationsIds?: string[] | null;
|
|
47
48
|
modelsIds?: string[] | null;
|
|
48
49
|
search?: string | null;
|
|
50
|
+
entityType?: EntityType | null;
|
|
51
|
+
entitiesIds?: string[] | null;
|
|
49
52
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -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.
|
|
4
|
+
"version": "1.0.139-chartlists",
|
|
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.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.139-chartlists",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.139-chartlists"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "d6d4df26014365b637a93c3e05c616616159a6f7"
|
|
17
17
|
}
|