0
0
Fork 0

Merge branch 'dev' into 7717_fixOrderCatalog

This commit is contained in:
Jon Elias 2024-07-26 12:11:18 +00:00
commit 356e7768b7
99 changed files with 415 additions and 370 deletions

View File

@ -1,28 +1,11 @@
import { getCurrentInstance } from 'vue'; import { getCurrentInstance } from 'vue';
const filterAvailableInput = (element) => {
return element.classList.contains('q-field__native') && !element.disabled;
};
const filterAvailableText = (element) => {
return (
element.__vueParentComponent.type.name === 'QInput' &&
element.__vueParentComponent?.attrs?.class !== 'vn-input-date'
);
};
export default { export default {
mounted: function () { mounted: function () {
const vm = getCurrentInstance(); const vm = getCurrentInstance();
if (vm.type.name === 'QForm') { if (vm.type.name === 'QForm') {
if (!['searchbarForm', 'filterPanelForm'].includes(this.$el?.id)) { if (!['searchbarForm', 'filterPanelForm'].includes(this.$el?.id)) {
// AUTOFOCUS // TODO: AUTOFOCUS IS NOT FOCUSING
const elementsArray = Array.from(this.$el.elements);
const availableInputs = elementsArray.filter(filterAvailableInput);
const firstInputElement = availableInputs.find(filterAvailableText);
if (firstInputElement) {
firstInputElement.focus();
}
const that = this; const that = this;
this.$el.addEventListener('keyup', function (evt) { this.$el.addEventListener('keyup', function (evt) {
if (evt.key === 'Enter') { if (evt.key === 'Enter') {

View File

@ -52,7 +52,7 @@ onMounted(async () => {
@on-data-saved="onDataSaved" @on-data-saved="onDataSaved"
> >
<template #form-inputs="{ data, validate }"> <template #form-inputs="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('name')" :label="t('name')"
v-model="data.name" v-model="data.name"
@ -67,7 +67,7 @@ onMounted(async () => {
:rules="validate('bankEntity.bic')" :rules="validate('bankEntity.bic')"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('country')" :label="t('country')"

View File

@ -59,7 +59,7 @@ const onDataSaved = async (formData, requestResponse) => {
<QIcon name="warning" class="fill-icon q-mr-sm" size="md" /> <QIcon name="warning" class="fill-icon q-mr-sm" size="md" />
{{ t('Invoicing in progress...') }} {{ t('Invoicing in progress...') }}
</span> </span>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Ticket')" :label="t('Ticket')"
:options="ticketsOptions" :options="ticketsOptions"
@ -99,7 +99,7 @@ const onDataSaved = async (formData, requestResponse) => {
/> />
<VnInputDate :label="t('Max date')" v-model="data.maxShipped" /> <VnInputDate :label="t('Max date')" v-model="data.maxShipped" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Serial')" :label="t('Serial')"
:options="invoiceOutSerialsOptions" :options="invoiceOutSerialsOptions"
@ -117,7 +117,7 @@ const onDataSaved = async (formData, requestResponse) => {
v-model="data.taxArea" v-model="data.taxArea"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('Reference')" :label="t('Reference')"
type="textarea" type="textarea"

View File

@ -39,7 +39,7 @@ const onDataSaved = (dataSaved) => {
@on-data-saved="onDataSaved($event)" @on-data-saved="onDataSaved($event)"
> >
<template #form-inputs="{ data, validate }"> <template #form-inputs="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('Name')" :label="t('Name')"
v-model="data.name" v-model="data.name"

View File

@ -91,7 +91,7 @@ const onProvinceCreated = async ({ name }, formData) => {
@on-data-saved="onDataSaved" @on-data-saved="onDataSaved"
> >
<template #form-inputs="{ data, validate }"> <template #form-inputs="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('Postcode')" :label="t('Postcode')"
v-model="data.code" v-model="data.code"

View File

@ -39,7 +39,7 @@ const onDataSaved = (dataSaved) => {
@on-data-saved="onDataSaved($event)" @on-data-saved="onDataSaved($event)"
> >
<template #form-inputs="{ data, validate }"> <template #form-inputs="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('Name')" :label="t('Name')"
v-model="data.name" v-model="data.name"

View File

@ -53,7 +53,7 @@ const onDataSaved = (dataSaved) => {
@on-data-saved="onDataSaved($event)" @on-data-saved="onDataSaved($event)"
> >
<template #form-inputs="{ data, validate }"> <template #form-inputs="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('Identifier')" :label="t('Identifier')"
v-model="data.thermographId" v-model="data.thermographId"

View File

@ -245,14 +245,14 @@ const makeRequest = async () => {
</div> </div>
<div class="column"> <div class="column">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QOptionGroup <QOptionGroup
:options="uploadMethodsOptions" :options="uploadMethodsOptions"
type="radio" type="radio"
v-model="uploadMethodSelected" v-model="uploadMethodSelected"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QFile <QFile
v-if="uploadMethodSelected === 'computer'" v-if="uploadMethodSelected === 'computer'"
ref="inputFileRef" ref="inputFileRef"
@ -287,7 +287,7 @@ const makeRequest = async () => {
placeholder="https://" placeholder="https://"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Orientation')" :label="t('Orientation')"
:options="viewportTypes" :options="viewportTypes"

View File

@ -82,7 +82,7 @@ const closeForm = () => {
<span class="title">{{ t('Edit') }}</span> <span class="title">{{ t('Edit') }}</span>
<span class="countLines">{{ ` ${rows.length} ` }}</span> <span class="countLines">{{ ` ${rows.length} ` }}</span>
<span class="title">{{ t('buy(s)') }}</span> <span class="title">{{ t('buy(s)') }}</span>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Field to edit')" :label="t('Field to edit')"
:options="fieldsOptions" :options="fieldsOptions"

View File

@ -151,7 +151,7 @@ const selectItem = ({ id }) => {
<QIcon name="close" size="sm" /> <QIcon name="close" size="sm" />
</span> </span>
<h1 class="title">{{ t('Filter item') }}</h1> <h1 class="title">{{ t('Filter item') }}</h1>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput :label="t('entry.buys.name')" v-model="itemFilterParams.name" /> <VnInput :label="t('entry.buys.name')" v-model="itemFilterParams.name" />
<VnInput :label="t('entry.buys.size')" v-model="itemFilterParams.size" /> <VnInput :label="t('entry.buys.size')" v-model="itemFilterParams.size" />
<VnSelect <VnSelect

View File

@ -144,7 +144,7 @@ const selectTravel = ({ id }) => {
<QIcon name="close" size="sm" /> <QIcon name="close" size="sm" />
</span> </span>
<h1 class="title">{{ t('Filter travels') }}</h1> <h1 class="title">{{ t('Filter travels') }}</h1>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('entry.basicData.agency')" :label="t('entry.basicData.agency')"
:options="agenciesOptions" :options="agenciesOptions"

View File

@ -15,7 +15,7 @@ const props = defineProps({
default: null, default: null,
}, },
warehouseFk: { warehouseFk: {
type: Boolean, type: Number,
default: null, default: null,
}, },
}); });
@ -23,7 +23,7 @@ const props = defineProps({
const { t } = useI18n(); const { t } = useI18n();
const regularizeFormData = reactive({ const regularizeFormData = reactive({
itemFk: props.itemFk, itemFk: Number(props.itemFk),
warehouseFk: props.warehouseFk, warehouseFk: props.warehouseFk,
quantity: null, quantity: null,
}); });
@ -49,18 +49,19 @@ const onDataSaved = (data) => {
@on-data-saved="onDataSaved($event)" @on-data-saved="onDataSaved($event)"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput <QInput
:label="t('Type the visible quantity')" :label="t('Type the visible quantity')"
v-model.number="data.quantity" v-model.number="data.quantity"
type="number"
autofocus autofocus
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('Warehouse')" :label="t('Warehouse')"
v-model="data.warehouseFk" v-model.number="data.warehouseFk"
:options="warehousesOptions" :options="warehousesOptions"
option-value="id" option-value="id"
option-label="name" option-label="name"

View File

@ -118,13 +118,13 @@ const makeInvoice = async () => {
/> />
<QDialog ref="dialogRef"> <QDialog ref="dialogRef">
<FormPopup <FormPopup
@on-submit="makeInvoice()" @on-submit="makeInvoice()"
:title="t('Transfer invoice')" :title="t('Transfer invoice')"
:custom-submit-button-label="t('Transfer client')" :custom-submit-button-label="t('Transfer client')"
:default-cancel-button="false" :default-cancel-button="false"
> >
<template #form-inputs> <template #form-inputs>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Client')" :label="t('Client')"
:options="clientsOptions" :options="clientsOptions"
@ -160,7 +160,7 @@ const makeInvoice = async () => {
:required="true" :required="true"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Class')" :label="t('Class')"
:options="siiTypeInvoiceOutsOptions" :options="siiTypeInvoiceOutsOptions"
@ -191,9 +191,12 @@ const makeInvoice = async () => {
:required="true" :required="true"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div> <div>
<QCheckbox :label="t('Bill destination client')" v-model="checked" /> <QCheckbox
:label="t('Bill destination client')"
v-model="checked"
/>
<QIcon name="info" class="cursor-info q-ml-sm" size="sm"> <QIcon name="info" class="cursor-info q-ml-sm" size="sm">
<QTooltip>{{ t('transferInvoiceInfo') }}</QTooltip> <QTooltip>{{ t('transferInvoiceInfo') }}</QTooltip>
</QIcon> </QIcon>

View File

@ -45,7 +45,7 @@ const defaultAttrs = {
}; };
const forceAttrs = { const forceAttrs = {
label: $props.showTitle ? '' : $props.column.label, label: $props.showTitle ? '' : columnFilter.value?.label ?? $props.column.label,
}; };
const selectComponent = { const selectComponent = {

View File

@ -313,11 +313,6 @@ defineExpose({
:params="params" :params="params"
:columns="splittedColumns.columns" :columns="splittedColumns.columns"
/> />
<slot
name="moreFilterPanel"
:params="params"
:columns="splittedColumns.columns"
/>
</template> </template>
</VnFilterPanel> </VnFilterPanel>
</QScrollArea> </QScrollArea>

View File

@ -81,7 +81,7 @@ async function fetchViewConfigData() {
return; return;
} }
} catch (err) { } catch (err) {
console.err('Error fetching config view data', err); console.error('Error fetching config view data', err);
} }
} }

View File

@ -84,7 +84,7 @@ const fetchViewConfigData = async () => {
setUserConfigViewData(defaultColumns); setUserConfigViewData(defaultColumns);
} }
} catch (err) { } catch (err) {
console.err('Error fetching config view data', err); console.error('Error fetching config view data', err);
} }
}; };

View File

@ -3,26 +3,19 @@ defineProps({ wrap: { type: Boolean, default: false } });
</script> </script>
<template> <template>
<div class="vn-row q-gutter-md q-mb-md" :class="{ wrap }"> <div class="vn-row q-gutter-md q-mb-md" :class="{ wrap }">
<slot /> <slot></slot>
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scopped>
.vn-row { .vn-row {
display: flex; display: flex;
&.wrap { > * {
flex-wrap: wrap; flex: 1;
}
&:not(.wrap) {
> :slotted(*) {
flex: 1;
}
} }
} }
@media screen and (max-width: 800px) { @media screen and (max-width: 800px) {
.vn-row { .vn-row {
&:not(.wrap) { flex-direction: column;
flex-direction: column;
}
} }
} }
</style> </style>

View File

@ -209,27 +209,29 @@ input::-webkit-inner-spin-button {
max-width: 100%; max-width: 100%;
} }
/* ===== Scrollbar CSS ===== / .q-table__container {
/ Firefox */ /* ===== Scrollbar CSS ===== /
/ Firefox */
* { * {
scrollbar-width: auto; scrollbar-width: auto;
scrollbar-color: var(--vn-label-color) transparent; scrollbar-color: var(--vn-label-color) transparent;
} }
/* Chrome, Edge, and Safari */ /* Chrome, Edge, and Safari */
*::-webkit-scrollbar { *::-webkit-scrollbar {
width: 10px; width: 10px;
height: 10px; height: 10px;
} }
*::-webkit-scrollbar-thumb { *::-webkit-scrollbar-thumb {
background-color: var(--vn-label-color); background-color: var(--vn-label-color);
border-radius: 10px; border-radius: 10px;
} }
*::-webkit-scrollbar-track { *::-webkit-scrollbar-track {
background: transparent; background: transparent;
}
} }
.q-table { .q-table {

View File

@ -34,12 +34,12 @@ const onDataSaved = ({ id }) => {
@on-data-saved="onDataSaved" @on-data-saved="onDataSaved"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput v-model="data.alias" :label="t('mailAlias.name')" /> <VnInput v-model="data.alias" :label="t('mailAlias.name')" />
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput <VnInput
v-model="data.description" v-model="data.description"

View File

@ -33,7 +33,7 @@ const aliasOptions = ref([]);
@on-submit="emit('onSubmitCreateAlias', aliasFormData)" @on-submit="emit('onSubmitCreateAlias', aliasFormData)"
> >
<template #form-inputs> <template #form-inputs>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('account.card.alias')" :label="t('account.card.alias')"

View File

@ -10,12 +10,12 @@ const { t } = useI18n();
<template> <template>
<FormModel :url="`VnRoles/${route.params.id}`" model="VnRole" auto-load> <FormModel :url="`VnRoles/${route.params.id}`" model="VnRole" auto-load>
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput v-model="data.name" :label="t('role.card.name')" /> <VnInput v-model="data.name" :label="t('role.card.name')" />
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput <VnInput
v-model="data.description" v-model="data.description"
@ -23,7 +23,7 @@ const { t } = useI18n();
/> />
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<QCheckbox :label="t('mailAlias.isPublic')" v-model="data.isPublic" /> <QCheckbox :label="t('mailAlias.isPublic')" v-model="data.isPublic" />
</div> </div>

View File

@ -21,12 +21,12 @@ const { t } = useI18n();
" "
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput v-model="data.name" :label="t('role.card.name')" /> <VnInput v-model="data.name" :label="t('role.card.name')" />
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput <VnInput
v-model="data.description" v-model="data.description"

View File

@ -33,7 +33,7 @@ const rolesOptions = ref([]);
@on-submit="emit('onSubmitCreateSubrole', subRoleFormData)" @on-submit="emit('onSubmitCreateSubrole', subRoleFormData)"
> >
<template #form-inputs> <template #form-inputs>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('account.card.role')" :label="t('account.card.role')"

View File

@ -74,7 +74,7 @@ const statesFilter = {
:reload="true" :reload="true"
> >
<template #form="{ data, validate, filter }"> <template #form="{ data, validate, filter }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.client.name" v-model="data.client.name"
:label="t('claim.customer')" :label="t('claim.customer')"
@ -82,7 +82,7 @@ const statesFilter = {
/> />
<VnInputDate v-model="data.created" :label="t('claim.created')" /> <VnInputDate v-model="data.created" :label="t('claim.created')" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('claim.assignedTo')" :label="t('claim.assignedTo')"
v-model="data.workerFk" v-model="data.workerFk"
@ -120,7 +120,7 @@ const statesFilter = {
> >
</QSelect> </QSelect>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput <QInput
v-model.number="data.packages" v-model.number="data.packages"
:label="t('globals.packages')" :label="t('globals.packages')"

View File

@ -67,7 +67,7 @@ const filterOptions = {
<FormModel :url="`Clients/${route.params.id}`" auto-load model="customer"> <FormModel :url="`Clients/${route.params.id}`" auto-load model="customer">
<template #form="{ data, validate, filter }"> <template #form="{ data, validate, filter }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('globals.name')" :label="t('globals.name')"
:rules="validate('client.socialName')" :rules="validate('client.socialName')"
@ -88,7 +88,7 @@ const filterOptions = {
v-model="data.businessTypeFk" v-model="data.businessTypeFk"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('customer.basicData.contact')" :label="t('customer.basicData.contact')"
:rules="validate('client.contact')" :rules="validate('client.contact')"
@ -111,7 +111,7 @@ const filterOptions = {
</template> </template>
</VnInput> </VnInput>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('customer.basicData.phone')" :label="t('customer.basicData.phone')"
:rules="validate('client.phone')" :rules="validate('client.phone')"
@ -125,7 +125,7 @@ const filterOptions = {
v-model="data.mobile" v-model="data.mobile"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QSelect <QSelect
:input-debounce="0" :input-debounce="0"
:label="t('customer.basicData.salesPerson')" :label="t('customer.basicData.salesPerson')"
@ -162,7 +162,7 @@ const filterOptions = {
:input-debounce="0" :input-debounce="0"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QSelect <QSelect
:input-debounce="0" :input-debounce="0"
:label="t('customer.basicData.previousClient')" :label="t('customer.basicData.previousClient')"

View File

@ -47,7 +47,7 @@ const getBankEntities = (data, formData) => {
model="customer" model="customer"
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Billing data')" :label="t('Billing data')"
:options="payMethods" :options="payMethods"
@ -59,7 +59,7 @@ const getBankEntities = (data, formData) => {
<VnInput :label="t('Due day')" clearable v-model="data.dueDay" /> <VnInput :label="t('Due day')" clearable v-model="data.dueDay" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput :label="t('IBAN')" clearable v-model="data.iban"> <VnInput :label="t('IBAN')" clearable v-model="data.iban">
<template #append> <template #append>
<QIcon name="info" class="cursor-info"> <QIcon name="info" class="cursor-info">
@ -94,7 +94,7 @@ const getBankEntities = (data, formData) => {
</VnSelectDialog> </VnSelectDialog>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox :label="t('Received LCR')" v-model="data.hasLcr" /> <QCheckbox :label="t('Received LCR')" v-model="data.hasLcr" />
<QCheckbox :label="t('VNL core received')" v-model="data.hasCoreVnl" /> <QCheckbox :label="t('VNL core received')" v-model="data.hasCoreVnl" />
<QCheckbox :label="t('VNL B2B received')" v-model="data.hasSepaVnl" /> <QCheckbox :label="t('VNL B2B received')" v-model="data.hasSepaVnl" />

View File

@ -88,7 +88,7 @@ watch(
:url-create="`Clients/${route.params.id}/setRating`" :url-create="`Clients/${route.params.id}/setRating`"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput <VnInput
:label="t('Rating')" :label="t('Rating')"

View File

@ -40,7 +40,7 @@ function handleLocation(data, location) {
model="customer" model="customer"
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('Social name')" :label="t('Social name')"
:required="true" :required="true"
@ -57,11 +57,11 @@ function handleLocation(data, location) {
<VnInput :label="t('Tax number')" clearable v-model="data.fi" /> <VnInput :label="t('Tax number')" clearable v-model="data.fi" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput :label="t('Street')" clearable v-model="data.street" /> <VnInput :label="t('Street')" clearable v-model="data.street" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Sage tax type')" :label="t('Sage tax type')"
:options="typesTaxes" :options="typesTaxes"
@ -91,7 +91,7 @@ function handleLocation(data, location) {
</VnSelect> </VnSelect>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnLocation <VnLocation
:rules="validate('Worker.postcode')" :rules="validate('Worker.postcode')"
:roles-allowed-to-create="['deliveryAssistant']" :roles-allowed-to-create="['deliveryAssistant']"

View File

@ -134,7 +134,7 @@ watch(
<div class="full-width flex justify-center"> <div class="full-width flex justify-center">
<QCard class="card-width q-pa-lg"> <QCard class="card-width q-pa-lg">
<QForm> <QForm>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<QCheckbox :label="t('Unpaid client')" v-model="unpaidClient" /> <QCheckbox :label="t('Unpaid client')" v-model="unpaidClient" />
</div> </div>

View File

@ -48,7 +48,7 @@ function handleLocation(data, location) {
url-create="Clients/createWithUser" url-create="Clients/createWithUser"
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput :label="t('Comercial name')" v-model="data.name" /> <QInput :label="t('Comercial name')" v-model="data.name" />
<VnSelect <VnSelect
:label="t('Salesperson')" :label="t('Salesperson')"
@ -59,7 +59,7 @@ function handleLocation(data, location) {
v-model="data.salesPersonFk" v-model="data.salesPersonFk"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Business type')" :label="t('Business type')"
:options="businessTypesOptions" :options="businessTypesOptions"
@ -70,21 +70,21 @@ function handleLocation(data, location) {
/> />
<QInput v-model="data.fi" :label="t('Tax number')" /> <QInput v-model="data.fi" :label="t('Tax number')" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput <QInput
:label="t('Business name')" :label="t('Business name')"
:rules="validate('client.socialName')" :rules="validate('client.socialName')"
v-model="data.socialName" v-model="data.socialName"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput <QInput
:label="t('Street')" :label="t('Street')"
:rules="validate('client.street')" :rules="validate('client.street')"
v-model="data.street" v-model="data.street"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnLocation <VnLocation
:rules="validate('Worker.postcode')" :rules="validate('Worker.postcode')"
:roles-allowed-to-create="['deliveryAssistant']" :roles-allowed-to-create="['deliveryAssistant']"
@ -95,7 +95,7 @@ function handleLocation(data, location) {
</VnLocation> </VnLocation>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput v-model="data.userName" :label="t('Web user')" /> <QInput v-model="data.userName" :label="t('Web user')" />
<QInput <QInput
:label="t('Email')" :label="t('Email')"

View File

@ -60,7 +60,7 @@ const onSubmit = async () => {
}) })
}} }}
</div> </div>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput <QInput
:label="t('Message')" :label="t('Message')"
type="textarea" type="textarea"

View File

@ -99,7 +99,7 @@ onMounted(async () => {
<QPopupProxy ref="popupProxyRef"> <QPopupProxy ref="popupProxyRef">
<QCard class="column q-pa-md"> <QCard class="column q-pa-md">
<span class="text-body1 q-mb-sm">{{ t('Campaign consumption') }}</span> <span class="text-body1 q-mb-sm">{{ t('Campaign consumption') }}</span>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:options="moreFields" :options="moreFields"
option-value="code" option-value="code"
@ -109,7 +109,7 @@ onMounted(async () => {
@update:model-value="campaignChange" @update:model-value="campaignChange"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInputDate v-model="campaignParams.from" :label="t('From')" /> <VnInputDate v-model="campaignParams.from" :label="t('From')" />
<VnInputDate v-model="campaignParams.to" :label="t('To')" /> <VnInputDate v-model="campaignParams.to" :label="t('To')" />
</VnRow> </VnRow>

View File

@ -85,7 +85,7 @@ function handleLocation(data, location) {
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<QCheckbox :label="t('Default')" v-model="data.isDefaultAddress" /> <QCheckbox :label="t('Default')" v-model="data.isDefaultAddress" />
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput :label="t('Consignee')" clearable v-model="data.nickname" /> <VnInput :label="t('Consignee')" clearable v-model="data.nickname" />
<VnInput :label="t('Street address')" clearable v-model="data.street" /> <VnInput :label="t('Street address')" clearable v-model="data.street" />
@ -119,7 +119,7 @@ function handleLocation(data, location) {
/> />
</div> </div>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Incoterms')" :label="t('Incoterms')"
:options="incoterms" :options="incoterms"

View File

@ -146,7 +146,7 @@ function handleLocation(data, location) {
</template> </template>
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<QCheckbox :label="t('Enabled')" v-model="data.isActive" /> <QCheckbox :label="t('Enabled')" v-model="data.isActive" />
</div> </div>
@ -164,7 +164,7 @@ function handleLocation(data, location) {
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput :label="t('Consignee')" clearable v-model="data.nickname" /> <VnInput :label="t('Consignee')" clearable v-model="data.nickname" />
</div> </div>
@ -173,7 +173,7 @@ function handleLocation(data, location) {
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnLocation <VnLocation
:rules="validate('Worker.postcode')" :rules="validate('Worker.postcode')"
@ -185,7 +185,7 @@ function handleLocation(data, location) {
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('Agency')" :label="t('Agency')"
@ -204,7 +204,7 @@ function handleLocation(data, location) {
<VnInput :label="t('Mobile')" clearable v-model="data.mobile" /> <VnInput :label="t('Mobile')" clearable v-model="data.mobile" />
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('Incoterms')" :label="t('Incoterms')"

View File

@ -39,7 +39,7 @@ const toCustomerCreditContracts = () => {
</template> </template>
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput <VnInput
:label="t('Credit')" :label="t('Credit')"

View File

@ -143,7 +143,7 @@ const toCustomerFileManagement = () => {
<QCard class="q-pa-lg"> <QCard class="q-pa-lg">
<QCardSection> <QCardSection>
<QForm> <QForm>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput <VnInput
:label="t('Reference')" :label="t('Reference')"
@ -163,7 +163,7 @@ const toCustomerFileManagement = () => {
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('Warehouse')" :label="t('Warehouse')"
@ -184,7 +184,7 @@ const toCustomerFileManagement = () => {
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput <VnInput
:label="t('Description')" :label="t('Description')"
@ -196,7 +196,7 @@ const toCustomerFileManagement = () => {
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<QFile <QFile
ref="inputFileRef" ref="inputFileRef"

View File

@ -119,7 +119,7 @@ const toCustomerFileManagement = () => {
<QCard class="q-pa-lg"> <QCard class="q-pa-lg">
<QCardSection> <QCardSection>
<QForm> <QForm>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput <VnInput
:label="t('Reference')" :label="t('Reference')"
@ -139,7 +139,7 @@ const toCustomerFileManagement = () => {
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('Warehouse')" :label="t('Warehouse')"
@ -160,7 +160,7 @@ const toCustomerFileManagement = () => {
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput <VnInput
:label="t('Description')" :label="t('Description')"
@ -172,7 +172,7 @@ const toCustomerFileManagement = () => {
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<QFile <QFile
ref="inputFileRef" ref="inputFileRef"

View File

@ -55,7 +55,7 @@ const toCustomerGreuges = () => {
</template> </template>
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('Amount')" :label="t('Amount')"
clearable clearable
@ -65,7 +65,7 @@ const toCustomerGreuges = () => {
<VnInputDate :label="t('Date')" v-model="data.shipped" /> <VnInputDate :label="t('Date')" v-model="data.shipped" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput :label="t('Comment')" clearable v-model="data.description" /> <VnInput :label="t('Comment')" clearable v-model="data.description" />
<VnSelect <VnSelect
:label="t('Type')" :label="t('Type')"

View File

@ -22,7 +22,7 @@ const onDataSaved = (dataSaved) => {
url-create="CustomsAgents" url-create="CustomsAgents"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('NIF')" :label="t('NIF')"
:required="true" :required="true"
@ -36,7 +36,7 @@ const onDataSaved = (dataSaved) => {
v-model="data.fiscalName" v-model="data.fiscalName"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput :label="t('Street')" clearable v-model="data.street" /> <VnInput :label="t('Street')" clearable v-model="data.street" />
<VnInput :label="t('Phone')" clearable v-model="data.phone" /> <VnInput :label="t('Phone')" clearable v-model="data.phone" />
</VnRow> </VnRow>

View File

@ -136,7 +136,7 @@ const onDataSaved = async () => {
<h5 class="q-mt-none">{{ t('New payment') }}</h5> <h5 class="q-mt-none">{{ t('New payment') }}</h5>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInputDate <VnInputDate
:label="t('Date')" :label="t('Date')"
:required="true" :required="true"
@ -154,7 +154,7 @@ const onDataSaved = async () => {
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Bank')" :label="t('Bank')"
:options="bankOptions" :options="bankOptions"
@ -189,7 +189,7 @@ const onDataSaved = async () => {
{{ t('Compensation') }} {{ t('Compensation') }}
</div> </div>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col" v-if="data.bankFk === 3 || data.bankFk === 3117"> <div class="col" v-if="data.bankFk === 3 || data.bankFk === 3117">
<VnInput <VnInput
:label="t('Compensation account')" :label="t('Compensation account')"
@ -208,7 +208,7 @@ const onDataSaved = async () => {
<div class="q-mt-lg" v-if="data.bankFk === 2"> <div class="q-mt-lg" v-if="data.bankFk === 2">
<div class="text-h6">{{ t('Cash') }}</div> <div class="text-h6">{{ t('Cash') }}</div>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('Delivered amount')" :label="t('Delivered amount')"
@update:model-value="calculateFromDeliveredAmount($event)" @update:model-value="calculateFromDeliveredAmount($event)"
@ -225,7 +225,7 @@ const onDataSaved = async () => {
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox v-model="viewRecipt" /> <QCheckbox v-model="viewRecipt" />
<QCheckbox v-model="sendEmail" /> <QCheckbox v-model="sendEmail" />
</VnRow> </VnRow>

View File

@ -44,7 +44,7 @@ const toCustomerNotes = () => {
</template> </template>
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput :label="t('Note')" type="textarea" v-model="data.text" /> <QInput :label="t('Note')" type="textarea" v-model="data.text" />
</VnRow> </VnRow>
</template> </template>

View File

@ -49,12 +49,12 @@ const toCustomerRecoveries = () => {
</template> </template>
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInputDate :label="t('Since')" v-model="data.started" /> <VnInputDate :label="t('Since')" v-model="data.started" />
<VnInputDate :label="t('To')" v-model="data.finished" /> <VnInputDate :label="t('To')" v-model="data.finished" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('Amount')" :label="t('Amount')"
clearable clearable

View File

@ -264,7 +264,7 @@ const toCustomerSamples = () => {
/> />
</div> </div>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput <VnInput
:label="t('Recipient')" :label="t('Recipient')"

View File

@ -29,7 +29,7 @@ const clientsOptions = ref([]);
class="full-width" class="full-width"
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('department.name')" :label="t('department.name')"
v-model="data.name" v-model="data.name"
@ -44,7 +44,7 @@ const clientsOptions = ref([]);
clearable clearable
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('department.chat')" :label="t('department.chat')"
v-model="data.chatName" v-model="data.chatName"
@ -58,7 +58,7 @@ const clientsOptions = ref([]);
clearable clearable
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('department.bossDepartment')" :label="t('department.bossDepartment')"
v-model="data.workerFk" v-model="data.workerFk"
@ -80,7 +80,7 @@ const clientsOptions = ref([]);
:rules="validate('department.clientFk')" :rules="validate('department.clientFk')"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox <QCheckbox
:label="t('department.telework')" :label="t('department.telework')"
v-model="data.isTeleworking" v-model="data.isTeleworking"
@ -92,7 +92,7 @@ const clientsOptions = ref([]);
:true-value="1" :true-value="1"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox <QCheckbox
:label="t('department.worksInProduction')" :label="t('department.worksInProduction')"
v-model="data.isProduction" v-model="data.isProduction"
@ -102,7 +102,7 @@ const clientsOptions = ref([]);
v-model="data.hasToRefill" v-model="data.hasToRefill"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox <QCheckbox
:label="t('department.hasToSendMail')" :label="t('department.hasToSendMail')"
v-model="data.hasToSendMail" v-model="data.hasToSendMail"

View File

@ -67,7 +67,7 @@ const onFilterTravelSelected = (formData, id) => {
:clear-store-on-unmount="false" :clear-store-on-unmount="false"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('entry.basicData.supplier')" :label="t('entry.basicData.supplier')"
v-model="data.supplierFk" v-model="data.supplierFk"
@ -121,13 +121,13 @@ const onFilterTravelSelected = (formData, id) => {
</template> </template>
</VnSelectDialog> </VnSelectDialog>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.reference" v-model="data.reference"
:label="t('entry.basicData.reference')" :label="t('entry.basicData.reference')"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.invoiceNumber" v-model="data.invoiceNumber"
:label="t('entry.basicData.invoiceNumber')" :label="t('entry.basicData.invoiceNumber')"
@ -143,7 +143,7 @@ const onFilterTravelSelected = (formData, id) => {
:required="true" :required="true"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('entry.basicData.currency')" :label="t('entry.basicData.currency')"
v-model="data.currencyFk" v-model="data.currencyFk"
@ -159,7 +159,7 @@ const onFilterTravelSelected = (formData, id) => {
min="0" min="0"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput <QInput
:label="t('entry.basicData.observation')" :label="t('entry.basicData.observation')"
type="textarea" type="textarea"
@ -169,7 +169,7 @@ const onFilterTravelSelected = (formData, id) => {
fill-input fill-input
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox <QCheckbox
v-model="data.isOrdered" v-model="data.isOrdered"
:label="t('entry.basicData.ordered')" :label="t('entry.basicData.ordered')"

View File

@ -197,7 +197,7 @@ const redirectToBuysView = () => {
</div> </div>
</Teleport> </Teleport>
<QCard class="q-pa-lg"> <QCard class="q-pa-lg">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QFile <QFile
ref="inputFileRef" ref="inputFileRef"
:label="t('entry.buys.file')" :label="t('entry.buys.file')"
@ -219,13 +219,13 @@ const redirectToBuysView = () => {
</QFile> </QFile>
</VnRow> </VnRow>
<div v-if="importData.file"> <div v-if="importData.file">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('entry.buys.reference')" :label="t('entry.buys.reference')"
v-model="importData.ref" v-model="importData.ref"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('entry.buys.observations')" :label="t('entry.buys.observations')"
v-model="importData.observation" v-model="importData.observation"

View File

@ -78,7 +78,7 @@ const redirectToEntryBasicData = (_, { id }) => {
@on-data-saved="redirectToEntryBasicData" @on-data-saved="redirectToEntryBasicData"
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Supplier')" :label="t('Supplier')"
class="full-width" class="full-width"
@ -102,7 +102,7 @@ const redirectToEntryBasicData = (_, { id }) => {
</template> </template>
</VnSelect> </VnSelect>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Travel')" :label="t('Travel')"
class="full-width" class="full-width"
@ -131,7 +131,7 @@ const redirectToEntryBasicData = (_, { id }) => {
</template> </template>
</VnSelect> </VnSelect>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Company')" :label="t('Company')"
class="full-width" class="full-width"

View File

@ -1,71 +1,89 @@
<script setup> <script setup>
import { computed, onMounted } from 'vue'; import { computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import { useStateStore } from 'stores/useStateStore';
import { toDate } from 'src/filters/index'; import { toDate } from 'src/filters/index';
import { useQuasar } from 'quasar'; import { useQuasar } from 'quasar';
import EntryBuysTableDialog from './EntryBuysTableDialog.vue'; import EntryBuysTableDialog from './EntryBuysTableDialog.vue';
import VnTable from 'components/VnTable/VnTable.vue'; import VnTable from 'components/VnTable/VnTable.vue';
import VnInput from 'src/components/common/VnInput.vue';
const stateStore = useStateStore();
const { t } = useI18n(); const { t } = useI18n();
const quasar = useQuasar(); const quasar = useQuasar();
onMounted(async () => {
stateStore.rightDrawer = true;
});
const columns = computed(() => [ const columns = computed(() => [
{ {
align: 'left', align: 'left',
name: 'id', name: 'id',
label: t('customer.extendedList.tableVisibleColumns.id'), label: t('customer.extendedList.tableVisibleColumns.id'),
chip: { columnFilter: false,
condition: () => true, isTitle: true,
},
isId: true,
isTitle: false,
}, },
{ {
align: 'left', visible: false,
align: 'right',
label: t('shipped'), label: t('shipped'),
name: 'shipped', name: 'shipped',
isTitle: false, columnFilter: {
create: true, name: 'fromShipped',
cardVisible: true, label: t('fromShipped'),
component: 'date', component: 'date',
columnField: {
component: null,
}, },
format: ({ shipped }) => toDate(shipped), format: ({ shipped }) => toDate(shipped),
}, },
{ {
visible: false,
align: 'left', align: 'left',
label: t('shipped'),
name: 'shipped',
columnFilter: {
name: 'toShipped',
label: t('toShipped'),
component: 'date',
},
format: ({ shipped }) => toDate(shipped),
cardVisible: true,
},
{
align: 'right',
label: t('shipped'),
name: 'shipped',
columnFilter: false,
format: ({ shipped }) => toDate(shipped),
},
{
align: 'right',
label: t('landed'), label: t('landed'),
name: 'landed', name: 'landed',
isTitle: false, columnFilter: false,
create: true,
cardVisible: false,
component: 'date',
columnField: {
component: null,
},
format: ({ landed }) => toDate(landed), format: ({ landed }) => toDate(landed),
}, },
{
align: 'right',
label: t('globals.wareHouseIn'),
name: 'warehouseInFk',
format: (row) => row.warehouseInName,
cardVisible: true,
columnFilter: {
component: 'select',
attrs: {
url: 'warehouses',
fields: ['id', 'name'],
optionLabel: 'name',
optionValue: 'id',
},
alias: 't',
inWhere: true,
},
},
{ {
align: 'left', align: 'left',
label: t('globals.wareHouseIn'), label: t('globals.daysOnward'),
name: 'warehouseInName', name: 'days',
isTitle: false, visible: false,
cardVisible: true,
create: false,
}, },
{ {
align: 'right', align: 'right',
name: 'tableActions', name: 'tableActions',
computed,
actions: [ actions: [
{ {
title: t('printBuys'), title: t('printBuys'),
@ -87,35 +105,19 @@ const printBuys = (rowId) => {
</script> </script>
<template> <template>
<VnSearchbar <VnSearchbar
data-key="EntryList" data-key="myEntriesList"
url="Entries/filter" url="Entries/filter"
:label="t('Search entries')" :label="t('Search entries')"
:info="t('You can search by entry reference')" :info="t('You can search by entry reference')"
/> />
<QPage class="column items-center q-pa-md"> <VnTable
<div class="vn-card-list"> data-key="myEntriesList"
<VnTable url="Entries/filter"
ref="myEntriesRef" :columns="columns"
data-key="myEntriesList" default-mode="card"
url="Entries/filter" order="shipped DESC"
:columns="columns" auto-load
default-mode="card" />
auto-load
:right-search="true"
>
<template #moreFilterPanel="{ params }">
<VnInput
:label="t('globals.daysOnward')"
v-model="params.days"
class="q-px-xs row"
dense
filled
outlined
></VnInput>
</template>
</VnTable>
</div>
</QPage>
</template> </template>
<i18n> <i18n>

View File

@ -8,4 +8,6 @@ entryFilter:
reference: Reference reference: Reference
landed: Landed landed: Landed
shipped: Shipped shipped: Shipped
fromShipped: Shipped(from)
toShipped: Shipped(to)
printBuys: Print buys printBuys: Print buys

View File

@ -12,4 +12,6 @@ entryFilter:
landed: F. llegada landed: F. llegada
shipped: F. salida shipped: F. salida
fromShipped: F. salida(desde)
toShipped: F. salida(hasta)
Print buys: Imprimir etiquetas Print buys: Imprimir etiquetas

View File

@ -207,8 +207,14 @@ async function cloneInvoice() {
const isAdministrative = () => hasAny(['administrative']); const isAdministrative = () => hasAny(['administrative']);
const isAgricultural = () => const isAgricultural = () => {
invoiceIn.value?.supplier?.sageWithholdingFk === config.value[0]?.sageWithholdingFk; console.error(config);
if (!config.value) return false;
return (
invoiceIn.value?.supplier?.sageFarmerWithholdingFk ===
config?.value[0]?.sageWithholdingFk
);
};
function showPdfInvoice() { function showPdfInvoice() {
if (isAgricultural()) openReport(`InvoiceIns/${entityId.value}/invoice-in-pdf`); if (isAgricultural()) openReport(`InvoiceIns/${entityId.value}/invoice-in-pdf`);

View File

@ -31,7 +31,7 @@ onMounted(async () => {
@on-data-saved="onDataSaved" @on-data-saved="onDataSaved"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
ref="genusInputRef" ref="genusInputRef"
:label="t('Latin genus name')" :label="t('Latin genus name')"

View File

@ -33,7 +33,7 @@ onMounted(async () => {
@on-data-saved="onDataSaved" @on-data-saved="onDataSaved"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
ref="identifierInputRef" ref="identifierInputRef"
:label="t('createIntrastatForm.identifier')" :label="t('createIntrastatForm.identifier')"

View File

@ -31,7 +31,7 @@ onMounted(async () => {
@on-data-saved="onDataSaved" @on-data-saved="onDataSaved"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
ref="specieInputRef" ref="specieInputRef"
:label="t('Latin species name')" :label="t('Latin species name')"

View File

@ -71,7 +71,7 @@ const onIntrastatCreated = (response, formData) => {
:clear-store-on-unmount="false" :clear-store-on-unmount="false"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('basicData.type')" :label="t('basicData.type')"
v-model="data.typeFk" v-model="data.typeFk"
@ -95,7 +95,7 @@ const onIntrastatCreated = (response, formData) => {
<VnInput :label="t('basicData.reference')" v-model="data.comment" /> <VnInput :label="t('basicData.reference')" v-model="data.comment" />
<VnInput :label="t('basicData.relevancy')" v-model="data.relevancy" /> <VnInput :label="t('basicData.relevancy')" v-model="data.relevancy" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput :label="t('basicData.stems')" v-model="data.stems" /> <VnInput :label="t('basicData.stems')" v-model="data.stems" />
<VnInput <VnInput
:label="t('basicData.multiplier')" :label="t('basicData.multiplier')"
@ -127,7 +127,7 @@ const onIntrastatCreated = (response, formData) => {
</template> </template>
</VnSelectDialog> </VnSelectDialog>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelectDialog <VnSelectDialog
:label="t('basicData.intrastat')" :label="t('basicData.intrastat')"
v-model="data.intrastatFk" v-model="data.intrastatFk"
@ -166,7 +166,7 @@ const onIntrastatCreated = (response, formData) => {
/> />
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('basicData.weightByPiece')" :label="t('basicData.weightByPiece')"
v-model.number="data.weightByPiece" v-model.number="data.weightByPiece"
@ -192,7 +192,7 @@ const onIntrastatCreated = (response, formData) => {
type="number" type="number"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox v-model="data.isActive" :label="t('basicData.isActive')" /> <QCheckbox v-model="data.isActive" :label="t('basicData.isActive')" />
<QCheckbox v-model="data.hasKgPrice" :label="t('basicData.hasKgPrice')" /> <QCheckbox v-model="data.hasKgPrice" :label="t('basicData.hasKgPrice')" />
<div> <div>

View File

@ -67,7 +67,7 @@ onMounted(async () => {
:clear-store-on-unmount="false" :clear-store-on-unmount="false"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelectDialog <VnSelectDialog
:label="t('Genus')" :label="t('Genus')"
v-model="data.genusFk" v-model="data.genusFk"

View File

@ -1,5 +1,5 @@
<script setup> <script setup>
import { onMounted, computed, onUnmounted, reactive, ref } from 'vue'; import { onMounted, computed, onUnmounted, reactive, ref, nextTick } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
@ -113,18 +113,36 @@ const getBadgeAttrs = (_date) => {
return attrs; return attrs;
}; };
const scrollToToday = async () => {
await nextTick();
const today = Date.vnNew();
today.setHours(0, 0, 0, 0);
const todayCell = document.querySelector(`td[data-date="${today.toISOString()}"]`);
if (todayCell) {
todayCell.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
};
const formatDateForAttribute = (dateValue) => {
if (dateValue instanceof Date) return date.formatDate(dateValue, 'YYYY-MM-DD');
return dateValue;
};
const originTypeMap = { const originTypeMap = {
entry: { entry: {
descriptor: EntryDescriptorProxy, descriptor: EntryDescriptorProxy,
icon: 'vn:entry', icon: 'vn:entry',
color: 'green',
}, },
ticket: { ticket: {
descriptor: TicketDescriptorProxy, descriptor: TicketDescriptorProxy,
icon: 'vn:ticket', icon: 'vn:ticket',
color: 'red',
}, },
order: { order: {
descriptor: OrderDescriptorProxy, descriptor: OrderDescriptorProxy,
icon: 'vn:basket', icon: 'vn:basket',
color: 'yellow',
}, },
}; };
@ -143,6 +161,7 @@ onMounted(async () => {
else if (user.value) warehouseFk.value = user.value.warehouseFk; else if (user.value) warehouseFk.value = user.value.warehouseFk;
itemsBalanceFilter.where.warehouseFk = warehouseFk.value; itemsBalanceFilter.where.warehouseFk = warehouseFk.value;
await fetchItemBalances(); await fetchItemBalances();
await scrollToToday();
}); });
onUnmounted(() => (stateStore.rightDrawer = false)); onUnmounted(() => (stateStore.rightDrawer = false));
@ -215,7 +234,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
</QTd> </QTd>
</template> </template>
<template #body-cell-date="{ row }"> <template #body-cell-date="{ row }">
<QTd @click.stop> <QTd @click.stop :data-date="formatDateForAttribute(row.shipped)">
<QBadge <QBadge
v-bind="getBadgeAttrs(row.shipped)" v-bind="getBadgeAttrs(row.shipped)"
class="q-ma-none" class="q-ma-none"
@ -237,12 +256,13 @@ onUnmounted(() => (stateStore.rightDrawer = false));
> >
{{ row.originId }} {{ row.originId }}
</component> </component>
<QIcon
:name="originTypeMap[row.originType]?.icon"
class="fill-icon q-mr-sm"
size="sm"
:color="originTypeMap[row.originType]?.color"
/>
<span class="link"> <span class="link">
<QIcon
:name="originTypeMap[row.originType]?.icon"
class="fill-icon q-mr-sm"
size="xs"
/>
{{ row.originId }} {{ row.originId }}
</span> </span>
</QTd> </QTd>

View File

@ -85,7 +85,7 @@ onBeforeMount(async () => {
@on-data-saved="redirectToItemBasicData" @on-data-saved="redirectToItemBasicData"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.provisionalName" v-model="data.provisionalName"
:label="t('item.create.name')" :label="t('item.create.name')"
@ -107,7 +107,7 @@ onBeforeMount(async () => {
hide-selected hide-selected
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('item.create.type')" :label="t('item.create.type')"
v-model="data.typeFk" v-model="data.typeFk"
@ -154,7 +154,7 @@ onBeforeMount(async () => {
</template> </template>
</VnSelect> </VnSelect>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('item.create.origin')" :label="t('item.create.origin')"
v-model="data.originFk" v-model="data.originFk"

View File

@ -36,7 +36,7 @@ onMounted(async () => {
@on-data-saved="onDataSaved" @on-data-saved="onDataSaved"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInput <VnInput
ref="textAreaRef" ref="textAreaRef"

View File

@ -53,11 +53,11 @@ const redirectToItemTypeBasicData = (_, { id }) => {
@on-data-saved="redirectToItemTypeBasicData" @on-data-saved="redirectToItemTypeBasicData"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput v-model="data.code" :label="t('itemType.shared.code')" /> <VnInput v-model="data.code" :label="t('itemType.shared.code')" />
<VnInput v-model="data.name" :label="t('itemType.shared.name')" /> <VnInput v-model="data.name" :label="t('itemType.shared.name')" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
v-model="data.workerFk" v-model="data.workerFk"
:label="t('itemType.shared.worker')" :label="t('itemType.shared.worker')"
@ -75,7 +75,7 @@ const redirectToItemTypeBasicData = (_, { id }) => {
hide-selected hide-selected
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
v-model="data.temperatureFk" v-model="data.temperatureFk"
:label="t('itemType.shared.temperature')" :label="t('itemType.shared.temperature')"

View File

@ -42,11 +42,11 @@ const temperaturesOptions = ref([]);
auto-load auto-load
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput v-model="data.code" :label="t('shared.code')" /> <VnInput v-model="data.code" :label="t('shared.code')" />
<VnInput v-model="data.name" :label="t('shared.name')" /> <VnInput v-model="data.name" :label="t('shared.name')" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
v-model="data.workerFk" v-model="data.workerFk"
:label="t('shared.worker')" :label="t('shared.worker')"
@ -64,7 +64,7 @@ const temperaturesOptions = ref([]);
hide-selected hide-selected
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
v-model="data.temperatureFk" v-model="data.temperatureFk"
:label="t('shared.temperature')" :label="t('shared.temperature')"

View File

@ -125,7 +125,7 @@ async function onDataSaved({ id }) {
auto-load auto-load
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
url="Clients" url="Clients"
:label="t('order.form.clientFk')" :label="t('order.form.clientFk')"
@ -171,7 +171,7 @@ async function onDataSaved({ id }) {
</template> </template>
</VnSelect> </VnSelect>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInputDate <VnInputDate
placeholder="dd-mm-aaa" placeholder="dd-mm-aaa"
:label="t('order.form.landed')" :label="t('order.form.landed')"
@ -181,7 +181,7 @@ async function onDataSaved({ id }) {
" "
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('order.form.agencyModeFk')" :label="t('order.form.agencyModeFk')"
v-model="data.agencyModeFk" v-model="data.agencyModeFk"

View File

@ -98,7 +98,7 @@ async function deleteWorCenter(id) {
@on-data-saved="paginate.fetch()" @on-data-saved="paginate.fetch()"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
v-model="data.workCenterFk" v-model="data.workCenterFk"
option-value="id" option-value="id"

View File

@ -3,6 +3,7 @@ import axios from 'axios';
import { useQuasar } from 'quasar'; import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { useSession } from 'src/composables/useSession';
import VnConfirm from 'components/ui/VnConfirm.vue'; import VnConfirm from 'components/ui/VnConfirm.vue';
const props = defineProps({ const props = defineProps({
@ -11,10 +12,20 @@ const props = defineProps({
required: true, required: true,
}, },
}); });
const router = useRouter(); const router = useRouter();
const quasar = useQuasar(); const quasar = useQuasar();
const { t } = useI18n(); const { t } = useI18n();
const routeId = props.route.id;
async function openRouteReport() {
const url = new URL(window.location).origin;
const { getTokenMultimedia } = useSession();
const token = getTokenMultimedia();
window.open(
`${url}/api/Routes/${routeId}/driver-route-pdf?access_token=${token}`,
'_blank'
);
}
function confirmRemove() { function confirmRemove() {
quasar quasar
@ -29,20 +40,50 @@ function confirmRemove() {
.onOk(async () => await router.push({ name: 'RouteList' })); .onOk(async () => await router.push({ name: 'RouteList' }));
} }
async function sendMail() {
const params = {
id: routeId,
recipient: props?.route?.worker?.user?.emailUser?.email,
};
await axios.post(`Routes/${routeId}/driver-route-email`, params);
}
async function actualizeVolume() {
const params = { isOk: true };
await axios.post(`Routes/${routeId}/updateVolume`, params);
quasar.notify({
message: t('globals.dataUpdated'),
type: 'positive',
});
}
async function remove() { async function remove() {
if (!props.route.id) { await axios.delete(`Routes/${routeId}`);
return;
}
await axios.delete(`Routes/${props.route.id}`);
quasar.notify({ quasar.notify({
message: t('globals.dataDeleted'), message: t('globals.dataDeleted'),
type: 'positive', type: 'positive',
}); });
} }
// TODO: Add reports
</script> </script>
<template> <template>
<QItem @click="openRouteReport" v-ripple clickable>
<QItemSection avatar>
<QIcon name="description" />
</QItemSection>
<QItemSection>{{ t('seeReport') }}</QItemSection>
</QItem>
<QItem @click="sendMail" v-ripple clickable>
<QItemSection avatar>
<QIcon name="outgoing_mail" />
</QItemSection>
<QItemSection>{{ t('sendMail') }}</QItemSection>
</QItem>
<QItem @click="actualizeVolume" v-ripple clickable>
<QItemSection avatar>
<QIcon name="package_2" />
</QItemSection>
<QItemSection>{{ t('actualizeVolume') }}</QItemSection>
</QItem>
<QItem @click="confirmRemove" v-ripple clickable> <QItem @click="confirmRemove" v-ripple clickable>
<QItemSection avatar> <QItemSection avatar>
<QIcon name="delete" /> <QIcon name="delete" />
@ -56,8 +97,14 @@ en:
confirmDeletion: Confirm deletion confirmDeletion: Confirm deletion
confirmDeletionMessage: Are you sure you want to delete this route? confirmDeletionMessage: Are you sure you want to delete this route?
deleteRoute: Delete route deleteRoute: Delete route
seeReport: See route report
sendMail: Send route report
actualizeVolume: Actualize volume
es: es:
confirmDeletion: Confirmar eliminación, confirmDeletion: Confirmar eliminación,
confirmDeletionMessage: Seguro que quieres eliminar esta ruta? confirmDeletionMessage: Seguro que quieres eliminar esta ruta?
deleteRoute: Eliminar ruta deleteRoute: Eliminar ruta
seeReport: Ver informe de ruta
sendMail: Enviar informe de ruta
actualizeVolume: Actualizar volumen
</i18n> </i18n>

View File

@ -120,7 +120,7 @@ const onSave = (data, response) => {
@on-data-saved="onSave" @on-data-saved="onSave"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Worker')" :label="t('Worker')"
v-model="data.workerFk" v-model="data.workerFk"
@ -155,7 +155,7 @@ const onSave = (data, response) => {
:input-debounce="0" :input-debounce="0"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Agency')" :label="t('Agency')"
v-model="data.agencyModeFk" v-model="data.agencyModeFk"
@ -170,7 +170,7 @@ const onSave = (data, response) => {
<VnInputDate v-model="data.created" :label="t('Created')" /> <VnInputDate v-model="data.created" :label="t('Created')" />
</VnRow> </VnRow>
<template v-if="!isNew"> <template v-if="!isNew">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput v-model="data.kmStart" :label="t('Km Start')" clearable /> <VnInput v-model="data.kmStart" :label="t('Km Start')" clearable />
<QInput <QInput
v-model.number="data.kmEnd" v-model.number="data.kmEnd"
@ -184,7 +184,7 @@ const onSave = (data, response) => {
type="number" type="number"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInputTime <VnInputTime
v-model="data.started" v-model="data.started"
:label="t('Hour started')" :label="t('Hour started')"
@ -205,15 +205,13 @@ const onSave = (data, response) => {
</div> </div>
</VnRow> </VnRow>
</template> </template>
<VnRow class="row q-gutter-md q-mb-md"> <VnInput
<VnInput v-model="data.description"
v-model="data.description" :label="t('Description')"
:label="t('Description')" type="textarea"
type="textarea" :rows="3"
:rows="3" clearable
clearable />
/>
</VnRow>
</template> </template>
</FormModel> </FormModel>
</template> </template>

View File

@ -3,7 +3,7 @@ import { onBeforeMount, onMounted, computed, ref } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { Notify } from 'quasar'; import { Notify } from 'quasar';
import { useSession } from 'src/composables/useSession'; import { useSession } from 'src/composables/useSession';
import { toDate, toDateHourMin } from 'filters/index'; import { toDateHourMin } from 'filters/index';
import { useStateStore } from 'src/stores/useStateStore'; import { useStateStore } from 'src/stores/useStateStore';
import axios from 'axios'; import axios from 'axios';

View File

@ -38,12 +38,12 @@ const onSave = (data, response) => {
@on-data-saved="onSave" @on-data-saved="onSave"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput v-model="data.name" :label="t('Roadmap')" clearable /> <VnInput v-model="data.name" :label="t('Roadmap')" clearable />
<VnInputDate v-model="data.etd" :label="t('ETD date')" /> <VnInputDate v-model="data.etd" :label="t('ETD date')" />
<VnInputTime v-model="data.etd" :label="t('ETD hour')" /> <VnInputTime v-model="data.etd" :label="t('ETD hour')" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.tractorPlate" v-model="data.tractorPlate"
:label="t('Tractor plate')" :label="t('Tractor plate')"
@ -55,7 +55,7 @@ const onSave = (data, response) => {
clearable clearable
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Carrier')" :label="t('Carrier')"
v-model="data.supplierFk" v-model="data.supplierFk"
@ -84,11 +84,11 @@ const onSave = (data, response) => {
clearable clearable
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput v-model="data.driverName" :label="t('Driver name')" clearable /> <VnInput v-model="data.driverName" :label="t('Driver name')" clearable />
<VnInput v-model="data.phone" :label="t('Phone')" clearable /> <VnInput v-model="data.phone" :label="t('Phone')" clearable />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.observations" v-model="data.observations"
:label="t('Observations')" :label="t('Observations')"

View File

@ -85,7 +85,7 @@ const onSave = (shelving, newShelving) => {
@on-data-saved="onSave" @on-data-saved="onSave"
> >
<template #form="{ data, validate, filter }"> <template #form="{ data, validate, filter }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.code" v-model="data.code"
:label="t('shelving.basicData.code')" :label="t('shelving.basicData.code')"
@ -107,7 +107,7 @@ const onSave = (shelving, newShelving) => {
:input-debounce="0" :input-debounce="0"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.priority" v-model="data.priority"
type="number" type="number"

View File

@ -71,7 +71,7 @@ function handleLocation(data, location) {
@on-data-saved="onDataSaved()" @on-data-saved="onDataSaved()"
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.nickname" v-model="data.nickname"
:label="t('supplier.addresses.name')" :label="t('supplier.addresses.name')"
@ -81,7 +81,7 @@ function handleLocation(data, location) {
:label="t('supplier.addresses.street')" :label="t('supplier.addresses.street')"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnLocation <VnLocation
:rules="validate('Worker.postcode')" :rules="validate('Worker.postcode')"
:roles-allowed-to-create="['deliveryAssistant']" :roles-allowed-to-create="['deliveryAssistant']"
@ -91,7 +91,7 @@ function handleLocation(data, location) {
> >
</VnLocation> </VnLocation>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.phone" v-model="data.phone"
:label="t('supplier.addresses.phone')" :label="t('supplier.addresses.phone')"

View File

@ -45,7 +45,7 @@ const onDataSaved = () => {
@on-data-saved="onDataSaved()" @on-data-saved="onDataSaved()"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('supplier.agencyTerms.agencyFk')" :label="t('supplier.agencyTerms.agencyFk')"
v-model="data.agencyFk" v-model="data.agencyFk"
@ -61,7 +61,7 @@ const onDataSaved = () => {
type="number" type="number"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput <QInput
:label="t('supplier.agencyTerms.packagePrice')" :label="t('supplier.agencyTerms.packagePrice')"
v-model.number="data.packagePrice" v-model.number="data.packagePrice"
@ -78,7 +78,7 @@ const onDataSaved = () => {
type="number" type="number"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput <QInput
:label="t('supplier.agencyTerms.routePrice')" :label="t('supplier.agencyTerms.routePrice')"
v-model.number="data.routePrice" v-model.number="data.routePrice"

View File

@ -2,8 +2,6 @@
import { ref } from 'vue'; import { ref } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import FetchData from 'components/FetchData.vue';
import FormModel from 'components/FormModel.vue'; import FormModel from 'components/FormModel.vue';
import VnRow from 'components/ui/VnRow.vue'; import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue'; import VnInput from 'src/components/common/VnInput.vue';
@ -15,12 +13,6 @@ const { t } = useI18n();
const workersOptions = ref([]); const workersOptions = ref([]);
</script> </script>
<template> <template>
<FetchData
url="Workers/search"
:filter="{ fields: ['id', 'nickname'], order: 'nickname ASC', limit: 30 }"
@on-fetch="(data) => (workersOptions = data)"
auto-load
/>
<FormModel <FormModel
:url="`Suppliers/${route.params.id}`" :url="`Suppliers/${route.params.id}`"
:url-update="`Suppliers/${route.params.id}`" :url-update="`Suppliers/${route.params.id}`"
@ -29,7 +21,7 @@ const workersOptions = ref([]);
:clear-store-on-unmount="false" :clear-store-on-unmount="false"
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.nickname" v-model="data.nickname"
:label="t('supplier.basicData.alias')" :label="t('supplier.basicData.alias')"
@ -44,6 +36,8 @@ const workersOptions = ref([]);
option-label="name" option-label="name"
hide-selected hide-selected
map-options map-options
url="Workers/search"
sort-by="nickname ASC"
:rules="validate('supplier.workerFk')" :rules="validate('supplier.workerFk')"
> >
<template #append> <template #append>
@ -65,7 +59,7 @@ const workersOptions = ref([]);
</template> </template>
</VnSelect> </VnSelect>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox <QCheckbox
v-model="data.isSerious" v-model="data.isSerious"
:label="t('supplier.basicData.isSerious')" :label="t('supplier.basicData.isSerious')"
@ -79,7 +73,7 @@ const workersOptions = ref([]);
:label="t('supplier.basicData.isPayMethodChecked')" :label="t('supplier.basicData.isPayMethodChecked')"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput <QInput
:label="t('supplier.basicData.note')" :label="t('supplier.basicData.note')"
type="textarea" type="textarea"

View File

@ -36,7 +36,7 @@ const formatPayDems = (data) => {
:clear-store-on-unmount="false" :clear-store-on-unmount="false"
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('supplier.billingData.payMethodFk')" :label="t('supplier.billingData.payMethodFk')"
v-model="data.payMethodFk" v-model="data.payMethodFk"
@ -56,7 +56,7 @@ const formatPayDems = (data) => {
:rules="validate('supplier.payDemFk')" :rules="validate('supplier.payDemFk')"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QInput <QInput
:label="t('supplier.billingData.payDay')" :label="t('supplier.billingData.payDay')"
type="number" type="number"

View File

@ -56,7 +56,7 @@ function handleLocation(data, location) {
:clear-store-on-unmount="false" :clear-store-on-unmount="false"
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.name" v-model="data.name"
:label="t('supplier.fiscalData.name')" :label="t('supplier.fiscalData.name')"
@ -68,7 +68,7 @@ function handleLocation(data, location) {
clearable clearable
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.account" v-model="data.account"
:label="t('supplier.fiscalData.account')" :label="t('supplier.fiscalData.account')"
@ -84,7 +84,7 @@ function handleLocation(data, location) {
map-options map-options
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('supplier.fiscalData.sageWithholdingFk')" :label="t('supplier.fiscalData.sageWithholdingFk')"
v-model="data.sageWithholdingFk" v-model="data.sageWithholdingFk"
@ -104,7 +104,7 @@ function handleLocation(data, location) {
map-options map-options
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('supplier.fiscalData.supplierActivityFk')" :label="t('supplier.fiscalData.supplierActivityFk')"
v-model="data.supplierActivityFk" v-model="data.supplierActivityFk"
@ -120,14 +120,14 @@ function handleLocation(data, location) {
clearable clearable
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.street" v-model="data.street"
:label="t('supplier.fiscalData.street')" :label="t('supplier.fiscalData.street')"
clearable clearable
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnLocation <VnLocation
:rules="validate('Worker.postcode')" :rules="validate('Worker.postcode')"
:roles-allowed-to-create="['deliveryAssistant']" :roles-allowed-to-create="['deliveryAssistant']"
@ -137,7 +137,7 @@ function handleLocation(data, location) {
> >
</VnLocation> </VnLocation>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col flex justify-around"> <div class="col flex justify-around">
<QCheckbox <QCheckbox
v-model="data.isTrucker" v-model="data.isTrucker"

View File

@ -44,13 +44,11 @@ const redirectToSupplierFiscalData = (_, responseData) => {
@on-data-saved="redirectToSupplierFiscalData" @on-data-saved="redirectToSupplierFiscalData"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.name" v-model="data.name"
:label="t('supplier.create.supplierName')" :label="t('supplier.create.supplierName')"
@keyup=" @keyup="newSupplierForm.name = newSupplierForm.name.toUpperCase()"
newSupplierForm.name = newSupplierForm.name.toUpperCase()
"
/> />
</VnRow> </VnRow>
</template> </template>

View File

@ -311,7 +311,7 @@ onMounted(() => onFormModelInit());
auto-load auto-load
/> />
<QForm> <QForm>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('basicData.client')" :label="t('basicData.client')"
v-model="clientId" v-model="clientId"
@ -343,7 +343,7 @@ onMounted(() => onFormModelInit());
:required="true" :required="true"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('basicData.address')" :label="t('basicData.address')"
v-model="addressId" v-model="addressId"
@ -447,7 +447,7 @@ onMounted(() => onFormModelInit());
</template> </template>
</VnSelect> </VnSelect>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInputDate <VnInputDate
:label="t('basicData.shipped')" :label="t('basicData.shipped')"
v-model="formData.shipped" v-model="formData.shipped"

View File

@ -63,10 +63,10 @@ const createTicket = async () => {
:save-fn="createTicket" :save-fn="createTicket"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInputDate :label="t('expedition.landed')" v-model="data.landed" /> <VnInputDate :label="t('expedition.landed')" v-model="data.landed" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-if="withRoute" v-if="withRoute"
:label="t('expedition.routeId')" :label="t('expedition.routeId')"

View File

@ -31,7 +31,7 @@ const attendersOptions = ref([]);
@on-data-saved="() => emit('onRequestCreated')" @on-data-saved="() => emit('onRequestCreated')"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.description" v-model="data.description"
:label="t('purchaseRequest.description')" :label="t('purchaseRequest.description')"
@ -45,7 +45,7 @@ const attendersOptions = ref([]);
option-value="id" option-value="id"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.quantity" v-model="data.quantity"
:label="t('purchaseRequest.quantity')" :label="t('purchaseRequest.quantity')"

View File

@ -31,7 +31,7 @@ onMounted(async () => {
@on-data-saved="onDataSaved" @on-data-saved="onDataSaved"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
ref="nameInputRef" ref="nameInputRef"
:label="t('service.description')" :label="t('service.description')"

View File

@ -44,7 +44,7 @@ const onStateFkChange = (formData) => (formData.userFk = user.value.id);
@on-data-saved="() => emit('onRequestCreated')" @on-data-saved="() => emit('onRequestCreated')"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
v-model="data.stateFk" v-model="data.stateFk"
:label="t('tracking.state')" :label="t('tracking.state')"

View File

@ -54,7 +54,7 @@ const importDms = async () => {
:save-fn="importDms" :save-fn="importDms"
> >
<template #form-inputs> <template #form-inputs>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('Document')" :label="t('Document')"
:options="dmsOptions" :options="dmsOptions"

View File

@ -65,7 +65,7 @@ const ticketData = computed(() => ticketStore.data);
const refetchExpeditions = async () => { const refetchExpeditions = async () => {
await expeditionsArrayData.applyFilter({ await expeditionsArrayData.applyFilter({
params: { filter: JSON.stringify(expeditionsFilter.value) }, filter: expeditionsFilter.value,
}); });
}; };
@ -81,7 +81,7 @@ const applyColumnFilter = async (col) => {
try { try {
const paramKey = col.columnFilter?.filterParamKey || col.field; const paramKey = col.columnFilter?.filterParamKey || col.field;
params[paramKey] = col.columnFilter.filterValue; params[paramKey] = col.columnFilter.filterValue;
await expeditionsArrayData.addFilter({ params }); await expeditionsArrayData.addFilter({ filter: expeditionsFilter.value, params });
} catch (err) { } catch (err) {
console.error('Error applying column filter', err); console.error('Error applying column filter', err);
} }

View File

@ -131,7 +131,7 @@ const redirectToTicketList = (_, { id }) => {
@on-data-saved="redirectToTicketList" @on-data-saved="redirectToTicketList"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('ticket.create.client')" :label="t('ticket.create.client')"
@ -157,7 +157,7 @@ const redirectToTicketList = (_, { id }) => {
</VnSelect> </VnSelect>
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('ticket.create.address')" :label="t('ticket.create.address')"
@ -184,7 +184,7 @@ const redirectToTicketList = (_, { id }) => {
</VnSelect> </VnSelect>
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInputDate <VnInputDate
placeholder="dd-mm-aaa" placeholder="dd-mm-aaa"
@ -194,7 +194,7 @@ const redirectToTicketList = (_, { id }) => {
/> />
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('ticket.create.warehouse')" :label="t('ticket.create.warehouse')"
@ -207,7 +207,7 @@ const redirectToTicketList = (_, { id }) => {
/> />
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('ticket.create.agency')" :label="t('ticket.create.agency')"

View File

@ -262,7 +262,7 @@ const getColor = (row) => {
</template> </template>
</VnSelect> </VnSelect>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnInputDate <VnInputDate
placeholder="dd-mm-aaa" placeholder="dd-mm-aaa"
@ -272,7 +272,7 @@ const getColor = (row) => {
/> />
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
url="Warehouses" url="Warehouses"
@ -286,7 +286,7 @@ const getColor = (row) => {
/> />
</div> </div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('ticket.create.agency')" :label="t('ticket.create.agency')"

View File

@ -28,7 +28,7 @@ const agenciesOptions = ref([]);
auto-load auto-load
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput v-model="data.ref" :label="t('travel.basicData.reference')" /> <VnInput v-model="data.ref" :label="t('travel.basicData.reference')" />
<VnSelect <VnSelect
:label="t('travel.basicData.agency')" :label="t('travel.basicData.agency')"
@ -40,7 +40,7 @@ const agenciesOptions = ref([]);
hide-selected hide-selected
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInputDate <VnInputDate
v-model="data.shipped" v-model="data.shipped"
:label="t('travel.basicData.shipped')" :label="t('travel.basicData.shipped')"
@ -50,7 +50,7 @@ const agenciesOptions = ref([]);
:label="t('travel.basicData.landed')" :label="t('travel.basicData.landed')"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('travel.basicData.warehouseOut')" :label="t('travel.basicData.warehouseOut')"
v-model="data.warehouseOutFk" v-model="data.warehouseOutFk"
@ -70,7 +70,7 @@ const agenciesOptions = ref([]);
hide-selected hide-selected
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox <QCheckbox
:label="t('travel.basicData.delivered')" :label="t('travel.basicData.delivered')"
v-model="data.isDelivered" v-model="data.isDelivered"

View File

@ -38,7 +38,7 @@ const cloneTravelWithEntries = async () => {
notify('globals.dataSaved', 'positive'); notify('globals.dataSaved', 'positive');
router.push({ name: 'TravelBasicData', params: { id: data.id } }); router.push({ name: 'TravelBasicData', params: { id: data.id } });
} catch (err) { } catch (err) {
console.err('Error cloning travel with entries'); console.error('Error cloning travel with entries');
} }
}; };

View File

@ -235,7 +235,7 @@ const onThermographCreated = async (data) => {
</div> </div>
</Teleport> </Teleport>
<QCard class="q-pa-lg"> <QCard class="q-pa-lg">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelectDialog <VnSelectDialog
:label="t('travel.thermographs.thermograph')" :label="t('travel.thermographs.thermograph')"
v-model="thermographForm.thermographId" v-model="thermographForm.thermographId"
@ -256,7 +256,7 @@ const onThermographCreated = async (data) => {
:label="t('travel.thermographs.state')" :label="t('travel.thermographs.state')"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="thermographForm.reference" v-model="thermographForm.reference"
:label="t('travel.thermographs.reference')" :label="t('travel.thermographs.reference')"
@ -269,7 +269,7 @@ const onThermographCreated = async (data) => {
option-label="name" option-label="name"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('travel.thermographs.company')" :label="t('travel.thermographs.company')"
v-model="thermographForm.companyId" v-model="thermographForm.companyId"
@ -293,7 +293,7 @@ const onThermographCreated = async (data) => {
fill-input fill-input
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QFile <QFile
ref="inputFileRef" ref="inputFileRef"
:label="t('travel.thermographs.file')" :label="t('travel.thermographs.file')"

View File

@ -57,7 +57,7 @@ const redirectToTravelBasicData = (_, { id }) => {
@on-data-saved="redirectToTravelBasicData" @on-data-saved="redirectToTravelBasicData"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput v-model="data.ref" :label="t('globals.reference')" /> <VnInput v-model="data.ref" :label="t('globals.reference')" />
<VnSelect <VnSelect
:label="t('globals.agency')" :label="t('globals.agency')"
@ -68,11 +68,11 @@ const redirectToTravelBasicData = (_, { id }) => {
hide-selected hide-selected
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInputDate v-model="data.shipped" :label="t('globals.shipped')" /> <VnInputDate v-model="data.shipped" :label="t('globals.shipped')" />
<VnInputDate :label="t('globals.landed')" v-model="data.landed" /> <VnInputDate :label="t('globals.landed')" v-model="data.landed" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('globals.wareHouseOut')" :label="t('globals.wareHouseOut')"
v-model="data.warehouseOutFk" v-model="data.warehouseOutFk"

View File

@ -61,7 +61,7 @@ onMounted(async () => await getPassRequirements());
<template> <template>
<FormPopup :title="t('Reset password')" @on-submit="setPassword()"> <FormPopup :title="t('Reset password')" @on-submit="setPassword()">
<template #form-inputs> <template #form-inputs>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('New password')" :label="t('New password')"
v-model="formData.newPassword" v-model="formData.newPassword"
@ -78,7 +78,7 @@ onMounted(async () => await getPassRequirements());
" "
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('Repeat password')" :label="t('Repeat password')"
v-model="formData.repeatPassword" v-model="formData.repeatPassword"

View File

@ -147,7 +147,7 @@ const refetch = async () => await cardDescriptorRef.value.getData();
<VnImg <VnImg
:id="parseInt(entityId)" :id="parseInt(entityId)"
collection="user" collection="user"
size="160x160" size="520x520"
class="photo" class="photo"
> >
<template #error> <template #error>

View File

@ -56,7 +56,7 @@ const updateModelValue = (data) => {
@on-fetch="onFetch" @on-fetch="onFetch"
> >
<template #form="{}"> <template #form="{}">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
:label="t('worker.summary.sipExtension')" :label="t('worker.summary.sipExtension')"
v-model="extension" v-model="extension"

View File

@ -126,7 +126,7 @@ function reloadData() {
@on-data-saved="reloadData()" @on-data-saved="reloadData()"
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('worker.pda.newPDA')" :label="t('worker.pda.newPDA')"
v-model="data.deviceProductionFk" v-model="data.deviceProductionFk"

View File

@ -31,11 +31,11 @@ const agencyOptions = ref([]);
<FormModel :url="`Zones/${route.params.id}`" auto-load model="zone"> <FormModel :url="`Zones/${route.params.id}`" auto-load model="zone">
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput :label="t('Name')" clearable v-model="data.name" /> <VnInput :label="t('Name')" clearable v-model="data.name" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
option-label="name" option-label="name"
option-value="id" option-value="id"
@ -66,7 +66,7 @@ const agencyOptions = ref([]);
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.travelingDays" v-model="data.travelingDays"
:label="t('Traveling days')" :label="t('Traveling days')"
@ -77,7 +77,7 @@ const agencyOptions = ref([]);
<VnInputTime v-model="data.hour" :label="t('Closing')" /> <VnInputTime v-model="data.hour" :label="t('Closing')" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.price" v-model="data.price"
:label="t('Price')" :label="t('Price')"
@ -94,7 +94,7 @@ const agencyOptions = ref([]);
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput v-model="data.inflation" :label="t('Inflation')" clearable /> <VnInput v-model="data.inflation" :label="t('Inflation')" clearable />
<QCheckbox <QCheckbox
v-model="data.isVolumetric" v-model="data.isVolumetric"

View File

@ -29,7 +29,7 @@ const warehousesOptions = ref([]);
@on-submit="emit('onSubmitCreateWarehouse', ZoneWarehouseFormData)" @on-submit="emit('onSubmitCreateWarehouse', ZoneWarehouseFormData)"
> >
<template #form-inputs> <template #form-inputs>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col"> <div class="col">
<VnSelect <VnSelect
:label="t('warehouses.warehouse')" :label="t('warehouses.warehouse')"

View File

@ -149,7 +149,7 @@ onMounted(() => {
class="q-mb-sm" class="q-mb-sm"
/> />
</div> </div>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<div class="col flex justify-center"> <div class="col flex justify-center">
<VnInputDate <VnInputDate
v-if="inclusionType === 'day'" v-if="inclusionType === 'day'"
@ -173,7 +173,7 @@ onMounted(() => {
v-model="eventInclusionFormData.ended" v-model="eventInclusionFormData.ended"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInputTime <VnInputTime
v-model="eventInclusionFormData.hour" v-model="eventInclusionFormData.hour"
:label="t('eventsInclusionForm.closing')" :label="t('eventsInclusionForm.closing')"
@ -185,7 +185,7 @@ onMounted(() => {
min="0" min="0"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="eventInclusionFormData.price" v-model="eventInclusionFormData.price"
:label="t('eventsInclusionForm.price')" :label="t('eventsInclusionForm.price')"
@ -199,7 +199,7 @@ onMounted(() => {
min="0" min="0"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="eventInclusionFormData.m3Max" v-model="eventInclusionFormData.m3Max"
:label="t('eventsInclusionForm.m3Max')" :label="t('eventsInclusionForm.m3Max')"

View File

@ -51,14 +51,14 @@ const redirectToZoneLocations = (_, { id }) => {
@on-data-saved="redirectToZoneLocations" @on-data-saved="redirectToZoneLocations"
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.name" v-model="data.name"
:label="t('create.name')" :label="t('create.name')"
:required="true" :required="true"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnSelect <VnSelect
:label="t('create.warehouse')" :label="t('create.warehouse')"
:options="warehousesOptions" :options="warehousesOptions"
@ -77,7 +77,7 @@ const redirectToZoneLocations = (_, { id }) => {
:required="true" :required="true"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.travelingDays" v-model="data.travelingDays"
:label="t('create.travelingDays')" :label="t('create.travelingDays')"
@ -87,7 +87,7 @@ const redirectToZoneLocations = (_, { id }) => {
<VnInputTime v-model="data.hour" :label="t('create.closingHour')" /> <VnInputTime v-model="data.hour" :label="t('create.closingHour')" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<VnInput <VnInput
v-model="data.price" v-model="data.price"
:label="t('create.price')" :label="t('create.price')"
@ -101,7 +101,7 @@ const redirectToZoneLocations = (_, { id }) => {
min="0" min="0"
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox <QCheckbox
:label="t('create.volumetric')" :label="t('create.volumetric')"
v-model="data.isVolumetric" v-model="data.isVolumetric"

View File

@ -7,7 +7,6 @@ describe('EntryMy when is supplier', () => {
cy.stub(win, 'open'); cy.stub(win, 'open');
}, },
}); });
cy.waitForElement('.q-page', 6000);
}); });
it('should open buyLabel when is supplier', () => { it('should open buyLabel when is supplier', () => {

View File

@ -1,7 +1,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('InvoiceInCorrective', () => { describe('InvoiceInCorrective', () => {
const createRectificative = '.q-menu > .q-list > :nth-child(4) > .q-item__section'; const createRectificative = '.q-menu > .q-list > :nth-child(6) > .q-item__section';
const rectificativeSection = '.q-drawer-container .q-list > a:nth-child(6)'; const rectificativeSection = '.q-drawer-container .q-list > a:nth-child(6)';
const saveDialog = '.q-card > .q-card__actions > .q-btn--standard '; const saveDialog = '.q-card > .q-card__actions > .q-btn--standard ';

View File

@ -26,6 +26,6 @@ describe('Route', () => {
cy.get(getRowColumn(1, 4) + getVnSelect).type('{downArrow}{enter}'); cy.get(getRowColumn(1, 4) + getVnSelect).type('{downArrow}{enter}');
cy.get(getRowColumn(1, 5) + getVnSelect).type('{downArrow}{enter}'); cy.get(getRowColumn(1, 5) + getVnSelect).type('{downArrow}{enter}');
cy.get('button[title="Save"]').click(); cy.get('button[title="Save"]').click();
cy.get('.q-notification__message').should('have.text', 'Data created'); cy.get('.q-notification__message').should('have.text', 'Data saved');
}); });
}); });