feat: implementada funcionalidade de exclusao de leads via API e botoes na interface (Kanban, Tabela Analitica e Modal)
This commit is contained in:
@@ -63,7 +63,7 @@ def render_kanban_board(leads: list, api_client: APIClient):
|
||||
if maps_url:
|
||||
st.markdown(f"[📍 Abrir no Google Maps]({maps_url})")
|
||||
|
||||
c1, c2 = st.columns([2, 1])
|
||||
c1, c2, c3 = st.columns([2, 1, 1])
|
||||
with c1:
|
||||
opts = [s[1] for s in STATUS_CONFIG]
|
||||
cur_idx = [s[0] for s in STATUS_CONFIG].index(status_key)
|
||||
@@ -80,6 +80,15 @@ def render_kanban_board(leads: list, api_client: APIClient):
|
||||
st.rerun()
|
||||
|
||||
with c2:
|
||||
if st.button("📝", key=f"btn_notes_{lead_id}", help="Editar notas e ver histórico"):
|
||||
if st.button("📝", key=f"btn_notes_{lead_id}", help="Editar notas e ver histórico", use_container_width=True):
|
||||
st.session_state['selected_lead_id'] = lead_id
|
||||
st.rerun()
|
||||
|
||||
with c3:
|
||||
if st.button("🗑️", key=f"btn_del_{lead_id}", help="Deletar lead permanentemente do banco", use_container_width=True):
|
||||
ok, msg = api_client.delete_lead(lead_id)
|
||||
if ok:
|
||||
st.toast(f"Lead '{nome}' excluído do banco!")
|
||||
else:
|
||||
st.error(msg)
|
||||
st.rerun()
|
||||
|
||||
Reference in New Issue
Block a user