File size: 7,055 Bytes
153f158
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Customer Analysis - Tabble</title>
    <link rel="stylesheet" href="{{ url_for('static', path='/css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', path='/css/style.css') }}">
    <style>
        body {
            background-color: #000000;
            color: #FFFFFF;
            font-family: 'Montserrat', sans-serif;
        }
        .card {
            background-color: #121212;
            border-top: 4px solid #FFA500;
            border-radius: 8px;
            margin-bottom: 20px;
        }
        .card-title {
            color: #FFA500;
        }
        .nav-tabs .nav-link {
            color: #FFFFFF;
        }
        .nav-tabs .nav-link.active {
            background-color: transparent;
            color: #FFA500;
            border-color: #FFA500 #FFA500 transparent;
        }
        .btn-primary {
            background-color: #FFA500;
            border-color: #FFA500;
        }
        .btn-outline-primary {
            color: #FFA500;
            border-color: #FFA500;
        }
        .btn-outline-primary:hover {
            background-color: #FFA500;
            color: #FFFFFF;
        }
        .table {
            color: #FFFFFF;
        }
        .table thead th {
            background-color: #000000;
            color: #FFA500;
            border-color: #333333;
        }
        .table-striped tbody tr:nth-of-type(odd) {
            background-color: rgba(255, 165, 0, 0.05);
        }
    </style>
</head>
<body>
    <div class="container mt-4">
        <h1 class="mb-4">Customer Analysis</h1>

        <ul class="nav nav-tabs mb-4">
            <li class="nav-item">
                <a class="nav-link" href="/analysis">Overview</a>
            </li>
            <li class="nav-item">
                <a class="nav-link active" href="/analysis/customer">Customer Analysis</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="/analysis/dish">Dish Analysis</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="/analysis/chef">Chef Analysis</a>
            </li>
        </ul>

        <div class="alert alert-info">
            <h5>Customer Analysis Dashboard</h5>
            <p>This dashboard provides detailed insights into customer behavior and spending patterns. For a better experience with interactive charts, please use the React frontend.</p>
            <a href="/" class="btn btn-primary">Go to Home Page</a>
        </div>

        <div class="row">
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body text-center">
                        <h1 class="display-4 text-warning">0</h1>
                        <h5 class="card-title">Top Customers</h5>
                        <p class="card-text">These customers generate the most revenue for your hotel</p>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body text-center">
                        <h1 class="display-4 text-warning">0</h1>
                        <h5 class="card-title">Highest Visit Count</h5>
                        <p class="card-text">Maximum number of visits by a single customer</p>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body text-center">
                        <h1 class="display-4 text-warning">0</h1>
                        <h5 class="card-title">Avg. Orders per Customer</h5>
                        <p class="card-text">Average number of orders placed by top customers</p>
                    </div>
                </div>
            </div>
        </div>

        <div class="card mt-4">
            <div class="card-body">
                <h5 class="card-title">Top Customers by Revenue</h5>
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>Customer</th>
                            <th>Visit Count</th>
                            <th>Last Visit</th>
                            <th>Orders</th>
                            <th>Total Spent</th>
                            <th>Avg. Order Value</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>No data available</td>
                            <td>-</td>
                            <td>-</td>
                            <td>-</td>
                            <td>-</td>
                            <td>-</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>

        <div class="card mt-4">
            <div class="card-body">
                <h5 class="card-title">Customer Insights & Recommendations</h5>
                <div class="row">
                    <div class="col-md-4">
                        <div class="border-start border-warning ps-3 mb-3">
                            <h6>Loyalty Program Impact</h6>
                            <p class="small">Your top customers visit an average of 0 times. Consider enhancing your loyalty program to increase this number.</p>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="border-start border-warning ps-3 mb-3">
                            <h6>Customer Retention</h6>
                            <p class="small">0 customers (0%) have only visited once. Focus on converting these one-time visitors into repeat customers.</p>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="border-start border-warning ps-3 mb-3">
                            <h6>VIP Treatment</h6>
                            <p class="small">Your top 3 customers have spent a combined $0. Consider offering personalized experiences to these VIP guests.</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="text-center mt-5 mb-4">
            <p>For a better experience with interactive charts and detailed analytics, please use the React frontend.</p>
            <div class="btn-group">
                <a href="/analysis" class="btn btn-outline-primary">Overview</a>
                <a href="/analysis/dish" class="btn btn-outline-primary">Dish Analysis</a>
                <a href="/analysis/chef" class="btn btn-outline-primary">Chef Analysis</a>
            </div>
        </div>
    </div>

    <script src="{{ url_for('static', path='/js/bootstrap.bundle.min.js') }}"></script>
</body>
</html>