From 7b50b1e5ad56a803336448ab189d8631142654aa Mon Sep 17 00:00:00 2001 From: anperederi Date: Sun, 21 Jan 2024 21:53:05 +0100 Subject: [PATCH 1/2] remove fakes data's files --- Sources/HeartTrack/wwwroot/fake-reports.json | 178 --------- Sources/HeartTrack/wwwroot/fake-tickets.json | 209 ---------- Sources/HeartTrack/wwwroot/fake-users.json | 379 ------------------- 3 files changed, 766 deletions(-) delete mode 100644 Sources/HeartTrack/wwwroot/fake-reports.json delete mode 100644 Sources/HeartTrack/wwwroot/fake-tickets.json delete mode 100644 Sources/HeartTrack/wwwroot/fake-users.json diff --git a/Sources/HeartTrack/wwwroot/fake-reports.json b/Sources/HeartTrack/wwwroot/fake-reports.json deleted file mode 100644 index c58b50f..0000000 --- a/Sources/HeartTrack/wwwroot/fake-reports.json +++ /dev/null @@ -1,178 +0,0 @@ -[ - { - "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" - } -] \ No newline at end of file diff --git a/Sources/HeartTrack/wwwroot/fake-tickets.json b/Sources/HeartTrack/wwwroot/fake-tickets.json deleted file mode 100644 index 802f171..0000000 --- a/Sources/HeartTrack/wwwroot/fake-tickets.json +++ /dev/null @@ -1,209 +0,0 @@ -[ - { - "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 - } -] \ No newline at end of file diff --git a/Sources/HeartTrack/wwwroot/fake-users.json b/Sources/HeartTrack/wwwroot/fake-users.json deleted file mode 100644 index a6c5378..0000000 --- a/Sources/HeartTrack/wwwroot/fake-users.json +++ /dev/null @@ -1,379 +0,0 @@ -[ - { - "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 - } -] \ No newline at end of file From a4ae9e1426746a50a8434f2b803f2059d60fcb29 Mon Sep 17 00:00:00 2001 From: anperederi Date: Sun, 21 Jan 2024 22:51:38 +0100 Subject: [PATCH 2/2] update program.cs --- Sources/HeartTrack/Program.cs | 50 ++++++----------------------------- 1 file changed, 8 insertions(+), 42 deletions(-) diff --git a/Sources/HeartTrack/Program.cs b/Sources/HeartTrack/Program.cs index 5d6d55a..9ec56ff 100644 --- a/Sources/HeartTrack/Program.cs +++ b/Sources/HeartTrack/Program.cs @@ -10,17 +10,11 @@ using HeartTrack.Services.ActivityDataService; using HeartTrack.Services.ReportDataService; using HeartTrack.Services.UserDataService; using HeartTrack.Services.TicketDataService; -using Blazorise; -using Blazorise.Bootstrap; -using Blazorise.Icons.FontAwesome; -using Microsoft.AspNetCore.Localization; -using System.Globalization; -using Microsoft.Extensions.Options; -using Blazored.LocalStorage; -using HeartTrack.Services; -using Microsoft.AspNetCore.Components.Authorization; using MudBlazor.Services; +using HeartTrack.Services.ActivityDataServiceFactice; +using HeartTrack.Services.ReportDataServiceFactice; using HeartTrack.Services.TicketDataServiceFactice; +using HeartTrack.Services.UserDataServiceFactice; var builder = WebApplication.CreateBuilder(args); @@ -34,10 +28,10 @@ builder.Services.AddHttpClient(); // Add Services builder.Services.AddScoped(); -builder.Services.AddScoped(); -builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); builder.Services.AddScoped(); -builder.Services.AddScoped(); +builder.Services.AddScoped(); builder.Services.AddBlazorise() @@ -50,34 +44,7 @@ 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(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 { new CultureInfo("en-US"), new CultureInfo("fr-FR") }; - options.SupportedUICultures = new List { new CultureInfo("en-US"), new CultureInfo("fr-FR") }; -}); - -builder.Services.AddBlazoredLocalStorage(); - -builder.Services.AddHttpClient(); - -builder.Services.AddScoped(); - -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 +// Configure the localization builder.Services.Configure(options => { // Set the default culture of the web site @@ -124,5 +91,4 @@ app.UseEndpoints(endpoints => app.MapBlazorHub(); app.MapFallbackToPage("/_Host"); -app.Run(); - +app.Run(); \ No newline at end of file