fix that transaction list on to revert does not have multiple items
This commit is contained in:
parent
56b09abeaa
commit
ebffecd364
|
@ -10,9 +10,11 @@
|
||||||
<div v-if="showSelector" class="col-6">
|
<div v-if="showSelector" class="col-6">
|
||||||
<UserSelector v-model="user" />
|
<UserSelector v-model="user" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-1 justify-end">
|
<div class="col-1">
|
||||||
|
<div class="row fit justify-end content-end items-end">
|
||||||
<q-btn round flat icon="mdi-format-list-checks" @click="openHistory" />
|
<q-btn round flat icon="mdi-format-list-checks" @click="openHistory" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,13 @@ export const useBalanceStore = defineStore({
|
||||||
params: filter,
|
params: filter,
|
||||||
});
|
});
|
||||||
data.transactions.forEach((t) => fixTransaction(t));
|
data.transactions.forEach((t) => fixTransaction(t));
|
||||||
if (data.transactions) this.transactions.push(...data.transactions);
|
if (data.transactions) {
|
||||||
|
data.transactions.forEach((t) => {
|
||||||
|
const idx = this.transactions.findIndex((x) => x.id === t.id);
|
||||||
|
if (idx == -1) this.transactions.push(t);
|
||||||
|
else this.transactions[idx] = t;
|
||||||
|
});
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue