-
{!! trans('general.checkouts_checkins') !!}
-
-
-
-
{!! trans('general.new_accessories_created') !!}
-
-
+
+
+
{!! trans('general.checkouts_checkins') !!}
+
+
+
+
+
+
{!! trans('general.new_accessories_created') !!}
+
+
+
+
@@ -360,7 +396,7 @@ function makeChart(id, labels, current, previous, label, prevPeriod, color) {
ds(label + ' (' + prevPeriod + ')', previous, hexToRgba(color, 0.5), true),
]
},
- options: lineOptions
+ options: getLineOptions()
});
}
@@ -377,7 +413,7 @@ function makeChart2(id, labels, d1, d2, prev1, prev2, label1, label2, color1, co
ds(label2 + ' (' + prevPeriod + ')', prev2, hexToRgba(color2, 0.5), true),
]
},
- options: lineOptions
+ options: getLineOptions()
});
}
@@ -403,6 +439,7 @@ function setInfoBar(id, pct, prevLabel) {
}
function loadCharts(params) {
+ lastParams = params;
$.ajax({
type: 'GET',
url: '{{ route('api.reports.activity.chart') }}',
@@ -492,5 +529,9 @@ $('#customRangePicker').on('changeDate', function() {
loadCharts({ days: 30 });
+window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function() {
+ loadCharts(lastParams);
+});
+
@endpush