client/src/actions/notesActions.js
changeset 29 4cfeabef7d5e
parent 26 930e486ad0a8
child 58 f16a080e0bc4
equal deleted inserted replaced
28:abf9f3ff2635 29:4cfeabef7d5e
     2 
     2 
     3 import * as types from '../constants/actionTypes';
     3 import * as types from '../constants/actionTypes';
     4 
     4 
     5 export const addNote = (session, data) => {
     5 export const addNote = (session, data) => {
     6   return {
     6   return {
     7     type: types.ADD_NOTE,
     7     type: types.ADD_NOTE_ASYNC,
     8     note: {
     8     note: {
     9       id: uuidV1(),
     9       _id: uuidV1(),
    10       session: session.id,
    10       session: session._id,
    11       raw: data.raw,
    11       raw: data.raw,
    12       plain: data.plain,
    12       plain: data.plain,
    13       html: data.html,
    13       html: data.html,
    14       startedAt: data.startedAt,
    14       startedAt: data.startedAt,
    15       finishedAt: data.finishedAt,
    15       finishedAt: data.finishedAt,
    16       categories: data.categories,
    16       categories: data.categories,
    17     }
    17     }
    18   };
    18   };
    19 }
    19 }
       
    20 
       
    21 export const loadNotesBySession = (session) => {
       
    22   return {
       
    23     type: types.LOAD_NOTES_BY_SESSION_ASYNC,
       
    24     session: session
       
    25   }
       
    26 }