mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Merge pull request #1264 from appwrite/refactor-invoice-model
refactor: invoice model
This commit is contained in:
@@ -31,17 +31,23 @@ export type Invoice = {
|
||||
$id: string;
|
||||
$createdAt: Date;
|
||||
$updatedAt: Date;
|
||||
permissions: string[];
|
||||
teamId: string;
|
||||
aggregationId: string;
|
||||
plan: Tier;
|
||||
amount: number;
|
||||
tax: number;
|
||||
taxAmount: number;
|
||||
vat: number;
|
||||
vatAmount: number;
|
||||
grossAmount: number;
|
||||
creditsUsed: number;
|
||||
currency: string;
|
||||
date: number;
|
||||
from: string;
|
||||
to: string;
|
||||
status: string;
|
||||
dueAt: string;
|
||||
clientSecret: string;
|
||||
tier: Tier;
|
||||
usage: {
|
||||
name: string;
|
||||
value: number /* service over the limit*/;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
export let data;
|
||||
|
||||
const tier = data?.currentInvoice?.tier ?? $organization?.billingPlan;
|
||||
const tier = data?.currentInvoice?.plan ?? $organization?.billingPlan;
|
||||
const plan = tierToPlan(tier).name;
|
||||
|
||||
// let invoice = null;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
$: executionsTotal = data.usage.executionsTotal;
|
||||
$: storage = data.usage.filesStorageTotal;
|
||||
|
||||
const tier = data?.currentInvoice?.tier ?? $organization?.billingPlan;
|
||||
const tier = data?.currentInvoice?.plan ?? $organization?.billingPlan;
|
||||
const plan = tierToPlan(tier).name;
|
||||
|
||||
// let invoice = null;
|
||||
|
||||
Reference in New Issue
Block a user