fix: refs #7134 solve comments
This commit is contained in:
parent
0b767ff812
commit
7b170f05bf
|
@ -12,7 +12,7 @@ module.exports = defineConfig({
|
||||||
supportFile: 'test/cypress/support/index.js',
|
supportFile: 'test/cypress/support/index.js',
|
||||||
videosFolder: 'test/cypress/videos',
|
videosFolder: 'test/cypress/videos',
|
||||||
video: false,
|
video: false,
|
||||||
specPattern: 'test/cypress/integration/invoiceOut/*.spec.js',
|
specPattern: 'test/cypress/integration/**/*.spec.js',
|
||||||
experimentalRunAllSpecs: true,
|
experimentalRunAllSpecs: true,
|
||||||
watchForFileChanges: true,
|
watchForFileChanges: true,
|
||||||
reporter: 'cypress-mochawesome-reporter',
|
reporter: 'cypress-mochawesome-reporter',
|
||||||
|
|
|
@ -61,7 +61,6 @@ const handleModelValue = (data) => {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
{{ modelValue }}
|
|
||||||
<VnSelectDialog
|
<VnSelectDialog
|
||||||
v-model="modelValue"
|
v-model="modelValue"
|
||||||
option-filter-value="search"
|
option-filter-value="search"
|
||||||
|
|
|
@ -1,22 +1,23 @@
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
export async function getClientRisk(_filter) {
|
const method = {
|
||||||
|
supplier: 'SupplierRisk',
|
||||||
|
customer: 'ClientrRisk',
|
||||||
|
};
|
||||||
|
export async function getRisk(module, _filter) {
|
||||||
const filter = {
|
const filter = {
|
||||||
..._filter,
|
..._filter,
|
||||||
include: { relation: 'company', scope: { fields: ['code'] } },
|
include: { relation: 'company', scope: { fields: ['code'] } },
|
||||||
};
|
};
|
||||||
|
|
||||||
return await axios(`ClientRisks`, {
|
return await axios(method, {
|
||||||
params: { filter: JSON.stringify(filter) },
|
params: { filter: JSON.stringify(filter) },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getClientRisk(_filter) {
|
||||||
|
return await getRisk(method.customer, _filter);
|
||||||
|
}
|
||||||
export async function getSupplierRisk(_filter) {
|
export async function getSupplierRisk(_filter) {
|
||||||
const filter = {
|
return await getRisk(method.supplier, _filter);
|
||||||
..._filter,
|
|
||||||
include: { relation: 'company', scope: { fields: ['code'] } },
|
|
||||||
};
|
|
||||||
|
|
||||||
return await axios(`ClientRisks`, {
|
|
||||||
params: { filter: JSON.stringify(filter) },
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ onBeforeMount(() => {
|
||||||
companyId.value = companyUser.value;
|
companyId.value = companyUser.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
async function getClientRisks() {
|
async function getRisks() {
|
||||||
const filter = {
|
const filter = {
|
||||||
where: { clientFk: route.params.id, companyFk: companyUser.value },
|
where: { clientFk: route.params.id, companyFk: companyUser.value },
|
||||||
};
|
};
|
||||||
|
@ -179,7 +179,7 @@ async function getClientRisks() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getCurrentBalance() {
|
async function getCurrentBalance() {
|
||||||
const currentBalance = (await getClientRisks()).find((balance) => {
|
const currentBalance = (await getRisks()).find((balance) => {
|
||||||
return balance.companyFk === companyId.value;
|
return balance.companyFk === companyId.value;
|
||||||
});
|
});
|
||||||
return currentBalance && currentBalance.amount;
|
return currentBalance && currentBalance.amount;
|
||||||
|
|
|
@ -94,7 +94,6 @@ function handleLocation(data, location) {
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow>
|
<VnRow>
|
||||||
*{{ data.location }}*
|
|
||||||
<VnLocation
|
<VnLocation
|
||||||
:rules="validate('Worker.postcode')"
|
:rules="validate('Worker.postcode')"
|
||||||
:roles-allowed-to-create="['deliveryAssistant', 'administrative']"
|
:roles-allowed-to-create="['deliveryAssistant', 'administrative']"
|
||||||
|
|
|
@ -203,6 +203,12 @@ const onIntrastatCreated = (response, formData) => {
|
||||||
v-model="data.hasKgPrice"
|
v-model="data.hasKgPrice"
|
||||||
:label="t('item.basicData.hasKgPrice')"
|
:label="t('item.basicData.hasKgPrice')"
|
||||||
/>
|
/>
|
||||||
|
<QCheckbox
|
||||||
|
v-model="data.isCustomInspectionRequired"
|
||||||
|
:label="t('item.basicData.isCustomInspectionRequired')"
|
||||||
|
/>
|
||||||
|
</VnRow>
|
||||||
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<div>
|
<div>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
v-model="data.isFragile"
|
v-model="data.isFragile"
|
||||||
|
|
|
@ -158,6 +158,7 @@ item:
|
||||||
isFragileTooltip: Is shown at website, app that this item cannot travel (wreath, palms, ...)
|
isFragileTooltip: Is shown at website, app that this item cannot travel (wreath, palms, ...)
|
||||||
isPhotoRequested: Do photo
|
isPhotoRequested: Do photo
|
||||||
isPhotoRequestedTooltip: This item does need a photo
|
isPhotoRequestedTooltip: This item does need a photo
|
||||||
|
isCustomInspectionRequired: Needs physical inspection (PIF)
|
||||||
description: Description
|
description: Description
|
||||||
fixedPrice:
|
fixedPrice:
|
||||||
itemFk: Item ID
|
itemFk: Item ID
|
||||||
|
|
|
@ -160,6 +160,7 @@ item:
|
||||||
isFragileTooltip: Se muestra en la web, app que este artículo no puede viajar (coronas, palmas, ...)
|
isFragileTooltip: Se muestra en la web, app que este artículo no puede viajar (coronas, palmas, ...)
|
||||||
isPhotoRequested: Hacer foto
|
isPhotoRequested: Hacer foto
|
||||||
isPhotoRequestedTooltip: Este artículo necesita una foto
|
isPhotoRequestedTooltip: Este artículo necesita una foto
|
||||||
|
isCustomInspectionRequired: Necesita inspección física (PIF)
|
||||||
description: Descripción
|
description: Descripción
|
||||||
fixedPrice:
|
fixedPrice:
|
||||||
itemFk: ID Artículo
|
itemFk: ID Artículo
|
||||||
|
|
|
@ -124,10 +124,10 @@ onMounted(async () => {
|
||||||
companyId: companyId.value ?? companyUser.value,
|
companyId: companyId.value ?? companyUser.value,
|
||||||
isConciliated: false,
|
isConciliated: false,
|
||||||
});
|
});
|
||||||
await getSupplierRisks();
|
await getRisks();
|
||||||
});
|
});
|
||||||
|
|
||||||
async function getSupplierRisks() {
|
async function getRisks() {
|
||||||
const filter = {
|
const filter = {
|
||||||
where: { supplierFk: route.params.id, companyFk: companyUser.value },
|
where: { supplierFk: route.params.id, companyFk: companyUser.value },
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
|
@ -106,6 +106,8 @@ function handleLocation(data, location) {
|
||||||
:label="t('supplier.fiscalData.account')"
|
:label="t('supplier.fiscalData.account')"
|
||||||
clearable
|
clearable
|
||||||
data-cy="supplierFiscalDataAccount"
|
data-cy="supplierFiscalDataAccount"
|
||||||
|
insertable
|
||||||
|
:maxlength="10"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('supplier.fiscalData.sageTaxTypeFk')"
|
:label="t('supplier.fiscalData.sageTaxTypeFk')"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import { onBeforeMount, reactive, ref } from 'vue';
|
import { onBeforeMount, reactive, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import axios from 'axios';
|
|
||||||
import { getSupplierRisk } from 'src/composables/getRisk';
|
import { getSupplierRisk } from 'src/composables/getRisk';
|
||||||
import { useDialogPluginComponent } from 'quasar';
|
import { useDialogPluginComponent } from 'quasar';
|
||||||
|
|
||||||
|
@ -15,7 +14,6 @@ import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInputNumber from 'components/common/VnInputNumber.vue';
|
import VnInputNumber from 'components/common/VnInputNumber.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnAccountNumber from 'src/components/common/VnAccountNumber.vue';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
import axios from 'axios';
|
|
||||||
|
|
||||||
export async function getClientRisk(_filter) {
|
|
||||||
const filter = {
|
|
||||||
..._filter,
|
|
||||||
include: { relation: 'company', scope: { fields: ['code'] } },
|
|
||||||
};
|
|
||||||
|
|
||||||
return await axios(`ClientRisks`, {
|
|
||||||
params: { filter: JSON.stringify(filter) },
|
|
||||||
});
|
|
||||||
}
|
|
Loading…
Reference in New Issue