From d82de6da5809dd401f90fe378661e99166d44633 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 29 May 2024 16:14:29 -0300 Subject: [PATCH] Account roles --- src/components/ui/VnFilterPanel.vue | 8 +- src/pages/Account/AccountAccounts.vue | 111 --------- src/pages/Account/AccountAcls.vue | 114 --------- src/pages/Account/AccountAlias.vue | 75 ------ src/pages/Account/AccountConnections.vue | 75 ------ src/pages/Account/AccountCreate.vue | 159 ------------- src/pages/Account/AccountFilter.vue | 225 ------------------ src/pages/Account/AccountLdap.vue | 65 ----- src/pages/Account/AccountList.vue | 110 +-------- src/pages/Account/AccountSamba.vue | 82 ------- src/pages/Account/Role/AccountRoles.vue | 11 +- src/pages/Account/Role/AccountRolesFilter.vue | 6 +- src/pages/Account/Role/Card/RoleForm.vue | 15 +- src/pages/Account/locale/es.yml | 2 +- src/router/modules/account.js | 2 +- src/router/modules/role.js | 4 +- 16 files changed, 31 insertions(+), 1033 deletions(-) delete mode 100644 src/pages/Account/AccountAccounts.vue delete mode 100644 src/pages/Account/AccountAcls.vue delete mode 100644 src/pages/Account/AccountAlias.vue delete mode 100644 src/pages/Account/AccountConnections.vue delete mode 100644 src/pages/Account/AccountCreate.vue delete mode 100644 src/pages/Account/AccountFilter.vue delete mode 100644 src/pages/Account/AccountLdap.vue delete mode 100644 src/pages/Account/AccountSamba.vue diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 386594750..fd508cea3 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -46,6 +46,10 @@ const props = defineProps({ type: Array, default: () => [], }, + redirect: { + type: Boolean, + default: true, + }, }); const emit = defineEmits(['refresh', 'clear', 'search', 'init', 'remove']); @@ -93,7 +97,7 @@ async function search() { isLoading.value = false; emit('search'); - navigate(store.data, {}); + if (props.redirect) navigate(store.data, {}); } async function reload() { @@ -104,7 +108,7 @@ async function reload() { if (!props.showAll && !params.length) store.data = []; isLoading.value = false; emit('refresh'); - navigate(store.data, {}); + if (props.redirect) navigate(store.data, {}); } async function clearFilters() { diff --git a/src/pages/Account/AccountAccounts.vue b/src/pages/Account/AccountAccounts.vue deleted file mode 100644 index dc6690487..000000000 --- a/src/pages/Account/AccountAccounts.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/src/pages/Account/AccountAcls.vue b/src/pages/Account/AccountAcls.vue deleted file mode 100644 index 8de4d3dc1..000000000 --- a/src/pages/Account/AccountAcls.vue +++ /dev/null @@ -1,114 +0,0 @@ - - - diff --git a/src/pages/Account/AccountAlias.vue b/src/pages/Account/AccountAlias.vue deleted file mode 100644 index dd484bc8c..000000000 --- a/src/pages/Account/AccountAlias.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - diff --git a/src/pages/Account/AccountConnections.vue b/src/pages/Account/AccountConnections.vue deleted file mode 100644 index 1128205b8..000000000 --- a/src/pages/Account/AccountConnections.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - diff --git a/src/pages/Account/AccountCreate.vue b/src/pages/Account/AccountCreate.vue deleted file mode 100644 index ca69fbb00..000000000 --- a/src/pages/Account/AccountCreate.vue +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - es: - Supplier: Proveedor - Travel: Envío - Company: Empresa - diff --git a/src/pages/Account/AccountFilter.vue b/src/pages/Account/AccountFilter.vue deleted file mode 100644 index 23b72266c..000000000 --- a/src/pages/Account/AccountFilter.vue +++ /dev/null @@ -1,225 +0,0 @@ - - - - - -en: - params: - search: Contains - clientFk: Customer - clientName: Customer - salesPersonFk: Salesperson - attenderFk: Attender - accountResponsibleFk: Responsible - accountStateFk: State - created: Created - myTeam: My team -es: - params: - search: Contiene - clientFk: Cliente - clientName: Cliente - salesPersonFk: Comercial - attenderFk: Asistente - accountResponsibleFk: Responsable - accountStateFk: Estado - created: Creada - Customer ID: ID cliente - Client Name: Nombre del cliente - Salesperson: Comercial - Attender: Asistente - Responsible: Responsable - State: Estado - Item: Artículo - Created: Creada - More options: Más opciones - myTeam: Mi equipo - diff --git a/src/pages/Account/AccountLdap.vue b/src/pages/Account/AccountLdap.vue deleted file mode 100644 index 4d5fdfb34..000000000 --- a/src/pages/Account/AccountLdap.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - diff --git a/src/pages/Account/AccountList.vue b/src/pages/Account/AccountList.vue index 56d54a47d..40a017533 100644 --- a/src/pages/Account/AccountList.vue +++ b/src/pages/Account/AccountList.vue @@ -1,109 +1 @@ - - - + diff --git a/src/pages/Account/AccountSamba.vue b/src/pages/Account/AccountSamba.vue deleted file mode 100644 index d04ba1ed5..000000000 --- a/src/pages/Account/AccountSamba.vue +++ /dev/null @@ -1,82 +0,0 @@ - - - diff --git a/src/pages/Account/Role/AccountRoles.vue b/src/pages/Account/Role/AccountRoles.vue index 6f5d929bd..afa86a480 100644 --- a/src/pages/Account/Role/AccountRoles.vue +++ b/src/pages/Account/Role/AccountRoles.vue @@ -6,16 +6,18 @@ import { ref } from 'vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import CardList from 'src/components/ui/CardList.vue'; -import AccountSummary from '../Card/AccountSummary.vue'; +import RoleSummary from './Card/RoleSummary.vue'; import RoleForm from './Card/RoleForm.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; import AccountRolesFilter from './AccountRolesFilter.vue'; import { useStateStore } from 'stores/useStateStore'; +import { useSummaryDialog } from 'src/composables/useSummaryDialog'; const stateStore = useStateStore(); const router = useRouter(); const { t } = useI18n(); +const { viewSummary } = useSummaryDialog(); const roleCreateDialogRef = ref(null); @@ -42,8 +44,8 @@ const getApiUrl = () => new URL(window.location).origin; const navigate = (event, id) => { if (event.ctrlKey || event.metaKey) - return window.open(`${getApiUrl()}/#/account/${id}/summary`); - router.push({ path: `/role/${id}/summary` }); + return window.open(`${getApiUrl()}/#/account/role/${id}/summary`); + router.push({ name: 'RoleSummary', params: { id } }); }; @@ -55,7 +57,6 @@ const navigate = (event, id) => { url="VnRoles" :label="t('role.searchRoles')" :info="t('role.searchInfo')" - :expr-builder="exprBuilder" /> @@ -104,7 +105,7 @@ const navigate = (event, id) => {