|
|
@ -67,23 +67,22 @@ import { mapActions } from "vuex";
|
|
|
|
import toast from "@/utils/toast";
|
|
|
|
import toast from "@/utils/toast";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "modal_changeRole",
|
|
|
|
name: "modal_changeRole",
|
|
|
|
props: {
|
|
|
|
|
|
|
|
userId: {},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
data: () => ({
|
|
|
|
data: () => ({
|
|
|
|
role_id: null,
|
|
|
|
role_id: null,
|
|
|
|
currectRoleId: null,
|
|
|
|
currectRoleId: null,
|
|
|
|
changeRoleRequestLoading: false,
|
|
|
|
changeRoleRequestLoading: false,
|
|
|
|
roles: null,
|
|
|
|
roles: null,
|
|
|
|
|
|
|
|
user_id: null,
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
form() {
|
|
|
|
form() {
|
|
|
|
return { userId: this.userId };
|
|
|
|
return { userId: this.user_id };
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
...mapActions("users", ["updateRole"]),
|
|
|
|
...mapActions("users", ["updateRole"]),
|
|
|
|
openModal({ role, roles }) {
|
|
|
|
openModal({ role, roles, userId }) {
|
|
|
|
|
|
|
|
this.user_id = userId;
|
|
|
|
this.roles = { ...roles };
|
|
|
|
this.roles = { ...roles };
|
|
|
|
this.currectRoleId = role ? role : 0;
|
|
|
|
this.currectRoleId = role ? role : 0;
|
|
|
|
this.role_id = role ? role : 0;
|
|
|
|
this.role_id = role ? role : 0;
|
|
|
|