Allow issue creation via UI

This commit is contained in:
2019-12-05 22:37:09 +01:00
parent d510116c4b
commit a7297e3d12
17 changed files with 310 additions and 51 deletions

View File

@ -1,7 +1,7 @@
import { select, put } from 'redux-saga/effects';
import { fetchIssues, addLabel, removeLabel } from '../actions/issues';
import { fetchIssuesSaga } from './issues';
import { BUILD_KANBOARD_SUCCESS } from '../actions/kanboards';
import { BUILD_KANBOARD_SUCCESS, buildKanboard } from '../actions/kanboards';
export function* moveCardSaga(action) {
const {
@ -30,7 +30,6 @@ export function* moveCardSaga(action) {
}
export function* buildKanboardSaga(action) {
const { board } = action;
let kanboard;
@ -50,7 +49,18 @@ export function* buildKanboardSaga(action) {
}
yield put({ type: BUILD_KANBOARD_SUCCESS, kanboard });
}
export function* refreshKanboardSaga(action) {
const { project } = action;
const boards = yield select(state => state.boards);
const boardValues = Object.values(boards.byID);
for (let b, i = 0; (b = boardValues[i]); i++) {
const hasProject = b.projects.indexOf(project) !== -1;
if (!hasProject) continue;
yield put(buildKanboard(b));
}
}
function createCards(projects, issues, lane) {