@dative-gpi/foundation-core-domain 1.1.24-unit-formatter → 1.1.24-unit-formatter-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/models/chartOrganisationTypes/chartOrganisationTypeInfos.ts +5 -5
- package/models/chartOrganisations/chartOrganisationInfos.ts +5 -5
- package/models/charts/chartInfos.ts +0 -5
- package/models/charts/chartOperand.ts +1 -8
- package/models/charts/index.ts +0 -1
- package/models/dashboardExplorerElements/dashboardExplorerElementDetails.ts +50 -0
- package/models/dashboardExplorerElements/dashboardExplorerElementInfos.ts +110 -0
- package/models/dashboardExplorerElements/index.ts +2 -0
- package/models/dashboardShallows/dashboardShallowDetails.ts +1 -1
- package/models/dataCategories/dataCategoryInfos.ts +7 -4
- package/models/dataDefinitions/dataDefinitionInfos.ts +0 -3
- package/models/deviceExplorerElements/deviceExplorerElementInfos.ts +6 -22
- package/models/deviceOrganisations/deviceOrganisationInfos.ts +4 -0
- package/models/groupings/groupingInfos.ts +1 -0
- package/models/index.ts +1 -0
- package/models/models/modelInfos.ts +3 -8
- package/models/subgroupingDeviceOrganisations/subgroupingDeviceOrganisationInfos.ts +2 -2
- package/models/subgroupings/subgroupingInfos.ts +14 -1
- package/models/userOrganisations/userOrganisationInfos.ts +4 -0
- package/package.json +4 -4
- package/models/charts/chartModelLabel.ts +0 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
1
|
+
import type { ModelInfosDTO } from "../models/modelInfos";
|
|
2
|
+
import { ModelInfos } from "../models/modelInfos";
|
|
3
3
|
import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
4
|
import type { ChartType, PlotPer } from "@dative-gpi/foundation-shared-domain/enums";
|
|
5
5
|
|
|
@@ -21,7 +21,7 @@ export class ChartOrganisationTypeInfos {
|
|
|
21
21
|
tags: string[];
|
|
22
22
|
multiple: boolean;
|
|
23
23
|
chartType: ChartType;
|
|
24
|
-
|
|
24
|
+
models: ModelInfos[];
|
|
25
25
|
|
|
26
26
|
constructor(params: ChartOrganisationTypeInfosDTO) {
|
|
27
27
|
this.id = params.id;
|
|
@@ -41,7 +41,7 @@ export class ChartOrganisationTypeInfos {
|
|
|
41
41
|
this.tags = params.tags.slice();
|
|
42
42
|
this.multiple = params.multiple;
|
|
43
43
|
this.chartType = params.chartType;
|
|
44
|
-
this.
|
|
44
|
+
this.models = params.models?.map((m) => new ModelInfos(m)) ?? [];
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -63,7 +63,7 @@ export interface ChartOrganisationTypeInfosDTO {
|
|
|
63
63
|
tags: string[];
|
|
64
64
|
multiple: boolean;
|
|
65
65
|
chartType: ChartType;
|
|
66
|
-
|
|
66
|
+
models?: ModelInfosDTO[];
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
export interface ChartOrganisationTypeFilters {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
1
|
+
import type { ModelInfosDTO } from "../models/modelInfos";
|
|
2
|
+
import { ModelInfos } from "../models/modelInfos";
|
|
3
3
|
import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
4
|
import type { ChartType, PlotPer } from "@dative-gpi/foundation-shared-domain/enums";
|
|
5
5
|
|
|
@@ -20,7 +20,7 @@ export class ChartOrganisationInfos {
|
|
|
20
20
|
tags: string[];
|
|
21
21
|
multiple: boolean;
|
|
22
22
|
chartType: ChartType;
|
|
23
|
-
|
|
23
|
+
models: ModelInfos[];
|
|
24
24
|
|
|
25
25
|
constructor(params: ChartOrganisationInfosDTO) {
|
|
26
26
|
this.id = params.id;
|
|
@@ -39,7 +39,7 @@ export class ChartOrganisationInfos {
|
|
|
39
39
|
this.tags = params.tags.slice();
|
|
40
40
|
this.multiple = params.multiple;
|
|
41
41
|
this.chartType = params.chartType;
|
|
42
|
-
this.
|
|
42
|
+
this.models = params.models?.map((m) => new ModelInfos(m)) ?? [];
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -60,7 +60,7 @@ export interface ChartOrganisationInfosDTO {
|
|
|
60
60
|
tags: string[];
|
|
61
61
|
multiple: boolean;
|
|
62
62
|
chartType: ChartType;
|
|
63
|
-
|
|
63
|
+
models?: ModelInfosDTO[];
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
export interface ChartOrganisationFilters {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { ChartModelLabelDTO } from "./chartModelLabel";
|
|
2
|
-
import { ChartModelLabel } from "./chartModelLabel";
|
|
3
1
|
import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
2
|
import type { ChartType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
5
3
|
|
|
@@ -18,7 +16,6 @@ export class ChartInfos {
|
|
|
18
16
|
tags: string[];
|
|
19
17
|
multiple: boolean;
|
|
20
18
|
chartType: ChartType;
|
|
21
|
-
modelsLabels: ChartModelLabel[];
|
|
22
19
|
|
|
23
20
|
constructor(params: ChartInfosDTO) {
|
|
24
21
|
this.id = params.id;
|
|
@@ -35,7 +32,6 @@ export class ChartInfos {
|
|
|
35
32
|
this.tags = params.tags.slice();
|
|
36
33
|
this.multiple = params.multiple;
|
|
37
34
|
this.chartType = params.chartType;
|
|
38
|
-
this.modelsLabels = params.modelsLabels.map((modelLabel) => new ChartModelLabel(modelLabel));
|
|
39
35
|
}
|
|
40
36
|
}
|
|
41
37
|
|
|
@@ -54,5 +50,4 @@ export interface ChartInfosDTO {
|
|
|
54
50
|
tags: string[];
|
|
55
51
|
multiple: boolean;
|
|
56
52
|
chartType: ChartType;
|
|
57
|
-
modelsLabels: ChartModelLabelDTO[];
|
|
58
53
|
}
|
|
@@ -7,8 +7,6 @@ export class ChartOperand {
|
|
|
7
7
|
chartSerieHiddenCode: string;
|
|
8
8
|
name: string;
|
|
9
9
|
aggregation?: AggregationType;
|
|
10
|
-
modelId: string;
|
|
11
|
-
modelLabel: string;
|
|
12
10
|
dataCategoryId: string;
|
|
13
11
|
dataDefinitionId?: string;
|
|
14
12
|
xAxisModifierHiddenCode?: string;
|
|
@@ -22,10 +20,8 @@ export class ChartOperand {
|
|
|
22
20
|
this.chartId = params.chartId;
|
|
23
21
|
this.hiddenCode = params.hiddenCode;
|
|
24
22
|
this.chartSerieHiddenCode = params.chartSerieHiddenCode;
|
|
25
|
-
this.name = params.name
|
|
23
|
+
this.name = params.name;
|
|
26
24
|
this.aggregation = (params.aggregation as AggregationType) ?? undefined;
|
|
27
|
-
this.modelId = params.modelId;
|
|
28
|
-
this.modelLabel = params.modelLabel;
|
|
29
25
|
this.dataCategoryId = params.dataCategoryId;
|
|
30
26
|
this.dataDefinitionId = params.dataDefinitionId;
|
|
31
27
|
this.xAxisModifierHiddenCode = params.xAxisModifierHiddenCode;
|
|
@@ -43,8 +39,6 @@ export interface ChartOperandDTO {
|
|
|
43
39
|
chartSerieHiddenCode: string;
|
|
44
40
|
name: string;
|
|
45
41
|
aggregation?: number;
|
|
46
|
-
modelId: string;
|
|
47
|
-
modelLabel: string;
|
|
48
42
|
dataCategoryId: string;
|
|
49
43
|
dataDefinitionId?: string;
|
|
50
44
|
xAxisModifierHiddenCode?: string;
|
|
@@ -59,7 +53,6 @@ export interface CreateChartOperandDTO {
|
|
|
59
53
|
chartSerieHiddenCode: string;
|
|
60
54
|
name: string;
|
|
61
55
|
aggregation?: number;
|
|
62
|
-
modelId: string;
|
|
63
56
|
dataCategoryId: string;
|
|
64
57
|
dataDefinitionId?: string;
|
|
65
58
|
xAxisModifierHiddenCode?: string;
|
package/models/charts/index.ts
CHANGED
|
@@ -6,7 +6,6 @@ export * from "./chartFilter";
|
|
|
6
6
|
export * from "./chartFilterTranslation";
|
|
7
7
|
export * from "./chartFilterValue";
|
|
8
8
|
export * from "./chartInfos";
|
|
9
|
-
export * from "./chartModelLabel";
|
|
10
9
|
export * from "./chartModifier";
|
|
11
10
|
export * from "./chartOperand";
|
|
12
11
|
export * from "./chartPlot";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DashboardExplorerElementInfos, type DashboardExplorerElementInfosDTO } from "./dashboardExplorerElementInfos";
|
|
2
|
+
|
|
3
|
+
export class DashboardExplorerElementDetails extends DashboardExplorerElementInfos {
|
|
4
|
+
// DashboardOrganisation & DashboardShallow
|
|
5
|
+
folderId: string | null;
|
|
6
|
+
folderLabel: string | null;
|
|
7
|
+
folderIcon: string | null;
|
|
8
|
+
|
|
9
|
+
// DashboardShallow
|
|
10
|
+
dashboardOrganisationTypeId: string | null;
|
|
11
|
+
dashboardOrganisationTypeLabel: string | null;
|
|
12
|
+
|
|
13
|
+
// DashboardOrganisationType
|
|
14
|
+
organisationTypeId: string | null;
|
|
15
|
+
organisationTypeLabel: string | null;
|
|
16
|
+
|
|
17
|
+
// Dashboard
|
|
18
|
+
dashboardId: string | null;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
constructor(params: DashboardExplorerElementDetailsDTO) {
|
|
22
|
+
super(params);
|
|
23
|
+
this.folderId = params.folderId ?? null;
|
|
24
|
+
this.folderLabel = params.folderLabel ?? null;
|
|
25
|
+
this.folderIcon = params.folderIcon ?? null;
|
|
26
|
+
this.dashboardOrganisationTypeId = params.dashboardOrganisationTypeId ?? null;
|
|
27
|
+
this.dashboardOrganisationTypeLabel = params.dashboardOrganisationTypeLabel ?? null;
|
|
28
|
+
this.organisationTypeId = params.organisationTypeId ?? null;
|
|
29
|
+
this.organisationTypeLabel = params.organisationTypeLabel ?? null;
|
|
30
|
+
this.dashboardId = params.dashboardId ?? null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface DashboardExplorerElementDetailsDTO extends DashboardExplorerElementInfosDTO {
|
|
35
|
+
// DashboardOrganisation & DashboardShallow
|
|
36
|
+
folderId?: string;
|
|
37
|
+
folderLabel?: string | null;
|
|
38
|
+
folderIcon?: string | null;
|
|
39
|
+
|
|
40
|
+
// DashboardShallow
|
|
41
|
+
dashboardOrganisationTypeId?: string | null;
|
|
42
|
+
dashboardOrganisationTypeLabel?: string | null;
|
|
43
|
+
|
|
44
|
+
// DashboardOrganisationType
|
|
45
|
+
organisationTypeId?: string | null;
|
|
46
|
+
organisationTypeLabel?: string | null;
|
|
47
|
+
|
|
48
|
+
// Dashboard
|
|
49
|
+
dashboardId?: string | null;
|
|
50
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { ApplicationScope, DashboardExplorerElementType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
+
import { DashboardExplorerElementType as DashboardExplorerElementTypeEnum } from "@dative-gpi/foundation-shared-domain/enums";
|
|
3
|
+
|
|
4
|
+
import { PathCrumb, type PathCrumbDTO } from "../shared/pathCrumb";
|
|
5
|
+
import type { DashboardOrganisationInfos } from "../dashboardOrganisations/dashboardOrganisationInfos";
|
|
6
|
+
import type { DashboardShallowInfos } from "../dashboardShallows/dashboardShallowInfos";
|
|
7
|
+
import type { DashboardOrganisationTypeInfos } from "../dashboardOrganisationTypes/dashboardOrganisationTypeInfos";
|
|
8
|
+
import type { FolderInfos } from "../folders/folderInfos";
|
|
9
|
+
|
|
10
|
+
export class DashboardExplorerElementInfos {
|
|
11
|
+
id: string;
|
|
12
|
+
imageId: string | null;
|
|
13
|
+
label: string;
|
|
14
|
+
code: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
tags: string[];
|
|
17
|
+
colors: string[];
|
|
18
|
+
type: DashboardExplorerElementType;
|
|
19
|
+
|
|
20
|
+
// Folder
|
|
21
|
+
parentId: string | null;
|
|
22
|
+
parentLabel: string | null;
|
|
23
|
+
parentIcon: string | null;
|
|
24
|
+
recursiveFoldersIds: string[] | null;
|
|
25
|
+
recursiveDashboardOrganisationsIds: string[] | null;
|
|
26
|
+
recursiveDashboardShallowsIds: string[] | null;
|
|
27
|
+
path: PathCrumb[];
|
|
28
|
+
// Dashboard
|
|
29
|
+
scope: ApplicationScope | null;
|
|
30
|
+
locked: boolean | null;
|
|
31
|
+
|
|
32
|
+
constructor(params: DashboardExplorerElementInfosDTO) {
|
|
33
|
+
this.id = params.id;
|
|
34
|
+
this.imageId = params.imageId;
|
|
35
|
+
this.label = params.label;
|
|
36
|
+
this.code = params.code;
|
|
37
|
+
this.icon = params.icon;
|
|
38
|
+
this.tags = params.tags?.slice() ?? [];
|
|
39
|
+
this.colors = params.colors?.slice() ?? [];
|
|
40
|
+
this.type = params.type;
|
|
41
|
+
|
|
42
|
+
this.parentId = params.parentId ?? null;
|
|
43
|
+
this.parentLabel = params.parentLabel ?? null;
|
|
44
|
+
this.parentIcon = params.parentIcon ?? null;
|
|
45
|
+
this.recursiveFoldersIds = params.recursiveFoldersIds?.slice() ?? null;
|
|
46
|
+
this.recursiveDashboardOrganisationsIds = params.recursiveDashboardOrganisationsIds?.slice() ?? null;
|
|
47
|
+
this.recursiveDashboardShallowsIds = params.recursiveDashboardShallowsIds?.slice() ?? null;
|
|
48
|
+
this.path = params.path?.map(dto => new PathCrumb({ ...dto })).sort((a, b) => b.index - a.index) ?? [];
|
|
49
|
+
|
|
50
|
+
this.scope = params.scope ?? null;
|
|
51
|
+
this.locked = params.locked ?? null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static fromDashboardOrganisation = (d: DashboardOrganisationInfos): DashboardExplorerElementInfos => new DashboardExplorerElementInfos({
|
|
55
|
+
...d,
|
|
56
|
+
type: DashboardExplorerElementTypeEnum.DashboardOrganisation,
|
|
57
|
+
parentId: d.folderId,
|
|
58
|
+
parentLabel: d.folderLabel,
|
|
59
|
+
parentIcon: d.folderIcon
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
static fromDashboardShallow = (d: DashboardShallowInfos): DashboardExplorerElementInfos => new DashboardExplorerElementInfos({
|
|
63
|
+
...d,
|
|
64
|
+
type: DashboardExplorerElementTypeEnum.DashboardShallow,
|
|
65
|
+
parentId: d.folderId,
|
|
66
|
+
parentLabel: d.folderLabel,
|
|
67
|
+
parentIcon: d.folderIcon
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
static fromDashboardOrganisationType = (d: DashboardOrganisationTypeInfos): DashboardExplorerElementInfos => new DashboardExplorerElementInfos({
|
|
71
|
+
...d,
|
|
72
|
+
type: DashboardExplorerElementTypeEnum.DashboardOrganisationType
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
static fromFolder = (f: FolderInfos): DashboardExplorerElementInfos => new DashboardExplorerElementInfos({
|
|
76
|
+
...f,
|
|
77
|
+
type: DashboardExplorerElementTypeEnum.Folder
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface DashboardExplorerElementInfosDTO {
|
|
82
|
+
id: string;
|
|
83
|
+
imageId: string | null;
|
|
84
|
+
label: string;
|
|
85
|
+
code: string;
|
|
86
|
+
icon: string;
|
|
87
|
+
tags: string[];
|
|
88
|
+
colors: string[];
|
|
89
|
+
type: DashboardExplorerElementType;
|
|
90
|
+
|
|
91
|
+
parentId?: string | null;
|
|
92
|
+
parentLabel?: string | null;
|
|
93
|
+
parentIcon?: string | null;
|
|
94
|
+
recursiveFoldersIds?: string[] | null;
|
|
95
|
+
recursiveDashboardOrganisationsIds?: string[] | null;
|
|
96
|
+
recursiveDashboardShallowsIds?: string[] | null;
|
|
97
|
+
path?: PathCrumbDTO[];
|
|
98
|
+
|
|
99
|
+
scope?: ApplicationScope | null;
|
|
100
|
+
locked?: boolean | null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface DashboardExplorerElementFilters {
|
|
104
|
+
dashboardExplorerElementsIds?: string[] | null;
|
|
105
|
+
ancestorId?: string | null;
|
|
106
|
+
parentId?: string | null;
|
|
107
|
+
root?: boolean | null;
|
|
108
|
+
search?: string | null;
|
|
109
|
+
types?: DashboardExplorerElementType[] | null;
|
|
110
|
+
}
|
|
@@ -51,7 +51,7 @@ export class DashboardShallowDetails extends DashboardShallowInfos {
|
|
|
51
51
|
|
|
52
52
|
get widgets() {
|
|
53
53
|
return this.defaultWidgets.map(d => {
|
|
54
|
-
const override = this.overrideWidgets.find(od => od.
|
|
54
|
+
const override = this.overrideWidgets.find(od => od.hiddenCode === d.hiddenCode);
|
|
55
55
|
return override ? new WidgetInfos({ ...d, ...override }) : d;
|
|
56
56
|
});
|
|
57
57
|
}
|
|
@@ -1,29 +1,32 @@
|
|
|
1
|
+
import type { ModelInfosDTO } from "../models/modelInfos";
|
|
2
|
+
import { ModelInfos } from "../models/modelInfos";
|
|
3
|
+
|
|
1
4
|
export class DataCategoryInfos {
|
|
2
5
|
id: string;
|
|
3
|
-
modelId: string;
|
|
4
6
|
code: string;
|
|
5
7
|
label: string;
|
|
6
8
|
correlated: boolean;
|
|
9
|
+
models: ModelInfos[];
|
|
7
10
|
|
|
8
11
|
constructor(params: DataCategoryInfosDTO) {
|
|
9
12
|
this.id = params.id;
|
|
10
|
-
this.modelId = params.modelId;
|
|
11
13
|
this.code = params.code;
|
|
12
14
|
this.label = params.label;
|
|
13
15
|
this.correlated = params.correlated;
|
|
16
|
+
this.models = params.models?.map((m) => new ModelInfos(m)) ?? [];
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
export interface DataCategoryInfosDTO {
|
|
18
21
|
id: string;
|
|
19
|
-
modelId: string;
|
|
20
22
|
code: string;
|
|
21
23
|
label: string;
|
|
22
24
|
correlated: boolean;
|
|
25
|
+
models?: ModelInfosDTO[];
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
export interface DataCategoryFilters {
|
|
26
|
-
|
|
29
|
+
modelsIds?: string[] | null;
|
|
27
30
|
correlated?: boolean | null;
|
|
28
31
|
search?: string | null;
|
|
29
32
|
}
|
|
@@ -4,7 +4,6 @@ import type { DataTable } from "@dative-gpi/foundation-shared-domain/enums";
|
|
|
4
4
|
|
|
5
5
|
export class DataDefinitionInfos {
|
|
6
6
|
id: string;
|
|
7
|
-
modelId: string;
|
|
8
7
|
dataCategoryId: string;
|
|
9
8
|
dataCategoryCode: string;
|
|
10
9
|
dataCategoryLabel: string;
|
|
@@ -19,7 +18,6 @@ export class DataDefinitionInfos {
|
|
|
19
18
|
|
|
20
19
|
constructor(params: DataDefinitionInfosDTO) {
|
|
21
20
|
this.id = params.id;
|
|
22
|
-
this.modelId = params.modelId;
|
|
23
21
|
this.dataCategoryId = params.dataCategoryId;
|
|
24
22
|
this.dataCategoryCode = params.dataCategoryCode;
|
|
25
23
|
this.dataCategoryLabel = params.dataCategoryLabel;
|
|
@@ -36,7 +34,6 @@ export class DataDefinitionInfos {
|
|
|
36
34
|
|
|
37
35
|
export interface DataDefinitionInfosDTO {
|
|
38
36
|
id: string;
|
|
39
|
-
modelId: string;
|
|
40
37
|
dataCategoryId: string;
|
|
41
38
|
dataCategoryCode: string;
|
|
42
39
|
dataCategoryLabel: string;
|
|
@@ -75,36 +75,20 @@ export class DeviceExplorerElementInfos {
|
|
|
75
75
|
this.worstAlert = params.worstAlert ? new DeviceOrganisationAlert(params.worstAlert) : null;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
static fromDeviceOrganisation = (deviceOrganisation: DeviceOrganisationInfos): DeviceExplorerElementInfos => ({
|
|
78
|
+
static fromDeviceOrganisation = (deviceOrganisation: DeviceOrganisationInfos): DeviceExplorerElementInfos => new DeviceExplorerElementInfos({
|
|
79
79
|
...deviceOrganisation,
|
|
80
80
|
type: DeviceExplorerElementType.DeviceOrganisation,
|
|
81
81
|
parentId: deviceOrganisation.groupId,
|
|
82
|
-
icon: null,
|
|
83
|
-
groupsIds: null,
|
|
84
|
-
deviceOrganisationsIds: null,
|
|
85
|
-
modelsIds: null,
|
|
86
|
-
recursiveGroupsIds: null,
|
|
87
|
-
recursiveDeviceOrganisationsIds: null,
|
|
88
|
-
recursiveModelsIds: null
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
static fromGroup = (group: GroupInfos): DeviceExplorerElementInfos => ({
|
|
92
|
-
...group,
|
|
93
|
-
type: DeviceExplorerElementType.Group,
|
|
94
|
-
manufacturerLabel: null,
|
|
95
|
-
articleLabel: null,
|
|
96
|
-
modelLabel: null,
|
|
97
|
-
ownerLabel: null,
|
|
98
|
-
managerName: null,
|
|
99
|
-
unrestricted: null,
|
|
100
|
-
online: null,
|
|
101
|
-
meta: null,
|
|
102
|
-
modelStatuses: null,
|
|
103
82
|
status: null,
|
|
104
83
|
connectivity: null,
|
|
105
84
|
alerts: null,
|
|
106
85
|
worstAlert: null
|
|
107
86
|
});
|
|
87
|
+
|
|
88
|
+
static fromGroup = (group: GroupInfos): DeviceExplorerElementInfos => new DeviceExplorerElementInfos({
|
|
89
|
+
...group,
|
|
90
|
+
type: DeviceExplorerElementType.Group
|
|
91
|
+
});
|
|
108
92
|
}
|
|
109
93
|
|
|
110
94
|
export interface DeviceExplorerElementInfosDTO {
|
|
@@ -5,6 +5,7 @@ import { ModelStatusInfos, type ModelStatusInfosDTO } from "../modelStatuses/mod
|
|
|
5
5
|
import { type EntityType } from '@dative-gpi/foundation-shared-domain/enums';
|
|
6
6
|
import { PathCrumb, type PathCrumbDTO } from "../shared/pathCrumb";
|
|
7
7
|
import { Address, type AddressDTO } from '@dative-gpi/foundation-shared-domain';
|
|
8
|
+
import { SubgroupingInfos } from "../subgroupings";
|
|
8
9
|
|
|
9
10
|
export class DeviceOrganisationInfos {
|
|
10
11
|
id: string;
|
|
@@ -46,6 +47,7 @@ export class DeviceOrganisationInfos {
|
|
|
46
47
|
connectivity: DeviceConnectivityDetails;
|
|
47
48
|
alerts: DeviceOrganisationAlert[];
|
|
48
49
|
worstAlert: DeviceOrganisationAlert | null;
|
|
50
|
+
subgroupings: SubgroupingInfos[];
|
|
49
51
|
|
|
50
52
|
constructor(params: DeviceOrganisationInfosDTO) {
|
|
51
53
|
this.id = params.id;
|
|
@@ -88,6 +90,7 @@ export class DeviceOrganisationInfos {
|
|
|
88
90
|
this.alerts = params.alerts.map(dto => new DeviceOrganisationAlert(dto));
|
|
89
91
|
this.worstAlert = params.worstAlert != null ?
|
|
90
92
|
new DeviceOrganisationAlert(params.worstAlert) : null;
|
|
93
|
+
this.subgroupings = params.subgroupings.map(dto => new SubgroupingInfos(dto));
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
|
|
@@ -131,6 +134,7 @@ export interface DeviceOrganisationInfosDTO {
|
|
|
131
134
|
connectivity: DeviceConnectivityDetailsDTO;
|
|
132
135
|
alerts: DeviceOrganisationAlertDTO[];
|
|
133
136
|
worstAlert: DeviceOrganisationAlertDTO | null;
|
|
137
|
+
subgroupings: SubgroupingInfos[];
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
export interface DeviceOrganisationFilters {
|
package/models/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from "./customProperties";
|
|
|
13
13
|
export * from "./customPropertyValues";
|
|
14
14
|
export * from "./dashboardDatePresets"; // No service
|
|
15
15
|
export * from "./dashboardEntityPresets"; // No service
|
|
16
|
+
export * from "./dashboardExplorerElements";
|
|
16
17
|
export * from "./dashboardOrganisations";
|
|
17
18
|
export * from "./dashboardOrganisationTypes";
|
|
18
19
|
export * from "./dashboards";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export class ModelInfos {
|
|
2
2
|
id: string;
|
|
3
|
-
manufacturerId: string;
|
|
4
|
-
manufacturerLabel: string;
|
|
5
3
|
imageId: string | null;
|
|
6
4
|
code: string;
|
|
7
5
|
label: string;
|
|
@@ -9,9 +7,7 @@ export class ModelInfos {
|
|
|
9
7
|
|
|
10
8
|
constructor(params: ModelInfosDTO) {
|
|
11
9
|
this.id = params.id;
|
|
12
|
-
this.
|
|
13
|
-
this.manufacturerLabel = params.manufacturerLabel;
|
|
14
|
-
this.imageId = params.imageId;
|
|
10
|
+
this.imageId = params.imageId ?? null;
|
|
15
11
|
this.code = params.code;
|
|
16
12
|
this.label = params.label;
|
|
17
13
|
this.connectable = params.connectable;
|
|
@@ -20,9 +16,7 @@ export class ModelInfos {
|
|
|
20
16
|
|
|
21
17
|
export interface ModelInfosDTO {
|
|
22
18
|
id: string;
|
|
23
|
-
|
|
24
|
-
manufacturerLabel: string;
|
|
25
|
-
imageId: string | null;
|
|
19
|
+
imageId?: string | null;
|
|
26
20
|
code: string;
|
|
27
21
|
label: string;
|
|
28
22
|
connectable: boolean;
|
|
@@ -30,5 +24,6 @@ export interface ModelInfosDTO {
|
|
|
30
24
|
|
|
31
25
|
export interface ModelFilters {
|
|
32
26
|
modelsIds?: string[] | null;
|
|
27
|
+
codes?: string[] | null;
|
|
33
28
|
search?: string | null;
|
|
34
29
|
}
|
|
@@ -19,7 +19,7 @@ export interface SubgroupingDeviceOrganisationInfosDTO {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export interface SubgroupingDeviceOrganisationFilters {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
groupingsIds?: string[] | null;
|
|
23
|
+
subgroupingsIds?: string[] | null;
|
|
24
24
|
search?: string | null;
|
|
25
25
|
}
|
|
@@ -1,28 +1,41 @@
|
|
|
1
1
|
export class SubgroupingInfos {
|
|
2
2
|
id: string;
|
|
3
3
|
groupingId: string;
|
|
4
|
+
groupingLabel: string;
|
|
5
|
+
groupingColor: string;
|
|
6
|
+
groupingIcon: string;
|
|
4
7
|
label: string;
|
|
5
8
|
code: string;
|
|
6
9
|
icon: string;
|
|
10
|
+
deviceOrganisationsCount: number;
|
|
7
11
|
|
|
8
12
|
constructor(params: SubgroupingInfosDTO) {
|
|
9
13
|
this.id = params.id;
|
|
10
14
|
this.groupingId = params.groupingId;
|
|
15
|
+
this.groupingLabel = params.groupingLabel;
|
|
16
|
+
this.groupingColor = params.groupingColor;
|
|
17
|
+
this.groupingIcon = params.groupingIcon;
|
|
11
18
|
this.label = params.label;
|
|
12
19
|
this.code = params.code;
|
|
13
20
|
this.icon = params.icon;
|
|
21
|
+
this.deviceOrganisationsCount = params.deviceOrganisationsCount;
|
|
14
22
|
}
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
export interface SubgroupingInfosDTO {
|
|
18
26
|
id: string;
|
|
19
27
|
groupingId: string;
|
|
28
|
+
groupingLabel: string;
|
|
29
|
+
groupingColor: string;
|
|
30
|
+
groupingIcon: string;
|
|
20
31
|
label: string;
|
|
21
32
|
code: string;
|
|
22
33
|
icon: string;
|
|
34
|
+
deviceOrganisationsCount: number;
|
|
23
35
|
}
|
|
24
36
|
|
|
25
37
|
export interface SubgroupingFilters {
|
|
26
|
-
|
|
38
|
+
subgroupingsIds?: string[] | null;
|
|
39
|
+
groupingsIds?: string[] | null;
|
|
27
40
|
search?: string | null;
|
|
28
41
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
1
2
|
import type { UserType, UserValidityState } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
3
|
import type { RoleType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
3
4
|
|
|
@@ -23,6 +24,7 @@ export class UserOrganisationInfos {
|
|
|
23
24
|
name: string;
|
|
24
25
|
startOnKioskMode: boolean;
|
|
25
26
|
tags: string[];
|
|
27
|
+
lastActivity: number | null;
|
|
26
28
|
|
|
27
29
|
constructor(params: UserOrganisationInfosDTO) {
|
|
28
30
|
this.id = params.id;
|
|
@@ -46,6 +48,7 @@ export class UserOrganisationInfos {
|
|
|
46
48
|
this.name = params.name;
|
|
47
49
|
this.startOnKioskMode = params.startOnKioskMode;
|
|
48
50
|
this.tags = params.tags && params.tags.slice() || [];
|
|
51
|
+
this.lastActivity = params.lastActivity ? isoToEpoch(params.lastActivity) : null;
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
|
|
@@ -71,6 +74,7 @@ export interface UserOrganisationInfosDTO {
|
|
|
71
74
|
name: string;
|
|
72
75
|
startOnKioskMode: boolean;
|
|
73
76
|
tags: string[] | null;
|
|
77
|
+
lastActivity: string | null;
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
export interface UserOrganisationFilters {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"url": "https://github.com/Dative-GPI/foundation-shared-ui.git"
|
|
5
5
|
},
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"version": "1.1.24-unit-formatter",
|
|
7
|
+
"version": "1.1.24-unit-formatter-2",
|
|
8
8
|
"description": "",
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "1.1.24-unit-formatter",
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "1.1.24-unit-formatter"
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.1.24-unit-formatter-2",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.1.24-unit-formatter-2"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "8e4e425fd5a9d635fd66121d110beb5745e337f3"
|
|
20
20
|
}
|