mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51: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 withCurrentUser from '../containers/withCurrentUser.js';
|
||||
|
||||
import { FormattedMessage } from 'meteor/vulcan:i18n';
|
||||
|
||||
class App extends PureComponent {
|
||||
|
||||
getLocale() {
|
||||
|
|
|
@ -35,6 +35,7 @@ export default function withMutation({name, args}) {
|
|||
}
|
||||
|
||||
return graphql(gql`${mutation}`, {
|
||||
alias: 'withMutation',
|
||||
props: ({ownProps, mutate}) => ({
|
||||
[name]: (vars) => {
|
||||
return mutate({
|
||||
|
|
|
@ -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});
|
||||
}
|
||||
|
|
|
@ -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;
|
|
@ -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 = {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue