Actualiser domo91.py
This commit is contained in:
@@ -375,7 +375,7 @@ if st.session_state["authenticated"]:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
st.error(f"Erreur MySQL : {e}")
|
st.error(f"Erreur MySQL : {e}")
|
||||||
if st.session_state["role"] == "superviseur":
|
if st.session_state["role"] == "superviseur":
|
||||||
with st.expander("➕ Ajouter une nouvelle chambre froide", expanded=False):
|
with st.expander("+ Ajouter une nouvelle chambre froide", expanded=False):
|
||||||
with st.form("ajout_sonde"):
|
with st.form("ajout_sonde"):
|
||||||
nouvelle_sonde = st.text_input("Nom de la sonde")
|
nouvelle_sonde = st.text_input("Nom de la sonde")
|
||||||
temp_max = st.number_input("Température maximale autorisée (°C)", value=4)
|
temp_max = st.number_input("Température maximale autorisée (°C)", value=4)
|
||||||
@@ -432,13 +432,13 @@ if st.session_state["role"] == "superviseur":
|
|||||||
temp_max = chambre["Temp_Max"]
|
temp_max = chambre["Temp_Max"]
|
||||||
moins, val, plus = st.columns([1, 2, 1])
|
moins, val, plus = st.columns([1, 2, 1])
|
||||||
with moins:
|
with moins:
|
||||||
if st.button("➖", key=f"moins_{chambre['Id']}"):
|
if st.button("-", key=f"moins_{chambre['Id']}"):
|
||||||
temp_max -= 1
|
temp_max -= 1
|
||||||
with val:
|
with val:
|
||||||
st.markdown(f"<div style='text-align:center;font-size:20px'>{temp_max}°C</div>",
|
st.markdown(f"<div style='text-align:center;font-size:20px'>{temp_max}°C</div>",
|
||||||
unsafe_allow_html=True)
|
unsafe_allow_html=True)
|
||||||
with plus:
|
with plus:
|
||||||
if st.button("➕", key=f"plus_{chambre['Id']}"):
|
if st.button("+", key=f"plus_{chambre['Id']}"):
|
||||||
temp_max += 1
|
temp_max += 1
|
||||||
|
|
||||||
if new_etat != chambre["Etat"] or temp_max != chambre["Temp_Max"]:
|
if new_etat != chambre["Etat"] or temp_max != chambre["Temp_Max"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user