diff --git a/cypress.config.js b/cypress.config.js index 1100b59b1..c21fd5819 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -34,5 +34,7 @@ module.exports = defineConfig({ require('cypress-mochawesome-reporter/plugin')(on); // implement node event listeners here }, + viewportWidth: 1280, + viewportHeight: 720, }, }); diff --git a/package.json b/package.json index 9d14e8727..8f482a57d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "25.04.0", + "version": "25.06.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", diff --git a/src/components/common/RightMenu.vue b/src/components/common/RightMenu.vue index 32dc2874d..9512d32d4 100644 --- a/src/components/common/RightMenu.vue +++ b/src/components/common/RightMenu.vue @@ -1,29 +1,17 @@ @@ -159,7 +166,16 @@ const handleInsertMode = (e) => { emit('remove'); } " + > + + + @@ -170,3 +186,14 @@ const handleInsertMode = (e) => { + + + en: + inputMin: Must be more than {value} + maxLength: The value exceeds {value} characters + inputMax: Must be less than {value} + es: + inputMin: Debe ser mayor a {value} + maxLength: El valor excede los {value} carácteres + inputMax: Debe ser menor a {value} + \ No newline at end of file diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index 952a843e3..a8888aad8 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -105,6 +105,7 @@ const manageDate = (date) => { :rules="mixinRules" :clearable="false" @click="isPopupOpen = !isPopupOpen" + @keydown="isPopupOpen = false" hide-bottom-space > diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue index 4147f8976..323427f5b 100644 --- a/src/components/common/VnInputTime.vue +++ b/src/components/common/VnInputTime.vue @@ -79,6 +79,7 @@ function dateToTime(newDate) { style="min-width: 100px" :rules="mixinRules" @click="isPopupOpen = !isPopupOpen" + @keydown="isPopupOpen = false" type="time" hide-bottom-space > diff --git a/src/components/common/VnLocation.vue b/src/components/common/VnLocation.vue index 9f376c419..014b84b31 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 { computed } from 'vue'; +import { ref, watch } from 'vue'; import { useAttrs } from 'vue'; import { useRequired } from 'src/composables/useRequired'; const { t } = useI18n(); @@ -16,6 +16,14 @@ const props = defineProps({ }, }); +watch( + () => props.location, + (newValue) => { + if (!modelValue.value) return; + modelValue.value = formatLocation(newValue) ?? null; + } +); + const mixinRules = [requiredFieldRule]; const locationProperties = [ 'postcode', @@ -43,9 +51,7 @@ const formatLocation = (obj, properties = locationProperties) => { return filteredParts.join(', '); }; -const modelValue = computed(() => - props.location ? formatLocation(props.location, locationProperties) : null -); +const modelValue = ref(props.location ? formatLocation(props.location) : null); function showLabel(data) { const dataProperties = [ diff --git a/src/components/common/VnSection.vue b/src/components/common/VnSection.vue index edd8d3dfa..16ea79047 100644 --- a/src/components/common/VnSection.vue +++ b/src/components/common/VnSection.vue @@ -2,9 +2,10 @@ import RightMenu from './RightMenu.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; import VnTableFilter from '../VnTable/VnTableFilter.vue'; -import { onBeforeMount, computed } from 'vue'; +import { onBeforeMount, computed, ref } from 'vue'; import { useArrayData } from 'src/composables/useArrayData'; import { useRoute } from 'vue-router'; +import { useHasContent } from 'src/composables/useHasContent'; const $props = defineProps({ section: { @@ -51,10 +52,13 @@ const sectionValue = computed(() => $props.section ?? $props.dataKey); const isMainSection = computed(() => { const isSame = sectionValue.value == route.name; if (!isSame && arrayData) { - arrayData.reset(['userParams', 'userFilter']); + arrayData.reset(['userParams', 'filter']); + arrayData.setCurrentFilter(); } return isSame; }); +const searchbarId = 'section-searchbar'; +const hasContent = useHasContent(`#${searchbarId}`); onBeforeMount(() => { if ($props.dataKey) @@ -69,14 +73,14 @@ onBeforeMount(() => { + - diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index ee94a1d81..43134dbff 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -232,12 +232,15 @@ async function fetchFilter(val) { } else defaultWhere = { [key]: getVal(val) }; const where = { ...(val ? defaultWhere : {}), ...$props.where }; $props.exprBuilder && Object.assign(where, $props.exprBuilder(key, val)); - const fetchOptions = { where, include, limit }; - if (fields) fetchOptions.fields = fields; - if (sortBy) fetchOptions.order = sortBy; + const filterOptions = { where, include, limit }; + if (fields) filterOptions.fields = fields; + if (sortBy) filterOptions.order = sortBy; arrayData.resetPagination(); - const { data } = await arrayData.applyFilter({ filter: fetchOptions }); + const { data } = await arrayData.applyFilter( + { filter: filterOptions }, + { updateRouter: false } + ); setOptions(data); return data; } @@ -294,7 +297,7 @@ async function onScroll({ to, direction, from, index }) { } } -defineExpose({ opts: myOptions }); +defineExpose({ opts: myOptions, vnSelectRef }); function handleKeyDown(event) { if (event.key === 'Tab' && !event.shiftKey) { diff --git a/src/components/common/VnSelectDialog.vue b/src/components/common/VnSelectDialog.vue index 12322c3fa..a4cd0011d 100644 --- a/src/components/common/VnSelectDialog.vue +++ b/src/components/common/VnSelectDialog.vue @@ -1,5 +1,5 @@ emit('update:modelValue', ...args)" diff --git a/src/components/common/__tests__/VnInputDate.spec.js b/src/components/common/__tests__/VnInputDate.spec.js new file mode 100644 index 000000000..21ca91e96 --- /dev/null +++ b/src/components/common/__tests__/VnInputDate.spec.js @@ -0,0 +1,72 @@ +import { createWrapper } from 'app/test/vitest/helper.js'; +import { describe, it, expect } from 'vitest'; +import VnInputDate from 'components/common/VnInputDate.vue'; + +let vm; +let wrapper; + +function generateWrapper(date, outlined, required) { + wrapper = createWrapper(VnInputDate, { + props: { + modelValue: date, + }, + attrs: { + isOutlined: outlined, + required: required + }, + }); + wrapper = wrapper.wrapper; + vm = wrapper.vm; +}; + +describe('VnInputDate', () => { + + describe('formattedDate', () => { + it('formats a valid date correctly', async () => { + generateWrapper('2023-12-25', false, false); + await vm.$nextTick(); + expect(vm.formattedDate).toBe('25/12/2023'); + }); + + it('updates the model value when a new date is set', async () => { + const input = wrapper.find('input'); + await input.setValue('31/12/2023'); + expect(wrapper.emitted()['update:modelValue']).toBeTruthy(); + expect(wrapper.emitted()['update:modelValue'][0][0]).toBe('2023-12-31T00:00:00.000Z'); + }); + + it('should not update the model value when an invalid date is set', async () => { + const input = wrapper.find('input'); + await input.setValue('invalid-date'); + expect(wrapper.emitted()['update:modelValue'][0][0]).toBe('2023-12-31T00:00:00.000Z'); + }); + }); + + describe('styleAttrs', () => { + it('should return empty styleAttrs when isOutlined is false', async () => { + generateWrapper('2023-12-25', false, false); + await vm.$nextTick(); + expect(vm.styleAttrs).toEqual({}); + }); + + it('should set styleAttrs when isOutlined is true', async () => { + generateWrapper('2023-12-25', true, false); + await vm.$nextTick(); + expect(vm.styleAttrs.outlined).toBe(true); + }); + }); + + describe('required', () => { + it('should not applies required class when isRequired is false', async () => { + generateWrapper('2023-12-25', false, false); + await vm.$nextTick(); + expect(wrapper.find('.vn-input-date').classes()).not.toContain('required'); + }); + + it('should applies required class when isRequired is true', async () => { + generateWrapper('2023-12-25', false, true); + await vm.$nextTick(); + expect(wrapper.find('.vn-input-date').classes()).toContain('required'); + }); + }); +}); \ No newline at end of file diff --git a/src/components/common/__tests__/VnInputTime.spec.js b/src/components/common/__tests__/VnInputTime.spec.js new file mode 100644 index 000000000..2692ac71b --- /dev/null +++ b/src/components/common/__tests__/VnInputTime.spec.js @@ -0,0 +1,63 @@ +import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest'; +import { createWrapper } from 'app/test/vitest/helper'; +import VnInputTime from 'components/common/VnInputTime.vue'; + +describe('VnInputTime', () => { + let wrapper; + let vm; + + beforeAll(() => { + wrapper = createWrapper(VnInputTime, { + props: { + isOutlined: true, + timeOnly: false, + }, + }); + vm = wrapper.vm; + wrapper = wrapper.wrapper; + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + it('should return the correct data if isOutlined is true', () => { + expect(vm.isOutlined).toBe(true); + expect(vm.styleAttrs).toEqual({ dense: true, outlined: true, rounded: true }); + }); + + it('should return the formatted data', () => { + expect(vm.dateToTime('2022-01-01T03:23:43')).toBe('03:23'); + }); + + describe('formattedTime', () => { + it('should return the formatted time for a valid ISO date', () => { + vm.model = '2025-01-02T15:45:00'; + expect(vm.formattedTime).toBe('15:45'); + }); + + it('should handle null model value gracefully', () => { + vm.model = null; + expect(vm.formattedTime).toBe(null); + }); + + it('should handle time-only input correctly', async () => { + await wrapper.setProps({ timeOnly: true }); + vm.formattedTime = '14:30'; + expect(vm.model).toBe('14:30'); + }); + + it('should pad short time values correctly', async () => { + await wrapper.setProps({ timeOnly: true }); + vm.formattedTime = '9'; + expect(vm.model).toBe('09:00'); + }); + + it('should not update the model if the value is unchanged', () => { + vm.model = '14:30'; + const previousModel = vm.model; + vm.formattedTime = '14:30'; + expect(vm.model).toBe(previousModel); + }); + }); +}); \ No newline at end of file diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue index a1de3eee3..cf52bcd40 100644 --- a/src/components/ui/CardSummary.vue +++ b/src/components/ui/CardSummary.vue @@ -2,7 +2,6 @@ import { ref, computed, watch, onBeforeMount } from 'vue'; import { useRoute } from 'vue-router'; import SkeletonSummary from 'components/ui/SkeletonSummary.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; import { useArrayData } from 'src/composables/useArrayData'; import { isDialogOpened } from 'src/filters'; import VnMoreOptions from './VnMoreOptions.vue'; diff --git a/src/components/ui/FetchedTags.vue b/src/components/ui/FetchedTags.vue index 6e159087c..b3912f779 100644 --- a/src/components/ui/FetchedTags.vue +++ b/src/components/ui/FetchedTags.vue @@ -18,8 +18,7 @@ const $props = defineProps({ }, columns: { type: Number, - required: false, - default: null, + default: 3, }, }); diff --git a/src/components/ui/SkeletonSummary.vue b/src/components/ui/SkeletonSummary.vue index e8407ee7b..659d4c53d 100644 --- a/src/components/ui/SkeletonSummary.vue +++ b/src/components/ui/SkeletonSummary.vue @@ -1,38 +1,49 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue index bfaa76588..a5ca97b70 100644 --- a/src/components/ui/VnSearchbar.vue +++ b/src/components/ui/VnSearchbar.vue @@ -113,23 +113,20 @@ onMounted(() => { }); async function search() { - const staticParams = Object.keys(store.userParams ?? {}).length - ? store.userParams - : store.defaultParams; arrayData.resetPagination(); - const filter = { - params: { - search: searchText.value, - }, - filter: props.filter, - }; + let filter = { params: { search: searchText.value } }; if (!props.searchRemoveParams || !searchText.value) { - filter.params = { - ...staticParams, - search: searchText.value, + filter = { + params: { + ...store.userParams, + search: searchText.value, + }, + filter: store.filter, }; + } else { + arrayData.reset(['currentFilter', 'userParams']); } if (props.whereFilter) { diff --git a/src/components/ui/__tests__/CardSummary.spec.js b/src/components/ui/__tests__/CardSummary.spec.js new file mode 100644 index 000000000..411ebf9bb --- /dev/null +++ b/src/components/ui/__tests__/CardSummary.spec.js @@ -0,0 +1,78 @@ +import { vi, describe, expect, it, beforeAll, afterEach, beforeEach } from 'vitest'; +import { createWrapper, axios } from 'app/test/vitest/helper'; +import CardSummary from 'src/components/ui/CardSummary.vue'; +import * as vueRouter from 'vue-router'; + +describe('CardSummary', () => { + let vm; + let wrapper; + + beforeAll(() => { + vi.spyOn(axios, 'get').mockResolvedValue({ data: [] }); + }); + + vi.spyOn(vueRouter, 'useRoute').mockReturnValue({ + query: {}, + params: {}, + meta: { moduleName: 'mockName' }, + path: 'mockName/1/summary', + name: 'CardSummary', + }); + + beforeEach(() => { + wrapper = createWrapper(CardSummary, { + propsData: { + dataKey: 'cardSummaryKey', + url: 'cardSummaryUrl', + filter: 'cardFilter', + }, + }); + vm = wrapper.vm; + wrapper = wrapper.wrapper; + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + it('should fetch data correctly', async () => { + const fetchSpy = vi + .spyOn(vm.arrayData, 'fetch') + .mockResolvedValue({ data: [{ id: 1, name: 'Test Entity' }] }); + await vm.fetch(); + + expect(fetchSpy).toHaveBeenCalledWith({ append: false, updateRouter: false }); + expect(wrapper.emitted('onFetch')).toBeTruthy(); + expect(vm.isLoading).toBe(false); + }); + + it('should set correct props to the store', () => { + expect(vm.store.url).toEqual('cardSummaryUrl'); + expect(vm.store.filter).toEqual('cardFilter'); + }); + + it('should compute entity correctly from store data', () => { + vm.store.data = [{ id: 1, name: 'Entity 1' }]; + expect(vm.entity).toEqual({ id: 1, name: 'Entity 1' }); + }); + + it('should handle empty data gracefully', () => { + vm.store.data = []; + expect(vm.entity).toBeUndefined(); + }); + + it('should respond to prop changes and refetch data', async () => { + const newUrl = 'CardSummary/35'; + const newKey = 'cardSummaryKey/35'; + const fetchSpy = vi.spyOn(vm.arrayData, 'fetch'); + await wrapper.setProps({ url: newUrl, filter: { key: newKey } }); + + expect(fetchSpy).toHaveBeenCalled(); + expect(vm.store.url).toBe(newUrl); + expect(vm.store.filter).toEqual({ key: newKey }); + }); + + it('should return true if route path ends with /summary' , () => { + expect(vm.isSummary).toBe(true); + }); +}); \ No newline at end of file diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index c13c4f9a6..d76053ce9 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -7,7 +7,9 @@ import { isDialogOpened } from 'src/filters'; const arrayDataStore = useArrayDataStore(); -export function useArrayData(key = useRoute().meta.moduleName, userOptions) { +export function useArrayData(key, userOptions) { + key ??= useRoute().meta.moduleName; + if (!key) throw new Error('ArrayData: A key is required to use this composable'); if (!arrayDataStore.get(key)) arrayDataStore.set(key); @@ -31,10 +33,11 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { : JSON.parse(params?.filter ?? '{}'); delete params.filter; - store.userParams = { ...store.userParams, ...params }; + store.userParams = params; store.filter = { ...filter, ...store.userFilter }; if (filter?.order) store.order = filter.order; } + setCurrentFilter(); }); if (key && userOptions) setOptions(); @@ -76,11 +79,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { cancelRequest(); canceller = new AbortController(); - const { params, limit } = getCurrentFilter(); - - store.currentFilter = JSON.parse(JSON.stringify(params)); - delete store.currentFilter.filter.include; - store.currentFilter.filter = JSON.stringify(store.currentFilter.filter); + const { params, limit } = setCurrentFilter(); let exprFilter; if (store?.exprBuilder) { @@ -105,7 +104,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { store.hasMoreData = limit && response.data.length >= limit; if (!append && !isDialogOpened() && updateRouter) { - if (updateStateParams(response.data)?.redirect) return; + if (updateStateParams(response.data)?.redirect && !store.keepData) return; } store.isLoading = false; canceller = null; @@ -140,12 +139,12 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { } } - async function applyFilter({ filter, params }) { + async function applyFilter({ filter, params }, fetchOptions = {}) { if (filter) store.userFilter = filter; store.filter = {}; if (params) store.userParams = { ...params }; - const response = await fetch({}); + const response = await fetch(fetchOptions); return response; } @@ -274,14 +273,14 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { } function getCurrentFilter() { + if (!Object.keys(store.userParams).length) + store.userParams = store.defaultParams ?? {}; + const filter = { limit: store.limit, + ...store.userFilter, }; - let userParams = { ...store.userParams }; - - Object.assign(filter, store.userFilter); - let where; if (filter?.where || store.filter?.where) where = Object.assign(filter?.where ?? {}, store.filter?.where ?? {}); @@ -289,7 +288,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { filter.where = where; const params = { filter }; - Object.assign(params, userParams); + Object.assign(params, store.userParams); if (params.filter) params.filter.skip = store.skip; if (store?.order && typeof store?.order == 'string') store.order = [store.order]; if (store.order?.length) params.filter.order = [...store.order]; @@ -298,6 +297,14 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { return { filter, params, limit: filter.limit }; } + function setCurrentFilter() { + const { params, limit } = getCurrentFilter(); + store.currentFilter = JSON.parse(JSON.stringify(params)); + delete store.currentFilter.filter.include; + store.currentFilter.filter = JSON.stringify(store.currentFilter.filter); + return { params, limit }; + } + function processData(data, { map = true, append = true }) { if (!append) { store.data = []; @@ -331,6 +338,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { applyFilter, addFilter, getCurrentFilter, + setCurrentFilter, addFilterWhere, addOrder, deleteOrder, diff --git a/src/composables/useFilterParams.js b/src/composables/useFilterParams.js index 2878e4b76..07dcdf99b 100644 --- a/src/composables/useFilterParams.js +++ b/src/composables/useFilterParams.js @@ -29,8 +29,12 @@ export function useFilterParams(key) { orders.value = orderObject; } - function setUserParams(watchedParams) { - if (!watchedParams || Object.keys(watchedParams).length == 0) return; + function setUserParams(watchedParams = {}) { + if (Object.keys(watchedParams).length == 0) { + params.value = {}; + orders.value = {}; + return; + } if (typeof watchedParams == 'string') watchedParams = JSON.parse(watchedParams); if (typeof watchedParams?.filter == 'string') diff --git a/src/composables/useHasContent.js b/src/composables/useHasContent.js new file mode 100644 index 000000000..8ab018376 --- /dev/null +++ b/src/composables/useHasContent.js @@ -0,0 +1,24 @@ +import { onMounted, ref } from 'vue'; + +export function useHasContent(selector) { + const container = ref({}); + const hasContent = ref(); + + onMounted(() => { + container.value = document.querySelector(selector); + if (!container.value) return; + + const observer = new MutationObserver(() => { + if (document.querySelector(selector)) + hasContent.value = !!container.value.childNodes.length; + }); + + observer.observe(container.value, { + subtree: true, + childList: true, + attributes: true, + }); + }); + + return hasContent; +} diff --git a/src/css/app.scss b/src/css/app.scss index d4790a6b8..a28a04a16 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -310,6 +310,14 @@ input::-webkit-inner-spin-button { .no-visible { visibility: hidden; } + +.q-item > .q-item__section:has(.q-checkbox) { + max-width: min-content; +} + +.row > .column:has(.q-checkbox) { + max-width: min-content; +} .q-field__inner { .q-field__control { min-height: auto !important; diff --git a/src/filters/index.js b/src/filters/index.js index a92d2eb07..bf1429aee 100644 --- a/src/filters/index.js +++ b/src/filters/index.js @@ -16,6 +16,7 @@ import getUpdatedValues from './getUpdatedValues'; import getParamWhere from './getParamWhere'; import parsePhone from './parsePhone'; import isDialogOpened from './isDialogOpened'; +import toCelsius from './toCelsius'; export { getUpdatedValues, @@ -36,4 +37,5 @@ export { dashIfEmpty, dateRange, getParamWhere, + toCelsius, }; diff --git a/src/filters/toCelsius.js b/src/filters/toCelsius.js new file mode 100644 index 000000000..83cab32ca --- /dev/null +++ b/src/filters/toCelsius.js @@ -0,0 +1,3 @@ +export default function toCelsius(value) { + return value ? `${value}°C` : ''; +} diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index bf001c9ba..473446970 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -346,6 +346,7 @@ globals: countryFk: Country companyFk: Company changePass: Change password + setPass: Set password deleteConfirmTitle: Delete selected elements changeState: Change state raid: 'Raid {daysInForward} days' @@ -388,80 +389,6 @@ cau: subtitle: By sending this ticket, all the data related to the error, the section, the user, etc., are already sent. inputLabel: Explain why this error should not appear askPrivileges: Ask for privileges -entry: - list: - newEntry: New entry - tableVisibleColumns: - created: Creation - supplierFk: Supplier - isBooked: Booked - isConfirmed: Confirmed - isOrdered: Ordered - companyFk: Company - travelFk: Travel - isExcludedFromAvailable: Inventory - invoiceAmount: Import - summary: - commission: Commission - currency: Currency - invoiceNumber: Invoice number - ordered: Ordered - booked: Booked - excludedFromAvailable: Inventory - travelReference: Reference - travelAgency: Agency - travelShipped: Shipped - travelDelivered: Delivered - travelLanded: Landed - travelReceived: Received - buys: Buys - stickers: Stickers - package: Package - packing: Pack. - grouping: Group. - buyingValue: Buying value - import: Import - pvp: PVP - basicData: - travel: Travel - currency: Currency - commission: Commission - observation: Observation - booked: Booked - excludedFromAvailable: Inventory - buys: - observations: Observations - packagingFk: Box - color: Color - printedStickers: Printed stickers - notes: - observationType: Observation type - latestBuys: - tableVisibleColumns: - image: Picture - itemFk: Item ID - weightByPiece: Weight/Piece - isActive: Active - family: Family - entryFk: Entry - freightValue: Freight value - comissionValue: Commission value - packageValue: Package value - isIgnored: Is ignored - price2: Grouping - price3: Packing - minPrice: Min - ektFk: Ekt - packingOut: Package out - landing: Landing - isExcludedFromAvailable: Es inventory - params: - toShipped: To - fromShipped: From - warehouseiNFk: Warehouse - daysOnward: Days onward - daysAgo: Days ago - warehouseInFk: Warehouse in ticket: params: ticketFk: Ticket ID @@ -578,27 +505,6 @@ parking: searchBar: info: You can search by parking code label: Search parking... -order: - field: - salesPersonFk: Sales Person - form: - clientFk: Client - addressFk: Address - agencyModeFk: Agency - list: - newOrder: New Order - summary: - basket: Basket - notConfirmed: Not confirmed - created: Created - createdFrom: Created From - address: Address - total: Total - items: Items - orderTicketList: Order Ticket List - amount: Amount - confirm: Confirm - confirmLines: Confirm lines department: chat: Chat bossDepartment: Boss Department @@ -798,6 +704,7 @@ travel: totalEntries: Total entries totalEntriesTooltip: Total entries daysOnward: Landed days onwards + awb: AWB summary: entryId: Entry Id freight: Freight @@ -889,7 +796,10 @@ components: hasMinPrice: Minimum price # LatestBuysFilter salesPersonFk: Buyer + supplierFk: Supplier from: From + to: To + visible: Is visible active: Is active floramondo: Is floramondo showBadDates: Show future items diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 2c95f936c..b764b1e43 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -348,6 +348,7 @@ globals: countryFk: País companyFk: Empresa changePass: Cambiar contraseña + setPass: Establecer contraseña deleteConfirmTitle: Eliminar los elementos seleccionados changeState: Cambiar estado raid: 'Redada {daysInForward} días' @@ -388,80 +389,6 @@ cau: subtitle: Al enviar este cau ya se envían todos los datos relacionados con el error, la sección, el usuario, etc inputLabel: Explique el motivo por el que no deberia aparecer este fallo askPrivileges: Solicitar permisos -entry: - list: - newEntry: Nueva entrada - tableVisibleColumns: - created: Creación - supplierFk: Proveedor - isBooked: Asentado - isConfirmed: Confirmado - isOrdered: Pedida - companyFk: Empresa - travelFk: Envio - isExcludedFromAvailable: Inventario - invoiceAmount: Importe - summary: - commission: Comisión - currency: Moneda - invoiceNumber: Núm. factura - ordered: Pedida - booked: Contabilizada - excludedFromAvailable: Inventario - travelReference: Referencia - travelAgency: Agencia - travelShipped: F. envio - travelWarehouseOut: Alm. salida - travelDelivered: Enviada - travelLanded: F. entrega - travelReceived: Recibida - buys: Compras - stickers: Etiquetas - package: Embalaje - packing: Pack. - grouping: Group. - buyingValue: Coste - import: Importe - pvp: PVP - basicData: - travel: Envío - currency: Moneda - observation: Observación - commission: Comisión - booked: Asentado - excludedFromAvailable: Inventario - buys: - observations: Observaciónes - packagingFk: Embalaje - color: Color - printedStickers: Etiquetas impresas - notes: - observationType: Tipo de observación - latestBuys: - tableVisibleColumns: - image: Foto - itemFk: Id Artículo - weightByPiece: Peso (gramos)/tallo - isActive: Activo - family: Familia - entryFk: Entrada - freightValue: Porte - comissionValue: Comisión - packageValue: Embalaje - isIgnored: Ignorado - price2: Grouping - price3: Packing - minPrice: Min - ektFk: Ekt - packingOut: Embalaje envíos - landing: Llegada - isExcludedFromAvailable: Es inventario - params: - toShipped: Hasta - fromShipped: Desde - warehouseInFk: Alm. entrada - daysOnward: Días adelante - daysAgo: Días atras ticket: params: ticketFk: ID de ticket @@ -562,30 +489,6 @@ invoiceOut: comercial: Comercial errors: downloadCsvFailed: Error al descargar CSV -order: - field: - salesPersonFk: Comercial - form: - clientFk: Cliente - addressFk: Dirección - agencyModeFk: Agencia - list: - newOrder: Nuevo Pedido - summary: - basket: Cesta - notConfirmed: No confirmada - created: Creado - createdFrom: Creado desde - address: Dirección - total: Total - vat: IVA - state: Estado - alias: Alias - items: Artículos - orderTicketList: Tickets del pedido - amount: Monto - confirm: Confirmar - confirmLines: Confirmar lineas shelving: list: parking: Parking @@ -797,6 +700,7 @@ travel: totalEntries: ∑ totalEntriesTooltip: Entradas totales daysOnward: Días de llegada en adelante + awb: AWB summary: entryId: Id entrada freight: Porte @@ -889,7 +793,11 @@ components: wareHouseFk: Almacén # LatestBuysFilter salesPersonFk: Comprador + supplierFk: Proveedor + visible: Visible active: Activo + from: Desde + to: Hasta floramondo: Floramondo showBadDates: Ver items a futuro userPanel: diff --git a/src/pages/Account/Card/AccountDescriptorMenu.vue b/src/pages/Account/Card/AccountDescriptorMenu.vue index aa49dabe8..ccf029e44 100644 --- a/src/pages/Account/Card/AccountDescriptorMenu.vue +++ b/src/pages/Account/Card/AccountDescriptorMenu.vue @@ -1,48 +1,56 @@ deleteAccount() + ) + " > - {{ t('globals.changePass') }} + {{ t('globals.delete') }} + + {{ t('globals.changePass') }} + + {{ t('globals.setPass') }} + + updateStatusAccount(true) + ) + " + > + {{ t('account.card.actions.enableAccount.name') }} + + {{ t('account.card.actions.activateUser.name') }} {{ t('account.card.actions.deactivateUser.name') }} - + {{ t('account.card.actions.sync.name') }} diff --git a/src/pages/Customer/Card/CustomerBillingData.vue b/src/pages/Customer/Card/CustomerBillingData.vue index 48f729e29..29394ceec 100644 --- a/src/pages/Customer/Card/CustomerBillingData.vue +++ b/src/pages/Customer/Card/CustomerBillingData.vue @@ -38,7 +38,7 @@ const getBankEntities = (data, formData) => { hide-selected option-label="name" option-value="id" - v-model="data.payMethod" + v-model="data.payMethodFk" /> diff --git a/src/pages/Customer/Card/CustomerCredits.vue b/src/pages/Customer/Card/CustomerCredits.vue index 1fa7047e5..d6e4be89e 100644 --- a/src/pages/Customer/Card/CustomerCredits.vue +++ b/src/pages/Customer/Card/CustomerCredits.vue @@ -59,6 +59,7 @@ const columns = computed(() => [ -import { ref, computed, onMounted } from 'vue'; +import { ref, computed } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; @@ -11,16 +11,9 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import CustomerDescriptorMenu from './CustomerDescriptorMenu.vue'; -import { useState } from 'src/composables/useState'; -const state = useState(); - -const customer = ref(); - -onMounted(async () => { - customer.value = state.get('customer'); - if (customer.value) customer.value.webAccess = data.value?.account?.isActive; -}); +const customerDebt = ref(); +const customerCredit = ref(); const $props = defineProps({ id: { type: Number, @@ -42,10 +35,12 @@ const entityId = computed(() => { const data = ref(useCardDescription()); const setData = (entity) => { + customerDebt.value = entity?.debt; + customerCredit.value = entity?.credit; data.value = useCardDescription(entity?.name, entity?.id); }; const debtWarning = computed(() => { - return customer.value?.debt > customer.value?.credit ? 'negative' : 'primary'; + return customerDebt.value > customerCredit.value ? 'negative' : 'primary'; }); @@ -97,26 +92,21 @@ const debtWarning = computed(() => { :value="entity.businessType.description" /> - - + + {{ t('customer.card.isDisabled') }} - + {{ t('customer.card.isFrozen') }} { {{ t('customer.card.webAccountInactive') }} { {{ t('customer.card.hasDebt') }} { {{ t('customer.card.notChecked') }} diff --git a/src/pages/Customer/Card/CustomerGreuges.vue b/src/pages/Customer/Card/CustomerGreuges.vue index dcf297d12..47a589aaa 100644 --- a/src/pages/Customer/Card/CustomerGreuges.vue +++ b/src/pages/Customer/Card/CustomerGreuges.vue @@ -84,6 +84,7 @@ const columns = computed(() => [ component: 'number', autofocus: true, required: true, + positive: false, }, format: ({ amount }) => toCurrency(amount), create: true, diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index fdfd7ff9c..bd2947cfc 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -50,6 +50,14 @@ const columns = computed(() => [ isTitle: true, create: true, columnClass: 'expand', + attrs: { + uppercase: true, + }, + columnFilter: { + attrs: { + uppercase: false, + }, + }, }, { align: 'left', @@ -423,7 +431,7 @@ function handleLocation(data, location) { :label="t('customer.summary.salesPerson')" v-model="data.salesPersonFk" :params="{ - departmentCodes: ['VT', 'shopping'], + departmentCodes: ['VT'], }" :has-avatar="true" :id-value="data.salesPersonFk" diff --git a/src/pages/Customer/components/CustomerAddressCreate.vue b/src/pages/Customer/components/CustomerAddressCreate.vue index bc4d6a128..32b4078db 100644 --- a/src/pages/Customer/components/CustomerAddressCreate.vue +++ b/src/pages/Customer/components/CustomerAddressCreate.vue @@ -11,6 +11,7 @@ import VnInput from 'src/components/common/VnInput.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; import VnSelectDialog from 'src/components/common/VnSelectDialog.vue'; import CustomerNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue'; +import VnInputNumber from 'src/components/common/VnInputNumber.vue'; const { t } = useI18n(); const route = useRoute(); @@ -150,6 +151,22 @@ function onAgentCreated({ id, fiscalName }, data) { + + + + @@ -175,4 +192,6 @@ es: Mobile: Movíl Incoterms: Incoterms Customs agent: Agente de aduanas + Longitude: Longitud + Latitude: Latitud diff --git a/src/pages/Department/Card/DepartmentDescriptor.vue b/src/pages/Department/Card/DepartmentDescriptor.vue index e08495faf..b219ccfe1 100644 --- a/src/pages/Department/Card/DepartmentDescriptor.vue +++ b/src/pages/Department/Card/DepartmentDescriptor.vue @@ -106,7 +106,7 @@ const { openConfirmationModal } = useVnConfirm(); :to="{ name: 'WorkerList', query: { - params: JSON.stringify({ departmentFk: entityId }), + table: JSON.stringify({ departmentFk: entityId }), }, }" > diff --git a/src/pages/Entry/Card/EntryBasicData.vue b/src/pages/Entry/Card/EntryBasicData.vue index 147287837..68d666fc0 100644 --- a/src/pages/Entry/Card/EntryBasicData.vue +++ b/src/pages/Entry/Card/EntryBasicData.vue @@ -3,7 +3,6 @@ import { ref } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import { useRole } from 'src/composables/useRole'; - import FetchData from 'components/FetchData.vue'; import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; @@ -11,7 +10,7 @@ import VnInput from 'src/components/common/VnInput.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; import VnSelectDialog from 'src/components/common/VnSelectDialog.vue'; import FilterTravelForm from 'src/components/FilterTravelForm.vue'; - +import VnInputNumber from 'src/components/common/VnInputNumber.vue'; import { toDate } from 'src/filters'; const route = useRoute(); @@ -26,6 +25,7 @@ const onFilterTravelSelected = (formData, id) => { formData.travelFk = id; }; + { - {{ scope.opt?.agencyModeName }} - - {{ scope.opt?.warehouseInName }} ({{ - toDate(scope.opt?.shipped) - }}) → {{ scope.opt?.warehouseOutName }} ({{ - toDate(scope.opt?.landed) - }}) + + {{ scope.opt?.agencyModeName }} - + {{ scope.opt?.warehouseInName }} + ({{ toDate(scope.opt?.shipped) }}) → + {{ scope.opt?.warehouseOutName }} + ({{ toDate(scope.opt?.landed) }}) + @@ -126,6 +125,13 @@ const onFilterTravelSelected = (formData, id) => { /> + { option-value="id" option-label="code" /> - + + + diff --git a/src/pages/Entry/Card/EntryCard.vue b/src/pages/Entry/Card/EntryCard.vue index 3f2596338..e00623a21 100644 --- a/src/pages/Entry/Card/EntryCard.vue +++ b/src/pages/Entry/Card/EntryCard.vue @@ -1,21 +1,13 @@ - diff --git a/src/pages/Entry/Card/EntrySummary.vue b/src/pages/Entry/Card/EntrySummary.vue index 755e39454..8c46fb6e6 100644 --- a/src/pages/Entry/Card/EntrySummary.vue +++ b/src/pages/Entry/Card/EntrySummary.vue @@ -7,7 +7,7 @@ import CardSummary from 'components/ui/CardSummary.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue'; -import { toDate, toCurrency } from 'src/filters'; +import { toDate, toCurrency, toCelsius } from 'src/filters'; import { getUrl } from 'src/composables/getUrl'; import axios from 'axios'; import FetchedTags from 'src/components/ui/FetchedTags.vue'; @@ -193,6 +193,14 @@ const fetchEntryBuys = async () => { :label="t('entry.summary.invoiceNumber')" :value="entry.invoiceNumber" /> + + - {{ t(`params.${tag.label}`) }}: + {{ t(`entryFilter.params.${tag.label}`) }}: {{ formatFn(tag.value) }} @@ -49,7 +49,7 @@ const companiesOptions = ref([]); @@ -58,7 +58,7 @@ const companiesOptions = ref([]); @@ -67,7 +67,7 @@ const companiesOptions = ref([]); @@ -76,7 +76,7 @@ const companiesOptions = ref([]); @@ -84,7 +84,7 @@ const companiesOptions = ref([]); @@ -194,7 +194,7 @@ const companiesOptions = ref([]); @@ -202,35 +202,4 @@ const companiesOptions = ref([]); - - - -en: - params: - - invoiceNumber: Invoice number - travelFk: Travel - companyFk: Company - currencyFk: Currency - supplierFk: Supplier - from: From - to: To - created: Created - isBooked: Booked - isConfirmed: Confirmed - isOrdered: Ordered -es: - params: - - invoiceNumber: Núm. factura - travelFk: Envío - companyFk: Empresa - currencyFk: Moneda - supplierFk: Proveedor - from: Desde - to: Hasta - created: Fecha creación - isBooked: Asentado - isConfirmed: Confirmado - isOrdered: Pedida - + \ No newline at end of file diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue index 450efe624..73fdcbbbf 100644 --- a/src/pages/Entry/EntryLatestBuys.vue +++ b/src/pages/Entry/EntryLatestBuys.vue @@ -102,7 +102,7 @@ const columns = [ }, { align: 'left', - label: t('globals.weightByPiece'), + label: t('entry.latestBuys.tableVisibleColumns.weightByPiece'), name: 'weightByPiece', columnFilter: { component: 'number', @@ -157,7 +157,7 @@ const columns = [ }, { align: 'left', - label: t('entry.buys.packageValue'), + label: t('entry.latestBuys.tableVisibleColumns.packageValue'), name: 'packageValue', columnFilter: { component: 'number', @@ -262,8 +262,3 @@ onUnmounted(() => (stateStore.rightDrawer = false)); :right-search="false" /> - - -es: - Edit buy(s): Editar compra(s) - diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue index 879a50914..641042156 100644 --- a/src/pages/Entry/EntryList.vue +++ b/src/pages/Entry/EntryList.vue @@ -2,17 +2,17 @@ import { ref, computed } from 'vue'; import { useI18n } from 'vue-i18n'; import EntryFilter from './EntryFilter.vue'; -import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; import VnTable from 'components/VnTable/VnTable.vue'; -import RightMenu from 'src/components/common/RightMenu.vue'; -import { toDate } from 'src/filters'; +import { toCelsius, toDate } from 'src/filters'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import EntrySummary from './Card/EntrySummary.vue'; import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue'; import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue'; +import VnSection from 'src/components/common/VnSection.vue'; const { t } = useI18n(); const tableRef = ref(); +const dataKey = 'EntryList'; const { viewSummary } = useSummaryDialog(); const entryFilter = { @@ -157,6 +157,20 @@ const columns = computed(() => [ name: 'invoiceAmount', cardVisible: true, }, + { + align: 'left', + name: 'initialTemperature', + label: t('entry.basicData.initialTemperature'), + field: 'initialTemperature', + format: (row) => toCelsius(row.initialTemperature), + }, + { + align: 'left', + name: 'finalTemperature', + label: t('entry.basicData.finalTemperature'), + field: 'finalTemperature', + format: (row) => toCelsius(row.finalTemperature), + }, { label: t('entry.list.tableVisibleColumns.isExcludedFromAvailable'), name: 'isExcludedFromAvailable', @@ -178,73 +192,73 @@ const columns = computed(() => [ }, ]); + - - - + :array-data-props="{ + url: 'Entries/filter', + order: 'id DESC', + userFilter: entryFilter, + }" + > + - - - - - - {{ - t('entry.list.tableVisibleColumns.isExcludedFromAvailable') - }} - - - - {{ - t('globals.raid', { daysInForward: row.daysInForward }) - }} - - + + + + + + {{ + t( + 'entry.list.tableVisibleColumns.isExcludedFromAvailable' + ) + }} + + + + {{ + t('globals.raid', { + daysInForward: row.daysInForward, + }) + }} + + + + + + {{ row.supplierName }} + + + + + + {{ row.travelRef }} + + + + - - - {{ row.supplierName }} - - - - - - {{ row.travelRef }} - - - - + - - -es: - Virtual entry: Es una redada - Search entries: Buscar entradas - You can search by entry reference: Puedes buscar por referencia de la entrada - Create entry: Crear entrada - diff --git a/src/pages/Entry/EntryStockBought.vue b/src/pages/Entry/EntryStockBought.vue index 3f0cd2d99..fa0bdc12e 100644 --- a/src/pages/Entry/EntryStockBought.vue +++ b/src/pages/Entry/EntryStockBought.vue @@ -1,5 +1,5 @@ - (config = data)" - /> - (cplusRectificationTypes = data)" - auto-load - /> - (siiTypeInvoiceIns = data)" - auto-load - /> - (invoiceCorrectionTypes = data)" - auto-load - /> { - + @@ -227,65 +186,6 @@ const createInvoiceInCorrection = async () => { - - - - - - {{ t('Create rectificative invoice') }} - - - - - - - - - - - - - - - - - - - - - - - -es: - Search order: Buscar orden - Search orders by ticket id: Buscar pedido por id ticket - diff --git a/src/pages/Order/OrderList.vue b/src/pages/Order/OrderList.vue index baa203541..ae1fe68bd 100644 --- a/src/pages/Order/OrderList.vue +++ b/src/pages/Order/OrderList.vue @@ -8,15 +8,14 @@ import { useRoute } from 'vue-router'; import axios from 'axios'; import OrderSummary from 'pages/Order/Card/OrderSummary.vue'; -import OrderSearchbar from './Card/OrderSearchbar.vue'; import OrderFilter from './Card/OrderFilter.vue'; -import RightMenu from 'src/components/common/RightMenu.vue'; import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue'; import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue'; import VnTable from 'src/components/VnTable/VnTable.vue'; import VnInputDate from 'src/components/common/VnInputDate.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; +import VnSection from 'src/components/common/VnSection.vue'; const { t } = useI18n(); const { viewSummary } = useSummaryDialog(); @@ -24,6 +23,8 @@ const tableRef = ref(); const agencyList = ref([]); const route = useRoute(); const addressOptions = ref([]); +const dataKey = 'OrderList'; + const columns = computed(() => [ { align: 'left', @@ -178,117 +179,126 @@ const getDateColor = (date) => { if (difference < 0) return 'bg-success'; }; + - - - + + - - - - - {{ row?.clientName }} - - - - - - {{ row?.name }} - - - - - - - {{ toDate(row?.landed) }} - - - - - fetchClientAddress(id, data)" + + - - - - - {{ scope.opt.name }} - - - {{ `#${scope.opt.id}` }} - - - + + + {{ row?.clientName }} + + - - fetchAgencies(data)" - > - - - - - {{ - `${ - !scope.opt?.isActive - ? t('basicData.inactive') - : '' - } ` - }} - {{ scope.opt?.nickname }}: {{ scope.opt?.street }}, - {{ scope.opt?.city }} - - - + + + {{ row?.name }} + + - - fetchAgencies(data)" - /> - + + + + {{ toDate(row?.landed) }} + + + + + fetchClientAddress(id, data)" + > + + + + + {{ scope.opt.name }} + + + {{ `#${scope.opt.id}` }} + + + + + + fetchAgencies(data)" + > + + + + + {{ + `${ + !scope.opt?.isActive + ? t('basicData.inactive') + : '' + } ` + }} + {{ scope.opt?.nickname }}: + {{ scope.opt?.street }}, + {{ scope.opt?.city }} + + + + + + fetchAgencies(data)" + /> + + + - + diff --git a/src/pages/Order/locale/en.yml b/src/pages/Order/locale/en.yml index 4349bc76f..14e41c559 100644 --- a/src/pages/Order/locale/en.yml +++ b/src/pages/Order/locale/en.yml @@ -21,3 +21,26 @@ lines: image: Image params: tagGroups: Tags +order: + field: + salesPersonFk: Sales Person + form: + clientFk: Client + addressFk: Address + agencyModeFk: Agency + list: + newOrder: New Order + summary: + basket: Basket + notConfirmed: Not confirmed + created: Created + createdFrom: Created From + address: Address + total: Total + items: Items + orderTicketList: Order Ticket List + amount: Amount + confirm: Confirm + confirmLines: Confirm lines + search: Search orders + searchInfo: You can search orders by ticket id diff --git a/src/pages/Order/locale/es.yml b/src/pages/Order/locale/es.yml index cef06cb6d..44e243ad1 100644 --- a/src/pages/Order/locale/es.yml +++ b/src/pages/Order/locale/es.yml @@ -21,3 +21,29 @@ lines: image: Imagen params: tagGroups: Tags +order: + field: + salesPersonFk: Comercial + form: + clientFk: Cliente + addressFk: Dirección + agencyModeFk: Agencia + list: + newOrder: Nuevo Pedido + summary: + basket: Cesta + notConfirmed: No confirmada + created: Creado + createdFrom: Creado desde + address: Dirección + total: Total + vat: IVA + state: Estado + alias: Alias + items: Artículos + orderTicketList: Tickets del pedido + amount: Monto + confirm: Confirmar + confirmLines: Confirmar lineas + search: Buscar pedido + searchInfo: Buscar pedidos por el número de ticket diff --git a/src/pages/Supplier/Card/SupplierFiscalData.vue b/src/pages/Supplier/Card/SupplierFiscalData.vue index 44235717f..1d9f3ab94 100644 --- a/src/pages/Supplier/Card/SupplierFiscalData.vue +++ b/src/pages/Supplier/Card/SupplierFiscalData.vue @@ -68,6 +68,8 @@ function handleLocation(data, location) { 'supplierActivityFk', 'healthRegister', 'street', + 'isVies', + 'isTrucker', ], include: [ { @@ -92,6 +94,7 @@ function handleLocation(data, location) { [ align: 'left', label: t('globals.name'), name: 'socialName', - create: true, + attrs: { + uppercase: true, + }, columnFilter: { name: 'search', + attrs: { + uppercase: false, + }, }, isTitle: true, }, @@ -118,14 +124,18 @@ const columns = computed(() => [ formInitialData: {}, mapper: (data) => { data.name = data.socialName; - delete data.socialName; + return data; }, }" :right-search="false" order="id ASC" :columns="columns" - /> + > + + + + diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index 8aa785c74..b849b3b35 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -54,7 +54,6 @@ const transfer = ref({ }); const tableRef = ref([]); const canProceed = ref(); -const isLoading = ref(false); watch( () => route.params.id, @@ -197,6 +196,7 @@ const changeQuantity = async (sale) => { try { if (!rowToUpdate.value) return; rowToUpdate.value = null; + sale.isNew = false; await updateQuantity(sale); } catch (e) { const { quantity } = tableRef.value.CrudModelRef.originalData.find( @@ -214,9 +214,6 @@ const updateQuantity = async ({ quantity, id }) => { }; const addSale = async (sale) => { - if (isLoading.value) return; - - isLoading.value = true; const params = { barcode: sale.itemFk, quantity: sale.quantity, @@ -237,6 +234,7 @@ const addSale = async (sale) => { sale.item = newSale.item; notify('globals.dataSaved', 'positive'); + sale.isNew = false; arrayData.fetch({}); }; @@ -754,6 +752,7 @@ watch( option-label="name" option-value="id" v-model="row.itemFk" + :use-like="false" @update:model-value="updateItem(row)" > diff --git a/src/pages/Ticket/Card/TicketService.vue b/src/pages/Ticket/Card/TicketService.vue index 950e6e8be..d045eadee 100644 --- a/src/pages/Ticket/Card/TicketService.vue +++ b/src/pages/Ticket/Card/TicketService.vue @@ -166,8 +166,10 @@ async function handleSave() { v-model="row.ticketServiceTypeFk" :options="ticketServiceOptions" option-label="name" + :roles-allowed-to-create="['administrative']" option-value="id" hide-selected + sort-by="name ASC" > { - { showValue: true, }, { label: 'm³', field: 'm3', name: 'm3', align: 'left', showValue: true }, + { + label: t('entry.basicData.initialTemperature'), + field: 'initialTemperature', + name: 'initialTemperature', + align: 'left', + format: (val) => toCelsius(val), + }, + { + label: t('entry.basicData.finalTemperature'), + field: 'finalTemperature', + name: 'finalTemperature', + align: 'left', + format: (val) => toCelsius(val), + }, { label: '', field: 'observation', @@ -127,14 +141,14 @@ const thermographsTableColumns = computed(() => { field: 'maxTemperature', name: 'maxTemperature', align: 'left', - format: (val) => (val ? `${val}°` : ''), + format: (val) => toCelsius(val), }, { label: t('globals.minTemperature'), field: 'minTemperature', name: 'minTemperature', align: 'left', - format: (val) => (val ? `${val}°` : ''), + format: (val) => toCelsius(val), }, { label: t('globals.state'), diff --git a/src/pages/Travel/Card/TravelThermographs.vue b/src/pages/Travel/Card/TravelThermographs.vue index 2bf3293a6..85781a6a4 100644 --- a/src/pages/Travel/Card/TravelThermographs.vue +++ b/src/pages/Travel/Card/TravelThermographs.vue @@ -10,7 +10,7 @@ import FetchData from 'src/components/FetchData.vue'; import axios from 'axios'; import useNotify from 'src/composables/useNotify.js'; -import { toDate } from 'src/filters'; +import { toDate, toCelsius } from 'src/filters'; import { downloadFile } from 'src/composables/downloadFile'; const route = useRoute(); @@ -52,14 +52,14 @@ const TableColumns = computed(() => { field: 'maxTemperature', name: 'maxTemperature', align: 'left', - format: (val) => (val ? `${val}°` : ''), + format: (val) => toCelsius(val), }, { label: t('globals.minTemperature'), field: 'minTemperature', name: 'minTemperature', align: 'left', - format: (val) => (val ? `${val}°` : ''), + format: (val) => toCelsius(val), }, { label: t('globals.state'), diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index 67fdb3254..c976678e0 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -79,6 +79,13 @@ const columns = computed(() => [ cardVisible: true, create: true, }, + { + align: 'left', + name: 'awb', + label: t('travel.travelList.tableVisibleColumns.awb'), + columnFilter: false, + format: (row) => row.awbCode, + }, { align: 'left', name: 'warehouseInFk', diff --git a/src/pages/Worker/Card/WorkerPda.vue b/src/pages/Worker/Card/WorkerPda.vue index 3ceee2493..c1beef40d 100644 --- a/src/pages/Worker/Card/WorkerPda.vue +++ b/src/pages/Worker/Card/WorkerPda.vue @@ -27,7 +27,7 @@ const initialData = computed(() => { return { userFk: routeId.value, deviceProductionFk: null, - simSerialNumber: null, + simFk: null, }; }); @@ -42,7 +42,7 @@ const deallocatePDA = async (deviceProductionFk) => { function reloadData() { initialData.value.deviceProductionFk = null; - initialData.value.simSerialNumber = null; + initialData.value.simFk = null; paginate.value.fetch(); } @@ -89,7 +89,7 @@ function reloadData() { /> { year: selectedDateYear.value, week: selectedWeekNumber.value, }; - const mail = ( - await axiosNoError.get(`Workers/${route.params.id}/mail`, { - params: { filter: { where } }, - }) - ).data[0]; + try { + const [{ data: mailData }, { data: countData }] = await Promise.all([ + axiosNoError.get(`Workers/${route.params.id}/mail`, { + params: { filter: { where } }, + }), + axiosNoError.get('WorkerTimeControlMails/count', { params: { where } }), + ]); - if (!mail) state.value = null; - else { - state.value = mail.state; - reason.value = mail.reason; + const mail = mailData[0]; + + state.value = mail?.state; + reason.value = mail?.reason; + canResend.value = !!countData.count; + } catch { + state.value = null; } - - canResend.value = !!( - await axiosNoError.get('WorkerTimeControlMails/count', { params: { where } }) - ).data.count; }; const setHours = (data) => { diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index 48393a8c7..0b784b993 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -138,7 +138,11 @@ function uppercaseStreetModel(data) { return { get: () => (data.street ? data.street.toUpperCase() : ''), set: (value) => { - data.street = value.toUpperCase(); + if (value) { + data.street = value.toUpperCase(); + } else { + data.street = null; + } }, }; } diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js index 26ce773c5..f362c7653 100644 --- a/src/router/modules/entry.js +++ b/src/router/modules/entry.js @@ -1,50 +1,123 @@ import { RouterView } from 'vue-router'; +const entryCard = { + name: 'EntryCard', + path: ':id', + component: () => import('src/pages/Entry/Card/EntryCard.vue'), + redirect: { name: 'EntrySummary' }, + meta: { + menu: [ + 'EntryBasicData', + 'EntryBuys', + 'EntryNotes', + 'EntryDms', + 'EntryLog', + ], + }, + children: [ + { + path: 'summary', + name: 'EntrySummary', + meta: { + title: 'summary', + icon: 'launch', + }, + component: () => import('src/pages/Entry/Card/EntrySummary.vue'), + }, + { + path: 'basic-data', + name: 'EntryBasicData', + meta: { + title: 'basicData', + icon: 'vn:settings', + }, + component: () => import('src/pages/Entry/Card/EntryBasicData.vue'), + }, + { + path: 'buys', + name: 'EntryBuys', + meta: { + title: 'buys', + icon: 'vn:lines', + }, + component: () => import('src/pages/Entry/Card/EntryBuys.vue'), + }, + { + path: 'buys/import', + name: 'EntryBuysImport', + component: () => import('src/pages/Entry/Card/EntryBuysImport.vue'), + }, + { + path: 'notes', + name: 'EntryNotes', + meta: { + title: 'notes', + icon: 'vn:notes', + }, + component: () => import('src/pages/Entry/Card/EntryNotes.vue'), + }, + { + path: 'dms', + name: 'EntryDms', + meta: { + title: 'dms', + icon: 'smb_share', + }, + component: () => import('src/pages/Entry/Card/EntryDms.vue'), + }, + { + path: 'log', + name: 'EntryLog', + meta: { + title: 'log', + icon: 'vn:History', + }, + component: () => import('src/pages/Entry/Card/EntryLog.vue'), + }, + ], +}; + export default { - path: '/entry', name: 'Entry', + path: '/entry', meta: { title: 'entries', icon: 'vn:entry', moduleName: 'Entry', keyBinding: 'e', - }, - component: RouterView, - redirect: { name: 'EntryMain' }, - menus: { - main: [ + menu: [ 'EntryList', 'MyEntries', 'EntryLatestBuys', 'EntryStockBought', 'EntryWasteRecalc', - ], - card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'], + ] }, + component: RouterView, + redirect: { name: 'EntryMain' }, children: [ { - path: '', name: 'EntryMain', + path: '', component: () => import('src/components/common/VnModule.vue'), - redirect: { name: 'EntryList' }, + redirect: { name: 'EntryIndexMain' }, children: [ { - path: 'list', - name: 'EntryList', - meta: { - title: 'list', - icon: 'view_list', - }, + path:'', + name: 'EntryIndexMain', + redirect: { name: 'EntryList' }, component: () => import('src/pages/Entry/EntryList.vue'), - }, - { - path: 'my', - name: 'MyEntries', - meta: { - title: 'labeler', - icon: 'sell', - }, - component: () => import('src/pages/Entry/MyEntries.vue'), + children: [ + { + name: 'EntryList', + path: 'list', + meta: { + title: 'list', + icon: 'view_list', + }, + }, + entryCard, + ], }, { path: 'create', @@ -54,6 +127,15 @@ export default { icon: 'add', }, component: () => import('src/pages/Entry/EntryCreate.vue'), + }, + { + path: 'my', + name: 'MyEntries', + meta: { + title: 'labeler', + icon: 'sell', + }, + component: () => import('src/pages/Entry/MyEntries.vue'), }, { path: 'latest-buys', @@ -84,72 +166,5 @@ export default { }, ], }, - { - name: 'EntryCard', - path: ':id', - component: () => import('src/pages/Entry/Card/EntryCard.vue'), - redirect: { name: 'EntrySummary' }, - children: [ - { - name: 'EntrySummary', - path: 'summary', - meta: { - title: 'summary', - icon: 'launch', - }, - component: () => import('src/pages/Entry/Card/EntrySummary.vue'), - }, - { - path: 'basic-data', - name: 'EntryBasicData', - meta: { - title: 'basicData', - icon: 'vn:settings', - }, - component: () => import('src/pages/Entry/Card/EntryBasicData.vue'), - }, - { - path: 'buys', - name: 'EntryBuys', - meta: { - title: 'buys', - icon: 'vn:lines', - }, - component: () => import('src/pages/Entry/Card/EntryBuys.vue'), - }, - { - path: 'buys/import', - name: 'EntryBuysImport', - component: () => import('src/pages/Entry/Card/EntryBuysImport.vue'), - }, - { - path: 'notes', - name: 'EntryNotes', - meta: { - title: 'notes', - icon: 'vn:notes', - }, - component: () => import('src/pages/Entry/Card/EntryNotes.vue'), - }, - { - path: 'dms', - name: 'EntryDms', - meta: { - title: 'dms', - icon: 'smb_share', - }, - component: () => import('src/pages/Entry/Card/EntryDms.vue'), - }, - { - path: 'log', - name: 'EntryLog', - meta: { - title: 'log', - icon: 'vn:History', - }, - component: () => import('src/pages/Entry/Card/EntryLog.vue'), - }, - ], - }, ], -}; +}; \ No newline at end of file diff --git a/src/router/modules/order.js b/src/router/modules/order.js index 77af812cf..bdd080e7f 100644 --- a/src/router/modules/order.js +++ b/src/router/modules/order.js @@ -1,35 +1,102 @@ import { RouterView } from 'vue-router'; +const orderCard = { + name: 'OrderCard', + path: ':id', + component: () => import('src/pages/Order/Card/OrderCard.vue'), + redirect: { name: 'OrderSummary' }, + meta: { + menu: [ + 'OrderBasicData', + 'OrderCatalog', + 'OrderVolume', + 'OrderLines', + ], + }, + children: [ + { + path: 'summary', + name: 'OrderSummary', + meta: { + title: 'summary', + icon: 'launch', + }, + component: () => import('src/pages/Order/Card/OrderSummary.vue'), + }, + { + path: 'basic-data', + name: 'OrderBasicData', + meta: { + title: 'basicData', + icon: 'vn:settings', + }, + component: () => import('src/pages/Order/Card/OrderBasicData.vue'), + }, + { + path: 'catalog', + name: 'OrderCatalog', + meta: { + title: 'catalog', + icon: 'vn:basket', + }, + component: () => import('src/pages/Order/Card/OrderCatalog.vue'), + }, + { + path: 'volume', + name: 'OrderVolume', + meta: { + title: 'volume', + icon: 'vn:volume', + }, + component: () => import('src/pages/Order/Card/OrderVolume.vue'), + }, + { + path: 'line', + name: 'OrderLines', + meta: { + title: 'lines', + icon: 'vn:lines', + }, + component: () => import('src/pages/Order/Card/OrderLines.vue'), + }, + ], +}; + export default { - path: '/order', name: 'Order', + path: '/order', meta: { title: 'order', icon: 'vn:basket', moduleName: 'Order', keyBinding: 'o', + menu: ['OrderList'], }, component: RouterView, redirect: { name: 'OrderMain' }, - menus: { - main: ['OrderList'], - card: ['OrderBasicData', 'OrderCatalog', 'OrderVolume', 'OrderLines'], - }, children: [ { - path: '', name: 'OrderMain', + path: '', component: () => import('src/components/common/VnModule.vue'), - redirect: { name: 'OrderList' }, + redirect: { name: 'OrderIndexMain' }, children: [ { - path: 'list', - name: 'OrderList', - meta: { - title: 'orderList', - icon: 'view_list', - }, + path: '', + name: 'OrderIndexMain', + redirect: { name: 'OrderList' }, component: () => import('src/pages/Order/OrderList.vue'), + children: [ + { + name: 'OrderList', + path: 'list', + meta: { + title: 'orderList', + icon: 'view_list', + }, + }, + orderCard, + ], }, { path: 'create', @@ -42,58 +109,5 @@ export default { }, ], }, - { - name: 'OrderCard', - path: ':id', - component: () => import('src/pages/Order/Card/OrderCard.vue'), - redirect: { name: 'OrderSummary' }, - children: [ - { - name: 'OrderSummary', - path: 'summary', - meta: { - title: 'summary', - icon: 'launch', - }, - component: () => import('src/pages/Order/Card/OrderSummary.vue'), - }, - { - name: 'OrderBasicData', - path: 'basic-data', - meta: { - title: 'basicData', - icon: 'vn:settings', - }, - component: () => import('src/pages/Order/Card/OrderBasicData.vue'), - }, - { - name: 'OrderCatalog', - path: 'catalog', - meta: { - title: 'catalog', - icon: 'vn:basket', - }, - component: () => import('src/pages/Order/Card/OrderCatalog.vue'), - }, - { - name: 'OrderVolume', - path: 'volume', - meta: { - title: 'volume', - icon: 'vn:volume', - }, - component: () => import('src/pages/Order/Card/OrderVolume.vue'), - }, - { - name: 'OrderLines', - path: 'line', - meta: { - title: 'lines', - icon: 'vn:lines', - }, - component: () => import('src/pages/Order/Card/OrderLines.vue'), - }, - ], - }, ], -}; +}; \ No newline at end of file diff --git a/src/stores/invoiceOutGlobal.js b/src/stores/invoiceOutGlobal.js index d8649753f..d8e061f84 100644 --- a/src/stores/invoiceOutGlobal.js +++ b/src/stores/invoiceOutGlobal.js @@ -7,7 +7,14 @@ import useNotify from 'src/composables/useNotify.js'; import axios from 'axios'; const { notify } = useNotify(); - +const initInvoicing = { + invoicing: false, + nRequests: 0, + nPdfs: 0, + totalPdfs: 0, + addressIndex: 0, + errors: [], +}; export const useInvoiceOutGlobalStore = defineStore({ id: 'invoiceOutGlobal', state: () => ({ @@ -23,16 +30,11 @@ export const useInvoiceOutGlobalStore = defineStore({ addresses: [], minInvoicingDate: null, parallelism: null, - invoicing: false, - isInvoicing: false, status: null, - addressIndex: 0, - errors: [], + printer: null, - nRequests: 0, - nPdfs: 0, - totalPdfs: 0, formData: null, + ...initInvoicing, }), actions: { async init() { @@ -117,12 +119,13 @@ export const useInvoiceOutGlobalStore = defineStore({ ); throw new Error("There aren't addresses to invoice"); } - this.invoicing = false; - this.status = 'invoicing'; this.formData = formData; - this.addressIndex = 0; - this.errors = []; - await this.invoiceClient(); + this.status = 'invoicing'; + //reset data + for (const key in initInvoicing) { + this[key] = initInvoicing[key]; + } + this.invoiceClient(); } catch (err) { this.handleError(err); } @@ -184,7 +187,6 @@ export const useInvoiceOutGlobalStore = defineStore({ async invoiceClient() { if (this.invoicing || this.nRequests >= this.parallelism) return; const address = this.addresses[this.addressIndex]; - if (!address || !this.status || this.status == 'stopping') { this.status = 'stopping'; this.invoicing = false; @@ -192,6 +194,7 @@ export const useInvoiceOutGlobalStore = defineStore({ } try { this.invoicing = true; + this.nRequests++; const params = { clientId: address.clientId, addressId: address.id, @@ -215,6 +218,7 @@ export const useInvoiceOutGlobalStore = defineStore({ } } finally { this.invoicing = false; + this.nRequests--; this.addressIndex++; this.invoiceClient(); } diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js index 9b2978b19..0a7320060 100755 --- a/test/cypress/integration/claim/claimPhoto.spec.js +++ b/test/cypress/integration/claim/claimPhoto.spec.js @@ -1,5 +1,6 @@ /// -describe('ClaimPhoto', () => { +// redmine.verdnatura.es/issues/8417 +describe.skip('ClaimPhoto', () => { beforeEach(() => { const claimId = 1; cy.login('developer'); diff --git a/test/cypress/integration/entry/myEntry.spec.js b/test/cypress/integration/entry/myEntry.spec.js index 4addec1c4..c25476419 100644 --- a/test/cypress/integration/entry/myEntry.spec.js +++ b/test/cypress/integration/entry/myEntry.spec.js @@ -8,8 +8,8 @@ describe('EntryMy when is supplier', () => { }, }); }); - - it('should open buyLabel when is supplier', () => { + // https://redmine.verdnatura.es/issues/8418 + it.skip('should open buyLabel when is supplier', () => { cy.get( '[to="/null/3"] > .q-card > .column > .q-btn > .q-btn__content > .q-icon' ).click(); diff --git a/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js b/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js index 0eb873355..c2f111892 100644 --- a/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js @@ -1,6 +1,6 @@ /// - -describe('InvoiceInCorrective', () => { +// https://redmine.verdnatura.es/issues/8419 +describe.skip('InvoiceInCorrective', () => { const createCorrective = '.q-menu > .q-list > :nth-child(6) > .q-item__section'; const rectificativeSection = '.q-drawer-container .q-list > a:nth-child(6)'; const saveDialog = '.q-card > .q-card__actions > .q-btn--standard '; diff --git a/test/cypress/integration/invoiceIn/invoiceInList.spec.js b/test/cypress/integration/invoiceIn/invoiceInList.spec.js index d9ab3f7e7..0eb495419 100644 --- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js @@ -21,8 +21,8 @@ describe('InvoiceInList', () => { cy.url().should('include', `/invoice-in/${id}/summary`); }); }); - - it('should open the details', () => { + // https://redmine.verdnatura.es/issues/8420 + it.skip('should open the details', () => { cy.get(firstDetailBtn).click(); cy.get(summaryHeaders).eq(1).contains('Basic data'); cy.get(summaryHeaders).eq(4).contains('Vat'); diff --git a/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js b/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js index b7fd11307..44b0a9961 100644 --- a/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js +++ b/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js @@ -9,7 +9,6 @@ describe('InvoiceOut summary', () => { cy.viewport(1920, 1080); cy.login('developer'); cy.visit(`/#/invoice-out/list`); - cy.typeSearchbar('{enter}'); }); it('should generate the invoice PDF', () => { @@ -19,13 +18,12 @@ describe('InvoiceOut summary', () => { cy.dataCy('VnConfirm_confirm').click(); cy.checkNotification('The invoice PDF document has been regenerated'); }); - it('should refund the invoice ', () => { cy.typeSearchbar('T1111111{enter}'); cy.dataCy('descriptor-more-opts').click(); cy.get('.q-menu > .q-list > :nth-child(7)').click(); cy.get('#q-portal--menu--3 > .q-menu > .q-list > :nth-child(2)').click(); - cy.checkNotification('The following refund ticket have been created 1000000'); + cy.checkNotification('The following refund ticket have been created'); }); it('should delete an invoice ', () => { @@ -35,7 +33,6 @@ describe('InvoiceOut summary', () => { cy.dataCy('VnConfirm_confirm').click(); cy.checkNotification('InvoiceOut deleted'); }); - it('should transfer the invoice ', () => { cy.typeSearchbar('T1111111{enter}'); cy.dataCy('descriptor-more-opts').click(); diff --git a/test/cypress/integration/item/itemList.spec.js b/test/cypress/integration/item/itemList.spec.js index 49e393451..97e85a212 100644 --- a/test/cypress/integration/item/itemList.spec.js +++ b/test/cypress/integration/item/itemList.spec.js @@ -15,8 +15,8 @@ describe('Item list', () => { cy.get('.q-menu .q-item').contains('Anthurium').click(); cy.get('.q-virtual-scroll__content > :nth-child(4) > :nth-child(4)').click(); }); - - it('should create an item', () => { + // https://redmine.verdnatura.es/issues/8421 + it.skip('should create an item', () => { const data = { Description: { val: `Test item` }, Type: { val: `Crisantemo`, type: 'select' }, diff --git a/test/cypress/integration/item/itemTag.spec.js b/test/cypress/integration/item/itemTag.spec.js index c2de93068..28e0a747f 100644 --- a/test/cypress/integration/item/itemTag.spec.js +++ b/test/cypress/integration/item/itemTag.spec.js @@ -18,8 +18,8 @@ describe('Item tag', () => { +cy.dataCy('crudModelDefaultSaveBtn').click(); cy.checkNotification("The tag or priority can't be repeated for an item"); }); - - it('should add a new tag', () => { + // https://redmine.verdnatura.es/issues/8422 + it.skip('should add a new tag', () => { cy.get('.q-page').should('be.visible'); cy.get('.q-page-sticky > div').click(); cy.get('.q-page-sticky > div').click(); diff --git a/test/cypress/integration/ticket/ticketExpedition.spec.js b/test/cypress/integration/ticket/ticketExpedition.spec.js index d74a122a1..d957f2136 100644 --- a/test/cypress/integration/ticket/ticketExpedition.spec.js +++ b/test/cypress/integration/ticket/ticketExpedition.spec.js @@ -1,6 +1,6 @@ /// - -describe('Ticket expedtion', () => { +// https://redmine.verdnatura.es/issues/8423 +describe.skip('Ticket expedtion', () => { const tableContent = '.q-table .q-virtual-scroll__content'; const stateTd = 'td:nth-child(9)'; diff --git a/test/cypress/integration/ticket/ticketList.spec.js b/test/cypress/integration/ticket/ticketList.spec.js index e273825c0..3337287c4 100644 --- a/test/cypress/integration/ticket/ticketList.spec.js +++ b/test/cypress/integration/ticket/ticketList.spec.js @@ -30,8 +30,8 @@ describe('TicketList', () => { cy.get(firstRow).find('.q-btn:first').click(); cy.get('@windowOpen').should('be.calledWithMatch', /\/ticket\/\d+\/sale/); }); - - it('should open ticket summary', () => { + // https://redmine.verdnatura.es/issues/8424 + it.skip('should open ticket summary', () => { searchResults(); cy.get(firstRow).find('.q-btn:last').click(); cy.dataCy('ticketSummary').should('exist'); diff --git a/test/cypress/integration/ticket/ticketSale.spec.js b/test/cypress/integration/ticket/ticketSale.spec.js index 7bc53f010..aed8dc85a 100644 --- a/test/cypress/integration/ticket/ticketSale.spec.js +++ b/test/cypress/integration/ticket/ticketSale.spec.js @@ -1,7 +1,5 @@ /// -const c = require('croppie'); - describe('TicketSale', () => { beforeEach(() => { cy.login('developer'); diff --git a/test/cypress/integration/vnComponent/VnLocation.spec.js b/test/cypress/integration/vnComponent/VnLocation.spec.js index 14eb0f978..751b3a065 100644 --- a/test/cypress/integration/vnComponent/VnLocation.spec.js +++ b/test/cypress/integration/vnComponent/VnLocation.spec.js @@ -49,7 +49,8 @@ describe('VnLocation', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); - cy.visit('/#/worker/create', { timeout: 5000 }); + cy.visit('/#/worker/list', { timeout: 5000 }); + cy.dataCy('vnTableCreateBtn').click(); cy.waitForElement('.q-card'); cy.get(inputLocation).click(); }); diff --git a/test/cypress/integration/worker/workerList.spec.js b/test/cypress/integration/worker/workerList.spec.js index c1c37fd32..0a45441c1 100644 --- a/test/cypress/integration/worker/workerList.spec.js +++ b/test/cypress/integration/worker/workerList.spec.js @@ -10,8 +10,8 @@ describe('WorkerList', () => { it('should open the worker summary', () => { cy.get(inputName).type('jessica{enter}'); - cy.get(searchBtn).click(); cy.intercept('GET', /\/api\/Workers\/summary+/).as('worker'); + cy.get(searchBtn).click(); cy.wait('@worker').then(() => cy.get(descriptorTitle).should('include.text', 'Jessica') ); diff --git a/test/cypress/integration/zone/zoneWarehouse.spec.js b/test/cypress/integration/zone/zoneWarehouse.spec.js index 817e26312..a55a5619e 100644 --- a/test/cypress/integration/zone/zoneWarehouse.spec.js +++ b/test/cypress/integration/zone/zoneWarehouse.spec.js @@ -18,8 +18,8 @@ describe('ZoneWarehouse', () => { cy.get(saveBtn).click(); cy.checkNotification(dataError); }); - - it('should create & remove a warehouse', () => { + // https://redmine.verdnatura.es/issues/8425 + it.skip('should create & remove a warehouse', () => { cy.addBtnClick(); cy.fillInForm(data); cy.get(saveBtn).click();