diff --git a/src/pages/about.py b/src/pages/about.py index aa5de3a..08cd1a7 100644 --- a/src/pages/about.py +++ b/src/pages/about.py @@ -3,7 +3,7 @@ from dash import dcc, html, register_page title = "À propos" register_page( - __name__, path="/a-propos", title=f"decp.info - {title}", name=title, order=3 + __name__, path="/a-propos", title=f"decp.info - {title}", name=title, order=5 ) layout = [ @@ -22,6 +22,7 @@ Contact : - [colin+decp@maudry.com](mailto:colin+decp@maudry.com) - BlueSky : [@col1m.bsky.social](https://bsky.app/profile/col1m.bsky.social) - Mastodon : [col1m@mamot.fr](https://mamot.fr/@col1m) +- LinkedIn : [colinmaudry](https://www.linkedin.com/in/colinmaudry/) """ ), ], diff --git a/src/pages/home.py b/src/pages/home.py index 8aeae18..d507d70 100644 --- a/src/pages/home.py +++ b/src/pages/home.py @@ -1,3 +1,4 @@ +import os from datetime import datetime import polars as pl @@ -17,6 +18,8 @@ from src.utils import ( load_dotenv() schema = df.schema +update_date = os.path.getmtime(os.getenv("DATA_FILE_PARQUET_PATH")) +update_date = datetime.fromtimestamp(update_date).strftime("%d/%m/%Y") df_filtered = pl.DataFrame() lf: pl.LazyFrame = df.lazy() @@ -122,6 +125,7 @@ layout = [ html.P("lignes", id="nb_rows"), html.Button("Télécharger au format Excel", id="btn-download-data"), dcc.Download(id="download-data"), + html.P("Données mises à jour le " + str(update_date)), ], className="table-menu", ), @@ -183,7 +187,7 @@ def update_table(page_current, page_size, filter_query, data_timestamp): lff = numbers_to_strings(lff) # Tri des marchés par date de notification - lff = lff.sort(by=["datePublicationDonnees"], descending=True) + lff = lff.sort(by=["datePublicationDonnees"], descending=True, nulls_last=True) dff: pl.DataFrame = lff.collect()