various small fixes

This commit is contained in:
SachaG 2017-06-06 17:22:17 -07:00
parent 7bf856fd1e
commit 56129faa78
5 changed files with 11 additions and 5 deletions

View file

@ -4,8 +4,6 @@ import PropTypes from 'prop-types';
import { IntlProvider, intlShape} from 'meteor/vulcan:i18n';
import withCurrentUser from '../containers/withCurrentUser.js';
import { FormattedMessage } from 'meteor/vulcan:i18n';
class App extends PureComponent {
getLocale() {

View file

@ -35,6 +35,7 @@ export default function withMutation({name, args}) {
}
return graphql(gql`${mutation}`, {
alias: 'withMutation',
props: ({ownProps, mutate}) => ({
[name]: (vars) => {
return mutate({

View file

@ -9,6 +9,13 @@ class DateTime extends PureComponent {
this.updateDate = this.updateDate.bind(this);
}
// when the datetime picker has mounted, SmartForm will catch the date value (no formsy mixin in this component)
componentDidMount() {
if (this.props.value) {
this.updateDate(this.props.value);
}
}
updateDate(date) {
this.context.updateCurrentValues({[this.props.name]: date});
}

View file

@ -10,7 +10,7 @@ const FormattedMessage = ({ id, values, defaultMessage }) => {
message = message.replace(`{${key}}`, value);
});
}
return <span className="i18n-message">{messages[id]}</span>
return <span className="i18n-message">{message}</span>
}
export default FormattedMessage;

View file

@ -1,4 +1,4 @@
import { GraphQLSchema, Utils } from 'meteor/vulcan:core';
import { addGraphQLResolvers, Utils } from 'meteor/vulcan:core';
import Users from 'meteor/vulcan:users';
const specificResolvers = {
@ -16,7 +16,7 @@ const specificResolvers = {
}
};
GraphQLSchema.addResolvers(specificResolvers);
addGraphQLResolvers(specificResolvers);
const resolvers = {