|
@ -7,6 +7,7 @@ |
|
|
import { getModalContext } from "$lib/components/contexts/ModalContext.svelte"; |
|
|
import { getModalContext } from "$lib/components/contexts/ModalContext.svelte"; |
|
|
import { getProjectContext } from "$lib/components/contexts/ProjectContext.svelte"; |
|
|
import { getProjectContext } from "$lib/components/contexts/ProjectContext.svelte"; |
|
|
import { getScopeContext } from "$lib/components/contexts/ScopeContext.svelte"; |
|
|
import { getScopeContext } from "$lib/components/contexts/ScopeContext.svelte"; |
|
|
|
|
|
import ProjectSelect from "$lib/components/controls/ProjectSelect.svelte"; |
|
|
import StatInput from "$lib/components/controls/StatInput.svelte"; |
|
|
import StatInput from "$lib/components/controls/StatInput.svelte"; |
|
|
import StatusSelect from "$lib/components/controls/StatusSelect.svelte"; |
|
|
import StatusSelect from "$lib/components/controls/StatusSelect.svelte"; |
|
|
import TagInput from "$lib/components/controls/TagInput.svelte"; |
|
|
import TagInput from "$lib/components/controls/TagInput.svelte"; |
|
@ -60,6 +61,7 @@ |
|
|
isCoarse: false, |
|
|
isCoarse: false, |
|
|
aggregateRequired: 0, |
|
|
aggregateRequired: 0, |
|
|
tags: [], |
|
|
tags: [], |
|
|
|
|
|
projectId: project.id, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
projectId = project.id; |
|
|
projectId = project.id; |
|
@ -75,6 +77,7 @@ |
|
|
isCoarse: current.isCoarse, |
|
|
isCoarse: current.isCoarse, |
|
|
aggregateRequired: current.aggregateRequired, |
|
|
aggregateRequired: current.aggregateRequired, |
|
|
tags: [...current.tags], |
|
|
tags: [...current.tags], |
|
|
|
|
|
projectId: project.id, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
oldTags = [...current.tags]; |
|
|
oldTags = [...current.tags]; |
|
@ -103,6 +106,7 @@ |
|
|
stats: statDiff(oldStats, requirement.stats, -1), |
|
|
stats: statDiff(oldStats, requirement.stats, -1), |
|
|
addTags: requirement.tags.filter(t => !oldTags.includes(t)), |
|
|
addTags: requirement.tags.filter(t => !oldTags.includes(t)), |
|
|
removeTags: oldTags.filter(t => !requirement.tags.includes(t)), |
|
|
removeTags: oldTags.filter(t => !requirement.tags.includes(t)), |
|
|
|
|
|
projectId: requirement.projectId !== projectId ? requirement.projectId : void(0), |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
await sl3(fetch).updateRequirement($scope.id, projectId, requirementId, submission); |
|
|
await sl3(fetch).updateRequirement($scope.id, projectId, requirementId, submission); |
|
@ -140,6 +144,8 @@ |
|
|
<TagInput bind:value={requirement.tags} /> |
|
|
<TagInput bind:value={requirement.tags} /> |
|
|
</ModalBody> |
|
|
</ModalBody> |
|
|
<ModalBody> |
|
|
<ModalBody> |
|
|
|
|
|
<label for="req">Project Requirement</label> |
|
|
|
|
|
<ProjectSelect disabled={op === "Create"} bind:value={requirement.projectId} /> |
|
|
<label for="stats">Status</label> |
|
|
<label for="stats">Status</label> |
|
|
<StatusSelect bind:status={requirement.status} /> |
|
|
<StatusSelect bind:status={requirement.status} /> |
|
|
<label for="stats">Stats</label> |
|
|
<label for="stats">Stats</label> |
|
|