diff --git a/.eslintrc.js b/.eslintrc.js index c8bdecb1a..1d09a896f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -58,7 +58,7 @@ module.exports = { rules: { 'prefer-promise-reject-errors': 'off', 'no-unused-vars': 'warn', - + "vue/no-multiple-template-root": "off" , // allow debugger during development only 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', }, diff --git a/package-lock.json b/package-lock.json index 6a60c95c6..ce9c4d7c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@quasar/extras": "^1.16.4", "axios": "^1.4.0", "chromium": "^3.0.3", + "croppie": "^2.6.5", "pinia": "^2.1.3", "quasar": "^2.12.0", "validator": "^13.9.0", @@ -3169,6 +3170,11 @@ "node": ">= 10" } }, + "node_modules/croppie": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/croppie/-/croppie-2.6.5.tgz", + "integrity": "sha512-IlChnVUGG5T3w2gRZIaQgBtlvyuYnlUWs2YZIXXR3H9KrlO1PtBT3j+ykxvy9eZIWhk+V5SpBmhCQz5UXKrEKQ==" + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", diff --git a/package.json b/package.json index 1d729b82f..27ba190a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.02.01", + "version": "24.8.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", @@ -19,6 +19,7 @@ "@quasar/extras": "^1.16.4", "axios": "^1.4.0", "chromium": "^3.0.3", + "croppie": "^2.6.5", "pinia": "^2.1.3", "quasar": "^2.12.0", "validator": "^13.9.0", diff --git a/src/components/CreateBankEntityForm.vue b/src/components/CreateBankEntityForm.vue index 2a1385945..106dbec3a 100644 --- a/src/components/CreateBankEntityForm.vue +++ b/src/components/CreateBankEntityForm.vue @@ -1,6 +1,7 @@ + + + (allowedContentTypes = data.join(', '))" + auto-load + /> + + + + + + {{ t('Edit photo') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ + t( + 'components.editPictureForm.allowedFilesText', + { + allowedContentTypes: + allowedContentTypes, + } + ) + }} + + + + + + + + + + + + + + + + + + + + + + + + +es: + Edit photo: Editar foto + Select from computer: Seleccionar desde ordenador + Import from external URL: Importar desde URL externa + Vertical: Vertical + Normal: Normal + Panoramic: Panorámica + Orientation: Orientación + File: Fichero + This photo provider doesn't allow remote downloads: Este proveedor de fotos no permite descargas remotas + Rotate left: Girar a la izquierda + Rotate right: Girar a la derecha + Select an image: Selecciona una imagen + diff --git a/src/components/FetchData.vue b/src/components/FetchData.vue index 137f751db..4f5d7a57d 100644 --- a/src/components/FetchData.vue +++ b/src/components/FetchData.vue @@ -45,7 +45,7 @@ onMounted(async () => { async function fetch(fetchFilter = {}) { try { const filter = Object.assign(fetchFilter, $props.filter); // eslint-disable-line vue/no-dupe-keys - if ($props.where) filter.where = $props.where; + if ($props.where && !fetchFilter.where) filter.where = $props.where; if ($props.sortBy) filter.order = $props.sortBy; if ($props.limit) filter.limit = $props.limit; @@ -54,6 +54,7 @@ async function fetch(fetchFilter = {}) { }); emit('onFetch', data); + return data; } catch (e) { // } diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 153c086bb..594780220 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -75,9 +75,12 @@ onMounted(async () => { await fetch(); } - // Disparamos el watcher del form después de que se haya cargado la data inicial, si así se desea + // Si así se desea disparamos el watcher del form después de 100ms, asi darle tiempo de que se haya cargado la data inicial + // para evitar que detecte cambios cuando es data inicial default if ($props.observeFormChanges) { - startFormWatcher(); + setTimeout(() => { + startFormWatcher(); + }, 100); } }); @@ -135,7 +138,7 @@ async function save() { } else { response = await axios.patch($props.urlUpdate || $props.url, body); } - emit('onDataSaved', formData.value, response); + emit('onDataSaved', formData.value, response?.data); originalData.value = JSON.parse(JSON.stringify(formData.value)); hasChanges.value = false; } catch (err) { @@ -177,13 +180,6 @@ watch(formUrl, async () => { }); - - - {{ t('globals.changesToSave') }} - +import { reactive, ref } from 'vue'; +import { useI18n } from 'vue-i18n'; + +import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; +import FetchData from 'components/FetchData.vue'; +import VnRow from 'components/ui/VnRow.vue'; +import FormModelPopup from './FormModelPopup.vue'; + +const emit = defineEmits(['onDataSaved']); + +const props = defineProps({ + itemFk: { + type: Number, + default: null, + }, + warehouseFk: { + type: Boolean, + default: null, + }, +}); + +const { t } = useI18n(); + +const regularizeFormData = reactive({ + itemFk: props.itemFk, + warehouseFk: props.warehouseFk, + quantity: null, +}); + +const warehousesOptions = ref([]); + +const onDataSaved = (data) => { + emit('onDataSaved', data); +}; + + + + (warehousesOptions = data)" + auto-load + /> + + + + + + + + + + + + + + + + + +es: + Warehouse: Almacén + Type the visible quantity: Introduce la cantidad visible + Regularize stock: Regularizar stock + diff --git a/src/components/UserPanel.vue b/src/components/UserPanel.vue index f512ac4c4..e0b6b86ed 100644 --- a/src/components/UserPanel.vue +++ b/src/components/UserPanel.vue @@ -1,19 +1,19 @@ @@ -129,8 +125,12 @@ function copyUserToken(){ {{ user.nickname }} - @{{ user.name }} - + + @{{ user.name }} + diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue index b705d91f6..597b2f9c7 100644 --- a/src/components/common/VnInputTime.vue +++ b/src/components/common/VnInputTime.vue @@ -1,8 +1,8 @@ + + handleFetch(data)" + /> + + + + + + + + {{ opt.code }} + {{ showLabel(opt) }} + + + + + + + + +en: + search_by_postalcode: Search by postalcode, town, province or country +es: + Location: Ubicación + search_by_postalcode: Buscar por código postal, ciudad o país + diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index c93399e58..4265d02e9 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -664,6 +664,7 @@ setLogTree(); :label="t('globals.entity')" v-model="selectedFilters.changedModel" option-label="locale" + option-value="value" :options="actions" @update:model-value="selectFilter('action')" hide-selected diff --git a/src/components/common/VnLogFilter.vue b/src/components/common/VnLogFilter.vue index 5f4dbf717..b5941239c 100644 --- a/src/components/common/VnLogFilter.vue +++ b/src/components/common/VnLogFilter.vue @@ -38,28 +38,26 @@ const workers = ref(); minimal > - - - - - - - - - - - + + + + + + + + + diff --git a/src/components/common/VnSelectFilter.vue b/src/components/common/VnSelectFilter.vue index 244fb50bb..accf92fc6 100644 --- a/src/components/common/VnSelectFilter.vue +++ b/src/components/common/VnSelectFilter.vue @@ -1,4 +1,6 @@ + setOptions(data)" + :where="where || { [optionValue]: value }" + :limit="limit" + :order-by="orderBy" + :fields="fields" + /> { + + diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue index 9571c742e..8f6ffa35d 100644 --- a/src/components/ui/CardDescriptor.vue +++ b/src/components/ui/CardDescriptor.vue @@ -49,7 +49,6 @@ onMounted(async () => { () => $props.url, async (newUrl, lastUrl) => { if (newUrl == lastUrl) return; - entity.value = null; await getData(); } ); @@ -62,7 +61,6 @@ async function getData() { skip: 0, }); const { data } = await arrayData.fetch({ append: false, updateRouter: false }); - entity.value = data; emit('onFetch', data); } const emit = defineEmits(['onFetch']); @@ -81,6 +79,7 @@ function viewSummary(id) { + {{ t('components.cardDescriptor.moreOptions') }} diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index dfe0e57ab..7504e819e 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -220,7 +220,9 @@ function formatValue(value) { - + + + @@ -246,6 +248,12 @@ function formatValue(value) { /> + + es: No filters applied: No se han aplicado filtros diff --git a/src/components/ui/VnLv.vue b/src/components/ui/VnLv.vue index 665404afc..0e4a055eb 100644 --- a/src/components/ui/VnLv.vue +++ b/src/components/ui/VnLv.vue @@ -2,6 +2,7 @@ import { computed } from 'vue'; import { dashIfEmpty } from 'src/filters'; +import { useClipboard } from 'src/composables/useClipboard'; const $props = defineProps({ label: { type: String, default: null }, value: { @@ -10,8 +11,19 @@ const $props = defineProps({ }, info: { type: String, default: null }, dash: { type: Boolean, default: true }, + copy: { type: Boolean, default: false }, }); const isBooleanValue = computed(() => typeof $props.value === 'boolean'); + +const { copyText } = useClipboard(); + +function copyValueText() { + copyText($props.value, { + component: { + copyValue: $props.value, + }, + }); +} diff --git a/src/components/ui/VnSubToolbar.vue b/src/components/ui/VnSubToolbar.vue index b314716ce..1a6549856 100644 --- a/src/components/ui/VnSubToolbar.vue +++ b/src/components/ui/VnSubToolbar.vue @@ -1,6 +1,7 @@ - - + + + + - + + + + diff --git a/src/composables/tMobile.js b/src/composables/tMobile.js index a6a000b81..61b8e87b4 100644 --- a/src/composables/tMobile.js +++ b/src/composables/tMobile.js @@ -4,5 +4,5 @@ import { useI18n } from 'vue-i18n'; export function tMobile(...args) { const quasar = useQuasar(); const { t } = useI18n(); - if (!quasar.platform.is.mobile) return t(...args); + if (!quasar.screen.xs) return t(...args); } diff --git a/src/composables/useClipboard.js b/src/composables/useClipboard.js new file mode 100644 index 000000000..008c24fa1 --- /dev/null +++ b/src/composables/useClipboard.js @@ -0,0 +1,17 @@ +import { useQuasar } from 'quasar'; +import { useI18n } from 'vue-i18n'; + +export function useClipboard() { + const quasar = useQuasar(); + const { t } = useI18n(); + /** + * + * @param {String} value Value to send to clipboardAPI + * @param {Object} {label, component} Refer to Quasar notify configuration. Label is the text to translate + */ + function copyText(value, { label = 'components.VnLv.copyText', component = {} }) { + navigator.clipboard.writeText(value); + quasar.notify({ type: 'positive', message: t(label, component) }); + } + return { copyText }; +} diff --git a/src/composables/useState.js b/src/composables/useState.js index 1c797e992..6ad8eb22c 100644 --- a/src/composables/useState.js +++ b/src/composables/useState.js @@ -25,6 +25,7 @@ export function useState() { lang: user.value.lang, darkMode: user.value.darkMode, companyFk: user.value.companyFk, + warehouseFk: user.value.warehouseFk, }; }); } @@ -37,6 +38,7 @@ export function useState() { lang: data.lang, darkMode: data.darkMode, companyFk: data.companyFk, + warehouseFk: data.warehouseFk, }; } diff --git a/src/composables/useUserConfig.js b/src/composables/useUserConfig.js index e05d7fb5c..a33779be7 100644 --- a/src/composables/useUserConfig.js +++ b/src/composables/useUserConfig.js @@ -12,6 +12,7 @@ export function useUserConfig() { const user = state.getUser().value; user.darkMode = data.darkMode; user.companyFk = data.companyFk; + user.warehouseFk = data.warehouseFk; state.setUser(user); return data; diff --git a/src/css/app.scss b/src/css/app.scss index f11ab865c..dbf45ce89 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -52,12 +52,21 @@ body.body--dark { color: var(--vn-text); } +.color-vn-white { + color: $white; +} + .vn-card { background-color: var(--vn-gray); color: var(--vn-text); border-radius: 8px; } +.vn-card-list { + width: 100%; + max-width: 60em; +} + /* Estilo para el asterisco en campos requeridos */ .q-field.required .q-field__label:after { content: ' *'; diff --git a/src/filters/toHour.js b/src/filters/toHour.js index f24f81949..40821e237 100644 --- a/src/filters/toHour.js +++ b/src/filters/toHour.js @@ -4,13 +4,8 @@ export default function toHour(date) { if (!isValidDate(date)) { return '--:--'; } - const dateHour = new Date(date); - let hours = dateHour.getUTCHours(); - hours = hours % 12; - hours = hours ? hours : 12; - - let minutes = dateHour.getUTCMinutes(); - minutes = minutes < 10 ? minutes.toString().padStart(2, '0') : minutes; - - return `${hours}:${minutes} ${dateHour.getUTCHours() >= 12 ? 'PM' : 'AM'}`; + return (new Date(date || '')).toLocaleTimeString([], { + hour: '2-digit', + minute: '2-digit', + }); } diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 2f680280c..0c8b6705f 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -1064,6 +1064,25 @@ export default { totalEntries: 'Total entries', }, }, + item: { + pageTitles: { + items: 'Items', + list: 'List', + diary: 'Diary', + tags: 'Tags', + }, + descriptor: { + item: 'Item', + buyer: 'Buyer', + color: 'Color', + category: 'Category', + stems: 'Stems', + visible: 'Visible', + available: 'Available', + warehouseText: 'Calculated on the warehouse of { warehouseName }', + itemDiary: 'Item diary', + }, + }, components: { topbar: {}, userPanel: { @@ -1087,5 +1106,12 @@ export default { addToPinned: 'Add to pinned', removeFromPinned: 'Remove from pinned', }, + editPictureForm: { + allowedFilesText: 'Allowed file types: { allowedContentTypes }', + }, + VnLv: { + copyText: '{copyValue} has been copied to the clipboard', + }, + iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789', }, }; diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 023c339a4..e81b9496c 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -1064,6 +1064,25 @@ export default { totalEntries: 'Ent. totales', }, }, + item: { + pageTitles: { + items: 'Artículos', + list: 'Listado', + diary: 'Histórico', + tags: 'Etiquetas', + }, + descriptor: { + item: 'Artículo', + buyer: 'Comprador', + color: 'Color', + category: 'Categoría', + stems: 'Tallos', + visible: 'Visible', + available: 'Disponible', + warehouseText: 'Calculado sobre el almacén de { warehouseName }', + itemDiary: 'Registro de compra-venta', + }, + }, components: { topbar: {}, userPanel: { @@ -1087,5 +1106,12 @@ export default { addToPinned: 'Añadir a fijados', removeFromPinned: 'Eliminar de fijados', }, + editPictureForm: { + allowedFilesText: 'Tipos de archivo permitidos: { allowedContentTypes }', + }, + VnLv: { + copyText: '{copyValue} se ha copiado al portapepeles', + }, + iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789', }, }; diff --git a/src/pages/Claim/Card/ClaimAction.vue b/src/pages/Claim/Card/ClaimAction.vue index e92e65fc7..59409e432 100644 --- a/src/pages/Claim/Card/ClaimAction.vue +++ b/src/pages/Claim/Card/ClaimAction.vue @@ -37,6 +37,7 @@ const marker_labels = [ { value: DEFAULT_MIN_RESPONSABILITY, label: t('claim.summary.company') }, { value: DEFAULT_MAX_RESPONSABILITY, label: t('claim.summary.person') }, ]; +const multiplicatorValue = ref(); const columns = computed(() => [ { @@ -134,17 +135,7 @@ async function regularizeClaim() { message: t('globals.dataSaved'), type: 'positive', }); - if (claim.value.responsibility >= Math.ceil(DEFAULT_MAX_RESPONSABILITY) / 2) { - quasar - .dialog({ - component: VnConfirm, - componentProps: { - title: t('confirmGreuges'), - message: t('confirmGreugesMessage'), - }, - }) - .onOk(async () => await onUpdateGreugeAccept()); - } + await onUpdateGreugeAccept(); } async function onUpdateGreugeAccept() { @@ -153,9 +144,9 @@ async function onUpdateGreugeAccept() { filter: { where: { code: 'freightPickUp' } }, }) ).data.id; - const freightPickUpPrice = (await axios.get(`GreugeConfigs/findOne`)).data - .freightPickUpPrice; - + const freightPickUpPrice = + (await axios.get(`GreugeConfigs/findOne`)).data.freightPickUpPrice * + multiplicatorValue.value; await axios.post(`Greuges`, { clientFk: claim.value.clientFk, description: `${t('ClaimGreugeDescription')} ${claimId}`.toUpperCase(), @@ -226,10 +217,10 @@ async function importToNewRefundTicket() { show-if-above v-if="claim" > - + {{ `${t('Total claimed')}: ${toCurrency(totalClaimed)}` }} - + @@ -250,13 +241,31 @@ async function importToNewRefundTicket() { - - save({ isChargedToMana: value })" + + + save({ isChargedToMana: value })" + /> + {{ t('mana') }} + + + + - {{ t('mana') }} - + diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue index b6c948c96..64cf736a9 100644 --- a/src/pages/Claim/Card/ClaimCard.vue +++ b/src/pages/Claim/Card/ClaimCard.vue @@ -1,27 +1,13 @@ diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue index e7f67bcc2..5190c9932 100644 --- a/src/pages/Claim/Card/ClaimLines.vue +++ b/src/pages/Claim/Card/ClaimLines.vue @@ -4,12 +4,11 @@ import { ref, computed } from 'vue'; import { useI18n } from 'vue-i18n'; import { useQuasar } from 'quasar'; import { useRoute } from 'vue-router'; -import { useArrayData } from 'composables/useArrayData'; import { useStateStore } from 'stores/useStateStore'; +import { useArrayData } from 'composables/useArrayData'; +import { toDate, toCurrency, toPercentage } from 'filters/index'; import CrudModel from 'components/CrudModel.vue'; import FetchData from 'components/FetchData.vue'; - -import { toDate, toCurrency, toPercentage } from 'filters/index'; import VnDiscount from 'components/common/vnDiscount.vue'; import ClaimLinesImport from './ClaimLinesImport.vue'; @@ -158,23 +157,21 @@ function showImportDialog() { - - - - {{ t('Amount') }} - - {{ toCurrency(amount) }} - - - - - {{ t('Amount Claimed') }} - - {{ toCurrency(amountClaimed) }} - - + + + {{ t('Amount') }} + + {{ toCurrency(amount) }} + - + + + {{ t('Amount Claimed') }} + + {{ toCurrency(amountClaimed) }} + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - en: params: diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index a11e1e886..1b5979f5a 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -71,7 +71,7 @@ function viewSummary(id) { - + - - es: Search claim: Buscar reclamación diff --git a/src/pages/Claim/ClaimRmaList.vue b/src/pages/Claim/ClaimRmaList.vue index 3774932e3..b906e32fa 100644 --- a/src/pages/Claim/ClaimRmaList.vue +++ b/src/pages/Claim/ClaimRmaList.vue @@ -84,7 +84,7 @@ async function remove({ id }) { - + { - + + + + {{ t('components.iban_tooltip') }} + + + { - await postcodeFetchDataRef.value.fetch(); - await townsFetchDataRef.value.fetch(); - formData.postcode = code; - formData.provinceFk = provinceFk; - formData.city = citiesLocationOptions.value.find((town) => town.id === townFk).name; - formData.countryFk = countryFk; -}; +function handleLocation(data, location) { + const { town, code, provinceFk, countryFk } = location ?? {}; + data.postcode = code; + data.city = town; + data.provinceFk = provinceFk; + data.countryFk = countryFk; +} - (typesTaxes = data)" url="SageTaxTypes" /> - (typesTaxes = data)" url="SageTaxTypes" /> + (typesTransactions = data)" url="SageTransactionTypes" /> - (citiesLocationOptions = data)" - auto-load - url="Towns/location" - /> - (provincesLocationOptions = data)" - auto-load - url="Provinces/location" - /> - (countriesOptions = data)" - auto-load - url="Countries" - /> - (postcodesOptions = data)" - auto-load - /> - handleLocation(data, location)" > - - - - - - - {{ scope.opt.code }} - {{ scope.opt.code }} - - {{ scope.opt.town.name }} ({{ - scope.opt.town.province.name - }}, - {{ - scope.opt.town.province.country.country - }}) - - - - - - - - - - - {{ scope.opt.name }} - - {{ - `${scope.opt.name}, ${scope.opt.province.name} (${scope.opt.province.country.country})` - }} - - - - - - - - - - - - - - - {{ - `${scope.opt.name} (${scope.opt.country.country})` - }} - - - - - - - + diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue index 4ebd6efab..c46b8a8de 100644 --- a/src/pages/Customer/Card/CustomerSummary.vue +++ b/src/pages/Customer/Card/CustomerSummary.vue @@ -81,7 +81,7 @@ const creditWarning = computed(() => { - + { - await postcodeFetchDataRef.value.fetch(); - await townsFetchDataRef.value.fetch(); - formData.postcode = code; - formData.provinceFk = provinceFk; - formData.city = citiesLocationOptions.value.find((town) => town.id === townFk).name; - formData.countryFk = countryFk; -}; + +function handleLocation(data, location ) { + const { town, code, provinceFk, countryFk } = location ?? {} + data.postcode = code; + data.city = town; + data.provinceFk = provinceFk; + data.countryFk = countryFk; +} @@ -54,33 +48,11 @@ const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formDa auto-load url="Workers/search?departmentCodes" /> - (postcodesOptions = data)" - auto-load - /> (businessTypesOptions = data)" auto-load url="BusinessTypes" /> - (citiesLocationOptions = data)" - auto-load - url="Towns/location" - /> - (provincesLocationOptions = data)" - auto-load - url="Provinces/location" - /> - (countriesOptions = data)" - auto-load - url="Countries" - /> - handleLocation(data, location) + " > - - - - - - - {{ scope.opt.code }} - {{ scope.opt.code }} - - {{ scope.opt.town.name }} ({{ - scope.opt.town.province.name - }}, - {{ - scope.opt.town.province.country.country - }}) - - - - - - - - - - - - {{ scope.opt.name }} - - {{ - `${scope.opt.name}, ${scope.opt.province.name} (${scope.opt.province.country.country})` - }} - - - - - - - - - - - - - - {{ - `${scope.opt.name} (${scope.opt.country.country})` - }} - - - - - - - + + diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue index 36a9add89..593b45509 100644 --- a/src/pages/Customer/CustomerFilter.vue +++ b/src/pages/Customer/CustomerFilter.vue @@ -37,153 +37,134 @@ const zones = ref(); - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + + + + + - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - en: params: diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index 540afcc4c..a78720d03 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -65,7 +65,7 @@ const redirectToCreateView = () => { - + { - - es: Search customer: Buscar cliente diff --git a/src/pages/Customer/Defaulter/CustomerDefaulter.vue b/src/pages/Customer/Defaulter/CustomerDefaulter.vue index bf7480985..1dfd331e2 100644 --- a/src/pages/Customer/Defaulter/CustomerDefaulter.vue +++ b/src/pages/Customer/Defaulter/CustomerDefaulter.vue @@ -12,6 +12,7 @@ import CustomerNotificationsFilter from './CustomerDefaulterFilter.vue'; import CustomerBalanceDueTotal from './CustomerBalanceDueTotal.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; +import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import CustomerDefaulterAddObservation from './CustomerDefaulterAddObservation.vue'; const { t } = useI18n(); @@ -206,8 +207,8 @@ const refreshData = () => { - - + + { @click.stop="viewAddObservation(selected)" /> - - + + - - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - + + + + + + - - en: params: diff --git a/src/pages/Customer/ExtendedList/CustomerExtendedList.vue b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue index 65acf78a2..69effe88e 100644 --- a/src/pages/Customer/ExtendedList/CustomerExtendedList.vue +++ b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue @@ -9,6 +9,7 @@ import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorP import CustomerExtendedListActions from './CustomerExtendedListActions.vue'; import CustomerExtendedListFilter from './CustomerExtendedListFilter.vue'; import TableVisibleColumns from 'src/components/common/TableVisibleColumns.vue'; +import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import { useArrayData } from 'composables/useArrayData'; import { useStateStore } from 'stores/useStateStore'; @@ -499,9 +500,8 @@ const selectSalesPersonId = (id) => { /> - - - + + { visibleColumns = ['customerStatus', ...$event, 'actions'] " /> - - - - + + { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - es: Social name: Razón social diff --git a/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue b/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue index 650158278..957abb7a3 100644 --- a/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue +++ b/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue @@ -36,91 +36,80 @@ const clients = ref(); - - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + - - en: params: diff --git a/src/pages/Customer/Payments/CustomerPayments.vue b/src/pages/Customer/Payments/CustomerPayments.vue index de774e63e..eedaaf137 100644 --- a/src/pages/Customer/Payments/CustomerPayments.vue +++ b/src/pages/Customer/Payments/CustomerPayments.vue @@ -122,7 +122,7 @@ function stateColor(row) { - + .customer-payments { - .card-list { - width: 100%; - max-width: 60em; - - .q-table--dense .q-table th:first-child { - padding-left: 0; - } - td { - max-width: 130px; - overflow: hidden; - text-overflow: ellipsis; - } + .q-table--dense .q-table th:first-child { + padding-left: 0; + } + td { + max-width: 130px; + overflow: hidden; + text-overflow: ellipsis; } } diff --git a/src/pages/Customer/Payments/CustomerPaymentsFilter.vue b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue index a19b35a20..74ea2c203 100644 --- a/src/pages/Customer/Payments/CustomerPaymentsFilter.vue +++ b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue @@ -27,71 +27,60 @@ function isValidNumber(value) { - - - - - - - - - - - - - - - - - - - - - - { - if (value.includes(',')) - params.amount = params.amount.replace(',', '.'); - } - " - :rules="[ - (val) => - isValidNumber(val) || !val || 'Please type a number', - ]" - lazy-rules - > - - - - - - + + + + + + + + + + + + + + + + + + + + + { + if (value.includes(',')) + params.amount = params.amount.replace(',', '.'); + } + " + :rules="[ + (val) => isValidNumber(val) || !val || 'Please type a number', + ]" + lazy-rules + > + + + + + + - - - - - - - - - + + + + + + + + diff --git a/src/pages/Department/Card/DepartmentDescriptor.vue b/src/pages/Department/Card/DepartmentDescriptor.vue index 1f7e6dcbb..bd96812c9 100644 --- a/src/pages/Department/Card/DepartmentDescriptor.vue +++ b/src/pages/Department/Card/DepartmentDescriptor.vue @@ -90,17 +90,15 @@ const removeDepartment = () => { - - + + diff --git a/src/pages/Entry/EntryFilter.vue b/src/pages/Entry/EntryFilter.vue index 7eeffcee7..f137b05e8 100644 --- a/src/pages/Entry/EntryFilter.vue +++ b/src/pages/Entry/EntryFilter.vue @@ -54,164 +54,153 @@ const suppliersOptions = ref([]); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ - scope.opt?.name + ': ' + scope.opt?.nickname - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ + scope.opt?.name + ': ' + scope.opt?.nickname + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - en: params: diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue index 40747178c..0cf707efa 100644 --- a/src/pages/Entry/EntryList.vue +++ b/src/pages/Entry/EntryList.vue @@ -47,7 +47,7 @@ onMounted(async () => { - + { - - es: Search entries: Buscar entradas diff --git a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue index a46978458..2f8435166 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue @@ -4,11 +4,12 @@ import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import { useQuasar } from 'quasar'; import { useArrayData } from 'src/composables/useArrayData'; - import { downloadFile } from 'src/composables/downloadFile'; -import FetchData from 'src/components/FetchData.vue'; + import FormModel from 'components/FormModel.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; +import FetchData from 'src/components/FetchData.vue'; + import axios from 'axios'; const quasar = useQuasar(); @@ -21,9 +22,6 @@ const arrayData = useArrayData('InvoiceIn'); const invoiceIn = computed(() => arrayData.store.data); const userConfig = ref(null); -const suppliers = ref([]); -const suppliersRef = ref(); -const suppliersRefFilter = ref({ fields: ['id', 'nickname'], limit: 30 }); const currencies = ref([]); const currenciesRef = ref(); const companies = ref([]); @@ -131,31 +129,13 @@ async function upsert() { }); } } - -function supplierRefFilter(val) { - let where = { limit: 30 }; - let params = {}; - let key = 'nickname'; - - if (new RegExp(/\d/g).test(val)) { - key = 'id'; - } - params = { [key]: { like: `%${val}%` } }; - where = Object.assign(where, params); - suppliersRef.value.fetch({ where }); -} - (suppliers = data)" - /> (currencies = data)" auto-load /> @@ -163,7 +143,7 @@ function supplierRefFilter(val) { ref="companiesRef" url="Companies" :filter="{ fields: ['id', 'code'] }" - order="code" + sort-by="code" @on-fetch="(data) => (companies = data)" auto-load /> @@ -171,7 +151,7 @@ function supplierRefFilter(val) { ref="dmsTypesRef" url="DmsTypes" :filter="{ fields: ['id', 'name'] }" - order="name" + sort-by="name" @on-fetch="(data) => (dmsTypes = data)" auto-load /> @@ -179,7 +159,7 @@ function supplierRefFilter(val) { ref="warehousesRef" url="Warehouses" :filter="{ fields: ['id', 'name'] }" - order="name" + sort-by="name" @on-fetch="(data) => (warehouses = data)" auto-load /> @@ -199,15 +179,13 @@ function supplierRefFilter(val) { @@ -418,7 +396,6 @@ function supplierRefFilter(val) { - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - @@ -97,126 +163,45 @@ const suppliersRef = ref(); - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - en: params: diff --git a/src/pages/InvoiceIn/InvoiceInList.vue b/src/pages/InvoiceIn/InvoiceInList.vue index 869377209..ea26e8162 100644 --- a/src/pages/InvoiceIn/InvoiceInList.vue +++ b/src/pages/InvoiceIn/InvoiceInList.vue @@ -71,7 +71,7 @@ function viewSummary(id) { - + - - es: Search invoice: Buscar factura emitida diff --git a/src/pages/InvoiceOut/InvoiceOutFilter.vue b/src/pages/InvoiceOut/InvoiceOutFilter.vue index 124ea00d1..f8a430b51 100644 --- a/src/pages/InvoiceOut/InvoiceOutFilter.vue +++ b/src/pages/InvoiceOut/InvoiceOutFilter.vue @@ -41,95 +41,89 @@ function setWorkers(data) { - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index 292fa2e0a..8d3583da3 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -11,6 +11,7 @@ import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; import InvoiceOutFilter from './InvoiceOutFilter.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import CardList from 'src/components/ui/CardList.vue'; +import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; const { t } = useI18n(); const selectedCards = ref(new Map()); @@ -129,8 +130,8 @@ const downloadCsv = () => { url="InvoiceOuts/filter" > - - + + { :model-value="selectedCards.size === rows.length" class="q-mr-md" /> - - + + - + { - - en: searchInvoice: Search issued invoice diff --git a/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue b/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue index 028246aeb..3adfa1d13 100644 --- a/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue +++ b/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue @@ -27,87 +27,83 @@ const props = defineProps({ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - en: params: diff --git a/src/pages/Item/Card/ItemCard.vue b/src/pages/Item/Card/ItemCard.vue new file mode 100644 index 000000000..57c3a434d --- /dev/null +++ b/src/pages/Item/Card/ItemCard.vue @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue new file mode 100644 index 000000000..362fcfc67 --- /dev/null +++ b/src/pages/Item/Card/ItemDescriptor.vue @@ -0,0 +1,316 @@ + + + + { + item = data; + setData(data); + } + " + > + + + + {{ t('Regularize stock') }} + + + + + + + + {{ t('Clone') }} + + + + + + + + + + + + + + {{ t('item.descriptor.item') }} + + + + + + + + + + + + + + + + + {{ t('item.descriptor.visible') }} + + {{ + visible + }} + + + + {{ t('item.descriptor.available') }} + + {{ + available + }} + + + + {{ warehouseText }} + + + + + + + + + {{ t('item.descriptor.buyer') }} + + + + + + + + + + + + {{ t('item.descriptor.itemDiary') }} + + + + + + + +es: + Regularize stock: Regularizar stock + Clone: Clonar + All it's properties will be copied: Todas sus propiedades serán copiadas + Do you want to clone this item?: ¿Desea clonar este artículo? + + + diff --git a/src/pages/Item/Card/ItemDescriptorProxy.vue b/src/pages/Item/Card/ItemDescriptorProxy.vue new file mode 100644 index 000000000..58471dc83 --- /dev/null +++ b/src/pages/Item/Card/ItemDescriptorProxy.vue @@ -0,0 +1,26 @@ + + + + + + + diff --git a/src/pages/Item/Card/ItemDiary.vue b/src/pages/Item/Card/ItemDiary.vue new file mode 100644 index 000000000..21249349f --- /dev/null +++ b/src/pages/Item/Card/ItemDiary.vue @@ -0,0 +1 @@ +Item diary (CREAR CUANDO SE DESARROLLE EL MODULO DE ITEMS) diff --git a/src/pages/Item/Card/ItemSummary.vue b/src/pages/Item/Card/ItemSummary.vue new file mode 100644 index 000000000..567fbf32b --- /dev/null +++ b/src/pages/Item/Card/ItemSummary.vue @@ -0,0 +1 @@ +Item summary diff --git a/src/pages/Item/Card/ItemSummaryDialog.vue b/src/pages/Item/Card/ItemSummaryDialog.vue new file mode 100644 index 000000000..4af617fd9 --- /dev/null +++ b/src/pages/Item/Card/ItemSummaryDialog.vue @@ -0,0 +1,5 @@ + + Item summary dialog (A DESARROLLAR CUANDO SE CREE EL MODULO DE ITEMS) + diff --git a/src/pages/Item/Card/ItemTags.vue b/src/pages/Item/Card/ItemTags.vue new file mode 100644 index 000000000..95f4380e4 --- /dev/null +++ b/src/pages/Item/Card/ItemTags.vue @@ -0,0 +1 @@ +Item tags (CREAR CUANDO SE DESARROLLE EL MODULO DE ITEMS) diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue new file mode 100644 index 000000000..49a5dbb64 --- /dev/null +++ b/src/pages/Item/ItemList.vue @@ -0,0 +1 @@ +Item list diff --git a/src/pages/Item/ItemMain.vue b/src/pages/Item/ItemMain.vue new file mode 100644 index 000000000..c1f2a31db --- /dev/null +++ b/src/pages/Item/ItemMain.vue @@ -0,0 +1,18 @@ + + + + + + + + + + + + diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue index c325a9b05..760c48726 100644 --- a/src/pages/Order/Card/OrderCatalogFilter.vue +++ b/src/pages/Order/Card/OrderCatalogFilter.vue @@ -219,183 +219,181 @@ const getCategoryClass = (category, params) => { - - - - - - {{ t(category.name) }} - - - - - - - { - selectedTypeFk = value; - searchFn(); - } - " - > - - - - {{ opt.name }} - - {{ opt.categoryName }} - - - - - - - - - - - onOrderChange(value, params, searchFn) - " - /> - - - - - onOrderFieldChange(value, params, searchFn) - " - /> - - - - - - - - - + - + + + {{ t(category.name) }} + + + + + + { + selectedTypeFk = value; + searchFn(); + } + " + > + + + + {{ opt.name }} + + {{ opt.categoryName }} + + + + + + + + + + + onOrderChange(value, params, searchFn) + " /> + + + + + onOrderFieldChange(value, params, searchFn) + " + /> + + + + + + + + + + + - (tagOptions = data)" - /> + (tagOptions = data)" + /> - + + + + + + + - - - - - - - - - - - + + + diff --git a/src/pages/Order/Card/OrderCatalogItem.vue b/src/pages/Order/Card/OrderCatalogItem.vue index bc448eb8c..ee73bcffb 100644 --- a/src/pages/Order/Card/OrderCatalogItem.vue +++ b/src/pages/Order/Card/OrderCatalogItem.vue @@ -1,10 +1,13 @@ @@ -70,7 +70,7 @@ function extractTags(items) { - + diff --git a/src/pages/Order/OrderVolume.vue b/src/pages/Order/OrderVolume.vue index 4f4c269f6..5bb106edc 100644 --- a/src/pages/Order/OrderVolume.vue +++ b/src/pages/Order/OrderVolume.vue @@ -35,7 +35,7 @@ const loadVolumes = async (rows) => { auto-load /> - + { } @@ -527,4 +525,6 @@ es: Cancel: Cancelar Clone: Clonar Mark as served: Marcar como servidas + Add ticket: Añadir tickets + Preview: Vista previa diff --git a/src/pages/Shelving/Card/ShelvingFilter.vue b/src/pages/Shelving/Card/ShelvingFilter.vue index 423402f89..6767f6d97 100644 --- a/src/pages/Shelving/Card/ShelvingFilter.vue +++ b/src/pages/Shelving/Card/ShelvingFilter.vue @@ -41,7 +41,11 @@ function setParkings(data) { @on-fetch="setWorkers" auto-load /> - + {{ t(`params.${tag.label}`) }}: @@ -49,59 +53,57 @@ function setParkings(data) { - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/Shelving/ShelvingList.vue b/src/pages/Shelving/ShelvingList.vue index 71b3a6ccf..c884dc5f4 100644 --- a/src/pages/Shelving/ShelvingList.vue +++ b/src/pages/Shelving/ShelvingList.vue @@ -74,7 +74,7 @@ function exprBuilder(param, value) { - + - - diff --git a/src/pages/Supplier/Card/SupplierAccounts.vue b/src/pages/Supplier/Card/SupplierAccounts.vue index 30edfb2fd..b4aac8c38 100644 --- a/src/pages/Supplier/Card/SupplierAccounts.vue +++ b/src/pages/Supplier/Card/SupplierAccounts.vue @@ -99,14 +99,19 @@ onMounted(() => { class="row q-gutter-md q-mb-md" > - + + + + {{ + t('components.iban_tooltip') + }} + + + { + > + + + {{ + t( + 'Name of the bank account holder if different from the provider' + ) + }} + + + { Do you want to change the pay method to wire transfer?: ¿Quieres modificar la forma de pago a transferencia? Add account: Añadir cuenta Remove account: Remover cuenta + Name of the bank account holder if different from the provider: Nombre del titular de la cuenta bancaria en caso de ser diferente del proveedor diff --git a/src/pages/Supplier/Card/SupplierAddresses.vue b/src/pages/Supplier/Card/SupplierAddresses.vue index df7cff932..c6b08075f 100644 --- a/src/pages/Supplier/Card/SupplierAddresses.vue +++ b/src/pages/Supplier/Card/SupplierAddresses.vue @@ -47,7 +47,7 @@ const redirectToUpdateView = (addressData) => { - + { - - diff --git a/src/pages/Supplier/Card/SupplierAddressesCreate.vue b/src/pages/Supplier/Card/SupplierAddressesCreate.vue index 8ad0959f5..60a803ee1 100644 --- a/src/pages/Supplier/Card/SupplierAddressesCreate.vue +++ b/src/pages/Supplier/Card/SupplierAddressesCreate.vue @@ -147,8 +147,6 @@ onMounted(() => { option-value="id" /> - - { v-model="data.provinceFk" /> + + - - - diff --git a/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue b/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue index 00f0b868f..17786c1ea 100644 --- a/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue +++ b/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue @@ -80,8 +80,6 @@ const onDataSaved = () => { type="number" /> - - { type="number" /> + + { type="number" /> - - { type="number" /> - diff --git a/src/pages/Supplier/Card/SupplierBasicData.vue b/src/pages/Supplier/Card/SupplierBasicData.vue index b73ce9346..bc50deb9b 100644 --- a/src/pages/Supplier/Card/SupplierBasicData.vue +++ b/src/pages/Supplier/Card/SupplierBasicData.vue @@ -48,6 +48,13 @@ const workersOptions = ref([]); map-options :rules="validate('supplier.workerFk')" > + + + {{ + t('Responsible for approving invoices') + }} + + @@ -88,10 +95,14 @@ const workersOptions = ref([]); type="textarea" v-model="data.note" fill-input - autogrow /> + + +es: + Responsible for approving invoices: Responsable de aprobar las facturas + diff --git a/src/pages/Supplier/Card/SupplierBillingData.vue b/src/pages/Supplier/Card/SupplierBillingData.vue index 1237a0403..bf5ccb115 100644 --- a/src/pages/Supplier/Card/SupplierBillingData.vue +++ b/src/pages/Supplier/Card/SupplierBillingData.vue @@ -13,6 +13,13 @@ const { t } = useI18n(); const paymethodsOptions = ref([]); const payDemsOptions = ref([]); + +const formatPayDems = (data) => { + payDemsOptions.value = data.map(({ id, payDem }) => ({ + id: id, + payDem: payDem || '0', + })); +}; (paymethodsOptions = data)" auto-load /> - (payDemsOptions = data)" auto-load /> + formatPayDems(data)" auto-load /> @@ -49,7 +55,6 @@ const payDemsOptions = ref([]); option-value="id" option-label="payDem" hide-selected - map-options :rules="validate('supplier.payDemFk')" /> diff --git a/src/pages/Supplier/Card/SupplierCard.vue b/src/pages/Supplier/Card/SupplierCard.vue index 1b9b858d3..ddac988e7 100644 --- a/src/pages/Supplier/Card/SupplierCard.vue +++ b/src/pages/Supplier/Card/SupplierCard.vue @@ -14,6 +14,7 @@ const { t } = useI18n(); diff --git a/src/pages/Supplier/Card/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue index 714499f63..59dd2281c 100644 --- a/src/pages/Supplier/Card/SupplierConsumption.vue +++ b/src/pages/Supplier/Card/SupplierConsumption.vue @@ -1,47 +1,64 @@ - (suppliersConsumption = data)" - :filter="{ - where: { supplierFk: route.params.id }, - order: ['itemTypeFk', 'itemName', 'itemSize'], - }" - :params="userParams" - auto-load - /> - - - - - {{ t('Open as PDF') }} - - - - - {{ t('Send to email') }} - - - - - - + + + + {{ t('Open as PDF') }} + + + + + {{ t('Send to email') }} + + + + + + + + + @@ -156,7 +169,10 @@ const calculateTotal = (buysArray) => { {{ row.invoiceNumber }} - {{ buy.itemName }} + + {{ buy.itemName }} + + {{ buy.subName }} diff --git a/src/pages/Supplier/Card/SupplierConsumptionFilter.vue b/src/pages/Supplier/Card/SupplierConsumptionFilter.vue new file mode 100644 index 000000000..339a9d0d9 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierConsumptionFilter.vue @@ -0,0 +1,181 @@ + + + + (buyersOptions = data)" + auto-load + /> + (itemTypesOptions = data)" + auto-load + /> + (itemCategoriesOptions = data)" + auto-load + /> + + + + {{ t(`params.${tag.label}`) }}: + {{ formatFn(tag.value) }} + + + + + + + + + + + + + + + + + + + + + + + + + {{ scope.opt?.name }} + {{ + scope.opt?.category?.name + }} + + + + + + + + + + + + + + + + + + + + + + + + + + +en: + params: + search: General search + itemId: Item id + buyerId: Buyer + typeId: Type + categoryId: Category + from: From + to: To +es: + params: + search: Búsqueda general + itemId: Id Artículo + buyerId: Comprador + typeId: Tipo + categoryId: Reino + from: Desde + to: Hasta + diff --git a/src/pages/Supplier/Card/SupplierDescriptor.vue b/src/pages/Supplier/Card/SupplierDescriptor.vue index 43857fd1e..83bad87d2 100644 --- a/src/pages/Supplier/Card/SupplierDescriptor.vue +++ b/src/pages/Supplier/Card/SupplierDescriptor.vue @@ -1,10 +1,14 @@ @@ -73,6 +103,22 @@ const setData = (entity) => { @on-fetch="setData" data-key="Supplier" > + + + + {{ t('Go to module index') }} + + + @@ -87,8 +133,69 @@ const setData = (entity) => { + + + + {{ t('Inactive supplier') }} + + + {{ t('Unverified supplier') }} + + + + + + + {{ t('All entries with current supplier') }} + + + {{ t('Go to client') }} + + + {{ t('Create invoiceIn') }} + + + - + +es: + All entries with current supplier: Todas las entradas con proveedor actual + Go to client: Ir a cliente + Create invoiceIn: Crear factura recibida + Go to module index: Ir al índice del módulo + Inactive supplier: Proveedor inactivo + Unverified supplier: Proveedor no verificado diff --git a/src/pages/Supplier/Card/SupplierFiscalData.vue b/src/pages/Supplier/Card/SupplierFiscalData.vue index d481d6205..b26582065 100644 --- a/src/pages/Supplier/Card/SupplierFiscalData.vue +++ b/src/pages/Supplier/Card/SupplierFiscalData.vue @@ -8,31 +8,24 @@ import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; -import VnSelectCreate from 'src/components/common/VnSelectCreate.vue'; -import CustomerCreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue'; +import VnLocation from 'src/components/common/VnLocation.vue'; const route = useRoute(); const { t } = useI18n(); -const postcodeFetchDataRef = ref(null); -const townsFetchDataRef = ref(null); const sageTaxTypesOptions = ref([]); const sageWithholdingsOptions = ref([]); const sageTransactionTypesOptions = ref([]); const supplierActivitiesOptions = ref([]); const postcodesOptions = ref([]); -const provincesLocationOptions = ref([]); -const townsLocationOptions = ref([]); -const countriesOptions = ref([]); -const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formData) => { - await postcodeFetchDataRef.value.fetch(); - await townsFetchDataRef.value.fetch(); - formData.postCode = code; - formData.provinceFk = provinceFk; - formData.city = townsLocationOptions.value.find((town) => town.id === townFk).name; - formData.countryFk = countryFk; -}; +function handleLocation(data, location) { + const { town, code, provinceFk, countryFk } = location ?? {}; + data.postcode = code; + data.city = town; + data.provinceFk = provinceFk; + data.countryFk = countryFk; +} (supplierActivitiesOptions = data)" /> - (postcodesOptions = data)" - auto-load - /> - (townsLocationOptions = data)" - auto-load - url="Towns/location" - /> - (provincesLocationOptions = data)" - auto-load - url="Provinces/location" - /> - (countriesOptions = data)" - auto-load - url="Countries" - /> + + - handleLocation(data, location)" > - - - - - - - {{ scope.opt.code }} - {{ scope.opt.code }} - - {{ scope.opt.town.name }} ({{ - scope.opt.town.province.name - }}, - {{ - scope.opt.town.province.country.country - }}) - - - - + - - - - - - {{ scope.opt.name }} - {{ scope.opt.name }}, - {{ scope.opt.province.name }} ({{ - scope.opt.province.country.country - }}) - - - - - - - - - - - {{ - `${scope.opt.name} (${scope.opt.country.country})` - }} - - - - - - - - - - import { reactive } from 'vue'; import { useI18n } from 'vue-i18n'; +import { useRouter } from 'vue-router'; + import VnSearchbar from 'components/ui/VnSearchbar.vue'; import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; @@ -9,12 +11,17 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import { useStateStore } from 'stores/useStateStore'; +const router = useRouter(); const { t } = useI18n(); const stateStore = useStateStore(); const newSupplierForm = reactive({ name: null, }); + +const redirectToSupplierFiscalData = (_, responseData) => { + router.push({ name: 'SupplierFiscalData', params: { id: responseData.id } }); +}; @@ -34,6 +41,7 @@ const newSupplierForm = reactive({ url-create="Suppliers/newSupplier" model="supplier" :form-initial-data="newSupplierForm" + @on-data-saved="redirectToSupplierFiscalData" > diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue index ea7bc3cb0..f4875fc99 100644 --- a/src/pages/Supplier/SupplierList.vue +++ b/src/pages/Supplier/SupplierList.vue @@ -1,13 +1,16 @@ + + + (provincesOptions = data)" + auto-load + /> + (countriesOptions = data)" + auto-load + /> + + + + {{ t(`params.${tag.label}`) }}: + {{ formatFn(tag.value) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +en: + params: + search: General search + nickname: Alias + nif: Tax number + provinceFk: Province + countryFk: Country +es: + params: + search: Búsqueda general + nickname: Alias + nif: NIF/CIF + provinceFk: Provincia + countryFk: País + diff --git a/src/pages/Ticket/TicketFilter.vue b/src/pages/Ticket/TicketFilter.vue index b0b584257..7b74117bb 100644 --- a/src/pages/Ticket/TicketFilter.vue +++ b/src/pages/Ticket/TicketFilter.vue @@ -56,66 +56,138 @@ const warehouses = ref(); - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - + + + + - - + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index 9186eb6ad..6f57ad0b9 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -74,7 +74,7 @@ function viewSummary(id) { - + - - es: Search ticket: Buscar ticket diff --git a/src/pages/Travel/ExtraCommunity.vue b/src/pages/Travel/ExtraCommunity.vue index 18824503f..2dcd4bb51 100644 --- a/src/pages/Travel/ExtraCommunity.vue +++ b/src/pages/Travel/ExtraCommunity.vue @@ -17,6 +17,7 @@ import { useArrayData } from 'composables/useArrayData'; import { toDate } from 'src/filters'; import { usePrintService } from 'composables/usePrintService'; import travelService from 'src/services/travel.service'; +import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; const router = useRouter(); const stateStore = useStateStore(); @@ -259,10 +260,8 @@ onMounted(async () => { /> - - - - + + { {{ t('Open as PDF') }} - - + + diff --git a/src/pages/Travel/ExtraCommunityFilter.vue b/src/pages/Travel/ExtraCommunityFilter.vue index 260b0fb42..cac8e093d 100644 --- a/src/pages/Travel/ExtraCommunityFilter.vue +++ b/src/pages/Travel/ExtraCommunityFilter.vue @@ -66,158 +66,149 @@ const decrement = (paramsObj, key) => { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - en: addEntry: Add entry diff --git a/src/pages/Wagon/Type/WagonTypeList.vue b/src/pages/Wagon/Type/WagonTypeList.vue index 8e4ace744..a7c713039 100644 --- a/src/pages/Wagon/Type/WagonTypeList.vue +++ b/src/pages/Wagon/Type/WagonTypeList.vue @@ -42,7 +42,7 @@ async function remove(row) { - + - - diff --git a/src/pages/Wagon/WagonList.vue b/src/pages/Wagon/WagonList.vue index 77d9da0bf..18417f433 100644 --- a/src/pages/Wagon/WagonList.vue +++ b/src/pages/Wagon/WagonList.vue @@ -48,7 +48,7 @@ async function remove(row) { - + - - diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue index f089c0022..bec56bee7 100644 --- a/src/pages/Worker/Card/WorkerDescriptor.vue +++ b/src/pages/Worker/Card/WorkerDescriptor.vue @@ -101,7 +101,7 @@ const setData = (entity) => { - + - + { bankEntitiesOptions.value.push(data); }; -const onPostcodeCreated = async ({ code, provinceFk, townFk }, formData) => { - await postcodeFetchDataRef.value.fetch(); - await townsFetchDataRef.value.fetch(); - formData.postcode = code; - formData.provinceFk = provinceFk; - formData.city = townsOptions.value.find((town) => town.id === townFk).name; -}; + +function handleLocation(data, location ) { + const { town, postcode: code, provinceFk, countryFk } = location ?? {} + data.postcode = code; + data.city = town; + data.provinceFk = provinceFk; + data.countryFk = countryFk; +} onMounted(async () => { const userInfo = await useUserConfig().fetch(); @@ -88,25 +78,7 @@ onMounted(async () => { :filter="workerConfigFilter" auto-load /> - (postcodesOptions = data)" - auto-load - /> - (provincesOptions = data)" - :filter="provincesFilter" - auto-load - /> - (townsOptions = data)" - :filter="townsFilter" - auto-load - /> + (companiesOptions = data)" @@ -184,77 +156,19 @@ onMounted(async () => { - - - - - - - - {{ scope.opt.code }} - {{ scope.opt.code }} - - {{ scope.opt.town.name }} ({{ - scope.opt.town.province.name - }}, - {{ - scope.opt.town.province.country.country - }}) - - - - - - - + v-model="data.location" + @update:model-value=" + (location) => handleLocation(data, location) + " + > + - - - - - - {{ scope.opt.name }} - {{ scope.opt.name }}, - {{ scope.opt.province.name }} ({{ - scope.opt.province.country.country - }}) - - - - - { v-model="data.iban" :label="t('worker.create.iban')" :rules="validate('Worker.iban')" - /> + > + + + {{ + t('components.iban_tooltip') + }} + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index e7e86d16e..0e9868a04 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -64,7 +64,7 @@ const redirectToCreateView = () => { - + { - - es: Search worker: Buscar trabajador diff --git a/src/router/modules/index.js b/src/router/modules/index.js index cc5034959..84a26798d 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -1,3 +1,4 @@ +import Item from './item'; import Customer from './customer'; import Ticket from './ticket'; import Claim from './claim'; @@ -14,6 +15,7 @@ import Department from './department'; import Entry from './entry'; export default [ + Item, Customer, Ticket, Claim, diff --git a/src/router/modules/item.js b/src/router/modules/item.js new file mode 100644 index 000000000..d3462e15c --- /dev/null +++ b/src/router/modules/item.js @@ -0,0 +1,70 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/item', + name: 'Item', + meta: { + title: 'items', + icon: 'vn:item', + }, + component: RouterView, + redirect: { name: 'ItemMain' }, + menus: { + main: [], + card: [], + }, + children: [ + { + path: '', + name: 'ItemMain', + component: () => import('src/pages/Item/ItemMain.vue'), + redirect: { name: 'Itemlist' }, + children: [ + { + path: 'list', + name: 'ItemList', + meta: { + title: 'list', + icon: 'view_list', + }, + component: () => import('src/pages/Item/ItemList.vue'), + }, + ], + }, + { + name: 'ItemCard', + path: ':id', + component: () => import('src/pages/Item/Card/ItemCard.vue'), + redirect: { name: 'ItemSummary' }, + children: [ + { + name: 'ItemSummary', + path: 'summary', + meta: { + title: 'summary', + icon: 'launch', + }, + component: () => import('src/pages/Item/Card/ItemSummary.vue'), + }, + { + path: 'diary', + name: 'ItemDiary', + meta: { + title: 'diary', + icon: 'vn:transaction', + }, + component: () => import('src/pages/Item/Card/ItemDiary.vue'), + }, + { + path: 'tags', + name: 'ItemTags', + meta: { + title: 'Tags', + icon: 'vn:tags', + }, + component: () => import('src/pages/Item/Card/ItemTags.vue'), + }, + ], + }, + ], +}; diff --git a/src/router/routes.js b/src/router/routes.js index 6a2fa6a97..d1027955f 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -1,3 +1,4 @@ +import item from './modules/item'; import customer from './modules/customer'; import ticket from './modules/ticket'; import claim from './modules/claim'; @@ -51,6 +52,7 @@ const routes = [ component: () => import('../pages/Dashboard/DashboardMain.vue'), }, // Module routes + item, customer, ticket, claim, diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index 2eda6f686..568063d1d 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -7,19 +7,19 @@ import routes from 'src/router/modules'; export const useNavigationStore = defineStore('navigationStore', () => { const modules = [ - 'customer', - 'claim', - 'ticket', - 'invoiceOut', - 'invoiceIn', - 'worker', 'shelving', 'order', - 'wagon', - 'route', - 'supplier', - 'travel', + 'customer', 'entry', + 'travel', + 'invoiceOut', + 'invoiceIn', + 'supplier', + 'claim', + 'route', + 'ticket', + 'worker', + 'wagon', ]; const pinnedModules = ref([]); const role = useRole(); diff --git a/test/cypress/integration/VnLocation.spec.js b/test/cypress/integration/VnLocation.spec.js new file mode 100644 index 000000000..02b924e4d --- /dev/null +++ b/test/cypress/integration/VnLocation.spec.js @@ -0,0 +1,48 @@ +const locationOptions ='[role="listbox"] > div.q-virtual-scroll__content > .q-item' +describe('VnLocation', () => { + describe('Create',()=>{ + const inputLocation = ':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control'; + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('/#/worker/create'); + cy.waitForElement('.q-card'); + }); + + it('Show all options', function() { + cy.get(inputLocation).click(); + cy.get(locationOptions).should('have.length',5); + }); + + it('input filter location as "al"', function() { + cy.get(inputLocation).click(); + cy.get(inputLocation).clear(); + cy.get(inputLocation).type('al'); + cy.get(locationOptions).should('have.length',3); + }); + it('input filter location as "ecuador"', function() { + cy.get(inputLocation).click(); + cy.get(inputLocation).clear(); + cy.get(inputLocation).type('ecuador'); + cy.get(locationOptions).should('have.length',1); + cy.get(`${locationOptions}:nth-child(1)`).click(); + cy.get(':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon').click(); + + }); + }); + describe('Fiscal-data',()=>{ + const inputLocation = ':nth-child(6) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control'; + + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('/#/supplier/567/fiscal-data', {timeout: 2000}); + cy.waitForElement('.q-card'); + }); + + it('Show all options', function() { + cy.get(inputLocation).click(); + cy.get(locationOptions).should('have.length', 1); + }); + }); +}) diff --git a/test/cypress/integration/claim/claimAction.spec.js b/test/cypress/integration/claim/claimAction.spec.js index f181722fa..685e120ce 100644 --- a/test/cypress/integration/claim/claimAction.spec.js +++ b/test/cypress/integration/claim/claimAction.spec.js @@ -31,7 +31,6 @@ describe('ClaimAction', () => { it('should regularize', () => { cy.get('[title="Regularize"]').click(); - cy.clickConfirm(); }); it('should remove the line', () => { diff --git a/test/cypress/integration/invoiceIn/invoiceInBasicData.spec.js b/test/cypress/integration/invoiceIn/invoiceInBasicData.spec.js index 0013df343..7617a69d1 100644 --- a/test/cypress/integration/invoiceIn/invoiceInBasicData.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInBasicData.spec.js @@ -16,11 +16,12 @@ describe('InvoiceInBasicData', () => { cy.get(selects).eq(0).type('Bros'); cy.get(selects).eq(0).type('{enter}'); + cy.get('[title="Reset"]').click(); cy.get(appendBtns).eq(0).click(); cy.get('input').eq(2).type(4739); cy.saveCard(); - cy.get(`${selects} input`).eq(0).invoke('val').should('eq', 'Bros nick'); + cy.get(`${selects} input`).eq(0).invoke('val').should('eq', 'Plants nick'); cy.get('input').eq(2).invoke('val').should('eq', '4739'); });
@@ -250,13 +241,31 @@ async function importToNewRefundTicket() {