Fix unusable personal settings form: v8 Vue idioms and Deck relations
Build package / package (push) Successful in 50s
Lint info.xml / xml-lint (push) Successful in 20s
Lint PHP / php-lint (8.2) (push) Successful in 58s
Lint PHP / php-lint (8.3) (push) Successful in 57s
Lint PHP / php-lint (8.4) (push) Successful in 55s
PHPUnit / unit-tests (push) Successful in 1m7s
Build package / package (push) Successful in 50s
Lint info.xml / xml-lint (push) Successful in 20s
Lint PHP / php-lint (8.2) (push) Successful in 58s
Lint PHP / php-lint (8.3) (push) Successful in 57s
Lint PHP / php-lint (8.4) (push) Successful in 55s
PHPUnit / unit-tests (push) Successful in 1m7s
The settings page rendered, but nothing in it worked: - All NcSelect dropdowns showed "undefined" for every option. In @nextcloud/vue 9 the `label` prop is vue-select's option display *key*, not a caption, so `label="Board"` read `option.Board`. Use `input-label`. - Saving always failed with "Bitte einen Titel angeben". Vue 3 dropped `.sync`; NcTextField and NcCheckboxRadioSwitch bind via `modelValue`, so `:value.sync` / `:checked.sync` never wrote back. Use `v-model`. - NcButton's style prop is now `variant`, `type` is the native button type and `native-type` is gone. `type="tertiary"` rendered `<button type="tertiary">`, which HTML falls back to `submit` for, making the cancel button submit the form. - The user dropdown was always empty. Deck's RelationalEntity replaces resolved relations with a RelationalObject once an entity is enriched, so `$acl->getParticipant()` returns that wrapper and the uid lives in `getPrimaryKey()` -- probing for `getUID()` yielded null. This also broke the background job's assigned-user filter, which shares the extractor. - A board's ACL never contains its owner (a private board has an empty ACL), so participants are now seeded with the owner, group ACL entries are expanded via IGroupManager and display names resolved via IUserManager. - One board appeared twice: getUserBoards() merges own/group/circle boards and includes archived and trashed ones. Deduplicate by id and drop those. Also keep one failing lookup in onBoardChange from taking the other two dropdowns down with it, and document all of the above in CLAUDE.md.
This commit is contained in:
+17
-16
@@ -39,10 +39,10 @@
|
||||
<td>{{ workflow.notifyEmail ? 'Ja' : 'Nein' }}</td>
|
||||
<td>{{ workflow.enabled ? 'Ja' : 'Nein' }}</td>
|
||||
<td class="wfda-actions">
|
||||
<NcButton type="tertiary" @click="editWorkflow(workflow)">
|
||||
<NcButton variant="tertiary" @click="editWorkflow(workflow)">
|
||||
Bearbeiten
|
||||
</NcButton>
|
||||
<NcButton type="tertiary" @click="removeWorkflow(workflow)">
|
||||
<NcButton variant="tertiary" @click="removeWorkflow(workflow)">
|
||||
Löschen
|
||||
</NcButton>
|
||||
</td>
|
||||
@@ -53,19 +53,19 @@
|
||||
Noch keine Workflows angelegt.
|
||||
</p>
|
||||
|
||||
<NcButton v-if="!showForm" type="primary" class="wfda-add-button" @click="startCreate">
|
||||
<NcButton v-if="!showForm" variant="primary" class="wfda-add-button" @click="startCreate">
|
||||
Workflow hinzufügen
|
||||
</NcButton>
|
||||
|
||||
<form v-if="showForm" class="wfda-form" @submit.prevent="save">
|
||||
<NcTextField
|
||||
:value.sync="form.title"
|
||||
v-model="form.title"
|
||||
label="Titel"
|
||||
required />
|
||||
|
||||
<NcSelect
|
||||
v-model="form.boardId"
|
||||
label="Board"
|
||||
input-label="Board"
|
||||
:options="boardOptions"
|
||||
:reduce="option => option.value"
|
||||
placeholder="Board wählen"
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
<NcSelect
|
||||
v-model="form.sourceStackId"
|
||||
label="Quell-Stapel"
|
||||
input-label="Quell-Stapel"
|
||||
:options="stackOptions"
|
||||
:reduce="option => option.value"
|
||||
:disabled="!form.boardId"
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<NcSelect
|
||||
v-model="form.targetStackId"
|
||||
label="Ziel-Stapel"
|
||||
input-label="Ziel-Stapel"
|
||||
:options="stackOptions"
|
||||
:reduce="option => option.value"
|
||||
:disabled="!form.boardId"
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
<NcSelect
|
||||
v-model="form.filterUserIds"
|
||||
label="Nur für zugewiesene Benutzer (optional)"
|
||||
input-label="Nur für zugewiesene Benutzer (optional)"
|
||||
:options="participantOptions"
|
||||
:reduce="option => option.value"
|
||||
:disabled="!form.boardId"
|
||||
@@ -98,18 +98,18 @@
|
||||
|
||||
<NcSelect
|
||||
v-model="form.filterLabelIds"
|
||||
label="Nur mit Label (optional)"
|
||||
input-label="Nur mit Label (optional)"
|
||||
:options="labelOptions"
|
||||
:reduce="option => option.value"
|
||||
:disabled="!form.boardId"
|
||||
multiple
|
||||
placeholder="Alle Labels" />
|
||||
|
||||
<NcCheckboxRadioSwitch :checked.sync="form.notifyEmail">
|
||||
<NcCheckboxRadioSwitch v-model="form.notifyEmail">
|
||||
Benachrichtigungs-E-Mail an mich senden
|
||||
</NcCheckboxRadioSwitch>
|
||||
|
||||
<NcCheckboxRadioSwitch :checked.sync="form.enabled">
|
||||
<NcCheckboxRadioSwitch v-model="form.enabled">
|
||||
Workflow aktiv
|
||||
</NcCheckboxRadioSwitch>
|
||||
|
||||
@@ -118,10 +118,10 @@
|
||||
</NcNoteCard>
|
||||
|
||||
<div class="wfda-form-actions">
|
||||
<NcButton type="primary" native-type="submit" :disabled="saving">
|
||||
<NcButton variant="primary" type="submit" :disabled="saving">
|
||||
Speichern
|
||||
</NcButton>
|
||||
<NcButton type="tertiary" :disabled="saving" @click="cancelForm">
|
||||
<NcButton variant="tertiary" type="button" :disabled="saving" @click="cancelForm">
|
||||
Abbrechen
|
||||
</NcButton>
|
||||
</div>
|
||||
@@ -230,10 +230,11 @@ async function onBoardChange(boardId) {
|
||||
return
|
||||
}
|
||||
|
||||
// One failing endpoint must not take the other two dropdowns down with it.
|
||||
const [stacks, labels, participants] = await Promise.all([
|
||||
fetchStacks(boardId),
|
||||
fetchLabels(boardId),
|
||||
fetchParticipants(boardId),
|
||||
fetchStacks(boardId).catch(() => []),
|
||||
fetchLabels(boardId).catch(() => []),
|
||||
fetchParticipants(boardId).catch(() => []),
|
||||
])
|
||||
|
||||
stacksByBoard[boardId] = stacks
|
||||
|
||||
Reference in New Issue
Block a user