wekan/server/publications/swimlanes.js

37 lines
776 B
JavaScript
Raw Permalink Normal View History

import { ReactiveCache } from '/imports/reactiveCache';
Meteor.methods({
2021-04-22 14:05:20 +02:00
copySwimlane(swimlaneId, toBoardId) {
check(swimlaneId, String);
check(toBoardId, String);
const swimlane = ReactiveCache.getSwimlane(swimlaneId);
const toBoard = ReactiveCache.getBoard(toBoardId);
2021-04-22 14:05:20 +02:00
let ret = false;
2021-04-22 14:05:20 +02:00
if (swimlane && toBoard) {
swimlane.copy(toBoardId);
ret = true;
2021-04-22 14:05:20 +02:00
}
return ret;
2021-04-22 14:05:20 +02:00
},
moveSwimlane(swimlaneId, toBoardId) {
check(swimlaneId, String);
check(toBoardId, String);
const swimlane = ReactiveCache.getSwimlane(swimlaneId);
const toBoard = ReactiveCache.getBoard(toBoardId);
let ret = false;
if (swimlane && toBoard) {
2021-04-22 14:05:20 +02:00
swimlane.move(toBoardId);
ret = true;
}
return ret;
},
});