0
0
Fork 0

refs #6157 change hide, descriptor, development

This commit is contained in:
Carlos Satorres 2023-10-19 14:29:38 +02:00
parent 6dc1767b56
commit 841ed5d81a
4 changed files with 19 additions and 14 deletions

View File

@ -81,7 +81,6 @@ const value = computed({
map-options map-options
use-input use-input
@filter="filterHandler" @filter="filterHandler"
hide-selected
fill-input fill-input
ref="vnSelectRef" ref="vnSelectRef"
> >

View File

@ -2,7 +2,6 @@
import { onMounted, useSlots, ref, watch } from 'vue'; import { onMounted, useSlots, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import axios from 'axios'; import axios from 'axios';
import { useArrayData } from 'src/composables/useArrayData';
import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue'; import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue';
const $props = defineProps({ const $props = defineProps({
@ -27,19 +26,18 @@ const $props = defineProps({
default: 0, default: 0,
}, },
}); });
const arrayData = useArrayData('claimData');
const store = arrayData.store;
console.log('eee', store.data);
const slots = useSlots(); const slots = useSlots();
const { t } = useI18n(); const { t } = useI18n();
const entity = ref(null); const entity = ref(null);
let lastUrl = ref(null); let lastUrl = ref(null);
onMounted(async () => { onMounted(async () => {
entity.value = await store.data; await fetch();
}); });
const emit = defineEmits(['onFetch']); const emit = defineEmits(['onFetch']);
async function fetch() { async function fetch() {
lastUrl.value = $props.url; lastUrl.value = $props.url;
const params = {}; const params = {};

View File

@ -92,7 +92,7 @@ const columns = computed(() => [
name: 'delete', name: 'delete',
}, },
]); ]);
console.log(claimData.store.data);
watchEffect(() => { watchEffect(() => {
if (rows.value.length) { if (rows.value.length) {
destinations.value = rows.value.map((row) => destinations.value = rows.value.map((row) =>
@ -103,6 +103,7 @@ watchEffect(() => {
}); });
function getDestination(destinationId) { function getDestination(destinationId) {
console.log(destinationTypes.value.find((type) => type.id == destinationId));
return destinationTypes.value.find((type) => type.id == destinationId); return destinationTypes.value.find((type) => type.id == destinationId);
} }
@ -205,6 +206,17 @@ async function updateDestinations(claimDestinationFk) {
@click="dialog = !dialog" @click="dialog = !dialog"
/> />
</QToolbar> </QToolbar>
<!-- <QPageSticky position="top-right" :offset="[25, 25]">
<QBtn
color="primary"
text-color="white"
class="q-mx-sm"
:unelevated="true"
:disable="!selectedRows.length"
:label="t('Change destination')"
@click="dialog = !dialog"
/>
</QPageSticky> -->
</Teleport> </Teleport>
<div class="claim-action"> <div class="claim-action">
@ -248,9 +260,6 @@ async function updateDestinations(claimDestinationFk) {
:options="destinationTypes" :options="destinationTypes"
option-value="id" option-value="id"
option-label="description" option-label="description"
@update:model-value="
(value) => updateDestination(value, rows[rowIndex])
"
/> />
</QTd> </QTd>
</template> </template>
@ -317,11 +326,10 @@ async function updateDestinations(claimDestinationFk) {
</template> </template>
</QTable> </QTable>
</template> </template>
<template #moreActions> <template #moreBeforeActions>
<QBtn <QBtn
color="primary" color="primary"
text-color="white" text-color="white"
class="q-mx-sm"
:unelevated="true" :unelevated="true"
:label="t('Regularize')" :label="t('Regularize')"
/> />
@ -329,7 +337,6 @@ async function updateDestinations(claimDestinationFk) {
<QBtn <QBtn
color="primary" color="primary"
text-color="white" text-color="white"
class="q-mx-sm"
:unelevated="true" :unelevated="true"
:disable="!selectedRows.length" :disable="!selectedRows.length"
:label="t('Change destination')" :label="t('Change destination')"
@ -338,7 +345,6 @@ async function updateDestinations(claimDestinationFk) {
<QBtn <QBtn
color="primary" color="primary"
text-color="white" text-color="white"
class="q-mx-sm"
:unelevated="true" :unelevated="true"
:label="t('Import claim')" :label="t('Import claim')"
/> />

View File

@ -175,6 +175,7 @@ function goToAction() {
:option-label="col.optionLabel" :option-label="col.optionLabel"
:autofocus="col.tabIndex == 1" :autofocus="col.tabIndex == 1"
input-debounce="0" input-debounce="0"
hide-selected
> >
<template #option="scope" v-if="col.name == 'worker'"> <template #option="scope" v-if="col.name == 'worker'">
<QItem v-bind="scope.itemProps"> <QItem v-bind="scope.itemProps">
@ -213,6 +214,7 @@ function goToAction() {
dense dense
input-debounce="0" input-debounce="0"
:autofocus="col.tabIndex == 1" :autofocus="col.tabIndex == 1"
hide-selected
/> />
</QItemSection> </QItemSection>
</QItem> </QItem>