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