major fixes

This commit is contained in:
2024-09-25 16:55:03 +02:00
parent e1cb68766e
commit 598acfd77c
12 changed files with 351 additions and 236 deletions
@@ -0,0 +1,35 @@
import { Controller } from '@hotwired/stimulus';
/*
* This is an example Stimulus controller!
*
* Any element with a data-controller="hello" attribute will cause
* this controller to be executed. The name "hello" comes from the filename:
* hello_controller.js -> "hello"
*
* Delete this file or adapt it for your use!
*/
export default class extends Controller {
allCardsDiv;
connect() {
this.allCardsDiv = $('#allCardsReport .report-one');
}
showModal(){
const reportId = event.params.reportid, date = event.params.date;
$("#showReportModal").find('.modal-body').html(
this.findReport(reportId)
);
$("#showReportModal").find('.modal-title').html(date)
$("#showReportModal").modal('show');
}
findReport(id) {
for (const allCardsDivKey of this.allCardsDiv) {
const tmp = $(allCardsDivKey);
if (tmp.data('report_id') === id) {
return tmp;
}
}
}
}