mirror of
https://github.com/wekan/wekan.git
synced 2026-02-04 07:31:47 +01:00
Fix removed setters and getters
This commit is contained in:
parent
53c0a52788
commit
e55d7e4f72
2 changed files with 56 additions and 11 deletions
|
|
@ -88,7 +88,6 @@ Cards.attachSchema(new SimpleSchema({
|
|||
type: String,
|
||||
optional: true,
|
||||
defaultValue: '',
|
||||
|
||||
},
|
||||
assignedBy: {
|
||||
type: String,
|
||||
|
|
@ -769,6 +768,52 @@ Cards.helpers({
|
|||
return this.archived;
|
||||
}
|
||||
},
|
||||
|
||||
setRequestedBy(requestedBy) {
|
||||
if (this.isLinkedCard()) {
|
||||
return Cards.update(
|
||||
{ _id: this.linkedId },
|
||||
{$set: {requestedBy}}
|
||||
);
|
||||
} else {
|
||||
return Cards.update(
|
||||
{_id: this._id},
|
||||
{$set: {requestedBy}}
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
getRequestedBy() {
|
||||
if (this.isLinkedCard()) {
|
||||
const card = Cards.findOne({ _id: this.linkedId });
|
||||
return card.requestedBy;
|
||||
} else {
|
||||
return this.requestedBy;
|
||||
}
|
||||
},
|
||||
|
||||
setAssignedBy(assignedBy) {
|
||||
if (this.isLinkedCard()) {
|
||||
return Cards.update(
|
||||
{ _id: this.linkedId },
|
||||
{$set: {assignedBy}}
|
||||
);
|
||||
} else {
|
||||
return Cards.update(
|
||||
{_id: this._id},
|
||||
{$set: {assignedBy}}
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
getAssignedBy() {
|
||||
if (this.isLinkedCard()) {
|
||||
const card = Cards.findOne({ _id: this.linkedId });
|
||||
return card.assignedBy;
|
||||
} else {
|
||||
return this.assignedBy;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Cards.mutations({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue