backend data
This commit is contained in:
@@ -210,11 +210,45 @@ class OfficeDashboardService(BaseService):
|
||||
# "profile_completed": account_result.profile_completed,
|
||||
# "next_billing": account_result.next_billing,
|
||||
|
||||
membersSubList = MembersProducts.get_member_productlist_by_member_id(account_result.id)
|
||||
member_sub_data = []
|
||||
if membersSubList:
|
||||
for subs in membersSubList:
|
||||
member_sub_data.append({
|
||||
'id': subs.id,
|
||||
'member_id': subs.member_id,
|
||||
'product_id': subs.product_id,
|
||||
'internal_url': subs.internal_url,
|
||||
'external_url': subs.external_url,
|
||||
'dns_group': subs.dns_group,
|
||||
'status': subs.status,
|
||||
'updated': subs.updated,
|
||||
"added": subs.added,
|
||||
})
|
||||
|
||||
|
||||
member_payments = Payments.get_member_payments_by_member_id(account_result.id)
|
||||
|
||||
member_payments_data = []
|
||||
|
||||
for t in member_payments:
|
||||
member_payments_data.append({
|
||||
'id': t.id,
|
||||
'uid': t.uid,
|
||||
'option_name': t.option_name,
|
||||
'option_type': t.option_type,
|
||||
'payment_uid': t.payment_uid,
|
||||
'amount': round(t.amount * 0.01, 2),
|
||||
'status': t.status,
|
||||
'added': t.added
|
||||
})
|
||||
|
||||
|
||||
account_result = {
|
||||
"account": account_data,
|
||||
"account_profile": {},
|
||||
"subscriptions": {},
|
||||
"payments": {}
|
||||
"subscriptions": member_sub_data,
|
||||
"payments": member_payments_data
|
||||
}
|
||||
logger.info('RETURN API::get office account view')
|
||||
logger.info(account_result)
|
||||
|
||||
Reference in New Issue
Block a user