feat: refs #7006 itemTypeLog added #825
|
@ -7,7 +7,6 @@ import FetchData from 'components/FetchData.vue';
|
|||
|
||||
const { t } = useI18n();
|
||||
const tableRef = ref();
|
||||
const workerOptions = ref([]);
|
||||
const ItemCategoriesOptions = ref([]);
|
||||
|
||||
const columns = computed(() => [
|
||||
|
@ -40,12 +39,12 @@ const columns = computed(() => [
|
|||
create: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
options: workerOptions.value,
|
||||
optionLabel: 'firstName',
|
||||
url: 'Workers/search',
|
||||
optionLabel: 'nickname',
|
||||
optionValue: 'id',
|
||||
},
|
||||
cardVisible: false,
|
||||
visible: false,
|
||||
cardVisible: true,
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -78,12 +77,6 @@ const columns = computed(() => [
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="Workers"
|
||||
:filter="{ fields: ['id', 'firstName'], order: ['firstName ASC'] }"
|
||||
@on-fetch="(data) => (workerOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="ItemCategories"
|
||||
:filter="{ fields: ['id', 'name'], order: ['name ASC'] }"
|
||||
|
|
|
@ -8,12 +8,14 @@ import FormModel from 'components/FormModel.vue';
|
|||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
const categoriesOptions = ref([]);
|
||||
const temperaturesOptions = ref([]);
|
||||
const itemPackingTypesOptions = ref([]);
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -28,6 +30,16 @@ const temperaturesOptions = ref([]);
|
|||
:filter="{ order: 'name ASC', fields: ['code', 'name'] }"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="ItemPackingTypes"
|
||||
@on-fetch="(data) => (itemPackingTypesOptions = data)"
|
||||
:filter="{
|
||||
where: { isActive: true },
|
||||
order: 'description ASC',
|
||||
fields: ['code', 'description'],
|
||||
}"
|
||||
auto-load
|
||||
/>
|
||||
<FormModel
|
||||
:url="`ItemTypes/${route.params.id}`"
|
||||
:url-update="`ItemTypes/${route.params.id}`"
|
||||
|
@ -46,11 +58,18 @@ const temperaturesOptions = ref([]);
|
|||
:label="t('shared.worker')"
|
||||
sort-by="nickname ASC"
|
||||
:fields="['id', 'nickname']"
|
||||
:params="{ departmentCodes: ['shopping'] }"
|
||||
option-label="nickname"
|
||||
option-value="id"
|
||||
hide-selected
|
||||
><template #option="scope">
|
||||
>
|
||||
<template #prepend>
|
||||
<VnAvatar
|
||||
:worker-id="data.workerFk"
|
||||
color="primary"
|
||||
:title="title"
|
||||
/>
|
||||
</template>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
||||
|
@ -80,6 +99,21 @@ const temperaturesOptions = ref([]);
|
|||
option-label="name"
|
||||
hide-selected
|
||||
/>
|
||||
<VnInput v-model="data.life" :label="t('shared.life')" />
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
v-model="data.itemPackingTypeFk"
|
||||
:label="t('shared.itemPackingType')"
|
||||
:options="itemPackingTypesOptions"
|
||||
option-value="code"
|
||||
option-label="description"
|
||||
hide-selected
|
||||
/>
|
||||
<VnInput v-model="data.maxRefs" :label="t('shared.maxRefs')" />
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox v-model="data.isFragile" :label="t('shared.fragile')" />
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<script setup>
|
||||
import VnLog from 'src/components/common/VnLog.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnLog model="ItemType" url="/ItemTypeLogs"></VnLog>
|
||||
</template>
|
|
@ -4,6 +4,10 @@ shared:
|
|||
worker: Worker
|
||||
category: Category
|
||||
temperature: Temperature
|
||||
life: Life
|
||||
itemPackingType: Item packing type
|
||||
maxRefs: Maximum references
|
||||
fragile: Fragile
|
||||
summary:
|
||||
id: id
|
||||
life: Life
|
||||
|
|
|
@ -4,6 +4,10 @@ shared:
|
|||
worker: Trabajador
|
||||
category: Reino
|
||||
temperature: Temperatura
|
||||
life: Vida
|
||||
itemPackingType: Tipo de embalaje
|
||||
maxRefs: Referencias máximas
|
||||
fragile: Frágil
|
||||
summary:
|
||||
id: id
|
||||
code: Código
|
||||
|
|
|
@ -12,7 +12,7 @@ export default {
|
|||
redirect: { name: 'ItemTypeList' },
|
||||
menus: {
|
||||
main: [],
|
||||
card: ['ItemTypeBasicData'],
|
||||
card: ['ItemTypeBasicData', 'ItemTypeLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -40,6 +40,15 @@ export default {
|
|||
component: () =>
|
||||
import('src/pages/ItemType/Card/ItemTypeBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'log',
|
||||
name: 'ItemTypeLog',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'vn:History',
|
||||
},
|
||||
component: () => import('src/pages/ItemType/Card/ItemTypeLog.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue