Merge pull request #41349 from nextcloud/fix/oca-settings-api-user-actions

fix(settings): Pass user object to user row actions
This commit is contained in:
Arthur Schiwon 2023-11-09 09:44:22 +01:00 committed by GitHub
commit 55d68bb9d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 8 deletions

View file

@ -288,6 +288,7 @@
:actions="userActions"
:disabled="isLoadingField"
:edit="editing"
:user="user"
@update:edit="toggleEdit" />
</td>
</tr>

View file

@ -38,7 +38,7 @@
:disabled="disabled"
:aria-label="text"
:icon="icon"
@click="action">
@click="(event) => action(event, { ...user })">
{{ text }}
</NcActionButton>
</NcActions>
@ -54,7 +54,7 @@ import SvgCheck from '@mdi/svg/svg/check.svg?raw'
import SvgPencil from '@mdi/svg/svg/pencil.svg?raw'
interface UserAction {
action: (event: MouseEvent) => void,
action: (event: MouseEvent, user: Record<string, unknown>) => void,
icon: string,
text: string
}
@ -90,6 +90,14 @@ export default defineComponent({
type: Boolean,
required: true,
},
/**
* Target of this actions
*/
user: {
type: Object,
required: true,
},
},
computed: {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long