add moving tasks between boards via drag&drop
This commit is contained in:
@@ -41,7 +41,7 @@ function KanbanBoard(categoryName: string, boardViewModel: BoardViewModel) {
|
||||
new TaskCategoryBulkChangeViewModel(taskViewModels, categoryName);
|
||||
|
||||
function drop() {
|
||||
boardViewModel.handleDrop(categoryName);
|
||||
boardViewModel.handleDropWithinBoard(categoryName);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -177,7 +177,7 @@ function CategoryStatusColumn(
|
||||
});
|
||||
|
||||
function drop() {
|
||||
boardViewModel.handleDrop(categoryName, statusName);
|
||||
boardViewModel.handleDropWithinBoard(categoryName, statusName);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import BoardViewModel from "../../ViewModel/Pages/boardViewModel";
|
||||
import { allowDrop } from "../utility";
|
||||
|
||||
export function BoardEntry(boardViewModel: BoardViewModel) {
|
||||
const view = (
|
||||
<button
|
||||
set:color={boardViewModel.color}
|
||||
class="tile colored-tile"
|
||||
|
||||
toggle:selected={boardViewModel.isSelected}
|
||||
on:click={boardViewModel.select}
|
||||
on:dragover={allowDrop}
|
||||
on:drop={boardViewModel.handleDropBetweenBoards}
|
||||
>
|
||||
<span class="shadow" subscribe:innerText={boardViewModel.name}></span>
|
||||
<b subscribe:innerText={boardViewModel.name}></b>
|
||||
@@ -23,8 +25,8 @@ export function BoardEntry(boardViewModel: BoardViewModel) {
|
||||
return view;
|
||||
}
|
||||
|
||||
export const BoardViewModelToEntry: React.StateItemConverter<
|
||||
BoardViewModel
|
||||
> = (boardViewModel: BoardViewModel) => {
|
||||
export const BoardViewModelToEntry: React.StateItemConverter<BoardViewModel> = (
|
||||
boardViewModel: BoardViewModel
|
||||
) => {
|
||||
return BoardEntry(boardViewModel);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user