refs #7355 account fixes
This commit is contained in:
parent
df1b63da98
commit
3eaa5c864d
|
@ -37,7 +37,7 @@ const $props = defineProps({
|
|||
},
|
||||
hiddenTags: {
|
||||
type: Array,
|
||||
default: () => ['filter'],
|
||||
default: () => ['filter', 'search', 'or', 'and'],
|
||||
},
|
||||
customTags: {
|
||||
type: Array,
|
||||
|
@ -195,8 +195,10 @@ function formatValue(value) {
|
|||
|
||||
function sanitizer(params) {
|
||||
for (const [key, value] of Object.entries(params)) {
|
||||
if (typeof value == 'object')
|
||||
params[key] = Object.values(value)[0].replaceAll('%', '');
|
||||
if (typeof value == 'object') {
|
||||
const param = Object.values(value)[0];
|
||||
if (typeof param == 'string') params[key] = param.replaceAll('%', '');
|
||||
}
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
|
|
@ -41,14 +41,12 @@ const columns = computed(() => [
|
|||
name: 'id',
|
||||
label: t('id'),
|
||||
isId: true,
|
||||
field: 'id',
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'model',
|
||||
label: t('model'),
|
||||
field: 'model',
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
|
@ -56,15 +54,19 @@ const columns = computed(() => [
|
|||
align: 'left',
|
||||
name: 'principalId',
|
||||
label: t('principalId'),
|
||||
field: 'principalId',
|
||||
cardVisible: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'VnRoles',
|
||||
optionLabel: 'name',
|
||||
optionValue: 'name',
|
||||
},
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'property',
|
||||
label: t('property'),
|
||||
field: 'property',
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
|
@ -72,7 +74,10 @@ const columns = computed(() => [
|
|||
align: 'left',
|
||||
name: 'accessType',
|
||||
label: t('accessType'),
|
||||
field: 'accessType',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
options: ['READ', 'WRITE', '*'],
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
|
@ -162,4 +167,15 @@ es:
|
|||
Are you sure you want to continue?: ¿Seguro que quieres continuar?
|
||||
Remove ACL: Eliminar Acl
|
||||
Do you want to remove this ACL?: ¿Quieres eliminar este ACL?
|
||||
principalId: Rol
|
||||
model: Modelo
|
||||
en:
|
||||
New ACL: New ACL
|
||||
ACL removed: ACL removed
|
||||
ACL will be removed: ACL will be removed
|
||||
Are you sure you want to continue?: Are you sure you want to continue?
|
||||
Remove ACL: Remove ACL
|
||||
Do you want to remove this ACL?: Do you want to remove this ACL?
|
||||
principalId: Rol
|
||||
model: Models
|
||||
</i18n>
|
||||
|
|
|
@ -25,9 +25,8 @@ const searchBarDataKeys = {
|
|||
<VnCard
|
||||
data-key="Account"
|
||||
:descriptor="AccountDescriptor"
|
||||
:search-data-key="searchBarDataKeys[routeName]"
|
||||
:search-custom-route-redirect="customRouteRedirectName"
|
||||
:search-redirect="!!customRouteRedirectName"
|
||||
search-data-key="AccountUsers"
|
||||
search-url="VnUsers/preview"
|
||||
:searchbar-label="t('account.search')"
|
||||
:searchbar-info="t('account.searchInfo')"
|
||||
/>
|
||||
|
|
|
@ -82,6 +82,54 @@ const removeAccount = async () => {
|
|||
};
|
||||
</script>
|
||||
<template>
|
||||
<VnConfirm
|
||||
v-model="showSyncDialog"
|
||||
:message="t('account.card.actions.sync.message')"
|
||||
:title="t('account.card.actions.sync.title')"
|
||||
:promise="sync"
|
||||
>
|
||||
<template #customHTML>
|
||||
{{ shouldSyncPassword }}
|
||||
<QCheckbox
|
||||
:label="t('account.card.actions.sync.checkbox')"
|
||||
v-model="shouldSyncPassword"
|
||||
class="full-width"
|
||||
clearable
|
||||
clear-icon="close"
|
||||
>
|
||||
<QIcon style="padding-left: 10px" color="primary" name="info" size="sm">
|
||||
<QTooltip>{{ t('account.card.actions.sync.tooltip') }}</QTooltip>
|
||||
</QIcon></QCheckbox
|
||||
>
|
||||
<QInput
|
||||
v-if="shouldSyncPassword"
|
||||
:label="t('login.password')"
|
||||
v-model="syncPassword"
|
||||
class="full-width"
|
||||
clearable
|
||||
clear-icon="close"
|
||||
type="password"
|
||||
/>
|
||||
</template>
|
||||
</VnConfirm>
|
||||
<!-- <QItem v-ripple clickable @click="setPassword">
|
||||
<QItemSection>{{ t('account.card.actions.setPassword') }}</QItemSection>
|
||||
</QItem>
|
||||
<QItem
|
||||
v-if="!account.hasAccount"
|
||||
v-ripple
|
||||
clickable
|
||||
@click="
|
||||
openConfirmationModal(
|
||||
t('account.card.actions.enableAccount.title'),
|
||||
t('account.card.actions.enableAccount.subtitle'),
|
||||
() => updateStatusAccount(true)
|
||||
)
|
||||
"
|
||||
>
|
||||
<QItemSection>{{ t('account.card.actions.enableAccount.name') }}</QItemSection>
|
||||
</QItem> -->
|
||||
|
||||
<QItem
|
||||
v-if="account.hasAccount"
|
||||
v-ripple
|
||||
|
|
|
@ -14,16 +14,11 @@ const rolesOptions = ref([]);
|
|||
const formModelRef = ref();
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
url="VnRoles"
|
||||
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
|
||||
auto-load
|
||||
@on-fetch="(data) => (rolesOptions = data)"
|
||||
/>
|
||||
<FetchData url="VnRoles" auto-load @on-fetch="(data) => (rolesOptions = data)" />
|
||||
<FormModel
|
||||
ref="formModelRef"
|
||||
model="AccountPrivileges"
|
||||
:url="`VnUsers/${route.params.id}`"
|
||||
:url="`VnUsers/${route.params.id}/privileges`"
|
||||
:url-create="`VnUsers/${route.params.id}/privileges`"
|
||||
auto-load
|
||||
@on-data-saved="formModelRef.fetch()"
|
||||
|
|
|
@ -5,6 +5,8 @@ import VnTable from 'components/VnTable/VnTable.vue';
|
|||
import { useRoute } from 'vue-router';
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import RoleSummary from './Card/RoleSummary.vue';
|
||||
const route = useRoute();
|
||||
const stateStore = useStateStore();
|
||||
const { t } = useI18n();
|
||||
|
@ -16,7 +18,7 @@ const $props = defineProps({
|
|||
});
|
||||
const tableRef = ref();
|
||||
const entityId = computed(() => $props.id || route.params.id);
|
||||
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -42,6 +44,18 @@ const columns = computed(() => [
|
|||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
label: '',
|
||||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('View Summary'),
|
||||
icon: 'preview',
|
||||
action: (row) => viewSummary(row.id, RoleSummary),
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
const exprBuilder = (param, value) => {
|
||||
switch (param) {
|
||||
|
@ -89,6 +103,5 @@ const exprBuilder = (param, value) => {
|
|||
default-mode="table"
|
||||
auto-load
|
||||
redirect="account/role"
|
||||
:is-editable="true"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -23,11 +23,6 @@ const { t } = useI18n();
|
|||
/>
|
||||
</div>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<div class="col">
|
||||
<QCheckbox :label="t('mailAlias.isPublic')" v-model="data.isPublic" />
|
||||
</div>
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModel>
|
||||
</template>
|
||||
|
|
|
@ -65,13 +65,13 @@ export default {
|
|||
component: () => import('src/pages/Account/AccountAliasList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'connections',
|
||||
name: 'AccountConnections',
|
||||
path: 'acls',
|
||||
name: 'AccountAcls',
|
||||
meta: {
|
||||
title: 'connections',
|
||||
title: 'acls',
|
||||
icon: 'check',
|
||||
},
|
||||
component: () => import('src/pages/Account/AccountConnections.vue'),
|
||||
component: () => import('src/pages/Account/AccountAcls.vue'),
|
||||
},
|
||||
{
|
||||
path: 'accounts',
|
||||
|
@ -104,13 +104,13 @@ export default {
|
|||
component: () => import('src/pages/Account/AccountSamba.vue'),
|
||||
},
|
||||
{
|
||||
path: 'acls',
|
||||
name: 'AccountAcls',
|
||||
path: 'connections',
|
||||
name: 'AccountConnections',
|
||||
meta: {
|
||||
title: 'acls',
|
||||
icon: 'check',
|
||||
title: 'connections',
|
||||
icon: 'share',
|
||||
},
|
||||
component: () => import('src/pages/Account/AccountAcls.vue'),
|
||||
component: () => import('src/pages/Account/AccountConnections.vue'),
|
||||
},
|
||||
{
|
||||
path: 'acl-form',
|
||||
|
|
Loading…
Reference in New Issue