Style, ordre des années #65
This commit is contained in:
@@ -176,8 +176,8 @@ p.version > a {
|
||||
/* --- Dashboard inputs --- */
|
||||
|
||||
.Select--multi .Select-value {
|
||||
color: var(--primary-color);
|
||||
background-color: rgba(255, 240, 240, 0.4);
|
||||
color: var(--primary-color) !important;
|
||||
background-color: rgba(255, 240, 240, 0.4) !important;
|
||||
}
|
||||
|
||||
#filters .row > * {
|
||||
|
||||
+53
-22
@@ -53,10 +53,13 @@ register_page(
|
||||
image_url=meta_content["image_url"],
|
||||
order=3,
|
||||
)
|
||||
options_years = {}
|
||||
options_years = []
|
||||
for year in reversed(range(2017, datetime.now().year + 1)):
|
||||
year = str(year)
|
||||
options_years[year] = year
|
||||
option_year = {
|
||||
"label": str(year),
|
||||
"value": year,
|
||||
}
|
||||
options_years.append(option_year)
|
||||
|
||||
options_departements = []
|
||||
for code in departements.keys():
|
||||
@@ -402,24 +405,38 @@ Alors, on fait comment ?
|
||||
),
|
||||
),
|
||||
),
|
||||
dbc.Row(
|
||||
[dbc.Col([
|
||||
dcc.Download(id="download-observatoire"),
|
||||
dbc.Button(
|
||||
"Prévisualiser les données",
|
||||
id="btn-observatoire-preview",
|
||||
className="btn btn-primary",
|
||||
color="primary",
|
||||
outline=True,
|
||||
dbc.Row(
|
||||
[
|
||||
dbc.Col(
|
||||
[
|
||||
dcc.Download(
|
||||
id="download-observatoire"
|
||||
),
|
||||
dbc.Button(
|
||||
"Prévisualiser les données",
|
||||
id="btn-observatoire-preview",
|
||||
className="btn btn-primary",
|
||||
color="primary",
|
||||
outline=True,
|
||||
),
|
||||
dcc.Input(
|
||||
id="observatoire-share-url",
|
||||
readOnly=True,
|
||||
style={"display": "none"},
|
||||
),
|
||||
],
|
||||
lg=12,
|
||||
xl=7,
|
||||
)
|
||||
]
|
||||
),
|
||||
dbc.Row(
|
||||
dbc.Col(
|
||||
html.Div(id="observatoire-copy-container"),
|
||||
lg=12,
|
||||
xl=5,
|
||||
)
|
||||
),
|
||||
dcc.Input(
|
||||
id="observatoire-share-url",
|
||||
readOnly=True,
|
||||
style={"display": "none"},
|
||||
)], lg=12, xl=7)]),
|
||||
dbc.Row(
|
||||
dbc.Col(
|
||||
html.Div(id="observatoire-copy-container"), lg=12, xl=5))
|
||||
],
|
||||
),
|
||||
dbc.Col(
|
||||
@@ -585,8 +602,7 @@ def restore_filters(search, _pathname, stored_filters):
|
||||
Output("observatoire-share-url", "value"),
|
||||
Output("observatoire-copy-container", "children"),
|
||||
*[Input(fp[0], "value") for fp in FILTER_PARAMS],
|
||||
State("dashboard_url", "href"),
|
||||
prevent_initial_call=True,
|
||||
Input("dashboard_url", "href"),
|
||||
)
|
||||
def sync_observatoire_share_url(*args):
|
||||
# Last arg is href (State), rest are filter values
|
||||
@@ -625,6 +641,7 @@ def sync_observatoire_share_url(*args):
|
||||
children=[
|
||||
dbc.Button(
|
||||
"Partager cette vue",
|
||||
id="btn-copy-observatoire",
|
||||
className="btn btn-primary mt-2",
|
||||
title="Copier l'adresse de cette vue filtrée pour la partager.",
|
||||
)
|
||||
@@ -634,6 +651,20 @@ def sync_observatoire_share_url(*args):
|
||||
return full_url, copy_button
|
||||
|
||||
|
||||
@callback(
|
||||
Output("observatoire-copy-container", "children", allow_duplicate=True),
|
||||
Input("btn-copy-observatoire", "n_clicks", allow_optional=True),
|
||||
prevent_initial_call=True,
|
||||
)
|
||||
def show_confirmation(n_clicks):
|
||||
if n_clicks:
|
||||
return html.Span(
|
||||
"Adresse de la vue copiée",
|
||||
style={"color": "green", "fontWeight": "bold", "marginLeft": "10px"},
|
||||
)
|
||||
return no_update
|
||||
|
||||
|
||||
@callback(
|
||||
Output("cards", "children"),
|
||||
Input("dashboard_year", "value"),
|
||||
|
||||
@@ -28,9 +28,9 @@ from src.utils import (
|
||||
invert_columns,
|
||||
logger,
|
||||
meta_content,
|
||||
prepare_table_data,
|
||||
schema,
|
||||
sort_table_data,
|
||||
prepare_table_data,
|
||||
)
|
||||
|
||||
update_date_timestamp = os.path.getmtime(os.getenv("DATA_FILE_PARQUET_PATH"))
|
||||
@@ -439,7 +439,7 @@ def sync_url_and_reset_button(filter_query, sort_by, hidden_columns, href):
|
||||
className="fa fa-link",
|
||||
children=[
|
||||
dbc.Button(
|
||||
"Partager",
|
||||
"Partager la vue",
|
||||
className="btn btn-primary",
|
||||
title="Copier l'adresse de cette vue (filtres, tris, choix de colonnes) pour la partager.",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user