#6943 removes duplicate toggle menu & fix loading animation #491

Merged
jorgep merged 7 commits from 6943-fixCustomerGreuges into dev 2024-07-04 07:25:44 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit ffdcb28522 - Show all commits

View File

@ -13,7 +13,7 @@ const { t } = useI18n();
const route = useRoute();
const stateStore = computed(() => useStateStore());
const rows = ref([]);
const totalAmount = ref(0);
const totalAmount = ref();
const filter = {
include: [
@ -110,7 +110,7 @@ const setRows = (data) => {
<FetchData :filter="filter" @on-fetch="setRows" auto-load url="greuges" />
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="300" show-if-above>
<QCard class="full-width q-pa-sm">
<h6 class="flex justify-end q-my-lg q-pr-lg" v-if="totalAmount >= 0">
<h6 class="flex justify-end q-my-lg q-pr-lg" v-if="totalAmount !== undefined">
jorgep marked this conversation as resolved Outdated

Si es undefined, quiere decir que no aún se está haciendo la llamada para obetener los datos. Un vez se ha hecho totalAmount ya es como mínimo igual a 0. Así nos evitamos crear una variable tipo "isLoading".

Otra alternativa sería: v-if="totalAmount !== undefined"

Si es undefined, quiere decir que no aún se está haciendo la llamada para obetener los datos. Un vez se ha hecho totalAmount ya es como mínimo igual a 0. Así nos evitamos crear una variable tipo "isLoading". Otra alternativa sería: **v-if="totalAmount !== undefined"**

el total amount podria ser < 0

el total amount podria ser < 0

Pues lo cambio a la alternativa

Pues lo cambio a la alternativa
<span class="color-vn-label q-mr-md">{{ t('Total') }}:</span>
{{ toCurrency(totalAmount) }}
</h6>