Skip to content

Commit bc21015

Browse files
authored
small refactor on settings workflow history container (#274)
1 parent b5adf41 commit bc21015

File tree

7 files changed

+32
-8
lines changed

7 files changed

+32
-8
lines changed

client/containers/settings-workflow-history/connector.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
// THE SOFTWARE.
2121

2222
import { connect } from 'vuex-connect';
23-
import { SETTINGS_WORKFLOW_HISTORY_IS_SUBMIT_ENABLED } from './getterTypes';
23+
import { SETTINGS_WORKFLOW_HISTORY_IS_SUBMIT_ENABLED } from './getter-types';
2424
import {
2525
SETTINGS_WORKFLOW_HISTORY_ON_CHANGE_VALUE,
2626
SETTINGS_WORKFLOW_HISTORY_ON_MOUNTED,
2727
SETTINGS_WORKFLOW_HISTORY_ON_SUBMIT,
28-
} from './mutationTypes';
28+
} from './mutation-types';
2929

3030
const gettersToProps = {
3131
isSubmitEnabled: SETTINGS_WORKFLOW_HISTORY_IS_SUBMIT_ENABLED,
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright (c) 2021 Uber Technologies Inc.
2+
//
3+
//
4+
// Permission is hereby granted, free of charge, to any person obtaining a copy
5+
// of this software and associated documentation files (the "Software"), to deal
6+
// in the Software without restriction, including without limitation the rights
7+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
// copies of the Software, and to permit persons to whom the Software is
9+
// furnished to do so, subject to the following conditions:
10+
//
11+
// The above copyright notice and this permission notice shall be included in
12+
// all copies or substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
// THE SOFTWARE.
21+
22+
const getDefaultState = (state = {}) => ({
23+
graphEnabled: true,
24+
...state,
25+
});
26+
27+
export default getDefaultState;

client/containers/settings-workflow-history/getterTypes.js renamed to client/containers/settings-workflow-history/getter-types.js

File renamed without changes.

client/containers/settings-workflow-history/getters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// THE SOFTWARE.
2121

2222
import { SUBMIT_CHANGE_KEYS } from './constants';
23-
import { SETTINGS_WORKFLOW_HISTORY_IS_SUBMIT_ENABLED } from './getterTypes';
23+
import { SETTINGS_WORKFLOW_HISTORY_IS_SUBMIT_ENABLED } from './getter-types';
2424

2525
const getters = {
2626
[SETTINGS_WORKFLOW_HISTORY_IS_SUBMIT_ENABLED]: ({

client/containers/settings-workflow-history/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@
2121

2222
import Component from './component';
2323
import Connector from './connector';
24+
import getDefaultState from './get-default-state';
2425
import getters from './getters';
2526
import mutations from './mutations';
2627

27-
const getDefaultState = () => ({
28-
graphEnabled: true,
29-
});
30-
3128
const container = Connector('SettingsWorkflowHistory', Component);
3229

3330
export { container, getDefaultState, getters, mutations };

client/containers/settings-workflow-history/mutationTypes.js renamed to client/containers/settings-workflow-history/mutation-types.js

File renamed without changes.

client/containers/settings-workflow-history/mutations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
SETTINGS_WORKFLOW_HISTORY_ON_CHANGE_VALUE,
2424
SETTINGS_WORKFLOW_HISTORY_ON_MOUNTED,
2525
SETTINGS_WORKFLOW_HISTORY_ON_SUBMIT,
26-
} from './mutationTypes';
26+
} from './mutation-types';
2727

2828
const mutations = {
2929
[SETTINGS_WORKFLOW_HISTORY_ON_CHANGE_VALUE]: (state, { name, value }) => {

0 commit comments

Comments
 (0)