update
This commit is contained in:
25
public/invoice-view-init.js
Normal file
25
public/invoice-view-init.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// invoice-view-init.js — Bootstrap-Script (type="module")
|
||||
// Wird in index.html als <script type="module"> geladen.
|
||||
// Importiert das Invoice-View Modul und verbindet es mit der bestehenden App.
|
||||
|
||||
import { loadInvoices, renderInvoiceView, injectToolbar } from './invoice-view.js';
|
||||
|
||||
// Warte bis DOM fertig ist
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', init);
|
||||
} else {
|
||||
init();
|
||||
}
|
||||
|
||||
function init() {
|
||||
// Toolbar injizieren
|
||||
injectToolbar();
|
||||
|
||||
// Globale Funktionen für app.js verfügbar machen
|
||||
// (app.js ruft loadInvoices() auf wenn der Tab gewechselt wird)
|
||||
window.loadInvoices = loadInvoices;
|
||||
window.renderInvoices = renderInvoiceView;
|
||||
|
||||
// Initiales Laden
|
||||
loadInvoices();
|
||||
}
|
||||
Reference in New Issue
Block a user