|
@ -32,6 +32,8 @@ |
|
|
favorite: false, |
|
|
favorite: false, |
|
|
subtractAmount: 0, |
|
|
subtractAmount: 0, |
|
|
tags: [], |
|
|
tags: [], |
|
|
|
|
|
taskSortFields: ["status"], |
|
|
|
|
|
subtractions: [], |
|
|
} |
|
|
} |
|
|
let verb = "Add"; |
|
|
let verb = "Add"; |
|
|
if (md.name === "project.edit" || md.name === "project.delete") { |
|
|
if (md.name === "project.edit" || md.name === "project.delete") { |
|
@ -55,6 +57,7 @@ |
|
|
let error = null; |
|
|
let error = null; |
|
|
let loading = false; |
|
|
let loading = false; |
|
|
let tags = project.tags.join(", "); |
|
|
let tags = project.tags.join(", "); |
|
|
|
|
|
let taskSortFields = project.taskSortFields.join(", "); |
|
|
|
|
|
|
|
|
function onSubmit() { |
|
|
function onSubmit() { |
|
|
loading = true; |
|
|
loading = true; |
|
@ -71,6 +74,7 @@ |
|
|
statusTag: statusTag !== "" ? statusTag : null, |
|
|
statusTag: statusTag !== "" ? statusTag : null, |
|
|
subtractAmount: Math.min(subtractAmount, 0), |
|
|
subtractAmount: Math.min(subtractAmount, 0), |
|
|
tags: tags.length > 0 ? tags.split(",").map(t => t.trim()) : [], |
|
|
tags: tags.length > 0 ? tags.split(",").map(t => t.trim()) : [], |
|
|
|
|
|
taskSortFields: taskSortFields.length > 0 ? taskSortFields.split(",").map(t => t.trim()) : [], |
|
|
|
|
|
|
|
|
name, description, icon, favorite, |
|
|
name, description, icon, favorite, |
|
|
}).then(newProject => { |
|
|
}).then(newProject => { |
|
@ -104,6 +108,7 @@ |
|
|
clearStatusTag: statusTag === "", |
|
|
clearStatusTag: statusTag === "", |
|
|
subtractAmount: subtractAmount, |
|
|
subtractAmount: subtractAmount, |
|
|
setTags: tags.length > 0 ? tags.split(",").map(t => t.trim()) : [], |
|
|
setTags: tags.length > 0 ? tags.split(",").map(t => t.trim()) : [], |
|
|
|
|
|
taskSortFields: taskSortFields.length > 0 ? taskSortFields.split(",").map(t => t.trim()) : [], |
|
|
|
|
|
|
|
|
name, description, icon, favorite, |
|
|
name, description, icon, favorite, |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
@ -149,6 +154,8 @@ |
|
|
<StatusTagSelect disabled={deletion} isProject bind:value={statusTag} /> |
|
|
<StatusTagSelect disabled={deletion} isProject bind:value={statusTag} /> |
|
|
<label for="tags">Tags (Comma Separated)</label> |
|
|
<label for="tags">Tags (Comma Separated)</label> |
|
|
<input disabled={deletion} name="tags" type="text" bind:value={tags} /> |
|
|
<input disabled={deletion} name="tags" type="text" bind:value={tags} /> |
|
|
|
|
|
<label for="tags">Task sorting fields (Comma Separated; time, name, status)</label> |
|
|
|
|
|
<input disabled={deletion} name="tags" type="text" bind:value={taskSortFields} /> |
|
|
|
|
|
|
|
|
<Checkbox disabled={deletion} bind:checked={favorite} label="Mark as favorite." /> |
|
|
<Checkbox disabled={deletion} bind:checked={favorite} label="Mark as favorite." /> |
|
|
|
|
|
|
|
|