Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-mng committed Sep 2, 2024
1 parent b4b7c05 commit 570e39b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/gmp/commands/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ export class UserCommand extends EntityCommand {
return this.httpPost({
cmd: 'save_my_settings',
text: data.timezone,
[PARAM_KEYS.DATE]: data.dateFormat,
[PARAM_KEYS.TIME]: data.timeFormat,
[PARAM_KEYS.DATE]: data.userInterfaceDateFormat,
[PARAM_KEYS.TIME]: data.userInterfaceTimeFormat,
old_password: data.oldPassword,
password: data.newPassword,
lang: data.userInterfaceLanguage,
Expand Down
8 changes: 3 additions & 5 deletions src/web/pages/overrides/detailspage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,9 @@ ToolBarIcons.propTypes = {
onOverrideEditClick: PropTypes.func.isRequired,
};

const Details = connect(rootState => {
return {
timezone: getTimezone(rootState),
};
})(({entity, timezone, ...props}) => {
const Details = connect(rootState => ({
timezone: getTimezone(rootState),
}))(({entity, timezone, ...props}) => {
const {nvt} = entity;
return (
<Layout flex="column">
Expand Down
10 changes: 0 additions & 10 deletions src/web/pages/usersettings/usersettingspage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,6 @@ class UserSettings extends React.Component {

const {userInterfaceLanguage = BROWSER_LANGUAGE, timezone} = data;

this.handleInteraction();
await gmp.user.saveSetting(
'd9857b7c-1159-4193-9bc0-18fae5473a69',
data.userInterfaceDateFormat,
);
await gmp.user.saveSetting(
'11deb7ff-550b-4950-aacf-06faeb7c61b9',
data.userInterfaceTimeFormat,
);

await gmp.user.saveSettings(data).then(() => {
this.closeDialog();
this.props.setLocale(
Expand Down

0 comments on commit 570e39b

Please sign in to comment.