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 8c0dbda94..76dfd574f 100644
--- a/src/components/ui/VnFilterPanel.vue
+++ b/src/components/ui/VnFilterPanel.vue
@@ -78,7 +78,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 });
});
@@ -104,7 +104,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 ecfa2c8fe..073aee4d5 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 def0b0696..fa615294b 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) => {
}
};
-
{
ref="tableRef"
data-key="AccountList"
url="VnUsers/preview"
+ :create="{
+ urlCreate: 'VnUsers',
+ title: t('Create user'),
+ onDataSaved: ({ id }) => tableRef.redirect(id),
+ formInitialData: {},
+ }"
:filter="filter"
order="id DESC"
:columns="columns"
@@ -127,7 +166,19 @@ const exprBuilder = (param, value) => {
:use-model="true"
:right-search="false"
auto-load
- />
+ >
+
+
+
+
+
+
@@ -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) => {
@@ -197,6 +201,18 @@ const getLocale = (label) => {
/>
+
+
+
+
+
import { useRouter } from 'vue-router';
-import { reactive, onMounted, ref } from 'vue';
+import { reactive, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import axios from 'axios';
-import { useState } from 'composables/useState';
import FormModelPopup from 'components/FormModelPopup.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnSelect from 'components/common/VnSelect.vue';
@@ -11,29 +10,12 @@ import VnInputDate from 'components/common/VnInputDate.vue';
import { useDialogPluginComponent } from 'quasar';
const { t } = useI18n();
-const state = useState();
const ORDER_MODEL = 'order';
const router = useRouter();
const agencyList = ref([]);
-const addressList = ref([]);
defineEmits(['confirm', ...useDialogPluginComponent.emits]);
-const fetchAddressList = async (addressId) => {
- const { data } = await axios.get('addresses', {
- params: {
- filter: JSON.stringify({
- fields: ['id', 'nickname', 'street', 'city'],
- where: { id: addressId },
- }),
- },
- });
- addressList.value = data;
- if (addressList.value?.length === 1) {
- state.get(ORDER_MODEL).addressId = addressList.value[0].id;
- }
-};
-
const fetchAgencyList = async (landed, addressFk) => {
if (!landed || !addressFk) {
return;
@@ -59,17 +41,9 @@ const initialFormState = reactive({
clientFk: $props.clientFk,
});
-const onClientChange = async (clientId = $props.clientFk) => {
- const { data } = await axios.get(`Clients/${clientId}`);
- await fetchAddressList(data.defaultAddressFk);
-};
-
async function onDataSaved(_, id) {
await router.push({ path: `/order/${id}/catalog` });
}
-onMounted(async () => {
- await onClientChange();
-});
@@ -90,10 +64,9 @@ onMounted(async () => {
option-value="id"
option-label="name"
:filter="{
- fields: ['id', 'name', 'defaultAddressFk'],
+ fields: ['id', 'name'],
}"
hide-selected
- @update:model-value="onClientChange"
>
@@ -110,7 +83,7 @@ onMounted(async () => {
:label="t('order.form.addressFk')"
v-model="data.addressId"
url="addresses"
- :fields="['id', 'nickname', 'defaultAddressFk', 'street', 'city']"
+ :fields="['id', 'nickname', 'street', 'city']"
sort-by="id"
option-value="id"
option-label="street"
diff --git a/src/pages/Order/OrderList.vue b/src/pages/Order/OrderList.vue
index c47a9b2ec..dfeb0f6e2 100644
--- a/src/pages/Order/OrderList.vue
+++ b/src/pages/Order/OrderList.vue
@@ -1,7 +1,7 @@