Skip to content

Commit

Permalink
LDBR-3.24: Исправить баг с раздвоение челистов для свежей карточки (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgiyX authored Dec 1, 2021
1 parent a614caa commit cceb898
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/components/Footer/Footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
@import '../../styles/scss/Common';

/* Таблица стилей для компонента footer */

.footer {
background-color: $main-theme-secondary-color;
width: 100%;
Expand Down
13 changes: 6 additions & 7 deletions src/stores/BoardStore/BoardStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,9 @@ class BoardStore extends BaseStore {
case HttpStatusCodes.Ok:
newCheckList.chlid = payload.data.chlid;
context.checkLists.push(newCheckList);
this._getCardById(context.clid, context.cid).check_lists.push(newCheckList);
this._getCardById(context.clid, context.cid).check_lists.push(
JSON.parse(JSON.stringify(newCheckList)),
);
return;

default:
Expand All @@ -1126,11 +1128,7 @@ class BoardStore extends BaseStore {
* @private
*/
_editCheckList(data) {
const checkLists = this._storage.get('card-popup').checkLists;
const checkList = checkLists.find((checkList) => {
return checkList.chlid === data.chlid;
});
checkList.edit = true;
this._getCheckListById(data.chlid).edit = true;
}

/**
Expand Down Expand Up @@ -1238,7 +1236,7 @@ class BoardStore extends BaseStore {
checkList.check_list_items.push(newCheckListItem);
this._getCardById(context.clid, context.cid).check_lists.find((checkLst) => {
return checkLst.chlid === data.chlid;
}).check_list_items.push(newCheckListItem);
}).check_list_items.push(JSON.parse(JSON.stringify(newCheckListItem)));
return;

default:
Expand All @@ -1253,6 +1251,7 @@ class BoardStore extends BaseStore {
* @private
*/
_editCheckListItem(data) {
console.log('_editCheckListItem');
this._getCheckListItemById(data.chlid, data.chliid).edit = true;
}

Expand Down

0 comments on commit cceb898

Please sign in to comment.