forked from verdnatura/salix-front
feat: restore component
This commit is contained in:
parent
79d986b9ec
commit
5d1873808d
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { onMounted } from 'vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
|
@ -9,7 +9,6 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import { useRole } from 'src/composables/useRole';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
|
@ -24,7 +23,6 @@ const companiesOptions = ref([]);
|
|||
const suppliersOptions = ref([]);
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const isEmployee = computed(() => useRole().isEmployee());
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
|
@ -32,7 +30,6 @@ onMounted(async () => {
|
|||
|
||||
<template>
|
||||
<FetchData
|
||||
v-if="isEmployee"
|
||||
ref="companiesRef"
|
||||
url="Companies"
|
||||
:filter="{ fields: ['id', 'code'] }"
|
||||
|
@ -49,7 +46,6 @@ onMounted(async () => {
|
|||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
v-if="isEmployee"
|
||||
url="Suppliers"
|
||||
:filter="{ fields: ['id', 'nickname', 'name'] }"
|
||||
order="nickname"
|
||||
|
@ -101,7 +97,7 @@ onMounted(async () => {
|
|||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-if="isEmployee">
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('params.companyFk')"
|
||||
|
@ -133,7 +129,7 @@ onMounted(async () => {
|
|||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-if="isEmployee">
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('params.supplierFk')"
|
||||
|
@ -221,7 +217,7 @@ onMounted(async () => {
|
|||
<i18n>
|
||||
en:
|
||||
params:
|
||||
|
||||
|
||||
invoiceNumber: Invoice number
|
||||
travelFk: Travel
|
||||
companyFk: Company
|
||||
|
@ -235,7 +231,7 @@ en:
|
|||
isOrdered: Ordered
|
||||
es:
|
||||
params:
|
||||
|
||||
|
||||
invoiceNumber: Núm. factura
|
||||
travelFk: Envío
|
||||
companyFk: Empresa
|
||||
|
|
Loading…
Reference in New Issue