HOTFIX: #6943 CustomerList form salesPersons options #790
|
@ -220,9 +220,6 @@ const makeRequest = async () => {
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
@click="rotateLeft()"
|
@click="rotateLeft()"
|
||||||
>
|
>
|
||||||
<!-- <QTooltip class="no-pointer-events">
|
|
||||||
{{ t('Rotate left') }}
|
|
||||||
</QTooltip> -->
|
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<div>
|
<div>
|
||||||
<div ref="photoContainerRef" />
|
<div ref="photoContainerRef" />
|
||||||
|
@ -234,9 +231,6 @@ const makeRequest = async () => {
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
@click="rotateRight()"
|
@click="rotateRight()"
|
||||||
>
|
>
|
||||||
<!-- <QTooltip class="no-pointer-events">
|
|
||||||
{{ t('Rotate right') }}
|
|
||||||
</QTooltip> -->
|
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -265,7 +259,6 @@ const makeRequest = async () => {
|
||||||
class="cursor-pointer q-mr-sm"
|
class="cursor-pointer q-mr-sm"
|
||||||
@click="openInputFile()"
|
@click="openInputFile()"
|
||||||
>
|
>
|
||||||
<!-- <QTooltip>{{ t('globals.selectFile') }}</QTooltip> -->
|
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon name="info" class="cursor-pointer">
|
<QIcon name="info" class="cursor-pointer">
|
||||||
<QTooltip>{{
|
<QTooltip>{{
|
||||||
|
|
|
@ -14,8 +14,8 @@ import dashOrCurrency from './dashOrCurrency';
|
||||||
import getDifferences from './getDifferences';
|
import getDifferences from './getDifferences';
|
||||||
import getUpdatedValues from './getUpdatedValues';
|
import getUpdatedValues from './getUpdatedValues';
|
||||||
import getParamWhere from './getParamWhere';
|
import getParamWhere from './getParamWhere';
|
||||||
import parsePhone from './parsePhone';
|
|
||||||
import isDialogOpened from './isDialogOpened';
|
import isDialogOpened from './isDialogOpened';
|
||||||
|
import parsePhone from './parsePhone';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getUpdatedValues,
|
getUpdatedValues,
|
||||||
|
|
|
@ -114,6 +114,7 @@ const debtWarning = computed(() => {
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('customer.card.webAccountInactive') }}</QTooltip>
|
<QTooltip>{{ t('customer.card.webAccountInactive') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="entity.debt > entity.credit"
|
v-if="entity.debt > entity.credit"
|
||||||
name="vn:risk"
|
name="vn:risk"
|
||||||
|
@ -175,6 +176,7 @@ const debtWarning = computed(() => {
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Customer ticket list') }}</QTooltip>
|
<QTooltip>{{ t('Customer ticket list') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
|
|
||||||
<QBtn
|
<QBtn
|
||||||
:to="{
|
:to="{
|
||||||
name: 'InvoiceOutList',
|
name: 'InvoiceOutList',
|
||||||
|
@ -186,6 +188,7 @@ const debtWarning = computed(() => {
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Customer invoice out list') }}</QTooltip>
|
<QTooltip>{{ t('Customer invoice out list') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
|
|
||||||
<QBtn
|
<QBtn
|
||||||
:to="{
|
:to="{
|
||||||
name: 'AccountSummary',
|
name: 'AccountSummary',
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
|
||||||
|
|
||||||
import { toCurrency, toPercentage, toDate, dashOrCurrency } from 'src/filters';
|
import { toCurrency, toPercentage, toDate, dashOrCurrency } from 'src/filters';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
@ -26,6 +24,7 @@ const $props = defineProps({
|
||||||
const entityId = computed(() => $props.id || route.params.id);
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
const customer = computed(() => summary.value.entity);
|
const customer = computed(() => summary.value.entity);
|
||||||
const summary = ref();
|
const summary = ref();
|
||||||
|
|
||||||
const defaulterAmount = computed(() => customer.value.defaulters[0]?.amount);
|
const defaulterAmount = computed(() => customer.value.defaulters[0]?.amount);
|
||||||
const balanceDue = computed(() => {
|
const balanceDue = computed(() => {
|
||||||
const amount = defaulterAmount.value;
|
const amount = defaulterAmount.value;
|
||||||
|
@ -38,11 +37,11 @@ const balanceDue = computed(() => {
|
||||||
const balanceDueWarning = computed(() => (defaulterAmount.value ? 'negative' : ''));
|
const balanceDueWarning = computed(() => (defaulterAmount.value ? 'negative' : ''));
|
||||||
|
|
||||||
const claimRate = computed(() => {
|
const claimRate = computed(() => {
|
||||||
return customer.value.claimsRatio?.claimingRate ?? 0;
|
return customer.value.claimsRatio.claimingRate;
|
||||||
});
|
});
|
||||||
|
|
||||||
const priceIncreasingRate = computed(() => {
|
const priceIncreasingRate = computed(() => {
|
||||||
return customer.value.claimsRatio?.priceIncreasing ?? 0 / 100;
|
return customer.value.claimsRatio.priceIncreasing / 100;
|
||||||
});
|
});
|
||||||
|
|
||||||
const debtWarning = computed(() => {
|
const debtWarning = computed(() => {
|
||||||
|
@ -56,11 +55,6 @@ const creditWarning = computed(() => {
|
||||||
|
|
||||||
return tooMuchInsurance || noCreditInsurance ? 'negative' : '';
|
return tooMuchInsurance || noCreditInsurance ? 'negative' : '';
|
||||||
});
|
});
|
||||||
const sumRisk = ({ clientRisks }) => {
|
|
||||||
let total = clientRisks.reduce((acc, { amount }) => acc + amount, 0);
|
|
||||||
|
|
||||||
return total;
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -106,13 +100,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.salesPerson')"
|
:label="t('customer.summary.salesPerson')"
|
||||||
:value="entity?.salesPersonUser?.name"
|
:value="entity?.salesPersonUser?.name"
|
||||||
>
|
/>
|
||||||
<template #value>
|
|
||||||
<VnUserLink
|
|
||||||
:name="entity.salesPersonUser?.name"
|
|
||||||
:worker-id="entity.salesPersonFk"
|
|
||||||
/> </template
|
|
||||||
></VnLv>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.contactChannel')"
|
:label="t('customer.summary.contactChannel')"
|
||||||
:value="entity?.contactChannel?.name"
|
:value="entity?.contactChannel?.name"
|
||||||
|
@ -152,7 +140,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
:url="`#/customer/${entityId}/fiscal-data`"
|
:url="`#/customer/${entityId}/fiscal-data`"
|
||||||
:text="t('customer.summary.fiscalData')"
|
:text="t('customer.summary.fiscalData')"
|
||||||
/>
|
/>
|
||||||
<VnRow class="block">
|
<VnRow>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.isEqualizated')"
|
:label="t('customer.summary.isEqualizated')"
|
||||||
:value="entity.isEqualizated"
|
:value="entity.isEqualizated"
|
||||||
|
@ -161,6 +149,8 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
:label="t('customer.summary.isActive')"
|
:label="t('customer.summary.isActive')"
|
||||||
:value="entity.isActive"
|
:value="entity.isActive"
|
||||||
/>
|
/>
|
||||||
|
</VnRow>
|
||||||
|
<VnRow>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.verifiedData')"
|
:label="t('customer.summary.verifiedData')"
|
||||||
:value="entity.isTaxDataChecked"
|
:value="entity.isTaxDataChecked"
|
||||||
|
@ -169,6 +159,8 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
:label="t('customer.summary.hasToInvoice')"
|
:label="t('customer.summary.hasToInvoice')"
|
||||||
:value="entity.hasToInvoice"
|
:value="entity.hasToInvoice"
|
||||||
/>
|
/>
|
||||||
|
</VnRow>
|
||||||
|
<VnRow>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.notifyByEmail')"
|
:label="t('customer.summary.notifyByEmail')"
|
||||||
:value="entity.isToBeMailed"
|
:value="entity.isToBeMailed"
|
||||||
|
@ -187,7 +179,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('customer.summary.bankAccount')" :value="entity.iban" />
|
<VnLv :label="t('customer.summary.bankAccount')" :value="entity.iban" />
|
||||||
<VnLv :label="t('customer.summary.dueDay')" :value="entity.dueDay" />
|
<VnLv :label="t('customer.summary.dueDay')" :value="entity.dueDay" />
|
||||||
<VnRow class="q-mt-sm block">
|
<VnRow class="q-mt-sm" wrap>
|
||||||
<VnLv :label="t('customer.summary.hasLcr')" :value="entity.hasLcr" />
|
<VnLv :label="t('customer.summary.hasLcr')" :value="entity.hasLcr" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.hasCoreVnl')"
|
:label="t('customer.summary.hasCoreVnl')"
|
||||||
|
@ -202,7 +194,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one" v-if="entity.defaultAddress">
|
<QCard class="vn-one" v-if="entity.defaultAddress">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="`#/customer/${entityId}/address`"
|
:url="`#/customer/${entityId}/consignees`"
|
||||||
:text="t('customer.summary.consignee')"
|
:text="t('customer.summary.consignee')"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
|
@ -267,7 +259,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
<VnTitle
|
<VnTitle
|
||||||
target="_blank"
|
target="_blank"
|
||||||
:url="`${grafanaUrl}/d/40buzE4Vk/comportamiento-pagos-clientes?orgId=1&var-clientFk=${entityId}`"
|
:url="`${grafanaUrl}/d/40buzE4Vk/comportamiento-pagos-clientes?orgId=1&var-clientFk=${entityId}`"
|
||||||
:text="t('customer.summary.payMethodFk')"
|
:text="t('customer.summary.financialData')"
|
||||||
icon="vn:grafana"
|
icon="vn:grafana"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
|
@ -293,7 +285,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.balance')"
|
:label="t('customer.summary.balance')"
|
||||||
:value="toCurrency(sumRisk(entity)) || toCurrency(0)"
|
:value="toCurrency(entity.sumRisk) || toCurrency(0)"
|
||||||
:info="t('customer.summary.balanceInfo')"
|
:info="t('customer.summary.balanceInfo')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ const columns = computed(() => [
|
||||||
fields: ['id', 'name'],
|
fields: ['id', 'name'],
|
||||||
where: { role: 'salesPerson' },
|
where: { role: 'salesPerson' },
|
||||||
optionFilter: 'firstName',
|
optionFilter: 'firstName',
|
||||||
|
useLike: false,
|
||||||
},
|
},
|
||||||
create: false,
|
create: false,
|
||||||
columnField: {
|
columnField: {
|
||||||
|
|
|
@ -185,13 +185,12 @@ const getItemPackagingType = (ticketSales) => {
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:without-header="true"
|
:without-header="true"
|
||||||
auto-load
|
auto-load
|
||||||
:row-click="rowClick"
|
redirect="ticket"
|
||||||
order="shipped DESC, id"
|
order="shipped DESC, id"
|
||||||
:disable-option="{ card: true, table: true }"
|
:disable-option="{ card: true, table: true }"
|
||||||
class="full-width"
|
class="full-width"
|
||||||
:disable-infinite-scroll="true"
|
:disable-infinite-scroll="true"
|
||||||
:search-url="false"
|
:search-url="false"
|
||||||
redirect="ticket"
|
|
||||||
>
|
>
|
||||||
<template #column-nickname="{ row }">
|
<template #column-nickname="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import VnInputNumber from 'components/common/VnInputNumber.vue';
|
||||||
import FormModelPopup from 'components/FormModelPopup.vue';
|
import FormModelPopup from 'components/FormModelPopup.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
@ -43,13 +43,13 @@ const attendersOptions = ref([]);
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInputNumber
|
||||||
v-model="data.quantity"
|
v-model="data.quantity"
|
||||||
:label="t('basicData.quantity')"
|
:label="t('basicData.quantity')"
|
||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="1"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInputNumber
|
||||||
v-model="data.price"
|
v-model="data.price"
|
||||||
:label="t('basicData.price')"
|
:label="t('basicData.price')"
|
||||||
type="number"
|
type="number"
|
||||||
|
|
|
@ -285,8 +285,6 @@ const fetchAddresses = async (formData) => {
|
||||||
});
|
});
|
||||||
addressesOptions.value = data;
|
addressesOptions.value = data;
|
||||||
|
|
||||||
addressesOptions.value = data;
|
|
||||||
|
|
||||||
const { defaultAddress } = selectedClient.value;
|
const { defaultAddress } = selectedClient.value;
|
||||||
formData.addressId = defaultAddress.id;
|
formData.addressId = defaultAddress.id;
|
||||||
};
|
};
|
||||||
|
|
|
@ -307,32 +307,6 @@ Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
||||||
.click();
|
.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('openActionDescriptor', (opt) => {
|
|
||||||
cy.openActionsDescriptor();
|
|
||||||
const listItem = '[role="menu"] .q-list .q-item';
|
|
||||||
cy.contains(listItem, opt).click();
|
|
||||||
1;
|
|
||||||
});
|
|
||||||
|
|
||||||
Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
|
||||||
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
|
|
||||||
.invoke('removeAttr', 'target')
|
|
||||||
.click();
|
|
||||||
});
|
|
||||||
|
|
||||||
Cypress.Commands.add('openActionDescriptor', (opt) => {
|
|
||||||
cy.openActionsDescriptor();
|
|
||||||
const listItem = '[role="menu"] .q-list .q-item';
|
|
||||||
cy.contains(listItem, opt).click();
|
|
||||||
1;
|
|
||||||
});
|
|
||||||
|
|
||||||
Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
|
||||||
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
|
|
||||||
.invoke('removeAttr', 'target')
|
|
||||||
.click();
|
|
||||||
});
|
|
||||||
|
|
||||||
Cypress.Commands.add('openUserPanel', () => {
|
Cypress.Commands.add('openUserPanel', () => {
|
||||||
cy.get(
|
cy.get(
|
||||||
'.column > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image'
|
'.column > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image'
|
||||||
|
|
Loading…
Reference in New Issue