aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/MaintenancePage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/settings/MaintenancePage.js')
-rw-r--r--modern/src/settings/MaintenancePage.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/modern/src/settings/MaintenancePage.js b/modern/src/settings/MaintenancePage.js
index c157ff48..a612abb7 100644
--- a/modern/src/settings/MaintenancePage.js
+++ b/modern/src/settings/MaintenancePage.js
@@ -94,10 +94,11 @@ const MaintenancePage = () => {
return value;
};
+ const validate = () => item && item.name && item.type && item.start && item.period;
+
return (
- <EditItemView endpoint="maintenance" item={item} setItem={setItem}>
- {item
- && (
+ <EditItemView endpoint="maintenance" item={item} setItem={setItem} validate={validate}>
+ {item && (
<>
<Accordion defaultExpanded>
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
@@ -163,7 +164,7 @@ const MaintenancePage = () => {
</AccordionDetails>
</Accordion>
</>
- )}
+ )}
</EditItemView>
);
};