Compare commits

...
3 Commits
Author SHA1 Message Date
gisle fd5d732851 fix acquire on front page not allowing stat inputs.
continuous-integration/drone/push Build is passing
2022-07-10 18:10:31 +02:00
gisle 9259609efe fix stat input deleting 0-required stats inrequirements.
continuous-integration/drone/push Build is passing
2022-07-10 17:48:15 +02:00
gisle a5b9f85eda fix req progress only counting acquired items.
continuous-integration/drone/push Build is passing
2022-07-10 17:20:56 +02:00
3 changed files with 6 additions and 6 deletions
@@ -37,7 +37,7 @@
for (const stat of actualScope.stats) {
const found = value.find(v => v.statId == stat.id);
enabledMap[stat.id] = found != null && (!!found?.required || !!found?.acquired);
enabledMap[stat.id] = found != null && (found?.required > (zeroDeletes ? 0 : -1));
requiredMap[stat.id] = found?.required || 0;
acquiredMap[stat.id] = found?.acquired || 0;
}
@@ -96,7 +96,7 @@
<label for="description">Description</label>
<textarea name="description" bind:value={item.description} />
<label for="stats">Stats</label>
<StatInput showAcquired hideUnseen noToggle bind:value={item.stats} />
<StatInput overrideScopeId={scopeId} showAcquired hideUnseen noToggle bind:value={item.stats} />
</ModalBody>
</Modal>
</form>
+4 -4
View File
@@ -195,12 +195,12 @@ func generateRequirementResult(req entities.Requirement, scope scopes.Result, re
continue
}
if item.AcquiredTime != nil {
for _, stat := range item.Stats {
if resStats[stat.ID] != nil {
for _, stat := range item.Stats {
if resStats[stat.ID] != nil {
if item.AcquiredTime != nil {
resStats[stat.ID].Acquired += stat.Acquired
resStats[stat.ID].Planned += stat.Required
}
resStats[stat.ID].Planned += stat.Required
}
}