forked from verdnatura/salix-front
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7207-showPbx
This commit is contained in:
commit
42e4493fb6
|
@ -420,7 +420,7 @@ function handleOnDataSaved(_) {
|
|||
<QBtn
|
||||
v-if="$props.rightSearch"
|
||||
icon="filter_alt"
|
||||
class="bg-vn-section-color q-ml-md"
|
||||
class="bg-vn-section-color q-ml-sm"
|
||||
dense
|
||||
@click="stateStore.toggleRightDrawer()"
|
||||
/>
|
||||
|
@ -507,8 +507,12 @@ function handleOnDataSaved(_) {
|
|||
:key="index"
|
||||
:title="btn.title"
|
||||
:icon="btn.icon"
|
||||
class="q-px-sm text-primary-light"
|
||||
class="q-pa-xs"
|
||||
flat
|
||||
dense
|
||||
:class="
|
||||
btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
|
||||
"
|
||||
:style="`visibility: ${
|
||||
(btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden'
|
||||
}`"
|
||||
|
@ -639,18 +643,10 @@ function handleOnDataSaved(_) {
|
|||
:key="col?.id"
|
||||
class="text-center"
|
||||
>
|
||||
<div
|
||||
v-if="col?.summation"
|
||||
:class="`text-${col?.align ?? 'left'}`"
|
||||
class="text-bold q-pa-sm"
|
||||
>
|
||||
{{
|
||||
rows.reduce(
|
||||
(sum, currentRow) => sum + currentRow[col.name],
|
||||
0
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
<slot
|
||||
:name="`column-footer-${col.name}`"
|
||||
:class="getColAlign(col)"
|
||||
/>
|
||||
</QTh>
|
||||
</QTr>
|
||||
</template>
|
||||
|
@ -735,10 +731,6 @@ es:
|
|||
border-color: var(--vn-section-color);
|
||||
}
|
||||
|
||||
.q-table__container > div:first-child {
|
||||
background-color: var(--vn-page-color);
|
||||
}
|
||||
|
||||
.grid-three {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(400px, max-content));
|
||||
|
@ -767,10 +759,16 @@ es:
|
|||
}
|
||||
}
|
||||
|
||||
.q-table th {
|
||||
.q-table {
|
||||
th {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&__top {
|
||||
padding: 12px 0px;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
.vnTable {
|
||||
thead tr th {
|
||||
position: sticky;
|
||||
|
|
|
@ -135,7 +135,7 @@ onMounted(async () => {
|
|||
});
|
||||
</script>
|
||||
<template>
|
||||
<QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-md q-px-sm" dense>
|
||||
<QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-sm q-px-sm" dense>
|
||||
<QPopupProxy ref="popupProxyRef">
|
||||
<QCard class="column q-pa-md">
|
||||
<QIcon name="info" size="sm" class="info-icon">
|
||||
|
|
|
@ -14,11 +14,11 @@ const props = defineProps({
|
|||
});
|
||||
const modelValue = ref(
|
||||
props.location
|
||||
? `${props.location?.postcode} - ${props.location?.city}(${props.location?.province?.name}), ${props.location?.country?.name}`
|
||||
? `${props.location?.postcode}, ${props.location?.city}(${props.location?.province?.name}), ${props.location?.country?.name}`
|
||||
: null
|
||||
);
|
||||
function showLabel(data) {
|
||||
return `${data.code} - ${data.town}(${data.province}), ${data.country}`;
|
||||
return `${data.code}, ${data.town}(${data.province}), ${data.country}`;
|
||||
}
|
||||
const handleModelValue = (data) => {
|
||||
emit('update:model-value', data);
|
||||
|
|
|
@ -38,6 +38,10 @@ const $props = defineProps({
|
|||
type: [Array],
|
||||
default: () => [],
|
||||
},
|
||||
exprBuilder: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
isClearable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
|
@ -179,6 +183,7 @@ async function fetchFilter(val) {
|
|||
}, {});
|
||||
} else defaultWhere = { [key]: getVal(val) };
|
||||
const where = { ...(val ? defaultWhere : {}), ...$props.where };
|
||||
$props.exprBuilder && Object.assign(where, $props.exprBuilder(key, val));
|
||||
const fetchOptions = { where, include, limit };
|
||||
if (fields) fetchOptions.fields = fields;
|
||||
if (sortBy) fetchOptions.order = sortBy;
|
||||
|
|
|
@ -131,9 +131,8 @@ async function fetch(params) {
|
|||
useArrayData(props.dataKey, params);
|
||||
arrayData.reset(['filter.skip', 'skip']);
|
||||
await arrayData.fetch({ append: false });
|
||||
if (!store.hasMoreData) {
|
||||
isLoading.value = false;
|
||||
}
|
||||
if (!store.hasMoreData) isLoading.value = false;
|
||||
|
||||
emit('onFetch', store.data);
|
||||
return store.data;
|
||||
}
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
import { useSession } from './useSession';
|
||||
import axios from 'axios';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
export function usePrintService() {
|
||||
const quasar = useQuasar();
|
||||
const { t } = useI18n();
|
||||
|
||||
const { getTokenMultimedia } = useSession();
|
||||
|
||||
function sendEmail(path, params) {
|
||||
return axios.post(path, params).then(() =>
|
||||
quasar.notify({
|
||||
message: 'Notification sent',
|
||||
message: t('globals.notificationSent'),
|
||||
type: 'positive',
|
||||
icon: 'check',
|
||||
})
|
||||
|
|
|
@ -36,7 +36,6 @@ $color-font-secondary: #777;
|
|||
.bg-success {
|
||||
background-color: $positive;
|
||||
}
|
||||
|
||||
.bg-notice {
|
||||
background-color: $info;
|
||||
}
|
||||
|
|
|
@ -901,6 +901,7 @@ supplier:
|
|||
account: Account
|
||||
payMethod: Pay Method
|
||||
payDay: Pay Day
|
||||
country: Country
|
||||
summary:
|
||||
responsible: Responsible
|
||||
notes: Notes
|
||||
|
|
|
@ -162,6 +162,7 @@ globals:
|
|||
dms: Gestión documental
|
||||
entryCreate: Nueva entrada
|
||||
latestBuys: Últimas compras
|
||||
reserves: Reservas
|
||||
tickets: Tickets
|
||||
ticketCreate: Nuevo ticket
|
||||
boxing: Encajado
|
||||
|
@ -885,6 +886,7 @@ supplier:
|
|||
account: Cuenta
|
||||
payMethod: Método de pago
|
||||
payDay: Dia de pago
|
||||
country: País
|
||||
summary:
|
||||
responsible: Responsable
|
||||
notes: Notas
|
||||
|
|
|
@ -16,7 +16,7 @@ import { useVnConfirm } from 'composables/useVnConfirm';
|
|||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnSubToolbar from 'components/ui/VnSubToolbar.vue';
|
||||
import VnFilter from 'components/VnTable/VnFilter.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
|
||||
import CustomerNewPayment from 'src/pages/Customer/components/CustomerNewPayment.vue';
|
||||
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
||||
|
@ -33,9 +33,9 @@ const stateStore = useStateStore();
|
|||
const user = state.getUser();
|
||||
|
||||
const clientRisk = ref([]);
|
||||
const companies = ref([]);
|
||||
const tableRef = ref();
|
||||
const companyId = ref(user.value.companyFk);
|
||||
const companyLastId = ref(user.value.companyFk);
|
||||
const balances = ref([]);
|
||||
const vnFilterRef = ref({});
|
||||
const filter = computed(() => {
|
||||
|
@ -45,33 +45,6 @@ const filter = computed(() => {
|
|||
};
|
||||
});
|
||||
|
||||
const companyFilterColumn = {
|
||||
align: 'left',
|
||||
name: 'companyId',
|
||||
label: t('Company'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Companies',
|
||||
optionLabel: 'code',
|
||||
sortBy: 'code',
|
||||
limit: 0,
|
||||
},
|
||||
columnFilter: {
|
||||
event: {
|
||||
remove: () => (companyId.value = null),
|
||||
'update:modelValue': (newCompanyFk) => {
|
||||
if (!newCompanyFk) return;
|
||||
vnFilterRef.value.addFilter(newCompanyFk);
|
||||
companyLastId.value = newCompanyFk;
|
||||
},
|
||||
blur: () =>
|
||||
!companyId.value &&
|
||||
(companyId.value = companyLastId.value ?? user.value.companyFk),
|
||||
},
|
||||
},
|
||||
visible: false,
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'right',
|
||||
|
@ -166,6 +139,11 @@ onBeforeMount(() => {
|
|||
});
|
||||
|
||||
async function getCurrentBalance(data) {
|
||||
currentBalance.value[companyId.value] = {
|
||||
amount: 0,
|
||||
code: companies.value.find((c) => c.id === companyId.value)?.code,
|
||||
};
|
||||
|
||||
for (const balance of data) {
|
||||
currentBalance.value[balance.companyFk] = {
|
||||
code: balance.company.code,
|
||||
|
@ -192,14 +170,21 @@ const showBalancePdf = ({ id }) => {
|
|||
|
||||
<template>
|
||||
<FetchData
|
||||
url="Companies"
|
||||
auto-load
|
||||
@on-fetch="(data) => (companies = data)"
|
||||
></FetchData>
|
||||
<FetchData
|
||||
v-if="companies.length > 0"
|
||||
url="clientRisks"
|
||||
:filter="{
|
||||
include: { relation: 'company', scope: { fields: ['code'] } },
|
||||
where: { clientFk: route.params.id, companyFk: companyId },
|
||||
where: { clientFk: route.params.id },
|
||||
}"
|
||||
auto-load
|
||||
@on-fetch="getCurrentBalance"
|
||||
></FetchData>
|
||||
|
||||
<VnSubToolbar class="q-mb-md">
|
||||
<template #st-data>
|
||||
<div class="column justify-center q-px-md q-py-sm">
|
||||
|
@ -212,13 +197,15 @@ const showBalancePdf = ({ id }) => {
|
|||
</template>
|
||||
<template #st-actions>
|
||||
<div>
|
||||
<VnFilter
|
||||
<VnSelect
|
||||
:label="t('Company')"
|
||||
ref="vnFilterRef"
|
||||
v-model="companyId"
|
||||
data-key="CustomerBalance"
|
||||
:column="companyFilterColumn"
|
||||
search-url="balance"
|
||||
/>
|
||||
:options="companies"
|
||||
option-label="code"
|
||||
option-value="id"
|
||||
></VnSelect>
|
||||
</div>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
|
|
|
@ -16,6 +16,19 @@ const { t } = useI18n();
|
|||
const businessTypes = ref([]);
|
||||
const contactChannels = ref([]);
|
||||
const title = ref();
|
||||
const handleSalesModelValue = (val) => ({
|
||||
or: [
|
||||
{ name: val },
|
||||
{ nickname: { like: '%' + val + '%' } },
|
||||
{ code: { like: `${val}%` } },
|
||||
],
|
||||
});
|
||||
|
||||
const exprBuilder = (param, value) => {
|
||||
return {
|
||||
and: [{ active: { neq: false } }, handleSalesModelValue(value)],
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -34,7 +47,7 @@ const title = ref();
|
|||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('globals.name')"
|
||||
:rules="validate('client.socialName')"
|
||||
:rules="validate('client.name')"
|
||||
autofocus
|
||||
clearable
|
||||
v-model="data.name"
|
||||
|
@ -98,8 +111,10 @@ const title = ref();
|
|||
}"
|
||||
:fields="['id', 'nickname']"
|
||||
sort-by="nickname ASC"
|
||||
option-label="nickname"
|
||||
option-value="id"
|
||||
:rules="validate('client.salesPersonFk')"
|
||||
:use-like="false"
|
||||
:expr-builder="exprBuilder"
|
||||
emit-value
|
||||
auto-load
|
||||
>
|
||||
|
|
|
@ -190,6 +190,18 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
>
|
||||
<QTooltip>{{ t('Go to user') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
v-if="entity.supplier"
|
||||
:to="{
|
||||
name: 'SupplierSummary',
|
||||
params: { id: entity.supplier.id },
|
||||
}"
|
||||
size="md"
|
||||
icon="vn:supplier"
|
||||
color="primary"
|
||||
>
|
||||
<QTooltip>{{ t('Go to supplier') }}</QTooltip>
|
||||
</QBtn>
|
||||
</QCardActions>
|
||||
</template>
|
||||
</CardDescriptor>
|
||||
|
@ -204,6 +216,7 @@ es:
|
|||
Customer ticket list: Listado de tickets del cliente
|
||||
Customer invoice out list: Listado de facturas del cliente
|
||||
Go to user: Ir al usuario
|
||||
Go to supplier: Ir al proveedor
|
||||
Customer unpaid: Cliente impago
|
||||
Unpaid: Impagado
|
||||
unpaidDated: 'Fecha {dated}'
|
||||
|
|
|
@ -134,15 +134,17 @@ function handleLocation(data, location) {
|
|||
</QTooltip>
|
||||
</QIcon>
|
||||
</div>
|
||||
<QCheckbox :label="t('Verified data')" v-model="data.isTaxDataChecked" />
|
||||
<QCheckbox :label="t('Daily invoice')" v-model="data.hasDailyInvoice" />
|
||||
</VnRow>
|
||||
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('Electronic invoice')"
|
||||
v-model="data.hasElectronicInvoice"
|
||||
/><QCheckbox
|
||||
:label="t('Verified data')"
|
||||
v-model="data.isTaxDataChecked"
|
||||
/>
|
||||
<QCheckbox :label="t('Daily invoice')" v-model="data.hasDailyInvoice" />
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
|
|
@ -1,35 +1,20 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
dataKey: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const provinces = ref();
|
||||
const workers = ref();
|
||||
const zones = ref();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData url="Provinces" @on-fetch="(data) => (provinces = data)" auto-load />
|
||||
<FetchData url="Zones" @on-fetch="(data) => (zones = data)" auto-load />
|
||||
<FetchData
|
||||
url="Workers/activeWithInheritedRole"
|
||||
:filter="{ where: { role: 'salesPerson' } }"
|
||||
@on-fetch="(data) => (workers = data)"
|
||||
auto-load
|
||||
/>
|
||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true" search-url="table">
|
||||
<VnFilterPanel :data-key="dataKey" :search-button="true" search-url="table">
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
|
@ -65,15 +50,14 @@ const zones = ref();
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem class="q-mb-sm">
|
||||
<QItemSection v-if="!workers">
|
||||
<QSkeleton type="QInput" class="full-width" />
|
||||
</QItemSection>
|
||||
<QItemSection v-if="workers">
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
url="Workers/activeWithInheritedRole"
|
||||
:filter="{ where: { role: 'salesPerson' } }"
|
||||
auto-load
|
||||
:label="t('Salesperson')"
|
||||
v-model="params.salesPersonFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="workers"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
|
@ -88,15 +72,12 @@ const zones = ref();
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem class="q-mb-sm">
|
||||
<QItemSection v-if="!provinces">
|
||||
<QSkeleton type="QInput" class="full-width" />
|
||||
</QItemSection>
|
||||
<QItemSection v-if="provinces">
|
||||
<VnSelect
|
||||
<QItemSection
|
||||
><VnSelect
|
||||
url="Provinces"
|
||||
:label="t('Province')"
|
||||
v-model="params.provinceFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="provinces"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
|
@ -105,6 +86,7 @@ const zones = ref();
|
|||
dense
|
||||
outlined
|
||||
rounded
|
||||
auto-load
|
||||
:input-debounce="0"
|
||||
/>
|
||||
</QItemSection>
|
||||
|
@ -135,15 +117,11 @@ const zones = ref();
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection v-if="!zones">
|
||||
<QSkeleton type="QInput" class="full-width" />
|
||||
</QItemSection>
|
||||
<QItemSection v-if="zones">
|
||||
<VnSelect
|
||||
url="Zones"
|
||||
:label="t('Zone')"
|
||||
v-model="params.zoneFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="zones"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
|
@ -152,8 +130,8 @@ const zones = ref();
|
|||
dense
|
||||
outlined
|
||||
rounded
|
||||
auto-load
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
|
|
|
@ -8,10 +8,10 @@ import VnLocation from 'src/components/common/VnLocation.vue';
|
|||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import CustomerSummary from './Card/CustomerSummary.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||
|
||||
import { toDate } from 'src/filters';
|
||||
import CustomerFilter from './CustomerFilter.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
@ -397,6 +397,11 @@ function handleLocation(data, location) {
|
|||
:label="t('Search customer')"
|
||||
data-key="Customer"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<CustomerFilter data-key="Customer" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="Customer"
|
||||
|
@ -413,6 +418,7 @@ function handleLocation(data, location) {
|
|||
order="id DESC"
|
||||
:columns="columns"
|
||||
redirect="customer"
|
||||
:right-search="false"
|
||||
auto-load
|
||||
>
|
||||
<template #more-create-dialog="{ data }">
|
||||
|
@ -423,9 +429,10 @@ function handleLocation(data, location) {
|
|||
:params="{
|
||||
departmentCodes: ['VT', 'shopping'],
|
||||
}"
|
||||
option-label="nickname"
|
||||
option-value="id"
|
||||
:fields="['id', 'nickname']"
|
||||
sort-by="nickname ASC"
|
||||
:use-like="false"
|
||||
emit-value
|
||||
auto-load
|
||||
>
|
||||
|
|
|
@ -134,6 +134,7 @@ function handleLocation(data, location) {
|
|||
option-label="fiscalName"
|
||||
option-value="id"
|
||||
v-model="data.customsAgentFk"
|
||||
:tooltip="t('Create a new expense')"
|
||||
>
|
||||
<template #form>
|
||||
<CustomerNewCustomsAgent @on-data-saved="refreshData()" />
|
||||
|
|
|
@ -11,7 +11,7 @@ import VnRow from 'components/ui/VnRow.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
||||
import CustomsNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
||||
import CustomerNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
@ -226,9 +226,10 @@ function handleLocation(data, location) {
|
|||
option-label="fiscalName"
|
||||
option-value="id"
|
||||
v-model="data.customsAgentFk"
|
||||
:tooltip="t('New customs agent')"
|
||||
>
|
||||
<template #form>
|
||||
<CustomsNewCustomsAgent />
|
||||
<CustomerNewCustomsAgent />
|
||||
</template>
|
||||
</VnSelectDialog>
|
||||
</div>
|
||||
|
@ -309,6 +310,7 @@ es:
|
|||
Mobile: Movíl
|
||||
Incoterms: Incoterms
|
||||
Customs agent: Agente de aduanas
|
||||
New customs agent: Nuevo agente de aduanas
|
||||
Notes: Notas
|
||||
Observation type: Tipo de observación
|
||||
Description: Descripción
|
||||
|
|
|
@ -46,7 +46,6 @@ const onSubmit = async () => {
|
|||
};
|
||||
try {
|
||||
await axios.patch(`Clients/${$props.id}/setPassword`, payload);
|
||||
await $props.promise();
|
||||
} catch (error) {
|
||||
notify('errors.create', 'negative');
|
||||
} finally {
|
||||
|
|
|
@ -58,7 +58,7 @@ customer:
|
|||
vies: VIES
|
||||
payMethod: Método de pago
|
||||
bankAccount: Cuenta bancaria
|
||||
dueDay: Día de pago
|
||||
dueDay: Vencimiento
|
||||
hasLcr: Recibido LCR
|
||||
hasCoreVnl: Recibido core VNL
|
||||
hasB2BVnl: Recibido B2B VNL
|
||||
|
|
|
@ -10,6 +10,7 @@ import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.v
|
|||
import { toDate, toCurrency } from 'src/filters';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
import axios from 'axios';
|
||||
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
@ -163,7 +164,7 @@ const fetchEntryBuys = async () => {
|
|||
>
|
||||
<template #header-left>
|
||||
<router-link
|
||||
v-if="route.name !== 'EntrySummary'"
|
||||
v-if="route?.name !== 'EntrySummary'"
|
||||
:to="{ name: 'EntrySummary', params: { id: entityId } }"
|
||||
class="header link"
|
||||
:href="entryUrl"
|
||||
|
@ -184,7 +185,10 @@ const fetchEntryBuys = async () => {
|
|||
<QIcon name="open_in_new" />
|
||||
</router-link>
|
||||
<VnLv :label="t('entry.summary.commission')" :value="entry.commission" />
|
||||
<VnLv :label="t('entry.summary.currency')" :value="entry.currency.name" />
|
||||
<VnLv
|
||||
:label="t('entry.summary.currency')"
|
||||
:value="entry.currency?.name"
|
||||
/>
|
||||
<VnLv :label="t('entry.summary.company')" :value="entry.company.code" />
|
||||
<VnLv :label="t('entry.summary.reference')" :value="entry.reference" />
|
||||
<VnLv
|
||||
|
@ -210,12 +214,12 @@ const fetchEntryBuys = async () => {
|
|||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('entry.summary.travelAgency')"
|
||||
:value="entry.travel.agency.name"
|
||||
:value="entry.travel.agency?.name"
|
||||
/>
|
||||
<VnLv :label="t('shipped')" :value="toDate(entry.travel.shipped)" />
|
||||
<VnLv
|
||||
:label="t('entry.summary.travelWarehouseOut')"
|
||||
:value="entry.travel.warehouseOut.name"
|
||||
:value="entry.travel.warehouseOut?.name"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.travelDelivered')"
|
||||
|
@ -225,7 +229,7 @@ const fetchEntryBuys = async () => {
|
|||
<VnLv :label="t('landed')" :value="toDate(entry.travel.landed)" />
|
||||
<VnLv
|
||||
:label="t('entry.summary.travelWarehouseIn')"
|
||||
:value="entry.travel.warehouseIn.name"
|
||||
:value="entry.travel.warehouseIn?.name"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.travelReceived')"
|
||||
|
@ -281,17 +285,17 @@ const fetchEntryBuys = async () => {
|
|||
>
|
||||
<template #body="{ cols, row, rowIndex }">
|
||||
<QTr no-hover>
|
||||
<QTd v-for="col in cols" :key="col.name">
|
||||
<QTd v-for="col in cols" :key="col?.name">
|
||||
<component
|
||||
:is="tableColumnComponents[col.name].component(props)"
|
||||
v-bind="tableColumnComponents[col.name].props(props)"
|
||||
@click="tableColumnComponents[col.name].event(props)"
|
||||
:is="tableColumnComponents[col?.name].component()"
|
||||
v-bind="tableColumnComponents[col?.name].props()"
|
||||
@click="tableColumnComponents[col?.name].event()"
|
||||
class="col-content"
|
||||
>
|
||||
<template
|
||||
v-if="
|
||||
col.name !== 'observation' &&
|
||||
col.name !== 'isConfirmed'
|
||||
col?.name !== 'observation' &&
|
||||
col?.name !== 'isConfirmed'
|
||||
"
|
||||
>{{ col.value }}</template
|
||||
>
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
<script setup>
|
||||
import { onMounted, onUnmounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import EntryLatestBuysFilter from './EntryLatestBuysFilter.vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { toDate } from 'src/filters';
|
||||
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import EntryLatestBuysFilter from './EntryLatestBuysFilter.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const { t } = useI18n();
|
||||
import { toDate } from 'src/filters';
|
||||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
|
||||
const columns = [
|
||||
{
|
||||
align: 'center',
|
||||
|
|
|
@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
|
|||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import ItemsFilterPanel from 'src/components/ItemsFilterPanel.vue';
|
||||
|
||||
|
@ -18,6 +19,7 @@ defineProps({
|
|||
|
||||
const itemTypeWorkersOptions = ref([]);
|
||||
const suppliersOptions = ref([]);
|
||||
const tagValues = ref([]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -54,10 +54,9 @@ const columns = [
|
|||
create: true,
|
||||
component: 'number',
|
||||
summation: true,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
label: t('Bought'),
|
||||
name: 'bought',
|
||||
summation: true,
|
||||
|
@ -101,14 +100,9 @@ const travel = ref(null);
|
|||
const userParams = ref({
|
||||
dated: Date.vnNew(),
|
||||
});
|
||||
|
||||
const filter = ref({
|
||||
where: {
|
||||
shipped: (userParams.value.dated
|
||||
? new Date(userParams.value.dated)
|
||||
: Date.vnNew()
|
||||
).setHours(0, 0, 0, 0),
|
||||
m3: { neq: null },
|
||||
},
|
||||
fields: ['id', 'm3', 'warehouseInFk'],
|
||||
include: [
|
||||
{
|
||||
relation: 'warehouseIn',
|
||||
|
@ -117,6 +111,13 @@ const filter = ref({
|
|||
},
|
||||
},
|
||||
],
|
||||
where: {
|
||||
shipped: (userParams.value.dated
|
||||
? new Date(userParams.value.dated)
|
||||
: Date.vnNew()
|
||||
).setHours(0, 0, 0, 0),
|
||||
m3: { neq: null },
|
||||
},
|
||||
});
|
||||
|
||||
const setUserParams = async ({ dated }) => {
|
||||
|
@ -128,6 +129,18 @@ const setUserParams = async ({ dated }) => {
|
|||
function openDialog() {
|
||||
travelDialogRef.value = true;
|
||||
}
|
||||
|
||||
function setFooter(data) {
|
||||
const footer = {
|
||||
bought: 0,
|
||||
reserve: 0,
|
||||
};
|
||||
data.forEach((row) => {
|
||||
footer.bought += row?.bought;
|
||||
footer.reserve += row?.reserve;
|
||||
});
|
||||
tableRef.value.footer = footer;
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<VnSubToolbar>
|
||||
|
@ -139,7 +152,7 @@ function openDialog() {
|
|||
:filter="filter"
|
||||
@on-fetch="
|
||||
(data) => {
|
||||
travel = data.filter((data) => data.warehouseIn.code === 'VNH');
|
||||
travel = data.find((data) => data.warehouseIn.code === 'VNH');
|
||||
}
|
||||
"
|
||||
/>
|
||||
|
@ -149,10 +162,10 @@ function openDialog() {
|
|||
{{ t('Booked trucks') }}:
|
||||
</span>
|
||||
<span>
|
||||
{{ travel[0]?.m3 }}
|
||||
{{ travel?.m3 }}
|
||||
</span>
|
||||
<QBtn
|
||||
v-if="travel[0]?.m3"
|
||||
v-if="travel?.m3"
|
||||
style="max-width: 20%"
|
||||
flat
|
||||
icon="edit"
|
||||
|
@ -166,10 +179,10 @@ function openDialog() {
|
|||
</VnSubToolbar>
|
||||
<QDialog v-model="travelDialogRef" :maximized="true" :class="['vn-row', 'wrap']">
|
||||
<FormModelPopup
|
||||
:url-update="`Travels/${travel[0].id}`"
|
||||
:url-update="`Travels/${travel?.id}`"
|
||||
model="travel"
|
||||
:title="t('Travel m3')"
|
||||
:form-initial-data="{ id: travel[0].id, m3: travel[0].m3 }"
|
||||
:form-initial-data="{ id: travel?.id, m3: travel?.m3 }"
|
||||
@on-data-saved="fetchDataRef.fetch()"
|
||||
>
|
||||
<template #form-inputs="{ data }">
|
||||
|
@ -192,6 +205,7 @@ function openDialog() {
|
|||
/>
|
||||
</template>
|
||||
</RightMenu>
|
||||
<div class="table-container">
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
|
@ -201,6 +215,7 @@ function openDialog() {
|
|||
order="reserve DESC"
|
||||
:right-search="false"
|
||||
:is-editable="true"
|
||||
@on-fetch="(data) => setFooter(data)"
|
||||
:create="{
|
||||
urlCreate: 'StockBoughts',
|
||||
title: t('Reserve some space'),
|
||||
|
@ -221,22 +236,49 @@ function openDialog() {
|
|||
<WorkerDescriptorProxy :id="row?.workerFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-bought="{ row }">
|
||||
<span :class="{ 'text-negative': row.reserve < row.bought }">
|
||||
{{ row?.bought }}
|
||||
</span>
|
||||
</template>
|
||||
<template #column-footer-reserve>
|
||||
<span>
|
||||
{{ tableRef.footer.reserve }}
|
||||
</span>
|
||||
</template>
|
||||
<template #column-footer-bought>
|
||||
<span
|
||||
:class="{
|
||||
'text-negative':
|
||||
tableRef.footer.reserve < tableRef.footer.bought,
|
||||
}"
|
||||
>
|
||||
{{ tableRef.footer.bought }}
|
||||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</QPage>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="css" scoped>
|
||||
<style lang="scss" scoped>
|
||||
.travel {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.table-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 40%;
|
||||
}
|
||||
.text-negative {
|
||||
color: $negative !important;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
en:
|
||||
Buyer: Buyer
|
||||
Reserve: Reserve
|
||||
Bought: Bought
|
||||
More: More
|
||||
Date: Date
|
||||
This buyer has already made a reservation for this date: This buyer has already made a reservation for this date
|
||||
es:
|
||||
Edit travel: Editar envío
|
||||
Travel: Envíos
|
||||
|
|
|
@ -22,7 +22,7 @@ const customUrl = `StockBoughts/getStockBoughtDetail?workerFk=${$props.workerFk}
|
|||
const columns = [
|
||||
{
|
||||
align: 'left',
|
||||
label: 'Entry',
|
||||
label: t('Entry'),
|
||||
name: 'entryFk',
|
||||
isTitle: true,
|
||||
isId: true,
|
||||
|
@ -41,29 +41,33 @@ const columns = [
|
|||
create: true,
|
||||
columnClass: 'expand',
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'volume',
|
||||
label: t('Volume'),
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Packaging'),
|
||||
name: 'packagingFk',
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: 'Packing',
|
||||
name: 'packing',
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
<template>
|
||||
<QDialog :maximized="true">
|
||||
<QDialog>
|
||||
<div class="container">
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
|
@ -73,18 +77,26 @@ const columns = [
|
|||
:columns="columns"
|
||||
:right-search="false"
|
||||
:disable-infinite-scroll="true"
|
||||
:disable-option="{ card: true }"
|
||||
:limit="0"
|
||||
auto-load
|
||||
>
|
||||
<template #top-left>
|
||||
<QBtn
|
||||
flat
|
||||
icon="Close"
|
||||
color="primary"
|
||||
class="bg-vn-section-color q-pa-xs"
|
||||
v-close-popup
|
||||
/>
|
||||
</template>
|
||||
<template #column-entryFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
<span class="link">
|
||||
{{ row?.entryFk }}
|
||||
<EntryDescriptorProxy :id="row.entryFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-itemName="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
<span class="link">
|
||||
{{ row?.itemName }}
|
||||
<ItemDescriptorProxy :id="row.itemFk" />
|
||||
</span>
|
||||
|
@ -93,11 +105,10 @@ const columns = [
|
|||
</div>
|
||||
</QDialog>
|
||||
</template>
|
||||
<style lang="css">
|
||||
.q-dialog__inner {
|
||||
<style lang="css" scoped>
|
||||
.container {
|
||||
max-width: 50vw;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: auto;
|
||||
|
@ -110,4 +121,9 @@ const columns = [
|
|||
Bought: Comprado
|
||||
More: Más
|
||||
Date: Fecha
|
||||
Entry: Entrada
|
||||
Item: Artículo
|
||||
Name: Nombre
|
||||
Volume: Volumen
|
||||
Packaging: Embalage
|
||||
</i18n>
|
||||
|
|
|
@ -139,7 +139,11 @@ const columns = computed(() => [
|
|||
</VnTable>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.full-width .vn-row > * {
|
||||
flex: 0.4;
|
||||
.full-width .vn-row {
|
||||
margin-bottom: 0;
|
||||
flex-direction: row;
|
||||
> * {
|
||||
max-width: 125px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -132,7 +132,6 @@ const openTab = (id) =>
|
|||
:table="{
|
||||
'row-key': 'id',
|
||||
selection: 'multiple',
|
||||
'hide-bottom': true,
|
||||
}"
|
||||
default-mode="table"
|
||||
:row-click="({ id }) => openTab(id)"
|
||||
|
|
|
@ -54,7 +54,6 @@ const columns = computed(() => [
|
|||
label: t('salesTicketsTable.problems'),
|
||||
name: 'totalProblems',
|
||||
align: 'left',
|
||||
|
||||
columnFilter: false,
|
||||
attrs: {
|
||||
dense: true,
|
||||
|
@ -65,7 +64,6 @@ const columns = computed(() => [
|
|||
name: 'id',
|
||||
field: 'id',
|
||||
align: 'left',
|
||||
|
||||
columnFilter: {
|
||||
component: 'number',
|
||||
name: 'id',
|
||||
|
@ -108,9 +106,7 @@ const columns = computed(() => [
|
|||
{
|
||||
label: t('salesTicketsTable.date'),
|
||||
name: 'shippedDate',
|
||||
style: { 'max-width': '100px' },
|
||||
align: 'left',
|
||||
|
||||
columnFilter: {
|
||||
component: 'date',
|
||||
name: 'shippedDate',
|
||||
|
@ -164,7 +160,6 @@ const columns = computed(() => [
|
|||
label: t('salesTicketsTable.state'),
|
||||
name: 'state',
|
||||
align: 'left',
|
||||
style: { 'max-width': '100px' },
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
name: 'stateFk',
|
||||
|
@ -193,7 +188,6 @@ const columns = computed(() => [
|
|||
label: t('salesTicketsTable.zone'),
|
||||
name: 'zoneFk',
|
||||
align: 'left',
|
||||
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
name: 'zoneFk',
|
||||
|
@ -210,8 +204,6 @@ const columns = computed(() => [
|
|||
name: 'totalWithVat',
|
||||
field: 'totalWithVat',
|
||||
align: 'left',
|
||||
style: { 'max-width': '75px' },
|
||||
|
||||
columnFilter: {
|
||||
component: 'number',
|
||||
name: 'totalWithVat',
|
||||
|
@ -370,7 +362,7 @@ const openTab = (id) =>
|
|||
</QCheckbox>
|
||||
</template>
|
||||
<template #column-totalProblems="{ row }">
|
||||
<QTd class="no-padding" style="max-width: 60px">
|
||||
<span>
|
||||
<QIcon
|
||||
v-if="row.isTaxDataChecked === 0"
|
||||
name="vn:no036"
|
||||
|
@ -424,30 +416,27 @@ const openTab = (id) =>
|
|||
>
|
||||
<QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip>
|
||||
</QIcon>
|
||||
</QTd>
|
||||
</span>
|
||||
</template>
|
||||
<template #column-id="{ row }">
|
||||
<QTd class="no-padding">
|
||||
<span class="link" @click.stop.prevent>
|
||||
{{ row.id }}
|
||||
<TicketDescriptorProxy :id="row.id" />
|
||||
</span>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #column-clientFk="{ row }">
|
||||
<QTd class="no-padding" @click.stop :title="row.nickname">
|
||||
<span class="link">{{ row.nickname }}</span>
|
||||
<div @click.stop :title="row.nickname">
|
||||
<span class="link" v-text="row.nickname" />
|
||||
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||
</QTd>
|
||||
</div>
|
||||
</template>
|
||||
<template #column-salesPersonFk="{ row }">
|
||||
<QTd class="no-padding" @click.stop :title="row.userName">
|
||||
<div @click.stop :title="row.userName">
|
||||
<span class="link" v-text="dashIfEmpty(row.userName)" />
|
||||
<WorkerDescriptorProxy :id="row.salesPersonFk" />
|
||||
</QTd>
|
||||
</div>
|
||||
</template>
|
||||
<template #column-shippedDate="{ row }">
|
||||
<QTd class="no-padding">
|
||||
<QBadge
|
||||
v-bind="getBadgeAttrs(row.shippedDate)"
|
||||
class="q-pa-sm"
|
||||
|
@ -455,15 +444,12 @@ const openTab = (id) =>
|
|||
>
|
||||
{{ formatShippedDate(row.shippedDate) }}
|
||||
</QBadge>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #column-provinceFk="{ row }">
|
||||
<QTd class="no-padding">
|
||||
<span :title="row.province" v-text="row.province" />
|
||||
</QTd>
|
||||
</template>
|
||||
<template #column-state="{ row }">
|
||||
<QTd class="no-padding" @click.stop.prevent>
|
||||
<div @click.stop.prevent>
|
||||
<div v-if="row.refFk">
|
||||
<span class="link">{{ row.refFk }}</span>
|
||||
<InvoiceOutDescriptorProxy :id="row.invoiceOutId" />
|
||||
|
@ -477,23 +463,20 @@ const openTab = (id) =>
|
|||
>
|
||||
{{ row.state }}
|
||||
</QBadge>
|
||||
</QTd>
|
||||
</div>
|
||||
</template>
|
||||
<template #column-isFragile="{ row }">
|
||||
<QTd class="no-padding">
|
||||
<QIcon v-if="row.isFragile" name="local_bar" color="primary" size="sm">
|
||||
<QTooltip>{{ $t('salesTicketsTable.isFragile') }}</QTooltip>
|
||||
</QIcon>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #column-zoneFk="{ row }">
|
||||
<QTd class="no-padding" @click.stop.prevent :title="row.zoneName">
|
||||
<div @click.stop.prevent :title="row.zoneName">
|
||||
<span class="link">{{ row.zoneName }}</span>
|
||||
<ZoneDescriptorProxy :id="row.zoneFk" />
|
||||
</QTd>
|
||||
</div>
|
||||
</template>
|
||||
<template #column-totalWithVat="{ row }">
|
||||
<QTd class="no-padding">
|
||||
<QBadge
|
||||
:color="totalPriceColor(row) || 'transparent'"
|
||||
:text-color="totalPriceColor(row) ? 'black' : 'white'"
|
||||
|
@ -502,7 +485,11 @@ const openTab = (id) =>
|
|||
>
|
||||
{{ toCurrency(row.totalWithVat) }}
|
||||
</QBadge>
|
||||
</QTd>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
td .q-icon {
|
||||
margin: 0 2px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -75,6 +75,19 @@ const columns = computed(() => [
|
|||
},
|
||||
visible: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.country'),
|
||||
name: 'country',
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
name: 'countryFk',
|
||||
attrs: {
|
||||
url: 'countries',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ ticketSale:
|
|||
agency: Agency
|
||||
address: Address
|
||||
advanceTickets:
|
||||
preparation: Preparation
|
||||
origin: Origin
|
||||
destination: Destination
|
||||
originAgency: 'Origin agency: {agency}'
|
||||
|
|
|
@ -86,6 +86,7 @@ weeklyTickets:
|
|||
search: Buscar por tickets programados
|
||||
searchInfo: Buscar tickets programados por el identificador o el identificador del cliente
|
||||
advanceTickets:
|
||||
preparation: Preparación
|
||||
origin: Origen
|
||||
destination: Destinatario
|
||||
originAgency: 'Agencia origen: {agency}'
|
||||
|
|
|
@ -28,18 +28,8 @@ const route = useRoute();
|
|||
const router = useRouter();
|
||||
const state = useState();
|
||||
const { notify } = useNotify();
|
||||
|
||||
const thermographFilter = {
|
||||
fields: ['thermographFk'],
|
||||
where: {
|
||||
travelFk: null,
|
||||
},
|
||||
order: 'thermographFk ASC',
|
||||
};
|
||||
const fetchTravelThermographsRef = ref(null);
|
||||
const allowedContentTypes = ref('');
|
||||
const user = state.getUser();
|
||||
const thermographsOptions = ref([]);
|
||||
const dmsTypesOptions = ref([]);
|
||||
const companiesOptions = ref([]);
|
||||
const warehousesOptions = ref([]);
|
||||
|
@ -168,24 +158,15 @@ const updateThermograph = async () => {
|
|||
};
|
||||
|
||||
const onThermographCreated = async (data) => {
|
||||
await fetchTravelThermographsRef.value.fetch();
|
||||
thermographForm.thermographId = data.thermographId;
|
||||
thermographForm.thermographId = data.id;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="DmsContainers/allowedContentTypes"
|
||||
@on-fetch="(data) => (allowedContentTypes = data.join(', '))"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
ref="fetchTravelThermographsRef"
|
||||
url="TravelThermographs"
|
||||
@on-fetch="(data) => (thermographsOptions = data)"
|
||||
:filter="thermographFilter"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="DmsTypes"
|
||||
:filter="{ order: 'name' }"
|
||||
|
@ -239,15 +220,20 @@ const onThermographCreated = async (data) => {
|
|||
<VnSelectDialog
|
||||
:label="t('travel.thermographs.thermograph')"
|
||||
v-model="thermographForm.thermographId"
|
||||
:options="thermographsOptions"
|
||||
url="TravelThermographs"
|
||||
option-value="thermographFk"
|
||||
option-label="thermographFk"
|
||||
:fields="['thermographFk']"
|
||||
:where="{ travelFk: null }"
|
||||
sort-by="thermographFk ASC"
|
||||
:disable="viewAction === 'edit'"
|
||||
:tooltip="t('New thermograph')"
|
||||
>
|
||||
<template #form>
|
||||
<CreateThermographForm
|
||||
@on-data-saved="onThermographCreated($event, data)"
|
||||
@on-data-saved="
|
||||
(data) => (thermographForm.thermographId = data.id)
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
</VnSelectDialog>
|
||||
|
@ -323,7 +309,6 @@ const onThermographCreated = async (data) => {
|
|||
</QForm>
|
||||
</QPage>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Select files: Selecciona ficheros
|
||||
|
|
|
@ -64,6 +64,15 @@ const agencyOptions = ref([]);
|
|||
type="number"
|
||||
min="0"
|
||||
/>
|
||||
|
||||
<VnInput
|
||||
class="mw-10"
|
||||
v-model="data.itemMaxLength"
|
||||
:label="t('Max length m³')"
|
||||
clearable
|
||||
type="number"
|
||||
min="0"
|
||||
/>
|
||||
</VnRow>
|
||||
|
||||
<VnRow>
|
||||
|
@ -128,4 +137,5 @@ es:
|
|||
Bonus: Bonificación
|
||||
Inflation: Inflación
|
||||
Volumetric: Volumétrico
|
||||
Max length m³: Medida máxima tumbado
|
||||
</i18n>
|
||||
|
|
|
@ -6,7 +6,6 @@ describe('EntryStockBought', () => {
|
|||
});
|
||||
it('Should edit the reserved space', () => {
|
||||
cy.get('.q-field__native.q-placeholder').should('have.value', '01/01/2001');
|
||||
cy.get('tBody > tr').its('length').should('eq', 2);
|
||||
cy.get('input[name="reserve"]').type('10{enter}');
|
||||
cy.get('button[title="Save"]').click();
|
||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||
|
@ -18,7 +17,6 @@ describe('EntryStockBought', () => {
|
|||
cy.get('input[aria-label="Date"]').eq(1).type('01-01');
|
||||
cy.get('input[aria-label="Buyer"]').type('buyerboss{downarrow}{enter}');
|
||||
cy.get('.q-notification__message').should('have.text', 'Data created');
|
||||
cy.get('tBody > tr').its('length').should('eq', 3);
|
||||
});
|
||||
it('Should check detail for the buyer', () => {
|
||||
cy.get(':nth-child(1) > .sticky > .q-btn > .q-btn__content > .q-icon').click();
|
||||
|
|
|
@ -34,22 +34,25 @@ describe('VnLocation', () => {
|
|||
cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
|
||||
cy.waitForElement('.q-form');
|
||||
});
|
||||
it('Fin by postalCode', () => {
|
||||
it('Find by postalCode', () => {
|
||||
const postCode = '46600';
|
||||
const postCodeLabel = '46600, Valencia(Province one), España';
|
||||
const firstOption = '[role="listbox"] .q-item:nth-child(1)';
|
||||
|
||||
cy.get(inputLocation).click();
|
||||
cy.get(inputLocation).clear();
|
||||
cy.get(inputLocation).type(postCode);
|
||||
cy.get(locationOptions).should('have.length.at.least', 2);
|
||||
cy.get(locationOptions)
|
||||
.get(':nth-child(1)')
|
||||
.should('have.length.at.least', 2);
|
||||
cy.get(
|
||||
firstOption.concat(' > .q-item__section > .q-item__label--caption')
|
||||
).should('have.text', postCodeLabel);
|
||||
cy.get(firstOption).click();
|
||||
cy.get('.q-btn-group > .q-btn--standard > .q-btn__content > .q-icon').click();
|
||||
cy.reload();
|
||||
cy.waitForElement('.q-form');
|
||||
cy.get(inputLocation).should(
|
||||
'have.value',
|
||||
'46600 - Valencia(Province one), España'
|
||||
);
|
||||
cy.get(inputLocation).should('have.value', postCodeLabel);
|
||||
});
|
||||
|
||||
it('Create postCode', () => {
|
||||
|
|
Loading…
Reference in New Issue