0
0
Fork 0

Merge branch 'dev' into 5919-locker

This commit is contained in:
Javier Segarra 2024-05-13 06:47:54 +00:00
commit 05698af75d
51 changed files with 2171 additions and 2800 deletions

View File

@ -58,23 +58,19 @@ onMounted(async () => {
> >
<template #form-inputs="{ data, validate }"> <template #form-inputs="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('name')"
:label="t('name')" v-model="data.name"
v-model="data.name" :required="true"
:required="true" :rules="validate('bankEntity.name')"
:rules="validate('bankEntity.name')" />
/> <VnInput
</div> ref="bicInputRef"
<div class="col"> :label="t('swift')"
<VnInput v-model="data.bic"
ref="bicInputRef" :required="true"
:label="t('swift')" :rules="validate('bankEntity.bic')"
v-model="data.bic" />
:required="true"
:rules="validate('bankEntity.bic')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <div class="col">

View File

@ -52,9 +52,7 @@ onMounted(() => {
</span> </span>
<h1 class="title">{{ t('New department') }}</h1> <h1 class="title">{{ t('New department') }}</h1>
<VnRow class="row q-gutter-md q-mb-md" style="min-width: 250px"> <VnRow class="row q-gutter-md q-mb-md" style="min-width: 250px">
<div class="col"> <VnInput :label="t('Name')" v-model="data.name" />
<VnInput :label="t('Name')" v-model="data.name" />
</div>
</VnRow> </VnRow>
<div class="q-mt-lg row justify-end"> <div class="q-mt-lg row justify-end">
<QBtn <QBtn

View File

@ -72,69 +72,57 @@ const onDataSaved = async (formData, requestResponse) => {
{{ t('Invoicing in progress...') }} {{ t('Invoicing in progress...') }}
</span> </span>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Ticket')"
:label="t('Ticket')" :options="ticketsOptions"
:options="ticketsOptions" hide-selected
hide-selected option-label="id"
option-label="id" option-value="id"
option-value="id" v-model="data.ticketFk"
v-model="data.ticketFk" @update:model-value="data.clientFk = null"
@update:model-value="data.clientFk = null" >
> <template #option="scope">
<template #option="scope"> <QItem v-bind="scope.itemProps">
<QItem v-bind="scope.itemProps"> <QItemSection>
<QItemSection> <QItemLabel> #{{ scope.opt?.id }} </QItemLabel>
<QItemLabel> #{{ scope.opt?.id }} </QItemLabel> <QItemLabel caption>{{ scope.opt?.nickname }}</QItemLabel>
<QItemLabel caption>{{ </QItemSection>
scope.opt?.nickname </QItem>
}}</QItemLabel> </template>
</QItemSection> </VnSelect>
</QItem>
</template>
</VnSelect>
</div>
<span class="row items-center" style="max-width: max-content">{{ <span class="row items-center" style="max-width: max-content">{{
t('Or') t('Or')
}}</span> }}</span>
<div class="col"> <VnSelect
<VnSelect :label="t('Client')"
:label="t('Client')" :options="clientsOptions"
:options="clientsOptions" hide-selected
hide-selected option-label="name"
option-label="name" option-value="id"
option-value="id" v-model="data.clientFk"
v-model="data.clientFk" @update:model-value="data.ticketFk = null"
@update:model-value="data.ticketFk = null" />
/> <VnInputDate :label="t('Max date')" v-model="data.maxShipped" />
</div>
<div class="col">
<VnInputDate :label="t('Max date')" v-model="data.maxShipped" />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Serial')"
:label="t('Serial')" :options="invoiceOutSerialsOptions"
:options="invoiceOutSerialsOptions" hide-selected
hide-selected option-label="description"
option-label="description" option-value="code"
option-value="code" v-model="data.serial"
v-model="data.serial" :required="true"
:required="true" />
/> <VnSelect
</div> :label="t('Area')"
<div class="col"> :options="taxAreasOptions"
<VnSelect hide-selected
:label="t('Area')" option-label="code"
:options="taxAreasOptions" option-value="code"
hide-selected v-model="data.taxArea"
option-label="code" :required="true"
option-value="code" />
v-model="data.taxArea"
:required="true"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<VnInput <VnInput

View File

@ -40,24 +40,20 @@ const onDataSaved = (dataSaved) => {
> >
<template #form-inputs="{ data, validate }"> <template #form-inputs="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('Name')"
:label="t('Name')" v-model="data.name"
v-model="data.name" :rules="validate('city.name')"
:rules="validate('city.name')" />
/> <VnSelect
</div> :label="t('Province')"
<div class="col"> :options="provincesOptions"
<VnSelect hide-selected
:label="t('Province')" option-label="name"
:options="provincesOptions" option-value="id"
hide-selected v-model="data.provinceFk"
option-label="name" :rules="validate('city.provinceFk')"
option-value="id" />
v-model="data.provinceFk"
:rules="validate('city.provinceFk')"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModelPopup> </FormModelPopup>

View File

@ -30,21 +30,21 @@ const townsLocationOptions = ref([]);
const onDataSaved = (formData) => { const onDataSaved = (formData) => {
const newPostcode = { const newPostcode = {
...formData ...formData,
}; };
const townObject = townsLocationOptions.value.find( const townObject = townsLocationOptions.value.find(
({id}) => id === formData.townFk ({ id }) => id === formData.townFk
); );
newPostcode.town = townObject?.name; newPostcode.town = townObject?.name;
const provinceObject = provincesOptions.value.find( const provinceObject = provincesOptions.value.find(
({id}) => id === formData.provinceFk ({ id }) => id === formData.provinceFk
); );
newPostcode.province = provinceObject?.name; newPostcode.province = provinceObject?.name;
const countryObject = countriesOptions.value.find( const countryObject = countriesOptions.value.find(
({id}) => id === formData.countryFk ({ id }) => id === formData.countryFk
); );
newPostcode.country = countryObject?.country; newPostcode.country = countryObject?.country;
emit('onDataSaved', newPostcode); emit('onDataSaved', newPostcode);
}; };
const onCityCreated = async ({ name, provinceFk }, formData) => { const onCityCreated = async ({ name, provinceFk }, formData) => {
@ -92,63 +92,54 @@ const onProvinceCreated = async ({ name }, formData) => {
> >
<template #form-inputs="{ data, validate }"> <template #form-inputs="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('Postcode')"
:label="t('Postcode')" v-model="data.code"
v-model="data.code" :rules="validate('postcode.code')"
:rules="validate('postcode.code')" />
/> <VnSelectDialog
</div> :label="t('City')"
<div class="col"> :options="townsLocationOptions"
<VnSelectDialog v-model="data.townFk"
:label="t('City')" hide-selected
:options="townsLocationOptions" option-label="name"
v-model="data.townFk" option-value="id"
hide-selected :rules="validate('postcode.city')"
option-label="name" :roles-allowed-to-create="['deliveryAssistant']"
option-value="id" >
:rules="validate('postcode.city')" <template #form>
:roles-allowed-to-create="['deliveryAssistant']" <CreateNewCityForm @on-data-saved="onCityCreated($event, data)" />
> </template>
<template #form> </VnSelectDialog>
<CreateNewCityForm
@on-data-saved="onCityCreated($event, data)"
/>
</template>
</VnSelectDialog>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-xl"> <VnRow class="row q-gutter-md q-mb-xl">
<div class="col"> <VnSelectDialog
<VnSelectDialog :label="t('Province')"
:label="t('Province')" :options="provincesOptions"
:options="provincesOptions" hide-selected
hide-selected option-label="name"
option-label="name" option-value="id"
option-value="id" v-model="data.provinceFk"
v-model="data.provinceFk" :rules="validate('postcode.provinceFk')"
:rules="validate('postcode.provinceFk')" :roles-allowed-to-create="['deliveryAssistant']"
:roles-allowed-to-create="['deliveryAssistant']" >
> <template #form>
<template #form> <CreateNewProvinceForm
<CreateNewProvinceForm @on-data-saved="onProvinceCreated($event, data)"
@on-data-saved="onProvinceCreated($event, data)" />
/> </template>
</template> </VnSelectDialog>
</VnSelectDialog> <VnSelect
</div> :label="t('Country')"
<div class="col"> :options="countriesOptions"
<VnSelect hide-selected
:label="t('Country')" option-label="country"
:options="countriesOptions" option-value="id"
hide-selected v-model="data.countryFk"
option-label="country" :rules="validate('postcode.countryFk')"
option-value="id" />
v-model="data.countryFk" </VnRow>
:rules="validate('postcode.countryFk')" </template>
/>
</div> </VnRow
></template>
</FormModelPopup> </FormModelPopup>
</template> </template>

View File

@ -40,24 +40,20 @@ const onDataSaved = (dataSaved) => {
> >
<template #form-inputs="{ data, validate }"> <template #form-inputs="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('Name')"
:label="t('Name')" v-model="data.name"
v-model="data.name" :rules="validate('province.name')"
:rules="validate('province.name')" />
/> <VnSelect
</div> :label="t('Autonomy')"
<div class="col"> :options="autonomiesOptions"
<VnSelect hide-selected
:label="t('Autonomy')" option-label="name"
:options="autonomiesOptions" option-value="id"
hide-selected v-model="data.autonomyFk"
option-label="name" :rules="validate('province.autonomyFk')"
option-value="id" />
v-model="data.autonomyFk"
:rules="validate('province.autonomyFk')"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModelPopup> </FormModelPopup>

View File

@ -54,51 +54,42 @@ const onDataSaved = (dataSaved) => {
> >
<template #form-inputs="{ data, validate }"> <template #form-inputs="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('Identifier')"
:label="t('Identifier')" v-model="data.thermographId"
v-model="data.thermographId" :required="true"
:required="true" :rules="validate('thermograph.id')"
:rules="validate('thermograph.id')" />
/> <VnSelect
</div> :label="t('Model')"
:options="thermographsModels"
<div class="col"> hide-selected
<VnSelect option-label="value"
:label="t('Model')" option-value="value"
:options="thermographsModels" v-model="data.model"
hide-selected :required="true"
option-label="value" :rules="validate('thermograph.model')"
option-value="value" />
v-model="data.model"
:required="true"
:rules="validate('thermograph.model')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-xl"> <VnRow class="row q-gutter-md q-mb-xl">
<div class="col"> <VnSelect
<VnSelect :label="t('Warehouse')"
:label="t('Warehouse')" :options="warehousesOptions"
:options="warehousesOptions" hide-selected
hide-selected option-label="name"
option-label="name" option-value="id"
option-value="id" v-model="data.warehouseId"
v-model="data.warehouseId" :required="true"
:required="true" />
/> <VnSelect
</div> :label="t('Temperature')"
<div class="col"> :options="temperaturesOptions"
<VnSelect hide-selected
:label="t('Temperature')" option-label="name"
:options="temperaturesOptions" option-value="code"
hide-selected v-model="data.temperatureFk"
option-label="name" :required="true"
option-value="code" />
v-model="data.temperatureFk"
:required="true"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModelPopup> </FormModelPopup>

View File

@ -246,61 +246,55 @@ const makeRequest = async () => {
<div class="column"> <div class="column">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QOptionGroup
<QOptionGroup :options="uploadMethodsOptions"
:options="uploadMethodsOptions" type="radio"
type="radio" v-model="uploadMethodSelected"
v-model="uploadMethodSelected" />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QFile
<QFile v-if="uploadMethodSelected === 'computer'"
v-if="uploadMethodSelected === 'computer'" ref="inputFileRef"
ref="inputFileRef" :label="t('File')"
:label="t('File')" :multiple="false"
:multiple="false" v-model="newPhoto.files"
v-model="newPhoto.files" @update:model-value="updatePhotoPreview($event)"
@update:model-value="updatePhotoPreview($event)" :accept="allowedContentTypes"
:accept="allowedContentTypes" class="required cursor-pointer"
class="required cursor-pointer" >
> <template #append>
<template #append> <QIcon
<QIcon name="vn:attach"
name="vn:attach" class="cursor-pointer q-mr-sm"
class="cursor-pointer q-mr-sm" @click="openInputFile()"
@click="openInputFile()" >
> <!-- <QTooltip>{{ t('globals.selectFile') }}</QTooltip> -->
<!-- <QTooltip>{{ t('globals.selectFile') }}</QTooltip> --> </QIcon>
</QIcon> <QIcon name="info" class="cursor-pointer">
<QIcon name="info" class="cursor-pointer"> <QTooltip>{{
<QTooltip>{{ t('globals.allowedFilesText', {
t('globals.allowedFilesText', { allowedContentTypes: allowedContentTypes,
allowedContentTypes: allowedContentTypes, })
}) }}</QTooltip>
}}</QTooltip> </QIcon>
</QIcon> </template>
</template> </QFile>
</QFile> <VnInput
<VnInput v-if="uploadMethodSelected === 'URL'"
v-if="uploadMethodSelected === 'URL'" v-model="newPhoto.url"
v-model="newPhoto.url" @update:model-value="updatePhotoPreview($event)"
@update:model-value="updatePhotoPreview($event)" placeholder="https://"
placeholder="https://" />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Orientation')"
:label="t('Orientation')" :options="viewportTypes"
:options="viewportTypes" hide-selected
hide-selected option-label="description"
option-label="description" v-model="viewportSelection"
v-model="viewportSelection" />
/>
</div>
</VnRow> </VnRow>
<div class="q-mt-lg row justify-end"> <div class="q-mt-lg row justify-end">
<QBtn <QBtn

View File

@ -152,48 +152,32 @@ const selectItem = ({ id }) => {
</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 class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput :label="t('entry.buys.name')" v-model="itemFilterParams.name" />
<VnInput <VnInput :label="t('entry.buys.size')" v-model="itemFilterParams.size" />
:label="t('entry.buys.name')" <VnSelect
v-model="itemFilterParams.name" :label="t('entry.buys.producer')"
/> :options="producersOptions"
</div> hide-selected
<div class="col"> option-label="name"
<VnInput option-value="id"
:label="t('entry.buys.size')" v-model="itemFilterParams.producerFk"
v-model="itemFilterParams.size" />
/> <VnSelect
</div> :label="t('entry.buys.type')"
<div class="col"> :options="ItemTypesOptions"
<VnSelect hide-selected
:label="t('entry.buys.producer')" option-label="name"
:options="producersOptions" option-value="id"
hide-selected v-model="itemFilterParams.typeFk"
option-label="name" />
option-value="id" <VnSelect
v-model="itemFilterParams.producerFk" :label="t('entry.buys.color')"
/> :options="InksOptions"
</div> hide-selected
<div class="col"> option-label="name"
<VnSelect option-value="id"
:label="t('entry.buys.type')" v-model="itemFilterParams.inkFk"
:options="ItemTypesOptions" />
hide-selected
option-label="name"
option-value="id"
v-model="itemFilterParams.typeFk"
/>
</div>
<div class="col">
<VnSelect
:label="t('entry.buys.color')"
:options="InksOptions"
hide-selected
option-label="name"
option-value="id"
v-model="itemFilterParams.inkFk"
/>
</div>
</VnRow> </VnRow>
<div class="q-mt-lg row justify-end"> <div class="q-mt-lg row justify-end">
<QBtn <QBtn

View File

@ -145,48 +145,38 @@ const selectTravel = ({ id }) => {
</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 class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('entry.basicData.agency')"
:label="t('entry.basicData.agency')" :options="agenciesOptions"
:options="agenciesOptions" hide-selected
hide-selected option-label="name"
option-label="name" option-value="id"
option-value="id" v-model="travelFilterParams.agencyModeFk"
v-model="travelFilterParams.agencyModeFk" />
/> <VnSelect
</div> :label="t('entry.basicData.warehouseOut')"
<div class="col"> :options="warehousesOptions"
<VnSelect hide-selected
:label="t('entry.basicData.warehouseOut')" option-label="name"
:options="warehousesOptions" option-value="id"
hide-selected v-model="travelFilterParams.warehouseOutFk"
option-label="name" />
option-value="id" <VnSelect
v-model="travelFilterParams.warehouseOutFk" :label="t('entry.basicData.warehouseIn')"
/> :options="warehousesOptions"
</div> hide-selected
<div class="col"> option-label="name"
<VnSelect option-value="id"
:label="t('entry.basicData.warehouseIn')" v-model="travelFilterParams.warehouseInFk"
:options="warehousesOptions" />
hide-selected <VnInputDate
option-label="name" :label="t('entry.basicData.shipped')"
option-value="id" v-model="travelFilterParams.shipped"
v-model="travelFilterParams.warehouseInFk" />
/> <VnInputDate
</div> :label="t('entry.basicData.landed')"
<div class="col"> v-model="travelFilterParams.landed"
<VnInputDate />
:label="t('entry.basicData.shipped')"
v-model="travelFilterParams.shipped"
/>
</div>
<div class="col">
<VnInputDate
:label="t('entry.basicData.landed')"
v-model="travelFilterParams.landed"
/>
</div>
</VnRow> </VnRow>
<div class="q-mt-lg row justify-end"> <div class="q-mt-lg row justify-end">
<QBtn <QBtn

View File

@ -50,13 +50,11 @@ const onDataSaved = (data) => {
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QInput
<QInput :label="t('Type the visible quantity')"
:label="t('Type the visible quantity')" v-model.number="data.quantity"
v-model.number="data.quantity" autofocus
autofocus />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <div class="col">

View File

@ -83,74 +83,66 @@ const transferInvoice = async () => {
> >
<template #form-inputs> <template #form-inputs>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Client')"
:label="t('Client')" :options="clientsOptions"
:options="clientsOptions" hide-selected
hide-selected option-label="name"
option-label="name" option-value="id"
option-value="id" v-model="transferInvoiceParams.newClientFk"
v-model="transferInvoiceParams.newClientFk" :required="true"
:required="true" >
> <template #option="scope">
<template #option="scope"> <QItem v-bind="scope.itemProps">
<QItem v-bind="scope.itemProps"> <QItemSection>
<QItemSection> <QItemLabel>
<QItemLabel> #{{ scope.opt?.id }} -
#{{ scope.opt?.id }} - {{ scope.opt?.name }}
{{ scope.opt?.name }} </QItemLabel>
</QItemLabel> </QItemSection>
</QItemSection> </QItem>
</QItem> </template>
</template> </VnSelect>
</VnSelect> <VnSelect
</div> :label="t('Rectificative type')"
<div class="col"> :options="rectificativeTypeOptions"
<VnSelect hide-selected
:label="t('Rectificative type')" option-label="description"
:options="rectificativeTypeOptions" option-value="id"
hide-selected v-model="transferInvoiceParams.cplusRectificationTypeFk"
option-label="description" :required="true"
option-value="id" />
v-model="transferInvoiceParams.cplusRectificationTypeFk"
:required="true"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Class')"
:label="t('Class')" :options="siiTypeInvoiceOutsOptions"
:options="siiTypeInvoiceOutsOptions" hide-selected
hide-selected option-label="description"
option-label="description" option-value="id"
option-value="id" v-model="transferInvoiceParams.siiTypeInvoiceOutFk"
v-model="transferInvoiceParams.siiTypeInvoiceOutFk" :required="true"
:required="true" >
> <template #option="scope">
<template #option="scope"> <QItem v-bind="scope.itemProps">
<QItem v-bind="scope.itemProps"> <QItemSection>
<QItemSection> <QItemLabel>
<QItemLabel> {{ scope.opt?.code }} -
{{ scope.opt?.code }} - {{ scope.opt?.description }}
{{ scope.opt?.description }} </QItemLabel>
</QItemLabel> </QItemSection>
</QItemSection> </QItem>
</QItem> </template>
</template> </VnSelect>
</VnSelect> <VnSelect
</div> :label="t('Type')"
<div class="col"> :options="invoiceCorrectionTypesOptions"
<VnSelect hide-selected
:label="t('Type')" option-label="description"
:options="invoiceCorrectionTypesOptions" option-value="id"
hide-selected v-model="transferInvoiceParams.invoiceCorrectionTypeFk"
option-label="description" :required="true"
option-value="id" />
v-model="transferInvoiceParams.invoiceCorrectionTypeFk"
:required="true"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormPopup> </FormPopup>

View File

@ -1,28 +1,16 @@
<template> <template>
<div class="q-pa-md"> <div class="q-pa-md">
<div class="row q-gutter-md q-mb-md"> <div class="row q-gutter-md q-mb-md">
<div class="col"> <QSkeleton type="QInput" square />
<QSkeleton type="QInput" square /> <QSkeleton type="QInput" square />
</div>
<div class="col">
<QSkeleton type="QInput" square />
</div>
</div> </div>
<div class="row q-gutter-md q-mb-md"> <div class="row q-gutter-md q-mb-md">
<div class="col"> <QSkeleton type="QInput" square />
<QSkeleton type="QInput" square /> <QSkeleton type="QInput" square />
</div>
<div class="col">
<QSkeleton type="QInput" square />
</div>
</div> </div>
<div class="row q-gutter-md q-mb-md"> <div class="row q-gutter-md q-mb-md">
<div class="col"> <QSkeleton type="QInput" square />
<QSkeleton type="QInput" square /> <QSkeleton type="QInput" square />
</div>
<div class="col">
<QSkeleton type="QInput" square />
</div>
</div> </div>
<div class="row q-gutter-md"> <div class="row q-gutter-md">
<QSkeleton type="QBtn" /> <QSkeleton type="QBtn" />

View File

@ -3,46 +3,36 @@
<QSkeleton type="rect" square /> <QSkeleton type="rect" square />
</div> </div>
<div class="row q-pa-md q-col-gutter-md q-mb-md"> <div class="row q-pa-md q-col-gutter-md q-mb-md">
<div class="col"> <QSkeleton type="rect" class="q-mb-md" square />
<QSkeleton type="rect" class="q-mb-md" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="rect" class="q-mb-md" square />
</div> <QSkeleton type="text" square />
<div class="col"> <QSkeleton type="text" square />
<QSkeleton type="rect" class="q-mb-md" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="rect" class="q-mb-md" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
</div> <QSkeleton type="text" square />
<div class="col"> <QSkeleton type="text" square />
<QSkeleton type="rect" class="q-mb-md" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="rect" class="q-mb-md" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
</div> <QSkeleton type="text" square />
<div class="col"> <QSkeleton type="rect" class="q-mb-md" square />
<QSkeleton type="rect" class="q-mb-md" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square /> <QSkeleton type="text" square />
<QSkeleton type="text" square />
</div>
<div class="col">
<QSkeleton type="rect" class="q-mb-md" square />
<QSkeleton type="text" square />
<QSkeleton type="text" square />
<QSkeleton type="text" square />
<QSkeleton type="text" square />
<QSkeleton type="text" square />
</div>
</div> </div>
</template> </template>

View File

@ -1,45 +1,20 @@
<template> <template>
<div class="q-pa-md w"> <div class="q-pa-md w">
<div class="row q-gutter-md q-mb-md"> <div class="row q-gutter-md q-mb-md">
<div class="col-1"> <QSkeleton type="rect" square />
<QSkeleton type="rect" square /> <QSkeleton type="rect" square />
</div> <QSkeleton type="rect" square />
<div class="col"> <QSkeleton type="rect" square />
<QSkeleton type="rect" square /> <QSkeleton type="rect" square />
</div> <QSkeleton type="rect" square />
<div class="col"> </div>
<QSkeleton type="rect" square /> <div class="row q-gutter-md q-mb-md" v-for="n in 5" :key="n">
</div> <QSkeleton type="QInput" square />
<div class="col"> <QSkeleton type="QInput" square />
<QSkeleton type="rect" square /> <QSkeleton type="QInput" square />
</div> <QSkeleton type="QInput" square />
<div class="col"> <QSkeleton type="QInput" square />
<QSkeleton type="rect" square /> <QSkeleton type="QInput" square />
</div>
<div class="col">
<QSkeleton type="rect" square />
</div>
</div>
<div class="row q-gutter-md q-mb-md" v-for="n in 5" :key="n">
<div class="col-1">
<QSkeleton type="QInput" square />
</div>
<div class="col">
<QSkeleton type="QInput" square />
</div>
<div class="col">
<QSkeleton type="QInput" square />
</div>
<div class="col">
<QSkeleton type="QInput" square />
</div>
<div class="col">
<QSkeleton type="QInput" square />
</div>
<div class="col">
<QSkeleton type="QInput" square />
</div>
</div> </div>
</div> </div>
</template> </template>

View File

@ -95,83 +95,71 @@ const statesFilter = {
> >
<template #form="{ data, validate, filter }"> <template #form="{ data, validate, filter }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.client.name"
v-model="data.client.name" :label="t('claim.basicData.customer')"
:label="t('claim.basicData.customer')" disable
disable />
/> <VnInputDate
</div> v-model="data.created"
<div class="col"> :label="t('claim.basicData.created')"
<VnInputDate />
v-model="data.created"
:label="t('claim.basicData.created')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('claim.basicData.assignedTo')"
:label="t('claim.basicData.assignedTo')" v-model="data.workerFk"
v-model="data.workerFk" :options="workersOptions"
:options="workersOptions" option-value="id"
option-value="id" option-label="name"
option-label="name" emit-value
emit-value auto-load
auto-load :rules="validate('claim.claimStateFk')"
:rules="validate('claim.claimStateFk')" >
> <template #before>
<template #before> <QAvatar color="orange">
<QAvatar color="orange"> <QImg
<QImg v-if="data.workerFk"
v-if="data.workerFk" :src="`/api/Images/user/160x160/${data.workerFk}/download?access_token=${token}`"
:src="`/api/Images/user/160x160/${data.workerFk}/download?access_token=${token}`" spinner-color="white"
spinner-color="white" />
/> </QAvatar>
</QAvatar> </template>
</template> </VnSelect>
</VnSelect> <QSelect
</div> v-model="data.claimStateFk"
<div class="col"> :options="claimStates"
<QSelect option-value="id"
v-model="data.claimStateFk" option-label="description"
:options="claimStates" emit-value
option-value="id" :label="t('claim.basicData.state')"
option-label="description" map-options
emit-value use-input
:label="t('claim.basicData.state')" @filter="(value, update) => filter(value, update, statesFilter)"
map-options :rules="validate('claim.claimStateFk')"
use-input :input-debounce="0"
@filter="(value, update) => filter(value, update, statesFilter)" >
:rules="validate('claim.claimStateFk')" </QSelect>
:input-debounce="0"
>
</QSelect>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QInput
<QInput v-model.number="data.packages"
v-model.number="data.packages" :label="t('globals.packages')"
:label="t('globals.packages')" :rules="validate('claim.packages')"
:rules="validate('claim.packages')" type="number"
type="number" />
/> <QSelect
</div> v-model="data.pickup"
<div class="col"> :options="optionsList"
<QSelect option-value="id"
v-model="data.pickup" option-label="description"
:options="optionsList" emit-value
option-value="id" :label="t('claim.basicData.pickup')"
option-label="description" map-options
emit-value use-input
:label="t('claim.basicData.pickup')" :input-debounce="0"
map-options >
use-input </QSelect>
:input-debounce="0"
>
</QSelect>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -70,138 +70,121 @@ 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 class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('Comercial name')"
:label="t('Comercial name')" :rules="validate('client.socialName')"
:rules="validate('client.socialName')" autofocus
autofocus clearable
clearable v-model="data.name"
v-model="data.name" />
/>
</div> <QSelect
<div class="col"> :input-debounce="0"
<QSelect :label="t('customer.basicData.businessType')"
:input-debounce="0" :options="businessTypes"
:label="t('customer.basicData.businessType')" :rules="validate('client.businessTypeFk')"
:options="businessTypes" emit-value
:rules="validate('client.businessTypeFk')" map-options
emit-value option-label="description"
map-options option-value="code"
option-label="description" v-model="data.businessTypeFk"
option-value="code" />
v-model="data.businessTypeFk"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('customer.basicData.contact')"
:label="t('customer.basicData.contact')" :rules="validate('client.contact')"
:rules="validate('client.contact')" clearable
clearable v-model="data.contact"
v-model="data.contact" />
/> <VnInput
</div> :label="t('customer.basicData.email')"
<div class="col"> :rules="validate('client.email')"
<VnInput clearable
:label="t('customer.basicData.email')" type="email"
:rules="validate('client.email')" v-model="data.email"
clearable >
type="email" <template #append>
v-model="data.email" <QIcon name="info" class="cursor-info">
> <QTooltip>{{
<template #append> t('customer.basicData.youCanSaveMultipleEmails')
<QIcon name="info" class="cursor-info"> }}</QTooltip>
<QTooltip>{{ </QIcon>
t('customer.basicData.youCanSaveMultipleEmails') </template>
}}</QTooltip> </VnInput>
</QIcon>
</template>
</VnInput>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('customer.basicData.phone')"
:label="t('customer.basicData.phone')" :rules="validate('client.phone')"
:rules="validate('client.phone')" clearable
clearable v-model="data.phone"
v-model="data.phone" />
/> <VnInput
</div> :label="t('customer.basicData.mobile')"
<div class="col"> :rules="validate('client.mobile')"
<VnInput clearable
:label="t('customer.basicData.mobile')" v-model="data.mobile"
:rules="validate('client.mobile')" />
clearable
v-model="data.mobile"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QSelect
<QSelect :input-debounce="0"
:input-debounce="0" :label="t('customer.basicData.salesPerson')"
:label="t('customer.basicData.salesPerson')" :options="workers"
:options="workers" :rules="validate('client.salesPersonFk')"
:rules="validate('client.salesPersonFk')" @filter="(value, update) => filter(value, update, filterOptions)"
@filter="(value, update) => filter(value, update, filterOptions)" emit-value
emit-value map-options
map-options option-label="name"
option-label="name" option-value="id"
option-value="id" use-input
use-input v-model="data.salesPersonFk"
v-model="data.salesPersonFk" >
> <template #prepend>
<template #prepend> <QAvatar color="orange">
<QAvatar color="orange"> <QImg
<QImg :src="`/api/Images/user/160x160/${data.salesPersonFk}/download?access_token=${token}`"
:src="`/api/Images/user/160x160/${data.salesPersonFk}/download?access_token=${token}`" spinner-color="white"
spinner-color="white" v-if="data.salesPersonFk"
v-if="data.salesPersonFk" />
/> </QAvatar>
</QAvatar> </template>
</template> </QSelect>
</QSelect> <QSelect
</div> v-model="data.contactChannelFk"
<div class="col"> :options="contactChannels"
<QSelect option-value="id"
:input-debounce="0" option-label="name"
:label="t('customer.basicData.contactChannel')" emit-value
:options="contactChannels" :label="t('customer.basicData.contactChannel')"
:rules="validate('client.contactChannelFk')" map-options
emit-value :rules="validate('client.contactChannelFk')"
map-options :input-debounce="0"
option-label="name" />
option-value="id"
v-model="data.contactChannelFk"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QSelect
<QSelect :input-debounce="0"
:input-debounce="0" :label="t('customer.basicData.previousClient')"
:label="t('customer.basicData.previousClient')" :options="clients"
:options="clients" :rules="validate('client.transferorFk')"
:rules="validate('client.transferorFk')" emit-value
emit-value map-options
map-options option-label="name"
option-label="name" option-value="id"
option-value="id" v-model="data.transferorFk"
v-model="data.transferorFk" >
> <template #append>
<template #append> <QIcon name="info" class="cursor-pointer">
<QIcon name="info" class="cursor-pointer"> <QTooltip>{{
<QTooltip>{{ t(
t( 'In case of a company succession, specify the grantor company'
'In case of a company succession, specify the grantor company' )
) }}</QTooltip>
}}</QTooltip> </QIcon>
</QIcon> </template>
</template> </QSelect>
</QSelect>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -48,74 +48,56 @@ const getBankEntities = (data, formData) => {
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Billing data')"
:label="t('Billing data')" :options="payMethods"
:options="payMethods" hide-selected
hide-selected option-label="name"
option-label="name" option-value="id"
option-value="id" v-model="data.payMethod"
v-model="data.payMethod" />
/> <VnInput :label="t('Due day')" clearable v-model="data.dueDay" />
</div>
<div class="col">
<VnInput :label="t('Due day')" clearable v-model="data.dueDay" />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <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"> <QTooltip>{{ t('components.iban_tooltip') }}</QTooltip>
<QTooltip>{{ t('components.iban_tooltip') }}</QTooltip> </QIcon>
</QIcon> </template>
</template> </VnInput>
</VnInput> <VnSelectDialog
</div> :label="t('Swift / BIC')"
<div class="col"> :options="bankEntitiesOptions"
<VnSelectDialog :roles-allowed-to-create="['salesAssistant', 'hr']"
:label="t('Swift / BIC')" :rules="validate('Worker.bankEntity')"
:options="bankEntitiesOptions" hide-selected
:roles-allowed-to-create="['salesAssistant', 'hr']" option-label="name"
:rules="validate('Worker.bankEntity')" option-value="id"
hide-selected v-model="data.bankEntityFk"
option-label="name" >
option-value="id" <template #form>
v-model="data.bankEntityFk" <CreateBankEntityForm
> @on-data-saved="getBankEntities($event, data)"
<template #form> />
<CreateBankEntityForm </template>
@on-data-saved="getBankEntities($event, data)" <template #option="scope">
/> <QItem v-bind="scope.itemProps">
</template> <QItemSection v-if="scope.opt">
<template #option="scope"> <QItemLabel
<QItem v-bind="scope.itemProps"> >{{ scope.opt.bic }} {{ scope.opt.name }}</QItemLabel
<QItemSection v-if="scope.opt"> >
<QItemLabel </QItemSection>
>{{ scope.opt.bic }} </QItem>
{{ scope.opt.name }}</QItemLabel </template>
> </VnSelectDialog>
</QItemSection>
</QItem>
</template>
</VnSelectDialog>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <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" />
</div> <QCheckbox :label="t('VNL B2B received')" v-model="data.hasSepaVnl" />
<div class="col">
<QCheckbox
:label="t('VNL core received')"
v-model="data.hasCoreVnl"
/>
</div>
<div class="col">
<QCheckbox :label="t('VNL B2B received')" v-model="data.hasSepaVnl" />
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -41,150 +41,109 @@ function handleLocation(data, location) {
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('Social name')"
:label="t('Social name')" :required="true"
:required="true" :rules="validate('client.socialName')"
:rules="validate('client.socialName')" clearable
clearable v-model="data.socialName"
v-model="data.socialName" >
> <template #append>
<template #append> <QIcon name="info" class="cursor-info">
<QIcon name="info" class="cursor-info"> <QTooltip>{{ t('onlyLetters') }}</QTooltip>
<QTooltip>{{ t('onlyLetters') }}</QTooltip> </QIcon>
</QIcon> </template>
</template> </VnInput>
</VnInput> <VnInput :label="t('Tax number')" clearable v-model="data.fi" />
</div>
<div class="col">
<VnInput :label="t('Tax number')" clearable v-model="data.fi" />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput :label="t('Street')" clearable v-model="data.street" />
<VnInput :label="t('Street')" clearable v-model="data.street" />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Sage tax type')"
:label="t('Sage tax type')" :options="typesTaxes"
:options="typesTaxes" hide-selected
hide-selected option-label="vat"
option-label="vat" option-value="id"
option-value="id" v-model="data.sageTaxTypeFk"
v-model="data.sageTaxTypeFk" />
/> <VnSelect
</div> :label="t('Sage transaction type')"
<div class="col"> :options="typesTransactions"
<VnSelect hide-selected
:label="t('Sage transaction type')" option-label="transaction"
:options="typesTransactions" option-value="id"
hide-selected v-model="data.sageTransactionTypeFk"
option-label="transaction" >
option-value="id" <template #option="scope">
v-model="data.sageTransactionTypeFk" <QItem v-bind="scope.itemProps">
> <QItemSection>
<template #option="scope"> <QItemLabel>{{ scope.opt.name }}</QItemLabel>
<QItem v-bind="scope.itemProps"> <QItemLabel caption>
<QItemSection> {{ `${scope.opt.id}: ${scope.opt.transaction}` }}
<QItemLabel>{{ scope.opt.name }}</QItemLabel> </QItemLabel>
<QItemLabel caption> </QItemSection>
{{ `${scope.opt.id}: ${scope.opt.transaction}` }} </QItem>
</QItemLabel> </template>
</QItemSection> </VnSelect>
</QItem>
</template>
</VnSelect>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnLocation
<VnLocation :rules="validate('Worker.postcode')"
:rules="validate('Worker.postcode')" :roles-allowed-to-create="['deliveryAssistant']"
:roles-allowed-to-create="['deliveryAssistant']" :options="postcodesOptions"
:options="postcodesOptions" v-model="data.postcode"
v-model="data.postcode" @update:model-value="(location) => handleLocation(data, location)"
@update:model-value="(location) => handleLocation(data, location)" >
> </VnLocation>
</VnLocation>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox :label="t('Active')" v-model="data.isActive" />
<QCheckbox :label="t('Active')" v-model="data.isActive" /> <QCheckbox :label="t('Frozen')" v-model="data.isFreezed" />
</div>
<div class="col">
<QCheckbox :label="t('Frozen')" v-model="data.isFreezed" />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox :label="t('Has to invoice')" v-model="data.hasToInvoice" />
<QCheckbox :label="t('Has to invoice')" v-model="data.hasToInvoice" /> <QCheckbox :label="t('Vies')" v-model="data.isVies" />
</div> <QIcon name="info" class="cursor-info q-ml-sm" size="sm">
<div class="col"> <QTooltip>
<QCheckbox :label="t('Vies')" v-model="data.isVies" /> {{ t('whenActivatingIt') }}
<QIcon name="info" class="cursor-info q-ml-sm" size="sm"> </QTooltip>
<QTooltip> </QIcon>
{{ t('whenActivatingIt') }}
</QTooltip>
</QIcon>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox :label="t('Notify by email')" v-model="data.isToBeMailed" />
<QCheckbox <QCheckbox
:label="t('Notify by email')" :label="t('Invoice by address')"
v-model="data.isToBeMailed" v-model="data.hasToInvoiceByAddress"
/> />
</div>
<div class="col">
<QCheckbox
:label="t('Invoice by address')"
v-model="data.hasToInvoiceByAddress"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox :label="t('Is equalizated')" v-model="data.isEqualizated" />
<QCheckbox <QIcon class="cursor-info q-ml-sm" name="info" size="sm">
:label="t('Is equalizated')" <QTooltip>
v-model="data.isEqualizated" {{ t('inOrderToInvoice') }}
/> </QTooltip>
<QIcon class="cursor-info q-ml-sm" name="info" size="sm"> </QIcon>
<QTooltip> <QCheckbox :label="t('Verified data')" v-model="data.isTaxDataChecked" />
{{ t('inOrderToInvoice') }}
</QTooltip>
</QIcon>
</div>
<div class="col">
<QCheckbox
:label="t('Verified data')"
v-model="data.isTaxDataChecked"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox
<QCheckbox :label="t('Incoterms authorization')"
:label="t('Incoterms authorization')" v-model="data.hasIncoterms"
v-model="data.hasIncoterms" />
/> <QCheckbox
</div> :label="t('Electronic invoice')"
<div class="col"> v-model="data.hasElectronicInvoice"
<QCheckbox />
:label="t('Electronic invoice')"
v-model="data.hasElectronicInvoice"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -49,89 +49,69 @@ function handleLocation(data, location) {
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QInput :label="t('Comercial name')" v-model="data.name" />
<QInput :label="t('Comercial name')" v-model="data.name" /> <VnSelect
</div> :label="t('Salesperson')"
<div class="col"> :options="workersOptions"
<VnSelect hide-selected
:label="t('Salesperson')" option-label="name"
:options="workersOptions" option-value="id"
hide-selected v-model="data.salesPersonFk"
option-label="name" />
option-value="id"
v-model="data.salesPersonFk"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Business type')"
:label="t('Business type')" :options="businessTypesOptions"
:options="businessTypesOptions" hide-selected
hide-selected option-label="description"
option-label="description" option-value="code"
option-value="code" v-model="data.businessTypeFk"
v-model="data.businessTypeFk" />
/> <QInput v-model="data.fi" :label="t('Tax number')" />
</div>
<div class="col">
<QInput v-model="data.fi" :label="t('Tax number')" />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <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" />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QInput
<QInput :label="t('Street')"
:label="t('Street')" :rules="validate('client.street')"
:rules="validate('client.street')" v-model="data.street"
v-model="data.street" />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnLocation
<VnLocation :rules="validate('Worker.postcode')"
:rules="validate('Worker.postcode')" :roles-allowed-to-create="['deliveryAssistant']"
:roles-allowed-to-create="['deliveryAssistant']" :options="postcodesOptions"
:options="postcodesOptions" v-model="data.location"
v-model="data.location" @update:model-value="(location) => handleLocation(data, location)"
@update:model-value=" >
(location) => handleLocation(data, location) </VnLocation>
"
>
</VnLocation>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QInput v-model="data.userName" :label="t('Web user')" />
<QInput v-model="data.userName" :label="t('Web user')" /> <QInput
</div> :label="t('Email')"
<div class="col"> :rules="validate('client.email')"
<QInput clearable
:label="t('Email')" type="email"
:rules="validate('client.email')" v-model="data.email"
clearable >
type="email" <template #append>
v-model="data.email" <QIcon name="info" class="cursor-info">
> <QTooltip max-width="400px">{{
<template #append> t('customer.basicData.youCanSaveMultipleEmails')
<QIcon name="info" class="cursor-info"> }}</QTooltip>
<QTooltip max-width="400px">{{ </QIcon>
t('customer.basicData.youCanSaveMultipleEmails') </template>
}}</QTooltip> </QInput>
</QIcon>
</template>
</QInput>
</div>
</VnRow> </VnRow>
<QCheckbox <QCheckbox
:label="t('Is equalizated')" :label="t('Is equalizated')"

View File

@ -61,13 +61,11 @@ const onSubmit = async () => {
}} }}
</div> </div>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QInput
<QInput :label="t('Message')"
:label="t('Message')" type="textarea"
type="textarea" v-model="newObservation"
v-model="newObservation" />
/>
</div>
</VnRow> </VnRow>
<div class="q-mt-lg row justify-end"> <div class="q-mt-lg row justify-end">
<QBtn <QBtn

View File

@ -56,33 +56,25 @@ const toCustomerGreuges = () => {
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('Amount')"
:label="t('Amount')" clearable
clearable type="number"
type="number" v-model="data.amount"
v-model="data.amount" />
/> <VnInputDate :label="t('Date')" v-model="data.shipped" />
</div>
<div class="col">
<VnInputDate :label="t('Date')" v-model="data.shipped" />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput :label="t('Comment')" clearable v-model="data.description" />
<VnInput :label="t('Comment')" clearable v-model="data.description" /> <VnSelect
</div> :label="t('Type')"
<div class="col"> :options="greugeTypes"
<VnSelect hide-selected
:label="t('Type')" option-label="name"
:options="greugeTypes" option-value="id"
hide-selected v-model="data.greugeTypeFk"
option-label="name" />
option-value="id"
v-model="data.greugeTypeFk"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -24,30 +24,22 @@ const onDataSaved = (dataSaved) => {
> >
<template #form-inputs="{ data }"> <template #form-inputs="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('NIF')"
:label="t('NIF')" :required="true"
:required="true" clearable
clearable v-model="data.nif"
v-model="data.nif" />
/> <VnInput
</div> :label="t('Fiscal name')"
<div class="col"> :required="true"
<VnInput clearable
:label="t('Fiscal name')" v-model="data.fiscalName"
:required="true" />
clearable
v-model="data.fiscalName"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <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" />
</div>
<div class="col">
<VnInput :label="t('Phone')" clearable v-model="data.phone" />
</div>
</VnRow> </VnRow>
</template> </template>
</FormModelPopup> </FormModelPopup>

View File

@ -135,60 +135,52 @@ 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 class="row q-gutter-md q-mb-md">
<div class="col"> <VnInputDate
<VnInputDate :label="t('Date')"
:label="t('Date')" :required="true"
:required="true" v-model="data.payed"
v-model="data.payed" />
/> <VnSelect
</div> :label="t('Company')"
<div class="col"> :options="companyOptions"
<VnSelect :required="true"
:label="t('Company')" :rules="validate('entry.companyFk')"
:options="companyOptions" hide-selected
:required="true" option-label="code"
:rules="validate('entry.companyFk')" option-value="id"
hide-selected v-model="data.companyFk"
option-label="code" />
option-value="id"
v-model="data.companyFk"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Bank')"
:label="t('Bank')" :options="bankOptions"
:options="bankOptions" :required="true"
:required="true" @update:model-value="setPaymentType($event)"
@update:model-value="setPaymentType($event)" hide-selected
hide-selected option-label="bank"
option-label="bank" option-value="id"
option-value="id" v-model="data.bankFk"
v-model="data.bankFk" >
> <template #option="scope">
<template #option="scope"> <QItem v-bind="scope.itemProps">
<QItem v-bind="scope.itemProps"> <QItemSection>
<QItemSection> <QItemLabel>
<QItemLabel> {{ scope.opt.id }}:&ensp;{{ scope.opt.bank }}
{{ scope.opt.id }}:&ensp;{{ scope.opt.bank }} </QItemLabel>
</QItemLabel> </QItemSection>
</QItemSection> </QItem>
</QItem> </template>
</template> </VnSelect>
</VnSelect> <VnInput
</div> :label="t('Amount')"
<div class="col"> :required="true"
<VnInput @update:model-value="calculateFromAmount($event)"
:label="t('Amount')" clearable
:required="true" type="number"
@update:model-value="calculateFromAmount($event)" v-model.number="data.amountPaid"
clearable />
type="number"
v-model.number="data.amountPaid"
/>
</div>
</VnRow> </VnRow>
<div class="text-h6" v-if="data.bankFk === 3 || data.bankFk === 3117"> <div class="text-h6" v-if="data.bankFk === 3 || data.bankFk === 3117">
@ -203,47 +195,37 @@ const onDataSaved = async () => {
v-model="data.compensationAccount" v-model="data.compensationAccount"
/> />
</div> </div>
<div class="col"> <VnInput
<VnInput :label="t('Reference')"
:label="t('Reference')" :required="true"
:required="true" clearable
clearable v-model="data.description"
v-model="data.description" />
/>
</div>
</VnRow> </VnRow>
<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 class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('Delivered amount')"
:label="t('Delivered amount')" @update:model-value="calculateFromDeliveredAmount($event)"
@update:model-value="calculateFromDeliveredAmount($event)" clearable
clearable type="number"
type="number" v-model="deliveredAmount"
v-model="deliveredAmount" />
/> <VnInput
</div> :label="t('Amount to return')"
<div class="col"> clearable
<VnInput disable
:label="t('Amount to return')" type="number"
clearable v-model="amountToReturn"
disable />
type="number"
v-model="amountToReturn"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox v-model="viewRecipt" />
<QCheckbox v-model="viewRecipt" /> <QCheckbox v-model="sendEmail" />
</div>
<div class="col">
<QCheckbox v-model="sendEmail" />
</div>
</VnRow> </VnRow>
</div> </div>

View File

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

View File

@ -50,31 +50,23 @@ const toCustomerRecoveries = () => {
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInputDate :label="t('Since')" v-model="data.started" />
<VnInputDate :label="t('Since')" v-model="data.started" /> <VnInputDate :label="t('To')" v-model="data.finished" />
</div>
<div class="col">
<VnInputDate :label="t('To')" v-model="data.finished" />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('Amount')"
:label="t('Amount')" clearable
clearable type="number"
type="number" v-model="data.amount"
v-model="data.amount" />
/> <VnInput
</div> :label="t('Period')"
<div class="col"> clearable
<VnInput type="number"
:label="t('Period')" v-model="data.period"
clearable />
type="number"
v-model="data.period"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -30,105 +30,83 @@ const clientsOptions = ref([]);
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('department.name')"
:label="t('department.name')" v-model="data.name"
v-model="data.name" :rules="validate('department.name')"
:rules="validate('department.name')" clearable
clearable autofocus
autofocus />
/> <VnInput
</div> v-model="data.code"
<div class="col"> :label="t('department.code')"
<VnInput :rules="validate('department.code')"
v-model="data.code" clearable
:label="t('department.code')" />
:rules="validate('department.code')"
clearable
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('department.chat')"
:label="t('department.chat')" v-model="data.chatName"
v-model="data.chatName" :rules="validate('department.chat')"
:rules="validate('department.chat')" clearable
clearable />
/> <VnInput
</div> v-model="data.notificationEmail"
<div class="col"> :label="t('department.email')"
<VnInput :rules="validate('department.email')"
v-model="data.notificationEmail" clearable
:label="t('department.email')" />
:rules="validate('department.email')"
clearable
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('department.bossDepartment')"
:label="t('department.bossDepartment')" v-model="data.workerFk"
v-model="data.workerFk" :options="workersOptions"
:options="workersOptions" option-value="id"
option-value="id" option-label="name"
option-label="name" hide-selected
hide-selected map-options
map-options :rules="validate('department.workerFk')"
:rules="validate('department.workerFk')" />
/> <VnSelect
</div> :label="t('department.selfConsumptionCustomer')"
<div class="col"> v-model="data.clientFk"
<VnSelect :options="clientsOptions"
:label="t('department.selfConsumptionCustomer')" option-value="id"
v-model="data.clientFk" option-label="name"
:options="clientsOptions" hide-selected
option-value="id" map-options
option-label="name" :rules="validate('department.clientFk')"
hide-selected />
map-options
:rules="validate('department.clientFk')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox
<QCheckbox :label="t('department.telework')"
:label="t('department.telework')" v-model="data.isTeleworking"
v-model="data.isTeleworking" />
/> <QCheckbox
</div> :label="t('department.notifyOnErrors')"
<div class="col"> v-model="data.hasToMistake"
<QCheckbox :false-value="0"
:label="t('department.notifyOnErrors')" :true-value="1"
v-model="data.hasToMistake" />
:false-value="0"
:true-value="1"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox
<QCheckbox :label="t('department.worksInProduction')"
:label="t('department.worksInProduction')" v-model="data.isProduction"
v-model="data.isProduction" />
/> <QCheckbox
</div> :label="t('department.hasToRefill')"
<div class="col"> v-model="data.hasToRefill"
<QCheckbox />
:label="t('department.hasToRefill')"
v-model="data.hasToRefill"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox
<QCheckbox :label="t('department.hasToSendMail')"
:label="t('department.hasToSendMail')" v-model="data.hasToSendMail"
v-model="data.hasToSendMail" />
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -68,152 +68,126 @@ const onFilterTravelSelected = (formData, id) => {
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('entry.basicData.supplier')"
:label="t('entry.basicData.supplier')" v-model="data.supplierFk"
v-model="data.supplierFk" :options="suppliersOptions"
:options="suppliersOptions" option-value="id"
option-value="id" option-label="nickname"
option-label="nickname" hide-selected
hide-selected :required="true"
:required="true" map-options
map-options >
> <template #option="scope">
<template #option="scope"> <QItem v-bind="scope.itemProps">
<QItem v-bind="scope.itemProps"> <QItemSection>
<QItemSection> <QItemLabel>{{ scope.opt?.name }}</QItemLabel>
<QItemLabel>{{ scope.opt?.name }}</QItemLabel> <QItemLabel caption>
<QItemLabel caption> {{ scope.opt?.nickname }}, {{ scope.opt?.id }}
{{ scope.opt?.nickname }}, {{ scope.opt?.id }} </QItemLabel>
</QItemLabel> </QItemSection>
</QItemSection> </QItem>
</QItem> </template>
</template> </VnSelect>
</VnSelect> <VnSelectDialog
</div> :label="t('entry.basicData.travel')"
<div class="col"> v-model="data.travelFk"
<VnSelectDialog :options="travelsOptions"
:label="t('entry.basicData.travel')" option-value="id"
v-model="data.travelFk" option-label="warehouseInName"
:options="travelsOptions" map-options
option-value="id" hide-selected
option-label="warehouseInName" :required="true"
map-options action-icon="filter_alt"
hide-selected >
:required="true" <template #form>
action-icon="filter_alt" <FilterTravelForm
> @travel-selected="onFilterTravelSelected(data, $event)"
<template #form> />
<FilterTravelForm </template>
@travel-selected="onFilterTravelSelected(data, $event)" <template #option="scope">
/> <QItem v-bind="scope.itemProps">
</template> <QItemSection>
<template #option="scope"> <QItemLabel
<QItem v-bind="scope.itemProps"> >{{ scope.opt?.agencyModeName }} -
<QItemSection> {{ scope.opt?.warehouseInName }} ({{
<QItemLabel toDate(scope.opt?.shipped)
>{{ scope.opt?.agencyModeName }} - }}) &#x2192; {{ scope.opt?.warehouseOutName }} ({{
{{ scope.opt?.warehouseInName }} ({{ toDate(scope.opt?.landed)
toDate(scope.opt?.shipped) }})</QItemLabel
}}) &#x2192; {{ scope.opt?.warehouseOutName }} ({{ >
toDate(scope.opt?.landed) </QItemSection>
}})</QItemLabel </QItem>
> </template>
</QItemSection> </VnSelectDialog>
</QItem>
</template>
</VnSelectDialog>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.reference"
v-model="data.reference" :label="t('entry.basicData.reference')"
:label="t('entry.basicData.reference')" />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.invoiceNumber"
v-model="data.invoiceNumber" :label="t('entry.basicData.invoiceNumber')"
:label="t('entry.basicData.invoiceNumber')" />
/> <VnSelect
</div> :label="t('entry.basicData.company')"
<div class="col"> v-model="data.companyFk"
<VnSelect :options="companiesOptions"
:label="t('entry.basicData.company')" option-value="id"
v-model="data.companyFk" option-label="code"
:options="companiesOptions" map-options
option-value="id" hide-selected
option-label="code" :required="true"
map-options />
hide-selected
:required="true"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('entry.basicData.currency')"
:label="t('entry.basicData.currency')" v-model="data.currencyFk"
v-model="data.currencyFk" :options="currenciesOptions"
:options="currenciesOptions" option-value="id"
option-value="id" option-label="code"
option-label="code" />
/> <QInput
</div> :label="t('entry.basicData.commission')"
<div class="col"> v-model="data.commission"
<QInput type="number"
:label="t('entry.basicData.commission')" autofocus
v-model="data.commission" min="0"
type="number" />
autofocus
min="0"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QInput
<QInput :label="t('entry.basicData.observation')"
:label="t('entry.basicData.observation')" type="textarea"
type="textarea" v-model="data.observation"
v-model="data.observation" :maxlength="45"
:maxlength="45" counter
counter fill-input
fill-input />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox
<QCheckbox v-model="data.isOrdered"
v-model="data.isOrdered" :label="t('entry.basicData.ordered')"
:label="t('entry.basicData.ordered')" />
/> <QCheckbox
</div> v-model="data.isConfirmed"
<div class="col"> :label="t('entry.basicData.confirmed')"
<QCheckbox />
v-model="data.isConfirmed" <QCheckbox
:label="t('entry.basicData.confirmed')" v-model="data.isExcludedFromAvailable"
/> :label="t('entry.basicData.excludedFromAvailable')"
</div> />
<div class="col"> <QCheckbox v-model="data.isRaid" :label="t('entry.basicData.raid')" />
<QCheckbox <QCheckbox
v-model="data.isExcludedFromAvailable" v-if="isAdministrative()"
:label="t('entry.basicData.excludedFromAvailable')" v-model="data.isBooked"
/> :label="t('entry.basicData.booked')"
</div> />
<div class="col">
<QCheckbox v-model="data.isRaid" :label="t('entry.basicData.raid')" />
</div>
<div class="col">
<QCheckbox
v-if="isAdministrative()"
v-model="data.isBooked"
:label="t('entry.basicData.booked')"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -198,44 +198,38 @@ const redirectToBuysView = () => {
</Teleport> </Teleport>
<QCard class="q-pa-lg"> <QCard class="q-pa-lg">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QFile
<QFile ref="inputFileRef"
ref="inputFileRef" :label="t('entry.buys.file')"
:label="t('entry.buys.file')" v-model="importData.file"
v-model="importData.file" :multiple="false"
:multiple="false" accept=".json"
accept=".json" @update:model-value="onFileChange($event)"
@update:model-value="onFileChange($event)" class="required"
class="required" >
> <template #append>
<template #append> <QIcon
<QIcon name="vn:attach"
name="vn:attach" class="cursor-pointer"
class="cursor-pointer" @click="inputFileRef.pickFiles()"
@click="inputFileRef.pickFiles()" >
> <QTooltip>{{ t('globals.selectFile') }}</QTooltip>
<QTooltip>{{ t('globals.selectFile') }}</QTooltip> </QIcon>
</QIcon> </template>
</template> </QFile>
</QFile>
</div>
</VnRow> </VnRow>
<div v-if="importData.file"> <div v-if="importData.file">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('entry.buys.reference')"
:label="t('entry.buys.reference')" v-model="importData.ref"
v-model="importData.ref" />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('entry.buys.observations')"
:label="t('entry.buys.observations')" v-model="importData.observation"
v-model="importData.observation" />
/>
</div>
</VnRow> </VnRow>
<VnRow> <VnRow>
<QTable :columns="columns" :rows="importData.buys"> <QTable :columns="columns" :rows="importData.buys">

View File

@ -79,78 +79,71 @@ const redirectToEntryBasicData = (_, { id }) => {
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Supplier')"
:label="t('Supplier')" class="full-width"
class="full-width" v-model="data.supplierFk"
v-model="data.supplierFk" :options="suppliersOptions"
:options="suppliersOptions" option-value="id"
option-value="id" option-label="nickname"
option-label="nickname" hide-selected
hide-selected :required="true"
:required="true" :rules="validate('entry.supplierFk')"
:rules="validate('entry.supplierFk')" >
> <template #option="scope">
<template #option="scope"> <QItem v-bind="scope.itemProps">
<QItem v-bind="scope.itemProps"> <QItemSection>
<QItemSection> <QItemLabel>{{ scope.opt?.nickname }}</QItemLabel>
<QItemLabel>{{ scope.opt?.nickname }}</QItemLabel> <QItemLabel caption>
<QItemLabel caption> #{{ scope.opt?.id }}
#{{ scope.opt?.id }} </QItemLabel>
</QItemLabel> </QItemSection>
</QItemSection> </QItem>
</QItem> </template>
</template> </VnSelect>
</VnSelect>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Travel')"
:label="t('Travel')" class="full-width"
class="full-width" v-model="data.travelFk"
v-model="data.travelFk" :options="travelsOptions"
:options="travelsOptions" option-value="id"
option-value="id" option-label="warehouseInName"
option-label="warehouseInName" map-options
map-options hide-selected
hide-selected :required="true"
:required="true" :rules="validate('entry.travelFk')"
:rules="validate('entry.travelFk')" >
> <template #option="scope">
<template #option="scope"> <QItem v-bind="scope.itemProps">
<QItem v-bind="scope.itemProps"> <QItemSection>
<QItemSection> <QItemLabel
<QItemLabel >{{ scope.opt?.agencyModeName }} -
>{{ scope.opt?.agencyModeName }} - {{ scope.opt?.warehouseInName }} ({{
{{ scope.opt?.warehouseInName }} ({{ toDate(scope.opt?.shipped)
toDate(scope.opt?.shipped) }}) &#x2192; {{ scope.opt?.warehouseOutName }} ({{
}}) &#x2192; toDate(scope.opt?.landed)
{{ scope.opt?.warehouseOutName }} ({{ }})</QItemLabel
toDate(scope.opt?.landed) >
}})</QItemLabel </QItemSection>
> </QItem>
</QItemSection> </template>
</QItem> </VnSelect>
</template>
</VnSelect>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Company')"
:label="t('Company')" class="full-width"
class="full-width" v-model="data.companyFk"
v-model="data.companyFk" :options="companiesOptions"
:options="companiesOptions" option-value="id"
option-value="id" option-label="code"
option-label="code" map-options
map-options hide-selected
hide-selected :required="true"
:required="true" :rules="validate('entry.companyFk')"
:rules="validate('entry.companyFk')" />
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -182,252 +182,225 @@ async function upsert() {
> >
<template #form="{ data }"> <template #form="{ data }">
<div class="row q-gutter-md q-mb-md"> <div class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('supplierFk')"
:label="t('supplierFk')" v-model="data.supplierFk"
v-model="data.supplierFk" option-value="id"
option-value="id" option-label="nickname"
option-label="nickname" url="Suppliers"
url="Suppliers" :fields="['id', 'nickname']"
:fields="['id', 'nickname']" sort-by="nickname"
sort-by="nickname" :is-clearable="false"
:is-clearable="false" >
> <template #option="scope">
<template #option="scope"> <QItem v-bind="scope.itemProps">
<QItem v-bind="scope.itemProps"> <QItemSection>
<QItemSection> <QItemLabel>{{
<QItemLabel>{{ `${scope.opt.id} - ${scope.opt.nickname}`
`${scope.opt.id} - ${scope.opt.nickname}` }}</QItemLabel>
}}</QItemLabel> </QItemSection>
</QItemSection> </QItem>
</QItem> </template>
</template> </VnSelect>
</VnSelect> <QInput
</div> clearable
<div class="col"> clear-icon="close"
<QInput :label="t('Supplier ref')"
clearable v-model="data.supplierRef"
clear-icon="close" />
:label="t('Supplier ref')"
v-model="data.supplierRef"
/>
</div>
</div> </div>
<div class="row q-gutter-md q-mb-md"> <div class="row q-gutter-md q-mb-md">
<div class="col"> <QInput
<QInput :label="t('Expedition date')"
:label="t('Expedition date')" v-model="data.issued"
v-model="data.issued" :mask="dateMask"
:mask="dateMask" >
> <template #append>
<template #append> <QIcon name="event" class="cursor-pointer" :fill-mask="fillMask">
<QIcon <QPopupProxy
name="event" cover
class="cursor-pointer" transition-show="scale"
:fill-mask="fillMask" transition-hide="scale"
> >
<QPopupProxy <QDate v-model="data.issued">
cover <div class="row items-center justify-end">
transition-show="scale" <QBtn
transition-hide="scale" v-close-popup
> label="Close"
<QDate v-model="data.issued"> color="primary"
<div class="row items-center justify-end"> flat
<QBtn />
v-close-popup </div>
label="Close" </QDate>
color="primary" </QPopupProxy>
flat </QIcon>
/> </template>
</div> </QInput>
</QDate> <QInput
</QPopupProxy> :label="t('Operation date')"
</QIcon> v-model="data.operated"
</template> :mask="dateMask"
</QInput> :fill-mask="fillMask"
</div> autofocus
<div class="col"> >
<QInput <template #append>
:label="t('Operation date')" <QIcon name="event" class="cursor-pointer">
v-model="data.operated" <QPopupProxy
:mask="dateMask" cover
:fill-mask="fillMask" transition-show="scale"
autofocus transition-hide="scale"
>
<template #append>
<QIcon name="event" class="cursor-pointer">
<QPopupProxy
cover
transition-show="scale"
transition-hide="scale"
>
<QDate v-model="data.operated" :mask="dateMask">
<div class="row items-center justify-end">
<QBtn
v-close-popup
label="Close"
color="primary"
flat
/>
</div>
</QDate>
</QPopupProxy>
</QIcon>
</template>
</QInput>
</div>
</div>
<div class="row q-gutter-md q-mb-md">
<div class="col">
<QInput
:label="t('Undeductible VAT')"
v-model="data.deductibleExpenseFk"
clearable
clear-icon="close"
/>
</div>
<div class="col">
<QInput
:label="t('Document')"
v-model="data.dmsFk"
clearable
clear-icon="close"
@update:model-value="checkFileExists(data.dmsFk)"
>
<template #prepend>
<QBtn
v-if="data.dmsFk"
:class="{
'no-pointer-events': editDownloadDisabled,
}"
:disable="editDownloadDisabled"
icon="cloud_download"
:title="t('Download file')"
padding="xs"
round
@click="downloadFile(data.dmsFk)"
/>
</template>
<template #append>
<QBtn
:class="{
'no-pointer-events': editDownloadDisabled,
}"
:disable="editDownloadDisabled"
v-if="data.dmsFk"
icon="edit"
round
padding="xs"
@click="setEditDms(data.dmsFk)"
> >
<QTooltip>{{ t('Edit document') }}</QTooltip> <QDate v-model="data.operated" :mask="dateMask">
</QBtn> <div class="row items-center justify-end">
<QBtn <QBtn
v-else v-close-popup
icon="add_circle" label="Close"
round color="primary"
padding="xs" flat
@click="setCreateDms()" />
</div>
</QDate>
</QPopupProxy>
</QIcon>
</template>
</QInput>
</div>
<div class="row q-gutter-md q-mb-md">
<QInput
:label="t('Undeductible VAT')"
v-model="data.deductibleExpenseFk"
clearable
clear-icon="close"
/>
<QInput
:label="t('Document')"
v-model="data.dmsFk"
clearable
clear-icon="close"
@update:model-value="checkFileExists(data.dmsFk)"
>
<template #prepend>
<QBtn
v-if="data.dmsFk"
:class="{
'no-pointer-events': editDownloadDisabled,
}"
:disable="editDownloadDisabled"
icon="cloud_download"
:title="t('Download file')"
padding="xs"
round
@click="downloadFile(data.dmsFk)"
/>
</template>
<template #append>
<QBtn
:class="{
'no-pointer-events': editDownloadDisabled,
}"
:disable="editDownloadDisabled"
v-if="data.dmsFk"
icon="edit"
round
padding="xs"
@click="setEditDms(data.dmsFk)"
>
<QTooltip>{{ t('Edit document') }}</QTooltip>
</QBtn>
<QBtn
v-else
icon="add_circle"
round
padding="xs"
@click="setCreateDms()"
>
<QTooltip>{{ t('Create document') }}</QTooltip>
</QBtn>
</template>
</QInput>
</div>
<div class="row q-gutter-md q-mb-md">
<QInput
:label="t('Entry date')"
v-model="data.bookEntried"
clearable
clear-icon="close"
:mask="dateMask"
:fill-mask="fillMask"
>
<template #append>
<QIcon name="event" class="cursor-pointer">
<QPopupProxy
cover
transition-show="scale"
transition-hide="scale"
> >
<QTooltip>{{ t('Create document') }}</QTooltip> <QDate v-model="data.bookEntried" :mask="dateMask">
</QBtn> <div class="row items-center justify-end">
</template> <QBtn
</QInput> v-close-popup
</div> label="Close"
color="primary"
flat
/>
</div>
</QDate>
</QPopupProxy>
</QIcon>
</template>
</QInput>
<QInput
:label="t('Accounted date')"
v-model="data.booked"
clearable
clear-icon="close"
:mask="dateMask"
:fill-mask="fillMask"
>
<template #append>
<QIcon name="event" class="cursor-pointer">
<QPopupProxy
cover
transition-show="scale"
transition-hide="scale"
>
<QDate v-model="data.booked" :mask="maskDate">
<div class="row items-center justify-end">
<QBtn
v-close-popup
label="Close"
color="primary"
flat
/>
</div>
</QDate>
</QPopupProxy>
</QIcon>
</template>
</QInput>
</div> </div>
<div class="row q-gutter-md q-mb-md"> <div class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<QInput :label="t('Currency')"
:label="t('Entry date')" v-model="data.currencyFk"
v-model="data.bookEntried" :options="currencies"
clearable option-value="id"
clear-icon="close" option-label="code"
:mask="dateMask" />
:fill-mask="fillMask" <VnSelect
> v-if="companiesRef"
<template #append> :label="t('Company')"
<QIcon name="event" class="cursor-pointer"> v-model="data.companyFk"
<QPopupProxy :options="companies"
cover option-value="id"
transition-show="scale" option-label="code"
transition-hide="scale" />
>
<QDate v-model="data.bookEntried" :mask="dateMask">
<div class="row items-center justify-end">
<QBtn
v-close-popup
label="Close"
color="primary"
flat
/>
</div>
</QDate>
</QPopupProxy>
</QIcon>
</template>
</QInput>
</div>
<div class="col">
<QInput
:label="t('Accounted date')"
v-model="data.booked"
clearable
clear-icon="close"
:mask="dateMask"
:fill-mask="fillMask"
>
<template #append>
<QIcon name="event" class="cursor-pointer">
<QPopupProxy
cover
transition-show="scale"
transition-hide="scale"
>
<QDate v-model="data.booked" :mask="maskDate">
<div class="row items-center justify-end">
<QBtn
v-close-popup
label="Close"
color="primary"
flat
/>
</div>
</QDate>
</QPopupProxy>
</QIcon>
</template>
</QInput>
</div>
</div> </div>
<div class="row q-gutter-md q-mb-md"> <div class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox
<VnSelect :label="t('invoiceIn.summary.booked')"
:label="t('Currency')" v-model="data.isBooked"
v-model="data.currencyFk" />
:options="currencies"
option-value="id"
option-label="code"
/>
</div>
<div class="col">
<VnSelect
v-if="companiesRef"
:label="t('Company')"
v-model="data.companyFk"
:options="companies"
option-value="id"
option-label="code"
/>
</div>
</div>
<div class="row q-gutter-md q-mb-md">
<div class="col">
<QCheckbox
:label="t('invoiceIn.summary.booked')"
v-model="data.isBooked"
/>
</div>
<div class="col"></div>
</div> </div>
</template> </template>
</FormModel> </FormModel>

View File

@ -144,81 +144,73 @@ const orderFilter = {
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('order.form.clientFk')"
:label="t('order.form.clientFk')" v-model="data.clientFk"
v-model="data.clientFk" :options="clientList"
:options="clientList" option-value="id"
option-value="id" option-label="name"
option-label="name" hide-selected
hide-selected @update:model-value="
@update:model-value=" (client) => fetchAddressList(client.defaultAddressFk)
(client) => fetchAddressList(client.defaultAddressFk) "
" >
> <template #option="scope">
<template #option="scope"> <QItem v-bind="scope.itemProps">
<QItem v-bind="scope.itemProps"> <QItemSection>
<QItemSection> <QItemLabel>
<QItemLabel> {{ `${scope.opt.id}: ${scope.opt.name}` }}
{{ `${scope.opt.id}: ${scope.opt.name}` }} </QItemLabel>
</QItemLabel> </QItemSection>
</QItemSection> </QItem>
</QItem> </template>
</template> </VnSelect>
</VnSelect> <VnSelect
</div> :label="t('order.form.addressFk')"
<div class="col"> v-model="data.addressFk"
<VnSelect :options="addressList"
:label="t('order.form.addressFk')" option-value="id"
v-model="data.addressFk" option-label="nickname"
:options="addressList" hide-selected
option-value="id" :disable="!addressList?.length"
option-label="nickname" @update:model-value="
hide-selected () => fetchAgencyList(data.landed, data.addressFk)
:disable="!addressList?.length" "
@update:model-value=" >
() => fetchAgencyList(data.landed, data.addressFk) <template #option="scope">
" <QItem v-bind="scope.itemProps">
> <QItemSection>
<template #option="scope"> <QItemLabel>
<QItem v-bind="scope.itemProps"> {{
<QItemSection> `${scope.opt.nickname}: ${scope.opt.street},${scope.opt.city}`
<QItemLabel> }}
{{ </QItemLabel>
`${scope.opt.nickname}: ${scope.opt.street},${scope.opt.city}` </QItemSection>
}} </QItem>
</QItemLabel> </template>
</QItemSection> </VnSelect>
</QItem>
</template>
</VnSelect>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInputDate
<VnInputDate placeholder="dd-mm-aaa"
placeholder="dd-mm-aaa" :label="t('order.form.landed')"
:label="t('order.form.landed')" v-model="data.landed"
v-model="data.landed" @update:model-value="
@update:model-value=" () => fetchAgencyList(data.landed, data.addressFk)
() => fetchAgencyList(data.landed, data.addressFk) "
" />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('order.form.agencyModeFk')"
:label="t('order.form.agencyModeFk')" v-model="data.agencyModeFk"
v-model="data.agencyModeFk" :options="agencyList"
:options="agencyList" option-value="agencyModeFk"
option-value="agencyModeFk" option-label="agencyMode"
option-label="agencyMode" hide-selected
hide-selected :disable="!agencyList?.length"
:disable="!agencyList?.length" >
> </VnSelect>
</VnSelect>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -123,90 +123,70 @@ const onSave = (data, response) => {
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Worker')"
:label="t('Worker')" v-model="data.workerFk"
v-model="data.workerFk" :options="workerList"
:options="workerList" option-value="id"
option-value="id" option-label="nickname"
option-label="nickname" emit-value
emit-value map-options
map-options use-input
use-input :input-debounce="0"
:input-debounce="0" >
> <template #option="{ itemProps, opt }">
<template #option="{ itemProps, opt }"> <QItem v-bind="itemProps">
<QItem v-bind="itemProps"> <QItemSection>
<QItemSection> <QItemLabel>{{ opt.name }}</QItemLabel>
<QItemLabel>{{ opt.name }}</QItemLabel> <QItemLabel caption>
<QItemLabel caption> {{ opt.nickname }}, {{ opt.code }}
{{ opt.nickname }}, {{ opt.code }} </QItemLabel>
</QItemLabel> </QItemSection>
</QItemSection> </QItem>
</QItem> </template>
</template> </VnSelect>
</VnSelect> <VnSelect
</div> :label="t('Vehicle')"
<div class="col"> v-model="data.vehicleFk"
<VnSelect :options="vehicleList"
:label="t('Vehicle')" option-value="id"
v-model="data.vehicleFk" option-label="numberPlate"
:options="vehicleList" emit-value
option-value="id" map-options
option-label="numberPlate" use-input
emit-value :input-debounce="0"
map-options />
use-input
:input-debounce="0"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Agency')"
:label="t('Agency')" v-model="data.agencyModeFk"
v-model="data.agencyModeFk" :options="agencyList"
:options="agencyList" option-value="id"
option-value="id" option-label="name"
option-label="name" emit-value
emit-value map-options
map-options use-input
use-input :input-debounce="0"
:input-debounce="0" />
/> <VnInputDate v-model="data.created" :label="t('Created')" />
</div>
<div class="col">
<VnInputDate v-model="data.created" :label="t('Created')" />
</div>
</VnRow> </VnRow>
<template v-if="!isNew"> <template v-if="!isNew">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput v-model="data.kmStart" :label="t('Km Start')" clearable />
<VnInput <VnInput v-model="data.kmEnd" :label="t('Km End')" clearable />
v-model="data.kmStart"
:label="t('Km Start')"
clearable
/>
</div>
<div class="col">
<VnInput v-model="data.kmEnd" :label="t('Km End')" clearable />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInputTime
<VnInputTime v-model="data.started"
v-model="data.started" :label="t('Hour started')"
:label="t('Hour started')" clearable
clearable />
/> <VnInputTime
</div> v-model="data.finished"
<div class="col"> :label="t('Hour finished')"
<VnInputTime clearable
v-model="data.finished" />
:label="t('Hour finished')"
clearable
/>
</div>
<div class="col flex items-center"> <div class="col flex items-center">
<QCheckbox <QCheckbox
size="sm" size="sm"
@ -218,15 +198,13 @@ const onSave = (data, response) => {
</VnRow> </VnRow>
</template> </template>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <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 />
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -41,85 +41,61 @@ const onSave = (data, response) => {
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <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')" />
</div> <VnInputTime v-model="data.etd" :label="t('ETD hour')" />
<div class="col">
<VnInputDate v-model="data.etd" :label="t('ETD date')" />
</div>
<div class="col">
<VnInputTime v-model="data.etd" :label="t('ETD hour')" />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.tractorPlate"
v-model="data.tractorPlate" :label="t('Tractor plate')"
:label="t('Tractor plate')" clearable
clearable />
/> <VnInput
</div> v-model="data.trailerPlate"
<div class="col"> :label="t('Trailer plate')"
<VnInput clearable
v-model="data.trailerPlate" />
:label="t('Trailer plate')"
clearable
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('Carrier')"
:label="t('Carrier')" v-model="data.supplierFk"
v-model="data.supplierFk" :options="supplierList"
:options="supplierList" option-value="id"
option-value="id" option-label="nickname"
option-label="nickname" emit-value
emit-value map-options
map-options use-input
use-input :input-debounce="0"
:input-debounce="0" >
> <template #option="{ itemProps, opt }">
<template #option="{ itemProps, opt }"> <QItem v-bind="itemProps">
<QItem v-bind="itemProps"> <QItemSection>
<QItemSection> <QItemLabel
<QItemLabel >{{ opt.id }} - {{ opt.nickname }}
>{{ opt.id }} - {{ opt.nickname }} </QItemLabel>
</QItemLabel> </QItemSection>
</QItemSection> </QItem>
</QItem> </template>
</template> </VnSelect>
</VnSelect> <VnInput
</div> v-model="data.price"
<div class="col"> :label="t('Price')"
<VnInput type="number"
v-model="data.price" clearable
:label="t('Price')" />
type="number"
clearable
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput v-model="data.driverName" :label="t('Driver name')" clearable />
<VnInput <VnInput v-model="data.phone" :label="t('Phone')" clearable />
v-model="data.driverName"
:label="t('Driver name')"
clearable
/>
</div>
<div class="col">
<VnInput v-model="data.phone" :label="t('Phone')" clearable />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.observations"
v-model="data.observations" :label="t('Observations')"
:label="t('Observations')" clearable
clearable />
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -31,19 +31,13 @@ const onSave = (data, response) => {
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.name"
v-model="data.name" :label="t('Roadmap')"
:label="t('Roadmap')" clearable
clearable />
/> <VnInputDate v-model="data.etd" :label="t('ETD date')" />
</div> <VnInputTime v-model="data.etd" :label="t('ETD hour')" />
<div class="col">
<VnInputDate v-model="data.etd" :label="t('ETD date')" />
</div>
<div class="col">
<VnInputTime v-model="data.etd" :label="t('ETD hour')" />
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -86,47 +86,39 @@ const onSave = (shelving, newShelving) => {
> >
<template #form="{ data, validate, filter }"> <template #form="{ data, validate, filter }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.code"
v-model="data.code" :label="t('shelving.basicData.code')"
:label="t('shelving.basicData.code')" :rules="validate('Shelving.code')"
:rules="validate('Shelving.code')" />
/> <QSelect
</div> v-model="data.parkingFk"
<div class="col"> :options="parkingList"
<QSelect option-value="id"
v-model="data.parkingFk" option-label="code"
:options="parkingList" emit-value
option-value="id" :label="t('shelving.basicData.parking')"
option-label="code" map-options
emit-value use-input
:label="t('shelving.basicData.parking')" @filter="
map-options (value, update) => filter(value, update, parkingSelectFilter)
use-input "
@filter=" :rules="validate('Shelving.parkingFk')"
(value, update) => filter(value, update, parkingSelectFilter) :input-debounce="0"
" />
:rules="validate('Shelving.parkingFk')"
:input-debounce="0"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.priority"
v-model="data.priority" type="number"
type="number" :label="t('shelving.basicData.priority')"
:label="t('shelving.basicData.priority')" :rules="validate('Shelving.priority')"
:rules="validate('Shelving.priority')" />
/> <QCheckbox
</div> v-model="data.isRecyclable"
<div class="col"> :label="t('shelving.basicData.recyclable')"
<QCheckbox :rules="validate('Shelving.isRecyclable')"
v-model="data.isRecyclable" />
:label="t('shelving.basicData.recyclable')"
:rules="validate('Shelving.isRecyclable')"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -99,63 +99,57 @@ const setWireTransfer = async () => {
:key="index" :key="index"
class="row q-gutter-md q-mb-md" class="row q-gutter-md q-mb-md"
> >
<div class="col"> <VnInput :label="t('supplier.accounts.iban')" v-model="row.iban">
<VnInput :label="t('supplier.accounts.iban')" v-model="row.iban"> <template #append>
<template #append> <QIcon name="info" class="cursor-info">
<QIcon name="info" class="cursor-info"> <QTooltip>{{
<QTooltip>{{ t('components.iban_tooltip')
t('components.iban_tooltip') }}</QTooltip>
}}</QTooltip> </QIcon>
</QIcon> </template>
</template> </VnInput>
</VnInput> <VnSelectDialog
</div> :label="t('worker.create.bankEntity')"
<div class="col"> v-model="row.bankEntityFk"
<VnSelectDialog :options="bankEntitiesOptions"
:label="t('worker.create.bankEntity')" option-label="bic"
v-model="row.bankEntityFk" option-value="id"
:options="bankEntitiesOptions" hide-selected
option-label="bic" >
option-value="id" <template #form>
hide-selected <CreateBankEntityForm
> @on-data-saved="
<template #form> (_, requestResponse) =>
<CreateBankEntityForm onBankEntityCreated(requestResponse, row)
@on-data-saved=" "
(_, requestResponse) => :show-entity-field="false"
onBankEntityCreated(requestResponse, row) />
" </template>
:show-entity-field="false" <template #option="scope">
/> <QItem v-bind="scope.itemProps">
</template> <QItemSection v-if="scope.opt">
<template #option="scope"> <QItemLabel
<QItem v-bind="scope.itemProps"> >{{ scope.opt.bic }}
<QItemSection v-if="scope.opt"> {{ scope.opt.name }}</QItemLabel
<QItemLabel >
>{{ scope.opt.bic }} </QItemSection>
{{ scope.opt.name }}</QItemLabel </QItem>
> </template>
</QItemSection> </VnSelectDialog>
</QItem> <VnInput
</template> :label="t('supplier.accounts.beneficiary')"
</VnSelectDialog> v-model="row.beneficiary"
</div> >
<div class="col"> <template #append>
<VnInput <QIcon name="info" class="cursor-pointer">
:label="t('supplier.accounts.beneficiary')" <QTooltip>{{
v-model="row.beneficiary" t(
> 'Name of the bank account holder if different from the provider'
<template #append> )
<QIcon name="info" class="cursor-pointer"> }}</QTooltip>
<QTooltip>{{ </QIcon>
t( </template>
'Name of the bank account holder if different from the provider' </VnInput>
)
}}</QTooltip>
</QIcon>
</template>
</VnInput>
</div>
<div class="col-1 row justify-center items-center"> <div class="col-1 row justify-center items-center">
<QIcon <QIcon
name="delete" name="delete"

View File

@ -79,45 +79,36 @@ function handleLocation(data, location) {
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.nickname"
v-model="data.nickname" :label="t('supplier.addresses.name')"
:label="t('supplier.addresses.name')" />
/> <VnInput
</div> v-model="data.street"
<div class="col"> :label="t('supplier.addresses.street')"
<VnInput />
v-model="data.street"
:label="t('supplier.addresses.street')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnLocation
<VnLocation :rules="validate('Worker.postcode')"
:rules="validate('Worker.postcode')" :roles-allowed-to-create="['deliveryAssistant']"
:roles-allowed-to-create="['deliveryAssistant']" :options="postcodesOptions"
:options="postcodesOptions" v-model="data.location"
v-model="data.location" @update:model-value="
@update:model-value=" (location) => handleLocation(data, location)
(location) => handleLocation(data, location) "
" >
></VnLocation> </VnLocation>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.phone"
v-model="data.phone" :label="t('supplier.addresses.phone')"
:label="t('supplier.addresses.phone')" />
/> <VnInput
</div> v-model="data.mobile"
<div class="col"> :label="t('supplier.addresses.mobile')"
<VnInput />
v-model="data.mobile"
:label="t('supplier.addresses.mobile')"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -54,57 +54,43 @@ const redirectToCreateView = () => {
:key="index" :key="index"
class="row q-gutter-md q-mb-md" class="row q-gutter-md q-mb-md"
> >
<div class="col"> <QField :label="t('supplier.agencyTerms.agencyFk')" stack-label>
<QField :label="t('supplier.agencyTerms.agencyFk')" stack-label> <template #control>
<template #control> <div tabindex="0">
<div tabindex="0"> {{ row.agency?.name }}
{{ row.agency?.name }} </div>
</div> </template>
</template> </QField>
</QField> <QInput
</div> :label="t('supplier.agencyTerms.minimumM3')"
<div class="col"> v-model.number="row.minimumM3"
<QInput type="number"
:label="t('supplier.agencyTerms.minimumM3')" />
v-model.number="row.minimumM3" <QInput
type="number" :label="t('supplier.agencyTerms.packagePrice')"
/> v-model.number="row.packagePrice"
</div> type="number"
<div class="col"> />
<QInput <QInput
:label="t('supplier.agencyTerms.packagePrice')" :label="t('supplier.agencyTerms.kmPrice')"
v-model.number="row.packagePrice" v-model.number="row.kmPrice"
type="number" type="number"
/> />
</div> <QInput
<div class="col"> :label="t('supplier.agencyTerms.m3Price')"
<QInput v-model.number="row.m3Price"
:label="t('supplier.agencyTerms.kmPrice')" type="number"
v-model.number="row.kmPrice" />
type="number" <QInput
/> :label="t('supplier.agencyTerms.routePrice')"
</div> v-model.number="row.routePrice"
<div class="col"> type="number"
<QInput />
:label="t('supplier.agencyTerms.m3Price')" <QInput
v-model.number="row.m3Price" :label="t('supplier.agencyTerms.minimumKm')"
type="number" v-model.number="row.minimumKm"
/> type="number"
</div> />
<div class="col">
<QInput
:label="t('supplier.agencyTerms.routePrice')"
v-model.number="row.routePrice"
type="number"
/>
</div>
<div class="col">
<QInput
:label="t('supplier.agencyTerms.minimumKm')"
v-model.number="row.minimumKm"
type="number"
/>
</div>
<div class="col-1 row justify-center items-center"> <div class="col-1 row justify-center items-center">
<QIcon <QIcon
name="delete" name="delete"

View File

@ -46,63 +46,49 @@ const onDataSaved = () => {
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('supplier.agencyTerms.agencyFk')"
:label="t('supplier.agencyTerms.agencyFk')" v-model="data.agencyFk"
v-model="data.agencyFk" :options="agenciesOptions"
:options="agenciesOptions" option-label="name"
option-label="name" option-value="id"
option-value="id" hide-selected
hide-selected rounded
rounded />
/> <QInput
</div> :label="t('supplier.agencyTerms.minimumM3')"
<div class="col"> v-model.number="data.minimumM3"
<QInput type="number"
:label="t('supplier.agencyTerms.minimumM3')" />
v-model.number="data.minimumM3"
type="number"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QInput
<QInput :label="t('supplier.agencyTerms.packagePrice')"
:label="t('supplier.agencyTerms.packagePrice')" v-model.number="data.packagePrice"
v-model.number="data.packagePrice" type="number"
type="number" />
/> <QInput
</div> :label="t('supplier.agencyTerms.kmPrice')"
<div class="col"> v-model.number="data.kmPrice"
<QInput type="number"
:label="t('supplier.agencyTerms.kmPrice')" />
v-model.number="data.kmPrice" <QInput
type="number" :label="t('supplier.agencyTerms.m3Price')"
/> v-model.number="data.m3Price"
</div> type="number"
<div class="col"> />
<QInput
:label="t('supplier.agencyTerms.m3Price')"
v-model.number="data.m3Price"
type="number"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QInput
<QInput :label="t('supplier.agencyTerms.routePrice')"
:label="t('supplier.agencyTerms.routePrice')" v-model.number="data.routePrice"
v-model.number="data.routePrice" type="number"
type="number" />
/> <QInput
</div> :label="t('supplier.agencyTerms.minimumKm')"
<div class="col"> v-model.number="data.minimumKm"
<QInput type="number"
:label="t('supplier.agencyTerms.minimumKm')" />
v-model.number="data.minimumKm"
type="number"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -30,74 +30,62 @@ const workersOptions = ref([]);
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.nickname"
v-model="data.nickname" :label="t('supplier.basicData.alias')"
:label="t('supplier.basicData.alias')" :rules="validate('supplier.nickname')"
:rules="validate('supplier.nickname')" clearable
clearable />
/> <VnSelect
</div> :label="t('supplier.basicData.workerFk')"
<div class="col"> v-model="data.workerFk"
<VnSelect :options="workersOptions"
:label="t('supplier.basicData.workerFk')" option-value="id"
v-model="data.workerFk" option-label="name"
:options="workersOptions" hide-selected
option-value="id" map-options
option-label="name" :rules="validate('supplier.workerFk')"
hide-selected >
map-options <template #append>
:rules="validate('supplier.workerFk')" <QIcon name="info" class="cursor-pointer">
> <QTooltip>{{
<template #append> t('Responsible for approving invoices')
<QIcon name="info" class="cursor-pointer"> }}</QTooltip>
<QTooltip>{{ </QIcon>
t('Responsible for approving invoices') </template>
}}</QTooltip> <template #option="scope">
</QIcon> <QItem v-bind="scope.itemProps">
</template> <QItemSection>
<template #option="scope"> <QItemLabel>{{ scope.opt?.name }}</QItemLabel>
<QItem v-bind="scope.itemProps"> <QItemLabel caption>
<QItemSection> {{ scope.opt?.nickname }}, {{ scope.opt?.id }}
<QItemLabel>{{ scope.opt?.name }}</QItemLabel> </QItemLabel>
<QItemLabel caption> </QItemSection>
{{ scope.opt?.nickname }}, {{ scope.opt?.id }} </QItem>
</QItemLabel> </template>
</QItemSection> </VnSelect>
</QItem>
</template>
</VnSelect>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox
<QCheckbox v-model="data.isSerious"
v-model="data.isSerious" :label="t('supplier.basicData.isSerious')"
:label="t('supplier.basicData.isSerious')" />
/> <QCheckbox
</div> v-model="data.isActive"
<div class="col"> :label="t('supplier.basicData.isActive')"
<QCheckbox />
v-model="data.isActive" <QCheckbox
:label="t('supplier.basicData.isActive')" v-model="data.isPayMethodChecked"
/> :label="t('supplier.basicData.isPayMethodChecked')"
</div> />
<div class="col">
<QCheckbox
v-model="data.isPayMethodChecked"
:label="t('supplier.basicData.isPayMethodChecked')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QInput
<QInput :label="t('supplier.basicData.note')"
:label="t('supplier.basicData.note')" type="textarea"
type="textarea" v-model="data.note"
v-model="data.note" fill-input
fill-input />
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -37,37 +37,31 @@ const formatPayDems = (data) => {
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('supplier.billingData.payMethodFk')"
:label="t('supplier.billingData.payMethodFk')" v-model="data.payMethodFk"
v-model="data.payMethodFk" :options="paymethodsOptions"
:options="paymethodsOptions" option-value="id"
option-value="id" option-label="name"
option-label="name" hide-selected
hide-selected :rules="validate('supplier.payMethodFk')"
:rules="validate('supplier.payMethodFk')" />
/> <VnSelect
</div> :label="t('supplier.billingData.payDemFk')"
<div class="col"> v-model="data.payDemFk"
<VnSelect :options="payDemsOptions"
:label="t('supplier.billingData.payDemFk')" option-value="id"
v-model="data.payDemFk" option-label="payDem"
:options="payDemsOptions" hide-selected
option-value="id" :rules="validate('supplier.payDemFk')"
option-label="payDem" />
hide-selected
:rules="validate('supplier.payDemFk')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QInput
<QInput :label="t('supplier.billingData.payDay')"
:label="t('supplier.billingData.payDay')" type="number"
type="number" v-model="data.payDay"
v-model="data.payDay" />
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -42,42 +42,32 @@ const insertRow = () => {
class="border q-pa-md q-mb-md" class="border q-pa-md q-mb-md"
> >
<VnRow class="row q-gutter-md"> <VnRow class="row q-gutter-md">
<div class="col"> <VnInput
<VnInput input-name-focusable
input-name-focusable :label="t('supplier.contacts.name')"
:label="t('supplier.contacts.name')" v-model="row.name"
v-model="row.name" />
/> <VnInput
</div> :label="t('supplier.contacts.phone')"
<div class="col"> v-model="row.phone"
<VnInput />
:label="t('supplier.contacts.phone')" <VnInput
v-model="row.phone" :label="t('supplier.contacts.mobile')"
/> v-model="row.mobile"
</div> />
<div class="col"> <VnInput
<VnInput :label="t('supplier.contacts.email')"
:label="t('supplier.contacts.mobile')" v-model="row.email"
v-model="row.mobile" />
/>
</div>
<div class="col">
<VnInput
:label="t('supplier.contacts.email')"
v-model="row.email"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md"> <VnRow class="row q-gutter-md">
<div class="col"> <QInput
<QInput :label="t('supplier.contacts.observation')"
:label="t('supplier.contacts.observation')" type="textarea"
type="textarea" v-model="row.observation"
v-model="row.observation" fill-input
fill-input autogrow
autogrow />
/>
</div>
<div class="col-1 row justify-center items-center"> <div class="col-1 row justify-center items-center">
<QIcon <QIcon
name="delete" name="delete"

View File

@ -57,105 +57,85 @@ function handleLocation(data, location) {
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.name"
v-model="data.name" :label="t('supplier.fiscalData.name')"
:label="t('supplier.fiscalData.name')" clearable
clearable />
/> <VnInput
</div> v-model="data.nif"
<div class="col"> :label="t('supplier.fiscalData.nif')"
<VnInput clearable
v-model="data.nif" />
:label="t('supplier.fiscalData.nif')"
clearable
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.account"
v-model="data.account" :label="t('supplier.fiscalData.account')"
:label="t('supplier.fiscalData.account')" clearable
clearable />
/> <VnSelect
</div> :label="t('supplier.fiscalData.sageTaxTypeFk')"
<div class="col"> v-model="data.sageTaxTypeFk"
<VnSelect :options="sageTaxTypesOptions"
:label="t('supplier.fiscalData.sageTaxTypeFk')" option-value="id"
v-model="data.sageTaxTypeFk" option-label="vat"
:options="sageTaxTypesOptions" hide-selected
option-value="id" map-options
option-label="vat" />
hide-selected
map-options
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('supplier.fiscalData.sageWithholdingFk')"
:label="t('supplier.fiscalData.sageWithholdingFk')" v-model="data.sageWithholdingFk"
v-model="data.sageWithholdingFk" :options="sageWithholdingsOptions"
:options="sageWithholdingsOptions" option-value="id"
option-value="id" option-label="withholding"
option-label="withholding" hide-selected
hide-selected map-options
map-options />
/> <VnSelect
</div> :label="t('supplier.fiscalData.sageTransactionTypeFk')"
<div class="col"> v-model="data.sageTransactionTypeFk"
<VnSelect :options="sageTransactionTypesOptions"
:label="t('supplier.fiscalData.sageTransactionTypeFk')" option-value="id"
v-model="data.sageTransactionTypeFk" option-label="transaction"
:options="sageTransactionTypesOptions" hide-selected
option-value="id" map-options
option-label="transaction" />
hide-selected
map-options
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('supplier.fiscalData.supplierActivityFk')"
:label="t('supplier.fiscalData.supplierActivityFk')" v-model="data.supplierActivityFk"
v-model="data.supplierActivityFk" :options="supplierActivitiesOptions"
:options="supplierActivitiesOptions" option-value="code"
option-value="code" option-label="name"
option-label="name" hide-selected
hide-selected map-options
map-options />
/> <VnInput
</div> v-model="data.healthRegister"
<div class="col"> :label="t('supplier.fiscalData.healthRegister')"
<VnInput clearable
v-model="data.healthRegister" />
:label="t('supplier.fiscalData.healthRegister')"
clearable
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.street"
v-model="data.street" :label="t('supplier.fiscalData.street')"
:label="t('supplier.fiscalData.street')" clearable
clearable />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnLocation
<VnLocation :rules="validate('Worker.postcode')"
:rules="validate('Worker.postcode')" :roles-allowed-to-create="['deliveryAssistant']"
:roles-allowed-to-create="['deliveryAssistant']" :options="postcodesOptions"
:options="postcodesOptions" v-model="data.postCode"
v-model="data.postCode" @update:model-value="(location) => handleLocation(data, location)"
@update:model-value="(location) => handleLocation(data, location)" >
> </VnLocation>
</VnLocation>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col flex justify-around"> <div class="col flex justify-around">

View File

@ -45,15 +45,13 @@ const redirectToSupplierFiscalData = (_, responseData) => {
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <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() "
" />
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -29,75 +29,56 @@ const agenciesOptions = ref([]);
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput v-model="data.ref" :label="t('travel.basicData.reference')" />
<VnInput <VnSelect
v-model="data.ref" :label="t('travel.basicData.agency')"
:label="t('travel.basicData.reference')" v-model="data.agencyModeFk"
/> :options="agenciesOptions"
</div> option-value="id"
<div class="col"> option-label="name"
<VnSelect map-options
:label="t('travel.basicData.agency')" hide-selected
v-model="data.agencyModeFk" />
:options="agenciesOptions"
option-value="id"
option-label="name"
map-options
hide-selected
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInputDate
<VnInputDate v-model="data.shipped"
v-model="data.shipped" :label="t('travel.basicData.shipped')"
:label="t('travel.basicData.shipped')" />
/> <VnInputDate
</div> v-model="data.landed"
<div class="col"> :label="t('travel.basicData.landed')"
<VnInputDate />
v-model="data.landed"
:label="t('travel.basicData.landed')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('travel.basicData.warehouseOut')"
:label="t('travel.basicData.warehouseOut')" v-model="data.warehouseOutFk"
v-model="data.warehouseOutFk" :options="agenciesOptions"
:options="agenciesOptions" option-value="id"
option-value="id" option-label="name"
option-label="name" map-options
map-options hide-selected
hide-selected />
/> <VnSelect
</div> :label="t('travel.basicData.warehouseIn')"
<div class="col"> v-model="data.warehouseInFk"
<VnSelect :options="agenciesOptions"
:label="t('travel.basicData.warehouseIn')" option-value="id"
v-model="data.warehouseInFk" option-label="name"
:options="agenciesOptions" map-options
option-value="id" hide-selected
option-label="name" />
map-options
hide-selected
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QCheckbox
<QCheckbox :label="t('travel.basicData.delivered')"
:label="t('travel.basicData.delivered')" v-model="data.isDelivered"
v-model="data.isDelivered" />
/> <QCheckbox
</div> :label="t('travel.basicData.received')"
<div class="col"> v-model="data.isReceived"
<QCheckbox />
:label="t('travel.basicData.received')"
v-model="data.isReceived"
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -236,104 +236,88 @@ const onThermographCreated = async (data) => {
</Teleport> </Teleport>
<QCard class="q-pa-lg"> <QCard class="q-pa-lg">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelectDialog
<VnSelectDialog :label="t('travel.thermographs.thermograph')"
:label="t('travel.thermographs.thermograph')" v-model="thermographForm.thermographId"
v-model="thermographForm.thermographId" :options="thermographsOptions"
:options="thermographsOptions" option-value="thermographFk"
option-value="thermographFk" option-label="thermographFk"
option-label="thermographFk" :disable="viewAction === 'edit'"
:disable="viewAction === 'edit'" :tooltip="t('New thermograph')"
:tooltip="t('New thermograph')" >
> <template #form>
<template #form> <CreateThermographForm
<CreateThermographForm @on-data-saved="onThermographCreated($event, data)"
@on-data-saved="onThermographCreated($event, data)" />
/> </template>
</template> </VnSelectDialog>
</VnSelectDialog> <VnInput
</div> v-model="thermographForm.state"
<div class="col"> :label="t('travel.thermographs.state')"
<VnInput />
v-model="thermographForm.state"
:label="t('travel.thermographs.state')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="thermographForm.reference"
v-model="thermographForm.reference" :label="t('travel.thermographs.reference')"
:label="t('travel.thermographs.reference')" />
/> <VnSelect
</div> :label="t('travel.thermographs.type')"
<div class="col"> v-model="thermographForm.dmsTypeId"
<VnSelect :options="dmsTypesOptions"
:label="t('travel.thermographs.type')" option-value="id"
v-model="thermographForm.dmsTypeId" option-label="name"
:options="dmsTypesOptions" />
option-value="id"
option-label="name"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('travel.thermographs.company')"
:label="t('travel.thermographs.company')" v-model="thermographForm.companyId"
v-model="thermographForm.companyId" :options="companiesOptions"
:options="companiesOptions" option-value="id"
option-value="id" option-label="code"
option-label="code" />
/> <VnSelect
</div> :label="t('travel.thermographs.warehouse')"
<div class="col"> v-model="thermographForm.warehouseId"
<VnSelect :options="warehousesOptions"
:label="t('travel.thermographs.warehouse')" option-value="id"
v-model="thermographForm.warehouseId" option-label="name"
:options="warehousesOptions" />
option-value="id"
option-label="name"
/>
</div>
</VnRow> </VnRow>
<VnRow v-if="viewAction === 'edit'" class="row q-gutter-md q-mb-md"> <VnRow v-if="viewAction === 'edit'" class="row q-gutter-md q-mb-md">
<div class="col"> <QInput
<QInput :label="t('globals.description')"
:label="t('globals.description')" type="textarea"
type="textarea" v-model="thermographForm.description"
v-model="thermographForm.description" fill-input
fill-input />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <QFile
<QFile ref="inputFileRef"
ref="inputFileRef" :label="t('travel.thermographs.file')"
:label="t('travel.thermographs.file')" multiple
multiple :accept="allowedContentTypes"
:accept="allowedContentTypes" v-model="thermographForm.files"
v-model="thermographForm.files" >
> <template #append>
<template #append> <QIcon
<QIcon name="vn:attach"
name="vn:attach" class="cursor-pointer q-mr-sm"
class="cursor-pointer q-mr-sm" @click="inputFileRef.pickFiles()"
@click="inputFileRef.pickFiles()" >
> <QTooltip>{{ t('Select files') }}</QTooltip>
<QTooltip>{{ t('Select files') }}</QTooltip> </QIcon>
</QIcon> <QIcon name="info" class="cursor-pointer">
<QIcon name="info" class="cursor-pointer"> <QTooltip>{{
<QTooltip>{{ t('globals.allowedFilesText', {
t('globals.allowedFilesText', { allowedContentTypes: allowedContentTypes,
allowedContentTypes: allowedContentTypes, })
}) }}</QTooltip>
}}</QTooltip> </QIcon>
</QIcon> </template>
</template> </QFile>
</QFile>
</div>
</VnRow> </VnRow>
</QCard> </QCard>
</QForm> </QForm>

View File

@ -68,52 +68,37 @@ const redirectToTravelBasicData = (_, { id }) => {
> >
<template #form="{ data }"> <template #form="{ data }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput v-model="data.ref" :label="t('globals.reference')" />
<VnInput v-model="data.ref" :label="t('globals.reference')" /> <VnSelect
</div> :label="t('globals.agency')"
<div class="col"> v-model="data.agencyModeFk"
<VnSelect :options="agenciesOptions"
:label="t('globals.agency')" option-value="agencyFk"
v-model="data.agencyModeFk" option-label="name"
:options="agenciesOptions" hide-selected
option-value="agencyFk" />
option-label="name"
hide-selected
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInputDate v-model="data.shipped" :label="t('globals.shipped')" />
<VnInputDate <VnInputDate :label="t('globals.landed')" v-model="data.landed" />
v-model="data.shipped"
:label="t('globals.shipped')"
/>
</div>
<div class="col">
<VnInputDate :label="t('globals.landed')" v-model="data.landed" />
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('globals.wareHouseOut')"
:label="t('globals.wareHouseOut')" v-model="data.warehouseOutFk"
v-model="data.warehouseOutFk" :options="warehousesOptions"
:options="warehousesOptions" option-value="id"
option-value="id" option-label="name"
option-label="name" hide-selected
hide-selected />
/> <VnSelect
</div> :label="t('globals.wareHouseIn')"
<div class="col"> v-model="data.warehouseInFk"
<VnSelect :options="warehousesOptions"
:label="t('globals.wareHouseIn')" option-value="id"
v-model="data.warehouseInFk" option-label="name"
:options="warehousesOptions" hide-selected
option-value="id" />
option-label="name"
hide-selected
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -92,71 +92,63 @@ function filterType(val, update) {
<QForm @submit="onSubmit()" @reset="onReset()" class="q-pa-sm"> <QForm @submit="onSubmit()" @reset="onReset()" class="q-pa-sm">
<QCard class="q-pa-md"> <QCard class="q-pa-md">
<div class="row q-col-gutter-md"> <div class="row q-col-gutter-md">
<div class="col"> <QInput
<QInput filled
filled v-model="wagon.label"
v-model="wagon.label" :label="t('wagon.create.label')"
:label="t('wagon.create.label')" type="number"
type="number" min="0"
min="0" :rules="[(val) => !!val || t('wagon.warnings.labelNotEmpty')]"
:rules="[(val) => !!val || t('wagon.warnings.labelNotEmpty')]" />
/> <VnInput
</div> filled
<div class="col"> v-model="wagon.plate"
<VnInput :label="t('wagon.create.plate')"
filled :rules="[(val) => !!val || t('wagon.warnings.plateNotEmpty')]"
v-model="wagon.plate" />
:label="t('wagon.create.plate')"
:rules="[(val) => !!val || t('wagon.warnings.plateNotEmpty')]"
/>
</div>
</div> </div>
<div class="row q-col-gutter-md"> <div class="row q-col-gutter-md">
<div class="col"> <QInput
<QInput filled
filled v-model="wagon.volume"
v-model="wagon.volume" :label="t('wagon.create.volume')"
:label="t('wagon.create.volume')" type="number"
type="number" min="0"
min="0" :rules="[
:rules="[ (val) => !!val || t('wagon.warnings.volumeNotEmpty'),
(val) => !!val || t('wagon.warnings.volumeNotEmpty'), ]"
]" />
/> <QSelect
</div> filled
<div class="col"> v-model="wagon.typeFk"
<QSelect use-input
filled fill-input
v-model="wagon.typeFk" hide-selected
use-input input-debounce="0"
fill-input option-label="name"
hide-selected option-value="id"
input-debounce="0" emit-value
option-label="name" map-options
option-value="id" :label="t('wagon.create.type')"
emit-value :options="filteredWagonTypes"
map-options :rules="[(val) => !!val || t('wagon.warnings.typeNotEmpty')]"
:label="t('wagon.create.type')" @filter="filterType"
:options="filteredWagonTypes" >
:rules="[(val) => !!val || t('wagon.warnings.typeNotEmpty')]" <template v-if="wagon.typeFk" #append>
@filter="filterType" <QIcon
> name="cancel"
<template v-if="wagon.typeFk" #append> @click.stop.prevent="wagon.typeFk = null"
<QIcon class="cursor-pointer"
name="cancel" />
@click.stop.prevent="wagon.typeFk = null" </template>
class="cursor-pointer" <template #no-option>
/> <QItem>
</template> <QItemSection class="text-grey">
<template #no-option> {{ t('wagon.warnings.noData') }}
<QItem> </QItemSection>
<QItemSection class="text-grey"> </QItem>
{{ t('wagon.warnings.noData') }} </template>
</QItemSection> </QSelect>
</QItem>
</template>
</QSelect>
</div>
</div> </div>
</QCard> </QCard>
<div class="q-mt-md"> <div class="q-mt-md">

View File

@ -57,13 +57,11 @@ const updateModelValue = (data) => {
> >
<template #form="{}"> <template #form="{}">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('worker.summary.sipExtension')"
:label="t('worker.summary.sipExtension')" v-model="extension"
v-model="extension" @update:model-value="updateModelValue"
@update:model-value="updateModelValue" />
/>
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>

View File

@ -108,155 +108,122 @@ onMounted(async () => {
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.firstName"
v-model="data.firstName" :label="t('worker.create.name')"
:label="t('worker.create.name')" :rules="validate('Worker.firstName')"
:rules="validate('Worker.firstName')" />
/> <VnInput
</div> v-model="data.lastNames"
<div class="col"> :label="t('worker.create.lastName')"
<VnInput :rules="validate('Worker.lastNames')"
v-model="data.lastNames" />
:label="t('worker.create.lastName')" <VnInputDate
:rules="validate('Worker.lastNames')" v-model="data.birth"
/> :label="t('worker.create.birth')"
</div> :rules="validate('Worker.birth')"
<div class="col"> />
<VnInputDate
v-model="data.birth"
:label="t('worker.create.birth')"
:rules="validate('Worker.birth')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.fi"
v-model="data.fi" :label="t('worker.create.fi')"
:label="t('worker.create.fi')" :rules="validate('Worker.fi')"
:rules="validate('Worker.fi')" />
/> <VnInput
</div> v-model="data.code"
<div class="col"> :label="t('worker.create.code')"
<VnInput :rules="validate('Worker.code')"
v-model="data.code" />
:label="t('worker.create.code')" <VnInput
:rules="validate('Worker.code')" v-model="data.phone"
/> :label="t('worker.create.phone')"
</div> :rules="validate('Worker.phone')"
<div class="col"> />
<VnInput
v-model="data.phone"
:label="t('worker.create.phone')"
:rules="validate('Worker.phone')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnLocation
<VnLocation :rules="validate('Worker.postcode')"
:rules="validate('Worker.postcode')" :roles-allowed-to-create="['deliveryAssistant']"
:roles-allowed-to-create="['deliveryAssistant']" :options="postcodesOptions"
:options="postcodesOptions" v-model="data.location"
v-model="data.location" @update:model-value="(location) => handleLocation(data, location)"
@update:model-value=" >
(location) => handleLocation(data, location) </VnLocation>
"
>
</VnLocation>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput :label="t('worker.create.street')"
:label="t('worker.create.street')" v-model="data.street"
v-model="data.street" :rules="validate('Worker.street')"
:rules="validate('Worker.street')" />
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnInput
<VnInput v-model="data.name"
v-model="data.name" :label="t('worker.create.webUser')"
:label="t('worker.create.webUser')" :rules="validate('Worker.name')"
:rules="validate('Worker.name')" />
/> <VnInput
</div> v-model="data.email"
<div class="col"> :label="t('worker.create.personalEmail')"
<VnInput :rules="validate('Worker.email')"
v-model="data.email" />
:label="t('worker.create.personalEmail')"
:rules="validate('Worker.email')"
/>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('worker.create.company')"
:label="t('worker.create.company')" v-model="data.companyFk"
v-model="data.companyFk" :options="companiesOptions"
:options="companiesOptions" option-value="id"
option-value="id" option-label="code"
option-label="code" hide-selected
hide-selected :rules="validate('Worker.company')"
:rules="validate('Worker.company')" />
/> <VnSelect
</div> :label="t('worker.create.boss')"
<div class="col"> v-model="data.bossFk"
<VnSelect :options="workersOptions"
:label="t('worker.create.boss')" option-value="id"
v-model="data.bossFk" option-label="name"
:options="workersOptions" hide-selected
option-value="id" :rules="validate('Worker.boss')"
option-label="name" >
hide-selected <template #option="scope">
:rules="validate('Worker.boss')" <QItem v-bind="scope.itemProps">
> <QItemSection>
<template #option="scope"> <QItemLabel>{{ scope.opt.name }}</QItemLabel>
<QItem v-bind="scope.itemProps"> <QItemLabel caption
<QItemSection> >{{ scope.opt.nickname }},
<QItemLabel>{{ scope.opt.name }}</QItemLabel> {{ scope.opt.code }}
<QItemLabel caption </QItemLabel>
>{{ scope.opt.nickname }}, </QItemSection>
{{ scope.opt.code }} </QItem>
</QItemLabel> </template>
</QItemSection> </VnSelect>
</QItem>
</template>
</VnSelect>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <VnSelect
<VnSelect :label="t('worker.create.payMethods')"
:label="t('worker.create.payMethods')" v-model="data.payMethodFk"
v-model="data.payMethodFk" :options="payMethodsOptions"
:options="payMethodsOptions" option-value="id"
option-value="id" option-label="name"
option-label="name" map-options
map-options hide-selected
hide-selected :rules="validate('Worker.payMethodFk')"
:rules="validate('Worker.payMethodFk')" />
/> <VnInput
</div> v-model="data.iban"
:label="t('worker.create.iban')"
<div class="col"> :rules="validate('Worker.iban')"
<VnInput >
v-model="data.iban" <template #append>
:label="t('worker.create.iban')" <QIcon name="info" class="cursor-info">
:rules="validate('Worker.iban')" <QTooltip>{{ t('components.iban_tooltip') }}</QTooltip>
> </QIcon>
<template #append> </template>
<QIcon name="info" class="cursor-info"> </VnInput>
<QTooltip>{{
t('components.iban_tooltip')
}}</QTooltip>
</QIcon>
</template>
</VnInput>
</div>
<VnSelectDialog <VnSelectDialog
:label="t('worker.create.bankEntity')" :label="t('worker.create.bankEntity')"
v-model="data.bankEntityFk" v-model="data.bankEntityFk"