Compare commits
1 commit
476f91f7cf
...
bab4d3d208
Author | SHA1 | Date | |
---|---|---|---|
bab4d3d208 |
8 changed files with 6 additions and 58 deletions
|
@ -10,11 +10,11 @@ import './styles/modes.css';
|
||||||
import './styles/emoji-footprint.css';
|
import './styles/emoji-footprint.css';
|
||||||
|
|
||||||
// Import modules
|
// Import modules
|
||||||
import './javascript/theme.js';
|
import './theme.js';
|
||||||
import './javascript/emoji-footprint.js';
|
import './emoji-footprint.js';
|
||||||
import './javascript/modes.js';
|
import './modes.js';
|
||||||
import { initNumberInputs } from './javascript/numberInputs.js';
|
import { initNumberInputs } from './numberInputs.js';
|
||||||
import { initRadioState } from './javascript/radioState.js';
|
import { initRadioState } from './radioState.js';
|
||||||
|
|
||||||
// Initialize everything when DOM is ready
|
// Initialize everything when DOM is ready
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
|
@ -28,13 +28,4 @@ return [
|
||||||
'version' => '5.3.6',
|
'version' => '5.3.6',
|
||||||
'type' => 'css',
|
'type' => 'css',
|
||||||
],
|
],
|
||||||
'chart.js' => [
|
|
||||||
'version' => '4.5.0',
|
|
||||||
],
|
|
||||||
'@kurkle/color' => [
|
|
||||||
'version' => '0.3.4',
|
|
||||||
],
|
|
||||||
'chart.js/auto' => [
|
|
||||||
'version' => '4.5.0',
|
|
||||||
],
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -64,49 +64,6 @@
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<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">
|
<h5 class="card-title">
|
||||||
ORDERS CONTAINING THIS DRINK
|
ORDERS CONTAINING THIS DRINK
|
||||||
<span class="emoji-normal">💋</span>
|
<span class="emoji-normal">💋</span>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue