Fix some stuff

This commit is contained in:
Maxime Boulay
2025-08-17 21:53:26 +01:00
parent b1f115d889
commit fd652ae936
8 changed files with 1090 additions and 1067 deletions

View File

@@ -51,17 +51,20 @@ export const HomePurchase = () => {
else
return (
<>
<div className='mbottom-10'>
<div className='center'>
{t("labelCost").replace("{start}", new Intl.DateTimeFormat("fr-FR").format(startDate)).replace("{end}", new Intl.DateTimeFormat("fr-FR").format(endDate))}
</div>
<div className='mbottom-20'>
<ProgressBar now={CO2EmissionsPurcentage} label={`${CO2EmissionsPurcentage.toFixed(2)}%`} />
</div>
<div style={{display: "flex"}} className="form-group">
<DatePicker dateFormat="dd/MM/yyyy" selected={startDate} className="form-control" onChange={(date) => {setStartDate(date);}} />
<DatePicker dateFormat="dd/MM/yyyy" selected={endDate} className="form-control" onChange={(date) => {setEndDate(date);}} />
<label>{t("startDate")}</label><DatePicker dateFormat="dd/MM/yyyy" selected={startDate} className="form-control" onChange={(date) => {setStartDate(date);}} />
<label>{t("endDate")}</label><DatePicker dateFormat="dd/MM/yyyy" selected={endDate} className="form-control" onChange={(date) => {setEndDate(date);}} />
</div>
<div className='flex'>
<div className='form-group width-20'>{t("date")}</div>
<div className='form-group width-20'>{t("CO2Cost")}</div>
<div className='form-group width-20'>{t("WaterCost")}</div>
<div className='form-group width-30'>{t("date")}</div>
<div className='form-group width-30'>{t("CO2Cost")}</div>
<div className='form-group width-30'>{t("WaterCost")}</div>
</div>
{
purchasesUser.map((purchaseUser, index) => {