added contacts us page

This commit is contained in:
CHIEFSOFT\ameye
2025-01-24 11:53:32 -05:00
parent ebc8974404
commit b722a12a09
+63
View File
@@ -141,6 +141,45 @@ def hello_world():
return jsonify(action_data="sent", select_pending=array3)
@app.route("/test/contacts")
def test_caontacts():
dList = []
sample_range = random.randint(20, 60)
for x in range(sample_range):
calDate = datetime.datetime.utcnow() + datetime.timedelta(minutes=180 * random.randint(1, 20))
new_l = {
"uid":"425611f2-c692-4404-b93d-76ca7a5ce7"+str(x),
"title": "Calendar Random Item on " + str(x) ,
"added": calDate,
"sender": "Firstname Lastname" + str(random.randint(1, 4)),
"message" : dummy_message()
}
dList.append(new_l)
calendar_data = {
"last_update": datetime.datetime.utcnow(),
"category": [
{"cid": "1", "description": "category 01" },
{"cid": "2", "description": "category 02" },
{"cid": "3", "description": "category 03" },
{"cid": "4", "description": "category 04" },
],
"contacts" : dList
}
return jsonify(calendar_data=calendar_data)
def dummy_message():
dmm = "Dmummy Message" + str(random.randint(100, 400))
mss = f"""
{dmm}I truly believe Augustines words are true and if you look at history you know it is true. There are many people in the world with amazing talents who realize only a small percentage of their potential. We all know people who live this truth.
We also know those epic stories, those modern-day legends surrounding the early failures of such supremely successful folks as Michael Jordan and Bill Gates. We can look a bit further back in time to Albert Einstein or even further back to Abraham Lincoln. What made each of these people so successful? Motivation.
We know this in our gut, but what can we do about it? How can we motivate ourselves? One of the most difficult aspects of achieving success is staying motivated over the long haul.
"""
return mss
@app.route("/test/calendar")
def test_calen():
SELECT_LAST_ENTRY = f"SELECT id, uid AS product_uid FROM members_products WHERE internal_url='23607.devprov.mermsemr.com'"
@@ -903,6 +942,30 @@ def addProvisionAction(member_id,product_uid,action):
cursor.execute(INSERT_NEW_ACTION,val_insert)
return 0
@app.route("/panel/contacts")
@token_required
def site_contacts(current_user):
dList = []
sample_range = random.randint(20, 60)
for x in range(sample_range):
calDate = datetime.datetime.utcnow() + datetime.timedelta(minutes=180 * random.randint(1, 20))
new_l = {
"uid":"425611f2-c692-4404-b93d-76ca7a5ce7"+str(x),
"title": "Calendar Random Item on " + str(x) ,
"added": calDate,
"sender": "Firstname Lastname" + str(random.randint(1, 4)),
"message" : dummy_message()
}
dList.append(new_l)
calendar_data = {
"last_update": datetime.datetime.utcnow(),
"contacts" : dList
}
return jsonify(calendar_data=calendar_data)
@app.route("/panel/settings")
def user_settings():