Fix some stuff
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
|
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.4" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.1">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.4">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"createNewPurchase" : "Create new purchase",
|
"createNewPurchase" : "Create new purchase",
|
||||||
"createNewProduct" : "Create new product",
|
"createNewProduct" : "Create new product",
|
||||||
|
"startDate": "Start Date",
|
||||||
|
"endDate": "End Date",
|
||||||
|
"labelCost": "CO2 consumption from {start} to {end}",
|
||||||
"date": "Date",
|
"date": "Date",
|
||||||
"CO2Cost": "CO2 cost",
|
"CO2Cost": "CO2 cost",
|
||||||
"WaterCost": "Water cost"
|
"WaterCost": "Water cost"
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"createNewPurchase" : "Créer une nouvelle liste d'achat",
|
"createNewPurchase" : "Créer une nouvelle liste d'achat",
|
||||||
"createNewProduct" : "Créer un nouveau produit",
|
"createNewProduct" : "Créer un nouveau produit",
|
||||||
|
"startDate": "Date de début",
|
||||||
|
"endDate": "Date de fin",
|
||||||
|
"labelCost": "Utilisation de CO2 sur la période du {start} au {end}",
|
||||||
"date": "Date",
|
"date": "Date",
|
||||||
"CO2Cost": "Coût en CO2",
|
"CO2Cost": "Coût en CO2",
|
||||||
"WaterCost": "Coût en eau"
|
"WaterCost": "Coût en eau"
|
||||||
|
|||||||
@@ -51,17 +51,20 @@ export const HomePurchase = () => {
|
|||||||
else
|
else
|
||||||
return (
|
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)}%`} />
|
<ProgressBar now={CO2EmissionsPurcentage} label={`${CO2EmissionsPurcentage.toFixed(2)}%`} />
|
||||||
</div>
|
</div>
|
||||||
<div style={{display: "flex"}} className="form-group">
|
<div style={{display: "flex"}} className="form-group">
|
||||||
<DatePicker dateFormat="dd/MM/yyyy" selected={startDate} className="form-control" onChange={(date) => {setStartDate(date);}} />
|
<label>{t("startDate")}</label><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("endDate")}</label><DatePicker dateFormat="dd/MM/yyyy" selected={endDate} className="form-control" onChange={(date) => {setEndDate(date);}} />
|
||||||
</div>
|
</div>
|
||||||
<div className='flex'>
|
<div className='flex'>
|
||||||
<div className='form-group width-20'>{t("date")}</div>
|
<div className='form-group width-30'>{t("date")}</div>
|
||||||
<div className='form-group width-20'>{t("CO2Cost")}</div>
|
<div className='form-group width-30'>{t("CO2Cost")}</div>
|
||||||
<div className='form-group width-20'>{t("WaterCost")}</div>
|
<div className='form-group width-30'>{t("WaterCost")}</div>
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
purchasesUser.map((purchaseUser, index) => {
|
purchasesUser.map((purchaseUser, index) => {
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ export const LinePurchase = ({ purchaseUser, onChange }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='flex'>
|
<div className='flex'>
|
||||||
<div className='form-group width-20 inline-flex'>
|
<div className='form-group width-30 inline-flex'>
|
||||||
<Link to={`/purchase/${purchaseUser.id}`}>{new Date(Date.parse(purchaseUser.datePurchase)).toLocaleString("fr-FR", {month: '2-digit',day: '2-digit',year: 'numeric'})}</Link>
|
<Link to={`/purchase/${purchaseUser.id}`}>{new Date(Date.parse(purchaseUser.datePurchase)).toLocaleString("fr-FR", {month: '2-digit',day: '2-digit',year: 'numeric'})}</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className='form-group width-20 inline-flex'>{parseFloat(purchaseUser.cO2Cost).toFixed(2)}</div>
|
<div className='form-group width-30 inline-flex'>{parseFloat(purchaseUser.cO2Cost).toFixed(2)}</div>
|
||||||
<div className='form-group width-20 inline-flex'>{parseFloat(purchaseUser.waterCost).toFixed(2)}</div>
|
<div className='form-group width-30 inline-flex'>{parseFloat(purchaseUser.waterCost).toFixed(2)}</div>
|
||||||
<div>
|
<div className='form-group width-10 inline-flex'>
|
||||||
<a onClick={() => onChange(purchaseUser.id)} href="#/" className='btn btn-reverse btn-block'>
|
<a onClick={() => onChange(purchaseUser.id)} href="#/" className='btn btn-reverse btn-block'>
|
||||||
<FaTrash />
|
<FaTrash />
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -149,6 +149,14 @@ h3 {
|
|||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.width-30 {
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width-25 {
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
.width-20 {
|
.width-20 {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
@@ -161,6 +169,10 @@ h3 {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mbottom-20 {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.mbottom-10 {
|
.mbottom-10 {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
2110
frontend/yarn.lock
2110
frontend/yarn.lock
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user