diff options
Diffstat (limited to 'apps/settings/src/components/AdminAI.vue')
-rw-r--r-- | apps/settings/src/components/AdminAI.vue | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/settings/src/components/AdminAI.vue b/apps/settings/src/components/AdminAI.vue index df53d88c85e..0d6f32a9aa9 100644 --- a/apps/settings/src/components/AdminAI.vue +++ b/apps/settings/src/components/AdminAI.vue @@ -11,13 +11,14 @@ <h3>{{ t('settings', 'Task:') }} {{ type.name }}</h3> <p>{{ type.description }}</p> <NcCheckboxRadioSwitch type="switch" - v-model="taskEnabled" > + v-model="settings['ai.taskprocessing_type_preferences'][type.id]" + @update:modelValue="saveChanges" > {{ t('settings', 'Enable') }} </NcCheckboxRadioSwitch> <NcSelect v-model="settings['ai.taskprocessing_provider_preferences'][type.id]" class="provider-select" :clearable="false" - :disabled="!taskEnabled" + :disabled="!type.enabled" :options="taskProcessingProviders.filter(p => p.taskType === type.id).map(p => p.id)" @input="saveChanges"> <template #option="{label}"> @@ -146,7 +147,6 @@ export default { taskProcessingProviders: loadState('settings', 'ai-task-processing-providers'), taskProcessingTaskTypes: loadState('settings', 'ai-task-processing-task-types'), settings: loadState('settings', 'ai-settings'), - taskEnabled: true, } }, computed: { @@ -189,6 +189,7 @@ export default { this.saveChanges() }, async saveChanges() { + console.warn(this.settings) this.loading = true await nextTick() const data = { settings: this.settings } @@ -198,6 +199,7 @@ export default { console.error('could not save changes', err) } this.loading = false + console.warn('done') }, getTextProcessingTaskType(type) { if (!Array.isArray(this.textProcessingTaskTypes)) { |