Passed
Push — master ( 9a73f0...7331d4 )
by Huu-Phat
01:50 queued 11s
created

cms/src/posts/state/actions.js

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 28
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 0
eloc 19
mnd 0
bc 0
fnc 0
dl 0
loc 28
ccs 8
cts 8
cp 1
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
1
import { createAction } from 'redux-actions'
2
import {
3
  CHANGE_PAGE,
4
  CHANGE_ROW_PER_PAGE,
5
  SET_ORDER,
6
  SET_ORDER_COLUMN,
7
  SET_SELECTED_POST,
8
  SELECT_ALL_POSTS,
9
  CLEAR_SELECTED,
10
  FETCH_POSTS
11
} from 'core/state/actionType'
12
import { toRequest } from 'core/state/utils'
13
14 3
export const changePage = createAction(CHANGE_PAGE)
15
16 3
export const changeRowsPerPage = createAction(CHANGE_ROW_PER_PAGE)
17
18 3
export const setOrder = createAction(SET_ORDER)
19
20 3
export const setOrderColumn = createAction(SET_ORDER_COLUMN)
21
22 3
export const setSelectedPost = createAction(SET_SELECTED_POST)
23
24 3
export const selectAllPosts = createAction(SELECT_ALL_POSTS)
25
26 3
export const clearSelected = createAction(CLEAR_SELECTED)
27
28
export const fetchPostSummary = createAction(toRequest(FETCH_POSTS))
29