Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8581-invoiceinE2e
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
commit
b74e3229d8
|
@ -25,6 +25,8 @@ RUN apt-get update \
|
|||
libnss3 \
|
||||
libxss1 \
|
||||
libxtst6 \
|
||||
mesa-vulkan-drivers \
|
||||
vulkan-tools \
|
||||
xauth \
|
||||
xvfb \
|
||||
&& apt-get clean \
|
||||
|
|
21147
pnpm-lock.yaml
21147
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -9,6 +9,8 @@ export function getColAlign(col) {
|
|||
case 'number':
|
||||
align = 'right';
|
||||
break;
|
||||
case 'time':
|
||||
case 'date':
|
||||
case 'checkbox':
|
||||
align = 'center';
|
||||
break;
|
||||
|
|
|
@ -159,6 +159,7 @@ globals:
|
|||
raid: 'Raid {daysInForward} days'
|
||||
isVies: Vies
|
||||
noData: No data available
|
||||
vehicle: Vehicle
|
||||
pageTitles:
|
||||
logIn: Login
|
||||
addressEdit: Update address
|
||||
|
|
|
@ -163,6 +163,7 @@ globals:
|
|||
raid: 'Redada {daysInForward} días'
|
||||
isVies: Vies
|
||||
noData: Datos no disponibles
|
||||
vehicle: Vehículo
|
||||
pageTitles:
|
||||
logIn: Inicio de sesión
|
||||
addressEdit: Modificar consignatario
|
||||
|
|
|
@ -7,6 +7,7 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
|
@ -30,7 +31,7 @@ const states = ref();
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('Customer ID')"
|
||||
:label="t('globals.params.clientFk')"
|
||||
v-model="params.clientFk"
|
||||
is-outlined
|
||||
/>
|
||||
|
@ -38,13 +39,17 @@ const states = ref();
|
|||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput v-model="params.fi" :label="t('FI')" is-outlined />
|
||||
<VnInput
|
||||
v-model="params.fi"
|
||||
:label="t('globals.params.fi')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputNumber
|
||||
:label="t('Amount')"
|
||||
:label="t('globals.amount')"
|
||||
v-model="params.amount"
|
||||
is-outlined
|
||||
data-cy="InvoiceOutFilterAmountBtn"
|
||||
|
@ -54,7 +59,7 @@ const states = ref();
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<QInput
|
||||
:label="t('Min')"
|
||||
:label="t('invoiceOut.params.min')"
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
|
@ -65,7 +70,7 @@ const states = ref();
|
|||
</QItemSection>
|
||||
<QItemSection>
|
||||
<QInput
|
||||
:label="t('Max')"
|
||||
:label="t('invoiceOut.params.max')"
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
|
@ -78,7 +83,7 @@ const states = ref();
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
:label="t('Has PDF')"
|
||||
:label="t('invoiceOut.params.hasPdf')"
|
||||
toggle-indeterminate
|
||||
v-model="params.hasPdf"
|
||||
/>
|
||||
|
@ -88,14 +93,31 @@ const states = ref();
|
|||
<QItemSection>
|
||||
<VnInputDate
|
||||
v-model="params.created"
|
||||
:label="t('Created')"
|
||||
:label="t('invoiceOut.params.created')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate v-model="params.dued" :label="t('Dued')" is-outlined />
|
||||
<VnInputDate
|
||||
v-model="params.dued"
|
||||
:label="t('invoiceOut.params.dued')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
outlined
|
||||
rounded
|
||||
:label="t('globals.params.departmentFk')"
|
||||
v-model="params.departmentFk"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
url="Departments"
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
|
|
|
@ -16,6 +16,7 @@ import VnRow from 'src/components/ui/VnRow.vue';
|
|||
import VnRadio from 'src/components/common/VnRadio.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -86,6 +87,20 @@ const columns = computed(() => [
|
|||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'departmentFk',
|
||||
label: t('globals.params.departmentFk'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Departments',
|
||||
},
|
||||
create: true,
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'companyFk',
|
||||
|
@ -229,6 +244,12 @@ watchEffect(selectedRows);
|
|||
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-departmentFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row.departmentName || '-' }}
|
||||
<DepartmentDescriptorProxy :id="row?.departmentFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<div class="row q-col-gutter-xs col-span-2">
|
||||
<div class="col-12">
|
||||
|
|
|
@ -221,7 +221,7 @@ en:
|
|||
attenderFk: Atender
|
||||
clientFk: Client id
|
||||
warehouseFk: Warehouse
|
||||
requesterFk: Salesperson
|
||||
requesterFk: Requester
|
||||
from: From
|
||||
to: To
|
||||
mine: For me
|
||||
|
@ -239,7 +239,7 @@ es:
|
|||
attenderFk: Comprador
|
||||
clientFk: Id cliente
|
||||
warehouseFk: Almacén
|
||||
requesterFk: Comercial
|
||||
requesterFk: Solicitante
|
||||
from: Desde
|
||||
to: Hasta
|
||||
mine: Para mi
|
||||
|
|
|
@ -84,7 +84,7 @@ item:
|
|||
attenderFk: Atender
|
||||
clientFk: Client id
|
||||
warehouseFk: Warehouse
|
||||
requesterFk: Salesperson
|
||||
requesterFk: Requester
|
||||
from: From
|
||||
to: To
|
||||
mine: For me
|
||||
|
|
|
@ -93,7 +93,7 @@ item:
|
|||
attenderFk: Comprador
|
||||
clientFk: Id cliente
|
||||
warehouseFk: Almacén
|
||||
requesterFk: Comercial
|
||||
requesterFk: Solicitante
|
||||
from: Desde
|
||||
to: Hasta
|
||||
mine: Para mi
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<script setup>
|
||||
import AgencyDescriptor from 'pages/Route/Agency/Card/AgencyDescriptor.vue';
|
||||
import AgencySummary from './AgencySummary.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
summary: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<QPopupProxy>
|
||||
<AgencyDescriptor v-if="$props.id" :id="$props.id" :summary="AgencySummary" />
|
||||
</QPopupProxy>
|
||||
</template>
|
|
@ -80,6 +80,7 @@ async function deleteWorCenter(id) {
|
|||
color="primary"
|
||||
round
|
||||
flat
|
||||
data-cy="removeWorkCenterBtn"
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
|
|
|
@ -7,6 +7,10 @@ const $props = defineProps({
|
|||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
summary: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
|
|
|
@ -25,7 +25,7 @@ const emit = defineEmits(['search']);
|
|||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
<strong>{{ t(`route.params.${tag.label}`) }}: </strong>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -33,6 +33,7 @@ const emit = defineEmits(['search']);
|
|||
<QItem class="q-my-sm">
|
||||
<QItemSection>
|
||||
<VnSelectWorker
|
||||
:label="t('globals.worker')"
|
||||
v-model="params.workerFk"
|
||||
dense
|
||||
outlined
|
||||
|
@ -44,7 +45,7 @@ const emit = defineEmits(['search']);
|
|||
<QItem class="q-my-sm">
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('Agency')"
|
||||
:label="t('globals.agency')"
|
||||
v-model="params.agencyModeFk"
|
||||
url="AgencyModes/isActive"
|
||||
sort-by="name ASC"
|
||||
|
@ -61,7 +62,7 @@ const emit = defineEmits(['search']);
|
|||
<QItemSection>
|
||||
<VnInputDate
|
||||
v-model="params.from"
|
||||
:label="t('From')"
|
||||
:label="t('globals.from')"
|
||||
is-outlined
|
||||
:disable="Boolean(params.scopeDays)"
|
||||
@update:model-value="params.scopeDays = null"
|
||||
|
@ -72,7 +73,7 @@ const emit = defineEmits(['search']);
|
|||
<QItemSection>
|
||||
<VnInputDate
|
||||
v-model="params.to"
|
||||
:label="t('To')"
|
||||
:label="t('globals.to')"
|
||||
is-outlined
|
||||
:disable="Boolean(params.scopeDays)"
|
||||
@update:model-value="params.scopeDays = null"
|
||||
|
@ -84,7 +85,7 @@ const emit = defineEmits(['search']);
|
|||
<VnInput
|
||||
v-model="params.scopeDays"
|
||||
type="number"
|
||||
:label="t('Days Onward')"
|
||||
:label="t('globals.daysOnward')"
|
||||
is-outlined
|
||||
clearable
|
||||
:disable="Boolean(params.from || params.to)"
|
||||
|
@ -98,7 +99,7 @@ const emit = defineEmits(['search']);
|
|||
<QItem class="q-my-sm">
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('Vehicle')"
|
||||
:label="t('globals.vehicle')"
|
||||
v-model="params.vehicleFk"
|
||||
url="Vehicles/active"
|
||||
sort-by="numberPlate ASC"
|
||||
|
@ -120,7 +121,7 @@ const emit = defineEmits(['search']);
|
|||
<QItem class="q-my-sm">
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('Warehouse')"
|
||||
:label="t('globals.warehouse')"
|
||||
v-model="params.warehouseFk"
|
||||
url="Warehouses"
|
||||
option-value="id"
|
||||
|
@ -136,7 +137,7 @@ const emit = defineEmits(['search']);
|
|||
<QItemSection>
|
||||
<VnInput
|
||||
v-model="params.description"
|
||||
:label="t('Description')"
|
||||
:label="t('globals.description')"
|
||||
is-outlined
|
||||
clearable
|
||||
/>
|
||||
|
@ -146,7 +147,7 @@ const emit = defineEmits(['search']);
|
|||
<QItemSection>
|
||||
<QCheckbox
|
||||
v-model="params.isOk"
|
||||
:label="t('Served')"
|
||||
:label="t('route.filter.Served')"
|
||||
toggle-indeterminate
|
||||
/>
|
||||
</QItemSection>
|
||||
|
@ -154,38 +155,3 @@ const emit = defineEmits(['search']);
|
|||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
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
|
||||
</i18n>
|
||||
|
|
|
@ -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',
|
||||
}"
|
||||
>
|
||||
<template #column-id="{ row }">
|
||||
<template #column-agencyModeName="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row.routeFk }}
|
||||
<RouteDescriptorProxy :id="row.route.id" />
|
||||
{{ row?.agencyModeName }}
|
||||
<AgencyDescriptorProxy :id="row?.agencyModeFk" v-if="row?.agencyModeFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-agencyAgreement="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row?.agencyAgreement }}
|
||||
<AgencyDescriptorProxy :id="row?.agencyFk" v-if="row?.agencyFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-invoiceInFk="{ row }">
|
||||
|
|
|
@ -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) => {
|
|||
<QDialog v-model="confirmationDialog">
|
||||
<QCard style="min-width: 350px">
|
||||
<QCardSection>
|
||||
<p class="text-h6 q-ma-none">{{ t('route.Select the starting date') }}</p>
|
||||
<p class="text-h6 q-ma-none">
|
||||
{{ t('route.extendedList.selectStartingDate') }}
|
||||
</p>
|
||||
</QCardSection>
|
||||
<QCardSection class="q-pt-none">
|
||||
<VnInputDate
|
||||
:label="t('route.Starting date')"
|
||||
:label="t('route.extendedList.startingDate')"
|
||||
v-model="startingDate"
|
||||
autofocus
|
||||
/>
|
||||
|
@ -288,7 +285,7 @@ const openTicketsDialog = (id) => {
|
|||
<QCardActions align="right">
|
||||
<QBtn
|
||||
flat
|
||||
:label="t('route.Cancel')"
|
||||
:label="t('globals.cancel')"
|
||||
v-close-popup
|
||||
class="text-primary"
|
||||
/>
|
||||
|
@ -339,7 +336,7 @@ const openTicketsDialog = (id) => {
|
|||
:disable="!selectedRows?.length"
|
||||
@click="confirmationDialog = true"
|
||||
>
|
||||
<QTooltip>{{ t('route.Clone Selected Routes') }}</QTooltip>
|
||||
<QTooltip>{{ t('route.extendedList.cloneSelectedRoutes') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
icon="cloud_download"
|
||||
|
@ -348,7 +345,9 @@ const openTicketsDialog = (id) => {
|
|||
:disable="!selectedRows?.length"
|
||||
@click="showRouteReport"
|
||||
>
|
||||
<QTooltip>{{ t('route.Download selected routes as PDF') }}</QTooltip>
|
||||
<QTooltip>{{
|
||||
t('route.extendedList.downloadSelectedRoutes')
|
||||
}}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
icon="check"
|
||||
|
@ -357,7 +356,7 @@ const openTicketsDialog = (id) => {
|
|||
:disable="!selectedRows?.length"
|
||||
@click="markAsServed()"
|
||||
>
|
||||
<QTooltip>{{ t('route.Mark as served') }}</QTooltip>
|
||||
<QTooltip>{{ t('route.extendedList.markServed') }}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
</VnTable>
|
||||
|
|
|
@ -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: ({ started }) => toHour(started),
|
||||
width: '50px',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
name: 'finished',
|
||||
label: t('route.hourFinished'),
|
||||
cardVisible: true,
|
||||
columnFilter: false,
|
||||
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(() => [
|
|||
</template>
|
||||
<template #body>
|
||||
<VnTable
|
||||
:with-filters="false"
|
||||
:data-key
|
||||
:columns="columns"
|
||||
ref="tableRef"
|
||||
|
@ -174,6 +199,24 @@ const columns = computed(() => [
|
|||
<WorkerDescriptorProxy :id="row?.workerFk" v-if="row?.workerFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-agencyName="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row?.agencyName }}
|
||||
<AgencyDescriptorProxy
|
||||
:id="row?.agencyModeFk"
|
||||
v-if="row?.agencyModeFk"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
<template #column-vehiclePlateNumber="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row?.vehiclePlateNumber }}
|
||||
<VehicleDescriptorProxy
|
||||
:id="row?.vehicleFk"
|
||||
v-if="row?.vehicleFk"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
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 VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
|
@ -16,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();
|
||||
|
@ -32,7 +33,7 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'name',
|
||||
label: t('Roadmap'),
|
||||
label: t('route.roadmap.roadmap'),
|
||||
create: true,
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
|
@ -40,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,
|
||||
|
@ -53,7 +54,7 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'supplierFk',
|
||||
label: t('Carrier'),
|
||||
label: t('route.roadmap.carrier'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'suppliers',
|
||||
|
@ -64,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',
|
||||
|
@ -88,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),
|
||||
|
@ -123,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,
|
||||
},
|
||||
})
|
||||
|
@ -156,15 +157,24 @@ function exprBuilder(param, value) {
|
|||
<QCard style="min-width: 350px">
|
||||
<QCardSection>
|
||||
<p class="text-h6 q-ma-none">
|
||||
{{ t('Select the estimated date of departure (ETD)') }}
|
||||
{{ t('route.roadmap.selectEtd') }}
|
||||
</p>
|
||||
</QCardSection>
|
||||
|
||||
<QCardSection class="q-pt-none">
|
||||
<VnInputDate :label="t('ETD')" v-model="etdDate" autofocus />
|
||||
<VnInputDate
|
||||
:label="t('route.roadmap.etd')"
|
||||
v-model="etdDate"
|
||||
autofocus
|
||||
/>
|
||||
</QCardSection>
|
||||
<QCardActions align="right">
|
||||
<QBtn flat :label="t('Cancel')" v-close-popup class="text-primary" />
|
||||
<QBtn
|
||||
flat
|
||||
:label="t('globals.cancel')"
|
||||
v-close-popup
|
||||
class="text-primary"
|
||||
/>
|
||||
<QBtn color="primary" v-close-popup @click="cloneSelection">
|
||||
{{ t('globals.clone') }}
|
||||
</QBtn>
|
||||
|
@ -180,7 +190,7 @@ function exprBuilder(param, value) {
|
|||
:disable="!selectedRows?.length"
|
||||
@click="isCloneDialogOpen = true"
|
||||
>
|
||||
<QTooltip>{{ t('Clone Selected Routes') }}</QTooltip>
|
||||
<QTooltip>{{ t('route.roadmap.cloneSelected') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
icon="delete"
|
||||
|
@ -189,7 +199,7 @@ function exprBuilder(param, value) {
|
|||
:disable="!selectedRows?.length"
|
||||
@click="confirmRemove"
|
||||
>
|
||||
<QTooltip>{{ t('Delete roadmap(s)') }}</QTooltip>
|
||||
<QTooltip>{{ t('route.roadmap.deleteRoadmap') }}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
|
@ -221,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: {},
|
||||
}"
|
||||
|
@ -231,7 +241,10 @@ function exprBuilder(param, value) {
|
|||
{{ toDateHourMin(row.etd) }}
|
||||
</template>
|
||||
<template #column-supplierFk="{ row }">
|
||||
{{ row.supplierFk }}
|
||||
<span class="link" @click.stop>
|
||||
{{ row.driverName }}
|
||||
<SupplierDescriptorProxy :id="row.supplierFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<VnInputDate v-model="data.etd" />
|
||||
|
@ -250,21 +263,3 @@ function exprBuilder(param, value) {
|
|||
gap: 12px;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
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
|
||||
</i18n>
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -1,14 +1,27 @@
|
|||
<script setup>
|
||||
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);
|
||||
</script>
|
||||
<template>
|
||||
<CardDescriptor
|
||||
:url="`Vehicles/${$route.params.id}`"
|
||||
:url="`Vehicles/${entityId}`"
|
||||
data-key="Vehicle"
|
||||
title="numberPlate"
|
||||
>
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<script setup>
|
||||
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,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<QPopupProxy>
|
||||
<VehicleDescriptor v-if="$props.id" :id="$props.id" :summary="VehicleSummary" />
|
||||
</QPopupProxy>
|
||||
</template>
|
|
@ -1,49 +1,69 @@
|
|||
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:
|
||||
id: Id
|
||||
name: Name
|
||||
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
|
||||
name: Name
|
||||
cmrFk: CMR id
|
||||
hasCmrDms: Attached in gestdoc
|
||||
ticketFk: Ticketd id
|
||||
routeFk: Route id
|
||||
clientFk: Client id
|
||||
countryFk: Country
|
||||
warehouseFk: Warehouse
|
||||
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:
|
||||
search: Search Cmr
|
||||
searchInfo: You can search Cmr by Id
|
||||
|
|
|
@ -1,14 +1,45 @@
|
|||
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:
|
||||
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
|
||||
|
@ -16,7 +47,6 @@ route:
|
|||
routeFk: Id ruta
|
||||
clientFk: Id cliente
|
||||
countryFk: Pais
|
||||
warehouseFk: Almacén
|
||||
shipped: Fecha preparación
|
||||
agencyModeName: Agencia Ruta
|
||||
agencyAgreement: Agencia Acuerdo
|
||||
|
@ -27,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
|
||||
|
|
|
@ -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 },
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
/// <reference types="cypress" />
|
||||
describe('Client balance', () => {
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.login('developer');
|
||||
cy.visit('#/customer/1101/balance');
|
||||
});
|
||||
it('Should create a mandate', () => {
|
||||
cy.get('.q-page-sticky > div > .q-btn').click();
|
||||
cy.selectOption('[data-cy="paymentBank"]', 2);
|
||||
cy.dataCy('paymentAmount_input').type('100');
|
||||
cy.dataCy('paymentAmount_input').clear().type('100');
|
||||
cy.saveCard();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -63,12 +63,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) => {
|
||||
|
@ -100,6 +95,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);
|
||||
|
@ -117,6 +120,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.toArray().find((item) => {
|
||||
|
@ -137,6 +141,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) {
|
||||
|
|
Loading…
Reference in New Issue