bmc_hub/keepforlater/patch_overview_logic.py
Christian a604a3cc44 Add comprehensive test suite for vTiger integration and ticket module
- Implemented test scripts for vTiger account retrieval, contact data, and modules.
- Created a detailed test suite for the ticket module, covering database schema validation, ticket number generation, prepaid card constraints, and service logic.
- Added tests for vTiger field inspection and various queries related to accounts and sales orders.
- Introduced SQL migration scripts for the ALSO Cloud Billing foundation, including import jobs, lines, and mapping tables with necessary constraints and indices.
- Enhanced workflow columns in the import lines table to support matching and validation timestamps.
2026-06-20 03:29:51 +02:00

28 lines
1.3 KiB
Python

with open("static/js/bottom-bar.js", "r") as f:
content = f.read()
old_overview = """ if (key === 'overview') {
return [
'Velkommen til dit overblik',
'Her vises det vigtigste på tværs af systemet',
'Næste opgave kl. 14:00'
];
}"""
new_overview = """ if (key === 'overview') {
let out = [];
if (urgent.count > 0) out.push('🚨 Hastesager: ' + urgent.count + ' aktive');
if (mail.unread > 0) out.push('📧 Ubesvarede mails: ' + mail.unread + ' (' + mail.customer_reply_needed + ' kræver svar)');
if (cases.open > 0) out.push('📂 Åbne sager i alt: ' + cases.open);
if (kuma.down > 0) out.push('📉 Uptime Kuma nedetid: ' + kuma.down + ' enheder');
if (eset.incidents > 0) out.push('🔐 ESET incidents: ' + eset.incidents);
if (out.length === 0) {
out.push('🎉 Alt ser grønt ud! Intet kritisk lige nu.');
out.push('👉 Klik på fanerne til venstre for mere info.');
}
return out;
}"""
content = content.replace(old_overview, new_overview)
with open("static/js/bottom-bar.js", "w") as f:
f.write(content)