fix: fixed panel function
gitea/salix-front/pipeline/pr-master This commit looks good Details

This commit is contained in:
Jon Elias 2024-12-11 06:05:38 +01:00
parent 0198a25972
commit 309033c6de
5 changed files with 69 additions and 48 deletions

View File

@ -78,29 +78,32 @@ 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('summary.id')" :value="itemType.id" /> <VnLv :label="t('itemType.summary.id')" :value="itemType.id" />
<VnLv :label="t('shared.code')" :value="itemType.code" /> <VnLv :label="t('itemType.shared.code')" :value="itemType.code" />
<VnLv :label="t('shared.name')" :value="itemType.name" /> <VnLv :label="t('itemType.shared.name')" :value="itemType.name" />
<VnLv :label="t('shared.worker')"> <VnLv :label="t('itemType.shared.worker')">
<template #value> <template #value>
<span class="link">{{ itemType.worker?.firstName }}</span> <span class="link">{{ itemType.worker?.firstName }}</span>
<WorkerDescriptorProxy :id="itemType.worker?.id" /> <WorkerDescriptorProxy :id="itemType.worker?.id" />
</template> </template>
</VnLv> </VnLv>
<VnLv :label="t('shared.category')" :value="itemType.category?.name" />
<VnLv <VnLv
:label="t('shared.temperature')" :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('summary.life')" :value="itemType.life" /> <VnLv :label="t('itemType.summary.life')" :value="itemType.life" />
<VnLv :label="t('summary.promo')" :value="itemType.promo" /> <VnLv :label="t('itemType.summary.promo')" :value="itemType.promo" />
<VnLv <VnLv
:label="t('summary.itemPackingType')" :label="t('itemType.summary.itemPackingType')"
:value="itemType.itemPackingType?.description" :value="itemType.itemPackingType?.description"
/> />
<VnLv <VnLv
class="large-label" class="large-label"
:label="t('summary.isUnconventionalSize')" :label="t('itemType.summary.isUnconventionalSize')"
:value="itemType.isUnconventionalSize" :value="itemType.isUnconventionalSize"
/> />
</QCard> </QCard>

View File

@ -1,16 +1,17 @@
shared: itemType:
code: Code shared:
name: Name code: Code
worker: Worker name: Name
category: Category worker: Worker
temperature: Temperature category: Category
life: Life temperature: Temperature
itemPackingType: Item packing type life: Life
maxRefs: Maximum references itemPackingType: Item packing type
fragile: Fragile maxRefs: Maximum references
summary: fragile: Fragile
id: id summary:
life: Life id: id
promo: Promo life: Life
itemPackingType: Item packing type promo: Promo
isUnconventionalSize: Is unconventional size itemPackingType: Item packing type
isUnconventionalSize: Is unconventional size

View File

@ -1,16 +1,17 @@
shared: itemType:
code: Código shared:
name: Nombre code: Código
worker: Trabajador name: Nombre
category: Reino worker: Trabajador
temperature: Temperatura category: Reino
life: Vida temperature: Temperatura
itemPackingType: Tipo de embalaje life: Vida
maxRefs: Referencias máximas itemPackingType: Tipo de embalaje
fragile: Frágil maxRefs: Referencias máximas
summary: fragile: Frágil
id: id summary:
life: Vida id: id
promo: Promoción life: Vida
itemPackingType: Tipo de embalaje promo: Promoción
isUnconventionalSize: Es de tamaño poco convencional itemPackingType: Tipo de embalaje
isUnconventionalSize: Es de tamaño poco convencional

View File

@ -52,6 +52,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
:last-day="lastDay" :last-day="lastDay"
:events="events" :events="events"
v-model:formModeName="formModeName" v-model:formModeName="formModeName"
@open-zone-form="openForm"
/> />
</QScrollArea> </QScrollArea>
</QDrawer> </QDrawer>

View File

@ -11,10 +11,6 @@ import { dashIfEmpty } from 'src/filters';
import { useWeekdayStore } from 'src/stores/useWeekdayStore'; import { useWeekdayStore } from 'src/stores/useWeekdayStore';
import { useVnConfirm } from 'composables/useVnConfirm'; import { useVnConfirm } from 'composables/useVnConfirm';
const formModeName = defineModel('formModeName', {
type: String,
required: true,
});
const props = defineProps({ const props = defineProps({
firstDay: { firstDay: {
type: Date, type: Date,
@ -31,8 +27,18 @@ const props = defineProps({
required: true, required: true,
default: () => [], default: () => [],
}, },
formModeName: {
type: String,
required: true,
default: 'include',
},
}); });
const formName = computed({
get: () => props.formModeName,
set: (value) => emit('update:formModeName', value),
});
const emit = defineEmits(['openZoneForm', 'update:formModeName']);
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const weekdayStore = useWeekdayStore(); const weekdayStore = useWeekdayStore();
@ -80,6 +86,15 @@ const deleteEvent = async (id) => {
await fetchData(); await fetchData();
}; };
const openInclusionForm = (event) => {
formName.value = 'include';
emit('openZoneForm', {
date: event.dated,
event,
isNewMode: false,
});
};
onMounted(async () => { onMounted(async () => {
weekdayStore.initStore(); weekdayStore.initStore();
}); });
@ -92,13 +107,13 @@ onMounted(async () => {
t('eventsPanel.editMode') t('eventsPanel.editMode')
}}</span> }}</span>
<QRadio <QRadio
v-model="formModeName" v-model="formName"
dense dense
val="include" val="include"
:label="t('eventsPanel.include')" :label="t('eventsPanel.include')"
/> />
<QRadio <QRadio
v-model="formModeName" v-model="formName"
dense dense
val="exclude" val="exclude"
:label="t('eventsPanel.exclude')" :label="t('eventsPanel.exclude')"