diff --git a/Jenkinsfile b/Jenkinsfile index 1766e3aea..c20da8ab2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,8 @@ def PROTECTED_BRANCH def BRANCH_ENV = [ test: 'test', - master: 'production' + master: 'production', + beta: 'production' ] node { @@ -15,7 +16,8 @@ node { PROTECTED_BRANCH = [ 'dev', 'test', - 'master' + 'master', + 'beta' ].contains(env.BRANCH_NAME) // https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables diff --git a/src/components/common/VnLocation.vue b/src/components/common/VnLocation.vue index af273150e..a8840f243 100644 --- a/src/components/common/VnLocation.vue +++ b/src/components/common/VnLocation.vue @@ -2,7 +2,7 @@ import CreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue'; import VnSelectDialog from 'components/common/VnSelectDialog.vue'; import { useI18n } from 'vue-i18n'; -import { ref } from 'vue'; +import { computed } from 'vue'; import { useAttrs } from 'vue'; import { useRequired } from 'src/composables/useRequired'; const { t } = useI18n(); @@ -43,7 +43,7 @@ const formatLocation = (obj, properties) => { return filteredParts.join(', '); }; -const modelValue = ref( +const modelValue = computed(() => props.location ? formatLocation(props.location, locationProperties) : null ); diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index c17414ac1..e987a3fb0 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -79,7 +79,7 @@ const userParams = ref({}); defineExpose({ search, sanitizer, params: userParams }); onMounted(() => { - userParams.value = $props.modelValue ?? {}; + if (!userParams.value) userParams.value = $props.modelValue ?? {}; emit('init', { params: userParams.value }); }); @@ -105,7 +105,8 @@ watch( watch( () => arrayData.store.userParams, - (val, oldValue) => (val || oldValue) && setUserParams(val) + (val, oldValue) => (val || oldValue) && setUserParams(val), + { immediate: true } ); watch( diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index abf2c0fd9..d12fc7230 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -331,6 +331,7 @@ globals: fi: FI myTeam: My team departmentFk: Department + countryFk: Country changePass: Change password deleteConfirmTitle: Delete selected elements changeState: Change state diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 9f0f10f19..365abd824 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -335,6 +335,7 @@ globals: SSN: NSS fi: NIF myTeam: Mi equipo + countryFk: País changePass: Cambiar contraseña deleteConfirmTitle: Eliminar los elementos seleccionados changeState: Cambiar estado diff --git a/src/pages/Account/AccountList.vue b/src/pages/Account/AccountList.vue index cbaaf8e26..341dd92a2 100644 --- a/src/pages/Account/AccountList.vue +++ b/src/pages/Account/AccountList.vue @@ -7,6 +7,7 @@ import AccountSummary from './Card/AccountSummary.vue'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import AccountFilter from './AccountFilter.vue'; import RightMenu from 'src/components/common/RightMenu.vue'; +import VnInput from 'src/components/common/VnInput.vue'; const { t } = useI18n(); const { viewSummary } = useSummaryDialog(); const tableRef = ref(); @@ -22,10 +23,27 @@ const columns = computed(() => [ field: 'id', cardVisible: true, }, + { + align: 'left', + name: 'name', + label: t('Name'), + component: 'input', + columnField: { + component: null, + }, + cardVisible: true, + create: true, + }, { align: 'left', name: 'roleFk', - label: t('role'), + label: t('Role'), + component: 'select', + attrs: { + url: 'VnRoles', + optionValue: 'id', + optionLabel: 'name', + }, columnFilter: { component: 'select', name: 'roleFk', @@ -35,7 +53,11 @@ const columns = computed(() => [ optionLabel: 'name', }, }, + columnField: { + component: null, + }, format: ({ role }, dashIfEmpty) => dashIfEmpty(role?.name), + create: true, }, { align: 'left', @@ -51,20 +73,32 @@ const columns = computed(() => [ }, { align: 'left', - name: 'name', - label: t('Name'), + name: 'email', + label: t('Email'), component: 'input', columnField: { component: null, }, - cardVisible: true, create: true, + visible: false, }, { align: 'left', - name: 'email', - label: t('email'), - component: 'input', + name: 'password', + label: t('Password'), + columnField: { + component: null, + }, + attrs: {}, + required: true, + visible: false, + }, + + { + align: 'left', + name: 'active', + label: t('Active'), + component: 'checkbox', create: true, visible: false, }, @@ -101,7 +135,6 @@ const exprBuilder = (param, value) => { } }; - @@ -135,4 +186,7 @@ const exprBuilder = (param, value) => { Id: Id Nickname: Nickname Name: Nombre + Password: Contraseña + Active: Activo + Role: Rol diff --git a/src/pages/Customer/Card/CustomerWebAccess.vue b/src/pages/Customer/Card/CustomerWebAccess.vue index ea901c65a..3c4106846 100644 --- a/src/pages/Customer/Card/CustomerWebAccess.vue +++ b/src/pages/Customer/Card/CustomerWebAccess.vue @@ -29,7 +29,8 @@ async function hasCustomerRole() { :filter="filter" model="customer" :mapper=" - ({ active, name, email }) => { + ({ account }) => { + const { name, email, active } = account; return { active, name, diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index c8fffb0ef..0aeae622d 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -52,7 +52,9 @@ const columns = computed(() => [ label: t('invoiceOutList.tableVisibleColumns.id'), chip: { condition: () => true }, isId: true, - columnFilter: { name: 'search' }, + columnFilter: { + name: 'id', + }, }, { align: 'left', @@ -84,8 +86,15 @@ const columns = computed(() => [ label: t('globals.client'), cardVisible: true, component: 'select', - attrs: { url: 'Clients', fields: ['id', 'name'] }, - columnField: { component: null }, + attrs: { + url: 'Clients', + fields: ['id', 'socialName'], + optionLabel: 'socialName', + optionValue: 'id', + }, + columnField: { + component: null, + }, }, { align: 'left', diff --git a/src/pages/Monitor/Ticket/MonitorTicketFilter.vue b/src/pages/Monitor/Ticket/MonitorTicketFilter.vue index 3247da014..2205666ec 100644 --- a/src/pages/Monitor/Ticket/MonitorTicketFilter.vue +++ b/src/pages/Monitor/Ticket/MonitorTicketFilter.vue @@ -59,7 +59,11 @@ const getLocale = (label) => {