Merge pull request 'hotfix_customerAddress_agent' (!1794) from hotfix_customerAddress_agent into master
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:
Javier Segarra 2025-05-12 11:21:51 +00:00
commit 504e08d88b
2 changed files with 12 additions and 1 deletions

View File

@ -179,6 +179,11 @@ function handleLocation(data, location) {
data.provinceFk = provinceFk;
data.countryFk = countryFk;
}
function onAgentCreated({ id, fiscalName }, data) {
customsAgents.value.push({ id, fiscalName });
data.customsAgentFk = id;
}
</script>
<template>
@ -292,9 +297,14 @@ function handleLocation(data, location) {
option-value="id"
v-model="data.customsAgentFk"
:tooltip="t('New customs agent')"
:acls="[{ model: 'CustomsAgent', props: '*', accessType: 'WRITE' }]"
>
<template #form>
<CustomerNewCustomsAgent />
<CustomerNewCustomsAgent
@on-data-saved="
(requestResponse) => onAgentCreated(requestResponse, data)
"
/>
</template>
</VnSelectDialog>
</VnRow>

View File

@ -16,6 +16,7 @@ const onDataSaved = (dataSaved) => {
<template>
<FormModelPopup
:form-initial-data="{}"
:title="t('New customs agent')"
@on-data-saved="onDataSaved($event)"
model="customer"