diff --git a/client/src/components/Widgets/AlertChanges.jsx b/client/src/components/Widgets/AlertChanges.jsx index 5b84f40..0f50da8 100644 --- a/client/src/components/Widgets/AlertChanges.jsx +++ b/client/src/components/Widgets/AlertChanges.jsx @@ -234,6 +234,13 @@ export default function AlertChanges({ settings, widgetID }) { + + {volcano[1][0]?.change_type === "increase" ? ( + + ) : ( + + )} + {volcano[1][0]?.alert_level_name} - - {volcano[1][0]?.change_type === "increase" ? ( - - ) : ( - - )} - @@ -270,18 +270,13 @@ export default function AlertChanges({ settings, widgetID }) { - {object?.alert_scheme_domain === - "terrestrial" && } - {object?.alert_scheme_domain === "aviation" && ( - - )} - {object?.alert_scheme_domain === "maritime" && ( - - )} + {object?.alert_scheme_domain === "terrestrial" && } + {object?.alert_scheme_domain === "aviation" && } + {object?.alert_scheme_domain === "maritime" && } - - Alert Scale:{" "} + + Alert Scale: {Array.from( { length: Number(object?.alert_scheme_highest) - - Number(object?.alert_scheme_lowest) + - 1, + Number(object?.alert_scheme_lowest) + 1, }, - (v, i) => - Number(object?.alert_scheme_lowest) + i, + (v, i) => Number(object?.alert_scheme_lowest) + i ).map((num) => (
- {item.volcano_name} + {item.volcano_name} {item.send_time} @@ -112,31 +112,33 @@ export default function IvansAlerts({ settings, widgetID }) { {/* This box needs to be at h="100%" for the pdf toolbar to appear */} - Preparer: {item?.preparer} + Preparer: {item?.preparer} {item?.summary} {item?.files?.map((file, index) => { return ( - - {file?.name} - - - Open - - + + + + File: {file?.name} + + + {/**/} + {/* Open*/} + {/**/} - - + + Your browser cannot display this PDF directly. - - Download PDF + + Download PDF Instead diff --git a/client/src/components/Widgets/settings/AlertChangeSettings.jsx b/client/src/components/Widgets/settings/AlertChangeSettings.jsx index 0c2a090..34340fd 100644 --- a/client/src/components/Widgets/settings/AlertChangeSettings.jsx +++ b/client/src/components/Widgets/settings/AlertChangeSettings.jsx @@ -41,11 +41,11 @@ export default function AlertChangeSettings({ widgetId, currentSettings }) { } return ( - + {/* SELECTING DATE RANGE */} - + Date Range Selection @@ -62,7 +62,7 @@ export default function AlertChangeSettings({ widgetId, currentSettings }) { align="center" justify="center" > - + Start Date @@ -103,7 +103,7 @@ export default function AlertChangeSettings({ widgetId, currentSettings }) { align="center" justify="center" > - + End Date diff --git a/client/src/components/Widgets/settings/IvansAlertsSettings.jsx b/client/src/components/Widgets/settings/IvansAlertsSettings.jsx index a4915f7..924caa2 100644 --- a/client/src/components/Widgets/settings/IvansAlertsSettings.jsx +++ b/client/src/components/Widgets/settings/IvansAlertsSettings.jsx @@ -1,4 +1,4 @@ -import {Button, Field, Flex, Input, Switch, Text} from "@chakra-ui/react"; +import {Button, Field, Flex, Input, Switch, Text, Fieldset, CheckboxCard} from "@chakra-ui/react"; import {useDashboardStore} from "../../../store/useDashboardStore.jsx"; import {useState} from "react"; @@ -20,89 +20,177 @@ export default function IvansAlertsSettings({ widgetId, currentSettings }) { } return ( - - {/* COPY TO CLIPBOARD */} - - - {/* SORTS */} - - - - - - Sort Oldest to Newest - - - - - - - Sort by Volcano - - - {/* SELECTING DATE RANGE */} - - - - - Start Date - - - { - const value = e.target.value; - updateSettings(widgetId, {...currentSettings, startDate: value}); - - const dateSelected = new Date(value); - const today = new Date(); - today.setHours(0, 0, 0, 0); - - if (value && (dateSelected > today)) setStartError("Can't Choose a Future Date"); - else setStartError(""); - }} - /> - {startError && {startError}} + + + + {/* SELECTING DATE RANGE */} + + + + Date Range Selection + +
{/*line seperator*/}
-
-
- - - - End Date - - - + { - const value = e.target.value; - updateSettings(widgetId, {...currentSettings, endDate: value}); + h="100%" + align="center" + justify="center" + > + + Start Date + + + { + const value = e.target.value; + updateSettings(widgetId, { + ...currentSettings, + startDate: value, + }); - const dateSelected = new Date(value); - const today = new Date(); - today.setHours(0, 0, 0, 0); + const dateSelected = new Date(value); + const today = new Date(); + today.setHours(0, 0, 0, 0); - if (value && (dateSelected > today)) setEndError("Can't Choose a Future Date"); - else setEndError(""); - }} - /> - {endError && {endError}} - + if (value && dateSelected > today) + setStartError("Can't Choose a Future Date"); + else setStartError(""); + }} + /> + {startError && ( + {startError} + )} + + + + + {/* end date */} + + + + End Date + + + { + const value = e.target.value; + updateSettings(widgetId, { + ...currentSettings, + endDate: value, + }); + + const dateSelected = new Date(value); + const today = new Date(); + today.setHours(0, 0, 0, 0); + + if (value && dateSelected > today) + setEndError("Can't Choose a Future Date"); + else setEndError(""); + }} + /> + {endError && {endError}} + + +
- -
+ + {/* SORTS */} + + + Sorts + +
{/*line seperator*/} +
+ + {/* time sort */} + + + + + + Oldest to Newest + + + {/* alphabetic sort */} + + + + + + Alphabetically by Volcano + + + + + Filters + +
{/*line seperator*/} +
+ + {/* elevated levels */} + { + updateSettings(widgetId, { + ...currentSettings, + filters: { + ...currentSettings.filters, + elevatedLevels: e.checked, + }, + }); + }} + > + + + + + Only Elevated Levels + + + + + + + {/* COPY TO CLIPBOARD */} + + + Tools + +
{/*line seperator*/} + +
+
+
) -} \ No newline at end of file +} diff --git a/client/src/constants/widgetRegistry.jsx b/client/src/constants/widgetRegistry.jsx index 1ce5689..3e23338 100644 --- a/client/src/constants/widgetRegistry.jsx +++ b/client/src/constants/widgetRegistry.jsx @@ -63,7 +63,6 @@ export const WIDGET_REGISTRY = { }, allowedSizes: { small: { w: 3, h: 6 }, - medium: { w: 3, h: 9 }, large: { w: 3, h: 12 }, } }, @@ -85,7 +84,6 @@ export const WIDGET_REGISTRY = { }, allowedSizes: { small: { w: 3, h: 6 }, - medium: { w: 3, h: 9 }, large: { w: 3, h: 12 }, } }, @@ -186,7 +184,7 @@ export const WIDGET_REGISTRY = { endDate: getEndDate(), }, allowedSizes: { - medium: { w: 3, h: 12 }, + large: { w: 3, h: 12 }, } },