Update: 2026-05-08 05:09:43

This commit is contained in:
Hamza-Ayed
2026-05-08 05:09:43 +03:00
parent 6db8986fca
commit d2d345b6a0
3 changed files with 16 additions and 10 deletions

View File

@@ -2313,8 +2313,14 @@
} : { total: 0, pending: 0, approved: 0 };
this.companies = await this.apiRequest('v1/companies') || [];
this.subscription = await this.apiRequest('v1/subscriptions/current');
if (this.page === 'users') this.users = await this.apiRequest('v1/users') || [];
if (this.page === 'invoices') this.invoices = await this.apiRequest('v1/invoices') || [];
if (this.page === 'users') {
const usersRes = await this.apiRequest('v1/users');
this.users = usersRes?.items || usersRes || [];
}
if (this.page === 'invoices') {
const invRes = await this.apiRequest('v1/invoices');
this.invoices = invRes?.items || invRes || [];
}
if (this.page === 'subscription') this.plans = await this.apiRequest('v1/subscriptions/plans') || [];
if (this.user.role === 'super_admin') this.tenants = await this.apiRequest('v1/tenants') || [];
},