Skip to content

Commit

Permalink
Pull request: fix client schedule update
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit b3c6c20
Merge: dfd1eff 6dbeb5b
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Jan 16 13:31:45 2024 +0300

    Merge branch 'master' into ADG-7988

commit dfd1eff
Merge: 2de46aa f7995aa
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Jan 16 12:42:39 2024 +0300

    Merge branch 'master' into ADG-7988

commit 2de46aa
Merge: ac5a23c 1e0ff4d
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Jan 12 13:19:39 2024 +0300

    Merge branch 'master' into ADG-7988

commit ac5a23c
Author: Ildar Kamalov <ik@adguard.com>
Date:   Thu Jan 11 10:28:07 2024 +0300

    fix error

commit d0103f4
Author: Ildar Kamalov <ik@adguard.com>
Date:   Wed Jan 10 19:19:22 2024 +0300

    ADG-7988 fix client schedule update
  • Loading branch information
IldarKamalov committed Jan 17, 2024
1 parent 6dbeb5b commit 9694f19
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions client/src/components/Filters/Services/ScheduleForm/index.js
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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]));

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Settings/Clients/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 9694f19

Please sign in to comment.