add favorite system and other small tweaks and fixes.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -119,7 +119,7 @@ import ItemSelect from "../components/ItemSelect.svelte";
|
||||
<input disabled={deletion} name="secondaryItemAmount" type="number" bind:value={secondaryItemAmount} />
|
||||
{/if}
|
||||
|
||||
<Checkbox disabled={deletion} bind:checked={markInactive} label="Mark task inactive/completed." />
|
||||
<Checkbox disabled={!creation} bind:checked={markInactive} label="Mark task inactive/completed." />
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import stuffLogClient from "../clients/stufflog";
|
||||
import Checkbox from "../components/Checkbox.svelte";
|
||||
import IconSelect from "../components/IconSelect.svelte";
|
||||
import Modal from "../components/Modal.svelte";
|
||||
import StatusTagSelect from "../components/StatusTagSelect.svelte";
|
||||
@@ -23,6 +24,7 @@
|
||||
statusTag: "to do",
|
||||
createdTime: "",
|
||||
tasks: [],
|
||||
favorite: false,
|
||||
}
|
||||
let verb = "Add";
|
||||
if (md.name === "project.edit" || md.name === "project.delete") {
|
||||
@@ -37,6 +39,7 @@
|
||||
let description = project.description;
|
||||
let statusTag = project.statusTag || "";
|
||||
let icon = project.icon;
|
||||
let favorite = project.favorite;
|
||||
let error = null;
|
||||
let loading = false;
|
||||
|
||||
@@ -44,13 +47,15 @@
|
||||
loading = true;
|
||||
error = null;
|
||||
|
||||
const iconChanged = icon !== project.icon;
|
||||
|
||||
if (creation) {
|
||||
stuffLogClient.createProject({
|
||||
active: statusTag === "",
|
||||
endTime: ( endTime == "" ) ? null : new Date(endTime),
|
||||
statusTag: statusTag || null,
|
||||
|
||||
name, description, icon,
|
||||
name, description, icon, favorite,
|
||||
}).then(() => {
|
||||
markStale("project", "task");
|
||||
modalStore.close();
|
||||
@@ -76,10 +81,12 @@
|
||||
statusTag: statusTag || null,
|
||||
clearStatusTag: statusTag === "",
|
||||
|
||||
name, description, icon,
|
||||
name, description, icon, favorite,
|
||||
}).then(() => {
|
||||
projectStore.markStale();
|
||||
fpProjectStore.markStale();
|
||||
markStale("project", "task");
|
||||
if (iconChanged) {
|
||||
markStale("log");
|
||||
}
|
||||
modalStore.close();
|
||||
}).catch(err => {
|
||||
error = err.message ? err.message : err.toString();
|
||||
@@ -107,6 +114,8 @@
|
||||
<label for="statusTag">Status</label>
|
||||
<StatusTagSelect disabled={deletion} bind:value={statusTag} />
|
||||
|
||||
<Checkbox disabled={deletion} bind:checked={favorite} label="Mark as favorite." />
|
||||
|
||||
<hr />
|
||||
|
||||
<button disabled={loading} type="submit">{verb} Project</button>
|
||||
|
||||
Reference in New Issue
Block a user