office pages

This commit is contained in:
CHIEFSOFT\ameye
2025-09-13 07:36:58 -04:00
parent 2088eb0227
commit f3d81e662e
7 changed files with 189 additions and 9 deletions
+23
View File
@@ -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