add multiple statuses to proejcts, though it's a bit hacked on.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
let endTime = formatFormTime(project.endTime);
|
||||
let name = project.name;
|
||||
let description = project.description;
|
||||
let completed = !project.active;
|
||||
let statusTag = project.statusTag || "";
|
||||
let icon = project.icon;
|
||||
let error = null;
|
||||
let loading = false;
|
||||
@@ -45,8 +45,9 @@
|
||||
|
||||
if (creation) {
|
||||
stuffLogClient.createProject({
|
||||
active: !completed,
|
||||
active: statusTag === "",
|
||||
endTime: ( endTime == "" ) ? null : new Date(endTime),
|
||||
statusTag: statusTag || null,
|
||||
|
||||
name, description, icon,
|
||||
}).then(() => {
|
||||
@@ -70,7 +71,8 @@
|
||||
stuffLogClient.updateProject(project.id, {
|
||||
endTime: ( endTime == "" ) ? null : new Date(endTime),
|
||||
clearEndTime: ( endTime == "" ),
|
||||
active: !completed,
|
||||
active: statusTag === "",
|
||||
statusTag: statusTag || null,
|
||||
|
||||
name, description, icon,
|
||||
}).then(() => {
|
||||
@@ -100,8 +102,14 @@
|
||||
<IconSelect disabled={deletion} bind:value={icon} />
|
||||
<label for="endTime">Deadline (Optional)</label>
|
||||
<input disabled={deletion} name="endTime" type="datetime-local" bind:value={endTime} />
|
||||
<Checkbox disabled={deletion} bind:checked={completed} label="Project is completed." />
|
||||
|
||||
<label for="statusTag">Status</label>
|
||||
<select name="statusTag" bind:value={statusTag} disabled={deletion}>
|
||||
<option value="" selected={"" === statusTag}>Active / In Progress</option>
|
||||
<option value="completed" selected={"completed" === statusTag}>Completed</option>
|
||||
<option value="failed" selected={"failed" === statusTag}>Failed</option>
|
||||
<option value="postponed" selected={"postponed" === statusTag}>Postponed</option>
|
||||
<option value="idea" selected={"idea" === statusTag}>Idea</option>
|
||||
</select>
|
||||
<hr />
|
||||
|
||||
<button disabled={loading} type="submit">{verb} Project</button>
|
||||
|
||||
Reference in New Issue
Block a user