mirror of
https://github.com/FJurmanovic/wallet-web.git
synced 2026-02-06 06:08:10 +00:00
open modal if any records
This commit is contained in:
@@ -130,10 +130,12 @@ class AppMainElement extends HTMLElement {
|
|||||||
checkSubscriptions = async () => {
|
checkSubscriptions = async () => {
|
||||||
if (this.isAuth && !this.subscriptionChecked) {
|
if (this.isAuth && !this.subscriptionChecked) {
|
||||||
const checked = await this.transactionsService.check({ sortBy: 'transactionDate asc', rpp: 10 });
|
const checked = await this.transactionsService.check({ sortBy: 'transactionDate asc', rpp: 10 });
|
||||||
|
if (checked?.totalRecords) {
|
||||||
this.createModal('transaction-check', {
|
this.createModal('transaction-check', {
|
||||||
data: checked,
|
data: checked,
|
||||||
autoInit: false,
|
autoInit: false,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
this.subscriptionChecked = true;
|
this.subscriptionChecked = true;
|
||||||
this.removeEventListener('routechanged', this.checkSubscriptions);
|
this.removeEventListener('routechanged', this.checkSubscriptions);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user