WIP
This commit is contained in:
parent
806a0a1d8b
commit
11839c7811
|
@ -13,14 +13,20 @@ const formData = reactive({
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<QDialog>
|
||||
<QCard class="q-pa-xl column">
|
||||
<span>{{ t('title') }}</span>
|
||||
<span>{{ t('subtitle') }}</span>
|
||||
<QInput :label="t('name')" v-model="formData.name" />
|
||||
</QDialog>
|
||||
</QCard>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
en:
|
||||
name: Name *
|
||||
title: New bank entity
|
||||
subtitle: Please, ensure you put the correct data!
|
||||
es:
|
||||
name: Nombre *
|
||||
title: Nueva entidad bancaria
|
||||
subtitle: ¡Por favor, asegúrate de poner los datos correctos!
|
||||
</i18n>
|
||||
|
|
|
@ -38,7 +38,7 @@ const value = computed({
|
|||
},
|
||||
});
|
||||
|
||||
const isDeliveryAssistant = computed(() => {
|
||||
const isAllowedToCreate = computed(() => {
|
||||
return role.hasAny($props.rolesAllowedToCreate);
|
||||
});
|
||||
|
||||
|
@ -56,7 +56,7 @@ const openCreateForm = () => {
|
|||
option-label="label"
|
||||
hide-selected
|
||||
>
|
||||
<template v-if="isDeliveryAssistant" #append>
|
||||
<template v-if="isAllowedToCreate" #append>
|
||||
<QIcon
|
||||
@click.stop.prevent="openCreateForm()"
|
||||
name="add"
|
||||
|
|
|
@ -7,6 +7,8 @@ import FormModel from 'components/FormModel.vue';
|
|||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||
import VnSelectCreate from 'src/components/common/VnSelectCreate.vue';
|
||||
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
|
||||
|
||||
import { useUserConfig } from 'src/composables/useUserConfig';
|
||||
|
||||
|
@ -259,7 +261,7 @@ const onFetchWorkerConfig = (workerConfig) => {
|
|||
<div class="col">
|
||||
<QInput v-model="data.iban" :label="t('worker.create.iban')" />
|
||||
</div>
|
||||
<div class="col">
|
||||
<!-- <div class="col">
|
||||
<VnSelectFilter
|
||||
:label="t('worker.create.bankEntity')"
|
||||
v-model="data.bankEntityFk"
|
||||
|
@ -279,7 +281,17 @@ const onFetchWorkerConfig = (workerConfig) => {
|
|||
</QItem>
|
||||
</template></VnSelectFilter
|
||||
>
|
||||
</div>
|
||||
</div> -->
|
||||
<VnSelectCreate
|
||||
:label="t('worker.create.bankEntity')"
|
||||
v-model="data.bankEntityFk"
|
||||
:options="filtersOptions.bankEntities"
|
||||
:roles-allowed-to-create="['salesAssistant', 'hr']"
|
||||
>
|
||||
<template #form>
|
||||
<CreateBankEntityForm></CreateBankEntityForm>
|
||||
</template>
|
||||
</VnSelectCreate>
|
||||
</VnRow>
|
||||
<pre>data:: {{ data }}</pre>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue