implement opening and editing tasks
This commit is contained in:
@@ -4,7 +4,7 @@ import TaskViewModel from "../../ViewModel/Pages/taskViewModel";
|
||||
|
||||
export function TaskEntry(taskViewModel: TaskViewModel) {
|
||||
const view = (
|
||||
<button class="tile">
|
||||
<button class="tile" on:click={taskViewModel.open}>
|
||||
<b subscribe:innerText={taskViewModel.name}></b>
|
||||
</button>
|
||||
);
|
||||
|
||||
@@ -72,10 +72,10 @@ export function TaskSettingsModal(taskViewModel: TaskViewModel) {
|
||||
</label>
|
||||
</main>
|
||||
<div class="flex-row width-100">
|
||||
<button class="flex" on:click={taskViewModel.hideSettings}>
|
||||
<button class="flex" on:click={taskViewModel.close}>
|
||||
{translations.general.closeButton}
|
||||
</button>
|
||||
<button class="flex primary" on:click={taskViewModel.hideSettingsAndSave}>
|
||||
<button class="flex primary" on:click={taskViewModel.closeAndSave}>
|
||||
{translations.general.saveButton}
|
||||
<span class="icon">save</span>
|
||||
</button>
|
||||
|
||||
@@ -30,16 +30,16 @@ export default class TaskViewModel {
|
||||
time: React.State<string> = new React.State("");
|
||||
|
||||
// view
|
||||
showSettings = (): void => {
|
||||
open = (): void => {
|
||||
this.boardViewModel.selectTask(this);
|
||||
};
|
||||
|
||||
hideSettings = (): void => {
|
||||
close = (): void => {
|
||||
this.boardViewModel.closeTask();
|
||||
};
|
||||
|
||||
hideSettingsAndSave = (): void => {
|
||||
this.hideSettings();
|
||||
closeAndSave = (): void => {
|
||||
this.close();
|
||||
this.save();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user