feat(titulaire): afficher le libellé d'activité NAF en sous-titre gris
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -87,6 +87,7 @@ layout = [
|
||||
className="mb-2",
|
||||
children=[
|
||||
dbc.Col(
|
||||
[
|
||||
html.H2(
|
||||
children=[
|
||||
html.Span(id="titulaire_siret"),
|
||||
@@ -94,6 +95,11 @@ layout = [
|
||||
html.Span(id="titulaire_nom"),
|
||||
],
|
||||
),
|
||||
html.P(
|
||||
id="titulaire_activite_libelle",
|
||||
style={"color": "gray", "marginTop": "-10px"},
|
||||
),
|
||||
],
|
||||
width=8,
|
||||
),
|
||||
dbc.Col(
|
||||
@@ -255,10 +261,20 @@ layout = [
|
||||
Output(component_id="titulaire_departement", component_property="children"),
|
||||
Output(component_id="titulaire_region", component_property="children"),
|
||||
Output(component_id="titulaire_lien_annuaire", component_property="href"),
|
||||
Output(component_id="titulaire_activite_libelle", component_property="children"),
|
||||
Input(component_id="titulaire_url", component_property="pathname"),
|
||||
)
|
||||
def update_titulaire_infos(url):
|
||||
titulaire_siret = url.split("/")[-1]
|
||||
if "titulaire_activite_libelle" in DF_TITULAIRES.columns:
|
||||
activite_libelle_row = DF_TITULAIRES.filter(
|
||||
pl.col("titulaire_id") == titulaire_siret
|
||||
).select("titulaire_activite_libelle")
|
||||
activite_libelle = (
|
||||
activite_libelle_row.item(0, 0) if activite_libelle_row.height > 0 else ""
|
||||
)
|
||||
else:
|
||||
activite_libelle = ""
|
||||
data = get_annuaire_data(titulaire_siret)
|
||||
data_etablissement = data.get("matching_etablissements") if data else None
|
||||
if data_etablissement:
|
||||
@@ -302,6 +318,7 @@ def update_titulaire_infos(url):
|
||||
departement,
|
||||
nom_region,
|
||||
lien_annuaire,
|
||||
activite_libelle,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user