* jquery removed
* charts auf lokal umgestellt * Rechnungen mit Anhang * neues Interface Sync automatische
This commit is contained in:
68
app/Views/charts/monthly.php
Normal file
68
app/Views/charts/monthly.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?= $this->extend('layout'); ?>
|
||||
<?= $this->section('menu'); ?>
|
||||
<?= $this->include('sidebar') ?>
|
||||
<?= $this->endSection(); ?>
|
||||
<?= $this->section('css'); ?>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
||||
|
||||
<?= $this->endSection(); ?>
|
||||
<?= $this->section('content'); ?>
|
||||
<div class="page-content col-xxl-4 col-12">
|
||||
<div class="row" id="chart">
|
||||
<canvas id="myAreaChart"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<?= $this->endSection(); ?>
|
||||
<?= $this->section('scripts'); ?>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.5/dist/chart.umd.min.js"></script>
|
||||
<script src="https://smarthome.mawim.at/assets/luxon.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-adapter-luxon/1.3.0/chartjs-adapter-luxon.umd.js" integrity="sha512-IUw+YyQA3lci8gHiGIbkEA5pHnSy9LJeujqIDBHQMhxTk019nRXvDrKi2WcEr5nf5+RNffKMqSagdI0tzXvBiA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|
||||
<script>
|
||||
const data = {
|
||||
labels: <?=$labels?>,
|
||||
datasets: [
|
||||
{
|
||||
label: '€',
|
||||
data: <?=$data?>,
|
||||
id:<?=$ids?>,
|
||||
hoverOffset: 8
|
||||
}
|
||||
]
|
||||
};
|
||||
const configDonut = {
|
||||
type: 'doughnut',
|
||||
data: data,
|
||||
options: {
|
||||
responsive: true,
|
||||
plugins: {
|
||||
legend: {
|
||||
position: 'left',
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: '<?=$title?>',
|
||||
font: { size: 20 }
|
||||
}
|
||||
},
|
||||
onClick: (e) => {
|
||||
let ele = document.getElementById("myChartModal");
|
||||
const canvasPosition = Chart.helpers.getRelativePosition(e, window.myLineChart);
|
||||
// Substitute the appropriate scale IDs
|
||||
const data = window.myLineChart.getActiveElements(e);
|
||||
document.getElementById("modalChartBody").innerHTML = `<a href="/viewChart/${window.myLineChart.data.datasets[0].id[data[0].index]}">Zeige Details von ${window.myLineChart.data.labels[data[0].index]}</a>`;
|
||||
bootstrap.Modal.getOrCreateInstance(ele).show();
|
||||
const name = window.myLineChart.data.labels[data[0].index];
|
||||
//const dataY = chart.scales.y.getValueForPixel(canvasPosition.y);
|
||||
// alert(`http://mqtt.mawim.at/viewChart/${window.myLineChart.data.datasets[0].id[data[0].index]}`);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
(async function () {
|
||||
Chart.defaults.font.size = 16;
|
||||
window.myLineChart = new Chart(document.getElementById('myAreaChart'), configDonut);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<?= $this->endSection(); ?>
|
||||
@@ -64,6 +64,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="myChartModal" tabindex="-1" aria-labelledby="Chart Link Window" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="modalTitle">Modal title</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div id="modalChartBody" class="modal-body">
|
||||
<p>Please Wait.</p>
|
||||
</div>
|
||||
<div class="modal-footer d-none">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <script src="/assets/vendors/perfect-scrollbar/perfect-scrollbar.min.js"></script>
|
||||
@@ -74,6 +90,7 @@
|
||||
<script defer src="/assets/fontawesome6.4.0/js/brands.js"></script>
|
||||
<script defer src="/assets/fontawesome6.4.0/js/regular.js"></script>
|
||||
<script src="/assets/DataTables/datatables.min.js"></script>
|
||||
<script src="/js/menue.js"></script>
|
||||
<script src="/assets/js/main.js"></script>
|
||||
<?= $this->renderSection('scripts') ?>
|
||||
</body>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
<?= $this->section('css'); ?>
|
||||
<link rel="stylesheet" href="/css/mawim.css">
|
||||
<link rel="stylesheet" href="/assets/jquery-ui-1.13.2.custom/jquery-ui.css">
|
||||
<?= $this->endSection(); ?>
|
||||
<?= $this->section('menu'); ?>
|
||||
<?= $this->include('sidebar') ?>
|
||||
@@ -15,7 +14,7 @@
|
||||
<div class="col-md-8 col-12">
|
||||
<div class="card">
|
||||
<div class="card-header pb-0">
|
||||
<h4 class="card-title">Neue Rechnung</h4>
|
||||
<h4 class="card-title"><?= ($transfer?'Neuer Transfer':($isScheduled?'Neue Terminbuchung':'Neue Rechnung'))?></h4>
|
||||
<?php if (! empty($validation)) : ?>
|
||||
<div class='alert alert-danger mt-2'>
|
||||
<div class="errors" role="alert">
|
||||
@@ -30,7 +29,8 @@
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-body">
|
||||
<form class="form form-vertical" id="newbill" method="post" action="<?= base_url() ?>/newBill">
|
||||
<?= form_open_multipart('newBill','class="form form-vertical" onsubmit="logData(event)" id="newbill"') ?>
|
||||
<!-- <form class="form form-vertical" id="newbill" method="post" enctype="multipart/form-data" onsubmit="logData(event)" action="<?= base_url() ?>newBill"> -->
|
||||
<input type="hidden" value="<?= $id ?>" name="id">
|
||||
<input type="hidden" value="<?= $transfer?'1':'0' ?>" name="transfer">
|
||||
<div class="form-body">
|
||||
@@ -41,7 +41,15 @@
|
||||
<input class="form-check-input" type="checkbox" id="multi" value="on" name="multi" <?= set_checkbox('multi', 'on', $multi??false) ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 <?= ($transfer?' d-none':'') ?>">
|
||||
<div class="col-12 <?= ($transfer?' d-none':($isScheduled?' d-none':'')) ?>">
|
||||
<label for="billfile">Rechnung</label>
|
||||
<?php if (!isset($billfile)): ?>
|
||||
<input type="file" id="billfile" name="billfile" class="form-control" capture="environment" accept="image/*, application/pdf">
|
||||
<?php else: ?>
|
||||
<input type="text" disabled="disabled" name="temp" id="billfile1" class="form-control" value="<?= set_value('billfile1', $billfile??'') ?>">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col-12 <?= ($transfer?' d-none':'d-none') ?>">
|
||||
<div class='form-check'>
|
||||
<div class="checkbox">
|
||||
<label for="renummer">Re-Nr.</label>
|
||||
@@ -50,8 +58,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label for="datepicker">Datum</label>
|
||||
<input type="text" class="form-control" id="datepicker" data-date-format="mm.dd.yyyy" name="datum" value="<?= $datum ?>"/>
|
||||
<label for="datum">Datum</label>
|
||||
<input type="date" class="form-control" id="datum" name="datum" value="<?= $datum ?>" onclick="openBox(this);"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 <?= ($transfer?' d-none':'') ?>">
|
||||
@@ -130,36 +138,10 @@
|
||||
<?= $this->endSection(); ?>
|
||||
<?= $this->section('scripts'); ?>
|
||||
<script>
|
||||
function openBox(e) {
|
||||
e.showPicker();
|
||||
}
|
||||
subsdata = <?= $subsdata; ?>;
|
||||
</script>
|
||||
|
||||
<script src="/assets/jquery-ui-1.13.2.custom/jquery-ui.js"></script>
|
||||
<script src="/js/billing.js"></script>
|
||||
<script>
|
||||
$.datepicker.regional['de'] = {clearText: 'löschen', clearStatus: 'aktuelles Datum löschen',
|
||||
closeText: 'schließen', closeStatus: 'ohne Änderungen schließen',
|
||||
prevText: '<zurück', prevStatus: 'letzten Monat zeigen',
|
||||
nextText: 'Vor>', nextStatus: 'nächsten Monat zeigen',
|
||||
currentText: 'heute', currentStatus: '',
|
||||
monthNames: ['Januar','Februar','März','April','Mai','Juni',
|
||||
'Juli','August','September','Oktober','November','Dezember'],
|
||||
monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
|
||||
'Jul','Aug','Sep','Okt','Nov','Dez'],
|
||||
monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen',
|
||||
weekHeader: 'Wo', weekStatus: 'Woche des Monats',
|
||||
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
|
||||
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
||||
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
||||
dayStatus: 'Setze DD als ersten Wochentag', dateStatus: 'Wähle D, M d',
|
||||
dateFormat: 'dd.mm.yy', firstDay: 1,
|
||||
initStatus: 'Wähle ein Datum', isRTL: false};
|
||||
$.datepicker.setDefaults($.datepicker.regional['de']);
|
||||
$('#datepicker').datepicker(
|
||||
{
|
||||
format: "dd.mm.yyyy",
|
||||
language: 'de-DE',
|
||||
weekStart: 1,
|
||||
autoclose: true,
|
||||
todayHighlight: false});
|
||||
</script>
|
||||
<?= $this->endSection(); ?>
|
||||
@@ -54,7 +54,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="sidebar-item active">
|
||||
<a href="http://mqtt.mawim.at:3000/d/6nnjNisVz/monatsuebersicht?orgId=1&from=1682671795200&to=1682693395200" class='sidebar-link' target="_blank">
|
||||
<a href="/viewChart" class='sidebar-link'>
|
||||
<i class="fa-solid fa-tachometer-alt"></i>
|
||||
<span>Monatschart</span>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user