+
-
-
+
-
- {{ t('Close contract') }}
-
-
+
{{ t('Close contract') }}
+
-
-
-
- {{ t('Since') }}:
-
-
- {{ toDate(item.started) }}
-
-
-
-
- {{ t('To') }}:
-
-
- {{ toDate(item.finished) }}
-
-
+
+
+
-
+
-
-
- {{ t('Credit') }}:
-
-
- {{ item.insurances[0].credit }}
-
-
-
-
- {{ t('Grade') }}:
-
-
- {{ item.insurances[0].grade || '-' }}
-
-
-
-
- {{ t('Date') }}:
-
-
- {{ toDate(item.insurances[0].created) }}
-
-
-
-
- {{
- t('View credits')
- }}
-
+
+
+
+
+
@@ -187,11 +169,12 @@ const updateData = () => {
-
+
{
{{ t('New contract') }}
+
+
+
+
diff --git a/src/pages/Customer/Card/CustomerCreditContractsInsurance.vue b/src/pages/Customer/Card/CustomerCreditContractsInsurance.vue
new file mode 100644
index 000000000..aac195b36
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerCreditContractsInsurance.vue
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+es:
+ Created: Fecha creación
+ Grade: Grade
+ Credit: Crédito
+
diff --git a/src/pages/Customer/Card/CustomerFiscalData.vue b/src/pages/Customer/Card/CustomerFiscalData.vue
index f4efd03b6..aa5841ce2 100644
--- a/src/pages/Customer/Card/CustomerFiscalData.vue
+++ b/src/pages/Customer/Card/CustomerFiscalData.vue
@@ -99,7 +99,13 @@ async function acceptPropagate({ isEqualizated }) {
-
+
@@ -111,8 +117,6 @@ async function acceptPropagate({ isEqualizated }) {
option-value="id"
v-model="data.sageTaxTypeFk"
data-cy="sageTaxTypeFk"
- :required="data.isTaxDataChecked"
- :rules="[(val) => validations.required(data.isTaxDataChecked, val)]"
/>
diff --git a/src/pages/Customer/Card/CustomerUnpaid.vue b/src/pages/Customer/Card/CustomerUnpaid.vue
index f76e35821..4041e1efa 100644
--- a/src/pages/Customer/Card/CustomerUnpaid.vue
+++ b/src/pages/Customer/Card/CustomerUnpaid.vue
@@ -50,8 +50,11 @@ const filterClientFindOne = {
>
-
+
diff --git a/src/pages/Customer/Notifications/CustomerNotifications.vue b/src/pages/Customer/Notifications/CustomerNotifications.vue
index 84babe24d..f19434904 100644
--- a/src/pages/Customer/Notifications/CustomerNotifications.vue
+++ b/src/pages/Customer/Notifications/CustomerNotifications.vue
@@ -26,6 +26,7 @@ const columns = computed(() => [
url: 'Clients',
fields: ['id', 'socialName'],
optionLabel: 'socialName',
+ optionValue: 'socialName',
},
},
columnClass: 'expand',
@@ -37,8 +38,11 @@ const columns = computed(() => [
name: 'city',
columnFilter: {
component: 'select',
+ inWhere: true,
attrs: {
url: 'Towns',
+ optionValue: 'name',
+ optionLabel: 'name',
},
},
cardVisible: true,
@@ -94,7 +98,7 @@ const columns = computed(() => [
-
-
-
-
-
+
{
-
+
diff --git a/src/pages/Customer/components/CustomerCreditContractsInsurance.vue b/src/pages/Customer/components/CustomerCreditContractsInsurance.vue
deleted file mode 100644
index 70f7cf046..000000000
--- a/src/pages/Customer/components/CustomerCreditContractsInsurance.vue
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
-es:
- Created: Fecha creación
- Grade: Grade
- Credit: Crédito
-
diff --git a/src/pages/Customer/components/CustomerFileManagementCreate.vue b/src/pages/Customer/components/CustomerFileManagementCreate.vue
index f33a47bcc..84933ea37 100644
--- a/src/pages/Customer/components/CustomerFileManagementCreate.vue
+++ b/src/pages/Customer/components/CustomerFileManagementCreate.vue
@@ -224,7 +224,7 @@ const toCustomerFileManagement = () => {
{{
`${t(
- 'Allowed content types'
+ 'Allowed content types',
)}: ${allowedContentTypes.join(', ')}`
}}
diff --git a/src/pages/Customer/components/CustomerFileManagementEdit.vue b/src/pages/Customer/components/CustomerFileManagementEdit.vue
index 107f41330..4e53672b4 100644
--- a/src/pages/Customer/components/CustomerFileManagementEdit.vue
+++ b/src/pages/Customer/components/CustomerFileManagementEdit.vue
@@ -200,7 +200,7 @@ const toCustomerFileManagement = () => {
{{
`${t(
- 'Allowed content types'
+ 'Allowed content types',
)}: ${allowedContentTypes.join(', ')}`
}}
diff --git a/src/pages/Customer/components/CustomerNewPayment.vue b/src/pages/Customer/components/CustomerNewPayment.vue
index fb3804d55..b41b1ce8c 100644
--- a/src/pages/Customer/components/CustomerNewPayment.vue
+++ b/src/pages/Customer/components/CustomerNewPayment.vue
@@ -222,6 +222,7 @@ async function getAmountPaid() {
clearable
v-model.number="data.amountPaid"
data-cy="paymentAmount"
+ :positive="false"
/>
diff --git a/src/pages/Customer/components/CustomerSummaryTable.vue b/src/pages/Customer/components/CustomerSummaryTable.vue
index feb137065..cc0afdca7 100644
--- a/src/pages/Customer/components/CustomerSummaryTable.vue
+++ b/src/pages/Customer/components/CustomerSummaryTable.vue
@@ -15,7 +15,7 @@ import InvoiceOutDescriptorProxy from 'pages/InvoiceOut/Card/InvoiceOutDescripto
import RouteDescriptorProxy from 'src/pages/Route/Card/RouteDescriptorProxy.vue';
import VnTable from 'src/components/VnTable/VnTable.vue';
import CustomerDescriptorProxy from '../Card/CustomerDescriptorProxy.vue';
-
+import { getItemPackagingType } from '../composables/getItemPackagingType.js';
const { t } = useI18n();
const route = useRoute();
const router = useRouter();
@@ -161,23 +161,6 @@ const setShippedColor = (date) => {
};
const rowClick = ({ id }) =>
window.open(router.resolve({ params: { id }, name: 'TicketSummary' }).href, '_blank');
-
-const getItemPackagingType = (ticketSales) => {
- if (!ticketSales?.length) return '-';
-
- const packagingTypes = ticketSales.reduce((types, sale) => {
- const { itemPackingTypeFk } = sale.item;
- if (
- !types.includes(itemPackingTypeFk) &&
- (itemPackingTypeFk === 'H' || itemPackingTypeFk === 'V')
- ) {
- types.push(itemPackingTypeFk);
- }
- return types;
- }, []);
-
- return dashIfEmpty(packagingTypes.join(', ') || '-');
-};
diff --git a/src/pages/Customer/composables/__tests__/getItemPackagingType.spec.js b/src/pages/Customer/composables/__tests__/getItemPackagingType.spec.js
new file mode 100644
index 000000000..0607f729f
--- /dev/null
+++ b/src/pages/Customer/composables/__tests__/getItemPackagingType.spec.js
@@ -0,0 +1,36 @@
+import { describe, it, expect } from 'vitest';
+import { getItemPackagingType } from '../getItemPackagingType';
+
+describe('getItemPackagingType', () => {
+ it('should return "-" if ticketSales is null or undefined', () => {
+ expect(getItemPackagingType(null)).toBe('-');
+ expect(getItemPackagingType(undefined)).toBe('-');
+ });
+
+ it('should return "-" if ticketSales does not have a length property', () => {
+ const ticketSales = { someKey: 'someValue' }; // No tiene propiedad length
+ expect(getItemPackagingType(ticketSales)).toBe('-');
+ });
+
+ it('should return unique packaging types as a comma-separated string', () => {
+ const ticketSales = [
+ { item: { itemPackingTypeFk: 'H' } },
+ { item: { itemPackingTypeFk: 'V' } },
+ { item: { itemPackingTypeFk: 'H' } },
+ ];
+ expect(getItemPackagingType(ticketSales)).toBe('H, V');
+ });
+ it('should return unique packaging types as a comma-separated string', () => {
+ const ticketSales = [
+ { item: { itemPackingTypeFk: 'H' } },
+ { item: { itemPackingTypeFk: 'V' } },
+ { item: { itemPackingTypeFk: 'H' } },
+ { item: { itemPackingTypeFk: 'A' } },
+ ];
+ expect(getItemPackagingType(ticketSales)).toBe('H, V, A');
+ });
+
+ it('should return "-" if ticketSales is an empty array', () => {
+ expect(getItemPackagingType([])).toBe('-');
+ });
+});
diff --git a/src/pages/Customer/composables/getClient.js b/src/pages/Customer/composables/getClient.js
index 3b9e811de..20b587a8f 100644
--- a/src/pages/Customer/composables/getClient.js
+++ b/src/pages/Customer/composables/getClient.js
@@ -13,4 +13,4 @@ export async function getClient(clientId, _filter = {}) {
};
const params = { filter: JSON.stringify(filter) };
return await axios.get('Clients', { params });
-};
\ No newline at end of file
+}
diff --git a/src/pages/Customer/composables/getItemPackagingType.js b/src/pages/Customer/composables/getItemPackagingType.js
new file mode 100644
index 000000000..eba4d62f5
--- /dev/null
+++ b/src/pages/Customer/composables/getItemPackagingType.js
@@ -0,0 +1,11 @@
+import { dashIfEmpty } from 'src/filters';
+
+export function getItemPackagingType(ticketSales) {
+ if (!ticketSales?.length) return '-';
+
+ const packagingTypes = Array.from(
+ new Set(ticketSales.map(({ item: { itemPackingTypeFk } }) => itemPackingTypeFk)),
+ );
+
+ return dashIfEmpty(packagingTypes.join(', '));
+}
diff --git a/src/pages/Customer/locale/en.yml b/src/pages/Customer/locale/en.yml
index fca3354e6..3c651e7f3 100644
--- a/src/pages/Customer/locale/en.yml
+++ b/src/pages/Customer/locale/en.yml
@@ -123,3 +123,4 @@ customer:
ticketFk: Ticket Id
description: Description
quantity: Quantity
+ ticketId: Ticket
diff --git a/src/pages/Customer/locale/es.yml b/src/pages/Customer/locale/es.yml
index 9b0009b36..ba80bd555 100644
--- a/src/pages/Customer/locale/es.yml
+++ b/src/pages/Customer/locale/es.yml
@@ -123,3 +123,4 @@ customer:
ticketFk: Id Ticket
description: Descripción
quantity: Cantidad
+ ticketId: Ticket
diff --git a/src/pages/Entry/Card/EntryBuysImport.vue b/src/pages/Entry/Card/EntryBuysImport.vue
index 726fec07d..9ed8340be 100644
--- a/src/pages/Entry/Card/EntryBuysImport.vue
+++ b/src/pages/Entry/Card/EntryBuysImport.vue
@@ -126,7 +126,7 @@ const fetchBuys = async (buys) => {
const params = { buys };
const { data } = await axios.post(
`Entries/${route.params.id}/importBuysPreview`,
- params
+ params,
);
importData.value.buys = data;
};
diff --git a/src/pages/InvoiceIn/composables/setRectificative.js b/src/pages/InvoiceIn/composables/setRectificative.js
index a1afb8fb0..01038d91a 100644
--- a/src/pages/InvoiceIn/composables/setRectificative.js
+++ b/src/pages/InvoiceIn/composables/setRectificative.js
@@ -3,7 +3,7 @@ import axios from 'axios';
export async function setRectificative(route) {
const card = route.matched.find((route) => route.name === 'InvoiceInCard');
const corrective = card.children.find(
- (route) => route.name === 'InvoiceInCorrective'
+ (route) => route.name === 'InvoiceInCorrective',
);
corrective.meta.hidden = !(
diff --git a/src/pages/Login/ResetPassword.vue b/src/pages/Login/ResetPassword.vue
index 081801e0e..58e10c390 100644
--- a/src/pages/Login/ResetPassword.vue
+++ b/src/pages/Login/ResetPassword.vue
@@ -37,7 +37,7 @@ async function onSubmit() {
await axios.post(
'VnUsers/reset-password',
{ newPassword: newPassword.value },
- { headers }
+ { headers },
);
router.push('Login');
quasar.notify({
diff --git a/src/pages/Order/Card/OrderVolume.vue b/src/pages/Order/Card/OrderVolume.vue
index fb104157e..a09be8c32 100644
--- a/src/pages/Order/Card/OrderVolume.vue
+++ b/src/pages/Order/Card/OrderVolume.vue
@@ -71,9 +71,7 @@ onMounted(async () => (stateStore.rightDrawer = false));
auto-load
/>
-
+
-
+
diff --git a/src/pages/Route/Agency/composables/getAgencies.js b/src/pages/Route/Agency/composables/getAgencies.js
index 180ac943e..7fc7c1997 100644
--- a/src/pages/Route/Agency/composables/getAgencies.js
+++ b/src/pages/Route/Agency/composables/getAgencies.js
@@ -9,7 +9,7 @@ export async function getAgencies(formData, client, _filter = {}) {
};
let agency = null;
- let params = {
+ const params = {
filter: JSON.stringify(filter),
warehouseFk: formData.warehouseId,
addressFk: formData.addressId,
diff --git a/src/pages/Route/Card/RouteDescriptorMenu.vue b/src/pages/Route/Card/RouteDescriptorMenu.vue
index d1a70c868..dabd38583 100644
--- a/src/pages/Route/Card/RouteDescriptorMenu.vue
+++ b/src/pages/Route/Card/RouteDescriptorMenu.vue
@@ -23,7 +23,7 @@ async function openRouteReport() {
const token = getTokenMultimedia();
window.open(
`${url}/api/Routes/${routeId}/driver-route-pdf?access_token=${token}`,
- '_blank'
+ '_blank',
);
}
diff --git a/src/pages/Route/Card/RouteListTicketsDialog.vue b/src/pages/Route/Card/RouteListTicketsDialog.vue
index b9b2ee36b..bf2c7d420 100644
--- a/src/pages/Route/Card/RouteListTicketsDialog.vue
+++ b/src/pages/Route/Card/RouteListTicketsDialog.vue
@@ -106,8 +106,8 @@ const setTicketsRoute = async () => {
(selectedRows.value || [])
.filter((ticket) => ticket?.id)
.map((ticket) =>
- axios.patch(`Routes/${$props.id}/insertTicket`, { ticketId: ticket.id })
- )
+ axios.patch(`Routes/${$props.id}/insertTicket`, { ticketId: ticket.id }),
+ ),
);
await axios.post(`Routes/${$props.id}/updateVolume`);
emit('ok');
diff --git a/src/pages/Route/Cmr/locale/en.yml b/src/pages/Route/Cmr/locale/en.yml
index 49b9895f8..fc6f28373 100644
--- a/src/pages/Route/Cmr/locale/en.yml
+++ b/src/pages/Route/Cmr/locale/en.yml
@@ -1,31 +1,31 @@
cmr:
- search: Search Cmr
- searchInfo: You can search Cmr by Id
- params:
- agency: Agency
- client: Client
- cmrFk: CMR id
- country: Country
- created: Created
- destination: Destination
- downloadCmrs: Download CMRs
- etd: ETD
- etdTooltip: Estimated Time Delivery
- hasCmrDms: Attached in gestdoc
- observation: Observation
- packageList: Package List
- paymentInstructions: Payment instructions
- routeFk: Route id
- results: results
- search: General search
- sender: Sender
- senderInstructions: Sender instructions
- shipped: Shipped
- specialAgreements: Special agreements
- supplier: Carrier
- ticketFk: Ticket id
- vehiclePlate: Vehicle plate
- viewCmr: View CMR
- warehouse: Warehouse
- 'true': 'Yes'
- 'false': 'No'
\ No newline at end of file
+ search: Search Cmr
+ searchInfo: You can search Cmr by Id
+ params:
+ agency: Agency
+ client: Client
+ cmrFk: CMR id
+ country: Country
+ created: Created
+ destination: Destination
+ downloadCmrs: Download CMRs
+ etd: ETD
+ etdTooltip: Estimated Time Delivery
+ hasCmrDms: Attached in gestdoc
+ observation: Observation
+ packageList: Package List
+ paymentInstructions: Payment instructions
+ routeFk: Route id
+ results: results
+ search: General search
+ sender: Sender
+ senderInstructions: Sender instructions
+ shipped: Shipped
+ specialAgreements: Special agreements
+ supplier: Carrier
+ ticketFk: Ticket id
+ vehiclePlate: Vehicle plate
+ viewCmr: View CMR
+ warehouse: Warehouse
+ 'true': 'Yes'
+ 'false': 'No'
diff --git a/src/pages/Route/Cmr/locale/es.yml b/src/pages/Route/Cmr/locale/es.yml
index b419a238b..417b50967 100644
--- a/src/pages/Route/Cmr/locale/es.yml
+++ b/src/pages/Route/Cmr/locale/es.yml
@@ -1,31 +1,31 @@
cmr:
- search: Buscar Cmr
- searchInfo: Puedes buscar cmr por id
- params:
- agency: Agencia
- client: Cliente
- cmrFk: Id cmr
- country: País
- created: Creado
- destination: Destinatario
- downloadCmrs: Descargar CMRs
- etd: ETD
- etdTooltip: Fecha estimada de entrega
- hasCmrDms: Adjunto en gestdoc
- observation: Observaciones
- packageList: Listado embalajes
- paymentInstructions: Instrucciones de pago
- routeFk: Id ruta
- results: Resultados
- search: Busqueda general
- sender: Remitente
- senderInstructions: Instrucciones de envío
- shipped: F. envío
- specialAgreements: Acuerdos especiales
- supplier: Transportista
- ticketFk: Id ticket
- vehiclePlate: Matrícula
- viewCmr: Ver CMR
- warehouse: Almacén
- 'true': 'Si'
- 'false': 'No'
\ No newline at end of file
+ search: Buscar Cmr
+ searchInfo: Puedes buscar cmr por id
+ params:
+ agency: Agencia
+ client: Cliente
+ cmrFk: Id cmr
+ country: País
+ created: Creado
+ destination: Destinatario
+ downloadCmrs: Descargar CMRs
+ etd: ETD
+ etdTooltip: Fecha estimada de entrega
+ hasCmrDms: Adjunto en gestdoc
+ observation: Observaciones
+ packageList: Listado embalajes
+ paymentInstructions: Instrucciones de pago
+ routeFk: Id ruta
+ results: Resultados
+ search: Busqueda general
+ sender: Remitente
+ senderInstructions: Instrucciones de envío
+ shipped: F. envío
+ specialAgreements: Acuerdos especiales
+ supplier: Transportista
+ ticketFk: Id ticket
+ vehiclePlate: Matrícula
+ viewCmr: Ver CMR
+ warehouse: Almacén
+ 'true': 'Si'
+ 'false': 'No'
diff --git a/src/pages/Route/Vehicle/Card/VehicleEventInclusionForm.vue b/src/pages/Route/Vehicle/Card/VehicleEventInclusionForm.vue
index 06141736c..fefd296e4 100644
--- a/src/pages/Route/Vehicle/Card/VehicleEventInclusionForm.vue
+++ b/src/pages/Route/Vehicle/Card/VehicleEventInclusionForm.vue
@@ -68,17 +68,13 @@ onMounted(() => {
const createVehicleEvent = async () => {
vehicleFormData.value.vehicleFk = route.params.id;
vehicleFormData.value.userFk = user.value.id;
-
+
if (isNew.value) {
await axios.post(`VehicleEvents`, vehicleFormData.value);
} else {
- await axios.patch(
- `VehicleEvents/${props.event?.id}`,
- vehicleFormData.value,
- );
+ await axios.patch(`VehicleEvents/${props.event?.id}`, vehicleFormData.value);
}
await refetchEvents();
-
};
const deleteVehicleEvent = async () => {
@@ -88,36 +84,34 @@ const deleteVehicleEvent = async () => {
};
const refetchEvents = async () => {
- await arrayData.refresh({
+ await arrayData.refresh({
append: false,
params: {
filter: {
where: {
vehicleFk: route.params.id,
and: [
- {
+ {
or: [
{ started: { lte: props.lastDay?.toISOString() } },
- { started: null }
- ]
+ { started: null },
+ ],
},
- {
+ {
or: [
{ finished: { gte: props.firstDay?.toISOString() } },
- { finished: null }
- ]
- }
- ]
- }
- }
- }
+ { finished: null },
+ ],
+ },
+ ],
+ },
+ },
+ },
});
emit('refresh-events');
notify(t('globals.dataSaved'), 'positive');
emit('closeForm');
};
-
-
@@ -139,8 +133,8 @@ const refetchEvents = async () => {
/>
diff --git a/src/pages/Route/Vehicle/Card/VehicleEvents.vue b/src/pages/Route/Vehicle/Card/VehicleEvents.vue
index 5a90c9586..e72a746c3 100644
--- a/src/pages/Route/Vehicle/Card/VehicleEvents.vue
+++ b/src/pages/Route/Vehicle/Card/VehicleEvents.vue
@@ -24,7 +24,7 @@ const vehicleEventsFormProps = reactive({
});
const refreshEvents = async () => {
- await vehicleEventsPanelRef.value.fetchData();
+ await vehicleEventsPanelRef.value.fetchData();
};
const openForm = (data) => {
@@ -38,21 +38,20 @@ const onVehicleEventFormClose = () => {
showVehicleEventForm.value = false;
vehicleEventsFormProps.value = {};
};
-
-
-
-
-
-
+
+
+
+
+
{
if (!params.value.vehicleFk || !props.firstDay || !props.lastDay) return;
-
+
try {
await arrayData.applyFilter({
params: {
@@ -63,18 +63,22 @@ const fetchData = async () => {
where: {
vehicleFk: route.params.id,
and: [
- { or: [
- { started: { lte: props.lastDay } },
- { started: null }
- ]},
- { or: [
- { finished: { gte: props.firstDay } },
- { finished: null }
- ]}
- ]
- }
- }
- }
+ {
+ or: [
+ { started: { lte: props.lastDay } },
+ { started: null },
+ ],
+ },
+ {
+ or: [
+ { finished: { gte: props.firstDay } },
+ { finished: null },
+ ],
+ },
+ ],
+ },
+ },
+ },
});
emit('update:events', arrayData.store.data || []);
} catch (error) {
@@ -95,7 +99,7 @@ watch(
(newEvents) => {
emit('update:events', newEvents);
},
- { deep: true }
+ { deep: true },
);
const deleteEvent = async (id) => {
@@ -119,9 +123,8 @@ onMounted(async () => {
});
defineExpose({
- fetchData
+ fetchData,
});
-
diff --git a/src/pages/Route/Vehicle/VehicleCalendar.vue b/src/pages/Route/Vehicle/VehicleCalendar.vue
index 681bb966a..6adb62dd0 100644
--- a/src/pages/Route/Vehicle/VehicleCalendar.vue
+++ b/src/pages/Route/Vehicle/VehicleCalendar.vue
@@ -2,12 +2,8 @@
import EntityCalendar from 'src/components/EntityCalendar.vue';
const emit = defineEmits(['onDateSelected']);
-
- emit('onDateSelected', e)"
- />
-
\ No newline at end of file
+ emit('onDateSelected', e)" />
+
diff --git a/src/pages/Route/Vehicle/VehicleCalendarGrid.vue b/src/pages/Route/Vehicle/VehicleCalendarGrid.vue
index 99b6602c8..525809f7f 100644
--- a/src/pages/Route/Vehicle/VehicleCalendarGrid.vue
+++ b/src/pages/Route/Vehicle/VehicleCalendarGrid.vue
@@ -24,26 +24,26 @@ const events = ref([]);
const refreshEvents = () => {
days.value = {};
if (!events.value?.length || !firstDay.value || !lastDay.value) return;
-
+
let day = new Date(firstDay.value.getTime());
let endDate = new Date(lastDay.value.getTime());
while (day <= endDate) {
let stamp = day.getTime();
let dayEvents = [];
-
+
for (let event of events.value) {
const eventStart = event.started ? new Date(event.started).getTime() : null;
const eventEnd = event.finished ? new Date(event.finished).getTime() : null;
-
- let match = (!eventStart || stamp >= eventStart) &&
- (!eventEnd || stamp <= eventEnd);
-
+
+ let match =
+ (!eventStart || stamp >= eventStart) && (!eventEnd || stamp <= eventEnd);
+
if (match) {
dayEvents.push(event);
}
}
-
+
if (dayEvents.length) {
days.value[stamp] = dayEvents;
}
@@ -57,7 +57,7 @@ watch(
(value) => {
_data.value = value;
events.value = Array.isArray(value) ? value : [];
-
+
function toStamp(date) {
return date && new Date(date).setHours(0, 0, 0, 0);
}
@@ -75,14 +75,19 @@ watch(
{ immediate: true },
);
-watch(() => entityCalendarRef.value?.firstDay, (newVal) => {
- if (newVal) firstDay.value = new Date(newVal);
-});
-
-watch(() => entityCalendarRef.value?.lastDay, (newVal) => {
- if (newVal) lastDay.value = new Date(newVal);
-});
+watch(
+ () => entityCalendarRef.value?.firstDay,
+ (newVal) => {
+ if (newVal) firstDay.value = new Date(newVal);
+ },
+);
+watch(
+ () => entityCalendarRef.value?.lastDay,
+ (newVal) => {
+ if (newVal) lastDay.value = new Date(newVal);
+ },
+);
@@ -94,4 +99,4 @@ watch(() => entityCalendarRef.value?.lastDay, (newVal) => {
@refresh-events="refreshEvents"
v-bind="$attrs"
/>
-
\ No newline at end of file
+
diff --git a/src/pages/Shelving/Parking/locale/en.yml b/src/pages/Shelving/Parking/locale/en.yml
index 2076f38b4..297d25993 100644
--- a/src/pages/Shelving/Parking/locale/en.yml
+++ b/src/pages/Shelving/Parking/locale/en.yml
@@ -2,4 +2,4 @@ parking:
pickingOrder: Picking order
sector: Sector
search: Search parking
- searchInfo: You can search by parking code
\ No newline at end of file
+ searchInfo: You can search by parking code
diff --git a/src/pages/Shelving/Parking/locale/es.yml b/src/pages/Shelving/Parking/locale/es.yml
index 17fe3af53..2cffdc5de 100644
--- a/src/pages/Shelving/Parking/locale/es.yml
+++ b/src/pages/Shelving/Parking/locale/es.yml
@@ -2,4 +2,4 @@ parking:
pickingOrder: Orden de recogida
sector: Sector
search: Buscar parking
- searchInfo: Puedes buscar por código de parking
\ No newline at end of file
+ searchInfo: Puedes buscar por código de parking
diff --git a/src/pages/Shelving/locale/en.yml b/src/pages/Shelving/locale/en.yml
index bd031f50c..47c571023 100644
--- a/src/pages/Shelving/locale/en.yml
+++ b/src/pages/Shelving/locale/en.yml
@@ -6,4 +6,4 @@ shelving:
summary:
recyclable: Recyclable
search: Search shelving
- searchInfo: You can search by shelving reference
\ No newline at end of file
+ searchInfo: You can search by shelving reference
diff --git a/src/pages/Shelving/locale/es.yml b/src/pages/Shelving/locale/es.yml
index 729485e70..4031c5326 100644
--- a/src/pages/Shelving/locale/es.yml
+++ b/src/pages/Shelving/locale/es.yml
@@ -6,4 +6,4 @@ shelving:
summary:
recyclable: Reciclable
search: Buscar carro
- searchInfo: Puedes buscar por referencia del carro
\ No newline at end of file
+ searchInfo: Puedes buscar por referencia del carro
diff --git a/src/pages/Supplier/Card/SupplierSummary.vue b/src/pages/Supplier/Card/SupplierSummary.vue
index b658ca5fb..cdb7d94e5 100644
--- a/src/pages/Supplier/Card/SupplierSummary.vue
+++ b/src/pages/Supplier/Card/SupplierSummary.vue
@@ -76,7 +76,7 @@ const getUrl = (section) => `#/supplier/${entityId.value}/${section}`;
{{
dashIfEmpty(
supplier.companySize &&
- t('globals.' + supplier.companySize)
+ t('globals.' + supplier.companySize),
)
}}
diff --git a/src/pages/Ticket/Card/BasicData/TicketBasicDataForm.vue b/src/pages/Ticket/Card/BasicData/TicketBasicDataForm.vue
index 8f3695249..1d1ec7610 100644
--- a/src/pages/Ticket/Card/BasicData/TicketBasicDataForm.vue
+++ b/src/pages/Ticket/Card/BasicData/TicketBasicDataForm.vue
@@ -8,7 +8,6 @@ import VnRow from 'components/ui/VnRow.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnInputDate from 'src/components/common/VnInputDate.vue';
-import VnInputTime from 'components/common/VnInputTime.vue';
import axios from 'axios';
import useNotify from 'src/composables/useNotify.js';
@@ -59,11 +58,25 @@ const zoneWhere = computed(() => {
});
async function getLanded(params) {
- getDate(`Agencies/getLanded`, params);
+ const data = await getDate(`Agencies/getLanded`, params);
+ formData.value.landed = data.landed;
+ const shippedDate = new Date(params.shipped);
+ const landedDate = new Date(data.hour);
+ shippedDate.setHours(
+ landedDate.getHours(),
+ landedDate.getMinutes(),
+ landedDate.getSeconds(),
+ );
+ formData.value.shipped = shippedDate.toISOString();
}
async function getShipped(params) {
- getDate(`Agencies/getShipped`, params);
+ const data = await getDate(`Agencies/getShipped`, params);
+ formData.value.landed = params.landed;
+ const [hours, minutes, seconds] = data.hour.split(':').map(Number);
+ let shippedDate = new Date(data.shipped);
+ shippedDate.setHours(hours, minutes, seconds);
+ formData.value.shipped = shippedDate.toISOString();
}
async function getDate(query, params) {
@@ -75,15 +88,8 @@ async function getDate(query, params) {
if (!data) return notify(t('basicData.noDeliveryZoneAvailable'), 'negative');
formData.value.zoneFk = data.zoneFk;
- formData.value.landed = data.landed;
- const shippedDate = new Date(params.shipped);
- const landedDate = new Date(data.hour);
- shippedDate.setHours(
- landedDate.getHours(),
- landedDate.getMinutes(),
- landedDate.getSeconds(),
- );
- formData.value.shipped = shippedDate.toISOString();
+
+ return data;
}
const onChangeZone = async (zoneId) => {
@@ -273,8 +279,6 @@ async function getZone(options) {
-
+
+
+
+
-
({
diff --git a/src/pages/Ticket/Card/TicketDescriptor.vue b/src/pages/Ticket/Card/TicketDescriptor.vue
index c6c6e6c6b..3cab54b98 100644
--- a/src/pages/Ticket/Card/TicketDescriptor.vue
+++ b/src/pages/Ticket/Card/TicketDescriptor.vue
@@ -46,7 +46,9 @@ async function getClaims() {
originalTicket.value = data[0]?.originalTicketFk;
}
async function getProblems() {
- const { data } = await axios.get(`Tickets/getTicketProblems`, {params: { ids: [entityId.value] }});
+ const { data } = await axios.get(`Tickets/getTicketProblems`, {
+ params: { ids: [entityId.value] },
+ });
if (!data) return;
problems.value = data[0];
}
diff --git a/src/pages/Ticket/Card/TicketEditMana.vue b/src/pages/Ticket/Card/TicketEditMana.vue
index f8a72caf3..d463b1735 100644
--- a/src/pages/Ticket/Card/TicketEditMana.vue
+++ b/src/pages/Ticket/Card/TicketEditMana.vue
@@ -89,7 +89,7 @@ defineExpose({ save });
- {{ t('New price') }}
+ {{ t('basicData.newPrice') }}
{{ toCurrency(newPrice) }}
@@ -135,3 +135,4 @@ defineExpose({ save });
min-width: 230px;
}
+<
diff --git a/src/pages/Ticket/Card/TicketFilter.js b/src/pages/Ticket/Card/TicketFilter.js
index daa204a7a..0f12e98a3 100644
--- a/src/pages/Ticket/Card/TicketFilter.js
+++ b/src/pages/Ticket/Card/TicketFilter.js
@@ -20,6 +20,7 @@ export default {
'isFreezed',
'isTaxDataChecked',
'hasElectronicInvoice',
+ 'defaultAddressFk',
'credit',
],
include: [
diff --git a/src/pages/Ticket/Card/TicketPurchaseRequest.vue b/src/pages/Ticket/Card/TicketPurchaseRequest.vue
index 4e77c7277..19debf81b 100644
--- a/src/pages/Ticket/Card/TicketPurchaseRequest.vue
+++ b/src/pages/Ticket/Card/TicketPurchaseRequest.vue
@@ -30,7 +30,7 @@ watch(
async (val) => {
crudModelFilter.where.ticketFk = val;
tableRef.value.reload();
- }
+ },
);
const crudModelFilter = reactive({
@@ -149,9 +149,9 @@ const columns = computed(() => [
openConfirmationModal(
t('You are going to delete this ticket purchase request'),
t(
- 'This ticket will be removed from ticket purchase requests! Continue anyway?'
+ 'This ticket will be removed from ticket purchase requests! Continue anyway?',
),
- () => removeLine(row.id)
+ () => removeLine(row.id),
),
},
],
diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue
index 4975afffb..90ea4c11f 100644
--- a/src/pages/Ticket/Card/TicketSale.vue
+++ b/src/pages/Ticket/Card/TicketSale.vue
@@ -314,7 +314,7 @@ const changePrice = async (sale) => {
const updatePrice = async (sale, newPrice) => {
try {
await axios.post(`Sales/${sale.id}/updatePrice`, {
- newPrice: newPrice,
+ newPrice,
componentId: componentId.value,
});
notify('globals.dataSaved', 'positive');
diff --git a/src/pages/Ticket/Card/TicketTransferForm.vue b/src/pages/Ticket/Card/TicketTransferForm.vue
index ece3a3b97..dfa230f65 100644
--- a/src/pages/Ticket/Card/TicketTransferForm.vue
+++ b/src/pages/Ticket/Card/TicketTransferForm.vue
@@ -41,7 +41,7 @@ const transferSales = async (ticketId) => {
const { data } = await axios.post(
`tickets/${$props.ticket.id}/transferSales`,
- params
+ params,
);
if (data && data.id === $props.ticket.id) emit('refreshData');
diff --git a/src/pages/Ticket/Card/__tests__/TicketBoxing.spec.js b/src/pages/Ticket/Card/__tests__/TicketBoxing.spec.js
index a1dd7775d..d556ba2ff 100644
--- a/src/pages/Ticket/Card/__tests__/TicketBoxing.spec.js
+++ b/src/pages/Ticket/Card/__tests__/TicketBoxing.spec.js
@@ -50,7 +50,7 @@ describe('TicketBoxing', () => {
await vm.getVideoList(expeditionId, timed);
expect(vm.quasar.notify).toHaveBeenCalledWith(
- expect.objectContaining({ type: 'negative' })
+ expect.objectContaining({ type: 'negative' }),
);
});
});
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index 661fdbacc..c7f47d06b 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -584,7 +584,7 @@ function setReference(data) {
hide-selected
required
@update:model-value="() => onClientSelected(data)"
- :sort-by="'id ASC'"
+ :sort-by="['id ASC']"
>
@@ -610,7 +610,7 @@ function setReference(data) {
map-options
required
:disable="!data.clientId"
- :sort-by="'isActive DESC'"
+ :sort-by="['isActive DESC']"
@update:model-value="() => fetchAvailableAgencies(data)"
>
diff --git a/src/pages/Ticket/TicketWeekly.vue b/src/pages/Ticket/TicketWeekly.vue
index 3906d6c44..6886078bb 100644
--- a/src/pages/Ticket/TicketWeekly.vue
+++ b/src/pages/Ticket/TicketWeekly.vue
@@ -13,12 +13,14 @@ import { useArrayData } from 'composables/useArrayData';
import useNotify from 'src/composables/useNotify.js';
import axios from 'axios';
import VnTable from 'src/components/VnTable/VnTable.vue';
+import FetchData from 'src/components/FetchData.vue';
const stateStore = useStateStore();
const { t } = useI18n();
const { notify } = useNotify();
const { openConfirmationModal } = useVnConfirm();
const allColumnNames = ref([]);
+const agencies = ref([]);
const arrayData = useArrayData('WeeklyTickets');
const { store } = arrayData;
@@ -51,11 +53,16 @@ const columns = computed(() => [
isTitle: true,
cardVisible: true,
component: 'select',
- attrs: {
- url: 'Clients',
- optionLabel: 'name',
- optionValue: 'id',
- isWhere: true,
+ columnFilter: {
+ name: 'id',
+ component: 'select',
+ alias: 'c',
+ attrs: {
+ url: 'Clients',
+ optionLabel: 'name',
+ optionValue: 'id',
+ inWhere: true,
+ },
},
columnField: {
component: null,
@@ -170,6 +177,11 @@ onMounted(async () => {
+ (agencies = data)"
+ auto-load
+ />
{
[
align: 'left',
showValue: false,
sortable: true,
+ style: 'max-width: 200px;',
},
{
label: t('globals.packages'),
@@ -206,6 +207,7 @@ const columns = computed(() => [
align: 'left',
showValue: false,
sortable: true,
+ style: 'max-width: 75px;',
},
{
label: t('extraCommunity.physicKg'),
diff --git a/src/pages/Wagon/Type/WagonTypeEdit.vue b/src/pages/Wagon/Type/WagonTypeEdit.vue
index cfa1c76cd..8cf53ff4b 100644
--- a/src/pages/Wagon/Type/WagonTypeEdit.vue
+++ b/src/pages/Wagon/Type/WagonTypeEdit.vue
@@ -70,7 +70,7 @@ watch(
await loadTrays();
}
},
- { deep: true }
+ { deep: true },
);
diff --git a/src/pages/Wagon/WagonCreate.vue b/src/pages/Wagon/WagonCreate.vue
index ac2aab6ce..a9814e392 100644
--- a/src/pages/Wagon/WagonCreate.vue
+++ b/src/pages/Wagon/WagonCreate.vue
@@ -81,7 +81,7 @@ function filterType(val, update) {
update(() => {
const needle = val.toLowerCase();
filteredWagonTypes.value = wagonTypes.filter(
- (v) => v.name.toLowerCase().indexOf(needle) > -1
+ (v) => v.name.toLowerCase().indexOf(needle) > -1,
);
});
}
diff --git a/src/pages/Wagon/__tests__/WagonCreate.spec.js b/src/pages/Wagon/__tests__/WagonCreate.spec.js
index 9be19e027..ed78f9550 100644
--- a/src/pages/Wagon/__tests__/WagonCreate.spec.js
+++ b/src/pages/Wagon/__tests__/WagonCreate.spec.js
@@ -4,7 +4,8 @@ import { createWrapper } from 'app/test/vitest/helper';
import WagonCreate from 'pages/Wagon/WagonCreate.vue';
describe('WagonCreate', () => {
- let vmEdit, vmCreate;
+ let vmEdit;
+ let vmCreate;
const entityId = 1;
beforeAll(() => {
diff --git a/src/pages/Worker/Card/WorkerNotificationsManager.vue b/src/pages/Worker/Card/WorkerNotificationsManager.vue
index 27c71e6d4..402d945ed 100644
--- a/src/pages/Worker/Card/WorkerNotificationsManager.vue
+++ b/src/pages/Worker/Card/WorkerNotificationsManager.vue
@@ -41,7 +41,7 @@ async function toggleNotification(notification) {
quasar.notify({
type: 'positive',
message: t(
- `worker.notificationsManager.${notification.active ? '' : 'un'}subscribed`
+ `worker.notificationsManager.${notification.active ? '' : 'un'}subscribed`,
),
});
} catch (e) {
diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue
index a032e04d2..f357be866 100644
--- a/src/pages/Worker/Card/WorkerTimeControl.vue
+++ b/src/pages/Worker/Card/WorkerTimeControl.vue
@@ -408,7 +408,7 @@ const isUnsatisfied = async (reason) => {
const resendEmail = async () => {
const params = {
- recipient: worker.value[0]?.user?.emailUser?.email,
+ recipient: worker.value?.user?.emailUser?.email,
week: selectedWeekNumber.value,
year: selectedDateYear.value,
workerId: Number(route.params.id),
diff --git a/src/pages/Worker/Card/WorkerTimeControlCalendar.vue b/src/pages/Worker/Card/WorkerTimeControlCalendar.vue
index e9b9cc915..31c1e6315 100644
--- a/src/pages/Worker/Card/WorkerTimeControlCalendar.vue
+++ b/src/pages/Worker/Card/WorkerTimeControlCalendar.vue
@@ -95,12 +95,12 @@ watch(
() => {
getWorkWeekElements();
paintWorkWeeks();
- }
+ },
);
const getWorkWeekElements = () => {
workWeeksElements.value = document.getElementsByClassName(
- 'q-calendar-month__workweek'
+ 'q-calendar-month__workweek',
);
};
diff --git a/src/pages/Worker/Card/WorkerTimeHourChip.vue b/src/pages/Worker/Card/WorkerTimeHourChip.vue
index 5ca04bce0..d38b321b7 100644
--- a/src/pages/Worker/Card/WorkerTimeHourChip.vue
+++ b/src/pages/Worker/Card/WorkerTimeHourChip.vue
@@ -86,7 +86,7 @@ const showWorkerTimeForm = () => emit('showWorkerTimeForm');
openConfirmationModal(
t('This time entry will be deleted'),
t('Are you sure you want to delete this entry?'),
- deleteHourEntry
+ deleteHourEntry,
)
"
/>
diff --git a/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue b/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue
index f8683773d..df774dd2c 100644
--- a/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue
+++ b/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue
@@ -36,7 +36,12 @@ function openConfirmDialog(callback) {
}
-
+
diff --git a/src/pages/Zone/ZoneDeliveryPanel.vue b/src/pages/Zone/ZoneDeliveryPanel.vue
index fc5c04b41..168065ec6 100644
--- a/src/pages/Zone/ZoneDeliveryPanel.vue
+++ b/src/pages/Zone/ZoneDeliveryPanel.vue
@@ -89,7 +89,7 @@ watch(
v-model="formData.geoFk"
url="Postcodes/location"
:fields="['geoFk', 'code', 'townFk', 'countryFk']"
- :sort-by="'code ASC'"
+ :sort-by="['code ASC']"
option-value="geoFk"
option-label="code"
:filter-options="['code']"
diff --git a/src/router/modules/claim.js b/src/router/modules/claim.js
index 8fb6f5ad6..9bd371dc8 100644
--- a/src/router/modules/claim.js
+++ b/src/router/modules/claim.js
@@ -8,9 +8,9 @@ const claimCard = {
meta: {
menu: [
'ClaimBasicData',
+ 'ClaimNotes',
'ClaimLines',
'ClaimPhotos',
- 'ClaimNotes',
'ClaimDevelopment',
'ClaimAction',
'ClaimLog',
@@ -36,6 +36,15 @@ const claimCard = {
},
component: () => import('src/pages/Claim/Card/ClaimBasicData.vue'),
},
+ {
+ path: 'notes',
+ name: 'ClaimNotes',
+ meta: {
+ title: 'notes',
+ icon: 'draft',
+ },
+ component: () => import('src/pages/Claim/Card/ClaimNotes.vue'),
+ },
{
path: 'lines',
name: 'ClaimLines',
@@ -54,15 +63,6 @@ const claimCard = {
},
component: () => import('src/pages/Claim/Card/ClaimPhoto.vue'),
},
- {
- path: 'notes',
- name: 'ClaimNotes',
- meta: {
- title: 'notes',
- icon: 'draft',
- },
- component: () => import('src/pages/Claim/Card/ClaimNotes.vue'),
- },
{
path: 'development',
name: 'ClaimDevelopment',
diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js
index db254bab9..1f03a0fd7 100644
--- a/src/router/modules/customer.js
+++ b/src/router/modules/customer.js
@@ -225,7 +225,7 @@ const customerCard = {
name: 'CustomerCreditContractsInsurance',
component: () =>
import(
- 'src/pages/Customer/components/CustomerCreditContractsInsurance.vue'
+ 'src/pages/Customer/Card/CustomerCreditContractsInsurance.vue'
),
},
],
diff --git a/src/stores/__tests__/useStateQueryStore.spec.js b/src/stores/__tests__/useStateQueryStore.spec.js
index 7bdb87ced..3ef9bf382 100644
--- a/src/stores/__tests__/useStateQueryStore.spec.js
+++ b/src/stores/__tests__/useStateQueryStore.spec.js
@@ -5,7 +5,10 @@ import { useStateQueryStore } from 'src/stores/useStateQueryStore';
describe('useStateQueryStore', () => {
let stateQueryStore;
- let add, isLoading, remove, reset;
+ let add;
+ let isLoading;
+ let remove;
+ let reset;
const firstQuery = { url: 'myQuery' };
function getQueries() {
diff --git a/src/stores/invoiceOutGlobal.js b/src/stores/invoiceOutGlobal.js
index d8e061f84..df52dab0c 100644
--- a/src/stores/invoiceOutGlobal.js
+++ b/src/stores/invoiceOutGlobal.js
@@ -47,7 +47,7 @@ export const useInvoiceOutGlobalStore = defineStore({
this.formInitialData.maxShipped = new Date(
date.getFullYear(),
date.getMonth(),
- 0
+ 0,
)
.toISOString()
.substring(0, 10);
@@ -115,7 +115,7 @@ export const useInvoiceOutGlobalStore = defineStore({
if (!this.addresses || !this.addresses.length > 0) {
notify(
'invoiceOut.globalInvoices.errors.noTicketsToInvoice',
- 'negative'
+ 'negative',
);
throw new Error("There aren't addresses to invoice");
}
@@ -143,7 +143,7 @@ export const useInvoiceOutGlobalStore = defineStore({
if (params.invoiceDate < params.maxShipped) {
notify(
'invoiceOut.globalInvoices.errors.invoiceDateLessThanMaxDate',
- 'negative'
+ 'negative',
);
throw new Error('Invalid date range');
}
@@ -154,14 +154,14 @@ export const useInvoiceOutGlobalStore = defineStore({
if (this.minInvoicingDate && invoiceDateTime < minInvoiceDateTime) {
notify(
'invoiceOut.globalInvoices.errors.invoiceWithFutureDate',
- 'negative'
+ 'negative',
);
throw new Error('Invoice date in the future');
}
if (!params.serialType) {
notify(
'invoiceOut.globalInvoices.errors.chooseValidSerialType',
- 'negative'
+ 'negative',
);
throw new Error('Invalid Serial Type');
}
@@ -169,7 +169,7 @@ export const useInvoiceOutGlobalStore = defineStore({
if (clientsToInvoice === 'all' && params.serialType !== 'global') {
notify(
'invoiceOut.globalInvoices.errors.invalidSerialTypeForAll',
- 'negative'
+ 'negative',
);
throw new Error('For "all" clients, the serialType must be "global"');
}
@@ -213,7 +213,7 @@ export const useInvoiceOutGlobalStore = defineStore({
} else {
notify(
'invoiceOut.globalInvoices.errors.criticalInvoiceError',
- 'negative'
+ 'negative',
);
}
} finally {
@@ -288,7 +288,7 @@ export const useInvoiceOutGlobalStore = defineStore({
if (this.getNAdresses <= 0 || !state.addressIndex) {
return 0;
}
- let porcentaje = (state.addressIndex / this.getNAddresses) * 100;
+ const porcentaje = (state.addressIndex / this.getNAddresses) * 100;
return porcentaje?.toFixed(2);
},
getAddressNumber(state) {
diff --git a/src/stores/store-flag.d.ts b/src/stores/store-flag.d.ts
index 7677175b0..dca086a36 100644
--- a/src/stores/store-flag.d.ts
+++ b/src/stores/store-flag.d.ts
@@ -1,10 +1,10 @@
/* eslint-disable */
// THIS FEATURE-FLAG FILE IS AUTOGENERATED,
// REMOVAL OR CHANGES WILL CAUSE RELATED TYPES TO STOP WORKING
-import "quasar/dist/types/feature-flag";
+import 'quasar/dist/types/feature-flag';
-declare module "quasar/dist/types/feature-flag" {
- interface QuasarFeatureFlags {
- store: true;
- }
+declare module 'quasar/dist/types/feature-flag' {
+ interface QuasarFeatureFlags {
+ store: true;
+ }
}
diff --git a/src/stores/useDescriptorStore.js b/src/stores/useDescriptorStore.js
index be342b016..69c80d71f 100644
--- a/src/stores/useDescriptorStore.js
+++ b/src/stores/useDescriptorStore.js
@@ -16,7 +16,7 @@ export const useDescriptorStore = defineStore('descriptorStore', () => {
for (const file in files) {
const name = file.split('/').at(-1).slice(0, -19).toLowerCase();
const descriptor = moduleParser[name] ?? name;
- currentDescriptors[descriptor + 'Fk'] = defineAsyncComponent(files[file]);
+ currentDescriptors[`${descriptor}Fk`] = defineAsyncComponent(files[file]);
}
setDescriptors(currentDescriptors);
return currentDescriptors;
diff --git a/src/stores/useWeekdayStore.js b/src/stores/useWeekdayStore.js
index bf6b2704d..d7114ae69 100644
--- a/src/stores/useWeekdayStore.js
+++ b/src/stores/useWeekdayStore.js
@@ -59,7 +59,7 @@ export const useWeekdayStore = defineStore('weekdayStore', () => {
const getLocales = computed(() => {
// El día de mañana esto permitirá ordenar los weekdays en base a el locale si se lo desea reemplazando localeOrder.es por localeOrder[locale]
const locales = [];
- for (let code of localeOrder.es) {
+ for (const code of localeOrder.es) {
const weekDay = weekdaysMap[code];
const locale = t(`weekdays.${weekdaysMap[code].code}`);
const obj = {
@@ -75,7 +75,7 @@ export const useWeekdayStore = defineStore('weekdayStore', () => {
const getLocalesMap = computed(() => {
const locales = {};
- for (let code of localeOrder.es) {
+ for (const code of localeOrder.es) {
const weekDay = weekdaysMap[code];
const locale = t(`weekdays.${weekDay?.code}`);
const obj = {
@@ -91,7 +91,7 @@ export const useWeekdayStore = defineStore('weekdayStore', () => {
const getLocaleMonths = computed(() => {
const locales = [];
- for (let code of monthCodes) {
+ for (const code of monthCodes) {
const obj = {
code: code,
locale: t(`months.${code}`),
@@ -109,12 +109,12 @@ export const useWeekdayStore = defineStore('weekdayStore', () => {
* @return {Array} Array with selected days set to %true
*/
const fromSet = (_weekDays) => {
- let wdays = [];
+ const wdays = [];
if (_weekDays) {
- let codes = _weekDays.split(',');
- for (let code of codes) {
- let data = weekdaysMap[code];
+ const codes = _weekDays.split(',');
+ for (const code of codes) {
+ const data = weekdaysMap[code];
if (data) wdays[data.index] = true;
}
}
@@ -131,12 +131,12 @@ export const useWeekdayStore = defineStore('weekdayStore', () => {
* @return {String} weekDays Weekday codes separated by commas
*/
const toSet = (_weekDays) => {
- let wdays = [];
+ const wdays = [];
if (_weekDays) {
for (let i = 0; i < _weekDays.length; i++) {
if (!_weekDays[i]) continue;
- let data = weekdays[i];
+ const data = weekdays[i];
if (data) wdays.push(data.code);
}
}
diff --git a/src/utils/dataByOrder.js b/src/utils/dataByOrder.js
index eb4a4f586..664e5a03c 100644
--- a/src/utils/dataByOrder.js
+++ b/src/utils/dataByOrder.js
@@ -3,10 +3,10 @@ function orderData(data, order) {
if (typeof order === 'string') order = [order];
if (!Array.isArray(data)) return [];
if (Array.isArray(order)) {
- let orderComp = [];
+ const orderComp = [];
- for (let field of order) {
- let split = field.split(/\s+/);
+ for (const field of order) {
+ const split = field.split(/\s+/);
orderComp.push({
field: split[0],
way: split[1] === 'DESC' ? -1 : 1,
@@ -19,8 +19,8 @@ function orderData(data, order) {
}
function sortFunc(a, b, order) {
- for (let { field, way } of order) {
- let compRes = compareFunc(a[field], b[field]) * way;
+ for (const { field, way } of order) {
+ const compRes = compareFunc(a[field], b[field]) * way;
if (compRes !== 0) return compRes;
}
@@ -29,7 +29,7 @@ function sortFunc(a, b, order) {
function compareFunc(a, b) {
if (a === b) return 0;
- let aType = typeof a;
+ const aType = typeof a;
if (aType === typeof b) {
switch (aType) {
case 'string':
diff --git a/test/cypress/back/datasources.json b/test/cypress/back/datasources.json
index fa7b81e1c..5c1a39afe 100644
--- a/test/cypress/back/datasources.json
+++ b/test/cypress/back/datasources.json
@@ -75,12 +75,7 @@
"provider": "filesystem",
"root": "./storage/image",
"maxFileSize": "52428800",
- "allowedContentTypes": [
- "image/png",
- "image/jpeg",
- "image/jpg",
- "image/webp"
- ]
+ "allowedContentTypes": ["image/png", "image/jpeg", "image/jpg", "image/webp"]
},
"invoiceStorage": {
"name": "invoiceStorage",
@@ -88,10 +83,7 @@
"provider": "filesystem",
"root": "./storage/pdfs/invoice",
"maxFileSize": "52428800",
- "allowedContentTypes": [
- "application/octet-stream",
- "application/pdf"
- ]
+ "allowedContentTypes": ["application/octet-stream", "application/pdf"]
},
"claimStorage": {
"name": "claimStorage",
@@ -142,8 +134,6 @@
"provider": "filesystem",
"root": "./storage/access",
"maxFileSize": "524288000",
- "allowedContentTypes": [
- "application/x-7z-compressed"
- ]
+ "allowedContentTypes": ["application/x-7z-compressed"]
}
-}
\ No newline at end of file
+}
diff --git a/test/cypress/integration/claim/claimLines.spec.js b/test/cypress/integration/claim/claimLines.spec.js
new file mode 100644
index 000000000..45a8bf074
--- /dev/null
+++ b/test/cypress/integration/claim/claimLines.spec.js
@@ -0,0 +1,29 @@
+///
+describe('ClaimLines', () => {
+ const claimId = 1;
+
+ beforeEach(() => {
+ cy.viewport(1920, 1080);
+ cy.login('developer');
+ cy.visit(`/#/claim/${claimId}/lines`);
+ });
+
+ it('should add new line', () => {
+ cy.get('.q-page-sticky > div > .q-btn').click();
+ cy.get(
+ '.q-card > .q-table__container > .q-table__middle > .q-table > thead > tr > .q-table--col-auto-width > .q-checkbox > .q-checkbox__inner > .q-checkbox__bg',
+ ).click();
+ cy.get('.q-card__actions > .q-btn--unelevated').click();
+ cy.get('.q-notification__message').should('have.text', 'Lines added to claim');
+ });
+
+ it('should autofill claimed quantity if 0 or null', () => {
+ cy.get(
+ 'thead > tr > .q-table--col-auto-width > .q-checkbox > .q-checkbox__inner > .q-checkbox__bg',
+ ).click();
+ cy.get('.q-btn--unelevated').click();
+ cy.checkNotification('Quantities filled automatically');
+ cy.get('.q-btn--unelevated').click();
+ cy.checkNotification('No quantities to fill');
+ });
+});
diff --git a/test/cypress/integration/claim/claimNotes.spec.js b/test/cypress/integration/claim/claimNotes.spec.js
index 576671a38..aaf5be4c6 100644
--- a/test/cypress/integration/claim/claimNotes.spec.js
+++ b/test/cypress/integration/claim/claimNotes.spec.js
@@ -1,5 +1,4 @@
describe('ClaimNotes', () => {
- const saveBtn = '.q-field__append > .q-btn > .q-btn__content > .q-icon';
const firstNote = '.q-infinite-scroll :nth-child(1) > .q-card__section--vert';
beforeEach(() => {
cy.login('developer');
@@ -11,9 +10,9 @@ describe('ClaimNotes', () => {
cy.get('.q-textarea')
.should('be.visible')
.should('not.be.disabled')
- .type(message);
+ .type(message, '{{enter}}');
- cy.get(saveBtn).click();
+ cy.dataCy('saveContinueNoteButton').click();
cy.get(firstNote).should('have.text', message);
});
});
diff --git a/test/cypress/integration/customer/clientAddress.spec.js b/test/cypress/integration/customer/clientAddress.spec.js
index 5d82aa4bc..1d4361f93 100644
--- a/test/cypress/integration/customer/clientAddress.spec.js
+++ b/test/cypress/integration/customer/clientAddress.spec.js
@@ -9,9 +9,9 @@ describe('Client consignee', () => {
cy.get('.q-card').should('be.visible');
});
- it('check as equalizated', function () {
+ it('check as equalizated', () => {
cy.get('.q-card__section > .address-card').then(($el) => {
- let addressCards_before = $el.length;
+ const addressCards_before = $el.length;
cy.get('.q-page-sticky > div > .q-btn').click();
const addressName = 'test';
diff --git a/test/cypress/integration/customer/clientFiscalData.spec.js b/test/cypress/integration/customer/clientFiscalData.spec.js
index 58d2d956f..2200802ca 100644
--- a/test/cypress/integration/customer/clientFiscalData.spec.js
+++ b/test/cypress/integration/customer/clientFiscalData.spec.js
@@ -5,7 +5,7 @@ describe('Client fiscal data', () => {
cy.login('developer');
cy.visit('#/customer/1107/fiscal-data');
});
- it('Should change required value when change customer', () => {
+ it.skip('Should change required value when change customer', () => {
cy.get('.q-card').should('be.visible');
cy.dataCy('sageTaxTypeFk').filter('input').should('not.have.attr', 'required');
cy.get('#searchbar input').clear();
diff --git a/test/cypress/integration/customer/credit-management/clientCreditContracts.spec.js b/test/cypress/integration/customer/credit-management/clientCreditContracts.spec.js
index 1c2f935fc..fb8e8219e 100644
--- a/test/cypress/integration/customer/credit-management/clientCreditContracts.spec.js
+++ b/test/cypress/integration/customer/credit-management/clientCreditContracts.spec.js
@@ -7,7 +7,28 @@ describe('Client credit contracts', () => {
timeout: 5000,
});
});
- it('Should load layout', () => {
- cy.get('.q-page').should('be.visible');
+ it('Should add a new contract and an additional credit', () => {
+ cy.dataCy('createBtn').click();
+ cy.dataCy('Credit_input').type(123);
+ cy.dataCy('Grade_input').type(9);
+ cy.dataCy('FormModelPopup_save').click();
+ cy.checkNotification('Data created');
+ cy.dataCy('createBtn').should('not.exist');
+ });
+
+ it('Should add an additional credit', () => {
+ cy.dataCy('viewBtn').eq(0).click();
+ cy.get('.q-page-sticky > div').click();
+ cy.dataCy('Credit_input').type(321);
+ cy.dataCy('Grade_input').type(89);
+ cy.dataCy('FormModelPopup_save').click();
+ cy.checkNotification('Data created');
+ });
+
+ it('Should close a contract', () => {
+ cy.dataCy('closeBtn').eq(0).click();
+ cy.get('.q-btn--unelevated').click();
+ cy.checkNotification('Data saved');
+ cy.dataCy('createBtn').should('exist');
});
});
diff --git a/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js b/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js
index fd6f1c238..a9624bf08 100644
--- a/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js
@@ -53,10 +53,10 @@ describe('InvoiceInDescriptor', () => {
expect(response.statusCode).to.equal(200);
});
});
- // https://redmine.verdnatura.es/issues/8767
- it.skip('should download the file properly', () => {
+
+ it('should download the file properly', () => {
cy.visit('/#/invoice-in/1/summary');
- cy.validateDownload(() => cy.selectDescriptorOption(5));
+ cy.selectDescriptorOption(5);
});
});
@@ -84,7 +84,7 @@ describe('InvoiceInDescriptor', () => {
beforeEach(() => cy.visit(`/#/invoice-in/${originalId}/summary`));
- it.skip('should create a correcting invoice and redirect to original invoice', () => {
+ it('should create a correcting invoice and redirect to original invoice', () => {
createCorrective();
redirect(originalId);
});
diff --git a/test/cypress/integration/login/recoverPassword.spec.js b/test/cypress/integration/login/recoverPassword.spec.js
index 48f6f8563..4b97bf21a 100755
--- a/test/cypress/integration/login/recoverPassword.spec.js
+++ b/test/cypress/integration/login/recoverPassword.spec.js
@@ -14,7 +14,7 @@ describe('Recover Password', () => {
cy.waitForElement('input[aria-label="User or recovery email"]');
cy.get('input[aria-label="User or recovery email"]').should(
'have.value',
- username
+ username,
);
cy.get('button[type="submit"]').click();
@@ -24,12 +24,12 @@ describe('Recover Password', () => {
it('should change password to user', () => {
// Get token from mail
cy.request(
- `/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
+ `/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`,
).then((response) => {
const regex = /access_token=([a-zA-Z0-9]+)/;
const [match] = response.body[0].body.match(regex);
- const resetUrl = '/#/resetPassword?' + match;
+ const resetUrl = `/#/resetPassword?${match}`;
cy.visit(resetUrl);
});
diff --git a/test/cypress/integration/login/twoFactor.spec.js b/test/cypress/integration/login/twoFactor.spec.js
index 6a8ac9c06..5f2aa4582 100755
--- a/test/cypress/integration/login/twoFactor.spec.js
+++ b/test/cypress/integration/login/twoFactor.spec.js
@@ -12,7 +12,7 @@ describe('Two Factor', () => {
cy.request(
'PATCH',
`/api/VnUsers/${userId}/update-user?access_token=DEFAULT_TOKEN`,
- { twoFactor: 'email' }
+ { twoFactor: 'email' },
);
});
@@ -22,7 +22,7 @@ describe('Two Factor', () => {
cy.get('button[type="submit"]').click();
cy.get('.q-notification__message').should(
'have.text',
- 'Two-factor verification required'
+ 'Two-factor verification required',
);
cy.get('input[type="text"]').type('123456');
@@ -36,12 +36,12 @@ describe('Two Factor', () => {
cy.get('button[type="submit"]').click();
cy.get('.q-notification__message').should(
'have.text',
- 'Two-factor verification required'
+ 'Two-factor verification required',
);
// Get code from mail
cy.request(
- `/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
+ `/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`,
).then((response) => {
const tempDiv = document.createElement('div');
tempDiv.innerHTML = response.body[0].body;
diff --git a/test/cypress/integration/order/orderList.spec.js b/test/cypress/integration/order/orderList.spec.js
index 56c4b6a32..061a4d15a 100644
--- a/test/cypress/integration/order/orderList.spec.js
+++ b/test/cypress/integration/order/orderList.spec.js
@@ -17,7 +17,7 @@ describe('OrderList', () => {
cy.get(
'.q-menu > div> div.q-item:nth-child(1) >div.q-item__section--avatar > i',
).should('have.text', 'star');
- cy.get('.q-menu > div> .q-item:nth-child(1)').click();
+ cy.get('.q-menu > div> .q-item:nth-child(1)').click();
cy.get('.q-card [data-cy="Agency_select"]').click();
cy.get('.q-menu > div> .q-item:nth-child(1)').click();
cy.intercept('GET', /\/api\/Orders\/\d/).as('orderSale');
@@ -48,7 +48,7 @@ describe('OrderList', () => {
cy.url().should('include', `/order`);
});
- it('create order from customer summary', function () {
+ it('create order from customer summary', () => {
const clientId = 1101;
cy.dataCy('Customer ID_input').type(`${clientId}{enter}`);
cy.get(
diff --git a/test/cypress/integration/route/routeAutonomous.spec.js b/test/cypress/integration/route/routeAutonomous.spec.js
index b61431bfb..978eae19a 100644
--- a/test/cypress/integration/route/routeAutonomous.spec.js
+++ b/test/cypress/integration/route/routeAutonomous.spec.js
@@ -1,6 +1,8 @@
describe('RouteAutonomous', () => {
const getLinkSelector = (colField, link = true) =>
- `tr:first-child > [data-col-field="${colField}"] > .no-padding${link ? ' > .link' : ''}`;
+ `tr:first-child > [data-col-field="${colField}"] > .no-padding${
+ link ? ' > .link' : ''
+ }`;
const selectors = {
total: '.value > .text-h6',
diff --git a/test/cypress/integration/route/routeExtendedList.spec.js b/test/cypress/integration/route/routeExtendedList.spec.js
index d2b4e2108..b9c052531 100644
--- a/test/cypress/integration/route/routeExtendedList.spec.js
+++ b/test/cypress/integration/route/routeExtendedList.spec.js
@@ -69,7 +69,7 @@ describe.skip('Route extended list', () => {
.type(`{selectall}{backspace}${value}`);
break;
case 'checkbox':
- cy.get(selector).should('be.visible').click()
+ cy.get(selector).should('be.visible').click();
cy.get(selector).click();
break;
}
diff --git a/test/cypress/integration/route/vehicle/vehicleEvents.spec.js b/test/cypress/integration/route/vehicle/vehicleEvents.spec.js
index f03e11b29..c91749f2a 100644
--- a/test/cypress/integration/route/vehicle/vehicleEvents.spec.js
+++ b/test/cypress/integration/route/vehicle/vehicleEvents.spec.js
@@ -1,5 +1,4 @@
describe('Vehicle', () => {
-
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('deliveryAssistant');
@@ -10,18 +9,24 @@ describe('Vehicle', () => {
cy.get('.q-page-sticky > div > .q-btn').click();
cy.dataCy('Started_inputDate').type('01/01/2001');
cy.dataCy('Finished_inputDate').type('08/02/2001');
- cy.get(':nth-child(5)').find('[data-cy="Description_input"]').clear().type('Test');
+ cy.get(':nth-child(5)')
+ .find('[data-cy="Description_input"]')
+ .clear()
+ .type('Test');
cy.selectOption('[data-cy="State_input"]', 3);
cy.get('.q-mt-lg > .q-btn--standard').click();
cy.get('.q-current-day > .q-calendar-month__day--content > .q-btn').click();
cy.dataCy('Started_inputDate').clear().type('03/02/2001');
cy.dataCy('Finished_inputDate').clear().type('15/03/2001');
- cy.get(':nth-child(5)').find('[data-cy="Description_input"]').clear().type('Test2');
+ cy.get(':nth-child(5)')
+ .find('[data-cy="Description_input"]')
+ .clear()
+ .type('Test2');
cy.selectOption('[data-cy="State_input"]', 5);
cy.get('.q-mt-lg > .q-btn--standard').click();
cy.dataCy('delete_event').eq(0).click();
cy.dataCy('VnConfirm_confirm').click();
});
-});
\ No newline at end of file
+});
diff --git a/test/cypress/integration/ticket/ticketFilter.spec.js b/test/cypress/integration/ticket/ticketFilter.spec.js
index 60ad7f287..dec03b393 100644
--- a/test/cypress/integration/ticket/ticketFilter.spec.js
+++ b/test/cypress/integration/ticket/ticketFilter.spec.js
@@ -5,7 +5,7 @@ describe('TicketFilter', () => {
cy.visit('/#/ticket/list');
});
- it('use search button', function () {
+ it('use search button', () => {
cy.waitForElement('.q-page');
cy.get('[data-cy="Customer ID_input"]').type('1105');
cy.searchBtnFilterPanel();
diff --git a/test/cypress/integration/vnComponent/VnLocation.spec.js b/test/cypress/integration/vnComponent/VnLocation.spec.js
index ee49d6065..f39b2c0a6 100644
--- a/test/cypress/integration/vnComponent/VnLocation.spec.js
+++ b/test/cypress/integration/vnComponent/VnLocation.spec.js
@@ -53,15 +53,15 @@ describe('VnLocation', () => {
cy.waitForElement('.q-card');
cy.get(inputLocation).click();
});
- it('Show all options', function () {
+ it('Show all options', () => {
cy.get(locationOptions).should('have.length.at.least', 5);
});
- it('input filter location as "al"', function () {
+ it('input filter location as "al"', () => {
cy.get(inputLocation).clear();
cy.get(inputLocation).type('al');
cy.get(locationOptions).should('have.length.at.least', 4);
});
- it('input filter location as "ecuador"', function () {
+ it('input filter location as "ecuador"', () => {
cy.get(inputLocation).clear();
cy.get(inputLocation).type('ecuador');
cy.get(locationOptions).should('have.length.at.least', 1);
diff --git a/test/cypress/integration/vnComponent/VnShortcut.spec.js b/test/cypress/integration/vnComponent/VnShortcut.spec.js
index 83249d15e..1832a2ab9 100644
--- a/test/cypress/integration/vnComponent/VnShortcut.spec.js
+++ b/test/cypress/integration/vnComponent/VnShortcut.spec.js
@@ -1,6 +1,6 @@
///
// https://redmine.verdnatura.es/issues/8848
-describe('VnShortcuts', () => {
+describe.skip('VnShortcuts', () => {
const modules = {
item: 'a',
customer: 'c',
@@ -17,6 +17,7 @@ describe('VnShortcuts', () => {
beforeEach(() => {
cy.login('developer');
cy.visit('/');
+ cy.waitSpinner();
});
for (const [module, shortcut] of Object.entries(modules)) {
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index f990c1774..e7a30d7cb 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -116,10 +116,11 @@ Cypress.Commands.add('waitSpinner', (_spinner = 'navBar') => {
// Fill Inputs
Cypress.Commands.add('selectOption', (selector, option, timeout = 2500) => {
+ cy.get(selector).should('exist').scrollIntoView();
cy.waitForElement(selector, timeout);
cy.get(selector, { timeout })
- .should('exist')
+
.should('be.visible')
.click()
.then(($el) => {
@@ -194,9 +195,7 @@ Cypress.Commands.add('fillInForm', (obj, opts = {}) => {
cy.selectOption(el, val);
break;
case 'date':
- cy.get(el).type(
- `{selectall}{backspace}${val}`,
- ).blur();
+ cy.get(el).type(`{selectall}{backspace}${val}`).blur();
break;
case 'time':
cy.get(el).click();
@@ -571,24 +570,6 @@ Cypress.Commands.add('validateCheckbox', (selector, expectedVal = 'true') => {
cy.get(selector).should('have.attr', 'aria-checked', expectedVal.toString());
});
-Cypress.Commands.add('validateDownload', (trigger, opts = {}) => {
- const {
- url = /api\/dms\/\d+\/downloadFile\?access_token=.+/,
- types = ['text/plain', 'image/jpeg'],
- alias = 'download',
- } = opts;
- cy.intercept('GET', url).as(alias);
- trigger().then(() => {
- cy.wait(`@${alias}`).then(({ response }) => {
- expect(response.statusCode).to.equal(200);
- const isValidType = types.some((type) =>
- response.headers['content-type'].includes(type),
- );
- expect(isValidType).to.be.true;
- });
- });
-});
-
Cypress.Commands.add('validatePdfDownload', (match, trigger) => {
cy.window().then((win) => {
cy.stub(win, 'open')
diff --git a/test/cypress/support/index.js b/test/cypress/support/index.js
index e9042c8fc..06ccb0281 100644
--- a/test/cypress/support/index.js
+++ b/test/cypress/support/index.js
@@ -16,12 +16,12 @@
import './commands';
function randomString(options = { length: 10 }) {
- let possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
+ const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
return randomizeValue(possible, options);
}
function randomNumber(options = { length: 10 }) {
- let possible = '0123456789';
+ const possible = '0123456789';
return randomizeValue(possible, options);
}
diff --git a/test/cypress/support/waitUntil.js b/test/cypress/support/waitUntil.js
index 359f8643f..307ec4527 100644
--- a/test/cypress/support/waitUntil.js
+++ b/test/cypress/support/waitUntil.js
@@ -1,7 +1,7 @@
const waitUntil = (subject, checkFunction, originalOptions = {}) => {
if (!(checkFunction instanceof Function)) {
throw new Error(
- '`checkFunction` parameter should be a function. Found: ' + checkFunction,
+ `\`checkFunction\` parameter should be a function. Found: ${checkFunction}`,
);
}
diff --git a/vitest.config.js b/vitest.config.js
index c2c3661a9..541373dd9 100644
--- a/vitest.config.js
+++ b/vitest.config.js
@@ -5,7 +5,8 @@ import jsconfigPaths from 'vite-jsconfig-paths';
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
import path from 'path';
-let reporters, outputFile;
+let reporters;
+let outputFile;
if (process.env.CI) {
reporters = ['junit', 'default'];