diff --git a/package.json b/package.json index 7be20a842..38a1d06a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.22.0", + "version": "24.24.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", diff --git a/src/components/CreateBankEntityForm.vue b/src/components/CreateBankEntityForm.vue index 068646c9a..b2c5226e6 100644 --- a/src/components/CreateBankEntityForm.vue +++ b/src/components/CreateBankEntityForm.vue @@ -8,12 +8,7 @@ import FetchData from 'components/FetchData.vue'; import VnRow from 'components/ui/VnRow.vue'; import FormModelPopup from './FormModelPopup.vue'; -const props = defineProps({ - showEntityField: { - type: Boolean, - default: true, - }, -}); +defineProps({ showEntityField: { type: Boolean, default: true } }); const emit = defineEmits(['onDataSaved']); const { t } = useI18n(); @@ -26,7 +21,7 @@ const bankEntityFormData = reactive({ }); const countriesFilter = { - fields: ['id', 'country', 'code'], + fields: ['id', 'name', 'code'], }; const countriesOptions = ref([]); @@ -79,7 +74,7 @@ onMounted(async () => { v-model="data.countryFk" :options="countriesOptions" option-value="id" - option-label="country" + option-label="name" hide-selected :required="true" :rules="validate('bankEntity.countryFk')" diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index 064ad1631..25a61a0ca 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -134,7 +134,7 @@ const onProvinceCreated = async ({ name }, formData) => { :label="t('Country')" :options="countriesOptions" hide-selected - option-label="country" + option-label="name" option-value="id" v-model="data.countryFk" :rules="validate('postcode.countryFk')" diff --git a/src/components/FormModelPopup.vue b/src/components/FormModelPopup.vue index c5caf9778..25213a8b7 100644 --- a/src/components/FormModelPopup.vue +++ b/src/components/FormModelPopup.vue @@ -6,7 +6,7 @@ import FormModel from 'components/FormModel.vue'; const emit = defineEmits(['onDataSaved']); -const $props = defineProps({ +defineProps({ title: { type: String, default: '', diff --git a/src/components/FormPopup.vue b/src/components/FormPopup.vue index e203a7c75..2da986006 100644 --- a/src/components/FormPopup.vue +++ b/src/components/FormPopup.vue @@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n'; const emit = defineEmits(['onSubmit']); -const $props = defineProps({ +defineProps({ title: { type: String, default: '', diff --git a/src/components/UserPanel.vue b/src/components/UserPanel.vue index c2011639f..3ae05a268 100644 --- a/src/components/UserPanel.vue +++ b/src/components/UserPanel.vue @@ -178,6 +178,8 @@ function copyUserToken() { :options="warehousesData" option-label="name" option-value="id" + input-debounce="0" + hide-selected /> diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 9e3e50eed..b25011154 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -26,6 +26,10 @@ const $props = defineProps({ type: String, default: null, }, + optionFilter: { + type: String, + default: null, + }, url: { type: String, default: '', diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue index e52be753f..57d1cb19a 100644 --- a/src/components/ui/CardSummary.vue +++ b/src/components/ui/CardSummary.vue @@ -142,6 +142,9 @@ const showRedirectToSummaryIcon = computed(() => { box-shadow: none; .vn-label-value { + &.negative > .value span { + color: $alert; + } display: flex; flex-direction: row; margin-top: 2px; diff --git a/src/components/ui/QCalendarMonthWrapper.vue b/src/components/ui/QCalendarMonthWrapper.vue index 24255ea1a..3ecea89c2 100644 --- a/src/components/ui/QCalendarMonthWrapper.vue +++ b/src/components/ui/QCalendarMonthWrapper.vue @@ -108,7 +108,7 @@ const containerClasses = computed(() => { font-size: 13px; &:hover { - background-color: var(--vn-accent-color); + background-color: var(--vn-label-color); cursor: pointer; } } diff --git a/src/components/ui/VnLinkPhone.vue b/src/components/ui/VnLinkPhone.vue index b04ab3e5b..3ce0b7aa6 100644 --- a/src/components/ui/VnLinkPhone.vue +++ b/src/components/ui/VnLinkPhone.vue @@ -1,21 +1,16 @@ - diff --git a/src/components/ui/VnTree.vue b/src/components/ui/VnTree.vue index 13aa05635..928d045e9 100644 --- a/src/components/ui/VnTree.vue +++ b/src/components/ui/VnTree.vue @@ -90,7 +90,7 @@ const onNodeCreated = async () => { await fetchNodeLeaves(creationNodeSelectedId.value); }; -onMounted(async (n) => { +onMounted(async () => { const tree = [...state.get('Tree'), 1]; const lastStateTree = state.get('TreeState'); if (tree) { diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 326ddff5d..e2465f5ba 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -130,7 +130,8 @@ export function useArrayData(key, userOptions) { store.filter = {}; if (params) store.userParams = Object.assign({}, params); - await fetch({ append: false }); + const response = await fetch({ append: false }); + return response; } async function addFilter({ filter, params }) { diff --git a/src/composables/useState.js b/src/composables/useState.js index e671d41bd..9b9c9d642 100644 --- a/src/composables/useState.js +++ b/src/composables/useState.js @@ -20,28 +20,12 @@ const headerMounted = ref(false); export function useState() { function getUser() { return computed(() => { - return { - id: user.value.id, - name: user.value.name, - nickname: user.value.nickname, - lang: user.value.lang, - darkMode: user.value.darkMode, - companyFk: user.value.companyFk, - warehouseFk: user.value.warehouseFk, - }; + return user.value; }); } function setUser(data) { - user.value = { - id: data.id, - name: data.name, - nickname: data.nickname, - lang: data.lang, - darkMode: data.darkMode, - companyFk: data.companyFk, - warehouseFk: data.warehouseFk, - }; + user.value = data; } function getRoles() { diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index b90cf479b..3853e3ab6 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -32,6 +32,7 @@ globals: confirm: Confirm assign: Assign back: Back + downloadPdf: Download PDF yes: 'Yes' no: 'No' noChanges: No changes to save @@ -829,6 +830,7 @@ worker: calendar: Calendar timeControl: Time control locker: Locker + list: name: Name email: Email @@ -860,6 +862,15 @@ worker: role: Role sipExtension: Extension locker: Locker + fiDueDate: Fecha de caducidad del DNI + sex: Sexo + seniority: Antigüedad + fi: DNI/NIE/NIF + birth: Cumpleaños + isFreelance: Autónomo + isSsDiscounted: Bonificación SS + hasMachineryAuthorized: Autorizado para llevar maquinaria + isDisable: Trabajador desactivado notificationsManager: activeNotifications: Active notifications availableNotifications: Available notifications diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 6bd7fb2cd..a8b9ecd51 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -59,6 +59,7 @@ globals: amount: Importe packages: Bultos download: Descargar + downloadPdf: Descargar PDF selectRows: 'Seleccionar las { numberRows } filas(s)' allRows: 'Todo { numberRows } filas(s)' markAll: Marcar todo diff --git a/src/pages/Agency/Card/AgencySummary.vue b/src/pages/Agency/Card/AgencySummary.vue index 1a506b154..839d88200 100644 --- a/src/pages/Agency/Card/AgencySummary.vue +++ b/src/pages/Agency/Card/AgencySummary.vue @@ -7,20 +7,9 @@ import CardSummary from 'components/ui/CardSummary.vue'; import VnLv from 'components/ui/VnLv.vue'; import VnTitle from 'src/components/common/VnTitle.vue'; -const $props = defineProps({ - id: { - type: Number, - default: 0, - }, -}); -const route = useRoute(); +const $props = defineProps({ id: { type: Number, default: 0 } }); const { t } = useI18n(); -const entityId = computed(() => $props.id || route.params.id); - -const filter = { - fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'], - include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }], -}; +const entityId = computed(() => $props.id || useRoute().params.id);