restructure, allow changing board of task through settings modal
This commit is contained in:
@@ -14,6 +14,12 @@ export const StringToOption: React.StateItemConverter<string> = (
|
||||
return Option(string, string, false);
|
||||
};
|
||||
|
||||
export const EntryToOption: React.StateItemConverter<Entry> = (
|
||||
entry: Entry
|
||||
) => {
|
||||
return Option(entry[1], entry[0], false);
|
||||
};
|
||||
|
||||
export const VersionIdToOption: React.StateItemConverter<string> = (
|
||||
versionId: string
|
||||
) => {
|
||||
@@ -22,3 +28,5 @@ export const VersionIdToOption: React.StateItemConverter<string> = (
|
||||
const readableName = `${date} ${time}`;
|
||||
return Option(readableName, versionId, false);
|
||||
};
|
||||
|
||||
export type Entry = [string, string];
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import { StringToOption, VersionIdToOption } from "../Components/option";
|
||||
import {
|
||||
EntryToOption,
|
||||
StringToOption,
|
||||
VersionIdToOption,
|
||||
} from "../Components/option";
|
||||
|
||||
import { DangerousActionButton } from "../Components/dangerousActionButton";
|
||||
import TaskViewModel from "../../ViewModel/Pages/taskViewModel";
|
||||
@@ -39,6 +43,21 @@ export function TaskSettingsModal(taskViewModel: TaskViewModel) {
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<label class="tile flex-no">
|
||||
<span class="icon">category</span>
|
||||
<div>
|
||||
<span>{translations.chatPage.task.taskBoardLabel}</span>
|
||||
<select
|
||||
bind:value={taskViewModel.boardId}
|
||||
children:append={[
|
||||
taskViewModel.chatViewModel.taskBoardSuggestions,
|
||||
EntryToOption,
|
||||
]}
|
||||
></select>
|
||||
<span class="icon">arrow_drop_down</span>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<label class="tile flex-no">
|
||||
<span class="icon">description</span>
|
||||
<div>
|
||||
|
||||
@@ -214,6 +214,7 @@ const englishTranslations = {
|
||||
taskSettingsHeadline: "Edit Task",
|
||||
|
||||
taskNameLabel: "Title",
|
||||
taskBoardLabel: "Board",
|
||||
|
||||
taskCategoryLabel: "Category",
|
||||
taskStatusLabel: "Status",
|
||||
@@ -456,6 +457,7 @@ const allTranslations: { [language: string]: typeof englishTranslations } = {
|
||||
taskSettingsHeadline: "Aufgabe bearbeiten",
|
||||
|
||||
taskNameLabel: "Titel",
|
||||
taskBoardLabel: "Board",
|
||||
|
||||
taskCategoryLabel: "Kategorie",
|
||||
taskStatusLabel: "Status",
|
||||
@@ -683,6 +685,7 @@ const allTranslations: { [language: string]: typeof englishTranslations } = {
|
||||
taskSettingsHeadline: "Editar Tarea",
|
||||
|
||||
taskNameLabel: "Título",
|
||||
taskBoardLabel: "Tablero",
|
||||
|
||||
taskCategoryLabel: "Categoría",
|
||||
taskStatusLabel: "Estado",
|
||||
|
||||
Reference in New Issue
Block a user