7355-accountMigration2 #619
|
@ -37,7 +37,7 @@ const $props = defineProps({
|
|||
},
|
||||
hiddenTags: {
|
||||
type: Array,
|
||||
default: () => ['filter'],
|
||||
default: () => ['filter', 'search', 'or', 'and'],
|
||||
},
|
||||
customTags: {
|
||||
type: Array,
|
||||
|
@ -198,8 +198,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;
|
||||
}
|
||||
|
|
|
@ -876,7 +876,7 @@ worker:
|
|||
card:
|
||||
workerId: ID Trabajador
|
||||
name: Nombre
|
||||
email: Email
|
||||
email: Correo personal
|
||||
phone: Teléfono
|
||||
mobile: Móvil
|
||||
active: Activo
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
@ -118,13 +123,6 @@ const deleteAcl = async ({ id }) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="VnRoles"
|
||||
:filter="{ fields: ['name'], order: 'name ASC' }"
|
||||
@on-fetch="(data) => (rolesOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
|
||||
<VnSearchbar
|
||||
data-key="AccountAcls"
|
||||
url="ACLs"
|
||||
|
@ -147,7 +145,6 @@ const deleteAcl = async ({ id }) => {
|
|||
order="id DESC"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
auto-load
|
||||
:right-search="true"
|
||||
:is-editable="true"
|
||||
:use-model="true"
|
||||
|
@ -162,4 +159,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>
|
||||
|
|
|
@ -60,7 +60,7 @@ const columns = computed(() => [
|
|||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="AccountAliasList"
|
||||
:url="`MailAliases`"
|
||||
url="MailAliases"
|
||||
:create="{
|
||||
urlCreate: 'MailAliases',
|
||||
title: 'Create MailAlias',
|
||||
|
@ -70,7 +70,6 @@ const columns = computed(() => [
|
|||
order="id DESC"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
auto-load
|
||||
redirect="account/alias"
|
||||
:is-editable="true"
|
||||
:use-model="true"
|
||||
|
|
|
@ -48,6 +48,14 @@ const columns = computed(() => [
|
|||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'email',
|
||||
label: t('email'),
|
||||
component: 'input',
|
||||
create: true,
|
||||
visible: false,
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
label: '',
|
||||
|
@ -83,9 +91,9 @@ const exprBuilder = (param, value) => {
|
|||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
:label="t('account.search')"
|
||||
data-key="AccountUsers"
|
||||
:expr-builder="exprBuilder"
|
||||
:label="t('account.search')"
|
||||
:info="t('account.searchInfo')"
|
||||
/>
|
||||
|
||||
|
@ -96,7 +104,6 @@ const exprBuilder = (param, value) => {
|
|||
order="id DESC"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
auto-load
|
||||
redirect="account"
|
||||
:use-model="true"
|
||||
/>
|
||||
|
|
|
@ -1,22 +1,8 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { computed } from 'vue';
|
||||
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import AliasDescriptor from './AliasDescriptor.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
||||
const routeName = computed(() => route.name);
|
||||
const customRouteRedirectName = computed(() => {
|
||||
return routeName.value;
|
||||
});
|
||||
const searchBarDataKeys = {
|
||||
AliasBasicData: 'AliasBasicData',
|
||||
AliasUsers: 'AliasUsers',
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -24,12 +10,12 @@ const searchBarDataKeys = {
|
|||
data-key="Alias"
|
||||
base-url="MailAliases"
|
||||
:descriptor="AliasDescriptor"
|
||||
:search-data-key="searchBarDataKeys[routeName]"
|
||||
search-data-key="AccountAliasList"
|
||||
:searchbar-props="{
|
||||
redirect: !!customRouteRedirectName,
|
||||
customRouteRedirectName,
|
||||
url: 'MailAliases',
|
||||
info: t('mailAlias.searchInfo'),
|
||||
label: t('mailAlias.search'),
|
||||
searchUrl: 'table',
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -37,9 +37,11 @@ watch(
|
|||
<VnInput v-model="data.nickname" :label="t('account.card.alias')" />
|
||||
<VnInput v-model="data.email" :label="t('account.card.email')" />
|
||||
<VnSelect
|
||||
url="Languages"
|
||||
v-model="data.lang"
|
||||
:options="['es', 'en']"
|
||||
:label="t('account.card.lang')"
|
||||
option-value="code"
|
||||
option-label="code"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1,36 +1,21 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import AccountDescriptor from './AccountDescriptor.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
||||
const routeName = computed(() => route.name);
|
||||
const customRouteRedirectName = computed(() => routeName.value);
|
||||
const searchBarDataKeys = {
|
||||
AccountSummary: 'AccountSummary',
|
||||
AccountInheritedRoles: 'AccountInheritedRoles',
|
||||
AccountMailForwarding: 'AccountMailForwarding',
|
||||
AccountMailAlias: 'AccountMailAlias',
|
||||
AccountPrivileges: 'AccountPrivileges',
|
||||
AccountLog: 'AccountLog',
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Account"
|
||||
:descriptor="AccountDescriptor"
|
||||
:search-data-key="searchBarDataKeys[routeName]"
|
||||
search-data-key="AccountUsers"
|
||||
:searchbar-props="{
|
||||
redirect: !!customRouteRedirectName,
|
||||
customRouteRedirectName,
|
||||
url: 'VnUsers/preview',
|
||||
label: t('account.search'),
|
||||
info: t('account.searchInfo'),
|
||||
searchUrl: 'table',
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -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) {
|
||||
|
@ -62,16 +76,12 @@ const exprBuilder = (param, value) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<template v-if="stateStore.isHeaderMounted()">
|
||||
<Teleport to="#searchbar">
|
||||
<VnSearchbar
|
||||
data-key="Roles"
|
||||
:expr-builder="exprBuilder"
|
||||
:label="t('role.searchRoles')"
|
||||
:info="t('role.searchInfo')"
|
||||
/>
|
||||
</Teleport>
|
||||
</template>
|
||||
<VnSearchbar
|
||||
data-key="Roles"
|
||||
:expr-builder="exprBuilder"
|
||||
:label="t('role.searchRoles')"
|
||||
:info="t('role.searchInfo')"
|
||||
/>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="Roles"
|
||||
|
@ -87,8 +97,6 @@ const exprBuilder = (param, value) => {
|
|||
order="id ASC"
|
||||
:columns="columns"
|
||||
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>
|
||||
|
|
|
@ -1,33 +1,20 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import RoleDescriptor from './RoleDescriptor.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
||||
const routeName = computed(() => route.name);
|
||||
const customRouteRedirectName = computed(() => routeName.value);
|
||||
const searchBarDataKeys = {
|
||||
RoleSummary: 'RoleSummary',
|
||||
RoleBasicData: 'RoleBasicData',
|
||||
SubRoles: 'SubRoles',
|
||||
InheritedRoles: 'InheritedRoles',
|
||||
RoleLog: 'RoleLog',
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Role"
|
||||
:descriptor="RoleDescriptor"
|
||||
:search-data-key="searchBarDataKeys[routeName]"
|
||||
search-data-key="AccountRoles"
|
||||
:searchbar-props="{
|
||||
redirect: !!customRouteRedirectName,
|
||||
customRouteRedirectName,
|
||||
url: 'VnRoles',
|
||||
label: t('role.searchRoles'),
|
||||
info: t('role.searchInfo'),
|
||||
searchUrl: 'table',
|
||||
}"
|
||||
/>
|
||||
</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