change: show only other user for owner transfer
This commit is contained in:
parent
117372af39
commit
88ec075d20
3 changed files with 18 additions and 12 deletions
|
@ -103,6 +103,7 @@ import {
|
|||
} from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import type { UserViewModel } from "@/viewmodels/admin/user/user.models";
|
||||
import { useAccountStore } from "@/stores/account";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -116,15 +117,18 @@ export default defineComponent({
|
|||
},
|
||||
computed: {
|
||||
...mapState(useUserStore, ["users", "loading"]),
|
||||
...mapState(useAccountStore, ["id"]),
|
||||
filtered(): Array<UserViewModel> {
|
||||
return this.query === ""
|
||||
? this.users
|
||||
: this.users.filter((user) =>
|
||||
(user.firstname + " " + user.lastname)
|
||||
.toLowerCase()
|
||||
.replace(/\s+/g, "")
|
||||
.includes(this.query.toLowerCase().replace(/\s+/g, ""))
|
||||
);
|
||||
return (
|
||||
this.query === ""
|
||||
? this.users
|
||||
: this.users.filter((user) =>
|
||||
(user.firstname + " " + user.lastname)
|
||||
.toLowerCase()
|
||||
.replace(/\s+/g, "")
|
||||
.includes(this.query.toLowerCase().replace(/\s+/g, ""))
|
||||
)
|
||||
).filter((u) => u.id != this.id);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue