File size: 9,356 Bytes
e48fd7e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Detailed Analysis - Putty Pack Pro Analyzer</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="components/navbar.js"></script>
    <script src="components/footer.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
</head>
<body class="bg-gray-50">
    <custom-navbar></custom-navbar>
    
    <main class="container mx-auto px-4 py-8">
        <div class="bg-white rounded-xl shadow-md p-6 mb-8">
            <h1 class="text-3xl font-bold text-primary mb-6">Detailed Production Analysis</h1>
            
            <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-8">
                <div class="bg-gray-50 p-6 rounded-lg">
                    <h2 class="text-xl font-semibold text-secondary mb-4">Production Efficiency</h2>
                    <div class="h-64">
                        <canvas id="efficiencyChart"></canvas>
                    </div>
                </div>
                
                <div class="bg-gray-50 p-6 rounded-lg">
                    <h2 class="text-xl font-semibold text-secondary mb-4">Cost Breakdown</h2>
                    <div class="h-64">
                        <canvas id="costChart"></canvas>
                    </div>
                </div>
            </div>
            
            <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
                <div class="border border-gray-200 rounded-lg p-6">
                    <div class="flex items-center mb-4">
                        <i data-feather="trending-up" class="text-secondary mr-3"></i>
                        <h2 class="text-xl font-semibold">Weekly Trends</h2>
                    </div>
                    <div class="h-64">
                        <canvas id="trendChart"></canvas>
                    </div>
                </div>
                
                <div class="border border-gray-200 rounded-lg p-6">
                    <div class="flex items-center mb-4">
                        <i data-feather="clock" class="text-secondary mr-3"></i>
                        <h2 class="text-xl font-semibold">Shift Performance</h2>
                    </div>
                    <div class="h-64">
                        <canvas id="shiftChart"></canvas>
                    </div>
                </div>
                
                <div class="border border-gray-200 rounded-lg p-6">
                    <div class="flex items-center mb-4">
                        <i data-feather="dollar-sign" class="text-secondary mr-3"></i>
                        <h2 class="text-xl font-semibold">Savings Potential</h2>
                    </div>
                    <div class="h-64">
                        <canvas id="savingsChart"></canvas>
                    </div>
                </div>
            </div>
            
            <div class="bg-blue-50 p-6 rounded-lg border border-blue-100">
                <h2 class="text-xl font-semibold text-primary mb-4">Key Insights</h2>
                <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                    <div class="p-4 bg-white rounded-lg shadow-sm">
                        <div class="text-sm text-gray-500 mb-1">Peak Efficiency</div>
                        <div class="text-2xl font-bold text-primary">72%</div>
                        <div class="text-xs text-gray-500 mt-1">Current production efficiency</div>
                    </div>
                    <div class="p-4 bg-white rounded-lg shadow-sm">
                        <div class="text-sm text-gray-500 mb-1">Daily Loss</div>
                        <div class="text-2xl font-bold text-red-500">₹28,680</div>
                        <div class="text-xs text-gray-500 mt-1">Potential savings per day</div>
                    </div>
                    <div class="p-4 bg-white rounded-lg shadow-sm">
                        <div class="text-sm text-gray-500 mb-1">Monthly Impact</div>
                        <div class="text-2xl font-bold text-green-500">₹860,400</div>
                        <div class="text-xs text-gray-500 mt-1">Potential monthly savings</div>
                    </div>
                </div>
            </div>
        </div>
    </main>
    
    <custom-footer></custom-footer>
    
    <script src="script.js"></script>
    <script>
        feather.replace();
        
        document.addEventListener('DOMContentLoaded', function() {
            // Efficiency Chart
            const efficiencyCtx = document.getElementById('efficiencyChart').getContext('2d');
            new Chart(efficiencyCtx, {
                type: 'doughnut',
                data: {
                    labels: ['Actual Production', 'Lost Potential', 'Idle Time'],
                    datasets: [{
                        data: [72, 23, 5],
                        backgroundColor: [
                            'rgba(16, 185, 129, 0.7)',
                            'rgba(239, 68, 68, 0.7)',
                            'rgba(156, 163, 175, 0.7)'
                        ],
                        borderWidth: 1
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false
                }
            });
            
            // Cost Chart
            const costCtx = document.getElementById('costChart').getContext('2d');
            new Chart(costCtx, {
                type: 'bar',
                data: {
                    labels: ['Labor', 'Materials', 'Machine', 'Overhead', 'Lost Potential'],
                    datasets: [{
                        label: 'Cost per Bag (₹)',
                        data: [2.5, 1.8, 0.7, 1.0, 5.0],
                        backgroundColor: 'rgba(59, 130, 246, 0.7)',
                        borderWidth: 1
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    scales: {
                        y: {
                            beginAtZero: true
                        }
                    }
                }
            });
            
            // Trend Chart
            const trendCtx = document.getElementById('trendChart').getContext('2d');
            new Chart(trendCtx, {
                type: 'line',
                data: {
                    labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
                    datasets: [{
                        label: 'Bags Produced',
                        data: [1800, 1950, 2100, 1920, 2200, 1500],
                        borderColor: 'rgba(59, 130, 246, 1)',
                        backgroundColor: 'rgba(59, 130, 246, 0.1)',
                        fill: true,
                        tension: 0.3
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    scales: {
                        y: {
                            beginAtZero: false
                        }
                    }
                }
            });
            
            // Shift Chart
            const shiftCtx = document.getElementById('shiftChart').getContext('2d');
            new Chart(shiftCtx, {
                type: 'radar',
                data: {
                    labels: ['Morning', 'Afternoon', 'Night'],
                    datasets: [{
                        label: 'Efficiency %',
                        data: [85, 72, 68],
                        backgroundColor: 'rgba(16, 185, 129, 0.2)',
                        borderColor: 'rgba(16, 185, 129, 1)',
                        pointBackgroundColor: 'rgba(16, 185, 129, 1)',
                        pointBorderColor: '#fff',
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    scales: {
                        r: {
                            angleLines: {
                                display: true
                            },
                            suggestedMin: 50,
                            suggestedMax: 100
                        }
                    }
                }
            });
            
            // Savings Chart
            const savingsCtx = document.getElementById('savingsChart').getContext('2d');
            new Chart(savingsCtx, {
                type: 'pie',
                data: {
                    labels: ['Current', 'Optimized'],
                    datasets: [{
                        data: [1920, 6700],
                        backgroundColor: [
                            'rgba(156, 163, 175, 0.7)',
                            'rgba(16, 185, 129, 0.7)'
                        ],
                        borderWidth: 1
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false
                }
            });
        });
    </script>
</body>
</html>