#7936 improve InvoiceIn #1004

Merged
jorgep merged 55 commits from 7936-improveInvoiceIn into dev 2024-12-18 09:22:09 +00:00
1 changed files with 15 additions and 7 deletions
Showing only changes of commit a33cec4a34 - Show all commits

View File

@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
import { useArrayData } from 'src/composables/useArrayData'; import { useArrayData } from 'src/composables/useArrayData';
import { useRequired } from 'src/composables/useRequired'; import { useRequired } from 'src/composables/useRequired';
import dataByOrder from 'src/utils/dataByOrder'; import dataByOrder from 'src/utils/dataByOrder';
import { QItemLabel } from 'quasar';
const emit = defineEmits(['update:modelValue', 'update:options', 'remove']); const emit = defineEmits(['update:modelValue', 'update:options', 'remove']);
const $attrs = useAttrs(); const $attrs = useAttrs();
@ -33,6 +34,10 @@ const $props = defineProps({
type: String, type: String,
default: 'id', default: 'id',
}, },
optionCaption: {
type: String,
default: null,
},
optionFilter: { optionFilter: {
type: String, type: String,
default: null, default: null,
@ -373,13 +378,16 @@ function handleKeyDown(event) {
</template> </template>
<template #option="{ opt, itemProps }"> <template #option="{ opt, itemProps }">
<QItem v-bind="itemProps"> <QItem v-bind="itemProps">
<QItemSection> <QItemSection v-if="opt[optionValue] == opt[optionLabel]">
<QItemLabel v-if="opt[optionValue] == opt[optionLabel]">{{ <QItemLabel>{{ opt[optionLabel] }}</QItemLabel>
opt[optionLabel] </QItemSection>
}}</QItemLabel> <QItemSection v-else>
<QItemLabel v-else>{{ <QItemLabel>
`#${opt[optionValue]} - ${opt[optionLabel]}` {{ opt[optionLabel] }}
}}</QItemLabel> </QItemLabel>
<QItemLabel caption v-if="optionCaption !== false">
Review

Sacado de esta tarea https://redmine.verdnatura.es/issues/8117 . Lo he añadido en esta porque me lo estaban pidiendo ya ... En la tarea que se revise en cada sitio que campos mostrar.

Sacado de esta tarea https://redmine.verdnatura.es/issues/8117 . Lo he añadido en esta porque me lo estaban pidiendo ya ... En la tarea que se revise en cada sitio que campos mostrar.
{{ `#${opt[optionCaption] || opt[optionValue]}` }}
</QItemLabel>
</QItemSection> </QItemSection>
</QItem> </QItem>
</template> </template>