Permalink
Browse files

Simplify pilot rank constant definition

  • Loading branch information...
markerikson committed Dec 29, 2017
1 parent 51377a7 commit 02bd796893902ebc7208134735257101605d8e8e
Showing with 14 additions and 10 deletions.
  1. +2 −9 src/features/pilots/PilotDetails/PilotDetails.jsx
  2. +12 −1 src/features/pilots/pilotsConstants.js
@@ -8,6 +8,7 @@ import {getEditingEntitiesSession} from "features/editing/editingSelectors";
import FormEditWrapper from "common/components/FormEditWrapper";
import {selectCurrentPilot, selectIsEditingPilot} from "../pilotsSelectors";
import {PILOT_RANKS} from "../pilotsConstants";
import {
startEditingPilot,
@@ -24,15 +25,7 @@ import {editItemAttributes} from "features/editing/editingActions";
import {getValueFromEvent} from "common/utils/clientUtils";
const RANKS = [
{value: "Private", text : "Private"},
{value: "Corporal", text : "Corporal"},
{value: "Sergeant", text : "Sergeant"},
{value: "Lieutenant", text : "Lieutenant"},
{value: "Captain", text : "Captain"},
{value: "Major", text : "Major"},
{value: "Colonel", text : "Colonel"},
];
const RANKS = PILOT_RANKS.map(rank => ({value : rank, text : rank}));
const SKILL_VALUES = [
{value : 0, text : 0},
@@ -1,3 +1,14 @@
export const PILOT_SELECT = "PILOT_SELECT";
export const PILOT_EDIT_START = "PILOT_EDIT_START";
export const PILOT_EDIT_STOP = "PILOT_EDIT_STOP";
export const PILOT_EDIT_STOP = "PILOT_EDIT_STOP";
export const PILOT_RANKS = [
"Private",
"Corporal",
"Sergeant",
"Lieutenant",
"Captain",
"Major",
"Colonel",
];

0 comments on commit 02bd796

Please sign in to comment.