From 3e1e69354c8c5da67d409e28f3eb96bdb1b1f97b Mon Sep 17 00:00:00 2001 From: Noe Date: Wed, 19 Jun 2024 14:55:30 +0200 Subject: [PATCH] Add device type to front end and backend --- csharp/App/Backend/DataTypes/Installation.cs | 3 +- .../content/dashboards/History/History.tsx | 4 +- .../FlatInstallationView.tsx | 49 ++++++++++++++++++- .../src/interfaces/InstallationTypes.tsx | 1 + 4 files changed, 52 insertions(+), 5 deletions(-) diff --git a/csharp/App/Backend/DataTypes/Installation.cs b/csharp/App/Backend/DataTypes/Installation.cs index 8d48ab2e5..ed52fc1dc 100644 --- a/csharp/App/Backend/DataTypes/Installation.cs +++ b/csharp/App/Backend/DataTypes/Installation.cs @@ -21,9 +21,8 @@ public class Installation : TreeNode public String WriteRoleId { get; set; } = ""; public int Product { get; set; } = 0; + public int Device { get; set; } = 0; [Ignore] public String OrderNumbers { get; set; } public String VrmLink { get; set; } = ""; - - } \ No newline at end of file diff --git a/typescript/frontend-marios2/src/content/dashboards/History/History.tsx b/typescript/frontend-marios2/src/content/dashboards/History/History.tsx index 8d519f3dc..5b10d7585 100644 --- a/typescript/frontend-marios2/src/content/dashboards/History/History.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/History/History.tsx @@ -235,7 +235,7 @@ function HistoryOfActions(props: HistoryProps) { >
{ - + + + @@ -225,6 +227,51 @@ const FlatInstallationView = (props: FlatInstallationViewProps) => { + +
+ {installation.device === 1 ? ( + + Cerbo + + ) : installation.device === 2 ? ( + + Venus + + ) : ( + + Device not specified + + )} +
+
+