mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Adjust filtering
This commit is contained in:
@@ -45,22 +45,13 @@
|
||||
onMount(request);
|
||||
|
||||
async function request() {
|
||||
const unfilteredInvoiceList = await sdk.forConsole.billing.listInvoices(
|
||||
$page.params.organization,
|
||||
[
|
||||
Query.limit(limit),
|
||||
Query.offset(offset),
|
||||
Query.notEqual('from', $organization.billingCurrentInvoiceDate),
|
||||
Query.orderDesc('$createdAt')
|
||||
]
|
||||
);
|
||||
const filteredInvoices = unfilteredInvoiceList.invoices.filter(
|
||||
(invoice) => invoice.status !== 'pending'
|
||||
);
|
||||
invoiceList = {
|
||||
invoices: filteredInvoices,
|
||||
total: filteredInvoices.length
|
||||
};
|
||||
invoiceList = await sdk.forConsole.billing.listInvoices($page.params.organization, [
|
||||
Query.limit(limit),
|
||||
Query.offset(offset),
|
||||
Query.notEqual('from', $organization.billingCurrentInvoiceDate),
|
||||
Query.notEqual('status', 'pending'),
|
||||
Query.orderDesc('$createdAt')
|
||||
]);
|
||||
}
|
||||
|
||||
function retryPayment(invoice: Invoice) {
|
||||
|
||||
Reference in New Issue
Block a user