- Implemented subscription creation, updating, and rendering in script_9.js. - Added functions for handling subscription line items, product selection, and total calculations. - Integrated AnyDesk API for session management in test_anydesk.py. - Created REST client test requests for API endpoints in api.http. - Developed a script to check ESET machine status and save details in tmp_check_eset_machine.py.
19 lines
880 B
Python
19 lines
880 B
Python
import re
|
|
|
|
with open('app/modules/sag/templates/detail.html', 'r', encoding='utf-8') as f:
|
|
text = f.read()
|
|
|
|
# Fix the duplicate function
|
|
text = re.sub(r'( function getTimeV1EmployeeId\(\) \{\n const val = document.getElementById\(\'timeV1EmployeeId\'\)\?\.value;\n return val \? Number\(val\) : null;\n \}\n\n)+', r'\1', text)
|
|
|
|
# Fix the undefined updateTimeTotal issue inside DOMContentLoaded
|
|
# The lines to remove are:
|
|
# if(hInput) hInput.addEventListener('input', updateTimeTotal);
|
|
# if(mInput) mInput.addEventListener('input', updateTimeTotal);
|
|
text = re.sub(r"if\(hInput\)\s*hInput\.addEventListener\('input',\s*updateTimeTotal\);\s*\n\s*if\(mInput\)\s*mInput\.addEventListener\('input',\s*updateTimeTotal\);", "", text)
|
|
|
|
with open('app/modules/sag/templates/detail.html', 'w', encoding='utf-8') as f:
|
|
f.write(text)
|
|
|
|
print("done")
|