Fix collection edit #424
2 changed files with 21 additions and 4 deletions
11
dist/bundle.es.js
vendored
11
dist/bundle.es.js
vendored
|
@ -7718,8 +7718,15 @@ const collectionsReducer = handleActions({
|
||||||
|
|
||||||
[COLLECTION_PENDING]: (state, action) => {
|
[COLLECTION_PENDING]: (state, action) => {
|
||||||
const { localId, claimId } = action.data;
|
const { localId, claimId } = action.data;
|
||||||
const { edited: editList, unpublished: unpublishedList, pending: pendingList } = state;
|
const {
|
||||||
|
resolved: resolvedList,
|
||||||
|
edited: editList,
|
||||||
|
unpublished: unpublishedList,
|
||||||
|
pending: pendingList
|
||||||
|
} = state;
|
||||||
|
|
||||||
const newEditList = Object.assign({}, editList);
|
const newEditList = Object.assign({}, editList);
|
||||||
|
const newResolvedList = Object.assign({}, resolvedList);
|
||||||
const newUnpublishedList = Object.assign({}, unpublishedList);
|
const newUnpublishedList = Object.assign({}, unpublishedList);
|
||||||
const newPendingList = Object.assign({}, pendingList);
|
const newPendingList = Object.assign({}, pendingList);
|
||||||
|
|
||||||
|
@ -7729,7 +7736,7 @@ const collectionsReducer = handleActions({
|
||||||
delete newUnpublishedList[localId];
|
delete newUnpublishedList[localId];
|
||||||
} else {
|
} else {
|
||||||
// edit update
|
// edit update
|
||||||
newPendingList[claimId] = Object.assign({}, newEditList[claimId]);
|
newPendingList[claimId] = Object.assign({}, newEditList[claimId] || newResolvedList[claimId]);
|
||||||
delete newEditList[claimId];
|
delete newEditList[claimId];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,8 +90,15 @@ const collectionsReducer = handleActions(
|
||||||
|
|
||||||
[ACTIONS.COLLECTION_PENDING]: (state, action) => {
|
[ACTIONS.COLLECTION_PENDING]: (state, action) => {
|
||||||
const { localId, claimId } = action.data;
|
const { localId, claimId } = action.data;
|
||||||
const { edited: editList, unpublished: unpublishedList, pending: pendingList } = state;
|
const {
|
||||||
|
resolved: resolvedList,
|
||||||
|
edited: editList,
|
||||||
|
unpublished: unpublishedList,
|
||||||
|
pending: pendingList,
|
||||||
|
} = state;
|
||||||
|
|
||||||
const newEditList = Object.assign({}, editList);
|
const newEditList = Object.assign({}, editList);
|
||||||
|
const newResolvedList = Object.assign({}, resolvedList);
|
||||||
const newUnpublishedList = Object.assign({}, unpublishedList);
|
const newUnpublishedList = Object.assign({}, unpublishedList);
|
||||||
const newPendingList = Object.assign({}, pendingList);
|
const newPendingList = Object.assign({}, pendingList);
|
||||||
|
|
||||||
|
@ -101,7 +108,10 @@ const collectionsReducer = handleActions(
|
||||||
delete newUnpublishedList[localId];
|
delete newUnpublishedList[localId];
|
||||||
} else {
|
} else {
|
||||||
// edit update
|
// edit update
|
||||||
newPendingList[claimId] = Object.assign({}, newEditList[claimId]);
|
newPendingList[claimId] = Object.assign(
|
||||||
|
{},
|
||||||
|
newEditList[claimId] || newResolvedList[claimId]
|
||||||
|
);
|
||||||
delete newEditList[claimId];
|
delete newEditList[claimId];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue