Random daily quote
continuous-integration/drone/push Build is passing Details

master
Kentin BRONGNIART 3 months ago
commit 7885b8c724

@ -60,15 +60,16 @@ L'application devrait se lancer automatiquement dans votre navigateur par défau
# Blazor Apps (30 points) # Blazor Apps (30 points)
🟨 En cours / ✅ Fait / ❌ Pas fait<br/><br/> 🟨 En cours / ✅ Fait / ❌ Pas fait<br/><br/>
✅ Mise en place d'une page de visualisation des données avec pagination (2 points) <br/> ✅ Mise en place d'une page de visualisation des données avec pagination (2 points) <br/>
✅ Page d'ajout d'un élement avec validation (2 point)<br/> ✅ Page d'ajout d'un élement avec validation (2 point)<br/>
✅ Page d'édition d'un élement avec validation (2 point)<br/> ✅ Page d'édition d'un élement avec validation (2 point)<br/>
✅ Supression d'un élement avec une confirmation (2 point)<br/> ✅ Supression d'un élement avec une confirmation (2 point)<br/>
🟨 Composant complexe (5 point)<br/> Composant complexe (5 point)<br/>
🟨 Use API (Get / Insert / Update / Delete) (3 point)<br/> 🟨 Use API (Get / Insert / Update / Delete) (3 point)<br/>
✅ Utilisation IOC & DI (4 point)<br/> ✅ Utilisation IOC & DI (4 point)<br/>
✅ Localisation & Globalisation (au moins deux langues) (1 point) <br/> ✅ Localisation & Globalisation (au moins deux langues) (1 point) <br/>
Utilisation de la configuration (1 point)<br/> Utilisation de la configuration (1 point)<br/>
✅ Logs (2 point)<br/> ✅ Logs (2 point)<br/>
🟨 Propreté du code (Vous pouvez vous servir de sonarqube) (2 point)<br/> 🟨 Propreté du code (Vous pouvez vous servir de sonarqube) (2 point)<br/>
✅ IHM (Design global, placement des boutons, ...) (2 point)<br/> ✅ IHM (Design global, placement des boutons, ...) (2 point)<br/>

@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
namespace WF_WebAdmin.Converter namespace WF_WebAdmin.Converter
{ {
public class CommentaryDTO public class CommentaryDto
{ {
[JsonPropertyName("id_comment")] [JsonPropertyName("id_comment")]
public int Id { get; set; } public int Id { get; set; }

@ -1,12 +1,12 @@
using System; using System;
using System.Globalization; using System.Globalization;
using WF_WebAdmin.Converter; using WF_WebAdmin.Model;
namespace WF_WebAdmin.Model namespace WF_WebAdmin.Converter
{ {
public static class CommentaryExtensions public static class CommentaryExtensions
{ {
public static Commentary ToModel(this CommentaryDTO dto) public static Commentary ToModel(this CommentaryDto dto)
{ {
DateTime parsedDate = DateTime.MinValue; DateTime parsedDate = DateTime.MinValue;
@ -32,9 +32,9 @@ namespace WF_WebAdmin.Model
}; };
} }
public static CommentaryDTO ToDTO(this Commentary model) public static CommentaryDto ToDTO(this Commentary model)
{ {
return new CommentaryDTO return new CommentaryDto
{ {
Id = model.Id, Id = model.Id,
IdUser = model.IdUser, IdUser = model.IdUser,

@ -1,10 +1,10 @@
namespace WF_WebAdmin.Converter namespace WF_WebAdmin.Converter
{ {
public class DailyQuoteDTO public class DailyQuoteDto
{ {
private int Id { get; set; } private int Id { get; set; }
public DailyQuoteDTO(int id) public DailyQuoteDto(int id)
{ {
this.Id = id; this.Id = id;
} }

@ -4,9 +4,9 @@ namespace WF_WebAdmin.Converter
{ {
public class DailyQuoteExtension public class DailyQuoteExtension
{ {
public DailyQuoteDTO DailyQuoteToDTO(DailyQuote dq) public DailyQuoteDto DailyQuoteToDto(DailyQuote dq)
{ {
DailyQuoteDTO dailyQuote = new DailyQuoteDTO(dq.Id); DailyQuoteDto dailyQuote = new DailyQuoteDto(dq.Id);
return dailyQuote; return dailyQuote;
} }
} }

@ -3,7 +3,7 @@ using System;
namespace WF_WebAdmin.Converter namespace WF_WebAdmin.Converter
{ {
public class QuoteDTO public class QuoteDto
{ {
public int Id { get; set; } public int Id { get; set; }
public string Content { get; set; } public string Content { get; set; }
@ -21,7 +21,7 @@ namespace WF_WebAdmin.Converter
public int? IdImg { get; set; } public int? IdImg { get; set; }
public string ImgPath { get; set; } public string ImgPath { get; set; }
public QuoteDTO(int id_quote,string content,int likes,string langue,bool isValide,string? reason,int? id_caracter,string name_charac,int? id_source,string title,DateTime date,int? id_user_verif,string name_user ,int? id_img,string img_path) public QuoteDto(int id_quote,string content,int likes,string langue,bool isValide,string? reason,int? id_caracter,string name_charac,int? id_source,string title,DateTime date,int? id_user_verif,string name_user ,int? id_img,string img_path)
{ {
this.Id = id_quote; this.Id = id_quote;
this.Content = content; this.Content = content;

@ -4,13 +4,13 @@ namespace WF_WebAdmin.Converter
{ {
public class QuoteExtension public class QuoteExtension
{ {
public QuoteDTO QuoteToDTO(Quote q) public QuoteDto QuoteToDTO(Quote q)
{ {
QuoteDTO quote = new QuoteDTO(q.Id, q.Content, q.Like, q.Langue, q.IsValid,null, null,q.Charac,null,q.TitleSrc,q.DateSrc,null,q.UserProposition,null,q.ImgPath); QuoteDto quote = new QuoteDto(q.Id, q.Content, q.Like, q.Langue, q.IsValid,null, null,q.Charac,null,q.TitleSrc,q.DateSrc,null,q.UserProposition,null,q.ImgPath);
return quote; return quote;
} }
public Quote DTOToQuote(QuoteDTO q) public Quote DTOToQuote(QuoteDto q)
{ {
Quote quote = new Quote(q.Id, q.Content,q.NameCharac,q.ImgPath,q.TitleSrc,q.DateSrc,q.Likes,q.Langue,q.NameUser,q.IsValide); Quote quote = new Quote(q.Id, q.Content,q.NameCharac,q.ImgPath,q.TitleSrc,q.DateSrc,q.Likes,q.Langue,q.NameUser,q.IsValide);
return quote; return quote;

@ -2,7 +2,7 @@
namespace WF_WebAdmin.Converter namespace WF_WebAdmin.Converter
{ {
public class UserDTO public class UserDto
{ {
public string Image { get; set; } public string Image { get; set; }
public string Name { get; set; } public string Name { get; set; }
@ -12,7 +12,7 @@ namespace WF_WebAdmin.Converter
public Boolean IsAdmin { get; set; } public Boolean IsAdmin { get; set; }
public List<Commentary>? Comments { get; set; } public List<Commentary>? Comments { get; set; }
public UserDTO(string image, string name, string email, DateTime dateCreation) public UserDto(string image, string name, string email, DateTime dateCreation)
{ {
this.Image = image; this.Image = image;

@ -4,15 +4,15 @@ namespace WF_WebAdmin.Converter
{ {
public class UserExtension public class UserExtension
{ {
public User UserToDTO(UserDTO u) public User UserToDto(UserDto u)
{ {
User user = new User(u.Image, u.Name, u.Email, u.DateCreation,u.IsAdmin); var user = new User(u.Image, u.Name, u.Email, u.DateCreation,u.IsAdmin);
return user; return user;
} }
public UserDTO DTOToUser(User u) public UserDto DtoToUser(User u)
{ {
UserDTO user = new UserDTO(u.Image, u.Name, u.Email, u.DateCreation); var user = new UserDto(u.Image ?? "default.png", u.Name ?? "Bob", u.Email ?? "bob@mail.com", u.DateCreation);
return user; return user;
} }
} }

@ -12,13 +12,12 @@ namespace WF_WebAdmin.Model
{ {
public static partial class LoggerSaveStub public static partial class LoggerSaveStub
{ {
public static void Log(ILogger logs,LogLevel logLevel,string message) public static void Log(ILogger logs, LogLevel logLevel, string message, params object[] args)
{ {
ILogsService logsService = new LogsServiceStub(); ILogsService logsService = new LogsServiceStub();
logsService.addLogs( new Logs( logLevel , message ) ); logsService.addLogs(new Logs(logLevel, string.Format(message, args)));
logs.Log(logLevel, message ); logs.Log(logLevel, message, args);
} }
} }
} }

@ -12,19 +12,6 @@ namespace WF_WebAdmin.Model
public bool IsValid { get; set; } public bool IsValid { get; set; }
public string UserProposition { get; set; } public string UserProposition { get; set; }
public Quiz(int id, string question, string answerA, string answerB, string answerC, string answerD, string cAnswer, bool isValid, string userProposition)
{
Id = id;
Question = question;
AnswerA = answerA;
AnswerB = answerB;
AnswerC = answerC;
AnswerD = answerD;
CAnswer = cAnswer;
IsValid = isValid;
UserProposition = userProposition;
}
public Quiz(int id, string question, string answerA, string answerB, string answerC, string answerD, string cAnswer) public Quiz(int id, string question, string answerA, string answerB, string answerC, string answerD, string cAnswer)
{ {
Id = id; Id = id;
@ -38,7 +25,5 @@ namespace WF_WebAdmin.Model
UserProposition = "Admin"; UserProposition = "Admin";
} }
public Quiz() {}
} }
} }

@ -4,8 +4,8 @@
{ {
public int Id { get; set; } public int Id { get; set; }
public string? Image { get; set; } public string? Image { get; set; }
public string Name { get; set; } public string? Name { get; set; }
public string Email { get; set; } public string? Email { get; set; }
public DateTime DateCreation { get; set; } public DateTime DateCreation { get; set; }
public Boolean IsAdmin { get; set; } public Boolean IsAdmin { get; set; }

@ -5,9 +5,9 @@ namespace WF_WebAdmin.Model
{ {
public int Id { get; set; } public int Id { get; set; }
public string? Image { get; set; } public string? Image { get; set; }
public string Name { get; set;} public string? Name { get; set;}
public Boolean IsAdmin { get; set; } public Boolean IsAdmin { get; set; }
public string Mdp { get; set; } public string? Mdp { get; set; }
public UserLogin(int id,string image, string name, bool isAdmin, string mdp) public UserLogin(int id,string image, string name, bool isAdmin, string mdp)
{ {
Id = id; Id = id;

@ -1,17 +1,37 @@
@page "/commentary-chart" @page "/commentary-chart"
@using MudBlazor
<MudCard Class="p-4"> <h1>Nombre de commentaires par mois</h1>
<MudCardContent>
<h3 class="text-center mb-4">Statistiques des Commentaires - Année @SelectedYear</h3>
<MudSelect T="int" Label="Sélectionner l'année" @bind-SelectedValue="SelectedYear" Dense="true" Immediate="true" OnValueChanged="UpdateChartData"> <MudChart ChartType="ChartType.Bar" ChartSeries="@Series" @bind-SelectedIndex="Index" LegendPosition="Position.Bottom" XAxisLabels="@XAxisLabels" Width="100%" Height="350px"></MudChart>
@foreach (var year in AvailableYears)
@code {
private int Index = -1;
private List<ChartSeries> Series = new();
private string[] XAxisLabels = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
[Inject] private WF_WebAdmin.Service.ICommentaryService CommentaryService { get; set; } = default!;
protected override async Task OnInitializedAsync()
{
var comments = await CommentaryService.GetCommentsAsync();
var groupedData = comments.GroupBy(c => c.DateCreation.Month)
.OrderBy(g => g.Key)
.Select(g => new { Month = g.Key - 1, Value = g.Count() })
.ToList();
double[] data = new double[12];
foreach (var item in groupedData)
{ {
<MudSelectItem T="int" Value="@year">@year</MudSelectItem> data[item.Month] = item.Value;
} }
</MudSelect>
<MudChart ChartType="ChartType.Bar" Labels="@Labels" Data="@ChartData" /> Series = new List<ChartSeries>
</MudCardContent> {
</MudCard> new ChartSeries
{
Name = "",
Data = data
}
};
}
}

@ -1,72 +0,0 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using WF_WebAdmin.Model;
using WF_WebAdmin.Service;
namespace WF_WebAdmin.Pages
{
public partial class CommentaryChart : ComponentBase
{
[Inject] public ICommentaryService CommentaryService { get; set; } = default!;
public List<string> Labels { get; set; } = new();
public List<double[]> ChartData { get; set; } = new();
public List<int> AvailableYears { get; set; } = new();
public int SelectedYear { get; set; }
private List<Commentary> AllComments = new();
protected override async Task OnInitializedAsync()
{
// Charger tous les commentaires
AllComments = await CommentaryService.GetCommentsAsync();
if (!AllComments.Any())
{
Labels = new List<string> { "Aucun commentaire" };
ChartData = new List<double[]> { new double[] { 0 } };
return;
}
AvailableYears = AllComments
.Select(c => c.DateCreation.Year)
.Distinct()
.OrderBy(y => y)
.ToList();
SelectedYear = AvailableYears.Max();
UpdateChartData(SelectedYear);
}
private void UpdateChartData(int newYear)
{
SelectedYear = newYear;
var filteredComments = AllComments
.Where(c => c.DateCreation.Year == SelectedYear)
.ToList();
if (!filteredComments.Any())
{
Labels = new List<string> { "Aucun commentaire" };
ChartData = new List<double[]> { new double[] { 0 } };
return;
}
var grouped = Enumerable.Range(1, 12)
.ToDictionary(
month => new DateTime(SelectedYear, month, 1).ToString("MMMM", CultureInfo.InvariantCulture),
month => filteredComments.Count(c => c.DateCreation.Month == month)
);
Labels = grouped.Keys.ToList();
ChartData = new List<double[]> { grouped.Values.Select(v => (double)v).ToArray() };
}
}
}

@ -21,7 +21,7 @@ namespace WF_WebAdmin.Service
} }
var json = await File.ReadAllTextAsync(_jsonFilePath); var json = await File.ReadAllTextAsync(_jsonFilePath);
var dtoList = JsonSerializer.Deserialize<List<CommentaryDTO>>(json) ?? new List<CommentaryDTO>(); var dtoList = JsonSerializer.Deserialize<List<CommentaryDto>>(json) ?? new List<CommentaryDto>();
var comments = dtoList.ConvertAll(dto => dto.ToModel()); var comments = dtoList.ConvertAll(dto => dto.ToModel());

@ -11,20 +11,20 @@ namespace WF_WebAdmin.Service
/// <summary> /// <summary>
/// Asynchronously adds a new quote to the database and returns the corresponding <see cref="QuoteDTO"/>. /// Asynchronously adds a new quote to the database and returns the corresponding <see cref="QuoteDto"/>.
/// </summary> /// </summary>
/// <param name="quote">The <see cref="Quote"/> object to be added to the database.</param> /// <param name="quote">The <see cref="Quote"/> object to be added to the database.</param>
/// <returns>A task representing the asynchronous operation, with a <see cref="QuoteDTO"/> result containing the added quote's data.</returns> /// <returns>A task representing the asynchronous operation, with a <see cref="QuoteDto"/> result containing the added quote's data.</returns>
/// <remarks> /// <remarks>
/// This method converts the provided <see cref="Quote"/> object into a <see cref="QuoteDTO"/> using <see cref="QuoteExtension"/>. /// This method converts the provided <see cref="Quote"/> object into a <see cref="QuoteDto"/> using <see cref="QuoteExtension"/>.
/// It then inserts the quote into the PostgreSQL database using a parameterized SQL query with the help of Npgsql. /// It then inserts the quote into the PostgreSQL database using a parameterized SQL query with the help of Npgsql.
/// After successfully inserting the quote, the corresponding <see cref="QuoteDTO"/> is returned to the caller. /// After successfully inserting the quote, the corresponding <see cref="QuoteDto"/> is returned to the caller.
/// Error handling is in place to catch any issues during the database insertion process, with the exception message logged in case of failure. /// Error handling is in place to catch any issues during the database insertion process, with the exception message logged in case of failure.
/// </remarks> /// </remarks>
public async Task<QuoteDTO> AddQuoteAsync(Quote quote) public async Task<QuoteDto> AddQuoteAsync(Quote quote)
{ {
QuoteExtension extension = new QuoteExtension(); QuoteExtension extension = new QuoteExtension();
QuoteDTO quoteDTO = extension.QuoteToDTO(quote); QuoteDto quoteDTO = extension.QuoteToDTO(quote);
// Utilisation de NpgsqlConnection pour PostgreSQL // Utilisation de NpgsqlConnection pour PostgreSQL
using (var connection = new NpgsqlConnection(_connectionString)) using (var connection = new NpgsqlConnection(_connectionString))
@ -75,12 +75,12 @@ namespace WF_WebAdmin.Service
/// <summary> /// <summary>
/// Asynchronously handles the removal of a quote and returns the corresponding <see cref="QuoteDTO"/>. /// Asynchronously handles the removal of a quote and returns the corresponding <see cref="QuoteDto"/>.
/// </summary> /// </summary>
/// <param name="quote">The <see cref="Quote"/> object to be removed.</param> /// <param name="quote">The <see cref="Quote"/> object to be removed.</param>
/// <returns>A task representing the asynchronous operation, with a <see cref="QuoteDTO"/> result corresponding to the removed quote.</returns> /// <returns>A task representing the asynchronous operation, with a <see cref="QuoteDto"/> result corresponding to the removed quote.</returns>
/// <remarks> /// <remarks>
/// This method takes a <see cref="Quote"/> object, converts it into a <see cref="QuoteDTO"/> using the /// This method takes a <see cref="Quote"/> object, converts it into a <see cref="QuoteDto"/> using the
/// <see cref="QuoteExtension"/>, and then returns the DTO. Note that while this function is named `RemoveQuote`, /// <see cref="QuoteExtension"/>, and then returns the DTO. Note that while this function is named `RemoveQuote`,
/// it currently only converts the quote to a DTO and does not actually perform any database removal operation. /// it currently only converts the quote to a DTO and does not actually perform any database removal operation.
/// You may need to implement additional logic to remove the quote from the database. /// You may need to implement additional logic to remove the quote from the database.
@ -88,7 +88,7 @@ namespace WF_WebAdmin.Service
public Task RemoveQuote(Quote quote) public Task RemoveQuote(Quote quote)
{ {
QuoteExtension extension = new QuoteExtension(); QuoteExtension extension = new QuoteExtension();
QuoteDTO quoteDTO = extension.QuoteToDTO(quote); QuoteDto quoteDTO = extension.QuoteToDTO(quote);
// Return the DTO as the result of this asynchronous operation (though no removal logic is currently implemented) // Return the DTO as the result of this asynchronous operation (though no removal logic is currently implemented)
return Task.FromResult(quoteDTO); return Task.FromResult(quoteDTO);
@ -96,12 +96,12 @@ namespace WF_WebAdmin.Service
/// <summary> /// <summary>
/// Asynchronously validates a quote and returns the corresponding <see cref="QuoteDTO"/>. /// Asynchronously validates a quote and returns the corresponding <see cref="QuoteDto"/>.
/// </summary> /// </summary>
/// <param name="quote">The <see cref="Quote"/> object to be validated.</param> /// <param name="quote">The <see cref="Quote"/> object to be validated.</param>
/// <returns>A task representing the asynchronous operation, with a <see cref="QuoteDTO"/> result corresponding to the validated quote.</returns> /// <returns>A task representing the asynchronous operation, with a <see cref="QuoteDto"/> result corresponding to the validated quote.</returns>
/// <remarks> /// <remarks>
/// This method takes a <see cref="Quote"/> object, converts it into a <see cref="QuoteDTO"/> using the /// This method takes a <see cref="Quote"/> object, converts it into a <see cref="QuoteDto"/> using the
/// <see cref="QuoteExtension"/>, and returns the DTO. The method is named `validQuote`, but currently, it only /// <see cref="QuoteExtension"/>, and returns the DTO. The method is named `validQuote`, but currently, it only
/// converts the quote into a DTO and does not perform any actual validation logic. /// converts the quote into a DTO and does not perform any actual validation logic.
/// If you intend to validate the quote (e.g., updating its status in a database), you will need to implement /// If you intend to validate the quote (e.g., updating its status in a database), you will need to implement
@ -110,7 +110,7 @@ namespace WF_WebAdmin.Service
public Task validQuote(Quote quote) public Task validQuote(Quote quote)
{ {
QuoteExtension extension = new QuoteExtension(); QuoteExtension extension = new QuoteExtension();
QuoteDTO quoteDTO = extension.QuoteToDTO(quote); QuoteDto quoteDTO = extension.QuoteToDTO(quote);
// Return the DTO as the result of this asynchronous operation (though no validation logic is currently implemented) // Return the DTO as the result of this asynchronous operation (though no validation logic is currently implemented)
return Task.FromResult(quoteDTO); return Task.FromResult(quoteDTO);
@ -118,12 +118,12 @@ namespace WF_WebAdmin.Service
/// <summary> /// <summary>
/// Asynchronously updates a quote and returns the corresponding <see cref="QuoteDTO"/>. /// Asynchronously updates a quote and returns the corresponding <see cref="QuoteDto"/>.
/// </summary> /// </summary>
/// <param name="quote">The <see cref="Quote"/> object to be updated.</param> /// <param name="quote">The <see cref="Quote"/> object to be updated.</param>
/// <returns>A task representing the asynchronous operation, with a <see cref="QuoteDTO"/> result corresponding to the updated quote.</returns> /// <returns>A task representing the asynchronous operation, with a <see cref="QuoteDto"/> result corresponding to the updated quote.</returns>
/// <remarks> /// <remarks>
/// This method takes a <see cref="Quote"/> object, converts it into a <see cref="QuoteDTO"/> using the /// This method takes a <see cref="Quote"/> object, converts it into a <see cref="QuoteDto"/> using the
/// <see cref="QuoteExtension"/>, and returns the DTO. The method is named `updateQuote`, but currently, it only /// <see cref="QuoteExtension"/>, and returns the DTO. The method is named `updateQuote`, but currently, it only
/// converts the quote into a DTO and does not perform any actual update logic. /// converts the quote into a DTO and does not perform any actual update logic.
/// If you intend to update the quote (e.g., modifying the quote in a database or data source), /// If you intend to update the quote (e.g., modifying the quote in a database or data source),
@ -132,7 +132,7 @@ namespace WF_WebAdmin.Service
public Task updateQuote(Quote quote) public Task updateQuote(Quote quote)
{ {
QuoteExtension extension = new QuoteExtension(); QuoteExtension extension = new QuoteExtension();
QuoteDTO quoteDTO = extension.QuoteToDTO(quote); QuoteDto quoteDTO = extension.QuoteToDTO(quote);
// Return the DTO as the result of this asynchronous operation (though no update logic is currently implemented) // Return the DTO as the result of this asynchronous operation (though no update logic is currently implemented)
return Task.FromResult(quoteDTO); return Task.FromResult(quoteDTO);

@ -2,65 +2,66 @@
@inject UserLogin uLogin @inject UserLogin uLogin
<div class="top-row ps-3 navbar navbar-dark"> <div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="">What the Fantasy</a> <a class="navbar-brand" href="">What the Fantasy</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu"> <button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
</div> </div>
</div> </div>
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu"> <div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
<nav class="flex-column"> <nav class="flex-column">
<div class="nav-item px-3"> <div class="nav-item px-3">
<NavLink class="nav-link" href=""> <NavLink class="nav-link" href="">
<span class="oi oi-plus" aria-hidden="true"></span> Accueil 🏠 Accueil
</NavLink> </NavLink>
</div> </div>
<div class="nav-item px-3"> <div class="nav-item px-3">
<NavLink class="nav-link" href="ValidQuote"> <NavLink class="nav-link" href="ValidQuote">
<span class="oi oi-list-rich" aria-hidden="true"></span> Validation de citations 📜 Validation de citations
</NavLink> </NavLink>
</div> </div>
<div class="nav-item px-3"> <div class="nav-item px-3">
<NavLink class="nav-link" href="ValidQuiz"> <NavLink class="nav-link" href="ValidQuiz">
<span class="oi oi-list-rich" aria-hidden="true"></span> Validation de quiz 📝 Validation de quiz
</NavLink> </NavLink>
</div> </div>
<div class="nav-item px-3"> <div class="nav-item px-3">
<NavLink class="nav-link" href="deleteuser"> <NavLink class="nav-link" href="deleteuser">
<span class="oi oi-list-rich" aria-hidden="true"></span> Gestion des utilisateurs 👤 Gestion des utilisateurs
</NavLink> </NavLink>
</div> </div>
<div class="nav-item px-3"> <div class="nav-item px-3">
<NavLink class="nav-link" href="modifquote"> <NavLink class="nav-link" href="modifquote">
<span class="oi oi-list-rich" aria-hidden="true"></span> Gestion des citations ✍️ Gestion des citations
</NavLink> </NavLink>
</div> </div>
<div class="nav-item px-3"> <div class="nav-item px-3">
<NavLink class="nav-link" href="modifquiz"> <NavLink class="nav-link" href="modifquiz">
<span class="oi oi-list-rich" aria-hidden="true"></span> Gestion des Question ❓ Gestion des questions
</NavLink> </NavLink>
</div> </div>
<div class="nav-item px-3"> <div class="nav-item px-3">
<NavLink class="nav-link" href="logs"> <NavLink class="nav-link" href="logs">
<span class="oi oi-list-rich" aria-hidden="true"></span> Logs 📊 Logs
</NavLink> </NavLink>
</div> </div>
<div class="nav-item px-3"> <div class="nav-item px-3">
<MudNavLink class="nav-link" Href="/commentary-chart"> <NavLink class="nav-link" href="/commentary-chart">
<span class="oi oi-list-rich" aria-hidden="true"></span> Stats commentaires 📈 Stats commentaires
</MudNavLink> </NavLink>
</div> </div>
</nav> </nav>
</div> </div>
@code { @code {
private bool collapseNavMenu = true; private bool collapseNavMenu = true;

@ -1,359 +1,702 @@
[ [
{ {
"id_comment": 1, "id_comment": 1,
"quote": 1, "quote": 19,
"users": 1, "users": 29,
"dateC": "2024-10-10", "dateC": "2024-01-22",
"comment": "coucou" "comment": "Citation magnifique."
}, },
{ {
"id_comment": 2, "id_comment": 2,
"quote": 1, "quote": 6,
"users": 2, "users": 18,
"dateC": "2024-10-11", "dateC": "2024-01-20",
"comment": "Super citation !" "comment": "Paroles sages."
}, },
{ {
"id_comment": 3, "id_comment": 3,
"quote": 1, "quote": 2,
"users": 3, "users": 8,
"dateC": "2024-10-12", "dateC": "2024-01-25",
"comment": "Très inspirant." "comment": "Citation puissante."
}, },
{ {
"id_comment": 4, "id_comment": 4,
"quote": 2, "quote": 11,
"users": 4, "users": 31,
"dateC": "2024-10-13", "dateC": "2024-01-01",
"comment": "J'adore cette phrase." "comment": "Très poétique."
}, },
{ {
"id_comment": 5, "id_comment": 5,
"quote": 2, "quote": 8,
"users": 5, "users": 6,
"dateC": "2024-10-14", "dateC": "2024-02-06",
"comment": "Citation profonde." "comment": "Belle pensée."
}, },
{ {
"id_comment": 6, "id_comment": 6,
"quote": 2, "quote": 13,
"users": 6, "users": 37,
"dateC": "2024-10-15", "dateC": "2024-02-01",
"comment": "Belle pensée." "comment": "Citation exceptionnelle."
}, },
{ {
"id_comment": 7, "id_comment": 7,
"quote": 3, "quote": 2,
"users": 7, "users": 33,
"dateC": "2024-10-16", "dateC": "2024-02-11",
"comment": "Très motivant." "comment": "Belle pensée."
}, },
{ {
"id_comment": 8, "id_comment": 8,
"quote": 3, "quote": 7,
"users": 8, "users": 28,
"dateC": "2024-10-17", "dateC": "2024-02-07",
"comment": "Citation puissante." "comment": "Très émouvant."
}, },
{ {
"id_comment": 9, "id_comment": 9,
"quote": 3, "quote": 1,
"users": 9, "users": 48,
"dateC": "2024-10-18", "dateC": "2024-03-05",
"comment": "Paroles sages." "comment": "Très motivant."
}, },
{ {
"id_comment": 10, "id_comment": 10,
"quote": 4, "quote": 16,
"users": 10, "users": 14,
"dateC": "2024-10-19", "dateC": "2024-03-13",
"comment": "Très réfléchi." "comment": "Très motivant."
}, },
{ {
"id_comment": 11, "id_comment": 11,
"quote": 4, "quote": 10,
"users": 11, "users": 9,
"dateC": "2024-10-20", "dateC": "2024-03-13",
"comment": "Citation magnifique." "comment": "Très touchant."
}, },
{ {
"id_comment": 12, "id_comment": 12,
"quote": 4, "quote": 4,
"users": 12, "users": 44,
"dateC": "2024-10-21", "dateC": "2024-03-01",
"comment": "Très touchant." "comment": "Très touchant."
}, },
{ {
"id_comment": 13, "id_comment": 13,
"quote": 5, "quote": 9,
"users": 13, "users": 8,
"dateC": "2024-10-22", "dateC": "2024-04-04",
"comment": "Citation parfaite." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 14, "id_comment": 14,
"quote": 5, "quote": 3,
"users": 14, "users": 49,
"dateC": "2024-10-23", "dateC": "2024-04-18",
"comment": "Très émouvant." "comment": "Très émouvant."
}, },
{ {
"id_comment": 15, "id_comment": 15,
"quote": 5, "quote": 19,
"users": 15, "users": 3,
"dateC": "2024-10-24", "dateC": "2024-04-07",
"comment": "Citation merveilleuse." "comment": "Très motivant."
}, },
{ {
"id_comment": 16, "id_comment": 16,
"quote": 6, "quote": 4,
"users": 16, "users": 9,
"dateC": "2024-10-25", "dateC": "2024-04-25",
"comment": "Très poétique." "comment": "Très motivant."
}, },
{ {
"id_comment": 17, "id_comment": 17,
"quote": 6, "quote": 17,
"users": 17, "users": 40,
"dateC": "2024-10-26", "dateC": "2024-05-04",
"comment": "Citation exceptionnelle." "comment": "Très émouvant."
}, },
{ {
"id_comment": 18, "id_comment": 18,
"quote": 6, "quote": 6,
"users": 18, "users": 21,
"dateC": "2024-10-27", "dateC": "2024-05-11",
"comment": "Très inspirant." "comment": "Très poétique."
}, },
{ {
"id_comment": 19, "id_comment": 19,
"quote": 7, "quote": 16,
"users": 19, "users": 3,
"dateC": "2024-10-28", "dateC": "2024-05-08",
"comment": "J'adore cette phrase." "comment": "Citation exceptionnelle."
}, },
{ {
"id_comment": 20, "id_comment": 20,
"quote": 7, "quote": 1,
"users": 20, "users": 17,
"dateC": "2024-10-29", "dateC": "2024-05-04",
"comment": "Citation profonde." "comment": "Très touchant."
}, },
{ {
"id_comment": 21, "id_comment": 21,
"quote": 7, "quote": 14,
"users": 21, "users": 34,
"dateC": "2024-08-30", "dateC": "2024-06-01",
"comment": "Belle pensée." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 22, "id_comment": 22,
"quote": 8, "quote": 12,
"users": 22, "users": 23,
"dateC": "2024-10-31", "dateC": "2024-06-03",
"comment": "Très motivant." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 23, "id_comment": 23,
"quote": 8, "quote": 11,
"users": 23, "users": 47,
"dateC": "2024-11-01", "dateC": "2024-06-05",
"comment": "Citation puissante." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 24, "id_comment": 24,
"quote": 8, "quote": 16,
"users": 24, "users": 28,
"dateC": "2024-11-02", "dateC": "2024-06-07",
"comment": "Paroles sages." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 25, "id_comment": 25,
"quote": 9, "quote": 19,
"users": 25, "users": 39,
"dateC": "2024-11-03", "dateC": "2024-07-01",
"comment": "Très réfléchi." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 26, "id_comment": 26,
"quote": 9, "quote": 13,
"users": 26, "users": 31,
"dateC": "2024-11-04", "dateC": "2024-07-02",
"comment": "Citation magnifique." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 27, "id_comment": 27,
"quote": 9, "quote": 1,
"users": 27, "users": 33,
"dateC": "2024-11-05", "dateC": "2024-07-03",
"comment": "Très touchant." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 28, "id_comment": 28,
"quote": 10, "quote": 17,
"users": 28, "users": 20,
"dateC": "2024-11-06", "dateC": "2024-07-04",
"comment": "Citation parfaite." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 29, "id_comment": 29,
"quote": 10, "quote": 13,
"users": 29, "users": 29,
"dateC": "2024-11-07", "dateC": "2024-08-01",
"comment": "Très émouvant." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 30, "id_comment": 30,
"quote": 10, "quote": 11,
"users": 30, "users": 27,
"dateC": "2024-11-08", "dateC": "2024-08-02",
"comment": "Citation merveilleuse." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 31, "id_comment": 31,
"quote": 11, "quote": 18,
"users": 31, "users": 35,
"dateC": "2024-11-09", "dateC": "2024-08-03",
"comment": "Très poétique." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 32, "id_comment": 32,
"quote": 11, "quote": 13,
"users": 32, "users": 32,
"dateC": "2024-11-10", "dateC": "2024-08-04",
"comment": "Citation exceptionnelle." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 33, "id_comment": 33,
"quote": 11, "quote": 13,
"users": 33, "users": 3,
"dateC": "2024-11-11", "dateC": "2024-09-01",
"comment": "Très inspirant." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 34, "id_comment": 34,
"quote": 12, "quote": 15,
"users": 34, "users": 43,
"dateC": "2024-11-12", "dateC": "2024-09-02",
"comment": "J'adore cette phrase." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 35, "id_comment": 35,
"quote": 12, "quote": 11,
"users": 35, "users": 15,
"dateC": "2024-11-13", "dateC": "2024-09-03",
"comment": "Citation profonde." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 36, "id_comment": 36,
"quote": 12, "quote": 10,
"users": 36, "users": 22,
"dateC": "2024-11-14", "dateC": "2024-09-04",
"comment": "Belle pensée." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 37, "id_comment": 37,
"quote": 13, "quote": 17,
"users": 37, "users": 23,
"dateC": "2024-11-15", "dateC": "2024-10-01",
"comment": "Très motivant." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 38, "id_comment": 38,
"quote": 13, "quote": 14,
"users": 38, "users": 40,
"dateC": "2024-11-16", "dateC": "2024-10-02",
"comment": "Citation puissante." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 39, "id_comment": 39,
"quote": 13, "quote": 15,
"users": 39, "users": 41,
"dateC": "2024-11-17", "dateC": "2024-10-03",
"comment": "Paroles sages." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 40, "id_comment": 40,
"quote": 14, "quote": 16,
"users": 40, "users": 42,
"dateC": "2024-11-18", "dateC": "2024-10-04",
"comment": "Très réfléchi." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 41, "id_comment": 41,
"quote": 14, "quote": 10,
"users": 41, "users": 39,
"dateC": "2024-11-19", "dateC": "2024-11-01",
"comment": "Citation magnifique." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 42, "id_comment": 42,
"quote": 14, "quote": 17,
"users": 42, "users": 43,
"dateC": "2024-11-20", "dateC": "2024-11-02",
"comment": "Très touchant." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 43, "id_comment": 43,
"quote": 15, "quote": 13,
"users": 43, "users": 27,
"dateC": "2024-11-21", "dateC": "2024-11-03",
"comment": "Citation parfaite." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 44, "id_comment": 44,
"quote": 15, "quote": 12,
"users": 44, "users": 29,
"dateC": "2024-11-22", "dateC": "2024-11-04",
"comment": "Très émouvant." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 45, "id_comment": 45,
"quote": 15, "quote": 11,
"users": 45, "users": 32,
"dateC": "2024-11-23", "dateC": "2024-12-01",
"comment": "Citation merveilleuse." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 46, "id_comment": 46,
"quote": 16, "quote": 15,
"users": 46, "users": 31,
"dateC": "2024-11-24", "dateC": "2024-12-02",
"comment": "Très poétique." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 47, "id_comment": 47,
"quote": 16, "quote": 18,
"users": 47, "users": 33,
"dateC": "2024-11-25", "dateC": "2024-12-03",
"comment": "Citation exceptionnelle." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 48, "id_comment": 48,
"quote": 16, "quote": 14,
"users": 48, "users": 34,
"dateC": "2024-11-26", "dateC": "2024-12-04",
"comment": "Très inspirant." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 49, "id_comment": 49,
"quote": 17, "quote": 19,
"users": 49, "users": 35,
"dateC": "2024-11-27", "dateC": "2024-12-05",
"comment": "J'adore cette phrase." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 50, "id_comment": 50,
"quote": 17, "quote": 17,
"users": 50, "users": 36,
"dateC": "2024-11-28", "dateC": "2024-12-06",
"comment": "Citation profonde." "comment": "Citation magnifique."
}, },
{ {
"id_comment": 51, "id_comment": 51,
"quote": 16,
"users": 37,
"dateC": "2024-12-07",
"comment": "Citation magnifique."
},
{
"id_comment": 52,
"quote": 13,
"users": 38,
"dateC": "2024-12-08",
"comment": "Citation magnifique."
},
{
"id_comment": 53,
"quote": 12,
"users": 39,
"dateC": "2024-12-09",
"comment": "Citation magnifique."
},
{
"id_comment": 54,
"quote": 11,
"users": 40,
"dateC": "2024-12-10",
"comment": "Citation magnifique."
},
{
"id_comment": 55,
"quote": 10,
"users": 41,
"dateC": "2024-12-11",
"comment": "Citation magnifique."
},
{
"id_comment": 56,
"quote": 9,
"users": 42,
"dateC": "2024-12-12",
"comment": "Citation magnifique."
},
{
"id_comment": 57,
"quote": 8,
"users": 43,
"dateC": "2024-12-13",
"comment": "Citation magnifique."
},
{
"id_comment": 58,
"quote": 7,
"users": 44,
"dateC": "2024-12-14",
"comment": "Citation magnifique."
},
{
"id_comment": 59,
"quote": 6,
"users": 45,
"dateC": "2024-12-15",
"comment": "Citation magnifique."
},
{
"id_comment": 60,
"quote": 5,
"users": 46,
"dateC": "2024-12-16",
"comment": "Citation magnifique."
},
{
"id_comment": 61,
"quote": 4,
"users": 47,
"dateC": "2024-12-17",
"comment": "Citation magnifique."
},
{
"id_comment": 62,
"quote": 3,
"users": 48,
"dateC": "2024-12-18",
"comment": "Citation magnifique."
},
{
"id_comment": 63,
"quote": 2,
"users": 49,
"dateC": "2024-12-19",
"comment": "Citation magnifique."
},
{
"id_comment": 64,
"quote": 1,
"users": 50,
"dateC": "2024-12-20",
"comment": "Citation magnifique."
},
{
"id_comment": 65,
"quote": 19,
"users": 1,
"dateC": "2024-12-21",
"comment": "Citation magnifique."
},
{
"id_comment": 66,
"quote": 18,
"users": 2,
"dateC": "2024-12-22",
"comment": "Citation magnifique."
},
{
"id_comment": 67,
"quote": 17, "quote": 17,
"users": 51, "users": 3,
"dateC": "2024-11-29", "dateC": "2024-12-23",
"comment": "Belle pensée." "comment": "Citation magnifique."
},
{
"id_comment": 68,
"quote": 16,
"users": 4,
"dateC": "2024-12-24",
"comment": "Citation magnifique."
},
{
"id_comment": 69,
"quote": 15,
"users": 5,
"dateC": "2024-12-25",
"comment": "Citation magnifique."
},
{
"id_comment": 70,
"quote": 14,
"users": 6,
"dateC": "2024-12-26",
"comment": "Citation magnifique."
},
{
"id_comment": 71,
"quote": 13,
"users": 7,
"dateC": "2024-12-27",
"comment": "Citation magnifique."
},
{
"id_comment": 72,
"quote": 12,
"users": 8,
"dateC": "2024-12-28",
"comment": "Citation magnifique."
},
{
"id_comment": 73,
"quote": 11,
"users": 9,
"dateC": "2024-01-01",
"comment": "Citation magnifique."
},
{
"id_comment": 74,
"quote": 10,
"users": 10,
"dateC": "2024-01-02",
"comment": "Citation magnifique."
},
{
"id_comment": 75,
"quote": 9,
"users": 11,
"dateC": "2024-01-03",
"comment": "Citation magnifique."
},
{
"id_comment": 76,
"quote": 8,
"users": 12,
"dateC": "2024-01-04",
"comment": "Citation magnifique."
},
{
"id_comment": 77,
"quote": 7,
"users": 13,
"dateC": "2024-01-05",
"comment": "Citation magnifique."
},
{
"id_comment": 78,
"quote": 6,
"users": 14,
"dateC": "2024-01-06",
"comment": "Citation magnifique."
},
{
"id_comment": 79,
"quote": 5,
"users": 15,
"dateC": "2024-01-07",
"comment": "Citation magnifique."
},
{
"id_comment": 80,
"quote": 4,
"users": 16,
"dateC": "2024-01-08",
"comment": "Citation magnifique."
},
{
"id_comment": 81,
"quote": 3,
"users": 17,
"dateC": "2024-01-09",
"comment": "Citation magnifique."
},
{
"id_comment": 82,
"quote": 2,
"users": 18,
"dateC": "2024-01-10",
"comment": "Citation magnifique."
},
{
"id_comment": 83,
"quote": 15,
"users": 33,
"dateC": "2024-06-24",
"comment": "Citation exceptionnelle."
},
{
"id_comment": 84,
"quote": 19,
"users": 15,
"dateC": "2024-03-11",
"comment": "Citation merveilleuse."
},
{
"id_comment": 85,
"quote": 4,
"users": 16,
"dateC": "2024-01-19",
"comment": "Citation merveilleuse."
},
{
"id_comment": 86,
"quote": 10,
"users": 20,
"dateC": "2024-01-15",
"comment": "Très émouvant."
},
{
"id_comment": 87,
"quote": 3,
"users": 33,
"dateC": "2024-12-17",
"comment": "Très touchant."
},
{
"id_comment": 88,
"quote": 5,
"users": 8,
"dateC": "2024-07-01",
"comment": "Citation exceptionnelle."
},
{
"id_comment": 89,
"quote": 13,
"users": 28,
"dateC": "2024-02-20",
"comment": "Citation merveilleuse."
},
{
"id_comment": 90,
"quote": 18,
"users": 24,
"dateC": "2024-09-16",
"comment": "Citation merveilleuse."
},
{
"id_comment": 91,
"quote": 17,
"users": 43,
"dateC": "2024-06-20",
"comment": "Très réfléchi."
},
{
"id_comment": 92,
"quote": 13,
"users": 36,
"dateC": "2024-11-08",
"comment": "Super citation !"
},
{
"id_comment": 93,
"quote": 19,
"users": 41,
"dateC": "2024-01-20",
"comment": "Super citation !"
},
{
"id_comment": 94,
"quote": 13,
"users": 10,
"dateC": "2024-05-03",
"comment": "Citation magnifique."
},
{
"id_comment": 95,
"quote": 4,
"users": 49,
"dateC": "2024-07-01",
"comment": "Citation profonde."
},
{
"id_comment": 96,
"quote": 16,
"users": 21,
"dateC": "2024-11-08",
"comment": "Citation merveilleuse."
},
{
"id_comment": 97,
"quote": 14,
"users": 27,
"dateC": "2024-11-20",
"comment": "Citation puissante."
},
{
"id_comment": 98,
"quote": 4,
"users": 39,
"dateC": "2024-12-11",
"comment": "Très motivant."
},
{
"id_comment": 99,
"quote": 9,
"users": 26,
"dateC": "2024-09-27",
"comment": "Paroles sages."
},
{
"id_comment": 100,
"quote": 3,
"users": 42,
"dateC": "2024-02-12",
"comment": "Citation merveilleuse."
} }
] ]

@ -178,6 +178,7 @@
{ {
"LogLevel": 2, "LogLevel": 2,
"Message": "Random change of quote of the day" "Message": "Random change of quote of the day"
<<<<<<< HEAD
}, },
{ {
"LogLevel": 2, "LogLevel": 2,
@ -254,5 +255,7 @@
{ {
"LogLevel": 2, "LogLevel": 2,
"Message": "Random change of quote of the day" "Message": "Random change of quote of the day"
=======
>>>>>>> c9a9e592d46e0842b954daa1f9b008f8302e78ad
} }
] ]
Loading…
Cancel
Save