0
0
Fork 0

fix: refs #7274 add note

This commit is contained in:
Jorge Penadés 2024-05-14 14:39:55 +02:00
parent a6c761c031
commit e4637b7d15
2 changed files with 13 additions and 20 deletions

View File

@ -83,7 +83,7 @@ const inputRules = [
<slot name="prepend" /> <slot name="prepend" />
</template> </template>
<template #append> <template #append v-if="!!$attrs.disabled">
<slot name="append" v-if="$slots.append" /> <slot name="append" v-if="$slots.append" />
<QIcon <QIcon
name="close" name="close"

View File

@ -168,31 +168,20 @@ const columns = computed(() => [
}, },
]); ]);
const setRows = (data) => {
balanceDueTotal.value = data.reduce((accumulator, currentValue) => {
return accumulator + (currentValue['amount'] || 0);
}, 0);
};
const viewAddObservation = (rowsSelected) => { const viewAddObservation = (rowsSelected) => {
quasar.dialog({ quasar.dialog({
component: CustomerDefaulterAddObservation, component: CustomerDefaulterAddObservation,
componentProps: { componentProps: {
clients: rowsSelected, clients: rowsSelected,
promise: refreshData, promise: async () => await dataRef.value.fetch(),
}, },
}); });
}; };
const refreshData = async () => {
await dataRef.value.fetch();
};
const onFetch = (data) => { const onFetch = (data) => {
for (const element of data) { for (const element of data) element.isWorker = element.businessTypeFk === 'worker';
element.isWorker = element.businessTypeFk === 'worker';
} balanceDueTotal.value = data.reduce((acc, { amount = 0 }) => acc + amount, 0);
setRows(data);
}; };
</script> </script>
@ -212,8 +201,8 @@ const onFetch = (data) => {
</QTooltip> </QTooltip>
</QBtn> </QBtn>
</div> </div>
</Teleport></template </Teleport>
> </template>
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above> <QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
<QScrollArea class="fit text-grey-8"> <QScrollArea class="fit text-grey-8">
@ -239,6 +228,7 @@ const onFetch = (data) => {
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<VnPaginate <VnPaginate
ref="dataRef"
@on-fetch="onFetch" @on-fetch="onFetch"
data-key="CustomerDefaulter" data-key="CustomerDefaulter"
:filter="filter" :filter="filter"
@ -303,6 +293,7 @@ const onFetch = (data) => {
type="textarea" type="textarea"
v-model="props.value" v-model="props.value"
autogrow autogrow
:disable="true"
/> />
</div> </div>
<div v-else>{{ props.value }}</div> <div v-else>{{ props.value }}</div>
@ -324,8 +315,10 @@ const onFetch = (data) => {
</QTr> </QTr>
</QTd> </QTd>
</template> </template>
</QTable></div></template </QTable>
></VnPaginate> </div>
</template>
</VnPaginate>
</QPage> </QPage>
</template> </template>