From 6aff34e98317550f293ebdb9825e775f94992a64 Mon Sep 17 00:00:00 2001 From: tomivt Date: Sat, 8 Feb 2025 22:08:42 +0100 Subject: [PATCH 1/5] Code Smells from Model --- WF-WebAdmin/WF-WebAdmin/Model/LoggerSaveStub.cs | 7 +++---- WF-WebAdmin/WF-WebAdmin/Model/Quiz.cs | 15 --------------- WF-WebAdmin/WF-WebAdmin/Model/User.cs | 4 ++-- WF-WebAdmin/WF-WebAdmin/Model/UserLogin.cs | 4 ++-- 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/WF-WebAdmin/WF-WebAdmin/Model/LoggerSaveStub.cs b/WF-WebAdmin/WF-WebAdmin/Model/LoggerSaveStub.cs index 9c8b0ae..e4b7df8 100644 --- a/WF-WebAdmin/WF-WebAdmin/Model/LoggerSaveStub.cs +++ b/WF-WebAdmin/WF-WebAdmin/Model/LoggerSaveStub.cs @@ -12,13 +12,12 @@ namespace WF_WebAdmin.Model { 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(); - logsService.addLogs( new Logs( logLevel , message ) ); + logsService.addLogs(new Logs(logLevel, string.Format(message, args))); - logs.Log(logLevel, message ); + logs.Log(logLevel, message, args); } } } diff --git a/WF-WebAdmin/WF-WebAdmin/Model/Quiz.cs b/WF-WebAdmin/WF-WebAdmin/Model/Quiz.cs index af6691a..4b5de4f 100644 --- a/WF-WebAdmin/WF-WebAdmin/Model/Quiz.cs +++ b/WF-WebAdmin/WF-WebAdmin/Model/Quiz.cs @@ -12,19 +12,6 @@ namespace WF_WebAdmin.Model public bool IsValid { 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) { Id = id; @@ -38,7 +25,5 @@ namespace WF_WebAdmin.Model UserProposition = "Admin"; } - public Quiz() {} - } } \ No newline at end of file diff --git a/WF-WebAdmin/WF-WebAdmin/Model/User.cs b/WF-WebAdmin/WF-WebAdmin/Model/User.cs index 5916a3f..1b8d7a5 100644 --- a/WF-WebAdmin/WF-WebAdmin/Model/User.cs +++ b/WF-WebAdmin/WF-WebAdmin/Model/User.cs @@ -4,8 +4,8 @@ { public int Id { get; set; } public string? Image { get; set; } - public string Name { get; set; } - public string Email { get; set; } + public string? Name { get; set; } + public string? Email { get; set; } public DateTime DateCreation { get; set; } public Boolean IsAdmin { get; set; } diff --git a/WF-WebAdmin/WF-WebAdmin/Model/UserLogin.cs b/WF-WebAdmin/WF-WebAdmin/Model/UserLogin.cs index 99c0121..74a4820 100644 --- a/WF-WebAdmin/WF-WebAdmin/Model/UserLogin.cs +++ b/WF-WebAdmin/WF-WebAdmin/Model/UserLogin.cs @@ -5,9 +5,9 @@ namespace WF_WebAdmin.Model { public int Id { get; set; } public string? Image { get; set; } - public string Name { get; set;} + public string? Name { 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) { Id = id; From 4be846cd0564ad5f88f5808513e2a6373f68120d Mon Sep 17 00:00:00 2001 From: tomivt Date: Sat, 8 Feb 2025 22:15:30 +0100 Subject: [PATCH 2/5] Code Smells from Converter --- .../WF-WebAdmin/Converter/CommentaryDto.cs | 2 +- .../Converter/CommentaryExtension.cs | 10 +++--- .../WF-WebAdmin/Converter/DailyQuoteDto.cs | 4 +-- .../Converter/DailyQuoteExtension.cs | 4 +-- WF-WebAdmin/WF-WebAdmin/Converter/QuoteDto.cs | 4 +-- .../WF-WebAdmin/Converter/QuoteExtension.cs | 6 ++-- WF-WebAdmin/WF-WebAdmin/Converter/UserDto.cs | 4 +-- .../WF-WebAdmin/Converter/UserExtension.cs | 8 ++--- .../Service/CommentaryServiceStub.cs | 2 +- .../WF-WebAdmin/Service/QuoteServiceLocal.cs | 36 +++++++++---------- 10 files changed, 40 insertions(+), 40 deletions(-) diff --git a/WF-WebAdmin/WF-WebAdmin/Converter/CommentaryDto.cs b/WF-WebAdmin/WF-WebAdmin/Converter/CommentaryDto.cs index 1ef4973..9bba523 100644 --- a/WF-WebAdmin/WF-WebAdmin/Converter/CommentaryDto.cs +++ b/WF-WebAdmin/WF-WebAdmin/Converter/CommentaryDto.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; namespace WF_WebAdmin.Converter { - public class CommentaryDTO + public class CommentaryDto { [JsonPropertyName("id_comment")] public int Id { get; set; } diff --git a/WF-WebAdmin/WF-WebAdmin/Converter/CommentaryExtension.cs b/WF-WebAdmin/WF-WebAdmin/Converter/CommentaryExtension.cs index 3e0dfb2..10ab464 100644 --- a/WF-WebAdmin/WF-WebAdmin/Converter/CommentaryExtension.cs +++ b/WF-WebAdmin/WF-WebAdmin/Converter/CommentaryExtension.cs @@ -1,12 +1,12 @@ using System; 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 Commentary ToModel(this CommentaryDTO dto) + public static Commentary ToModel(this CommentaryDto dto) { 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, IdUser = model.IdUser, diff --git a/WF-WebAdmin/WF-WebAdmin/Converter/DailyQuoteDto.cs b/WF-WebAdmin/WF-WebAdmin/Converter/DailyQuoteDto.cs index 0fb7042..5def23c 100644 --- a/WF-WebAdmin/WF-WebAdmin/Converter/DailyQuoteDto.cs +++ b/WF-WebAdmin/WF-WebAdmin/Converter/DailyQuoteDto.cs @@ -1,10 +1,10 @@ namespace WF_WebAdmin.Converter { - public class DailyQuoteDTO + public class DailyQuoteDto { private int Id { get; set; } - public DailyQuoteDTO(int id) + public DailyQuoteDto(int id) { this.Id = id; } diff --git a/WF-WebAdmin/WF-WebAdmin/Converter/DailyQuoteExtension.cs b/WF-WebAdmin/WF-WebAdmin/Converter/DailyQuoteExtension.cs index 63ec57e..85f24d5 100644 --- a/WF-WebAdmin/WF-WebAdmin/Converter/DailyQuoteExtension.cs +++ b/WF-WebAdmin/WF-WebAdmin/Converter/DailyQuoteExtension.cs @@ -4,9 +4,9 @@ namespace WF_WebAdmin.Converter { 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; } } diff --git a/WF-WebAdmin/WF-WebAdmin/Converter/QuoteDto.cs b/WF-WebAdmin/WF-WebAdmin/Converter/QuoteDto.cs index fc3e969..6e97418 100644 --- a/WF-WebAdmin/WF-WebAdmin/Converter/QuoteDto.cs +++ b/WF-WebAdmin/WF-WebAdmin/Converter/QuoteDto.cs @@ -3,7 +3,7 @@ using System; namespace WF_WebAdmin.Converter { - public class QuoteDTO + public class QuoteDto { public int Id { get; set; } public string Content { get; set; } @@ -21,7 +21,7 @@ namespace WF_WebAdmin.Converter public int? IdImg { 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.Content = content; diff --git a/WF-WebAdmin/WF-WebAdmin/Converter/QuoteExtension.cs b/WF-WebAdmin/WF-WebAdmin/Converter/QuoteExtension.cs index a7bd57f..35239e4 100644 --- a/WF-WebAdmin/WF-WebAdmin/Converter/QuoteExtension.cs +++ b/WF-WebAdmin/WF-WebAdmin/Converter/QuoteExtension.cs @@ -4,13 +4,13 @@ namespace WF_WebAdmin.Converter { 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; } - 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); return quote; diff --git a/WF-WebAdmin/WF-WebAdmin/Converter/UserDto.cs b/WF-WebAdmin/WF-WebAdmin/Converter/UserDto.cs index a7eb8b8..258a3ac 100644 --- a/WF-WebAdmin/WF-WebAdmin/Converter/UserDto.cs +++ b/WF-WebAdmin/WF-WebAdmin/Converter/UserDto.cs @@ -2,7 +2,7 @@ namespace WF_WebAdmin.Converter { - public class UserDTO + public class UserDto { public string Image { get; set; } public string Name { get; set; } @@ -12,7 +12,7 @@ namespace WF_WebAdmin.Converter public Boolean IsAdmin { get; set; } public List? 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; diff --git a/WF-WebAdmin/WF-WebAdmin/Converter/UserExtension.cs b/WF-WebAdmin/WF-WebAdmin/Converter/UserExtension.cs index ebcf0e4..cbdd18b 100644 --- a/WF-WebAdmin/WF-WebAdmin/Converter/UserExtension.cs +++ b/WF-WebAdmin/WF-WebAdmin/Converter/UserExtension.cs @@ -4,15 +4,15 @@ namespace WF_WebAdmin.Converter { 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; } - 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; } } diff --git a/WF-WebAdmin/WF-WebAdmin/Service/CommentaryServiceStub.cs b/WF-WebAdmin/WF-WebAdmin/Service/CommentaryServiceStub.cs index d1a57ae..c0c8244 100644 --- a/WF-WebAdmin/WF-WebAdmin/Service/CommentaryServiceStub.cs +++ b/WF-WebAdmin/WF-WebAdmin/Service/CommentaryServiceStub.cs @@ -21,7 +21,7 @@ namespace WF_WebAdmin.Service } var json = await File.ReadAllTextAsync(_jsonFilePath); - var dtoList = JsonSerializer.Deserialize>(json) ?? new List(); + var dtoList = JsonSerializer.Deserialize>(json) ?? new List(); var comments = dtoList.ConvertAll(dto => dto.ToModel()); diff --git a/WF-WebAdmin/WF-WebAdmin/Service/QuoteServiceLocal.cs b/WF-WebAdmin/WF-WebAdmin/Service/QuoteServiceLocal.cs index 0afa4ab..1b71866 100644 --- a/WF-WebAdmin/WF-WebAdmin/Service/QuoteServiceLocal.cs +++ b/WF-WebAdmin/WF-WebAdmin/Service/QuoteServiceLocal.cs @@ -11,20 +11,20 @@ namespace WF_WebAdmin.Service /// - /// Asynchronously adds a new quote to the database and returns the corresponding . + /// Asynchronously adds a new quote to the database and returns the corresponding . /// /// The object to be added to the database. - /// A task representing the asynchronous operation, with a result containing the added quote's data. + /// A task representing the asynchronous operation, with a result containing the added quote's data. /// - /// This method converts the provided object into a using . + /// This method converts the provided object into a using . /// 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 is returned to the caller. + /// After successfully inserting the quote, the corresponding 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. /// - public async Task AddQuoteAsync(Quote quote) + public async Task AddQuoteAsync(Quote quote) { QuoteExtension extension = new QuoteExtension(); - QuoteDTO quoteDTO = extension.QuoteToDTO(quote); + QuoteDto quoteDTO = extension.QuoteToDTO(quote); // Utilisation de NpgsqlConnection pour PostgreSQL using (var connection = new NpgsqlConnection(_connectionString)) @@ -75,12 +75,12 @@ namespace WF_WebAdmin.Service /// - /// Asynchronously handles the removal of a quote and returns the corresponding . + /// Asynchronously handles the removal of a quote and returns the corresponding . /// /// The object to be removed. - /// A task representing the asynchronous operation, with a result corresponding to the removed quote. + /// A task representing the asynchronous operation, with a result corresponding to the removed quote. /// - /// This method takes a object, converts it into a using the + /// This method takes a object, converts it into a using the /// , 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. /// 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) { 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 Task.FromResult(quoteDTO); @@ -96,12 +96,12 @@ namespace WF_WebAdmin.Service /// - /// Asynchronously validates a quote and returns the corresponding . + /// Asynchronously validates a quote and returns the corresponding . /// /// The object to be validated. - /// A task representing the asynchronous operation, with a result corresponding to the validated quote. + /// A task representing the asynchronous operation, with a result corresponding to the validated quote. /// - /// This method takes a object, converts it into a using the + /// This method takes a object, converts it into a using the /// , 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. /// 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) { 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 Task.FromResult(quoteDTO); @@ -118,12 +118,12 @@ namespace WF_WebAdmin.Service /// - /// Asynchronously updates a quote and returns the corresponding . + /// Asynchronously updates a quote and returns the corresponding . /// /// The object to be updated. - /// A task representing the asynchronous operation, with a result corresponding to the updated quote. + /// A task representing the asynchronous operation, with a result corresponding to the updated quote. /// - /// This method takes a object, converts it into a using the + /// This method takes a object, converts it into a using the /// , 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. /// 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) { 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 Task.FromResult(quoteDTO); From 3070676b20e4be6959856fe3f1c74cf4d4d09093 Mon Sep 17 00:00:00 2001 From: "maxime.rocher" Date: Sat, 8 Feb 2025 22:18:05 +0100 Subject: [PATCH 3/5] Enfin le graphique --- .../WF-WebAdmin/Pages/CommentaryChart.razor | 44 +- .../Pages/CommentaryChart.razor.cs | 72 -- WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj | 1 - .../wwwroot/fake-dataCommentary.json | 731 +++++++++++++----- 4 files changed, 569 insertions(+), 279 deletions(-) delete mode 100644 WF-WebAdmin/WF-WebAdmin/Pages/CommentaryChart.razor.cs diff --git a/WF-WebAdmin/WF-WebAdmin/Pages/CommentaryChart.razor b/WF-WebAdmin/WF-WebAdmin/Pages/CommentaryChart.razor index e2ea783..11a470a 100644 --- a/WF-WebAdmin/WF-WebAdmin/Pages/CommentaryChart.razor +++ b/WF-WebAdmin/WF-WebAdmin/Pages/CommentaryChart.razor @@ -1,17 +1,37 @@ @page "/commentary-chart" -@using MudBlazor - - -

Statistiques des Commentaires - Année @SelectedYear

+

Nombre de commentaires par mois

- - @foreach (var year in AvailableYears) + + +@code { + private int Index = -1; + private List 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) + { + data[item.Month] = item.Value; + } + + Series = new List + { + new ChartSeries { - @year + Name = "", + Data = data } - - - -
-
+ }; + } +} \ No newline at end of file diff --git a/WF-WebAdmin/WF-WebAdmin/Pages/CommentaryChart.razor.cs b/WF-WebAdmin/WF-WebAdmin/Pages/CommentaryChart.razor.cs deleted file mode 100644 index b41d4c6..0000000 --- a/WF-WebAdmin/WF-WebAdmin/Pages/CommentaryChart.razor.cs +++ /dev/null @@ -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 Labels { get; set; } = new(); - public List ChartData { get; set; } = new(); - public List AvailableYears { get; set; } = new(); - public int SelectedYear { get; set; } - - private List AllComments = new(); - - protected override async Task OnInitializedAsync() - { - // Charger tous les commentaires - AllComments = await CommentaryService.GetCommentsAsync(); - - if (!AllComments.Any()) - { - Labels = new List { "Aucun commentaire" }; - ChartData = new List { 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 { "Aucun commentaire" }; - ChartData = new List { 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 { grouped.Values.Select(v => (double)v).ToArray() }; - } - } -} diff --git a/WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj b/WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj index f11e9db..47115cb 100644 --- a/WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj +++ b/WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj @@ -18,7 +18,6 @@ - diff --git a/WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataCommentary.json b/WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataCommentary.json index b77e700..df2582b 100644 --- a/WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataCommentary.json +++ b/WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataCommentary.json @@ -1,359 +1,702 @@ [ { "id_comment": 1, - "quote": 1, - "users": 1, - "dateC": "2024-10-10", - "comment": "coucou" + "quote": 19, + "users": 29, + "dateC": "2024-01-22", + "comment": "Citation magnifique." }, { "id_comment": 2, - "quote": 1, - "users": 2, - "dateC": "2024-10-11", - "comment": "Super citation !" + "quote": 6, + "users": 18, + "dateC": "2024-01-20", + "comment": "Paroles sages." }, { "id_comment": 3, - "quote": 1, - "users": 3, - "dateC": "2024-10-12", - "comment": "Très inspirant." + "quote": 2, + "users": 8, + "dateC": "2024-01-25", + "comment": "Citation puissante." }, { "id_comment": 4, - "quote": 2, - "users": 4, - "dateC": "2024-10-13", - "comment": "J'adore cette phrase." + "quote": 11, + "users": 31, + "dateC": "2024-01-01", + "comment": "Très poétique." }, { "id_comment": 5, - "quote": 2, - "users": 5, - "dateC": "2024-10-14", - "comment": "Citation profonde." + "quote": 8, + "users": 6, + "dateC": "2024-02-06", + "comment": "Belle pensée." }, { "id_comment": 6, - "quote": 2, - "users": 6, - "dateC": "2024-10-15", - "comment": "Belle pensée." + "quote": 13, + "users": 37, + "dateC": "2024-02-01", + "comment": "Citation exceptionnelle." }, { "id_comment": 7, - "quote": 3, - "users": 7, - "dateC": "2024-10-16", - "comment": "Très motivant." + "quote": 2, + "users": 33, + "dateC": "2024-02-11", + "comment": "Belle pensée." }, { "id_comment": 8, - "quote": 3, - "users": 8, - "dateC": "2024-10-17", - "comment": "Citation puissante." + "quote": 7, + "users": 28, + "dateC": "2024-02-07", + "comment": "Très émouvant." }, { "id_comment": 9, - "quote": 3, - "users": 9, - "dateC": "2024-10-18", - "comment": "Paroles sages." + "quote": 1, + "users": 48, + "dateC": "2024-03-05", + "comment": "Très motivant." }, { "id_comment": 10, - "quote": 4, - "users": 10, - "dateC": "2024-10-19", - "comment": "Très réfléchi." + "quote": 16, + "users": 14, + "dateC": "2024-03-13", + "comment": "Très motivant." }, { "id_comment": 11, - "quote": 4, - "users": 11, - "dateC": "2024-10-20", - "comment": "Citation magnifique." + "quote": 10, + "users": 9, + "dateC": "2024-03-13", + "comment": "Très touchant." }, { "id_comment": 12, "quote": 4, - "users": 12, - "dateC": "2024-10-21", + "users": 44, + "dateC": "2024-03-01", "comment": "Très touchant." }, { "id_comment": 13, - "quote": 5, - "users": 13, - "dateC": "2024-10-22", - "comment": "Citation parfaite." + "quote": 9, + "users": 8, + "dateC": "2024-04-04", + "comment": "Citation magnifique." }, { "id_comment": 14, - "quote": 5, - "users": 14, - "dateC": "2024-10-23", + "quote": 3, + "users": 49, + "dateC": "2024-04-18", "comment": "Très émouvant." }, { "id_comment": 15, - "quote": 5, - "users": 15, - "dateC": "2024-10-24", - "comment": "Citation merveilleuse." + "quote": 19, + "users": 3, + "dateC": "2024-04-07", + "comment": "Très motivant." }, { "id_comment": 16, - "quote": 6, - "users": 16, - "dateC": "2024-10-25", - "comment": "Très poétique." + "quote": 4, + "users": 9, + "dateC": "2024-04-25", + "comment": "Très motivant." }, { "id_comment": 17, - "quote": 6, - "users": 17, - "dateC": "2024-10-26", - "comment": "Citation exceptionnelle." + "quote": 17, + "users": 40, + "dateC": "2024-05-04", + "comment": "Très émouvant." }, { "id_comment": 18, "quote": 6, - "users": 18, - "dateC": "2024-10-27", - "comment": "Très inspirant." + "users": 21, + "dateC": "2024-05-11", + "comment": "Très poétique." }, { "id_comment": 19, - "quote": 7, - "users": 19, - "dateC": "2024-10-28", - "comment": "J'adore cette phrase." + "quote": 16, + "users": 3, + "dateC": "2024-05-08", + "comment": "Citation exceptionnelle." }, { "id_comment": 20, - "quote": 7, - "users": 20, - "dateC": "2024-10-29", - "comment": "Citation profonde." + "quote": 1, + "users": 17, + "dateC": "2024-05-04", + "comment": "Très touchant." }, { "id_comment": 21, - "quote": 7, - "users": 21, - "dateC": "2024-08-30", - "comment": "Belle pensée." + "quote": 14, + "users": 34, + "dateC": "2024-06-01", + "comment": "Citation magnifique." }, { "id_comment": 22, - "quote": 8, - "users": 22, - "dateC": "2024-10-31", - "comment": "Très motivant." + "quote": 12, + "users": 23, + "dateC": "2024-06-03", + "comment": "Citation magnifique." }, { "id_comment": 23, - "quote": 8, - "users": 23, - "dateC": "2024-11-01", - "comment": "Citation puissante." + "quote": 11, + "users": 47, + "dateC": "2024-06-05", + "comment": "Citation magnifique." }, { "id_comment": 24, - "quote": 8, - "users": 24, - "dateC": "2024-11-02", - "comment": "Paroles sages." + "quote": 16, + "users": 28, + "dateC": "2024-06-07", + "comment": "Citation magnifique." }, { "id_comment": 25, - "quote": 9, - "users": 25, - "dateC": "2024-11-03", - "comment": "Très réfléchi." + "quote": 19, + "users": 39, + "dateC": "2024-07-01", + "comment": "Citation magnifique." }, { "id_comment": 26, - "quote": 9, - "users": 26, - "dateC": "2024-11-04", + "quote": 13, + "users": 31, + "dateC": "2024-07-02", "comment": "Citation magnifique." }, { "id_comment": 27, - "quote": 9, - "users": 27, - "dateC": "2024-11-05", - "comment": "Très touchant." + "quote": 1, + "users": 33, + "dateC": "2024-07-03", + "comment": "Citation magnifique." }, { "id_comment": 28, - "quote": 10, - "users": 28, - "dateC": "2024-11-06", - "comment": "Citation parfaite." + "quote": 17, + "users": 20, + "dateC": "2024-07-04", + "comment": "Citation magnifique." }, { "id_comment": 29, - "quote": 10, + "quote": 13, "users": 29, - "dateC": "2024-11-07", - "comment": "Très émouvant." + "dateC": "2024-08-01", + "comment": "Citation magnifique." }, { "id_comment": 30, - "quote": 10, - "users": 30, - "dateC": "2024-11-08", - "comment": "Citation merveilleuse." + "quote": 11, + "users": 27, + "dateC": "2024-08-02", + "comment": "Citation magnifique." }, { "id_comment": 31, - "quote": 11, - "users": 31, - "dateC": "2024-11-09", - "comment": "Très poétique." + "quote": 18, + "users": 35, + "dateC": "2024-08-03", + "comment": "Citation magnifique." }, { "id_comment": 32, - "quote": 11, + "quote": 13, "users": 32, - "dateC": "2024-11-10", - "comment": "Citation exceptionnelle." + "dateC": "2024-08-04", + "comment": "Citation magnifique." }, { "id_comment": 33, - "quote": 11, - "users": 33, - "dateC": "2024-11-11", - "comment": "Très inspirant." + "quote": 13, + "users": 3, + "dateC": "2024-09-01", + "comment": "Citation magnifique." }, { "id_comment": 34, - "quote": 12, - "users": 34, - "dateC": "2024-11-12", - "comment": "J'adore cette phrase." + "quote": 15, + "users": 43, + "dateC": "2024-09-02", + "comment": "Citation magnifique." }, { "id_comment": 35, - "quote": 12, - "users": 35, - "dateC": "2024-11-13", - "comment": "Citation profonde." + "quote": 11, + "users": 15, + "dateC": "2024-09-03", + "comment": "Citation magnifique." }, { "id_comment": 36, - "quote": 12, - "users": 36, - "dateC": "2024-11-14", - "comment": "Belle pensée." + "quote": 10, + "users": 22, + "dateC": "2024-09-04", + "comment": "Citation magnifique." }, { "id_comment": 37, - "quote": 13, - "users": 37, - "dateC": "2024-11-15", - "comment": "Très motivant." + "quote": 17, + "users": 23, + "dateC": "2024-10-01", + "comment": "Citation magnifique." }, { "id_comment": 38, - "quote": 13, - "users": 38, - "dateC": "2024-11-16", - "comment": "Citation puissante." + "quote": 14, + "users": 40, + "dateC": "2024-10-02", + "comment": "Citation magnifique." }, { "id_comment": 39, - "quote": 13, - "users": 39, - "dateC": "2024-11-17", - "comment": "Paroles sages." + "quote": 15, + "users": 41, + "dateC": "2024-10-03", + "comment": "Citation magnifique." }, { "id_comment": 40, - "quote": 14, - "users": 40, - "dateC": "2024-11-18", - "comment": "Très réfléchi." + "quote": 16, + "users": 42, + "dateC": "2024-10-04", + "comment": "Citation magnifique." }, { "id_comment": 41, - "quote": 14, - "users": 41, - "dateC": "2024-11-19", + "quote": 10, + "users": 39, + "dateC": "2024-11-01", "comment": "Citation magnifique." }, { "id_comment": 42, - "quote": 14, - "users": 42, - "dateC": "2024-11-20", - "comment": "Très touchant." + "quote": 17, + "users": 43, + "dateC": "2024-11-02", + "comment": "Citation magnifique." }, { "id_comment": 43, - "quote": 15, - "users": 43, - "dateC": "2024-11-21", - "comment": "Citation parfaite." + "quote": 13, + "users": 27, + "dateC": "2024-11-03", + "comment": "Citation magnifique." }, { "id_comment": 44, - "quote": 15, - "users": 44, - "dateC": "2024-11-22", - "comment": "Très émouvant." + "quote": 12, + "users": 29, + "dateC": "2024-11-04", + "comment": "Citation magnifique." }, { "id_comment": 45, - "quote": 15, - "users": 45, - "dateC": "2024-11-23", - "comment": "Citation merveilleuse." + "quote": 11, + "users": 32, + "dateC": "2024-12-01", + "comment": "Citation magnifique." }, { "id_comment": 46, - "quote": 16, - "users": 46, - "dateC": "2024-11-24", - "comment": "Très poétique." + "quote": 15, + "users": 31, + "dateC": "2024-12-02", + "comment": "Citation magnifique." }, { "id_comment": 47, - "quote": 16, - "users": 47, - "dateC": "2024-11-25", - "comment": "Citation exceptionnelle." + "quote": 18, + "users": 33, + "dateC": "2024-12-03", + "comment": "Citation magnifique." }, { "id_comment": 48, - "quote": 16, - "users": 48, - "dateC": "2024-11-26", - "comment": "Très inspirant." + "quote": 14, + "users": 34, + "dateC": "2024-12-04", + "comment": "Citation magnifique." }, { "id_comment": 49, - "quote": 17, - "users": 49, - "dateC": "2024-11-27", - "comment": "J'adore cette phrase." + "quote": 19, + "users": 35, + "dateC": "2024-12-05", + "comment": "Citation magnifique." }, { "id_comment": 50, "quote": 17, - "users": 50, - "dateC": "2024-11-28", - "comment": "Citation profonde." + "users": 36, + "dateC": "2024-12-06", + "comment": "Citation magnifique." }, { "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, - "users": 51, - "dateC": "2024-11-29", - "comment": "Belle pensée." + "users": 3, + "dateC": "2024-12-23", + "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." } ] \ No newline at end of file From cdf1c5777ccda82fe09b52f8e2b40f9f0ad0e92f Mon Sep 17 00:00:00 2001 From: "maxime.rocher" Date: Sat, 8 Feb 2025 22:21:05 +0100 Subject: [PATCH 4/5] ajout petits icons stylax --- WF-WebAdmin/WF-WebAdmin/Shared/NavMenu.razor | 105 +++++++++--------- .../WF-WebAdmin/wwwroot/fake_data_logs.json | 4 + 2 files changed, 57 insertions(+), 52 deletions(-) diff --git a/WF-WebAdmin/WF-WebAdmin/Shared/NavMenu.razor b/WF-WebAdmin/WF-WebAdmin/Shared/NavMenu.razor index a9174b8..d4b5b54 100644 --- a/WF-WebAdmin/WF-WebAdmin/Shared/NavMenu.razor +++ b/WF-WebAdmin/WF-WebAdmin/Shared/NavMenu.razor @@ -2,65 +2,66 @@ @inject UserLogin uLogin -