-
+
{{ agency.name }}
diff --git a/src/pages/Route/Agency/Card/AgencyWorkcenter.vue b/src/pages/Route/Agency/Card/AgencyWorkcenter.vue
index 9a9213868..d33c9f753 100644
--- a/src/pages/Route/Agency/Card/AgencyWorkcenter.vue
+++ b/src/pages/Route/Agency/Card/AgencyWorkcenter.vue
@@ -80,6 +80,7 @@ async function deleteWorCenter(id) {
color="primary"
round
flat
+ data-cy="removeWorkCenterBtn"
/>
diff --git a/src/pages/Route/Card/RouteCard.vue b/src/pages/Route/Card/RouteCard.vue
index c178dc6bf..b71f7d088 100644
--- a/src/pages/Route/Card/RouteCard.vue
+++ b/src/pages/Route/Card/RouteCard.vue
@@ -1,10 +1,10 @@
-
diff --git a/src/pages/Route/Card/RouteFilter.vue b/src/pages/Route/Card/RouteFilter.vue
index 21858102b..cb5158517 100644
--- a/src/pages/Route/Card/RouteFilter.vue
+++ b/src/pages/Route/Card/RouteFilter.vue
@@ -25,7 +25,7 @@ const emit = defineEmits(['search']);
>
- {{ t(`params.${tag.label}`) }}:
+ {{ t(`route.params.${tag.label}`) }}:
{{ formatFn(tag.value) }}
@@ -33,6 +33,7 @@ const emit = defineEmits(['search']);
@@ -146,7 +147,7 @@ const emit = defineEmits(['search']);
@@ -154,38 +155,3 @@ const emit = defineEmits(['search']);
-
-
-en:
- params:
- warehouseFk: Warehouse
- description: Description
- m3: m³
- scopeDays: Days Onward
- vehicleFk: Vehicle
- agencyModeFk: Agency
- workerFk: Worker
- from: From
- to: To
- Served: Served
-es:
- params:
- warehouseFk: Almacén
- description: Descripción
- m3: m³
- scopeDays: Días en adelante
- vehicleFk: Vehículo
- agencyModeFk: Agencia
- workerFk: Trabajador
- from: Desde
- to: Hasta
- Warehouse: Almacén
- Description: Descripción
- Vehicle: Vehículo
- Agency: Agencia
- Worker: Trabajador
- From: Desde
- To: Hasta
- Served: Servida
- Days Onward: Días en adelante
-
diff --git a/src/pages/Route/Card/RouteSummary.vue b/src/pages/Route/Card/RouteSummary.vue
index 3051972b2..f68628095 100644
--- a/src/pages/Route/Card/RouteSummary.vue
+++ b/src/pages/Route/Card/RouteSummary.vue
@@ -135,7 +135,7 @@ const ticketColumns = ref([
@@ -168,7 +168,7 @@ const ticketColumns = ref([
{{ value }}
@@ -230,7 +230,7 @@ const ticketColumns = ref([
-
+
{{ value }}
@@ -238,7 +238,7 @@ const ticketColumns = ref([
-
+
{{ value }}
diff --git a/src/pages/Route/Cmr/CmrList.vue b/src/pages/Route/Cmr/CmrList.vue
index b3eaf3b48..d0683e481 100644
--- a/src/pages/Route/Cmr/CmrList.vue
+++ b/src/pages/Route/Cmr/CmrList.vue
@@ -2,28 +2,38 @@
import { onBeforeMount, onMounted, computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { Notify } from 'quasar';
+import { useRoute } from 'vue-router';
import { useSession } from 'src/composables/useSession';
import { toDateHourMin } from 'filters/index';
import { useStateStore } from 'src/stores/useStateStore';
-import axios from 'axios';
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import VnTable from 'components/VnTable/VnTable.vue';
+import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
+const route = useRoute();
const { t } = useI18n();
const { getTokenMultimedia } = useSession();
const token = getTokenMultimedia();
const state = useStateStore();
-const warehouses = ref([]);
const selectedRows = ref([]);
+const dataKey = 'CmrList';
+const shipped = Date.vnNew();
+shipped.setHours(0, 0, 0, 0);
+shipped.setDate(shipped.getDate() - 1);
+const userParams = {
+ shipped: null,
+};
+
+
const columns = computed(() => [
{
align: 'left',
name: 'cmrFk',
- label: t('route.cmr.list.cmrFk'),
+ label: t('route.cmr.params.cmrFk'),
chip: {
condition: () => true,
},
@@ -32,62 +42,67 @@ const columns = computed(() => [
{
align: 'center',
name: 'hasCmrDms',
- label: t('route.cmr.list.hasCmrDms'),
+ label: t('route.cmr.params.hasCmrDms'),
component: 'checkbox',
cardVisible: true,
},
{
align: 'left',
- label: t('route.cmr.list.ticketFk'),
+ label: t('route.cmr.params.ticketFk'),
name: 'ticketFk',
},
{
align: 'left',
- label: t('route.cmr.list.routeFk'),
+ label: t('route.cmr.params.routeFk'),
name: 'routeFk',
},
{
align: 'left',
- label: t('route.cmr.list.clientFk'),
+ label: t('route.cmr.params.clientFk'),
name: 'clientFk',
},
{
align: 'right',
- label: t('route.cmr.list.country'),
+ label: t('route.cmr.params.countryFk'),
name: 'countryFk',
- cardVisible: true,
+ component: 'select',
attrs: {
url: 'countries',
fields: ['id', 'name'],
- optionLabel: 'name',
- optionValue: 'id',
},
columnFilter: {
- inWhere: true,
- component: 'select',
+ name: 'countryFk',
+ attrs: {
+ url: 'countries',
+ fields: ['id', 'name'],
+ },
},
format: ({ countryName }) => countryName,
},
{
align: 'right',
- label: t('route.cmr.list.shipped'),
+ label: t('route.cmr.params.shipped'),
name: 'shipped',
cardVisible: true,
- columnFilter: {
- component: 'date',
- inWhere: true,
- },
+ component: 'date',
format: ({ shipped }) => toDateHourMin(shipped),
},
{
align: 'right',
+ label: t('route.cmr.params.warehouseFk'),
name: 'warehouseFk',
- label: t('globals.warehouse'),
- columnFilter: {
- component: 'select',
- },
+ component: 'select',
attrs: {
- options: warehouses.value,
+ url: 'warehouses',
+ fields: ['id', 'name'],
+ },
+ columnFilter: {
+ inWhere: true,
+ name: 'warehouseFk',
+ attrs: {
+ url: 'warehouses',
+ fields: ['id', 'name'],
+ },
},
format: ({ warehouseName }) => warehouseName,
},
@@ -96,7 +111,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('Ver cmr'),
+ title: t('route.cmr.params.viewCmr'),
icon: 'visibility',
isPrimary: true,
action: (row) => window.open(getCmrUrl(row?.cmrFk), '_blank'),
@@ -105,13 +120,17 @@ const columns = computed(() => [
},
]);
-onBeforeMount(async () => {
- const { data } = await axios.get('Warehouses');
- warehouses.value = data;
+onBeforeMount(() => {
+ initializeFromQuery();
});
onMounted(() => (state.rightDrawer = true));
+const initializeFromQuery = () => {
+ const query = route.query.table ? JSON.parse(route.query.table) : {};
+ shipped.value = query.shipped || shipped.toISOString();
+ Object.assign(userParams, { shipped });
+};
function getApiUrl() {
return new URL(window.location).origin;
}
@@ -133,6 +152,11 @@ function downloadPdfs() {
}
+
- {{ t('route.cmr.list.downloadCmrs') }}
+ {{ t('route.cmr.params.downloadCmrs') }}
{
-import VnCardBeta from 'components/common/VnCardBeta.vue';
+import VnCard from 'components/common/VnCard.vue';
import RoadmapDescriptor from 'pages/Route/Roadmap/RoadmapDescriptor.vue';
-
+
diff --git a/src/pages/Route/Roadmap/RoadmapDescriptor.vue b/src/pages/Route/Roadmap/RoadmapDescriptor.vue
index baa864a15..198bcf8c7 100644
--- a/src/pages/Route/Roadmap/RoadmapDescriptor.vue
+++ b/src/pages/Route/Roadmap/RoadmapDescriptor.vue
@@ -15,6 +15,10 @@ const $props = defineProps({
required: false,
default: null,
},
+ summary: {
+ type: Object,
+ default: null,
+ },
});
const route = useRoute();
@@ -26,7 +30,12 @@ const entityId = computed(() => {
-
+
diff --git a/src/pages/Route/RouteAutonomous.vue b/src/pages/Route/RouteAutonomous.vue
index 3047cdf86..15db2a55f 100644
--- a/src/pages/Route/RouteAutonomous.vue
+++ b/src/pages/Route/RouteAutonomous.vue
@@ -13,6 +13,7 @@ import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
import RouteDescriptorProxy from 'pages/Route/Card/RouteDescriptorProxy.vue';
import InvoiceInDescriptorProxy from 'pages/InvoiceIn/Card/InvoiceInDescriptorProxy.vue';
import SupplierDescriptorProxy from 'pages/Supplier/Card/SupplierDescriptorProxy.vue';
+import AgencyDescriptorProxy from 'pages/Route/Agency/Card/AgencyDescriptorProxy.vue';
import VnSearchbar from 'components/ui/VnSearchbar.vue';
import VnDms from 'components/common/VnDms.vue';
import VnTable from 'components/VnTable/VnTable.vue';
@@ -236,10 +237,16 @@ onUnmounted(() => (stateStore.rightDrawer = false));
selection: 'multiple',
}"
>
-
+
- {{ row.routeFk }}
-
+ {{ row?.agencyModeName }}
+
+
+
+
+
+ {{ row?.agencyAgreement }}
+
diff --git a/src/pages/Route/RouteExtendedList.vue b/src/pages/Route/RouteExtendedList.vue
index a7e192765..fb19323c9 100644
--- a/src/pages/Route/RouteExtendedList.vue
+++ b/src/pages/Route/RouteExtendedList.vue
@@ -38,7 +38,7 @@ const routeFilter = {
};
const columns = computed(() => [
{
- align: 'center',
+ align: 'right',
name: 'id',
label: 'Id',
chip: {
@@ -46,11 +46,11 @@ const columns = computed(() => [
},
isId: true,
columnFilter: false,
+ width: '25px',
},
{
- align: 'center',
name: 'workerFk',
- label: t('route.Worker'),
+ label: t('globals.worker'),
create: true,
component: 'select',
attrs: {
@@ -71,9 +71,8 @@ const columns = computed(() => [
format: (row, dashIfEmpty) => dashIfEmpty(row.workerUserName),
},
{
- align: 'center',
name: 'agencyModeFk',
- label: t('route.Agency'),
+ label: t('globals.agency'),
isTitle: true,
cardVisible: true,
create: true,
@@ -90,9 +89,8 @@ const columns = computed(() => [
format: (row, dashIfEmpty) => dashIfEmpty(row.agencyName),
},
{
- align: 'center',
name: 'vehicleFk',
- label: t('route.Vehicle'),
+ label: t('globals.vehicle'),
cardVisible: true,
create: true,
component: 'select',
@@ -111,9 +109,8 @@ const columns = computed(() => [
format: (row, dashIfEmpty) => dashIfEmpty(row.vehiclePlateNumber),
},
{
- align: 'center',
name: 'dated',
- label: t('route.Date'),
+ label: t('globals.date'),
columnFilter: false,
cardVisible: true,
create: true,
@@ -122,9 +119,8 @@ const columns = computed(() => [
dated === '0000-00-00' ? dashIfEmpty(null) : toDate(dated),
},
{
- align: 'center',
name: 'from',
- label: t('route.From'),
+ label: t('globals.from'),
visible: false,
cardVisible: true,
create: true,
@@ -132,9 +128,8 @@ const columns = computed(() => [
format: ({ from }) => toDate(from),
},
{
- align: 'center',
name: 'to',
- label: t('route.To'),
+ label: t('globals.to'),
visible: false,
cardVisible: true,
create: true,
@@ -142,30 +137,31 @@ const columns = computed(() => [
format: ({ date }) => toDate(date),
},
{
- align: 'center',
+ align: 'right',
name: 'm3',
label: 'm3',
cardVisible: true,
columnClass: 'shrink',
+ width: '50px',
},
{
- align: 'center',
name: 'started',
label: t('route.hourStarted'),
component: 'time',
columnFilter: false,
format: ({ started }) => toHour(started),
+ width: '50px',
},
{
- align: 'center',
name: 'finished',
label: t('route.hourFinished'),
component: 'time',
columnFilter: false,
format: ({ finished }) => toHour(finished),
+ width: '50px',
},
{
- align: 'center',
+ align: 'right',
name: 'kmStart',
label: t('route.KmStart'),
columnClass: 'shrink',
@@ -173,7 +169,7 @@ const columns = computed(() => [
visible: false,
},
{
- align: 'center',
+ align: 'right',
name: 'kmEnd',
label: t('route.KmEnd'),
columnClass: 'shrink',
@@ -181,16 +177,15 @@ const columns = computed(() => [
visible: false,
},
{
- align: 'center',
+ align: 'left',
name: 'description',
- label: t('route.Description'),
+ label: t('globals.description'),
isTitle: true,
create: true,
component: 'input',
field: 'description',
},
{
- align: 'center',
name: 'isOk',
label: t('route.Served'),
component: 'checkbox',
@@ -202,7 +197,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('route.Add tickets'),
+ title: t('route.addTicket'),
icon: 'vn:ticketAdd',
action: (row) => openTicketsDialog(row?.id),
isPrimary: true,
@@ -214,7 +209,7 @@ const columns = computed(() => [
isPrimary: true,
},
{
- title: t('route.Route summary'),
+ title: t('route.routeSummary'),
icon: 'arrow_forward',
action: (row) => navigate(row?.id),
isPrimary: true,
@@ -276,11 +271,13 @@ const openTicketsDialog = (id) => {
- {{ t('route.Select the starting date') }}
+
+ {{ t('route.extendedList.selectStartingDate') }}
+
@@ -288,7 +285,7 @@ const openTicketsDialog = (id) => {
@@ -339,7 +336,7 @@ const openTicketsDialog = (id) => {
:disable="!selectedRows?.length"
@click="confirmationDialog = true"
>
- {{ t('route.Clone Selected Routes') }}
+ {{ t('route.extendedList.cloneSelectedRoutes') }}
{
:disable="!selectedRows?.length"
@click="showRouteReport"
>
- {{ t('route.Download selected routes as PDF') }}
+ {{
+ t('route.extendedList.downloadSelectedRoutes')
+ }}
{
:disable="!selectedRows?.length"
@click="markAsServed()"
>
- {{ t('route.Mark as served') }}
+ {{ t('route.extendedList.markServed') }}
diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue
index 5723e2f0d..7fc1027ea 100644
--- a/src/pages/Route/RouteList.vue
+++ b/src/pages/Route/RouteList.vue
@@ -7,8 +7,11 @@ import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
import RouteFilter from 'pages/Route/Card/RouteFilter.vue';
import VnTable from 'components/VnTable/VnTable.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
+import AgencyDescriptorProxy from 'src/pages/Route/Agency/Card/AgencyDescriptorProxy.vue';
+import VehicleDescriptorProxy from 'src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue';
import VnSection from 'src/components/common/VnSection.vue';
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
+import RouteTickets from './RouteTickets.vue';
const { t } = useI18n();
const { viewSummary } = useSummaryDialog();
@@ -24,6 +27,12 @@ const routeFilter = {
},
],
};
+
+function redirectToTickets(id) {
+ const url = `#/route/${id}/tickets`;
+ window.open(url, '_blank');
+}
+
const columns = computed(() => [
{
align: 'right',
@@ -34,25 +43,29 @@ const columns = computed(() => [
condition: () => true,
},
columnFilter: false,
+ width: '25px',
},
{
- align: 'left',
name: 'workerFk',
- label: t('route.Worker'),
+ label: t('gloabls.worker'),
component: markRaw(VnSelectWorker),
create: true,
- cardVisible: true,
format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef),
columnFilter: false,
+ width: '100px',
},
{
- align: 'left',
- name: 'agencyName',
- label: t('route.Agency'),
+ name: 'workerFk',
+ label: t('globals.worker'),
+ visible: false,
cardVisible: true,
},
{
- label: t('route.Agency'),
+ name: 'agencyName',
+ label: t('globals.agency'),
+ },
+ {
+ label: t('globals.Agency'),
name: 'agencyModeFk',
component: 'select',
attrs: {
@@ -68,14 +81,18 @@ const columns = computed(() => [
visible: false,
},
{
- align: 'left',
- name: 'vehiclePlateNumber',
- label: t('route.Vehicle'),
+ name: 'agencyName',
+ label: t('globals.agency'),
+ visible: false,
cardVisible: true,
},
+ {
+ name: 'vehiclePlateNumber',
+ label: t('globals.vehicle'),
+ },
{
name: 'vehicleFk',
- label: t('route.Vehicle'),
+ label: t('globals.Vehicle'),
cardVisible: true,
component: 'select',
attrs: {
@@ -93,25 +110,27 @@ const columns = computed(() => [
visible: false,
},
{
- align: 'left',
+ align: 'center',
name: 'started',
label: t('route.hourStarted'),
cardVisible: true,
columnFilter: false,
- format: (row) => toHour(row.started),
+ format: ({ started }) => toHour(started),
+ width: '50px',
},
{
- align: 'left',
+ align: 'center',
name: 'finished',
label: t('route.hourFinished'),
cardVisible: true,
columnFilter: false,
- format: (row) => toHour(row.started),
+ format: ({ finished }) => toHour(finished),
+ width: '50px',
},
{
align: 'left',
name: 'description',
- label: t('route.Description'),
+ label: t('globals.description'),
cardVisible: true,
isTitle: true,
create: true,
@@ -119,7 +138,6 @@ const columns = computed(() => [
columnFilter: false,
},
{
- align: 'left',
name: 'isOk',
label: t('route.Served'),
component: 'checkbox',
@@ -130,6 +148,12 @@ const columns = computed(() => [
align: 'right',
name: 'tableActions',
actions: [
+ {
+ title: t('globals.pageTitles.tickets'),
+ icon: 'vn:ticket',
+ action: (row) => redirectToTickets(row?.id),
+ isPrimary: true,
+ },
{
title: t('components.smartCard.viewSummary'),
icon: 'preview',
@@ -155,6 +179,7 @@ const columns = computed(() => [
[
+
+
+ {{ row?.agencyName }}
+
+
+
+
+
+ {{ row?.vehiclePlateNumber }}
+
+
+
diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue
index 23b1b1d5b..c981b86a5 100644
--- a/src/pages/Route/RouteRoadmap.vue
+++ b/src/pages/Route/RouteRoadmap.vue
@@ -2,13 +2,11 @@
import { useI18n } from 'vue-i18n';
import { computed, ref } from 'vue';
import { dashIfEmpty } from 'src/filters';
-import { toDate, toDateHourMin } from 'filters/index';
+import { toDate, toDateHourMin, toCurrency } from 'filters/index';
import { useQuasar } from 'quasar';
import { useSummaryDialog } from 'composables/useSummaryDialog';
-import toCurrency from 'filters/toCurrency';
import axios from 'axios';
-import VnSearchbar from 'components/ui/VnSearchbar.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import VnTable from 'components/VnTable/VnTable.vue';
import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
@@ -17,6 +15,8 @@ import VnInputDate from 'components/common/VnInputDate.vue';
import VnInputTime from 'src/components/common/VnInputTime.vue';
import VnSection from 'src/components/common/VnSection.vue';
import RoadmapFilter from './Roadmap/RoadmapFilter.vue';
+import VehicleDescriptorProxy from 'src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue';
+import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
const { viewSummary } = useSummaryDialog();
const { t } = useI18n();
@@ -33,7 +33,7 @@ const columns = computed(() => [
{
align: 'left',
name: 'name',
- label: t('Roadmap'),
+ label: t('route.roadmap.roadmap'),
create: true,
cardVisible: true,
columnFilter: {
@@ -41,9 +41,9 @@ const columns = computed(() => [
},
},
{
- align: 'left',
+ align: 'center',
name: 'etd',
- label: t('ETD'),
+ label: t('route.roadmap.etd'),
component: 'date',
columnFilter: {
inWhere: true,
@@ -54,7 +54,7 @@ const columns = computed(() => [
{
align: 'left',
name: 'supplierFk',
- label: t('Carrier'),
+ label: t('route.roadmap.carrier'),
component: 'select',
attrs: {
url: 'suppliers',
@@ -65,21 +65,21 @@ const columns = computed(() => [
},
{
name: 'tractorPlate',
- label: t('Plate'),
+ label: t('route.roadmap.vehicle'),
field: (row) => row.tractorPlate,
sortable: true,
align: 'left',
},
{
name: 'price',
- label: t('Price'),
- field: (row) => toCurrency(row.price),
+ label: t('route.roadmap.price'),
+ format: ({ price }) => toCurrency(price),
sortable: true,
- align: 'left',
+ align: 'right',
},
{
name: 'observations',
- label: t('Observations'),
+ label: t('route.roadmap.observations'),
field: (row) => dashIfEmpty(row.observations),
sortable: true,
align: 'left',
@@ -89,7 +89,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('Ver cmr'),
+ title: t('route.roadmap.seeCmr'),
icon: 'preview',
isPrimary: true,
action: (row) => viewSummary(row?.id, RoadmapSummary),
@@ -124,8 +124,8 @@ function confirmRemove() {
.dialog({
component: VnConfirm,
componentProps: {
- title: t('Selected roadmaps will be removed'),
- message: t('Are you sure you want to continue?'),
+ title: t('route.roadmap.selectedRoadmapsRemoved'),
+ message: t('route.roadmap.areYouSure'),
promise: removeSelection,
},
})
@@ -157,15 +157,24 @@ function exprBuilder(param, value) {
- {{ t('Select the estimated date of departure (ETD)') }}
+ {{ t('route.roadmap.selectEtd') }}
-
+
-
+
{{ t('globals.clone') }}
@@ -181,7 +190,7 @@ function exprBuilder(param, value) {
:disable="!selectedRows?.length"
@click="isCloneDialogOpen = true"
>
- {{ t('Clone Selected Routes') }}
+ {{ t('route.roadmap.cloneSelected') }}
- {{ t('Delete roadmap(s)') }}
+ {{ t('route.roadmap.deleteRoadmap') }}
@@ -222,7 +231,7 @@ function exprBuilder(param, value) {
redirect="route/roadmap"
:create="{
urlCreate: 'Roadmaps',
- title: t('Create routemap'),
+ title: t('route.roadmap.createRoadmap'),
onDataSaved: ({ id }) => tableRef.redirect(id),
formInitialData: {},
}"
@@ -232,7 +241,10 @@ function exprBuilder(param, value) {
{{ toDateHourMin(row.etd) }}
- {{ row.supplierFk }}
+
+ {{ row.driverName }}
+
+
@@ -251,21 +263,3 @@ function exprBuilder(param, value) {
gap: 12px;
}
-
-es:
- Create routemap: Crear troncal
- Search roadmaps: Buscar troncales
- You can search by roadmap reference: Puedes buscar por referencia del troncal
- Delete roadmap(s): Eliminar troncal(es)
- Selected roadmaps will be removed: Los troncales seleccionadas serán eliminados
- Are you sure you want to continue?: ¿Seguro que quieres continuar?
- The date can't be empty: La fecha no puede estar vacía
- Clone Selected Routes: Clonar rutas seleccionadas
- Create roadmap: Crear troncal
- Roadmap: Troncal
- Carrier: Transportista
- Plate: Matrícula
- Price: Precio
- Observations: Observaciones
- Select the estimated date of departure (ETD): Selecciona la fecha estimada de salida
-
diff --git a/src/pages/Route/RouteTickets.vue b/src/pages/Route/RouteTickets.vue
index adc7dfdaa..b17fb543f 100644
--- a/src/pages/Route/RouteTickets.vue
+++ b/src/pages/Route/RouteTickets.vue
@@ -37,9 +37,9 @@ const columns = computed(() => [
align: 'left',
},
{
- name: 'city',
- label: t('City'),
- field: (row) => row?.city,
+ name: 'client',
+ label: t('Client'),
+ field: (row) => row?.nickname,
sortable: false,
align: 'left',
},
@@ -51,9 +51,9 @@ const columns = computed(() => [
align: 'center',
},
{
- name: 'client',
- label: t('Client'),
- field: (row) => row?.nickname,
+ name: 'city',
+ label: t('City'),
+ field: (row) => row?.city,
sortable: false,
align: 'left',
},
diff --git a/src/pages/Route/Vehicle/Card/VehicleCard.vue b/src/pages/Route/Vehicle/Card/VehicleCard.vue
index f59420aa2..b6038c24c 100644
--- a/src/pages/Route/Vehicle/Card/VehicleCard.vue
+++ b/src/pages/Route/Vehicle/Card/VehicleCard.vue
@@ -1,10 +1,10 @@
-
+import { computed } from 'vue';
+import { useRoute } from 'vue-router';
import VnLv from 'src/components/ui/VnLv.vue';
import CardDescriptor from 'components/ui/CardDescriptor.vue';
import axios from 'axios';
import useNotify from 'src/composables/useNotify.js';
const { notify } = useNotify();
+
+const props = defineProps({
+ id: {
+ type: Number,
+ required: false,
+ default: null,
+ },
+});
+
+const route = useRoute();
+const entityId = computed(() => props.id || route.params.id);
+import VehicleDescriptor from 'pages/Route/Vehicle/Card/VehicleDescriptor.vue';
+import VehicleSummary from './VehicleSummary.vue';
+
+const $props = defineProps({
+ id: {
+ type: Number,
+ required: true,
+ },
+ summary: {
+ type: Object,
+ default: null,
+ },
+});
+
+
+
+
+
+
diff --git a/src/pages/Route/Vehicle/Card/VehicleSummary.vue b/src/pages/Route/Vehicle/Card/VehicleSummary.vue
index e4b0a9497..13d4bbc9d 100644
--- a/src/pages/Route/Vehicle/Card/VehicleSummary.vue
+++ b/src/pages/Route/Vehicle/Card/VehicleSummary.vue
@@ -13,12 +13,13 @@ const props = defineProps({ id: { type: [Number, String], default: null } });
const route = useRoute();
const entityId = computed(() => props.id || +route.params.id);
+const baseLink = `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}`;
const links = {
- 'basic-data': `#/vehicle/${entityId.value}/basic-data`,
- notes: `#/vehicle/${entityId.value}/notes`,
- dms: `#/vehicle/${entityId.value}/dms`,
- 'invoice-in': `#/vehicle/${entityId.value}/invoice-in`,
- events: `#/vehicle/${entityId.value}/events`,
+ 'basic-data': `${baseLink}/basic-data`,
+ notes: `${baseLink}/notes`,
+ dms: `${baseLink}/dms`,
+ 'invoice-in': `${baseLink}/invoice-in`,
+ events: `${baseLink}/events`,
};
@@ -54,7 +55,10 @@ const links = {
{{ entity.supplier?.name }}
-
+
@@ -63,6 +67,7 @@ const links = {
{{ entity.supplierCooler?.name }}
diff --git a/src/pages/Route/Vehicle/VehicleList.vue b/src/pages/Route/Vehicle/VehicleList.vue
index e5b945010..a79cc2e35 100644
--- a/src/pages/Route/Vehicle/VehicleList.vue
+++ b/src/pages/Route/Vehicle/VehicleList.vue
@@ -116,6 +116,7 @@ const columns = computed(() => [
title: t('components.smartCard.openSummary'),
icon: 'preview',
action: (row) => viewSummary(row.id, VehicleSummary),
+ isPrimary: true,
},
],
},
diff --git a/src/pages/Route/locale/en.yml b/src/pages/Route/locale/en.yml
index cc445f412..447d641f0 100644
--- a/src/pages/Route/locale/en.yml
+++ b/src/pages/Route/locale/en.yml
@@ -1,48 +1,73 @@
route:
+ filter:
+ Served: Served
+ extendedList:
+ selectStartingDate: Select the starting date
+ startingDate: Starting date
+ cloneSelectedRoutes: Clone selected routes
+ downloadSelectedRoutes: Download selected routes as PDF
+ markServed: Mark as served
roadmap:
+ roadmap: Roadmap
+ carrier: Carrier
+ vehicle: Vehicle
+ price: Price
+ observations: Observations
+ etd: ETD
+ dateCantEmpty: The date can't be empty
+ createRoadmap: Create roadmap
+ deleteRoadmap: Delete roadmap(s)
+ cloneSelected: Clone selected routes
+ selectedRoadmapsRemoved: Selected roadmaps will be removed
+ areYouSure: Are you sure you want to continue?
+ selectEtd: Select the estimated date of departure (ETD)
search: Search roadmap
searchInfo: You can search by roadmap reference
params:
+ warehouseFk: Warehouse
+ description: Description
+ m3: m³
+ scopeDays: Days Onward
+ vehicleFk: Vehicle
+ agencyModeFk: Agency
+ workerFk: Worker
+ from: From
+ to: To
+ isOk: Served
etd: ETD
tractorPlate: Plate
price: Price
observations: Observations
- id: ID
+ id: Id
name: Name
cmrFk: CMR id
hasCmrDms: Attached in gestdoc
ticketFk: Ticketd id
routeFk: Route id
+ clientFk: Client id
+ countryFk: Country
shipped: Shipped
agencyAgreement: Agency agreement
agencyModeName: Agency route
- Worker: Worker
- Agency: Agency
- Vehicle: Vehicle
- Description: Description
hourStarted: H.Start
hourFinished: H.End
- dated: Dated
- From: From
- To: To
+ createRoute: Create route
Date: Date
KmStart: Km start
KmEnd: Km end
Served: Served
- Clone Selected Routes: Clone selected routes
- Select the starting date: Select the starting date
- Stating date: Starting date
- Cancel: Cancel
- Mark as served: Mark as served
- Download selected routes as PDF: Download selected routes as PDF
- Add ticket: Add ticket
- Summary: Summary
+ addTicket: Add ticket
+ routeSummary: Go to summary
Route is closed: Route is closed
Route is not served: Route is not served
search: Search route
searchInfo: You can search by route reference
+ dated: Dated
+ preview: Preview
cmr:
- list:
+ search: Search Cmr
+ searchInfo: You can search Cmr by Id
+ params:
results: results
cmrFk: CMR id
hasCmrDms: Attached in gestdoc
@@ -50,8 +75,10 @@ route:
'false': 'No'
ticketFk: Ticketd id
routeFk: Route id
- country: Country
+ countryFk: Country
clientFk: Client id
+ warehouseFk: Warehouse
shipped: Preparation date
viewCmr: View CMR
- downloadCmrs: Download CMRs
\ No newline at end of file
+ downloadCmrs: Download CMRs
+ search: General search
diff --git a/src/pages/Route/locale/es.yml b/src/pages/Route/locale/es.yml
index 51d43774a..896fb2087 100644
--- a/src/pages/Route/locale/es.yml
+++ b/src/pages/Route/locale/es.yml
@@ -1,21 +1,55 @@
route:
+ filter:
+ Served: Servida
+ extendedList:
+ selectStartingDate: Seleccione la fecha de inicio
+ statingDate: Fecha de inicio
+ cloneSelectedRoutes: Clonar rutas seleccionadas
+ downloadSelectedRoutes: Descargar rutas seleccionadas como PDF
+ markServed: Marcar como servidas
roadmap:
+ roadmap: Troncal
+ carrier: Transportista
+ vehicle: Vehículo
+ price: Precio
+ observations: Observaciones
+ etd: ETD
+ dateCantEmpty: La fecha no puede estar vacía
+ createRoadmap: Crear troncal
+ deleteRoadmap: Eliminar troncal(es)
+ cloneSelected: Clonar rutas seleccionadas
+ selectedRoadmapsRemoved: Los troncales seleccionadas serán eliminados
+ areYouSure: ¿Seguro que quieres continuar?
+ selectEtd: Selecciona la fecha estimada de salida
search: Buscar troncales
searchInfo: Puedes buscar por referencia del troncal
params:
- agencyModeName: Agencia Ruta
- agencyAgreement: Agencia Acuerdo
- id: Id
- name: Troncal
+ warehouseFk: Almacén
+ description: Descripción
+ m3: m³
+ scopeDays: Días adelante
+ vehicleFk: Vehículo
+ agencyModeFk: Agencia
+ workerFk: Trabajador
+ from: Desde
+ to: Hasta
+ isOk: Servida
etd: ETD
tractorPlate: Matrícula
price: Precio
observations: Observaciones
+ id: Id
+ name: Troncal
cmrFk: Id CMR
hasCmrDms: Gestdoc
+ search: Búsqueda general
ticketFk: Id ticket
- routeFK: Id ruta
+ routeFk: Id ruta
+ clientFk: Id cliente
+ countryFk: Pais
shipped: Fecha preparación
+ agencyModeName: Agencia Ruta
+ agencyAgreement: Agencia Acuerdo
Worker: Trabajador
Agency: Agencia
Vehicle: Vehículo
@@ -23,25 +57,18 @@ route:
hourStarted: H.Inicio
hourFinished: H.Fin
createRoute: Crear ruta
- From: Desde
- To: Hasta
Date: Fecha
KmStart: Km inicio
KmEnd: Km fin
Served: Servida
- Clone Selected Routes: Clonar rutas seleccionadas
- Select the starting date: Seleccione la fecha de inicio
- Stating date: Fecha de inicio
- Cancel: Cancelar
- Mark as served: Marcar como servidas
- Download selected routes as PDF: Descargar rutas seleccionadas como PDF
- Add ticket: Añadir tickets
- preview: Vista previa
- Summary: Resumen
+ addTicket: Añadir tickets
+ routeSummary: Ir a vista previa
Route is closed: La ruta está cerrada
Route is not served: La ruta no está servida
search: Buscar rutas
searchInfo: Puedes buscar por referencia de la ruta
+ dated: Fecha
+ preview: Vista previa
cmr:
list:
results: resultados
@@ -55,4 +82,4 @@ route:
clientFk: Id cliente
shipped: Fecha preparación
viewCmr: Ver CMR
- downloadCmrs: Descargar CMRs
\ No newline at end of file
+ downloadCmrs: Descargar CMRs
diff --git a/src/pages/Shelving/Card/ShelvingCard.vue b/src/pages/Shelving/Card/ShelvingCard.vue
index 9e0ac8ad2..e2fb79fb0 100644
--- a/src/pages/Shelving/Card/ShelvingCard.vue
+++ b/src/pages/Shelving/Card/ShelvingCard.vue
@@ -1,11 +1,11 @@
- $props.id || route.params.id);
-
+
-import VnCardBeta from 'components/common/VnCardBeta.vue';
+import VnCard from 'components/common/VnCard.vue';
import ParkingDescriptor from 'pages/Shelving/Parking/Card/ParkingDescriptor.vue';
import filter from './ParkingFilter.js';
-
-
+
import SupplierDescriptor from './SupplierDescriptor.vue';
-import VnCardBeta from 'src/components/common/VnCardBeta.vue';
+import VnCard from 'src/components/common/VnCard.vue';
import filter from './SupplierFilter.js';
- {
- {{ buy.itemName }}
+ {{ buy.itemName }}
diff --git a/src/pages/Ticket/Card/TicketCard.vue b/src/pages/Ticket/Card/TicketCard.vue
index e22d5799a..19dbd608c 100644
--- a/src/pages/Ticket/Card/TicketCard.vue
+++ b/src/pages/Ticket/Card/TicketCard.vue
@@ -1,10 +1,10 @@
- {
return $props.id || route.params.id;
});
const problems = ref({});
+const originalTicket = ref();
function ticketFilter(ticket) {
return JSON.stringify({ clientFk: ticket.clientFk });
}
+async function getClaims() {
+ const userFilter = { where: { refundTicketFk: entityId.value } };
+ const { data } = await axios.get(`TicketRefunds`, {
+ params: { filter: JSON.stringify(userFilter) },
+ });
+ if (!data) return;
+ originalTicket.value = data[0]?.originalTicketFk;
+}
+async function getProblems() {
+ const { data } = await axios.get(`Tickets/${entityId.value}/getTicketProblems`);
+ if (!data) return;
+ problems.value = data[0];
+}
+function getInfo() {
+ getClaims();
+ getProblems();
+}
- ([problems] = data)"
- />
@@ -129,6 +144,15 @@ function ticketFilter(ticket) {
>
{{ t('ticket.card.newOrder') }}
+
+ {{ t('ticket.card.ticketClaimed') }}
+
diff --git a/src/pages/Ticket/Negative/TicketLackTable.vue b/src/pages/Ticket/Negative/TicketLackTable.vue
index 176e8f7ad..c9c2a7cad 100644
--- a/src/pages/Ticket/Negative/TicketLackTable.vue
+++ b/src/pages/Ticket/Negative/TicketLackTable.vue
@@ -225,7 +225,7 @@ function onBuysFetched(data) {
/>
-
+
{{ item?.longName ?? item.name }}
diff --git a/src/pages/Travel/Card/TravelCard.vue b/src/pages/Travel/Card/TravelCard.vue
index cb09eafd6..479b47fb9 100644
--- a/src/pages/Travel/Card/TravelCard.vue
+++ b/src/pages/Travel/Card/TravelCard.vue
@@ -1,10 +1,10 @@
-
-import VnCardBeta from 'src/components/common/VnCardBeta.vue';
+import VnCard from 'src/components/common/VnCard.vue';
-
+
diff --git a/src/pages/Worker/Card/WorkerBasicData.vue b/src/pages/Worker/Card/WorkerBasicData.vue
index a78983e5c..b8c1c54df 100644
--- a/src/pages/Worker/Card/WorkerBasicData.vue
+++ b/src/pages/Worker/Card/WorkerBasicData.vue
@@ -96,6 +96,7 @@ async function setAdvancedSummary(data) {
option-label="name"
option-value="code"
v-model="data.maritalStatus"
+ data-cy="MaritalStatus"
/>
@@ -107,6 +108,7 @@ async function setAdvancedSummary(data) {
option-label="name"
option-value="id"
v-model="data.originCountryFk"
+ data-cy="country"
/>
-
+
diff --git a/src/pages/Worker/Card/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue
index 3b7a62025..591dadcd2 100644
--- a/src/pages/Worker/Card/WorkerCard.vue
+++ b/src/pages/Worker/Card/WorkerCard.vue
@@ -1,9 +1,9 @@
- {
@@ -116,6 +118,7 @@ watch(
option-value="code"
v-model="row.itemPackingTypeFk"
:required="true"
+ data-cy="itemPackingType"
/>
@@ -132,6 +136,7 @@ watch(
hide-selected
option-label="description"
v-model="row.sectorFk"
+ data-cy="sector"
/>
@@ -160,11 +166,13 @@ watch(
:label="t('worker.operator.linesLimit')"
v-model="row.linesLimit"
lazy-rules
+ data-cy="linesLimit"
/>
@@ -172,6 +180,7 @@ watch(
:label="t('worker.operator.sizeLimit')"
v-model="row.sizeLimit"
lazy-rules
+ data-cy="sizeLimit"
/>
{
:label="t('familySituation')"
clearable
v-model="data.familySituation"
+ data-cy="familySituation"
+ />
+
-
{
clearable
v-model="data.childPension"
:label="t(`childPension`)"
+ data-cy="childPension"
/>
@@ -190,12 +198,14 @@ const deleteRelative = async (id) => {
type="number"
v-model="row.birthed"
:label="t(`birthed`)"
+ data-cy="birthed"
/>
(isEditMode.value ? t('Edit entry') : t('Add time')
const urlCreate = computed(() =>
isEditMode.value
? `WorkerTimeControls/${$props.entryId}/updateTimeEntry`
- : `WorkerTimeControls/${route.params.id}/addTimeEntry`
+ : `WorkerTimeControls/${route.params.id}/addTimeEntry`,
);
onBeforeMount(() => {
@@ -83,6 +83,7 @@ onBeforeMount(() => {
autofocus
:required="true"
:is-clearable="false"
+ data-cy="entryHour"
/>
{
option-value="code"
option-label="description"
hide-selected
+ data-cy="entryType"
/>
diff --git a/src/pages/Worker/Department/Card/DepartmentCard.vue b/src/pages/Worker/Department/Card/DepartmentCard.vue
index 2e3f11521..0fbc90332 100644
--- a/src/pages/Worker/Department/Card/DepartmentCard.vue
+++ b/src/pages/Worker/Department/Card/DepartmentCard.vue
@@ -1,9 +1,9 @@
-
-import VnCardBeta from 'src/components/common/VnCardBeta.vue';
+import VnCard from 'src/components/common/VnCard.vue';
import ZoneDescriptor from './ZoneDescriptor.vue';
-
+
diff --git a/src/pages/Zone/Card/ZoneLocationsTree.vue b/src/pages/Zone/Card/ZoneLocationsTree.vue
index 083436440..d5d7d52b6 100644
--- a/src/pages/Zone/Card/ZoneLocationsTree.vue
+++ b/src/pages/Zone/Card/ZoneLocationsTree.vue
@@ -73,6 +73,7 @@ const onNodeExpanded = async (nodeKeysArray) => {
const response = await axios.get(`Zones/${route.params.id}/getLeaves`, {
params,
});
+ response.data = JSON.parse(response.data);
if (response.data) {
node.childs = response.data.map((n) => {
if (n.sons > 0) n.childs = [{}];
@@ -126,14 +127,17 @@ watch(
async (val) => {
if (!val) return;
// // Se triggerea cuando se actualiza el store.data, el cual es el resultado del fetch de la searchbar
+ val = JSON.parse(val);
if (!nodes.value[0]) nodes.value = [defaultNode];
nodes.value[0].childs = [...val];
const fetchedNodeKeys = val.flatMap(getNodeIds);
state.set('Tree', [...fetchedNodeKeys]);
expanded.value = [null, ...fetchedNodeKeys];
+ const fetchs = [];
for (let n of state.get('Tree')) {
- await fetchNodeLeaves(n);
+ fetchs.push(fetchNodeLeaves(n));
}
+ await Promise.all(fetchs);
previousExpandedNodes.value = new Set(expanded.value);
},
{ immediate: true },
diff --git a/src/router/modules/route.js b/src/router/modules/route.js
index 835324d20..c84795a98 100644
--- a/src/router/modules/route.js
+++ b/src/router/modules/route.js
@@ -220,7 +220,6 @@ export default {
path: '',
name: 'RouteIndexMain',
redirect: { name: 'RouteList' },
- component: () => import('src/pages/Route/RouteList.vue'),
children: [
{
name: 'RouteList',
@@ -229,6 +228,7 @@ export default {
title: 'list',
icon: 'view_list',
},
+ component: () => import('src/pages/Route/RouteList.vue'),
},
routeCard,
],
@@ -268,7 +268,6 @@ export default {
title: 'RouteRoadmap',
icon: 'vn:troncales',
},
- component: () => import('src/pages/Route/RouteRoadmap.vue'),
children: [
{
name: 'RoadmapList',
@@ -277,6 +276,7 @@ export default {
title: 'list',
icon: 'view_list',
},
+ component: () => import('src/pages/Route/RouteRoadmap.vue'),
},
roadmapCard,
],
@@ -298,7 +298,6 @@ export default {
title: 'agency',
icon: 'garage_home',
},
- component: () => import('src/pages/Route/Agency/AgencyList.vue'),
children: [
{
name: 'AgencyList',
@@ -307,6 +306,8 @@ export default {
title: 'list',
icon: 'view_list',
},
+ component: () =>
+ import('src/pages/Route/Agency/AgencyList.vue'),
},
agencyCard,
],
@@ -319,7 +320,6 @@ export default {
title: 'vehicle',
icon: 'directions_car',
},
- component: () => import('src/pages/Route/Vehicle/VehicleList.vue'),
children: [
{
path: 'list',
@@ -328,6 +328,8 @@ export default {
title: 'vehicleList',
icon: 'directions_car',
},
+ component: () =>
+ import('src/pages/Route/Vehicle/VehicleList.vue'),
},
vehicleCard,
],
diff --git a/test/cypress/integration/claim/claimAction.spec.js b/test/cypress/integration/claim/claimAction.spec.js
index b0a16a2ad..7eba07f51 100644
--- a/test/cypress/integration/claim/claimAction.spec.js
+++ b/test/cypress/integration/claim/claimAction.spec.js
@@ -15,12 +15,14 @@ describe('ClaimAction', () => {
cy.get('[title="Import claim"]').click();
});
- it('should change destination', () => {
+ // https://redmine.verdnatura.es/issues/8756
+ xit('should change destination', () => {
const rowData = [true, null, null, 'Bueno'];
cy.fillRow(firstRow, rowData);
});
- it('should change destination from other button', () => {
+ // https://redmine.verdnatura.es/issues/8756
+ xit('should change destination from other button', () => {
const rowData = [true];
cy.fillRow(firstRow, rowData);
@@ -33,7 +35,8 @@ describe('ClaimAction', () => {
cy.get('[title="Regularize"]').click();
});
- it('should remove the line', () => {
+ // https://redmine.verdnatura.es/issues/8756
+ xit('should remove the line', () => {
cy.fillRow(firstRow, [true]);
cy.removeCard();
cy.clickConfirm();
diff --git a/test/cypress/integration/client/clientBalance.spec.js b/test/cypress/integration/client/clientBalance.spec.js
index abfa74cec..fff6a5e04 100644
--- a/test/cypress/integration/client/clientBalance.spec.js
+++ b/test/cypress/integration/client/clientBalance.spec.js
@@ -1,11 +1,13 @@
///
describe('Client balance', () => {
beforeEach(() => {
- cy.viewport(1280, 720);
cy.login('developer');
cy.visit('#/customer/1101/balance');
});
- it('Should load layout', () => {
- cy.get('.q-page').should('be.visible');
+ it('Should create a mandate', () => {
+ cy.get('.q-page-sticky > div > .q-btn').click();
+ cy.selectOption('[data-cy="paymentBank"]', 2);
+ cy.dataCy('paymentAmount_input').clear().type('100');
+ cy.saveCard();
});
});
diff --git a/test/cypress/integration/order/orderList.spec.js b/test/cypress/integration/order/orderList.spec.js
index 8b8852a02..c48b317a8 100644
--- a/test/cypress/integration/order/orderList.spec.js
+++ b/test/cypress/integration/order/orderList.spec.js
@@ -34,8 +34,8 @@ describe('OrderList', () => {
cy.dataCy('Customer ID_input').type('1101{enter}');
cy.dataCy('vnTableCreateBtn').click();
cy.dataCy('landedDate').find('input').type('06/01/2001');
- cy.get(agencyCreateSelect).click();
- cy.get('.q-menu > div> .q-item:nth-child(1)').click();
+ cy.selectOption(agencyCreateSelect, 1);
+
cy.intercept('GET', /\/api\/Orders\/\d/).as('orderSale');
cy.get('[data-cy="FormModelPopup_save"] > .q-btn__content > .block').click();
cy.wait('@orderSale');
@@ -60,8 +60,8 @@ describe('OrderList', () => {
cy.get(clientCreateSelect).should('have.value', 'Bruce Wayne');
cy.get(addressCreateSelect).should('have.value', 'Bruce Wayne');
cy.dataCy('landedDate').find('input').type('06/01/2001');
- cy.get(agencyCreateSelect).click();
- cy.get('.q-menu > div> .q-item:nth-child(1)').click();
+ cy.selectOption(agencyCreateSelect, 1);
+
cy.intercept('GET', /\/api\/Orders\/\d/).as('orderSale');
cy.get('[data-cy="FormModelPopup_save"] > .q-btn__content > .block').click();
cy.wait('@orderSale');
diff --git a/test/cypress/integration/route/agency/agencyWorkCenter.spec.js b/test/cypress/integration/route/agency/agencyWorkCenter.spec.js
index 5679ceba1..a3e0aac81 100644
--- a/test/cypress/integration/route/agency/agencyWorkCenter.spec.js
+++ b/test/cypress/integration/route/agency/agencyWorkCenter.spec.js
@@ -1,27 +1,34 @@
-describe.skip('AgencyWorkCenter', () => {
+describe('AgencyWorkCenter', () => {
+ const selectors = {
+ workCenter: 'workCenter_select',
+ popupSave: 'FormModelPopup_save',
+ popupCancel: 'FormModelPopup_cancel',
+ remove: 'removeWorkCenterBtn',
+ };
+
+ const messages = {
+ dataCreated: 'Data created',
+ alreadyAssigned: 'This workCenter is already assigned to this agency',
+ removed: 'WorkCenter removed successfully',
+ };
+
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/route/agency/11/workCenter`);
});
- const createButton = '.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon';
- const workCenterCombobox = 'input[role="combobox"]';
- it('check workCenter crud', () => {
- // create
- cy.get(createButton).click();
- cy.get(workCenterCombobox).type('workCenterOne{enter}');
+ it('Should add work center, check already assigned and remove work center', () => {
+ cy.addBtnClick();
+ cy.selectOption('[data-cy="workCenter_select"]', 'workCenterOne');
+ cy.dataCy(selectors.popupSave).click();
cy.checkNotification('Data created');
-
- // expect error when duplicate
- cy.get(createButton).click();
- cy.selectOption(workCenterCombobox, 'workCenterOne');
- cy.get('[data-cy="FormModelPopup_save"]').click();
- cy.checkNotification('This workCenter is already assigned to this agency');
- cy.get('[data-cy="FormModelPopup_cancel"]').click();
-
- // delete
- cy.get('.q-item__section--side > .q-btn > .q-btn__content > .q-icon').click();
- cy.checkNotification('WorkCenter removed successfully');
+ cy.addBtnClick();
+ cy.selectOption('[data-cy="workCenter_select"]', 'workCenterOne');
+ cy.dataCy(selectors.popupSave).click();
+ cy.checkNotification(messages.alreadyAssigned);
+ cy.dataCy(selectors.popupCancel).click();
+ cy.dataCy(selectors.remove).click();
+ cy.checkNotification(messages.removed);
});
});
diff --git a/test/cypress/integration/route/roadMap/roadmapList.spec.js b/test/cypress/integration/route/roadMap/roadmapList.spec.js
index 6d46b2cf6..35c0c2b02 100644
--- a/test/cypress/integration/route/roadMap/roadmapList.spec.js
+++ b/test/cypress/integration/route/roadMap/roadmapList.spec.js
@@ -1,12 +1,74 @@
describe('RoadMap', () => {
+ const getSelector = (colField) =>
+ `tr:last-child > [data-col-field="${colField}"] > .no-padding`;
+
+ const selectors = {
+ roadmap: getSelector('name'),
+ id: getSelector('id'),
+ etd: getSelector('etd'),
+ summaryHeader: '.summaryHeader > :nth-child(2)',
+ summaryGoToSummaryBtn: '.summaryHeader > a > .q-icon',
+ summaryBtn: 'tableAction-0',
+ inputRoadmap: 'Roadmap_input',
+ checkbox: '.q-virtual-scroll__content tr:last-child .q-checkbox',
+ cloneFormBtn: '.q-card__actions > .q-btn--standard',
+ cloneBtn: '#subToolbar > :nth-child(3)',
+ deleteBtn: ':nth-child(4) > .q-btn__content',
+ confirmBtn: 'VnConfirm_confirm',
+ inputEtd: 'ETD_inputDate',
+ };
+
+ const data = {
+ roadmap: 'TEST-ROADMAP',
+ etd: '01/01/2025',
+ };
+
+ const dataCreated = 'Data created';
+ const summaryUrl = '/summary';
+
beforeEach(() => {
+ cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/route/roadmap`);
+ cy.typeSearchbar('{enter}');
});
+
+ it('Should list roadmaps', () => {
+ cy.get('.q-table')
+ .children()
+ .should('be.visible')
+ .should('have.length.greaterThan', 0);
+ });
+
it('Route list create roadmap and redirect', () => {
cy.addBtnClick();
- cy.get('input[name="name"]').type('roadMapTestOne{enter}');
- cy.get('.q-notification__message').should('have.text', 'Data created');
- cy.url().should('include', '/summary');
+ cy.dataCy(selectors.inputRoadmap).type(`${data.roadmap}{enter}`);
+ cy.checkNotification(dataCreated);
+ cy.url().should('include', summaryUrl);
+ });
+
+ it('open summary', () => {
+ cy.dataCy(selectors.summaryBtn).last().click();
+ cy.get(selectors.summaryHeader).should('contain', data.roadmap);
+ cy.get(selectors.summaryGoToSummaryBtn).click();
+ cy.get(selectors.summaryHeader).should('contain', data.roadmap);
+ });
+
+ it('Should clone selected roadmap with new ETD', () => {
+ cy.get(selectors.checkbox).click();
+ cy.get(selectors.cloneBtn).click();
+ cy.dataCy(selectors.inputEtd).click().type(`${data.etd}{enter}`);
+ cy.get(selectors.cloneFormBtn).click();
+ cy.get(selectors.etd).should('contain', data.etd);
+ });
+
+ it('Should delete selected roadmap', () => {
+ cy.get(selectors.id).then(($el) => {
+ cy.get(selectors.checkbox).click();
+ cy.get(selectors.deleteBtn).click();
+ cy.dataCy(selectors.confirmBtn).click();
+ cy.typeSearchbar('{enter}');
+ cy.get(selectors.id).should('not.have.text', $el.text);
+ });
});
});
diff --git a/test/cypress/integration/shelving/parking/parkingList.spec.js b/test/cypress/integration/shelving/parking/parkingList.spec.js
index ca1877621..7372da164 100644
--- a/test/cypress/integration/shelving/parking/parkingList.spec.js
+++ b/test/cypress/integration/shelving/parking/parkingList.spec.js
@@ -2,7 +2,7 @@
describe('ParkingList', () => {
const searchbar = '#searchbar input';
const firstCard = ':nth-child(1) > .q-card > .no-margin > .q-py-none';
- const summaryHeader = '.summaryBody .header';
+ const summaryHeader = '.header-link';
beforeEach(() => {
cy.viewport(1920, 1080);
diff --git a/test/cypress/integration/shelving/shelvingList.spec.js b/test/cypress/integration/shelving/shelvingList.spec.js
index 745dd1b78..20b72e419 100644
--- a/test/cypress/integration/shelving/shelvingList.spec.js
+++ b/test/cypress/integration/shelving/shelvingList.spec.js
@@ -16,8 +16,8 @@ describe('ShelvingList', () => {
it('should redirect from preview to basic-data', () => {
cy.typeSearchbar('{enter}');
cy.dataCy('cardBtn').eq(0).click();
- cy.get('.q-card > .header').click();
- cy.url().should('include', '/shelving/1/basic-data');
+ cy.get('.summaryHeader > .header > .q-icon').click();
+ cy.url().should('include', '/shelving/1/summary');
});
it('should filter and redirect if only one result', () => {
diff --git a/test/cypress/integration/ticket/negative/TicketLackDetail.spec.js b/test/cypress/integration/ticket/negative/TicketLackDetail.spec.js
index 19f4dc3b2..b4997fa69 100644
--- a/test/cypress/integration/ticket/negative/TicketLackDetail.spec.js
+++ b/test/cypress/integration/ticket/negative/TicketLackDetail.spec.js
@@ -138,7 +138,7 @@ describe.skip('Ticket Lack detail', () => {
cy.get('[data-cy="itemProposal"]').click();
cy.wait('@getItemGetSimilar');
});
- describe('Replace item if', () => {
+ describe.skip('Replace item if', () => {
it('Quantity is less than available', () => {
cy.get(':nth-child(1) > .text-right > .q-btn').click();
});
diff --git a/test/cypress/integration/worker/workerBasicData.spec.js b/test/cypress/integration/worker/workerBasicData.spec.js
new file mode 100644
index 000000000..cf452a044
--- /dev/null
+++ b/test/cypress/integration/worker/workerBasicData.spec.js
@@ -0,0 +1,15 @@
+describe('WorkerBasicData', () => {
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('developer');
+ cy.visit('/#/worker/1107/basic-data');
+ });
+
+ it('should modify worker summary', () => {
+ cy.dataCy('MaritalStatus').type('Married');
+ cy.dataCy('fi').type('42572374H');
+ cy.dataCy('country').type('Alemania');
+ cy.saveCard();
+ cy.checkNotification('Data saved');
+ });
+});
diff --git a/test/cypress/integration/worker/workerBusiness.spec.js b/test/cypress/integration/worker/workerBusiness.spec.js
new file mode 100644
index 000000000..46da28cd6
--- /dev/null
+++ b/test/cypress/integration/worker/workerBusiness.spec.js
@@ -0,0 +1,34 @@
+describe.skip('WorkerBusiness', () => {
+ const saveBtn = '.q-mt-lg > .q-btn--standard';
+ const contributionCode = `Representantes de comercio`;
+ const contractType = `INDEFINIDO A TIEMPO COMPLETO`;
+
+ const Business = {
+ 'Start Date': { val: '26-12-2002', type: 'date' },
+ Company: { val: `VNL`, type: 'select' },
+ Department: { val: `RECICLAJE`, type: 'select' },
+ 'Professional Category': { val: `employee`, type: 'select' },
+ 'Work Calendar': { val: `General schedule`, type: 'select' },
+ 'Work Center': { val: `Silla`, type: 'select' },
+ 'Contract Category': { val: `INFORMATICA`, type: 'select' },
+ 'Contribution Code': { val: contributionCode, type: 'select' },
+ Rate: { val: `5` },
+ 'Contract Type': { val: contractType, type: 'select' },
+ 'Transport Workers Salary': { val: `1000` },
+ };
+
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('hr');
+ cy.visit('/#/worker/1107/business');
+ cy.addCard();
+ });
+
+ it('should create a business', () => {
+ cy.fillInForm({
+ ...Business,
+ });
+ cy.get(saveBtn).click();
+ cy.checkNotification('Data created');
+ });
+});
diff --git a/test/cypress/integration/worker/workerMutual.spec.js b/test/cypress/integration/worker/workerMutual.spec.js
new file mode 100644
index 000000000..a6d2c5f4f
--- /dev/null
+++ b/test/cypress/integration/worker/workerMutual.spec.js
@@ -0,0 +1,23 @@
+///
+describe('WorkerMutual', () => {
+ const userId = 1106;
+ const saveBtn = '.q-mt-lg > .q-btn--standard';
+ const medicalReview = {
+ Date: { val: '01-01-2001', type: 'date' },
+ 'Formation Center': { val: '1', type: 'select' },
+ Invoice: { val: '24532' },
+ Amount: { val: '540' },
+ };
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('developer');
+ cy.visit(`/#/worker/${userId}/medical`);
+ cy.addCard();
+ });
+
+ it('should create a medical Review', () => {
+ cy.fillInForm(medicalReview);
+ cy.get(saveBtn).click();
+ cy.checkNotification('Data created');
+ });
+});
diff --git a/test/cypress/integration/worker/workerNotes.spec.js b/test/cypress/integration/worker/workerNotes.spec.js
new file mode 100644
index 000000000..661314ac9
--- /dev/null
+++ b/test/cypress/integration/worker/workerNotes.spec.js
@@ -0,0 +1,13 @@
+///
+describe('WorkerNotes', () => {
+ const userId = 1106;
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('developer');
+ cy.visit(`/#/worker/${userId}/notes`);
+ });
+
+ it('Should load layout', () => {
+ cy.get('.q-card').should('be.visible');
+ });
+});
diff --git a/test/cypress/integration/worker/workerOperator.spec.js b/test/cypress/integration/worker/workerOperator.spec.js
new file mode 100644
index 000000000..95839aeba
--- /dev/null
+++ b/test/cypress/integration/worker/workerOperator.spec.js
@@ -0,0 +1,19 @@
+///
+describe('WorkerOperator', () => {
+ const userId = 1106;
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('hr');
+ cy.visit(`/#/worker/${userId}/operator`);
+ });
+
+ it('should fill the operator form', () => {
+ cy.dataCy('numberOfWagons').type('4');
+ cy.dataCy('linesLimit').type('6');
+ cy.dataCy('volumeLimit').type('3');
+ cy.dataCy('sizeLimit').type('3');
+ cy.saveCard();
+
+ cy.checkNotification('Data saved');
+ });
+});
diff --git a/test/cypress/integration/worker/workerPit.spec.js b/test/cypress/integration/worker/workerPit.spec.js
index 19cbebc20..04f232648 100644
--- a/test/cypress/integration/worker/workerPit.spec.js
+++ b/test/cypress/integration/worker/workerPit.spec.js
@@ -1,19 +1,5 @@
describe('WorkerPit', () => {
- const familySituationInput = '[data-cy="Family Situation_input"]';
- const familySituation = '1';
- const childPensionInput = '[data-cy="Child Pension_input"]';
- const childPension = '120';
- const spouseNifInput = '[data-cy="Spouse Pension_input"]';
- const spouseNif = '65117125P';
- const spousePensionInput = '[data-cy="Spouse Pension_input"]';
- const spousePension = '120';
const addRelative = '[data-cy="addRelative"]';
- const isDescendantSelect = '[data-cy="Descendant/Ascendant"]';
- const Descendant = 'Descendiente';
- const birthedInput = '[data-cy="Birth Year_input"]';
- const birthed = '2002';
- const adoptionYearInput = '[data-cy="Adoption Year_input"]';
- const adoptionYear = '2004';
const saveRelative = '[data-cy="workerPitRelativeSaveBtn"]';
const savePIT = '#st-actions > .q-btn-group > .q-btn--standard';
@@ -24,15 +10,15 @@ describe('WorkerPit', () => {
});
it('complete PIT', () => {
- cy.get(familySituationInput).type(familySituation);
- cy.get(childPensionInput).type(childPension);
- cy.get(spouseNifInput).type(spouseNif);
- cy.get(spousePensionInput).type(spousePension);
+ cy.dataCy('familySituation').type('1');
+ cy.dataCy('childPension').type('120');
+ cy.dataCy('spouseNif').type('65117125P');
+ cy.dataCy('spousePension').type('120');
cy.get(savePIT).click();
cy.get(addRelative).click();
- cy.get(isDescendantSelect).type(Descendant);
- cy.get(birthedInput).type(birthed);
- cy.get(adoptionYearInput).type(adoptionYear);
+ cy.dataCy('Descendant/Ascendant').type('Descendiente');
+ cy.dataCy('birthed').type('2002');
+ cy.dataCy('adoptionYear').type('2004');
cy.get(saveRelative).click();
});
});
diff --git a/test/cypress/integration/worker/workerSummary.spec.js b/test/cypress/integration/worker/workerSummary.spec.js
index 3d70fdf96..c50b2c943 100644
--- a/test/cypress/integration/worker/workerSummary.spec.js
+++ b/test/cypress/integration/worker/workerSummary.spec.js
@@ -1,4 +1,6 @@
describe('WorkerSummary', () => {
+ const departmentDescriptor = ':nth-child(1) > :nth-child(3) > .value > .link';
+ const roleDescriptor = ':nth-child(3) > :nth-child(4) > .value > .link';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
@@ -10,7 +12,17 @@ describe('WorkerSummary', () => {
cy.get('.summaryHeader > div').should('have.text', '19 - salesboss salesboss');
cy.get(':nth-child(1) > :nth-child(2) > .value > span').should(
'have.text',
- 'salesBossNick'
+ 'salesBossNick',
);
});
+
+ it('should try descriptors', () => {
+ cy.waitForElement('.summaryHeader');
+ cy.get(departmentDescriptor).click();
+ cy.get('.descriptor').should('be.visible');
+ cy.get('.q-item > .q-item__label').should('include.text', '43');
+ cy.get(roleDescriptor).click();
+ cy.get('.descriptor').should('be.visible');
+ cy.get('.q-item > .q-item__label').should('include.text', '19');
+ });
});
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index 8437112e0..105d021ad 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -62,12 +62,7 @@ Cypress.Commands.overwrite('visit', (originalFn, url, options, waitRequest = tru
originalFn(url, options);
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'));
cy.waitUntil(() => cy.get('main').should('exist'));
- if (waitRequest)
- cy.get('body').then(($body) => {
- if ($body.find('[data-cy="loading-spinner"]').length) {
- cy.get('[data-cy="loading-spinner"]').should('not.be.visible');
- }
- });
+ if (waitRequest) cy.waitSpinner();
});
Cypress.Commands.add('waitForElement', (element) => {
@@ -99,6 +94,14 @@ Cypress.Commands.add('getValue', (selector) => {
});
});
+Cypress.Commands.add('waitSpinner', () => {
+ cy.get('body').then(($body) => {
+ if ($body.find('[data-cy="loading-spinner"]').length) {
+ cy.get('[data-cy="loading-spinner"]').should('not.be.visible');
+ }
+ });
+});
+
// Fill Inputs
Cypress.Commands.add('selectOption', (selector, option, timeout = 2500) => {
cy.waitForElement(selector, timeout);
@@ -116,6 +119,7 @@ Cypress.Commands.add('selectOption', (selector, option, timeout = 2500) => {
function selectItem(selector, option, ariaControl, hasWrite = true) {
if (!hasWrite) cy.wait(100);
+ cy.waitSpinner();
getItems(ariaControl).then((items) => {
const matchingItem = items
@@ -135,6 +139,7 @@ function getItems(ariaControl, startTime = Cypress._.now(), timeout = 2500) {
.should('exist')
.find('.q-item')
.should('exist')
+ .should('be.visible')
.then(($items) => {
if (!$items?.length || $items.first().text().trim() === '') {
if (Cypress._.now() - startTime > timeout) {