fix(image-import): Zielmonat aus Live-Dropdown, Titel-Namen matchen, Importer-Instanziierung nach Sync-Boot
- Zielmonat/-jahr aus month-select/year-select statt veraltetem app.currentMonth (stand fix auf heute) - normalizeName entfernt Anreden/Titel (Herr/Frau/Dr.) -> matcht titellose Mitarbeiter, kein Doppelanlegen - Regression aus Sync-Boot behoben: app.js erzeugt imageImporter nach window.app (DOMContentLoaded-Listener lief zu frueh) - totes app.currentMonth/currentYear entfernt; SW-Cache v5->v6
This commit is contained in:
parent
7d50e5d938
commit
0001735207
4 changed files with 77 additions and 11 deletions
10
app.js
10
app.js
|
|
@ -13,9 +13,6 @@ class DienstplanApp {
|
|||
this.holidayProvider = new HolidayProvider();
|
||||
this.calculator = new BonusCalculator(this.holidayProvider);
|
||||
|
||||
this.currentMonth = new Date().getMonth() + 1;
|
||||
this.currentYear = new Date().getFullYear();
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
|
|
@ -1237,4 +1234,11 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||
}
|
||||
app = new DienstplanApp();
|
||||
window.app = app;
|
||||
|
||||
// Bild-Import hier erzeugen (nicht in einem eigenen DOMContentLoaded-Listener):
|
||||
// window.app wird erst nach dem await oben gesetzt, ein paralleler Listener
|
||||
// liefe da noch ohne app und wuerde den Importer nie anlegen.
|
||||
if (window.ImageImporter && !window.imageImporter) {
|
||||
window.imageImporter = new window.ImageImporter(app);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue