mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
various small fixes
This commit is contained in:
parent
7bf856fd1e
commit
56129faa78
5 changed files with 11 additions and 5 deletions
|
@ -4,8 +4,6 @@ import PropTypes from 'prop-types';
|
||||||
import { IntlProvider, intlShape} from 'meteor/vulcan:i18n';
|
import { IntlProvider, intlShape} from 'meteor/vulcan:i18n';
|
||||||
import withCurrentUser from '../containers/withCurrentUser.js';
|
import withCurrentUser from '../containers/withCurrentUser.js';
|
||||||
|
|
||||||
import { FormattedMessage } from 'meteor/vulcan:i18n';
|
|
||||||
|
|
||||||
class App extends PureComponent {
|
class App extends PureComponent {
|
||||||
|
|
||||||
getLocale() {
|
getLocale() {
|
||||||
|
|
|
@ -35,6 +35,7 @@ export default function withMutation({name, args}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return graphql(gql`${mutation}`, {
|
return graphql(gql`${mutation}`, {
|
||||||
|
alias: 'withMutation',
|
||||||
props: ({ownProps, mutate}) => ({
|
props: ({ownProps, mutate}) => ({
|
||||||
[name]: (vars) => {
|
[name]: (vars) => {
|
||||||
return mutate({
|
return mutate({
|
||||||
|
|
|
@ -9,6 +9,13 @@ class DateTime extends PureComponent {
|
||||||
this.updateDate = this.updateDate.bind(this);
|
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) {
|
updateDate(date) {
|
||||||
this.context.updateCurrentValues({[this.props.name]: date});
|
this.context.updateCurrentValues({[this.props.name]: date});
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ const FormattedMessage = ({ id, values, defaultMessage }) => {
|
||||||
message = message.replace(`{${key}}`, value);
|
message = message.replace(`{${key}}`, value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return <span className="i18n-message">{messages[id]}</span>
|
return <span className="i18n-message">{message}</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
export default FormattedMessage;
|
export default FormattedMessage;
|
|
@ -1,4 +1,4 @@
|
||||||
import { GraphQLSchema, Utils } from 'meteor/vulcan:core';
|
import { addGraphQLResolvers, Utils } from 'meteor/vulcan:core';
|
||||||
import Users from 'meteor/vulcan:users';
|
import Users from 'meteor/vulcan:users';
|
||||||
|
|
||||||
const specificResolvers = {
|
const specificResolvers = {
|
||||||
|
@ -16,7 +16,7 @@ const specificResolvers = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
GraphQLSchema.addResolvers(specificResolvers);
|
addGraphQLResolvers(specificResolvers);
|
||||||
|
|
||||||
const resolvers = {
|
const resolvers = {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue