allow to exclude discarded contracts from selection

This commit is contained in:
badcold
2024-04-21 10:22:43 +02:00
parent 3d14936a99
commit e7fecb58cd
2 changed files with 12 additions and 0 deletions

View File

@@ -30,6 +30,11 @@
<input id="hops" type="checkbox" checked="checked"/><label for="hops">Hops</label> <input id="hops" type="checkbox" checked="checked"/><label for="hops">Hops</label>
</div> </div>
<div id="other" class="filters">
<span>Other:</span>
<input id="discarded" type="checkbox" checked="checked"/><label for="discarded">Discarded</label>
</div>
<div id="included"> <div id="included">
</div> </div>
<hr style="clear: left;height:5px;border-width:0;color:gray;background-color:darkgoldenrod"/> <hr style="clear: left;height:5px;border-width:0;color:gray;background-color:darkgoldenrod"/>

View File

@@ -26,6 +26,10 @@ function init() {
update(); update();
}); });
} }
let otherCheckBox = document.getElementById("discarded");
otherCheckBox.addEventListener('change', function () {
update();
});
} }
function update() { function update() {
@@ -56,6 +60,9 @@ function isIncluded(contract) {
included = false; included = false;
} }
} }
if (!(document.getElementById("discarded") as HTMLInputElement).checked && contract.discarded) {
included = false;
}
return included; return included;
} }