diff --git a/CHANGELOG.md b/CHANGELOG.md index cdd34a4c..dbc875db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,6 +71,7 @@ In this release, the schema version has changed from 27 to 28. ### Fixed +- Schedule display in the client settings after creating or updating. - Zero value in `querylog.size_memory` disables logging ([#6570]). - Non-anonymized IP addresses on the dashboard ([#6584]). - Maximum cache TTL requirement when editing minimum cache TTL in the Web UI diff --git a/client/src/components/Filters/Services/ScheduleForm/index.js b/client/src/components/Filters/Services/ScheduleForm/index.js index f7bf605b..e2de3c41 100644 --- a/client/src/components/Filters/Services/ScheduleForm/index.js +++ b/client/src/components/Filters/Services/ScheduleForm/index.js @@ -1,4 +1,4 @@ -import React, { useState, useMemo } from 'react'; +import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import PropTypes from 'prop-types'; import cn from 'classnames'; @@ -21,10 +21,7 @@ export const ScheduleForm = ({ const onModalOpen = () => setModalOpen(true); const onModalClose = () => setModalOpen(false); - const filteredScheduleKeys = useMemo(() => ( - schedule ? Object.keys(schedule).filter((v) => v !== 'time_zone') : [] - ), [schedule]); - + const filteredScheduleKeys = schedule ? Object.keys(schedule).filter((v) => v !== 'time_zone') : []; const scheduleMap = new Map(); filteredScheduleKeys.forEach((day) => scheduleMap.set(day, schedule[day])); diff --git a/client/src/components/Settings/Clients/Form.js b/client/src/components/Settings/Clients/Form.js index ba4ec4b3..8989ae6c 100644 --- a/client/src/components/Settings/Clients/Form.js +++ b/client/src/components/Settings/Clients/Form.js @@ -162,7 +162,7 @@ let Form = (props) => { const [activeTabLabel, setActiveTabLabel] = useState('settings'); const handleScheduleSubmit = (values) => { - change('blocked_services_schedule', values); + change('blocked_services_schedule', { ...values }); }; const tabs = {