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