+
(i + firstDay) % 7);
+
+ return ref(weekdays);
+}
diff --git a/src/css/app.scss b/src/css/app.scss
index dd5dbe247..351eeb599 100644
--- a/src/css/app.scss
+++ b/src/css/app.scss
@@ -343,3 +343,20 @@ input::-webkit-inner-spin-button {
.q-item__section--main ~ .q-item__section--side {
padding-inline: 0;
}
+
+.calendars-header {
+ height: 45px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ background-color: $primary;
+ font-weight: bold;
+ font-size: 16px;
+}
+
+.calendars-container {
+ max-width: 800px;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-evenly;
+}
\ No newline at end of file
diff --git a/src/pages/Account/Card/AccountDescriptorProxy.vue b/src/pages/Account/Card/AccountDescriptorProxy.vue
index 6a4b3e267..b7bbc1ef9 100644
--- a/src/pages/Account/Card/AccountDescriptorProxy.vue
+++ b/src/pages/Account/Card/AccountDescriptorProxy.vue
@@ -4,11 +4,6 @@ import AccountSummary from './AccountSummary.vue';
-
+
diff --git a/src/pages/Claim/Card/ClaimDescriptor.vue b/src/pages/Claim/Card/ClaimDescriptor.vue
index 3728a18c0..01937a87a 100644
--- a/src/pages/Claim/Card/ClaimDescriptor.vue
+++ b/src/pages/Claim/Card/ClaimDescriptor.vue
@@ -1,5 +1,5 @@
@@ -126,7 +120,7 @@ onMounted(async () => {
size="md"
icon="assignment"
color="primary"
- :href="salixUrl + 'ticket/' + entity.ticketFk + '/sale-tracking'"
+ :to="{ name: 'TicketSaleTracking', params: { id: entity.ticketFk } }"
>
{{ t('claim.saleTracking') }}
@@ -134,7 +128,7 @@ onMounted(async () => {
size="md"
icon="visibility"
color="primary"
- :href="salixUrl + 'ticket/' + entity.ticketFk + '/tracking/index'"
+ :to="{ name: 'TicketTracking', params: { id: entity.ticketFk } }"
>
{{ t('claim.ticketTracking') }}
diff --git a/src/pages/Claim/Card/ClaimDescriptorProxy.vue b/src/pages/Claim/Card/ClaimDescriptorProxy.vue
index 78e686745..f4eff0843 100644
--- a/src/pages/Claim/Card/ClaimDescriptorProxy.vue
+++ b/src/pages/Claim/Card/ClaimDescriptorProxy.vue
@@ -4,11 +4,6 @@ import ClaimSummary from './ClaimSummary.vue';
-
+
diff --git a/src/pages/Customer/Card/CustomerAddress.vue b/src/pages/Customer/Card/CustomerAddress.vue
index f1799d0cc..418c4ec30 100644
--- a/src/pages/Customer/Card/CustomerAddress.vue
+++ b/src/pages/Customer/Card/CustomerAddress.vue
@@ -77,10 +77,10 @@ const isDefaultAddress = (address) => {
return client?.value?.defaultAddressFk === address.id ? 1 : 0;
};
-const setDefault = (address) => {
+const setDefault = async (address) => {
const url = `Clients/${route.params.id}`;
const payload = { defaultAddressFk: address.id };
- axios.patch(url, payload).then((res) => {
+ await axios.patch(url, payload).then((res) => {
if (res.data) {
client.value.defaultAddressFk = res.data.defaultAddressFk;
sortAddresses();
diff --git a/src/pages/Customer/Card/CustomerBillingData.vue b/src/pages/Customer/Card/CustomerBillingData.vue
index e4b6f8365..fdcbf75d4 100644
--- a/src/pages/Customer/Card/CustomerBillingData.vue
+++ b/src/pages/Customer/Card/CustomerBillingData.vue
@@ -1,5 +1,4 @@
-
+
{
/>
-
- (data.bankEntityFk = bankEntityFk)"
+ {
+ if (!iban || !bankEntityFk) return;
+ data.iban = iban;
+ data.bankEntityFk = bankEntityFk;
+ }
+ "
/>
-
-
-
-
-
-
-
- {{ scope.opt.bic }}
- {{ scope.opt.name }}
-
-
-
-
-
diff --git a/src/pages/Customer/Notifications/CustomerNotifications.vue b/src/pages/Customer/Notifications/CustomerNotifications.vue
index cbbd6d205..02792182c 100644
--- a/src/pages/Customer/Notifications/CustomerNotifications.vue
+++ b/src/pages/Customer/Notifications/CustomerNotifications.vue
@@ -100,6 +100,9 @@ const columns = computed(() => [
'row-key': 'id',
selection: 'multiple',
}"
+ :multi-check="{
+ expand: true,
+ }"
v-model:selected="selected"
:right-search="true"
:columns="columns"
diff --git a/src/pages/Customer/Notifications/CustomerNotificationsCampaignConsumption.vue b/src/pages/Customer/Notifications/CustomerNotificationsCampaignConsumption.vue
index f637c7e0a..141a02bfc 100644
--- a/src/pages/Customer/Notifications/CustomerNotificationsCampaignConsumption.vue
+++ b/src/pages/Customer/Notifications/CustomerNotificationsCampaignConsumption.vue
@@ -98,7 +98,9 @@ onMounted(async () => {
- {{ t('Campaign consumption') }}
+ {{
+ t('Campaign consumption', { rows: $props.clients.length })
+ }}
{
valentinesDay: Valentine's Day
mothersDay: Mother's Day
allSaints: All Saints' Day
+ Campaign consumption: Campaign consumption ({rows})
es:
params:
valentinesDay: Día de San Valentín
mothersDay: Día de la Madre
allSaints: Día de Todos los Santos
- Campaign consumption: Consumo campaña
+ Campaign consumption: Consumo campaña ({rows})
Campaign: Campaña
From: Desde
To: Hasta
diff --git a/src/pages/Entry/EntryFilter.vue b/src/pages/Entry/EntryFilter.vue
index 19f4bca86..c4d47bb28 100644
--- a/src/pages/Entry/EntryFilter.vue
+++ b/src/pages/Entry/EntryFilter.vue
@@ -162,6 +162,9 @@ const entryFilterPanel = ref();
v-model="params.warehouseOutFk"
@update:model-value="searchFn()"
url="Warehouses"
+ :where="{
+ isOrigin: true,
+ }"
:fields="['id', 'name']"
sort-by="name ASC"
hide-selected
@@ -177,6 +180,9 @@ const entryFilterPanel = ref();
v-model="params.warehouseInFk"
@update:model-value="searchFn()"
url="Warehouses"
+ :where="{
+ isDestiny: true,
+ }"
:fields="['id', 'name']"
sort-by="name ASC"
hide-selected
diff --git a/src/pages/Entry/EntryPreAccount.vue b/src/pages/Entry/EntryPreAccount.vue
index cda2ffd5e..26683b6f4 100644
--- a/src/pages/Entry/EntryPreAccount.vue
+++ b/src/pages/Entry/EntryPreAccount.vue
@@ -133,6 +133,7 @@ const columns = computed(() => [
label: null,
name: 'supplierFk',
class: 'fit',
+ event: 'update',
},
},
{
@@ -472,6 +473,6 @@ en:
es:
IntraCommunity: Intracomunitaria
NonCommunity: Extracomunitaria
- CanaryIsland: Islas Canarias
+ CanaryIslands: Islas Canarias
National: Nacional
diff --git a/src/pages/Item/Card/ItemDescriptorProxy.vue b/src/pages/Item/Card/ItemDescriptorProxy.vue
index 6e1f6d71f..237358871 100644
--- a/src/pages/Item/Card/ItemDescriptorProxy.vue
+++ b/src/pages/Item/Card/ItemDescriptorProxy.vue
@@ -30,7 +30,6 @@ const $props = defineProps({
:dated="dated"
:sale-fk="saleFk"
:warehouse-fk="warehouseFk"
- :proxy-render="true"
/>
diff --git a/src/pages/Route/Cmr/CmrList.vue b/src/pages/Route/Cmr/CmrList.vue
index 170f73bc0..98e1bda02 100644
--- a/src/pages/Route/Cmr/CmrList.vue
+++ b/src/pages/Route/Cmr/CmrList.vue
@@ -6,13 +6,18 @@ import { useRoute } from 'vue-router';
import { useSession } from 'src/composables/useSession';
import { toDateHourMin } from 'filters/index';
import { useStateStore } from 'src/stores/useStateStore';
+import { dashIfEmpty } from 'src/filters';
+import AgencyDescriptorProxy from '../Agency/Card/AgencyDescriptorProxy.vue';
+import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
+import RouteDescriptorProxy from '../Card/RouteDescriptorProxy.vue';
+import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
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';
+import VnInput from 'src/components/common/VnInput.vue';
const route = useRoute();
const { t } = useI18n();
@@ -30,39 +35,117 @@ const userParams = {
const columns = computed(() => [
{
- align: 'left',
+ align: 'right',
name: 'cmrFk',
- label: t('route.cmr.params.cmrFk'),
+ label: t('cmr.params.cmrFk'),
chip: {
condition: () => true,
},
isId: true,
},
{
- align: 'center',
- name: 'hasCmrDms',
- label: t('route.cmr.params.hasCmrDms'),
- component: 'checkbox',
- cardVisible: true,
- },
- {
- align: 'left',
- label: t('route.cmr.params.ticketFk'),
+ align: 'right',
+ label: t('cmr.params.ticketFk'),
name: 'ticketFk',
},
{
- align: 'left',
- label: t('route.cmr.params.routeFk'),
+ align: 'right',
+ label: t('cmr.params.routeFk'),
name: 'routeFk',
},
{
- align: 'left',
- label: t('route.cmr.params.clientFk'),
+ label: t('cmr.params.client'),
name: 'clientFk',
+ component: 'select',
+ attrs: {
+ url: 'Clients',
+ fields: ['id', 'name'],
+ },
+ columnFilter: {
+ name: 'clientFk',
+ attrs: {
+ url: 'Clients',
+ fields: ['id', 'name'],
+ },
+ },
},
{
- align: 'right',
- label: t('route.cmr.params.countryFk'),
+ label: t('cmr.params.agency'),
+ name: 'agencyModeFk',
+ component: 'select',
+ attrs: {
+ url: 'Agencies',
+ fields: ['id', 'name'],
+ },
+ columnFilter: {
+ name: 'agencyModeFk',
+ attrs: {
+ url: 'Agencies',
+ fields: ['id', 'name'],
+ },
+ },
+ format: ({ agencyName }) => agencyName,
+ },
+ {
+ label: t('cmr.params.supplier'),
+ name: 'supplierFk',
+ component: 'select',
+ attrs: {
+ url: 'suppliers',
+ fields: ['id', 'name'],
+ },
+ columnFilter: {
+ name: 'supplierFk',
+ attrs: {
+ url: 'suppliers',
+ fields: ['id', 'name'],
+ },
+ },
+ },
+ {
+ label: t('cmr.params.sender'),
+ name: 'addressFromFk',
+ component: 'select',
+ attrs: {
+ url: 'Addresses',
+ fields: ['id', 'nickname'],
+ optionValue: 'id',
+ optionLabel: 'nickname',
+ },
+ columnFilter: {
+ name: 'addressFromFk',
+ attrs: {
+ url: 'Addresses',
+ fields: ['id', 'nickname'],
+ optionValue: 'id',
+ optionLabel: 'nickname',
+ },
+ },
+ format: ({ origin }) => origin,
+ },
+ {
+ label: t('cmr.params.destination'),
+ name: 'addressToFk',
+ component: 'select',
+ attrs: {
+ url: 'addresses',
+ fields: ['id', 'nickname'],
+ optionValue: 'id',
+ optionLabel: 'nickname',
+ },
+ columnFilter: {
+ name: 'addressToFk',
+ attrs: {
+ url: 'addresses',
+ fields: ['id', 'nickname'],
+ optionValue: 'id',
+ optionLabel: 'nickname',
+ },
+ },
+ format: ({ destination }) => destination,
+ },
+ {
+ label: t('cmr.params.country'),
name: 'countryFk',
component: 'select',
attrs: {
@@ -79,16 +162,61 @@ const columns = computed(() => [
format: ({ countryName }) => countryName,
},
{
- align: 'right',
- label: t('route.cmr.params.shipped'),
- name: 'shipped',
- cardVisible: true,
+ label: t('cmr.params.created'),
+ name: 'created',
component: 'date',
- format: ({ shipped }) => toDateHourMin(shipped),
+ format: ({ created }) => dashIfEmpty(toDateHourMin(created)),
},
{
- align: 'right',
- label: t('route.cmr.params.warehouseFk'),
+ label: t('cmr.params.shipped'),
+ name: 'shipped',
+ component: 'date',
+ format: ({ shipped }) => dashIfEmpty(toDateHourMin(shipped)),
+ },
+ {
+ label: t('cmr.params.etd'),
+ name: 'ead',
+ component: 'date',
+ format: ({ ead }) => dashIfEmpty(toDateHourMin(ead)),
+ toolTip: t('cmr.params.etdTooltip'),
+ },
+ {
+ label: t('globals.landed'),
+ name: 'landed',
+ component: 'date',
+ format: ({ landed }) => dashIfEmpty(toDateHourMin(landed)),
+ },
+ {
+ align: 'left',
+ label: t('cmr.params.packageList'),
+ name: 'packagesList',
+ columnFilter: false,
+ },
+ {
+ align: 'left',
+ label: t('cmr.params.observation'),
+ name: 'observation',
+ columnFilter: false,
+ },
+ {
+ align: 'left',
+ label: t('cmr.params.senderInstructions'),
+ name: 'senderInstruccions',
+ columnFilter: false,
+ },
+ {
+ align: 'left',
+ label: t('cmr.params.paymentInstructions'),
+ name: 'paymentInstruccions',
+ columnFilter: false,
+ },
+ {
+ align: 'left',
+ label: t('cmr.params.vehiclePlate'),
+ name: 'truckPlate',
+ },
+ {
+ label: t('cmr.params.warehouse'),
name: 'warehouseFk',
component: 'select',
attrs: {
@@ -96,7 +224,6 @@ const columns = computed(() => [
fields: ['id', 'name'],
},
columnFilter: {
- inWhere: true,
name: 'warehouseFk',
attrs: {
url: 'warehouses',
@@ -105,12 +232,23 @@ const columns = computed(() => [
},
format: ({ warehouseName }) => warehouseName,
},
+ {
+ align: 'left',
+ name: 'specialAgreements',
+ label: t('cmr.params.specialAgreements'),
+ columnFilter: false,
+ },
+ {
+ name: 'hasCmrDms',
+ label: t('cmr.params.hasCmrDms'),
+ component: 'checkbox',
+ },
{
align: 'center',
name: 'tableActions',
actions: [
{
- title: t('route.cmr.params.viewCmr'),
+ title: t('cmr.params.viewCmr'),
icon: 'visibility',
isPrimary: true,
action: (row) => window.open(getCmrUrl(row?.cmrFk), '_blank'),
@@ -151,11 +289,7 @@ function downloadPdfs() {
}
-
+
- {{ t('route.cmr.params.downloadCmrs') }}
+ {{ t('cmr.params.downloadCmrs') }}
@@ -191,11 +325,72 @@ function downloadPdfs() {
+
+
+ {{ row.routeFk }}
+
+
+
- {{ row.clientFk }}
+ {{ row.clientName }}
+
+
+ {{ row.agencyName }}
+
+
+
+
+
+ {{ row.carrierName }}
+
+
+
+
+
+
+
+
+ {{ row.packagesList }}
+
+ {{ row.packagesList }}
+
+
+
+
+
+ {{ row.senderInstruccions }}
+
+ {{ row.senderInstruccions }}
+
+
+
+
+
+ {{ row.paymentInstruccions }}
+
+ {{ row.paymentInstruccions }}
+
+
+
+
+
+ {{ row.specialAgreements }}
+
+ {{ row.specialAgreements }}
+
+
+
diff --git a/src/pages/Route/Cmr/locale/en.yml b/src/pages/Route/Cmr/locale/en.yml
new file mode 100644
index 000000000..49b9895f8
--- /dev/null
+++ b/src/pages/Route/Cmr/locale/en.yml
@@ -0,0 +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
diff --git a/src/pages/Route/Cmr/locale/es.yml b/src/pages/Route/Cmr/locale/es.yml
new file mode 100644
index 000000000..b419a238b
--- /dev/null
+++ b/src/pages/Route/Cmr/locale/es.yml
@@ -0,0 +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
diff --git a/src/pages/Route/Vehicle/Card/VehicleEventInclusionForm.vue b/src/pages/Route/Vehicle/Card/VehicleEventInclusionForm.vue
new file mode 100644
index 000000000..06141736c
--- /dev/null
+++ b/src/pages/Route/Vehicle/Card/VehicleEventInclusionForm.vue
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ deleteVehicleEvent(),
+ )
+ "
+ />
+
+
+
+
+
+
+ es:
+ Started: Inicio
+ Finished: Fin
+ Add vehicle event: Agregar evento
+ Edit vehicle event: Editar evento
+
diff --git a/src/pages/Route/Vehicle/Card/VehicleEvents.vue b/src/pages/Route/Vehicle/Card/VehicleEvents.vue
new file mode 100644
index 000000000..5a90c9586
--- /dev/null
+++ b/src/pages/Route/Vehicle/Card/VehicleEvents.vue
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('eventsInclusionForm.addEvent') }}
+
+
+
+
diff --git a/src/pages/Route/Vehicle/Card/VehicleEventsPanel.vue b/src/pages/Route/Vehicle/Card/VehicleEventsPanel.vue
new file mode 100644
index 000000000..e3f22e93b
--- /dev/null
+++ b/src/pages/Route/Vehicle/Card/VehicleEventsPanel.vue
@@ -0,0 +1,196 @@
+
+
+
+
+
+ {{
+ t('eventsPanel.events')
+ }}
+
+
+
+
+ ({{ toDateFormat(event.started) }} -
+ {{ toDateFormat(event.finished) }})
+
+ {{ t('globals.description') }}:
+ {{
+ dashIfEmpty(event.description)
+ }}
+
+ {{ t('globals.state') }}:
+ {{
+ getVehicleStateName(event.vehicleStateFk).state
+ }}
+
+
+
+ deleteEvent(event.id),
+ )
+ "
+ >
+ {{ t('eventsPanel.delete') }}
+
+
+
+
+ {{ t('globals.noResults') }}
+
+
+
+
+
+
diff --git a/src/pages/Route/Vehicle/VehicleCalendar.vue b/src/pages/Route/Vehicle/VehicleCalendar.vue
new file mode 100644
index 000000000..681bb966a
--- /dev/null
+++ b/src/pages/Route/Vehicle/VehicleCalendar.vue
@@ -0,0 +1,13 @@
+
+
+
+ emit('onDateSelected', e)"
+ />
+
\ No newline at end of file
diff --git a/src/pages/Route/Vehicle/VehicleCalendarGrid.vue b/src/pages/Route/Vehicle/VehicleCalendarGrid.vue
new file mode 100644
index 000000000..99b6602c8
--- /dev/null
+++ b/src/pages/Route/Vehicle/VehicleCalendarGrid.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/Route/Vehicle/locale/en.yml b/src/pages/Route/Vehicle/locale/en.yml
index af6f78fd1..aa1c6d185 100644
--- a/src/pages/Route/Vehicle/locale/en.yml
+++ b/src/pages/Route/Vehicle/locale/en.yml
@@ -15,6 +15,8 @@ vehicle:
remove: Vehicle removed
search: Search Vehicle
searchInfo: Search by id or number plate
+ deleteTitle: This item will be deleted
+ deleteSubtitle: Are you sure you want to continue?
params:
vehicleTypeFk: Type
vehicleStateFk: State
diff --git a/src/pages/Route/Vehicle/locale/es.yml b/src/pages/Route/Vehicle/locale/es.yml
index 9fd0d3e91..463784c55 100644
--- a/src/pages/Route/Vehicle/locale/es.yml
+++ b/src/pages/Route/Vehicle/locale/es.yml
@@ -15,6 +15,8 @@ vehicle:
remove: Vehículo eliminado
search: Buscar Vehículo
searchInfo: Buscar por id o matrícula
+ deleteTitle: Este elemento será eliminado
+ deleteSubtitle: ¿Seguro que quieres continuar?
params:
vehicleTypeFk: Tipo
vehicleStateFk: Estado
diff --git a/src/pages/Route/locale/en.yml b/src/pages/Route/locale/en.yml
index e7e2d691e..ca4a8ce9a 100644
--- a/src/pages/Route/locale/en.yml
+++ b/src/pages/Route/locale/en.yml
@@ -51,6 +51,11 @@ route:
agencyModeName: Agency route
isOwn: Own
isAnyVolumeAllowed: Any volume allowed
+ created: Created
+ addressFromFk: Sender
+ addressToFk: Destination
+ landed: Landed
+ ead: EAD
Worker: Worker
Agency: Agency
Vehicle: Vehicle
@@ -70,21 +75,3 @@ route:
searchInfo: You can search by route reference
dated: Dated
preview: Preview
- cmr:
- search: Search Cmr
- searchInfo: You can search Cmr by Id
- params:
- results: results
- cmrFk: CMR id
- hasCmrDms: Attached in gestdoc
- 'true': 'Yes'
- 'false': 'No'
- ticketFk: Ticketd id
- routeFk: Route id
- countryFk: Country
- clientFk: Client id
- warehouseFk: Warehouse
- shipped: Preparation date
- viewCmr: View CMR
- downloadCmrs: Download CMRs
- search: General search
diff --git a/src/pages/Route/locale/es.yml b/src/pages/Route/locale/es.yml
index 2785ded31..fe3ba08be 100644
--- a/src/pages/Route/locale/es.yml
+++ b/src/pages/Route/locale/es.yml
@@ -47,11 +47,16 @@ route:
routeFk: Id ruta
clientFk: Id cliente
countryFk: Pais
- shipped: Fecha preparación
+ shipped: F. envío
agencyModeName: Agencia Ruta
agencyAgreement: Agencia Acuerdo
isOwn: Propio
isAnyVolumeAllowed: Cualquier volumen
+ created: Creado
+ addressFromFk: Remitente
+ addressToFk: Destinatario
+ landed: F. entrega
+ ead: ETD
Worker: Trabajador
Agency: Agencia
Vehicle: Vehículo
diff --git a/src/pages/Shelving/Parking/Card/ParkingDescriptorProxy.vue b/src/pages/Shelving/Parking/Card/ParkingDescriptorProxy.vue
index e78a2b238..cff1f75c2 100644
--- a/src/pages/Shelving/Parking/Card/ParkingDescriptorProxy.vue
+++ b/src/pages/Shelving/Parking/Card/ParkingDescriptorProxy.vue
@@ -4,11 +4,6 @@ import ParkingSummary from './ParkingSummary.vue';
-
+
diff --git a/src/pages/Supplier/Card/SupplierAccounts.vue b/src/pages/Supplier/Card/SupplierAccounts.vue
index 2e3acdfb6..d26151994 100644
--- a/src/pages/Supplier/Card/SupplierAccounts.vue
+++ b/src/pages/Supplier/Card/SupplierAccounts.vue
@@ -7,12 +7,11 @@ import FetchData from 'components/FetchData.vue';
import CrudModel from 'components/CrudModel.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
-import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
-import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
import axios from 'axios';
import useNotify from 'src/composables/useNotify.js';
import { useQuasar } from 'quasar';
+import VnBankDetailsForm from 'src/components/common/VnBankDetailsForm.vue';
const { t } = useI18n();
const { notify } = useNotify();
@@ -26,11 +25,6 @@ const wireTransferFk = ref(null);
const bankEntitiesOptions = ref([]);
const filteredBankEntitiesOptions = ref([]);
-const onBankEntityCreated = async (dataSaved, rowData) => {
- await bankEntitiesRef.value.fetch();
- rowData.bankEntityFk = dataSaved.id;
-};
-
const onChangesSaved = async () => {
if (supplier.value.payMethodFk !== wireTransferFk.value)
quasar
@@ -56,23 +50,6 @@ const setWireTransfer = async () => {
await axios.patch(`Suppliers/${route.params.id}`, params);
notify('globals.dataSaved', 'positive');
};
-
-function findBankFk(value, row) {
- row.bankEntityFk = null;
- if (!value) return;
-
- const bankEntityFk = bankEntitiesOptions.value.find((b) => b.id == value.slice(4, 8));
- if (bankEntityFk) row.bankEntityFk = bankEntityFk.id;
-}
-
-function bankEntityFilter(val) {
- const needle = val.toLowerCase();
- filteredBankEntitiesOptions.value = bankEntitiesOptions.value.filter(
- (bank) =>
- bank.bic.toLowerCase().startsWith(needle) ||
- bank.name.toLowerCase().includes(needle),
- );
-}
- findBankFk(value, row)"
- :required="true"
- >
-
-
- {{ t('components.iban_tooltip') }}
-
-
-
-
-
-
- onBankEntityCreated(requestResponse, row)
- "
- />
-
-
-
-
- {{ scope.opt.bic }}
- {{ scope.opt.name }}
-
-
-
-
+ {
+ row.iban = iban;
+ row.bankEntityFk = bankEntityFk;
+ }
+ "
+ />
{
@@ -125,6 +132,7 @@ const addressId = computed({
formData.value.addressFk = val;
onChangeAddress(val);
getShipped({
+ shipped: formData.value?.shipped,
landed: formData.value?.landed,
addressFk: val,
agencyModeFk: formData.value?.agencyModeFk,
@@ -239,6 +247,9 @@ async function getZone(options) {
(warehousesOptions = data)"
+ :where="{
+ isForTicket: true,
+ }"
auto-load
/>
-import { reactive } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
@@ -30,31 +29,29 @@ const { t } = useI18n();
const router = useRouter();
const { notify } = useNotify();
-const newTicketFormData = reactive({});
const date = new Date();
-const createTicket = async () => {
+async function createTicket(formData) {
const expeditionIds = $props.selectedExpeditions.map((expedition) => expedition.id);
const params = {
clientId: $props.ticket.clientFk,
- landed: newTicketFormData.landed,
+ landed: formData.landed,
warehouseId: $props.ticket.warehouseFk,
addressId: $props.ticket.addressFk,
agencyModeId: $props.ticket.agencyModeFk,
- routeId: newTicketFormData.routeFk,
+ routeId: formData.routeFk,
expeditionIds: expeditionIds,
};
-
const { data } = await axios.post('Expeditions/moveExpeditions', params);
notify(t('globals.dataSaved'), 'positive');
router.push({ name: 'TicketSummary', params: { id: data.id } });
-};
+}
diff --git a/src/pages/Ticket/Card/TicketNotes.vue b/src/pages/Ticket/Card/TicketNotes.vue
index a3e25d63e..f2b474156 100644
--- a/src/pages/Ticket/Card/TicketNotes.vue
+++ b/src/pages/Ticket/Card/TicketNotes.vue
@@ -55,73 +55,75 @@ async function handleSave(e) {
auto-load
url="ObservationTypes"
/>
-
-
-
-
-
-
-
-
+
+
+
+
+
-
- {{ t('ticketNotes.removeNote') }}
-
-
-
-
-
-
- {{ t('ticketNotes.addNote') }}
-
-
-
-
-
-
+
+
+
+
+ {{ t('ticketNotes.removeNote') }}
+
+
+
+
+
+
+ {{ t('ticketNotes.addNote') }}
+
+
+
+
+
+
+
diff --git a/src/pages/Ticket/Card/TicketPackage.vue b/src/pages/Ticket/Card/TicketPackage.vue
index 5fbf4c800..ff55bf9d4 100644
--- a/src/pages/Ticket/Card/TicketPackage.vue
+++ b/src/pages/Ticket/Card/TicketPackage.vue
@@ -49,88 +49,95 @@ watch(
(listPackagingsOptions = data)"
auto-load
- :filter="{ fields: ['packagingFk', 'name'], order: 'name ASC' }"
url="Packagings/listPackaging"
+ :filter="{
+ fields: ['packagingFk', 'name'],
+ order: ['name ASC'],
+ }"
/>
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
- {{ scope.opt?.name }}
-
-
- #{{ scope.opt?.itemFk }}
-
-
-
-
-
-
-
-
-
- {{ t('package.removePackage') }}
-
-
-
-
-
-
- {{ t('package.addPackage') }}
-
-
-
-
-
-
+
+
+
+
+
+ {{ scope.opt?.name }}
+
+
+ #{{ scope.opt?.itemFk }}
+
+
+
+
+
+
+
+
+
+ {{ t('package.removePackage') }}
+
+
+
+
+
+
+ {{ t('package.addPackage') }}
+
+
+
+
+
+
+
diff --git a/src/pages/Ticket/Negative/TicketLackFilter.vue b/src/pages/Ticket/Negative/TicketLackFilter.vue
index 78c030476..8c999e0b4 100644
--- a/src/pages/Ticket/Negative/TicketLackFilter.vue
+++ b/src/pages/Ticket/Negative/TicketLackFilter.vue
@@ -47,7 +47,14 @@ const setUserParams = (params) => {
- (warehouses = data)" auto-load />
+ (warehouses = data)"
+ :where="{
+ isForTicket: true,
+ }"
+ auto-load
+ />
tr');
-
+ const headSelectionCol = $el.querySelector(
+ 'thead tr.bg-header th.q-table--col-auto-width',
+ );
+ if (headSelectionCol) {
+ headSelectionCol.classList.add('horizontal-separator');
+ }
const newRow = document.createElement('tr');
destinationElRef.value = document.createElement('th');
originElRef.value = document.createElement('th');
@@ -394,8 +399,8 @@ watch(
destinationElRef.value.classList.add('text-uppercase', 'color-vn-label');
originElRef.value.classList.add('text-uppercase', 'color-vn-label');
- destinationElRef.value.setAttribute('colspan', '7');
- originElRef.value.setAttribute('colspan', '9');
+ destinationElRef.value.setAttribute('colspan', '10');
+ originElRef.value.setAttribute('colspan', '10');
destinationElRef.value.textContent = `${t(
'advanceTickets.destination',
@@ -490,8 +495,6 @@ watch(
selection: 'multiple',
}"
v-model:selected="selectedTickets"
- :pagination="{ rowsPerPage: 0 }"
- :no-data-label="$t('globals.noResults')"
:right-search="false"
:order="['futureTotalWithVat ASC']"
auto-load
diff --git a/src/pages/Ticket/TicketAdvanceFilter.vue b/src/pages/Ticket/TicketAdvanceFilter.vue
index a88d06300..5867e8289 100644
--- a/src/pages/Ticket/TicketAdvanceFilter.vue
+++ b/src/pages/Ticket/TicketAdvanceFilter.vue
@@ -51,6 +51,9 @@ onMounted(async () => await getItemPackingTypes());
(warehousesOptions = data)"
+ :where="{
+ isForTicket: true,
+ }"
auto-load
/>
{
const fetchAvailableAgencies = async (formData) => {
resetAgenciesSelector(formData);
- const response= await getAgencies(formData, selectedClient.value);
+ const response = await getAgencies(formData, selectedClient.value);
if (!response) return;
-
- const { options, agency } = response
- if(options)
- agenciesOptions.value = options;
- if(agency)
- formData.agencyModeId = agency;
+
+ const { options, agency } = response;
+ if (options) agenciesOptions.value = options;
+ if (agency) formData.agencyModeId = agency;
};
const redirectToTicketList = (_, { id }) => {
@@ -92,6 +90,9 @@ const redirectToTicketList = (_, { id }) => {
(warehousesOptions = data)"
+ :where="{
+ isForTicket: true,
+ }"
order="name"
auto-load
/>
diff --git a/src/pages/Ticket/TicketCreateDialog.vue b/src/pages/Ticket/TicketCreateDialog.vue
index 2245c5c81..9715da6f9 100644
--- a/src/pages/Ticket/TicketCreateDialog.vue
+++ b/src/pages/Ticket/TicketCreateDialog.vue
@@ -40,7 +40,7 @@ onBeforeMount(async () => {
function resetAgenciesSelector(formData) {
agenciesOptions.value = [];
- if(formData) formData.agencyModeId = null;
+ if (formData) formData.agencyModeId = null;
}
const fetchClient = async (formData) => {
@@ -67,14 +67,12 @@ const onClientSelected = async (formData) => {
const fetchAvailableAgencies = async (formData) => {
resetAgenciesSelector(formData);
- const response= await getAgencies(formData, selectedClient.value);
+ const response = await getAgencies(formData, selectedClient.value);
if (!response) return;
-
- const { options, agency } = response
- if(options)
- agenciesOptions.value = options;
- if(agency)
- formData.agencyModeId = agency;
+
+ const { options, agency } = response;
+ if (options) agenciesOptions.value = options;
+ if (agency) formData.agencyModeId = agency;
};
const redirectToTicketList = (_, { id }) => {
@@ -86,6 +84,9 @@ const redirectToTicketList = (_, { id }) => {
(warehousesOptions = data)"
+ :where="{
+ isForTicket: true,
+ }"
order="name"
auto-load
/>
diff --git a/src/pages/Ticket/TicketFilter.vue b/src/pages/Ticket/TicketFilter.vue
index 9e9b17ca6..0616ee8ac 100644
--- a/src/pages/Ticket/TicketFilter.vue
+++ b/src/pages/Ticket/TicketFilter.vue
@@ -41,8 +41,19 @@ const groupedStates = ref([]);
@on-fetch="(data) => (agencies = data)"
auto-load
/>
- (warehouses = data)" auto-load />
-
+ (warehouses = data)"
+ auto-load
+ :where="{
+ isForTicket: true,
+ }"
+ />
+
{{ t(`params.${tag.label}`) }}:
diff --git a/src/pages/Ticket/TicketFuture.vue b/src/pages/Ticket/TicketFuture.vue
index 588379ed9..6ed3afcc6 100644
--- a/src/pages/Ticket/TicketFuture.vue
+++ b/src/pages/Ticket/TicketFuture.vue
@@ -89,7 +89,7 @@ const ticketColumns = computed(() => [
},
{
label: t('advanceTickets.import'),
- name: 'import',
+ name: 'totalWithVat',
align: 'left',
headerClass: 'horizontal-separator',
columnFilter: false,
@@ -317,7 +317,7 @@ watch(
{{ dashIfEmpty(row.state) }}
-
+
(warehousesOptions = data)"
+ :where="{
+ isForTicket: true,
+ }"
auto-load
/>
[
attrs: {
url: 'warehouses',
fields: ['id', 'name'],
+ where: {
+ isForTicket: true,
+ },
},
format: (row) => row.warehouse,
columnField: {
@@ -670,9 +673,11 @@ function setReference(data) {
:sort-by="['name']"
:label="t('globals.warehouse')"
v-model="data.warehouseId"
- :options="warehousesOptions"
hide-selected
required
+ :where="{
+ isForTicket: true,
+ }"
@update:model-value="() => fetchAvailableAgencies(data)"
/>
diff --git a/src/pages/Ticket/TicketWeekly.vue b/src/pages/Ticket/TicketWeekly.vue
index d6493550b..3906d6c44 100644
--- a/src/pages/Ticket/TicketWeekly.vue
+++ b/src/pages/Ticket/TicketWeekly.vue
@@ -102,6 +102,9 @@ const columns = computed(() => [
attrs: {
url: 'Warehouses',
fields: ['id', 'name'],
+ where: {
+ isForTicket: true,
+ },
},
inWhere: true,
},
diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml
index 175f0955b..50443e2b0 100644
--- a/src/pages/Ticket/locale/en.yml
+++ b/src/pages/Ticket/locale/en.yml
@@ -208,6 +208,7 @@ ticketList:
hour: Hour
rounding: Rounding
noVerifiedData: No verified data
+ warehouse: Warehouse
purchaseRequest: Purchase request
notVisible: Not visible
clientFrozen: Client frozen
diff --git a/src/pages/Travel/Card/TravelBasicData.vue b/src/pages/Travel/Card/TravelBasicData.vue
index a6ef8ad19..6ff73d5fa 100644
--- a/src/pages/Travel/Card/TravelBasicData.vue
+++ b/src/pages/Travel/Card/TravelBasicData.vue
@@ -28,13 +28,17 @@ const warehousesOptionsIn = ref([]);
url="Warehouses"
@on-fetch="(data) => (warehousesOptionsOut = data)"
auto-load
- :filter="{ where: { isOrigin: TRUE } }"
+ :where="{
+ isOrigin: true,
+ }"
/>
(warehousesOptionsIn = data)"
auto-load
- :filter="{ where: { isDestiny: TRUE } }"
+ :where="{
+ isDestiny: true,
+ }"
/>
diff --git a/src/pages/Travel/ExtraCommunityFilter.vue b/src/pages/Travel/ExtraCommunityFilter.vue
index 76ffdba20..c664c3afd 100644
--- a/src/pages/Travel/ExtraCommunityFilter.vue
+++ b/src/pages/Travel/ExtraCommunityFilter.vue
@@ -183,7 +183,9 @@ warehouses();
{
option-value="id"
option-label="name"
hide-selected
+ :where="{
+ isOrigin: true,
+ }"
/>
{
option-value="id"
option-label="name"
hide-selected
+ :where="{
+ isDestiny: true,
+ }"
/>
diff --git a/src/pages/Travel/TravelFilter.vue b/src/pages/Travel/TravelFilter.vue
index 5498fd269..6d0a1a73a 100644
--- a/src/pages/Travel/TravelFilter.vue
+++ b/src/pages/Travel/TravelFilter.vue
@@ -64,6 +64,9 @@ defineExpose({ states });
option-filter="name"
dense
filled
+ :where="{
+ isDestiny: true,
+ }"
/>
[
fields: ['id', 'name'],
optionLabel: 'name',
optionValue: 'id',
+ where: { isDestiny: true },
},
format: (row) => row.warehouseInName,
columnField: {
@@ -133,6 +134,7 @@ const columns = computed(() => [
attrs: {
url: 'warehouses',
fields: ['id', 'name'],
+ where: { isOrigin: true },
},
format: (row) => row.warehouseOutName,
columnField: {
diff --git a/src/pages/Worker/Card/WorkerBasicData.vue b/src/pages/Worker/Card/WorkerBasicData.vue
index f2a16b7e1..cb5ead5e3 100644
--- a/src/pages/Worker/Card/WorkerBasicData.vue
+++ b/src/pages/Worker/Card/WorkerBasicData.vue
@@ -1,6 +1,5 @@
{
ref="form"
:url-update="`Workers/${$route.params.id}`"
auto-load
- model="Worker"
+ :model
+ @on-fetch="(data, res, old, formData) => addAdvancedData(formData)"
>
diff --git a/src/pages/Worker/Card/WorkerCalendarItem.vue b/src/pages/Worker/Card/WorkerCalendarItem.vue
index 86d227ad3..071fa06be 100644
--- a/src/pages/Worker/Card/WorkerCalendarItem.vue
+++ b/src/pages/Worker/Card/WorkerCalendarItem.vue
@@ -11,6 +11,7 @@ import '@quasar/quasar-ui-qcalendar/src/QCalendarVariables.scss';
import { useWeekdayStore } from 'src/stores/useWeekdayStore';
import useNotify from 'src/composables/useNotify.js';
import axios from 'axios';
+import useWeekdaysOrder from 'src/composables/getWeekdays';
const props = defineProps({
year: {
@@ -44,6 +45,7 @@ const { locale } = useI18n();
const calendarRef = ref(null);
const weekdayStore = useWeekdayStore();
+const weekDays = useWeekdaysOrder();
const selectedDate = ref();
const calendarEventDates = [];
const today = ref(date.formatDate(Date.vnNew(), 'YYYY-MM-DD'));
@@ -182,7 +184,7 @@ watch(_year, (newValue) => {
no-outside-days
:selected-dates="calendarEventDates"
no-active-date
- :weekdays="[1, 2, 3, 4, 5, 6, 0]"
+ :weekdays="weekDays"
short-weekday-label
:locale="locale"
:now="today"
diff --git a/src/pages/Worker/Card/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue
index 591dadcd2..b1bde6d75 100644
--- a/src/pages/Worker/Card/WorkerCard.vue
+++ b/src/pages/Worker/Card/WorkerCard.vue
@@ -4,9 +4,11 @@ import VnCard from 'src/components/common/VnCard.vue';
diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue
index 9576e7e84..db0c7c096 100644
--- a/src/pages/Worker/Card/WorkerDescriptor.vue
+++ b/src/pages/Worker/Card/WorkerDescriptor.vue
@@ -2,7 +2,6 @@
import { computed, ref } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
-import EntityDescriptor from 'src/components/ui/EntityDescriptor.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import VnChangePassword from 'src/components/common/VnChangePassword.vue';
@@ -11,6 +10,8 @@ import VnImg from 'src/components/ui/VnImg.vue';
import EditPictureForm from 'components/EditPictureForm.vue';
import WorkerDescriptorMenu from './WorkerDescriptorMenu.vue';
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
+import CardDescriptor from 'src/components/ui/CardDescriptor.vue';
+import WorkerCard from './WorkerCard.vue';
const $props = defineProps({
id: {
@@ -52,14 +53,17 @@ const handlePhotoUpdated = (evt = false) => {
};
-
{
-
+
{
).data?.payMethodFk;
});
-async function handleNewBankEntity(data, resp) {
- await bankEntitiesRef.value.fetch();
- data.bankEntityFk = resp.id;
- bankEntitiesOptions.value.push(resp);
-}
-
function handleLocation(data, location) {
const { town, code, provinceFk, countryFk } = location ?? {};
data.postcode = code;
@@ -323,51 +315,19 @@ function generateCodeUser(worker) {
(val) => !val && delete data.payMethodFk
"
/>
- (data.bankEntityFk = bankEntityFk)
- "
- />
-
-
- handleNewBankEntity(data, resp)
- "
- />
-
-
-
-
- {{ scope.opt.bic }}
- {{ scope.opt.name }}
-
-
-
-
+ {
+ data.iban = iban;
+ data.bankEntityFk = bankEntityFk;
+ }
+ "
+ />
diff --git a/src/pages/Zone/ZoneCalendar.vue b/src/pages/Zone/ZoneCalendar.vue
index 7cae59698..c2c66d753 100644
--- a/src/pages/Zone/ZoneCalendar.vue
+++ b/src/pages/Zone/ZoneCalendar.vue
@@ -10,6 +10,7 @@ import { QCalendarMonth } from '@quasar/quasar-ui-qcalendar/src/index.js';
import '@quasar/quasar-ui-qcalendar/src/QCalendarVariables.scss';
import { useWeekdayStore } from 'src/stores/useWeekdayStore';
+import useWeekdaysOrder from 'src/composables/getWeekdays';
import axios from 'axios';
const props = defineProps({
@@ -46,6 +47,7 @@ const route = useRoute();
const calendarRef = ref(null);
const weekdayStore = useWeekdayStore();
+const weekDays = useWeekdaysOrder();
const showZoneClosingTable = ref(false);
const zoneClosingData = ref(null);
const today = ref(date.formatDate(Date.vnNew(), 'YYYY-MM-DD'));
@@ -161,7 +163,7 @@ const handleDateClick = (timestamp) => {
show-work-weeks
no-outside-days
no-active-date
- :weekdays="[1, 2, 3, 4, 5, 6, 0]"
+ :weekdays="weekDays"
short-weekday-label
:locale="locale"
:now="today"
diff --git a/src/pages/Zone/ZoneCalendarGrid.vue b/src/pages/Zone/ZoneCalendarGrid.vue
index 1ef687b3f..026b15735 100644
--- a/src/pages/Zone/ZoneCalendarGrid.vue
+++ b/src/pages/Zone/ZoneCalendarGrid.vue
@@ -229,22 +229,3 @@ onUnmounted(() => arrayData.destroy());
-
-
diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue
index 355eb900e..c8e2f1646 100644
--- a/src/pages/Zone/ZoneList.vue
+++ b/src/pages/Zone/ZoneList.vue
@@ -189,16 +189,14 @@ const exprBuilder = (param, value) => {
return {
code: { like: `%${value}%` },
};
+ case 'id':
+ case 'price':
case 'agencyModeFk':
return {
- agencyModeFk: value,
+ [param]: value,
};
case 'search':
return /^\d+$/.test(value) ? { id: value } : { name: { like: `%${value}%` } };
- case 'price':
- return {
- price: value,
- };
}
};
diff --git a/src/router/modules/route.js b/src/router/modules/route.js
index 2b7cfc5be..08ba1701f 100644
--- a/src/router/modules/route.js
+++ b/src/router/modules/route.js
@@ -170,6 +170,7 @@ const vehicleCard = {
'VehicleBasicData',
'VehicleNotes',
'VehicleDms',
+ 'VehicleEvents'
],
},
children: [
@@ -209,6 +210,15 @@ const vehicleCard = {
},
component: () => import('src/pages/Route/Vehicle/VehicleDms.vue'),
},
+ {
+ name: 'VehicleEvents',
+ path: 'events',
+ meta: {
+ title: 'calendar',
+ icon: 'vn:calendar',
+ },
+ component: () => import('src/pages/Route/Vehicle/Card/VehicleEvents.vue'),
+ },
],
};
diff --git a/test/cypress/docker/find/find.js b/test/cypress/docker/find/find.js
index 4f8063c86..9570dafaa 100644
--- a/test/cypress/docker/find/find.js
+++ b/test/cypress/docker/find/find.js
@@ -6,6 +6,9 @@ const FINDED_PATHS = ['src', E2E_PATH];
function getGitDiff(options) {
const TARGET_BRANCH = options[2] || 'dev';
+ execSync(`git fetch origin ${TARGET_BRANCH}`, {
+ encoding: 'utf-8',
+ });
const diff = execSync(`git diff --name-only origin/${TARGET_BRANCH}`, {
encoding: 'utf-8',
});
diff --git a/test/cypress/integration/item/ItemFixedPrice.spec.js b/test/cypress/integration/item/ItemFixedPrice.spec.js
index 41230f570..2b92c861e 100644
--- a/test/cypress/integration/item/ItemFixedPrice.spec.js
+++ b/test/cypress/integration/item/ItemFixedPrice.spec.js
@@ -54,7 +54,7 @@ describe('Handle Items FixedPrice', () => {
});
it('should edit all items', () => {
- cy.get('.bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner').click();
+ cy.get('.bg-header > :nth-child(1) [data-cy="vnCheckbox"]').click();
cy.dataCy('FixedPriceToolbarEditBtn').should('not.be.disabled');
cy.dataCy('FixedPriceToolbarEditBtn').click();
cy.dataCy('EditFixedPriceSelectOption').type(grouping);
@@ -65,7 +65,7 @@ describe('Handle Items FixedPrice', () => {
});
it('should remove all items', () => {
- cy.get('.bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner').click();
+ cy.get('.bg-header > :nth-child(1) [data-cy="vnCheckbox"]').click();
cy.dataCy('crudModelDefaultRemoveBtn').should('not.be.disabled');
cy.dataCy('crudModelDefaultRemoveBtn').click();
cy.dataCy('VnConfirm_confirm').click();
diff --git a/test/cypress/integration/route/cmr/cmrList.spec.js b/test/cypress/integration/route/cmr/cmrList.spec.js
index a25a0c10a..fe05ab255 100644
--- a/test/cypress/integration/route/cmr/cmrList.spec.js
+++ b/test/cypress/integration/route/cmr/cmrList.spec.js
@@ -5,6 +5,9 @@ describe('Cmr list', () => {
const selectors = {
ticket: getLinkSelector('ticketFk'),
client: getLinkSelector('clientFk'),
+ route: getLinkSelector('routeFk'),
+ agency: getLinkSelector('agencyModeFk'),
+ carrier: getLinkSelector('supplierFk'),
lastRowSelectCheckBox:
'.q-virtual-scroll__content > tr:last-child > :nth-child(1) > .q-checkbox',
downloadBtn: '#subToolbar > .q-btn',
@@ -21,6 +24,10 @@ describe('Cmr list', () => {
const data = {
ticket: '1',
client: 'Bruce Wayne',
+ route: 'first route',
+ routeId: '1',
+ agency: 'inhouse pickup',
+ carrier: 'PLANTS SL',
};
beforeEach(() => {
@@ -68,6 +75,26 @@ describe('Cmr list', () => {
});
});
+ describe('Route pop-ups', () => {
+ it('Should redirect to the route summary from the route descriptor pop-up', () => {
+ cy.get(selectors.route).should('be.visible').click();
+ cy.containContent(selectors.descriptorId, data.routeId);
+ cy.get(selectors.descriptorGoToSummaryBtn).should('be.visible').click();
+ cy.url().should('include', '/route/1/summary');
+ cy.containContent(selectors.summaryTitle, data.route);
+ });
+
+ it('Should redirect to the route summary from summary pop-up from the route descriptor pop-up', () => {
+ cy.get(selectors.route).should('be.visible').click();
+ cy.containContent(selectors.descriptorId, data.routeId);
+ cy.get(selectors.descriptorOpenSummaryBtn).should('be.visible').click();
+ cy.containContent(selectors.summaryTitle, data.route);
+ cy.get(selectors.summaryGoToSummaryBtn).should('be.visible').click();
+ cy.url().should('include', '/route/1/summary');
+ cy.containContent(selectors.summaryTitle, data.route);
+ });
+ });
+
describe('Client pop-ups', () => {
it('Should redirect to the client summary from the client descriptor pop-up', () => {
cy.get(selectors.client).should('be.visible').click();
@@ -87,4 +114,44 @@ describe('Cmr list', () => {
cy.containContent(selectors.summaryTitle, data.client);
});
});
+
+ describe('Agency pop-ups', () => {
+ it('Should redirect to the agency summary from the agency descriptor pop-up', () => {
+ cy.get(selectors.agency).should('be.visible').click();
+ cy.containContent(selectors.descriptorTitle, data.agency);
+ cy.get(selectors.descriptorGoToSummaryBtn).should('be.visible').click();
+ cy.url().should('include', '/agency/1/summary');
+ cy.containContent(selectors.summaryTitle, data.agency);
+ });
+
+ it('Should redirect to the agency summary from summary pop-up from the agency descriptor pop-up', () => {
+ cy.get(selectors.agency).should('be.visible').click();
+ cy.containContent(selectors.descriptorTitle, data.agency);
+ cy.get(selectors.descriptorOpenSummaryBtn).should('be.visible').click();
+ cy.containContent(selectors.summaryTitle, data.agency);
+ cy.get(selectors.summaryGoToSummaryBtn).should('be.visible').click();
+ cy.url().should('include', '/agency/1/summary');
+ cy.containContent(selectors.summaryTitle, data.agency);
+ });
+ });
+
+ describe('Carrier pop-ups', () => {
+ it('Should redirect to the supplier summary from the supplier descriptor pop-up', () => {
+ cy.get(selectors.carrier).should('be.visible').click();
+ cy.containContent(selectors.descriptorTitle, data.carrier);
+ cy.get(selectors.descriptorGoToSummaryBtn).should('be.visible').click();
+ cy.url().should('include', '/supplier/1/summary');
+ cy.containContent(selectors.summaryTitle, data.carrier);
+ });
+
+ it('Should redirect to the supplier summary from summary pop-up from the supplier descriptor pop-up', () => {
+ cy.get(selectors.carrier).should('be.visible').click();
+ cy.containContent(selectors.descriptorTitle, data.carrier);
+ cy.get(selectors.descriptorOpenSummaryBtn).should('be.visible').click();
+ cy.containContent(selectors.summaryTitle, data.carrier);
+ cy.get(selectors.summaryGoToSummaryBtn).should('be.visible').click();
+ cy.url().should('include', '/supplier/1/summary');
+ cy.containContent(selectors.summaryTitle, data.carrier);
+ });
+ });
});
diff --git a/test/cypress/integration/route/vehicle/vehicleEvents.spec.js b/test/cypress/integration/route/vehicle/vehicleEvents.spec.js
new file mode 100644
index 000000000..f03e11b29
--- /dev/null
+++ b/test/cypress/integration/route/vehicle/vehicleEvents.spec.js
@@ -0,0 +1,27 @@
+describe('Vehicle', () => {
+
+ beforeEach(() => {
+ cy.viewport(1920, 1080);
+ cy.login('deliveryAssistant');
+ cy.visit(`/#/route/vehicle/3/events`);
+ });
+
+ it('should add, edit and delete a vehicle event', () => {
+ 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.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.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/ticketList.spec.js b/test/cypress/integration/ticket/ticketList.spec.js
index 302707601..95649f51c 100644
--- a/test/cypress/integration/ticket/ticketList.spec.js
+++ b/test/cypress/integration/ticket/ticketList.spec.js
@@ -76,16 +76,13 @@ describe('TicketList', () => {
});
}).as('ticket');
- cy.get('[data-cy="Warehouse_select"]').type('Warehouse Five');
- cy.get('.q-menu .q-item').contains('Warehouse Five').click();
+ cy.get('[data-cy="Warehouse_select"]').type('Warehouse One');
+ cy.get('.q-menu .q-item').contains('Warehouse One').click();
cy.wait('@ticket').then((interception) => {
- const data = interception.response.body[1];
+ const data = interception.response.body[0];
expect(data.hasComponentLack).to.equal(1);
- expect(data.isTooLittle).to.equal(1);
- expect(data.hasItemShortage).to.equal(1);
});
cy.get('.icon-components').should('exist');
cy.get('.icon-unavailable').should('exist');
- cy.get('.icon-isTooLittle').should('exist');
});
});