Skip to content

Commit

Permalink
Fix editApp appType
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Oct 5, 2017
1 parent 5f91fb8 commit bd2c3f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions app/src/components/form/EditAppForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import MenuItem from "material-ui/MenuItem";
import * as formUtils from "./ReduxFormUtils";
import { Field, reduxForm, Form } from "redux-form";
import { validateURL } from "./ReduxFormUtils";
const appTypes = [
{ value: "APP_STANDARD", label: "Standard" },
{ value: "APP_DASHBOARD", label: "Dashboard" },
{ value: "APP_TRACKER_DASHBOARD", label: "Tracker Dashboard" }
];
import config from "../../config";

const appTypes = Object.keys(config.ui.appTypeToDisplayName).map(key => ({
value: key,
label: config.ui.appTypeToDisplayName[key]
}));

const validate = values => {
const errors = {};
Expand Down Expand Up @@ -69,13 +70,13 @@ const EditForm = props => {
return props.submitted({ data });
};

const menuItems = appTypes.map((type, i) =>
const menuItems = appTypes.map((type, i) => (
<MenuItem
key={type.value}
value={type.value}
primaryText={type.label}
/>
);
));

return (
<Form onSubmit={handleSubmit(onSub)}>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "appstore-app",
"version": "1.1.1",
"version": "1.1.2",
"main": "index.js",
"license": "BSD-3-Clause",
"scripts": {
Expand Down

0 comments on commit bd2c3f8

Please sign in to comment.