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 | 3x 3x 2x 1x | import keyWrapper from '@bufferapp/keywrapper';
export const actionTypes = keyWrapper('REPORT', {
CREATE_REPORT: 'CREATE_REPORT',
ADD_TO_REPORT: 'ADD_TO_REPORT',
});
export const actions = {
createReport(name, chartId, state = {}) {
return {
type: actionTypes.CREATE_REPORT,
name,
state,
chart_id: chartId,
};
},
addToReport(id, chartId, state = {}) {
return {
type: actionTypes.ADD_TO_REPORT,
state,
chart_id: chartId,
reportId: id,
};
},
};
|