0
0
Fork 0

fix: refs #6273 set paymethodFk to 0 if it is external

This commit is contained in:
Jorge Penadés 2024-06-05 17:13:52 +02:00
parent 7e0ceca623
commit 382591fb11
1 changed files with 1 additions and 5 deletions

View File

@ -13,10 +13,8 @@ import FetchData from 'components/FetchData.vue';
import FormModel from 'components/FormModel.vue'; import FormModel from 'components/FormModel.vue';
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue'; import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
import VnRadio from 'src/components/common/VnRadio.vue'; import VnRadio from 'src/components/common/VnRadio.vue';
import { useStateStore } from 'src/stores/useStateStore';
const { t } = useI18n(); const { t } = useI18n();
const state = useStateStore();
const companiesOptions = ref([]); const companiesOptions = ref([]);
const workersOptions = ref([]); const workersOptions = ref([]);
@ -72,13 +70,12 @@ onBeforeMount(async () => {
v-model="formData.isFreelance" v-model="formData.isFreelance"
:val="false" :val="false"
:label="`${t('Internal')}`" :label="`${t('Internal')}`"
@update:model-value="state.set('worker', formData)"
/> />
<VnRadio <VnRadio
v-model="formData.isFreelance" v-model="formData.isFreelance"
:val="true" :val="true"
:label="`${t('External')}`" :label="`${t('External')}`"
@update:model-value="state.set('worker', formData)" @update:model-value="formData.payMethodFk = 0"
/> />
</template> </template>
</VnSubToolbar> </VnSubToolbar>
@ -150,7 +147,6 @@ onBeforeMount(async () => {
v-model="data.fi" v-model="data.fi"
:label="t('worker.create.fi')" :label="t('worker.create.fi')"
:rules="validate('Worker.fi')" :rules="validate('Worker.fi')"
:disable="formData.isFreelance"
/> />
<VnInputDate <VnInputDate
v-model="data.birth" v-model="data.birth"