forked from verdnatura/salix-front
fix: WorkerDescriptor
This commit is contained in:
parent
0e66f08674
commit
2f55272df7
|
@ -1221,23 +1221,11 @@ item:
|
||||||
minSalesQuantity: 'Cantidad mínima de venta'
|
minSalesQuantity: 'Cantidad mínima de venta'
|
||||||
genus: 'Genus'
|
genus: 'Genus'
|
||||||
specie: 'Specie'
|
specie: 'Specie'
|
||||||
itemType:
|
item/itemType:
|
||||||
pageTitles:
|
pageTitles:
|
||||||
itemType: Item type
|
itemType: Item type
|
||||||
basicData: Basic data
|
basicData: Basic data
|
||||||
summary: Summary
|
summary: Summary
|
||||||
shared:
|
|
||||||
code: Code
|
|
||||||
name: Name
|
|
||||||
worker: Worker
|
|
||||||
category: Category
|
|
||||||
temperature: Temperature
|
|
||||||
summary:
|
|
||||||
id: id
|
|
||||||
life: Life
|
|
||||||
promo: Promo
|
|
||||||
itemPackingType: Item packing type
|
|
||||||
isUnconventionalSize: Is unconventional size
|
|
||||||
components:
|
components:
|
||||||
topbar: {}
|
topbar: {}
|
||||||
itemsFilterPanel:
|
itemsFilterPanel:
|
||||||
|
|
|
@ -1225,23 +1225,6 @@ item/itemType:
|
||||||
itemType: Familia
|
itemType: Familia
|
||||||
basicData: Datos básicos
|
basicData: Datos básicos
|
||||||
summary: Resumen
|
summary: Resumen
|
||||||
shared:
|
|
||||||
code: Código
|
|
||||||
name: Nombre
|
|
||||||
worker: Trabajador
|
|
||||||
category: Reino
|
|
||||||
temperature: Temperatura
|
|
||||||
summary:
|
|
||||||
id: id
|
|
||||||
code: Código
|
|
||||||
name: Nombre
|
|
||||||
worker: Trabajador
|
|
||||||
category: Reino
|
|
||||||
temperature: Temperatura
|
|
||||||
life: Vida
|
|
||||||
promo: Promoción
|
|
||||||
itemPackingType: Tipo de embalaje
|
|
||||||
isUnconventionalSize: Es de tamaño poco convencional
|
|
||||||
components:
|
components:
|
||||||
topbar: {}
|
topbar: {}
|
||||||
itemsFilterPanel:
|
itemsFilterPanel:
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
@ -58,7 +58,7 @@ const redirectToItemTypeBasicData = (_, { id }) => {
|
||||||
<VnInput v-model="data.name" :label="t('itemType.shared.name')" />
|
<VnInput v-model="data.name" :label="t('itemType.shared.name')" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<VnSelectFilter
|
<VnSelect
|
||||||
v-model="data.workerFk"
|
v-model="data.workerFk"
|
||||||
:label="t('itemType.shared.worker')"
|
:label="t('itemType.shared.worker')"
|
||||||
:options="workersOptions"
|
:options="workersOptions"
|
||||||
|
@ -66,7 +66,7 @@ const redirectToItemTypeBasicData = (_, { id }) => {
|
||||||
option-label="firstName"
|
option-label="firstName"
|
||||||
hide-selected
|
hide-selected
|
||||||
/>
|
/>
|
||||||
<VnSelectFilter
|
<VnSelect
|
||||||
v-model="data.categoryFk"
|
v-model="data.categoryFk"
|
||||||
:label="t('itemType.shared.category')"
|
:label="t('itemType.shared.category')"
|
||||||
:options="categoriesOptions"
|
:options="categoriesOptions"
|
||||||
|
@ -76,7 +76,7 @@ const redirectToItemTypeBasicData = (_, { id }) => {
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<VnSelectFilter
|
<VnSelect
|
||||||
v-model="data.temperatureFk"
|
v-model="data.temperatureFk"
|
||||||
:label="t('itemType.shared.temperature')"
|
:label="t('itemType.shared.temperature')"
|
||||||
:options="temperaturesOptions"
|
:options="temperaturesOptions"
|
||||||
|
|
|
@ -7,7 +7,7 @@ import FetchData from 'components/FetchData.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -43,21 +43,21 @@ const temperaturesOptions = ref([]);
|
||||||
>
|
>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<VnInput v-model="data.code" :label="t('itemType.shared.code')" />
|
<VnInput v-model="data.code" :label="t('shared.code')" />
|
||||||
<VnInput v-model="data.name" :label="t('itemType.shared.name')" />
|
<VnInput v-model="data.name" :label="t('shared.name')" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<VnSelectFilter
|
<VnSelect
|
||||||
v-model="data.workerFk"
|
v-model="data.workerFk"
|
||||||
:label="t('itemType.shared.worker')"
|
:label="t('shared.worker')"
|
||||||
:options="workersOptions"
|
:options="workersOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="firstName"
|
option-label="firstName"
|
||||||
hide-selected
|
hide-selected
|
||||||
/>
|
/>
|
||||||
<VnSelectFilter
|
<VnSelect
|
||||||
v-model="data.categoryFk"
|
v-model="data.categoryFk"
|
||||||
:label="t('itemType.shared.category')"
|
:label="t('shared.category')"
|
||||||
:options="categoriesOptions"
|
:options="categoriesOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
@ -65,9 +65,9 @@ const temperaturesOptions = ref([]);
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<VnSelectFilter
|
<VnSelect
|
||||||
v-model="data.temperatureFk"
|
v-model="data.temperatureFk"
|
||||||
:label="t('itemType.shared.temperature')"
|
:label="t('shared.temperature')"
|
||||||
:options="temperaturesOptions"
|
:options="temperaturesOptions"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
|
||||||
import useCardDescription from 'src/composables/useCardDescription';
|
import useCardDescription from 'src/composables/useCardDescription';
|
||||||
|
|
||||||
|
@ -65,13 +66,15 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('itemType.shared.code')" :value="entity.code" />
|
<VnLv :label="t('shared.code')" :value="entity.code" />
|
||||||
<VnLv :label="t('itemType.shared.name')" :value="entity.name" />
|
<VnLv :label="t('shared.name')" :value="entity.name" />
|
||||||
<VnLv
|
<VnLv :label="t('shared.worker')">
|
||||||
:label="t('itemType.shared.worker')"
|
<template #value>
|
||||||
:value="entity.worker?.firstName"
|
<span class="link">{{ entity.worker?.firstName }}</span>
|
||||||
/>
|
<WorkerDescriptorProxy :id="entity.worker?.id" />
|
||||||
<VnLv :label="t('itemType.shared.category')" :value="entity.category?.name" />
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
<VnLv :label="t('shared.category')" :value="entity.category?.name" />
|
||||||
</template>
|
</template>
|
||||||
</CardDescriptor>
|
</CardDescriptor>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import { ref, computed, onUpdated } from 'vue';
|
import { ref, computed, onUpdated } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
@ -71,30 +72,29 @@ async function setItemTypeData(data) {
|
||||||
{{ t('globals.summary.basicData') }}
|
{{ t('globals.summary.basicData') }}
|
||||||
<QIcon name="open_in_new" />
|
<QIcon name="open_in_new" />
|
||||||
</router-link>
|
</router-link>
|
||||||
<VnLv :label="t('itemType.summary.id')" :value="itemType.id" />
|
<VnLv :label="t('summary.id')" :value="itemType.id" />
|
||||||
<VnLv :label="t('itemType.shared.code')" :value="itemType.code" />
|
<VnLv :label="t('shared.code')" :value="itemType.code" />
|
||||||
<VnLv :label="t('itemType.shared.name')" :value="itemType.name" />
|
<VnLv :label="t('shared.name')" :value="itemType.name" />
|
||||||
|
<VnLv :label="t('shared.worker')">
|
||||||
|
<template #value>
|
||||||
|
<span class="link">{{ itemType.worker?.firstName }}</span>
|
||||||
|
<WorkerDescriptorProxy :id="itemType.worker?.id" />
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
<VnLv :label="t('shared.category')" :value="itemType.category?.name" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('itemType.shared.worker')"
|
:label="t('shared.temperature')"
|
||||||
:value="itemType.worker?.firstName"
|
|
||||||
/>
|
|
||||||
<VnLv
|
|
||||||
:label="t('itemType.shared.category')"
|
|
||||||
:value="itemType.category?.name"
|
|
||||||
/>
|
|
||||||
<VnLv
|
|
||||||
:label="t('itemType.shared.temperature')"
|
|
||||||
:value="itemType.temperature?.name"
|
:value="itemType.temperature?.name"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('itemType.summary.life')" :value="itemType.life" />
|
<VnLv :label="t('summary.life')" :value="itemType.life" />
|
||||||
<VnLv :label="t('itemType.summary.promo')" :value="itemType.promo" />
|
<VnLv :label="t('summary.promo')" :value="itemType.promo" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('itemType.summary.itemPackingType')"
|
:label="t('summary.itemPackingType')"
|
||||||
:value="itemType.itemPackingType?.description"
|
:value="itemType.itemPackingType?.description"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
class="large-label"
|
class="large-label"
|
||||||
:label="t('itemType.summary.isUnconventionalSize')"
|
:label="t('summary.isUnconventionalSize')"
|
||||||
:value="itemType.isUnconventionalSize"
|
:value="itemType.isUnconventionalSize"
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
shared:
|
||||||
|
code: Code
|
||||||
|
name: Name
|
||||||
|
worker: Worker
|
||||||
|
category: Category
|
||||||
|
temperature: Temperature
|
||||||
|
summary:
|
||||||
|
id: id
|
||||||
|
life: Life
|
||||||
|
promo: Promo
|
||||||
|
itemPackingType: Item packing type
|
||||||
|
isUnconventionalSize: Is unconventional size
|
|
@ -0,0 +1,17 @@
|
||||||
|
shared:
|
||||||
|
code: Código
|
||||||
|
name: Nombre
|
||||||
|
worker: Trabajador
|
||||||
|
category: Reino
|
||||||
|
temperature: Temperatura
|
||||||
|
summary:
|
||||||
|
id: id
|
||||||
|
code: Código
|
||||||
|
name: Nombre
|
||||||
|
worker: Trabajador
|
||||||
|
category: Reino
|
||||||
|
temperature: Temperatura
|
||||||
|
life: Vida
|
||||||
|
promo: Promoción
|
||||||
|
itemPackingType: Tipo de embalaje
|
||||||
|
isUnconventionalSize: Es de tamaño poco convencional
|
Loading…
Reference in New Issue