office pages
This commit is contained in:
@@ -122,3 +122,26 @@ class OfficeDashboardService(BaseService):
|
||||
except Exception as e:
|
||||
logger.error(f"An error occurred while getting dashboard data: {str(e)}", exc_info=True)
|
||||
return jsonify({"message": "Internal Server Error"}), 500
|
||||
|
||||
@staticmethod
|
||||
def get_office_products(filters):
|
||||
products = Products.get_user_product_list(0)
|
||||
product_data = []
|
||||
|
||||
for t in products:
|
||||
product_data.append({
|
||||
'id': t.id,
|
||||
'uid': t.uid,
|
||||
'product_id': t.product_id,
|
||||
'description': t.description,
|
||||
'name': t.name,
|
||||
'status': t.status,
|
||||
'added': t.added.isoformat() if t.added else None,
|
||||
'updated': t.updated.isoformat() if t.updated else None,
|
||||
'banner': t.banner,
|
||||
})
|
||||
products_result = {
|
||||
"products": product_data,
|
||||
}
|
||||
|
||||
return products_result
|
||||
|
||||
Reference in New Issue
Block a user