|
@@ -123,6 +123,19 @@
|
|
|
<Select.Root
|
|
<Select.Root
|
|
|
type="single"
|
|
type="single"
|
|
|
value={entry.auth_inherit ? "inherit" : (entry.auth?.toString() ?? "-")}
|
|
value={entry.auth_inherit ? "inherit" : (entry.auth?.toString() ?? "-")}
|
|
|
|
|
+ onValueChange={(v) => {
|
|
|
|
|
+ if (v === "-") {
|
|
|
|
|
+ setEntryAuth(null, false);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (v === "inherit") {
|
|
|
|
|
+ setEntryAuth(null, true);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ setEntryAuth(parseInt(v), false);
|
|
|
|
|
+ }}
|
|
|
>
|
|
>
|
|
|
<Select.Trigger>
|
|
<Select.Trigger>
|
|
|
{#if entry.auth != null && !entry.auth_inherit}
|
|
{#if entry.auth != null && !entry.auth_inherit}
|
|
@@ -135,9 +148,7 @@
|
|
|
</Select.Trigger>
|
|
</Select.Trigger>
|
|
|
|
|
|
|
|
<Select.Content>
|
|
<Select.Content>
|
|
|
- <Select.Item onclick={() => setEntryAuth(null, false)} value="-">
|
|
|
|
|
- -
|
|
|
|
|
- </Select.Item>
|
|
|
|
|
|
|
+ <Select.Item value="-">-</Select.Item>
|
|
|
|
|
|
|
|
{#if entry.parent_id != null}
|
|
{#if entry.parent_id != null}
|
|
|
<Select.Item onclick={() => setEntryAuth(null, true)} value="inherit">
|
|
<Select.Item onclick={() => setEntryAuth(null, true)} value="inherit">
|
|
@@ -149,10 +160,7 @@
|
|
|
<Select.Separator />
|
|
<Select.Separator />
|
|
|
|
|
|
|
|
{#each _state.auth as auth}
|
|
{#each _state.auth as auth}
|
|
|
- <Select.Item
|
|
|
|
|
- onclick={() => setEntryAuth(auth.id, false)}
|
|
|
|
|
- value={auth.id.toString()}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <Select.Item value={auth.id.toString()}>
|
|
|
{auth.name}
|
|
{auth.name}
|
|
|
</Select.Item>
|
|
</Select.Item>
|
|
|
{/each}
|
|
{/each}
|