parent
82e4f73c1f
commit
34db8947b6
@ -1,7 +1,13 @@
|
||||
import EntryActionTypes from '../../constants/EntryActionTypes';
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export const fetchActionsInCurrentCard = () => ({
|
||||
type: EntryActionTypes.ACTIONS_IN_CURRENT_CARD_FETCH,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
export const toggleActionsDetailsInCurrentCard = (isVisible) => ({
|
||||
type: EntryActionTypes.ACTIONS_DETAILS_IN_CURRENT_CARD_TOGGLE,
|
||||
payload: {
|
||||
isVisible,
|
||||
},
|
||||
});
|
||||
|
||||
@ -1,10 +1,19 @@
|
||||
import { takeEvery } from 'redux-saga/effects';
|
||||
import { all, takeEvery } from 'redux-saga/effects';
|
||||
|
||||
import { fetchActionsInCurrentCardService } from '../services';
|
||||
import {
|
||||
fetchActionsInCurrentCardService,
|
||||
toggleActionsDetailsInCurrentCardService,
|
||||
} from '../services';
|
||||
import EntryActionTypes from '../../../constants/EntryActionTypes';
|
||||
|
||||
export default function* actionsWatchers() {
|
||||
yield takeEvery(EntryActionTypes.ACTIONS_IN_CURRENT_CARD_FETCH, () =>
|
||||
fetchActionsInCurrentCardService(),
|
||||
);
|
||||
yield all([
|
||||
takeEvery(EntryActionTypes.ACTIONS_IN_CURRENT_CARD_FETCH, () =>
|
||||
fetchActionsInCurrentCardService(),
|
||||
),
|
||||
takeEvery(
|
||||
EntryActionTypes.ACTIONS_DETAILS_IN_CURRENT_CARD_TOGGLE,
|
||||
({ payload: { isVisible } }) => toggleActionsDetailsInCurrentCardService(isVisible),
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
module.exports.up = (knex) =>
|
||||
knex.schema.table('action', (table) => {
|
||||
/* Indexes */
|
||||
|
||||
table.index('type');
|
||||
});
|
||||
|
||||
module.exports.down = (knex) =>
|
||||
knex.schema.table('action', (table) => {
|
||||
table.dropIndex('type');
|
||||
});
|
||||
Loading…
Reference in New Issue