From 2a7082582226e4b10520e32e6eabc1009be446df Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Thu, 13 Jun 2024 15:22:00 -0400 Subject: [PATCH] fix: Hide `NcSelect` when unchecked Signed-off-by: Elizabeth Danzberger --- src/components/AdminSettings.vue | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/components/AdminSettings.vue b/src/components/AdminSettings.vue index a373e53bcd..f382104324 100644 --- a/src/components/AdminSettings.vue +++ b/src/components/AdminSettings.vue @@ -247,7 +247,7 @@ :hint="t('richdocuments', '{productName} is enabled for all users by default. When this setting is active, only members of the specified groups can use it.', { productName })" :disabled="updating" @input="updateUseGroups"> - - 0) { + this.settings.use_groups = enabled } + await this.updateSettings({ - use_groups: this.settings.use_groups !== null ? this.settings.use_groups.join('|') : '', + use_groups: this.settings.use_groups?.join('|') ?? '', }) }, async updateEditGroups(enabled) { - if (enabled) { - this.settings.edit_groups = enabled === true ? [] : enabled - } else { - this.settings.edit_groups = null + if (typeof enabled === 'boolean') { + this.settings.edit_groups = (enabled) ? [] : null + this.uiVisible.edit_groups = Boolean(this.settings.edit_groups) + } else if (enabled.length > 0) { + this.settings.edit_groups = enabled } + await this.updateSettings({ - edit_groups: this.settings.edit_groups !== null ? this.settings.edit_groups.join('|') : '', + edit_groups: this.settings.edit_groups?.join('|') ?? '', }) }, async updateCanonicalWebroot(canonicalWebroot) {