-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2031 Trigger notification if a map is an old one asking for updating it #2039
Fix #2031 Trigger notification if a map is an old one asking for updating it #2039
Conversation
* @memberof actions.notifications | ||
* @returns {object} action | ||
*/ | ||
function dispatchAction(action) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's needed because we need to send custom action when the notification button has been toggled
@@ -0,0 +1,51 @@ | |||
const PropTypes = require('prop-types'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For new files, let's move this in the right place, please.
}; | ||
}; | ||
const action = dispatchAction(customAction); | ||
expect(action().type).toBe('CUSTOM_ACTION'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pass simple object. The thunks will be removed in the next future.
web/client/actions/security.js
Outdated
return (dispatch) => { | ||
AuthenticationAPI.login(username, password).then((response) => { | ||
return (dispatch, state) => { | ||
return AuthenticationAPI.login(username, password).then((response) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This refreshes can go easily in an epic. Doing it here can cause unwanted side effects.
You should monitor the login/logout actions to reload MapInfo, until you change page.
web/client/epics/automapupdate.js
Outdated
const canEdit = mapInfoLoaded.info && mapInfoLoaded.info.canEdit || false; | ||
let layers = mapConfigLoaded.config && mapConfigLoaded.config.map && mapConfigLoaded.config.map.layers && mapConfigLoaded.config.map.layers.filter((l) => l.type === 'wms' && l.group !== 'background') || []; | ||
const options = {bbox: true, search: true, dimensions: true, title: true}; | ||
return version < 2 && canEdit ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change title to false
See #2031
Added AutoMapUpdate plugin