diff --git a/App.xaml.cs b/App.xaml.cs index 2a18fbb..5e4165e 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -8,7 +8,8 @@ namespace Justice public App() { InitializeComponent(); - InitializeDatabaseAsync(); // Call the async method to initialize the database + InitializeDatabaseAsync(); + // Call the async method to initialize the database } private async void InitializeDatabaseAsync() @@ -17,7 +18,8 @@ namespace Justice { var dbHelper = new DatabaseHelper(); await dbHelper.InitializeAsync(); - await dbHelper.InitializeAsync();// Asynchronously create the EmergencyContact table + await dbHelper.InitializeAsync(); + await dbHelper.InitializeAsync();// Asynchronously create the EmergencyContact table } catch (Exception ex) { diff --git a/AppShell.xaml b/AppShell.xaml index 31c8d46..b5ce1b2 100644 --- a/AppShell.xaml +++ b/AppShell.xaml @@ -3,12 +3,11 @@ x:Class="Justice.AppShell" xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" - xmlns:local="clr-namespace:Justice" + xmlns:views="clr-namespace:Justice.Views" Shell.FlyoutBehavior="Flyout" Title="Justice"> - + + + diff --git a/Helpers/DatabaseHelper.cs b/Helpers/DatabaseHelper.cs index e2e025b..fd883e1 100644 --- a/Helpers/DatabaseHelper.cs +++ b/Helpers/DatabaseHelper.cs @@ -36,5 +36,9 @@ namespace Justice.Helpers { return await _database.DeleteAsync(item); } + public async Task FindAsync(string query, params object[] args) where T : new() + { + return await _database.FindWithQueryAsync(query, args); + } } } diff --git a/Justice.csproj b/Justice.csproj index 113dae0..fbc1f82 100644 --- a/Justice.csproj +++ b/Justice.csproj @@ -60,7 +60,14 @@ + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -75,6 +82,9 @@ MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile @@ -90,6 +100,12 @@ MSBuild:Compile + + MSBuild:Compile + + + MSBuild:Compile + MSBuild:Compile diff --git a/Justice.csproj.user b/Justice.csproj.user index c1f09fa..bc2dc16 100644 --- a/Justice.csproj.user +++ b/Justice.csproj.user @@ -14,6 +14,9 @@ Designer + + Designer + Designer @@ -29,6 +32,12 @@ Designer + + Designer + + + Designer + Designer diff --git a/Justice.sln b/Justice.sln index da439ee..f27886e 100644 --- a/Justice.sln +++ b/Justice.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.12.35527.113 d17.12 +VisualStudioVersion = 17.12.35527.113 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Justice", "Justice.csproj", "{C9C0819F-18B1-47E3-B27A-1992686E61D1}" EndProject @@ -13,6 +13,7 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {C9C0819F-18B1-47E3-B27A-1992686E61D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C9C0819F-18B1-47E3-B27A-1992686E61D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9C0819F-18B1-47E3-B27A-1992686E61D1}.Debug|Any CPU.Deploy.0 = Debug|Any CPU {C9C0819F-18B1-47E3-B27A-1992686E61D1}.Release|Any CPU.ActiveCfg = Release|Any CPU {C9C0819F-18B1-47E3-B27A-1992686E61D1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection diff --git a/Models/User.cs b/Models/User.cs index 6515a9a..15dd6d5 100644 --- a/Models/User.cs +++ b/Models/User.cs @@ -8,19 +8,15 @@ namespace Justice.Models { public class User { - public string Name { get; set; } - public string MobileNumber { get; set; } - public string Address { get; set; } - public string NationalIdentityNumber { get; set; } - public string NationalIdPath { get; set; } - public string Email { get; set; } + public int Id { get; set; } + public string Username { get; set; } + public string Password { get; set; } + public string Role { get; set; } + public string AuthorityType { get; set; } } public class AuthorityUser : User { - public string AuthorityCategory { get; set; } - public string IncidentCategory { get; set; } - public double Longitude { get; set; } - public double Latitude { get; set; } + } } diff --git a/Views/AuthorityDashboardPage.xaml b/Views/AuthorityDashboardPage.xaml new file mode 100644 index 0000000..72acd01 --- /dev/null +++ b/Views/AuthorityDashboardPage.xaml @@ -0,0 +1,43 @@ + + + + +