add contacts rourtes
This commit is contained in:
@@ -468,6 +468,14 @@ def get_web_contents():
|
||||
result = WebContentsService.get_web_contents_data(provision_uid)
|
||||
return jsonify(result)
|
||||
|
||||
# =====================================================
|
||||
@api.route('/web/contacts', methods=['POST'])
|
||||
# @token_required
|
||||
def get_web_receive_contacts():
|
||||
# Call the dashboard service
|
||||
data = request.get_json()
|
||||
result = ContactService.process_save_contacts(data)
|
||||
return jsonify(result)
|
||||
|
||||
# =====================================================
|
||||
@api.route('/web/generatives', methods=['GET'])
|
||||
|
||||
@@ -57,7 +57,7 @@ class ContactService(BaseService):
|
||||
"category": cat_list[random.randint(0, 3)],
|
||||
"added": calDate,
|
||||
"sender": "Firstname Lastname" + str(random.randint(1, 4)),
|
||||
"message": dummy_message()
|
||||
"message": ContactService.dummy_message()
|
||||
}
|
||||
dList.append(new_l)
|
||||
|
||||
@@ -87,13 +87,19 @@ class ContactService(BaseService):
|
||||
return ResponseHelper.internal_server_error()
|
||||
|
||||
|
||||
def dummy_message():
|
||||
dmm = "Dmummy Message" + str(random.randint(100, 400))
|
||||
mss = f"""
|
||||
{dmm}I truly believe Augustine’s 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.
|
||||
def dummy_message():
|
||||
dmm = "Dmummy Message" + str(random.randint(100, 400))
|
||||
mss = f"""
|
||||
{dmm}I truly believe Augustine’s 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
|
||||
|
||||
@staticmethod
|
||||
def process_save_contacts(data):
|
||||
pass
|
||||
|
||||
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
|
||||
|
||||
@@ -510,41 +510,19 @@ class MyProductsService(BaseService):
|
||||
settings_items = {}
|
||||
if product_id == "A000001":
|
||||
settings_items = {
|
||||
"url_config_tab": {"title": 'URL Configuration', "controls": 'url-config', "active": '',
|
||||
"custom": True, "data": {}, "list_order": 0},
|
||||
"settings": {"title": 'Settings', "controls": 'settings', "active": 'active show',
|
||||
"custom": False, "data": settingsFields, "list_order": 0},
|
||||
"custom": False, "data": settingsFields, "list_order": 1},
|
||||
"home_tab": {"title": 'Home Page', "controls": 'home', "active": '', "custom": False,
|
||||
"data": homeFields, "list_order": 1},
|
||||
"data": homeFields, "list_order": 2},
|
||||
"footer_tab": {"title": 'Footer', "controls": 'footer', "active": '', "custom": False,
|
||||
"data": footerFields, "list_order": 2},
|
||||
"data": footerFields, "list_order": 3},
|
||||
"about_tab": {"title": 'About Page', "controls": 'about', "active": '', "custom": False,
|
||||
"data": aboutFields, "list_order": 3},
|
||||
"data": aboutFields, "list_order": 4},
|
||||
"contact_tab": {"title": 'Contact Page', "controls": 'contact', "active": '',
|
||||
"custom": False,
|
||||
"data": contactFields, "list_order": 4},
|
||||
"social_tab": {"title": 'Socials', "controls": 'social', "active": '', "custom": False,
|
||||
"data": socialFields, "list_order": 5},
|
||||
"template_tab": {"title": 'Template', "controls": 'template', "active": '', "custom": True,
|
||||
"data": templateData, "list_order": 6},
|
||||
"color_scheme_tab": {"title": 'Color Scheme', "controls": 'color-scheme', "active": '',
|
||||
"custom": True, "data": {}, "list_order": 7}
|
||||
}
|
||||
|
||||
if product_id == "A000002":
|
||||
settings_items = {
|
||||
"settings": {"title": 'Settings', "controls": 'settings', "active": 'active show',
|
||||
"custom": False, "data": settingsFields, "list_order": 0},
|
||||
"home_tab": {"title": 'Home Page', "controls": 'home', "active": '', "custom": False,
|
||||
"data": homeFields, "list_order": 1},
|
||||
"footer_tab": {"title": 'Footer', "controls": 'footer', "active": '', "custom": False,
|
||||
"data": footerFields, "list_order": 2},
|
||||
"about_tab": {"title": 'About Page', "controls": 'about', "active": '', "custom": False,
|
||||
"data": aboutFields, "list_order": 3},
|
||||
"contact_tab": {"title": 'Contact Page', "controls": 'contact', "active": '',
|
||||
"custom": False,
|
||||
"data": contactFields, "list_order": 4},
|
||||
"testimonial_tab": {"title": 'Testimonials', "controls": 'testimonial', "active": '',
|
||||
"custom": False,
|
||||
"data": testimonialFields, "list_order": 5},
|
||||
"data": contactFields, "list_order": 5},
|
||||
"social_tab": {"title": 'Socials', "controls": 'social', "active": '', "custom": False,
|
||||
"data": socialFields, "list_order": 6},
|
||||
"template_tab": {"title": 'Template', "controls": 'template', "active": '', "custom": True,
|
||||
@@ -552,6 +530,32 @@ class MyProductsService(BaseService):
|
||||
"color_scheme_tab": {"title": 'Color Scheme', "controls": 'color-scheme', "active": '',
|
||||
"custom": True, "data": {}, "list_order": 8}
|
||||
}
|
||||
|
||||
if product_id == "A000002":
|
||||
settings_items = {
|
||||
"url_config_tab": {"title": 'URL Configuration', "controls": 'url-config', "active": '',
|
||||
"custom": True, "data": {}, "list_order": 0},
|
||||
"settings": {"title": 'Settings', "controls": 'settings', "active": 'active show',
|
||||
"custom": False, "data": settingsFields, "list_order": 1},
|
||||
"home_tab": {"title": 'Home Page', "controls": 'home', "active": '', "custom": False,
|
||||
"data": homeFields, "list_order": 2},
|
||||
"footer_tab": {"title": 'Footer', "controls": 'footer', "active": '', "custom": False,
|
||||
"data": footerFields, "list_order": 3},
|
||||
"about_tab": {"title": 'About Page', "controls": 'about', "active": '', "custom": False,
|
||||
"data": aboutFields, "list_order": 4},
|
||||
"contact_tab": {"title": 'Contact Page', "controls": 'contact', "active": '',
|
||||
"custom": False,
|
||||
"data": contactFields, "list_order": 5},
|
||||
"testimonial_tab": {"title": 'Testimonials', "controls": 'testimonial', "active": '',
|
||||
"custom": False,
|
||||
"data": testimonialFields, "list_order": 6},
|
||||
"social_tab": {"title": 'Socials', "controls": 'social', "active": '', "custom": False,
|
||||
"data": socialFields, "list_order": 7},
|
||||
"template_tab": {"title": 'Template', "controls": 'template', "active": '', "custom": True,
|
||||
"data": templateData, "list_order": 8},
|
||||
"color_scheme_tab": {"title": 'Color Scheme', "controls": 'color-scheme', "active": '',
|
||||
"custom": True, "data": {}, "list_order": 8}
|
||||
}
|
||||
#
|
||||
|
||||
# Simulate processing
|
||||
|
||||
Reference in New Issue
Block a user