forked from verdnatura/salix-front
feat(Supplier): add companySize
This commit is contained in:
parent
c22c8d9f11
commit
777ac58f04
|
@ -106,6 +106,9 @@ globals:
|
||||||
weight: Weight
|
weight: Weight
|
||||||
error: Ups! Something went wrong
|
error: Ups! Something went wrong
|
||||||
recalc: Recalculate
|
recalc: Recalculate
|
||||||
|
small: Small
|
||||||
|
medium: Medium
|
||||||
|
big: Big
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Login
|
logIn: Login
|
||||||
addressEdit: Update address
|
addressEdit: Update address
|
||||||
|
@ -942,6 +945,7 @@ supplier:
|
||||||
isActive: Active
|
isActive: Active
|
||||||
isPayMethodChecked: PayMethod checked
|
isPayMethodChecked: PayMethod checked
|
||||||
note: Notes
|
note: Notes
|
||||||
|
size: Size
|
||||||
fiscalData:
|
fiscalData:
|
||||||
name: Social name *
|
name: Social name *
|
||||||
nif: Tax number *
|
nif: Tax number *
|
||||||
|
|
|
@ -108,6 +108,9 @@ globals:
|
||||||
weight: Peso
|
weight: Peso
|
||||||
error: ¡Ups! Algo salió mal
|
error: ¡Ups! Algo salió mal
|
||||||
recalc: Recalcular
|
recalc: Recalcular
|
||||||
|
small: Pequeño/a
|
||||||
|
medium: Mediano/a
|
||||||
|
big: Grande
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Inicio de sesión
|
logIn: Inicio de sesión
|
||||||
addressEdit: Modificar consignatario
|
addressEdit: Modificar consignatario
|
||||||
|
@ -940,6 +943,7 @@ supplier:
|
||||||
isActive: Activo
|
isActive: Activo
|
||||||
isPayMethodChecked: Método de pago validado
|
isPayMethodChecked: Método de pago validado
|
||||||
note: Notas
|
note: Notas
|
||||||
|
size: Tamaño
|
||||||
fiscalData:
|
fiscalData:
|
||||||
name: Razón social *
|
name: Razón social *
|
||||||
nif: NIF/CIF *
|
nif: NIF/CIF *
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
|
@ -9,8 +8,11 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const companySizes = [
|
||||||
const workersOptions = ref([]);
|
{ id: 'small', name: t('globals.small'), size: '1-5' },
|
||||||
|
{ id: 'medium', name: t('globals.medium'), size: '6-50' },
|
||||||
|
{ id: 'big', name: t('globals.big'), size: '>50' },
|
||||||
|
];
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FormModel
|
<FormModel
|
||||||
|
@ -31,11 +33,6 @@ const workersOptions = ref([]);
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('supplier.basicData.workerFk')"
|
:label="t('supplier.basicData.workerFk')"
|
||||||
v-model="data.workerFk"
|
v-model="data.workerFk"
|
||||||
:options="workersOptions"
|
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
hide-selected
|
|
||||||
map-options
|
|
||||||
url="Workers/search"
|
url="Workers/search"
|
||||||
sort-by="nickname ASC"
|
sort-by="nickname ASC"
|
||||||
:rules="validate('supplier.workerFk')"
|
:rules="validate('supplier.workerFk')"
|
||||||
|
@ -58,6 +55,24 @@ const workersOptions = ref([]);
|
||||||
</QItem>
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
</VnSelect>
|
</VnSelect>
|
||||||
|
<VnSelect
|
||||||
|
:label="t('supplier.basicData.size')"
|
||||||
|
v-model="data.companySize"
|
||||||
|
:options="companySizes"
|
||||||
|
sort-by="nickname ASC"
|
||||||
|
:rules="validate('supplier.workerFk')"
|
||||||
|
>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
||||||
|
<QItemLabel caption>
|
||||||
|
{{ scope.opt?.size }}
|
||||||
|
</QItemLabel>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelect>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
|
@ -88,4 +103,5 @@ const workersOptions = ref([]);
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Responsible for approving invoices: Responsable de aprobar las facturas
|
Responsible for approving invoices: Responsable de aprobar las facturas
|
||||||
|
Small(1-5), Medium(6-50), Big(> 50): Pequeño(1-5), Mediano(6-50), Grande(> 50)
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -65,6 +65,22 @@ const getUrl = (section) => `#/supplier/${entityId.value}/${section}`;
|
||||||
<span> {{ dashIfEmpty(supplier.note) }} </span>
|
<span> {{ dashIfEmpty(supplier.note) }} </span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
|
<VnLv
|
||||||
|
:label="t('supplier.basicData.size')"
|
||||||
|
:value="supplier.companySize"
|
||||||
|
class="q-mb-xs"
|
||||||
|
>
|
||||||
|
<template #value>
|
||||||
|
<span>
|
||||||
|
{{
|
||||||
|
dashIfEmpty(
|
||||||
|
supplier.companySize &&
|
||||||
|
t('globals.' + supplier.companySize)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('supplier.summary.verified')"
|
:label="t('supplier.summary.verified')"
|
||||||
v-model="supplier.isSerious"
|
v-model="supplier.isSerious"
|
||||||
|
|
Loading…
Reference in New Issue