fix: Correct indentation for delete button in trading plan page
This commit is contained in:
parent
9369eadd47
commit
613f50ec5b
@ -1078,15 +1078,17 @@ def trading_plan_page():
|
|||||||
update_trading_plan(plan)
|
update_trading_plan(plan)
|
||||||
st.success("Plan updated successfully!")
|
st.success("Plan updated successfully!")
|
||||||
st.experimental_set_query_params(rerun=True)
|
st.experimental_set_query_params(rerun=True)
|
||||||
|
except Exception as e:
|
||||||
|
st.error(f"Error updating plan: {str(e)}")
|
||||||
|
|
||||||
# Add delete button
|
# Delete button (at the same level as the update button)
|
||||||
if st.button("Delete Plan", key="delete_plan_button"):
|
if st.button("Delete Plan", key="delete_plan_button"):
|
||||||
try:
|
try:
|
||||||
delete_trading_plan(plan.id)
|
delete_trading_plan(plan.id)
|
||||||
st.success("Plan deleted successfully!")
|
st.success("Plan deleted successfully!")
|
||||||
st.experimental_set_query_params(rerun=True)
|
st.experimental_set_query_params(rerun=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
st.error(f"Error deleting plan: {str(e)}")
|
st.error(f"Error deleting plan: {str(e)}")
|
||||||
else:
|
else:
|
||||||
st.info("No plans available to edit")
|
st.info("No plans available to edit")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user