mirror of
https://github.com/plankanban/planka.git
synced 2025-07-31 11:09:43 +02:00
fix: Fix styles, refactoring
This commit is contained in:
parent
c4c6d738a5
commit
545b3d711d
20 changed files with 229 additions and 202 deletions
|
@ -20,9 +20,7 @@ export default class extends BaseModel {
|
|||
relatedName: 'ownCards',
|
||||
}),
|
||||
dueDate: attr(),
|
||||
dueCompleted: attr({
|
||||
getDefault: () => false,
|
||||
}),
|
||||
isDueDateCompleted: attr(),
|
||||
stopwatch: attr(),
|
||||
isSubscribed: attr({
|
||||
getDefault: () => false,
|
||||
|
@ -211,7 +209,16 @@ export default class extends BaseModel {
|
|||
if (payload.data.boardId && payload.data.boardId !== cardModel.boardId) {
|
||||
cardModel.deleteWithRelated();
|
||||
} else {
|
||||
cardModel.update(payload.data);
|
||||
cardModel.update({
|
||||
...payload.data,
|
||||
...(payload.data.dueDate === null && {
|
||||
isDueDateCompleted: null,
|
||||
}),
|
||||
...(payload.data.dueDate &&
|
||||
!cardModel.dueDate && {
|
||||
isDueDateCompleted: false,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -251,7 +258,7 @@ export default class extends BaseModel {
|
|||
'name',
|
||||
'description',
|
||||
'dueDate',
|
||||
'dueCompleted',
|
||||
'isDueDateCompleted',
|
||||
'stopwatch',
|
||||
]),
|
||||
...payload.card,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue