Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8599-ModifyAndCreateInvoiceOutTests
This commit is contained in:
commit
49236b3c0e
3095
CHANGELOG.md
3095
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
|
@ -757,7 +757,7 @@ function cardClick(_, row) {
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
:class="
|
:class="
|
||||||
btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
|
btn.isPrimary ? 'text-primary-light' : 'color-vn-label'
|
||||||
"
|
"
|
||||||
:style="`visibility: ${
|
:style="`visibility: ${
|
||||||
((btn.show && btn.show(row)) ?? true)
|
((btn.show && btn.show(row)) ?? true)
|
||||||
|
@ -783,7 +783,7 @@ function cardClick(_, row) {
|
||||||
<QCardSection
|
<QCardSection
|
||||||
vertical
|
vertical
|
||||||
class="no-margin no-padding"
|
class="no-margin no-padding"
|
||||||
:class="colsMap.tableActions ? 'w-80' : 'fit'"
|
:class="colsMap.tableActions ? '' : 'fit'"
|
||||||
>
|
>
|
||||||
<!-- Chips -->
|
<!-- Chips -->
|
||||||
<QCardSection
|
<QCardSection
|
||||||
|
@ -814,7 +814,7 @@ function cardClick(_, row) {
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<!-- Fields -->
|
<!-- Fields -->
|
||||||
<QCardSection
|
<QCardSection
|
||||||
class="q-pl-sm q-pr-lg q-py-xs"
|
class="q-pl-sm q-py-xs"
|
||||||
:class="$props.cardClass"
|
:class="$props.cardClass"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
@ -822,11 +822,11 @@ function cardClick(_, row) {
|
||||||
col, index
|
col, index
|
||||||
) of splittedColumns.cardVisible"
|
) of splittedColumns.cardVisible"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
class="fields"
|
|
||||||
>
|
>
|
||||||
<VnLv :label="col.label + ':'">
|
<VnLv :label="col.label + ':'">
|
||||||
<template #value>
|
<template #value>
|
||||||
<span
|
<span
|
||||||
|
class="q-pl-xs"
|
||||||
@click="stopEventPropagation($event)"
|
@click="stopEventPropagation($event)"
|
||||||
>
|
>
|
||||||
<slot
|
<slot
|
||||||
|
@ -861,13 +861,14 @@ function cardClick(_, row) {
|
||||||
:key="index"
|
:key="index"
|
||||||
:title="btn.title"
|
:title="btn.title"
|
||||||
:icon="btn.icon"
|
:icon="btn.icon"
|
||||||
|
data-cy="cardBtn"
|
||||||
class="q-pa-xs"
|
class="q-pa-xs"
|
||||||
flat
|
|
||||||
:class="
|
:class="
|
||||||
btn.isPrimary
|
btn.isPrimary
|
||||||
? 'text-primary-light'
|
? 'text-primary-light'
|
||||||
: 'color-vn-text '
|
: 'color-vn-label'
|
||||||
"
|
"
|
||||||
|
flat
|
||||||
@click="btn.action(row)"
|
@click="btn.action(row)"
|
||||||
/>
|
/>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
|
@ -1120,6 +1121,7 @@ es:
|
||||||
.vn-label-value {
|
.vn-label-value {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
color: var(--vn-text-color);
|
color: var(--vn-text-color);
|
||||||
.value {
|
.value {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -38,20 +38,24 @@ onBeforeMount(async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (props.baseUrl) {
|
onBeforeRouteUpdate(async (to, from) => {
|
||||||
onBeforeRouteUpdate(async (to, from) => {
|
if (hasRouteParam(to.params)) {
|
||||||
if (hasRouteParam(to.params)) {
|
const { matched } = router.currentRoute.value;
|
||||||
const { matched } = router.currentRoute.value;
|
const { name } = matched.at(-3);
|
||||||
const { name } = matched.at(-3);
|
if (name) {
|
||||||
if (name) {
|
router.push({ name, params: to.params });
|
||||||
router.push({ name, params: to.params });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (to.params.id !== from.params.id) {
|
}
|
||||||
arrayData.store.url = `${props.baseUrl}/${to.params.id}`;
|
const id = to.params.id;
|
||||||
await arrayData.fetch({ append: false, updateRouter: false });
|
if (id !== from.params.id) await fetch(id, true);
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
async function fetch(id, append = false) {
|
||||||
|
const regex = /\/(\d+)/;
|
||||||
|
if (props.idInWhere) arrayData.store.filter.where = { id };
|
||||||
|
else if (!regex.test(props.url)) arrayData.store.url = `${props.url}/${id}`;
|
||||||
|
else arrayData.store.url = props.url.replace(regex, `/${id}`);
|
||||||
|
await arrayData.fetch({ append, updateRouter: false });
|
||||||
}
|
}
|
||||||
function hasRouteParam(params, valueToCheck = ':addressId') {
|
function hasRouteParam(params, valueToCheck = ':addressId') {
|
||||||
return Object.values(params).includes(valueToCheck);
|
return Object.values(params).includes(valueToCheck);
|
||||||
|
|
|
@ -10,7 +10,12 @@ const emit = defineEmits(['update:modelValue', 'update:options', 'remove']);
|
||||||
const $attrs = useAttrs();
|
const $attrs = useAttrs();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const { isRequired, requiredFieldRule } = useRequired($attrs);
|
const isRequired = computed(() => {
|
||||||
|
return useRequired($attrs).isRequired;
|
||||||
|
});
|
||||||
|
const requiredFieldRule = computed(() => {
|
||||||
|
return useRequired($attrs).requiredFieldRule;
|
||||||
|
});
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
|
|
|
@ -53,3 +53,8 @@ const manaCode = ref(props.manaCode);
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Promotion mana: Maná promoción
|
||||||
|
Claim mana: Maná reclamación
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -830,6 +830,8 @@ travel:
|
||||||
CloneTravelAndEntries: Clone travel and his entries
|
CloneTravelAndEntries: Clone travel and his entries
|
||||||
deleteTravel: Delete travel
|
deleteTravel: Delete travel
|
||||||
AddEntry: Add entry
|
AddEntry: Add entry
|
||||||
|
availabled: Availabled
|
||||||
|
availabledHour: Availabled hour
|
||||||
thermographs: Thermographs
|
thermographs: Thermographs
|
||||||
hb: HB
|
hb: HB
|
||||||
basicData:
|
basicData:
|
||||||
|
|
|
@ -917,6 +917,8 @@ travel:
|
||||||
deleteTravel: Eliminar envío
|
deleteTravel: Eliminar envío
|
||||||
AddEntry: Añadir entrada
|
AddEntry: Añadir entrada
|
||||||
thermographs: Termógrafos
|
thermographs: Termógrafos
|
||||||
|
availabled: F. Disponible
|
||||||
|
availabledHour: Hora Disponible
|
||||||
hb: HB
|
hb: HB
|
||||||
basicData:
|
basicData:
|
||||||
daysInForward: Desplazamiento automatico (redada)
|
daysInForward: Desplazamiento automatico (redada)
|
||||||
|
|
|
@ -232,7 +232,6 @@ const updateDateParams = (value, params) => {
|
||||||
:include="'category'"
|
:include="'category'"
|
||||||
:sortBy="'name ASC'"
|
:sortBy="'name ASC'"
|
||||||
dense
|
dense
|
||||||
@update:model-value="(data) => updateDateParams(data, params)"
|
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
@ -254,7 +253,6 @@ const updateDateParams = (value, params) => {
|
||||||
:fields="['id', 'name']"
|
:fields="['id', 'name']"
|
||||||
:sortBy="'name ASC'"
|
:sortBy="'name ASC'"
|
||||||
dense
|
dense
|
||||||
@update:model-value="(data) => updateDateParams(data, params)"
|
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-model="params.campaign"
|
v-model="params.campaign"
|
||||||
|
@ -303,12 +301,14 @@ en:
|
||||||
valentinesDay: Valentine's Day
|
valentinesDay: Valentine's Day
|
||||||
mothersDay: Mother's Day
|
mothersDay: Mother's Day
|
||||||
allSaints: All Saints' Day
|
allSaints: All Saints' Day
|
||||||
|
frenchMothersDay: Mother's Day in France
|
||||||
es:
|
es:
|
||||||
Enter a new search: Introduce una nueva búsqueda
|
Enter a new search: Introduce una nueva búsqueda
|
||||||
Group by items: Agrupar por artículos
|
Group by items: Agrupar por artículos
|
||||||
valentinesDay: Día de San Valentín
|
valentinesDay: Día de San Valentín
|
||||||
mothersDay: Día de la Madre
|
mothersDay: Día de la Madre
|
||||||
allSaints: Día de Todos los Santos
|
allSaints: Día de Todos los Santos
|
||||||
|
frenchMothersDay: (Francia) Día de la Madre
|
||||||
Campaign consumption: Consumo campaña
|
Campaign consumption: Consumo campaña
|
||||||
Campaign: Campaña
|
Campaign: Campaña
|
||||||
From: Desde
|
From: Desde
|
||||||
|
|
|
@ -47,7 +47,10 @@ const cancel = () => {
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="header">Mana: {{ toCurrency(mana) }}</div>
|
<div class="header">Mana: {{ toCurrency(mana) }}</div>
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md">
|
||||||
<slot />
|
<slot :popup="QPopupProxyRef" />
|
||||||
|
<div v-if="usesMana" class="column q-gutter-y-sm q-mt-sm">
|
||||||
|
<VnUsesMana :mana-code="manaCode" />
|
||||||
|
</div>
|
||||||
<div v-if="newPrice" class="column items-center q-mt-lg">
|
<div v-if="newPrice" class="column items-center q-mt-lg">
|
||||||
<span class="text-primary">{{ t('New price') }}</span>
|
<span class="text-primary">{{ t('New price') }}</span>
|
||||||
<span class="text-subtitle1">
|
<span class="text-subtitle1">
|
||||||
|
@ -56,9 +59,6 @@ const cancel = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="usesMana" class="column q-gutter-y-sm q-mt-sm">
|
|
||||||
<VnUsesMana :mana-code="manaCode" />
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<QBtn
|
<QBtn
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|
|
@ -133,7 +133,7 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('globals.amount'),
|
label: t('globals.amount'),
|
||||||
name: 'amount',
|
name: 'amount',
|
||||||
format: (row) => parseInt(row.amount * row.quantity),
|
format: (row) => toCurrency(getSaleTotal(row)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -331,8 +331,7 @@ const updateDiscount = async (sales, newDiscount = null) => {
|
||||||
};
|
};
|
||||||
await axios.post(`Tickets/${route.params.id}/updateDiscount`, params);
|
await axios.post(`Tickets/${route.params.id}/updateDiscount`, params);
|
||||||
notify('globals.dataSaved', 'positive');
|
notify('globals.dataSaved', 'positive');
|
||||||
for (let sale of sales) sale.discount = _newDiscount;
|
tableRef.value.reload();
|
||||||
edit.value = { ...DEFAULT_EDIT };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const getNewPrice = computed(() => {
|
const getNewPrice = computed(() => {
|
||||||
|
@ -789,21 +788,24 @@ watch(
|
||||||
:mana-code="manaCode"
|
:mana-code="manaCode"
|
||||||
@save="changeDiscount(row)"
|
@save="changeDiscount(row)"
|
||||||
>
|
>
|
||||||
<VnInput
|
<template #default="{ popup }">
|
||||||
v-model.number="edit.discount"
|
<VnInput
|
||||||
:label="t('ticketSale.discount')"
|
autofocus
|
||||||
type="number"
|
@keyup.enter="
|
||||||
/>
|
() => {
|
||||||
<div v-if="usesMana" class="column q-gutter-y-sm q-mt-sm">
|
changeDiscount(row);
|
||||||
<VnUsesMana :mana-code="manaCode" />
|
popup.hide();
|
||||||
</div>
|
}
|
||||||
|
"
|
||||||
|
v-model.number="edit.discount"
|
||||||
|
:label="t('ticketSale.discount')"
|
||||||
|
type="number"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
</TicketEditManaProxy>
|
</TicketEditManaProxy>
|
||||||
</template>
|
</template>
|
||||||
<span v-else>{{ toPercentage(row.discount / 100) }}</span>
|
<span v-else>{{ toPercentage(row.discount / 100) }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-amount="{ row }">
|
|
||||||
{{ toCurrency(row.quantity * row.price) }}
|
|
||||||
</template>
|
|
||||||
</VnTable>
|
</VnTable>
|
||||||
|
|
||||||
<QPageSticky :offset="[20, 20]" style="z-index: 2">
|
<QPageSticky :offset="[20, 20]" style="z-index: 2">
|
||||||
|
|
|
@ -9,6 +9,7 @@ import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
import VnInputTime from 'components/common/VnInputTime.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -53,7 +54,16 @@ const warehousesOptionsIn = ref([]);
|
||||||
<VnInputDate v-model="data.shipped" :label="t('globals.shipped')" />
|
<VnInputDate v-model="data.shipped" :label="t('globals.shipped')" />
|
||||||
<VnInputDate v-model="data.landed" :label="t('globals.landed')" />
|
<VnInputDate v-model="data.landed" :label="t('globals.landed')" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
<VnRow>
|
||||||
|
<VnInputDate
|
||||||
|
v-model="data.availabled"
|
||||||
|
:label="t('travel.summary.availabled')"
|
||||||
|
/>
|
||||||
|
<VnInputTime
|
||||||
|
v-model="data.availabled"
|
||||||
|
:label="t('travel.summary.availabledHour')"
|
||||||
|
/>
|
||||||
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('globals.warehouseOut')"
|
:label="t('globals.warehouseOut')"
|
||||||
|
@ -101,10 +111,3 @@ const warehousesOptionsIn = ref([]);
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
|
||||||
es:
|
|
||||||
raidDays: El travel se desplaza automáticamente cada día para estar desde hoy al número de días indicado. Si se deja vacio no se moverá
|
|
||||||
en:
|
|
||||||
raidDays: The travel adjusts itself daily to match the number of days set, starting from today. If left blank, it won’t move
|
|
||||||
</i18n>
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ export default {
|
||||||
'agencyModeFk',
|
'agencyModeFk',
|
||||||
'isRaid',
|
'isRaid',
|
||||||
'daysInForward',
|
'daysInForward',
|
||||||
|
'availabled',
|
||||||
],
|
],
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,6 +10,8 @@ import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue'
|
||||||
import FetchData from 'src/components/FetchData.vue';
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import { toDate, toCurrency, toCelsius } from 'src/filters';
|
import { toDate, toCurrency, toCelsius } from 'src/filters';
|
||||||
|
import { toDateTimeFormat } from 'src/filters/date.js';
|
||||||
|
import { dashIfEmpty } from 'src/filters';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import TravelDescriptorMenuItems from './TravelDescriptorMenuItems.vue';
|
import TravelDescriptorMenuItems from './TravelDescriptorMenuItems.vue';
|
||||||
|
|
||||||
|
@ -333,6 +335,12 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
||||||
<VnLv :label="t('globals.reference')" :value="travel.ref" />
|
<VnLv :label="t('globals.reference')" :value="travel.ref" />
|
||||||
<VnLv label="m³" :value="travel.m3" />
|
<VnLv label="m³" :value="travel.m3" />
|
||||||
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
|
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
|
||||||
|
<VnLv
|
||||||
|
:label="t('travel.summary.availabled')"
|
||||||
|
:value="
|
||||||
|
dashIfEmpty(toDateTimeFormat(travel.availabled))
|
||||||
|
"
|
||||||
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="full-width">
|
<QCard class="full-width">
|
||||||
<VnTitle :text="t('travel.summary.entries')" />
|
<VnTitle :text="t('travel.summary.entries')" />
|
||||||
|
|
|
@ -10,6 +10,9 @@ import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js';
|
||||||
import TravelFilter from './TravelFilter.vue';
|
import TravelFilter from './TravelFilter.vue';
|
||||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
import VnSection from 'src/components/common/VnSection.vue';
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
import VnInputTime from 'src/components/common/VnInputTime.vue';
|
||||||
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
|
import { toDateTimeFormat } from 'src/filters/date';
|
||||||
|
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -167,6 +170,17 @@ const columns = computed(() => [
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'availabled',
|
||||||
|
label: t('travel.summary.availabled'),
|
||||||
|
component: 'input',
|
||||||
|
columnClass: 'expand',
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
|
},
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(toDateTimeFormat(row.availabled)),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'right',
|
align: 'right',
|
||||||
label: '',
|
label: '',
|
||||||
|
@ -269,6 +283,16 @@ const columns = computed(() => [
|
||||||
:class="{ 'is-active': row.isReceived }"
|
:class="{ 'is-active': row.isReceived }"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<template #more-create-dialog="{ data }">
|
||||||
|
<VnInputDate
|
||||||
|
v-model="data.availabled"
|
||||||
|
:label="t('travel.summary.availabled')"
|
||||||
|
/>
|
||||||
|
<VnInputTime
|
||||||
|
v-model="data.availabled"
|
||||||
|
:label="t('travel.summary.availabledHour')"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<template #moreFilterPanel="{ params }">
|
<template #moreFilterPanel="{ params }">
|
||||||
<VnInputNumber
|
<VnInputNumber
|
||||||
:label="t('params.scopeDays')"
|
:label="t('params.scopeDays')"
|
||||||
|
|
|
@ -53,7 +53,7 @@ const showChangePasswordDialog = () => {
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem
|
<QItem
|
||||||
v-if="!worker.user.emailVerified && user.id == worker.id"
|
v-if="!worker.user.emailVerified && user.id != worker.id"
|
||||||
v-ripple
|
v-ripple
|
||||||
clickable
|
clickable
|
||||||
@click="showChangePasswordDialog"
|
@click="showChangePasswordDialog"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { computed, ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import FormModel from 'src/components/FormModel.vue';
|
import FormModel from 'src/components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
@ -9,33 +9,23 @@ import VnInputTime from 'src/components/common/VnInputTime.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const agencyFilter = {
|
|
||||||
fields: ['id', 'name'],
|
|
||||||
order: 'name ASC',
|
|
||||||
limit: 30,
|
|
||||||
};
|
|
||||||
const agencyOptions = ref([]);
|
|
||||||
const validAddresses = ref([]);
|
const validAddresses = ref([]);
|
||||||
|
const addresses = ref([]);
|
||||||
|
|
||||||
const filterWhere = computed(() => ({
|
const setFilteredAddresses = (data) => {
|
||||||
id: { inq: validAddresses.value.map((item) => item.addressFk) },
|
const validIds = new Set(validAddresses.value.map((item) => item.addressFk));
|
||||||
}));
|
addresses.value = data.filter((address) => validIds.has(address.id));
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
|
||||||
:filter="agencyFilter"
|
|
||||||
@on-fetch="(data) => (agencyOptions = data)"
|
|
||||||
auto-load
|
|
||||||
url="AgencyModes/isActive"
|
|
||||||
/>
|
|
||||||
<FetchData
|
<FetchData
|
||||||
url="RoadmapAddresses"
|
url="RoadmapAddresses"
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="(data) => (validAddresses = data)"
|
@on-fetch="(data) => (validAddresses = data)"
|
||||||
/>
|
/>
|
||||||
<FormModel :url="`Zones/${$route.params.id}`" auto-load data-key="Zone">
|
<FetchData url="Addresses" auto-load @on-fetch="setFilteredAddresses" />
|
||||||
|
<FormModel auto-load model="zone">
|
||||||
<template #form="{ data, validate }">
|
<template #form="{ data, validate }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
|
@ -45,7 +35,6 @@ const filterWhere = computed(() => ({
|
||||||
v-model="data.name"
|
v-model="data.name"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-model="data.agencyModeFk"
|
v-model="data.agencyModeFk"
|
||||||
|
@ -128,7 +117,7 @@ const filterWhere = computed(() => ({
|
||||||
v-model="data.addressFk"
|
v-model="data.addressFk"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="nickname"
|
option-label="nickname"
|
||||||
url="Addresses"
|
:options="addresses"
|
||||||
:fields="['id', 'nickname']"
|
:fields="['id', 'nickname']"
|
||||||
sort-by="id"
|
sort-by="id"
|
||||||
hide-selected
|
hide-selected
|
||||||
|
|
|
@ -45,7 +45,6 @@ describe('OrderCatalog', () => {
|
||||||
).type('{enter}');
|
).type('{enter}');
|
||||||
cy.get(':nth-child(1) > [data-cy="catalogFilterCategory"]').click();
|
cy.get(':nth-child(1) > [data-cy="catalogFilterCategory"]').click();
|
||||||
cy.dataCy('catalogFilterValueDialogBtn').last().click();
|
cy.dataCy('catalogFilterValueDialogBtn').last().click();
|
||||||
cy.get('[data-cy="catalogFilterValueDialogTagSelect"]').click();
|
|
||||||
cy.selectOption("[data-cy='catalogFilterValueDialogTagSelect']", 'Tallos');
|
cy.selectOption("[data-cy='catalogFilterValueDialogTagSelect']", 'Tallos');
|
||||||
cy.dataCy('catalogFilterValueDialogValueInput').find('input').focus();
|
cy.dataCy('catalogFilterValueDialogValueInput').find('input').focus();
|
||||||
cy.dataCy('catalogFilterValueDialogValueInput').find('input').type('2');
|
cy.dataCy('catalogFilterValueDialogValueInput').find('input').type('2');
|
||||||
|
|
|
@ -8,11 +8,9 @@ describe('EntryMy when is supplier', () => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open buyLabel when is supplier', () => {
|
it('should open buyLabel when is supplier', () => {
|
||||||
cy.get(
|
cy.dataCy('cardBtn').eq(2).click();
|
||||||
'[to="/null/3"] > .q-card > :nth-child(2) > .q-btn > .q-btn__content > .q-icon'
|
|
||||||
).click();
|
|
||||||
cy.dataCy('printLabelsBtn').click();
|
cy.dataCy('printLabelsBtn').click();
|
||||||
cy.window().its('open').should('be.called');
|
cy.window().its('open').should('be.called');
|
||||||
});
|
});
|
||||||
|
|
|
@ -36,7 +36,7 @@ describe('InvoiceInVat', () => {
|
||||||
cy.get(dialogInputs).eq(0).type(randomInt);
|
cy.get(dialogInputs).eq(0).type(randomInt);
|
||||||
cy.get(dialogInputs).eq(1).type('This is a dummy expense');
|
cy.get(dialogInputs).eq(1).type('This is a dummy expense');
|
||||||
|
|
||||||
cy.get('button[type="submit"]').click();
|
cy.get('[data-cy="FormModelPopup_save"]').click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data created');
|
cy.get('.q-notification__message').should('have.text', 'Data created');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue