6157-actionClaim #106

Merged
carlossa merged 22 commits from 6157-actionClaim into dev 2023-11-24 07:46:30 +00:00
4 changed files with 19 additions and 14 deletions
Showing only changes of commit 841ed5d81a - Show all commits

View File

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

View File

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

Esta tb borrala

Esta tb borrala
const emit = defineEmits(['onFetch']);
async function fetch() {
lastUrl.value = $props.url;
const params = {};

View File

@ -92,7 +92,7 @@ const columns = computed(() => [
name: 'delete',
},
carlossa marked this conversation as resolved Outdated
Outdated
Review

? si lo que fas es sumar no seria mes facil sumar en el onmouted y quan afegixes o borres una linea?

? si lo que fas es sumar no seria mes facil sumar en el onmouted y quan afegixes o borres una linea?
]);
console.log(claimData.store.data);
watchEffect(() => {
if (rows.value.length) {
destinations.value = rows.value.map((row) =>
@ -103,6 +103,7 @@ watchEffect(() => {
});
function getDestination(destinationId) {
console.log(destinationTypes.value.find((type) => type.id == destinationId));
carlossa marked this conversation as resolved Outdated
Outdated
Review

Esta funcio no se crida mai

Esta funcio no se crida mai
return destinationTypes.value.find((type) => type.id == destinationId);
}
@ -205,6 +206,17 @@ async function updateDestinations(claimDestinationFk) {
@click="dialog = !dialog"
/>
</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>
<div class="claim-action">
@ -248,9 +260,6 @@ async function updateDestinations(claimDestinationFk) {
:options="destinationTypes"
option-value="id"
carlossa marked this conversation as resolved
Review

Si, los labels cambian, tienes que venir hasta el HTML?
Quizás, mejor definirlo en el apartado de

Si, los labels cambian, tienes que venir hasta el HTML? Quizás, mejor definirlo en el apartado de <script setup>
option-label="description"
@update:model-value="
(value) => updateDestination(value, rows[rowIndex])
"
/>
</QTd>
</template>
carlossa marked this conversation as resolved
Review

Podemos definir este valor como constante?
Tipo
DEFAULT_MIN_SLIDER =1
DEFAULT_MAX_SLIDER =5

Podemos definir este valor como constante? Tipo DEFAULT_MIN_SLIDER =1 DEFAULT_MAX_SLIDER =5
@ -317,11 +326,10 @@ async function updateDestinations(claimDestinationFk) {
</template>
</QTable>
</template>
<template #moreActions>
<template #moreBeforeActions>
<QBtn
color="primary"
text-color="white"
class="q-mx-sm"
:unelevated="true"
:label="t('Regularize')"
/>
@ -329,7 +337,6 @@ async function updateDestinations(claimDestinationFk) {
<QBtn
color="primary"
text-color="white"
class="q-mx-sm"
:unelevated="true"
:disable="!selectedRows.length"
:label="t('Change destination')"
@ -338,7 +345,6 @@ async function updateDestinations(claimDestinationFk) {
<QBtn
color="primary"
text-color="white"
class="q-mx-sm"
:unelevated="true"
:label="t('Import claim')"
/>

View File

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