@dative-gpi/foundation-core-domain 0.0.66 → 0.0.67

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.
@@ -2,6 +2,7 @@ import { DeviceConnectivityDetails, DeviceConnectivityDetailsDTO } from "../devi
2
2
  import { DeviceStatusDetails, DeviceStatusDetailsDTO } from "../deviceStatuses/deviceStatusDetails";
3
3
  import { DeviceOrganisationAlert, DeviceOrganisationAlertDTO } from "./deviceOrganisationAlert";
4
4
  import { ModelStatusInfos, ModelStatusInfosDTO } from "../modelStatuses/modelStatusInfos";
5
+ import { DeviceStatusDTO } from "../deviceStatuses/deviceStatusInfos";
5
6
 
6
7
  export class DeviceOrganisationInfos {
7
8
  id: string;
@@ -34,8 +35,8 @@ export class DeviceOrganisationInfos {
34
35
  online: number;
35
36
  meta: { [key: string]: string };
36
37
  modelStatuses: ModelStatusInfos[];
37
- status: DeviceStatusDetails;
38
- connectivity: DeviceConnectivityDetails;
38
+ status?: DeviceStatusDetails;
39
+ connectivity?: DeviceConnectivityDetails;
39
40
  alerts: DeviceOrganisationAlert[];
40
41
  worstAlert?: DeviceOrganisationAlert;
41
42
 
@@ -74,8 +75,8 @@ export class DeviceOrganisationInfos {
74
75
  this.online = params.online;
75
76
  this.meta = { ...params.meta };
76
77
  this.modelStatuses = params.modelStatuses.map(dto => new ModelStatusInfos(dto));
77
- this.status = new DeviceStatusDetails(params.status);
78
- this.connectivity = new DeviceConnectivityDetails(params.connectivity);
78
+ this.status = params.status != null ? new DeviceStatusDetails({ statuses: params.status, id: params.id }) : undefined; //new DeviceStatusDetails(params.status);
79
+ this.connectivity = params.connectivity != null ? new DeviceConnectivityDetails({ ...params.connectivity, id: params.id }) : undefined; //new DeviceConnectivityDetails(params.connectivity);
79
80
  this.alerts = params.alerts.map(dto => new DeviceOrganisationAlert(dto));
80
81
  this.worstAlert = params.worstAlert != null ? new DeviceOrganisationAlert(params.worstAlert) : undefined;
81
82
  }
@@ -112,7 +113,7 @@ export interface DeviceOrganisationInfosDTO {
112
113
  online: number;
113
114
  meta: { [key: string]: string };
114
115
  modelStatuses: ModelStatusInfosDTO[];
115
- status: DeviceStatusDetailsDTO;
116
+ status: DeviceStatusDTO[];
116
117
  connectivity: DeviceConnectivityDetailsDTO;
117
118
  alerts: DeviceOrganisationAlertDTO[];
118
119
  worstAlert?: DeviceOrganisationAlertDTO;
@@ -1,13 +1,15 @@
1
+ import { TranslationColumnInfos, TranslationColumnInfosDTO } from "./translationColumnInfos";
2
+
1
3
  export class ColumnInfos {
2
4
  columnId: string;
3
5
  text: string;
4
6
  value: string;
5
7
  sortable: boolean;
6
8
  filterable: boolean;
7
-
8
9
  // Depends on [OrganisationType, UserOrganisation]
9
10
  index: number;
10
11
  hidden: boolean;
12
+ translations?: TranslationColumnInfos[]
11
13
 
12
14
  constructor(dto: ColumnInfosDTO) {
13
15
  this.columnId = dto.columnId;
@@ -17,6 +19,7 @@ export class ColumnInfos {
17
19
  this.filterable = dto.filterable;
18
20
  this.index = dto.index;
19
21
  this.hidden = dto.hidden;
22
+ this.translations = dto.translations?.map(dto => new TranslationColumnInfos(dto));
20
23
  }
21
24
  }
22
25
 
@@ -28,4 +31,5 @@ export interface ColumnInfosDTO {
28
31
  filterable: boolean;
29
32
  index: number;
30
33
  hidden: boolean;
34
+ translations?: TranslationColumnInfosDTO[]
31
35
  }
@@ -3,4 +3,5 @@ export * from "./columnInfos";
3
3
  export * from "./tableDetails";
4
4
  export * from "./tableFilter";
5
5
  export * from "./tableInfos";
6
- export * from "./tableOrder";
6
+ export * from "./tableOrder";
7
+ export * from "./translationColumnInfos";
@@ -0,0 +1,15 @@
1
+ export class TranslationColumnInfos {
2
+ languageCode: string;
3
+ label: string;
4
+
5
+
6
+ constructor(dto: TranslationColumnInfosDTO) {
7
+ this.languageCode = dto.languageCode;
8
+ this.label = dto.label;
9
+ }
10
+ }
11
+
12
+ export interface TranslationColumnInfosDTO {
13
+ languageCode: string;
14
+ label: string;
15
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-core-domain",
3
3
  "sideEffects": false,
4
- "version": "0.0.66",
4
+ "version": "0.0.67",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -9,5 +9,5 @@
9
9
  "main": "index.ts",
10
10
  "author": "",
11
11
  "license": "ISC",
12
- "gitHead": "168f423ff8ddc691454860bf16396885e0e1c4f9"
12
+ "gitHead": "6cc34e046f8f86c6b13d67d8e11f8870bc073d15"
13
13
  }