Change id generation algorithm, display notifications total on the main page
This commit is contained in:
@@ -2,15 +2,9 @@ import { call, put, select } from 'redux-saga/effects';
|
||||
|
||||
import { goToBoardService, goToProjectService } from './router';
|
||||
import { createBoardRequest, deleteBoardRequest, updateBoardRequest } from '../requests';
|
||||
import {
|
||||
boardByIdSelector,
|
||||
maxIdSelector,
|
||||
nextBoardPositionSelector,
|
||||
pathSelector,
|
||||
} from '../../../selectors';
|
||||
import { boardByIdSelector, nextBoardPositionSelector, pathSelector } from '../../../selectors';
|
||||
import { createBoard, deleteBoard, updateBoard } from '../../../actions';
|
||||
import { nextLocalId } from '../../../utils/local-id';
|
||||
import { Board } from '../../../models';
|
||||
import { createLocalId } from '../../../utils/local-id';
|
||||
|
||||
export function* createBoardService(projectId, data) {
|
||||
const nextData = {
|
||||
@@ -18,7 +12,7 @@ export function* createBoardService(projectId, data) {
|
||||
position: yield select(nextBoardPositionSelector, projectId),
|
||||
};
|
||||
|
||||
const localId = nextLocalId(yield select(maxIdSelector, Board.modelName));
|
||||
const localId = yield call(createLocalId);
|
||||
|
||||
yield put(
|
||||
createBoard({
|
||||
|
||||
@@ -2,10 +2,9 @@ import { call, put, select } from 'redux-saga/effects';
|
||||
|
||||
import { goToBoardService } from './router';
|
||||
import { createCardRequest, deleteCardRequest, updateCardRequest } from '../requests';
|
||||
import { maxIdSelector, nextCardPositionSelector, pathSelector } from '../../../selectors';
|
||||
import { nextCardPositionSelector, pathSelector } from '../../../selectors';
|
||||
import { createCard, deleteCard, updateCard } from '../../../actions';
|
||||
import { nextLocalId } from '../../../utils/local-id';
|
||||
import { Card } from '../../../models';
|
||||
import { createLocalId } from '../../../utils/local-id';
|
||||
|
||||
export function* createCardService(listId, data) {
|
||||
const nextData = {
|
||||
@@ -13,7 +12,7 @@ export function* createCardService(listId, data) {
|
||||
position: yield select(nextCardPositionSelector, listId),
|
||||
};
|
||||
|
||||
const localId = nextLocalId(yield select(maxIdSelector, Card.modelName));
|
||||
const localId = yield call(createLocalId);
|
||||
|
||||
yield put(
|
||||
createCard({
|
||||
|
||||
@@ -5,14 +5,13 @@ import {
|
||||
deleteCommentActionRequest,
|
||||
updateCommentActionRequest,
|
||||
} from '../requests';
|
||||
import { currentUserIdSelector, maxIdSelector, pathSelector } from '../../../selectors';
|
||||
import { currentUserIdSelector, pathSelector } from '../../../selectors';
|
||||
import { createCommentAction, deleteCommentAction, updateCommentAction } from '../../../actions';
|
||||
import { nextLocalId } from '../../../utils/local-id';
|
||||
import { Action } from '../../../models';
|
||||
import { createLocalId } from '../../../utils/local-id';
|
||||
import { ActionTypes } from '../../../constants/Enums';
|
||||
|
||||
export function* createCommentActionService(cardId, data) {
|
||||
const localId = nextLocalId(yield select(maxIdSelector, Action.modelName));
|
||||
const localId = yield call(createLocalId);
|
||||
const userId = yield select(currentUserIdSelector);
|
||||
|
||||
yield put(
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
deleteLabelRequest,
|
||||
updateLabelRequest,
|
||||
} from '../requests';
|
||||
import { maxIdSelector, pathSelector } from '../../../selectors';
|
||||
import { pathSelector } from '../../../selectors';
|
||||
import {
|
||||
addLabelToBoardFilter,
|
||||
addLabelToCard,
|
||||
@@ -17,11 +17,10 @@ import {
|
||||
removeLabelFromCard,
|
||||
updateLabel,
|
||||
} from '../../../actions';
|
||||
import { nextLocalId } from '../../../utils/local-id';
|
||||
import { Label } from '../../../models';
|
||||
import { createLocalId } from '../../../utils/local-id';
|
||||
|
||||
export function* createLabelService(boardId, data) {
|
||||
const localId = nextLocalId(yield select(maxIdSelector, Label.modelName));
|
||||
const localId = yield call(createLocalId);
|
||||
|
||||
yield put(
|
||||
createLabel({
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
import { call, put, select } from 'redux-saga/effects';
|
||||
|
||||
import { createListRequest, deleteListRequest, updateListRequest } from '../requests';
|
||||
import {
|
||||
listByIdSelector,
|
||||
maxIdSelector,
|
||||
nextListPositionSelector,
|
||||
pathSelector,
|
||||
} from '../../../selectors';
|
||||
import { listByIdSelector, nextListPositionSelector, pathSelector } from '../../../selectors';
|
||||
import { createList, deleteList, updateList } from '../../../actions';
|
||||
import { nextLocalId } from '../../../utils/local-id';
|
||||
import { List } from '../../../models';
|
||||
import { createLocalId } from '../../../utils/local-id';
|
||||
|
||||
export function* createListService(boardId, data) {
|
||||
const nextData = {
|
||||
@@ -17,7 +11,7 @@ export function* createListService(boardId, data) {
|
||||
position: yield select(nextListPositionSelector, boardId),
|
||||
};
|
||||
|
||||
const localId = nextLocalId(yield select(maxIdSelector, List.modelName));
|
||||
const localId = yield call(createLocalId);
|
||||
|
||||
yield put(
|
||||
createList({
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { call, put, select } from 'redux-saga/effects';
|
||||
|
||||
import { createProjectMembershipRequest, deleteProjectMembershipRequest } from '../requests';
|
||||
import { maxIdSelector, pathSelector } from '../../../selectors';
|
||||
import { pathSelector } from '../../../selectors';
|
||||
import { createProjectMembership, deleteProjectMembership } from '../../../actions';
|
||||
import { nextLocalId } from '../../../utils/local-id';
|
||||
import { ProjectMembership } from '../../../models';
|
||||
import { createLocalId } from '../../../utils/local-id';
|
||||
|
||||
export function* createProjectMembershipService(projectId, data) {
|
||||
const localId = nextLocalId(yield select(maxIdSelector, ProjectMembership.modelName));
|
||||
const localId = yield call(createLocalId);
|
||||
|
||||
yield put(
|
||||
createProjectMembership({
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { call, put, select } from 'redux-saga/effects';
|
||||
|
||||
import { createTaskRequest, deleteTaskRequest, updateTaskRequest } from '../requests';
|
||||
import { maxIdSelector, pathSelector } from '../../../selectors';
|
||||
import { pathSelector } from '../../../selectors';
|
||||
import { createTask, deleteTask, updateTask } from '../../../actions';
|
||||
import { nextLocalId } from '../../../utils/local-id';
|
||||
import { Task } from '../../../models';
|
||||
import { createLocalId } from '../../../utils/local-id';
|
||||
|
||||
export function* createTaskService(cardId, data) {
|
||||
const localId = nextLocalId(yield select(maxIdSelector, Task.modelName));
|
||||
const localId = yield call(createLocalId);
|
||||
|
||||
yield put(
|
||||
createTask({
|
||||
|
||||
Reference in New Issue
Block a user