remove roles in app manageement
This commit is contained in:
@@ -95,35 +95,6 @@
|
|||||||
<q-toggle v-model="isSuperuser" />
|
<q-toggle v-model="isSuperuser" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<!--
|
|
||||||
<q-select
|
|
||||||
class="q-mt-xs"
|
|
||||||
filled
|
|
||||||
v-model="roles"
|
|
||||||
multiple
|
|
||||||
:options="roleOptions"
|
|
||||||
label="ロール" emit-value
|
|
||||||
map-options
|
|
||||||
:option-disable="opt => opt.value == -1 ? false : isSuperuser"
|
|
||||||
@add="(opt) => { if (opt.value.value == -1) { } }"
|
|
||||||
hint="各役割には固有の権限があります。">
|
|
||||||
<template v-slot:option="{ itemProps, opt, selected, toggleOption }">
|
|
||||||
<q-item v-bind="itemProps" v-if="opt.value == -1" >
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label>{{opt.label}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section side>
|
|
||||||
<q-toggle :model-value="selected" @update:model-value="() => { toggleOption(opt); }" />
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-separator v-if="opt.value == -1"/>
|
|
||||||
<q-item v-else v-bind="itemProps">
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label>{{opt.label}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</template>
|
|
||||||
</q-select> -->
|
|
||||||
|
|
||||||
<q-item tag="label" class="q-pl-sm q-pr-none q-py-xs">
|
<q-item tag="label" class="q-pl-sm q-pr-none q-py-xs">
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
@@ -231,14 +202,9 @@ const isActive = ref(true);
|
|||||||
|
|
||||||
const isPwd = ref(true);
|
const isPwd = ref(true);
|
||||||
const pwd = ref('');
|
const pwd = ref('');
|
||||||
// const roles = ref([]);
|
|
||||||
const isCreate = ref(true);
|
const isCreate = ref(true);
|
||||||
let editId = ref(0);
|
let editId = ref(0);
|
||||||
|
|
||||||
// const roleOptions = ref([
|
|
||||||
// {'value': -1, 'label': 'システム管理者'}
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
const actionList = [
|
const actionList = [
|
||||||
{ label: '編集', icon: 'edit_note', action: editRow },
|
{ label: '編集', icon: 'edit_note', action: editRow },
|
||||||
{ separator: true },
|
{ separator: true },
|
||||||
@@ -282,7 +248,6 @@ function editRow(row: IUserDisplay) {
|
|||||||
email.value = row.email;
|
email.value = row.email;
|
||||||
|
|
||||||
isSuperuser.value = row.isSuperuser;
|
isSuperuser.value = row.isSuperuser;
|
||||||
// roles.value = row.roles.map(item => item.id);
|
|
||||||
isActive.value = row.isActive;
|
isActive.value = row.isActive;
|
||||||
|
|
||||||
isPwd.value = true;
|
isPwd.value = true;
|
||||||
@@ -303,7 +268,6 @@ const onSubmit = () => {
|
|||||||
'is_superuser': isSuperuser.value,
|
'is_superuser': isSuperuser.value,
|
||||||
'is_active': isActive.value,
|
'is_active': isActive.value,
|
||||||
'email': email.value,
|
'email': email.value,
|
||||||
// "roles": roles.value,
|
|
||||||
...(isCreate.value || resetPsw.value ? { password: pwd.value } : {})
|
...(isCreate.value || resetPsw.value ? { password: pwd.value } : {})
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
getUsers();
|
getUsers();
|
||||||
@@ -319,7 +283,6 @@ const onSubmit = () => {
|
|||||||
'is_superuser': isSuperuser.value,
|
'is_superuser': isSuperuser.value,
|
||||||
'is_active': isActive.value,
|
'is_active': isActive.value,
|
||||||
'email': email.value,
|
'email': email.value,
|
||||||
// "roles": roles.value,
|
|
||||||
'password': pwd.value
|
'password': pwd.value
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
getUsers();
|
getUsers();
|
||||||
@@ -340,7 +303,6 @@ const onReset = () => {
|
|||||||
isPwd.value = true;
|
isPwd.value = true;
|
||||||
editId.value = 0;
|
editId.value = 0;
|
||||||
isCreate.value = true;
|
isCreate.value = true;
|
||||||
// roles.value = [];
|
|
||||||
resetPsw.value = false;
|
resetPsw.value = false;
|
||||||
addEditLoading.value = false;
|
addEditLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user