Change orders
This commit is contained in:
@@ -817,7 +817,7 @@ def myproduct_provision(current_user):
|
||||
member_id = current_user['user']['member_id']
|
||||
myproduct_data = myproduct_detail(member_id , product_id)
|
||||
product_uid = '06a8e774-c8f2-4d6f-993b-1b9ba0cf538e'
|
||||
SELECT_PROVISION_ACTIVITIES = f"SELECT id,action,added::text AS date from provision_actions WHERE product_uid='{product_uid}'"
|
||||
SELECT_PROVISION_ACTIVITIES = f"SELECT id,action,added::text AS date from provision_actions WHERE product_uid='{product_uid}' ORDER BY id DESC LIMIT 10"
|
||||
print(SELECT_PROVISION_ACTIVITIES)
|
||||
with connection:
|
||||
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
||||
@@ -829,16 +829,10 @@ def myproduct_provision(current_user):
|
||||
print(activitiesData)
|
||||
provision_activities = json.loads(activitiesData)
|
||||
|
||||
|
||||
provision = {
|
||||
"last_update": datetime.datetime.utcnow(),
|
||||
"percent_completed" : random.randint(10, 99),
|
||||
"activities": provision_activities,
|
||||
"activities2": [
|
||||
{"id": "3", "action": "Verifying your product..." , "date": "10-10-2010 11:00 AM"},
|
||||
{"id": "2", "action": "URL assigned - Progress on the URL " , "date": "10-10-2010 11:30 AM"},
|
||||
{"id": "1", "action": "Initiating product creation" , "date": "10-12-2010 11:30 AM"},
|
||||
]
|
||||
"activities": provision_activities
|
||||
}
|
||||
return jsonify(provision=provision,myproduct_data=myproduct_data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user