+
-
-
+
-
- {{ 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..eb56f5fd2 100644
--- a/src/pages/Customer/components/CustomerNewPayment.vue
+++ b/src/pages/Customer/components/CustomerNewPayment.vue
@@ -130,20 +130,22 @@ async function onDataSaved(formData, { id }) {
}
}
-async function getSupplierClientReferences(value) {
- if (!value) return (initialData.description = '');
- const params = { bankAccount: value };
- const { data } = await axios(`Clients/getClientOrSupplierReference`, { params });
- if (!data.clientId) {
- initialData.description = t('Supplier Compensation Reference', {
- supplierId: data.supplierId,
- supplierName: data.supplierName,
+async function getSupplierClientReferences(data) {
+ if (!data) return (initialData.description = '');
+ const params = { bankAccount: data.compensationAccount };
+ const { data: reference } = await axios(`Clients/getClientOrSupplierReference`, {
+ params,
+ });
+ if (reference.supplierId) {
+ data.description = t('Supplier Compensation Reference', {
+ supplierId: reference.supplierId,
+ supplierName: reference.supplierName,
});
return;
}
- initialData.description = t('Client Compensation Reference', {
- clientId: data.clientId,
- clientName: data.clientName,
+ data.description = t('Client Compensation Reference', {
+ clientId: reference.clientId,
+ clientName: reference.clientName,
});
}
@@ -222,6 +224,7 @@ async function getAmountPaid() {
clearable
v-model.number="data.amountPaid"
data-cy="paymentAmount"
+ :positive="false"
/>
@@ -251,7 +254,7 @@ async function getAmountPaid() {
:label="t('Compensation account')"
clearable
v-model="data.compensationAccount"
- @blur="getSupplierClientReferences(data.compensationAccount)"
+ @blur="getSupplierClientReferences(data)"
/>
@@ -287,6 +290,9 @@ async function getAmountPaid() {
+en:
+ Supplier Compensation Reference: ({supplierId}) Ntro Proveedor {supplierName}
+ Client Compensation Reference: ({clientId}) Ntro Cliente {clientName}
es:
New payment: Añadir pago
Date: Fecha
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/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue
index 8aa6d9174..26fa50c51 100644
--- a/src/pages/Supplier/Card/SupplierConsumption.vue
+++ b/src/pages/Supplier/Card/SupplierConsumption.vue
@@ -1,22 +1,20 @@
@@ -160,14 +238,14 @@ onMounted(async () => {
{{ t('Total entries') }}:
- {{ totalRows.totalPrice }} €
+ {{ toCurrency(totalRows.totalPrice) }}
{{ t('Total stems entries') }}:
- {{ totalRows.totalQuantity }}
+ {{ toNumber(totalRows.totalQuantity) }}
@@ -177,59 +255,111 @@ onMounted(async () => {
-
-
-
-
- {{ t('supplier.consumption.entry') }}:
- {{ row.id }}
-
-
- {{ t('globals.date') }}:
- {{ toDate(row.shipped) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- {{ t('globals.reference') }}:
- {{ row.invoiceNumber }}
-
-
-
-
- {{ buy.itemName }}
-
-
+
+
+
-
- {{ buy.subName }}
-
-
- {{ dashIfEmpty(buy.quantity) }}
- {{ dashIfEmpty(buy.price) }}
- {{ dashIfEmpty(buy.total) }}
-
-
-
- {{ t('Total entry') }}:
- {{ row.total }} €
-
-
- {{ t('Total stems') }}:
- {{ row.quantity }}
-
-
-
-
+
+
+ {{ col.value }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ col.value }}
+
+
+
+
+
+
+
+
+
+
+
+
-
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 });