Compare commits

..

4 commits

Author SHA1 Message Date
476f91f7cf
emojis
All checks were successful
/ ls (pull_request) Successful in 1m26s
/ ls (release) Successful in 51s
/ ls (push) Successful in 1m23s
2025-06-16 20:20:22 +02:00
Continuous Integration
f0c738362a Continuous Integration Fixes
All checks were successful
/ ls (push) Successful in 1m21s
/ ls (release) Successful in 55s
2025-06-16 17:07:14 +00:00
0d236677d4
add first chartychaaaaarrrt
All checks were successful
/ ls (pull_request) Successful in 1m25s
2025-06-16 19:05:29 +02:00
252eac442e
move js files 2025-06-16 18:14:44 +02:00
8 changed files with 58 additions and 6 deletions

View file

@ -10,11 +10,11 @@ import './styles/modes.css';
import './styles/emoji-footprint.css';
// Import modules
import './theme.js';
import './emoji-footprint.js';
import './modes.js';
import { initNumberInputs } from './numberInputs.js';
import { initRadioState } from './radioState.js';
import './javascript/theme.js';
import './javascript/emoji-footprint.js';
import './javascript/modes.js';
import { initNumberInputs } from './javascript/numberInputs.js';
import { initRadioState } from './javascript/radioState.js';
// Initialize everything when DOM is ready
document.addEventListener('DOMContentLoaded', function() {
@ -23,4 +23,4 @@ document.addEventListener('DOMContentLoaded', function() {
// Initialize number inputs on page load
initNumberInputs();
});
});

View file

@ -28,4 +28,13 @@ return [
'version' => '5.3.6',
'type' => 'css',
],
'chart.js' => [
'version' => '4.5.0',
],
'@kurkle/color' => [
'version' => '0.3.4',
],
'chart.js/auto' => [
'version' => '4.5.0',
],
];

View file

@ -64,6 +64,49 @@
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h5 class="card-title">Example Chart</h5>
</div>
<div class="card-body">
<canvas id="stockHistoryChart"></canvas>
<script type="module">
import { Chart } from 'chart.js/auto';
new Chart(document.getElementById('stockHistoryChart'), {
type: 'line',
data: {
labels: [{% for record in stock_history %}'{{ record.changeDate|date('Y-m-d H:i') }}'{{ not loop.last ? ',' }}{% endfor %}],
datasets: [{
label: 'Stock History',
data: [{% for record in stock_history %}{{ record.newValue }}{{ not loop.last ? ',' }}{% endfor %}],
borderColor: 'rgb(75, 192, 192)',
tension: 0.1
},
{
label: 'Wanted Stock History',
data: [{% for record in wanted_history %}{{ record.newValue }}{{ not loop.last ? ',' }}{% endfor %}],
borderColor: 'rgb(255, 99, 132)',
tension: 0.1
}]
},
options: {
responsive: true,
scales: {
y: {
beginAtZero: true
}
}
}
});
</script>
</div>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h5 class="card-title">Orders Containing This Drink</h5>
<h5 class="card-title">
ORDERS CONTAINING THIS DRINK
<span class="emoji-normal">💋</span>