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