From 97fa6d943c57a784a52462aaacb329ce93cf42d6 Mon Sep 17 00:00:00 2001
From: Herbert Eiselt <herbert.eiselt@highstreet-technologies.com>
Date: Wed, 3 Apr 2019 17:12:30 +0200
Subject: SDN-R odlux configuration

Add odlux configuration app

Change-Id: Ifecd3f6e1e3060a1fd1008f1f625a70cb2475a8a
Issue-ID: SDNC-584
Signed-off-by: Herbert Eiselt <herbert.eiselt@highstreet-technologies.com>
---
 .../odlux/apps/maintenanceApp/src/views/maintenenceView.tsx | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to 'sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx')

diff --git a/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx b/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
index 0a8ad4a59..b9ea8ffa1 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
+++ b/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
@@ -2,6 +2,9 @@ import * as React from 'react';
 
 import { Theme, createStyles, WithStyles, withStyles, Tooltip } from '@material-ui/core';
 
+import { faBan } from '@fortawesome/free-solid-svg-icons';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+
 import AddIcon from '@material-ui/icons/Add';
 import EditIcon from '@material-ui/icons/Edit';
 import RemoveIcon from '@material-ui/icons/RemoveCircleOutline';
@@ -94,12 +97,18 @@ class MaintenenceViewComponent extends React.Component<MaintenenceViewComponentP
         });
       }
     };
+    const now = new Date().valueOf();
     return (
       <>
         <MaintenenceEntriesTable asynchronus rows={this.props.maintenenceEntries} customActionButtons={[ addMaintenenceEntryAction ]} columns={
         [
-          { property: "mountId", title: "Mount Id", type: ColumnType.text },
-          { property: "active", title: "Active", type: ColumnType.boolean, labels: { "true": "active", "false": "not active" }, },
+            { property: "mountId", title: "Mount Id", type: ColumnType.text },
+            {
+              property: "notifications", title: "Notification", width: 50, align: "center", type: ColumnType.custom, customControl: ({ rowData }) => (
+                rowData.active && (Date.parse(rowData.start).valueOf() <= now) && (Date.parse(rowData.end).valueOf() >= now) && <FontAwesomeIcon icon={faBan} /> || null
+              )
+            },
+          { property: "active", title: "Activation State", type: ColumnType.boolean, labels: { "true": "active", "false": "not active" }, },
           { property: "start", title: "Start Date", type: ColumnType.text },
           { property: "end", title: "End Date", type: ColumnType.text },
           { property: "actions", title: "Actions", type: ColumnType.custom, customControl : ({ rowData })=>(
-- 
cgit 1.2.3-korg

