add new fields to logs and goals.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-01-17 19:01:13 +01:00
parent 3085b8c025
commit eeba5bc9c8
20 changed files with 342 additions and 67 deletions
+5 -1
View File
@@ -4,6 +4,7 @@
export let value = "";
export let name = "";
export let disabled = false;
export let optional = false;
$: {
if ($groupStore.stale && !$groupStore.loading) {
@@ -12,7 +13,7 @@
}
$: {
if ($groupStore.groups.length > 0 && value === "") {
if ($groupStore.groups.length > 0 && value === "" && !optional) {
const nonEmpty = $groupStore.groups.find(g => g.items.length > 0);
if (nonEmpty != null) {
value = nonEmpty.items[0].id;
@@ -22,6 +23,9 @@
</script>
<select name={name} bind:value={value} disabled={disabled || $groupStore.loading}>
{#if optional}
<option value={""} selected={"" === value}>None</option>
{/if}
{#each $groupStore.groups as group (group.id)}
<optgroup label={group.name}>
{#each group.items as item (item.id)}