mirror of
https://github.com/wekan/wekan.git
synced 2026-01-14 13:38:51 +01:00
34 lines
724 B
JavaScript
34 lines
724 B
JavaScript
import { ReactiveCache } from '/imports/reactiveCache';
|
|
|
|
Meteor.methods({
|
|
copySwimlane(swimlaneId, toBoardId) {
|
|
check(swimlaneId, String);
|
|
check(toBoardId, String);
|
|
|
|
const swimlane = Swimlanes.findOne(swimlaneId);
|
|
const toBoard = ReactiveCache.getBoard(toBoardId);
|
|
|
|
if (swimlane && toBoard) {
|
|
swimlane.copy(toBoardId);
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
},
|
|
|
|
moveSwimlane(swimlaneId, toBoardId) {
|
|
check(swimlaneId, String);
|
|
check(toBoardId, String);
|
|
|
|
const swimlane = Swimlanes.findOne(swimlaneId);
|
|
const toBoard = ReactiveCache.getBoard(toBoardId);
|
|
|
|
if (swimlane && toBoard) {
|
|
swimlane.move(toBoardId);
|
|
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
},
|
|
});
|