From 4dbe654290c3d1f6051ea9650549f7c254d321b4 Mon Sep 17 00:00:00 2001 From: Ashutosh Bishnoi Date: Thu, 4 Feb 2021 16:33:02 +0530 Subject: Initial Maintenance Screen --- modern/src/settings/MaintenancePage.js | 97 ++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 modern/src/settings/MaintenancePage.js (limited to 'modern/src/settings/MaintenancePage.js') diff --git a/modern/src/settings/MaintenancePage.js b/modern/src/settings/MaintenancePage.js new file mode 100644 index 00000000..8c4cdf40 --- /dev/null +++ b/modern/src/settings/MaintenancePage.js @@ -0,0 +1,97 @@ +import React, { useState } from 'react'; + +import t from '../common/localization'; +import EditItemView from '../EditItemView'; +import { Accordion, AccordionSummary, AccordionDetails, makeStyles, Typography, TextField, FormControl, InputLabel, MenuItem, Select, } from '@material-ui/core'; +import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; +import EditAttributesView from '../attributes/EditAttributesView'; +import positionAttributes from '../attributes/positionAttributes'; + +const useStyles = makeStyles(() => ({ + details: { + flexDirection: 'column', + }, +})); + +const MaintenancePage = () => { + const classes = useStyles(); + + const [item, setItem] = useState(); + + const options = []; + + Object.entries(positionAttributes).map(([key, value]) => { + if (value.type === 'number') { + options.push({ key, name: value.name, type: value.type }) + } + }); + + const handleChange = event => { + const newValue = event.target.value; + setItem({...item, type: newValue}); + } + + return ( + + {item && + <> + + }> + + {t('sharedRequired')} + + + + setItem({...item, name: event.target.value})} + label={t('sharedName')} + variant="filled" /> + + {t('sharedType')} + + + setItem({...item, start: event.target.value})} + label={t('maintenanceStart')} + variant="filled" /> + setItem({...item, period: event.target.value})} + label={t('maintenancePeriod')} + variant="filled" /> + + + + }> + + {t('sharedAttributes')} + + + + setItem({...item, attributes})} + definitions={{}} + /> + + + + } + + ); +} + +export default MaintenancePage; -- cgit v1.2.3