Home Reference Source

application/redux/actions/assignment-view-actions.js


/**
 * Action types
 */
export const ASSIGNMENT_VIEW_UPDATE = 'ASSIGNMENT_VIEW_UPDATE';
export const ASSIGNMENT_VIEW_RESET = 'ASSIGNMENT_VIEW_RESET';
export const ASSIGNMENT_VIEW_NOTIFY_NEW = 'ASSIGNMENT_VIEW_NOTIFY_NEW';
export const ASSIGNMENT_VIEW_CLEAR_NEW = 'ASSIGNMENT_VIEW_CLEAR_NEW';

/**
 * Action creators
 */
export function assignmentViewUpdate(params = {}) {
    return function(dispatch, getState) {
        dispatch({
            type: ASSIGNMENT_VIEW_UPDATE,
            payload: params
        });
        return Promise.resolve();
    };
};

export function assignmentViewReset() {
    return function(dispatch, getState) {
        dispatch({
            type: ASSIGNMENT_VIEW_RESET,
            payload: {}
        });
        return Promise.resolve();
    };
}

export function assignmentViewNotifyNew() {
    return function(dispatch, getState) {
        dispatch({
            type: ASSIGNMENT_VIEW_NOTIFY_NEW,
            payload: {}
        });
        return Promise.resolve();
    };
}

export function assignmentViewClearNotify() {
    return function(dispatch, getState) {
        dispatch({
            type: ASSIGNMENT_VIEW_CLEAR_NEW,
            payload: {}
        });
        return Promise.resolve();
    };
}