customeranalytics 0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- customeranalytics/__init__.py +319 -0
- customeranalytics/configs.py +480 -0
- customeranalytics/data_storage_configurations/__init__.py +245 -0
- customeranalytics/data_storage_configurations/data_access.py +165 -0
- customeranalytics/data_storage_configurations/data_works_pipeline.py +207 -0
- customeranalytics/data_storage_configurations/es_create_index.py +544 -0
- customeranalytics/data_storage_configurations/logger.py +36 -0
- customeranalytics/data_storage_configurations/query_es.py +157 -0
- customeranalytics/data_storage_configurations/reports.py +684 -0
- customeranalytics/data_storage_configurations/schedule_data_integration.py +355 -0
- customeranalytics/docs/queries.yaml +245 -0
- customeranalytics/docs/web_configs.yaml +2 -0
- customeranalytics/exploratory_analysis/__init__.py +109 -0
- customeranalytics/exploratory_analysis/churn.py +232 -0
- customeranalytics/exploratory_analysis/cohorts.py +535 -0
- customeranalytics/exploratory_analysis/descriptive_statistics.py +470 -0
- customeranalytics/exploratory_analysis/funnels.py +407 -0
- customeranalytics/exploratory_analysis/product_analytics.py +340 -0
- customeranalytics/exploratory_analysis/promotion_analytics.py +299 -0
- customeranalytics/exploratory_analysis/rfm.py +202 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_avg_order_count_per_promo_per_cust.csv +99 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_chart_1_search.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_chart_2_search.csv +46 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_chart_3_search.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_chart_4_search.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_churn.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_churn_weekly.csv +10 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_client_feature_predicted.csv +1590 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_client_kpis.csv +7060 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_clvrfm_anomaly.csv +561 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_clvsegments_amount.csv +8 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_customer_journey.csv +18 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_clv.csv +103 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_downloads.csv +68 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_from_1_to_2.csv +66 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_from_2_to_3.csv +64 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_from_3_to_4.csv +55 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_dimension_values.csv +199 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_funnel.csv +36 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_funnel_downloads.csv +68 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_inorganic_ratio.csv +6070 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_orders.csv +57 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_organic_orders.csv +64 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_products_of_sales.csv +12574 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_promotion_discount.csv +64 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_promotion_revenue.csv +6070 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_dcohort_anomaly.csv +6 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_dcohort_anomaly_2.csv +118 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_deliver.csv +47 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_deliver_kpis.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_deliver_weekday_hour.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_dfunnel_anomaly.csv +118 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_dimension_kpis.csv +199 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_dorders_anomaly.csv +85 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_frequency_clusters.csv +6 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_frequency_recency.csv +3740 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_funnel.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_funnel_downloads.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_inorganic_ratio.csv +2353 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_orders.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_organic_orders.csv +2353 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_inorganic_orders_per_promotion_per_day.csv +6070 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_kpis.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_monetary_clusters.csv +6 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_monetary_frequency.csv +3740 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_monthly_funnel.csv +5 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_monthly_funnel_downloads.csv +5 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_monthly_orders.csv +4 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_most_combined_products.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_most_ordered_categories.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_most_ordered_products.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_order_and_payment_amount_differences.csv +91 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_prepare.csv +101 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_prepare_weekday_hour.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_product_kpis.csv +201 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_amount_accept.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_amount_reject.csv +7 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_orders_accept.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_orders_reject.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_comparison.csv +91 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_kpis.csv +99 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_number_of_customer.csv +99 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_amount_accept.csv +81 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_amount_reject.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_orders_accept.csv +55 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_orders_reject.csv +37 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_purchase_amount_distribution.csv +22 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_recency_clusters.csv +6 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_recency_monetary.csv +3740 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_rfm.csv +2001 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_ride.csv +101 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_ride_weekday_hour.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segmentation.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_daily_before_after_amount.csv +10 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_daily_before_after_orders.csv +9 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_monthly_before_after_amount.csv +10 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_monthly_before_after_orders.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_weekly_before_after_amount.csv +10 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_weekly_before_after_orders.csv +10 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_user_counts_per_order_seq.csv +47 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_average_order_per_user.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_average_payment_amount.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_average_session_per_user.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_downloads.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_from_1_to_2.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_from_2_to_3.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_from_3_to_4.csv +12 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_funnel.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_funnel_downloads.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_orders.csv +10 -0
- customeranalytics/ml_process/__init__.py +64 -0
- customeranalytics/ml_process/ab_test.py +615 -0
- customeranalytics/ml_process/anomaly_detection.py +456 -0
- customeranalytics/ml_process/clv_prediction.py +301 -0
- customeranalytics/ml_process/customer_segmentation.py +354 -0
- customeranalytics/ml_process/delivery_analytics.py +754 -0
- customeranalytics/utils.py +186 -0
- customeranalytics/web/app/__init__.py +37 -0
- customeranalytics/web/app/base/__init__.py +9 -0
- customeranalytics/web/app/base/forms.py +16 -0
- customeranalytics/web/app/base/models.py +43 -0
- customeranalytics/web/app/base/routes.py +126 -0
- customeranalytics/web/app/base/static/assets/css/app.css +20 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Black.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Black.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-BlackItalic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-BlackItalic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Bold.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Bold.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-BoldItalic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-BoldItalic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBold.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBold.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBoldItalic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLight-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLight-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLightItalic-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLightItalic-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Italic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Italic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Light-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Light-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-LightItalic-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-LightItalic-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Medium.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Medium.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-MediumItalic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-MediumItalic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Regular.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Regular.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBold.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBold.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBoldItalic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBoldItalic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Thin-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Thin-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ThinItalic-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ThinItalic-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-italic.var.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-upright.var.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter.var.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.eot +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.svg +3570 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.ttf +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.eot +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.svg +801 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.ttf +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.eot +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.svg +5028 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.ttf +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/avatar-1.png +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/avatar-2.png +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/avatar-3.png +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/avatar-4.png +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/avatar-5.png +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/info.jpeg +0 -0
- customeranalytics/web/app/base/static/assets/img/icons/customanality.png +0 -0
- customeranalytics/web/app/base/static/assets/img/icons/icon-48x48.png +0 -0
- customeranalytics/web/app/base/static/assets/js/app.js +2 -0
- customeranalytics/web/app/base/static/assets/js/app.js.LICENSE +566 -0
- customeranalytics/web/app/base/static/assets/js/app.js.LICENSE.txt +556 -0
- customeranalytics/web/app/base/static/assets/js/modules/bootstrap.js +15 -0
- customeranalytics/web/app/base/static/assets/js/modules/chartjs.js +4 -0
- customeranalytics/web/app/base/static/assets/js/modules/feather.js +8 -0
- customeranalytics/web/app/base/static/assets/js/modules/flatpickr.js +4 -0
- customeranalytics/web/app/base/static/assets/js/modules/moment.js +4 -0
- customeranalytics/web/app/base/static/assets/js/modules/sidebar.js +23 -0
- customeranalytics/web/app/base/static/assets/js/modules/theme.js +16 -0
- customeranalytics/web/app/base/templates/accounts/login.html +81 -0
- customeranalytics/web/app/base/templates/accounts/register.html +80 -0
- customeranalytics/web/app/base/templates/includes/footer.html +28 -0
- customeranalytics/web/app/base/templates/includes/navigation.html +51 -0
- customeranalytics/web/app/base/templates/includes/scripts.html +3 -0
- customeranalytics/web/app/base/templates/includes/sidebar.html +146 -0
- customeranalytics/web/app/base/templates/layouts/base-fullscreen.html +36 -0
- customeranalytics/web/app/base/templates/layouts/base.html +84 -0
- customeranalytics/web/app/base/util.py +30 -0
- customeranalytics/web/app/home/__init__.py +9 -0
- customeranalytics/web/app/home/forms.py +1039 -0
- customeranalytics/web/app/home/models.py +438 -0
- customeranalytics/web/app/home/profiles.py +310 -0
- customeranalytics/web/app/home/routes.py +386 -0
- customeranalytics/web/app/home/search.py +288 -0
- customeranalytics/web/app/home/static/assets/img/avatars/avatar-1.png +0 -0
- customeranalytics/web/app/home/static/assets/img/avatars/avatar-2.png +0 -0
- customeranalytics/web/app/home/static/assets/img/avatars/avatar-3.png +0 -0
- customeranalytics/web/app/home/static/assets/img/avatars/avatar-4.png +0 -0
- customeranalytics/web/app/home/static/assets/img/avatars/avatar-5.png +0 -0
- customeranalytics/web/app/home/static/assets/img/icons/customanality.png +0 -0
- customeranalytics/web/app/home/static/assets/img/icons/icon-48x48.png +0 -0
- customeranalytics/web/app/home/templates/abtest-product.html +280 -0
- customeranalytics/web/app/home/templates/abtest-promotion.html +362 -0
- customeranalytics/web/app/home/templates/abtest-segments.html +298 -0
- customeranalytics/web/app/home/templates/add-data-delivery.html +184 -0
- customeranalytics/web/app/home/templates/add-data-product.html +177 -0
- customeranalytics/web/app/home/templates/add-data-purchase.html +392 -0
- customeranalytics/web/app/home/templates/anomaly.html +261 -0
- customeranalytics/web/app/home/templates/clv.html +211 -0
- customeranalytics/web/app/home/templates/cohorts.html +308 -0
- customeranalytics/web/app/home/templates/customer-segmentation.html +308 -0
- customeranalytics/web/app/home/templates/data-es.html +152 -0
- customeranalytics/web/app/home/templates/data-execute.html +397 -0
- customeranalytics/web/app/home/templates/delivery.html +404 -0
- customeranalytics/web/app/home/templates/funnel-customer.html +240 -0
- customeranalytics/web/app/home/templates/funnel-session.html +236 -0
- customeranalytics/web/app/home/templates/index.html +524 -0
- customeranalytics/web/app/home/templates/index2.html +515 -0
- customeranalytics/web/app/home/templates/page-403.html +46 -0
- customeranalytics/web/app/home/templates/page-404.html +45 -0
- customeranalytics/web/app/home/templates/page-500.html +45 -0
- customeranalytics/web/app/home/templates/pages-blank.html +33 -0
- customeranalytics/web/app/home/templates/pages-sign-in.html +67 -0
- customeranalytics/web/app/home/templates/pages-sign-up.html +61 -0
- customeranalytics/web/app/home/templates/product.html +203 -0
- customeranalytics/web/app/home/templates/profile.html +1009 -0
- customeranalytics/web/app/home/templates/rfm.html +254 -0
- customeranalytics/web/app/home/templates/search.html +167 -0
- customeranalytics/web/app/home/templates/settings.html +205 -0
- customeranalytics/web/app/home/templates/stats-desc.html +230 -0
- customeranalytics/web/app/home/templates/stats-purchase.html +221 -0
- customeranalytics/web/config.py +30 -0
- customeranalytics/web/db.sqlite3 +0 -0
- customeranalytics/web/run.py +30 -0
- customeranalytics-0.1.dist-info/METADATA +1102 -0
- customeranalytics-0.1.dist-info/RECORD +254 -0
- customeranalytics-0.1.dist-info/WHEEL +4 -0
- customeranalytics-0.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
{% extends "layouts/base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %} RFM {% endblock %}
|
|
4
|
+
|
|
5
|
+
<!-- Specific Page CSS goes HERE -->
|
|
6
|
+
{% block stylesheets %}{% endblock stylesheets %}
|
|
7
|
+
|
|
8
|
+
{% block content %}
|
|
9
|
+
|
|
10
|
+
<main class="content">
|
|
11
|
+
<div class="container-fluid p-0">
|
|
12
|
+
<h5 class="h3 mb-3">Recency - Monetary - Frequency Calculations for Customers</h5>
|
|
13
|
+
<div class="col-md-12">
|
|
14
|
+
<div class="card">
|
|
15
|
+
<div class="card-body">
|
|
16
|
+
<div class="row">
|
|
17
|
+
<div class="accordion" id="accordionExample">
|
|
18
|
+
<div class="card">
|
|
19
|
+
<div class="card-header" id="headingOne">
|
|
20
|
+
<h5 class="card-title my-1">
|
|
21
|
+
<a href="#" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne" style="color:green;font-size:12px">
|
|
22
|
+
Filters
|
|
23
|
+
</a>
|
|
24
|
+
</h5>
|
|
25
|
+
</div>
|
|
26
|
+
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
|
|
27
|
+
<form method="POST">
|
|
28
|
+
<div class="row">
|
|
29
|
+
<div class="col-md-6">
|
|
30
|
+
<div class="card">
|
|
31
|
+
<div class="card-body">
|
|
32
|
+
<div class="card">
|
|
33
|
+
<div class="card-header">
|
|
34
|
+
<h5 class="card-title mb-0">Dimension selection</h5>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="card-body">
|
|
37
|
+
<select name="index" id="index" class="form-control">
|
|
38
|
+
{% for d in filters['dimensions'] %}
|
|
39
|
+
{% if d == 'There is no available report. Please execute Schedule Data Process' %}
|
|
40
|
+
<option value= "main">{{ d }}</option>
|
|
41
|
+
{% endif %}
|
|
42
|
+
{% if d != 'There is no available report. Please execute Schedule Data Process' %}
|
|
43
|
+
<option value="{{ d }}">{{ d }}</option>
|
|
44
|
+
{% endif %}
|
|
45
|
+
{% endfor %}
|
|
46
|
+
</select>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div class="col-md-6">
|
|
54
|
+
<div class="card flex-fil">
|
|
55
|
+
<div class="card-body col-12">
|
|
56
|
+
<div class="col-12 ">
|
|
57
|
+
<div class="align-self-center w-100">
|
|
58
|
+
<div class="chart">
|
|
59
|
+
<input name="date" id="datetimepicker-dashboard" hidden>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div class="card-header">
|
|
68
|
+
<button type="submit" class="btn btn-pill btn-primary">Apply</button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</form>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="card">
|
|
76
|
+
<div class="card-header" id="headingTwo">
|
|
77
|
+
<h5 class="card-title my-1">
|
|
78
|
+
<a href="#" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="true" aria-controls="collapseOne" style="color:green;font-size:12px">
|
|
79
|
+
Infos
|
|
80
|
+
</a>
|
|
81
|
+
</h5>
|
|
82
|
+
</div>
|
|
83
|
+
<div id="collapseTwo" class="collapse show" aria-labelledby="headingTwo" data-parent="#accordionExample">
|
|
84
|
+
<div class="card-body">
|
|
85
|
+
<ul>
|
|
86
|
+
<li>
|
|
87
|
+
<strong style="color:green;">
|
|
88
|
+
RFM (Recency - Monetary - Frequency) </strong>
|
|
89
|
+
RFM is the most common Marketing measurement for each business.
|
|
90
|
+
It is easy to apply for any kind of business.
|
|
91
|
+
It is the combination of 3 metrics which are Recency - Monetary - Frequency.
|
|
92
|
+
</li>
|
|
93
|
+
<li>
|
|
94
|
+
<div class="card-header">
|
|
95
|
+
<h5 class="card-title" style="color:green;">Recency</h5>
|
|
96
|
+
It is a time difference measurement related to how recently the customer engages with the business.
|
|
97
|
+
</div>
|
|
98
|
+
</li>
|
|
99
|
+
<li>
|
|
100
|
+
<div class="card-header">
|
|
101
|
+
<h5 class="card-title" style="color:green;">Monetary</h5>
|
|
102
|
+
It is the value of the purchases per customer.
|
|
103
|
+
</div>
|
|
104
|
+
</li>
|
|
105
|
+
<li>
|
|
106
|
+
<div class="card-header">
|
|
107
|
+
<h5 class="card-title" style="color:green;">Frequency</h5>
|
|
108
|
+
It is a time difference measurement related to how average hourly difference between 2 orders per customer in the business.
|
|
109
|
+
</div>
|
|
110
|
+
</li>
|
|
111
|
+
<li>
|
|
112
|
+
<div class="card-header">
|
|
113
|
+
<h5 class="card-title" style="color:green;">RFM 3D Scatter</h5>
|
|
114
|
+
Each point represents individual customer`s of RFM values
|
|
115
|
+
The X-axis represents recency; Y-axis represents monetary, Z-Axis represents frequency values.
|
|
116
|
+
</div>
|
|
117
|
+
</li>
|
|
118
|
+
<li>
|
|
119
|
+
<div class="card-header">
|
|
120
|
+
<h5 class="card-title" style="color:green;">Frequency - Recency Scatter</h5>
|
|
121
|
+
The X-axis represents frequency; Y-axis represents recency values.
|
|
122
|
+
Colors represent Customer Segments.
|
|
123
|
+
</div>
|
|
124
|
+
</li>
|
|
125
|
+
<li>
|
|
126
|
+
<div class="card-header">
|
|
127
|
+
<h5 class="card-title" style="color:green;">Monetary - Frequency Scatter</h5>
|
|
128
|
+
The X-axis represents monetary; Y-axis represents frequency values.
|
|
129
|
+
Colors represent Customer Segments
|
|
130
|
+
</div>
|
|
131
|
+
</li>
|
|
132
|
+
<li>
|
|
133
|
+
<div class="card-header">
|
|
134
|
+
<h5 class="card-title" style="color:green;">Recency - Monetary Scatter</h5>
|
|
135
|
+
The X-axis represents recency; Y-axis represents monetary values.
|
|
136
|
+
Colors represent Customer Segments.
|
|
137
|
+
</div>
|
|
138
|
+
</li>
|
|
139
|
+
</ul>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<div class="col-md-6">
|
|
146
|
+
<div class="card">
|
|
147
|
+
<div class="card-header">
|
|
148
|
+
<h5 class="card-title">RFM {% if data_type['rfm'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<div id="rfm_vals_id" class="plotly-gra ph-div" style="height:400px;"></div>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
<div class="col-md-6">
|
|
155
|
+
<div class="card">
|
|
156
|
+
<div class="card-header">
|
|
157
|
+
<h5 class="card-title">Frequency - Recency {% if data_type['frequency_recency'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="card-body">
|
|
160
|
+
<div id="fr_id" class="plotly-gra ph-div" style="height:400px;"></div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
<div class="row">
|
|
166
|
+
<div class="col-md-6">
|
|
167
|
+
<div class="card">
|
|
168
|
+
<div class="card-header">
|
|
169
|
+
<h5 class="card-title">Monetary - Frequency {% if data_type['monetary_frequency'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
|
|
170
|
+
</div>
|
|
171
|
+
<div class="card-body">
|
|
172
|
+
<div id="mf_id" class="plotly-gra ph-div" style="height:400px;"></div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
<div class="col-md-6">
|
|
177
|
+
<div class="card">
|
|
178
|
+
<div class="card-header">
|
|
179
|
+
<h5 class="card-title">Recency - Monetary {% if data_type['recency_monetary'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
|
|
180
|
+
</div>
|
|
181
|
+
<div class="card-body">
|
|
182
|
+
<div id="rm_id" class="plotly-gra ph-div" style="height:400px;"></div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</main>
|
|
192
|
+
|
|
193
|
+
{% endblock content %}
|
|
194
|
+
|
|
195
|
+
<!-- Specific Page JS goes HERE -->
|
|
196
|
+
{% block javascripts %}
|
|
197
|
+
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
|
|
198
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
|
|
199
|
+
<script>
|
|
200
|
+
|
|
201
|
+
var rfm_vals = {{rfm | safe}};
|
|
202
|
+
|
|
203
|
+
Plotly.plot('rfm_vals_id', // the ID of the div, created above
|
|
204
|
+
rfm_vals.trace, rfm_vals.layout, {});
|
|
205
|
+
|
|
206
|
+
var fr = {{frequency_recency | safe}};
|
|
207
|
+
|
|
208
|
+
Plotly.plot('fr_id', // the ID of the div, created above
|
|
209
|
+
fr.trace, fr.layout, {});
|
|
210
|
+
|
|
211
|
+
var mf = {{monetary_frequency | safe}};
|
|
212
|
+
|
|
213
|
+
Plotly.plot('mf_id', // the ID of the div, created above
|
|
214
|
+
mf.trace, mf.layout, {});
|
|
215
|
+
|
|
216
|
+
var rm = {{recency_monetary | safe}};
|
|
217
|
+
|
|
218
|
+
Plotly.plot('rm_id', // the ID of the div, created above
|
|
219
|
+
rm.trace, rm.layout, {});
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
function myFunction() {
|
|
230
|
+
// Get the checkbox
|
|
231
|
+
var checkBox = document.getElementById("myCheck");
|
|
232
|
+
// Get the output text
|
|
233
|
+
var text = document.getElementById("text");
|
|
234
|
+
|
|
235
|
+
// If the checkbox is checked, display the output text
|
|
236
|
+
if (checkBox.checked == true){
|
|
237
|
+
text.style.display = "block";
|
|
238
|
+
} else {
|
|
239
|
+
text.style.display = "none";
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
</script>
|
|
243
|
+
|
|
244
|
+
<script>
|
|
245
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
246
|
+
document.getElementById("datetimepicker-dashboard").flatpickr({
|
|
247
|
+
inline: true,
|
|
248
|
+
|
|
249
|
+
prevArrow: "<span class=\"fas fa-chevron-left\" title=\"Previous month\"></span>",
|
|
250
|
+
nextArrow: "<span class=\"fas fa-chevron-right\" title=\"Next month\"></span>",
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
</script>
|
|
254
|
+
{% endblock javascripts %}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
{% extends "layouts/base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %} search {% endblock %}
|
|
4
|
+
|
|
5
|
+
<!-- Specific Page CSS goes HERE -->
|
|
6
|
+
{% block stylesheets %}{% endblock stylesheets %}
|
|
7
|
+
|
|
8
|
+
{% block content %}
|
|
9
|
+
|
|
10
|
+
<main class="content">
|
|
11
|
+
<div class="container-fluid p-0">
|
|
12
|
+
<h5 class="h3 mb-3">Search Results {% if search_results.has_results == False %} <strong style="color:red;"> no result is found. (sample data) </strong> {% endif %}</h5>
|
|
13
|
+
|
|
14
|
+
{% if search_results.has_results == True %}
|
|
15
|
+
<h5 class="card-title mb-4" style="color:green;">
|
|
16
|
+
search_value : {{ search_results.search_value }} ||
|
|
17
|
+
similarity_score : {{ search_results.similarity_score }} ||
|
|
18
|
+
search_type: {{ search_results.search_type }}
|
|
19
|
+
</h5>
|
|
20
|
+
{% endif %}
|
|
21
|
+
<div class="col-md-12">
|
|
22
|
+
<div class="card">
|
|
23
|
+
<div class="card-body">
|
|
24
|
+
<div class="row">
|
|
25
|
+
<div class="col-xl-6 col-xxl-5 d-flex">
|
|
26
|
+
<div class="w-100">
|
|
27
|
+
<div class="row">
|
|
28
|
+
<div class="col-sm-6">
|
|
29
|
+
<div class="card" style="height:200px;">
|
|
30
|
+
<div class="card-body">
|
|
31
|
+
<h5 class="card-title mb-4">
|
|
32
|
+
{{ chart_names.kpi_1 }} {% if data_type['kpi_1'] == False %} <strong style="color:red;"> sample data </strong>
|
|
33
|
+
{% endif %} {% if search_results.has_results == False %} <strong style="color:red;"> no result is found. (sample data) </strong> {% endif %}</h5>
|
|
34
|
+
<h1 class="mt-1 mb-3">{{ kpis.kpi_1 }}</h1>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="card" style="height:200px;">
|
|
38
|
+
<div class="card-body">
|
|
39
|
+
<h5 class="card-title mb-4">
|
|
40
|
+
{{ chart_names.kpi_2 }} {% if data_type['kpi_2'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}
|
|
41
|
+
{% if search_results.has_results == False %} <strong style="color:red;"> no result is found. (sample data) </strong> {% endif %}</h5>
|
|
42
|
+
<h1 class="mt-1 mb-3">{{ kpis.kpi_2 }}</h1>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="col-sm-6">
|
|
47
|
+
<div class="card" style="height:200px;">
|
|
48
|
+
<div class="card-body">
|
|
49
|
+
<h5 class="card-title mb-4">
|
|
50
|
+
{{ chart_names.kpi_3 }} {% if data_type['kpi_3'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}
|
|
51
|
+
{% if search_results.has_results == False %} <strong style="color:red;"> no result is found. (sample data) </strong> {% endif %}</h5>
|
|
52
|
+
<h1 class="mt-1 mb-3">{{ kpis.kpi_3 }}</h1>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div class="card" style="height:200px;">
|
|
57
|
+
<div class="card-body">
|
|
58
|
+
<h5 class="card-title mb-4">
|
|
59
|
+
{{ chart_names.kpi_4 }} {% if data_type['kpi_4'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}
|
|
60
|
+
{% if search_results.has_results == False %} <strong style="color:red;"> no result is found. (sample data) </strong> {% endif %}</h5>
|
|
61
|
+
<h1 class="mt-1 mb-3">{{ kpis.kpi_4 }}</h1>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="col-md-7">
|
|
70
|
+
<div class="card" style="height:200px;">
|
|
71
|
+
<div class="card-header">
|
|
72
|
+
<h5 class="card-title">{{ chart_names.chart_2_search }}</strong>
|
|
73
|
+
{% if search_results.has_results == False %} <strong style="color:red;"> no result is found. (sample data) </strong> {% endif %}</h5>
|
|
74
|
+
|
|
75
|
+
</div>
|
|
76
|
+
<div class="card-body">
|
|
77
|
+
<div id="chart_2_id" class="plotly-gra ph-div" style="height:400px;"></div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
{% if search_results.search_type == 'product' or search_results.search_type == 'promotion' or search_results.search_type == 'dimension' %}
|
|
84
|
+
<div class="row">
|
|
85
|
+
<div class="col-md-6">
|
|
86
|
+
<div class="card">
|
|
87
|
+
<div class="card-header">
|
|
88
|
+
<h5 class="card-title">{{ chart_names.chart_3_search }}</strong>
|
|
89
|
+
{% if search_results.has_results == False %} <strong style="color:red;"> no result is found. (sample data) </strong> {% endif %}</h5>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="card-body">
|
|
92
|
+
<div id="chart_3_id" class="plotly-gra ph-div" style="height:400px;"></div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="col-md-6">
|
|
97
|
+
<div class="card">
|
|
98
|
+
<div class="card-header">
|
|
99
|
+
<h5 class="card-title">{{ chart_names.chart_4_search }}</strong>
|
|
100
|
+
{% if search_results.has_results == False %} <strong style="color:red;"> no result is found. (sample data) </strong> {% endif %}</h5>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="card-body">
|
|
103
|
+
<div id="chart_4_id" class="plotly-gra ph-div" style="height:400px;"></div>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
{% endif %}
|
|
109
|
+
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</main>
|
|
115
|
+
|
|
116
|
+
{% endblock content %}
|
|
117
|
+
|
|
118
|
+
<!-- Specific Page JS goes HERE -->
|
|
119
|
+
{% block javascripts %}
|
|
120
|
+
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
|
|
121
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
|
|
122
|
+
<script>
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
var chart_2_v = {{chart_2 | safe}};
|
|
126
|
+
|
|
127
|
+
Plotly.plot('chart_2_id', // the ID of the div, created above
|
|
128
|
+
chart_2_v.trace, chart_2_v.layout, {});
|
|
129
|
+
|
|
130
|
+
var chart_3_v = {{chart_3 | safe}};
|
|
131
|
+
|
|
132
|
+
Plotly.plot('chart_3_id', // the ID of the div, created above
|
|
133
|
+
chart_3_v.trace, chart_3_v.layout, {});
|
|
134
|
+
|
|
135
|
+
var chart_4_v = {{chart_4 | safe}};
|
|
136
|
+
|
|
137
|
+
Plotly.plot('chart_4_id', // the ID of the div, created above
|
|
138
|
+
chart_4_v.trace, chart_4_v.layout, {});
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
function myFunction() {
|
|
143
|
+
// Get the checkbox
|
|
144
|
+
var checkBox = document.getElementById("myCheck");
|
|
145
|
+
// Get the output text
|
|
146
|
+
var text = document.getElementById("text");
|
|
147
|
+
|
|
148
|
+
// If the checkbox is checked, display the output text
|
|
149
|
+
if (checkBox.checked == true){
|
|
150
|
+
text.style.display = "block";
|
|
151
|
+
} else {
|
|
152
|
+
text.style.display = "none";
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
</script>
|
|
156
|
+
|
|
157
|
+
<script>
|
|
158
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
159
|
+
document.getElementById("datetimepicker-dashboard").flatpickr({
|
|
160
|
+
inline: true,
|
|
161
|
+
|
|
162
|
+
prevArrow: "<span class=\"fas fa-chevron-left\" title=\"Previous month\"></span>",
|
|
163
|
+
nextArrow: "<span class=\"fas fa-chevron-right\" title=\"Next month\"></span>",
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
</script>
|
|
167
|
+
{% endblock javascripts %}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
{% extends "layouts/base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %} Settings {% endblock %}
|
|
4
|
+
|
|
5
|
+
<!-- Specific Page CSS goes HERE -->
|
|
6
|
+
{% block stylesheets %}{% endblock stylesheets %}
|
|
7
|
+
|
|
8
|
+
{% block content %}
|
|
9
|
+
|
|
10
|
+
<main class="content">
|
|
11
|
+
<div class="container-fluid p-0">
|
|
12
|
+
<h1 class="h3 mb-3">Settings</h1>
|
|
13
|
+
<div class="row">
|
|
14
|
+
<div class="col-md-3 col-xl-2">
|
|
15
|
+
<div class="card">
|
|
16
|
+
<div class="card-header">
|
|
17
|
+
<h5 class="card-title mb-0">Profile Settings</h5>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="list-group list-group-flush" role="tablist">
|
|
20
|
+
<a class="list-group-item list-group-item-action active" data-toggle="list" href="#account" role="tab">
|
|
21
|
+
Account
|
|
22
|
+
</a>
|
|
23
|
+
<a class="list-group-item list-group-item-action" data-toggle="list" href="#password" role="tab">
|
|
24
|
+
Password
|
|
25
|
+
</a>
|
|
26
|
+
<a class="list-group-item list-group-item-action" data-toggle="list" href="#" role="tab">
|
|
27
|
+
Delete account
|
|
28
|
+
</a>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="col-md-9 col-xl-10">
|
|
33
|
+
<div class="tab-content">
|
|
34
|
+
<div class="tab-pane fade show active" id="account" role="tabpanel">
|
|
35
|
+
<div class="card">
|
|
36
|
+
<div class="card-header">
|
|
37
|
+
<h5 class="card-title mb-0">Public info</h5>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="card-body">
|
|
40
|
+
<form>
|
|
41
|
+
<div class="row">
|
|
42
|
+
<div class="col-md-8">
|
|
43
|
+
<div class="mb-3">
|
|
44
|
+
<label class="form-label" for="inputUsername">Username</label>
|
|
45
|
+
<input type="text" class="form-control" id="inputUsername" placeholder="Username">
|
|
46
|
+
</div>
|
|
47
|
+
<div class="mb-3">
|
|
48
|
+
<label class="form-label" for="inputUsername">Biography</label>
|
|
49
|
+
<textarea rows="2" class="form-control" id="inputBio" placeholder="Tell something about yourself"></textarea>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="col-md-4">
|
|
53
|
+
<div class="text-center">
|
|
54
|
+
{% if pic == 'None' %}
|
|
55
|
+
<div class="card-body text-center" style="text-allign:center;">
|
|
56
|
+
<span id="firstName" hidden>{{ current_user.username }} </span>
|
|
57
|
+
<span id="lastName" hidden>{{ current_user.email }} </span>
|
|
58
|
+
<div id="profileImage" width="128" height="128" align="center"></div>
|
|
59
|
+
</div>
|
|
60
|
+
{% endif %}
|
|
61
|
+
{% if pic != 'None' %}
|
|
62
|
+
<img src="/static/assets/img/avatars/{{ pic }}"class="img-fluid rounded-circle mb-2" width="128" height="128" />
|
|
63
|
+
{% endif %}
|
|
64
|
+
<form action="/upload-image" method="POST" enctype="multipart/form-data">
|
|
65
|
+
<div class="form-group">
|
|
66
|
+
<div class="custom-file mb-1">
|
|
67
|
+
<label for="image" class="btn" style="color:green;">Select Image</label>
|
|
68
|
+
<input type="file" class="custom-file-input" style="visibility:hidden;" name="image" id="image" required>
|
|
69
|
+
<button type="submit" class="btn btn-primary"><i class="fas fa-upload"></i>Upload</button>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</form>
|
|
73
|
+
<small>choose an avatar with .png format</small>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<button type="submit" class="btn btn-primary">Save changes</button>
|
|
78
|
+
</form>
|
|
79
|
+
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="card">
|
|
83
|
+
<div class="card-header">
|
|
84
|
+
<h5 class="card-title mb-0">Private info</h5>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="card-body">
|
|
87
|
+
<form>
|
|
88
|
+
<div class="row">
|
|
89
|
+
<div class="mb-3 col-md-6">
|
|
90
|
+
<label class="form-label" for="inputFirstName">First name</label>
|
|
91
|
+
<input type="text" class="form-control" id="inputFirstName" placeholder="First name">
|
|
92
|
+
</div>
|
|
93
|
+
<div class="mb-3 col-md-6">
|
|
94
|
+
<label class="form-label" for="inputLastName">Last name</label>
|
|
95
|
+
<input type="text" class="form-control" id="inputLastName" placeholder="Last name">
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="mb-3">
|
|
99
|
+
<label class="form-label" for="inputEmail4">Email</label>
|
|
100
|
+
<input type="email" class="form-control" id="inputEmail4" placeholder="Email">
|
|
101
|
+
</div>
|
|
102
|
+
<div class="mb-3">
|
|
103
|
+
<label class="form-label" for="inputAddress">Address</label>
|
|
104
|
+
<input type="text" class="form-control" id="inputAddress" placeholder="1234 Main St">
|
|
105
|
+
</div>
|
|
106
|
+
<div class="mb-3">
|
|
107
|
+
<label class="form-label" for="inputAddress2">Address 2</label>
|
|
108
|
+
<input type="text" class="form-control" id="inputAddress2" placeholder="Apartment, studio, or floor">
|
|
109
|
+
</div>
|
|
110
|
+
<div class="row">
|
|
111
|
+
<div class="mb-3 col-md-6">
|
|
112
|
+
<label class="form-label" for="inputCity">City</label>
|
|
113
|
+
<input type="text" class="form-control" id="inputCity">
|
|
114
|
+
</div>
|
|
115
|
+
<div class="mb-3 col-md-4">
|
|
116
|
+
<label class="form-label" for="inputState">State</label>
|
|
117
|
+
<select id="inputState" class="form-control">
|
|
118
|
+
<option selected>Choose...</option>
|
|
119
|
+
<option>...</option>
|
|
120
|
+
</select>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="mb-3 col-md-2">
|
|
123
|
+
<label class="form-label" for="inputZip">Zip</label>
|
|
124
|
+
<input type="text" class="form-control" id="inputZip">
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
<button type="submit" class="btn btn-primary">Save changes</button>
|
|
128
|
+
</form>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="tab-pane fade" id="password" role="tabpanel">
|
|
133
|
+
<div class="card">
|
|
134
|
+
<div class="card-body">
|
|
135
|
+
<h5 class="card-title">Password</h5>
|
|
136
|
+
<form>
|
|
137
|
+
<div class="mb-3">
|
|
138
|
+
<label class="form-label" for="inputPasswordCurrent">Current password</label>
|
|
139
|
+
<input type="password" class="form-control" id="inputPasswordCurrent">
|
|
140
|
+
<small><a href="#">Forgot your password?</a></small>
|
|
141
|
+
</div>
|
|
142
|
+
<div class="mb-3">
|
|
143
|
+
<label class="form-label" for="inputPasswordNew">New password</label>
|
|
144
|
+
<input type="password" class="form-control" id="inputPasswordNew">
|
|
145
|
+
</div>
|
|
146
|
+
<div class="mb-3">
|
|
147
|
+
<label class="form-label" for="inputPasswordNew2">Verify password</label>
|
|
148
|
+
<input type="password" class="form-control" id="inputPasswordNew2">
|
|
149
|
+
</div>
|
|
150
|
+
<button type="submit" class="btn btn-primary">Save changes</button>
|
|
151
|
+
</form>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</main>
|
|
160
|
+
<style>
|
|
161
|
+
|
|
162
|
+
.inputfile {
|
|
163
|
+
|
|
164
|
+
opacity: 8;
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
position: absolute;
|
|
167
|
+
z-index: -1;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.inputfile + label {
|
|
171
|
+
cursor: pointer; /* "hand" cursor */
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
</style>
|
|
175
|
+
|
|
176
|
+
{% endblock content %}
|
|
177
|
+
|
|
178
|
+
<!-- Specific Page JS goes HERE -->
|
|
179
|
+
{% block javascripts %}
|
|
180
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
|
|
181
|
+
<script>
|
|
182
|
+
|
|
183
|
+
$(document).ready(function(){
|
|
184
|
+
var firstName = $('#firstName').text();
|
|
185
|
+
var lastName = $('#lastName').text();
|
|
186
|
+
var intials = $('#firstName').text().charAt(0) + $('#lastName').text().charAt(0);
|
|
187
|
+
var profileImage = $('#profileImage').text(intials);
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
$(document).ready(function(){
|
|
191
|
+
var firstName = $('#firstName').text();
|
|
192
|
+
var lastName = $('#lastName').text();
|
|
193
|
+
var intials = $('#firstName').text().charAt(0) + $('#lastName').text().charAt(0);
|
|
194
|
+
var profileImage = $('#profileImageTop').text(intials);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
imgInp.onchange = evt => {
|
|
198
|
+
const [file] = imgInp.files
|
|
199
|
+
if (file) {
|
|
200
|
+
blah.src = URL.createObjectURL(file)
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
</script>
|
|
204
|
+
|
|
205
|
+
{% endblock javascripts %}
|