handlich vaccines in UI

This commit is contained in:
frankknoll
2023-10-13 20:57:18 +02:00
parent f28ee6e400
commit 7b78a6f449
7 changed files with 259 additions and 17 deletions

View File

@@ -1,16 +1,21 @@
from bs4 import BeautifulSoup
from HtmlTransformerUtil import HtmlTransformerUtil
from DateProvider import DateProvider
from SymptomsCausedByVaccines.HtmlUtils import getSymptomOptions
from SymptomsCausedByVaccines.HtmlUtils import getSymptomOptions, getVaccineOptions
from SymptomsCausedByVaccines.OptionsSetter import OptionsSetter
def updateHtmlFile(symptoms, htmlFile):
def updateHtmlFile(symptoms, vaccines, htmlFile):
_saveOptions(
options = getSymptomOptions(symptoms),
htmlFile = htmlFile,
selectElementId = 'symptomSelect')
_saveOptions(
options = getVaccineOptions(vaccines),
htmlFile = htmlFile,
selectElementId = 'vaccineSelect')
def _saveOptions(options, htmlFile, selectElementId):
HtmlTransformerUtil().applySoupTransformerToFile(
file=htmlFile,