All files / @docs/producer/store actions.js

75% Statements 9/12
100% Branches 0/0
50% Functions 3/6
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36    1x         1x         1x         1x         1x           1x              
import { POST_DOCUMENT, SET_PAGES, SET_PREVIEW_VISIBLE, SET_FILE_URI, RESOLVE_FILE, SET_LOADING } from './constants';
 
export const setLoading = loading => ({
  type: SET_LOADING,
  payload: { loading },
});
 
export const resolveFile = fileUri => ({
  type: RESOLVE_FILE,
  payload: { fileUri },
});
 
export const setPages = pages => ({
  type: SET_PAGES,
  payload: { pages },
});
 
export const setPreviewVisible = previewVisible => ({
  type: SET_PREVIEW_VISIBLE,
  payload: { previewVisible },
});
 
export const setFileUri = fileUri => ({
  type: SET_FILE_URI,
  payload: { fileUri },
});
 
 
export const postDocument = (pdfUri, docType, insuredNumber, insuredIndex) => ({
  type: POST_DOCUMENT,
  pdfUri,
  docType,
  insuredNumber,
  insuredIndex,
});