Merge pull request 'hotfix_customerAddress_agent' (!1794) from hotfix_customerAddress_agent into master
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1794 Reviewed-by: Pau Rovira <provira@verdnatura.es>
This commit is contained in:
commit
504e08d88b
|
@ -179,6 +179,11 @@ function handleLocation(data, location) {
|
||||||
data.provinceFk = provinceFk;
|
data.provinceFk = provinceFk;
|
||||||
data.countryFk = countryFk;
|
data.countryFk = countryFk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onAgentCreated({ id, fiscalName }, data) {
|
||||||
|
customsAgents.value.push({ id, fiscalName });
|
||||||
|
data.customsAgentFk = id;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -292,9 +297,14 @@ function handleLocation(data, location) {
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.customsAgentFk"
|
v-model="data.customsAgentFk"
|
||||||
:tooltip="t('New customs agent')"
|
:tooltip="t('New customs agent')"
|
||||||
|
:acls="[{ model: 'CustomsAgent', props: '*', accessType: 'WRITE' }]"
|
||||||
>
|
>
|
||||||
<template #form>
|
<template #form>
|
||||||
<CustomerNewCustomsAgent />
|
<CustomerNewCustomsAgent
|
||||||
|
@on-data-saved="
|
||||||
|
(requestResponse) => onAgentCreated(requestResponse, data)
|
||||||
|
"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</VnSelectDialog>
|
</VnSelectDialog>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
|
@ -16,6 +16,7 @@ const onDataSaved = (dataSaved) => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FormModelPopup
|
<FormModelPopup
|
||||||
|
:form-initial-data="{}"
|
||||||
:title="t('New customs agent')"
|
:title="t('New customs agent')"
|
||||||
@on-data-saved="onDataSaved($event)"
|
@on-data-saved="onDataSaved($event)"
|
||||||
model="customer"
|
model="customer"
|
||||||
|
|
Loading…
Reference in New Issue