-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MNOE-107] Fix admin finance page #75
Conversation
{current_billing_amount: {amount: billing.amount, currency: billing.currency_as_string}} | ||
end | ||
render json: data | ||
tenant = MnoEnterprise::Tenant.get('tenant') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To get a singular resource, do we need to specify a fake id? Could it be MnoEnterprise::Tenant.get
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a fake id actually. It's the resource name:
>> MnoEnterprise::Tenant.get('tenant')
=> GET /api/mnoe/v1/tenant
I'll check if I can find something cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrunoChauvet @x4d3
How about:
module MnoEnterprise
class Tenant < BaseResource
def self.show
self.get('tenant')
end
end
end
So we can use MnoEnterprise::Tenant.show
in the controller? Or I could override get
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks cleaner indeed 👍
I would just add a |
@BrunoChauvet see last commit |
Looks good |
This should be calculated via mnohub for performance reason (and also to perform the currency conversion)
- Fix invoices table amount - Add extra finance KPIs
b8917c7
to
41e42a9
Compare
Squashed |
Tenant#current_billing_amount to be calculated via mnohub for performance reason (and also to
perform the currency conversion)
Admin Finance page: