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