merge Test_API and WORK_API into merged_APE

issue_auth
Antoine PEREDERII 1 year ago
commit 013b41e3ef

@ -1,6 +1,6 @@
<div align = center> <div align = center>
<h1>HeartTrack</h1> <h1>HeartTrack - Admin</h1>
</div> </div>
@ -9,17 +9,15 @@
--- ---
&nbsp; ![PHP](https://img.shields.io/badge/Blazor-56478C?style=for-the-badge&logo=Blazor&logoColor=FFFFFF&labelColor=56478C) &nbsp; ![Blazor](https://img.shields.io/badge/Blazor-56478C?style=for-the-badge&logo=Blazor&logoColor=FFFFFF&labelColor=56478C)
&nbsp; ![CSS](https://img.shields.io/badge/CSS-000?style=for-the-badge&logo=css3&logoColor=white&color=darkblue) &nbsp; ![CSS](https://img.shields.io/badge/CSS-000?style=for-the-badge&logo=css3&logoColor=white&color=darkblue)
&nbsp; ![DOCKER](https://img.shields.io/badge/.NET-56478C?style=for-the-badge&logo=.NET&logoColor=FFFFFF&labelColor=56478C) &nbsp; ![.NET](https://img.shields.io/badge/.NET-56478C?style=for-the-badge&logo=.NET&logoColor=FFFFFF&labelColor=56478C)
&nbsp; ![PostgreSQL](https://img.shields.io/badge/Postgresql-000?style=for-the-badge&logo=postgresql&logoColor=white&color=blue)
&nbsp; ![JAVASCRIPT](https://img.shields.io/badge/JavaScript-000?style=for-the-badge&logo=javascript&logoColor=white&color=yellow)
</br> </br>
</div> </div>
# Table des matières # Table des matières
[Présentation](#présentation) | [Répartition du Git](#répartition-du-git) | [Documentation](#documentation) | [Prerequisites](#prerequisites) | [Getting Started](#getting-started) | [Features](#features) | [Ce que nous avons fait](#ce-que-nous-avons-fait) | [Fabriqué avec](#fabriqué-avec) | [Contributeurs](#contributeurs) | [Comment contribuer](#comment-contribuer) | [License](#license) | [Remerciements](#remerciements) [Présentation](#présentation) | [Fonctionnalités principales](#fonctionnalités-principales) | [Répartition du Git](#répartition-du-git) | [Prerequis](#prérequis) | [Fabriqué avec](#fabriqué-avec) | [Contributeurs](#contributeurs) | [Comment contribuer](#comment-contribuer) | [License](#license) | [Remerciements](#remerciements)
@ -33,7 +31,17 @@ HeartTrack est une application web PHP et mobile Android destinée aux sportifs
### Récapitulatif du Projet ### Récapitulatif du Projet
Le projet HeartTrack, avec son application HeartTrack, vise à offrir une solution Open Source d'analyse des données de fréquence cardiaque, en mettant l'accent sur les besoins des sportifs et des coachs. L'application sera capable de traiter et d'interpréter les données de manière intelligente, fournissant ainsi des informations précieuses pour optimiser les performances sportives et la santé. Ce dépôt contient une application Blazor conçue pour faciliter l'administration des utilisateurs au sein de votre application. L'application utilise le framework Blazor, qui permet le développement d'applications web interactives avec .NET.
## Fonctionnalités principales
1. **Gestion des Utilisateurs**: Ajoutez, modifiez et supprimez des utilisateurs de manière simple et efficace.
2. **Rôles Utilisateurs**: Attribuez des rôles à chaque utilisateur pour définir leurs permissions et accès.
3. **Tableau de Bord Convivial**: Interface utilisateur intuitive pour une expérience d'administration agréable.
4. **Sécurité Intégrée**: Utilisation des fonctionnalités de sécurité de Blazor pour protéger les données sensibles.
## Répartition du Git ## Répartition du Git
@ -42,28 +50,55 @@ Le projet HeartTrack, avec son application HeartTrack, vise à offrir une soluti
[**Documents**](Documents/README_DOCUMENTS.md) : **Documentation de l'application et diagrammes** [**Documents**](Documents/README_DOCUMENTS.md) : **Documentation de l'application et diagrammes**
<!-- [**Wiki**](https://codefirst.iut.uca.fr/git/HeartDev/Web/wiki/PHP) : **Wiki de notre projet (attendus PHP)** -->
--- ---
Le projet HeartTrack utilise un modèle de flux de travail Git (Gitflow) pour organiser le développement. Voici une brève explication des principales branches : Le projet HeartTrack utilise un modèle de flux de travail Git (Gitflow) pour organiser le développement. Voici une brève explication des principales branches :
- **branche prod** : Cette branche contient la version de production stable de l'application. Les modifications sur cette branche sont généralement destinées à des mises en production. - **branche WORK-NAME** : Cette branche contient la version de travail des différents membres de l'équipe. Les modifications sur cette branche sont bien souvent réalisé par le nom du membre en question.
- **branche master** : La branche master est similaire à la branche de production, mais elle peut contenir des fonctionnalités en cours de développement qui sont presque prêtes pour une mise en production. - **branche master** : La branche master est similaire à la branche de production, mais elle contient la version stable et final de notre application.
- **branche test** : Cette branche est utilisée pour permettre différents tests sur l'application. ### API PHP
- **branche issue** : Pour chaque problème (issue) que vous résolvez, vous devez créer une branche portant le nom de l'issue, par exemple, "issue_#32_nom" où 32 est le numéro de l'issue et nom est une description courte de l'issue. Une fois l'issue résolue, assurez-vous de mettre à jour le changelog et de créer une merge request. L'application Blazor utilise une API en PHP pour récupérer les données depuis la base de données.
- **branche démo** : Cette branche est utilisée pour déployer une version démo de l'application. Elle est mise à jour avec les dernières fonctionnalités en développement. Pour l'utiliser, vous devez faire tourner notre projet PHP disponible [ici](https://codefirst.iut.uca.fr/git/HeartDev/Web/src/branch/API_tests) sur votre machine locale. Pour ensuite changer le type de skockage par `API` dans le fichier `monfichier.cs` dans le dossier `Data` de l'application Blazor.
## Documentation
Documentation et informations à propos de `HearthTrack` disponible [ici]()
### Prérequis ### Prérequis
* [Visual Studio Code](https://code.visualstudio.com/) - Exemple d'IDE gratuit * [Visual Studio](https://visualstudio.microsoft.com/fr/vs/) - IDE
* [Git](https://git-scm.com/) - Gestion de version * [Git](https://git-scm.com/) - Gestion de version
* [PostgreSQL](https://www.postgresql.org/) - Base de Données * [.NET SDK](https://dotnet.microsoft.com/download) - Platform open-source pour le développement d'applications
## Installation et Exécution
1. Clonez ce dépôt sur votre machine locale :
```bash
git clone https://github.com/votre-utilisateur/Blazor-User-Admin.git
```
2. Accédez au répertoire du projet :
```bash
cd Blazor-User-Admin
```
3. Lancez l'application avec la commande :
```bash
dotnet run
```
4. Ouvrez votre navigateur et accédez à [https://localhost:5001](https://localhost:5001) pour voir l'application en action.
Pour des raison de manque de la partie php, vous ne pourrez utiliser l'application qu'en localStorage. Il est cependant possible de tester l'aaplication avec la partie API en PHP en faisant tourner en local le projet php disponible [ici](https://codefirst.iut.uca.fr/git/HeartDev/Web/src/branch/API_tests) et en changant le type de stockage dans le fichier `monfichier.cs` dans le dossier `Data` de l'application Blazor.
Comme ceci :
```csharp
public class MonFichier
{
public static string TypeStockage = "API";
}
```
### Fabriqué avec ### Fabriqué avec
* [Visual Studio](https://visualstudio.microsoft.com/fr/vs/) - IDE * [Visual Studio](https://visualstudio.microsoft.com/fr/vs/) - IDE
@ -73,7 +108,6 @@ Documentation et informations à propos de `HearthTrack` disponible [ici]()
* [Blazor](https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor) - Framework Web * [Blazor](https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor) - Framework Web
* [C#](https://docs.microsoft.com/fr-fr/dotnet/csharp/) - Langage * [C#](https://docs.microsoft.com/fr-fr/dotnet/csharp/) - Langage
* [HTML 5, CSS 3](https://developer.mozilla.org/fr/docs/Web/HTML) - Langages * [HTML 5, CSS 3](https://developer.mozilla.org/fr/docs/Web/HTML) - Langages
* [Doxygen](https://codefirst.iut.uca.fr/sonar/) - Documentation
## Contributeurs ## Contributeurs
* [Antoine PEREDERII](https://codefirst.iut.uca.fr/git/antoine.perederii) * [Antoine PEREDERII](https://codefirst.iut.uca.fr/git/antoine.perederii)
@ -83,7 +117,7 @@ Documentation et informations à propos de `HearthTrack` disponible [ici]()
* [David D'HALMEIDA](https://codefirst.iut.uca.fr/git/david.d_almeida) * [David D'HALMEIDA](https://codefirst.iut.uca.fr/git/david.d_almeida)
## Comment contribuer ## Comment contribuer
1. Forkez le projet (<https://codefirst.iut.uca.fr/git/HeartDev/Web>) 1. Forkez le projet (<https://codefirst.iut.uca.fr/git/HeartDev/Admin>)
2. Créez votre branche (`git checkout -b feature/featureName`) 2. Créez votre branche (`git checkout -b feature/featureName`)
3. commit vos changements (`git commit -am 'Add some feature'`) 3. commit vos changements (`git commit -am 'Add some feature'`)
4. Push sur la branche (`git push origin feature/featureName`) 4. Push sur la branche (`git push origin feature/featureName`)

@ -1,13 +0,0 @@
namespace HeartTrack.Data;
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string? Summary { get; set; }
}

@ -1,20 +0,0 @@
namespace HeartTrack.Data;
public class WeatherForecastService
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
public Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
{
return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = startDate.AddDays(index),
TemperatureC = Random.Shared.Next(-20, 55),
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
}).ToArray());
}
}

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
@ -8,6 +8,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.4.0" /> <PackageReference Include="Blazored.LocalStorage" Version="4.4.0" />
<PackageReference Include="Blazorise" Version="1.4.1" />
<PackageReference Include="Blazorise.Bootstrap" Version="1.4.0" /> <PackageReference Include="Blazorise.Bootstrap" Version="1.4.0" />
<PackageReference Include="Blazorise.DataGrid" Version="1.4.0" /> <PackageReference Include="Blazorise.DataGrid" Version="1.4.0" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.4.0" /> <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.4.0" />
@ -17,7 +18,25 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Services\ActivityDataService\" />
<Folder Include="Models\Activity\" />
<Folder Include="Services\DataLocalService\" />
<Folder Include="Services\ReportDataService\" />
<Folder Include="Services\UserDataService\" />
<Folder Include="wwwroot\data\" />
<Folder Include="Services\TicketDataService\" />
<Folder Include="Components\" /> <Folder Include="Components\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Remove="Services\ActivityDataService\" />
<None Remove="Models\Activity\" />
<None Remove="Services\DataLocalService\" />
<None Remove="Services\ReportDataService\" />
<None Remove="Services\UserDataService\" />
<None Remove="Services\TicketDataService\" />
</ItemGroup>
<ItemGroup>
<Content Remove="wwwroot\data\" />
</ItemGroup>
</Project> </Project>

@ -1,4 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188 VisualStudioVersion = 17.8.34330.188

@ -0,0 +1,20 @@
namespace HeartTrack.Models
{
public class Activity
{
public int IdActivity { get; set; }
public string Type { get; set; }
public DateOnly Date { get; set; }
public TimeOnly StartTime { get; set; }
public DateTime EndTime { get; set; }
public int EffortRessenti { get; set; }
public float Variability { get; set; }
public float Variance { get; set; }
public float StandardDeviation { get; set; }
public float Average { get; set; }
public int Maximum { get; set; }
public int Minimum { get; set; }
public float AvrTemperature { get; set; }
public bool HasAutoPause { get; set; }
}
}

@ -1,10 +1,33 @@
@page "/activities" @page "/activities"
@using HeartTrack.Models
<PageTitle>Activities</PageTitle> <PageTitle>Activities</PageTitle>
<h1>Activity list</h1> <h1>@Localizer["Title"]</h1>
This is the activity list of users. <p>
@Localizer["Description"]
<SurveyPrompt Title="How is Blazor working for you?" /> </p>
<DataGrid TItem="Activity"
Data="@activities"
ReadData="@OnReadData"
TotalItems="@totalActivity"
PageSize="10"
ShowPager
Responsive>
<DataGridColumn TItem="Activity" Field="@nameof(Activity.IdActivity)" Caption="Id" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.Type)" Caption="Type" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.Date)" Caption="Date" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.StartTime)" Caption="@Localizer["StartTime"]" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.EndTime)" Caption="@Localizer["EndTime"]" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.EffortRessenti)" Caption="@Localizer["EffortRessenti"]" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.Variability)" Caption="@Localizer["Variability"]" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.Variance)" Caption="@Localizer["Variance"]" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.StandardDeviation)" Caption="@Localizer["StandardDeviation"]" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.Average)" Caption="@Localizer["Average"]" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.Maximum)" Caption="Maximum" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.Minimum)" Caption="Minimum" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.AvrTemperature)" Caption="@Localizer["AvrTemperature"]" />
<DataGridColumn TItem="Activity" Field="@nameof(Activity.HasAutoPause)" Caption="@Localizer["HasAutoPause"]" />
</DataGrid>

@ -0,0 +1,56 @@
using System;
using System.Net.Http;
using Blazorise.DataGrid;
using HeartTrack.Models;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization;
using HeartTrack.Services.ActivityDataService;
namespace HeartTrack.Pages
{
public partial class Activities
{
private List<Activity> activities;
private int totalActivity;
[Inject]
private IActivityDataService ActivitiesDataService { get; set; }
[Inject]
public IStringLocalizer<BannedUsers> Localizer { get; set; }
private async Task OnReadData()
{
//if (e.CancellationToken.IsCancellationRequested)
//{
// return;
//}
//// When you use a real API, we use this follow code
////var response = await Http.GetJsonAsync<Item[]>( $"http://my-api/api/data?page={e.Page}&pageSize={e.PageSize}" );
////var response = await Http.GetStringAsync("http://localhost:8080/api");
////var activityList = JsonConvert.DeserializeObject<List<Activity>>(response);
//var response = (await Http.GetFromJsonAsync<Activity[]>("http://localhost:8080/api")).Skip((e.Page - 1) * e.PageSize).Take(e.PageSize).ToList();
////await Http.GetFromJsonAsync<Activity[]>("http://localhost:8080/api");
////Console.WriteLine(response);
////var response = (await Http.GetFromJsonAsync<Activity[]>($"{NavigationManager.BaseUri}fake-activities.json")).Skip((e.Page - 1) * e.PageSize).Take(e.PageSize).ToList();
//if (!e.CancellationToken.IsCancellationRequested)
//{
// totalActivity = (await Http.GetFromJsonAsync<List<Activity>>("http://localhost:8080/api")).Count;
// //(await Http.GetFromJsonAsync<List<Activity>>($"{NavigationManager.BaseUri}fake-data-activity.json")).Count;
// activities = new List<Activity>(response); // an actual data for the current page
// //Console.WriteLine(totalActivity);
//}
//Console.WriteLine("Passage dans le OnInitializedAsync...");
this.activities = await this.ActivitiesDataService.getAllActivities();
this.totalActivity = activities.Count();
}
}
}

@ -1,4 +1,5 @@
@page "/reports" @page "/reports"
@using HeartTrack.Models
<PageTitle>Reports</PageTitle> <PageTitle>Reports</PageTitle>
@ -6,5 +7,16 @@
This is the report list of users. This is the report list of users.
<SurveyPrompt Title="How is Blazor working for you?" /> <DataGrid TItem="Report"
Data="@reports"
ReadData="@OnReadData"
TotalItems="@totalReport"
PageSize="10"
ShowPager
Responsive>
<DataGridColumn TItem="Report" Field="@nameof(Report.Id)" Caption="Id" />
<DataGridColumn TItem="Report" Field="@nameof(Report.Username)" Caption="@Localizer["Username"]" />
<DataGridColumn TItem="Report" Field="@nameof(Report.Raison)" Caption="@Localizer["Raison"]" />
<DataGridColumn TItem="Report" Field="@nameof(Report.Description)" Caption="@Localizer["Description"]" />
<DataGridColumn Caption="" />
</DataGrid>

@ -0,0 +1,63 @@
using Blazored.LocalStorage;
using Blazorise.DataGrid;
using HeartTrack.Models;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization;
namespace HeartTrack.Pages
{
public partial class Reports
{
private List<Report> reports;
private int totalReport;
[Inject]
public HttpClient Http { get; set; }
[Inject]
public NavigationManager NavigationManager { get; set; }
[Inject]
public ILocalStorageService LocalStorage { get; set; }
[Inject]
public IStringLocalizer<Report> Localizer { get; set; }
protected override async Task OnAfterRenderAsync(bool firstRender)
{
// Do not treat this action if is not the first render
if (!firstRender)
{
return;
}
var currentData = await LocalStorage.GetItemAsync<Report[]>("data");
// Check if data exist in the local storage
if (currentData == null)
{
// this code add in the local storage the fake data (we load the data sync for initialize the data before load the OnReadData method)
var originalData = Http.GetFromJsonAsync<Report[]>($"{NavigationManager.BaseUri}fake-data.json").Result;
await LocalStorage.SetItemAsync("data", originalData);
}
}
private async Task OnReadData(DataGridReadDataEventArgs<Report> e)
{
if (e.CancellationToken.IsCancellationRequested)
{
return;
}
// When you use a real API, we use this follow code
//var response = await Http.GetJsonAsync<Data[]>( $"http://my-api/api/data?page={e.Page}&pageSize={e.PageSize}" );
var response = (await LocalStorage.GetItemAsync<Report[]>("data")).Skip((e.Page - 1) * e.PageSize).Take(e.PageSize).ToList();
if (!e.CancellationToken.IsCancellationRequested)
{
totalReport = (await LocalStorage.GetItemAsync<List<User>>("data")).Count;
reports = new List<Report>(response); // an actual data for the current page
}
}
}
}

@ -1,6 +1,15 @@
using Microsoft.AspNetCore.Components; using Blazorise;
using Microsoft.AspNetCore.Components.Web; using Blazorise.Bootstrap;
using HeartTrack.Data; using Blazorise.Icons.FontAwesome;
using Microsoft.AspNetCore.Localization;
using System.Globalization;
using Microsoft.Extensions.Options;
using Blazored.LocalStorage;
using HeartTrack.Services;
using HeartTrack.Services.ActivityDataService;
using HeartTrack.Services.ReportDataService;
using HeartTrack.Services.UserDataService;
using HeartTrack.Services.TicketDataService;
using Blazorise; using Blazorise;
using Blazorise.Bootstrap; using Blazorise.Bootstrap;
using Blazorise.Icons.FontAwesome; using Blazorise.Icons.FontAwesome;
@ -20,7 +29,38 @@ builder.Services.AddMudServices();
// Add services to the container. // Add services to the container.
builder.Services.AddRazorPages(); builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor(); builder.Services.AddServerSideBlazor();
builder.Services.AddSingleton<WeatherForecastService>(); builder.Services.AddHttpClient();
// Add Services
builder.Services.AddScoped<IDataService, DataLocalService>();
builder.Services.AddScoped<IActivityDataService, ActivityDataServiceAPI>();
builder.Services.AddScoped<IReportDataService, ReportDataServiceAPI>();
builder.Services.AddScoped<ITicketDataService, TicketDataServiceAPI>();
builder.Services.AddScoped<IUserDataService, UserDataServiceAPI>();
builder.Services.AddBlazorise()
.AddBootstrapProviders()
.AddFontAwesomeIcons();
// Add the controller of the app
builder.Services.AddControllers();
// Add the localization to the app and specify the resources path
builder.Services.AddLocalization(opts => { opts.ResourcesPath = "Resources"; });
// Configure the localtization
builder.Services.Configure<RequestLocalizationOptions>(options =>
{
// Set the default culture of the web site
options.DefaultRequestCulture = new RequestCulture(new CultureInfo("en-US"));
// Declare the supported culture
options.SupportedCultures = new List<CultureInfo> { new CultureInfo("en-US"), new CultureInfo("fr-FR") };
options.SupportedUICultures = new List<CultureInfo> { new CultureInfo("en-US"), new CultureInfo("fr-FR") };
});
builder.Services.AddBlazoredLocalStorage();
builder.Services.AddHttpClient(); builder.Services.AddHttpClient();

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Title" xml:space="preserve">
<value>List d'activités</value>
</data>
<data name="Description" xml:space="preserve">
<value>This is t.</value>
</data>
<data name="StartTime" xml:space="preserve">
<value>helle</value>
</data>
<data name="EndTime" xml:space="preserve">
<value>Last e</value>
</data>
<data name="EffortRessenti" xml:space="preserve">
<value>Efforressenti</value>
</data>
<data name="Variability" xml:space="preserve">
<value>Variablity</value>
</data>
<data name="StandardDeviation" xml:space="preserve">
<value>Standard deviation</value>
</data>
<data name="Average" xml:space="preserve">
<value>Average</value>
</data>
<data name="AvrTemperature" xml:space="preserve">
<value>Average temperature</value>
</data>
<data name="HasAutoPause" xml:space="preserve">
<value>Has auto pause</value>
</data>
</root>

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Title" xml:space="preserve">
<value>Activities List</value>
</data>
<data name="Description" xml:space="preserve">
<value>This is the activity list of users.</value>
</data>
<data name="StartTime" xml:space="preserve">
<value>First name</value>
</data>
<data name="EndTime" xml:space="preserve">
<value>Last name</value>
</data>
<data name="EffortRessenti" xml:space="preserve">
<value>Effort ressenti</value>
</data>
<data name="Variability" xml:space="preserve">
<value>Variability</value>
</data>
<data name="StandardDeviation" xml:space="preserve">
<value>Standard deviation</value>
</data>
<data name="Average" xml:space="preserve">
<value>Average</value>
</data>
<data name="AvrTemperature" xml:space="preserve">
<value>Average temperature</value>
</data>
<data name="HasAutoPause" xml:space="preserve">
<value>Has auto pause</value>
</data>
</root>

@ -0,0 +1,87 @@
using System;
using HeartTrack.Models;
using Microsoft.AspNetCore.Components;
namespace HeartTrack.Services.ActivityDataService
{
public class ActivityDataServiceAPI : IActivityDataService
{
[Inject]
private HttpClient _clientHttp { get; set; }
public ActivityDataServiceAPI(HttpClient clientHttp)
{
this._clientHttp = clientHttp;
}
public async Task AddActivity(Activity a)
{
HttpResponseMessage response = await _clientHttp.PostAsJsonAsync("http://localhost:8080/api/activities", a);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - Activité avec l'id " + a.IdActivity + " ajouté avec succès");
}
else
{
Console.WriteLine("API - Problème ajout Activité");
}
}
public async Task<Activity> getActivityById(int id)
{
Activity activity = await _clientHttp.GetFromJsonAsync<Activity>("http://localhost:8080/api/activities/{id}");
return activity;
}
public async Task<List<Activity>> getAllActivities()
{
List<Activity> lActivities = await _clientHttp.GetFromJsonAsync<List<Activity>>("http://localhost:8080/api/activities");
return lActivities;
}
public async Task RemoveActivity(Activity a)
{
HttpResponseMessage response = await _clientHttp.DeleteAsync($"http://localhost:8080/api/activities/{a.IdActivity}");
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - Activité avec l'id " + a.IdActivity + " supprimé avec succès");
}
else
{
Console.WriteLine("API - Problème suppression Activité");
}
}
public async Task SaveAllActivities(List<Activity> list)
{
HttpResponseMessage response = await _clientHttp.PutAsJsonAsync("http://localhost:8080/api/activities", list);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - List d'activités sauvegardé avec succès");
}
else
{
Console.WriteLine("API - Problème sauvegarde List d'activités");
}
}
public async Task UpdateActivity(Activity a)
{
HttpResponseMessage response = await _clientHttp.PutAsJsonAsync($"http://localhost:8080/api/activities/{a.IdActivity}", a);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - Activité avec l'id " + a.IdActivity + " mis à jour avec succès");
}
else
{
Console.WriteLine("API - Problème mise à jour Activité");
}
}
}
}

@ -0,0 +1,140 @@
using System;
using Blazored.LocalStorage;
using HeartTrack.Models;
using HeartTrack.Services.ActivityDataService;
using Microsoft.AspNetCore.Components;
namespace HeartTrack.Services.ActivityDataServiceFactice
{
public class ActivityDataServiceFactice : IActivityDataService
{
[Inject]
private HttpClient _clientHttp { get; set; }
[Inject]
public ILocalStorageService _localStorage { get; set; }
[Inject]
public NavigationManager _navigationManager { get; set; }
private String EmplacementLocalStorage { get; set; }
private String EmplacementJson { get; set; }
public ActivityDataServiceFactice(HttpClient clientHttp, ILocalStorageService localStorage, NavigationManager navigationManager)
{
this._clientHttp = clientHttp;
this._localStorage = localStorage;
this._navigationManager = navigationManager;
this.EmplacementLocalStorage = "activitiesData";
this.EmplacementJson = $"{_navigationManager.BaseUri}data/fake-activities.json";
}
public async Task AddActivity(Activity a)
{
List<Activity> data = await getAllActivities();
data.Add(a);
await this.SaveAllActivities(data);
}
public async Task<Activity> getActivityById(int id)
{
Console.WriteLine("Passage dans le getFromPseudo...");
List<Activity> activities = await getAllActivities();
Activity? temp = null;
foreach (Activity a in activities)
{
if (a.IdActivity == id)
{
temp = a;
}
}
return temp;
}
public async Task<List<Activity>> getAllActivities()
{
List<Activity> lActivities = new List<Activity>();
lActivities = await this.getActivitiesFromLocalStorage();
if(lActivities.Count == 0)
{
lActivities = await this.getActivitiesFromJson(this.EmplacementJson);
await this.saveActivitiesLocalStorage(lActivities);
}
return lActivities;
}
private async Task<List<Activity>> getActivitiesFromJson(String cheminVersJson)
{
List<Activity> activitiesDeserialiser = new List<Activity>();
var data = await _clientHttp.GetFromJsonAsync<Activity[]>(cheminVersJson);
activitiesDeserialiser = data.ToList();
return activitiesDeserialiser;
}
private async Task<List<Activity>> getActivitiesFromLocalStorage()
{
List<Activity> activitiesFromLocalStorage = null;
var data = await _localStorage.GetItemAsync<Activity[]>(EmplacementLocalStorage);
if (data == null)
{
activitiesFromLocalStorage = new List<Activity>();
}
else
{
activitiesFromLocalStorage = data.ToList();
}
return activitiesFromLocalStorage;
}
public async Task RemoveActivity(Activity a)
{
List<Activity> data = await getAllActivities();
int index = -1;
foreach (Activity temp in data)
{
if (temp.IdActivity == a.IdActivity)
{
index = data.IndexOf(temp);
}
}
if (index != -1)
{
data.RemoveAt(index);
}
await this.SaveAllActivities(data);
data = await this.getAllActivities();
}
public async Task SaveAllActivities(List<Activity> list)
{
await this.saveActivitiesLocalStorage(list);
}
private async Task saveActivitiesLocalStorage(List<Activity> lActivities)
{
await _localStorage.SetItemAsync(this.EmplacementLocalStorage, lActivities);
}
public async Task UpdateActivity(Activity a)
{
await this.RemoveActivity(a);
await this.AddActivity(a);
}
}
}

@ -0,0 +1,21 @@
using System;
using HeartTrack.Models;
namespace HeartTrack.Services.ActivityDataService
{
public interface IActivityDataService
{
public Task<List<Activity>> getAllActivities();
public Task SaveAllActivities(List<Activity> list);
public Task AddActivity(Activity u);
public Task RemoveActivity(Activity u);
public Task UpdateActivity(Activity u);
public Task<Activity> getActivityById(int id);
}
}

@ -0,0 +1,20 @@
using System;
using HeartTrack.Models;
namespace HeartTrack.Services.ReportDataService
{
public interface IReportDataService
{
public Task<List<Report>> getAllReports();
public Task SaveAllReports(List<Report> list);
public Task AddReport(Report r);
public Task RemoveReport(Report r);
public Task UpdateReport(Report r);
public Task<Report> getReportById(int id);
}
}

@ -0,0 +1,86 @@
using System;
using HeartTrack.Models;
using Microsoft.AspNetCore.Components;
namespace HeartTrack.Services.ReportDataService
{
public class ReportDataServiceAPI : IReportDataService
{
[Inject]
private HttpClient _clientHttp { get; set; }
public ReportDataServiceAPI(HttpClient clientHttp)
{
this._clientHttp = clientHttp;
}
public async Task AddReport(Report r)
{
HttpResponseMessage response = await _clientHttp.PostAsJsonAsync("http://localhost:8080/api/reports", r);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - Report avec l'id " + r.Id + " ajouté avec succès");
}
else
{
Console.WriteLine("API - Problème ajout Report");
}
}
public async Task<Report> getReportById(int id)
{
Report Report = await _clientHttp.GetFromJsonAsync<Report>("http://localhost:8080/api/reports/{id}");
return Report;
}
public async Task<List<Report>> getAllReports()
{
List<Report> lReports = await _clientHttp.GetFromJsonAsync<List<Report>>("http://localhost:8080/api/reports");
return lReports;
}
public async Task RemoveReport(Report r)
{
HttpResponseMessage response = await _clientHttp.DeleteAsync($"http://localhost:8080/api/reports/{r.Id}");
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - Report avec l'id " + r.Id + " supprimé avec succès");
}
else
{
Console.WriteLine("API - Problème suppression Report");
}
}
public async Task SaveAllReports(List<Report> list)
{
HttpResponseMessage response = await _clientHttp.PutAsJsonAsync("http://localhost:8080/api/reports", list);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - List de reports sauvegardé avec succès");
}
else
{
Console.WriteLine("API - Problème sauvegarde List de reports");
}
}
public async Task UpdateReport(Report r)
{
HttpResponseMessage response = await _clientHttp.PutAsJsonAsync($"http://localhost:8080/api/reports/{r.Id}", r);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - Report avec l'id " + r.Id + " mis à jour avec succès");
}
else
{
Console.WriteLine("API - Problème mise à jour Report");
}
}
}
}

@ -0,0 +1,139 @@
using System;
using Blazored.LocalStorage;
using HeartTrack.Models;
using HeartTrack.Services.ReportDataService;
using Microsoft.AspNetCore.Components;
namespace HeartTrack.Services.ReportDataServiceFactice
{
public class ReportDataServiceFactice : IReportDataService
{
[Inject]
private HttpClient _clientHttp { get; set; }
[Inject]
public ILocalStorageService _localStorage { get; set; }
[Inject]
public NavigationManager _navigationManager { get; set; }
private String EmplacementLocalStorage { get; set; }
private String EmplacementJson { get; set; }
public ReportDataServiceFactice(HttpClient clientHttp, ILocalStorageService localStorage, NavigationManager navigationManager)
{
this._clientHttp = clientHttp;
this._localStorage = localStorage;
this._navigationManager = navigationManager;
this.EmplacementLocalStorage = "reportsData";
this.EmplacementJson = $"{_navigationManager.BaseUri}data/fake-reports.json";
}
public async Task AddReport(Report a)
{
List<Report> data = await getAllReports();
data.Add(a);
await this.SaveAllReports(data);
}
public async Task<Report> getReportById(int id)
{
List<Report> reports = await getAllReports();
Report? temp = null;
foreach (Report r in reports)
{
if (r.Id == id)
{
temp = r;
}
}
return temp;
}
public async Task<List<Report>> getAllReports()
{
List<Report> lReports = new List<Report>();
lReports = await this.getReportsFromLocalStorage();
if (lReports.Count == 0)
{
lReports = await this.getReportsFromJson(this.EmplacementJson);
await this.saveReportsLocalStorage(lReports);
}
return lReports;
}
private async Task<List<Report>> getReportsFromJson(String cheminVersJson)
{
List<Report> ReportsDeserialiser = new List<Report>();
var data = await _clientHttp.GetFromJsonAsync<Report[]>(cheminVersJson);
ReportsDeserialiser = data.ToList();
return ReportsDeserialiser;
}
private async Task<List<Report>> getReportsFromLocalStorage()
{
List<Report> ReportsFromLocalStorage = null;
var data = await _localStorage.GetItemAsync<Report[]>(EmplacementLocalStorage);
if (data == null)
{
ReportsFromLocalStorage = new List<Report>();
}
else
{
ReportsFromLocalStorage = data.ToList();
}
return ReportsFromLocalStorage;
}
public async Task RemoveReport(Report r)
{
List<Report> data = await getAllReports();
int index = -1;
foreach (Report temp in data)
{
if (temp.Id == r.Id)
{
index = data.IndexOf(temp);
}
}
if (index != -1)
{
data.RemoveAt(index);
}
await this.SaveAllReports(data);
data = await this.getAllReports();
}
public async Task SaveAllReports(List<Report> list)
{
await this.saveReportsLocalStorage(list);
}
private async Task saveReportsLocalStorage(List<Report> lReports)
{
await _localStorage.SetItemAsync(this.EmplacementLocalStorage, lReports);
}
public async Task UpdateReport(Report r)
{
await this.RemoveReport(r);
await this.AddReport(r);
}
}
}

@ -0,0 +1,21 @@
using System;
using HeartTrack.Models;
namespace HeartTrack.Services.TicketDataService
{
public interface ITicketDataService
{
public Task<List<Ticket>> getAllTickets();
public Task SaveAllTickets(List<Ticket> list);
public Task AddTicket(Ticket t);
public Task RemoveTicket(Ticket t);
public Task UpdateTicket(Ticket t);
public Task<Ticket> getTicketById(int id);
}
}

@ -0,0 +1,86 @@
using System;
using HeartTrack.Models;
using Microsoft.AspNetCore.Components;
namespace HeartTrack.Services.TicketDataService
{
public class TicketDataServiceAPI : ITicketDataService
{
[Inject]
private HttpClient _clientHttp { get; set; }
public TicketDataServiceAPI(HttpClient clientHttp)
{
this._clientHttp = clientHttp;
}
public async Task AddTicket(Ticket t)
{
HttpResponseMessage response = await _clientHttp.PostAsJsonAsync("http://localhost:8080/api/tickets", t);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - Ticket avec l'id " + t.Id + " ajouté avec succès");
}
else
{
Console.WriteLine("API - Problème ajout Ticket");
}
}
public async Task<Ticket> getTicketById(int id)
{
Ticket Ticket = await _clientHttp.GetFromJsonAsync<Ticket>("http://localhost:8080/api/tickets/{id}");
return Ticket;
}
public async Task<List<Ticket>> getAllTickets()
{
List<Ticket> lTickets = await _clientHttp.GetFromJsonAsync<List<Ticket>>("http://localhost:8080/api/tickets");
return lTickets;
}
public async Task RemoveTicket(Ticket t)
{
HttpResponseMessage response = await _clientHttp.DeleteAsync($"http://localhost:8080/api/tickets/{t.Id}");
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - Ticket avec l'id " + t.Id + " supprimé avec succès");
}
else
{
Console.WriteLine("API - Problème suppression Ticket");
}
}
public async Task SaveAllTickets(List<Ticket> list)
{
HttpResponseMessage response = await _clientHttp.PutAsJsonAsync("http://localhost:8080/api/tickets", list);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - List de tickets sauvegardé avec succès");
}
else
{
Console.WriteLine("API - Problème sauvegarde List de tickets");
}
}
public async Task UpdateTicket(Ticket t)
{
HttpResponseMessage response = await _clientHttp.PutAsJsonAsync($"http://localhost:8080/api/tickets/{t.Id}", t);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - Ticket avec l'id " + t.Id + " mis à jour avec succès");
}
else
{
Console.WriteLine("API - Problème mise à jour Ticket");
}
}
}
}

@ -0,0 +1,138 @@
using System;
using Blazored.LocalStorage;
using HeartTrack.Models;
using HeartTrack.Services.TicketDataService;
using Microsoft.AspNetCore.Components;
namespace HeartTrack.Services.TicketDataServiceFactice
{
public class TicketDataServiceFactice : ITicketDataService
{
[Inject]
private HttpClient _clientHttp { get; set; }
[Inject]
public ILocalStorageService _localStorage { get; set; }
[Inject]
public NavigationManager _navigationManager { get; set; }
private String EmplacementLocalStorage { get; set; }
private String EmplacementJson { get; set; }
public TicketDataServiceFactice(HttpClient clientHttp, ILocalStorageService localStorage, NavigationManager navigationManager)
{
this._clientHttp = clientHttp;
this._localStorage = localStorage;
this._navigationManager = navigationManager;
this.EmplacementLocalStorage = "ticketsData";
this.EmplacementJson = $"{_navigationManager.BaseUri}data/fake-tickets.json";
}
public async Task AddTicket(Ticket t)
{
List<Ticket> data = await getAllTickets();
data.Add(t);
await this.SaveAllTickets(data);
}
public async Task<Ticket> getTicketById(int id)
{
List<Ticket> tickets = await getAllTickets();
Ticket? temp = null;
foreach (Ticket t in tickets)
{
if (t.Id == id)
{
temp = t;
}
}
return temp;
}
public async Task<List<Ticket>> getAllTickets()
{
List<Ticket> lTickets = new List<Ticket>();
lTickets = await this.getTicketsFromLocalStorage();
if (lTickets.Count == 0)
{
lTickets = await this.getTicketsFromJson(this.EmplacementJson);
await this.saveTicketsLocalStorage(lTickets);
}
return lTickets;
}
private async Task<List<Ticket>> getTicketsFromJson(String cheminVersJson)
{
List<Ticket> TicketsDeserialiser = new List<Ticket>();
var data = await _clientHttp.GetFromJsonAsync<Ticket[]>(cheminVersJson);
TicketsDeserialiser = data.ToList();
return TicketsDeserialiser;
}
private async Task<List<Ticket>> getTicketsFromLocalStorage()
{
List<Ticket> TicketsFromLocalStorage = null;
var data = await _localStorage.GetItemAsync<Ticket[]>(EmplacementLocalStorage);
if (data == null)
{
TicketsFromLocalStorage = new List<Ticket>();
}
else
{
TicketsFromLocalStorage = data.ToList();
}
return TicketsFromLocalStorage;
}
public async Task RemoveTicket(Ticket t)
{
List<Ticket> data = await getAllTickets();
int index = -1;
foreach (Ticket temp in data)
{
if (temp.Id == t.Id)
{
index = data.IndexOf(temp);
}
}
if (index != -1)
{
data.RemoveAt(index);
}
await this.SaveAllTickets(data);
data = await this.getAllTickets();
}
public async Task SaveAllTickets(List<Ticket> list)
{
await this.saveTicketsLocalStorage(list);
}
private async Task saveTicketsLocalStorage(List<Ticket> lTickets)
{
await _localStorage.SetItemAsync(this.EmplacementLocalStorage, lTickets);
}
public async Task UpdateTicket(Ticket t)
{
await this.RemoveTicket(t);
await this.AddTicket(t);
}
}
}

@ -0,0 +1,21 @@
using System;
using HeartTrack.Models;
namespace HeartTrack.Services.UserDataService
{
public interface IUserDataService
{
public Task<List<User>> getAllUsers();
public Task SaveAllUsers(List<User> list);
public Task AddUser(User u);
public Task RemoveUser(User u);
public Task UpdateUser(User u);
public Task<User> getUserById(int id);
}
}

@ -0,0 +1,86 @@
using System;
using HeartTrack.Models;
using Microsoft.AspNetCore.Components;
namespace HeartTrack.Services.UserDataService
{
public class UserDataServiceAPI : IUserDataService
{
[Inject]
private HttpClient _clientHttp { get; set; }
public UserDataServiceAPI(HttpClient clientHttp)
{
this._clientHttp = clientHttp;
}
public async Task AddUser(User u)
{
HttpResponseMessage response = await _clientHttp.PostAsJsonAsync("http://localhost:8080/api/users", u);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - User avec l'id " + u.Id + " ajouté avec succès");
}
else
{
Console.WriteLine("API - Problème ajout User");
}
}
public async Task<User> getUserById(int id)
{
User User = await _clientHttp.GetFromJsonAsync<User>("http://localhost:8080/api/users/{id}");
return User;
}
public async Task<List<User>> getAllUsers()
{
List<User> lUsers = await _clientHttp.GetFromJsonAsync<List<User>>("http://localhost:8080/api/users");
return lUsers;
}
public async Task RemoveUser(User u)
{
HttpResponseMessage response = await _clientHttp.DeleteAsync($"http://localhost:8080/api/users/{u.Id}");
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - User avec l'id " + u.Id + " supprimé avec succès");
}
else
{
Console.WriteLine("API - Problème suppression User");
}
}
public async Task SaveAllUsers(List<User> list)
{
HttpResponseMessage response = await _clientHttp.PutAsJsonAsync("http://localhost:8080/api/users", list);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - List de users sauvegardé avec succès");
}
else
{
Console.WriteLine("API - Problème sauvegarde List de users");
}
}
public async Task UpdateUser(User u)
{
HttpResponseMessage response = await _clientHttp.PutAsJsonAsync($"http://localhost:8080/api/users/{u.Id}", u);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("API - User avec l'id " + u.Id + " mis à jour avec succès");
}
else
{
Console.WriteLine("API - Problème mise à jour User");
}
}
}
}

@ -0,0 +1,139 @@
using System;
using Blazored.LocalStorage;
using HeartTrack.Models;
using HeartTrack.Services.UserDataService;
using Microsoft.AspNetCore.Components;
namespace HeartTrack.Services.UserDataServiceFactice
{
public class UserDataServiceFactice : IUserDataService
{
[Inject]
private HttpClient _clientHttp { get; set; }
[Inject]
public ILocalStorageService _localStorage { get; set; }
[Inject]
public NavigationManager _navigationManager { get; set; }
private String EmplacementLocalStorage { get; set; }
private String EmplacementJson { get; set; }
public UserDataServiceFactice(HttpClient clientHttp, ILocalStorageService localStorage, NavigationManager navigationManager)
{
this._clientHttp = clientHttp;
this._localStorage = localStorage;
this._navigationManager = navigationManager;
this.EmplacementLocalStorage = "usersData";
this.EmplacementJson = $"{_navigationManager.BaseUri}data/fake-users.json";
}
public async Task AddUser(User u)
{
List<User> data = await getAllUsers();
data.Add(u);
await this.SaveAllUsers(data);
}
public async Task<User> getUserById(int id)
{
List<User> users = await getAllUsers();
User? temp = null;
foreach (User u in users)
{
if (u.Id == id)
{
temp = u;
}
}
return temp;
}
public async Task<List<User>> getAllUsers()
{
List<User> lUsers = new List<User>();
lUsers = await this.getUsersFromLocalStorage();
if (lUsers.Count == 0)
{
lUsers = await this.getUsersFromJson(this.EmplacementJson);
await this.saveUsersLocalStorage(lUsers);
}
return lUsers;
}
private async Task<List<User>> getUsersFromJson(String cheminVersJson)
{
List<User> UsersDeserialiser = new List<User>();
var data = await _clientHttp.GetFromJsonAsync<User[]>(cheminVersJson);
UsersDeserialiser = data.ToList();
return UsersDeserialiser;
}
private async Task<List<User>> getUsersFromLocalStorage()
{
List<User> UsersFromLocalStorage = null;
var data = await _localStorage.GetItemAsync<User[]>(EmplacementLocalStorage);
if (data == null)
{
UsersFromLocalStorage = new List<User>();
}
else
{
UsersFromLocalStorage = data.ToList();
}
return UsersFromLocalStorage;
}
public async Task RemoveUser(User u)
{
List<User> data = await getAllUsers();
int index = -1;
foreach (User temp in data)
{
if (temp.Id == u.Id)
{
index = data.IndexOf(temp);
}
}
if (index != -1)
{
data.RemoveAt(index);
}
await this.SaveAllUsers(data);
data = await this.getAllUsers();
}
public async Task SaveAllUsers(List<User> list)
{
await this.saveUsersLocalStorage(list);
}
private async Task saveUsersLocalStorage(List<User> lUsers)
{
await _localStorage.SetItemAsync(this.EmplacementLocalStorage, lUsers);
}
public async Task UpdateUser(User u)
{
await this.RemoveUser(u);
await this.AddUser(u);
}
}
}

@ -0,0 +1,418 @@
[
{
"idActivity": 1,
"type": "Type2",
"date": "2014-01-16",
"startTime": "2022-01-18",
"endTime": "1990-12-23",
"effortRessenti": 5,
"variability": 31.9135,
"variance": 47.9027,
"standardDeviation": 51.4366,
"average": 77.616,
"maximum": 156,
"minimum": 99,
"avrTemperature": 47.9859,
"hasAutoPause": false
},
{
"idActivity": 2,
"type": "Type1",
"date": "2018-11-27",
"startTime": "2008-09-06",
"endTime": "1971-04-16",
"effortRessenti": 2,
"variability": 63.2869,
"variance": 4.3233,
"standardDeviation": 36.6456,
"average": 14.0372,
"maximum": 182,
"minimum": 57,
"avrTemperature": 47.8921,
"hasAutoPause": true
},
{
"idActivity": 3,
"type": "Type2",
"date": "2018-01-24",
"startTime": "2009-03-24",
"endTime": "1941-05-20",
"effortRessenti": 4,
"variability": 66.0437,
"variance": 40.1499,
"standardDeviation": 85.1707,
"average": 52.538,
"maximum": 114,
"minimum": 41,
"avrTemperature": 48.6091,
"hasAutoPause": true
},
{
"idActivity": 4,
"type": "Type3",
"date": "2014-07-05",
"startTime": "1954-10-02",
"endTime": "2019-11-13",
"effortRessenti": 3,
"variability": 72.5219,
"variance": 88.7179,
"standardDeviation": 56.3285,
"average": 99.2423,
"maximum": 101,
"minimum": 35,
"avrTemperature": 99.5707,
"hasAutoPause": false
},
{
"idActivity": 5,
"type": "Type1",
"date": "2020-07-27",
"startTime": "1970-07-09",
"endTime": "2014-01-07",
"effortRessenti": 1,
"variability": 91.2868,
"variance": 35.2977,
"standardDeviation": 89.1283,
"average": 24.5516,
"maximum": 185,
"minimum": 55,
"avrTemperature": 61.2443,
"hasAutoPause": false
},
{
"idActivity": 6,
"type": "Type3",
"date": "2022-01-21",
"startTime": "1988-07-11",
"endTime": "1947-10-08",
"effortRessenti": 2,
"variability": 39.2403,
"variance": 68.3035,
"standardDeviation": 48.4541,
"average": 15.0519,
"maximum": 87,
"minimum": 61,
"avrTemperature": 24.96,
"hasAutoPause": true
},
{
"idActivity": 7,
"type": "Type2",
"date": "2020-07-04",
"startTime": "1966-07-04",
"endTime": "1953-11-28",
"effortRessenti": 3,
"variability": 77.9106,
"variance": 50.2753,
"standardDeviation": 27.6544,
"average": 73.1399,
"maximum": 178,
"minimum": 80,
"avrTemperature": 70.0154,
"hasAutoPause": true
},
{
"idActivity": 8,
"type": "Type3",
"date": "2021-11-01",
"startTime": "1966-06-30",
"endTime": "1966-10-08",
"effortRessenti": 5,
"variability": 12.8896,
"variance": 91.5997,
"standardDeviation": 28.1367,
"average": 63.2516,
"maximum": 99,
"minimum": 64,
"avrTemperature": 47.2724,
"hasAutoPause": false
},
{
"idActivity": 9,
"type": "Type1",
"date": "2020-10-18",
"startTime": "1993-02-09",
"endTime": "1922-01-12",
"effortRessenti": 2,
"variability": 75.0622,
"variance": 28.5926,
"standardDeviation": 84.1056,
"average": 82.6735,
"maximum": 184,
"minimum": 58,
"avrTemperature": 2.5165,
"hasAutoPause": true
},
{
"idActivity": 10,
"type": "Type3",
"date": "2019-07-21",
"startTime": "1978-01-14",
"endTime": "1921-10-28",
"effortRessenti": 2,
"variability": 38.4167,
"variance": 8.9565,
"standardDeviation": 79.1064,
"average": 71.7045,
"maximum": 189,
"minimum": 41,
"avrTemperature": 11.3153,
"hasAutoPause": false
},
{
"idActivity": 11,
"type": "Type2",
"date": "2015-01-10",
"startTime": "1982-05-10",
"endTime": "2000-06-20",
"effortRessenti": 2,
"variability": 7.298,
"variance": 84.2038,
"standardDeviation": 59.7613,
"average": 24.1556,
"maximum": 84,
"minimum": 40,
"avrTemperature": 79.2884,
"hasAutoPause": true
},
{
"idActivity": 12,
"type": "Type1",
"date": "2014-12-15",
"startTime": "2003-07-20",
"endTime": "1957-10-10",
"effortRessenti": 4,
"variability": 6.1594,
"variance": 39.0998,
"standardDeviation": 87.1683,
"average": 99.7483,
"maximum": 84,
"minimum": 36,
"avrTemperature": 90.0641,
"hasAutoPause": true
},
{
"idActivity": 13,
"type": "Type3",
"date": "2019-07-09",
"startTime": "1977-03-04",
"endTime": "1960-01-01",
"effortRessenti": 4,
"variability": 44.0535,
"variance": 12.5373,
"standardDeviation": 58.7271,
"average": 19.4843,
"maximum": 193,
"minimum": 76,
"avrTemperature": 22.6955,
"hasAutoPause": true
},
{
"idActivity": 14,
"type": "Type2",
"date": "2023-12-11",
"startTime": "1954-06-28",
"endTime": "1993-06-24",
"effortRessenti": 2,
"variability": 10.3723,
"variance": 54.257,
"standardDeviation": 69.0052,
"average": 97.0453,
"maximum": 181,
"minimum": 72,
"avrTemperature": 81.2482,
"hasAutoPause": false
},
{
"idActivity": 15,
"type": "Type1",
"date": "2018-07-02",
"startTime": "2024-01-03",
"endTime": "1964-08-30",
"effortRessenti": 2,
"variability": 48.2932,
"variance": 67.7662,
"standardDeviation": 94.5576,
"average": 98.3297,
"maximum": 177,
"minimum": 38,
"avrTemperature": 91.9669,
"hasAutoPause": true
},
{
"idActivity": 16,
"type": "Type1",
"date": "2018-07-06",
"startTime": "2012-12-28",
"endTime": "2014-04-26",
"effortRessenti": 1,
"variability": 26.7247,
"variance": 8.6121,
"standardDeviation": 32.8475,
"average": 36.0507,
"maximum": 135,
"minimum": 95,
"avrTemperature": 64.4691,
"hasAutoPause": true
},
{
"idActivity": 17,
"type": "Type2",
"date": "2022-07-08",
"startTime": "1934-08-04",
"endTime": "1948-01-16",
"effortRessenti": 3,
"variability": 24.5678,
"variance": 89.474,
"standardDeviation": 6.4851,
"average": 80.388,
"maximum": 198,
"minimum": 65,
"avrTemperature": 73.0159,
"hasAutoPause": false
},
{
"idActivity": 18,
"type": "Type3",
"date": "2020-08-08",
"startTime": "1943-01-04",
"endTime": "1984-11-01",
"effortRessenti": 4,
"variability": 15.8206,
"variance": 10.1982,
"standardDeviation": 89.2815,
"average": 60.1575,
"maximum": 177,
"minimum": 55,
"avrTemperature": 95.3616,
"hasAutoPause": false
},
{
"idActivity": 19,
"type": "Type1",
"date": "2017-01-31",
"startTime": "1995-01-14",
"endTime": "1967-07-28",
"effortRessenti": 2,
"variability": 10.3217,
"variance": 25.3434,
"standardDeviation": 64.5326,
"average": 6.7419,
"maximum": 83,
"minimum": 72,
"avrTemperature": 19.6569,
"hasAutoPause": false
},
{
"idActivity": 20,
"type": "Type3",
"date": "2017-05-29",
"startTime": "1959-03-03",
"endTime": "1943-08-27",
"effortRessenti": 2,
"variability": 12.9503,
"variance": 90.5546,
"standardDeviation": 57.812,
"average": 44.4189,
"maximum": 144,
"minimum": 79,
"avrTemperature": 95.1186,
"hasAutoPause": false
},
{
"idActivity": 21,
"type": "Type1",
"date": "2015-10-03",
"startTime": "1946-05-27",
"endTime": "1934-06-04",
"effortRessenti": 3,
"variability": 59.5777,
"variance": 61.9804,
"standardDeviation": 46.6558,
"average": 11.234,
"maximum": 144,
"minimum": 73,
"avrTemperature": 72.5805,
"hasAutoPause": false
},
{
"idActivity": 22,
"type": "Type1",
"date": "2015-04-05",
"startTime": "1948-02-07",
"endTime": "1925-04-24",
"effortRessenti": 3,
"variability": 4.6783,
"variance": 66.7362,
"standardDeviation": 79.8471,
"average": 52.3693,
"maximum": 141,
"minimum": 85,
"avrTemperature": 48.7024,
"hasAutoPause": false
},
{
"idActivity": 23,
"type": "Type1",
"date": "2023-06-05",
"startTime": "1920-11-12",
"endTime": "1926-06-26",
"effortRessenti": 5,
"variability": 67.8302,
"variance": 33.2865,
"standardDeviation": 4.516,
"average": 17.2584,
"maximum": 150,
"minimum": 47,
"avrTemperature": 52.2994,
"hasAutoPause": true
},
{
"idActivity": 24,
"type": "Type2",
"date": "2014-03-03",
"startTime": "1988-05-05",
"endTime": "1944-06-29",
"effortRessenti": 1,
"variability": 12.7751,
"variance": 92.9296,
"standardDeviation": 76.843,
"average": 32.2267,
"maximum": 114,
"minimum": 77,
"avrTemperature": 80.627,
"hasAutoPause": true
},
{
"idActivity": 25,
"type": "Type3",
"date": "2016-07-01",
"startTime": "1927-11-09",
"endTime": "2011-12-16",
"effortRessenti": 3,
"variability": 45.0597,
"variance": 37.5072,
"standardDeviation": 6.6945,
"average": 70.5156,
"maximum": 81,
"minimum": 32,
"avrTemperature": 57.5543,
"hasAutoPause": false
},
{
"idActivity": 26,
"type": "Type3",
"date": "2020-06-25",
"startTime": "1940-12-10",
"endTime": "1944-05-02",
"effortRessenti": 2,
"variability": 20.6298,
"variance": 54.2174,
"standardDeviation": 56.4106,
"average": 4.487,
"maximum": 112,
"minimum": 98,
"avrTemperature": 80.8548,
"hasAutoPause": false
}
]

@ -0,0 +1,178 @@
[
{
"id": 1,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 2,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 3,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 4,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 5,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 6,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 7,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 8,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 9,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 10,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 11,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 12,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 13,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 14,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 15,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 16,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 17,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 18,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 19,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 20,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 21,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
},
{
"id": 22,
"username": "johndoe",
"reported_user": "erickol",
"raison": "Jvais dire wallah",
"description": "Wallah c`est la description",
"image": "oui.png"
}
]

@ -0,0 +1,209 @@
[
{
"id": 1,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 2,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 3,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": false
},
{
"id": 4,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": false
},
{
"id": 5,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 6,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": false
},
{
"id": 7,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 8,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 9,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": false
},
{
"id": 10,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 11,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": false
},
{
"id": 12,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 13,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 14,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 15,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": false
},
{
"id": 16,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 17,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": false
},
{
"id": 18,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 19,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 20,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 21,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
},
{
"id": 22,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": false
},
{
"id": 23,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"contexte": "Jvais dire wallah",
"description": "Wallah c`est la description",
"urgence": true
}
]

@ -0,0 +1,379 @@
[
{
"id": 1,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2018-12-27",
"isban": true
},
{
"id": 2,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2021-06-29",
"isban": true
},
{
"id": 3,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2021-04-09",
"isban": true
},
{
"id": 4,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2022-11-20",
"isban": true
},
{
"id": 5,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2021-02-20",
"isban": true
},
{
"id": 6,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2014-02-17",
"isban": true
},
{
"id": 7,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2020-07-14",
"isban": true
},
{
"id": 8,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2018-02-21",
"isban": false
},
{
"id": 9,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2014-07-31",
"isban": true
},
{
"id": 10,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2019-10-02",
"isban": true
},
{
"id": 11,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2015-07-26",
"isban": false
},
{
"id": 12,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2020-10-23",
"isban": false
},
{
"id": 13,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2014-11-03",
"isban": true
},
{
"id": 14,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2014-01-31",
"isban": false
},
{
"id": 15,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2022-04-12",
"isban": false
},
{
"id": 16,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2018-07-22",
"isban": false
},
{
"id": 17,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2017-04-04",
"isban": true
},
{
"id": 18,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2015-08-15",
"isban": true
},
{
"id": 19,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2022-04-10",
"isban": false
},
{
"id": 20,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2020-02-09",
"isban": false
},
{
"id": 21,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2017-02-18",
"isban": false
},
{
"id": 22,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2023-06-25",
"isban": false
},
{
"id": 23,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2017-09-27",
"isban": true
},
{
"id": 24,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2015-02-01",
"isban": true
},
{
"id": 25,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2017-05-28",
"isban": true
},
{
"id": 26,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2022-06-11",
"isban": true
},
{
"id": 27,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2019-08-08",
"isban": true
},
{
"id": 28,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2015-01-29",
"isban": false
},
{
"id": 29,
"username": "johndoe",
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"password": "password123",
"sexe": "male",
"taille": 1.76,
"poids": 56.3,
"birthdate": "2020-08-21",
"isban": false
}
]
Loading…
Cancel
Save